/* The app's House lights palette and Stagehand type (src/theme). Color belongs
   to the route; everything else stays quiet. Avenir Next Condensed and Menlo
   are the app's own faces on iOS; other devices get the nearest match. */
:root {
  --bg: #f3eee5;
  --surface: #faf7f1;
  --rule: #e3ddd3;
  --fg: #2a2622;
  --muted: #6f675d;
  --brass: #86602c;
  --route: #95396b;
  --flag: #efe0b8;
  --condensed: "Avenir Next Condensed", "Barlow Condensed", "Arial Narrow", sans-serif;
  --mono: Menlo, ui-monospace, Consolas, monospace;
  --wordmark: Archivo, "Arial Black", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171513;
    --surface: #1f1c19;
    --rule: #34302c;
    --fg: #ece5d8;
    --muted: #a0978a;
    --brass: #d2ae78;
    --route: #e0509e;
    --flag: #4a3b1a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--brass); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
.page {
  max-width: 880px; margin: 0 auto; display: grid; gap: 48px;
  padding-block: max(40px, env(safe-area-inset-top, 0px)) max(40px, env(safe-area-inset-bottom, 0px));
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.hero { display: grid; gap: 28px; }
.wordmark {
  font-family: var(--wordmark); font-weight: 900; font-stretch: 125%;
  font-size: clamp(38px, 11.5vw, 92px); line-height: 1; letter-spacing: -.01em;
  transform: skewX(-10deg); transform-origin: left bottom;
}
h1 { font: 600 clamp(32px, 6vw, 44px)/1.05 var(--condensed); text-wrap: balance; }
.lead { color: var(--muted); font-size: 19px; margin-top: -18px; max-width: 34em; }

.sheet {
  margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) 216px;
  background: var(--surface); border: 1px solid var(--rule);
}
.map { min-width: 0; padding: 8px; align-self: center; }
.map svg { display: block; width: 100%; height: auto; }
.griddot { fill: var(--rule); }
.city { font: 400 12px var(--mono); fill: var(--muted); }
.faint, .casing, .route, .flight { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.faint { stroke: var(--route); stroke-width: 2.5; opacity: .25; }
.casing { stroke: var(--surface); stroke-width: 8; }
.route { stroke: var(--route); stroke-width: 3.5; }
.flight { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 2 7; }
.stop { fill: var(--surface); stroke: var(--route); stroke-width: 2.5; }
@media (prefers-reduced-motion: no-preference) {
  .casing, .route { stroke-dasharray: 1; animation: draw 1.5s ease-out both; }
  .later { animation-delay: 1.5s; }
  @keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
}
.itinerary { border-left: 1px solid var(--rule); padding: 16px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.tag { font-size: 13px; color: var(--muted); }
.itinerary ol { list-style: none; margin: 0; padding: 0; display: grid; }
.itinerary li {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px; padding-block: 6px;
  border-top: 1px solid var(--rule); font-size: 14px; line-height: 1.3;
}
.date { font: 400 12px/1.5 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }

.log { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; border-bottom: 1px solid var(--rule); }
.entry { display: grid; gap: 4px; align-content: start; padding-block: 18px; border-top: 1px solid var(--rule); min-width: 0; }
.entry h2, .status h2 { font: 600 24px/1.15 var(--condensed); }
.entry p { color: var(--muted); font-size: 16px; }
.status { display: grid; gap: 4px; }
.foot { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--muted); padding-top: 16px; border-top: 1px solid var(--rule); }

/* Reading pages */
.doc { max-width: 680px; gap: 32px; }
.doc .small-mark {
  font-family: var(--wordmark); font-weight: 900; font-stretch: 125%; font-size: 22px; line-height: 1;
  display: inline-block; transform: skewX(-10deg); color: inherit; text-decoration: none;
}
.doc h1 { font-size: 40px; }
.doc section { display: grid; gap: 10px; }
.doc h2 { font: 600 25px/1.15 var(--condensed); margin-top: 8px; }
.doc ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.doc p, .doc li { max-width: 65ch; }
.draft { background: var(--flag); padding: 12px 14px; font-size: 15px; }
mark { background: var(--flag); color: inherit; padding: 0 3px; }
.table { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; }

@media (max-width: 680px) {
  .page { gap: 36px; }
  .sheet { grid-template-columns: minmax(0, 1fr); }
  .itinerary { border-left: 0; border-top: 1px solid var(--rule); }
  .log { grid-template-columns: minmax(0, 1fr); }
  .city { font-size: 20px; }
}
