/* OTCBag: a section drawing on drafting film. Floors, not cards: big sections are separated by hatched slabs.
   One accent, jade, means the bag sold over the counter: the desk's side of every drawing, the one main action, swapped. */

@font-face { font-family: 'Jost'; src: url('/fonts/Jost.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('/fonts/Newsreader.ttf') format('truetype'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Azeret Mono'; src: url('/fonts/AzeretMono.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }

:root {
  --film: #EDF1F0;
  --film-2: #E1E7E5;
  --paper: #F8FAF9;
  --ink: #1B2124;
  --ink-2: #495257;
  --ink-3: #5C666B;
  --edge: #7A8488;           /* borders that identify a control: 3.3:1 on film */
  --line: rgba(27, 33, 36, 0.14);
  --line-2: rgba(27, 33, 36, 0.26);
  --jade: #0D6B52;
  --jade-deep: #09523F;
  --jade-tint: #D3E7DF;
  --bad: #A3261B;
  --down: #B3261E;           /* a price falling: only ever the dumped side of a comparison */
  --warn: #8A5A00;

  --sans: 'Jost', 'Futura', 'Century Gothic', system-ui, sans-serif;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --mono: 'Azeret Mono', ui-monospace, 'Cascadia Mono', Menlo, monospace;

  --wrap: 1240px;
  --gutter: max(clamp(16px, 4vw, 40px), env(safe-area-inset-left), env(safe-area-inset-right));
  --floor: clamp(64px, 9vw, 120px);
  --radius: 2px;
  --top: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --hatch: repeating-linear-gradient(-45deg, var(--ink) 0 1.1px, transparent 1.1px 7px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-block-start: calc(var(--top) + 16px); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  background: var(--film);
  color: var(--ink);
  font: 400 1rem/1.5 var(--sans);
  font-feature-settings: 'kern' 1;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--jade); }
:focus-visible { outline: 2px solid var(--jade); outline-offset: 2px; border-radius: 1px; }
::selection { background: var(--jade-tint); color: var(--ink); }
h1, h2, h3 { font-family: var(--sans); font-weight: 500; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1.02; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.25rem); line-height: 1.1; }
h3 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.num { font-weight: 450; }
.muted { color: var(--ink-3); }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.prose p, .lede, .read { font-family: var(--serif); font-size: 1.125rem; line-height: 1.55; max-width: 34em; color: var(--ink-2); }
.prose p + p { margin-top: 1em; }
.lede b, .read b, .prose b { color: var(--ink); font-weight: 600; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--film); padding: 10px 14px; z-index: 50; }
.skip:focus { top: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- the demo strip, header and nav ---------------------------------------------------------- */
.demo-strip { margin: 0; padding: 7px var(--gutter); background: var(--ink); color: var(--film); font-size: 0.875rem; line-height: 1.35; }
.demo-strip b { font-weight: 600; }
.topbar { position: sticky; top: 0; z-index: 20; background: var(--film); border-bottom: 1px solid var(--line-2); }
.topbar-in { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); height: var(--top); display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; color: var(--ink); text-decoration: none; flex: none; min-height: 44px; }
.lockup { height: 26px; width: auto; }
.nav { display: flex; gap: 8px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 10px; text-decoration: none; color: var(--ink-2); font-size: 1rem; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current='page'] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.ca-chip { display: contents; }
.ca-chip-inner { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--radius); background: transparent; color: var(--ink-2); font: 400 0.8125rem/1 var(--mono); cursor: default; }
button.ca-chip-inner { cursor: pointer; }
.ca-chip-inner b { font-weight: 500; color: var(--ink); }

/* ---- buttons ------------------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 18px; border: 1.5px solid var(--ink); border-radius: var(--radius);
  background: transparent; color: var(--ink); font: 500 1rem/1 var(--sans); letter-spacing: 0;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .1s var(--ease);
}
.btn:hover { background: var(--film-2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--jade); border-color: var(--jade); color: #fff; }
.btn-primary:hover { background: var(--jade-deep); border-color: var(--jade-deep); }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 1.0625rem; }
.btn-wide { width: 100%; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .45; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 10px 0; min-height: 44px; color: var(--ink-2); font: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 0.18em; cursor: pointer; }
.link-btn:hover { color: var(--ink); text-decoration-color: var(--jade); }
.text-link { color: var(--ink); text-decoration-color: var(--jade); text-decoration-thickness: 1.5px; }
.wallet-btn { min-width: 112px; }
.wallet-btn .dot { width: 8px; height: 8px; background: var(--jade); flex: none; }
.wallet-slot { position: relative; }
.wallet-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(320px, calc(100vw - 32px));
  background: var(--paper); border: 1px solid var(--ink); border-radius: var(--radius); padding: 16px;
  display: grid; gap: 4px; box-shadow: 0 10px 24px rgba(27, 33, 36, .14);
}
.wallet-menu p { font-size: 0.875rem; color: var(--ink-3); margin: 0 0 4px; }
.wallet-menu .fine { margin: 8px 0 0; }
.wallet-menu button, .wallet-menu a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border: 0; background: transparent; text-align: left; color: var(--ink); font: 500 1rem/1 var(--sans); text-decoration: none; cursor: pointer; border-radius: var(--radius); }
.wallet-menu button:hover, .wallet-menu a:hover { background: var(--film-2); }
.wallet-menu img { width: 24px; height: 24px; }
.wallet-menu .bal { font: 400 0.875rem/1.4 var(--mono); color: var(--ink-2); padding: 0 10px 6px; }

/* ---- floors and slabs -------------------------------------------------------------------------- */
.floor { padding-block: var(--floor); }
.floor-head { display: grid; gap: 12px; margin-bottom: 40px; max-width: 46rem; }
.floor-head p { font-family: var(--serif); font-size: 1.125rem; line-height: 1.55; color: var(--ink-2); max-width: 34em; }
.slab { height: 22px; border-block: 2px solid var(--ink); background: var(--hatch); }
.slab-thin { height: 12px; border-block-width: 1.5px; }
.rule { height: 1px; background: var(--line-2); border: 0; margin: 0; }
.floor-down { background: var(--film-2); }

/* ---- the home hero: two floors ------------------------------------------------------------------ */
.hero { position: relative; }
.hero-up { padding-top: clamp(40px, 6vw, 80px); }
.hero-copy { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr); gap: 24px 56px; align-items: end; }
.hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.75rem); line-height: 1; letter-spacing: -0.035em; font-weight: 500; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.62fr); gap: 32px 44px; align-items: start; margin-top: clamp(24px, 3vw, 40px); }
.hero-grid .lede { font-size: 1.0625rem; }
.hero-note { font-size: 0.9375rem; line-height: 1.45; color: var(--ink-3); margin-top: 12px; }
.schedule .down { color: var(--down); }
.hero-side { display: grid; gap: 24px; padding-bottom: 8px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.hero-draw { margin-top: clamp(24px, 4vw, 48px); }
.hero-under { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: start; padding-block: 28px 56px; }
.hero-note { font-family: var(--serif); font-size: 1rem; line-height: 1.5; color: var(--ink-2); max-width: 40em; }

/* ---- the comparison: the same bag dumped, or sold over the counter (public/js/versus.js) ------------------- */
.versus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.vs-panel { margin: 0; border: 1.5px solid var(--ink); background: var(--paper); padding: 18px 20px 16px; display: grid; gap: 10px; min-width: 0; align-content: start; }
.vs-panel.down { box-shadow: inset 0 6px 0 var(--down); padding-top: 24px; }
.vs-panel.up { box-shadow: inset 0 6px 0 var(--jade); padding-top: 24px; }
.vs-panel figcaption h3 { display: flex; align-items: center; gap: 10px; font-size: 1.375rem; font-weight: 600; letter-spacing: -0.015em; }
.vs-panel figcaption h3 i { flex: none; width: 12px; height: 12px; background: var(--down); }
.vs-panel.up figcaption h3 i { background: var(--jade); }
.vs-panel figcaption p { font-size: 0.9375rem; color: var(--ink-3); margin-top: 4px; }
.vs-chart { width: 100%; height: auto; overflow: visible; }
.vs-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.vs-now { stroke: var(--ink-3); stroke-dasharray: 3 4; stroke-width: 1.2; }
.vs-axis { font: 500 16px var(--sans); fill: var(--ink-3); }
.vs-ghost { stroke: var(--ink-3); stroke-dasharray: 4 5; stroke-width: 1.5; }
.vs-drop { fill: none; stroke: var(--down); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.vs-hold { fill: none; stroke: var(--jade); stroke-width: 4; stroke-linecap: round; }
.vs-dot { fill: var(--down); }
.vs-dot.up { fill: var(--jade); }
[data-motion=on] .versus .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: vs-draw 900ms var(--ease) 350ms forwards; }
@keyframes vs-draw { to { stroke-dashoffset: 0; } }
.vs-panel dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; margin: 0; border-top: 1px solid var(--line-2); }
.vs-panel dl div { padding-top: 12px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.vs-panel dt { font-size: 0.875rem; color: var(--ink-3); }
.vs-panel dd { margin: 0; font: 500 clamp(1.25rem, 1.9vw, 1.625rem)/1.15 var(--mono); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vs-panel dd small { white-space: normal; }
.vs-panel dd.bad { color: var(--down); }
.vs-panel dd.good { color: var(--jade); font-family: var(--sans); font-weight: 600; letter-spacing: -0.01em; }
.vs-panel dd small { display: block; font: 400 0.8125rem/1.35 var(--sans); color: var(--ink-3); letter-spacing: 0; margin-top: 4px; }
.vs-note { font-family: var(--serif); font-size: 1rem; line-height: 1.45; color: var(--ink-2); }

/* ---- how it works as four small screens (public/js/steps.js) ------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
.steps li { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 12px; align-content: start; min-width: 0; }
.steps h3 { display: flex; gap: 10px; align-items: center; font-size: 1.1875rem; font-weight: 600; }
.steps h3 .num { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1.5px solid var(--ink); font-size: 0.8125rem; }
.steps p { font-family: var(--serif); font-size: 1rem; line-height: 1.5; color: var(--ink-2); }
.mini { border: 1.5px solid var(--ink); background: var(--paper); padding: 12px 14px; display: grid; gap: 2px; min-height: 172px; align-content: start; }
.mini-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 0.875rem; color: var(--ink-2); min-width: 0; }
.mini-row b { color: var(--ink); font-size: 0.875rem; font-weight: 500; white-space: nowrap; }
.mini-row.best b { color: var(--jade); }
.mini-row.chart { align-items: center; border-bottom: 0; }
.mini-cap { font-size: 0.8125rem; line-height: 1.4; color: var(--ink-3); padding-top: 6px; }
.mini-flow { width: 100%; height: auto; margin: 10px 0 4px; }
.mini-flat { width: 110px; height: auto; }
.mf-box { fill: var(--film); stroke: var(--ink); stroke-width: 1.5; }
.mf-box.lock { fill: var(--jade-tint); stroke: var(--jade); }
.mf-t { font: 500 12px var(--sans); fill: var(--ink); }
.mf-line { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- the section drawing (public/js/section.js) ---------------------------------------------------- */
.section-svg { width: 100%; height: auto; overflow: visible; color: var(--ink); }
.section-svg text { font-family: var(--mono); fill: var(--ink); font-variant-numeric: tabular-nums; }
.section-svg .t-sans { font-family: var(--sans); }
.section-svg .t-muted { fill: var(--ink-3); }
.section-svg .t-jade { fill: var(--jade); }
.section-svg .t-film { fill: var(--film); }
.section-svg .ink { fill: var(--ink); }
.section-svg .film { fill: var(--film); }
.section-svg .film-2 { fill: var(--film-2); }
.section-svg .jade { fill: var(--jade); }
.section-svg .line { stroke: var(--ink); fill: none; }
.section-svg .line-soft { stroke: var(--ink-3); fill: none; }
.section-svg .line-jade { stroke: var(--jade); fill: none; }
.section-svg .chart { stroke: var(--ink); fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.section-svg .cliff { stroke: var(--ink); fill: none; stroke-width: 2; stroke-dasharray: 5 5; }
.section-svg .outline { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 7 5; }
.section-svg .travel { transform-box: view-box; }
[data-motion='on'] .section-svg.moving .travel { animation: travel 7s var(--ease) infinite; }
@keyframes travel {
  0%, 22% { transform: translateX(0); }
  36%, 78% { transform: translateX(var(--travel, 0px)); }
  92%, 100% { transform: translateX(0); }
}
[data-motion='on'] .section-svg.once .travel { animation: travel-once 1.1s var(--ease) both; }
@keyframes travel-once { from { transform: translateX(calc(-1 * var(--travel, 0px))); } to { transform: translateX(0); } }

/* ---- a coin's swatch: its material hatch --------------------------------------------------------- */
.swatch { flex: none; width: 40px; height: 40px; border: 1.5px solid var(--ink); background: var(--paper); }
.swatch { overflow: hidden; }
.swatch svg, .section-svg.swatch-svg { width: 100%; height: 100%; overflow: hidden; }
.coin-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.coin-id b { font-weight: 500; display: block; }
.coin-id .mono { font-size: 0.8125rem; color: var(--ink-3); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid var(--line-2); border-radius: var(--radius); font: 400 0.8125rem/1.3 var(--sans); color: var(--ink-2); white-space: nowrap; }
.chip-jade { border-color: var(--jade); color: var(--jade); }
.chip-ink { background: var(--ink); border-color: var(--ink); color: var(--film); }

/* ---- the schedule (the desk's table) ---------------------------------------------------------------- */
.schedule { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.schedule caption { text-align: left; }
.schedule th { text-align: left; font: 400 0.875rem/1.3 var(--sans); color: var(--ink-3); padding: 0 16px 12px 0; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.schedule th.r, .schedule td.r { text-align: right; }
.schedule td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.schedule tr:last-child td { border-bottom-color: var(--ink); }
.schedule td .sub { display: block; font: 400 0.8125rem/1.3 var(--sans); color: var(--ink-3); margin-top: 3px; }
.schedule .num { font-size: 0.9375rem; white-space: nowrap; }
.schedule tbody tr { position: relative; }
.schedule tbody tr:hover td { background: rgba(27, 33, 36, .035); }
.schedule a.row-link { text-decoration: none; color: var(--ink); }
.schedule a.row-link::after { content: ''; position: absolute; inset: 0; }
.schedule .thumb { width: 168px; }
.schedule .closes-soon { color: var(--jade); }

/* ---- forms ---------------------------------------------------------------------------------------- */
.field { display: grid; gap: 8px; }
.field > label, .field > .label, legend { font: 500 1rem/1.3 var(--sans); color: var(--ink); padding: 0; }
.field .hint { font-size: 0.875rem; color: var(--ink-3); line-height: 1.45; }
.field .problem { font-size: 0.9375rem; color: var(--bad); line-height: 1.4; }
.field .problem:empty { display: none; }
.admin { display: grid; gap: 28px; max-width: 40rem; }
.admin-form { display: grid; gap: 20px; }
.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
button.text-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.admin .ca-box code { font: 500 1rem/1.4 var(--mono); overflow-wrap: anywhere; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input, select.input {
  width: 100%; min-height: 52px; padding: 0 14px; border: 1.5px solid var(--edge); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); font: 400 1rem/1 var(--mono); font-variant-numeric: tabular-nums;
}
.input:focus-visible { outline: 2px solid var(--jade); outline-offset: 1px; border-color: var(--ink); }
.input[aria-invalid='true'] { border-color: var(--bad); }
.input-wrap .unit { position: absolute; right: 14px; font: 400 0.875rem/1 var(--mono); color: var(--ink-3); pointer-events: none; }
.input-wrap .input { padding-right: 84px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick button { min-height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: transparent; color: var(--ink-2); font: 400 0.875rem/1 var(--sans); cursor: pointer; position: relative; }
.quick button::after { content: ''; position: absolute; inset: -4px 0; }
.quick button:hover { border-color: var(--ink); color: var(--ink); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.segments { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line-2); border: 1.5px solid var(--edge); border-radius: var(--radius); width: fit-content; max-width: 100%; }
.segments label { position: relative; flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; cursor: pointer; font: 400 0.9375rem/1 var(--sans); color: var(--ink-2); background: var(--film); }
.segments input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segments label:has(input:checked) { background: var(--ink); color: var(--film); }
.segments label:has(input:focus-visible) { outline: 2px solid var(--jade); outline-offset: 2px; z-index: 1; }
.choice { display: grid; gap: 10px; }
.choice label { display: grid; grid-template-columns: 22px 1fr; gap: 4px 12px; padding: 16px; border: 1.5px solid var(--line-2); border-radius: var(--radius); cursor: pointer; background: transparent; }
.choice label:has(input:checked) { border-color: var(--ink); background: var(--paper); }
.choice input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--jade); }
.choice b { font-weight: 500; }
.choice span { grid-column: 2; font-family: var(--serif); font-size: 1rem; line-height: 1.45; color: var(--ink-2); }
.choice.coins label { grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; padding: 10px 14px; gap: 12px; }
.choice.coins input { margin: 0; }
.choice.coins span { grid-column: auto; }
.choice.coins .coin-id span, .choice.coins .coin-id b { font-family: var(--sans); }
.choice.coins .num { font: 450 0.9375rem/1.3 var(--mono); color: var(--ink); text-align: right; }
.choice.coins .num small { display: block; font: 400 0.75rem/1.3 var(--sans); color: var(--ink-3); }
.choice.coins .swatch { width: 32px; height: 32px; }

/* ---- post a block: stages left, the drawing and the sums right ------------------------------------ */
.post { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr); gap: 56px; align-items: start; }
.stages { display: grid; gap: 0; counter-reset: stage; }
.stage { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 16px; padding-block: 28px; border-top: 1px solid var(--line-2); }
.stage:first-child { border-top: 2px solid var(--ink); }
.stage-n { width: 32px; height: 32px; display: grid; place-items: center; border: 1.5px solid var(--ink); font: 500 0.9375rem/1 var(--mono); }
.stage.done .stage-n { background: var(--ink); color: var(--film); }
.stage-body { display: grid; gap: 20px; min-width: 0; }
.stage-body h2 { font-size: 1.375rem; line-height: 1.3; }
.side { position: sticky; top: calc(var(--top) + 24px); display: grid; gap: 24px; }
.sums { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.sums .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-2); align-items: baseline; }
.sums .row span:first-child { font-size: 0.9375rem; color: var(--ink-2); }
.sums .row .num { font-size: 0.9375rem; text-align: right; }
.sums .row.total span:first-child { color: var(--ink); font-weight: 500; }
.sums .row.total .num { font-size: 1.125rem; font-weight: 550; }
.sums .row.total { border-bottom: 2px solid var(--ink); }
.compare { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.compare > div { padding: 16px 16px 16px 0; display: grid; gap: 6px; align-content: start; }
.compare > div + div { border-left: 1px solid var(--line-2); padding-left: 16px; }
.compare h3 { font-size: 1rem; font-weight: 500; }
.compare .big { font: 500 1.75rem/1.1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.compare p { font-size: 0.875rem; color: var(--ink-3); line-height: 1.45; }
.compare .up .big { color: var(--jade); }
.notes { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.notes li { display: grid; grid-template-columns: 14px 1fr; gap: 12px; font-family: var(--serif); font-size: 1rem; line-height: 1.45; color: var(--ink-2); }
.notes li::before { content: ''; width: 10px; height: 10px; margin-top: 7px; background: var(--ink); }
.post-vs .versus { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.post-vs .vs-panel dd { font-size: 1.375rem; }
.go-line { font-size: 0.9375rem; color: var(--ink-2); min-height: 1.4em; }

/* ---- a block's page ----------------------------------------------------------------------------- */
.block-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: end; padding-top: clamp(32px, 5vw, 64px); }
.block-head h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
.block-head .meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 16px; }
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line-2); }
.figures > div { padding: 18px 16px 18px 0; display: grid; gap: 6px; align-content: start; min-width: 0; }
.figures > div + div { border-left: 1px solid var(--line-2); padding-left: 16px; }
.figures dt { font-size: 0.875rem; color: var(--ink-3); }
.figures dd { margin: 0; font: 500 clamp(1.25rem, 2.2vw, 1.75rem)/1.15 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.figures dd small { display: block; font: 400 0.8125rem/1.4 var(--sans); color: var(--ink-3); letter-spacing: 0; margin-top: 4px; }
.block-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 56px; align-items: start; }
.panel { display: grid; gap: 16px; padding-top: 20px; border-top: 2px solid var(--ink); }
.panel h2 { font-size: 1.5rem; }
.legs { list-style: none; margin: 0; padding: 0; display: grid; }
.legs li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); align-items: baseline; }
.legs li span:first-child { font-size: 0.9375rem; color: var(--ink-2); line-height: 1.4; }
.events { list-style: none; margin: 0; padding: 0; display: grid; }
.events li { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: 0.9375rem; line-height: 1.45; }
.events time { font: 400 0.8125rem/1.6 var(--mono); color: var(--ink-3); }
.events .sig { display: block; font: 400 0.8125rem/1.5 var(--mono); color: var(--ink-3); margin-top: 2px; }
.quote-list { width: 100%; border-collapse: collapse; }
.quote-list th { text-align: left; font: 400 0.875rem/1.3 var(--sans); color: var(--ink-3); padding: 0 12px 10px 0; border-bottom: 2px solid var(--ink); }
.quote-list td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line-2); font-size: 0.9375rem; vertical-align: middle; }
.quote-list .r { text-align: right; }
.quote-list tr.best td { background: rgba(13, 107, 82, .07); }
.quote-list tr.best td:first-child { box-shadow: inset 3px 0 0 var(--jade); padding-left: 12px; }
.escrow-line { font: 400 0.875rem/1.5 var(--mono); color: var(--ink-2); overflow-wrap: anywhere; }

/* ---- the home's other floors -------------------------------------------------------------------- */
.seq { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.seq-step { display: grid; gap: 12px; padding: 0 20px 0 0; align-content: start; }
.seq-step + .seq-step { padding-left: 20px; border-left: 1px solid var(--line-2); }
.seq-step .n { font: 500 0.9375rem/1 var(--mono); }
.seq-step h3 { font-size: 1.1875rem; }
.seq-step p { font-family: var(--serif); font-size: 1rem; line-height: 1.5; color: var(--ink-2); }
.seq-draw { margin-bottom: 8px; }
.signs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.signs > div { padding: 24px 24px 24px 0; display: grid; gap: 12px; align-content: start; }
.signs > div + div { border-left: 1px solid var(--line-2); padding-left: 24px; }
.signs h3 { font-size: 1.1875rem; }
.signs p { font-family: var(--serif); font-size: 1rem; line-height: 1.5; color: var(--ink-2); }
.signs .who { font-size: 0.9375rem; color: var(--ink-3); }
.worked { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.faq { display: grid; border-top: 2px solid var(--ink); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 60px; padding: 14px 0; cursor: pointer; font: 500 1.125rem/1.35 var(--sans); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 12px; height: 12px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.faq details p { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.55; color: var(--ink-2); padding: 0 0 20px; max-width: 40em; }
.closing { padding-block: var(--floor); }
.closing h2 { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.03em; max-width: 14ch; }
.closing-row { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: end; justify-content: space-between; }

/* ---- the desk -------------------------------------------------------------------------------------- */
.page-head { padding-top: clamp(32px, 5vw, 64px); padding-bottom: 32px; display: grid; gap: 14px; }
.page-head p { font-family: var(--serif); font-size: 1.125rem; line-height: 1.55; color: var(--ink-2); max-width: 36em; }
.tally { font: 400 0.9375rem/1.5 var(--sans); color: var(--ink-2); }
.tally .num { color: var(--ink); }
.controls { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding-bottom: 24px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; text-decoration: none; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a[aria-current='true'] { color: var(--ink); border-bottom-color: var(--ink); }
.empty { padding: 48px 0; display: grid; gap: 12px; justify-items: start; max-width: 36rem; }
.empty h3 { font-size: 1.375rem; }
.empty p { font-family: var(--serif); font-size: 1.0625rem; color: var(--ink-2); }

/* ---- CA box -------------------------------------------------------------------------------------- */
.ca-box { display: grid; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line-2); min-width: 0; }
.ca-box .label { font-size: 0.875rem; color: var(--ink-3); }
.ca-box code { font: 500 1rem/1.4 var(--mono); user-select: all; overflow-wrap: anywhere; }
.ca-box small { font-size: 0.8125rem; color: var(--ink-3); }

/* ---- the money dialog ------------------------------------------------------------------------------ */
dialog.flow { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--paper); color: var(--ink); box-shadow: 0 15px 35px rgba(27, 33, 36, .25); }
dialog.flow::backdrop { background: rgba(27, 33, 36, .45); }
.flow-in { display: grid; gap: 20px; padding: 28px; }
.flow-in h2 { font-size: 1.5rem; }
.flow-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.875rem; color: var(--ink-3); }
.flow-steps li { display: inline-flex; align-items: center; gap: 8px; }
.flow-steps li::before { content: ''; width: 9px; height: 9px; border: 1.5px solid var(--ink-3); }
.flow-steps li.now { color: var(--ink); font-weight: 500; }
.flow-steps li.now::before { border-color: var(--ink); background: var(--film); box-shadow: inset 0 0 0 2px var(--jade); }
.flow-steps li.done::before { background: var(--ink); border-color: var(--ink); }
.flow-body { display: grid; gap: 14px; font-family: var(--serif); font-size: 1.0625rem; line-height: 1.5; color: var(--ink-2); }
.flow-body b { color: var(--ink); font-family: var(--sans); font-weight: 600; }
.flow-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.flow .problem-box { border-left: 3px solid var(--bad); padding: 4px 0 4px 14px; color: var(--ink); }

/* ---- toasts, footer and the phone tab bar ------------------------------------------------------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: var(--film); padding: 12px 16px; border-radius: var(--radius); font-size: 0.9375rem; line-height: 1.4; }
.toast.error { background: var(--bad); color: #fff; }
.footer { border-top: 2px solid var(--ink); padding-block: 48px 32px; background: var(--film); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: start; }
.footer-brand { display: grid; gap: 16px; }
.footer-brand p { font-family: var(--serif); font-size: 1rem; line-height: 1.5; color: var(--ink-2); max-width: 30em; }
.footer-links { display: grid; grid-template-columns: repeat(2, auto); gap: 0 32px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--jade); }
.footer-base { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line-2); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: start; }
.footer-base p { font-size: 0.875rem; line-height: 1.5; color: var(--ink-3); max-width: 60em; }
.tabbar { display: none; }

/* ---- prose pages ---------------------------------------------------------------------------------- */
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; padding-bottom: var(--floor); }
.toc { position: sticky; top: calc(var(--top) + 24px); display: grid; gap: 2px; border-top: 2px solid var(--ink); padding-top: 12px; }
.toc a { display: flex; align-items: center; min-height: 36px; color: var(--ink-2); text-decoration: none; font-size: 0.9375rem; }
.toc a:hover { color: var(--ink); }
.doc section { padding-bottom: 48px; scroll-margin-top: calc(var(--top) + 16px); }
.doc section > h2 { margin-bottom: 16px; }
.doc section > h2 + p { margin-top: 0; }
.doc .prose p, .doc .read { max-width: 38em; }
.doc ul.read, .doc ol.read { padding-left: 1.2em; display: grid; gap: 8px; }
.kv { display: grid; border-top: 2px solid var(--ink); max-width: 44rem; margin-top: 16px; }
.kv > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-2); align-items: baseline; }
.kv > div span:first-child { color: var(--ink-2); font-size: 0.9375rem; }
.kv .num { font-size: 0.9375rem; text-align: right; }
.kv .kv-words { font-size: 0.9375rem; text-align: right; color: var(--ink); }
.doc section > * + * { margin-top: 14px; }
.doc section > h2 + * { margin-top: 0; }

/* ---- the brand page ------------------------------------------------------------------------------- */
.brand-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.plate { border: 1.5px solid var(--ink); background: var(--paper); padding: 32px; display: grid; place-items: center; min-height: 220px; }
.plate.dark { background: var(--ink); color: var(--film); border-color: var(--ink); }
.plate.jade { background: var(--jade); color: #fff; border-color: var(--jade); }
.plate-cap { font-size: 0.875rem; color: var(--ink-3); margin-top: 8px; }
.sizes { display: flex; align-items: end; gap: 32px; flex-wrap: wrap; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.swatches div { display: grid; gap: 6px; }
.swatches i { display: block; height: 72px; border: 1px solid var(--line-2); }
.swatches b { font-weight: 500; }
.swatches span { font: 400 0.8125rem/1.3 var(--mono); color: var(--ink-3); }
.type-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line-2); align-items: baseline; }

.skeleton { background: var(--film-2); min-height: 18px; border-radius: var(--radius); }

/* ---- narrower screens ------------------------------------------------------------------------------ */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post, .block-body { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .side { position: static; }
  .seq { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 0; }
  .seq-step:nth-child(3) { padding-left: 0; border-left: 0; }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (max-width: 860px) {
  .versus { grid-template-columns: minmax(0, 1fr); }
  :root { --top: 56px; }
  .nav, .top-cta, .ca-chip { display: none; }
  .topbar-in { gap: 12px; }
  .hero-copy, .hero-under, .worked { grid-template-columns: minmax(0, 1fr); }
  .signs { grid-template-columns: minmax(0, 1fr); }
  .signs > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-2); }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .figures > div:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .footer-grid, .footer-base { grid-template-columns: minmax(0, 1fr); }
  .block-head { grid-template-columns: minmax(0, 1fr); }
  .schedule .thumb, .schedule .hide-sm { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; inset: auto 0 0 0; z-index: 20;
    background: var(--film); border-top: 2px solid var(--ink); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a { display: grid; place-items: center; min-height: 56px; text-decoration: none; color: var(--ink-2); font-size: 0.9375rem; }
  .tabbar a[aria-current='page'] { color: var(--ink); font-weight: 500; box-shadow: inset 0 2px 0 var(--jade); }
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(68px + env(safe-area-inset-bottom)); }
}
@media (max-width: 600px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .mini { min-height: 0; }
  .seq { grid-template-columns: minmax(0, 1fr); }
  .seq-step, .seq-step + .seq-step { padding: 0; border-left: 0; }
  .compare { grid-template-columns: minmax(0, 1fr); }
  .compare > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-2); }
  .hero-actions .btn-primary { width: 100%; }
  .brand-grid { grid-template-columns: minmax(0, 1fr); }
  .type-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .schedule thead { display: none; }
  .schedule, .schedule tbody, .schedule tr, .schedule td { display: block; width: 100%; }
  .schedule tr { padding: 16px 0; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; }
  .schedule td { border: 0; padding: 0; }
  .schedule td.r { text-align: left; }
  .schedule td[data-label]::before { content: attr(data-label); display: block; font: 400 0.8125rem/1.3 var(--sans); color: var(--ink-3); }
  .schedule tr:last-child td { border: 0; }
  .schedule td.wide { grid-column: 1 / -1; }
  .quote-list .hide-sm { display: none; }
  .events li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .flow-in { padding: 20px; }
  .flow-actions .btn { flex: 1 1 auto; }
}

/* ---- motion off: every drawing is complete and still ---------------------------------------------- */
[data-motion='off'] *, [data-motion='off'] *::before, [data-motion='off'] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
