/* ---------------------------------------------------------
   VeraSpectra · Editorial engineering field-journal
   --------------------------------------------------------- */

:root {
  /* Paper & ink */
  --paper:        #f1ead8;
  --paper-deep:   #e7dec7;
  --ink:          #14202c;
  --ink-soft:     #2b3845;
  --rule:         #c9bea4;

  /* Brand */
  --teal:         #1e4047;
  --teal-deep:    #122a30;
  --midnight:     #0b1622;
  --copper:       #c97b3f;
  --copper-bright:#e08a45;
  --warm-gray:    #5c5d5e;
  --bone:         #efe7d8;

  /* Type — "EB Garamond" leads display & body stacks, subset to "&"
     (U+0026) only. Every other character falls through to the family
     that follows. Mono stack unchanged. */
  --display: "EB Garamond", 'Fraunces', 'Times New Roman', serif;
  --body:    "EB Garamond", 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Rhythm */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max:    1320px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  /* sticky header is ~64px tall — offset anchor scrolls so headings clear it */
  scroll-padding-top: 80px;
}
body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Paper grain — a low-opacity SVG noise overlay everywhere */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.08  0 0 0 0 0.06  0 0 0 0 0.04  0 0 0 0.18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }

::selection { background: var(--copper); color: var(--paper); }

/* ---------- Type system ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--copper);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px; height: 1px;
  background: currentColor;
}

.label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--warm-gray);
}

.display {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 0;
  line-height: 0.94;
  letter-spacing: -0.025em;
  color: var(--ink);
}

h2.section-title {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: 'opsz' 80, 'SOFT' 60;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
}
h2.section-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--teal);
}

p.lede {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.25rem, 1.8vw, 1.6rem);
  line-height: 1.4;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
}

/* ---------- Layout primitives ---------- */

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
}

section {
  position: relative;
  padding: clamp(5rem, 9vw, 8rem) 0;
}

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(241, 234, 216, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 14px var(--gutter);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.nav-brand img.word {
  height: 34px;
  width: auto;
  max-width: none;   /* override global img { max-width: 100% } so it never squeezes */
  flex-shrink: 0;
  display: block;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 2.25rem;
  flex-wrap: nowrap;
}
.nav-links a {
  --nav-icon: none;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 4px 0;
  white-space: nowrap;
  transition: color .25s ease;
}
.nav-links a:hover { color: var(--copper); }
.nav-links a::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  background: currentColor;
  opacity: 0.62;
  -webkit-mask: var(--nav-icon) center / contain no-repeat;
  mask: var(--nav-icon) center / contain no-repeat;
  transition: opacity .25s ease, transform .25s ease;
}
.nav-links a:hover::before {
  opacity: 0.9;
  transform: translateY(-1px);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--copper);
  transition: right .35s ease;
}
.nav-links a:hover::after { right: 0; }
.nav-links a[href$="#capabilities"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='6' height='6'/%3E%3Crect x='14' y='4' width='6' height='6'/%3E%3Crect x='4' y='14' width='6' height='6'/%3E%3Crect x='14' y='14' width='6' height='6'/%3E%3C/svg%3E");
}
.nav-links a[href$="#method"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='5' cy='6' r='2'/%3E%3Ccircle cx='19' cy='6' r='2'/%3E%3Ccircle cx='5' cy='18' r='2'/%3E%3Ccircle cx='19' cy='18' r='2'/%3E%3Cpath d='M7 6h10M5 8v8M7 18h10'/%3E%3C/svg%3E");
}
.nav-links a[href$="#industries"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V8l5-3v15M9 20V4l6 4v12M15 20v-9l5 3v6M3 20h18'/%3E%3C/svg%3E");
}
.nav-links a[href$="#field"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s6-5.2 6-11a6 6 0 1 0-12 0c0 5.8 6 11 6 11Z'/%3E%3Ccircle cx='12' cy='10' r='2.2'/%3E%3C/svg%3E");
}
.nav-links a[href='/blog/'] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 5.5A3.5 3.5 0 0 1 8.5 2H20v18H8.5A3.5 3.5 0 0 0 5 23V5.5Z'/%3E%3Cpath d='M8 6h8M8 10h8M8 14h5'/%3E%3C/svg%3E");
}
.nav-links a[href$="#contact"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='6' width='17' height='12' rx='1.8'/%3E%3Cpath d='m5 8 7 5 7-5'/%3E%3C/svg%3E");
}

.nav-coord {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--warm-gray);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-coord b { color: var(--copper); font-weight: 500; }

/* Drop the coordinate readout first — it's the most expendable element */
@media (max-width: 1340px) {
  .nav { grid-template-columns: auto 1fr; }
  .nav-coord { display: none; }
}

/* Below this, nav links wrap awkwardly — collapse them and rely on the footer */
@media (max-width: 860px) {
  .nav-links { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  background: var(--midnight);
  color: var(--bone);
  padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(4rem, 8vw, 7rem);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
.hero::before {
  /* topographic isolines */
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='800' height='800' viewBox='0 0 800 800'><g fill='none' stroke='%23c97b3f' stroke-width='0.6' opacity='0.18'><ellipse cx='400' cy='420' rx='120' ry='70'/><ellipse cx='400' cy='420' rx='180' ry='110'/><ellipse cx='400' cy='420' rx='240' ry='150'/><ellipse cx='400' cy='420' rx='300' ry='190'/><ellipse cx='400' cy='420' rx='360' ry='230'/><ellipse cx='400' cy='420' rx='420' ry='270'/><ellipse cx='400' cy='420' rx='480' ry='310'/><ellipse cx='400' cy='420' rx='540' ry='350'/></g></svg>");
  background-size: 1200px 1200px;
  background-position: -200px 80%;
  background-repeat: no-repeat;
  opacity: 0.85;
  z-index: -1;
}
.hero::after {
  /* sunrise glow lower-left */
  content: "";
  position: absolute;
  left: -10%;
  bottom: -30%;
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle at center, rgba(224,138,69,0.22), transparent 60%);
  z-index: -1;
}

.hero .container { position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(239,231,216,0.55);
}
.hero-meta span { display: inline-flex; align-items: center; gap: .55em; }
.hero-meta .dot { width: 6px; height: 6px; background: var(--copper); border-radius: 50%; display: inline-block; }

.hero h1.display {
  font-size: clamp(3.4rem, 9vw, 8.5rem);
  color: var(--bone);
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.04em;
  line-height: 0.92;
}
.hero h1 .amp {
  font-style: italic;
  color: var(--copper);
  display: inline-block;
  transform: translateY(-0.04em);
}
.hero h1 .roman {
  font-style: normal;
  font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 0;
  font-weight: 400;
}

.hero-sub {
  margin-top: 2rem;
  max-width: 38rem;
  font-family: var(--body);
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  line-height: 1.55;
  color: rgba(239,231,216,0.78);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2.5rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 14px 22px;
  border-radius: 999px;
  transition: all .25s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--copper);
  color: var(--midnight);
}
.btn-primary:hover { background: var(--copper-bright); transform: translateY(-1px); }
.btn-ghost {
  color: var(--bone);
  border-color: rgba(239,231,216,0.35);
}
.btn-ghost:hover { border-color: var(--copper); color: var(--copper); }
.btn .arrow { transition: transform .25s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* Hero — identity mark treatment */
.hero-mark {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.hero-mark .mark-stage {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.hero-mark .mark-stage::before {
  /* faint copper glow behind the mark */
  content: "";
  position: absolute;
  inset: 12%;
  background: radial-gradient(circle at 50% 55%, rgba(224,138,69,0.28), transparent 65%);
  filter: blur(20px);
  z-index: -1;
}
.hero-mark .mark-rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: mark-spin 240s linear infinite;
  transform-origin: 50% 50%;
}
@keyframes mark-spin {
  to { transform: rotate(360deg); }
}
.hero-mark .mark-stage picture {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.hero-mark .mark-img {
  width: 70%;
  height: auto;
  filter: drop-shadow(0 14px 30px rgba(0,0,0,0.45));
}
.hero-mark .mark-caption {
  display: flex;
  justify-content: space-between;
  width: min(100%, 460px);
  padding-top: 12px;
  border-top: 1px solid rgba(239,231,216,0.15);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(239,231,216,0.55);
}
.hero-mark .mark-caption b { color: var(--copper); font-weight: 500; }
@media (prefers-reduced-motion: reduce) {
  .hero-mark .mark-rings { animation: none; }
}

/* Tickertape under hero */
.tickertape {
  --ticker-gap: 4rem;
  background: var(--teal-deep);
  color: var(--bone);
  border-top: 1px solid rgba(239,231,216,0.08);
  border-bottom: 1px solid rgba(239,231,216,0.08);
  overflow: hidden;
  contain: paint;
  padding: 14px 0;
}
.tickertape-inner {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: scroll-x 90s linear infinite;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(239,231,216,0.7);
  will-change: transform;
}
.tickertape-segment {
  display: flex;
  flex: 0 0 auto;
  gap: var(--ticker-gap);
  padding-right: var(--ticker-gap);
}
.tickertape-inner span b { color: var(--copper); font-weight: 500; margin-right: 8px; }
@keyframes scroll-x {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* ---------- Intro / Practice ---------- */

.intro {
  background: var(--paper);
  position: relative;
}

.intro-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  flex-wrap: wrap;
  gap: 1rem;
}
.intro-meta .eyebrow { color: var(--copper); }
.intro-meta .kicker  { color: var(--warm-gray); }

.intro-quote {
  font-family: var(--display);
  font-weight: 400;
  font-style: normal;
  font-variation-settings: 'opsz' 144, 'SOFT' 60, 'WONK' 0;
  font-size: clamp(2.2rem, 5.2vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: none;
  margin: 0 auto;
  text-align: center;
  white-space: nowrap;
}
.intro-quote em {
  font-style: italic;
  font-weight: 300;
  color: var(--copper);
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
}
@media (max-width: 760px) {
  .intro-quote {
    white-space: normal;
    text-align: left;
    font-size: clamp(2rem, 7vw, 3rem);
  }
  .intro-quote br { display: none; }
}

/* Spectrum visualization */
.spectrum {
  margin: clamp(2.5rem, 5vw, 4rem) 0 clamp(2.5rem, 5vw, 4rem);
  padding: 1.5rem 0 0;
  border-top: 1px dashed var(--rule);
  border-bottom: 1px dashed var(--rule);
}
.spectrum-svg {
  width: 100%;
  height: auto;
  display: block;
  padding-top: 1.25rem;
  padding-bottom: 0;
  overflow: visible;
}
.spectrum-grain-overlay {
  fill: #efe7d8;
  mix-blend-mode: soft-light;
  opacity: 0.34;
  pointer-events: none;
}
.spectrum-paper-overlay {
  fill: #8a6a4a;
  mix-blend-mode: multiply;
  opacity: 0.22;
  pointer-events: none;
}

/* ----- Drift-in markers + spectrometer sweep ----- */

.spectrum-marker {
  opacity: 0;
  transition: opacity 0.6s ease;
  transition-delay: var(--marker-delay, 0s);
}
.spectrum-svg.is-in-view .spectrum-marker {
  opacity: 1;
}

.spectrum-marker .spectrum-tag rect {
  transition: fill 0.55s ease, stroke 0.55s ease;
}
.spectrum-marker.is-lit .spectrum-tag rect {
  fill: #fae9c4;
  stroke: #c97b3f;
}

.spectrum-sweep {
  opacity: 0;
  transition: opacity 0.9s ease 1.4s;
  pointer-events: none;
}
.spectrum-svg.is-in-view .spectrum-sweep {
  opacity: 1;
}
.sweep-line {
  stroke: #c97b3f;
  stroke-width: 0.55;
  opacity: 0.42;
}
.sweep-line--lower {
  opacity: 0.55;
  stroke-width: 0.5;
}
.sweep-line--connect {
  stroke: var(--ink);
  stroke-width: 0.6;
  opacity: 0.75;
}
.sweep-readout {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 6.8px;
  letter-spacing: 1.4px;
  fill: #c97b3f;
  opacity: 0.82;
  font-feature-settings: "tnum" 1;
}

/* Rail along the bottom of the SVG, with end-cap brackets and inner ticks */
.spectrum-rail .rail-line {
  stroke: var(--ink);
  stroke-width: 0.45;
  opacity: 0.62;
  vector-effect: non-scaling-stroke;
}
.spectrum-rail .rail-cap {
  stroke: var(--ink);
  stroke-width: 0.7;
  opacity: 0.78;
  vector-effect: non-scaling-stroke;
}
.spectrum-rail .rail-tick {
  stroke: var(--copper);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
}

/* Cursor riding the rail — small copper diamond pinned to the sweep x */
.sweep-cursor {
  fill: var(--copper);
  stroke: var(--ink);
  stroke-width: 0.35;
  opacity: 0.95;
}

@media (prefers-reduced-motion: reduce) {
  .spectrum-marker { opacity: 1; transition: none; }
  .spectrum-sweep { display: none; }
}

/* ----- Band registry card (Wes-Anderson-meets-1950s-drafting) ----- */

.spectrum-readout {
  position: relative;
  width: 100%;
  margin: 0; /* the connector line bridges this to the rail above */
  padding: 0.9rem 1.5rem;
  background:
    linear-gradient(180deg,
      rgba(241,234,216,0.78) 0%,
      rgba(231,222,199,0.78) 100%);
  border: 1px solid var(--ink);
  /* Double-rule frame: inner border (above) + 4px paper gap + 1px outer ink */
  box-shadow:
    0 0 0 4px var(--paper),
    0 0 0 5px var(--ink),
    0 1px 0 6px rgba(20, 32, 44, 0.06);
  color: var(--ink);
}

/* Four corner ticks — small inked L-marks at each corner of the inner frame */
.readout-corner {
  position: absolute;
  width: 9px;
  height: 9px;
  pointer-events: none;
}
.readout-corner::before,
.readout-corner::after {
  content: "";
  position: absolute;
  background: var(--ink);
}
.readout-corner::before { width: 9px; height: 1px; }
.readout-corner::after  { width: 1px; height: 9px; }
.readout-corner--tl { top: -1px; left: -1px; }
.readout-corner--tl::before { top: 0; left: 0; }
.readout-corner--tl::after  { top: 0; left: 0; }
.readout-corner--tr { top: -1px; right: -1px; }
.readout-corner--tr::before { top: 0; right: 0; }
.readout-corner--tr::after  { top: 0; right: 0; }
.readout-corner--bl { bottom: -1px; left: -1px; }
.readout-corner--bl::before { bottom: 0; left: 0; }
.readout-corner--bl::after  { bottom: 0; left: 0; }
.readout-corner--br { bottom: -1px; right: -1px; }
.readout-corner--br::before { bottom: 0; right: 0; }
.readout-corner--br::after  { bottom: 0; right: 0; }

/* ── Header strip (bureau · plate · λ · counter) ──────────────────── */
.readout-header {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: baseline;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-bottom: 0.55rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}
.readout-bureau {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--copper);
  white-space: nowrap;
}
.readout-plate {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: 'opsz' 36;
  font-size: 1rem;
  color: var(--warm-gray);
  justify-self: start;
  white-space: nowrap;
}
.readout-lambda {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--warm-gray);
  white-space: nowrap;
  transition: opacity 0.22s ease;
}
.readout-lambda-sym {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: 0;
  color: var(--copper);
  text-transform: none;
  transform: translateY(1px);
}
.readout-counter {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--copper);
  white-space: nowrap;
  transition: opacity 0.22s ease;
}

/* ── Body row (icon · title · notes-in-3-cols) ────────────────────── */
.readout-body {
  display: grid;
  grid-template-columns: 56px minmax(11rem, 14rem) 1fr;
  gap: clamp(1rem, 2vw, 1.5rem);
  align-items: center;
  transition: opacity 0.22s ease;
}
.readout-icon {
  width: 56px;
  height: 56px;
  padding: 6px;
  border: 1px solid var(--ink);
  background: rgba(255, 250, 235, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.readout-icon::before,
.readout-icon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 1px;
  background: var(--copper);
}
.readout-icon::before { top: -1px; left: -1px; }
.readout-icon::after  { bottom: -1px; right: -1px; }
.readout-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  color: var(--ink);
}

.readout-title-block { min-width: 0; }
.readout-code {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 0.25rem;
}
.readout-title {
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: 'opsz' 60, 'SOFT' 60, 'WONK' 0;
  font-size: clamp(1.35rem, 1.6vw, 1.7rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
  /* Reserve two lines so a longer title ("Atmospheric absorption")
     doesn't grow the card. Shorter titles center within the box. */
  min-height: 2lh;
  display: flex;
  align-items: center;
}

.readout-notes {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem 1.5rem;
  align-self: center;
}
.readout-notes li {
  padding: 0 0 0 1.1rem;
  position: relative;
  font-family: var(--body);
  font-size: 0.92rem;
  line-height: 1.3;
  color: var(--ink-soft);
}
.readout-notes li::before {
  content: "◇";
  position: absolute;
  left: 0;
  top: 0.05rem;
  color: var(--copper);
  font-size: 0.7rem;
  line-height: 1.5;
}

/* ── Footer strip ─────────────────────────────────────────────────── */
.readout-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--warm-gray);
  padding-top: 0.55rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--rule);
}

/* Crossfade between bands */
.spectrum-readout.is-changing .readout-body,
.spectrum-readout.is-changing .readout-lambda,
.spectrum-readout.is-changing .readout-counter {
  opacity: 0;
}

/* Narrow viewports: stack icon over title, notes below */
@media (max-width: 860px) {
  .readout-header {
    grid-template-columns: auto 1fr auto;
    gap: 0.8rem 1.25rem;
  }
  .readout-counter { grid-column: 3; }
  .readout-lambda { grid-column: 1 / -1; }
  .readout-body {
    grid-template-columns: 56px 1fr;
    gap: 1rem;
  }
  .readout-notes {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--rule);
  }
}

/* Per-band accent — barely-perceptible warm tint on the card body */
.spectrum-readout[data-band="UV"]   { background: linear-gradient(180deg, rgba(241,234,216,0.78), rgba(220,212,232,0.62)); }
.spectrum-readout[data-band="VIS"]  { background: linear-gradient(180deg, rgba(241,234,216,0.78), rgba(231,222,199,0.78)); }
.spectrum-readout[data-band="NIR"]  { background: linear-gradient(180deg, rgba(241,234,216,0.78), rgba(232,222,199,0.78)); }
.spectrum-readout[data-band="SWIR"] { background: linear-gradient(180deg, rgba(241,234,216,0.78), rgba(232,210,184,0.78)); }
.spectrum-readout[data-band="MWIR"] { background: linear-gradient(180deg, rgba(241,234,216,0.78), rgba(232,200,170,0.78)); }
.spectrum-readout[data-band="ABS"]  { background: linear-gradient(180deg, rgba(241,234,216,0.78), rgba(220,205,195,0.78)); }
.spectrum-readout[data-band="LWIR"] { background: linear-gradient(180deg, rgba(241,234,216,0.78), rgba(210,190,200,0.78)); }

@media (prefers-reduced-motion: reduce) {
  .spectrum-readout.is-changing .readout-band,
  .spectrum-readout.is-changing .readout-notes {
    opacity: 1;
  }
}

/* 3-column prose */
.intro-cols {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  margin-top: clamp(1rem, 3vw, 2rem);
}
@media (max-width: 880px) { .intro-cols { grid-template-columns: 1fr; gap: 2.5rem; } }

.intro-cols .col {
  position: relative;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
.intro-cols .col::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 36px; height: 1px;
  background: var(--copper);
}
.intro-cols .col-label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 1rem;
}
.intro-cols .latin {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.6rem, 2.2vw, 2rem);
  line-height: 1.1;
  color: var(--teal);
  margin-bottom: 1rem;
}
.intro-cols .latin small {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin-top: .6rem;
}
.intro-cols .col-body {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.intro-cols .col-body em { font-style: italic; color: var(--copper); }

/* ---------- Capabilities (plates) ---------- */

.capabilities {
  background: var(--paper-deep);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.capabilities .section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.capabilities .section-head .meta { text-align: right; }
.capabilities .section-head .meta .label { color: var(--copper); }
.capabilities .section-head .meta .count {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--teal);
  display: block;
  margin-top: 0.4rem;
}

.plates {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.5rem, 2.5vw, 2.5rem);
}
.plate {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform .4s ease, box-shadow .4s ease;
}
.plate:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -24px rgba(20,32,44,0.4);
}
.plate .img-frame {
  position: relative;
  overflow: hidden;
  margin-bottom: 1.25rem;
  aspect-ratio: 4/3;
}
.plate .img-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.04) saturate(0.95);
  transition: transform 1.2s ease;
}
.plate:hover .img-frame img { transform: scale(1.04); }
.plate .img-frame .fig {
  position: absolute;
  left: 10px; bottom: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone);
  background: rgba(11,22,34,0.7);
  padding: 4px 8px;
  backdrop-filter: blur(4px);
}
.plate .roman {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--copper);
  margin-bottom: 0.5rem;
}
.plate h3 {
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: 'opsz' 60, 'SOFT' 30;
  font-size: 1.45rem;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}
.plate h3 em { font-style: italic; color: var(--teal); }
.plate p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-soft);
  flex: 1;
}
.plate ul.deliverables {
  list-style: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
}
.plate ul.deliverables li {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm-gray);
  padding: 3px 8px;
  border: 1px solid var(--rule);
  border-radius: 999px;
}

/* asymmetric grid spans */
.plate.s-7 { grid-column: span 7; }
.plate.s-5 { grid-column: span 5; }
.plate.s-6 { grid-column: span 6; }
.plate.s-4 { grid-column: span 4; }
.plate.s-8 { grid-column: span 8; }
.plate.s-12 { grid-column: span 12; }
.plate.tall .img-frame { aspect-ratio: 4/5; }
.plate.wide .img-frame { aspect-ratio: 16/8; }

@media (max-width: 1024px) {
  .plate.s-7, .plate.s-5, .plate.s-6, .plate.s-4, .plate.s-8 { grid-column: span 6; }
  .plate.tall .img-frame { aspect-ratio: 4/3; }
}
@media (max-width: 640px) {
  .plate.s-7, .plate.s-5, .plate.s-6, .plate.s-4, .plate.s-8, .plate.s-12 { grid-column: span 12; }
}

/* ---------- Method (process) ---------- */

.method {
  background: var(--teal-deep);
  color: var(--bone);
  position: relative;
  overflow: hidden;
}
.method::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='800' height='800' viewBox='0 0 800 800'><g fill='none' stroke='%23efe7d8' stroke-width='0.5' opacity='0.08'><path d='M0 200 Q200 140 400 200 T800 220'/><path d='M0 280 Q200 220 400 280 T800 300'/><path d='M0 360 Q200 300 400 360 T800 380'/><path d='M0 440 Q200 380 400 440 T800 460'/><path d='M0 520 Q200 460 400 520 T800 540'/><path d='M0 600 Q200 540 400 600 T800 620'/></g></svg>");
  background-size: cover;
}
.method .container { position: relative; }
.method h2 { color: var(--bone); }
.method h2 em { color: var(--copper); }
.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(3rem, 5vw, 4.5rem);
}
@media (max-width: 880px) { .method-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .method-grid { grid-template-columns: 1fr; } }

.step {
  border-top: 1px solid rgba(239,231,216,0.2);
  padding-top: 1.25rem;
  position: relative;
}
.step .num {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 2.6rem;
  color: var(--copper);
  line-height: 1;
  margin-bottom: 0.8rem;
}
.step h4 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--bone);
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}
.step p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(239,231,216,0.72);
}

/* ---------- Industries ---------- */

.industries {
  background: var(--paper);
}
.industries-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 880px) { .industries-grid { grid-template-columns: 1fr; } }

.industries-list {
  list-style: none;
  border-top: 1px solid var(--rule);
}
.industries-list li {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
  transition: padding .3s ease;
}
.industries-list li:hover {
  padding-left: 0.5rem;
}
.industries-list li:hover .ind-name { color: var(--copper); }
.industries-list .ind-no {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--copper);
}
.industries-list .ind-name {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  color: var(--ink);
  letter-spacing: -0.01em;
  transition: color .25s ease;
}
.industries-list .ind-tags {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warm-gray);
  text-align: right;
}

/* ---------- Field office ---------- */

.field-office {
  background: var(--paper-deep);
  border-top: 1px solid var(--rule);
}
.fo-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
@media (max-width: 880px) { .fo-grid { grid-template-columns: 1fr; } }

.fo-card {
  background: var(--midnight);
  color: var(--bone);
  padding: clamp(2rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule);
}
.fo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600'><g fill='none' stroke='%23c97b3f' stroke-width='0.5' opacity='0.18'><path d='M0 300 Q150 240 300 300 T600 320'/><path d='M0 360 Q150 300 300 360 T600 380'/><path d='M0 420 Q150 360 300 420 T600 440'/><path d='M0 480 Q150 420 300 480 T600 500'/><circle cx='180' cy='220' r='6' fill='%23c97b3f'/></g></svg>");
  background-size: cover;
  opacity: 0.6;
}
.fo-card .inner { position: relative; }
.fo-card .label { color: var(--copper); }
.fo-card h3 {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-top: 0.6rem;
  letter-spacing: -0.02em;
}
.fo-card .coords {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(239,231,216,0.2);
}
.fo-card .coords div .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(239,231,216,0.55);
  display: block;
  margin-bottom: 0.4rem;
}
.fo-card .coords div .v {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--copper);
  letter-spacing: 0.04em;
}

.fo-body h2 { margin-bottom: 1.5rem; }
.fo-body p {
  font-size: clamp(1.02rem, 1.2vw, 1.15rem);
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- CTA ---------- */

.cta {
  background: var(--midnight);
  color: var(--bone);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 110%, rgba(201,123,63,0.30), transparent 60%);
}
.cta .container { position: relative; }
.cta h2 {
  color: var(--bone);
  margin: 0 auto 1.5rem;
  max-width: 18ch;
}
.cta h2 em { color: var(--copper); }
.cta p {
  max-width: 32rem;
  margin: 0 auto 2.5rem;
  color: rgba(239,231,216,0.75);
  font-size: 1.1rem;
  line-height: 1.55;
}
.cta .btn-row {
  display: inline-flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Footer ---------- */

.footer {
  background: var(--teal-deep);
  color: rgba(239,231,216,0.6);
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
  border-top: 1px solid rgba(239,231,216,0.08);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

.footer h5 {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 1rem;
  font-weight: 500;
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 0.55rem; font-size: 0.95rem; }
.footer ul li a { transition: color .25s; }
.footer ul li a:hover { color: var(--copper); }
.footer .brand img.word {
  height: 26px;
  width: auto;
  max-width: none;
  display: block;
  filter: brightness(0) invert(1) opacity(.85);
  margin-bottom: 1rem;
}
.footer .brand p { font-size: 0.95rem; line-height: 1.55; max-width: 22rem; }
.footer .brand .tag {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.15rem;
  color: var(--copper);
  margin-top: 1rem;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(239,231,216,0.1);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(239,231,216,0.45);
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Reveal animations ---------- */

.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .9s ease, transform .9s ease;
  transition-delay: var(--delay, 0s);
}
.reveal.is-observed {
  opacity: 0;
  transform: translateY(20px);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .tickertape-inner { animation: none; }
}

/* ---------------------------------------------------------
   Field Notes — blog index + post
   --------------------------------------------------------- */

.blog-index { padding-top: clamp(3.5rem, 7vw, 6rem); }
.blog-title {
  font-size: clamp(3rem, 8vw, 6.5rem);
  margin-top: 1.25rem;
}
.blog-title .amp { font-style: italic; color: var(--copper); }
.blog-title .roman { font-style: normal; }

.blog-lede {
  max-width: 42rem;
  margin-top: 1.5rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.post-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.post-card {
  border-bottom: 1px solid var(--rule);
}
.post-card-link {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: clamp(1.5rem, 3vw, 2.25rem) 0;
  transition: padding-left .3s ease;
}
.post-card-link:hover {
  padding-left: 0.75rem;
}
.post-card-link:hover .post-card-title { color: var(--copper); }
.post-card-link:hover .post-card-cta .arrow { transform: translateX(4px); }

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm-gray);
}
.post-card-meta .roman { color: var(--copper); }

.post-card-title {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: 'opsz' 80, 'SOFT' 40;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
  transition: color .25s ease;
}

.post-card-desc {
  font-family: var(--body);
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 48rem;
}

.post-card-cta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
.post-card-cta .arrow { transition: transform .25s ease; display: inline-block; }

.post-empty {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.4rem;
  color: var(--warm-gray);
  padding: 3rem 0;
}

.feed-link {
  margin-top: clamp(2rem, 4vw, 3rem);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm-gray);
}
.feed-link a { color: var(--copper); border-bottom: 1px solid currentColor; }

/* ---------- Single post ---------- */

.post {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 7rem);
}
.post-container { max-width: 48rem; }

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.post-back {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm-gray);
  transition: color .25s ease;
}
.post-back:hover { color: var(--copper); }

.post-title {
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: 'opsz' 120, 'SOFT' 60;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.post-lede {
  margin-top: 1.5rem;
  max-width: 38rem;
}

.post-byline {
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm-gray);
}
.post-byline .kicker { color: var(--copper); }
.post-byline time { color: var(--warm-gray); }

.post-rule {
  margin: clamp(2rem, 4vw, 3rem) 0;
}

/* Markdown-rendered prose */
.post-body {
  font-family: var(--body);
  font-size: 1.075rem;
  line-height: 1.65;
  color: var(--ink);
}
.post-body > * + * { margin-top: 1.25em; }
.post-body p { max-width: 38rem; }
.post-body em { font-style: italic; color: var(--copper); }
.post-body strong { font-weight: 500; color: var(--ink); }
.post-body a {
  color: var(--teal);
  border-bottom: 1px solid var(--rule);
  transition: color .2s ease, border-color .2s ease;
}
.post-body a:hover { color: var(--copper); border-bottom-color: var(--copper); }
.post-body h2 {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: 'opsz' 60, 'SOFT' 40;
  font-size: clamp(1.6rem, 3vw, 2.05rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-top: 2.25em;
}
.post-body h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.2;
  color: var(--ink);
  margin-top: 2em;
}
.post-body h4 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper);
  margin-top: 2em;
}
.post-body h2 .anchor,
.post-body h3 .anchor,
.post-body h4 .anchor { color: inherit; }

.post-body ul, .post-body ol { padding-left: 1.5em; }
.post-body li { margin-top: 0.4em; max-width: 38rem; }
.post-body li::marker { color: var(--copper); }

.post-body blockquote {
  border-left: 2px solid var(--copper);
  padding: 0.25em 0 0.25em 1.25em;
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 38rem;
}

.post-body code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--paper-deep);
  padding: 0.1em 0.35em;
  border-radius: 2px;
  color: var(--teal-deep);
}
.post-body pre {
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.55;
  background: var(--midnight);
  color: var(--bone);
  padding: 1.25em 1.4em;
  border-radius: 3px;
  overflow-x: auto;
  max-width: 100%;
}
.post-body pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.post-body hr {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 2.5em 0;
}

.post-body img {
  margin: 2em 0;
  border: 1px solid var(--rule);
  max-width: 100%;
}

.post-body figure { margin: 2em 0; }
.post-body figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin-top: 0.6em;
}

.post-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: clamp(2rem, 4vw, 3rem);
}

/* ---------------------------------------------------------
   Site manual / README
   --------------------------------------------------------- */

.readme-hero {
  background: var(--midnight);
  color: var(--bone);
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 7rem);
  overflow: hidden;
  isolation: isolate;
}
.readme-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='760' height='760' viewBox='0 0 760 760'><g fill='none' stroke='%23c97b3f' stroke-width='0.55' opacity='0.15'><path d='M40 260 Q190 205 360 258 T720 268'/><path d='M40 335 Q190 280 360 333 T720 343'/><path d='M40 410 Q190 355 360 408 T720 418'/><path d='M40 485 Q190 430 360 483 T720 493'/></g></svg>");
  background-size: 1100px 1100px;
  background-position: 65% 25%;
  background-repeat: no-repeat;
  z-index: -1;
}
.readme-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.55fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}
.readme-hero h1.display {
  color: var(--bone);
  font-size: clamp(3rem, 8vw, 7.2rem);
  font-weight: 300;
  line-height: 0.94;
}
.readme-hero h1 .roman { font-style: normal; }
.readme-hero h1 .amp { color: var(--copper); }
.readme-spec {
  border-top: 1px solid rgba(239,231,216,0.2);
  padding-top: 1.25rem;
  color: rgba(239,231,216,0.72);
}
.readme-spec .label { color: var(--copper); }
.readme-spec dl { margin-top: 1.25rem; }
.readme-spec div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(239,231,216,0.11);
}
.readme-spec dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.readme-spec dd { color: var(--bone); }

.readme-section { padding: clamp(4rem, 7vw, 6rem) 0; }
.readme-band {
  background: var(--paper-deep);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.readme-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.readme-rail {
  position: sticky;
  top: 6rem;
  min-width: 0;
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
}
.readme-rail p {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.6;
}
.readme-prose {
  min-width: 0;
  max-width: 46rem;
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
}
.readme-prose > * + * { margin-top: 1.25rem; }
.readme-prose h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 450;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.readme-prose h3 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper);
  margin-top: 2rem;
}
.readme-prose code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--paper-deep);
  color: var(--teal-deep);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}
.readme-band .readme-prose code { background: var(--paper); }
.readme-prose pre {
  background: var(--midnight);
  color: var(--bone);
  overflow-x: auto;
  padding: 1.2rem 1.35rem;
  border-radius: 3px;
  border: 1px solid rgba(20,32,44,0.18);
}
.readme-prose pre code,
.readme-band .readme-prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 0.88rem;
  border-radius: 0;
}
.readme-prose ul { padding-left: 1.25rem; }
.readme-prose li { margin-top: 0.5rem; }
.readme-prose li::marker { color: var(--copper); }
.readme-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.readme-map div {
  border-top: 1px solid var(--rule);
  padding-top: 0.75rem;
}
.readme-map b {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 0.45rem;
}
.readme-callout {
  border-left: 2px solid var(--copper);
  padding-left: 1.25rem;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

@media (max-width: 860px) {
  .readme-hero-grid,
  .readme-layout,
  .readme-map {
    grid-template-columns: 1fr;
  }
  .readme-rail { position: static; }
}

/* ---------- Floating index (book-style table of contents) ---------- */

.readme-toc {
  display: none;
}

@media (min-width: 1280px) {
  .readme-toc {
    display: block;
    position: fixed;
    top: 110px;
    left: clamp(1.25rem, 2vw, 2rem);
    width: 15.5rem;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    padding: 1.5rem 1.25rem 1.25rem;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    background:
      linear-gradient(
        180deg,
        rgba(241,234,216,0.92) 0%,
        rgba(241,234,216,0.86) 100%
      );
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 30;
    scrollbar-width: none;
  }
  .readme-toc::-webkit-scrollbar { display: none; }

  /* Shift the readme content rightward to clear the floating index.
     The reserved gutter = TOC offset (clamp 1.25–2rem) + TOC width (15.5rem)
     + a breathing gap (1.5rem), so prose never sits underneath the index. */
  .readme-hero .container,
  .readme-section .container {
    padding-left: max(var(--gutter), 18.5rem);
  }
}

.readme-toc-eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--copper);
  text-align: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--rule);
}

.readme-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
}

.readme-toc-list li {
  margin: 0;
  padding: 0;
}

.readme-toc-list a {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.42rem 0.1rem 0.42rem 0.1rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  transition: color .25s ease, border-color .25s ease, padding-left .25s ease;
}

.readme-toc-list a:hover {
  color: var(--copper);
  border-bottom-color: var(--rule);
  padding-left: 0.4rem;
}

.readme-toc-list a.is-active {
  color: var(--ink);
  padding-left: 0.4rem;
}
.readme-toc-list a.is-active::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 1px;
  background: var(--copper);
  transform: translate(-22px, 0.7em);
}
.readme-toc-list li { position: relative; }

.readme-toc-list .num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
  text-align: right;
  font-feature-settings: "tnum" 1;
  padding-right: 0.4rem;
  border-right: 1px solid var(--rule);
}

.readme-toc-list a.is-active .num {
  color: var(--copper-bright);
}

.readme-toc-list .title {
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: 'opsz' 24, 'SOFT' 40, 'WONK' 0;
  font-size: 1.02rem;
  line-height: 1.18;
  letter-spacing: -0.005em;
  color: inherit;
}

.readme-toc-list a.is-active .title {
  font-style: italic;
  color: var(--ink);
}

.readme-toc-foot {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--warm-gray);
  text-align: center;
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--rule);
}
.readme-toc-foot a {
  color: var(--copper);
  border-bottom: 1px solid currentColor;
  transition: color .2s;
}
.readme-toc-foot a:hover { color: var(--copper-bright); }
