/* SeatRuler — design pass 2. Direction A's sand palette and Spectral/Hanken
   Grotesk pairing, re-derived into our variable system (scripts/derive-palette.js
   holds the oklch anchors and the contrast math; every text/background pair is
   verified >= 4.5:1 AA in both schemes). */

@font-face {
  font-family: 'Spectral';
  src: url('/fonts/spectral-400-latin.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Spectral';
  src: url('/fonts/spectral-600-latin.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/fonts/hanken-grotesk-latin.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
}

:root {
  /* sand ground (Direction A anchors, hue 60-78) */
  --bg: #F8F3EB;
  --card: #FFFBF6;
  --band: #F0E6DA;
  --line: #D5D0C8;
  --ink: #302720;
  --soft: #635146;
  /* one clay accent (hue 45): text-safe shade + reference shade for large/decor */
  --accent: #954C28;        /* 5.7:1 on ground */
  --accent-bright: #BC6F4C; /* Direction A's accent verbatim — large text & decoration */
  --good: #2C5C38;
  --badge-bg: #E9DCCD;
  --badge-ink: #635146;
  --warn-border: #BC8A3C;
  --hist-border: #8A6FA0;
  --shadow: 0 1px 2px rgba(64, 50, 35, .05), 0 6px 22px rgba(64, 50, 35, .09);
  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --sans: 'Hanken Grotesk', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #201914;
    --card: #2A221D;
    --band: #28211C;
    --line: #413933;
    --ink: #E9E4DC;
    --soft: #B4A99E;
    --accent: #DE9871;
    --accent-bright: #DE9871;
    --good: #93C69D;
    --badge-bg: #3B3129;
    --badge-ink: #B4A99E;
    --warn-border: #B98A4B;
    --hist-border: #9C85B5;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 22px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { font-size: 18px; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
main { max-width: 68ch; margin: 0 auto; padding: 1rem 1.1rem 3rem; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 1.1rem 0 .5rem; }
h2 { font-size: 1.3rem; margin-top: 2.2rem; }
h3 { font-size: 1.08rem; }

/* Serif lede: every page opens with one before the data. */
.lede { font-family: var(--serif); font-weight: 400; font-size: 1.14rem; line-height: 1.55; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* Header — wordmark keeps the tick underline everywhere except the home page,
   where the ruler hero IS the motif. */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header nav {
  max-width: 68ch; margin: 0 auto; padding: .7rem 1.1rem;
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: baseline;
}
.site-header a { text-decoration: none; color: var(--soft); font-size: .9rem; }
.site-header a:hover { color: var(--accent); }
.site-header .brand {
  font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--ink);
  padding-bottom: 5px;
  background-image:
    linear-gradient(to right, var(--accent-bright), var(--accent-bright)),
    repeating-linear-gradient(to right, var(--accent-bright) 0 1px, transparent 1px 6px);
  background-repeat: no-repeat;
  background-size: 100% 1px, 100% 5px;
  background-position: left bottom, left calc(100% - 1px);
}

/* Coverage disclosure: the four verticals grouped under one header entry so the
   top level stays uncramped and every vertical is one tap away. Native
   details/summary (same pattern as the verification notes), no JS, keyboard
   accessible. Dropdown panel on desktop, inline expansion on mobile. */
.site-header details.nav-group { position: relative; }
.site-header summary {
  cursor: pointer; color: var(--soft); font-size: .9rem; list-style: none;
}
.site-header summary::-webkit-details-marker { display: none; }
.site-header summary::after { content: " \25BE"; font-size: .72em; }
.site-header details[open] summary::after { content: " \25B4"; }
.site-header summary:hover { color: var(--accent); }
.site-header .nav-menu { display: flex; flex-direction: column; gap: .55rem; }
@media (min-width: 561px) {
  .site-header .nav-menu {
    position: absolute; top: 1.7rem; left: 0; z-index: 20;
    background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
    padding: .7rem 1rem; min-width: 12rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
  }
}
@media (max-width: 560px) {
  .site-header .nav-menu { padding: .45rem 0 .15rem 1rem; }
}

/* Footer: quiet human line + the tick divider. */
.site-footer {
  margin-top: 2.5rem;
  font-size: .85rem; color: var(--soft);
  background-image:
    linear-gradient(to right, var(--line), var(--line)),
    repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px 6px);
  background-repeat: no-repeat;
  background-size: 100% 1px, 100% 5px;
  background-position: left top, left 1px;
  padding-top: 6px;
}
.site-footer p { max-width: 68ch; margin: .8rem auto; padding: 0 1.1rem; }
.site-footer a { color: var(--soft); }
.human-line { font-family: var(--serif); font-style: italic; }

/* Tone bands: rounded blocks of the band tone to break page monotony. */
.band {
  background: var(--band);
  border-radius: 16px;
  padding: 1.2rem 1.3rem;
  margin: 2rem -0.4rem;
}
.band > :first-child { margin-top: .2rem; }

/* The compare page's set-piece stat — its one big type moment. */
.setpiece { text-align: left; }
.setpiece .stat-line {
  font-family: var(--serif); font-weight: 600;
  font-size: 2.6rem; line-height: 1.1; margin: .2rem 0 .4rem;
  color: var(--ink);
}
.setpiece .stat-line .stat-accent { color: var(--accent); }

/* Roundels: two-letter IATA codes in our design language — no logos, ever. */
.roundel {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--card);
  font-family: var(--sans); font-weight: 700; font-size: .76rem; letter-spacing: .03em;
  color: var(--soft);
}
.roundel.sm { width: 28px; height: 28px; flex-basis: 28px; font-size: .62rem; }
h1 .roundel { vertical-align: -8px; margin-right: .45rem; }

/* ===== Verdict card (Direction C anatomy): announcement zone above stats. */
.verdict {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin: 1.2rem 0;
  overflow: hidden;
}
.verdict-zone { padding: 1.2rem 1.3rem 1.05rem; }
.verdict-kicker {
  margin: 0; font-size: .76rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em; color: var(--soft);
}
.verdict-number {
  margin: .15rem 0 .2rem;
  font-family: var(--serif); font-weight: 600;
  font-size: 3.1rem; line-height: 1.05;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.verdict-number.unpublished { font-size: 1.7rem; color: var(--ink); }
.verdict-note { margin: 0; font-size: .87rem; color: var(--soft); }
.verdict-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0;
  margin: 0; border-top: 1px solid var(--line);
  background: var(--band);
}
.verdict-stats > div { padding: .8rem .9rem; }
.verdict-stats > div + div { border-left: 1px solid var(--line); }
.verdict-stats dt {
  font-size: .7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--soft); margin: 0 0 .15rem;
}
.verdict-stats dd { margin: 0; font-size: .92rem; line-height: 1.45; }
@media (max-width: 540px) {
  .verdict-stats { grid-template-columns: 1fr; }
  .verdict-stats > div + div { border-left: 0; border-top: 1px solid var(--line); }
}

/* Tier states — built for Phase 3A (My Numbers), NOT rendered today.
   They activate only from the reader's on-device numbers, never as a universal
   badge. Wording locked: "Likely fits" / "Tight" / "Plan ahead". No check/X
   glyphs, no traffic-light colors — muted tints within the palette only.
   The activating markup also carries .verdict-caveat:
   "Guidance from your numbers, not a guarantee — dimensions vary by aircraft." */
.verdict-tier {
  display: inline-block; padding: .2rem .75rem; border-radius: 999px;
  font-size: .85rem; font-weight: 600; border: 1px solid var(--line);
}
/* Phase 3A rule supersedes the pass-2 tints: NO verdict colors, ever — all
   three tiers wear the same neutral tone; only the words differ. */
.verdict-tier.tier-fits, .verdict-tier.tier-tight, .verdict-tier.tier-plan {
  background: var(--badge-bg); color: var(--ink); border-color: var(--line);
}
.verdict-caveat { font-size: .78rem; color: var(--soft); margin: .3rem 0 0; }

/* My Numbers annotation slot inside the verdict card */
.fit-note {
  margin-top: .9rem; padding-top: .8rem;
  border-top: 1px dashed var(--line);
  font-size: .92rem;
}
.fit-note p { margin: .3rem 0; }

/* My Numbers entry form */
.numbers-form .field { margin: 1.1rem 0; }
.numbers-form label { font-weight: 600; display: block; }
.numbers-form .why { margin: .15rem 0 .35rem; font-size: .85rem; color: var(--soft); }
.numbers-form .optional { font-weight: 400; color: var(--soft); font-size: .85rem; }
.numbers-form input {
  font: inherit; font-variant-numeric: tabular-nums;
  width: 7rem; padding: .45rem .6rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--ink);
}
/* the tip form's wider controls — the 7rem numeric default doesn't fit them */
.numbers-form textarea, .numbers-form select {
  font: inherit; display: block; width: 100%; max-width: 34rem;
  padding: .5rem .65rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--ink);
}
.numbers-form input[type="email"] { width: 100%; max-width: 20rem; }
.numbers-form input[type="file"] {
  width: 100%; max-width: 34rem; padding: .3rem 0;
  border: 0; border-radius: 0; background: none;
}
.numbers-form input[type="checkbox"] {
  width: auto; margin: .2rem .5rem 0 0; padding: 0; accent-color: var(--accent);
}
.numbers-form .field label:has(input[type="checkbox"]) {
  display: flex; align-items: flex-start; font-weight: 400; max-width: 34rem;
}
.numbers-form button {
  font: inherit; font-weight: 600;
  padding: .55rem 1.1rem; border-radius: 10px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--card);
  cursor: pointer;
}
.quiet-button {
  font: inherit; padding: .55rem 1.1rem; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; color: var(--soft);
  cursor: pointer;
}
.quiet-button:hover, .numbers-form button:hover { border-color: var(--accent-bright); }

/* ===== Home hero ruler band (Direction B promoted to instrument). No JS. */
.ruler-figure { margin: 1.6rem 0 0; }
.ruler-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem 1rem;
}
.ruler-title { margin: 0 0 .9rem; font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--soft); }
.ruler-track { position: relative; height: 200px; }
.ruler-chip {
  position: absolute; transform: translateX(-50%);
  display: inline-flex; align-items: baseline; gap: .25rem;
  background: var(--badge-bg); color: var(--ink);
  border-radius: 7px; padding: .1rem .45rem;
  font-size: .72rem; font-weight: 700; white-space: nowrap;
  text-decoration: none;
}
.ruler-chip .w { font-weight: 400; color: var(--soft); font-variant-numeric: tabular-nums; }
.ruler-chip:hover { background: var(--accent); color: var(--card); }
.ruler-chip:hover .w { color: var(--card); }
.ruler-chip.narrowest { background: var(--accent); color: #FFFBF6; }
.ruler-chip.narrowest .w { color: #FFFBF6; }
.ruler-chip::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  width: 1px; background: var(--line);
}
.ruler-chip.lane-0 { top: 0; }      .ruler-chip.lane-0::after { height: 138px; }
.ruler-chip.lane-1 { top: 28px; }   .ruler-chip.lane-1::after { height: 110px; }
.ruler-chip.lane-2 { top: 56px; }   .ruler-chip.lane-2::after { height: 82px; }
.ruler-chip.lane-3 { top: 84px; }   .ruler-chip.lane-3::after { height: 54px; }
.ruler-chip.lane-4 { top: 112px; }  .ruler-chip.lane-4::after { height: 26px; }
.ruler-chip.narrowest::after { background: var(--accent-bright); }
/* on narrow screens the chips drop their width numbers — codes only */
@media (max-width: 560px) {
  .ruler-chip .w { display: none; }
  .ruler-chip { font-size: .62rem; padding: .06rem .3rem; }
}
.ruler-ticks {
  position: absolute; left: 0; right: 0; bottom: 26px; height: 14px;
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 9px);
  border-bottom: 1px solid var(--soft);
}
.ruler-labels {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between;
  font-size: .76rem; color: var(--soft); font-variant-numeric: tabular-nums;
}
.ruler-figure figcaption { font-size: .82rem; color: var(--soft); margin-top: .6rem; }

/* ===== Airline index card grid. */
.card-grid { list-style: none; padding: 0; display: grid; gap: .7rem; grid-template-columns: 1fr 1fr; }
.card-grid a {
  display: flex; align-items: center; gap: .7rem;
  background: var(--card);
  border: 1px solid var(--line); border-radius: 12px;
  padding: .7rem .8rem;
  text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow);
}
.card-grid a:hover { border-color: var(--accent-bright); }
.card-grid a:hover .roundel { border-color: var(--accent-bright); color: var(--accent); }
.card-grid .card-name { font-weight: 600; font-size: .92rem; line-height: 1.25; }
.card-grid .card-width { font-family: var(--serif); font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.card-grid .card-policy { font-size: .76rem; color: var(--soft); line-height: 1.35; }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }

.planning { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.verified-date { font-size: .85rem; color: var(--soft); }

/* Source pills */
.pill {
  display: inline-block;
  font-size: .72rem; line-height: 1.4;
  padding: .12rem .6rem;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-ink);
  text-decoration: none;
  border: 1px solid transparent;
  vertical-align: middle;
}
a.pill:hover { color: var(--accent); border-color: var(--line); }
.pill.src-secondary { background: transparent; border-color: var(--line); }
.pill.src-archived { background: transparent; border: 1px dashed var(--soft); }
.pill.src-correspondence { background: transparent; border: 1px dotted var(--accent); color: var(--accent); }
/* community fit reports: visibly the lowest tier */
.pill.src-community { background: transparent; border: 1px dotted var(--soft); color: var(--soft); font-style: italic; }
/* official source recorded, our own eyes not yet on it — distinct from the full badge */
.pill.src-interim { background: var(--badge-bg); border: 1px dashed var(--accent-bright); color: var(--badge-ink); }

/* parks: live-issue banner, stale flags, ride note blocks */
.callout.volatile { border-left-color: var(--accent-bright); background: color-mix(in srgb, var(--accent-bright) 9%, var(--band)); }
.stale-flag {
  display: inline-block; font-size: .78rem; color: var(--soft); font-style: italic;
  border-bottom: 1px dotted var(--soft); margin: .15rem 0;
}
.ride-note { border-top: 1px solid var(--line); padding-top: .4rem; margin-top: 1.4rem; }
.ride-note h3 { margin-bottom: .3rem; }
.ride-note p { margin: .35rem 0; font-size: .95rem; }

/* "We asked the airline directly" — answers, declines, and silences alike. */
.outreach-list dt { font-weight: 600; margin-top: .9rem; }
.outreach-list dd { margin: .15rem 0 0; font-size: .95rem; }
.outreach-list blockquote {
  margin: .5rem 0; padding: .4rem .9rem;
  border-left: 3px solid var(--line);
  font-family: var(--serif); font-style: italic; color: var(--soft);
}
.src { font-size: .8rem; color: var(--soft); }
.src a { color: var(--soft); }

/* Callouts */
.callout {
  border-left: 4px solid var(--accent-bright);
  background: var(--band);
  padding: .75rem 1rem; margin: 1rem 0;
  border-radius: 0 10px 10px 0;
  font-size: .95rem;
}
.callout.conflict { border-left-color: var(--warn-border); }
.callout.historical { border-left-color: var(--hist-border); }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .7rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: color-mix(in srgb, var(--band) 55%, var(--bg)); }
thead th {
  font-family: var(--sans);
  font-size: .76rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--soft); background: var(--bg);
  position: sticky; top: 0; z-index: 2;
}
.table-wrap th:first-child, .table-wrap td:first-child {
  position: sticky; left: 0; z-index: 1; background: var(--bg);
}
.table-wrap thead th:first-child { z-index: 3; }
tbody tr:nth-child(even) td:first-child, tbody tr:nth-child(even) th:first-child {
  background: color-mix(in srgb, var(--band) 55%, var(--bg));
}
table.sortable thead th { cursor: pointer; user-select: none; white-space: nowrap; }
table.sortable thead th::after { content: " ↕"; opacity: .45; }
table.sortable thead th.asc::after { content: " ↑"; opacity: 1; }
table.sortable thead th.desc::after { content: " ↓"; opacity: 1; }
td .roundel.sm { margin-right: .4rem; vertical-align: -8px; }

/* Accountability table: the editorial spine. */
table.accountability { font-size: .8rem; }
table.accountability th, table.accountability td { padding: .5rem .28rem; }
table.accountability thead th {
  color: var(--ink);
  background: var(--band);
  border-bottom: 2px solid var(--accent-bright);
  white-space: normal;
  text-transform: none;
  letter-spacing: 0;
  font-size: .8rem;
}
/* idle sort hints cost ~14px per header; five columns must fit a phone */
table.accountability thead th::after { content: ""; }
table.accountability thead th.asc::after { content: " ↑"; opacity: 1; }
table.accountability thead th.desc::after { content: " ↓"; opacity: 1; }

.yes { color: var(--good); font-weight: 600; }
.no { color: var(--soft); }

/* Verification notes: calm footnote register. */
details { margin: .9rem 0; }
details summary { cursor: pointer; color: var(--soft); font-size: .85rem; font-style: italic; }
details summary:hover { color: var(--accent); }
details[open] {
  background: var(--band);
  border-left: 3px solid var(--line);
  border-radius: 0 8px 8px 0;
  padding: .5rem .9rem;
}
details p, details li { font-size: .86rem; color: var(--soft); }
/* long source URLs must wrap inside the card, never spill past it */
details, .footnote, .src { overflow-wrap: anywhere; }

/* Gear box (affiliate, clearly fenced) */
.gear {
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--band);
  padding: .95rem 1.1rem; margin: 1.6rem 0;
  font-size: .92rem;
}
.gear .disclosure { font-size: .76rem; color: var(--soft); margin-top: .35rem; }

.footnote { font-size: .85rem; color: var(--soft); }
ol.timeline { padding-left: 1.2rem; }
ol.timeline li { margin-bottom: 1rem; }
ol.timeline .when { font-family: var(--serif); font-weight: 600; display: block; color: var(--ink); }

/* ===== Gate card: phone-friendly on screen, one clean page in print. */
.gate-card {
  background: var(--card);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.3rem 1.4rem;
  margin: 1.2rem 0;
}
.gate-card-brand { margin: 0; font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.gate-card h1 { font-size: 1.35rem; margin: .2rem 0 .2rem; }
.gate-card h2 { font-size: 1.02rem; margin-top: 1.2rem; }
.gate-card-policy p { font-size: .92rem; }
.gate-card-source { display: flex; gap: 1rem; align-items: flex-start; margin-top: 1.2rem; }
.gate-card-qr { flex: 0 0 132px; }
.gate-card-qr svg { width: 132px; height: 132px; background: #fff; padding: 6px; border: 1px solid var(--line); border-radius: 8px; box-sizing: content-box; }
.gate-card-source p { font-size: .85rem; margin: .2rem 0; overflow-wrap: anywhere; }
.fill-row { display: flex; gap: .6rem; align-items: baseline; font-size: .92rem; }
.fill-row .fill-line { flex: 1; border-bottom: 1px solid var(--soft); min-height: 1.4rem; }
.gate-card-foot p { font-size: .78rem; color: var(--soft); margin-top: 1.2rem; }
@media (max-width: 480px) { .gate-card-source { flex-direction: column; } }

@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  main { max-width: none; padding: 0; }
  .gate-card { border: 1.5pt solid #000; border-radius: 0; box-shadow: none; page-break-inside: avoid; padding: .9cm; margin: 0; }
  .gate-card h1 { font-size: 15pt; margin: .1cm 0; }
  .gate-card h2 { font-size: 11pt; margin-top: .4cm; color: #000; }
  .gate-card-policy p, .fill-row { font-size: 9.5pt; line-height: 1.4; }
  .gate-card-source { margin-top: .4cm; }
  .gate-card-qr svg { width: 2.6cm; height: 2.6cm; }
  .gate-card-qr { flex-basis: 2.6cm; }
  .gate-card .verified-date, .gate-card-foot p, .gate-card-source p { color: #000; font-size: 8.5pt; }
  .fill-row .fill-line { border-bottom-color: #000; }
  @page { size: auto; margin: 1.2cm; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
