/* Nide v4. Concept and rules: DESIGN.md. Link ../fonts.css before this file. */

@font-face {
  font-family: 'Reenie Beanie';
  src: url(fonts/reenie-beanie-400-normal.woff2) format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --desk: #0B1424;
  --desk-2: #11203A;
  --paper: #faf8f5;
  --sheet: #ffffff;
  --sunken: #efeee9;
  --ink: #14181F;
  --ink-strong: #0B1424;
  --muted: #4A5364;
  --line: #d6d2ca;
  --cyan: #00A5BD;
  --cyan-bright: #00BED2;
  --cyan-text: #0E7C8C;
  --cyan-tint: #5ED9E6;
  --pencil: #B23A3A;
  --pencil-on-desk: #F08A7E;

  --display: 'Inter Tight', system-ui, sans-serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --hand: 'Reenie Beanie', 'Bradley Hand', cursive;

  --spine: 64px;
  --gutter: clamp(20px, 3.4vw, 56px);
  --rise: cubic-bezier(.25, 1, .5, 1);
  --paper-shadow: 0 1px 1px rgba(11, 20, 36, .18), 0 12px 28px -8px rgba(11, 20, 36, .34);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }

body {
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-left: var(--spine);
  overflow-x: clip;
}

::selection { background: var(--cyan); color: var(--desk); }

img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }

a { color: inherit; }
p a, td a, li a:not([class]) {
  color: var(--cyan-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  transition: text-underline-offset .3s var(--rise), text-decoration-thickness .3s var(--rise);
}
@media (hover: hover) {
  p a:hover, td a:hover, li a:not([class]):hover { text-underline-offset: .32em; text-decoration-thickness: 2px; }
}

:focus-visible { outline: 3px solid var(--cyan-text); outline-offset: 3px; border-radius: 1px; }
.on-dark :focus-visible, .hero :focus-visible, .spine :focus-visible, .colophon :focus-visible { outline-color: var(--cyan-tint); }

.skip {
  position: fixed; left: calc(var(--spine) + 12px); top: 10px; z-index: 100;
  background: var(--sheet); color: var(--ink); padding: 10px 16px; font-weight: 600;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ── Type ───────────────────────────────────────────── */

h1, h2, h3 {
  font-family: var(--display);
  color: var(--ink-strong);
  font-weight: 700;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(3rem, 7.7vw, 9rem); line-height: .96; letter-spacing: -.02em; }
h2 { font-size: clamp(2.2rem, 5vw, 5.4rem); line-height: 1.04; letter-spacing: -.024em; }
h3 { font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.18; letter-spacing: -.008em; font-weight: 600; }

p { max-width: 62ch; }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.45; }
.small { font-size: .875rem; line-height: 1.5; color: var(--muted); }
.data { font-family: var(--mono); font-feature-settings: 'tnum'; }

.note {
  font-family: var(--hand);
  color: var(--pencil);
  font-size: 1.75rem;
  line-height: 1;
  white-space: nowrap;
}

/* ── Spine ──────────────────────────────────────────── */

.spine {
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  width: var(--spine);
  background: var(--desk);
  view-transition-name: spine;
}
.spine::before {  /* the punched sewing holes */
  content: ''; position: absolute; inset: 0 auto 0 calc(50% - 3px); width: 6px;
  background: radial-gradient(circle at 3px 3px, #2b3c5a 2.4px, transparent 3px) 0 0 / 6px 56px repeat-y;
}
.thread {  /* the thread, sewn further as the reader scrolls */
  position: absolute; inset: 0 auto 0 calc(50% - 1.25px); width: 2.5px;
  background: repeating-linear-gradient(to bottom, transparent 0 6px, var(--cyan-bright) 6px 50px, transparent 50px 56px);
  clip-path: inset(0 0 calc(100% - var(--sewn, 0) * 100%) 0);
}
.spine-label {
  position: absolute; left: 0; right: 0; bottom: 20px;
  display: flex; align-items: center;
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: .78rem; font-weight: 500; letter-spacing: .02em; color: #cdd5e2;
  padding-left: 12px;
  background: var(--desk); padding-block: 10px; line-height: 1;
  margin-inline: auto; width: max-content; max-height: 60vh;
  white-space: nowrap;
}

/* ── Header ─────────────────────────────────────────── */

.top {
  position: absolute; top: 0; left: var(--spine); right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px var(--gutter);
}
.top.pinned {
  position: fixed; padding-block: 10px; background: var(--paper);
  box-shadow: 0 1px 0 var(--line), 0 10px 24px -18px rgba(11, 20, 36, .5);
  transform: translateY(-110%); transition: transform .45s var(--rise);
}
.top.pinned.show { transform: none; }
.top.pinned .logo { width: 124px; }
.logo { display: block; width: 158px; flex: none; }
.logo svg { display: block; width: 100%; height: auto; transition: transform .45s var(--rise); }
@media (hover: hover) { .logo:hover svg { transform: translateY(-3px); } }
.logo:focus-visible svg { transform: translateY(-3px); }

.logo .l-a { stroke: #1A2D4D; }
.logo .l-b { stroke: #3E7A52; }
.logo .l-s { fill: #0B1424; }
.on-dark .logo .l-a { stroke: #e6ebf3; }
.on-dark .logo .l-b { stroke: #7fd093; }
.on-dark .logo .l-s { fill: #fff; }
.on-dark .logo .l-n { fill: var(--cyan-bright); }

.nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); font-weight: 500; font-size: .95rem; }
.nav a { position: relative; display: block; padding: 8px 2px; text-decoration: none; color: var(--ink-strong); }
.on-dark .nav a { color: #fff; }

/* A pencil stroke, drawn left to right. It stays on the current page. */
.nav a::after {
  content: ''; position: absolute; left: -2px; right: -2px; bottom: 1px; height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5.4C14 3.1 27 6.2 41 4.2 57 2 73 5.9 99 2.6' fill='none' stroke='%23B23A3A' stroke-width='2' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  clip-path: inset(0 100% 0 0);
  transition: clip-path .45s var(--rise);
}
.on-dark .nav a::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5.4C14 3.1 27 6.2 41 4.2 57 2 73 5.9 99 2.6' fill='none' stroke='%23F08A7E' stroke-width='2' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
}
.nav a[aria-current="page"]::after { clip-path: inset(0); }
.nav a:focus-visible::after { clip-path: inset(0); }
@media (hover: hover) { .nav a:hover::after { clip-path: inset(0); } }

/* ── Buttons: the fill rises from below, the label rolls up ─ */

.btn {
  --b: var(--desk); --f: var(--cyan-bright); --t: #fff; --t2: var(--desk);
  position: relative; display: inline-block; overflow: hidden;
  padding: 15px 26px;
  background: var(--b); color: var(--t);
  font: 600 1rem/1.25 var(--display); letter-spacing: .002em;
  text-decoration: none; border: 0; border-radius: 2px; cursor: pointer;
  isolation: isolate;
  transition: transform .2s var(--rise);
}
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--f);
  transform: translateY(101%); transition: transform .5s var(--rise);
}
.btn > span { display: block; position: relative; transition: transform .5s var(--rise); }
.btn > span::after {
  content: attr(data-t); position: absolute; left: 0; top: 2em; color: var(--t2); white-space: nowrap;
}
.btn { line-height: 1.25; }
.btn > span { height: 1.25em; }
.btn:active { transform: scale(.98); }
.btn:focus-visible::before { transform: none; }
.btn:focus-visible > span { transform: translateY(-2em); }
@media (hover: hover) {
  .btn:hover::before { transform: none; }
  .btn:hover > span { transform: translateY(-2em); }
}
.field .btn:not(.btn-line), .band-price .btn:not(.btn-line), .back .btn:not(.btn-line) { --f: #fff; --t2: var(--desk); }
.btn-cyan { --b: var(--cyan-bright); --f: #fff; --t: var(--desk); --t2: var(--desk); }
.btn-line { --b: transparent; --f: var(--desk); --t: var(--desk); --t2: #fff; box-shadow: inset 0 0 0 2px var(--desk); }
.btn-line-light { --b: transparent; --f: #fff; --t: #fff; --t2: var(--desk); box-shadow: inset 0 0 0 2px #fff; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ── Layout helpers ─────────────────────────────────── */

.wrap { padding-inline: var(--gutter); }
.block { padding-block: clamp(72px, 11vw, 168px); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.grid > * { min-width: 0; }
.stack > * + * { margin-top: 1.1em; }

/* ── Hero: the desk ─────────────────────────────────── */

.hero { position: relative; background: var(--desk); color: #fff; }
.js-motion .hero { height: 320vh; }
.stage {
  position: relative; overflow: hidden; min-height: 100vh; min-height: 100svh;
  display: grid; align-content: end;
}
.js-motion .stage { position: sticky; top: 0; height: 100vh; height: 100svh; }

.hero-copy {
  position: relative; z-index: 6;
  padding: 104px var(--gutter) clamp(28px, 4vw, 52px);
  max-width: 62vw;
}
.hero h1 { color: #fff; }
.hero h1 span { display: block; }
.hero h1.h1-tag { font-size: clamp(2.2rem, 5vw, 6rem); line-height: 1; letter-spacing: -.03em; }
@media (max-width: 560px) { .hero h1.h1-tag { font-size: min(8.4vw, 2.6rem); } }
.hero-copy .lead { margin-top: 22px; max-width: 34em; color: #dbe2ec; }
.hero-copy .tag { margin-top: 10px; font-size: .95rem; color: #aebacb; }
.hero-copy .btns { margin-top: 26px; }

.desk { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.sheet-p { position: absolute; left: 0; top: 0; width: var(--sw); }
.sheet-i { will-change: transform; }

.sheet {
  --sw: 100%;
  position: relative; background: var(--sheet); color: var(--ink);
  box-shadow: var(--paper-shadow);
  padding: 13px 15px 16px; aspect-ratio: 1 / 1.3;
  font: 400 max(11px, calc(var(--sw) * .036))/1.5 var(--mono);
  overflow: hidden;
}
.sheet .fn {
  display: block; font-weight: 600; color: var(--ink-strong);
  border-bottom: 2px solid var(--ink-strong);
  padding-bottom: 6px; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sheet table { width: 100%; border-collapse: collapse; }
.sheet td { padding: 2px 5px; vertical-align: top; border: 1px solid #e4e7ec; white-space: nowrap; }
.sheet td:last-child { text-align: right; width: 34%; }
.sheet tr.sum td { border-top: 1.5px solid var(--ink); font-weight: 600; }
.sheet .hd td { color: var(--muted); }
.sheet .note { position: absolute; font-size: 25px; }
.sheet .pm { position: absolute; overflow: visible; color: var(--pencil); pointer-events: none; }
.sheet td.ring { position: relative; }
.sheet td.ring .pm { left: 4px; right: 2px; top: -3px; bottom: -3px; width: calc(100% - 6px); height: calc(100% + 6px); }
.volume, .sew-lay { z-index: 4; }

.pm path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* the volume: back board, thread, front cover */
.volume { position: absolute; left: 0; top: 0; width: var(--sw); aspect-ratio: 1 / 1.3; perspective: 1800px; pointer-events: none; }
.board { position: absolute; inset: -7px -8px -8px -8px; background: var(--cyan); box-shadow: var(--paper-shadow); }
.cover { box-shadow: inset 12px 0 0 -6px rgba(11,20,36,.16), inset 6px 0 0 0 rgba(11,20,36,.22), 3px 3px 0 #fff, 4px 4px 0 #cfd6df, 6px 6px 0 #fff, 7px 7px 0 #cfd6df, 10px 10px 0 #007f92; }
.cover .c-list { margin-top: 2px; font-weight: 400; font-size: .8rem; max-width: 62%; }
.volume-back { position: absolute; left: 0; top: 0; width: var(--sw); aspect-ratio: 1 / 1.3; }
.sew {
  position: absolute; left: 11px; top: 6px; bottom: 6px; width: 3px;
  background: repeating-linear-gradient(to bottom, var(--cyan) 0 16px, transparent 16px 22px);
  transform-origin: top;
}
.cover {
  position: absolute; inset: -7px -8px -8px -8px;
  background: var(--cyan); color: var(--desk);
  padding: 18px 20px 18px 30px;
  display: flex; flex-direction: column; justify-content: space-between;
  transform-origin: left center;
  backface-visibility: hidden;
  box-shadow: inset 12px 0 0 -6px rgba(11, 20, 36, .16), inset 6px 0 0 0 rgba(11, 20, 36, .22);
}
.cover b { font: 700 clamp(3.2rem, 6vw, 5rem)/.86 var(--display); letter-spacing: -.05em; display: block; }
.cover span { display: block; font: 500 .92rem/1.3 var(--display); }
.cover .data { font-size: .72rem; }
.cover .tick { position: absolute; right: 12px; bottom: 8px; width: 104px; color: var(--desk); overflow: visible; }
.cover .tick path { stroke-width: 3.2; }

/* no script or reduced motion: the desk stays a scattered, composed picture */
.sheet-p:nth-of-type(2) { --sw: 300px; transform: translate(58vw, 14vh) rotate(-8deg); }
.sheet-p:nth-of-type(3) { --sw: 300px; transform: translate(74vw, 8vh) rotate(9deg); }
.sheet-p:nth-of-type(4) { --sw: 300px; transform: translate(63vw, 42vh) rotate(5deg); }
.sheet-p:nth-of-type(5) { --sw: 300px; transform: translate(80vw, 50vh) rotate(-11deg); }
.sheet-p:nth-of-type(6) { --sw: 300px; transform: translate(90vw, 24vh) rotate(4deg); }
.volume, .volume-back { display: none; }
.js-motion .volume, .js-motion .volume-back { display: block; }
.js-motion .sheet-p { transform: none; }

/* ── Statement ──────────────────────────────────────── */

.gap h2 { grid-column: 1 / -1; font-size: clamp(2.7rem, 9.4vw, 12rem); line-height: .96; letter-spacing: -.034em; }
.gap h2 .under { position: relative; display: inline-block; }
.gap h2 .under .pm { position: absolute; left: -2%; width: 104%; bottom: -.14em; height: .2em; color: var(--pencil); overflow: visible; }
.gap h2 .under .pm path { stroke-width: 5; vector-effect: non-scaling-stroke; }
.gap .txt { grid-column: 7 / -1; margin-top: clamp(40px, 6vw, 88px); }
.gap .aside { grid-column: 1 / 6; margin-top: clamp(40px, 6vw, 88px); }
.gap .aside .fnlist { font: 400 .84rem/1.9 var(--mono); color: var(--muted); }
.gap .aside .fnlist li { overflow-wrap: anywhere; }
.gap .aside .fnlist s { text-decoration-color: var(--pencil); text-decoration-thickness: 1.5px; }

/* ── Shelf ──────────────────────────────────────────── */

.shelf-sec { background: var(--sunken); overflow: hidden; }
.shelf-head { grid-column: 1 / 8; }
.shelf-head h2 { margin-bottom: 18px; }
.shelf-intro { grid-column: 8 / -1; align-self: end; }
.shelf {
  position: relative; margin-top: clamp(48px, 6vw, 84px);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 24px; align-items: end;
  --shelf-h: 520px;
  min-height: var(--shelf-h);
}
.books { grid-column: 2; display: flex; align-items: flex-end; gap: 3px; height: var(--shelf-h); }
.books li { display: contents; }
.book {
  --h: 100%;
  position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  flex: var(--w, 1) 1 0; min-width: 0;
  height: var(--h); max-height: var(--shelf-h);
  padding: 18px 0 14px;
  background: var(--desk-2); color: #fff;
  text-decoration: none;
  transition: transform .55s var(--rise), box-shadow .55s var(--rise);
  box-shadow: inset 5px 0 0 rgba(255, 255, 255, .08), inset -5px 0 0 rgba(0, 0, 0, .22);
}
.book .t {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font: 700 clamp(1.5rem, 2.5vw, 2.4rem)/1 var(--display); letter-spacing: -.03em; white-space: nowrap;
}
.book .p { font: 500 .78rem/1 var(--mono); }
.book .b { width: 62%; height: 3px; background: currentColor; opacity: .55; }
.book.base { background: var(--cyan); color: var(--desk); box-shadow: inset 5px 0 0 rgba(255, 255, 255, .22), inset -5px 0 0 rgba(0, 0, 0, .16); }
.book.alt { background: var(--sheet); color: var(--desk); box-shadow: inset 5px 0 0 rgba(0, 0, 0, .04), inset -5px 0 0 rgba(0, 0, 0, .1); }
.book.leaf { background: #2A5B3C; }
.books li.on .book { transform: translateY(-12px); }
@media (hover: hover) { .book:hover, .books li.on .book:hover { transform: translateY(-30px); } }
.book:focus-visible { outline-offset: -6px; transform: translateY(-30px); }

.desc { position: absolute; left: 0; bottom: 0; width: calc(5 / 12 * 100% - 32px); opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .35s var(--rise), transform .55s var(--rise); }
.books li.on .desc { opacity: 1; transform: none; pointer-events: auto; }
.desc h3 { font-size: clamp(1.9rem, 3.2vw, 3rem); letter-spacing: -.02em; line-height: 1; margin-bottom: 14px; }
.desc .state { font-size: .95rem; color: var(--muted); margin-bottom: 14px; }
.desc a { display: inline-block; margin-top: 16px; }

.board-bar { height: 16px; background: var(--desk); box-shadow: 0 16px 24px -14px rgba(11, 20, 36, .5); margin-inline: calc(var(--gutter) * -1); }

/* ── Role: the sheet that changes ───────────────────── */

.role-grid { align-items: start; }
.role-sheet { grid-column: 1 / 7; position: sticky; top: 12vh; }
.ledger {
  position: relative; background: var(--sheet); box-shadow: var(--paper-shadow);
  padding: 22px 24px 52px; font: 400 .86rem/1 var(--mono);
  max-width: 620px;
}
.ledger .fn { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; border-bottom: 2px solid var(--ink-strong); padding-bottom: 10px; margin-bottom: 8px; color: var(--ink-strong); }
.lr { display: grid; grid-template-columns: 5ch 1fr auto 22px; gap: 10px; padding: 6px 0; align-items: center; position: relative; transition: color .6s var(--rise); }
.lr .a { text-align: right; }
.lr .amt, .lr .tx { transition: opacity .5s var(--rise); }
.lr .ok { width: 16px; height: 12px; color: var(--cyan-text); opacity: 0; transition: opacity .4s var(--rise); overflow: visible; }
.lr .ok path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lr .circ { position: absolute; right: 18px; top: -4px; bottom: -4px; width: 86px; height: calc(100% + 8px); color: var(--pencil); overflow: visible; opacity: 0; }
.lr .circ path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ledger .sign { position: absolute; right: 22px; bottom: 6px; font-size: 2.1rem; transform: rotate(-4deg); opacity: 0; transition: opacity .5s var(--rise); }

.ledger[data-state="0"] .a { visibility: hidden; }
.ledger[data-state="2"] .lr:not(.x), .ledger[data-state="3"] .lr:not(.x) { color: #667085; }
.ledger[data-state="2"] .lr.x, .ledger[data-state="3"] .lr.x { font-weight: 600; color: var(--ink-strong); }
.ledger[data-state="1"] .ok, .ledger[data-state="2"] .ok, .ledger[data-state="3"] .ok { opacity: 1; }
.ledger[data-state="2"] .x .ok, .ledger[data-state="3"] .x .ok { opacity: 0; }
.ledger[data-state="2"] .circ, .ledger[data-state="3"] .circ { opacity: 1; }
.ledger[data-state="3"] .sign { opacity: 1; }
.ledger-cap { margin-top: 18px; max-width: 620px; }

.role-copy { grid-column: 8 / -1; }
.role-copy h2 { margin-bottom: 24px; }
.step { min-height: 56vh; padding-top: 12vh; }
.step h3 { margin-bottom: 10px; font-size: clamp(1.4rem, 2.1vw, 1.9rem); letter-spacing: -.012em; }
.role-end { margin-top: 12vh; }

/* ── The open book ──────────────────────────────────── */

.spread-sec { background: var(--desk); }
.spread-sec .head { padding-bottom: 40px; }
.spread-sec h2 { color: #fff; }
.spread { width: 100%; border-collapse: collapse; background: var(--sheet); table-layout: fixed; }
.spread caption { text-align: left; }
.spread th, .spread td { text-align: left; vertical-align: top; padding: 18px clamp(14px, 2vw, 32px); }
.spread thead th { font: 600 clamp(1.15rem, 1.9vw, 1.7rem)/1.1 var(--display); letter-spacing: -.02em; padding-top: 32px; color: var(--ink-strong); }
.spread tbody th { font: 600 1rem/1.3 var(--display); color: var(--ink-strong); }
.spread tbody tr + tr > * { border-top: 1px solid var(--line); }
.spread .old { background: var(--paper); color: var(--muted); }
.spread .new { background: linear-gradient(to right, rgba(11, 20, 36, .1), transparent 34px), var(--sheet); }
.spread td.old, .spread th.old { box-shadow: inset -22px 0 18px -22px rgba(11, 20, 36, .35); }
.spread col.c1 { width: 24%; }
.spread-note { color: #b8c3d3; margin-top: 20px; }

/* ── Price field ────────────────────────────────────── */

.field { background: var(--cyan); color: var(--desk); overflow: hidden; }
.field .big {
  grid-column: 1 / 8;
  font: 700 clamp(6rem, 17vw, 20rem)/.78 var(--display); letter-spacing: -.07em;
  margin-left: -.04em; white-space: nowrap;
}
.field .what { grid-column: 8 / -1; align-self: end; }
.field h2 { font-size: clamp(1.9rem, 3vw, 3rem); letter-spacing: -.018em; line-height: 1.05; color: var(--desk); margin-bottom: 18px; }
.field p { margin-bottom: 22px; }
.field a:not(.btn) { color: var(--desk); }

/* ── Founders ───────────────────────────────────────── */

.founders h2 { grid-column: 1 / 10; }
.person { position: relative; margin-top: clamp(40px, 6vw, 80px); }
.person:nth-of-type(1) { grid-column: 1 / 7; }
.person:nth-of-type(2) { grid-column: 7 / -1; margin-top: clamp(80px, 11vw, 150px); }
.person figure { position: relative; width: 148px; background: var(--sheet); padding: 7px; box-shadow: var(--paper-shadow); transform: rotate(-2.2deg); margin-bottom: 22px; }
.person:nth-of-type(2) figure { transform: rotate(1.6deg); }
.person figure::before {  /* staple */
  content: ''; position: absolute; top: -3px; left: 22px; width: 34px; height: 4px; z-index: 2;
  background: linear-gradient(#cfd4da, #8c939c); border-radius: 2px; box-shadow: 0 1px 1px rgba(0, 0, 0, .35);
  transform: rotate(-4deg);
}
.person img { width: 134px; height: 134px; object-fit: cover; filter: saturate(.92); }
.person h3 { margin-bottom: 8px; }
.founders .more { grid-column: 1 / -1; margin-top: clamp(40px, 5vw, 64px); }

/* ── Back cover ─────────────────────────────────────── */

.back { background: var(--cyan); color: var(--desk); }
.back h2 { color: var(--desk); }
.back .back-a a:not(.btn) { color: var(--desk); }
.back-a { grid-column: 1 / 7; }
.back-a p { margin-top: 18px; }
.back-b { grid-column: 7 / -1; }
.form { background: var(--sheet); color: var(--ink); padding: clamp(22px, 3vw, 36px); box-shadow: var(--paper-shadow); }
.form h3 { margin-bottom: 8px; font-size: clamp(1.6rem, 2.4vw, 2.2rem); letter-spacing: -.015em; }
.form > p { margin-bottom: 20px; font-size: .96rem; }
.f { margin-bottom: 16px; }
.f label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 5px; }
.f input { width: 100%; font: inherit; color: var(--ink); background: var(--paper); padding: 12px; border: 0; border-bottom: 2px solid var(--desk); border-radius: 0; }
.f input:focus-visible { outline-offset: 0; }
.f span { font-weight: 400; color: var(--muted); }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: 10px; margin-bottom: 20px; font-size: .86rem; line-height: 1.45; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--cyan-text); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Colophon ───────────────────────────────────────── */

.colophon { background: var(--desk); color: #cfd7e3; padding-block: clamp(48px, 6vw, 80px) 28px; }
.colophon a, .colophon li a:not([class]) { color: #fff; text-decoration: none; }
.colophon a:hover, .colophon li a:not([class]):hover { text-decoration: underline; text-underline-offset: .2em; }
.col-word { grid-column: 1 / 7; }
.col-word p { font-size: .96rem; max-width: 40ch; }
.col-word em { font-style: normal; font-weight: 600; color: #fff; }
.colophon nav { grid-column: span 2; font-size: .92rem; }
.colophon nav h2 { font: 600 .92rem/1.3 var(--sans); letter-spacing: 0; color: #93a1b6; margin-bottom: 8px; }
.colophon nav a { display: inline-block; padding: 3px 0; }
.legal { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 44px; font-size: .84rem; color: #aab5c6; }
.legal .data { font-size: .8rem; }

/* ── Inner pages ────────────────────────────────────── */

.title-page { background: var(--desk); color: #fff; padding-top: 28px; }
.title-page h1 { color: #fff; }

/* Täsmäytys */
.tp-grid { padding-block: clamp(48px, 7vw, 96px) clamp(48px, 7vw, 96px); align-items: end; }
.tp-a { grid-column: 1 / 7; }
.tp-a .kicker { font: 500 1rem/1.3 var(--display); color: #cfd7e3; margin-bottom: 14px; }
.tp-a .lead { margin-top: 24px; color: #dbe2ec; }
.tp-a .btns { margin-top: 28px; }
.tp-b { grid-column: 7 / -1; }

.match { position: relative; background: var(--sheet); color: var(--ink); box-shadow: var(--paper-shadow); padding: 18px 18px 22px; font: 400 .74rem/1 var(--mono); transform: rotate(.6deg); }
.match .fn { font-weight: 600; color: var(--ink-strong); border-bottom: 2px solid var(--ink-strong); padding-bottom: 9px; margin-bottom: 12px; }
.mcols { position: relative; display: grid; grid-template-columns: 1fr 88px 1fr; }
.mcol b { display: block; font-weight: 600; margin-bottom: 8px; color: var(--muted); }
.mrow .ring { position: relative; }
.mrow .ring svg { position: absolute; left: -9px; right: -9px; top: -6px; width: calc(100% + 18px); height: calc(100% + 12px); overflow: visible; color: var(--pencil); }
.mrow .ring path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.mrow { display: flex; justify-content: space-between; gap: 6px; padding: 7px 0; height: 28px; align-items: center; white-space: nowrap; }
.mthread { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.mthread path { fill: none; stroke: var(--cyan); stroke-width: 2.2; stroke-linecap: round; }
.match .note { position: absolute; right: 14px; bottom: 30px; transform: rotate(-3deg); }
.match .small { font-family: var(--sans); margin-top: 36px; font-size: .76rem; line-height: 1.3; }

.problem h2 { grid-column: 1 / 11; }
.problem .txt { grid-column: 6 / -1; margin-top: clamp(32px, 5vw, 64px); }

.how { background: var(--sunken); }
.how h2 { grid-column: 1 / 7; }
.how .txt { grid-column: 8 / -1; align-self: end; }
.how ol { grid-column: 1 / -1; margin-top: clamp(40px, 5vw, 72px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: s; }
.how li { counter-increment: s; position: relative; padding: 84px 20px 22px; background: var(--sheet); box-shadow: var(--paper-shadow); }
.how li:nth-child(1) { transform: rotate(-.7deg); }
.how li:nth-child(2) { transform: rotate(.5deg) translateY(10px); }
.how li:nth-child(3) { transform: rotate(-.3deg) translateY(-4px); }
.how li:nth-child(4) { transform: rotate(.8deg) translateY(8px); }
.how li::before { content: counter(s); position: absolute; top: 14px; left: 18px; font: 700 4.6rem/1 var(--display); letter-spacing: -.05em; color: var(--cyan-text); }
.how li h3 { margin-bottom: 8px; }

.feat h2 { margin-bottom: clamp(32px, 5vw, 64px); }
.feat dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 5vw, 80px); }
.feat dl > div { padding-block: 18px 22px; border-top: 2px solid var(--desk); }
.feat dt { font: 600 1.15rem/1.2 var(--display); letter-spacing: -.015em; color: var(--ink-strong); margin-bottom: 6px; }

.lead-sec { background: var(--desk); color: #dbe2ec; }
.lead-sec h2 { color: #fff; grid-column: 1 / -1; margin-bottom: clamp(32px, 5vw, 64px); }
.lead-sec .w { grid-column: span 4; }
.lead-sec .lead-two .w { grid-column: span 6; }
.lead-sec .w b { display: block; font: 700 clamp(2rem, 3.6vw, 3.4rem)/1 var(--display); letter-spacing: -.04em; color: var(--cyan-tint); margin-bottom: 12px; }

.notyet-sec .sheet-b { grid-column: 3 / 11; background: var(--sheet); box-shadow: var(--paper-shadow); padding: clamp(24px, 4vw, 56px); transform: rotate(-.5deg); }
.notyet-sec h2 { font-size: clamp(1.9rem, 3.6vw, 3.4rem); margin-bottom: 14px; }
.notyet-sec ul { margin-top: 24px; }
.notyet-sec li { padding-block: 13px; border-top: 1px solid var(--line); }

.band-price { background: var(--cyan); color: var(--desk); }
.band-price .grid { align-items: end; }
.band-price h2 { grid-column: 1 / 7; color: var(--desk); }
.band-price .t { grid-column: 7 / -1; }
.band-price a:not(.btn) { color: var(--desk); }

/* Hinnoittelu */
.price-hero .tp-grid { align-items: start; }
.price-hero .big-p { --f: clamp(6rem, 15vw, 18rem); grid-column: 1 / 8; font: 700 var(--f)/.8 var(--display); letter-spacing: -.07em; color: var(--cyan-bright); margin-left: -.04em; white-space: nowrap; }
.price-hero .big-p small { font: 500 clamp(1rem, 1.6vw, 1.4rem)/1.2 var(--display); letter-spacing: -.01em; color: #fff; display: block; margin: 18px 0 0 calc(var(--f) * .04); white-space: normal; }
.price-hero .side { grid-column: 8 / -1; align-self: end; }
.price-hero h1 { font-size: clamp(2.4rem, 4.2vw, 4.6rem); line-height: 1; letter-spacing: -.04em; margin-bottom: 20px; }
.price-hero .side p { color: #dbe2ec; }
.price-hero .side p + p { margin-top: 14px; }
.price-hero .side .small { color: #b8c3d3; margin-top: 14px; }

.fig-sec { background: var(--sunken); }
.fig-sec h2 { grid-column: 1 / 8; }
.fig-sec .txt { grid-column: 8 / -1; align-self: end; }
.fig-box { grid-column: 1 / -1; margin-top: clamp(32px, 4vw, 56px); }

.list-sec table { width: 100%; border-collapse: collapse; margin-top: clamp(32px, 4vw, 56px); }
.list-sec caption { text-align: left; font-size: .9rem; color: var(--muted); padding-bottom: 10px; }
.list-sec thead th { text-align: left; font: 600 .9rem/1.3 var(--sans); color: var(--muted); padding: 8px 12px 8px 0; border-bottom: 2px solid var(--desk); }
.list-sec tbody th { text-align: left; vertical-align: top; padding: 18px 16px 18px 0; font: 600 1.15rem/1.2 var(--display); letter-spacing: -.015em; color: var(--ink-strong); }
.list-sec tbody th span { display: block; font: 400 .86rem/1.35 var(--sans); letter-spacing: 0; color: var(--muted); margin-top: 3px; }
.list-sec tbody td { vertical-align: top; padding: 18px 16px 18px 0; }
.list-sec tbody tr > * { border-bottom: 1px solid var(--line); }
.list-sec .num { text-align: right; font-family: var(--mono); white-space: nowrap; padding-right: 0; padding-left: 16px; }
.list-sec td.num { font-size: 1.05rem; }
.list-sec tr.base > * { background: rgba(0, 165, 189, .1); }
.list-sec tr.base th { box-shadow: -14px 0 0 rgba(0, 165, 189, .1); }
.list-sec tr.base td:last-child { box-shadow: 14px 0 0 rgba(0, 165, 189, .1); }
.full { margin-top: 40px; display: grid; grid-template-columns: auto 1fr; gap: 12px 32px; align-items: center; background: var(--desk); color: #fff; padding: clamp(22px, 3vw, 36px); }
.full .n { font: 700 clamp(3rem, 6vw, 5.6rem)/.9 var(--display); letter-spacing: -.05em; color: var(--cyan-bright); white-space: nowrap; }
.full h3 { color: #fff; margin-bottom: 6px; }
.full p { color: #dbe2ec; }

.calc-sec { background: var(--sunken); }
.calc-sec h2 { grid-column: 1 / 8; margin-bottom: 14px; }
.calc-sec .txt { grid-column: 1 / 8; }
.calc { grid-column: 1 / -1; margin-top: clamp(32px, 4vw, 56px); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: start; }
.calc > * { min-width: 0; }
.calc-row { display: grid; grid-template-columns: minmax(0, 1fr) 7rem; gap: 16px; align-items: center; padding-block: 11px; border-top: 1px solid var(--line); }
.calc-row label { font-weight: 600; font-size: 1rem; }
.calc-row label span { display: block; font-weight: 400; font-size: .84rem; color: var(--muted); }
.calc-row input { width: 100%; font: 500 1.05rem/1 var(--mono); text-align: right; color: var(--ink); background: var(--sheet); border: 0; border-bottom: 2px solid var(--desk); padding: 11px 10px; border-radius: 0; }
.calc-out { background: var(--sheet); box-shadow: var(--paper-shadow); padding: clamp(20px, 3vw, 32px); position: sticky; top: 24px; }
.calc-out dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; }
.calc-out dt { color: var(--muted); align-self: baseline; }
.calc-out dd { font-family: var(--mono); text-align: right; align-self: baseline; }
.calc-out dd.total { font: 700 clamp(2rem, 3.6vw, 3rem)/1 var(--display); letter-spacing: -.04em; color: var(--ink-strong); }
.calc-out p { margin-top: 16px; font-size: .86rem; line-height: 1.45; }
.calc-out [hidden] { display: none; }

.terms h2 { margin-bottom: clamp(32px, 5vw, 56px); }
.terms dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; }
.terms dl > div { padding-block: 16px 24px; border-top: 2px solid var(--desk); }
.terms dt { font: 600 1.1rem/1.2 var(--display); color: var(--ink-strong); margin-bottom: 6px; }

/* Sewing frame figure: anatomy tones mapped to the brand, inside the wrapper only */
.fig-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 24px; align-items: start; }
.fig-grid > * { min-width: 0; }
.fig-sec .iso {
  --anatomy-page: var(--sunken); --anatomy-card: var(--paper); --anatomy-text: var(--muted); --anatomy-strong: var(--ink-strong);
  --anatomy-lit: var(--cyan-text); --anatomy-mono: var(--mono);
  --anatomy-hi: #26324a; --anatomy-mid: #7f8ba0; --anatomy-lo: #b4bcc9; --anatomy-faint: #d7dbe2; --anatomy-dot: #3a4660;
  --anatomy-lit-top: #7fdde9; --anatomy-lit-shade: #00A5BD;
  background: transparent;
}
.fig-sec .iso { --anatomy-muted: var(--muted); }
.fig-sec .iso-svg .fr {
  --anatomy-paper: #1A2D4D; --anatomy-face: #1A2D4D; --anatomy-top: #28406A;
  --anatomy-shade-0: #0B1424; --anatomy-shade-1: #11203A; --anatomy-shade-2: #1A2D4D; --anatomy-shade-3: #28406A;
  --anatomy-hi: #9fb0cc; --anatomy-mid: #5d7396; --anatomy-lo: #47597a; --anatomy-faint: #3a4c6e; --anatomy-dot: #c9d4e6;
}
.fig-sec .iso-svg .stitch path { stroke: var(--cyan-text); stroke-width: 1.4; }
.pick { background: var(--sheet); padding: 22px 22px 18px; box-shadow: var(--paper-shadow); }
.pick h3 { margin-bottom: 10px; }
.pk { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding-block: 8px; border-top: 1px solid var(--line); font-size: .96rem; line-height: 1.3; }
.pk input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--cyan-text); }
.pk label { font-weight: 600; cursor: pointer; }
.pk label span { display: block; font-weight: 400; font-size: .82rem; color: var(--muted); }
.pk b { font-weight: 500; font-size: .92rem; }
.pk-set { border: 0; }
.pk-set legend { font-weight: 600; font-size: .96rem; padding: 10px 0 6px; }
.pk-set .pk { padding-left: 10px; }
.pk-fixed label { cursor: default; }
.pick-sum { border-top: 2px solid var(--desk); margin-top: 8px; padding-top: 10px; font-size: .95rem; }
.pick-sum span { font: 700 2.6rem/1 var(--display); letter-spacing: -.04em; color: var(--ink-strong); margin-right: 4px; }

/* 404 */
.lost { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--paper); }
.lost .stub { position: relative; background: var(--sheet); margin: 0; box-shadow: var(--paper-shadow); width: 66px; clip-path: polygon(0 0, 90% 0, 72% 6%, 96% 13%, 66% 21%, 88% 29%, 70% 37%, 100% 46%, 64% 53%, 90% 62%, 68% 71%, 94% 79%, 62% 88%, 84% 94%, 70% 100%, 0 100%); }
.lost-copy { grid-column: 1 / -1; align-self: center; padding: 96px var(--gutter); padding-left: calc(var(--gutter) + 90px); }
.lost-copy h1 { max-width: 11em; }
.lost-copy p { margin-top: 22px; }
.lost-copy .btns { margin-top: 26px; }
.lost { position: relative; display: grid; grid-template-columns: 1fr; }
.lost .stub { position: absolute; inset: 0 auto 0 0; height: 100%; }

/* Ported pages. Markup keeps the live pages' structure; layout varies by section position. */
.tp-lead > * + * { margin-top: 14px; }
.tp-lead { margin-top: 24px; color: #dbe2ec; }
.tp-lead .lead { color: #dbe2ec; }
.tp-contact { margin-top: 18px; color: #b8c3d3; }
.tp-contact a { color: #fff; }
.title-page .lawbase { margin-top: 18px; color: #b8c3d3; }
.tp-a .btns { margin-top: 26px; }
.tp-b:empty { display: none; }
.tp-a:has(+ .tp-b:empty) { grid-column: 1 / 11; }
.port-sheet { --sw: 100%; font-size: 13px; max-width: 460px; margin-left: auto; transform: rotate(2.2deg); aspect-ratio: 1 / 1.08; }
.hero-facts { display: grid; gap: 12px; margin-top: 24px; }
.hero-fact dt { font-weight: 600; color: #fff; }

.pg p + p, .pg p + ul, .pg ul + p { margin-top: 1em; }
.pg .shot { margin-bottom: clamp(32px, 4vw, 56px); }
.pg-sunk { background: var(--sunken); }
.pg-ink { background: var(--desk); color: #dbe2ec; }
.pg-ink h2, .pg-ink h3 { color: #fff; }
.pg-ink a:not(.btn) { color: #fff; }
.pg-ink .small { color: #b8c3d3; }
.pg-head { max-width: 62rem; margin-bottom: clamp(32px, 4.4vw, 60px); }
.pg-head h2 + * { margin-top: 18px; }
.pg-split > div:first-child { grid-column: 1 / 7; }
.pg-split > div:last-child { grid-column: 7 / -1; }
.pg-split > div:first-child h2 + * { margin-top: 18px; }
.pg-split + .pg-split, .pg-head + .pg-split { margin-top: 32px; }
.pg:nth-of-type(odd):not(.pg-ink) .pg-split > div:first-child { grid-column: 1 / 11; }
.pg:nth-of-type(odd):not(.pg-ink) .pg-split > div:last-child { grid-column: 5 / -1; margin-top: clamp(28px, 4vw, 56px); }
.pg-split:has(table) > div:first-child, .pg-split:has(table) > div:last-child { grid-column: span 6; margin-top: 0; }

.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 5vw, 80px); }
.feature-grid > div { padding-block: 16px 22px; border-top: 2px solid var(--desk); min-width: 0; }
.pg-ink .feature-grid > div { border-top-color: var(--cyan-bright); }
.feature-grid h3 { font-size: 1.18rem; margin-bottom: 6px; letter-spacing: -.005em; }
.pg .steps { counter-reset: s; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px clamp(24px, 5vw, 80px); }
.pg .pg-split .steps { grid-template-columns: minmax(0, 1fr); }
.pg .steps .step { min-height: 0; padding: 0; counter-increment: s; position: relative; padding-left: 62px; }
.pg .steps .step::before { content: counter(s); position: absolute; left: 0; top: -4px; font: 700 3rem/1 var(--display); letter-spacing: -.04em; color: var(--cyan-text); }
.ticks li, .notyet li { padding-block: 11px; border-top: 1px solid var(--line); }
.pg-ink .ticks li { border-top-color: #33445f; }
.notyet { max-width: 60ch; }
.callout { margin-top: 28px; }
.state { font-weight: 600; font-size: .9em; color: var(--muted); }
.shot { margin-top: clamp(28px, 4vw, 48px); }
.shot img { box-shadow: var(--paper-shadow); }
.shot-narrow { max-width: 620px; }
.shot figcaption, .shot .small { margin-top: 14px; }
.table-wrap { overflow-x: auto; }
.pg table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.pg caption { text-align: left; font-size: .9rem; color: var(--muted); padding-bottom: 10px; }
.pg-ink caption { color: #b8c3d3; }
.pg th, .pg td { text-align: left; vertical-align: top; padding: 11px 16px 11px 0; border-bottom: 1px solid var(--line); }
.pg thead th { border-bottom: 2px solid var(--desk); font-weight: 600; color: var(--muted); }
.pg tbody th { font-weight: 600; color: var(--ink-strong); }
.pg tfoot th, .pg tfoot td { font-weight: 700; color: var(--ink-strong); border-bottom: 0; border-top: 2px solid var(--desk); }
.pg .num { text-align: right; font-family: var(--mono); white-space: nowrap; padding-right: 0; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 28px; }
.stat-num { display: block; font: 700 clamp(2.6rem, 5vw, 4.4rem)/1 var(--display); letter-spacing: -.04em; color: var(--cyan-text); }
.stat-cap { display: block; margin-top: 6px; font-size: .92rem; color: var(--muted); }
.founders-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 72px); }
.founder-head { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.founder-photo { width: 92px; height: 92px; object-fit: cover; padding: 5px; background: var(--sheet); box-shadow: var(--paper-shadow); transform: rotate(-2deg); }
.founder-role { display: block; font-size: .9rem; color: var(--muted); }
.founder ul { margin-top: 12px; }

/* ── Phone and tablet ───────────────────────────────── */

@media (max-width: 1080px) {
  .hero-copy { max-width: 100%; }
  .sheet-p:nth-of-type(n) { --sw: 220px; }
}

@media (max-width: 860px) {
  :root { --spine: 10px; --gutter: 20px; }
  body { font-size: 16.5px; }
  html { scroll-padding-top: 24px; }
  .spine-label { display: none; }
  .spine::before { display: none; }
  .thread { left: 3.75px; }
  .skip { left: 18px; }

  .top { flex-wrap: wrap; padding: 14px var(--gutter); gap: 4px 16px; }
  .logo { width: 128px; }
  .nav { gap: 10px; font-size: .92rem; width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .nav a { padding: 7px 0; }

  h1 { font-size: clamp(2.8rem, 14.2vw, 5rem); }
  h2 { font-size: clamp(2.1rem, 9.6vw, 3.4rem); }

  .hero-copy { padding: 108px var(--gutter) 22px; }
  .hero-copy .lead { font-size: 1.02rem; margin-top: 16px; }
  .hero-copy .tag { display: none; }
  .stage { align-content: start; }
  .js-motion .hero { height: 280vh; }
  .sheet-p:nth-of-type(n) { --sw: 150px; }
  .sheet { font-size: 7.2px; padding: 8px 9px; }
  .sheet .note { font-size: 17px; }
  .cover { padding: 12px 12px 12px 20px; }
  .cover b { font-size: 2.3rem; }
  .cover span { font-size: .68rem; }
  .cover .data { font-size: .54rem; }
  .cover .tick { width: 66px; }
  .sew { left: 7px; }

  .gap .aside, .gap .txt { grid-column: 1 / -1; }
  .gap .aside { order: 3; }
  .shelf-head, .shelf-intro { grid-column: 1 / -1; }

  /* Books lie flat on the phone: the pile, read top to bottom. */
  .shelf { display: block; min-height: 0; }
  .books { display: block; height: auto; }
  .books li { display: block; margin-bottom: 26px; }
  .book { flex-direction: row; height: auto; max-height: none; padding: 14px 16px; justify-content: space-between; margin-bottom: 12px; }
  .book .t { writing-mode: horizontal-tb; transform: none; font-size: 1.5rem; }
  .book .b { display: none; }
  .books li.on .book, .book:focus-visible { transform: none; }
  .desc { position: static; width: auto; opacity: 1; transform: none; pointer-events: auto; }
  .desc h3 { display: none; }
  .board-bar { display: none; }

  .role-sheet { grid-column: 1 / -1; position: relative; top: auto; margin-bottom: 24px; }
  .role-copy { grid-column: 1 / -1; grid-row: 1; margin-bottom: 26px; }
  .role-copy .steps { grid-row: auto; }
  .step { min-height: 0; padding-top: 30px; }
  .role-end { margin-top: 34px; }

  .spread, .spread tbody, .spread tr, .spread th, .spread td { display: block; width: 100%; }
  .spread thead { display: none; }
  .spread tbody tr { padding: 0; }
  .spread tbody tr + tr > * { border-top: 0; }
  .spread tbody tr + tr { border-top: 8px solid var(--desk); }
  .spread tbody th { padding-bottom: 10px; font-size: 1.1rem; }
  .spread td { padding-block: 12px; }
  .spread td::before { content: attr(data-l); display: block; font-weight: 600; font-size: .84rem; color: var(--muted); margin-bottom: 2px; }
  .spread td.old { box-shadow: none; }
  .spread .new { background: var(--sheet); }

  .field .big, .field .what { grid-column: 1 / -1; }
  .field .big { font-size: 27vw; margin-bottom: 26px; }

  .founders h2 { grid-column: 1 / -1; }
  .person:nth-of-type(n) { grid-column: 1 / -1; margin-top: 44px; }

  .back-a, .back-b { grid-column: 1 / -1; }
  .back-b { margin-top: 36px; }

  .col-word { grid-column: 1 / -1; margin-bottom: 28px; }
  .colophon nav { grid-column: span 6; margin-bottom: 20px; }

  .title-page { padding-top: 76px; }
  .tp-grid { padding-top: 32px; }
  .tp-a, .tp-b { grid-column: 1 / -1; }
  .tp-b { margin-top: 36px; }
  .mcols { grid-template-columns: 1fr 34px 1fr; }
  .match { font-size: .62rem; padding: 14px 12px 18px; }
  .problem h2, .problem .txt, .how h2, .how .txt { grid-column: 1 / -1; }
  .how .txt { margin-top: 16px; }
  .how ol, .feat dl, .terms dl { grid-template-columns: minmax(0, 1fr); }
  .lead-sec .w, .lead-sec .lead-two .w { grid-column: 1 / -1; margin-bottom: 24px; }
  .notyet-sec .sheet-b { grid-column: 1 / -1; }
  .band-price h2, .band-price .t { grid-column: 1 / -1; }
  .band-price .t { margin-top: 18px; }

  .pg-split > div:first-child, .pg-split > div:last-child,
  .pg:nth-of-type(odd):not(.pg-ink) .pg-split > div:first-child,
  .pg:nth-of-type(odd):not(.pg-ink) .pg-split > div:last-child,
  .pg-split:has(table) > div:first-child, .pg-split:has(table) > div:last-child { grid-column: 1 / -1; margin-top: 0; }
  .pg-split > div:last-child { margin-top: 22px !important; }
  .feature-grid, .founders-g { grid-template-columns: minmax(0, 1fr); }
  .tp-a:has(+ .tp-b:empty) { grid-column: 1 / -1; }
  .port-sheet { max-width: 300px; margin-inline: auto; font-size: 11px; }
  .price-hero .big-p, .price-hero .side { grid-column: 1 / -1; }
  .price-hero .big-p { --f: 25vw; margin-bottom: 36px; }
  .fig-grid { grid-template-columns: minmax(0, 1fr); }
  .fig-grid .iso, .fig-grid .iso-figure { display: contents; }
  .fig-grid .iso-plate { position: sticky; top: 4px; z-index: 3; }
  .fig-grid .iso-legend { margin-bottom: 8px; }
  .fig-sec h2, .fig-sec .txt, .calc-sec h2, .calc-sec .txt { grid-column: 1 / -1; }
  .fig-sec .txt { margin-top: 16px; }
  .calc { grid-template-columns: minmax(0, 1fr); }
  .calc-out { position: static; }
  .full { grid-template-columns: minmax(0, 1fr); }

  .list-sec caption { display: block; }
  .list-sec tr.base { background: rgba(0, 165, 189, .1); padding-inline: 12px; }
  .list-sec tr.base > * { background: none; box-shadow: none !important; }
  .list-sec thead { display: none; }
  .list-sec table, .list-sec tbody, .list-sec tr { display: block; }
  .list-sec tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; padding-block: 14px; border-bottom: 1px solid var(--line); }
  .list-sec tbody tr > * { border: 0; padding: 0; display: block; }
  .list-sec tbody th { grid-column: 1; }
  .list-sec td.num.p { grid-column: 2; grid-row: 1; }
  .list-sec td.num.s { display: none; }
  .list-sec td.c { grid-column: 1 / -1; margin-top: 8px; }
}

/* ── Page turn: the leaf rotates on the binding ─────── */

@view-transition { navigation: auto; }

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-group(root) { animation: none; }
  ::view-transition-old(root) {
    animation: leaf-turn .72s cubic-bezier(.45, .05, .25, 1) both;
    transform-origin: var(--spine) 50%;
    z-index: 2;
  }
  ::view-transition-new(root) { animation: none; opacity: 1; }
  ::view-transition-group(spine) { z-index: 5; animation: none; }
}
@keyframes leaf-turn {
  to { transform: perspective(2400px) rotateY(-96deg); filter: brightness(.82); }
}

/* ── Reveals ────────────────────────────────────────── */

.pm-draw path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.pm-draw.in path { stroke-dashoffset: 0; transition: stroke-dashoffset .8s var(--rise); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .pm-draw path { stroke-dashoffset: 0; }
  .btn:hover > span, .btn:focus-visible > span { transform: translateY(-2em); }
}

.nb { white-space: nowrap; }
.list-sec tr.base a { color: #0A5A67; }

span.nb { display: inline !important; font: inherit; color: inherit; }
.back .form .btn { --f: var(--cyan-bright); }
.pg-split:has(.shot) > div:first-child, .pg-split:has(.shot) > div:last-child { grid-column: 1 / -1; margin-top: 0; }
.shot img { width: 100%; }
.shot-narrow img { width: 100%; }

/* A pencil bracket marks a human's note. */
.callout, .role-end {
  padding-left: 26px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 100' preserveAspectRatio='none'%3E%3Cpath d='M10 1C4 2 5 8 5 16c0 12 1 22 0 33-1 14 1 28 0 39 0 7-1 10 6 11' fill='none' stroke='%23B23A3A' stroke-width='2' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") left center / 12px 100% no-repeat;
}

/* Long tables scroll inside their own box, with a shadow as the cue. */
.table-wrap {
  background:
    linear-gradient(to right, var(--paper) 30%, transparent) left / 30px 100% no-repeat local,
    linear-gradient(to left, var(--paper) 30%, transparent) right / 30px 100% no-repeat local,
    linear-gradient(to right, rgba(11,20,36,.16), transparent) left / 10px 100% no-repeat scroll,
    linear-gradient(to left, rgba(11,20,36,.16), transparent) right / 10px 100% no-repeat scroll;
}
.pg-sunk .table-wrap { background: none; }

/* Square crop past the round mask in Marko's source photo. */
.person figure { overflow: visible; }
.crop { display: block; overflow: hidden; }
.crop img { transform: scale(1.44); }
img.founder-photo[src*="marko"] { object-fit: cover; object-position: center; }

.mini { width: min(320px, 100%); margin-left: auto; aspect-ratio: 1 / 1.26; background: var(--cyan); color: var(--desk); padding: 20px 22px 18px 34px; display: flex; flex-direction: column; justify-content: space-between; transform: rotate(1.4deg);
  box-shadow: inset 12px 0 0 -6px rgba(11,20,36,.16), inset 6px 0 0 0 rgba(11,20,36,.22), 3px 3px 0 #fff, 4px 4px 0 #cfd6df, 6px 6px 0 #fff, 7px 7px 0 #cfd6df, 10px 10px 0 #007f92; }
.mini b { font: 700 clamp(3rem, 5.4vw, 4.6rem)/.9 var(--display); letter-spacing: -.03em; display: block; }
.mini span { display: block; font: 500 .95rem/1.3 var(--display); }
.mini span.m { font: 400 .78rem/1.4 var(--mono); }
@media (max-width: 860px) { .pg .steps { grid-template-columns: minmax(0, 1fr); } .mini { display: none; } }

/* ══ v4: the products stand out ═══════════════════════════════════════════
   Each Nide-ohjelma is its own volume with its own cover colour. The colour
   is identity only; "perusohjelma / lisäohjelma" is always said in words.
   Text on a cover is ink on the light ones and white on the dark ones. */

.p-vero  { --pc: #00A5BD; --pt: var(--ink-strong); }
.p-tase  { --pc: #5ED9E6; --pt: var(--ink-strong); }
.p-ko    { --pc: #1F3A66; --pt: #fff; }
.p-marg  { --pc: #ffffff; --pt: var(--ink-strong); }
.p-osake { --pc: #2A5B3C; --pt: #fff; }

/* ── Nav: Tuotteet + disclosure with the five programs ── */
.nav-prod { position: relative; display: flex; align-items: center; }
.nav-tg { display: grid; place-items: center; width: 28px; height: 36px; padding: 0; background: none; border: 0; cursor: pointer; color: var(--ink-strong); }
.on-dark .nav-tg { color: #fff; }
.nav-tg svg { width: 11px; height: 8px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--rise); }
.nav-tg[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-menu {
  position: absolute; top: 100%; left: -14px; z-index: 40; width: 330px;
  margin: 0; padding: 8px; list-style: none;
  background: var(--sheet); box-shadow: var(--paper-shadow);
  visibility: hidden; opacity: 0; transform: translateY(6px);
  transition: opacity .25s var(--rise), transform .35s var(--rise), visibility 0s linear .35s;
}
.nav-tg[aria-expanded="true"] + .nav-menu { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
@media (hover: hover) { .nav-prod:hover .nav-menu { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; } }
.nav .nav-menu a, .on-dark .nav .nav-menu a {
  display: grid; grid-template-columns: 12px 1fr; column-gap: 12px; align-items: center;
  padding: 9px 10px; color: var(--ink-strong); border-radius: 2px;
}
.nav .nav-menu a::after { display: none; }
.nav-menu i { grid-row: span 2; align-self: stretch; background: var(--pc); box-shadow: inset 0 0 0 1px rgba(11, 20, 36, .16), inset 3px 0 0 rgba(0, 0, 0, .12); }
.nav-menu b { font: 600 1rem/1.2 var(--display); }
.nav-menu small { font-size: .8rem; line-height: 1.3; color: var(--muted); font-weight: 400; }
.nav .nav-menu a:hover, .nav .nav-menu a:focus-visible, .nav .nav-menu a[aria-current="page"] { background: var(--sunken); }
.nav .nav-menu .nav-all a { grid-template-columns: 1fr; margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0; padding-top: 12px; font-size: .92rem; text-decoration: underline; text-underline-offset: 3px; }
.on-dark .nav-menu :focus-visible { outline-color: var(--cyan-text); }

/* ── Home hero: a direct path to every program in the first screen ── */
.hero-progs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 22px; font-size: .95rem; }
.hero-progs ul { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; }
.hero-progs a { color: #fff; text-underline-offset: 4px; text-decoration-color: rgba(255, 255, 255, .45); }
.hero-progs a:hover { text-decoration-color: currentColor; }
.hero-progs .hp-all { color: #b8c3d3; text-decoration: none; }
.hero-progs .hp-all::after { content: ':'; }

/* ── The index: five covers standing on the board ── */
.vols-sec { background: var(--sunken); padding-bottom: 0; overflow: hidden; }
.vols-sec .shelf-intro > * { max-width: 62ch; }
.vols {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: end;
  margin: clamp(44px, 5vw, 80px) 0 0; padding: 0; list-style: none; height: 400px;
}
.vols li { height: 100%; display: flex; align-items: flex-end; }
.vol {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  width: 100%; height: var(--vh, 100%);
  padding: 22px 20px 20px 30px;
  background: var(--pc); color: var(--pt); text-decoration: none;
  box-shadow: inset 9px 0 0 rgba(0, 0, 0, .13), inset 10px 0 0 rgba(255, 255, 255, .12), var(--paper-shadow);
  transition: transform .55s var(--rise);
}
.vol.p-marg { box-shadow: inset 9px 0 0 rgba(0, 0, 0, .06), inset 0 0 0 1px rgba(11, 20, 36, .1), var(--paper-shadow); }
.vol-badge { font: 600 .82rem/1.25 var(--display); letter-spacing: .01em; }
.vol-name { font: 700 clamp(1.35rem, 1.75vw, 2.1rem)/1 var(--display); letter-spacing: -.03em; hyphens: manual; overflow-wrap: normal; }
.vol-name small { display: block; font-size: .55em; letter-spacing: -.01em; margin-bottom: 4px; }
.vol-job { flex: 1; font-size: .95rem; line-height: 1.45; }
.vol-go { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
@media (hover: hover) { .vol:hover { transform: translateY(-16px); } }
.vol:focus-visible { transform: translateY(-16px); outline-offset: 4px; }
.vols + .board-bar { margin-top: 0; }

/* ── Product title page: the cover in the program's own colour ── */
.title-page.pcover { background: var(--pc); color: var(--pt); }
.title-page.pcover h1 { color: var(--pt); font-size: clamp(2.6rem, 5.6vw, 6.6rem); line-height: .98; overflow-wrap: normal; hyphens: manual; }
.pcover .tp-a { grid-column: 1 / 8; }
.pcover .tp-b { grid-column: 8 / -1; }
.pcover .tp-grid { padding-top: clamp(28px, 4vw, 56px); }
.pcover .tp-a .kicker, .pcover .tp-lead, .pcover .tp-lead .lead, .pcover .tp-contact, .pcover .tp-contact a, .pcover .lawbase { color: var(--pt); }
.cover-light .btn-cyan { --b: var(--desk); --f: #fff; --t: #fff; --t2: var(--desk); }
.pcover.p-marg { box-shadow: inset 0 -1px 0 var(--line); }
.cover-light :focus-visible { outline-color: var(--ink-strong); }

.title-page h1.h1-long { font-size: clamp(2.4rem, 4.4vw, 5rem); line-height: 1; overflow-wrap: normal; }
.title-page .tp-a:has(h1.h1-long) { grid-column: 1 / 10; }

/* Switcher: the five volumes, the current one marked */
.prodbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; padding-top: 92px; font-size: .9rem; }
.prodbar > span { font-weight: 500; }
.prodbar ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.prodbar a {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 9px;
  font: 600 .9rem/1.2 var(--display); color: inherit; text-decoration: none; border-radius: 2px;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, currentColor 30%, transparent);
  transition: box-shadow .25s var(--rise);
}
.prodbar a::before { content: ''; width: 9px; height: 16px; background: var(--pc); box-shadow: inset 0 0 0 1px rgba(11, 20, 36, .25); }
.prodbar a:hover { box-shadow: inset 0 0 0 1.5px currentColor; }
.prodbar a[aria-current="page"] { box-shadow: inset 0 0 0 2.5px currentColor; }

/* Previous / next volume at the foot of every product page */
.next-vol { display: grid; grid-template-columns: 1fr 1fr; }
.nv { display: block; padding: clamp(32px, 4.5vw, 64px) var(--gutter); background: var(--pc); color: var(--pt); text-decoration: none; }
.nv span { display: block; font-weight: 500; margin-bottom: 10px; }
.nv b { font: 700 clamp(1.8rem, 3.4vw, 3.4rem)/1 var(--display); letter-spacing: -.03em; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; text-decoration-color: transparent; transition: text-decoration-color .3s var(--rise); }
.nv:hover b, .nv:focus-visible b { text-decoration-color: currentColor; }
.nv-next { text-align: right; }
.nv.p-marg { box-shadow: inset 0 0 0 1px var(--line); }

@media (max-width: 1100px) {
  .vols { grid-template-columns: repeat(3, minmax(0, 1fr)); height: auto; }
  .vols li { height: auto; }
  .vol { height: auto; min-height: 300px; }
}
@media (max-width: 860px) {
  .nav-menu { left: 0; width: min(330px, calc(100vw - 2 * var(--gutter))); }
  .vols { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .vol { min-height: 0; }
  .vol-job { flex: none; }
  .title-page.pcover h1 { font-size: min(10vw, 4rem); }
  .title-page h1.h1-long { font-size: min(9vw, 3rem); }
  .pcover .tp-a, .pcover .tp-b, .title-page .tp-a:has(h1.h1-long) { grid-column: 1 / -1; }
  .prodbar { padding-top: 36px; }
  .next-vol { grid-template-columns: minmax(0, 1fr); }
  .nv-next { text-align: left; }
}

body:has(.cover-light) .top:not(.pinned) .logo .l-n { fill: var(--ink-strong); }
.prodbar a::before, .nav-menu i { outline: 1px solid color-mix(in srgb, currentColor 40%, transparent); outline-offset: 0; }
.hero .hero-copy .hero-progs ul a { color: #fff; }
.pcover .tp-a .lead { color: var(--pt); }
.vol-job { overflow-wrap: break-word; }
body:has(.cover-light) .top:not(.pinned) :focus-visible { outline-color: var(--ink-strong); }
/* v4 copy: five steps on Tase-erittelyt, sub-headings in the dark lead band */
.how-5 ol { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1180px) { .how-5 ol { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lead-sec .w h3 { color: #fff; margin-bottom: 10px; }
@media (max-width: 860px) { .how-5 ol { grid-template-columns: minmax(0, 1fr); } }

/* v4, 25.11: Marko's perusohjelma table on the hub, and the home "miten Nide" table
   (the before/after "Excel ja muisti" column was dropped: Marko 25.11, no "nyt vs. Nide" comparisons). */
.base-tbl th[scope="row"] { width: 22%; }
.base-tbl tr.all > * { background: var(--paper); }
.spread-2 thead th:first-child { color: var(--muted); font-size: 1rem; }
@media (max-width: 560px) {
  .base-tbl, .base-tbl tbody, .base-tbl tr, .base-tbl th, .base-tbl td { display: block; width: 100%; }
  .base-tbl thead { display: none; }
  .base-tbl tbody tr { padding-block: 14px; border-top: 1px solid var(--line); }
  .base-tbl tbody th, .base-tbl tbody td { border: 0; padding: 4px 0; }
  .base-tbl tbody th[scope="row"] { width: 100%; font-size: 1.1rem; padding-bottom: 8px; }
  .base-tbl td::before { content: attr(data-l); display: block; font-weight: 600; font-size: .84rem; color: var(--muted); margin-bottom: 2px; }
  .base-tbl tr.all { padding-inline: 12px; }
}

/* 30.11: founder photos removed for now; without them the second card's photo-era offset looks like a mistake. */
.person:nth-of-type(2):not(:has(figure)) { margin-top: clamp(40px, 6vw, 80px); }
