/* =========================================================
   The Dots Company. — poster site
   Six-slot color system: accent, light/dark bg, light/dark ink, form bg.
   The signature: a corner mini-graph that grows as you scroll.
   ========================================================= */

:root {
  /* Six-slot palette — edit these to retheme the whole site. */
  --accent:    #f958e3;     /* primary accent (buttons, marks) */
  --bg-light:  #c2dcff;     /* page background */
  --bg-dark:   #3b2d26;     /* inverted surfaces (CTAs, panels, code, chips) */
  --ink-light: #f2c4ec;     /* text on dark surfaces */
  --ink-dark:  #2f1b14;     /* text on light surfaces */
  --bg-form:   #f7f0c5;     /* form input backgrounds */

  /* Derived from the six slots — keep in sync if you swap colors. */
  --mute: color-mix(in srgb, var(--ink-dark) 55%, var(--bg-light));
  --rule: color-mix(in srgb, var(--ink-dark) 18%, var(--bg-light));

  --grot: "Bricolage Grotesque", "Helvetica Neue", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1480px;
  --pad: clamp(1.25rem, 3vw, 2.5rem);

  --ease: cubic-bezier(.2,.8,.2,1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg-light);
  color: var(--ink-dark);
  font-family: var(--grot);
  font-variation-settings: "opsz" 18, "wdth" 100, "wght" 420;
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01" 1, "kern" 1;
  overflow-x: hidden;
  cursor: none;     /* hide native — we draw a big arrow */
}
@media (hover: none) and (pointer: coarse) {
  body { cursor: auto; }
  #cursor { display: none; }
}
button, a, input, select, textarea, [role="button"] { cursor: none; }
@media (hover: none) and (pointer: coarse) {
  button, a, input, select, textarea, [role="button"] { cursor: auto; }
}


/* =========================================================
   Big arrow cursor — the signature pointer
   ========================================================= */

#cursor {
  position: fixed;
  top: 0; left: 0;
  width: 0; height: 0;
  pointer-events: none;
  z-index: 999;
  transform: translate3d(-100px, -100px, 0);
  will-change: transform;
}
.cursor-svg {
  width: 44px !important;
  height: 60px !important;
  max-width: none !important;
  margin: -8px 0 0 -8px;
  display: block;
  filter: drop-shadow(0 6px 12px rgba(11,11,16,0.18));
  transition: transform .2s var(--ease);
  transform-origin: 8px 8px;
}
body[data-cursor="link"] .cursor-svg { transform: scale(1.18) rotate(-6deg); }
body[data-cursor="link"] .cursor-tip { fill: var(--ink-light); }
::selection { background: var(--bg-dark); color: var(--accent); }

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
em, i { font-style: italic; }

.skip {
  position: absolute; left: -9999px;
  background: var(--bg-dark); color: var(--accent);
  padding: .5rem .75rem;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 999; }


/* =========================================================
   Masthead — minimal poster credits
   ========================================================= */

.masthead {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 1rem var(--pad);
  max-width: 100vw;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(to bottom, var(--bg-light) 60%, transparent);
}

.brand {
  display: inline-flex; align-items: baseline; gap: 0;
  color: var(--ink-dark);
  font-family: var(--grot);
  font-variation-settings: "opsz" 18, "wdth" 92, "wght" 600;
  font-size: 30px;
  letter-spacing: -0.01em;
  text-transform: none;
}
.brand-text { display: inline-block; white-space: nowrap; }
.brand-period {
  color: var(--accent);
  font-weight: inherit;
  font-size: 1.3em;
  line-height: 0.5;
  display: inline-block;
  background: var(--bg-dark);
  padding: 0 .15em;
  margin-left: 1px;
  border-radius: 2px;
  transform: translateY(-2px);
}

.masthead-meta {
  margin: 0;
  display: inline-flex; gap: .5rem; align-items: center;
  color: var(--mute);
  white-space: nowrap;
  justify-self: center;
}
.m-dash { color: var(--rule); }

.masthead-cta {
  justify-self: end;
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--bg-dark); color: var(--ink-light);
  padding: .5rem .85rem .45rem;
  border-radius: 999px;
  font-family: var(--grot);
  font-variation-settings: "opsz" 14, "wdth" 95, "wght" 540;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.masthead-cta:hover { background: var(--accent); color: var(--ink-dark); }
.masthead-cta-arr {
  font-size: 11px;
  transition: transform .25s var(--ease);
}
.masthead-cta:hover .masthead-cta-arr { transform: translate(2px, -2px); }

@media (max-width: 720px) {
  .masthead { grid-template-columns: minmax(0, 1fr) auto; }
  .masthead-meta { display: none; }
  .brand { font-size: 22px; }
}


/* =========================================================
   Corner mini-graph — the SIGNATURE move.
   Grows as you scroll. Each section adds a node + an edge.
   ========================================================= */

.orbit {
  position: fixed;
  bottom: 1.25rem; right: 1.25rem;
  z-index: 40;
  width: 200px; height: 200px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.orbit.is-visible { opacity: 1; transform: none; }
.orbit-svg {
  width: 100%; height: 100%;
  overflow: visible;
}
.orbit-label {
  position: absolute;
  top: -.5rem; left: 0;
  margin: 0;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  line-height: 1.3;
  color: var(--mute);
  text-transform: uppercase;
  pointer-events: none;
}
@media (max-width: 720px) { .orbit { display: none; } }

.orbit-node {
  transition: opacity .55s var(--ease), transform .55s var(--ease);
  opacity: 0;
  transform-origin: center;
  transform: scale(0.4);
}
.orbit-node circle.dot {
  fill: var(--ink-dark);
  transition: fill .35s var(--ease), r .35s var(--ease);
}
.orbit-node text {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  fill: var(--mute);
}
.orbit-node.is-active circle.dot { fill: var(--accent); r: 6; }
.orbit-node.is-active text { fill: var(--ink-dark); font-weight: 600; }
.orbit-node.is-on { opacity: 1; transform: scale(1); }
.orbit-edge {
  stroke: var(--ink-dark);
  stroke-width: 1;
  fill: none;
  stroke-dasharray: var(--len, 200);
  stroke-dashoffset: var(--len, 200);
  transition: stroke-dashoffset .9s var(--ease);
}
.orbit-edge.is-on { stroke-dashoffset: 0; }


/* =========================================================
   HERO — the poster
   ========================================================= */

.hero {
  min-height: 100vh;
  padding: 8.5rem var(--pad) 2.5rem;
  position: relative;
  display: flex; flex-direction: column;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink-dark);
}

.hero-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  border-top: 1px solid var(--ink-dark);
  padding-top: 0;
  margin: 0;
  max-width: 100%;
  margin-top: -3.5rem;
}
.hero-meta p { margin: 0; 
display: none;}

/* THE poster wordmark */
.poster {
  margin: clamp(0.2rem, 1.5vw, 1rem) 0;
  font-family: var(--grot);
  font-variation-settings: "opsz" 96, "wdth" 95, "wght" 760;
  font-size: clamp(3.8rem, 16vw, 14rem);
  line-height: 0.8;
  letter-spacing: -0.025em;
  color: var(--ink-dark);
  position: relative;
}
.poster-row { display: block; }
.poster-row-1 {
  font-size: 1em;
  line-height: 0.88;
  margin-bottom: 0.06em;
}
.poster-row-1 .poster-the {
  font-family: var(--grot);
  font-variation-settings: "opsz" 96, "wdth" 95, "wght" 800;
  font-size: 0.9em;
  letter-spacing: -0.025em;
  text-transform: none;
  color: var(--ink-dark);
  margin-left: 0;
}
.poster-row-2, .poster-row-3 {
  display: block;
  font-variation-settings: "opsz" 96, "wdth" 95, "wght" 800;
}

.poster-word {
  display: inline-block;
  position: relative;
}
/* the 'o' inside Dots / Company is rendered larger as a true round shape */
.poster-o {
  display: inline-block;
  font-variation-settings: "opsz" 96, "wdth" 100, "wght" 720;
  color: var(--ink-dark);
  position: relative;
  /* a chartreuse halo sits behind the 'o' on hero — only on the second o (Company) */
}
/* All accent dots are real positioned elements so we can morph them
   smoothly between the typographic phase and the graph phase.
   JS sets each dot's initial top/left/width/height; phase-2 just
   updates those properties and CSS transitions handle the move. */
.poster-dot {
  position: absolute;
  top: 0; left: 0;
  border-radius: 50%;
  background: var(--accent);
  z-index: 2;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  animation: dotPop 1s var(--ease) forwards;
  transition:
    top 1s var(--ease),
    left 1s var(--ease),
    width 1s var(--ease),
    height 1s var(--ease);
}
@keyframes dotPop {
  to { transform: translate(-50%, -50%) scale(1); }
}
/* Pop-in stagger — left to right, top to bottom */
.poster-dot-o1     { animation-delay: 0.30s; }
.poster-dot-o2     { animation-delay: 0.50s; }
.poster-dot-o3     { animation-delay: 0.70s; }
.poster-dot-1      { animation-delay: 0.90s; }
.poster-dot-2      { animation-delay: 1.05s; }
.poster-dot-period { animation-delay: 0.85s; }


/* SVG overlay that draws lines connecting all the accent dots */
.poster-graph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}
.poster-edge {
  stroke: var(--accent);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: var(--len, 1000);
  stroke-dashoffset: var(--len, 1000);
  animation: posterEdgeDraw .55s var(--ease) forwards;
  /* Endpoints are synced from JS (RAF) during phase-2, so no CSS transition. */
}

/* Face on the head dot — drawn at the end of phase-2 morph. */
.poster-face {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  overflow: visible;
}
.face-eye {
  fill: var(--ink-dark);
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.poster.is-face-on .face-eye      { opacity: 1; }
.poster.is-face-on .face-eye-r    { transition-delay: .12s; }
.face-smile {
  fill: none;
  stroke: var(--ink-dark);
  stroke-width: 2.2;       /* thin, pencil-like */
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset .55s var(--ease) .35s;
}
.poster.is-face-on .face-smile { stroke-dashoffset: 0; }
@keyframes posterEdgeDraw {
  to { stroke-dashoffset: 0; }
}

.poster-final {
  /* Typographic period is hidden — the synthetic .poster-dot-period takes over,
     so it can move freely with the others into the graph. */
  color: transparent;
  display: inline-block;
  margin-left: -0.04em;
  font-size: 1em;
  font-weight: inherit;
}

/* hero-foot row: claim left, CTA right */
.hero-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
  padding-top: 3rem;
}
@media (max-width: 720px) {
  .hero-foot { grid-template-columns: 1fr; gap: 1.25rem; }
}
.hero-claim {
  font-family: var(--grot);
  font-variation-settings: "opsz" 24, "wdth" 100, "wght" 480;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.35;
  color: var(--ink-dark);
  margin: 0;
  max-width: 32ch;
}
.hero-cta {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--grot);
  font-variation-settings: "opsz" 22, "wdth" 95, "wght" 600;
  font-size: clamp(1.1rem, 1.4vw, 1.35rem);
  background: var(--bg-dark); color: var(--ink-light);
  padding: 1rem 1.4rem 0.95rem;
  border-radius: 999px;
  transition: background-color .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.hero-cta:hover { background: var(--accent); color: var(--ink-dark); }
.hero-cta-period { color: var(--accent); font-weight: 700; }
.hero-cta:hover .hero-cta-period { color: var(--ink-dark); }
.hero-cta-arrow {
  font-size: 0.75em;
  transition: transform .25s var(--ease);
  margin-left: .15em;
}
.hero-cta:hover .hero-cta-arrow { transform: translate(2px, -2px); }


/* =========================================================
   HERO specimen — three-panel narrative
   Connected by step numbers, arrows, and a continuous story
   ========================================================= */

.spec {
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
  border-top: 1px solid var(--ink-dark);
}

.spec-head {
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
@media (max-width: 800px) {
  .spec-head { grid-template-columns: 1fr; gap: .75rem; }
}
.spec-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0;
  display: inline-flex; align-items: center; gap: .65rem;
}
.spec-tag::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
}
.spec-h {
  font-family: var(--grot);
  font-variation-settings: "opsz" 60, "wdth" 88, "wght" 640;
  font-size: clamp(2.3rem, 4.8vw, 3.9rem);
  line-height: 1.08;          /* slightly looser — full sentence now */
  letter-spacing: -0.02em;
  color: var(--ink-dark);
  margin: 0;
  text-wrap: balance;
  text-align: center;
}
.spec-h em {
  font-family: var(--grot);
  font-style: regular;
  font-variation-settings: "opsz" 60, "wdth" 100, "wght" 460;
  color: var(--mute);
  white-space: nowrap;
}
/* Poetic subline — sits under the headline, smaller and muted. */
.spec-sub {
  font-family: var(--grot);
  font-variation-settings: "opsz" 36, "wdth" 95, "wght" 460;
  font-size: clamp(1.05rem, 1.5vw, 1.4rem);
  line-height: 1.3;
  color: var(--mute);
  margin: .9rem 0 0;
  text-wrap: balance;
}
.spec-sub em {
  font-style: italic;
  font-variation-settings: "opsz" 36, "wdth" 100, "wght" 540;
  color: var(--mute);
}

/* Zigzag layout — pairs of [panel + description] stack down the page,
   alternating left- and right-anchored. Curved SVG connectors (rendered by JS)
   physically link each panel to the next.
     row 1 ◄─ [Panel 01 | Desc 01]                    (left)
                 ╲
                  ╲ indexed
                   ╲
     row 2                       [Desc 02 | Panel 02] ◄─ (right)
                                  ╱
                         recalled ╱
                                 ╱
     row 3 ◄─ [Panel 03 | Desc 03]                    (left)
*/
.spec-flow {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3.25rem);
  position: relative;
}
.spec-pair {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  width: min(100%, 840px);    /* tighter — pairs hug the middle, not the edges */
  position: relative;
}
.spec-pair[data-pair="01"],
.spec-pair[data-pair="03"] {
  align-self: center;
  margin-right: clamp(2rem, 12%, 12rem);   /* nudge just LEFT of middle */
}
.spec-pair[data-pair="02"] {
  align-self: center;
  margin-left: clamp(2rem, 12%, 12rem);    /* nudge just RIGHT of middle */
}

.spec-panel {
  display: flex; flex-direction: column;
  gap: 1rem;
  position: relative;
  flex: 0 0 auto;
  width: clamp(360px, 38vw, 484px);   /* ~10% bigger than before (440 → 484) */
}
.spec-desc {
  margin: 0;
  flex: 1 1 0;
  max-width: 55ch;
  font-family: var(--grot);
  font-variation-settings: "opsz" 22, "wdth" 100, "wght" 440;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink-dark);
}
.spec-desc p { margin: 0; }
.spec-desc p + p { margin-top: .5rem; }
.spec-desc-lead {
  font-variation-settings: "opsz" 36, "wdth" 92, "wght" 700;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--ink-dark);
}
.spec-desc em {
  font-style: italic;
  font-variation-settings: "opsz" 22, "wdth" 100, "wght" 540;
}

/* Mobile: stack panel-then-desc, one column. No zigzag offset. */
@media (max-width: 980px) {
  .spec-pair {
    flex-direction: column;
    align-self: stretch !important;
    width: 100%;
    align-items: stretch;
    gap: 1rem;
  }
  .spec-pair[data-pair="01"],
  .spec-pair[data-pair="02"],
  .spec-pair[data-pair="03"] {
    margin-left: 0;
    margin-right: 0;
  }
  .spec-panel { width: 100%; }
  .spec-desc { max-width: none; }
}
/* Per-panel head: big step number + role label + timestamp.
   Names what the panel *is*, so the sequence reads as one story. */
.spec-panel-head {
  display: flex;
  align-items: baseline;
  gap: .8rem;
  margin: 0 0 .25rem;
  padding: 0;
}
.spec-step {
  font-family: var(--grot);
  font-variation-settings: "opsz" 32, "wdth" 88, "wght" 700;
  font-size: 32px;
  line-height: 1;
  color: var(--ink-dark);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.spec-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.spec-label {
  font-family: var(--grot);
  font-variation-settings: "opsz" 22, "wdth" 95, "wght" 600;
  font-size: 15px;
  color: var(--ink-dark);
  margin: 0;
  letter-spacing: -0.005em;
  line-height: 1.15;
}
.spec-time {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0;
  line-height: 1.2;
}

/* Hand-drawn arrow connector between pairs (rendered by JS).
   Sits under the pair, offset toward the next pair's side.
   The Arrow.svg shape is recolored to accent via fill="currentColor". */
.spec-connector {
  position: absolute;
  bottom: clamp(-7rem, -8vw, -5rem);
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  pointer-events: none;
  color: var(--accent);
  z-index: 2;
}
.spec-pair[data-pair="01"] .spec-connector,
.spec-pair[data-pair="03"] .spec-connector {
  /* connector after a left-anchored pair points down-right toward the next */
  right: -2rem;
  top: 70%;
}
.spec-pair[data-pair="02"] .spec-connector {
  left: -2rem;
  flex-direction: row-reverse;
  top: 70%;
}
.spec-connector.is-flipped .spec-arrow-doodle { transform: scaleX(-1); }
.spec-arrow-doodle {
  width: clamp(80px, 7vw, 110px);
  height: auto;
  display: block;
}
.spec-connector-verb {
  font-family: var(--grot);
  font-variation-settings: "opsz" 60, "wdth" 88, "wght" 640;
  font-size: clamp(1.2rem, 1.6vw, 1.6rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.spec-pair[data-pair="01"] .spec-connector-verb,
.spec-pair[data-pair="03"] .spec-connector-verb {
  transform: translateY(-8px) translateX(-6px);
}
.spec-pair[data-pair="02"] .spec-connector-verb {
  transform: translateY(-8px) translateX(6px);
}

@media (max-width: 980px) {
  /* Stacked layout — hide hand-drawn arrows; show a vertical verb instead. */
  .spec-connector { display: none; }
  .spec-pair[data-next]::after {
    content: "↓ " attr(data-next) " ↓";
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 1rem;
    font-family: var(--grot);
    font-variation-settings: "opsz" 60, "wdth" 88, "wght" 640;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--accent);
  }
}
.spec-cap {
  font-family: var(--grot);
  font-variation-settings: "opsz" 22, "wdth" 95, "wght" 540;
  font-size: 1rem;
  color: var(--ink-dark);
  margin: 0;
}

/* — Notebook page mock with REAL handwriting — */
.notebook {
  background: #FBFAF4;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 0 1.7rem 2rem;        /* top padding 0 — screen-bar provides its own */
  position: relative;
  flex: 1;
  overflow: hidden;
  background-image: repeating-linear-gradient(to bottom, transparent 0 30px, rgba(11,11,16,0.07) 30px 31px);
  font-family: "Caveat", "Iowan Old Style", cursive;
  font-weight: 500;
  font-size: 22px;
  line-height: 30px;
  color: var(--ink-dark);
  min-height: 320px;
  box-shadow: 0 20px 50px -28px rgba(11,11,16,0.25), 0 1px 0 rgba(11,11,16,0.04);
  /* a tiny rotation gives 'real' feeling */
  transform: rotate(-0.4deg);
}
/* Screen-bar header inside the notebook — same look as panel 03 */
.notebook .screen-bar {
  margin: 0 -1.7rem 1.1rem;
  line-height: 1.45;     /* override the notebook's 30px line-height */
  background: rgba(11,11,16,0.04);
  border-bottom-color: rgba(11,11,16,0.08);
  color: rgba(11,11,16,0.55);
}
.notebook .screen-bar-dots i { background: rgba(11,11,16,0.18); }
.notebook .screen-bar-dots i:first-child { background: var(--accent); }
.notebook-h {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 1.1rem;
  line-height: 1.2;
}
.nb-line {
  margin: 0 0 .15rem;
  position: relative;
  letter-spacing: 0.005em;
}
.nb-emph {
  color: var(--ink-dark);
  font-weight: 700;
  font-size: 1.05em;
}
.nb-strike {
  color: var(--mute);
  text-decoration: line-through;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}
.nb-pin {
  position: absolute;
  top: 1.2rem; right: 1.5rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--ink-dark);
}

/* — A "screen" frame that wraps both graph and AI panel for visual unity — */
.spec-screen {
  background: var(--bg-dark);
  border-radius: 8px;
  flex: 1;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 22px 50px -26px rgba(11,11,16,0.5);
  min-height: 320px;
  border: 1px solid var(--ink-dark);
}
.screen-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .65rem .9rem;
  border-bottom: 1px solid rgba(244,239,226,0.08);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244,239,226,0.55);
  flex-shrink: 0;
}
.screen-bar-dots { display: inline-flex; gap: 5px; }
.screen-bar-dots i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(244,239,226,0.18);
}
.screen-bar-dots i:first-child { background: var(--accent); }
.screen-bar-tag { font-weight: 600; }

/* — Graph inside screen — */
.spec-screen-graph .spec-graph {
  width: 100%;
  height: auto;
  flex: 1;
  padding: 1rem;
}
.spec-graph {
  width: 100%;
  height: auto;
  overflow: visible;
}
.sg-edges line {
  stroke: rgba(244,239,226,0.28);
  stroke-width: 1;
}
.sg-nodes circle { fill: #F4EFE2; }
.sg-nodes text {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  fill: rgba(244,239,226,0.78);
}
.sg-node-new .sg-active-halo {
  fill: var(--accent);
  opacity: 0.22;
  animation: nodePulse 2.4s var(--ease) infinite;
}
@keyframes nodePulse {
  0%, 100% { opacity: 0.22; r: 16; }
  50%      { opacity: 0.35; r: 22; }
}
.sg-node-new circle:not(.sg-active-halo) { fill: var(--accent); }
.sg-node-new text:not(.sg-just-added) {
  fill: var(--accent);
  font-weight: 700;
  font-size: 11px;
  font-family: var(--grot);
  font-variation-settings: "opsz" 14, "wdth" 88, "wght" 700;
  letter-spacing: -0.01em;
}
.sg-just-added {
  fill: var(--accent);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

/* — AI citation card inside the screen —
   Panel 03 uses notes-paper background (matches the .notebook in panel 01). */
.spec-screen-ai {
  background: #FBFAF4;
  background-image: repeating-linear-gradient(to bottom, transparent 0 30px, rgba(11,11,16,0.07) 30px 31px);
  border-color: var(--rule);
  box-shadow: 0 20px 50px -28px rgba(11,11,16,0.25), 0 1px 0 rgba(11,11,16,0.04);
}
.spec-screen-ai .screen-bar {
  background: rgba(11,11,16,0.04);
  border-bottom-color: rgba(11,11,16,0.08);
  color: rgba(11,11,16,0.55);
}
.spec-screen-ai .screen-bar-dots i { background: rgba(11,11,16,0.18); }
.spec-screen-ai .screen-bar-dots i:first-child { background: var(--accent); }
.spec-screen-ai .ai-card {
  background: transparent;
  color: var(--ink-dark);
  flex: 1;
  display: flex; flex-direction: column;
  gap: .85rem;
  padding: 1.4rem 1.4rem 1.4rem;
  position: relative;
  border-radius: 0;
  box-shadow: none;
}
.ai-q {
  font-family: "Caveat", cursive;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  color: var(--ink-dark);
  margin: 0 0 .25rem;
}
.ai-q-tag {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0.5rem 0 -0.25rem;
}
.ai-q-eq {
  display: inline-block;
  font-family: "Iowan Old Style", Georgia, serif;
  font-style: italic;
  font-size: 20px;
  letter-spacing: 0;
  text-transform: lowercase;
  color: var(--ink-dark);
  margin-top: .25rem;
}
.spec-screen-ai .ai-q-eq {
  display: inline;
  font-size: 1.4rem;
  margin: .15rem 0 .55rem;
}

/* Student's working — handwriting on the paper */
.ai-work {
  display: flex; flex-direction: column;
  gap: .1rem;
  margin: 0 0 .25rem;
}
.ai-work-line {
  font-family: "Caveat", cursive;
  font-weight: 600;
  font-size: 28px;
  line-height: 30px;
  color: var(--ink-dark);
  margin: 0;
}
.ai-work-stuck {
  align-self: flex-start;
  background: linear-gradient(transparent 50%, color-mix(in srgb, var(--accent) 65%, transparent) 55%);
  padding: 0 .35rem 1px;
}
.ai-work-q {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1em;
  margin-left: .15rem;
}

/* Outline-only / sketchy cite block — dashed accent border, no fill.
   A hand-drawn doodle arrow at the top-left points up at the stuck step. */
.ai-cite {
  margin-top: auto;
  border: 2px dashed var(--accent);
  background: transparent;
  padding: .85rem 1rem 1rem;
  border-radius: 6px;
  position: relative;
  max-width: 33ch;
  margin-left: 4em;
}
.ai-cite.ai-cite-points-up { margin-top: 1.5rem; }   /* leave room for the pointer */
.ai-cite-pointer {
  position: absolute;
  top: -45px;
  left: -25px;
  width: 32px;
  height: 56px;
  color: var(--accent);
  pointer-events: none;
  overflow: visible;
}
.ai-cite-h {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin: 0 0 .45rem;
  font-weight: 700;
}
.ai-cite-body {
  font-family: var(--grot);
  font-variation-settings: "opsz" 18, "wdth" 100, "wght" 460;
  font-size: 0.96rem;
  line-height: 1.4;
  color: var(--ink-dark);
  margin: 0;
  
}
.ai-cite-body em {
  font-family: "Caveat", cursive;
  font-style: normal;
  color: var(--accent);
  font-size: 1.1em;
  font-weight: 700;
}
.ai-cite-tip {
  display: inline-block;
  margin-top: .7rem;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  text-transform: uppercase;
  padding-bottom: 1px;
}


/* =========================================================
   CLAIM SECTIONS — manifesto-style
   ========================================================= */

.claim {
  padding: clamp(5rem, 10vw, 9rem) var(--pad) clamp(5rem, 10vw, 9rem);
  border-bottom: 1px solid var(--ink-dark);
  position: relative;
}
.claim-num {
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 2.5rem;
  display: inline-flex; align-items: baseline; gap: .65rem;
}
.claim-num::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  vertical-align: middle;
}

.claim-h {
  font-family: var(--grot);
  font-variation-settings: "opsz" 96, "wdth" 84, "wght" 680;
  font-size: clamp(2.3rem, 7vw, 6.2rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
  color: var(--ink-dark);
  margin: 0 0 3rem;
  max-width: 25ch;
  text-wrap: balance;
}

/* Two-column claim layout — text left, figure right */
.claim-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.claim-figure {
  margin: 0;
}
.claim-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
@media (max-width: 820px) {
  .claim-grid { grid-template-columns: 1fr; }
  .claim-figure { order: -1; margin-bottom: 1.5rem; }
}
.claim-h em {
  font-style: italic;
  font-variation-settings: "opsz" 96, "wdth" 100, "wght" 460;
  color: var(--ink-dark);
}
.big-period {
  color: var(--ink-light);
  background: var(--accent);
  display: inline-block;
  border-radius: 999px;
  padding: 0 .25em;
  line-height: 0.8;
  margin-left: .04em;
  font-size: 0.9em;
}

.claim-body {
  max-width: 60ch;
}
.claim-body p {
  font-family: var(--grot);
  font-variation-settings: "opsz" 18, "wdth" 100, "wght" 420;
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--ink-dark);
  margin: 0 0 1.1rem;
}
.big-q {
  font-family: var(--grot);
  font-variation-settings: "opsz" 60, "wdth" 95, "wght" 620 !important;
  font-size: clamp(1.5rem, 2.6vw, 2.3rem) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.018em;
  color: var(--ink-dark) !important;
  margin: 1.5rem 0 0 !important;
  max-width: 22ch;
}

.claim-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--mute);
  margin: 3rem 0 0;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: .65rem;
}
.claim-tag::before {
  content: "→";
  color: var(--accent);
  font-size: 14px;
}

.claim-kicker {
  font-family: var(--grot);
  font-variation-settings: "opsz" 96, "wdth" 90, "wght" 580;
  font-size: clamp(1.6rem, 3.6vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink-dark);
  margin: 3rem 0 0;
  max-width: 22ch;
}
.claim-kicker em {
  font-style: italic;
  font-variation-settings: "opsz" 96, "wdth" 100, "wght" 480;
  background: var(--accent);
  padding: 0 .12em;
  border-radius: 4px;
}


/* — invert section (02): white-on-black for variation — */
.claim-invert {
  background: var(--bg-dark);
  color: var(--ink-light);
}
.claim-invert .claim-num { color: rgba(255,255,255,0.5); }
.claim-invert .claim-h, .claim-invert .duo h3 { color: var(--ink-light); }
.claim-invert .claim-body p, .claim-invert .duo p { color: rgba(255,255,255,0.78); }
.claim-invert .duo-letter {
  background: var(--accent);
  color: var(--ink-dark);
}
.claim-invert .claim-tag { color: rgba(255,255,255,0.55); }
.claim-invert .claim-tag::before { color: var(--accent); }


/* — duo (split layout for ch 02) — */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  margin-top: 1.5rem;
}
@media (max-width: 800px) { .duo { grid-template-columns: 1fr; } }
.duo-col { padding: 0; }
.duo-letter {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: var(--bg-dark); color: var(--ink-light);
  border-radius: 50%;
  font-family: var(--grot);
  font-variation-settings: "opsz" 24, "wdth" 95, "wght" 700;
  font-size: 18px;
  margin: 0 0 1rem;
}
.duo h3 {
  font-family: var(--grot);
  font-variation-settings: "opsz" 36, "wdth" 88, "wght" 640;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.018em;
  margin: 0 0 1rem;
  color: var(--ink-dark);
  max-width: 22ch;
}
.duo p {
  font-size: 1.04rem;
  line-height: 1.55;
  color: var(--ink-dark);
  margin: 0 0 1.5rem;
  max-width: 50ch;
}

/* — Duo visualizations — */
.duo-vis {
  margin-top: 1.5rem;
  background: rgba(244,239,226,0.06);
  border: 1px solid rgba(244,239,226,0.14);
  border-radius: 4px;
  padding: 1.25rem;
  position: relative;
  min-height: 460px;            /* matched height across the two columns */
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.duo-vis-graph svg {
  width: 100%;
  height: auto;
  max-width: 600px;       /* fills more of the box at wide viewports while keeping
                             height ≤ canvas height (600 → 366 tall, fits 460 box) */
  margin: 0 auto;
  display: block;
}
.duo-vis-graph .dv-edges line {
  stroke: rgba(244,239,226,0.3);
  stroke-width: 1;
  transition: stroke 0.3s var(--ease), stroke-width 0.3s var(--ease), stroke-dashoffset 0.8s var(--ease);
}
.duo-vis-graph .dv-nodes circle:not(.dv-halo) {
  fill: #F4EFE2;
  transition: fill 0.3s var(--ease), r 0.3s var(--ease);
}
.duo-vis-graph .dv-nodes text {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  fill: rgba(244,239,226,0.8);
  transition: fill 0.3s var(--ease), font-size 0.3s var(--ease);
}
/* Halo hidden by default — only the active/hovered node shows it. */
.duo-vis-graph .dv-halo {
  fill: var(--accent);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.duo-vis-graph .dv-active .dv-halo,
.duo-vis-graph .dv-nodes > g:hover .dv-halo {
  opacity: 0.22;
  animation: dvHaloPulse 3s ease-in-out infinite;
}
.duo-vis-graph .dv-active circle:not(.dv-halo),
.duo-vis-graph .dv-nodes > g:hover circle:not(.dv-halo) {
  fill: var(--accent);
}
.duo-vis-graph .dv-active text,
.duo-vis-graph .dv-nodes > g:hover text {
  fill: var(--accent);
  font-weight: 700;
  font-size: 10px;
}
@keyframes dvHaloPulse {
  0%, 100% { opacity: 0.22; r: 13; }
  50%      { opacity: 0.42; r: 18; }
}
/* Highlight edges connected to the active or hovered node. JS sets data-touch-active. */
.duo-vis-graph .dv-edges line.is-touched {
  stroke: var(--accent);
  stroke-width: 1.5;
}
/* Make nodes themselves interactive (cursor + clickable group).
   Prevent text selection / focus outline on click — keep focus-visible for keyboard. */
.duo-vis-graph .dv-nodes > g {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
}
.duo-vis-graph .dv-nodes > g text {
  user-select: none;
  -webkit-user-select: none;
}
.duo-vis-graph .dv-nodes > g:focus { outline: none; }
.duo-vis-graph .dv-nodes > g:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Reveal on scroll-in: nodes fade up sequentially, edges draw in. */
.duo-vis-graph .dv-nodes > g {
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.duo-vis-graph .dv-edges line {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
}
.duo-vis-graph.is-revealed .dv-nodes > g { opacity: 1; }
.duo-vis-graph.is-revealed .dv-nodes > g:nth-child(1) { transition-delay: 0.10s; }
.duo-vis-graph.is-revealed .dv-nodes > g:nth-child(2) { transition-delay: 0.25s; }
.duo-vis-graph.is-revealed .dv-nodes > g:nth-child(3) { transition-delay: 0.40s; }
.duo-vis-graph.is-revealed .dv-nodes > g:nth-child(4) { transition-delay: 0.55s; }
.duo-vis-graph.is-revealed .dv-nodes > g:nth-child(5) { transition-delay: 0.70s; }
.duo-vis-graph.is-revealed .dv-nodes > g:nth-child(6) { transition-delay: 0.85s; }
.duo-vis-graph.is-revealed .dv-edges line { stroke-dashoffset: 0; }
.duo-vis-graph.is-revealed .dv-edges line:nth-child(1) { transition-delay: 0.20s; }
.duo-vis-graph.is-revealed .dv-edges line:nth-child(2) { transition-delay: 0.35s; }
.duo-vis-graph.is-revealed .dv-edges line:nth-child(3) { transition-delay: 0.50s; }
.duo-vis-graph.is-revealed .dv-edges line:nth-child(4) { transition-delay: 0.65s; }
.duo-vis-graph.is-revealed .dv-edges line:nth-child(5) { transition-delay: 0.80s; }
.duo-vis-graph.is-revealed .dv-edges line:nth-child(6) { transition-delay: 0.95s; }

@media (prefers-reduced-motion: reduce) {
  .duo-vis-graph .dv-nodes > g { opacity: 1; transition: none; }
  .duo-vis-graph .dv-edges line { stroke-dashoffset: 0; transition: none; }
  .duo-vis-graph .dv-active .dv-halo { animation: none; }
}

/* Hover tooltip — surfaces metadata about the concept node. */
.duo-vis-graph { position: relative; }
.duo-vis-graph .dv-tooltip {
  position: absolute;
  z-index: 10;
  width: 240px;
  padding: .7rem .85rem .8rem;
  background: rgba(11, 11, 16, 0.92);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--ink-light);
  font-family: var(--grot);
  font-style: normal;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,.5);
  pointer-events: none;
  /* fade in */
  opacity: 1;
  transition: opacity .18s var(--ease);
}
.duo-vis-graph .dv-tooltip[hidden] {
  display: block;          /* keep it measurable for positioning */
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.duo-vis-graph .dv-tt-name {
  font-family: var(--grot);
  font-variation-settings: "opsz" 24, "wdth" 92, "wght" 700;
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 .5rem;
  color: var(--accent);
}
.duo-vis-graph .dv-tt-meta {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 10px;
  font-size: 11px;
}
.duo-vis-graph .dv-tt-meta dt {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 239, 226, 0.55);
  align-self: center;
}
.duo-vis-graph .dv-tt-meta dd {
  margin: 0;
  color: var(--ink-light);
  align-self: center;
}
/* Stage pips — 4 dots, fill increases with mastery (new → foundational). */
.duo-vis-graph .dv-tt-stage {
  display: flex;
  align-items: center;
  gap: 8px;
}
.duo-vis-graph .dv-tt-pips {
  display: inline-flex;
  gap: 3px;
}
.duo-vis-graph .dv-tt-pip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(244,239,226,0.18);
  display: inline-block;
  transition: background-color .25s var(--ease), transform .25s var(--ease);
}
.duo-vis-graph .dv-tt-pip.is-on {
  background: var(--accent);
  transform: scale(1.05);
}
.duo-vis-graph .dv-tt-stage-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.duo-vis-graph .dv-tt-times {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(244,239,226,0.78);
}
.duo-cap {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: rgba(244,239,226,0.5);
  margin: .85rem 0 0;
  text-align: center;
  text-transform: uppercase;
}

/* AI-work box treatment — mirrors panel 03's .spec-screen-ai chrome:
   straight (no tilt), light --rule border, soft screen-shadow, 8px radius. */
.duo-vis-canvas {
  background: #FBFAF4;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0 1.2rem 1.4rem;
  position: relative;
  overflow: hidden;
  background-image: repeating-linear-gradient(to bottom, transparent 0 26px, rgba(11,11,16,0.07) 26px 27px);
  font-family: "Caveat", "Iowan Old Style", cursive;
  font-weight: 500;
  font-size: 18px;
  line-height: 26px;
  color: var(--ink-dark);
  /* min-height removed — inherits 460px from .duo-vis to match the graph column */
  box-shadow: 0 20px 50px -28px rgba(11,11,16,0.25), 0 1px 0 rgba(11,11,16,0.04);
}
/* Tighter equation + cite for the smaller canvas. */
.duo-vis-canvas .ai-q-eq {
  font-size: 25px;
  margin: .15rem 0 .35rem;
}
.duo-vis-canvas .ai-cite {
  margin-top: 1rem;
  padding: .55rem .75rem;
}
.duo-vis-canvas .ai-work-line { font-size: 28px; line-height: 32px; }
.duo-vis-canvas .ai-cite-h { font-size: 9px; margin: 0; }
.duo-vis-canvas .ai-cite-tip { margin-top: .4rem; font-size: 9px; }
.duo-vis-canvas .ai-cite-pointer { width: 22px; height: 38px; top: -34px; left: 8px; }
/* Screen-bar header inside the canvas — same as the notebook's bar. */
.duo-vis-canvas .screen-bar {
  margin: 0 -1.2rem .85rem;
  line-height: 1.45;
  background: rgba(11,11,16,0.04);
  border-bottom-color: rgba(11,11,16,0.08);
  color: rgba(11,11,16,0.55);
}
.duo-vis-canvas .screen-bar-dots i { background: rgba(11,11,16,0.18); }
.duo-vis-canvas .screen-bar-dots i:first-child { background: var(--accent); }

/* Higher-specificity color rules — .claim-invert .duo p otherwise forces
   a white-ish color on every <p> in the duo (legacy mechanism content). */
.claim-invert .duo-vis-canvas .dv-page-line,
.duo-vis-canvas .dv-page-line {
  margin: 0 0 .15rem;
  position: relative;
  letter-spacing: 0.005em;
  color: var(--ink-dark);
}
.claim-invert .duo-vis-canvas .dv-highlight,
.duo-vis-canvas .dv-highlight {
  display: inline-block;
  background: linear-gradient(transparent 55%, color-mix(in srgb, var(--accent) 60%, transparent) 55%);
  padding: 0 .25em 1px;
  color: var(--ink-dark);
  font-weight: 700;
}

/* Same .claim-invert override for the new ai-work-style content. */
.claim-invert .duo-vis-canvas .ai-q-tag,
.claim-invert .duo-vis-canvas .ai-q-eq,
.claim-invert .duo-vis-canvas .ai-work-line,
.claim-invert .duo-vis-canvas .ai-cite-body,
.claim-invert .duo-vis-canvas .dv-bubble,
.claim-invert .duo-vis-canvas .dv-bubble p { color: var(--ink-dark); }

/* Staggered fade-in — each .dv-fade has its own --dv-delay set inline.
   Activates when the canvas gets the .is-active class (added by JS via
   IntersectionObserver when scrolled into view). */
.duo-vis-canvas .dv-fade {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity .5s var(--ease) var(--dv-delay, 0s),
    transform .5s var(--ease) var(--dv-delay, 0s);
}
.duo-vis-canvas.is-active .dv-fade {
  opacity: 1;
  transform: translateY(0);
}
/* Cite block fades in AND its cursor SVG slides in from off the corner. */
.duo-vis-canvas .dv-fade-cite .ai-cite-pointer {
  opacity: 0;
  transform: translate(36px, -36px) scale(.7);
  transition:
    opacity .55s var(--ease),
    transform .7s var(--ease);
  /* Delay = parent's --dv-delay + a bit, so the cursor lands AFTER the card appears. */
  transition-delay: calc(var(--dv-delay, 0s) + .25s);
}
.duo-vis-canvas.is-active .dv-fade-cite .ai-cite-pointer {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Equals-sign anchor + star (sparkle) above it. */
.duo-vis-canvas .dv-eq {
  position: relative;
  display: inline-block;
}
.duo-vis-canvas .dv-star {
  position: absolute;
  bottom: calc(100% - 8px);     /* nudged down — closer to the equals sign */
  left: 50%;
  font-size: .9em;
  color: var(--accent);
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) scale(.2) rotate(-90deg);
  transition:
    opacity .35s var(--ease),
    transform .55s cubic-bezier(.34, 1.56, .64, 1);
  transition-delay: 1.85s;       /* lands just after the final working line */
}
.duo-vis-canvas.is-active .dv-star {
  opacity: 1;
  transform: translateX(-50%) scale(1) rotate(0deg);
}

/* Speech bubble — same look as .ai-cite, wide, with cursor tip at the corner. */
.duo-vis-canvas .dv-bubble {
  position: relative;
  margin: 2rem 0 0 2rem;         /* sits under the calc area, with room above for the cursor */
  max-width: none;
  width: calc(100% - 8.5rem);    /* fill most of the canvas */
  border: 2px dashed var(--accent);
  background: transparent;
  color: var(--ink-dark);
  padding: .85rem 1rem 1rem;
  border-radius: 6px;
  font-family: var(--grot);
  font-style: normal;
  font-size: .9rem;
  line-height: 1.4;
  margin-left: 3em;
  /* Pop-out animation — origin at the top-left corner (where the cursor tip lands). */
  transform-origin: 0 0;
  opacity: 0;
  transform: scale(.2);
  transition:
    transform .5s cubic-bezier(.34, 1.56, .64, 1),
    opacity .35s var(--ease);
  transition-delay: 2.35s;       /* after the star pops */
}
.duo-vis-canvas.is-active .dv-bubble {
  opacity: 1;
  transform: scale(1);
}
.duo-vis-canvas .dv-bubble p { margin: 0; }
.duo-vis-canvas .dv-bubble em {
  font-style: italic;
  font-weight: 700;
  color: var(--accent);
}
.duo-vis-canvas .dv-bubble-tip {
  display: inline-block;
  margin-top: .55rem;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}
/* The doodle cursor pointer — tip lands at the box's top-left corner.
   Cursor.svg's tip sits at (~8, ~15) within its rendered 32x56 frame, so we
   negative-offset by those values to put the tip at (0, 0) of the bubble. */
.duo-vis-canvas .dv-bubble-pointer {
  position: absolute;
  top: -45px;
  left: -19px;
  width: 32px;
  height: 56px;
  color: var(--accent);
  pointer-events: none;
  overflow: visible;
}
@media (prefers-reduced-motion: reduce) {
  .duo-vis-canvas .dv-fade,
  .duo-vis-canvas .dv-fade-cite .ai-cite-pointer {
    opacity: 1; transform: none; transition: none;
  }
}
.dv-cursor {
  position: absolute;
  bottom: 1rem; right: 1rem;
  display: flex; align-items: flex-end; gap: 8px;
  width: 78%;
}
.dv-cursor-line {
  flex: 0 0 1px;
  width: 1px;
  height: 90px;
  background: linear-gradient(to bottom, transparent, var(--accent));
  margin-bottom: 30px;
}
.dv-cursor-tip {
  background: var(--accent);
  color: var(--ink-dark);
  border-radius: 4px;
  padding: .7rem .85rem .8rem;
  flex: 1;
  font-family: var(--grot);
  font-style: normal;
  position: relative;
}
.dv-cursor-tip::before {
  content: "";
  position: absolute;
  left: -6px; top: 14px;
  width: 0; height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 6px solid var(--accent);
}
.dv-cursor-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  margin: 0 0 .35rem;
  font-weight: 700;
  color: var(--ink-dark);
}
.dv-cursor-msg {
  font-family: var(--grot);
  font-variation-settings: "opsz" 18, "wdth" 100, "wght" 500;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink-dark);
  margin: 0;
}


/* — reasons (Why now) — */
.reasons {
  list-style: none;
  margin: 0; padding: 0;
  border-top: 1px solid var(--ink-dark);
}
.reasons li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--ink-dark);
  align-items: baseline;
}
.r-num {
  font-family: var(--grot);
  font-variation-settings: "opsz" 36, "wdth" 92, "wght" 640;
  font-size: 1.6rem;
  color: var(--mute);
  margin: 0;
  letter-spacing: -0.01em;
}
.r-line {
  font-family: var(--grot);
  font-variation-settings: "opsz" 36, "wdth" 95, "wght" 480;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink-dark);
  margin: 0;
  max-width: 32ch;
}
.r-line em {
  font-family: var(--grot);
  font-variation-settings: "opsz" 18, "wdth" 100, "wght" 420;
  font-style: normal;
  font-size: 0.6em;
  color: var(--mute);
  display: block;
  margin-top: .3rem;
  letter-spacing: 0;
  line-height: 1.45;
}


/* — Theses scroll-hijacked flip calendar — */
.claim-theses {
  /* The section becomes a tall scroll track; the sticky inside stays put. */
  padding-top: 0;
  padding-bottom: 0;
}
.theses-scroll {
  position: relative;
  height: 360vh;             /* ~2 page-flips of scroll distance — bigger = slower */
}
.theses-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(4rem, 8vw, 7rem) var(--pad);
}

.theses-calendar {
  position: relative;
  margin: clamp(1.5rem, 3vw, 2.5rem) auto 0;
  width: min(640px, 88vw);
  aspect-ratio: 5 / 3;
  perspective: 1500px;
}
.thesis-page {
  position: absolute;
  inset: 0;
  background: #FBFAF4;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  /* Index-card paper aesthetic */
  background-image:
    linear-gradient(to bottom, var(--accent) 0 3px, transparent 3px 44px),
    repeating-linear-gradient(to bottom, transparent 0 30px, rgba(11,11,16,0.07) 30px 31px);
  box-shadow: 0 18px 36px -22px rgba(0,0,0,.42),
              0 1px 0 rgba(11,11,16,0.04);
  color: var(--ink-dark);
  /* Flip mechanics — pivot at top edge; keep the back face visible
     so the page does a full 180° flip without disappearing */
  transform-origin: top center;
  transform-style: preserve-3d;
  -webkit-backface-visibility: visible;
  backface-visibility: visible;
  will-change: transform;
}
.thesis-page[data-page="0"] { z-index: 3; }
.thesis-page[data-page="1"] { z-index: 2; }
.thesis-page[data-page="2"] { z-index: 1; }

/* Cards 1 & 2 sit higher — content lifted by one line. */
.thesis-page[data-page="0"] .thesis-statement,
.thesis-page[data-page="1"] .thesis-statement {
  margin-top: 2.3rem;
}

.thesis-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .25rem;
}
.thesis-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 600;
}
.thesis-keyword {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.thesis-statement {
  font-family: var(--grot);
  font-variation-settings: "opsz" 36, "wdth" 92, "wght" 700;
  font-weight: 700;
  font-size: clamp(1.4rem, 2.2vw, 2.1rem);
  line-height: 1.2;
  margin: 3.7rem 0 1rem;
  color: var(--ink-dark);
}
.thesis-sub {
  font-family: "Caveat", "Iowan Old Style", cursive;
  font-style: normal;
  font-weight: 500;
  font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  line-height: 1.35;
  color: var(--ink-dark);
  margin: 0;
}

.thesis-cite {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.45;
  color: var(--mute);
  margin: .9rem 0 0;
}

/* Bulleted handwritten claims (used on Card I) — sparkle-star marker. */
.thesis-bullets {
  list-style: none;
  padding: 0;
  margin: .9rem 0 0;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.thesis-bullets li {
  display: flex;
  gap: .65rem;
  align-items: baseline;
}
.thesis-bullet-mark {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 1.05em;
  line-height: 1;
  transform: translateY(.05em);
}
.thesis-bullet-body {
  font-family: "Caveat", "Iowan Old Style", cursive;
  font-weight: 500;
  font-size: clamp(1.1rem, 1.55vw, 1.45rem);
  line-height: 1.3;
  color: var(--ink-dark);
  flex: 1 1 auto;
}
.thesis-bullet-refs {
  display: inline;
  margin-left: .35em;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mute);
  vertical-align: baseline;
}
.thesis-cite em { font-style: italic; }

.cite-ref {
  position: relative;
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 1px 1px;
  border-radius: 3px;
  transition: background-color .15s ease;
  cursor: pointer;
}
.cite-ref:hover,
.cite-ref:focus-visible {
  background: rgba(249, 88, 227, 0.10);
  outline: none;
}
.cite-ref::after {
  content: attr(data-cite);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--ink-dark);
  color: var(--bg-light);
  padding: 8px 12px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.5;
  width: max-content;
  max-width: 280px;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s ease, transform .15s ease;
  box-shadow: 0 8px 24px -10px rgba(0,0,0,.4);
  z-index: 5;
}
.cite-ref::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border: 5px solid transparent;
  border-top-color: var(--ink-dark);
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s ease, transform .15s ease;
  z-index: 5;
}
.cite-ref:hover::after,
.cite-ref:hover::before,
.cite-ref:focus-visible::after,
.cite-ref:focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.theses-progress {
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--mute);
  margin: 1.25rem 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
}
.theses-progress-sep { opacity: 0.4; }
.theses-progress-cur { color: var(--accent); font-weight: 700; }
.theses-progress-tot { opacity: 0.7; }
.theses-progress-hint {
  margin-left: 1rem;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  opacity: 0.7;
}

/* Mobile / reduced-motion: skip the scroll-hijack, stack the cards. */
@media (max-width: 800px), (prefers-reduced-motion: reduce) {
  .theses-scroll  { height: auto; }
  .theses-sticky  { position: static; height: auto; padding: 2rem 0 0; overflow: visible; }
  .theses-calendar {
    perspective: none;
    aspect-ratio: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .thesis-page {
    position: relative;
    inset: auto;
    transform: none !important;
    backface-visibility: visible;
  }
  .theses-progress { display: none; }
}


/* — Who — */
.who {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  border-top: 1px solid var(--ink-dark);
  padding-top: 2.5rem;
}
@media (max-width: 800px) { .who { grid-template-columns: 1fr; gap: 3rem; } }
.who-row { padding: 0; }
.who-photo {
  position: relative;
  width: 60%;
  aspect-ratio: 4 / 5;
  background: var(--bg-form);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  margin-left: 0em;
  margin-right: auto;
  background-image:
    radial-gradient(circle at 50% 36%, var(--ink-dark) 0%, var(--ink-dark) 19%, transparent 20%),
    radial-gradient(circle at 50% 80%, var(--ink-dark) 0%, var(--ink-dark) 36%, transparent 37%),
    radial-gradient(circle, rgba(11,11,16,0.18) 0.9px, transparent 1.4px);
  background-size: auto, auto, 8px 8px;
  background-repeat: no-repeat, no-repeat, repeat;
}
.who-row:first-child .who-photo {
  margin-left: auto;
  margin-right: 0;
}
.who-row:last-child .who-photo {
  margin-left: 0;
  margin-right: auto;
}
.who-photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.who-photo-l {
  background-image:
    radial-gradient(circle at 50% 32%, var(--accent) 0%, var(--accent) 17%, transparent 18%),
    radial-gradient(circle at 50% 78%, var(--ink-dark) 0%, var(--ink-dark) 36%, transparent 37%),
    radial-gradient(circle, rgba(11,11,16,0.18) 0.9px, transparent 1.4px);
  background-size: auto, auto, 8px 8px;
  background-repeat: no-repeat, no-repeat, repeat;
}
.who-photo-tag {
  position: absolute;
  bottom: 10px; left: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--mute);
  background: var(--bg-light);
  padding: 2px 6px;
  border-radius: 2px;
}

.who-eye {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--bg-dark);
  color: var(--bg-form);
  margin: 0 0 .85rem;
  display: inline-block;
  padding: 4px 9px;
  border-radius: 2px;
}
.who-name {
  font-family: var(--grot);
  font-variation-settings: "opsz" 96, "wdth" 84, "wght" 700;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  color: var(--ink-dark);
}
.who-last {
  color: var(--mute);
  font-variation-settings: "opsz" 96, "wdth" 100, "wght" 380;
  font-style: italic;
  font-size: 0.65em;
  letter-spacing: -0.01em;
}
.who-row p {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--bg-form);
  margin: 0 0 .9rem;
  max-width: 36ch;
}
.who-row:first-child p:not(.who-eye) {
  margin-left: auto;
  margin-right: 0;
}
.who-row:last-child p:not(.who-eye) {
  margin-left: 0;
  margin-right: auto;
}
.who-row t {
  display: block;        /* <t> isn't a standard tag — force block flow */
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--bg-dark);
  margin: 0 0 .9rem;
  width: 60%;            /* match the photo's column footprint */
  max-width: none;
}
/* Mariia's photo is right-aligned; her bio sits flush with the photo's left edge. */
.who-row:first-child t { margin-left: auto;  margin-right: 0; }
/* Levi's photo is left-aligned; his bio starts at the column's left edge. */
.who-row:last-child  t { margin-left: 0;     margin-right: auto; }
/* For Mariia, also align the Co-founder label and name beneath the photo. */
.who-row:first-child .who-eye  { margin-left: 40%; }
.who-row:first-child .who-name { margin-left: 40%; }
.who-row em { font-style: italic; color: var(--ink-dark); }
.who-row a { border-bottom: 1px solid var(--ink-dark); }
.who-row a:hover { background: var(--accent); }

/* Mobile: drop the zigzag — both founders align to the left. */
@media (max-width: 800px) {
  .who-row:first-child .who-photo,
  .who-row:last-child  .who-photo,
  .who-row:first-child p:not(.who-eye),
  .who-row:last-child  p:not(.who-eye),
  .who-row:first-child t,
  .who-row:last-child  t {
    margin-left: 0;
    margin-right: auto;
  }
  .who-row:first-child .who-eye,
  .who-row:first-child .who-name {
    margin-left: 0;
  }
  /* Bio text uses the full row width on mobile, not the desktop 60% photo column. */
  .who-row t { width: 100%; }
}
.who-pending {
  font-family: var(--mono) !important;
  font-size: 11.5px !important;
  color: var(--mute) !important;
  border: 1px dashed var(--rule);
  padding: .6rem .85rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}


/* — Apply form — */
.claim-final {
  background: var(--bg-form);
}
.apply-meta { max-width: 60ch; margin-bottom: 3rem; }
.apply-meta p {
  font-family: var(--grot);
  font-variation-settings: "opsz" 18, "wdth" 100, "wght" 420;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--ink-dark);
  margin: 0;
}
.apply-meta b { font-weight: 700; }

.apply-form {
  display: flex; flex-direction: column;
  gap: 0;
  border-top: 2px solid var(--ink-dark);
  border-bottom: 2px solid var(--ink-dark);
  padding-bottom: 4rem;          /* space between submit button and the form's bottom rule */
}
.apply-hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.apply-field {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: baseline;
  gap: 1rem;
  padding: 1.25rem 0;
}
.apply-field:last-of-type { border-bottom: 0; }
.apply-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--mute);
  font-weight: 600;
  padding-top: 0.4rem;
}
.apply-field label {
  grid-column: 2;
  font-family: var(--grot);
  font-variation-settings: "opsz" 24, "wdth" 92, "wght" 600;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.2;
  color: var(--ink-dark);
  margin-bottom: .5rem;
  letter-spacing: -0.012em;
}
.apply-field input,
.apply-field select,
.apply-field textarea {
  grid-column: 2;
  font-family: var(--grot);
  font-variation-settings: "opsz" 18, "wdth" 100, "wght" 420;
  font-size: 1.05rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: .55rem 0;
  color: var(--ink-dark);
  outline: none;
  transition: border-color .25s var(--ease);
}
.apply-field input::placeholder,
.apply-field textarea::placeholder { color: var(--mute); }
.apply-field input:focus,
.apply-field select:focus,
.apply-field textarea:focus { border-bottom-color: var(--accent); border-bottom-width: 2px; }
.apply-field-tall textarea {
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: .8rem 1rem;
  background: var(--bg-light);
  resize: vertical;
  min-height: 5.5rem;
}
.apply-submit {
  margin: 2rem 0 0;
  align-self: center;
  display: inline-flex; align-items: center; gap: 1px;
  background: var(--bg-dark); color: var(--ink-light);
  padding: 1.25rem 2rem 1.15rem;
  border: none;
  border-radius: 999px;
  font-family: var(--grot);
  font-variation-settings: "opsz" 22, "wdth" 95, "wght" 580;
  font-size: 1.1rem;
  letter-spacing: 0;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.apply-submit:hover { background: var(--accent); color: var(--ink-dark); }
.apply-submit:disabled {
  opacity: .6;
  cursor: wait;
}
.apply-period { color: var(--accent); font-weight: 700; }
.apply-submit:hover .apply-period { color: var(--ink-dark); }
.apply-status {
  margin: 1rem 0 0;
  min-height: 1.25rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.apply-status.is-success { color: #1f6b1f; }
.apply-status.is-error { color: #8d1e1e; }


/* =========================================================
   Footer
   ========================================================= */

.footer {
  padding: 1.5rem var(--pad);
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
  background: var(--bg-dark); color: var(--ink-light);
}
.footer-mark {
  font-family: var(--grot);
  font-variation-settings: "opsz" 18, "wdth" 92, "wght" 600;
  font-size: 14px;
  margin: 0;
}
.footer-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin: 0;
  display: inline-flex; gap: .55rem;
}
.footer-meta a { color: var(--ink-light); border-bottom: 1px solid rgba(255,255,255,0.4); }
.footer-meta a:hover { color: var(--accent); }


/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .poster-dot { animation: none; transform: translate(-50%, -50%) scale(1); }
  .poster-edge { animation: none; stroke-dashoffset: 0; }
  .face-eye { transition: none; opacity: 1; }
  .face-smile { transition: none; stroke-dashoffset: 0; }
  .orbit-node, .orbit-edge { transition: none; }
}


/* ---------- focus ---------- */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
