/* ============================================================
   FuturologAI — housing atlas
   A silver-sage model of modular neighbourhoods (three.js), frosted
   glass panels floating above it, mint-glow accents.
   Type: Geist (display & body) + Geist Mono (labels).
   ============================================================ */

:root {
  /* the field — must match the fog color in assets/js/flow.js */
  --field: #c7d1cb;
  --field-hi: #e2e9e5;
  --field-deep: #aab7b0;

  --ink: #1c2723;
  --ink-soft: #45564e;
  --ink-faint: #64756c;

  --mint: #8ff0cf;
  --mint-deep: #2fc39a;
  --mint-ink: #0e6e53;

  --glass: rgba(246, 250, 248, 0.55);
  --glass-strong: rgba(247, 251, 249, 0.74);
  --glass-soft: rgba(246, 250, 248, 0.34);

  --line: rgba(28, 39, 35, 0.10);
  --line-strong: rgba(28, 39, 35, 0.22);

  /* layered shadows: 1px light ring, contact, ambient */
  --shadow-ring:
    0 0 0 1px rgba(255, 255, 255, 0.55),
    0 1px 2px -1px rgba(28, 39, 35, 0.08),
    0 2px 4px 0 rgba(28, 39, 35, 0.04);
  --shadow-float:
    0 0 0 1px rgba(255, 255, 255, 0.55),
    0 1px 2px -1px rgba(28, 39, 35, 0.08),
    0 24px 48px -24px rgba(28, 39, 35, 0.30);
  --shadow-hover:
    0 0 0 1px rgba(255, 255, 255, 0.75),
    0 1px 2px -1px rgba(28, 39, 35, 0.10),
    0 18px 40px -16px rgba(28, 39, 35, 0.32);

  --font-sans: "Geist", "Inter", system-ui, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "Cascadia Code", "Consolas", monospace;

  --measure: 39rem;
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --radius-sheet: 28px;
  --radius-card: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(28, 39, 35, 0.30) transparent;
  /* static fallback field, visible when WebGL is unavailable */
  background-color: var(--field);
  background-image:
    radial-gradient(120% 70% at 50% 0%, var(--field-hi) 0%, rgba(226, 233, 229, 0) 60%),
    linear-gradient(175deg, #cfd9d3 0%, var(--field) 45%, var(--field-deep) 100%);
  background-attachment: fixed;
}

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

/* cross-fade between plates where the browser supports it */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

body {
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* the modular city, injected by assets/js/flow.js */
.flow-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  display: block;
}

/* film grain — kills banding on the soft gradients */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 110;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.07;
  mix-blend-mode: soft-light;
}

/* the slab — hairline bezel around the viewport, like a pane of glass */
body::after {
  content: "";
  position: fixed;
  inset: 10px;
  z-index: 85;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 22px;
  box-shadow:
    0 0 0 1px rgba(28, 39, 35, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

::selection { background: #9df3d6; color: #0d221b; }

:focus-visible {
  outline: 2px solid var(--mint-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

a { color: inherit; }

/* ---------- mono captions ---------- */
.meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.meta strong { color: var(--ink-soft); font-weight: 600; }
.meta .tick { color: var(--mint-deep); }
.meta a { text-decoration: none; transition: color 150ms ease-out; }
.meta a:hover { color: var(--mint-ink); }

.hand-note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--mint-ink);
}

/* ---------- top bar: floating glass pill ---------- */
.topbar {
  position: fixed;
  top: 18px;
  left: 50%;
  translate: -50% 0;
  width: min(74rem, calc(100% - 44px));
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  background: var(--glass-soft);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: var(--shadow-ring);
  transition: background-color 300ms ease-out, box-shadow 300ms ease-out;
}
.topbar.is-scrolled {
  /* opaque enough to stay legible even where backdrop blur is unavailable */
  background: rgba(247, 251, 249, 0.84);
  box-shadow: var(--shadow-float);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 620;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mint) 0%, var(--mint-deep) 100%);
  box-shadow: 0 0 10px rgba(47, 195, 154, 0.85), 0 0 2px rgba(47, 195, 154, 0.9);
}
.wordmark em { font-style: normal; color: var(--mint-ink); }

.topbar-right { display: flex; align-items: center; gap: 1.3rem; }

/* reading progress, plates only (decorative — no fallback needed) */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    body.has-plate .topbar::after {
      content: "";
      position: absolute;
      left: 1.15rem;
      right: 1.15rem;
      bottom: 0.3rem;
      height: 2px;
      border-radius: 2px;
      transform-origin: left center;
      background: linear-gradient(90deg, var(--mint-deep), var(--mint));
      scale: 0 1;
      animation: progress-grow linear both;
      animation-timeline: scroll(root);
    }
    @keyframes progress-grow { to { scale: 1 1; } }
  }
}

/* ============================================================
   HERO (index) — type floating straight over the liquid field
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* keep the track at viewport width */
  place-items: center;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 62rem;
  width: 100%;
  padding: 7rem 1.5rem 5rem;
  pointer-events: none;
}
.hero-inner a { pointer-events: auto; }

/* Keep the city visible around the headline without putting windows behind the copy. */
.hero-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse, rgba(226, 233, 229, 0.98) 24%, rgba(226, 233, 229, 0.91) 46%, rgba(226, 233, 229, 0) 72%);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--glass-soft);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: var(--shadow-ring);
  margin-bottom: 1.9rem;
  color: var(--ink-soft);
}
.hero-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint-deep);
  box-shadow: 0 0 8px rgba(47, 195, 154, 0.9);
}

.hero h1 {
  font-weight: 540;
  font-size: clamp(2.9rem, 7vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
  color: var(--ink);
}
.hero h1 .flourish {
  background: linear-gradient(100deg, #0c6b50 0%, #1ea87f 55%, #27655a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 1.7rem auto 0;
  max-width: 36rem;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 2.5rem;
}

/* staged entrance — one-shot, ~90ms stagger */
@keyframes rise-in {
  from { opacity: 0; translate: 0 16px; filter: blur(6px); }
  to   { opacity: 1; translate: 0 0;   filter: blur(0px); }
}
.hero-kicker { animation: rise-in 700ms var(--ease-out) 80ms backwards; }
.hero h1     { animation: rise-in 700ms var(--ease-out) 170ms backwards; }
.hero-sub    { animation: rise-in 700ms var(--ease-out) 260ms backwards; }
.hero-ctas   { animation: rise-in 700ms var(--ease-out) 350ms backwards; }
.hero-corner, .scroll-hint { animation: rise-in 900ms var(--ease-out) 620ms backwards; }
.hero-panel > * { animation: rise-in 700ms var(--ease-out) backwards; }
.hero-panel > *:nth-child(1) { animation-delay: 620ms; }
.hero-panel > *:nth-child(2) { animation-delay: 700ms; }
.hero-panel > *:nth-child(3) { animation-delay: 780ms; }
.hero-panel > *:nth-child(4) { animation-delay: 860ms; }

/* hero drifts away as you scroll (decorative — progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
    @keyframes hero-away {
      to { transform: translateY(8rem); opacity: 0; filter: blur(8px); }
    }
    .hero-inner {
      animation: hero-away linear both;
      animation-timeline: scroll(root);
      animation-range: 0 92vh;
    }
    @keyframes soft-away { to { opacity: 0; transform: translateY(2.5rem); } }
    .hero-corner, .hero-panel, .scroll-hint {
      animation: rise-in 900ms var(--ease-out) 620ms backwards, soft-away linear both;
      animation-timeline: auto, scroll(root);
      animation-range: normal, 0 45vh;
    }
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 520;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  color: var(--ink);
  transition-property: scale, box-shadow, background-color, color;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.btn:active { scale: 0.96; }

/* primary: frosted pill with the mint aura */
.btn-solid {
  color: #07352a;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(210, 246, 233, 0.62));
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow:
    0 0 0 1px rgba(143, 240, 207, 0.95),
    inset 0 0 16px rgba(143, 240, 207, 0.40),
    0 10px 30px -12px rgba(47, 195, 154, 0.60);
}
.btn-solid:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(210, 246, 233, 0.78));
  box-shadow:
    0 0 0 1px rgba(127, 240, 203, 1),
    inset 0 0 22px rgba(143, 240, 207, 0.60),
    0 12px 36px -10px rgba(47, 195, 154, 0.70);
}

/* secondary: quiet glass */
.btn-ghost {
  background: var(--glass-soft);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: var(--shadow-ring);
}
.btn-ghost:hover {
  background: var(--glass);
  box-shadow: var(--shadow-hover);
}

/* corner plate annotations */
.hero-corner {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}
.hero-corner.tl { top: 5.6rem; left: 2rem; text-align: left; }
.hero-corner.tr { top: 5.6rem; right: 2rem; text-align: right; }
.hero-corner.bl { bottom: 2rem; left: 2rem; text-align: left; }
.hero-corner.br { bottom: 2rem; right: 2rem; text-align: right; }
.hero-corner .meta { display: block; line-height: 2; }

/* atlas telemetry — the little glass instrument, bottom left */
.hero-panel {
  position: absolute;
  z-index: 2;
  bottom: 2rem;
  left: 2rem;
  width: 15.5rem;
  padding: 1rem 1.1rem 0.95rem;
  border-radius: var(--radius-card);
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: var(--shadow-float);
  pointer-events: none;
}
.hero-panel .meta { display: block; }
.tele-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0.55rem 0 0.7rem;
}
.tele-num {
  font-size: 2.1rem;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tele-label { font-size: 0.8rem; color: var(--ink-soft); text-wrap: balance; }
.tele-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 42px;
  margin-bottom: 0.75rem;
}
.tele-bars i {
  flex: 1;
  height: calc(var(--h) * 42px);
  border-radius: 3px;
  background: linear-gradient(180deg, var(--mint-deep), rgba(47, 195, 154, 0.25));
  transform-origin: bottom;
  animation: bar-up 600ms var(--ease-out) backwards;
}
.tele-bars i:nth-child(2n) { animation-delay: 950ms; }
.tele-bars i:nth-child(2n + 1) { animation-delay: 1020ms; }
.tele-bars i:nth-child(3n) { animation-delay: 1100ms; }
@keyframes bar-up { from { scale: 1 0; } to { scale: 1 1; } }

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}
.scroll-hint .arrow {
  display: block;
  width: 1px;
  height: 2.4rem;
  background: var(--line-strong);
  position: relative;
  overflow: hidden;
}
.scroll-hint .arrow::after {
  content: "";
  position: absolute;
  left: 0; top: -40%;
  width: 100%; height: 40%;
  background: var(--mint-deep);
  animation: drip 2.2s ease-in-out infinite;
}
@keyframes drip { 0% { top: -40%; } 70%, 100% { top: 110%; } }

/* ============================================================
   SECTIONS (index) — floating glass sheets over the field
   ============================================================ */
.section {
  position: relative;
  width: min(76rem, calc(100% - 2rem));
  margin: 0 auto 1.5rem;
  padding: clamp(2rem, 4vw, 3.4rem);
  background: var(--glass);
  -webkit-backdrop-filter: blur(26px) saturate(1.5);
  backdrop-filter: blur(26px) saturate(1.5);
  border-radius: var(--radius-sheet);
  box-shadow: var(--shadow-float);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  margin-bottom: 2.1rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid;
  border-image: linear-gradient(90deg, rgba(47, 195, 154, 0.55), rgba(28, 39, 35, 0.16) 35%, rgba(28, 39, 35, 0) 96%) 1;
}
.section-head .index-no {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--mint-ink);
  background: rgba(143, 240, 207, 0.25);
  box-shadow: 0 0 0 1px rgba(143, 240, 207, 0.55);
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  translate: 0 -0.15rem;
}
.section-head h2 {
  font-weight: 550;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.section-head .meta { margin-left: auto; text-align: right; }

.prose { max-width: var(--measure); }
.prose p { text-wrap: pretty; }
.prose p + p { margin-top: 1.1em; }
.prose .lede {
  font-size: 1.28rem;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 2.2rem 3.2rem;
  max-width: none;
}

/* numbered method list */
.method {
  counter-reset: method;
  list-style: none;
  display: grid;
  gap: 1.3rem;
}
.method li {
  counter-increment: method;
  position: relative;
  padding-left: 3.1rem;
  text-wrap: pretty;
}
.method li::before {
  content: counter(method, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.18em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--mint-ink);
  background: rgba(143, 240, 207, 0.25);
  box-shadow: 0 0 0 1px rgba(143, 240, 207, 0.55);
  padding: 0.22rem 0.45rem;
  border-radius: 7px;
}
.method li strong { font-weight: 620; }

/* ============================================================
   PLATE CARDS (the atlas grid)
   ============================================================ */
.plate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1.1rem;
  perspective: 1600px;
}

.plate-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 12.5rem;
  padding: 1.35rem 1.4rem 1.25rem;
  background: linear-gradient(180deg, rgba(253, 255, 254, 0.78), rgba(240, 247, 243, 0.55));
  border-radius: var(--radius-card);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    var(--shadow-ring);
  text-decoration: none;
  transform-style: preserve-3d;
  transition-property: translate, box-shadow, background-color;
  transition-duration: 200ms;
  transition-timing-function: var(--ease-out);
  overflow: hidden;
}
.plate-card:hover {
  translate: 0 -3px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    var(--shadow-hover);
}
.plate-card:active { translate: 0 -1px; }

/* specular sheen that follows the pointer (site.js sets --mx / --my) */
.plate-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%),
    rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0) 60%);
  opacity: 0;
  transition: opacity 150ms ease-out;
}
.plate-card:hover::before { opacity: 1; }

.plate-card .plate-no {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mint-ink);
  font-variant-numeric: tabular-nums;
}
.plate-card h3 {
  font-weight: 560;
  font-size: 1.3rem;
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}
.plate-card p {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-soft);
  flex: 1;
  text-wrap: pretty;
}
.plate-card .plate-open {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color 150ms ease-out;
}
.plate-open .arr {
  display: inline-block;
  transition: translate 150ms ease-out;
}
.plate-card:hover .plate-open { color: var(--mint-ink); }
.plate-card:hover .plate-open .arr { translate: 3px 0; }

/* featured portrait card */
.portrait-card {
  grid-column: 1 / -1;
  min-height: 11rem;
  background:
    radial-gradient(120% 180% at 100% 0%, rgba(143, 240, 207, 0.38) 0%, rgba(143, 240, 207, 0) 45%),
    linear-gradient(180deg, rgba(253, 255, 254, 0.82), rgba(240, 247, 243, 0.6));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(143, 240, 207, 0.55),
    0 1px 2px -1px rgba(28, 39, 35, 0.08),
    0 24px 48px -24px rgba(28, 39, 35, 0.30);
}
.portrait-card:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 0 0 1px rgba(127, 240, 203, 0.9),
    0 1px 2px -1px rgba(28, 39, 35, 0.08),
    0 20px 44px -18px rgba(28, 39, 35, 0.32),
    0 0 40px -8px rgba(47, 195, 154, 0.35);
}
.portrait-card h3 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
.portrait-card p { max-width: 48rem; font-size: 1rem; }

/* ============================================================
   PLATE PAGE (aspect pages) — one reading sheet of glass
   ============================================================ */
.plate-page {
  position: relative;
  width: min(56rem, calc(100% - 1.8rem));
  margin: 6.4rem auto 1.5rem;
  padding: clamp(2rem, 5vw, 3.8rem) clamp(1.3rem, 5.5vw, 4.8rem) 3rem;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  backdrop-filter: blur(28px) saturate(1.5);
  border-radius: var(--radius-sheet);
  box-shadow: var(--shadow-float);
}

.plate-header { margin-bottom: 2.6rem; }
.plate-header .meta { display: block; margin-bottom: 1.1rem; }
.plate-header h1 {
  font-weight: 540;
  font-size: clamp(2.4rem, 5.5vw, 3.7rem);
  line-height: 1.03;
  letter-spacing: -0.032em;
  margin-bottom: 1.4rem;
  text-wrap: balance;
}
.plate-header .scope {
  max-width: 43rem;
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ink-soft);
  border-left: 2px solid;
  border-image: linear-gradient(180deg, var(--mint-deep), rgba(47, 195, 154, 0)) 1;
  padding-left: 1.2rem;
  text-wrap: pretty;
}

.plate-body { max-width: var(--measure); }
.plate-body h2 {
  font-weight: 560;
  font-size: 1.55rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 2.9rem 0 1.05rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.plate-body h2 .sec-no {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--mint-ink);
  letter-spacing: 0.08em;
  background: rgba(143, 240, 207, 0.25);
  box-shadow: 0 0 0 1px rgba(143, 240, 207, 0.55);
  padding: 0.24rem 0.5rem;
  border-radius: 7px;
  translate: 0 -0.12rem;
}
.plate-body p { text-wrap: pretty; }
.plate-body p + p { margin-top: 1.05em; }
.plate-body ul { margin: 1.05em 0 1.05em 1.3rem; display: grid; gap: 0.55em; }
.plate-body li::marker { color: var(--mint-deep); }
.plate-body strong { font-weight: 620; }
.plate-body a {
  color: var(--mint-ink);
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
  text-decoration-color: rgba(14, 110, 83, 0.4);
  text-decoration-skip-ink: auto;
  transition: color 150ms ease-out, text-decoration-color 150ms ease-out;
}
.plate-body a:hover { color: #0a5740; text-decoration-color: rgba(14, 110, 83, 0.9); }

/* related plates */
.related {
  margin-top: 3.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid;
  border-image: linear-gradient(90deg, rgba(47, 195, 154, 0.5), rgba(28, 39, 35, 0.14) 40%, rgba(28, 39, 35, 0) 96%) 1;
}
.related .meta { display: block; margin-bottom: 0.9rem; }
.related-links { display: flex; flex-wrap: wrap; gap: 0.55rem; list-style: none; }
.related-links a {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-ring);
  color: var(--ink-soft);
  transition-property: translate, box-shadow, color, background-color;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.related-links a:hover {
  translate: 0 -1px;
  color: var(--mint-ink);
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 0 0 1px rgba(143, 240, 207, 0.8),
    0 1px 2px -1px rgba(28, 39, 35, 0.08),
    0 6px 14px -6px rgba(47, 195, 154, 0.4);
}
.related-links a:active { translate: 0 0; }

/* ---------- change log ---------- */
.changelog {
  margin-top: 3.4rem;
  padding: 1.6rem 1.7rem 1.4rem;
  background: rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), var(--shadow-ring);
}
.changelog > .meta { display: block; margin-bottom: 1.2rem; }
.changelog ol { list-style: none; display: grid; gap: 1.05rem; }
.changelog li {
  display: grid;
  grid-template-columns: 7.2rem 1fr;
  gap: 0.4rem 1.2rem;
  padding-bottom: 1.05rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.changelog li:last-child { border-bottom: none; padding-bottom: 0; }
.changelog time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  padding-top: 0.3em;
  font-variant-numeric: tabular-nums;
}
.changelog .log-model {
  display: inline-flex;
  width: fit-content;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mint-ink);
  background: rgba(143, 240, 207, 0.22);
  box-shadow: 0 0 0 1px rgba(143, 240, 207, 0.5);
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.4rem;
}
.changelog .log-body { color: var(--ink-soft); line-height: 1.55; display: block; text-wrap: pretty; }
@media (max-width: 34rem) {
  .changelog li { grid-template-columns: 1fr; }
}

/* prev / next plate nav */
.plate-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-top: 2.6rem;
}
.plate-nav a {
  text-decoration: none;
  padding: 1.05rem 1.25rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), var(--shadow-ring);
  transition-property: translate, box-shadow, background-color;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.plate-nav a:hover {
  translate: 0 -2px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), var(--shadow-hover);
}
.plate-nav a:active { translate: 0 0; }
.plate-nav a .meta { display: block; margin-bottom: 0.3rem; }
.plate-nav a .nav-title { font-weight: 560; font-size: 1.05rem; letter-spacing: -0.01em; }
.plate-nav a.next { text-align: right; }
@media (max-width: 34rem) { .plate-nav { grid-template-columns: 1fr; } }

/* ============================================================
   FOOTER — rests directly on the liquid field
   ============================================================ */
.site-footer {
  padding: 2.6rem 1.6rem 3.2rem;
}
.site-footer .inner {
  width: min(74rem, 100%);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem 3rem;
  justify-content: space-between;
  align-items: baseline;
}
.site-footer .meta { line-height: 2; }

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  translate: 0 22px;
  filter: blur(7px);
  transition:
    opacity 700ms var(--ease-out),
    translate 700ms var(--ease-out),
    filter 700ms var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  translate: 0 0;
  filter: blur(0px);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; translate: none; filter: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 60rem) {
  .hero-panel { display: none; }
}
@media (max-width: 45rem) {
  body { font-size: 1rem; }
  body::after { inset: 6px; border-radius: 18px; }
  .topbar { top: 12px; width: calc(100% - 28px); }
  .topbar-right { gap: 0.9rem; }
  .topbar-right .meta { font-size: 0.62rem; white-space: nowrap; }
  .topbar-right .meta:nth-child(3) { display: none; }
  .hero-corner { display: none; }
  .hero-kicker { font-size: 0.6rem; letter-spacing: 0.12em; max-width: 100%; }
  .section-head { flex-wrap: wrap; row-gap: 0.35rem; }
  .plate-header h1 { letter-spacing: -0.025em; }
}

/* ---------- print: the atlas on paper ---------- */
@media print {
  html { background: #fff; }
  body::before, body::after, .flow-canvas, .topbar, .scroll-hint { display: none !important; }
  .plate-page, .section, .changelog {
    background: #fff;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    width: auto;
    margin: 0;
  }
  .reveal { opacity: 1 !important; translate: none !important; filter: none !important; }
}
