/* 17a–17c: 16-scroll restaged as a homepage. */

.study-note {
  max-width: 72em;
  margin: 0 auto;
  padding: 8px 96px 8px 20px;
  font-size: 12px;
  line-height: 1.35;
  color: #334155;
}
.study-note strong { color: #0f172a; }
.study-note a { color: inherit; }

.home.bleed { overflow: visible; }
.home.bleed .band { overflow: visible; }
.home.bleed .pin-scene { overflow: visible; }

.pin-scene {
  height: auto;
  position: relative;
}
.pin-scene.tall,
.pin-scene.short,
.pin-scene.object-scene,
.pin-scene.book-scene { height: auto; }

.pin.object-pin {
  display: flex;
  flex-direction: column;
  grid-template-columns: none;
  align-items: stretch;
}

.pin {
  position: relative;
  top: auto;
  z-index: 2;
  height: auto;
  min-height: calc(100svh - var(--studio, 46px) - var(--bar-h, 64px));
  display: grid;
  grid-template-columns: minmax(240px, 38%) 1fr;
  gap: 8px 36px;
  align-items: center;
  padding: 28px 96px 28px 56px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.pin-scene.book-scene .pin,
#book .pin {
  min-height: 0;
}
.pin.night {
  background: var(--night);
  color: var(--night-ink);
  border-bottom-color: #282d34;
}
.pin.night .kicker,
.pin.night p { color: var(--night-mute); }
.pin.night h1,
.pin.night h2 { color: var(--night-ink); }
.pin.night .btn { border-color: #f8fafc; background: transparent; color: #f8fafc; }
.pin.night .btn-try { background: #ea580c; border-color: #ea580c; color: #fff; }

.pin .copy h1,
.pin .copy h2 {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(22px, 3.2vw, 38px);
  margin: 0 0 10px;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.pin .copy p { margin: 0 0 10px; font-size: 15px; max-width: 32em; color: #334155; }
.pin .copy .lede { font-size: 16px; }

.copy-stack { position: relative; min-height: 9em; }
.copy-stack [data-at] {
  position: absolute;
  inset: 0 auto auto 0;
  max-width: 32em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms cubic-bezier(0.16, 1, 0.3, 1);
}
.copy-stack [data-at].is-on {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

.stage { position: relative; min-height: 280px; overflow: hidden; }
.stage svg {
  width: 100%;
  height: min(56vh, 420px);
  display: block;
}
.stage svg.how-chain {
  display: none;
  height: 0;
}
#how .stage {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
#how .stage svg.how-walk {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(56vh, 420px);
  aspect-ratio: 640 / 300;
}
.meter {
  font-family: var(--font-m);
  font-size: 11px;
  color: var(--mute);
  margin: 8px 0 0;
}
.cite-stroke { stroke: #0284c7; }
.quiet { stroke: #cbd5e1; }
.core { fill: #0f172a; stroke: none; }
.band-outer { fill: #0f172a; stroke: none; }
.band-inner { fill: #f8f9fa; stroke: none; }
.pin.night .core { fill: #f8fafc; }
.pin.night .band-outer { fill: #f8fafc; }
.pin.night .band-inner { fill: var(--night); }
.pin svg circle:not(.core):not(.band-outer):not(.band-inner):not(.hit) { fill: #f8f9fa; }
.pin.night svg circle:not(.core):not(.band-outer):not(.band-inner):not(.hit) { fill: var(--night); }
.pin svg circle.hit { fill: none; }

.cap-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.cap-row span { opacity: 0.2; flex: 1; text-align: center; }
.cap-row span.is-ready,
.stage .js-cap { }

.js-resolve {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 8px;
  opacity: 0;
  pointer-events: none;
}
.js-resolve .ui-mock {
  min-height: 0;
  pointer-events: auto;
}

/* B — running margin. Content is the page. Graph is the figure. */
.doc-band {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 32px 40px;
  align-items: start;
  min-height: 100vh;
  padding-top: 72px;
  padding-bottom: 72px;
}
.doc-band .stage-sticky {
  position: sticky;
  top: 72px;
  align-self: start;
}
.doc-band .stage-sticky svg {
  width: 100%;
  height: min(52vh, 380px);
}
.band.night .doc-band .meter { color: var(--night-mute); }

.plate-list { margin: 18px 0 0; padding: 0; list-style: none; }
.plate-list li {
  display: grid;
  grid-template-columns: 5.5em 1fr;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #e2e8f0;
  font-size: 14px;
  opacity: 0.28;
}
.plate-list li:first-child { border-top: 0; }
.plate-list li.is-ready { opacity: 1; }
.plate-list .n {
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  padding-top: 2px;
}
.pin.night .plate-list li { border-top-color: #282d34; }
.pin.night .plate-list .n { color: var(--night-mute); }

.fact-list p {
  border-top: 1px solid #e2e8f0;
  padding: 12px 0;
  margin: 0;
  opacity: 0.38;
}
.fact-list p:first-child { border-top: 0; }
.fact-list p.is-on { opacity: 1; }
.fact-list p.is-on strong { color: #0284c7; }
.pin.night .fact-list p { border-top-color: #282d34; }
.pin.night .fact-list p.is-on strong { color: #38bdf8; }

.paper-end {
  padding: 72px 72px 96px;
  max-width: none;
}
.paper-end h2 {
  font-family: var(--font-d);
  font-size: 26px;
  margin: 0 0 12px;
}

.crop-ornament {
  position: absolute;
  right: -8%;
  top: 50%;
  transform: translateY(-50%);
  width: 48%;
  pointer-events: none;
  opacity: 0.9;
  z-index: 0;
}
.crop-ornament svg { width: 100%; height: auto; display: block; }

.band.night .stage svg circle:not(.core):not(.band-outer):not(.band-inner) {
  fill: var(--night);
}
.band.night .stage .core { fill: #f8fafc; }
.band.night .stage .band-outer { fill: #f8fafc; }
.band.night .stage .band-inner { fill: var(--night); }
.band.night .cap-row,
.band.night .meter { color: var(--night-mute); }

.walk-page .hs-head {
  position: sticky;
  top: 46px;
  z-index: 12;
}
.walk-page .pin {
  top: auto;
  height: auto;
  min-height: calc(100svh - var(--studio, 46px) - var(--bar-h, 64px));
}

@media (max-width: 820px) {
  .pin-scene,
  .pin-scene.object-scene,
  .pin-scene.book-scene,
  #object.pin-scene.object-scene { height: auto; }
  #object .pin.object-pin {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  .pin {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
    align-content: start;
    padding: 16px 20px 20px;
    overflow: visible;
  }
  .pin.object-pin { min-height: 0; }
  .doc-band { grid-template-columns: 1fr; min-height: 0; }
  .doc-band .stage-sticky { position: relative; top: 0; }
  .stage svg { height: 200px; }
  .stage svg.how-chain { display: none; height: 0; }
  #how .stage svg.how-walk {
    display: block;
    width: 100%;
    height: min(210px, 32svh);
    max-height: none;
    aspect-ratio: auto;
  }
  .crop-ornament { width: 80%; right: -24%; opacity: 0.55; }
  .paper-end { padding: 48px 20px 72px; }
  .walk-page .hs-head { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  .pin-scene,
  .pin-scene.object-scene,
  .pin-scene.book-scene,
  .pin-scene.tall,
  .pin-scene.short,
  #how.pin-scene,
  #object.pin-scene.object-scene { height: auto; }
  .pin,
  #how .pin,
  .object-scene .pin.object-pin,
  #object .pin.object-pin {
    position: relative;
    top: 0;
    height: auto;
    padding-top: 48px;
    padding-bottom: 48px;
  }
  .doc-band { min-height: 0; }
  .doc-band .stage-sticky { position: relative; top: 0; }
  .copy-stack [data-at] { position: relative; opacity: 1; pointer-events: auto; }
  .js-resolve { opacity: 1; position: relative; left: auto; right: auto; }
  .machine-plate { opacity: 1; }
}
