/* Design's article's visuals (article/designArticle.js): the bus app's own screens, in its own look, which stays light
   at night, and the chart of the two walks, which stands on the article's floor in colours that read by day and night. */

.of-design { --run: #c2410c; --walk: #1d4ed8; }
@media (prefers-color-scheme: dark) { .of-design { --run: #fb8f63; --walk: #8fb0ff; } }

.of-design .design-phone { display: flex; flex-direction: column; flex: none; width: 222px; height: 420px; overflow: hidden; border: 6px solid #1c1b19; border-radius: 36px; background: #fff padding-box; color: #111; font: 12px/1.35 -apple-system, BlinkMacSystemFont, "Helvetica Neue", system-ui, sans-serif; text-align: center; box-shadow: 0 22px 40px -22px rgba(0, 0, 0, .4); }
.of-design .design-phone.lit { border-radius: 36px; }
.of-design .design-time { flex: none; padding: 9px 22px 0; font-size: 10.5px; font-weight: 700; text-align: left; }
.of-design .design-whose { font-size: 12.5px; line-height: 1.5; color: var(--muted); text-align: center; }
.of-design .design-chip { display: inline-block; width: 11px; height: 11px; margin-right: 6px; border-radius: 3px; background: var(--chip); }

/* ---- today's screen: the map over the sheet of times, or the times alone ---- */
.of-design .design-map { position: relative; flex: none; height: 250px; }
.of-design .design-map svg { display: block; width: 100%; height: 100%; }
.of-design .design-head { flex: none; padding-bottom: 10px; border-bottom: 1px solid #e5e7eb; }
.of-design .design-place { margin-top: 12px; font-size: 13px; font-weight: 700; }
.of-design .design-sheet { position: relative; display: flex; flex: 1; flex-direction: column; min-height: 0; padding: 12px 8px 10px; background: #fff; }
.of-design .design-map + .design-sheet { margin-top: -14px; border-radius: 14px 14px 0 0; }
.of-design .design-map + .design-sheet::before { content: ""; position: absolute; left: 50%; top: 5px; width: 26px; height: 3px; margin-left: -13px; border-radius: 2px; background: #d1d5db; }
.of-design .design-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; flex: 1 1 0; align-items: center; gap: 8px; min-height: 24px; max-height: 60px; padding: 0 6px; border: 0; border-bottom: 1px solid #eef0f2; border-radius: 0; background: none; font-size: 11px; line-height: 1.2; color: #374151; text-align: left; transition: background-color .4s var(--soft); }
@media (hover: hover) { .of-design .design-row:not(.design-mine):hover { background: #f3f4f6; } }
.of-design .design-row:focus-visible { outline: 2px solid #1d1d1f; outline-offset: -2px; }
.of-design .design-row b { height: 15px; border-radius: 4px; background: var(--line); font-size: 10px; line-height: 15px; text-align: center; color: #fff; }
.of-design .design-row strong { font-weight: 600; color: #111; font-variant-numeric: tabular-nums; }
.of-design .design-row.design-mine { border-radius: 8px; border-bottom-color: transparent; background: #ffe58a; font-weight: 700; color: #111; }
.of-design .design-row.design-mine strong { font-size: 15px; font-weight: 800; }
.of-design .design-few .design-row { max-height: 76px; font-size: 14px; }
.of-design .design-few .design-row strong { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.of-design .design-head + .design-few { justify-content: center; }
.of-design .design-head + .design-few .design-row:only-child { grid-template-columns: auto; flex: none; justify-content: center; justify-items: center; align-content: center; gap: 12px; max-height: none; padding: 26px 10px; border-bottom: 0; border-radius: 16px; font-size: 16px; }
.of-design .design-head + .design-few .design-row:only-child b { width: 40px; height: 26px; font-size: 16px; line-height: 26px; }
.of-design .design-head + .design-few .design-row:only-child strong { font-size: 46px; }

/* ---- the glance screen: the word in its ring on the colour's wash, and under it the bus, a line and the walk ---- */
.of-design .design-top { flex: none; padding-bottom: 14px; background: var(--bus-wash); }
.of-design .design-stop { margin-top: 14px; font-size: 11.5px; color: #4b5563; }
.of-design .design-dial { position: relative; display: grid; place-items: center; width: 156px; height: 156px; margin: 15px auto 0; }
.of-design .design-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.of-design .design-ring.lit { border-radius: 50%; }
.of-design .design-ring circle { fill: none; stroke: var(--bus-ink); stroke-width: 7; stroke-opacity: .18; }
.of-design .design-ring circle.design-arc { stroke-opacity: 1; stroke-linecap: round; }
.of-design .design-word { position: relative; padding: 0 5px; font-size: 50px; line-height: 1.15; font-weight: 800; letter-spacing: -0.035em; color: var(--bus-ink); }
.of-design .design-bus { flex: none; margin: 18px 12px 0; font-size: 18px; line-height: 1.3; font-weight: 700; letter-spacing: -0.012em; }
.of-design .design-line { flex: none; min-height: 1.4em; max-height: 5.6em; margin: 4px 14px 0; padding: 0 4px; overflow: hidden auto; border-radius: 6px; outline: 1.5px solid transparent; font-size: 12px; line-height: 1.4; color: #5b616c; overflow-wrap: anywhere; scrollbar-width: none; }
/* Longer than the screen holds, a line ends in an ellipsis as a phone's does; while it is written in, it scrolls. */
.of-design .design-line:not(:focus) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.of-design .design-line[data-edit] { cursor: text; transition: outline-color .25s, box-shadow .4s var(--soft); }
.of-design .design-line[data-edit]:is(:hover, :focus) { outline-color: color-mix(in srgb, var(--bus-ink) 60%, transparent); }
.of-design .design-way { display: flex; flex-wrap: wrap; justify-content: space-between; flex: none; margin: auto 20px 14px; padding-top: 6px; font-size: 10.5px; color: #5b616c; }
.of-design .design-way p { position: relative; width: 100%; height: 13px; margin-bottom: 5px; }
.of-design .design-way p::before { content: ""; position: absolute; left: 0; right: 6px; top: 5px; height: 3px; border-radius: 2px; background: #d1d5db; }
.of-design .design-way p::after { content: ""; position: absolute; right: 0; top: 0; width: 13px; height: 13px; border-radius: 3px; background: #111; }
.of-design .design-way i { position: absolute; }
.of-design .design-way i:nth-child(1) { left: 0; top: 5px; width: calc(var(--at) * 100%); height: 3px; border-radius: 2px; background: var(--bus-ink); }
.of-design .design-way i:nth-child(2) { left: calc(var(--at) * 100% - 6px); top: .5px; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; background: var(--bus-ink); }

/* The colour filling the whole screen, and everything on it white: white passes 4.5 to 1 on both colours. The colours
   change at once: eased apart, the white word would stand on the pale wash. */
.of-design .design-full { background-color: var(--bus-ink); color: #fff; }
.of-design .design-full .design-top { background: transparent; }
.of-design .design-full :is(.design-stop, .design-word, .design-line, .design-way) { color: #fff; }
.of-design .design-full .design-ring circle { stroke: #fff; }
.of-design .design-full .design-line[data-edit]:is(:hover, :focus) { outline-color: rgba(255, 255, 255, .8); }
.of-design .design-full .design-way p::before { background: rgba(255, 255, 255, .4); }
.of-design .design-full .design-way p::after, .of-design .design-full .design-way i:nth-child(1) { background: #fff; }
.of-design .design-full .design-way i:nth-child(2) { border-color: var(--bus-ink); background: #fff; }
.of-design .design-full [data-lights].lit { box-shadow: 0 0 0 2px #fff, 0 0 0 7px rgba(255, 255, 255, .32); }

.of-design .design-lone .design-top { display: flex; flex: 1; flex-direction: column; }
.of-design .design-lone .design-dial { margin-block: auto; }

.of-design .design-none .design-top { background: #fff; }
.of-design .design-none .design-word { color: #111; }
.of-design .design-none .design-ring circle { stroke: #111; }
.of-design .design-none .design-way :is(i:nth-child(1), i:nth-child(2)) { background: #111; }

/* ---- the two glance screens side by side ---- */
.of-design .design-pair { display: flex; justify-content: center; align-items: flex-start; gap: 34px; }
.of-design .design-col { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.of-design .design-tab { display: none; }

/* ---- the walk: each one's screen, and under both their walks against the times the 12 leaves ---- */
.of-design .design-walks { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }
.of-design .design-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 178px)); justify-content: center; gap: 28px; width: 100%; }
.of-design .design-card { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; }
.of-design .design-phone.design-small { flex: 1; width: 100%; height: auto; padding-bottom: 12px; border-width: 5px; border-radius: 28px; }
.of-design .design-small .design-top { padding-bottom: 9px; }
.of-design .design-small .design-time { padding: 6px 17px 0; }
.of-design .design-small .design-stop { margin-top: 6px; font-size: 10.5px; }
.of-design .design-small .design-dial { width: 96px; height: 96px; margin-top: 7px; }
.of-design .design-small .design-word { font-size: 29px; }
.of-design .design-small .design-bus { margin: 9px 5px 0; font-size: 13.5px; }
.of-design .design-small .design-line { margin: 2px 5px 0; font-size: 11px; }

.of-design .design-chart { width: min(540px, 100%); padding: 0 4px; font-size: 13px; line-height: 1.45; text-align: left; }
.of-design .design-leave { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; font-size: 11.5px; color: var(--muted); }
.of-design .design-key::before { content: ""; display: inline-block; width: 14px; height: 4px; margin-right: 6px; vertical-align: 2px; border: solid var(--run); border-width: 0 1.5px 1.5px; }
.of-design .design-times { position: relative; height: 20px; font-size: 11.5px; color: var(--ink); font-variant-numeric: tabular-nums; }
.of-design .design-times span { position: absolute; top: 0; padding: 0 2px; transform: translateX(-50%); }
.of-design .design-lane { --said: var(--walk); padding: 5px 0 3px; border-top: 1px solid var(--hairline); }
.of-design .design-lane.design-run { --said: var(--run); }
.of-design .design-lane b { color: var(--said); }
.of-design .design-track { position: relative; height: 28px; }
.of-design .design-track::before { content: ""; position: absolute; left: 0; right: 0; top: 17px; height: 2px; background: var(--hairline); }
.of-design .design-track i { position: absolute; }
.of-design .design-walked { left: 0; top: 14px; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--said) 45%, transparent); transition: width .45s var(--move); }
.of-design .design-reach { top: 23px; height: 5px; border: solid var(--run); border-width: 0 1.5px 1.5px; transition: left .45s var(--move), width .45s var(--move); }
.of-design .design-wait { top: 17px; border-top: 2px dotted var(--said); }
.of-design .design-dash { top: 5px; border-top: 2px dashed var(--said); }
.of-design .design-dash::after { content: ""; position: absolute; right: 0; top: -5px; border: 4px solid transparent; border-right: 0; border-left: 7px solid var(--said); }
.of-design .design-leaves { top: 8px; bottom: 2px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--faint); }
.of-design .design-leaves.design-caught { top: 0; width: 5px; margin-left: -2.5px; background: var(--said); }
.of-design .design-walker { top: 11px; width: 14px; height: 14px; margin-left: -7px; border: 2.5px solid var(--paper); border-radius: 50%; background: var(--said); box-shadow: 0 0 0 1px var(--said); transition: left .45s var(--move); }
.of-design .design-minute { top: 0; bottom: 0; border-radius: 4px; cursor: pointer; }
/* Only where a pointer can rest: a finger's tap would leave the minute marked. */
@media (hover: hover) { .of-design .design-minute:hover { background: color-mix(in srgb, var(--said) 20%, transparent); } }

/* ---- what an underlined word lights, where a ring outside it would be cut or has no box to stand round ---- */
.of-design :is(.design-map, .design-sheet).lit { box-shadow: none; }
.of-design :is(.design-map, .design-sheet).lit::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 3px var(--app-tint), inset 0 0 0 7px color-mix(in srgb, var(--app-tint) 24%, transparent); pointer-events: none; }
.of-design .design-map.lit { border-radius: 0; }
.of-design .design-map.lit::after { border-radius: 30px 30px 14px 14px; }
.of-design .design-map + .design-sheet.lit { border-radius: 14px 14px 0 0; }
.of-design .design-sheet.lit::after { border-radius: 14px 14px 30px 30px; }
.of-design .design-map g[data-lights].lit { filter: drop-shadow(0 0 1.5px #111) drop-shadow(0 0 5px var(--app-tint)); }
.of-design .design-map g[data-lights="dot"].lit { filter: none; }
.of-design .design-map g[data-lights="dot"].lit circle:first-of-type { r: 20px; opacity: 1; fill: color-mix(in srgb, var(--app-tint) 28%, transparent); stroke: var(--app-tint); stroke-width: 2.5px; }

/* ---- narrower: one glance screen, under the two names, which choose ---- */
@container (width < 560px) {
  .of-design .design-pair { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; gap: 12px 6px; }
  .of-design .design-col { display: contents; }
  .of-design .design-tab { display: block; grid-row: 1; min-height: 36px; padding: 4px 14px; border: 0; border-radius: 6px; background: none; font-size: 13px; line-height: 1.5; color: var(--muted); }
  .of-design .design-chosen .design-tab { background: color-mix(in srgb, var(--app-tint) 13%, var(--paper)); font-weight: 600; color: var(--ink-strong); }
  .of-design .design-col .design-whose, .of-design .design-col:not(.design-chosen) .design-phone { display: none; }
  .of-design .design-chosen .design-phone { grid-row: 2; grid-column: 1 / -1; justify-self: center; }
  .of-design .design-cards { gap: 10px; }
}
@container (width < 300px) {
  .of-design .design-small .design-bus { margin-inline: 0; font-size: 11.5px; white-space: nowrap; }
}