/* Brainbrook: The Long Receipt. Design system tokens, layout (Meander + FULL PAGE RULE), components, motion. */

@font-face { font-family: 'Recursive'; src: url('/assets/fonts/Recursive-Variable.woff2') format('woff2'); font-weight: 300 1000; font-style: oblique 0deg 15deg; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url('/assets/fonts/SourceSerif4-Variable.woff2') format('woff2'); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url('/assets/fonts/SourceSerif4-Variable-Italic.woff2') format('woff2'); font-weight: 200 900; font-style: italic; font-display: swap; }

@property --mono { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --casl { syntax: '<number>'; inherits: true; initial-value: 0.65; }
@property --wght { syntax: '<number>'; inherits: true; initial-value: 720; }
@property --crsv { syntax: '<number>'; inherits: true; initial-value: 0.5; }

:root {
  --field: #DCE8DF; --field-2: #CFDFD3; --field-3: #E6EEE7;
  --paper: #FFFFFF; --paper-shadow: #F3F6F3;
  --ink: #1B2622; --muted: #4E5E56; --rule: #B9CBBF;
  --copper: #A04219; --copper-lit: #C25A2C; --copper-pale: #F1DDD3;
  --shadow: rgba(27, 38, 34, 0.14); --shadow-2: rgba(27, 38, 34, 0.22);
  --feed: cubic-bezier(0.1, 0.82, 0.26, 1); --tear: cubic-bezier(0.76, 0, 0.12, 1);
  --fast: 0.16s; --base: 0.5s; --slow: 1.3s;
  --gutter: clamp(16px, 2.5vw, 48px);
  --pad: clamp(56px, 6vw, 112px);
  --head-h: 72px;
  --h1: clamp(2.75rem, 1.2rem + 3.6vw, 6.5rem);
  --h2: clamp(2rem, 0.9rem + 2.2vw, 4.25rem);
  --h3: clamp(1.375rem, 1rem + 0.9vw, 2rem);
  --body: clamp(1.0625rem, 1rem + 0.2vw, 1.25rem);
  --mono-size: clamp(0.9375rem, 0.85rem + 0.3vw, 1.125rem);
  --numeral: clamp(5rem, 2rem + 8vw, 14rem);
  --serif: 'Source Serif 4', Georgia, serif;
  --rec: 'Recursive', 'Courier New', monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; background: var(--field); color: var(--ink); font-family: var(--serif); font-size: var(--body); line-height: 1.55; font-weight: 420; font-variant-numeric: tabular-nums; overflow-x: hidden; }
body.is-locked { overflow: hidden; }
img, video, canvas, svg { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--copper-pale); color: var(--ink); }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; border-radius: 2px; }

/* Type roles */
.rec, h1, h2, h3, h4, .tag-btn, .tape-nav a, .wordmark { font-family: var(--rec); font-variation-settings: 'MONO' var(--mono), 'CASL' var(--casl), 'wght' var(--wght), 'CRSV' var(--crsv), 'slnt' 0; }
.mono, .amount, .receipt-line, .print-strip, .numeral, .eyebrow, .kicker, .meta-line, code { font-family: var(--rec); --mono: 1; --casl: 0; --wght: 500; --crsv: 0; font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 500, 'CRSV' 0, 'slnt' 0; font-variant-numeric: tabular-nums; }
h1 { font-size: var(--h1); line-height: 1.02; letter-spacing: -0.015em; margin: 0 0 0.35em; }
h2 { font-size: var(--h2); line-height: 1.08; letter-spacing: -0.012em; margin: 0 0 0.45em; }
h3 { font-size: var(--h3); line-height: 1.18; margin: 0 0 0.4em; }
h4 { font-size: 1.125rem; margin: 0 0 0.3em; }
p { margin: 0 0 1em; }
.lead { font-size: calc(var(--body) * 1.18); line-height: 1.5; color: var(--ink); }
.muted { color: var(--muted); }
.eyebrow { font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 0.5em; margin-bottom: 1em; }
.eyebrow::before { content: ''; width: 10px; height: 10px; background: var(--copper); clip-path: polygon(0 0, 70% 0, 100% 30%, 100% 100%, 0 100%); }
.measure { max-width: 68ch; }
.amount { font-variant-numeric: tabular-nums; }
.numeral { font-size: var(--numeral); line-height: 0.9; --wght: 300; font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 300; color: var(--ink); display: inline-flex; align-items: flex-start; gap: 0.12em; }
.numeral::before { content: ''; width: 0.14em; height: 0.14em; border-radius: 50%; background: var(--copper); margin-top: 0.34em; }
.dot::before { content: ''; display: inline-block; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--copper); margin-right: 0.45em; vertical-align: middle; }
.link { color: var(--ink); text-decoration: none; background-image: linear-gradient(var(--copper), var(--copper)); background-size: 100% 1px; background-repeat: repeat-x; background-position: 0 100%; border-bottom: 1px dotted var(--copper); transition: border-color var(--fast) var(--feed), background-size var(--fast) var(--feed); }
.link:hover, .link:focus-visible { border-bottom-style: solid; color: var(--copper); }

/* Thermal grain (paper surfaces only) */
.paper { background: var(--paper); position: relative; box-shadow: 0 1px 0 var(--paper-shadow), 0 10px 30px -14px var(--shadow); }
.paper::after { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.106 0 0 0 0 0.149 0 0 0 0 0.133 0 0 0 0.05 0'/></filter><rect width='160' height='160' filter='url(%23g)'/></svg>"); opacity: 0.6; mix-blend-mode: multiply; border-radius: inherit; }
.paper > * { position: relative; z-index: 1; }

/* Layout: FULL PAGE RULE. Every section spans 100vw; gutters capped; two bank grids. */
.section { position: relative; width: 100%; padding: var(--pad) var(--gutter); }
.section.tight { padding-top: calc(var(--pad) * 0.6); padding-bottom: calc(var(--pad) * 0.6); }
.section.band { background: var(--field-2); }
.section.band-3 { background: var(--field-3); }
html.has-spine .section.band, html.has-spine .section.band-3, html.has-spine .sms-band { background: transparent; }
.banks { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 3vw, 64px); align-items: start; width: 100%; }
.banks > *, .cols > * { min-width: 0; }
@media (min-width: 1024px) { .banks { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .banks.w-60-40 { grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); } .banks.w-40-60 { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); } .banks.w-35-65 { grid-template-columns: minmax(0, 7fr) minmax(0, 13fr); } .bank-right-first > :first-child { order: 2; } }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: clamp(20px, 2.4vw, 44px); width: 100%; }
.cols.wide { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.full-bleed { width: 100%; }
.stack > * + * { margin-top: 1.25rem; }
.row { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; }
.sticky-rail { position: sticky; top: calc(var(--head-h) + 16px); }
@media (max-width: 1023px) { .sticky-rail, .post-body .side, .checkout-grid .side, .ten-phones { position: static; } }
.section-tag { position: absolute; top: calc(var(--pad) * 0.55); right: var(--gutter); display: inline-flex; align-items: center; gap: 8px; font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 500; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.section-tag::before { content: ''; width: 14px; height: 18px; background: var(--copper); clip-path: polygon(0 0, 70% 0, 100% 30%, 100% 100%, 0 100%); transform-origin: bottom; }
.section-tag.left { right: auto; left: var(--gutter); }

/* Kit dividers */
.divider { width: 100%; display: block; height: 12px; margin: 0; overflow: visible; }
.divider svg { width: 100%; height: 100%; overflow: visible; }
.divider.meander { height: 60px; }
.divider.tick { height: 24px; }

/* The Meander spine */
#spine { position: absolute; top: 0; left: 0; width: 100%; pointer-events: none; z-index: 0; }
main { position: relative; z-index: 1; overflow-x: clip; }
.page { position: relative; }

/* The tape header */
.head-spacer { height: var(--head-h); }
.tape-head { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--head-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 var(--gutter); background: var(--paper); transition: height var(--base) var(--feed), box-shadow var(--base) var(--feed); }
.tape-head::before { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.106 0 0 0 0 0.149 0 0 0 0 0.133 0 0 0 0.04 0'/></filter><rect width='160' height='160' filter='url(%23g)'/></svg>"); mix-blend-mode: multiply; }
.tape-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px; background: radial-gradient(circle at 6px 0, transparent 0 3.2px, var(--paper) 3.4px) 0 0 / 12px 6px repeat-x; transition: height var(--base) var(--feed), opacity var(--base) var(--feed); }
.tape-advance { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--copper); transform: scaleX(var(--adv, 0)); transform-origin: left; opacity: 0.9; pointer-events: none; z-index: 2; }
.tape-head.is-thin { height: 56px; box-shadow: 0 1px 0 var(--rule); }
.tape-head.is-thin::after { height: 1px; background: var(--rule); bottom: -1px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 1.375rem; --wght: 720; --casl: 0.65; position: relative; z-index: 1; }
.wordmark .mark { width: 30px; height: 26px; transition: transform var(--fast) var(--feed); }
.wordmark { transition: --casl var(--fast) var(--feed); }
.wordmark:hover, .wordmark:focus-visible { --casl: 1; }
.wordmark:hover .mark, .wordmark:focus-visible .mark { transform: translateY(-2px); }
.tape-nav { display: none; gap: clamp(14px, 1.6vw, 30px); align-items: center; position: relative; z-index: 1; }
@media (min-width: 1024px) { .tape-nav { display: flex; } }
.tape-nav a { text-decoration: none; color: var(--ink); font-size: 0.9375rem; --wght: 520; --casl: 0.65; position: relative; padding: 22px 2px 20px; transition: --casl var(--fast) var(--feed), color var(--fast) var(--feed); }
.tape-nav a::after { content: ''; position: absolute; left: 50%; bottom: 10px; width: 12px; height: 9px; margin-left: -6px; background: var(--copper); clip-path: polygon(0 100%, 0 30%, 30% 0, 100% 0, 100% 100%); transform: scaleY(0); transform-origin: bottom; transition: transform var(--fast) var(--feed); }
.tape-nav a:hover, .tape-nav a:focus-visible { --casl: 1; color: var(--copper); }
.tape-nav a:hover::after, .tape-nav a:focus-visible::after, .tape-nav a[aria-current="page"]::after { transform: scaleY(1); }
.tape-nav a[aria-current="page"] { --wght: 720; }
.head-right { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.cart-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 560; font-size: 0.875rem; padding: 8px 10px; border-radius: 2px; transition: transform var(--fast) var(--feed), color var(--fast) var(--feed); }
.cart-link:hover, .cart-link:focus-visible { transform: translateY(-2px); color: var(--copper); }
.cart-link svg { width: 22px; height: 22px; }
.cart-count { min-width: 1.4em; height: 1.4em; display: inline-grid; place-items: center; border-radius: 2px; background: var(--copper); color: #fff; font-size: 0.75rem; padding: 0 0.3em; transition: transform var(--fast) var(--tear); overflow: hidden; }
.cart-count .cc-roll { display: block; height: 1.4em; line-height: 1.4em; transition: transform var(--base) var(--feed); }
.cart-count .cc-roll span { display: block; height: 1.4em; text-align: center; }
.cart-count.has-one .cc-roll { transform: translateY(-1.4em); }
.cart-count.is-bump { transform: scale(1.25); }
.menu-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--rule); border-radius: 2px; padding: 8px 12px; font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 560; font-size: 0.875rem; cursor: pointer; }
@media (min-width: 1024px) { .menu-btn { display: none; } }
.mobile-menu { display: none; position: fixed; top: var(--head-h); left: 0; right: 0; z-index: 49; background: var(--paper); padding: 8px var(--gutter) 24px; box-shadow: 0 20px 40px -20px var(--shadow-2); clip-path: inset(0 0 100% 0); transition: clip-path var(--base) var(--feed); }
.mobile-menu.is-open { display: block; clip-path: inset(0 0 0 0); }
.mobile-menu a { display: block; padding: 14px 0; text-decoration: none; color: var(--ink); font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 520; border-bottom: 1px dashed var(--rule); }
.mobile-menu a[aria-current="page"] { color: var(--copper); }
.mobile-menu a:hover, .mobile-menu a:focus-visible { color: var(--copper); padding-left: 6px; transition: padding var(--fast) var(--feed), color var(--fast) var(--feed); }

/* Buttons: the kept tag */
.tag-btn { --wght: 620; --casl: 0.65; --mono: 0; position: relative; display: inline-flex; align-items: center; gap: 0.6em; height: 52px; padding: 0 22px 0 34px; border: 0; text-decoration: none; color: #fff; background: var(--copper); clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 calc(100% - 10px), 0 10px); border-radius: 0 2px 2px 0; font-size: 1rem; cursor: pointer; white-space: nowrap; transition: transform var(--fast) var(--feed), background var(--fast) var(--feed), box-shadow var(--fast) var(--feed); box-shadow: 0 6px 14px -8px var(--shadow-2); animation: breathe 6s ease-in-out infinite; }
.tag-btn::before { content: ''; position: absolute; left: 14px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px var(--copper) inset; }
.tag-btn::after { content: ''; position: absolute; left: 0; top: 50%; width: 0; height: 1px; background: currentColor; opacity: 0.6; transform: translateX(-100%); transition: width var(--fast) var(--feed); }
.tag-btn .price { font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 500; font-size: 0.9375rem; opacity: 0.92; }
.tag-btn .sep { opacity: 0.7; }
.tag-btn:hover, .tag-btn:focus-visible { transform: translateY(-2px); background: var(--copper-lit); box-shadow: 0 10px 20px -8px var(--shadow-2); }
.tag-btn:hover::after, .tag-btn:focus-visible::after { width: 14px; }
.tag-btn:active { transform: translateY(0); transition-timing-function: var(--tear); }
.tag-btn.secondary { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--copper) inset, 0 6px 14px -10px var(--shadow); animation: none; }
.tag-btn.secondary::before { background: var(--copper-pale); box-shadow: 0 0 0 1.5px var(--copper) inset; }
.tag-btn.secondary:hover, .tag-btn.secondary:focus-visible { background: var(--copper-pale); }
.tag-btn.small { height: 44px; padding: 0 16px 0 30px; font-size: 0.9375rem; }
.tag-btn:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
.tag-btn.secondary:focus-visible { outline-color: var(--ink); }
@keyframes breathe { 0%, 100% { box-shadow: 0 6px 14px -8px var(--shadow-2); } 50% { box-shadow: 0 10px 20px -8px var(--shadow-2); } }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px 16px; align-items: center; }
.text-btn { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: none; cursor: pointer; border-bottom: 1px dotted var(--copper); font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 520; font-size: 0.9375rem; }
.text-btn:hover, .text-btn:focus-visible { border-bottom-style: solid; color: var(--copper); }

/* Tags and chips */
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px 0 12px; font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 600; font-size: 0.75rem; letter-spacing: 0.06em; color: #fff; background: var(--copper); clip-path: polygon(6px 0, 100% 0, 100% 100%, 6px 100%, 0 calc(100% - 6px), 0 6px); }
.tag.fsa { background: var(--copper-pale); color: var(--ink); box-shadow: inset 0 0 0 1px var(--copper); }
.chip { transition: transform var(--fast) var(--feed), background var(--fast) var(--feed); }
.chip:hover { transform: translateY(-2px); background: var(--copper-pale); }
.chip { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--field-2); color: var(--ink); font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 600; font-size: 0.8125rem; }
.status { font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 500; font-size: 0.875rem; }
.status.owed::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--copper); margin-right: 6px; vertical-align: 1px; }
.status.reimb::before { content: '\2713'; margin-right: 6px; color: var(--muted); }

/* The print strip (Print Head surfaces) */
.print-strip { background: var(--paper); color: var(--ink); padding: 18px 20px 26px; position: relative; font-size: var(--mono-size); line-height: 1.6; box-shadow: 0 1px 0 var(--paper-shadow), 0 14px 30px -18px var(--shadow-2); }
.print-strip::after { content: ''; position: absolute; left: 0; right: 0; bottom: -7px; height: 8px; background: radial-gradient(circle at 5px 0, var(--paper) 0 3px, transparent 3.5px) 0 0 / 11px 8px repeat-x; }
.print-strip .ln { opacity: 0; transform: translateY(6px); }
.print-strip .ln:has(.lead-dots), .print-strip .ln.row-ln { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
[hidden] { display: none !important; }
.print-strip .ln.is-on { opacity: 1; transform: none; transition: opacity var(--fast) var(--feed), transform var(--fast) var(--feed); }
.print-strip .ln .lead-dots { flex: 1; border-bottom: 1px dotted var(--rule); margin: 0 6px 0.35em; min-width: 12px; }
.print-strip .ln.total { --wght: 700; font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 700; border-top: 1px dashed var(--rule); padding-top: 8px; margin-top: 8px; }
.print-strip .ln.h { --wght: 700; font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.8125rem; color: var(--muted); }
.print-strip.no-anim .ln { opacity: 1; transform: none; }
.torn-top::before { content: ''; position: absolute; left: 0; right: 0; top: -7px; height: 8px; background: radial-gradient(circle at 5px 8px, var(--paper) 0 3px, transparent 3.5px) 0 0 / 11px 8px repeat-x; }

/* Plan cards */
.plan { display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 2.4vw, 36px); }
.plan .plan-name { --wght: 720; font-size: var(--h3); margin: 0; }
.plan .who { color: var(--muted); margin: 0; }
.plan .price-line { font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 700; font-size: clamp(1.5rem, 1rem + 1.4vw, 2.5rem); margin: 4px 0; }
.plan .row-mark { width: 14px; height: 12px; flex: none; background: var(--copper-pale); box-shadow: inset 0 0 0 1px var(--copper); clip-path: polygon(0 100%, 0 30%, 30% 0, 100% 0, 100% 100%); }
.plan .row-line { min-height: 44px; display: flex; align-items: center; gap: 8px; font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 500; font-size: 0.9375rem; color: var(--muted); }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px dotted var(--rule); font-size: calc(var(--body) * 0.95); }
.plan li::before { content: ''; flex: none; margin-top: 0.55em; width: 12px; height: 10px; background: var(--copper); clip-path: polygon(0 100%, 0 30%, 30% 0, 100% 0, 100% 100%); }
.plan li.absent { color: var(--muted); }
.plan li.absent::before { background: var(--rule); }
.plan .foot { color: var(--muted); font-size: 0.9375rem; margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; }
.seg button { background: var(--paper); border: 0; padding: 10px 14px; cursor: pointer; font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 560; font-size: 0.875rem; color: var(--ink); transition: background var(--fast) var(--feed), color var(--fast) var(--feed); }
.seg button:hover, .seg button:focus-visible { background: var(--copper-pale); }
.seg button[aria-pressed="true"] { background: var(--copper); color: #fff; }
.seg button[aria-pressed="true"]:hover { background: var(--copper-lit); }

/* Forms: one column, top labels, copper rule focus, GOV.UK errors */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 600; font-size: 0.875rem; color: var(--muted); transition: color var(--fast) var(--feed); }
.field label .opt { font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 400; color: var(--muted); }
.field:focus-within label { color: var(--ink); }
.field .help { font-size: 0.875rem; color: var(--muted); margin: 0; }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 2px; padding: 12px 14px; transition: border-color var(--fast) var(--feed); position: relative; }
.field textarea { min-height: 140px; resize: vertical; }
.field .ctl { position: relative; }
.field .ctl::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--copper); transform: scaleX(0); transform-origin: left; transition: transform var(--base) var(--feed); }
.field:focus-within .ctl::after { transform: scaleX(1); }
.field input:not([type="checkbox"]):not([type="radio"]):focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.check input:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
input[type="date"]:focus-visible, input[type="range"]:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--copper); border-width: 2px; }
.field .error { display: none; font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 600; font-size: 0.875rem; color: var(--copper); margin: 0; }
.field.has-error .error { display: block; }
.field .error::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--copper); margin-right: 8px; vertical-align: 1px; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .field-row.three { grid-template-columns: 2fr 1fr 1fr; } .field-row.two { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 0.9375rem; line-height: 1.5; }
.check input { width: 20px; height: 20px; margin: 3px 0 0; flex: none; accent-color: var(--copper); }
.error-summary { display: none; padding: 16px 18px; border: 2px solid var(--copper); background: var(--paper); }
.error-summary.is-on { display: block; }
.error-summary h3, .error-summary h2 { --wght: 700; font-size: 1.125rem; margin: 0 0 6px; }
.error-summary ul { margin: 8px 0 0; padding-left: 18px; }
.error-summary a { color: var(--copper); }
.fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 18px; }
.fieldset legend { padding: 0; margin-bottom: 8px; }
.legend { display: flex; align-items: center; gap: 12px; font-family: var(--rec); font-variation-settings: 'MONO' 0, 'CASL' 0.65, 'wght' 720; font-size: var(--h3); }
.legend .n { font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 500; font-size: 0.875rem; color: var(--muted); }
.success { display: none; }
.success.is-on { display: block; }

/* The SMS band (verbatim block lives inside) */
.sms-band { background: var(--field-2); padding: var(--pad) var(--gutter); }
.sms-card { max-width: 100%; padding: clamp(22px, 2.6vw, 40px); display: grid; gap: 18px; }
@media (min-width: 1024px) { .sms-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: start; gap: 32px; } .sms-card .sms-fields { padding-right: 84px; } }
.sms-card h2 { font-size: var(--h3); margin: 0 0 6px; }
.sms-card .seal-corner { position: absolute; right: 18px; top: 18px; width: 64px; height: 64px; opacity: 0.9; }
.sms-card .check { font-size: 0.9375rem; }
.sms-card .success { color: var(--ink); font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 600; }

/* Footer: the tape's end */
.site-foot { position: relative; background: var(--paper); padding: var(--pad) var(--gutter) 40px; }
.site-foot::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 9px; background: radial-gradient(circle at 6px 9px, var(--paper) 0 3.5px, transparent 4px) 0 0 / 13px 9px repeat-x; }
.site-foot::after { content: ''; position: absolute; left: 0; right: 0; bottom: -8px; height: 9px; background: radial-gradient(circle at 6px 0, var(--paper) 0 3.5px, transparent 4px) 0 0 / 13px 9px repeat-x; }
.foot-grid { display: grid; gap: 28px; }
@media (min-width: 1024px) { .foot-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.site-foot .big-mark { font-family: var(--rec); font-variation-settings: 'MONO' 0, 'CASL' 0.65, 'wght' 720; font-size: clamp(2.5rem, 1rem + 4vw, 6rem); line-height: 1; margin: 0 0 12px; }
.site-foot .tagline { color: var(--muted); margin: 0 0 18px; }
.site-foot h4, .site-foot h3 { font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 600; font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-foot a { text-decoration: none; background-image: linear-gradient(var(--copper), var(--copper)); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size var(--fast) var(--feed), color var(--fast) var(--feed); }
.site-foot a:hover, .site-foot a:focus-visible { background-size: 100% 1px; color: var(--copper); }
.site-foot h3 { font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 600; font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.3em; }
.site-foot .rules { margin-top: 28px; padding-top: 18px; border-top: 1px dashed var(--rule); color: var(--muted); font-size: 0.9375rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.site-foot .seal-sm { width: 112px; height: 112px; }

/* Loader: The Print Head */
#loader { position: fixed; inset: 0; z-index: 100; background: rgba(220, 232, 223, 0.92); display: grid; place-items: center; transition: opacity 0.42s var(--feed); }
#loader.is-fading { opacity: 0.08; pointer-events: none; }
#loader.is-done { display: none; }
#loader .slot { width: 320px; max-width: calc(100vw - 48px); position: relative; }
#loader .slot::before { content: ''; position: absolute; left: -12px; right: -12px; top: -6px; height: 4px; background: var(--rule); border-radius: 2px; }
#loader .strip { width: 100%; padding: 16px 18px 24px; min-height: 60px; overflow: hidden; }
#loader .strip .ln { font-size: 0.9375rem; height: 26px; line-height: 26px; }
#loader .strip .ln.total { height: 34px; line-height: 26px; }
#loader .skip { display: block; height: 26px; line-height: 26px; padding: 0; margin: 18px auto 0; background: none; border: 0; color: var(--ink); text-decoration: underline; text-decoration-style: dotted; cursor: pointer; font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 500; }
#loader .sr { position: absolute; left: -9999px; }

/* Motion utilities: section entrances */
[data-enter] { opacity: 0; transform: translateY(28px); transition: opacity var(--base) var(--feed), transform var(--base) var(--feed), clip-path var(--base) var(--feed), filter var(--base) var(--feed); transition-delay: var(--d, 0ms); }
[data-enter="stand"] { transform: perspective(900px) rotateX(70deg); transform-origin: bottom; }
[data-enter="feed"] { transform: translateY(40px); clip-path: inset(100% 0 0 0); }
[data-enter="crisp"] { transform: none; filter: blur(6px); opacity: 0.4; }
[data-enter="impress"] { transform: scale(1.15); }
[data-enter="slide-l"] { transform: translateX(-40px); }
[data-enter="slide-r"] { transform: translateX(40px); }
[data-enter="drawer"] { transform: translateY(60%); clip-path: inset(0 0 100% 0); }
[data-enter="tear"] { clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); transform: none; }
[data-enter="pop"] { transform: scale(0.6); }
[data-enter="draw"] { transform: none; clip-path: inset(0 100% 0 0); }
.is-in[data-enter] { opacity: 1; transform: none; clip-path: inset(0 0 0 0); filter: none; }
.is-in[data-enter="tear"] { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.stagger > * { --d: calc(var(--i, 0) * 60ms); }

/* Word hovers (per page, base classes) */
.hover-words span.w { display: inline-block; position: relative; transition: color var(--fast) var(--feed); }
.hover-words span.w::after { content: ''; position: absolute; left: 0; bottom: -0.06em; height: 0.12em; width: 0; background: var(--copper); transition: width var(--fast) var(--feed); }
.hover-words span.w:hover::after { width: 100%; }
.page-how .hover-words span.w:hover { --casl: 1; color: var(--copper); }
.page-how .hover-words span.w::after { width: 0; height: 0.5em; bottom: 0; right: -0.6em; left: auto; clip-path: polygon(0 100%, 0 30%, 30% 0, 100% 0, 100% 100%); transition: width var(--fast) var(--feed); }
.page-how .hover-words span.w:hover::after { width: 0.4em; }
.page-pricing .hover-words span.w:hover { --wght: 720; }
.page-shoebox .hover-words span.w:hover { animation: sortshuffle 0.4s var(--feed); }
@keyframes sortshuffle { 0% { transform: translateY(0); } 40% { transform: translateY(-3px); } 100% { transform: translateY(0); } }
.page-about .hover-words span.w::after { height: 100%; bottom: 0; background: var(--copper); opacity: 0.18; z-index: -1; }
.page-blog .hover-words span.w:hover { transform: translateY(-2px); }
.page-post-1 .hover-words span.w:hover { animation: fadekeep 0.4s var(--tear); }
@keyframes fadekeep { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }
.page-post-2 .hover-words span.w::after { background: repeating-linear-gradient(90deg, var(--copper) 0 1px, transparent 1px 4px); height: 0.25em; }
.page-post-3 .hover-words span.w:hover { color: var(--copper); }
.page-post-4 .hover-words span.w::after { width: 1.1em; height: 1.1em; border-radius: 50%; border: 1px solid var(--copper); background: none; left: -0.1em; bottom: -0.05em; opacity: 0; transition: opacity var(--fast) var(--feed); }
.page-post-4 .hover-words span.w:hover::after { opacity: 1; width: 1.1em; }
.page-contact .hover-words span.w:hover { transform: rotate(2deg); transform-origin: 20% 0; }
.page-cart .hover-words span.w::after { background: repeating-linear-gradient(90deg, var(--copper) 0 2px, transparent 2px 5px); }
.page-checkout .field label:hover { color: var(--ink); }
.page-confirm .hover-words span.w:hover { text-shadow: 0 6px 14px var(--shadow-2); }
.page-terms .hover-words span.w::after { transition-duration: var(--base); }
.page-privacy .hover-words span.w:hover { transform: perspective(300px) rotateX(-20deg); transform-origin: bottom; }
.page-404 .hover-words span.w:hover { clip-path: polygon(0 0, 100% 0, 100% 45%, 0 55%, 0 100%, 100% 100%, 100% 100%, 0 100%); }

/* Media */
.photo { position: relative; overflow: hidden; background: var(--field-2); margin: 0; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: filter var(--base) var(--feed), opacity var(--base) var(--feed); }
.photo img.is-loading { filter: blur(14px) saturate(0.8); transform: scale(1.04); }
.photo .ph { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(14px) saturate(0.7); transform: scale(1.06); }
.photo.r-3-2 { aspect-ratio: 3 / 2; }
.photo.r-21-9 { aspect-ratio: 21 / 9; }
.photo.r-16-9 { aspect-ratio: 16 / 9; }
.video-band { position: relative; width: 100%; overflow: hidden; background: var(--field-2); }
.video-band video { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame-phone { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(27, 38, 34, 0.25)); }
.frame-desk { width: 100%; height: auto; filter: drop-shadow(0 30px 50px rgba(27, 38, 34, 0.22)); }

/* Year Rule */
.year-rule { width: 100%; height: 160px; display: block; }
@media (max-width: 767px) { .year-rule { height: 120px; } }

/* Pull quote, article */
.pull { position: relative; padding: 26px 0; margin: 2.2em 0; font-family: var(--rec); font-variation-settings: 'MONO' 0, 'CASL' 0.65, 'wght' 620; font-size: var(--h3); line-height: 1.25; }
.pull::before, .pull::after { content: ''; position: absolute; left: 0; right: 0; height: 1px; background: repeating-linear-gradient(90deg, var(--rule) 0 3px, transparent 3px 8px); }
.pull::before { top: 0; } .pull::after { bottom: 0; }
.article { font-size: calc(var(--body) * 1.05); }
.article h2 { font-size: var(--h3); margin-top: 1.8em; }
.article p { margin-bottom: 1.2em; }
.article ol { padding-left: 1.4em; }
.article li { margin-bottom: 0.5em; }
.dropcap::first-letter { font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 300; font-size: 4.2em; line-height: 0.8; float: left; margin: 0.08em 0.14em 0 0; color: var(--copper); }

/* Product frames in hero */
.hero-phones { position: relative; width: 100%; }
.hero-phones img { width: 100%; height: auto; }
.vis-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Blog tabs (folder tabs) */
.tabs-fan { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.tab-card { position: relative; padding-top: 22px; text-decoration: none; color: var(--ink); display: block; }
.tab-card .tab { position: absolute; top: 0; left: 22px; height: 24px; padding: 0 12px; background: var(--paper); font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 600; font-size: 0.75rem; letter-spacing: 0.08em; display: flex; align-items: center; clip-path: polygon(0 100%, 0 30%, 25% 0, 100% 0, 100% 100%); }
.tab-card .body { padding: 18px 20px 22px; transition: transform var(--fast) var(--feed), box-shadow var(--fast) var(--feed); }
.tab-card:hover .body { transform: translateY(-3px); box-shadow: 0 1px 0 var(--paper-shadow), 0 18px 34px -16px var(--shadow-2); }
.tab-card h3, .tab-card h2 { font-size: 1.25rem; margin: 10px 0 6px; }
.tab-card .photo { aspect-ratio: 3 / 2; }

/* Steps / receipts on shelf */
.receipt-slip { width: 150px; padding: 12px 12px 18px; font-family: var(--rec); font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 500; font-size: 0.75rem; line-height: 1.45; color: var(--ink); background: var(--paper); position: relative; box-shadow: 0 1px 0 var(--paper-shadow), 0 8px 18px -12px var(--shadow-2); }
.receipt-slip::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 7px; background: radial-gradient(circle at 4px 0, var(--paper) 0 2.5px, transparent 3px) 0 0 / 9px 7px repeat-x; }
.receipt-slip .m { font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 700; }
.receipt-slip .a { border-top: 1px dashed var(--rule); margin-top: 6px; padding-top: 6px; display: flex; justify-content: space-between; }
.shelf { display: flex; gap: 18px; overflow: visible; padding: 10px 0 20px; }

/* Cart / checkout summary */
.summary-strip { padding: 22px 22px 30px; }
.order-line { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }

/* Scene canvases */
.scene-wrap { position: relative; width: 100%; }
.scene-wrap canvas { width: 100%; height: 100%; display: block; }
.scene-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-enter] { opacity: 1; transform: none; clip-path: inset(0 0 0 0); filter: none; transition: none; }
  .tag-btn { animation: none; }
  .print-strip .ln { opacity: 1; transform: none; }
  .hover-words span.w, .hover-words span.w::after { transition: none; animation: none !important; }
  #loader { transition: none; }
}
html.qa-rm [data-enter] { opacity: 1; transform: none; clip-path: inset(0 0 0 0); filter: none; transition: none; }
html.qa-rm .tag-btn { animation: none; }
html.qa-rm .print-strip .ln { opacity: 1; transform: none; }

/* Mobile */
@media (max-width: 767px) {
  :root { --head-h: 56px; }
  .section { padding: 44px var(--gutter); }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  .tag-btn { height: 48px; width: 100%; justify-content: center; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .section-tag { display: none; }
}
