/* ProveKeep home page, redesign of 2026-11-09.
   Loaded after styles.css, home page only. Techniques borrowed from a scroll-told marketing page:
   one object carries the story through a pinned section, dark and light alternate with the header
   inverting, large light headings under mono eyebrows, proof as giant numbers revealed row by row.
   Every motion here is off under prefers-reduced-motion, and the page reads complete without JS:
   the hidden starting states are scoped to .js, which main.js stamps on <html>. */

:root {
  --pk-glow: 0 0 0 1px rgba(52,211,153,.35), 0 0 28px rgba(16,185,129,.35), 0 0 80px rgba(16,185,129,.18);
  --pk-head-h: 66px;
  --pk-bar-h: 40px;
}

/* ---------- announcement bar ---------- */
.announce {
  background: #06101F; color: var(--pk-on-dark-2); font-size: 13.5px;
  border-block-end: 1px solid var(--pk-line-dark);
}
.announce .wrap { min-height: var(--pk-bar-h); display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding-block: 8px; }
.announce strong { color: var(--pk-on-dark); font-weight: 600; }
.announce .pill {
  font-family: var(--pk-font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--pk-emerald-300); border: 1px solid rgba(52,211,153,.35); border-radius: 999px; padding: 2px 9px;
}
.announce a { color: var(--pk-emerald-300); text-decoration: none; font-weight: 600; white-space: nowrap; }
.announce a:hover { text-decoration: underline; }

/* ---------- header: inverts over light sections ---------- */
.site-header { transition: background-color .3s ease, border-color .3s ease; }
.site-header .brand .lockup-dark { display: none; }
.site-header.is-light { background: rgba(248,250,252,.86); border-block-end-color: var(--pk-hairline); }
.site-header.is-light .brand .lockup-light { display: none; }
.site-header.is-light .brand .lockup-dark { display: block; }
.site-header.is-light .nav a:not(.btn) { color: var(--pk-ink-2); }
.site-header.is-light .nav a:not(.btn):hover { color: var(--pk-ink); }
.site-header.is-light .nav-toggle { color: var(--pk-ink); }
@media (max-width: 860px) {
  .site-header.is-light .nav { background: var(--pk-surface); border-block-end-color: var(--pk-hairline); }
  .site-header.is-light .nav a { border-block-end-color: var(--pk-hairline); }
}

/* ---------- type: large and light, under mono eyebrows ---------- */
.section--navy .eyebrow { color: var(--pk-emerald-300); }
.section--navy h1, .section--navy h2, .section--navy h3,
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.h-hero {
  font-weight: 500; letter-spacing: -0.035em; line-height: 1.02;
  font-size: clamp(2.6rem, 7.4vw, 5.6rem);
}
.h-hero em { font-style: normal; color: var(--pk-on-dark-2); }
.h-hero .dot-accent { color: var(--pk-emerald-300); }
.h-section {
  font-weight: 500; letter-spacing: -0.03em; line-height: 1.06;
  font-size: clamp(2rem, 4.6vw, 3.6rem); margin-bottom: 18px;
}
.eyebrow--rule { display: inline-flex; align-items: center; gap: 12px; }
.eyebrow--rule::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .7; }

/* ---------- hero ---------- */
.hero2 {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: calc(100svh - var(--pk-head-h) - var(--pk-bar-h));
  display: grid; align-items: center;
  background:
    radial-gradient(900px 520px at 50% 108%, rgba(16,185,129,.20), transparent 70%),
    radial-gradient(700px 400px at 85% -10%, rgba(37,99,235,.10), transparent 70%),
    var(--pk-navy);
  padding-block: clamp(56px, 9vw, 120px);
}
/* the brand mark at monument scale behind the headline: three chain-check strokes */
.hero2-mark { position: absolute; inset: 0; z-index: -1; display: grid; place-items: center; pointer-events: none; }
.hero2-mark svg { width: min(120vw, 1500px); height: auto; opacity: .09; transform: translateY(calc(var(--hero-shift, 0) * 1px)); }
.hero2-mark path { stroke: url(#hero-mark-grad); }
.hero2 .wrap { text-align: center; }
.hero2 .eyebrow { justify-content: center; }
.hero2 .lead { margin: 26px auto 0; max-width: 58ch; color: var(--pk-on-dark-2); }
.hero2 .cta-row { justify-content: center; }
.hero2 .hero-meta { justify-content: center; margin-top: 40px; }
/* the animated line under the hero, with no word: the motion says "keep going" on its own */
.scroll-cue { display: block; width: 24px; margin: 46px auto 0; padding-block: 4px; text-decoration: none; }
.scroll-cue i { display: block; width: 2px; height: 56px; margin: 0 auto; border-radius: 2px; background: linear-gradient(var(--pk-emerald-300), rgba(52,211,153,0)); box-shadow: 0 0 10px rgba(52,211,153,.35); }
@media (prefers-reduced-motion: no-preference) {
  .scroll-cue i { animation: pk-cue 1.8s ease-in-out infinite; transform-origin: top; }
}
/* opacity is pinned at 0% and 60%: with it set only at 100%, the line faded from its first frame */
@keyframes pk-cue { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- the story: one record's journey (pinned on wide screens) ---------- */
.story { position: relative; background: var(--pk-navy-900); color: var(--pk-on-dark); padding-block: 0; }
.story-pin { padding-block: clamp(64px, 8vw, 104px); }
.story-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.story-lead { font-size: 15px; color: var(--pk-on-dark-2); margin-top: -4px; }
.story-steps { list-style: none; margin: 26px 0 0; padding: 0; counter-reset: step; }
.story-step { padding: 16px 0 16px 22px; border-inline-start: 2px solid var(--pk-line-dark); transition: opacity .35s ease, border-color .35s ease; }
.story-step .num { font-family: var(--pk-font-mono); font-size: 12px; letter-spacing: .14em; color: var(--pk-on-dark-mut); }
.story-step h3 { font-size: 1.3rem; font-weight: 600; margin: 6px 0 6px; letter-spacing: -0.02em; }
.story-step p { font-size: 15px; color: var(--pk-on-dark-2); max-width: 46ch; }
.artefact {
  margin-top: 14px; font-family: var(--pk-font-mono); font-size: 12.5px; line-height: 1.75;
  background: #06101F; border: 1px solid var(--pk-line-dark); border-radius: var(--pk-radius-sm);
  padding: 12px 14px; color: var(--pk-on-dark); overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere;
}
.artefact .k { color: var(--pk-on-dark-mut); }
.artefact .ok { color: var(--pk-emerald-300); }
.artefact .bad { color: #FCA5A5; }
.artefact .note { color: var(--pk-on-dark-mut); font-style: italic; }

/* the stage: four plates, each tilted on its own, and one record travelling down through them */
.story-stage { --ps: min(210px, 25vh); position: relative; height: min(540px, calc(100vh - 145px)); overflow: hidden; }
.plates { position: absolute; inset: 0; perspective: 1400px; }
.plate {
  position: absolute; left: 42%; top: var(--y); width: var(--ps); height: var(--ps); margin: calc(var(--ps) / -2) 0 0 calc(var(--ps) / -2);
  transform: rotateX(64deg) rotateZ(45deg) translateZ(var(--lift, 0px));
  transform-style: preserve-3d; transition: transform .5s cubic-bezier(.22,.61,.36,1), top .5s cubic-bezier(.22,.61,.36,1);
}
.plate .face {
  position: absolute; inset: 0; border-radius: 48px;
  background: linear-gradient(135deg, #1B3A6B 0%, #10264A 55%, #0B1C38 100%);
  border: 1px solid rgba(159,176,201,.20);
  box-shadow: inset 0 0 0 18px rgba(255,255,255,.015);
  transition: background .4s ease, box-shadow .4s ease, border-color .4s ease;
}
.plate .face::after { /* the hole the record passes through */
  content: ""; position: absolute; inset: 31%; border-radius: 26px;
  background: #06101F; box-shadow: inset 0 0 22px rgba(0,0,0,.6);
}
.plate .edge { /* thickness */
  position: absolute; inset: 0; border-radius: 48px; transform: translateZ(-14px);
  background: #081428; border: 1px solid rgba(159,176,201,.08);
}
.plate.is-active .face {
  background: linear-gradient(135deg, #0F7A5A 0%, #0B5F48 55%, #083F33 100%);
  border-color: rgba(52,211,153,.6);
  box-shadow: inset 0 0 0 18px rgba(52,211,153,.06), 0 0 60px rgba(16,185,129,.35);
}
.plate.is-done .face { border-color: rgba(52,211,153,.28); }
.plate[data-i="0"] { --y: 16%; } .plate[data-i="1"] { --y: 39%; }
.plate[data-i="2"] { --y: 62%; } .plate[data-i="3"] { --y: 85%; }
/* the active plate lifts away from its neighbours, the way a layer separates when named */
.story[data-step="0"] .plate[data-i="0"], .story[data-step="1"] .plate[data-i="1"],
.story[data-step="2"] .plate[data-i="2"], .story[data-step="3"] .plate[data-i="3"] { --lift: 26px; }

/* labels beside each plate, with a hairline to it */
.plate-label {
  position: absolute; top: var(--y); left: calc(42% + var(--ps) * .8); right: 0; transform: translateY(-50%);
  display: grid; gap: 4px; transition: color .35s ease;
}
.plate-label::before {
  content: ""; position: absolute; right: calc(100% + 8px); top: 50%; width: 40px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--pk-on-dark-mut));
}
.plate-label b { font-family: var(--pk-font-display); font-weight: 600; font-size: 15px; color: var(--pk-on-dark-mut); }
.plate-label span { font-family: var(--pk-font-mono); font-size: 11.5px; letter-spacing: .04em; color: var(--pk-on-dark-mut); }
.plate-label[data-i="0"] { --y: 16%; } .plate-label[data-i="1"] { --y: 39%; }
.plate-label[data-i="2"] { --y: 62%; } .plate-label[data-i="3"] { --y: 85%; }
.story[data-step="0"] .plate-label[data-i="0"] b, .story[data-step="1"] .plate-label[data-i="1"] b,
.story[data-step="2"] .plate-label[data-i="2"] b, .story[data-step="3"] .plate-label[data-i="3"] b { color: #fff; }
.story[data-step="0"] .plate-label[data-i="0"] span, .story[data-step="1"] .plate-label[data-i="1"] span,
.story[data-step="2"] .plate-label[data-i="2"] span, .story[data-step="3"] .plate-label[data-i="3"] span { color: var(--pk-emerald-300); }

/* the record: the brand mark in a glowing badge, moved by scroll progress (--p, 0 to 1) */
.record {
  position: absolute; left: 42%; top: calc(16% + var(--r, 0) * 69%); z-index: 2;
  width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 16px;
  background: radial-gradient(circle at 35% 30%, #1E4A7E, #0F2447 70%);
  border: 1px solid rgba(52,211,153,.55); box-shadow: var(--pk-glow);
  display: grid; place-items: center;
}
.record svg { width: 40px; height: 40px; }
.record .hash {
  position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  font-family: var(--pk-font-mono); font-size: 11px; color: var(--pk-emerald-300); white-space: nowrap;
  opacity: 0; transition: opacity .3s ease;
}
.story[data-step="2"] .record .hash, .story[data-step="3"] .record .hash { opacity: 1; }
.beam { /* the light falling through the stack */
  position: absolute; left: 42%; top: 10%; bottom: 8%; width: 140px; margin-left: -70px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(16,185,129,.16), transparent);
  filter: blur(6px);
}

/* the steps: the active one is bright, the others recede. Only with JS and wide screens. */
@media (min-width: 860px) and (min-height: 640px) and (prefers-reduced-motion: no-preference) {
  .js .story { height: 300vh; }
  .js .story-pin { position: sticky; top: var(--pk-head-h); min-height: calc(100vh - var(--pk-head-h)); display: grid; align-items: center; padding-block: 24px; }
  .js .story .h-section { font-size: clamp(1.8rem, 2.8vw, 2.5rem); }
  .js .story-steps { margin-top: 18px; }
  .js .story-step { padding-block: 10px; }
  .js .story-step h3, .js .story-step .num { color: var(--pk-on-dark-mut); transition: color .3s ease; }
  /* collapsed, not display:none: inactive steps stay in the accessibility tree and in find-in-page */
  .js .story-step p, .js .story-step .artefact {
    max-height: 0; overflow: hidden; opacity: 0; margin-top: 0; padding-block: 0; border-width: 0;
    transition: max-height .4s ease, opacity .3s ease;
  }
  .js .story-step.is-active { border-color: var(--pk-emerald-300); }
  .js .story-step.is-active h3 { color: #fff; }
  .js .story-step.is-active .num { color: var(--pk-on-dark-2); }
  .js .story-step.is-active p { max-height: 12em; opacity: 1; margin-top: 6px; }
  .js .story-step.is-active .artefact { max-height: 14em; opacity: 1; margin-top: 14px; padding-block: 12px; border-width: 1px; }
}
@keyframes pk-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.story-progress { margin-top: 26px; height: 2px; background: var(--pk-line-dark); border-radius: 2px; overflow: hidden; }
.story-progress i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--pk-emerald-300); }
/* The stage is hidden only where it cannot work: a window too short to hold it, or reduced motion.
   A narrow screen is not one of those; phones get their own pinned layout at the end of this file. */
@media (max-height: 559px), (min-width: 860px) and (max-height: 639px), (prefers-reduced-motion: reduce) {
  .story-grid { grid-template-columns: 1fr; }
  .story-stage { display: none; }
  .story-progress { display: none; }
}

/* ---------- statement, revealed word by word ---------- */
.statement { background: var(--pk-surface); padding-block: clamp(90px, 12vw, 170px); }
.statement p.big {
  font-family: var(--pk-font-display); font-weight: 500; letter-spacing: -0.03em; line-height: 1.12;
  font-size: clamp(2rem, 5.2vw, 4.2rem); color: var(--pk-ink); max-width: 22ch;
}
.statement em { font-style: normal; }
.statement .w { transition: color .25s ease; }
.js .statement .w { color: #66748A; }
.js .statement .w.on { color: var(--pk-ink); }
@media (prefers-reduced-motion: reduce) { .js .statement .w { color: var(--pk-ink); } }

/* ---------- problem, then answer ---------- */
.gaps { background: var(--pk-surface); padding-block-start: 0; }
.gap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); margin-top: 40px; }
.gap-col { border-block-start: 1px solid var(--pk-hairline); padding-block-start: 22px; }
.gap-col .tag { font-family: var(--pk-font-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--pk-fail); }
.gap-col .tag.ans { color: var(--pk-emerald-700); margin-top: 18px; display: block; }
.gap-col h3 { font-size: 1.2rem; font-weight: 600; margin: 8px 0 0; letter-spacing: -0.02em; color: var(--pk-ink); }
.gap-col p { font-size: 15px; color: var(--pk-ink-2); margin-top: 6px; }
@media (max-width: 860px) { .gap-grid { grid-template-columns: 1fr; } }

/* ---------- break the chain ---------- */
.chainlab { background: var(--pk-navy); color: var(--pk-on-dark); }
.chain {
  list-style: none; margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; position: relative;
}
.blk {
  position: relative; border-radius: var(--pk-radius); padding: 14px 14px 12px;
  background: #0C1E3B; border: 1px solid var(--pk-line-dark);
  transition: border-color .3s ease, background .3s ease, transform .3s ease;
}
.blk + .blk::before { /* the link to the previous record */
  content: ""; position: absolute; right: 100%; top: 50%; width: 14px; height: 2px;
  background: var(--pk-emerald-300); transition: background .3s ease;
}
.blk .seq { font-family: var(--pk-font-mono); font-size: 11px; letter-spacing: .1em; color: var(--pk-on-dark-mut); display: flex; justify-content: space-between; align-items: center; }
.blk .st { font-size: 10.5px; padding: 1px 7px; border-radius: 999px; color: var(--pk-emerald-300); background: rgba(16,185,129,.12); }
.blk label { display: block; margin-top: 10px; font-size: 11px; color: var(--pk-on-dark-mut); }
.blk textarea {
  display: block; resize: none; line-height: 1.45; width: 100%; margin-top: 4px; font-family: var(--pk-font-mono); font-size: 12px; color: var(--pk-on-dark);
  background: #06101F; border: 1px solid var(--pk-line-dark); border-radius: 7px; padding: 7px 8px;
}
.blk textarea:focus { outline: none; border-color: var(--pk-emerald-300); }
.blk textarea:focus-visible { outline: 2px solid var(--pk-emerald-300); outline-offset: 2px; }
.blk dl { margin: 10px 0 0; font-family: var(--pk-font-mono); font-size: 11px; display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; }
.blk dt { color: var(--pk-on-dark-mut); }
.blk dd { margin: 0; color: var(--pk-on-dark-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blk.is-edited { border-color: rgba(217,119,6,.7); }
.blk.is-edited .st { color: #FCD34D; background: rgba(217,119,6,.16); }
.blk.is-broken { border-color: rgba(220,38,38,.65); background: #2A1220; }
.blk.is-broken::before { background: var(--pk-fail) !important; }
.blk.is-broken .st { color: #FCA5A5; background: rgba(220,38,38,.16); }
.blk.is-broken dd.prev { color: #FCA5A5; }
@media (prefers-reduced-motion: no-preference) { .blk.is-broken { animation: pk-shake .35s ease; } }
@keyframes pk-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.chain-verdict {
  margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  font-family: var(--pk-font-mono); font-size: 13.5px; padding: 14px 18px; border-radius: var(--pk-radius-sm);
  background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.35); color: var(--pk-emerald-300);
}
.chain-verdict.is-broken { background: rgba(220,38,38,.08); border-color: rgba(220,38,38,.45); color: #FCA5A5; }
.chain-verdict button {
  font: inherit; font-size: 12.5px; color: var(--pk-on-dark); background: transparent; cursor: pointer;
  border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 6px 14px;
}
.chain-verdict button:hover { border-color: rgba(255,255,255,.6); }
.chain-note { margin-top: 14px; font-size: 13.5px; color: var(--pk-on-dark-mut); max-width: 80ch; }
@media (max-width: 1000px) {
  .chain-verdict { position: sticky; bottom: 12px; z-index: 5; background: #0E2A3A; }
  .chain-verdict.is-broken { background: #2A1220; }
  .chain { grid-template-columns: 1fr; gap: 12px; }
  .blk + .blk::before { right: auto; left: 28px; top: auto; bottom: 100%; width: 2px; height: 12px; }
  .blk dl { grid-template-columns: 52px 1fr; }
}

/* ---------- proof in numbers ---------- */
.numbers { background: var(--pk-navy-900); color: var(--pk-on-dark); position: relative; overflow: hidden; }
.numbers::after { /* a soft emerald core the rows pass over */
  content: ""; position: absolute; left: 50%; top: 50%; width: 520px; height: 520px; margin: -260px 0 0 -260px;
  background: radial-gradient(closest-side, rgba(16,185,129,.10), transparent); pointer-events: none;
}
.num-rows { list-style: none; margin: 34px 0 0; padding: 0; position: relative; z-index: 1; }
.num-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px;
  padding: clamp(18px, 3vw, 30px) 0; border-block-end: 1px solid var(--pk-line-dark);
  transition: opacity .6s ease, transform .6s ease;
}
.js .num-row { opacity: .18; transform: translateY(14px); }
@media (prefers-reduced-motion: reduce) { .js .num-row { opacity: 1; transform: none; } }
.js .num-row.reveal { opacity: 1; transform: none; }
.num-row .what { font-size: clamp(1rem, 1.8vw, 1.3rem); color: var(--pk-on-dark); }
.num-row .what small { display: block; font-size: 13.5px; color: var(--pk-on-dark-mut); margin-top: 4px; }
.num-row .n {
  font-family: var(--pk-font-display); font-weight: 500; letter-spacing: -0.04em; line-height: 1;
  font-size: clamp(3rem, 9vw, 7rem); color: #fff; font-variant-numeric: tabular-nums;
}
.num-row .n sup { font-size: .35em; vertical-align: super; color: var(--pk-on-dark-mut); margin-inline-start: 4px; }

/* ---------- frameworks marquee ---------- */
.marquee-band { background: var(--pk-navy-900); padding-block: 0 clamp(56px, 7vw, 90px); }
.marquee-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.marquee-head .eyebrow { margin: 0; }
.marquee-toggle {
  font-family: var(--pk-font-mono); font-size: 12px; color: var(--pk-on-dark); background: transparent; cursor: pointer;
  border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 5px 14px;
}
.marquee-toggle:hover { border-color: rgba(255,255,255,.6); }
.marquee.is-paused .marquee-track { animation-play-state: paused !important; }
.marquee { position: relative; overflow: hidden; margin-top: 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 12px; width: max-content; }
.marquee .fw-tile { flex: none; width: 190px; }
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: pk-marquee 46s linear infinite; }
  .marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
}
@keyframes pk-marquee { to { transform: translateX(calc(-50% - 6px)); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-toggle { display: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { flex-wrap: wrap; width: auto; }
  .marquee-track [aria-hidden="true"] { display: none; }
}

.sample-note { margin-top: 12px; font-size: 13px; color: var(--pk-muted); }

/* ---------- verify offline (terminal) ---------- */
.verify-split .terminal pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.verify-split { align-items: center; }
.terminal .c-dim { color: var(--pk-on-dark-mut); }

/* ---------- closing call ---------- */
.closing {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(800px 420px at 50% 0%, rgba(16,185,129,.18), transparent 70%), var(--pk-navy);
}

/* ---------- pointer spotlight on dark cards (fine pointers only, set by motion.js) ---------- */
.has-spot { position: relative; isolation: isolate; }
.has-spot::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; z-index: -1;
  opacity: 0; transition: opacity .25s ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(52,211,153,.14), transparent 65%);
}
.has-spot:hover::after { opacity: 1; }
.trust-card.has-spot::after, .form-card.has-spot::after {
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(16,185,129,.09), transparent 65%);
}

/* ---------- narrow screens: no grid column may grow past the viewport ---------- */
.split > *, .story-grid > *, .gap-grid > * { min-width: 0; }
@media (max-width: 520px) {
  .hero2 .eyebrow--rule::before { display: none; }
  .announce .wrap { gap: 6px 10px; }
  .num-row { grid-template-columns: 1fr; gap: 6px; }
  .num-row .n { order: -1; }
  .terminal pre { font-size: 12px; }
}

/* ---------- focus on light surfaces ---------- */
[data-tone="light"] :focus-visible, .site-header.is-light :focus-visible { outline-color: var(--pk-emerald-700); }

/* ---------- the pinned story on shorter laptop windows (640 to 860 tall) ---------- */
@media (min-width: 860px) and (min-height: 640px) and (max-height: 860px) and (prefers-reduced-motion: no-preference) {
  .js .story .h-section { font-size: clamp(1.6rem, 2.4vw, 2.1rem); margin-bottom: 8px; }
  .js .story-lead { display: none; }
  .js .story-steps { margin-top: 10px; }
  .js .story-step { padding-block: 6px; }
  .js .story-step h3 { font-size: 1.1rem; margin: 2px 0; }
  .js .story-step.is-active p { font-size: 14px; max-height: 9em; }
  .js .story-step.is-active .artefact { font-size: 12px; line-height: 1.6; margin-top: 10px; padding-block: 9px; }
  .js .story-progress { margin-top: 14px; }
  .plate-label b { font-size: 14px; }
}

/* ---------- the story on phones and narrow windows ---------- */
/* One column, and the stage scaled down from the window height so four plates fit above the text. */
@media (max-width: 859px) {
  .story-grid { grid-template-columns: 1fr; }
  .story-stage { --sh: clamp(170px, 30svh, 250px); --ps: calc(var(--sh) * .4); height: var(--sh); }
  .plate, .record, .beam { left: 27%; }
  .plate .face, .plate .edge { border-radius: 23%; }
  .plate .face { box-shadow: inset 0 0 0 7px rgba(255,255,255,.015); }
  .plate .face::after { border-radius: 30%; box-shadow: inset 0 0 10px rgba(0,0,0,.6); }
  .plate .edge { transform: translateZ(-6px); }
  .plate.is-active .face { box-shadow: inset 0 0 0 7px rgba(52,211,153,.06), 0 0 28px rgba(16,185,129,.35); }
  .story[data-step="0"] .plate[data-i="0"], .story[data-step="1"] .plate[data-i="1"],
  .story[data-step="2"] .plate[data-i="2"], .story[data-step="3"] .plate[data-i="3"] { --lift: 11px; }
  .record { width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 8px; }
  .record svg { width: 19px; height: 19px; }
  .record .hash { display: none; }
  .beam { width: 64px; margin-left: -32px; }
  .plate-label { left: calc(27% + var(--ps) * .8 + 30px); gap: 0; }
  .plate-label::before { width: 22px; right: calc(100% + 6px); }
  .plate-label b { font-size: 12.5px; line-height: 1.2; }
  .plate-label span { display: none; }
}
/* Pinned, the same way as on a laptop: the section is tall, the pin holds the screen, and scroll
   progress moves the record. Heading, then the stage, then only the step the record is in. */
@media (max-width: 859px) and (min-height: 560px) and (prefers-reduced-motion: no-preference) {
  .js .story { height: 320svh; }
  .js .story-pin {
    position: sticky; top: var(--pk-head-h); height: calc(100svh - var(--pk-head-h));
    padding-block: 18px 14px; overflow: hidden;
  }
  .js .story-grid { height: 100%; gap: 0; align-content: start; grid-template-rows: auto auto 1fr auto; }
  .js .story-copy { display: contents; }
  .js .story .eyebrow, .js .story-lead { display: none; }
  .js .story .h-section { order: 1; font-size: clamp(1.35rem, 6vw, 1.7rem); margin: 0 0 6px; }
  .js .story-stage { order: 2; }
  .js .story-steps { order: 3; margin-top: 10px; min-height: 0; align-self: start; }
  .js .story-progress { order: 4; margin-top: 10px; }
  /* collapsed, not display:none, so every step stays in the accessibility tree and in find-in-page */
  .js .story-step {
    max-height: 0; overflow: hidden; opacity: 0; padding-block: 0; border-color: transparent;
    transition: opacity .3s ease;
  }
  .js .story-step.is-active { max-height: 60svh; opacity: 1; padding-block: 2px; border-color: var(--pk-emerald-300); }
  .js .story-step h3 { font-size: 1.15rem; margin: 3px 0 4px; }
  .js .story-step p { font-size: 14.5px; max-width: none; }
  .js .story-step .artefact { display: none; }
}
/* The artefact needs room; it joins on taller phones. */
@media (max-width: 859px) and (min-height: 740px) and (prefers-reduced-motion: no-preference) {
  .js .story-step .artefact { display: block; font-size: 11.5px; line-height: 1.6; margin-top: 10px; padding: 9px 11px; }
}
