/* RunwayBrief — the sectional-chart design, shared with E6B Pilot (e6b.runwaybrief.app).
   Same chart paper, chart ink, type and engraved scale. What differs is the accent: E6B uses
   sectional magenta; RunwayBrief uses VFR green, and the four flight-category colours carry
   meaning wherever they appear (VFR green, MVFR blue, IFR red, LIFR magenta), always with
   the category written out, never colour alone.
   Fonts are self-hosted from /fonts (SIL OFL 1.1). No inline styles or scripts, so the same
   strict CSP as the E6B site applies without exceptions. */

@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/barlow-condensed-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/barlow-condensed-700.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/public-sans-variable.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: italic; font-weight: 100 900; font-display: swap; src: url("/fonts/public-sans-variable-italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2"); }

/* ---- Tokens: day, then night. */

:root {
  color-scheme: light;
  --paper: #F4F6F5;
  --card: #FFFFFF;
  --ink: #14212B;
  --muted: #52606B;
  --line: #C9D2D6;
  --accent: #1B7A4A;           /* VFR green */
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(27, 122, 74, .08);
  --chart: #1E4F8F;            /* Class B blue: links */
  --vfr: #1B7A4A;
  --mvfr: #1E4F8F;
  --ifr: #B8322A;
  --lifr: #A1136C;
  --caution-bg: #FFF4DB;
  --caution-line: #9A6B00;
  --bezel: #14212B;
  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0E1419;
    --card: #151D24;
    --ink: #E4EAEE;
    --muted: #93A1AC;
    --line: #2A3640;
    --accent: #5FCB8E;
    --accent-ink: #06170D;
    --accent-soft: rgba(95, 203, 142, .10);
    --chart: #8DB6E8;
    --caution-bg: #2A2210;
    --caution-line: #D9A33A;
    --bezel: #2A3640;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0E1419;
  --card: #151D24;
  --ink: #E4EAEE;
  --muted: #93A1AC;
  --line: #2A3640;
  --accent: #5FCB8E;
  --accent-ink: #06170D;
  --accent-soft: rgba(95, 203, 142, .10);
  --chart: #8DB6E8;
  --caution-bg: #2A2210;
  --caution-line: #D9A33A;
  --bezel: #2A3640;
}

/* ---- Base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, p, ul, ol, dl { margin-top: 0; }
p, ul, ol { margin-bottom: 14px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 6px; }
p:last-child, ul:last-child, ol:last-child, li:last-child { margin-bottom: 0; }

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

code { font-family: var(--mono); font-size: .9em; }
strong { font-weight: 650; }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.05; text-wrap: balance; }
h1 { font-size: 64px; line-height: .98; letter-spacing: -.005em; margin-bottom: 14px; }
h2 { font-size: 38px; margin: 0 0 12px; }
h3 { font-size: 25px; margin: 0 0 8px; }

.wrap { max-width: 1060px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }

.skip { position: absolute; left: 12px; top: -48px; z-index: 10; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 6px; }
.skip:focus { top: 12px; }

/* The engraved scale: major ticks every 50px, minor every 10px. Shared with E6B Pilot. */
.scale {
  height: 12px;
  border-top: 1px solid var(--line);
  background:
    repeating-linear-gradient(90deg, var(--muted) 0 1px, transparent 1px 50px) top left / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 10px) top left / 100% 6px no-repeat;
  opacity: .8;
}

.kicker { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }

/* ---- Header and footer */

.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-block: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand b { font-family: var(--display); font-weight: 700; font-size: 28px; letter-spacing: .02em; line-height: 1; }
.brand span { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.site-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; list-style: none; margin: 0; padding: 0; font-size: 15px; }
.site-nav li { margin: 0; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }
.site-nav a.get { border: 1px solid var(--ink); border-radius: 6px; padding: 6px 12px; font-weight: 600; }
.site-nav a.get:hover { border-color: var(--accent); }

.site-foot { margin-top: 56px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding-block: 24px 36px; font-size: 14px; color: var(--muted); }
.foot p { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { color: var(--muted); }
.theme-toggle { font: inherit; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; cursor: pointer; }
.theme-toggle:hover { border-color: var(--muted); }

/* ---- Hero */

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 44px; align-items: center; padding-block: 48px 56px; }
.standfirst { font-size: 18px; color: var(--muted); max-width: 44ch; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px 18px; margin-top: 24px; align-items: center; }
.badge img { height: 48px; width: auto; }
.avail { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }

/* The instrument: one raw METAR, read token by token. RunwayBrief's counterpart to the E6B
   site's worked crosswind example. */
.instrument { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.instrument header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.instrument header b { font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: .02em; }
.instrument header span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.raw { margin: 0; padding: 12px 16px; font-family: var(--mono); font-size: 13.5px; color: var(--ink); background: var(--paper); border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.decode { margin: 0; padding: 6px 16px 10px; }
.decode div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: baseline; padding-block: 7px; border-bottom: 1px dashed var(--line); }
.decode div:last-child { border-bottom: 0; }
.decode dt { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.decode dd { margin: 0; font-size: 15px; }
.verdict { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 14px 16px; background: var(--accent-soft); border-top: 1px solid var(--line); }
.verdict p { margin: 0; font-size: 14px; }
.verdict .runway { grid-column: 1 / -1; font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding-top: 6px; }

/* Flight-category chips. The word is always present; colour is a second signal. */
.cat { display: inline-block; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .06em; line-height: 1; color: #FFFFFF; padding: 6px 10px 5px; border-radius: 5px; }
.cat.vfr { background: var(--vfr); }
.cat.mvfr { background: var(--mvfr); }
.cat.ifr { background: var(--ifr); }
.cat.lifr { background: var(--lifr); }
.cat.small { font-size: 15px; padding: 4px 7px 3px; }

/* ---- Bands */

.band { padding-block: 48px; }
.band .lede { color: var(--muted); max-width: 62ch; margin-bottom: 26px; font-size: 17px; }

/* Features: a three-up grid. Each card leads with the top of a real screen, cropped, so six
   features read in two rows instead of six full-height phones. */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 28px; }
.feature { display: flex; flex-direction: column; min-width: 0; }
.feature p { font-size: 15.5px; }
.feature ul { color: var(--muted); font-size: 14.5px; }
.tagline { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; display: block; }
.pro { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--accent); color: var(--accent); border-radius: 4px; padding: 1px 5px; margin-left: 4px; white-space: nowrap; }
.shot { order: -1; margin: 0 0 18px; border: 7px solid var(--bezel); border-bottom: 0; border-radius: 36px 36px 0 0; overflow: hidden; background: var(--bezel); aspect-ratio: 5 / 6; box-shadow: 0 1px 0 var(--line); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Categories legend */
.cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; list-style: none; padding: 0; margin: 0; }
.cats li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 0; }
.cats p { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.cats b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.source { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* Free and Pro */
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tier { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; }
.tier h3 { font-size: 27px; margin: 0 0 10px; }
.tier h3 small { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-left: 8px; }
.tier li { font-size: 15px; }
.after { margin-top: 16px; font-size: 14.5px; color: var(--muted); max-width: 70ch; }

/* Facts: a definition list a person or an answer engine can lift a line from. */
.facts { margin: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 6px 24px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1.2; }
.facts dd { margin: 0; }

.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 44px; }
.faq h3 { font-size: 22px; }
.faq p { font-size: 15.5px; }

.appband { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 22px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 28px; }
.appband p { margin: 0; max-width: 62ch; }
.appband h2 { font-size: 30px; margin-bottom: 6px; }
.related { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.related a { border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 14px; text-decoration: none; color: var(--ink); }
.related a:hover { border-color: var(--accent); color: var(--accent); }

.safety-box { background: var(--caution-bg); border-left: 4px solid var(--caution-line); border-radius: 0 8px 8px 0; padding: 14px 18px; }
.safety-box .tag { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--caution-line); margin-bottom: 4px; }

/* ---- Document pages (privacy, terms, support, airport, 404) */

.page { padding-block: 36px 8px; }
.page h1 { font-size: 56px; }
.page .lede { font-size: 18px; color: var(--muted); max-width: 60ch; margin-bottom: 26px; }
.prose { max-width: 70ch; }
.prose h2 { font-size: 30px; margin: 36px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 23px; margin: 26px 0 8px; }
.effective-date { display: inline-block; font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin-bottom: 18px; }
.highlight-box, .contact-box { background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; padding: 14px 18px; margin: 18px 0; }
.contact-email { font-weight: 600; }
.prose .safety-box { margin: 18px 0; }
.btn { display: inline-flex; align-items: center; padding: 12px 18px; border-radius: 6px; font-weight: 600; font-size: 15px; text-decoration: none; background: var(--accent); color: var(--accent-ink); }
.btn:hover { filter: brightness(1.08); }
.airport-code { font-size: 96px; letter-spacing: .02em; margin-bottom: 8px; }
[hidden] { display: none !important; }

/* ---- Guides */

.crumbs { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.prose .raw { border: 1px solid var(--line); border-radius: 8px; background: var(--card); margin: 0 0 14px; line-height: 1.7; }
.table-wrap { overflow-x: auto; margin: 0 0 16px; }
.prose table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); font-size: 15px; }
.prose th, .prose td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose thead th { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose td:first-child code { white-space: nowrap; }
.guide-cta { margin: 36px 0 18px; }
.guides { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.guides li { margin: 0; border-bottom: 1px solid var(--line); }
.guides a { display: grid; grid-template-columns: 300px minmax(0, 1fr) auto; gap: 6px 18px; align-items: baseline; padding: 16px 4px; color: var(--ink); text-decoration: none; }
.guides a:hover { background: var(--accent-soft); }
.guides .name { font-family: var(--display); font-weight: 600; font-size: 23px; line-height: 1.15; }
.guides .what { color: var(--muted); font-size: 15px; }
.guides .go { color: var(--accent); font-weight: 600; font-size: 14px; white-space: nowrap; }
.page h2.more { font-size: 30px; margin: 40px 0 6px; }
.site-nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }

/* ---- Narrow screens */

@media (max-width: 1000px) and (min-width: 821px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  h1, .page h1 { font-size: 44px; }
  .airport-code { font-size: 72px; }
  h2 { font-size: 31px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 28px 36px; }
  .standfirst { font-size: 16.5px; }
  .band { padding-block: 34px; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .shot { max-width: 300px; }
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiers, .faq { grid-template-columns: minmax(0, 1fr); }
  .facts div { grid-template-columns: minmax(0, 1fr); }
  .decode div { grid-template-columns: 84px minmax(0, 1fr); }
  .site-nav .opt { display: none; }
  .guides a { grid-template-columns: minmax(0, 1fr) auto; }
  .guides .what { grid-column: 1 / -1; grid-row: 2; }
}

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