

html { scroll-padding-top: calc(var(--bar-h) + 0.75rem); }

.ph {
  position: relative;
  padding-top: calc(var(--bar-h) + clamp(2.25rem, 6vw, 6rem));
  padding-bottom: clamp(3.5rem, 8vw, 7.5rem);
  overflow: clip;
}
.ph__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: center;
}
.ph__copy { display: grid; gap: var(--s5); align-content: start; }
.ph__h1 { max-width: 15ch; }

.ph__h1--long { font-size: clamp(2.4rem, 1.6rem + 3.2vw, 3.9rem); }
.ph__lede { max-width: 44ch; animation: ph-rise 900ms var(--ease) 80ms both; }
.ph__note { font-size: var(--t-sm); color: var(--fg-soft); max-width: 52ch; }
.ph__art { position: relative; min-width: 0; }
@keyframes ph-rise { from { transform: translateY(1.1rem); } to { transform: none; } }
@media (max-width: 960px) {
  .ph__grid { grid-template-columns: minmax(0, 1fr); gap: var(--s7); }
  .ph__h1 { max-width: 18ch; }
}

.on-g2 { --ground: var(--g2); --surface: var(--g3); --plate: var(--g3); background: var(--ground); color: var(--fg); }

.sh { display: grid; gap: var(--s4); max-width: 48rem; margin-bottom: clamp(2rem, 4.5vw, 3.75rem); }
.sh .h2 { max-width: 22ch; }
.sh p { color: var(--fg-soft); max-width: 58ch; text-wrap: pretty; }

.has-edge { position: relative; }
.edge {
  position: absolute; left: 0; bottom: calc(100% - 1px);
  width: 100%; height: clamp(2.25rem, 5.5vw, 5rem);
  pointer-events: none; overflow: visible;
  view-timeline: --edge block;
}
.edge__fill { fill: var(--ground); }
.edge__line {
  fill: none; stroke: var(--accent); stroke-width: 1.25;
  vector-effect: non-scaling-stroke; opacity: 0.85;
}

[data-scan] { position: relative; view-timeline: --scan block; }

[data-scan] > :not(.scan) { position: relative; z-index: 1; }
.scan {
  position: absolute; inset: 0; z-index: 0;
  border-radius: inherit; overflow: clip; pointer-events: none;
  opacity: 0; transition: opacity 360ms var(--ease);
}
html.is-scrolling .scan { opacity: 1; transition-duration: 140ms; }

.scan--over { z-index: 2; }
.scan::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    transparent 0 55%,
    color-mix(in oklab, var(--accent) 9%, transparent) calc(100% - 2px),
    var(--accent) calc(100% - 1px) 100%);
  transform: translateY(-101%);
  opacity: 0;
}

[data-lit] { color: var(--fg); }
.ro[data-lit]::before, .ro[data-lit]::after { color: var(--br, var(--accent)); }

.nw { white-space: nowrap; }

.ro--lg { font-size: var(--t-base); }
.ro--xl { font-size: var(--t-lg); letter-spacing: 0.02em; }

.ro--wrap { display: block; white-space: normal; }

.facts { display: grid; }
.facts > div {
  display: grid; grid-template-columns: minmax(7.5rem, 0.32fr) minmax(0, 1fr);
  gap: var(--s2) var(--s5); padding-block: var(--s4);
  border-top: 1px solid var(--rule);
}
.facts > div:last-child { border-bottom: 1px solid var(--rule); }
.facts dt {
  font-family: var(--f-display); font-weight: 500; font-size: var(--t-sm);
  letter-spacing: 0.04em; color: var(--fg-soft); padding-top: 0.14em;
}
.facts dd { color: var(--fg); max-width: 60ch; text-wrap: pretty; }
.facts .num { font-weight: 500; }
@media (max-width: 600px) {
  .facts > div { grid-template-columns: minmax(0, 1fr); gap: var(--s1); }
}

.art { width: 100%; height: auto; overflow: visible; }
.art use, .art path.pl {
  fill: none; stroke: var(--fg); stroke-width: 2.4;
  stroke-linejoin: miter; stroke-miterlimit: 6;
}
.art .crown, .art path.pl.crown { stroke: var(--accent); stroke-width: 2.9; }
.art .ghost { stroke: var(--fg-soft); stroke-dasharray: 4 3.2; opacity: 0.7; }

.tick {
  width: 1.05rem; height: 1.05rem; flex: none; overflow: visible; vertical-align: middle;
  color: var(--tk, var(--accent));
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: square; stroke-linejoin: miter;
}
.no { display: inline-block; width: 0.8rem; height: 1px; background: color-mix(in oklab, var(--fg-soft) 70%, transparent); vertical-align: middle; }

.on-paper .link { text-decoration-color: color-mix(in oklab, var(--teal-p) 55%, transparent); }
.on-pine .link { text-decoration-color: color-mix(in oklab, var(--teal) 55%, transparent); }

.close-a { padding-block: calc(var(--band) * 0.9) calc(var(--band) * 1.05); }
.close-a__grid {
  display: grid; grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(2rem, 6vw, 6rem); align-items: center;
}
.close-a__mark { width: min(100%, 17rem); justify-self: center; }
.close-a__mark svg { width: 100%; height: auto; overflow: visible; }
.close-a__mark path { fill: none; stroke-linejoin: miter; stroke-miterlimit: 6; }
.close-a__copy { display: grid; gap: var(--s5); }
.close-a__copy .h2 { max-width: 18ch; }
.close-a__copy .lede { color: var(--fg-soft); max-width: 48ch; }
.close-a__lines { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); align-items: center; }
.close-a__line {
  color: var(--fg-soft); text-decoration: none; font-size: var(--t-sm);
  transition: color var(--d-fast) var(--ease);
}
.close-a__line .num { color: var(--fg); font-size: var(--t-base); transition: color var(--d-fast) var(--ease); }
@media (hover: hover) and (pointer: fine) { .close-a__line:hover, .close-a__line:hover .num { color: var(--accent); } }
@media (max-width: 760px) {
  .close-a__grid { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .close-a__mark { width: 7.5rem; justify-self: start; }
}

.stepper {
  display: inline-grid; grid-template-columns: 2.75rem 3.5rem 2.75rem;
  border: 1px solid var(--hair-strong); border-radius: var(--r-md);
  overflow: clip; background: var(--g1);
}
.stepper button {
  background: transparent; border: 0; color: var(--fg); min-height: 2.75rem;
  font-family: var(--f-display); font-size: 1.15rem; line-height: 1;
  transition: background-color var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
}
@media (hover: hover) and (pointer: fine) { .stepper button:hover:not([aria-disabled="true"]) { background: var(--g3); color: var(--accent); } }
.stepper button:active:not([aria-disabled="true"]) { background: var(--g3); transform: translateY(1px); }
.stepper button[aria-disabled="true"] { color: color-mix(in oklab, var(--fg-soft) 45%, transparent); cursor: not-allowed; }
.stepper button:focus-visible { outline-offset: -3px; }
.stepper input {
  width: 100%; min-width: 0; text-align: center; border: 0; border-inline: 1px solid var(--hair-strong);
  background: transparent; color: var(--fg); font-family: var(--f-display);
  font-variant-numeric: tabular-nums; font-size: var(--t-base); -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus-visible { outline-offset: -3px; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    
    .edge__line { animation: edge-draw linear both; animation-timeline: --edge; animation-range: cover 0% cover 42%; }

    .scan::before {
      animation: scan-pass linear both;
      animation-timeline: --scan;
      animation-range: cover 35vh cover calc(100% - 35vh);
    }
    [data-lit] {
      animation: lit-on linear both;
      animation-timeline: --scan;
      animation-range:
        cover calc(35vh + (100% - 70vh) * var(--f, 0) - 1.5vh)
        cover calc(35vh + (100% - 70vh) * var(--f, 0));
    }

    .lift-host { view-timeline: --lifter block; }
    .lift-host .lift { animation: lift-up linear both; animation-timeline: --lifter; animation-range: cover 55% cover 100%; }

    .close-a__mark { view-timeline: --home block; }
    .close-a__mark .p {
      animation: home-in linear both; animation-timeline: --home; animation-range: cover 4% cover 46%;
    }
    .close-a__mark .p1 { --dy: 24px; }
    .close-a__mark .p2 { --dy: 11px; }
    .close-a__mark .p3 { --dy: -16px; }
  }
}
@keyframes edge-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes scan-pass {
  0% { transform: translateY(-101%); opacity: 1; }
  86% { opacity: 1; }
  100% { transform: translateY(0); opacity: 0; }
}
@keyframes lit-on {
  from { color: var(--fg-soft); --br: color-mix(in oklab, var(--accent) 38%, transparent); --tk: color-mix(in oklab, var(--fg-soft) 55%, transparent); }
  to { color: var(--fg); --br: var(--accent); --tk: var(--accent); }
}
@keyframes home-in { from { translate: 0 var(--dy, 0); } to { translate: 0 0; } }
@keyframes lift-up { to { translate: 0 calc(var(--i, 1) * var(--lift-step, -10px)); } }

@media (prefers-reduced-motion: reduce) {
  .ph__lede { animation: none; }
  .edge__line, .scan::before, [data-lit], .close-a__mark .p, .lift-host .lift { animation: none !important; }
  .scan { display: none; }
  .stepper button:active:not([aria-disabled="true"]) { transform: none; }
}
