/* ==========================================================================
   AVIAX — site.css
   Single stylesheet for all 14 pages. Cache-busted via ?v=YYYY-MM-DD on the
   <link> tag. See DESIGN.md for token rationale.
   ========================================================================== */


/* ==========================================================================
   TOKENS
   ========================================================================== */
:root {
  /* surface */
  --bg:            #0A1628;
  --bg-elev:       #0D1B30;
  --bg-elev-2:     #11233C;
  --hairline:      rgba(255,255,255,0.06);
  --hairline-2:    rgba(255,255,255,0.10);

  /* ink */
  --ink:           #E6EEF7;
  --ink-dim:       #8B9BB0;
  --ink-faint:     #7A8AA3;

  /* accent */
  --teal:          #00E5B0;
  --teal-dim:      rgba(0,229,176,0.55);
  --teal-glow:     rgba(0,229,176,0.18);
  --teal-wash:     rgba(0,229,176,0.08);

  /* signal (rare) */
  --amber:         #F5B544;
  --red:           #FF5D5D;

  /* geometry */
  --radius:        6px;
  --radius-lg:     10px;
  --ring:          inset 0 0 0 1px var(--hairline);

  /* type */
  --font-display:  'Söhne', 'Aktiv Grotesk', 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  /* rhythm */
  --container:     1180px;
  --gutter:        clamp(20px, 4vw, 48px);
  --section-pad:   clamp(96px, 13vw, 160px);

  /* prose (Phase 2 additions) */
  --prose-max:     680px;
  --prose-line:    1.7;
  --prose-spacing: 24px;
}


/* ==========================================================================
   RESET
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0,229,176,0.06), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(0,229,176,0.03), transparent 60%);
  pointer-events: none; z-index: 0;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.35;
  pointer-events: none; z-index: 0;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 40%, transparent 90%);
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 1000;
  background: var(--teal);
  color: #04221A;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
  text-transform: uppercase;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.skip-link:focus { top: 16px; }


/* ==========================================================================
   SHARED LAYOUT
   ========================================================================== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}
section { position: relative; z-index: 1; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 var(--teal-dim);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0,229,176,0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(0,229,176,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,229,176,0); }
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(44px, 7vw, 88px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 400; }
h2 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -0.025em; font-weight: 400; }
h3 { font-size: 20px; line-height: 1.3; font-weight: 500; }

p  { margin: 0; color: var(--ink-dim); font-size: 17px; line-height: 1.6; }
p.lead { color: var(--ink); font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; max-width: 58ch; }

/* .reveal default: VISIBLE. The scroll-fade animation only kicks in when
   `.js-loaded` is added to <html> by an inline <head> script. JS-disabled
   visitors (or anyone hit by slow JS before it loads) see the page fully
   styled with no blank below-hero state. */
.reveal { opacity: 1; transform: none; }
.js-loaded .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s cubic-bezier(.2,.6,.2,1), transform .9s cubic-bezier(.2,.6,.2,1);
}
.js-loaded .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .js-loaded .reveal { opacity: 1; transform: none; transition: none; }
  .eyebrow .dot { animation: none; }
  html { scroll-behavior: auto; }
}


/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(10,22,40,0.72);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  /* Extend click area to nav-row height (64px) without changing visual size of mark */
  padding: 16px 0;
  margin: -16px 0;
  min-height: 44px;
}
.brand-mark { display: inline-block; height: 32px; width: auto; }
.nav-meta {
  display: flex; align-items: center; gap: 22px;
  font-family: var(--font-mono);
  font-size: 12px; color: var(--ink-dim);
  letter-spacing: 0.04em;
}
.nav-meta .live {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--teal);
}
.nav-meta .live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal-glow);
  animation: pulse 2s infinite;
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.08em;
  color: var(--ink);
  transition: border-color .2s, background .2s;
}
.nav-cta:hover { border-color: var(--teal-dim); background: var(--teal-wash); }
.nav-cta:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

@media (max-width: 720px) {
  .nav-meta .utc, .nav-meta .sep { display: none; }
}


/* ==========================================================================
   HERO (homepage only — unused on content pages but bundled for cache)
   ========================================================================== */
.hero {
  position: relative;
  padding: clamp(80px, 12vw, 140px) 0 clamp(80px, 11vw, 140px);
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { margin-top: 22px; }
.hero h1 .teal { color: var(--teal); }

.hero-sub {
  margin-top: 28px;
  font-size: clamp(17px, 1.5vw, 20px);
  color: var(--ink-dim);
  max-width: 56ch;
  line-height: 1.55;
}

.cta-row {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.btn-primary {
  background: var(--teal);
  color: #04221A;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 0 22px;
  height: 52px;
  border-radius: var(--radius);
  display: inline-flex; align-items: center; gap: 10px;
  transition: transform .15s, box-shadow .2s;
  white-space: nowrap;
  box-shadow: 0 0 0 0 var(--teal-glow);
}
.btn-primary:hover { box-shadow: 0 0 24px var(--teal-glow); transform: translateY(-1px); }
.btn-primary:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.btn-primary svg { width: 14px; height: 14px; }
/* .prose a sets color: var(--teal); restore button color when nested in prose */
.prose .btn-primary { color: #04221A; }

.cta-note {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--ink-faint);
  letter-spacing: 0.04em;
}

.hero-signals {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 0;
  border-top: 1px solid var(--hairline);
  padding-top: 24px;
  max-width: 600px;
}
.hero-signals > div { padding-right: 18px; }
@media (max-width: 600px) {
  .hero-signals { grid-template-columns: 1fr; max-width: none; gap: 18px; }
  .hero-signals > div { padding-right: 0; padding-bottom: 14px; border-bottom: 1px solid var(--hairline); }
  .hero-signals > div:last-child { border-bottom: none; padding-bottom: 0; }
  .hero-signals .sig-num { font-size: 28px; }
}
.hero-signals .sig-num {
  font-family: var(--font-mono);
  font-size: 22px; color: var(--ink); font-weight: 500;
}
.hero-signals .sig-label {
  margin-top: 4px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.08em; text-transform: uppercase;
}

.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 560px;
  justify-self: end;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 70% 50% at 50% 50%, rgba(0,229,176,0.05), transparent 70%),
    var(--bg-elev);
  overflow: hidden;
}
@media (max-width: 960px) { .hero-visual { justify-self: stretch; max-width: none; } }

.hero-visual .corner {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
}
.hero-visual .corner.tl { top: 16px; left: 16px; }
.hero-visual .corner.tr { top: 16px; right: 16px; display: flex; align-items: center; gap: 6px; color: var(--teal); }
.hero-visual .corner.bl { bottom: 16px; left: 16px; }
.hero-visual .corner.tr::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--teal);
  animation: pulse 1.6s infinite;
}
.hero-visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.flight-path { fill: none; stroke: var(--teal); stroke-width: 1.2; }
.flight-path.dim { stroke: rgba(230,238,247,0.18); stroke-width: 1; }
.flight-path.dash { stroke-dasharray: 3 4; }

.plane-dot {
  fill: var(--teal);
  filter: drop-shadow(0 0 6px var(--teal-glow));
}


/* ==========================================================================
   PROBLEM (homepage)
   ========================================================================== */
.problem { padding: var(--section-pad) 0; border-bottom: 1px solid var(--hairline); }
.problem-head { max-width: 820px; margin-bottom: 72px; }
.problem-head h2 { margin-top: 18px; }
.problem-head .lead { margin-top: 22px; }
.problem-head .why-now {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  line-height: 1.6;
  max-width: 64ch;
}

.contrast { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); }
@media (max-width: 820px) { .contrast { grid-template-columns: 1fr; } }

.contrast-panel {
  background: var(--bg-elev);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  min-height: 360px;
  display: flex; flex-direction: column;
}
.contrast-panel .label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-faint);
}
.contrast-panel .title {
  margin-top: 8px;
  font-size: 22px; font-weight: 500; color: var(--ink);
  letter-spacing: -0.01em;
}
.contrast-panel .metric {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-dim);
}
.contrast-panel .metric .n { color: var(--ink); }
.contrast-panel .viz { flex: 1; margin-top: 24px; position: relative; }
.contrast-panel.is-dense { border-color: rgba(0,229,176,0.24); }
.contrast-panel.is-dense .metric .n { color: var(--teal); }

.sparse-dots, .dense-dots { position: absolute; inset: 0; }
.sparse-dots .d, .dense-dots .d {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-faint);
}
.dense-dots .d {
  background: var(--teal);
  width: 3px; height: 3px;
  opacity: 0.7;
  box-shadow: 0 0 4px var(--teal-glow);
}


/* ==========================================================================
   SOLUTION (homepage)
   ========================================================================== */
.solution { padding: var(--section-pad) 0; border-bottom: 1px solid var(--hairline); }
.solution-head { max-width: 780px; margin-bottom: 72px; }
.solution-head h2 { margin-top: 18px; }
.solution-head .lead { margin-top: 22px; }

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr; } }

.pillar {
  background: var(--bg);
  padding: 36px 32px 40px;
  position: relative;
  min-height: 360px;
  display: flex; flex-direction: column;
}
.pillar .idx {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--teal); letter-spacing: 0.1em;
}
.pillar h3 {
  margin-top: 36px;
  font-size: 22px; font-weight: 500; color: var(--ink);
  letter-spacing: -0.01em;
}
.pillar p { margin-top: 12px; font-size: 15px; line-height: 1.6; }
.pillar .pillar-viz { margin-top: auto; padding-top: 28px; height: 120px; position: relative; }
.pillar .pillar-viz svg { width: 100%; height: 100%; overflow: visible; }


/* ==========================================================================
   PLATFORM VALUE (homepage)
   ========================================================================== */
.value { padding: var(--section-pad) 0; border-bottom: 1px solid var(--hairline); }
.value-head { max-width: 780px; margin-bottom: 64px; }
.value-head h2 { margin-top: 18px; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hairline);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }

.stat { background: var(--bg); padding: 40px 28px; }
.stat .n {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 400;
  letter-spacing: -0.035em;
  color: var(--ink);
  line-height: 1;
}
.stat .n .unit { color: var(--teal); font-size: 0.55em; margin-left: 2px; font-weight: 500; letter-spacing: 0; }
.stat .lbl {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-dim);
}
.stat .desc { margin-top: 10px; font-size: 14px; color: var(--ink-dim); line-height: 1.5; }
.stat .source {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-faint);
}


/* ==========================================================================
   HOW IT WORKS (homepage)
   ========================================================================== */
.how { padding: var(--section-pad) 0; border-bottom: 1px solid var(--hairline); }
.how-head { max-width: 780px; margin-bottom: 72px; }
.how-head h2 { margin-top: 18px; }
.how-head .lead { margin-top: 22px; }

.steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.steps::before {
  content: '';
  position: absolute;
  top: 44px; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal-dim) 20%, var(--teal-dim) 80%, transparent);
  z-index: 0;
}
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .steps::before { display: none; }
}

.step { position: relative; text-align: center; padding: 0 16px; z-index: 1; }
.step-node {
  width: 88px; height: 88px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--hairline-2);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.step-node::before {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--teal-glow);
  opacity: 0;
  animation: stepPulse 3s infinite;
}
.step:nth-child(1) .step-node::before { animation-delay: 0s; }
.step:nth-child(2) .step-node::before { animation-delay: 1s; }
.step:nth-child(3) .step-node::before { animation-delay: 2s; }
@keyframes stepPulse {
  0%   { opacity: 0; transform: scale(0.9); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: scale(1.25); }
}
@media (prefers-reduced-motion: reduce) {
  .step-node::before { animation: none; opacity: 0; }
}
.step-node svg { width: 36px; height: 36px; color: var(--teal); }
.step-idx {
  font-family: var(--font-mono); font-size: 11px; color: var(--teal);
  letter-spacing: 0.12em; margin-top: 20px;
}
.step h3 {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.step p { margin: 12px auto 0; max-width: 30ch; font-size: 15px; }


/* ==========================================================================
   FINAL CTA (homepage)
   ========================================================================== */
.cta {
  padding: var(--section-pad) 0;
  border-bottom: 1px solid var(--hairline);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 70% at 50% 50%, rgba(0,229,176,0.08), transparent 60%);
  pointer-events: none;
}
.cta-inner { max-width: 680px; margin: 0 auto; position: relative; }
.cta h2 { margin-top: 20px; }
.cta .lead { margin: 24px auto 0; text-align: center; }
.cta .cta-row { justify-content: center; margin-top: 44px; }

.cta .scarcity {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px;
  border: 1px solid var(--hairline-2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  text-transform: uppercase;
}
.cta .scarcity .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal);
  animation: pulse 2s infinite;
}


/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  padding: 56px 0 48px;
  background: var(--bg);
  border-top: 1px solid var(--hairline);
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.footer-tagline { color: var(--ink-dim); flex: 1; text-align: center; }
.footer-meta { display: inline-flex; align-items: center; gap: 12px; }
.footer-social { display: inline-flex; align-items: center; gap: 0; margin-right: 4px; margin-left: -10px; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--ink-faint);
  transition: color .2s;
  border-radius: var(--radius);
}
.footer-social a:hover,
.footer-social a:focus-visible { color: var(--teal); outline: none; background: var(--teal-wash); }
.footer-social svg { width: 18px; height: 18px; }
.footer-legal a {
  color: var(--ink-faint);
  transition: color .2s;
  display: inline-block;
  padding: 14px 4px;
  margin: -14px -4px;
}
.footer-legal a:hover { color: var(--teal); }
.footer-legal .sep { color: var(--hairline-2); margin: 0 8px; }

@media (max-width: 700px) {
  .footer-row { flex-direction: column; align-items: center; gap: 16px; }
  .footer-tagline { text-align: center; }
}


/* ==========================================================================
   UTILITY
   ========================================================================== */
.mono { font-family: var(--font-mono); }
.caption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}


/* ==========================================================================
   PHASE 2 — CONTENT PAGES
   ========================================================================== */

/* Page wrapper. NOTE: longhand padding-top/bottom only — using the
   `padding` shorthand would clobber .container's left/right gutter
   (when <main> carries both .container and .content-page). */
.content-page {
  padding-top: 48px;
  padding-bottom: var(--section-pad);
}

/* Breadcrumb (mono caption row) */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 48px;
}
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: inline-flex; flex-wrap: wrap; gap: 0; }
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li:not(:last-child)::after { content: '·'; margin: 0 10px; color: var(--hairline-2); }
.breadcrumb a {
  color: var(--ink-faint);
  transition: color .15s;
  /* Extend touch target to 44px without inflating the visual line-height. */
  display: inline-block;
  padding: 14px 4px;
  margin: -14px -4px;
  min-height: 44px;
  box-sizing: border-box;
  line-height: 16px;
}
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb [aria-current="page"] { color: var(--ink-dim); }

/* 3-col content grid */
.content-grid {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 200px;
  gap: clamp(40px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 1179px) {
  .content-grid { grid-template-columns: minmax(0, 1fr) 200px; }
  .content-rail { display: none; }
}
@media (max-width: 959px) {
  /* minmax(0, 1fr) lets grid items shrink below their min-content width.
     Without it, long unbreakable strings (e.g. "Compounding detection
     lead" in a dt h2) force the grid wider than its container, which
     overflows past the .container's gutter padding and produces 0
     side-margin at the viewport edge. */
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .content-toc { order: -1; }
  /* Left rail meta is auxiliary on mobile; hide to get H1 above the fold. */
  .content-rail { display: none; }
}

/* Left rail — meta */
.content-rail {
  position: sticky;
  top: 96px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-transform: uppercase;
  line-height: 1.8;
}
.content-rail dl { margin: 0; }
.content-rail dt { color: var(--ink-faint); }
.content-rail dd { margin: 0 0 18px 0; color: var(--ink-dim); }
.content-rail dd:last-child { margin-bottom: 0; }

/* Right rail — table of contents. Sticky aside that follows the reader
   down a long article. max-height + overflow-y guards against ToCs taller
   than viewport. At mobile the position becomes static and the aside moves
   to top of grid via order: -1 (see mobile media query below). */
.content-toc {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 96px - 16px);
  overflow-y: auto;
}
.content-toc-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.content-toc ol { list-style: none; padding: 0; margin: 0; }
.content-toc li { margin: 0 0 10px; }
.content-toc a {
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.4;
  display: inline-block;
  padding: 2px 0 2px 12px;
  margin-left: -14px;
  transition: color .15s, border-color .15s;
  border-left: 2px solid transparent;
}
.content-toc a:hover { color: var(--ink); }
.content-toc a.is-current {
  color: var(--teal);
  border-left-color: var(--teal);
}

/* Mobile ToC — block above body. Touch targets bump to 44px. */
@media (max-width: 959px) {
  .content-toc {
    position: static;
    max-height: none;
    overflow-y: visible;
    padding: 16px 18px;
    margin-bottom: 32px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--bg-elev);
  }
  .content-toc-label {
    margin-bottom: 12px;
  }
  .content-toc a {
    min-height: 44px;
    padding-top: 12px;
    padding-bottom: 12px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
  }
}

/* PROSE — long-form body typography */
.prose {
  max-width: var(--prose-max);
  font-size: 17px;
  line-height: var(--prose-line);
  color: var(--ink);
}
.prose .eyebrow { margin-bottom: 16px; }
.prose h1 {
  margin: 8px 0 28px;
  font-size: clamp(40px, 5.5vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 400;
}
.prose h1 .teal { color: var(--teal); }
.prose .lede {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.55;
  color: var(--ink-dim);
  margin: 0 0 48px;
}
.prose h2 {
  margin: 56px 0 16px;
  font-size: clamp(28px, 3.2vw, 36px);
  line-height: 1.16;
  letter-spacing: -0.025em;
  font-weight: 500;
  color: var(--ink);
  scroll-margin-top: 96px;
}
.prose h3 {
  margin: 40px 0 12px;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--ink);
  scroll-margin-top: 96px;
}
.prose p {
  margin: 0 0 var(--prose-spacing);
  color: var(--ink);
  font-size: 17px;
  line-height: var(--prose-line);
}
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 var(--prose-spacing); padding-left: 24px; color: var(--ink); }
.prose li { margin: 0 0 8px; line-height: var(--prose-line); }
.prose li::marker { color: var(--ink-faint); }

/* internal links — plain teal */
.prose a {
  color: var(--teal);
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.prose a:hover { border-bottom-color: var(--teal); }

/* external links — dotted bottom border */
.prose a[href^="http"]:not([href*="aviax.io"]) {
  border-bottom: 1px dotted var(--teal-dim);
}
.prose a[href^="http"]:not([href*="aviax.io"]):hover {
  border-bottom: 1px solid var(--teal);
}

/* inline <code> */
.prose code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--bg-elev);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--ink);
}

/* heading anchor permalink (auto-injected by JS) */
.heading-anchor {
  display: inline-block;
  width: 24px;
  margin-left: -32px;
  padding-right: 8px;
  color: var(--ink-faint);
  opacity: 0;
  transition: opacity .15s;
  font-weight: 400;
  text-decoration: none;
}
.prose h2:hover .heading-anchor,
.prose h3:hover .heading-anchor,
.glossary-list dt:hover .heading-anchor,
.glossary-list dt h2:hover .heading-anchor,
.heading-anchor:focus { opacity: 1; }
@media (max-width: 720px) { .heading-anchor { display: none; } }

/* CALLOUT — pull-quote / data emphasis panel */
.callout {
  margin: 32px 0;
  padding: 24px 28px;
  background: var(--bg-elev);
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--teal);
  border-radius: var(--radius);
}
.callout p { margin: 0; color: var(--ink); }
.callout .callout-num {
  font-family: var(--font-mono);
  font-size: clamp(20px, 2.4vw, 28px);
  color: var(--teal);
  letter-spacing: -0.01em;
  font-weight: 500;
  display: block;
  margin-bottom: 8px;
}

/* DATA BLOCK — mono panel for structured/preview data */
.data-block {
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--bg-elev);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  overflow-x: auto;
}
.data-block .label {
  display: block;
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.data-block pre, .data-block code {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  background: transparent;
  padding: 0;
  white-space: pre;
  color: var(--ink);
}

/* RELATED — divider + related links at article footer */
.related {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.related-label { color: var(--ink-faint); margin-right: 12px; }
.related a {
  color: var(--ink-dim);
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
  /* Touch-target padding (44px hit area without inflating visual line). */
  display: inline-block;
  padding: 14px 8px;
  margin: -14px -8px 0 0;
  min-height: 44px;
  box-sizing: border-box;
  line-height: 16px;
}
.related a:hover { color: var(--teal); border-bottom-color: var(--teal); }

/* GLOSSARY — <dl> term/definition pairs.
   Term name lives inside an <h2> (inside the <dt>) for SEO + a11y heading
   structure; the .term-id mono caption sits above it. */
.glossary-list { margin: 0; padding: 0; }
.glossary-list dt {
  margin: 56px 0 12px;
  position: relative;
}
.glossary-list dt:first-child { margin-top: 0; }
.glossary-list dt .term-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
  font-weight: 400;
}
.glossary-list dt h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  scroll-margin-top: 96px;
  position: relative;
}
.glossary-list dd {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.7;
  max-width: var(--prose-max);
}
.glossary-list dd.aviax-context {
  font-size: 14px;
  color: var(--ink-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  border-left: 2px solid var(--teal);
  padding-left: 14px;
  line-height: 1.6;
}

/* Glossary alphabetical jump (right rail) */
.glossary-jump {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 24px;
}
.glossary-jump-label { width: 100%; margin-bottom: 8px; text-transform: uppercase; }
.glossary-jump a {
  color: var(--ink-dim);
  padding: 4px 6px;
  transition: color .15s, background .15s;
  border-radius: 3px;
  min-width: 24px;
  text-align: center;
}
.glossary-jump a:hover { color: var(--teal); background: var(--teal-wash); }

/* HUB PAGE — 1-col list, NO 3-col card grid */
.hub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 820px;
}
.hub-item {
  display: block;
  padding: 32px 0;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  color: inherit;
  transition: padding .15s;
}
.hub-item:first-child { padding-top: 16px; }
.hub-item:hover .hub-title { color: var(--teal); }
.hub-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 8px;
}
/* .prose h2 / .prose p override the bare selectors; scope to .prose to win */
.prose .hub-title {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 8px;
  transition: color .15s;
}
.prose .hub-dek {
  color: var(--ink-dim);
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
  max-width: 60ch;
}
