/* Offerbook homepage. "Swiss ledger": straight lines, no curves, no shadows; things are split by
   1px rules. Same tokens as the app (apps/web/src/index.css). Colour tiles carry the energy. */

:root {
  --bg: #ffffff;
  --panel: #f7f7f5;
  --ink: #0a0a0a;
  --muted: #6b6b6b;
  --rule: #e5e5e2;
  --input: #d6d6d2;
  --accent: #1f3bff;
  --on-ink: #ffffff;
  --lime: #d4f84a;
  --sky: #9ad9f5;
  --sand: #e9e1d3;
  --red: #ff4a1c;
  --tile-ink: #0a0a0a;

  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}
.dark {
  --bg: #0a0a0a;
  --panel: #141414;
  --ink: #fafafa;
  --muted: #9a9a9a;
  --rule: #262626;
  --input: #333333;
  --accent: #5b73ff;
  --on-ink: #0a0a0a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; border-radius: 0 !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: var(--on-ink); padding: 8px 12px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.label { font: 500 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.mono { font-family: var(--mono); font-size: .92em; }

/* Buttons: black, square. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; font: 500 14px/1 var(--body); text-decoration: none;
  border: 1px solid var(--ink); transition: background .15s, color .15s, transform .15s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-ink:hover { background: color-mix(in srgb, var(--ink) 82%, var(--bg)); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--on-ink); }
.btn-onlime { background: transparent; color: var(--tile-ink); border-color: var(--tile-ink); }
.btn-onlime:hover { background: var(--tile-ink); color: var(--lime); }

/* Tiles */
.t-white { background: var(--bg); color: var(--ink); }
.t-sky { background: var(--sky); color: var(--tile-ink); }
.t-sand { background: var(--sand); color: var(--tile-ink); }
.t-lime { background: var(--lime); color: var(--tile-ink); }
.t-black { background: var(--ink); color: var(--on-ink); }
.dark .t-black { background: #fafafa; color: #0a0a0a; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-in { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter-r) 0 var(--gutter); height: 60px; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 18px/1 var(--display); letter-spacing: -.02em; }
.brand svg { width: 22px; height: 22px; fill: var(--ink); }
.nav-links { display: flex; gap: 26px; font-size: 14px; color: var(--muted); }
.nav-links a { text-decoration: none; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.link-quiet { font-size: 14px; text-decoration: none; }
.link-quiet:hover { text-decoration: underline; text-underline-offset: 3px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; background: none; border: 1px solid var(--rule); color: var(--ink); cursor: pointer; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; fill: currentColor; }
@media (max-width: 860px) { .nav-links { display: none; } }
@media (max-width: 480px) { .link-quiet { display: none; } .nav-in { gap: 12px; } .nav-actions { gap: 10px; } .nav-actions .btn { padding: 0 12px; } }

/* ---------- Hero ---------- */
.hero { border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-block: 88px 96px; }
.hero-copy { display: grid; gap: 24px; min-width: 0; }
.hero-title { font-size: clamp(46px, 8.2vw, 104px); line-height: .94; letter-spacing: -.045em; font-weight: 600; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero-title .line > span { display: inline-block; }
.lede { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 54ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.fine { margin-top: -6px; }

.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--ink); }
.journey .tile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 18px 10px; padding: 16px 18px 14px; min-height: 118px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.journey .tile:nth-child(2n) { border-right: 0; }
.journey .tile:last-child { grid-column: 1 / -1; border-bottom: 0; border-right: 0; }
.dark .journey, .dark .journey .tile { border-color: #fafafa; }
.dark .journey .t-white { background: var(--bg); }
.t-num { font: 500 11px var(--mono); letter-spacing: .06em; opacity: .7; }
.t-name { font: 600 15px var(--display); letter-spacing: -.01em; }
.t-count { grid-column: 1 / -1; align-self: end; font: 600 52px/0.9 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.journey .tile:last-child .t-count { font-size: 64px; }

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; padding-block: 56px 64px; }
}
@media (max-width: 420px) { .t-count { font-size: 40px; } .journey .tile { min-height: 100px; } }

/* Load animation for the hero (only with JS, only without reduced motion). */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-title .line > span { animation: rise .9s var(--ease) both; }
  .js .hero-title .line:nth-child(2) > span { animation-delay: .08s; }
  .js .hero-title .line:nth-child(3) > span { animation-delay: .16s; }
  .js .hero-copy > :not(h1) { animation: fade .8s var(--ease) both; animation-delay: .35s; }
  .js .journey .tile { animation: drop .7s var(--ease) both; }
  .js .journey .tile:nth-child(1) { animation-delay: .25s; }
  .js .journey .tile:nth-child(2) { animation-delay: .32s; }
  .js .journey .tile:nth-child(3) { animation-delay: .39s; }
  .js .journey .tile:nth-child(4) { animation-delay: .46s; }
  .js .journey .tile:nth-child(5) { animation-delay: .53s; }
  .js .journey .tile:nth-child(6) { animation-delay: .60s; }
  .js .journey .tile:nth-child(7) { animation-delay: .67s; }
}
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes drop { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }

/* ---------- Section heads ---------- */
section { scroll-margin-top: 60px; }
.sec-head { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; padding-block: 72px 40px; }
.sec-num { font: 600 64px/.85 var(--display); letter-spacing: -.05em; font-variant-numeric: tabular-nums; color: var(--ink); }
.sec-head h2 { font-size: clamp(28px, 4.2vw, 48px); line-height: 1.04; margin-top: 8px; max-width: 22ch; }
@media (max-width: 600px) { .sec-head { grid-template-columns: 1fr; gap: 8px; padding-block: 56px 28px; } .sec-num { font-size: 44px; } }

/* Reveal on scroll: visible by default; JS adds .pre to hide, then .in to show. */
@media (prefers-reduced-motion: no-preference) {
  .reveal.pre { opacity: 0; transform: translateY(18px); }
  .reveal { transition: opacity .8s var(--ease), transform .8s var(--ease); }
}

/* ---------- Demo ---------- */
.demo-sec { border-bottom: 1px solid var(--rule); padding-bottom: 80px; }
.demo { display: grid; gap: 0; }
.win { border: 1px solid var(--ink); background: var(--bg); overflow: hidden; }
.dark .win { border-color: #3a3a3a; }
.win-bar { height: 40px; display: flex; align-items: center; gap: 16px; padding: 0 14px; border-bottom: 1px solid var(--rule); background: var(--panel); }
.win-dots { display: flex; gap: 6px; }
.win-dots i { width: 10px; height: 10px; border: 1px solid var(--input); display: block; }
.win-url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: none; letter-spacing: .02em; }
.win-url b { color: var(--ink); font-weight: 500; }
.win-live { display: flex; align-items: center; gap: 6px; }
.win-live i { width: 7px; height: 7px; background: var(--lime); outline: 1px solid var(--tile-ink); animation: blink 2s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }

.win-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); height: 520px; font-size: 13px; }
.d-side { border-right: 1px solid var(--rule); background: var(--panel); display: grid; grid-template-rows: auto 1fr auto; }
.d-org { display: flex; gap: 10px; align-items: center; padding: 14px; border-bottom: 1px solid var(--rule); }
.d-org-mark { width: 24px; height: 24px; background: var(--accent); flex: none; }
.d-org b, .d-user b { display: block; font: 600 13px/1.2 var(--display); }
.d-org small, .d-user small { display: block; font: 500 9.5px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.d-side ul { list-style: none; margin: 0; padding: 10px 8px; display: grid; gap: 2px; align-content: start; }
.d-side li { padding: 7px 10px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); transition: background .3s, color .3s; }
.d-side li.on { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--ink); font-weight: 500; }
.d-badge { font: 600 10px/1 var(--mono); font-style: normal; background: var(--ink); color: var(--on-ink); padding: 3px 5px; }
.d-badge.bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }
.d-user { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--rule); }
.d-av { width: 26px; height: 26px; display: grid; place-items: center; background: var(--sand); color: var(--tile-ink); font: 600 10px var(--mono); flex: none; }

.d-main { position: relative; overflow: hidden; }
.scene { position: absolute; inset: 0; padding: 20px 22px; display: grid; align-content: start; gap: 16px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .45s var(--ease), transform .45s var(--ease), visibility 0s .45s; }
.scene.active { opacity: 1; visibility: visible; transform: none; transition: opacity .45s var(--ease) .1s, transform .45s var(--ease) .1s, visibility 0s; }
.d-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.d-head h3 { font-size: 24px; letter-spacing: -.03em; margin-top: 4px; }
.d-chip { font: 500 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; border: 1px solid var(--rule); padding: 7px 9px; color: var(--muted); white-space: nowrap; }

/* Scene 1 */
.d-ledger { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--rule); }
.d-ledger > div { padding: 10px 12px; border-right: 1px solid var(--rule); display: grid; gap: 4px; }
.d-ledger > div:last-child { border-right: 0; }
.d-ledger > div:first-child { background: var(--ink); color: var(--on-ink); }
.d-ledger > div:first-child .label { color: inherit; opacity: .7; }
.d-ledger b { font: 600 28px/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.d-table { border-top: 1px solid var(--rule); }
.d-row { display: grid; grid-template-columns: 1.4fr 1.3fr .8fr 1fr; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--rule); align-items: center; white-space: nowrap; overflow: hidden; }
.d-row > span { overflow: hidden; text-overflow: ellipsis; }
.d-row-h { font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.chip-new { font: 600 9px/1 var(--mono); font-style: normal; text-transform: uppercase; background: var(--ink); color: var(--on-ink); padding: 3px 5px; margin-right: 6px; vertical-align: 1px; }
.d-row-new { background: color-mix(in srgb, var(--lime) 45%, transparent); }
.scene[data-scene="0"] .d-row-new { clip-path: inset(0 0 100% 0); max-height: 0; padding-block: 0; border-bottom-width: 0; transition: clip-path .5s var(--ease), max-height .5s var(--ease), padding .5s var(--ease), background 1.4s ease; }
.scene[data-scene="0"].s1 .d-row-new { clip-path: inset(0); max-height: 44px; padding-block: 9px; border-bottom-width: 1px; }
.scene[data-scene="0"].s3 .d-row-new { background: transparent; }
.d-accept { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; background: var(--panel); border: 1px solid var(--rule); opacity: 0; transform: translateY(6px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.scene.s2 .d-accept { opacity: 1; transform: none; }
.d-select { border: 1px solid var(--input); background: var(--bg); padding: 6px 10px; display: inline-flex; gap: 18px; }
.d-select i { font-style: normal; color: var(--muted); }
.d-btn { background: var(--ink); color: var(--on-ink); padding: 7px 14px; font-weight: 500; margin-left: auto; transition: transform .12s; }
.scene.s3 .d-btn { transform: scale(.94); }
.scene.s3 .d-accept { opacity: .0; transition-delay: .5s; }

/* Scene 2 */
.d-board { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); border: 1px solid var(--rule); min-height: 360px; }
.d-col { border-right: 1px solid var(--rule); display: grid; align-content: start; gap: 8px; padding-bottom: 10px; transition: background .4s; }
.d-col:last-child { border-right: 0; }
.d-colh { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; padding: 10px 12px; }
.d-colh span { font: 500 10px var(--mono); opacity: .7; }
.d-colh b { font: 600 13px var(--display); }
.d-colh em { grid-column: 1 / -1; font: 600 30px/1 var(--display); font-style: normal; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.d-card { margin: 0 10px; border: 1px solid var(--rule); background: var(--bg); display: grid; gap: 2px; padding: 9px 10px 0; position: relative; }
.d-card b { font: 600 13px/1.3 var(--display); }
.d-card small { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.d-foot { margin: 8px -10px 0; padding: 5px 10px; border-top: 1px solid var(--rule); font: 500 10px var(--mono); color: var(--muted); }
#mover.lift { border-color: var(--ink); z-index: 3; }
.d-col.drop { outline: 2px solid var(--accent); outline-offset: -2px; }
.d-col.landed { background: color-mix(in srgb, var(--lime) 30%, transparent); }
.d-colh em.tick { animation: tick .5s var(--ease); }
@keyframes tick { 0% { transform: translateY(0); } 40% { transform: translateY(-6px); } 100% { transform: none; } }

/* Scene 3 */
.d-ask { display: grid; gap: 14px; max-width: 640px; }
.d-q, .d-a { border: 1px solid var(--rule); padding: 12px 14px; display: grid; gap: 6px; }
.d-q { background: var(--panel); }
.d-q p { font-size: 15px; font-weight: 500; min-height: 1.5em; }
.caret { display: inline-block; width: 7px; height: 1.05em; background: var(--ink); vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
.scene.s2 .caret { display: none; }
.d-a { gap: 8px; }
.d-a > * { opacity: 0; transform: translateY(6px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.d-a ol { margin: 0; padding: 0 0 0 0; list-style: none; counter-reset: n; display: grid; border-top: 1px solid var(--rule); }
.d-a li { counter-increment: n; padding: 7px 0; border-bottom: 1px solid var(--rule); display: flex; gap: 10px; }
.d-a li::before { content: "0" counter(n); font: 500 10.5px/1.9 var(--mono); color: var(--muted); }
.scene.s2 .d-a > :nth-child(1), .scene.s2 .d-a > :nth-child(2) { opacity: 1; transform: none; }
.scene.s3 .d-a > :nth-child(3) { opacity: 1; transform: none; }
.scene.s4 .d-a > :nth-child(4), .scene.s4 .d-a > :nth-child(5) { opacity: 1; transform: none; }
.d-a ol li { opacity: 0; transition: opacity .35s; }
.scene.s3 .d-a ol li { opacity: 1; }
.scene.s3 .d-a ol li:nth-child(2) { transition-delay: .25s; }
.scene.s3 .d-a ol li:nth-child(3) { transition-delay: .5s; }
.d-next { background: var(--sand); color: var(--tile-ink); padding: 8px 10px; font-size: 12.5px; }
.d-src { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.d-src i { font-style: normal; border: 1px solid var(--rule); padding: 3px 6px; }

/* Scene 4 */
.d-check { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 20px; align-items: start; }
.d-doc { position: relative; aspect-ratio: 3 / 4; max-width: 100%; border: 1px solid var(--input); background: var(--bg); padding: 16px; display: grid; align-content: start; gap: 14px; overflow: hidden; }
.d-doc-top { display: flex; justify-content: space-between; }
.d-doc-top span:first-child { width: 34px; height: 34px; background: var(--rule); }
.d-doc-top span:last-child { width: 70px; height: 8px; background: var(--rule); }
.d-doc-lines, .d-doc-grid { display: grid; gap: 7px; }
.d-doc-lines i, .d-doc-grid i { height: 6px; background: var(--rule); display: block; }
.d-doc-lines i:nth-child(2n) { width: 78%; }
.d-doc-lines i:nth-child(3n) { width: 64%; }
.d-doc-grid { grid-template-columns: 1fr 1fr; }
.d-doc i.flag { transition: background .4s, outline-color .4s; outline: 2px solid transparent; outline-offset: 2px; }
.scene.s2 .d-doc i.flag { background: var(--red); outline-color: var(--red); }
.scanline { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); opacity: 0; }
.scene.s1 .scanline { opacity: 1; animation: scan 1.8s var(--ease) forwards; }
@keyframes scan { from { top: 0; } to { top: 100%; } }
.d-doc-name { position: absolute; bottom: 0; left: 0; right: 0; padding: 6px 8px; border-top: 1px solid var(--rule); background: var(--panel); text-transform: none; }
.d-result { display: grid; gap: 10px; opacity: 0; transform: translateX(10px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.scene.s2 .d-result { opacity: 1; transform: none; }
.d-verdict { padding: 12px 14px; display: grid; gap: 4px; }
.d-verdict .label { color: inherit; opacity: .7; }
.d-verdict b { font: 600 24px/1 var(--display); letter-spacing: -.03em; }
.d-result ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.d-result li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); line-height: 1.4; opacity: 0; transition: opacity .35s; }
.scene.s3 .d-result li { opacity: 1; }
.scene.s3 .d-result li:nth-child(2) { transition-delay: .2s; }
.scene.s3 .d-result li:nth-child(3) { transition-delay: .4s; }
.sev { font: 600 9.5px/1 var(--mono); text-transform: uppercase; padding: 4px 5px; border: 1px solid var(--ink); flex: none; height: fit-content; margin-top: 1px; min-width: 52px; text-align: center; }
.sev.ok { background: var(--lime); color: var(--tile-ink); border-color: var(--tile-ink); }
.d-result .d-next { opacity: 0; transition: opacity .4s .6s; }
.scene.s3 .d-result .d-next { opacity: 1; }

/* Toast */
.toast { position: absolute; right: 18px; bottom: 18px; display: flex; align-items: center; gap: 10px; background: var(--ink); color: var(--on-ink); padding: 11px 14px; font-size: 12.5px; font-weight: 500; transform: translateY(calc(100% + 24px)); transition: transform .45s var(--ease); max-width: calc(100% - 36px); z-index: 5; }
.toast.show { transform: none; }
.toast-sq { width: 9px; height: 9px; background: var(--lime); flex: none; }

/* Tabs under the window */
.demo-tabs { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--ink); border-top: 0; }
.dark .demo-tabs { border-color: #3a3a3a; }
.demo-tabs button { position: relative; text-align: left; background: var(--bg); color: var(--ink); border: 0; border-right: 1px solid var(--rule); padding: 16px 18px 20px; display: grid; gap: 4px; cursor: pointer; font: inherit; transition: background .2s; }
.demo-tabs button:last-child { border-right: 0; }
.demo-tabs button:hover { background: var(--panel); }
.demo-tabs b { font: 600 15px/1.3 var(--display); letter-spacing: -.01em; }
.demo-tabs small { font-size: 13px; color: var(--muted); line-height: 1.45; }
.demo-tabs button[aria-selected="true"] { background: var(--panel); }
.demo-tabs button[aria-selected="true"] .label { color: var(--ink); }
.demo-tabs .bar { position: absolute; left: 0; top: -1px; height: 2px; width: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.demo-tabs button[aria-selected="true"] .bar { transform: scaleX(var(--p, 0)); }

@media (max-width: 900px) {
  .win-body { grid-template-columns: 1fr; height: 560px; }
  .d-side { display: none; }
  .demo-tabs { grid-template-columns: 1fr 1fr; }
  .demo-tabs button:nth-child(2) { border-right: 0; }
  .demo-tabs button:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .d-board { overflow-x: auto; }
}
@media (max-width: 560px) {
  .win-body { height: 600px; }
  .scene { padding: 14px; }
  .d-row { grid-template-columns: 1.4fr 1fr; }
  .d-row > span:nth-child(n+3) { display: none; }
  .d-check { grid-template-columns: 1fr; }
  .d-doc { max-width: 150px; }
  .demo-tabs small { display: none; }
  .win-live { display: none; }
}

/* ---------- Before / after ---------- */
.before-after { border-bottom: 1px solid var(--rule); padding-bottom: 80px; }
.ba { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule); }
.ba-col { padding: 26px 28px 30px; display: grid; gap: 16px; align-content: start; }
.ba-col + .ba-col { border-left: 1px solid var(--rule); }
.ba ul { list-style: none; margin: 0; padding: 0; display: grid; }
.ba li { padding: 13px 0; border-bottom: 1px solid var(--rule); font-size: 16px; display: flex; gap: 12px; }
.ba li:last-child { border-bottom: 0; }
.ba-col:first-child li { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--red) 70%, transparent); text-decoration-thickness: 1.5px; }
.ba-col:first-child li::before { content: "×"; font-family: var(--mono); color: var(--red); text-decoration: none; }
.ba-after { background: var(--lime); color: var(--tile-ink); }
.ba-after .label { color: var(--tile-ink); opacity: .7; }
.ba-after li { border-color: color-mix(in srgb, var(--tile-ink) 18%, transparent); font-weight: 500; }
.ba-after li::before { content: "→"; font-family: var(--mono); }
@media (max-width: 720px) { .ba { grid-template-columns: 1fr; } .ba-col + .ba-col { border-left: 0; border-top: 1px solid var(--rule); } .ba-col { padding: 20px; } }

/* ---------- Features ---------- */
.features { border-bottom: 1px solid var(--rule); padding-bottom: 80px; }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); border-left: 1px solid var(--rule); }
.feat { padding: 24px 24px 22px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: grid; grid-template-rows: auto auto 1fr auto; gap: 12px; min-height: 270px; position: relative; transition: background .25s; }
.feat::after { content: ""; position: absolute; left: 0; top: -1px; height: 3px; width: 0; background: var(--ink); transition: width .5s var(--ease); }
.feat:hover::after { width: 100%; }
.feat:hover { background: var(--panel); }
.feat-n { font: 600 40px/.9 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.feat h3 { font-size: 20px; line-height: 1.2; letter-spacing: -.02em; }
.feat p { color: var(--muted); font-size: 15px; line-height: 1.6; }
.feat-tag { justify-self: start; border: 1px solid var(--rule); padding: 4px 7px; }
@media (max-width: 960px) { .feat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .feat-grid { grid-template-columns: 1fr; } .feat { min-height: 0; } }

.more { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); }
.more > div { padding: 16px 20px 16px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 2px; }
.more b { font: 600 15px var(--display); display: flex; gap: 8px; align-items: center; }
.more b em { font: 600 9.5px/1 var(--mono); font-style: normal; text-transform: uppercase; background: var(--sand); color: var(--tile-ink); padding: 3px 5px; }
.more span { color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .more { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .more { grid-template-columns: 1fr; } }

/* ---------- Trust ---------- */
.trust { background: var(--ink); color: var(--on-ink); }
.dark .trust { background: var(--panel); color: var(--ink); }
.trust-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; padding-block: 88px; }
.trust .label { color: inherit; opacity: .6; }
.trust h2 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.02; margin: 12px 0 20px; }
.trust p { opacity: .75; max-width: 50ch; font-size: 17px; }
.trust-list { margin: 0; display: grid; border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.trust-list > div { display: grid; grid-template-columns: 180px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.trust-list dt { font: 600 16px var(--display); display: flex; gap: 10px; align-items: baseline; }
.trust-list dt::before { content: ""; width: 9px; height: 9px; background: var(--lime); flex: none; transform: translateY(-1px); }
.trust-list dd { margin: 0; opacity: .75; }
@media (max-width: 860px) { .trust-grid { grid-template-columns: 1fr; gap: 32px; padding-block: 64px; } }
@media (max-width: 520px) { .trust-list > div { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Pricing ---------- */
.pricing { border-bottom: 1px solid var(--rule); padding-bottom: 72px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--rule); }
.plan { padding: 26px 26px 28px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 22px; border-right: 1px solid var(--rule); position: relative; }
.plan:last-child { border-right: 0; }
.plan-main { outline: 1px solid var(--ink); outline-offset: -1px; z-index: 1; }
.plan-flag { position: absolute; top: -1px; right: -1px; padding: 6px 9px; color: var(--tile-ink) !important; border: 1px solid var(--tile-ink); }
.plan-head { display: grid; gap: 6px; }
.plan-head .label { color: var(--ink); font-size: 12px; }
.plan-head p { color: var(--muted); font-size: 14.5px; }
.price { display: flex; align-items: baseline; gap: 4px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.price .cur { font: 600 24px var(--display); }
.price b { font: 600 52px/1 var(--display); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.price .per { color: var(--muted); font-size: 14px; margin-left: 4px; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; align-content: start; font-size: 14.5px; }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: ""; width: 7px; height: 7px; background: var(--ink); margin-top: 8px; flex: none; }
.plan li em { font: 600 9.5px/1 var(--mono); font-style: normal; text-transform: uppercase; background: var(--sand); color: var(--tile-ink); padding: 3px 5px; margin-left: 6px; align-self: center; }
.plan .btn { width: 100%; }
.plans-note { margin-top: 18px; text-align: center; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } .plan { border-right: 0; border-bottom: 1px solid var(--rule); } .plan:last-child { border-bottom: 0; } }

/* ---------- FAQ ---------- */
.faq { border-bottom: 1px solid var(--rule); }
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; padding-block: 80px; }
.faq h2 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.05; margin-top: 12px; }
.faq-list { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font: 600 17px/1.35 var(--display); letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 500 18px/1 var(--mono); transition: transform .25s var(--ease); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 40px 20px 0; color: var(--muted); max-width: 62ch; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; gap: 24px; padding-block: 56px; } }

/* ---------- Final CTA ---------- */
.final { background: var(--lime); color: var(--tile-ink); border-bottom: 1px solid var(--tile-ink); }
.final-in { padding-block: 96px; display: grid; gap: 20px; justify-items: start; }
.final h2 { font-size: clamp(44px, 8vw, 112px); line-height: .92; letter-spacing: -.05em; }
.final p { font-size: 18px; max-width: 46ch; }
.final .btn-ink { background: var(--tile-ink); color: var(--lime); border-color: var(--tile-ink); }
.final .btn-ink:hover { background: #262626; }

/* ---------- Footer ---------- */
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 40px; padding-block: 32px 40px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 22px; font-size: 14px; color: var(--muted); }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: var(--ink); }
.foot .label { margin-left: auto; }
@media (max-width: 560px) { .foot .label { margin-left: 0; width: 100%; } }

/* Visitors who ask for less motion get still frames: no fades, slides or count-ups. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
