/* ============================================================
   UNDERDOG AI STUDIO — "THE SCHEMATIC" (palette P4)
   An engineering drawing of a company, marked up by hand.
   Paper / graphite / spruce / fluoro. The drawing is printed;
   the markup is human: pencil strikes + highlighter swipes.
   ============================================================ */

:root {
  --paper: #FCFCFA;
  --grid: rgba(14, 95, 85, 0.075);
  --ink: #1B1B19;
  --ink-soft: #45443F;
  --muted: #7C7A72;
  --hairline: #E0DFD8;
  --spruce: #0E5F55;
  --spruce-deep: #0A4A42;
  --spruce-wash: rgba(14, 95, 85, 0.07);
  --fluoro: #E9F73E;
  --pencil: #2E2B27;

  --font-display: "Archivo", "Helvetica Neue", sans-serif;
  --font-body: "Archivo", "Helvetica Neue", sans-serif;
  --font-mono: "Martian Mono", "SFMono-Regular", Menlo, monospace;

  --measure: 36em;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section-pad: clamp(4rem, 9vw, 7.5rem);
}

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

html { scroll-behavior: smooth; }

body {
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px, 24px 24px, auto;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.03rem;
  line-height: 1.62;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--fluoro); color: var(--ink); }

img { max-width: 100%; display: block; }
a { color: inherit; }
p { max-width: var(--measure); }
p + p { margin-top: 1em; }
.muted { color: var(--muted); }

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

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: -0.01em;
  font-variation-settings: "wdth" 118;
}

/* The 2rem floor keeps single long words like "HEADCOUNT." inside a
   320px viewport; the 7vw slope is unchanged, so nothing moves above ~460px. */
.h-xxl { font-size: clamp(2rem, 7vw, 5.6rem); }
.h-xl  { font-size: clamp(2rem, 4.8vw, 3.6rem); }
.h-lg  { font-size: clamp(1.5rem, 3.2vw, 2.3rem); line-height: 1.05; }
.h-md  { font-size: clamp(1.2rem, 2.2vw, 1.55rem); line-height: 1.12; }

/* Spruce emphasis inside headings (was italic serif; now drafting ink) */
.em {
  font-style: normal;
  color: var(--spruce);
}
.fix { color: var(--spruce); }

.mono, .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

.eyebrow {
  color: var(--spruce);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: var(--spruce);
  flex: none;
}

.lede {
  font-size: clamp(1.05rem, 1.7vw, 1.26rem);
  line-height: 1.58;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.statement {
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: "wdth" 110;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  max-width: 22em;
}

/* ---------- Hand-drawn markup layer ----------
   main.js injects rough SVG strokes into .strike / .uline /
   .circle and the arrow into .rev-note. CSS below is both the
   layout for those SVGs and the no-JS fallback. */

/* No-JS fallbacks live on the phrase itself. */
.uline {
  background-image: linear-gradient(to top, rgba(233, 247, 62, 0.75) 0.5em, transparent 0.5em);
}
.uline.js-marked { background-image: none; }

/* Struck text is allowed to wrap: on a narrow screen "Hire more people."
   is wider than the viewport, and main.js strikes each line separately. */
.strike { text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: var(--pencil); }
.strike.js-marked { text-decoration: none; }

/* A circled word reads as a mistake when it splits across two lines. */
.circle { white-space: nowrap; }

/* One layer per line box, sized and placed by main.js. */
.ud-mark {
  position: absolute;
  display: block;
  line-height: 1;
  pointer-events: none;
}
.ud-mark > svg { position: absolute; overflow: visible; }
/* Set while a resize is settling, so stale strokes don't sit across the text. */
.ud-remarking .ud-mark { opacity: 0; }

.ud-mark--uline { z-index: -1; }
.ud-mark--uline > svg { left: -2%; width: 104%; bottom: 0.16em; height: 0.84em; }
.ud-mark--uline > svg path { fill: var(--fluoro); opacity: 0.85; }

.ud-mark--strike > svg {
  left: -2.5%; width: 105%;
  top: 50%; height: 0.42em; transform: translateY(-46%) rotate(-1.6deg);
}
.ud-mark--strike > svg path { stroke: var(--pencil); fill: none; stroke-linecap: round; }

.ud-mark--circle > svg { left: -9%; top: -22%; width: 118%; height: 144%; }
.ud-mark--circle > svg path { stroke: var(--pencil); fill: none; stroke-linecap: round; }

.rev-note {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--pencil);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: none;
}
.rev-note > svg.arrow-mark { width: 1.5rem; height: 2.7rem; overflow: visible; flex: none; align-self: flex-start; margin-top: -1.5rem; }
.rev-note > svg.arrow-mark path { stroke: var(--pencil); fill: none; stroke-linecap: round; stroke-width: 2.2; }

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

.wrap {
  max-width: 78rem;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section { padding-top: var(--section-pad); padding-bottom: var(--section-pad); }

.rule-top { border-top: 1px solid var(--hairline); }

/* Section head = drafting callout: [DETAIL 01] ————————▸ */
.section-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-top: 0;
  padding-top: 0;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-head .num {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--paper);
  background: var(--ink);
  padding: 0.4rem 0.75rem;
  text-transform: uppercase;
}
.section-head .label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--spruce);
  flex: 1;
  position: relative;
  padding-left: 1rem;
}
.section-head .label::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 0.5rem; height: 1px;
  background: var(--spruce);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252, 252, 250, 0.92);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  border-bottom: 1.5px solid var(--ink);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  gap: 1rem;
}

.wordmark {
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  white-space: nowrap;
}
.wordmark .wm-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: normal;
  text-transform: uppercase;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  font-variation-settings: "wdth" 125;
}
.wordmark .wm-name::after {
  content: "*";
  color: var(--spruce);
  margin-left: 0.05em;
}
.wordmark .wm-tag {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  list-style: none;
}
.nav-links a:not(.btn) {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 2px solid transparent;
  padding-bottom: 0.1em;
}
.nav-links a:not(.btn):hover { border-bottom-color: var(--fluoro); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--spruce); }

/* ---------- Mobile nav: toggle + panel ---------- */

/* Revealed only once main.js has run, so a dead button never ships. */
.nav-toggle-li { display: none; }
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 3px 3px 0 rgba(27, 27, 25, 0.16);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nav-toggle:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(27, 27, 25, 0.16); }
.nav-toggle-box { position: relative; display: block; width: 18px; height: 14px; }
.nav-toggle .bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.15s ease;
}
.nav-toggle .bar:nth-child(1) { top: 0; }
.nav-toggle .bar:nth-child(2) { top: 6px; }
.nav-toggle .bar:nth-child(3) { top: 12px; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Hangs off the bottom of the sticky header, which is its containing block. */
.nav-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px, 24px 24px, auto;
  border-bottom: 1.5px solid var(--ink);
  max-height: calc(100vh - var(--nav-h, 4.5rem));
  max-height: calc(100dvh - var(--nav-h, 4.5rem));
  overflow-y: auto;
  animation: navPanelIn 0.22s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.nav-panel[hidden] { display: none; }
@keyframes navPanelIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}
.nav-panel-inner { padding-top: 1.5rem; padding-bottom: 2rem; }
.nav-panel-cta { width: 100%; justify-content: center; }

.nav-panel-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--spruce);
  margin: 1.75rem 0 0.6rem;
  max-width: none;
}
.nav-panel-list { list-style: none; border-top: 1.5px solid var(--ink); }
.nav-panel-list li { border-bottom: 1px solid var(--hairline); }
.nav-panel-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: "wdth" 108;
  text-transform: uppercase;
  font-size: 1rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.nav-panel-list a::after {
  content: "→";
  flex: none;
  color: var(--spruce);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.nav-panel-list a[aria-current="page"] { color: var(--spruce); }

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 90; /* under .nav (100), so the panel stays above it */
  background: rgba(27, 27, 25, 0.38);
}
.nav-scrim[hidden] { display: none; }
html.nav-open { overflow: hidden; }

@media (max-width: 720px) {
  .wordmark .wm-tag { display: none; }
  /* Thumb-sized target (~44px) on the logo. */
  .wordmark { padding: 0.5rem 0; }
  /* Without JS the links stay visible and wrap instead of overflowing. */
  .nav-links { flex-wrap: wrap; justify-content: flex-end; }
  /* At 320px the wordmark and the CTA alone fill the bar, so on phones
     everything moves into the panel and only the toggle stays out here. */
  .has-js .nav-links > li:not(.nav-toggle-li) { display: none; }
  .has-js .nav-toggle-li { display: flex; }
}

/* Desktop keeps the full link row; the panel is mobile-only. */
@media (min-width: 721px) {
  .nav-panel, .nav-scrim { display: none !important; }
}

/* ---------- Buttons: drafting stamps ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: none;
  padding: 0.9rem 1.4rem;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 3px 3px 0 rgba(27, 27, 25, 0.16);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 rgba(27, 27, 25, 0.16); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(27, 27, 25, 0.16); }

.btn-primary {
  background: var(--spruce);
  border-color: var(--spruce);
  color: var(--paper);
}
.btn-primary:hover { background: var(--spruce-deep); border-color: var(--spruce-deep); }

.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--spruce); border-color: var(--spruce); }

.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-sm { padding: 0.55rem 1rem; font-size: 0.64rem; }

/* On spruce/dark bands */
.on-dark .btn { border-color: var(--paper); color: var(--paper); background: transparent; box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.25); }
.on-dark .btn-primary { background: var(--fluoro); border-color: var(--fluoro); color: var(--ink); }
.on-dark .btn-primary:hover { background: var(--paper); border-color: var(--paper); color: var(--spruce-deep); }

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

.hero { padding-top: clamp(3.5rem, 8vw, 6.5rem); padding-bottom: clamp(3.5rem, 8vw, 6.5rem); }

.hero h1 { max-width: 13em; }
.hero .lede { margin-top: 1.75rem; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.25rem;
}

/* Proofline = dimension line: ⊢ stat ⊢ stat ⊢ */
.proofline {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-top: 0;
  border-top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--spruce);
  align-items: center;
}
.proofline span { display: inline-flex; align-items: center; }
.proofline span::before {
  content: "⊢";
  color: var(--spruce);
  margin: 0 1.1rem 0 0;
  opacity: 0.85;
}
.proofline span:first-child::before { margin-left: 0; }
.proofline span { margin-right: 1.1rem; }
.proofline strong { color: var(--ink); font-weight: 700; margin-right: 0.4em; }

/* ---------- Ticker ---------- */

.ticker {
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  overflow: hidden;
  padding: 0.8rem 0;
  white-space: nowrap;
  background: var(--paper);
}
.ticker-track {
  display: inline-flex;
  gap: 3.5rem;
  animation: ticker 42s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.ticker-track .dot { color: var(--spruce); }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Spec sheet (vs-grid): as found / as built ---------- */

.vs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
  gap: 0;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  margin-top: clamp(2.5rem, 6vw, 4rem);
}
.vs-cell { background: var(--paper); padding: clamp(1.5rem, 3.5vw, 2.5rem); }
.vs-cell + .vs-cell { border-left: 1.5px solid var(--ink); }
@media (max-width: 720px) { .vs-cell + .vs-cell { border-left: 0; border-top: 1.5px solid var(--ink); } }
.vs-cell.is-enemy {
  background: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(46, 43, 39, 0.035) 14px 16px), var(--paper);
}
.vs-cell .mono { display: block; margin-bottom: 1.25rem; }
.vs-cell.is-enemy .mono { color: var(--pencil); }
.vs-cell.is-us .mono { color: var(--spruce); }
.vs-cell ul { list-style: none; }
.vs-cell li {
  padding: 0.7rem 0;
  border-top: 1px solid var(--hairline);
  font-size: 0.97rem;
}
.vs-cell.is-enemy li { color: var(--ink-soft); }
.vs-cell.is-enemy li::before { content: "✕ "; color: var(--pencil); font-family: var(--font-mono); font-size: 0.8em; }
.vs-cell.is-us li::before { content: "▸ "; color: var(--spruce); font-family: var(--font-mono); font-size: 0.8em; }

/* ---------- Schematic org chart (seats) ---------- */

.seats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(10.5rem, 45%), 1fr));
  gap: 1rem;
  background: transparent;
  border: 1.5px solid var(--ink);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-top: clamp(2.5rem, 6vw, 4rem);
  position: relative;
}
.seats::before {
  content: "FIG. 1 — ACCOUNTABILITY CHART, AS BUILT";
  position: absolute;
  top: -0.65rem;
  left: 1.25rem;
  background: var(--paper);
  padding: 0 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--spruce);
}
.seat {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  padding: 0.95rem 1rem;
  min-height: 7.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.6rem;
  transition: background 0.2s ease;
}
.seat .seat-kind {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.seat .seat-kind::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--ink);
  flex: none;
}
.seat .seat-role {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-variation-settings: "wdth" 112;
  font-size: 0.95rem;
  line-height: 1.15;
}
.seat.is-agent { border-style: dashed; border-color: var(--spruce); }
.seat.is-agent .seat-kind { color: var(--spruce); }
.seat.is-agent .seat-kind::before { border-radius: 1px; background: var(--spruce); }
.seat.is-agent:hover { background: var(--spruce-wash); }
.seat .seat-role .em { font-size: 0.85em; }

/* Role names are single long words in extra-wide uppercase ("ONBOARDING",
   "OPERATIONS"). In a half-width card on a phone they run past the padding
   and touch the border, so tighten the boxes and the type to match. */
@media (max-width: 460px) {
  .seats { padding: 1.1rem 0.65rem; gap: 0.75rem; }
  .seat { padding: 0.85rem 0.8rem; min-height: 6.5rem; }
  .seat .seat-role { font-size: 0.8rem; }
}
/* Below this no two-column card is wide enough for those words. */
@media (max-width: 340px) {
  .seats { grid-template-columns: 1fr; }
}

.chart-caption {
  margin-top: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.9;
  color: var(--pencil);
  max-width: 56em;
}

/* ---------- Offer ladder = parts list ---------- */

.ladder {
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--ink);
  background: var(--paper);
}
.rung {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: center;
  padding: clamp(1.5rem, 3.2vw, 2.25rem);
  border-top: 0;
  text-decoration: none;
  transition: background 0.2s ease;
}
.rung + .rung { border-top: 1.5px solid var(--ink); }
.rung:last-child { border-bottom: 0; }
.rung:hover { background: var(--spruce-wash); }

.rung .rung-num {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--spruce);
  padding-top: 0;
  text-transform: uppercase;
}
.rung .rung-num::before { content: "PART UD-0"; }
.rung h3 { font-size: clamp(1.3rem, 3vw, 2.1rem); }
.rung .rung-sub { margin-top: 0.6rem; color: var(--ink-soft); max-width: 32em; font-size: 0.97rem; }
.rung .rung-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-end;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.rung .rung-meta .price { color: var(--ink); font-weight: 700; font-size: 0.78rem; }
.rung .rung-go {
  margin-top: 0.9rem;
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--spruce);
}
.rung:hover .rung-go .arrow { transform: translateX(4px); }
.rung .arrow { display: inline-block; transition: transform 0.2s ease; }

@media (max-width: 720px) {
  .rung { grid-template-columns: 1fr; }
  /* Each item is nowrap, so the row itself has to wrap — otherwise
     "After the Sprint · ongoing $4,000/mo" widens the whole page. */
  .rung .rung-meta { flex-direction: row; flex-wrap: wrap; gap: 0.35rem 1.25rem; align-items: baseline; text-align: left; }
}

/* ---------- Operator (about) ---------- */

.operator {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 820px) { .operator { grid-template-columns: 1fr; } }

.portrait {
  border: 1.5px solid var(--ink);
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px, 24px 24px, auto;
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait .portrait-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
}
.portrait .portrait-fallback .glyph {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: normal;
  text-transform: uppercase;
  font-size: clamp(5rem, 12vw, 8.5rem);
  color: var(--spruce);
  line-height: 0.9;
  font-variation-settings: "wdth" 125;
  align-self: center;
}
.portrait .portrait-fallback .mono { color: var(--muted); }

.credo { list-style: none; margin-top: 2rem; border-top: 1.5px solid var(--ink); }
.credo li {
  border-top: 0;
  border-bottom: 1px solid var(--hairline);
  padding: 1rem 0;
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1.25rem;
  align-items: baseline;
}
.credo .stat {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-variation-settings: "wdth" 118;
  font-size: 1.4rem;
  color: var(--spruce);
  white-space: nowrap;
}
.credo p { font-size: 0.95rem; color: var(--ink-soft); }

.pull {
  border-left: 3px solid var(--fluoro);
  padding-left: 1.5rem;
  margin-top: 2.5rem;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  font-variation-settings: "wdth" 108;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  max-width: 26em;
}

/* ---------- Bands (mentor + CTA): spruce field ---------- */

.band {
  background:
    linear-gradient(rgba(252, 252, 250, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(252, 252, 250, 0.05) 1px, transparent 1px),
    var(--spruce-deep);
  background-size: 24px 24px, 24px 24px, auto;
  color: var(--paper);
}
.band .eyebrow { color: var(--fluoro); }
.band .eyebrow::before { background: var(--fluoro); }
.band .lede { color: rgba(252, 252, 250, 0.78); }
.band h2 .em, .band .em { color: var(--fluoro); }

.band-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 820px) { .band-grid { grid-template-columns: 1fr; } }

.rule-list { list-style: none; }
.rule-list li {
  border-top: 1px solid var(--hairline);
  padding: 0.9rem 0;
  display: flex;
  gap: 1rem;
  align-items: baseline;
  font-size: 0.97rem;
}
.band .rule-list li { border-color: rgba(252, 252, 250, 0.22); color: rgba(252, 252, 250, 0.88); }
.rule-list .tick {
  font-family: var(--font-mono);
  color: var(--spruce);
  font-size: 0.75rem;
  flex: none;
}
.band .rule-list .tick { color: var(--fluoro); }

/* ---------- FAQ ---------- */

.faq { max-width: 46rem; border: 1.5px solid var(--ink); background: var(--paper); }
.faq details { border-top: 0; }
.faq details + details { border-top: 1.5px solid var(--ink); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.2rem clamp(1.1rem, 2.5vw, 1.75rem);
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: "wdth" 108;
  text-transform: none;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.3;
  transition: color 0.2s ease, background 0.2s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--spruce);
  font-size: 1rem;
  flex: none;
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { background: var(--spruce-wash); }
.faq .faq-a { padding: 0 clamp(1.1rem, 2.5vw, 1.75rem) 1.5rem; color: var(--ink-soft); max-width: none; }
.faq .faq-a p { max-width: 40em; }
.faq .faq-a p + p { margin-top: 0.75em; }
.faq .faq-a a { color: var(--spruce); font-weight: 600; }

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

.cta-band h2 { max-width: 13em; }
.cta-band .lede { margin-top: 1.5rem; }
.cta-band .hero-cta { margin-top: 2.25rem; }

/* ---------- Footer: the title block ---------- */

footer {
  border-top: 2px solid var(--ink);
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px, 24px 24px, auto;
  color: var(--ink);
  padding-top: clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}
.foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  gap: 2.5rem;
  padding-bottom: 3rem;
}
.foot-grid .mono { color: var(--spruce); display: block; margin-bottom: 1rem; }
.foot-grid ul { list-style: none; }
.foot-grid li { padding: 0.3rem 0; }
.foot-grid a { text-decoration: none; color: var(--ink-soft); font-size: 0.93rem; font-weight: 500; }
.foot-grid a:hover { color: var(--spruce); }
.foot-note { color: var(--muted); font-size: 0.85rem; max-width: 26em; }

.foot-wordmark {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
  /* The 3rem floor overrode the vw term below ~420px and pushed the spruce
     asterisk off-screen, where footer's overflow:hidden ate it. The wordmark
     is meant to run into the gutter, not past the edge. */
  font-size: clamp(2.2rem, 11.5vw, 9.5rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  white-space: nowrap;
  font-variation-settings: "wdth" 125;
  color: var(--ink);
  padding-bottom: 1.5rem;
}
.foot-wordmark span { color: var(--spruce); }

/* Title-block strip */
.foot-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0;
  border: 1.5px solid var(--ink);
  border-bottom: 0;
  margin-bottom: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.foot-legal span {
  padding: 0.9rem 1.25rem;
  flex: 1 1 auto;
}
.foot-legal span + span {
  border-left: 1.5px solid var(--ink);
  text-align: right;
  color: var(--spruce);
}

/* Stacked on mobile, so the divider belongs on top and the text stays left. */
@media (max-width: 640px) {
  .foot-legal span + span {
    border-left: 0;
    border-top: 1.5px solid var(--ink);
    text-align: left;
  }
  .foot-grid li { padding: 0; }
  .foot-grid a { display: inline-block; padding: 0.9rem 0; }
}

/* ---------- Page hero (interior pages) ---------- */

.page-hero { padding-top: clamp(3rem, 7vw, 5.5rem); padding-bottom: clamp(2.75rem, 6vw, 5rem); }
.page-hero h1 { max-width: 13em; }
.page-hero .lede { margin-top: 1.6rem; }
.page-hero .page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0;
  margin-top: 2.1rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--spruce);
  align-items: center;
}
.page-hero .page-meta span { display: inline-flex; align-items: center; margin-right: 1.1rem; }
.page-hero .page-meta span::before { content: "⊢"; margin-right: 1.1rem; opacity: 0.85; }
.page-hero .page-meta strong { color: var(--ink); font-weight: 700; margin-right: 0.4em; }

/* ---------- Steps ---------- */

.steps { counter-reset: step; list-style: none; border: 1.5px solid var(--ink); background: var(--paper); }
.steps li {
  border-top: 0;
  padding: clamp(1.4rem, 3vw, 1.9rem) clamp(1.1rem, 2.5vw, 1.75rem);
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
}
.steps li + li { border-top: 1.5px solid var(--ink); }
.steps li::before {
  counter-increment: step;
  content: "OP " counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--spruce);
  padding-top: 0.4rem;
}
.steps h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.steps p { color: var(--ink-soft); max-width: 38em; font-size: 0.97rem; }
.steps a { color: var(--spruce); font-weight: 600; }

/* ---------- Deliverables grid ---------- */

.deliv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: 1rem;
  background: transparent;
  border: 0;
}
.deliv-cell {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  padding: 1.6rem 1.4rem;
  box-shadow: 3px 3px 0 rgba(27, 27, 25, 0.1);
}
.deliv-cell .mono { color: var(--spruce); display: block; margin-bottom: 0.9rem; }
.deliv-cell h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.deliv-cell p { font-size: 0.93rem; color: var(--ink-soft); }

/* ---------- Price block ---------- */

.price-block {
  border: 1.5px solid var(--ink);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  background: var(--paper);
  box-shadow: 4px 4px 0 rgba(14, 95, 85, 0.18);
}
@media (max-width: 640px) { .price-block { grid-template-columns: 1fr; } }
.price-block .price {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-variation-settings: "wdth" 118;
  font-size: clamp(1.8rem, 4.4vw, 2.8rem);
  letter-spacing: -0.01em;
}
.price-block .price .mono { color: var(--muted); font-weight: 500; }
.price-block p { color: var(--ink-soft); font-size: 0.95rem; }
.price-block a:not(.btn) { color: var(--spruce); font-weight: 600; }

/* ---------- Cal embed ---------- */

.cal-shell {
  border: 1.5px solid var(--ink);
  background: #FFFFFF;
  min-height: 40rem;
  position: relative;
  box-shadow: 4px 4px 0 rgba(27, 27, 25, 0.12);
}
.cal-shell .cal-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.book-choice {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.book-choice .chip {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.7rem 1.2rem;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(27, 27, 25, 0.14);
  transition: all 0.15s ease;
}
.book-choice .chip[aria-selected="true"] {
  border-color: var(--spruce);
  background: var(--spruce);
  color: var(--paper);
}
.book-choice .chip:hover:not([aria-selected="true"]) { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(27, 27, 25, 0.14); }

/* These two switch the calendar, so they need a full thumb target on phones. */
@media (max-width: 720px) {
  .book-choice .chip { padding: 0.95rem 1.2rem; }
}

/* ---------- Newsletter signup ---------- */

.subscribe {
  background: var(--paper);
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
}
.subscribe-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 820px) { .subscribe-grid { grid-template-columns: 1fr; } }

.sub-form { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.sub-form input[type="email"] {
  flex: 1 1 16rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  padding: 0.9rem 1.15rem;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  background: #FFFFFF;
  color: var(--ink);
  outline: none;
  box-shadow: 2px 2px 0 rgba(27, 27, 25, 0.1) inset;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.sub-form input[type="email"]:focus { border-color: var(--spruce); box-shadow: 0 0 0 3px var(--spruce-wash); }
.sub-form input[type="email"]::placeholder { color: var(--muted); }
.sub-note {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.07s; }
.reveal-d2 { transition-delay: 0.14s; }
.reveal-d3 { transition-delay: 0.21s; }

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