@font-face { font-family: "Syne"; src: url("fonts/syne-latin-wght-normal.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-wght-normal.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "Readex Pro"; src: url("fonts/readex-pro-arabic-wght-normal.woff2") format("woff2"); font-weight: 160 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "DM Mono"; src: url("fonts/dm-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("fonts/dm-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ground: #1536d1;
  --ink: #ffffff;
  --muted: rgb(255 255 255 / 0.74);
  --line: rgb(255 255 255 / 0.28);
  --cell: rgb(255 255 255 / 0.12);
  --field: #ffffff;
  --field-ink: #0b1220;
  --heat-1: #ff7a3d;
  --heat-2: #ffa23d;
  --heat-3: #ffd84d;
  --display: "Syne", "Figtree", "Readex Pro", system-ui, sans-serif;
  --ui: "Figtree", "Readex Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Readex Pro", monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ground: #0b1235; --line: rgb(255 255 255 / 0.2); --cell: rgb(255 255 255 / 0.09); }
}
:root[data-theme="dark"] { --ground: #0b1235; --line: rgb(255 255 255 / 0.2); --cell: rgb(255 255 255 / 0.09); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body { margin: 0; background: var(--ground); color: var(--ink); font: 400 14.5px/1.5 var(--ui); -webkit-font-smoothing: antialiased; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--heat-3); outline-offset: 3px; }

.bar { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; padding: 14px 28px 4px; }
.brand { margin: 0; font: 800 22px/1 var(--display); letter-spacing: -0.03em; }
.brand i { font-style: normal; color: var(--heat-1); }
.bar-meta { color: var(--muted); font-size: 12.5px; }
.purpose { flex: 1; margin: 0; font-size: 15px; font-weight: 500; }

.stack { display: grid; gap: 12px; padding: 0 28px 16px; min-height: 0; }

/* The answer comes first, at poster size */
.sentence { margin: 6px 0 0; min-height: 1.05em; font: 800 clamp(28px, min(4.6vw, 7vh), 66px)/1.02 var(--display); letter-spacing: -0.035em; }

/* The expression: a white block with a hard orange shadow */
.sentence.dim { opacity: 0.45; }

.expr {
  display: block; width: calc(100% - 8px); padding: 12px 20px; border: 0; border-radius: 0;
  background: var(--field); color: var(--field-ink); box-shadow: 8px 8px 0 var(--heat-1);
  font: 500 clamp(24px, 3.4vw, 38px)/1.2 var(--mono); letter-spacing: 0.05em; caret-color: var(--heat-1);
}
.expr:focus-visible { outline: 3px solid var(--heat-3); outline-offset: 3px; }
.expr.bad { box-shadow: 8px 8px 0 #ffffff; outline: 3px solid var(--heat-3); outline-offset: 3px; }

.fields { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 16px; }
.field { padding: 0 14px; border-inline-start: 1px solid var(--line); min-width: 0; }
.field:first-child { padding-inline-start: 0; border-inline-start: 0; }
.field small { display: block; font: 700 10.5px/1.4 var(--ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.field code { display: block; font: 500 17px/1.3 var(--mono); word-break: break-all; }
.field span { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.3; overflow-wrap: anywhere; }
.field.bad code { color: var(--heat-3); }
.field.bad small::after { content: " ← check"; color: var(--heat-3); letter-spacing: 0.04em; text-transform: none; }
.error { margin: 10px 0 0; font-weight: 700; }
.error::before { content: "● "; color: var(--heat-3); }

.row { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-top: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { font: 500 12.5px/1 var(--mono); padding: 8px 11px; border: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); cursor: pointer; }
.chips button:hover { background: var(--ink); color: var(--ground); border-color: var(--ink); }

/* Time zone picker */
.zone { position: relative; display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; }
.zone-btn { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); font: 700 13px var(--ui); cursor: pointer; }
.zone-btn:hover, .zone-btn[aria-expanded="true"] { border-color: var(--ink); }
.zone-btn small { font: 500 11px var(--mono); color: var(--muted); }
.zone-btn i { width: 7px; height: 7px; margin: -3px 2px 0 0; margin-inline: 0 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.15s; }
.zone-btn[aria-expanded="true"] i { transform: rotate(225deg); margin-top: 3px; }
.zone-pop { --pop-ink: #0b1220; --pop-muted: #5f6b7a; position: absolute; z-index: 20; top: calc(100% + 10px); inset-inline-end: 8px; width: min(340px, 92vw); overflow: hidden; background: #fff; color: var(--pop-ink); border-radius: 0; box-shadow: 8px 8px 0 var(--heat-1); }
.zone-pop input { width: 100%; padding: 13px 14px; border: 0; border-bottom: 2px solid var(--pop-ink); border-radius: 0; background: transparent; color: var(--pop-ink); font: 500 14px var(--ui); }
.zone-pop input:focus-visible { outline: none; box-shadow: inset 0 -4px 0 var(--heat-1); }
.zone-list { list-style: none; margin: 0; padding: 4px; max-height: 280px; overflow: auto; }
.zone-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; padding: 8px 10px; color: var(--pop-ink); cursor: pointer; }
.zone-list li.active { background: #0b1220; color: #fff; }
.zone-list li.active .o-region, .zone-list li.active .o-off { color: rgb(255 255 255 / 0.7); }
.zone-list li[aria-selected="true"] .o-city::before { content: "■"; margin-inline-end: 6px; color: var(--heat-1); }
.o-city { font-weight: 700; font-size: 13.5px; }
.o-region { color: var(--pop-muted); font-size: 12px; }
.o-off { min-width: 4ch; text-align: end; color: var(--pop-muted); font: 500 11.5px var(--mono); }
.zone-note { padding: 12px 14px; color: var(--pop-muted); font-size: 12.5px; cursor: default; }

/* The board: week map across the full width, departures below */
.board { display: grid; gap: 14px; min-height: 0; }
.board h2 { margin: 0 0 8px; font: 700 11px/1 var(--ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.week { display: grid; grid-template-columns: 38px repeat(24, minmax(0, 1fr)); grid-template-rows: auto repeat(7, clamp(16px, 3.2vh, 34px)); gap: 3px; align-items: center; }
.week .day { font: 500 12px var(--mono); color: var(--muted); }
.week .hr { font: 400 10px var(--mono); color: var(--muted); }
.week .c { height: 100%; border-radius: 0; background: var(--cell); }
.week .c[data-l="1"] { background: var(--heat-1); }
.week .c[data-l="2"] { background: var(--heat-2); }
.week .c[data-l="3"] { background: var(--heat-3); }

.runs { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 40px; }
.runs li { break-inside: avoid; display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); font: 400 13px/1.3 var(--mono); }
.runs time { font-weight: 500; white-space: nowrap; }
.runs small { margin-inline-start: auto; margin-inline-end: 12px; color: var(--muted); font: 400 12px var(--mono); white-space: nowrap; }
.runs span { color: var(--muted); white-space: nowrap; }
.none { margin: 0; color: var(--muted); }

@media (min-width: 900px) and (min-height: 640px) {
  .app { height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr); }
  .stack { align-content: start; }
}
@media (max-width: 760px) {
  .bar, .stack { padding-inline: 16px; }
  .purpose { flex-basis: 100%; order: 3; }
  .runs { columns: 1; }
  .fields { gap: 0; }
  .field { padding: 0 6px; }
  .field code { font-size: 14px; }
  .field span { font-size: 11px; }
  .week { grid-template-columns: 30px repeat(24, minmax(0, 1fr)); grid-template-rows: auto repeat(7, 22px); gap: 2px; }
  .expr { box-shadow: 5px 5px 0 var(--heat-1); width: calc(100% - 5px); }
}

/* Questions under the tool: for people who scroll, and for search engines */
.faq { max-width: 920px; margin: 0 auto; padding: 56px 20px 64px; }
.faq h2 { margin: 0 0 20px; font: 700 22px/1.2 var(--display); letter-spacing: -0.02em; }
.faq-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px 32px; }
.faq h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.faq p { margin: 0; color: var(--muted); line-height: 1.6; }

/* Arabic page: letter spacing breaks the joins between Arabic letters */
:lang(ar) :is(.sentence, .field small, .board h2, .faq h2) { letter-spacing: 0; }
:lang(ar) .sentence { line-height: 1.25; }
:lang(ar) .field.bad small::after { content: " · راجعه"; }
.expr, .zone-list, .field code, .chips button { direction: ltr; unicode-bidi: isolate; } /* cron stays as typed */
[dir="rtl"] .expr { text-align: right; }
.lang { margin-inline-start: 10px; font-weight: 600; color: var(--ink); unicode-bidi: isolate; }


/* Light/dark button in the top bar, sharp like the rest of the page */
.theme { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-inline-start: 8px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--ink); cursor: pointer; vertical-align: middle; }
.theme:hover { background: var(--line); }
.theme svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme .sun, .theme[data-dark="true"] .moon { display: none; }
.theme[data-dark="true"] .sun { display: block; }
