/* Inkhop web: Paper & Ink. Tokens follow docs/SPEC.md section 3 and docs/design/UI.md. */

:root {
  color-scheme: light;
  --paper: #F4EFE6;
  --board: #E6DFD2;
  --cell: #EFE9DD;
  --gap: #DCD4C5;
  --ink: #1F1B16;
  --ink-2: #5E564B;
  --ink-soft: #3E3830;
  --card: #FAF6EE;
  --control: #FFFBF4;
  --outline: #1F1B16;
  --ledge: rgba(31, 27, 22, .9);
  --ledge-on-ink: rgba(31, 27, 22, .42);
  --disabled: #6F665A;
  --b0: #D2553A;
  --b1: #E0A12A;
  --b2: #1E8580;
  --b3: #3C4BA6;
  --b4: #8E4A8C;
  --stone: #8A8171;
  /* home tints: each blot colour at 22% over paper (ART.md) */
  --t0: #ECCDC0;
  --t1: #F0DEBD;
  --t2: #C5D8D0;
  --t3: #CCCBD8;
  --t4: #DECBD2;
  --home-alpha: .22;
  --home-edge: .85;
  --blot-stroke: #1F1B16;
  --blot-shadow: rgba(31, 27, 22, .12);
  --sclera: #FFFDF8;
  --pupil: #1F1B16;
  --hatch: rgba(31, 27, 22, .2);

  --font: ui-rounded, "SF Pro Rounded", "SF Compact Rounded", "Nunito", "Quicksand", "Varela Round", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --gutter: clamp(16px, 3.2vw, 40px);
  --lift: 4px;
  --radius-tile: 12.5px;
  --radius-band: clamp(28px, 3.6vw, 48px);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #15130F; --board: #211E18; --cell: #2B2720; --gap: #1A1814;
    --ink: #F2ECE0; --ink-2: #A99F8F; --ink-soft: #D9D1C2;
    --card: #221F19; --control: #2B2720; --outline: #3D372E;
    --ledge: rgba(0, 0, 0, .55); --ledge-on-ink: rgba(0, 0, 0, .55); --disabled: #8A8170;
    --b0: #F0795B; --b1: #F2BE4E; --b2: #3DB5AC; --b3: #8291F2; --b4: #C98BD0; --stone: #6E6657;
    --t0: #573226; --t1: #574622; --t2: #21443E; --t3: #363953; --t4: #4B3749;
    --home-alpha: .3; --home-edge: .75;
    --blot-stroke: transparent; --blot-shadow: rgba(0, 0, 0, .35);
    --sclera: #F2ECE0; --pupil: #15130F; --hatch: rgba(242, 236, 224, .12);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #15130F; --board: #211E18; --cell: #2B2720; --gap: #1A1814;
  --ink: #F2ECE0; --ink-2: #A99F8F; --ink-soft: #D9D1C2;
  --card: #221F19; --control: #2B2720; --outline: #3D372E;
  --ledge: rgba(0, 0, 0, .55); --ledge-on-ink: rgba(0, 0, 0, .55); --disabled: #8A8170;
  --b0: #F0795B; --b1: #F2BE4E; --b2: #3DB5AC; --b3: #8291F2; --b4: #C98BD0; --stone: #6E6657;
  --t0: #573226; --t1: #574622; --t2: #21443E; --t3: #363953; --t4: #4B3749;
  --home-alpha: .3; --home-edge: .75;
  --blot-stroke: transparent; --blot-shadow: rgba(0, 0, 0, .35);
  --sclera: #F2ECE0; --pupil: #15130F; --hatch: rgba(242, 236, 224, .12);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--ink-2) var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
main { overflow-x: clip; }
::selection { background: var(--t1); color: var(--ink); }
h1, h2, h3, p, ul, ol, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 2px; text-decoration-color: var(--b0); text-underline-offset: .2em; transition: text-decoration-color .2s var(--ease-out); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
b, strong { font-weight: 750; }
svg { overflow: visible; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 10; background: var(--control); border: 2px solid var(--outline); border-radius: 12px; padding: 10px 16px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* Placeholders the owner must replace (listed in web/README.md). */
.ph { color: var(--ink-2); text-decoration: underline dashed 1.5px; text-decoration-color: currentColor; text-underline-offset: .22em; white-space: nowrap; }

/* ---------- Shared controls (UI.md: the ink ledge) ---------- */

.tile {
  --ledge-c: var(--ledge);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px;
  background: var(--control); color: var(--ink);
  border: 2px solid var(--outline); border-radius: var(--radius-tile);
  box-shadow: 0 var(--lift) 0 var(--ledge-c);
  font-weight: 750; font-size: 1.0625rem; letter-spacing: -.005em;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform .16s var(--ease-spring), box-shadow .16s var(--ease-spring), background-color .2s;
}
.tile:hover { background: var(--card); }
.tile:active { transform: translateY(3px) scale(.97); box-shadow: 0 1px 0 var(--ledge-c); }
.tile:disabled { cursor: default; background: transparent; color: var(--disabled); box-shadow: none; transform: translateY(var(--lift)); border: 2px solid color-mix(in srgb, var(--disabled) 55%, transparent); }
.tile-ink { --ledge-c: var(--ledge-on-ink); background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tile-ink:hover { background: var(--ink); filter: brightness(1.15); }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.12; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon .icon-dot { fill: currentColor; stroke: none; }

.pill {
  min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: transparent; border: 1.5px solid var(--ink); color: var(--ink);
  font-weight: 700; font-size: .9375rem; cursor: pointer;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out);
}
.pill[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.pill:hover:not([aria-pressed="true"]) { background: var(--control); }

/* The pre-launch store stamp: dashed edge = "not here yet" (UI.md disabled language). */
.stamp {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 20px 10px 14px;
  border: 2.5px dashed var(--ink); border-radius: 16px;
  background: var(--control);
  transform: rotate(-2deg);
}
.stamp-icon { width: 36px; height: 36px; flex: none; }
.stamp-icon circle { fill: var(--b0); }
.stamp-icon rect { fill: var(--b1); }
.stamp-text { display: flex; flex-direction: column; font-weight: 800; font-size: 1.375rem; line-height: 1.05; letter-spacing: -.015em; }
.stamp-text small { font-size: .78rem; font-weight: 650; letter-spacing: .01em; color: var(--ink-2); }

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  grid-template-areas: "copy play";
  align-items: start;
  gap: clamp(32px, 5vw, 88px);
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 56px) var(--gutter) clamp(56px, 7vw, 104px);
  min-height: min(100svh, 940px);
}
.hero-copy { grid-area: copy; display: flex; flex-direction: column; align-items: flex-start; padding-top: 2px; }
.hero-body { display: flex; flex-direction: column; align-items: flex-start; margin-top: clamp(40px, 11vh, 120px); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 850; font-size: 1.625rem; letter-spacing: -.03em; margin-bottom: clamp(32px, 6vh, 72px); border-radius: 10px; }
.mark { width: 44px; height: 44px; }
.mark-trail circle, .mark-eye { fill: var(--ink); }
.mark-leaper { fill: var(--b0); stroke: var(--blot-stroke); stroke-width: 24; }
.mark-pivot { fill: var(--b1); stroke: var(--blot-stroke); stroke-width: 20; }
.mark-home { fill: color-mix(in srgb, var(--b0) 30%, transparent); stroke: var(--b0); stroke-width: 26; }

h1 {
  font-size: clamp(2.875rem, 1rem + 6vw, 5.75rem);
  line-height: .95;
  letter-spacing: -.035em;
  font-weight: 850;
  text-wrap: balance;
  max-width: 9.5ch;
}
.lede { margin-top: clamp(20px, 2.4vw, 32px); font-size: clamp(1.125rem, 1rem + .4vw, 1.375rem); line-height: 1.45; color: var(--ink-2); max-width: 32ch; text-wrap: pretty; }
.cta { margin-top: clamp(28px, 3.6vw, 48px); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.cta-note { font-size: .9375rem; color: var(--ink-2); }

/* Play area */
.play { grid-area: play; width: 100%; max-width: 600px; justify-self: end; display: flex; flex-direction: column; }
.play-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.level-tabs { display: flex; gap: 8px; }
.level-tab {
  position: relative;
  width: 44px; height: 44px; border-radius: 11px;
  border: 1.5px solid var(--ink); background: transparent;
  font-weight: 800; font-size: 1.0625rem; font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out);
}
.level-tab[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.level-tab:hover:not([aria-pressed="true"]) { background: var(--control); }
.level-tab.is-solved::after { content: ""; position: absolute; right: -5px; top: -5px; width: 14px; height: 14px; border-radius: 50%; background: var(--b1); border: 2px solid var(--paper); }

.hud { display: flex; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px;
  border: 2px solid var(--outline); background: var(--control);
}
.chip-label { font-size: .72rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.chip-value { font-size: 1.3125rem; font-weight: 850; font-variant-numeric: tabular-nums; min-width: 1ch; text-align: center; }
.chip-check { display: none; width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chip-par.is-made { background: var(--b1); border-color: var(--outline); }
.chip-par.is-made .chip-label { color: var(--ink); }
.chip-par.is-made .chip-check { display: block; animation: pop .42s var(--ease-spring) both; }
:root[data-theme="dark"] .chip-par.is-made, :root[data-theme="dark"] .chip-par.is-made .chip-label, :root[data-theme="dark"] .chip-par.is-made .chip-value { color: #15130F; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip-par.is-made, :root:not([data-theme="light"]) .chip-par.is-made .chip-label, :root:not([data-theme="light"]) .chip-par.is-made .chip-value { color: #15130F; }
  :root:not([data-theme="light"]) .chip-par.is-made .chip-check { stroke: #15130F; }
}

.board-frame { position: relative; width: 100%; aspect-ratio: 1; }
.board { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.board:focus { outline: none; }

.caption { min-height: 2.6em; display: flex; align-items: center; justify-content: center; text-align: center; margin-top: 14px; font-weight: 700; font-size: 1.125rem; color: var(--ink); }
#caption-text { display: inline-block; transition: opacity .2s var(--ease-out), transform .3s var(--ease-out); }
#caption-text.is-changing { opacity: 0; transform: translateY(6px); }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.controls .tile { min-height: 58px; }

.result {
  position: relative;
  margin-top: 6px; padding: 22px 20px 20px;
  background: var(--card); border: 2px solid var(--outline); border-radius: 24px;
  box-shadow: 0 var(--lift) 0 var(--ledge);
  text-align: center;
  animation: rise .42s var(--ease-out) both;
}
.result.is-par::before { content: ""; position: absolute; inset: 6px; border: 2px solid var(--b1); border-radius: 18px; pointer-events: none; }
.result-stars { display: flex; justify-content: center; align-items: end; gap: 10px; height: 52px; }
.result-stars svg { width: 42px; height: 42px; }
.result-stars svg:nth-child(2) { width: 52px; height: 52px; }
.star-fill { fill: var(--b1); stroke: var(--outline); stroke-width: 1.4; stroke-linejoin: round; }
.star-glint { fill: none; stroke: #FFFDF8; stroke-opacity: .7; stroke-width: 1.4; stroke-linecap: round; }
.star-empty { fill: none; stroke: var(--disabled); stroke-width: 1.2; stroke-dasharray: 2.2 1.8; stroke-linejoin: round; }
.result-stars .star-on { animation: pop .42s var(--ease-spring) both; }
.result-stars .star-on:nth-child(2) { animation-delay: .08s; }
.result-stars .star-on:nth-child(3) { animation-delay: .16s; }
.result-head { margin-top: 12px; font-size: 1.75rem; font-weight: 850; letter-spacing: -.02em; line-height: 1.1; }
.result-detail { margin-top: 4px; color: var(--ink-2); font-weight: 650; font-variant-numeric: tabular-nums; }
.result-note { margin: 12px auto 0; max-width: 34ch; color: var(--ink-soft); text-wrap: pretty; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.result .stamp { margin-top: 18px; }
.play.is-won .caption { display: none; }
@media (min-width: 901px) {
  /* Keep the board and its result card within a laptop viewport. */
  .play { max-width: clamp(440px, calc(100svh - 340px), 600px); }
  .result { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "stars head" "stars detail" "note note" "stamp stamp" "actions actions"; column-gap: 22px; text-align: left; align-items: center; padding: 18px 22px 20px; margin-top: 14px; }
  .result-stars { grid-area: stars; height: auto; align-items: end; }
  .result-head { grid-area: head; margin-top: 0; align-self: end; }
  .result-detail { grid-area: detail; align-self: start; }
  .result-note { grid-area: note; margin: 10px 0 0; max-width: none; }
  .result-actions { grid-area: actions; margin-top: 14px; }
  .result .stamp { grid-area: stamp; justify-self: start; margin-top: 14px; }
}

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { 0% { transform: scale(.2); opacity: 0; } 60% { opacity: 1; } }

/* ---------- Board art (ART.md) ---------- */

.board-rect { fill: var(--board); }
.cell { fill: var(--cell); }
.gap-tile { fill: var(--gap); }
.gap-hatch { stroke: var(--hatch); stroke-width: .03; stroke-linecap: round; }
.gap-rim { fill: none; stroke: var(--hatch); stroke-width: .02; }

.b0 { color: var(--b0); } .b1 { color: var(--b1); } .b2 { color: var(--b2); } .b3 { color: var(--b3); } .b4 { color: var(--b4); }
.home-fill { fill: currentColor; opacity: var(--home-alpha); }
.home-edge { fill: none; stroke: var(--ink); stroke-opacity: var(--home-edge); stroke-width: .035; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: .075 .095; transition: stroke-opacity .3s; }
.home.occupied .home-edge { stroke-dasharray: none; stroke-opacity: .45; stroke-width: .028; }
.home.is-closing .home-edge { animation: close-ring .5s var(--ease-out) both; }
@keyframes close-ring { 0% { stroke-opacity: var(--home-edge); stroke-width: .05; } 100% { stroke-opacity: .45; stroke-width: .028; } }

.blot-fill { fill: currentColor; stroke: var(--blot-stroke); stroke-width: .05; stroke-linejoin: round; }
.blot-shadow { fill: var(--blot-shadow); }
.sclera { fill: var(--sclera); stroke: var(--pupil); stroke-width: .012; }
.iris { fill: var(--pupil); }
.glint { fill: var(--sclera); }
.eye-open { transition: opacity .12s, transform .07s; transform-box: fill-box; transform-origin: center; }
.is-blinking .eye-open { transform: scaleY(.12); }
.eye-asleep, .eye-content { fill: none; stroke: var(--pupil); stroke-width: .036; stroke-linecap: round; opacity: 0; transition: opacity .12s; }
.eye-content { stroke-width: .04; }
:root[data-theme="dark"] .eye-asleep, :root[data-theme="dark"] .eye-content { stroke: #15130F; }
.is-asleep .eye-open, .is-content .eye-open { opacity: 0; }
.is-asleep .eye-asleep, .is-content .eye-content { opacity: 1; }

.stone-fill { fill: var(--stone); stroke: var(--blot-stroke); stroke-width: .05; }
.stone-shadow { fill: var(--blot-shadow); }
.speck { fill: var(--ink); fill-opacity: .28; }

.board .blot { cursor: pointer; outline: none; }
.board .blot.is-asleep { cursor: not-allowed; }
.focus-ring { fill: none; stroke: var(--ink); stroke-width: .045; opacity: 0; }
.board .blot:focus-visible .focus-ring, .board .ghost:focus-visible .focus-ring { opacity: 1; }
.sel-ring { fill: currentColor; fill-opacity: .14; stroke: currentColor; stroke-width: .055; }
.ghost { cursor: pointer; outline: none; }
.ghost .ghost-art { opacity: .42; transition: opacity .15s; }
.ghost:hover .ghost-art, .ghost:focus-visible .ghost-art { opacity: .7; }
.ghost .blot-fill { stroke: currentColor; }
.ghost .blot-shadow { display: none; }
.ghost-hit { fill: transparent; }
.guide { fill: none; stroke: currentColor; stroke-width: .064; stroke-linecap: round; stroke-dasharray: 0 .17; opacity: .85; }
.trail { fill: none; stroke: currentColor; stroke-opacity: .62; stroke-width: .06; stroke-linecap: round; stroke-dasharray: 0 .16; }
.ghost-in { animation: ghost-in .25s var(--ease-out) both; }
@keyframes ghost-in { from { opacity: 0; transform: scale(.6); } }
.ghost-in { transform-box: fill-box; transform-origin: center; }

/* ---------- Home bands (each section is one blot's home) ---------- */

.band {
  --tint: var(--t0);
  position: relative;
  margin: 0 var(--gutter) clamp(16px, 2vw, 24px);
  border-radius: var(--radius-band);
  background: var(--tint);
  --band-pad: clamp(20px, 5.5vw, 80px);
  padding: clamp(48px, 7vw, 104px) var(--band-pad);
}
.band-0 { --tint: var(--t0); --host: var(--b0); }
.band-1 { --tint: var(--t1); --host: var(--b1); }
.band-2 { --tint: var(--t2); --host: var(--b2); }
.band-3 { --tint: var(--t3); --host: var(--b3); }
.band-4 { --tint: var(--t4); --host: var(--b4); }
.band-edge { position: absolute; inset: 0; pointer-events: none; }
.band-edge svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.band-edge rect {
  x: 1.5px; y: 1.5px; width: calc(100% - 3px); height: calc(100% - 3px);
  rx: calc(var(--radius-band) - 1.5px);
  fill: none; stroke: var(--ink); stroke-opacity: var(--home-edge); stroke-width: 2.5px;
  stroke-dasharray: 10 12; stroke-linecap: round;
  transition: stroke-opacity .5s var(--ease-out);
}
.band.is-home .band-edge rect { stroke-dasharray: none; stroke-opacity: .4; stroke-width: 2px; }

.band-inner {
  max-width: 1160px; margin: 0 auto;
  display: grid;
  grid-template-columns: clamp(80px, 9vw, 128px) minmax(0, 1fr);
  column-gap: clamp(20px, 3.5vw, 56px);
  row-gap: clamp(32px, 4vw, 56px);
  align-items: start;
}
.band-inner > :not(.host) { grid-column: 2; }
.host { grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 32px; }
.host-svg { display: block; width: 100%; aspect-ratio: 1; }
.band-head h2 {
  font-size: clamp(2.125rem, 1.15rem + 3.4vw, 3.75rem);
  line-height: 1; letter-spacing: -.03em; font-weight: 850;
  text-wrap: balance; max-width: 16ch;
}
.band-head p { margin-top: 18px; max-width: 40rem; font-size: clamp(1.0625rem, 1rem + .25vw, 1.25rem); line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }

/* Rule: the movable pivot strip */
.strip-demo {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "ctl ctl" "strip go";
  align-items: center; gap: 18px 24px;
}
.strip-controls { grid-area: ctl; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.strip-label { font-weight: 700; margin-right: 6px; }
.strip { grid-area: strip; width: 100%; max-width: 760px; height: auto; }
.strip-go { grid-area: go; min-width: 120px; }
.strip .tick { stroke: var(--ink); stroke-width: .035; stroke-linecap: round; fill: none; }
.strip .tick-label { font: 850 .3px var(--font); fill: var(--ink); text-anchor: middle; }

.facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; max-width: 42rem; }
.facts li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; align-items: start; }
.fact-fig { width: 56px; height: 56px; }
.facts p { color: var(--ink-soft); line-height: 1.45; }
.facts b { color: var(--ink); }
@media (min-width: 1080px) {
  .facts { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: none; gap: 28px; }
  .facts li { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* Rule, accepted from live variant mode: the demo stands on a raised card beside the words and facts. */
.rule-card .strip-demo { background: var(--card); border: 2px solid var(--outline); border-radius: 24px; box-shadow: 0 var(--lift) 0 var(--ledge); padding: clamp(18px, 2vw, 28px); }
@media (min-width: 1080px) {
  .rule-card .band-inner { grid-template-columns: clamp(80px, 9vw, 128px) minmax(0, 1fr) minmax(0, 1fr); }
  .rule-card .band-head { grid-column: 2; grid-row: 1; }
  .rule-card .facts { grid-column: 2; grid-row: 2; grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .rule-card .facts li { grid-template-columns: 48px minmax(0, 1fr); gap: 14px; }
  .rule-card .fact-fig { width: 48px; height: 48px; }
  .rule-card .strip-demo { grid-column: 3; grid-row: 1 / span 2; align-self: start; grid-template-columns: minmax(0, 1fr); grid-template-areas: "ctl" "strip" "go"; }
  .rule-card .strip-go { justify-self: start; }
}

/* Daily */
.share { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 32px; }
.bubble {
  position: relative;
  background: var(--card); border: 2px solid var(--outline); border-radius: 22px;
  box-shadow: 0 var(--lift) 0 var(--ledge);
  padding: 20px 26px 22px;
}
.bubble::after {
  content: ""; position: absolute; left: 30px; bottom: -11px; width: 20px; height: 20px;
  background: var(--card); border-right: 2px solid var(--outline); border-bottom: 2px solid var(--outline);
  border-bottom-right-radius: 5px; transform: rotate(45deg) skew(8deg, 8deg);
}
.share-text { font: 650 1.1875rem/1.6 var(--font); white-space: pre; color: var(--ink); }
.share figcaption { flex: 1 1 16rem; max-width: 26rem; color: var(--ink-soft); font-size: 1rem; line-height: 1.45; padding-bottom: 6px; }

.week-list {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px;
}
.week-list li { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.week-list svg { width: 100%; height: auto; display: block; }
.week-day { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-weight: 800; font-size: 1rem; }
.week-day span { color: var(--ink-soft); font-weight: 650; font-size: .875rem; font-variant-numeric: tabular-nums; }
.week-par { font-size: .9375rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.week-par b { color: var(--ink); }
.week-note { margin-top: 16px; color: var(--ink-soft); font-size: .9375rem; }
.week-list .mini .blot-fill { stroke-width: .07; }

/* Free and the one purchase */
.journey-row { display: flex; gap: 6px; }
.seg {
  flex: var(--n) 1 0; min-width: 0;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  min-height: 116px; padding: 12px 12px 14px;
  border-radius: 14px;
  color: var(--ink);
}
.seg b { font-size: 1.5rem; font-weight: 850; line-height: 1; }
.seg span { font-size: .8125rem; font-weight: 700; line-height: 1.2; }
.seg-free { background: var(--seg); border: 2px solid var(--outline); box-shadow: 0 3px 0 var(--ledge); }
.seg-full { border: 2px dashed var(--ink); background: color-mix(in srgb, var(--seg) 16%, transparent); }
.c0 { --seg: var(--b0); } .c1 { --seg: var(--b1); } .c2 { --seg: var(--b2); } .c3 { --seg: var(--b3); } .c4 { --seg: var(--b4); } .c5 { --seg: var(--ink); } .c6 { --seg: var(--stone); }
.seg-free.c0, .seg-free.c2 { color: #FFFBF4; }
.seg-free.c1 { color: #1F1B16; }
:root[data-theme="dark"] .seg-free { color: #15130F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg-free { color: #15130F; } }
.journey-key { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 14px; font-weight: 700; font-size: .9375rem; }
.journey-key span { display: inline-flex; align-items: center; gap: 8px; }
.journey-key span::before { content: ""; width: 18px; height: 12px; border-radius: 4px; }
.key-free::before { background: var(--ink); }
.key-full::before { border: 1.5px dashed var(--ink); }

.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 28px 48px; }
.tier h3 { font-size: 1.375rem; font-weight: 850; letter-spacing: -.015em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.tier h3 span { font-size: .9375rem; font-weight: 650; color: var(--ink-soft); letter-spacing: 0; }
.ticks { margin-top: 14px; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; line-height: 1.4; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 5px; background: var(--b2); border: 2px solid var(--outline); }
.tier-full .ticks li::before { background: transparent; border: 2px dashed var(--ink); }
.never { font-weight: 750; font-size: 1.125rem; max-width: 40rem; }

/* Promises: what Inkhop leaves out, struck through in ink */
.struck { display: flex; flex-wrap: wrap; gap: 4px clamp(20px, 2.6vw, 40px); }
.struck li { font-size: clamp(2rem, 1rem + 3.6vw, 4.25rem); font-weight: 850; letter-spacing: -.03em; line-height: 1.12; color: var(--ink-soft); }
.struck span { position: relative; display: inline-block; }
.struck span::after {
  content: ""; position: absolute; left: -4%; right: -4%; top: 52%; height: .11em;
  background: var(--ink); border-radius: 1em;
  transform: rotate(-3deg) scaleX(var(--strike, 1)); transform-origin: left center;
  transition: transform .5s var(--ease-out);
}
.struck li:nth-child(even) span::after { transform: rotate(2.5deg) scaleX(var(--strike, 1)); }
.keeps { max-width: 44rem; font-size: clamp(1.125rem, 1rem + .45vw, 1.375rem); line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
.keeps b { color: var(--ink); }

/* FAQ */
.faq { max-width: 46rem; border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1.5px solid color-mix(in srgb, var(--ink) 35%, transparent); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 2px; font-weight: 800; font-size: 1.1875rem; letter-spacing: -.01em;
  border-radius: 8px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--ink);
  background: linear-gradient(var(--ink), var(--ink)) center / 10px 2px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2px 10px no-repeat;
  transition: transform .3s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 2px 22px; max-width: 40rem; color: var(--ink-soft); }

/* Close */
.close { text-align: center; padding: clamp(72px, 10vw, 140px) var(--gutter) clamp(64px, 8vw, 112px); display: flex; flex-direction: column; align-items: center; gap: 28px; }
.close-row { width: min(100%, 520px); height: auto; }
.close h2 { font-size: clamp(2.5rem, 1rem + 5vw, 5rem); line-height: .98; letter-spacing: -.035em; font-weight: 850; text-wrap: balance; }

/* Footer */
.foot { border-top: 2px solid var(--ink); margin: 0 var(--gutter); }
.foot-inner { max-width: 1160px; margin: 0 auto; padding: 28px 0 40px; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px 20px; align-items: center; }
.foot-stone { width: 48px; height: 48px; grid-row: span 2; align-self: start; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; font-weight: 700; }
.foot-links a { text-decoration-color: transparent; }
.foot-links a:hover { text-decoration-color: var(--b0); }
.legal { font-size: .8125rem; color: var(--ink-2); max-width: 64rem; line-height: 1.5; }

/* ---------- Document pages (privacy, support) ---------- */

.doc-top { max-width: 1160px; margin: 0 auto; padding: 28px var(--gutter) 0; }
.doc-top .wordmark { margin-bottom: 0; }
.doc { margin: clamp(32px, 5vw, 64px) var(--gutter) clamp(16px, 2vw, 24px); }
.doc .band-inner { row-gap: 0; }
.doc h1 { font-size: clamp(2.5rem, 1.2rem + 4vw, 4.25rem); max-width: 14ch; }
.doc-body { max-width: 42rem; }
.doc-body > * + * { margin-top: 14px; }
.doc-body .doc-lede { margin-top: 18px; font-size: 1.25rem; color: var(--ink-soft); }
.doc-body h2 { margin-top: 44px; font-size: 1.5rem; font-weight: 850; letter-spacing: -.015em; line-height: 1.2; }
.doc-body h3 { margin-top: 28px; font-size: 1.125rem; font-weight: 800; }
.doc-body h2 + p, .doc-body h3 + p { margin-top: 8px; }
.doc-body p, .doc-body li { color: var(--ink-soft); }
.doc-body .note { background: var(--card); border: 2px solid var(--outline); border-radius: 20px; box-shadow: 0 var(--lift) 0 var(--ledge); padding: 18px 22px; margin-top: 28px; }
.doc-body .note p { color: var(--ink); }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .week-list { grid-template-columns: repeat(7, minmax(108px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--band-pad) 14px; margin: -4px calc(-1 * var(--band-pad)) 0; scroll-padding-inline: var(--band-pad); scrollbar-width: thin; }
  .week-list li { scroll-snap-align: start; }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "play";
    min-height: 0; gap: 28px;
    padding-top: 20px;
  }
  .hero-copy { padding-top: 0; }
  .hero-body { margin-top: 0; }
  .wordmark { margin-bottom: 22px; }
  .play { justify-self: center; }
  .lede { max-width: 38ch; }
  .band-inner { grid-template-columns: minmax(0, 1fr); }
  .band-inner > :not(.host) { grid-column: 1; }
  .host { grid-row: auto; position: static; width: 76px; margin-bottom: -8px; }
  .seg span { display: none; }
  .seg { min-height: 72px; justify-content: center; align-items: center; padding: 8px 4px; }
  .seg b { font-size: 1.125rem; }
  .strip-demo { grid-template-columns: minmax(0, 1fr); grid-template-areas: "ctl" "strip" "go"; }
  .strip-go { justify-self: start; }
}

/* Phones: the board must sit in the first viewport, so the copy above it is short. */
@media (max-width: 560px) {
  .hero { gap: 22px; padding-bottom: 48px; }
  .hero-copy, .hero-body { display: contents; }
  .hero { grid-template-areas: "mark" "title" "play" "lede" "cta"; }
  .wordmark { grid-area: mark; margin-bottom: -6px; font-size: 1.375rem; }
  .mark { width: 36px; height: 36px; }
  h1 { grid-area: title; font-size: clamp(2.5rem, 11.5vw, 3.25rem); max-width: none; }
  .play { grid-area: play; }
  .lede { grid-area: lede; margin-top: 4px; }
  .cta { grid-area: cta; margin-top: 0; }
  .play-top { margin-bottom: 12px; }
  .chip { padding: 0 12px; height: 38px; }
  .level-tab { width: 40px; height: 40px; }
  .band { --band-pad: 20px; padding: 40px var(--band-pad) 44px; }
  .strip-label { flex-basis: 100%; margin: 0 0 2px; }
  .band-inner { row-gap: 28px; }
  .share-text { font-size: 1.0625rem; }
  .bubble { padding: 16px 20px 18px; }
  .journey-row { gap: 4px; }
  .seg { border-radius: 10px; }
  .seg b { font-size: 1rem; }
  .seg-full.c6 b { font-size: .8125rem; }
  .result-actions { grid-template-columns: 1fr; }
  .foot-inner { grid-template-columns: 40px minmax(0, 1fr); }
  .foot-stone { width: 40px; height: 40px; }
}

@media (max-width: 380px) {
  .play-top { justify-content: center; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; }
  .tile:active { transform: none; }
}
