/* Direction A: dark sky, a sunset horizon with a cypress line,
   bold poster headlines (Anton) and a classic serif for reading.
   Phone layout first; the wide layout starts at 900px. */
:root {
  --sky: #0c0f19;        /* page */
  --cream: #f1e3c8;      /* headings */
  --body: #d9ccb2;       /* reading text */
  --muted: #b8ad98;      /* dates, labels, sources */
  --gold: #f1cf9d;       /* status, worked */
  --orange: #e48b4f;     /* eyebrows, partly worked */
  --red: #e8877e;        /* lost */
  --link: #e9c9a0;
  --line: #2a3148;
  --line-2: #3a4260;
  --pill: #4a5270;
  --display: Anton, Impact, "Arial Narrow", sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--sky); scroll-behavior: smooth; scroll-padding-top: 60px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--sky); color: var(--cream); font: 400 17px/1.55 var(--serif); -webkit-text-size-adjust: 100%; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: #f6ead3; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3, h4, p { margin: 0; }
h2, h3 { text-wrap: balance; }
button { font: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.text { color: var(--body); }

/* ---------- ticker strip ----------
   A slow strip across the top: share price, next flight, newest calm headline.
   It drifts left at about 35px a second, stops on hover, focus or Pause, and
   does not move at all for people who ask for reduced motion. */
.ticker { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); background: #10141f; font-size: 15px; line-height: 1.3; }
.ticker-view { flex: 1; min-width: 0; overflow: hidden; }
.ticker-track { display: flex; width: max-content; animation: ticker-drift var(--ticker-time, 40s) linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track, .ticker.is-paused .ticker-track { animation-play-state: paused; }
.ticker-list { display: flex; margin: 0; padding: 0; list-style: none; }
.ticker-item { display: flex; align-items: baseline; gap: 8px; padding: 11px 28px 11px 0; white-space: nowrap; color: var(--body); font-variant-numeric: tabular-nums; }
.ticker-item::before { content: ""; align-self: center; width: 5px; height: 5px; margin-right: 20px; border-radius: 50%; background: var(--orange); }
.ticker-label { font: 400 12px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--orange); }
.ticker-item a { color: var(--cream); }
.ticker-toggle { flex: none; padding: 0 14px; border: 0; border-left: 1px solid var(--line); background: #10141f; color: var(--muted);
  font: 400 12px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.ticker-toggle:hover { color: var(--cream); }
.ticker-toggle:focus-visible { outline-offset: -3px; }
@keyframes ticker-drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; width: auto; }
  .ticker-list { flex-wrap: wrap; padding: 4px 16px; column-gap: 0; }
  .ticker-item { white-space: normal; padding: 6px 24px 6px 0; }
  .ticker-toggle, .ticker-copy { display: none; }
}

/* ---------- hero ---------- */
.hero { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 28px 0 0; text-align: center; }
.emblem { display: block; width: 250px; height: auto; }
.tagline { font-size: 20px; line-height: 1.4; max-width: 300px; padding: 0 16px; }

.horizon { position: relative; height: 92px; background: linear-gradient(180deg, var(--sky) 0%, #2a2238 45%, #7a4538 80%, #c9733f 100%); }
.horizon svg { position: absolute; left: 0; bottom: 0; width: 100%; height: 72px; display: block; fill: var(--sky); }
.horizon-phone { align-self: stretch; margin-top: 10px; }
.horizon-wide { display: none; }

/* ---------- right now ---------- */
.now { align-self: stretch; display: flex; flex-direction: column; gap: 10px; padding: 28px 24px 26px; border-bottom: 1px solid var(--line); text-align: left; }
.eyebrow { font: 400 14px/1.3 var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--orange); }
.now-head { display: flex; flex-direction: column; gap: 10px; }
.now-name { font: 400 40px/1.05 var(--display); letter-spacing: .01em; color: var(--cream); }
.now-status { font-size: 22px; font-style: italic; line-height: 1.3; color: var(--gold); }
.now-when { color: var(--muted); font-size: 15px; }
.now-when:empty { display: none; }
#rn-note { margin-top: 4px; }

/* ---------- clocks ---------- */
.clock { display: flex; font-family: var(--display); font-variant-numeric: tabular-nums; color: var(--cream); }
.clock .unit { display: flex; flex-direction: column; }
.clock .lbl { font-family: var(--serif); text-transform: uppercase; color: var(--muted); }
.clock .dg { display: inline-block; width: .52em; text-align: center; } /* fixed cells: no shift as it ticks */
.clock .num { white-space: nowrap; }
.clock-small { gap: 16px; }
.clock-small .unit { min-width: 56px; }
.clock-small .num { font-size: 34px; line-height: 1; }
.clock-small .lbl { font-size: 12px; letter-spacing: .12em; margin-top: 4px; }
.clock-big { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 8px; margin-top: 6px; }
.clock-big[hidden] { display: none; }
.clock-big .unit { align-items: center; }
.clock-big .num { font-size: min(52px, 13vw); line-height: 1; white-space: nowrap; }
.clock-big .lbl { font-size: 12px; letter-spacing: .14em; margin-top: 6px; }

/* ---------- jump menu ---------- */
.jump { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  height: 48px; padding: 0 20px; background: var(--sky); border-bottom: 1px solid var(--line);
  font: 400 13px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.jump a { color: var(--muted); text-decoration: none; padding: 12px 4px; white-space: nowrap; }
.jump a:hover, .jump a[aria-current="true"] { color: var(--cream); }
.jump a[aria-current="true"] { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* ---------- sections ---------- */
.block { display: flex; flex-direction: column; gap: 12px; padding: 30px 24px 28px; border-bottom: 1px solid var(--line); }
.block > h2 { font: 400 28px/1.1 var(--display); color: var(--cream); }
#log > h2 { margin-bottom: 10px; }

.mars-label { font-size: 15px; color: var(--muted); }
.mars-label:empty { display: none; }
.mars-status { text-align: center; font-size: 15px; color: var(--link); margin-top: 4px; }
.mars-status:empty { display: none; }
.mars-text { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }

/* sources: one small quiet line */
.sources { font-size: 13px; line-height: 1.6; color: var(--muted); margin-top: 6px; }

/* folds: pill buttons */
.fold > summary, .older > summary, .pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px;
  border: 1px solid var(--pill); border-radius: 999px; background: transparent; color: var(--cream);
  font-size: 15px; cursor: pointer; list-style: none; }
.fold > summary::-webkit-details-marker, .older > summary::-webkit-details-marker { display: none; }
.fold > summary::after, .older > summary .caret { content: "▾"; font-size: 12px; }
.fold[open] > summary::after { content: "▴"; }
.fold > summary:hover, .older > summary:hover, .pill:hover { border-color: var(--muted); }
.fold { align-self: flex-start; }
.fold-body { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; color: var(--body); }
.fold-small > summary { min-height: 40px; padding: 7px 14px; font-size: 14px; }
.older > summary .more-note { font-size: 13px; color: var(--muted); }
.older[open] > summary .caret { transform: rotate(180deg); }

/* ---------- updates ---------- */
#updates-list { display: flex; flex-direction: column; gap: 12px; }
.update { display: flex; flex-direction: column; gap: 8px; }
.update-date { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--orange); }
.update-title { font-size: 21px; font-weight: 600; line-height: 1.3; color: var(--cream); }
.update .fold, .flight .fold { margin-top: 2px; }
.older { margin-top: 6px; }
.older > .update { margin-top: 26px; }
.older .update-title { font-size: 19px; }

/* ---------- flight log: a timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 26px; border-left: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 26px; }
.flight { position: relative; display: flex; flex-direction: column; gap: 6px; }
.flight-date { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.flight-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.flight-no { font: 400 24px/1.15 var(--display); color: var(--cream); }
.flight-result { font-size: 15px; font-weight: 600; }
.flight .sources { margin-top: 0; }
.tl-mark { position: absolute; left: -34px; top: 6px; }

/* markers: shape and words carry the result, not colour alone */
.mark { display: inline-block; flex-shrink: 0; width: 15px; height: 15px; border-radius: 50%; }
.mark-full { background: var(--gold); }
.mark-half { border: 2px solid var(--orange); background: linear-gradient(90deg, var(--orange) 50%, var(--sky) 50%); }
.mark-ring { border: 2px solid var(--red); background: var(--sky); }
.mark-dash { border: 2px dashed var(--muted); background: var(--sky); }
[data-result="orbit"] .flight-result, [data-result="success"] .flight-result { color: var(--gold); }
[data-result="partial"] .flight-result { color: var(--orange); }
[data-result="lost"] .flight-result { color: var(--red); }
[data-result="scrubbed"] .flight-result { color: var(--muted); }

.log-foot { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 14px; margin-top: 10px; }
.legend { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .mark { width: 11px; height: 11px; }

/* ---------- footer ---------- */
.foot { display: flex; flex-direction: column; gap: 10px; padding: 28px 24px 40px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.foot-lines { display: flex; flex-direction: column; gap: 4px; }
.foot-by { color: var(--cream); }
.bayou { font: 400 13px/1.3 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--orange); }

/* ---------- wide screens ---------- */
@media (min-width: 900px) {
  body { font-size: 18px; line-height: 1.6; }
  .hero { display: grid; grid-template-columns: 340px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 56px; row-gap: 22px;
    align-items: start; max-width: 1048px; margin: 0 auto; padding: 56px 24px 0; text-align: left; }
  .emblem { grid-column: 1; grid-row: 1 / span 2; width: 340px; }
  .tagline { grid-column: 2; font-size: 30px; line-height: 1.3; max-width: none; padding: 18px 0 0; }
  .horizon-phone { display: none; }
  .now { grid-column: 2; padding: 22px 0 0; border-top: 1px solid var(--line); border-bottom: 0; }
  .now-head { flex-direction: row; align-items: baseline; gap: 22px; flex-wrap: wrap; }
  .now-name { font-size: 44px; }
  .now-status { font-size: 26px; }
  .clock-small { gap: 22px; }
  .clock-small .unit { min-width: 60px; }
  .clock-small .num { font-size: 36px; }
  .sources { font-size: 14px; }

  .horizon-wide { display: block; height: 150px; margin-top: 24px; }
  .horizon-wide svg { height: 110px; }

  .ticker { font-size: 16px; }
  .ticker-item { padding: 13px 36px 13px 0; }
  .ticker-item::before { margin-right: 28px; }

  .jump { justify-content: center; gap: 48px; height: 56px; padding: 0 24px; border-top: 1px solid var(--line); font-size: 14px; letter-spacing: .14em; }
  .jump a { padding: 16px 4px; }

  .block { max-width: 808px; margin: 0 auto; width: 100%; gap: 14px; padding: 48px 24px 44px; }
  .block > h2 { font-size: 34px; }
  #log > h2 { margin-bottom: 14px; }
  .mars { align-items: center; text-align: center; padding-top: 56px; padding-bottom: 48px; }
  .mars-label { font-size: 16px; }
  .clock-big { width: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 8px; }
  .clock-big .num { font-size: 96px; }
  .clock-big .lbl { font-size: 13px; letter-spacing: .16em; margin-top: 8px; }
  .mars-status { font-size: 16px; }
  .mars-text { align-self: stretch; text-align: left; }
  .update-title { font-size: 24px; }
  .older .update-title { font-size: 21px; }

  .timeline { padding: 0; border-left: 0; gap: 0; }
  .flight { display: grid; grid-template-columns: 170px 40px minmax(0, 1fr); column-gap: 10px; row-gap: 6px; padding-bottom: 28px; }
  .flight > * { grid-column: 3; }
  .flight > .flight-date { grid-column: 1; grid-row: 1; padding-top: 10px; }
  .flight > .tl-mark { grid-column: auto; grid-row: auto; position: absolute; left: 180px; top: 0; bottom: 0; width: 40px; display: flex; justify-content: center; padding-top: 10px; }
  .flight > .tl-mark::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--line-2); }
  .flight.is-last > .tl-mark::before { bottom: auto; height: 10px; }
  .flight > .tl-mark .mark { position: relative; }
  .flight > .flight-head { grid-row: 1; }
  .flight-no { font-size: 26px; }
  .flight-result { font-size: 16px; }

  .log-foot { flex-direction: row; justify-content: space-between; align-items: center; margin-top: 18px; padding-left: 220px; flex-wrap: wrap; }

  .foot { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 24px; max-width: 808px; margin: 0 auto; padding: 32px 24px 56px; }
  .bayou { white-space: nowrap; }
}
