/* ============================================================
   ASCENDANCE — cinematic dark / luxe
   ------------------------------------------------------------
   Near-black canvas. One molten ember accent. High-contrast
   editorial serif (Fraunces) against a precise grotesk and
   technical mono. Filmic grain, volumetric light, and a
   hand-built motion language where scrolling reads as ascent.
   Dark is the default; a high-altitude "daybreak" light theme
   lives under [data-theme="light"].
   ============================================================ */

/* Fonts are loaded via <link rel="preconnect"> + <link rel="stylesheet"> injected
   by js/partials.js (faster + non-blocking than an @import here). */

/* ---------- Tokens : DARK is the canvas ---------- */
:root {
  --bg:        #08080b;
  --bg-elev:   #0f0f15;
  --bg-elev2:  #16161f;
  --ink:       #f4f2ea;
  --ink-soft:  #b6b4ac;
  --muted:     #8d8c99;   /* lightened to clear WCAG AA on the near-black canvas */
  --line:      #232230;
  --line-soft: #1a1922;

  /* the single molten accent + its light */
  --accent:        #ff5a2c;
  --accent-2:      #ff8c52;
  --accent-deep:   #c13312;
  --accent-soft:   rgba(255, 90, 44, 0.12);
  --accent-glow:   rgba(255, 90, 44, 0.45);
  --accent-rich:   var(--accent);   /* legacy alias kept for older rules */

  --good:   #5fb98a;
  --warn:   #e0a44d;
  --danger: #ef6a4d;

  /* niche markers — tuned to glow on black, used as 2px edges only */
  --n-health:     #57c79a;
  --n-books:      #e2876f;
  --n-philosophy: #a98cf0;
  --n-data:       #58b6d6;
  --n-phones:     #7d93f0;
  --n-content:    #efa14e;
  --n-markets:    #9bbf6a;

  --radius:    6px;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --serif:   "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans:    "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono:    "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-rise: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-fast:  200ms;
  --dur-med:   420ms;
  --dur-slow:  900ms;

  --shadow-card:
     0 0 0 1px rgba(255,255,255,0.04),
     0 2px 8px rgba(0,0,0,0.40),
     0 24px 60px rgba(0,0,0,0.45);
  --shadow-glow:
     0 0 0 1px var(--accent),
     0 0 0 4px var(--accent-soft),
     0 30px 70px rgba(0,0,0,0.55);
}

/* ---------- Light : high-altitude daybreak ---------- */
[data-theme="light"] {
  --bg:        #f4f1ea;
  --bg-elev:   #ffffff;
  --bg-elev2:  #ece8df;
  --ink:       #14110d;
  --ink-soft:  #43403a;
  --muted:     #8c897f;
  --line:      #ddd8cc;
  --line-soft: #e9e4d8;

  --accent:        #e8480f;
  --accent-2:      #ff7a3c;
  --accent-deep:   #b3360a;
  --accent-soft:   rgba(232, 72, 15, 0.10);
  --accent-glow:   rgba(232, 72, 15, 0.30);

  --good:   #2f8a5f;
  --warn:   #b6802a;
  --danger: #c4462f;

  --shadow-card:
     0 0 0 1px rgba(20,17,13,0.05),
     0 2px 6px rgba(20,17,13,0.04),
     0 18px 48px rgba(20,17,13,0.08);
  --shadow-glow:
     0 0 0 1px var(--accent),
     0 0 0 4px var(--accent-soft),
     0 24px 56px rgba(20,17,13,0.14);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-optical-sizing: auto; }

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
  letter-spacing: -0.003em;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  /* volumetric light: a faint molten dawn cresting from above */
  background-image:
    radial-gradient(130% 90% at 50% -20%, var(--accent-soft), transparent 55%),
    radial-gradient(100% 70% at 85% 0%, rgba(125,147,240,0.05), transparent 60%);
  background-attachment: fixed;
  transition: background-color .5s var(--ease-out), color .5s var(--ease-out);
  overflow-x: hidden;
}

/* filmic grain overlay */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 200px 200px;
}
/* vignette to seat the cinematic frame */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 120% at 50% 30%, transparent 55%, rgba(0,0,0,0.45));
}
[data-theme="light"] body::after { background: radial-gradient(120% 120% at 50% 30%, transparent 60%, rgba(20,17,13,0.06)); }
[data-theme="light"] body::before { mix-blend-mode: multiply; opacity: 0.035; }

/* keep real content above the atmosphere layers */
.site-nav, .hero, section, article, footer, .news, #chrome-top, #chrome-bottom,
.altitude, .cursor-dot, .cursor-ring { position: relative; z-index: 2; }

a {
  color: var(--ink); text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size var(--dur-med) var(--ease-out), color var(--dur-fast) var(--ease-out);
  padding-bottom: 1px;
}
a:hover { background-size: 100% 1px; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
.narrow    { max-width: 760px;  margin: 0 auto; padding: 0 40px; }
@media (max-width: 720px){ .container, .narrow { padding: 0 24px; } }

/* ============================================================
   Custom cursor — a magnetic ember ring
   ============================================================ */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
  border-radius: 50%; transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px; background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.cursor-ring {
  width: 34px; height: 34px; border: 1px solid var(--accent);
  transition: width .28s var(--ease-out), height .28s var(--ease-out),
              background-color .28s var(--ease-out), border-color .28s var(--ease-out);
}
.cursor-ring.hot {
  width: 56px; height: 56px; background: var(--accent-soft); border-color: var(--accent-2);
}
html.has-cursor, html.has-cursor * { cursor: none !important; }

/* ============================================================
   Altitude rail — scroll progress reads as elevation
   ============================================================ */
.altitude {
  position: fixed; right: 26px; top: 50%; transform: translateY(-50%);
  z-index: 40; display: flex; flex-direction: column; align-items: center; gap: 12px;
  pointer-events: none;
}
.altitude .track {
  position: relative; width: 2px; height: 38vh; background: var(--line); overflow: hidden;
}
.altitude .fill {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 0%;
  background: linear-gradient(to top, var(--accent-deep), var(--accent), var(--accent-2));
  box-shadow: 0 0 16px var(--accent-glow);
}
.altitude .read {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  color: var(--muted); writing-mode: vertical-rl; text-orientation: mixed;
}
.altitude .cap {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; color: var(--accent);
  text-transform: uppercase;
}
@media (max-width: 1100px){ .altitude { display: none; } }

/* ============================================================
   Page transitions — navigating feels like rising
   ============================================================ */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtOut .42s var(--ease-rise) both; }
::view-transition-new(root) { animation: vtIn .56s var(--ease-rise) both; }
@keyframes vtOut { to   { opacity: 0; transform: translateY(-3vh); filter: blur(4px); } }
@keyframes vtIn  { from { opacity: 0; transform: translateY(4vh);  filter: blur(6px); } }

/* gentle load-in for the whole document */
main, .hero, article.post { animation: docRise .8s var(--ease-out) both; }
@keyframes docRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================================================
   Scroll-reveal utilities
   ============================================================ */
[data-reveal] {
  opacity: 0; transform: translateY(34px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}
[data-reveal="clip"] { transform: none; clip-path: inset(0 0 100% 0); }
[data-reveal].in { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }

/* kinetic headline — words rise from a mask */
.kinetic { display: block; }
.kinetic .line { display: block; overflow: hidden; }
.kinetic .word {
  display: inline-block; transform: translateY(110%);
  animation: wordRise 1s var(--ease-rise) both;
  animation-delay: calc(var(--w, 0) * 85ms + 150ms);
}
@keyframes wordRise { to { transform: translateY(0); } }

/* ============================================================
   Site nav
   ============================================================ */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px; max-width: 1240px; margin: 0 auto;
}
@media (max-width: 720px){ .nav-row { padding: 14px 24px; } }
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--display); font-weight: 600; font-size: 21px;
  color: var(--ink); letter-spacing: -0.02em; background: none; padding: 0;
}
.brand:hover { background: none; }
.brand .mark {
  width: 22px; height: 22px; display: inline-block; flex-shrink: 0;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}
.brand .greek, .brand .glyph {
  font-family: var(--mono); font-size: 10px; color: var(--accent);
  letter-spacing: 0.22em; text-transform: uppercase; font-weight: 500;
  align-self: center;
}
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a {
  color: var(--muted); font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.13em; text-transform: uppercase; background: none; padding: 0;
  position: relative; transition: color var(--dur-med) var(--ease-out);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ""; position: absolute; left: -2px; right: -2px; bottom: -23px; height: 2px;
  background: var(--accent); box-shadow: 0 0 10px var(--accent-glow);
}
.nav-actions { display: flex; align-items: center; gap: 14px; }

/* animated hamburger (hidden on desktop) */
.nav-toggle { display: none; }
.nav-toggle .bars { position: relative; display: block; width: 17px; height: 1.5px; background: currentColor; transition: background-color .2s; }
.nav-toggle .bars::before, .nav-toggle .bars::after {
  content: ""; position: absolute; left: 0; width: 17px; height: 1.5px; background: currentColor;
  transition: transform .3s var(--ease-out);
}
.nav-toggle .bars::before { top: -5px; }
.nav-toggle .bars::after  { top: 5px; }
.site-nav.menu-open .nav-toggle .bars { background: transparent; }
.site-nav.menu-open .nav-toggle .bars::before { transform: translateY(5px) rotate(45deg); }
.site-nav.menu-open .nav-toggle .bars::after  { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .icon-btn { width: 40px; height: 40px; }
  /* SOLID bar on mobile — backdrop-filter is unreliable on phones, so don't
     depend on it for legibility */
  .site-nav { background: var(--bg); }
  /* the link list becomes a slide-down panel under the bar */
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg);                 /* fully opaque, high visibility */
    border-bottom: 2px solid var(--accent);
    box-shadow: 0 28px 54px -10px rgba(0,0,0,.8);
    padding: 0 24px; max-height: 0; opacity: 0; overflow: hidden; pointer-events: none;
    transition: max-height .42s var(--ease-out), opacity .25s var(--ease-out), padding .3s var(--ease-out);
  }
  .site-nav.menu-open .nav-links { max-height: 80vh; opacity: 1; pointer-events: auto; padding: 6px 24px 18px; }
  .nav-links a {
    display: block; width: 100%; padding: 16px 2px; font-size: 13px; letter-spacing: 0.13em;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a.active { color: var(--accent); }
  .nav-links a.active::after { display: none; }
}
.icon-btn {
  background: transparent; border: 1px solid var(--line); color: var(--ink-soft);
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out),
              background-color var(--dur-med) var(--ease-out);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ============================================================
   Hero — cinematic, pointer-reactive light, kinetic type
   ============================================================ */
.hero {
  padding: 150px 0 110px; overflow: hidden;
  --mx: 50%; --my: 30%;
}
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 120%;
  background: radial-gradient(40vw 40vw at var(--mx) var(--my), var(--accent-soft), transparent 70%);
  pointer-events: none; z-index: -1; transition: background-position .3s linear;
}
.hero .eyebrow {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  color: var(--accent); letter-spacing: 0.28em; text-transform: uppercase;
}
.hero h1 {
  font-family: var(--display); font-weight: 340;
  font-size: clamp(52px, 9vw, 132px);
  line-height: 0.94; letter-spacing: -0.035em;
  margin: 30px 0 30px; color: var(--ink);
  font-variation-settings: "opsz" 144;
}
.hero h1 em, .hero h1 .shimmer {
  font-style: italic; font-weight: 340; color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  text-shadow: 0 0 40px var(--accent-glow);
}
.hero p.lede {
  font-family: var(--sans); font-size: 20px; color: var(--ink-soft);
  max-width: 660px; line-height: 1.6; font-weight: 350;
}
.hero .epigraph {
  font-family: var(--serif); font-style: italic; color: var(--muted);
  font-size: 18px; margin-top: 22px; padding-left: 18px;
  border-left: 1px solid var(--accent);
}
.cta-row { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }
.scroll-cue {
  margin-top: 64px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 10px;
}
.scroll-cue .bar { width: 1px; height: 40px; background: linear-gradient(var(--accent), transparent); animation: cuePulse 2.2s var(--ease-out) infinite; }
@keyframes cuePulse { 0%,100%{ opacity:.3; transform: scaleY(.6); transform-origin: top; } 50%{ opacity:1; transform: scaleY(1);} }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px;
  font-family: var(--mono); font-weight: 500; font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer; background: transparent; padding-bottom: 14px;
  border: 1px solid var(--line); color: var(--ink);
  transition: border-color var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out),
              background-color var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.btn:hover { background: none; }
.btn.primary {
  background: var(--accent); border-color: var(--accent); color: #0b0608;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn.primary:hover { box-shadow: 0 10px 40px var(--accent-glow); transform: translateY(-2px); }
.btn.ghost { border-color: var(--line); color: var(--ink-soft); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   Sections
   ============================================================ */
section { padding: 110px 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 48px; gap: 24px;
  padding-bottom: 22px; border-bottom: 1px solid var(--line);
}
.section-head h2 {
  font-family: var(--mono); font-weight: 500; font-size: 12px;
  margin: 0; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft);
}
.section-head .sub  { color: var(--muted); font-size: 13px; font-family: var(--mono); }
.section-head .link {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
}
.section-head .link:hover { color: var(--accent); }
.divider { height: 1px; background: var(--line); margin: 0; }

body.numbered { counter-reset: section; }
body.numbered .section-head h2::before {
  counter-increment: section;
  content: counter(section, decimal-leading-zero) "  ·  ";
  color: var(--accent); font-weight: 500;
}

/* ============================================================
   The Ascent — niche index (replaces the constellation)
   ============================================================ */
.ascent {
  position: relative; margin-top: 8px;
  padding-left: 8px;
}
.ascent-route {
  position: absolute; left: 23px; top: 18px; bottom: 18px; width: 2px;
  background: var(--line);
}
.ascent-route .climbed {
  position: absolute; left: 0; bottom: 0; width: 100%; height: var(--climb, 0%);
  background: linear-gradient(to top, var(--accent-deep), var(--accent));
  box-shadow: 0 0 14px var(--accent-glow);
  transition: height .2s linear;
}
.station {
  position: relative; display: grid;
  grid-template-columns: 48px minmax(0,1fr) auto;
  align-items: center; gap: 22px;
  padding: 26px 22px 26px 0; text-decoration: none; background: none;
  border-bottom: 1px solid var(--line-soft);
}
.station:last-child { border-bottom: 0; }
.station .node {
  grid-column: 1; justify-self: center;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--muted);
  transition: all var(--dur-med) var(--ease-out); z-index: 2;
}
.station:hover .node, .station:focus-visible .node {
  border-color: var(--accent); background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft), 0 0 18px var(--accent-glow);
}
.station .body { grid-column: 2; min-width: 0; }
.station .idx {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
}
.station .name {
  font-family: var(--display); font-weight: 400; font-size: clamp(24px, 3.4vw, 38px);
  letter-spacing: -0.02em; line-height: 1.05; color: var(--ink);
  margin: 4px 0 0; transition: color var(--dur-med) var(--ease-out);
  display: flex; align-items: baseline; gap: 12px;
}
.station .name .gl {
  font-family: var(--serif); font-size: 0.7em; color: var(--accent);
  opacity: 0; transform: translateX(-6px);
  transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
}
.station:hover .name { color: var(--accent); }
.station:hover .name .gl { opacity: 1; transform: none; }
.station .blurb {
  color: var(--muted); font-size: 14.5px; margin-top: 8px;
  max-width: 52ch; line-height: 1.5;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height var(--dur-slow) var(--ease-out), opacity var(--dur-med) var(--ease-out),
              margin-top var(--dur-med) var(--ease-out);
}
.station:hover .blurb, .station:focus-visible .blurb { max-height: 80px; opacity: 1; }
.station .alt {
  grid-column: 3; text-align: right;
  font-family: var(--mono); font-size: 12px; color: var(--ink-soft); letter-spacing: 0.04em;
  white-space: nowrap;
}
.station .alt b { color: var(--accent); font-weight: 500; }
.station .alt small { display: block; color: var(--muted); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; margin-top: 4px; }
@media (max-width: 680px){
  .station { grid-template-columns: 36px 1fr; gap: 14px; }
  .station .alt { grid-column: 2; text-align: left; margin-top: 10px; }
  .ascent-route { left: 17px; }
}

/* legacy niche-list fallback (kept for safety; ascent is primary) */
.niche-list { display: none; }

/* ============================================================
   Post grid + cards
   ============================================================ */
.post-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 26px; }
.post-card {
  grid-column: span 4;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg-elev) 100%, transparent), var(--bg));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex; flex-direction: column; gap: 15px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out),
              border-color var(--dur-med) var(--ease-out);
}
.post-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--card-accent, var(--accent));
  box-shadow: 0 0 16px var(--card-accent, var(--accent-glow));
  opacity: 0.85;
}
.post-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(60% 50% at 20% 0%, var(--accent-soft), transparent 70%);
  transition: opacity var(--dur-med) var(--ease-out);
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-glow); border-color: transparent; }
.post-card:hover::after { opacity: 1; }
.post-card .tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase;
}
.post-card .tag .gl { color: var(--accent); }
.post-card h3 {
  font-family: var(--display); font-weight: 400; font-size: 23px;
  line-height: 1.18; letter-spacing: -0.02em; margin: 2px 0 0;
}
.post-card h3 a { color: var(--ink); background: none; padding: 0; }
.post-card h3 a:hover { color: var(--accent); }
.post-card .meta {
  font-family: var(--mono); font-size: 10.5px; color: var(--muted);
  letter-spacing: 0.06em; font-feature-settings: "tnum" 1;
}
.post-card p { color: var(--ink-soft); font-size: 15px; margin: 0; line-height: 1.6; font-weight: 350; }
.post-card.featured  { grid-column: span 8; padding: 44px 40px; }
.post-card.featured h3 { font-size: 36px; }
.post-card.span-6    { grid-column: span 6; }
@media (max-width: 820px) { .post-card, .post-card.featured, .post-card.span-6 { grid-column: span 12; } }

/* ============================================================
   Article body — Fraunces editorial, molten drop cap
   ============================================================ */
article.post { padding: 96px 0 140px; }
article.post header { margin-bottom: 48px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
article.post .tag, .meta-pre {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  color: var(--accent); letter-spacing: 0.16em; text-transform: uppercase;
}
.meta-pre { color: var(--muted); margin-bottom: 14px; }
article.post h1 {
  font-family: var(--display); font-weight: 380;
  font-size: clamp(36px, 5.4vw, 62px);
  line-height: 1.04; letter-spacing: -0.03em; margin: 14px 0 20px;
  font-variation-settings: "opsz" 120;
}
article.post .meta {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  letter-spacing: 0.05em; font-feature-settings: "tnum" 1;
}
article.post .content {
  font-family: var(--serif); font-size: 20px; line-height: 1.72; color: var(--ink);
  font-weight: 360; font-variation-settings: "opsz" 32;
}
article.post .content > p:first-of-type::first-letter {
  font-family: var(--display); float: left; font-weight: 500;
  font-size: 5.2em; line-height: 0.78; padding: 8px 14px 0 0;
  color: var(--accent); text-shadow: 0 0 30px var(--accent-glow);
}
article.post .content h2 {
  font-family: var(--display); font-weight: 460; font-size: 30px;
  margin-top: 56px; letter-spacing: -0.018em; line-height: 1.15;
}
article.post .content h3 { font-family: var(--display); font-weight: 500; font-size: 23px; margin-top: 38px; }
article.post .content p  { margin: 22px 0; }
article.post .content ol, article.post .content ul { padding-left: 26px; }
article.post .content li { margin: 11px 0; }
article.post .content blockquote {
  border-left: 2px solid var(--accent); padding: 6px 0 6px 26px;
  color: var(--ink); margin: 34px 0; font-style: italic; font-size: 23px;
  font-weight: 360; line-height: 1.4;
}
article.post .content code {
  font-family: var(--mono); font-size: 14.5px;
  background: var(--bg-elev2); padding: 2px 7px; border-radius: 4px;
  border: 1px solid var(--line);
}
article.post .content a { color: var(--accent); background-image: linear-gradient(var(--accent), var(--accent)); background-size: 100% 1px; }

.callout {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-left: 2px solid var(--accent); border-radius: var(--radius);
  padding: 24px 28px; margin: 34px 0; font-family: var(--sans);
  font-size: 16px; line-height: 1.6; color: var(--ink); box-shadow: var(--shadow-card);
}
.callout strong { color: var(--ink); }
.callout.dark {
  background: linear-gradient(160deg, var(--bg-elev2), var(--bg-elev));
  border: 1px solid var(--line); border-left: 2px solid var(--accent); color: var(--ink);
}
.callout.dark .callout-label {
  display: block; margin-bottom: 12px; font-family: var(--mono); font-size: 11px;
  color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500;
}
.callout.dark a { color: var(--accent); }

.stat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 36px 0;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
@media (max-width: 700px) { .stat-grid { grid-template-columns: 1fr; } }
.stat-grid .stat { background: var(--bg-elev); padding: 24px; display: flex; flex-direction: column; gap: 7px; }
.stat-grid .stat-label { font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.stat-grid .stat-value {
  font-family: var(--display); font-weight: 460; font-size: 38px;
  color: var(--accent); letter-spacing: -0.02em; line-height: 1; font-feature-settings: "tnum" 1;
}
.stat-grid .stat-sub { font-size: 13px; color: var(--ink-soft); }

.kv-table { width: 100%; border-collapse: collapse; margin: 26px 0; font-family: var(--sans); font-size: 15px; }
.kv-table th, .kv-table td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.kv-table th { color: var(--muted); font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; }

article.post .content figure.post-figure { margin: 36px 0; }
article.post .content figure.post-figure img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); border: 1px solid var(--line); }
article.post .content figcaption { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 12px; text-align: center; letter-spacing: 0.04em; }
article.post .content hr { border: 0; height: 1px; background: var(--line); margin: 44px 0; }

/* ============================================================
   Tools
   ============================================================ */
.tools-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
@media (max-width: 820px) { .tools-grid { grid-template-columns: 1fr; } }
.tool-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow-card); }
.tool-card h3 { font-family: var(--display); font-weight: 440; font-size: 23px; letter-spacing: -0.018em; margin: 0 0 4px; }
.tool-card .tool-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 24px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.field input, .field select {
  font-family: var(--sans); font-size: 15px; color: var(--ink);
  padding: 12px 14px; border-radius: 4px; border: 1px solid var(--line);
  background: var(--bg); outline: none; transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.unit-row { display: flex; gap: 6px; }
.unit-row .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; }
.unit-row .seg button { padding: 9px 14px; background: var(--bg-elev); color: var(--muted); border: 0; cursor: pointer; font-weight: 500; text-transform: uppercase; transition: all var(--dur-fast) var(--ease-out); }
.unit-row .seg button.active { background: var(--accent); color: #0b0608; }
.result { margin-top: 28px; padding: 26px; background: var(--bg-elev2); border-radius: var(--radius); border: 1px solid var(--line); }
.result .big { font-family: var(--display); font-weight: 480; font-size: 46px; color: var(--accent); line-height: 1; letter-spacing: -0.028em; font-feature-settings: "tnum" 1; text-shadow: 0 0 30px var(--accent-glow); }
.result .label { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 7px; letter-spacing: 0.1em; text-transform: uppercase; }
.result-row { display: flex; gap: 30px; flex-wrap: wrap; }
.result-row > div { min-width: 110px; }
.macro-bar { display: flex; height: 7px; border-radius: 999px; overflow: hidden; margin-top: 12px; background: var(--line); }
.macro-bar .seg { height: 100%; }
.macro-bar .p { background: var(--n-books); }
.macro-bar .c { background: var(--n-health); }
.macro-bar .f { background: var(--n-content); }
.macro-legend { display: flex; gap: 18px; font-family: var(--mono); font-size: 10.5px; margin-top: 12px; color: var(--muted); flex-wrap: wrap; letter-spacing: 0.04em; text-transform: uppercase; }
.macro-legend .swatch { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 7px; vertical-align: middle; }
.bmi-bar { position: relative; height: 5px; border-radius: 999px; margin: 18px 0 6px; background: var(--line); }
.bmi-marker { position: absolute; top: -6px; width: 2px; height: 17px; background: var(--accent); transform: translateX(-50%); box-shadow: 0 0 10px var(--accent-glow); }
.bmi-scale { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); font-family: var(--mono); letter-spacing: 0.04em; }
.zone { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.zone:last-child { border-bottom: 0; }
.zone .dot { width: 9px; height: 9px; border-radius: 50%; }
.zone .name { font-family: var(--sans); font-weight: 600; font-size: 13px; min-width: 116px; letter-spacing: 0.02em; }
.zone .range { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }
.zone .desc  { color: var(--muted); font-size: 13px; }

/* ============================================================
   About / author card
   ============================================================ */
.author-card { display: flex; gap: 26px; align-items: flex-start; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; margin: 30px 0; box-shadow: var(--shadow-card); }
.author-card .avatar {
  width: 66px; height: 66px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(150deg, var(--accent), var(--accent-deep)); color: #0b0608;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 500; font-size: 26px; box-shadow: 0 0 24px var(--accent-glow);
}
.author-card .bio h3 { margin: 0 0 4px; font-family: var(--display); font-weight: 460; font-size: 20px; letter-spacing: -0.012em; }
.author-card .bio p { margin: 6px 0 0; font-size: 14.5px; color: var(--ink-soft); }
.creds { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.cred { font-family: var(--mono); font-size: 10.5px; padding: 6px 12px; border-radius: 999px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; background: var(--bg); color: var(--ink-soft); border: 1px solid var(--line); }

/* ============================================================
   Newsletter band + footer
   ============================================================ */
.news { border-top: 1px solid var(--line); margin-top: 100px; background: linear-gradient(180deg, var(--bg-elev), var(--bg)); position: relative; overflow: hidden; }
.news::before { content: ""; position: absolute; inset: auto 0 0 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .5; }
.news .container { padding: 56px 40px; display: flex; align-items: center; flex-wrap: wrap; gap: 22px 36px; }
.news-copy { flex: 1 1 300px; }
.news-copy .eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.news-copy p { margin: 0; font-size: 15px; color: var(--ink-soft); }
.news-form { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.news-form input { font-family: var(--sans); font-size: 15px; color: var(--ink); padding: 13px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); outline: none; min-width: 240px; transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.news-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.news-form button { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; padding: 13px 22px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: #0b0608; transition: box-shadow var(--dur-med) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.news-form button:hover { box-shadow: 0 8px 30px var(--accent-glow); transform: translateY(-1px); }
.news-msg { font-size: 12.5px; color: var(--muted); flex-basis: 100%; }
.news-rss { flex-basis: 100%; }
.news-rss a { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.news-rss a:hover { color: var(--accent); }

footer { border-top: 1px solid var(--line); padding: 52px 0; margin-top: 0; color: var(--muted); font-size: 13px; }
footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
footer .greek { font-family: var(--serif); font-style: italic; color: var(--accent); }
footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }

/* ============================================================
   Utilities
   ============================================================ */
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.spacer { height: 24px; }
.kbd { font-family: var(--mono); font-size: 11px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-elev); }
.tag { font-family: var(--mono); font-size: 10.5px; color: var(--accent); letter-spacing: 0.16em; text-transform: uppercase; }
.tag-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.tag-row .chip {
  font-family: var(--mono); font-size: 10.5px; padding: 7px 15px; border-radius: 999px;
  cursor: pointer; letter-spacing: 0.1em; text-transform: uppercase;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  transition: border-color var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out), background-color var(--dur-med) var(--ease-out);
}
.tag-row .chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.disclaimer { font-size: 12px; color: var(--muted); margin-top: 18px; line-height: 1.55; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }

a:focus-visible, button:focus-visible, .station:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}

.fade-up { animation: docRise .9s var(--ease-out) both; }

/* ============================================================
   Reduced motion — honour the preference
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .kinetic .word { transform: none !important; }
  .cursor-dot, .cursor-ring, .altitude { display: none !important; }
  html.has-cursor, html.has-cursor * { cursor: auto !important; }
}

/* ============================================================
   BESPOKE LAYER — de-generic pass (Atomic Design)
   ------------------------------------------------------------
   Every default-looking atom/molecule is rebuilt around the
   brand's mountain / ascent / cartography language so nothing
   reads as a stock framework component.
   ============================================================ */

/* ---------- ATOMS ---------- */

/* Button → trail marker: a notched corner + an ascending fill.
   No pill radius anywhere. The primary fills bottom-to-top on
   hover (you "summit" the button). */
.btn {
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 0 100%);
  transition: background-size var(--dur-med) var(--ease-rise),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-med) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              letter-spacing var(--dur-med) var(--ease-out);
}
.btn:hover { letter-spacing: 0.16em; }
.btn.primary {
  background-color: transparent; color: var(--accent); border-color: var(--accent);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat; background-position: bottom; background-size: 100% 0%;
  box-shadow: none;
}
.btn.primary:hover { background-size: 100% 100%; color: #0b0608; transform: translateY(-2px); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Input → console underline: no box, a molten focus line that draws in. */
.field { position: relative; }
.field input, .field select {
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: transparent; padding: 11px 2px;
}
.field input:focus, .field select:focus { box-shadow: none; border-bottom-color: transparent; }
.field::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--accent); box-shadow: 0 0 10px var(--accent-glow);
  transition: width var(--dur-med) var(--ease-out);
}
.field:focus-within::after { width: 100%; }

/* Chip → cut-corner ticket, not a pill. */
.tag-row .chip {
  border-radius: 0;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

/* Divider → an elevation ruler with tick marks and a molten survey node. */
.divider {
  height: 1px; background: var(--line); position: relative; overflow: visible;
}
.divider::before {
  content: ""; position: absolute; left: 0; right: 0; top: -3px; height: 6px;
  background-image: repeating-linear-gradient(90deg, var(--line-soft) 0 1px, transparent 1px 40px);
  opacity: 0.7;
}
.divider::after {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 14px var(--accent-glow);
}

/* ---------- MOLECULES ---------- */

/* Post card → a surveyed plate: cartographic corner marks, an index
   number, and a summit line that draws across the base on hover.
   The niche colour becomes the card's identity (marks + base line). */
.post-grid { counter-reset: card; }
.post-card {
  border-radius: 0;
  border-color: transparent;
  background-color: var(--bg-elev);
  --tick: var(--line);
  background-image:
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick)),
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick)),
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick)),
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick));
  background-repeat: no-repeat;
  background-size: 16px 2px, 2px 16px, 16px 2px, 2px 16px, 16px 2px, 2px 16px, 16px 2px, 2px 16px;
  background-position:
    top left, top left, top right, top right,
    bottom left, bottom left, bottom right, bottom right;
}
.post-card:hover { --tick: var(--card-accent, var(--accent)); border-color: transparent; }
/* index number, top-right (overrides the old left bar) */
.post-card::before {
  counter-increment: card;
  content: counter(card, decimal-leading-zero);
  position: absolute; left: auto; top: 20px; right: 24px; bottom: auto;
  width: auto; height: auto; background: none; box-shadow: none;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  color: var(--muted); opacity: 0.8;
}
/* summit line, drawn across the base on hover (overrides the old glow) */
.post-card::after {
  content: ""; position: absolute; left: 0; bottom: 0; top: auto; right: auto;
  height: 2px; width: 0; opacity: 1;
  background: linear-gradient(90deg, var(--card-accent, var(--accent)), var(--accent-2));
  box-shadow: 0 0 12px var(--accent-glow);
  transition: width var(--dur-slow) var(--ease-rise);
}
.post-card:hover::after { width: 100%; }

/* Tool cards get the same surveyed corner marks for system consistency. */
.tool-card {
  border-radius: 0; border-color: transparent; --tick: var(--line);
  background-color: var(--bg-elev);
  background-image:
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick)),
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick)),
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick)),
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick));
  background-repeat: no-repeat;
  background-size: 16px 2px, 2px 16px, 16px 2px, 2px 16px, 16px 2px, 2px 16px, 16px 2px, 2px 16px;
  background-position:
    top left, top left, top right, top right,
    bottom left, bottom left, bottom right, bottom right;
}

/* Newsletter field → matches the console-underline language. */
.news-form input {
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: transparent; box-shadow: none;
}
.news-form input:focus { border-bottom-color: var(--accent); box-shadow: 0 2px 12px -6px var(--accent-glow); }
.news-form button {
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

/* ---------- ORGANISMS ---------- */

/* Hero gains faint topographic contour rings — a survey map texture
   that belongs only to this brand. */
.hero {
  background-image:
    repeating-radial-gradient(circle at 82% 128%,
      transparent 0 46px,
      color-mix(in srgb, var(--ink) 4%, transparent) 46px 47px);
}
[data-theme="light"] .hero {
  background-image:
    repeating-radial-gradient(circle at 82% 128%,
      transparent 0 46px,
      color-mix(in srgb, var(--ink) 5%, transparent) 46px 47px);
}

@media (prefers-reduced-motion: reduce) {
  .post-card::after { width: 0 !important; }
  .post-card:hover::after { width: 100% !important; transition: none !important; }
}

/* ---------- Suggestions & Requests form ---------- */
.suggest-form { margin: 36px 0 8px; }
.suggest-form .field { margin-bottom: 26px; }
.suggest-form .field label {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; display: block;
}
.suggest-form .field .hint-inline { text-transform: none; letter-spacing: 0; color: var(--muted); }
.suggest-form input, .suggest-form select, .suggest-form textarea {
  width: 100%; font-family: var(--sans); font-size: 16px; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; padding: 12px 2px; outline: none;
}
.suggest-form textarea { resize: vertical; min-height: 130px; line-height: 1.55; }
.suggest-form .field { position: relative; }
.suggest-form .field::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--accent); box-shadow: 0 0 10px var(--accent-glow);
  transition: width var(--dur-med) var(--ease-out);
}
.suggest-form .field:focus-within::after { width: 100%; }
.suggest-form .btn.primary { margin-top: 6px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-msg { font-size: 14px; margin-top: 16px; min-height: 1.2em; font-family: var(--sans); }
.form-msg.ok  { color: var(--good); }
.form-msg.err { color: var(--danger); }
.form-msg a { color: var(--accent); }

/* ============================================================
   Mobile layout — declutter & tighten (phones ≤ 600px)
   Fewer competing elements, calmer rhythm, one clear action.
   ============================================================ */
@media (max-width: 600px) {
  /* HERO: lead with the headline + one line + clear actions; drop decoration */
  .hero { padding: 72px 0 44px; }
  .hero .eyebrow { font-size: 10px; letter-spacing: 0.22em; }
  .hero h1 { font-size: clamp(38px, 12.5vw, 56px); line-height: 0.98; margin: 18px 0 18px; }
  .hero p.lede { font-size: 16.5px; line-height: 1.55; }
  .hero .epigraph { display: none; }     /* decorative quote off on phones */
  .scroll-cue { display: none; }
  .cta-row { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 26px; }
  .cta-row .btn { width: 100%; justify-content: center; }

  /* GLOBAL RHYTHM: desktop padding reads as endless on a phone */
  section { padding: 58px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 26px; padding-bottom: 16px; }
  .section-head .sub { display: none; }  /* the H2 label is enough on phones */

  /* THE ASCENT: tighter, name-forward stations */
  .station { padding: 18px 14px 18px 0; }
  .station .name { font-size: 21px; }
  .station .idx { font-size: 9px; }
  .station .alt { font-size: 11px; }

  /* CARDS + ARTICLE: less inner padding, tighter top */
  .post-grid { gap: 18px; }
  .post-card { padding: 22px 20px; }
  .post-card.featured { padding: 26px 22px; }
  .post-card.featured h3 { font-size: 26px; }
  article.post { padding: 54px 0 80px; }
  article.post .content { font-size: 18px; }
  article.post .content > p:first-of-type::first-letter { font-size: 4em; }

  /* NEWSLETTER + FOOTER: match the page gutter, stack cleanly */
  .news { margin-top: 60px; }
  .news .container { padding: 38px 24px; }
  .news-form { width: 100%; }
  .news-form input { min-width: 0; flex: 1 1 100%; }
  .news-form button { width: 100%; }
  footer { padding: 34px 0; }
  footer .container { flex-direction: column; gap: 10px; }

  /* TOOLS: stack fields and let inputs shrink — this was the horizontal-scroll
     culprit (two side-by-side inputs forced each card to ~676px) */
  .tools-grid { gap: 18px; }
  .tool-card { padding: 24px 20px; min-width: 0; }
  .field-grid { grid-template-columns: 1fr; }
  .field { min-width: 0; }
  .field input, .field select, .field textarea { width: 100%; min-width: 0; }
  .unit-row { flex-wrap: wrap; }
  .result-row { gap: 18px; }
  .zone { flex-wrap: wrap; row-gap: 4px; }
  .zone .name { min-width: 0; }

  /* OVERFLOW SAFETY: nothing may exceed the viewport width */
  img, svg, video, iframe { max-width: 100%; height: auto; }
  table { display: block; width: 100%; overflow-x: auto; }
}

/* Inputs must always be allowed to shrink inside their grid/flex parents,
   at every width — prevents intrinsic input width forcing page overflow. */
.field input, .field select, .field textarea { min-width: 0; }
.field, .field-grid, .tool-card, .tools-grid, .post-card, .post-grid { min-width: 0; }
