/* ==========================================================================
   QuickCap – styles
   Brand: navy #0F1D3D · lime #C2CF0E · cream #FBF6E8 (palette: #000000 · #1F150C · #412D15 · #E1DCC9
   Layout: fixed side rail (bottom dock on phones) + full-bleed "ledger" canvas
   ========================================================================== */

:root {
  --bg: #000000;
  --panel: #1f150c;
  --panel-2: #412d15;
  --text: #e1dcc9;
  --muted: #a39a85;
  --line: rgba(225, 220, 201, 0.09);
  --line-2: rgba(225, 220, 201, 0.18);
  --lime: #e1dcc9;
  --lime-glow: rgba(225, 220, 201, 0.15);
  --amber: #d9894a;
  --paper: #e1dcc9;
  --ink: #1f150c;
  --ink-muted: #5e4a33;

  --f-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --f-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --rail: 88px;
  --r: 24px;
  --pad: clamp(16px, 4.5vw, 64px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--f-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* Ledger-paper ruling + a lime glow, fixed behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(70vw 50vw at 95% -10%, rgba(225, 220, 201, .11), transparent 60%),
    radial-gradient(50vw 40vw at -10% 110%, rgba(217, 137, 74, .06), transparent 60%),
    repeating-linear-gradient(transparent 0 39px, rgba(225, 220, 201, .035) 39px 40px);
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; letter-spacing: -.025em; text-wrap: balance; }
h2 { font-size: clamp(36px, 5.4vw, 76px); font-weight: 800; line-height: .98; }
h3 { font-size: 21px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
::selection { background: var(--lime); color: var(--ink); }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--lime); color: var(--ink); padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { left: 8px; }
.link { color: var(--lime); text-underline-offset: 3px; }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; border: 1px solid transparent;
  font: 700 15px var(--f-body); text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s, box-shadow .2s, border-color .2s;
}
.btn .i { transition: transform .2s var(--ease); }
.btn:hover .i { transform: translateX(3px); }
.btn:active { transform: scale(.97); }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-lime:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -10px rgba(225, 220, 201, .7); }
.btn-line { border-color: var(--line-2); background: transparent; }
.btn-line:hover { background: rgba(225, 220, 201, .07); border-color: var(--text); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #412d15; transform: translateY(-2px); }
.btn-ink:disabled { opacity: .6; cursor: progress; }
.btn-sm { padding: 10px 16px; font-size: 14px; }
.btn-block { width: 100%; }

.pill, .chip, .formats li {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-2); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; color: var(--muted); margin: 0;
}
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); flex: none; animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(225, 220, 201, .6); } 80%, 100% { box-shadow: 0 0 0 10px rgba(225, 220, 201, 0); } }

/* Category tags: solid pastels read on both navy and paper */
.cat { display: inline-block; font: 600 12px/1 var(--f-body); font-style: normal; padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.c-lime { background: #ebe0c6; color: #412d15; }
.c-navy { background: #cdb994; color: #1f150c; }
.c-amber { background: #efc6a0; color: #5a2a0c; }
.c-sky { background: #c9cdb5; color: #2b3320; }
.c-grey { background: #d3ccb8; color: #3a2e1e; }

.ico {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--lime-glow); color: var(--lime); font-size: 22px; margin-bottom: 20px;
}
.ico-amber { background: rgba(217, 137, 74, .15); color: var(--amber); }

/* ---------- Rail ---------- */
.rail {
  position: fixed; inset: 0 0 0 auto; z-index: 50; width: var(--rail);
  display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 18px 0 18px 10px;
  background: rgba(0, 0, 0, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-left: 1px solid var(--line);
}
.rail-logo { width: 54px; height: 54px; border-radius: 16px; background: var(--paper); padding: 7px; transition: transform .3s var(--ease); }
.rail-logo:hover { transform: rotate(-8deg) scale(1.06); }
.rail-nav { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.rail-nav a {
  position: relative; display: grid; place-items: center; width: 52px; height: 40px; border-radius: 12px;
  text-decoration: none; font: 500 12px var(--f-mono); color: var(--muted);
  transition: background-color .2s, color .2s;
}
.rail-nav a:hover { color: var(--text); background: rgba(225, 220, 201, .08); }
.rail-nav a[aria-current="page"] { color: var(--ink); background: var(--lime); }
.rail-nav .rl {
  position: absolute; right: calc(100% + 22px); top: 50%; transform: translate(6px, -50%);
  white-space: nowrap; background: var(--paper); color: var(--ink); font: 600 13px var(--f-body);
  padding: 6px 10px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease);
}
.rail-nav a:hover .rl, .rail-nav a:focus-visible .rl { opacity: 1; transform: translate(0, -50%); }
/* The rail doubles as the page scrollbar: a full-height track with a draggable thumb */
.rail-progress { position: absolute; left: 0; top: 0; bottom: 0; width: 10px; cursor: pointer; touch-action: none; }
.rail-progress::before { content: ""; position: absolute; inset: 8px 3px; border-radius: 4px; background: var(--line); transition: inset .2s; }
.rail-progress i {
  position: absolute; left: 3px; right: 3px; top: 8px; height: var(--th, 60px); border-radius: 4px;
  background: var(--lime); transform: translateY(var(--ty, 0px)); box-shadow: 0 0 14px rgba(225, 220, 201, .45);
  transition: left .2s, right .2s;
}
.rail-progress:hover::before, .rail-progress.drag::before { inset: 8px 1px; }
.rail-progress:hover i, .rail-progress.drag i { left: 1px; right: 1px; }
.rail-progress.drag { cursor: grabbing; }
.rail-cta {
  writing-mode: vertical-rl; transform: rotate(180deg); text-decoration: none;
  background: var(--lime); color: var(--ink); padding: 18px 12px; border-radius: 999px;
  font: 800 13px var(--f-display); letter-spacing: .1em; text-transform: uppercase;
  transition: box-shadow .2s;
}
.rail-cta:hover { box-shadow: 0 0 0 6px var(--lime-glow); }

main, .foot { margin-right: var(--rail); }
/* The rail replaces the browser scrollbar on desktop */
@media (min-width: 900px) {
  html { scrollbar-width: none; }
  html::-webkit-scrollbar { display: none; }
}

/* ---------- Sections ---------- */
.sec { padding: clamp(80px, 11vw, 150px) var(--pad); position: relative; }
.sec-head { max-width: 860px; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-no { display: flex; align-items: center; gap: 14px; font: 500 13px var(--f-mono); color: var(--lime); letter-spacing: .04em; margin: 0 0 20px; }
.sec-no::after { content: ""; width: 56px; height: 1px; background: currentColor; opacity: .6; }
.sub { color: var(--muted); font-size: clamp(17px, 1.5vw, 20px); max-width: 640px; margin: 20px 0 0; }

.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity .9s var(--ease) var(--rd, 0s), transform .9s var(--ease) var(--rd, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- 00 Hero ---------- */
.hero { min-height: 100svh; padding: 26px var(--pad) 40px; display: flex; flex-direction: column; gap: clamp(28px, 4vw, 48px); }
.hero-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-logo { height: 38px; width: auto; }
.hero-cta { margin-left: auto; }
.hero h1 { font-size: clamp(44px, 7.6vw, 128px); font-weight: 800; line-height: .9; letter-spacing: -.05em; max-width: 14ch; }
.hero h1 .w { display: inline-block; }
.js .hero h1 .w { animation: rise 1s var(--ease) both; animation-delay: calc(var(--i) * 80ms + 100ms); }
@keyframes rise { from { opacity: 0; transform: translateY(45%) rotate(3deg); } }
.hero h1 .hl { color: transparent; -webkit-text-stroke: 2px var(--lime); position: relative; }
.hero h1 .hl svg { position: absolute; left: 0; bottom: -.12em; width: 100%; height: .22em; overflow: visible; }
.hero h1 .hl path { fill: none; stroke: var(--lime); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 330; stroke-dashoffset: 330; animation: draw 1.1s var(--ease) 1s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero-row { display: grid; grid-template-columns: minmax(250px, 330px) 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.lead { font-size: clamp(17px, 1.4vw, 19px); color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.formats { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-note { font-size: 12px; color: var(--muted); margin: 0; text-align: right; }

/* Lab: inbox → scanner → books */
.lab {
  display: grid; grid-template-columns: minmax(150px, .7fr) 1.3fr; grid-template-areas: "tray tray" "scan ledger";
  gap: 14px; padding: 14px; border-radius: 30px;
  background: linear-gradient(160deg, rgba(65, 45, 21, .75), rgba(31, 21, 12, .55)); border: 1px solid var(--line-2);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7);
}
.lab-label { display: flex; justify-content: space-between; align-items: center; gap: 10px; font: 500 12px var(--f-mono); color: var(--muted); margin: 0 0 12px; letter-spacing: .03em; }
.lab-hint { color: var(--lime); font-family: var(--f-body); font-size: 13px; }
.lab-tray { grid-area: tray; padding: 6px 6px 4px; }
.bills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 6px 4px 10px; }
.bill {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 150px; padding: 14px; text-align: left;
  background: var(--paper); color: var(--ink); border: 0; border-radius: 10px;
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .7);
  transform: rotate(var(--rot)); cursor: grab; user-select: none; -webkit-user-select: none;
  transition: transform .3s var(--ease), translate .35s var(--ease), opacity .3s, box-shadow .3s;
}
.bill::after { content: ""; position: absolute; top: 0; right: 0; width: 22px; height: 22px; background: linear-gradient(225deg, var(--bg) 50%, #d9d1b8 50%); border-radius: 0 10px 0 6px; }
.bill:hover { transform: rotate(0) translateY(-6px); box-shadow: 0 24px 40px -16px rgba(0, 0, 0, .8); }
.bill.dragging { z-index: 20; cursor: grabbing; transition: none; transform: rotate(0) scale(1.06); box-shadow: 0 36px 60px -20px rgba(0, 0, 0, .9); }
.bill.used { opacity: .18; transform: rotate(var(--rot)) scale(.9); cursor: default; filter: grayscale(1); }
.bill-photo { background: #d4c9ab; }
.bill-mail { background: #ece6d4; }
.bill-type { display: inline-flex; align-items: center; gap: 6px; font: 500 11px var(--f-mono); text-transform: uppercase; color: var(--ink-muted); }
.bill-vendor { font: 700 15px/1.15 var(--f-display); }
.bill-lines { display: grid; gap: 5px; }
.bill-lines i { height: 5px; border-radius: 3px; background: rgba(31, 21, 12, .14); }
.bill-lines i:nth-child(2) { width: 75%; }
.bill-lines i:nth-child(3) { width: 55%; }
.bill-amt { margin-top: auto; font: 500 14px var(--f-mono); }
@media (pointer: fine) { .bill { touch-action: none; } }
.lab-reset { margin-top: 8px; }

.scanner { grid-area: scan; display: flex; flex-direction: column; padding: 6px; }
.scan-bed {
  position: relative; flex: 1; min-height: 210px; border-radius: 20px; overflow: hidden;
  display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 16px;
  border: 2px dashed rgba(225, 220, 201, .45); background: rgba(225, 220, 201, .04);
  transition: background-color .25s, border-color .25s, transform .25s var(--ease);
}
.scan-ico { font-size: 34px; color: var(--lime); transition: transform .3s var(--ease); }
.scan-msg { margin: 0; font-weight: 600; font-size: 14px; }
.scanner.over .scan-bed { background: rgba(225, 220, 201, .16); border-color: var(--lime); border-style: solid; transform: scale(1.03); }
.scanner.over .scan-ico { transform: translateY(-6px); }
.scan-beam { position: absolute; left: 0; right: 0; top: 0; height: 40%; opacity: 0; background: linear-gradient(to bottom, transparent, rgba(225, 220, 201, .35) 85%, var(--lime)); pointer-events: none; }
.scanner.busy .scan-beam { opacity: 1; animation: beam 1s linear infinite; }
.scanner.busy .scan-ico { animation: spin 1s linear infinite; }
@keyframes beam { from { transform: translateY(-100%); } to { transform: translateY(260%); } }
@keyframes spin { 50% { transform: scale(.85); } }

.ledger { grid-area: ledger; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); border-radius: 20px; padding: 16px; min-height: 280px; }
.ledger .lab-label { color: var(--ink-muted); }
.state { font: 600 11px var(--f-body); padding: 4px 10px; border-radius: 999px; background: #ebe0c6; color: #412d15; }
.state.warn { background: #efc6a0; color: #5a2a0c; }
.ledger-body { flex: 1; display: grid; align-content: start; gap: 10px; max-height: 300px; overflow-y: auto; }
.ledger-empty { margin: auto 0; padding: 26px 8px; text-align: center; color: var(--ink-muted); font-size: 14px; border: 1px dashed rgba(31, 21, 12, .2); border-radius: 14px; }
.entry { border: 1px solid rgba(31, 21, 12, .12); border-radius: 14px; padding: 12px; background: #f0ebdc; animation: pop .45s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-10px) scale(.97); } }
.entry header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.entry header b { display: block; font: 700 15px var(--f-display); }
.entry header span { font-size: 12px; color: var(--ink-muted); }
.entry .tag { font: 600 11px var(--f-body); padding: 4px 9px; border-radius: 999px; flex: none; }
.tag-ok { background: #ebe0c6; color: #412d15 !important; }
.tag-warn { background: #efc6a0; color: #5a2a0c !important; }
.entry-lines { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.entry-lines li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; font-size: 13px; animation: pop .4s var(--ease) both; animation-delay: var(--d); }
.entry-lines b { font: 500 13px var(--f-mono); min-width: 70px; text-align: right; }
.entry-total { display: flex; justify-content: space-between; margin: 10px 0 0; padding-top: 8px; border-top: 1px dashed rgba(31, 21, 12, .2); font-size: 13px; }
.entry-total b { font-family: var(--f-mono); }
.entry-alert { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 9px 10px; border-radius: 10px; background: #f1dcc4; color: #5a2a0c; font-size: 13px; }
.entry-alert .i { margin-top: 3px; }
.entry.is-dup { border-color: #c98a5a; }
.entry.mini .entry-lines, .entry.mini .entry-total, .entry.mini .entry-alert { display: none; }
.entry.mini { padding: 9px 12px; }
.ledger-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 0; padding-top: 12px; border-top: 2px solid var(--ink); }
.ledger-foot dt { font: 500 10px var(--f-mono); text-transform: uppercase; color: var(--ink-muted); letter-spacing: .05em; }
.ledger-foot dd { margin: 0; font: 800 20px var(--f-display); }

/* ---------- 01 Problem: compare ---------- */
.compare {
  --pos: 50%;
  position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line-2);
  user-select: none; -webkit-user-select: none; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7);
}
.cmp-pane { font-size: 14px; }
.cmp-old { background: #fff; color: #222; font-family: var(--f-mono); font-size: 13px; }
.cmp-new { position: absolute; inset: 0; background: var(--panel); clip-path: inset(0 0 0 var(--pos)); }
.cmp-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; height: 54px; padding: 0 20px; font-size: 12px; }
.cmp-old .cmp-bar { background: #1d6f42; color: #e8f5ee; }
.cmp-new .cmp-bar { background: var(--panel-2); color: var(--muted); }
.cmp-tag { font: 700 13px var(--f-body); color: inherit; }
.cmp-new .cmp-tag { color: var(--lime); }
.cmp-row { display: grid; grid-template-columns: 90px 1.4fr 1.2fr 1.1fr 110px; align-items: center; height: 52px; padding: 0 20px; gap: 12px; }
.cmp-row > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-old .cmp-row { border-bottom: 1px solid #e3e3e3; }
.cmp-new .cmp-row { border-bottom: 1px solid var(--line); }
.cmp-th { height: 40px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.cmp-old .cmp-th { background: #f1f1f1; color: #666; }
.cmp-new .cmp-th { color: var(--muted); }
.cmp-row .num { text-align: right; }
.cmp-new .num { font-family: var(--f-mono); }
.cmp-total { font-weight: 700; }
.cmp-new .cmp-total .num { color: var(--lime); }
.err { color: #c0392b; text-decoration: underline wavy #e74c3c; text-underline-offset: 3px; }
.cmp-new .is-held { background: rgba(217, 137, 74, .08); }
.cmp-new .is-held span:not(:nth-child(4)) { opacity: .55; text-decoration: line-through; }
.cmp-foot { height: 48px; display: flex; align-items: center; padding: 0 20px; font-size: 13px; }
.cmp-old .cmp-foot { color: #c0392b; font-style: italic; }
.cmp-new .cmp-foot { color: var(--muted); }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: var(--lime); pointer-events: none; box-shadow: 0 0 20px rgba(225, 220, 201, .6); }
.cmp-knob {
  position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px;
  display: grid; place-items: center; border-radius: 50%; background: var(--lime); color: var(--ink); font-size: 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4); transition: transform .2s var(--ease);
}
.compare:hover .cmp-knob { transform: scale(1.1); }
.compare:has(.cmp-range:focus-visible) .cmp-knob { outline: 3px solid var(--text); outline-offset: 3px; }
.cmp-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }

.pains { list-style: none; margin: clamp(40px, 5vw, 64px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-2); }
.pains li { padding: 28px 28px 0 0; }
.pains li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.pains .i { font-size: 26px; color: var(--amber); margin-bottom: 18px; }
.pains h3 { margin-bottom: 10px; }
.pains p { color: var(--muted); margin: 0; }

/* ---------- 02 How: horizontal track ---------- */
.how-head { display: grid; }
.how-progress { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 28px; max-width: 320px; }
.how-progress i { display: block; height: 100%; background: var(--lime); transform-origin: left; transform: scaleX(var(--hp, 0)); }
.how-track {
  list-style: none; margin: 0; padding: 0 0 14px; display: flex; gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--lime) transparent;
}
.how-card {
  flex: 0 0 min(82vw, 500px); scroll-snap-align: start; position: relative; overflow: hidden;
  display: flex; flex-direction: column; min-height: min(440px, 56vh); padding: 32px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 30px;
}
.how-card p { color: var(--muted); margin: 12px 0 0; max-width: 34ch; }
.how-card h3 { font-size: clamp(26px, 2.6vw, 34px); }
.how-n { position: absolute; right: 18px; top: -10px; font: 800 180px/1 var(--f-display); color: transparent; -webkit-text-stroke: 1.5px var(--line-2); pointer-events: none; }
.how-card-lime { background: var(--lime); color: var(--ink); border-color: transparent; }
.how-card-lime p { color: rgba(31, 21, 12, .78); }
.how-card-lime .ico { background: rgba(31, 21, 12, .1); color: var(--ink); }
.how-card-lime .how-n { -webkit-text-stroke-color: rgba(31, 21, 12, .2); }
.how-vis { margin-top: auto; padding-top: 28px; }
.v-upload { display: flex; gap: 10px; flex-wrap: wrap; }
.v-upload span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 14px; background: var(--paper); color: var(--ink); font-weight: 600; font-size: 14px; animation: bob 3s var(--ease) infinite; }
.v-upload span:nth-child(2) { animation-delay: .3s; }
.v-upload span:nth-child(3) { animation-delay: .6s; }
@keyframes bob { 50% { transform: translateY(-8px); } }
.v-extract { display: grid; gap: 6px; }
.v-extract div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 10px; background: rgba(225, 220, 201, .05); border: 1px dashed rgba(225, 220, 201, .4); font-size: 13px; }
.v-extract span { color: var(--muted); font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; }
.v-cat { display: flex; flex-wrap: wrap; gap: 8px; }
.v-fc svg { width: 100%; height: 90px; overflow: visible; }
.v-fc path { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.v-fc .f { stroke-dasharray: 6 6; opacity: .6; }
.v-fc circle { fill: var(--ink); }

/* Pinned mode (set by script.js on large screens) */
.how.pinned { padding: 0; }
.how.pinned .how-pin { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 0 var(--pad); }
.how.pinned .how-head { margin-bottom: clamp(24px, 4vh, 48px); }
.how.pinned .how-track { overflow: visible; will-change: transform; padding: 0; }

/* ---------- 03 Features: bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.f {
  grid-column: span 2; position: relative; isolation: isolate; overflow: hidden;
  padding: 30px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line);
  transition: border-color .3s, transform .3s var(--ease);
}
.f:hover { border-color: rgba(225, 220, 201, .45); }
.f p { color: var(--muted); margin: 10px 0 0; }
.f h3 { font-size: 22px; }
.spot::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(225, 220, 201, .14), transparent 45%);
}
.spot:hover::before { opacity: 1; }
.f-extract { grid-column: span 4; display: grid; grid-template-columns: 1fr minmax(220px, 280px); gap: 28px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip { color: var(--text); }
.mini-doc { position: relative; overflow: hidden; background: var(--paper); color: var(--ink); border-radius: 12px; padding: 16px; font-size: 13px; transform: rotate(2deg); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .8); transition: transform .4s var(--ease); }
.f-extract:hover .mini-doc { transform: rotate(0) scale(1.03); }
.mini-doc p { display: flex; justify-content: space-between; gap: 10px; margin: 0; padding: 6px 0; border-bottom: 1px dashed rgba(31, 21, 12, .15); color: var(--ink); }
.mini-doc p:first-of-type { font-weight: 700; }
.mini-doc b { font: 500 12px var(--f-mono); }
.mini-doc .md-total { border: 0; font-weight: 700; }
.md-scan { position: absolute; left: 0; right: 0; height: 30px; top: -30px; background: linear-gradient(transparent, rgba(225, 220, 201, .55)); border-bottom: 2px solid #412d15; animation: sweep 2.8s ease-in-out infinite; }
@keyframes sweep { 0% { top: -30px; } 70%, 100% { top: 110%; } }
.chips-float .cat { animation: bob 3.4s var(--ease) infinite; }
.chips-float .cat:nth-child(2) { animation-delay: .4s; }
.chips-float .cat:nth-child(3) { animation-delay: .8s; }
.chips-float .cat:nth-child(4) { animation-delay: 1.2s; }
.toast { display: flex !important; align-items: center; gap: 8px; margin-top: 20px !important; padding: 10px 12px; border-radius: 12px; background: #f1dcc4; color: #5a2a0c !important; font-size: 13px; font-weight: 600; transform: translateX(8px); opacity: .85; transition: transform .4s var(--ease), opacity .4s; }
.f-dup:hover .toast { transform: none; opacity: 1; }
.match { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-top: 20px; }
.match span { display: grid; padding: 10px; border-radius: 12px; background: rgba(225, 220, 201, .06); border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.match b { font: 500 13px var(--f-mono); color: var(--text); }
.match i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); color: var(--ink); transition: transform .4s var(--ease); }
.f-rec:hover .match i { transform: rotate(360deg) scale(1.1); }
.live-num { display: flex !important; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 22px !important; }
.live-num b { font: 800 clamp(28px, 3vw, 38px) var(--f-display); color: var(--text); letter-spacing: -.02em; }
.live-num small { flex-basis: 100%; font-size: 12px; }
.f-fc { grid-column: span 6; display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.chart { width: 100%; height: 130px; margin-top: 24px; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .band { fill: rgba(225, 220, 201, .14); }
.chart .line-actual { fill: none; stroke: var(--text); stroke-width: 2.5; }
.chart .line-fc { fill: none; stroke: var(--lime); stroke-width: 2.5; stroke-dasharray: 6 6; }
.chart .today { stroke: var(--line-2); stroke-dasharray: 3 4; }
.chart .dot { fill: var(--lime); }
.fc-vis { background: var(--paper); color: var(--ink); border-radius: 18px; padding: 22px; }
.fc-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 700; font-size: 14px; margin-bottom: 16px; }
.tag-sample { font: 500 11px var(--f-mono); color: var(--ink-muted); }
.fc-vis ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.fc-vis li { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.fc-vis .bar { height: 10px; border-radius: 6px; background: rgba(31, 21, 12, .08); position: relative; overflow: hidden; }
.fc-vis .bar::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--ink); border-radius: inherit; transform-origin: left; transform: scaleX(0); transition: transform 1.2s var(--ease) .3s; }
.f-fc.in .bar::after, html:not(.js) .fc-vis .bar::after { transform: scaleX(1); }
.fc-vis b { font: 500 13px var(--f-mono); }

/* ---------- 04 AI: teach demo ---------- */
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.ai-copy h2 { margin-bottom: 24px; }
.ai-copy > p:not(.sec-no) { color: var(--muted); font-size: 18px; }
.ai-copy em { color: var(--lime); font-style: normal; font-weight: 700; }
.ticks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.ticks .i { margin-top: 3px; color: var(--ink); background: var(--lime); border-radius: 50%; padding: 3px; width: 22px; height: 22px; }

.teach { background: var(--panel); border: 1px solid var(--line-2); border-radius: 30px; padding: clamp(20px, 3vw, 32px); }
.teach-title { display: flex; align-items: center; gap: 10px; font: 700 15px var(--f-body); color: var(--lime); }
.teach ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; position: relative; }
.teach ol::before { content: ""; position: absolute; left: 17px; top: 20px; bottom: 20px; width: 2px; background: var(--line-2); }
.t-step { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; opacity: .3; filter: blur(1.5px); transform: translateX(10px); transition: opacity .5s, filter .5s, transform .5s var(--ease); }
.t-step.on { opacity: 1; filter: none; transform: none; }
.t-dot { position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 2px solid var(--line-2); font: 700 14px var(--f-display); }
.t-step.on .t-dot { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.t-card { background: var(--paper); color: var(--ink); border-radius: 16px; padding: 14px 16px; }
.t-label { font: 500 11px var(--f-mono); text-transform: uppercase; color: var(--ink-muted); margin: 0 0 4px; letter-spacing: .05em; }
.t-vendor { display: flex; justify-content: space-between; font: 700 17px var(--f-display); margin: 0 0 10px; }
.t-vendor b { font: 500 15px var(--f-mono); }
.t-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 13px; }
.t-you:empty { display: none; }
.t-you::before { content: "→ "; color: var(--ink-muted); }
.taught .t-line .c-grey:first-child { text-decoration: line-through; opacity: .6; }
.t-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(31, 21, 12, .2); font-size: 13px; }
.t-pick span { color: var(--ink-muted); margin-right: 4px; }
.t-pick button { border: 1.5px solid var(--ink); background: transparent; color: var(--ink); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; transition: background-color .2s, color .2s, transform .2s var(--ease); }
.t-pick button:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }
.t-pick button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.taught .t-pick button:not([aria-pressed="true"]) { opacity: .35; pointer-events: none; }
.learned, .flag { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.learned { color: #412d15; }
.flag { color: #8a3d12; }
.t-step:not(.on) .learned, .t-step:not(.on) .flag { visibility: hidden; }
.t-flag { box-shadow: inset 4px 0 0 var(--amber); }
.teach-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; font-size: 12px; color: var(--muted); min-height: 40px; }

/* ---------- 05 Who: tabs + marquee ---------- */
.who-box { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 16px; }
.who-tabs { display: grid; gap: 8px; align-content: start; }
.who-tabs [role="tab"] {
  display: flex; align-items: center; gap: 14px; text-align: left; padding: 18px 20px; border-radius: 18px;
  border: 1px solid var(--line); background: transparent; font: 700 18px var(--f-display); color: var(--muted);
  transition: background-color .25s, color .25s, border-color .25s;
}
.who-tabs [role="tab"] .i { font-size: 22px; }
.who-tabs [role="tab"]:hover { color: var(--text); border-color: var(--line-2); }
.who-tabs [aria-selected="true"] { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.who-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 30px; padding: clamp(24px, 4vw, 48px); display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; animation: pop .45s var(--ease); }
.who-say { font: 700 clamp(24px, 2.6vw, 36px)/1.15 var(--f-display); letter-spacing: -.02em; margin: 0; }
.stack { list-style: none; margin: 0; padding: 0; display: grid; }
.stack li { background: var(--paper); color: var(--ink); padding: 14px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: 0 10px 20px -12px rgba(0, 0, 0, .8); display: flex; align-items: center; gap: 10px; }
.stack li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(31, 21, 12, .15); }
.stack li + li { margin-top: -6px; }
.stack li:nth-child(odd) { transform: rotate(-1.5deg); }
.stack li:nth-child(even) { transform: rotate(1.5deg) translateX(10px); }

.marquee { margin: clamp(48px, 6vw, 80px) calc(var(--pad) * -1) 0; overflow: hidden; border-block: 1px solid var(--line-2); padding: 22px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { list-style: none; margin: 0; padding: 0; display: flex; }
.marquee li { display: flex; align-items: baseline; gap: 14px; padding: 0 28px; font-size: 16px; color: var(--muted); white-space: nowrap; }
.marquee li::after { content: "✦"; color: var(--lime); margin-left: 28px; }
.marquee b { font: 800 clamp(26px, 3.4vw, 44px) var(--f-display); color: var(--text); letter-spacing: -.02em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 06 Pricing ---------- */
.volume { max-width: 760px; display: grid; grid-template-columns: 1fr auto; gap: 14px 20px; align-items: baseline; margin-bottom: 40px; padding: 24px 28px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); }
.volume label { font-weight: 600; }
.volume output { font: 800 22px var(--f-display); color: var(--lime); }
.volume input { grid-column: 1 / -1; width: 100%; -webkit-appearance: none; appearance: none; height: 8px; border-radius: 8px; background: linear-gradient(to right, var(--lime) var(--fill, 0%), var(--line-2) var(--fill, 0%)); margin: 6px 0 0; }
.volume input::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: var(--paper); border: 6px solid var(--lime); cursor: grab; box-shadow: 0 4px 12px rgba(0, 0, 0, .5); }
.volume input::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 6px solid var(--lime); cursor: grab; }
.vol-ticks { grid-column: 1 / -1; display: flex; justify-content: space-between; font: 500 12px var(--f-mono); color: var(--muted); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column; padding: 32px; border-radius: 28px;
  background: var(--panel); border: 1px solid var(--line);
  transition: transform .4s var(--ease), border-color .3s, background-color .3s, box-shadow .4s !important;
}
.plan h3 { font-size: 30px; }
.plan-for { color: var(--muted); margin: 8px 0 18px; }
.plan-price { font: 700 18px var(--f-display); padding: 14px 0; border-block: 1px dashed var(--line-2); }
.plan ul { list-style: none; margin: 8px 0 28px; padding: 0; display: grid; gap: 10px; flex: 1; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li .i { color: var(--lime); margin-top: 4px; }
.plan-badge { position: absolute; top: 20px; right: 20px; font: 700 12px var(--f-body); padding: 5px 12px; border-radius: 999px; background: var(--ink); color: var(--lime); opacity: 0; transform: scale(.6); transition: opacity .3s, transform .3s var(--ease); }
.plan.pick { background: var(--lime); color: var(--ink); border-color: var(--lime); transform: translateY(-10px); box-shadow: 0 30px 60px -30px rgba(225, 220, 201, .6); }
.plan.pick .plan-for { color: rgba(31, 21, 12, .75); }
.plan.pick .plan-price { border-color: rgba(31, 21, 12, .25); }
.plan.pick li .i { color: var(--ink); }
.plan.pick .plan-badge { opacity: 1; transform: none; }
.plan.pick .btn-line { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- 07 FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.faq-list details { border-bottom: 1px solid var(--line-2); padding: 18px 0; }
.faq-list summary { cursor: pointer; font: 700 18px var(--f-display); }
.faq-list p { color: var(--muted); margin: 10px 0 0; }
.chat { background: var(--panel); border: 1px solid var(--line-2); border-radius: 30px; overflow: hidden; display: flex; flex-direction: column; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.chat-head img { width: 40px; height: 40px; border-radius: 12px; background: var(--paper); padding: 5px; }
.chat-head b { display: block; font-family: var(--f-display); }
.chat-head span { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.chat-log { height: 380px; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.msg { max-width: 82%; padding: 12px 16px; border-radius: 20px; font-size: 15px; line-height: 1.5; animation: pop .35s var(--ease); }
.msg.bot { background: var(--panel-2); border-bottom-left-radius: 6px; align-self: flex-start; }
.msg.me { background: var(--lime); color: var(--ink); border-bottom-right-radius: 6px; align-self: flex-end; font-weight: 600; }
.msg.typing { display: flex; gap: 5px; padding: 16px 18px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; }
.msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 30% { transform: translateY(-5px); opacity: .5; } }
.chat-qs { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 20px 20px; border-top: 1px solid var(--line); }
.q { border: 1px solid var(--line-2); background: transparent; border-radius: 999px; padding: 8px 14px; font-size: 13px; text-align: left; transition: background-color .2s, border-color .2s, opacity .2s; }
.q:hover { border-color: var(--lime); background: var(--lime-glow); }
.q.asked { opacity: .45; }

/* ---------- 08 Contact: paper form ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.office { display: flex; gap: 16px; font-style: normal; color: var(--muted); margin-top: 36px; }
.office .ico { margin: 0; }
.office strong { display: block; color: var(--text); font-family: var(--f-display); font-size: 18px; }

.paper {
  position: relative; background: var(--paper); color: var(--ink); border-radius: 8px 8px 0 0;
  padding: clamp(22px, 4vw, 44px); padding-bottom: clamp(30px, 4vw, 52px);
  box-shadow: 0 50px 80px -40px rgba(0, 0, 0, .8); transform: rotate(.8deg);
  transition: transform .5s var(--ease);
}
.paper:focus-within { transform: none; }
.paper::after { /* torn receipt edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 12px;
  background: linear-gradient(-45deg, transparent 8px, var(--paper) 0) 0 0 / 16px 12px, linear-gradient(45deg, transparent 8px, var(--paper) 0) 0 0 / 16px 12px;
}
.paper-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 20px; margin-bottom: 8px; border-bottom: 3px solid var(--ink); }
.paper-head img { height: 40px; width: auto; }
.paper-meta { display: grid; text-align: right; font: 500 12px var(--f-mono); color: var(--ink-muted); }
.paper-meta b { font: 800 24px var(--f-display); color: var(--ink); text-transform: uppercase; letter-spacing: .06em; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.field { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px dashed rgba(31, 21, 12, .25); }
.field label { font: 500 11px var(--f-mono); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-muted); }
.opt { text-transform: none; letter-spacing: 0; }
.field input, .field select, .field textarea {
  width: 100%; border: 0; border-radius: 8px; padding: 6px 8px; margin: 0 -8px; width: calc(100% + 16px);
  background: transparent; color: var(--ink); font-size: 17px; transition: background-color .2s;
}
.field textarea { resize: vertical; min-height: 70px; }
.field select { -webkit-appearance: none; appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f150c' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 18px; }
.field select option { color: var(--ink); background: #fff; }
.field input:hover, .field select:hover, .field textarea:hover { background-color: rgba(31, 21, 12, .04); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; background-color: rgba(225, 220, 201, .22); }
.field [aria-invalid="true"] { background-color: #ffe1dc; box-shadow: inset 0 -2px 0 #c0392b; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.paper-total { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 20px 0 22px; padding-top: 16px; border-top: 3px double var(--ink); }
.paper-total span { font: 700 13px var(--f-mono); text-transform: uppercase; display: grid; }
.paper-total small { font: 400 13px var(--f-body); text-transform: none; color: var(--ink-muted); }
.paper-total b { font: 800 clamp(30px, 3vw, 40px) var(--f-display); }
.form-status { min-height: 1.4em; margin: 14px 0 0; font-weight: 600; font-size: 14px; }
.form-status.ok { color: #1f7a45; }
.form-status.err { color: #b0322a; }
.form-status a { color: inherit; }
.fine { font-size: 12px; color: var(--ink-muted); margin: 6px 0 0; }
.stamp {
  position: absolute; right: 8%; top: 38%; padding: 6px 22px; border: 5px solid #1f7a45; border-radius: 12px;
  color: #1f7a45; font: 800 44px var(--f-display); text-transform: uppercase; letter-spacing: .1em;
  opacity: 0; transform: rotate(-14deg) scale(2.2); pointer-events: none; mix-blend-mode: multiply;
  transition: opacity .25s, transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
.paper.sent .stamp { opacity: .85; transform: rotate(-14deg) scale(1); }

/* ---------- Footer ---------- */
.foot { padding: 40px var(--pad) 32px; border-top: 1px solid var(--line); overflow: hidden; }
.foot-word {
  font: 800 clamp(64px, 18vw, 280px)/.85 var(--f-display); letter-spacing: -.06em; margin: 0 0 48px;
  color: transparent; -webkit-text-stroke: 1.5px var(--line-2); user-select: none;
  background: linear-gradient(90deg, var(--lime), var(--lime)) no-repeat 0 0 / 0% 100%;
  -webkit-background-clip: text; background-clip: text; transition: background-size 1s var(--ease);
}
.foot-word:hover { background-size: 100% 100%; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.foot-brand img { height: 34px; width: auto; margin-bottom: 14px; }
.foot-brand p { color: var(--muted); max-width: 40ch; }
.foot-nav { display: grid; gap: 8px; align-content: start; color: var(--muted); }
.foot-nav b { color: var(--text); font-family: var(--f-display); margin-bottom: 4px; }
.foot-nav a { text-decoration: none; }
.foot-nav a:hover { color: var(--lime); }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.foot-base a { text-decoration: none; }

/* ---------- Multi-page: inner page header, explore cards, next-page band ---------- */
.page-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 26px var(--pad) 0; }
.page-top > a:first-child { display: block; }
.page-top + .sec { padding-top: clamp(56px, 8vw, 110px); }
.page-h { font-size: clamp(40px, 6.4vw, 96px); font-weight: 800; line-height: .95; letter-spacing: -.04em; }
.contact-side .page-h { font-size: clamp(36px, 5.4vw, 76px); }

.explore-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ex-card {
  position: relative; display: flex; flex-direction: column; padding: 28px; border-radius: var(--r);
  background: linear-gradient(160deg, rgba(65, 45, 21, .55), rgba(31, 21, 12, .4)); border: 1px solid var(--line-2);
  text-decoration: none; overflow: hidden; transition: transform .3s var(--ease), border-color .3s;
}
.ex-card:hover { transform: translateY(-4px); border-color: var(--text); }
.ex-card h3 { margin-bottom: 10px; }
.ex-card p { color: var(--muted); flex: 1; }
.ex-go { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--lime); }
.ex-go .i { transition: transform .2s var(--ease); }
.ex-card:hover .ex-go .i { transform: translateX(4px); }
.ex-card-lime { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.ex-card-lime p { color: var(--ink-muted); }
.ex-card-lime .ex-go { color: var(--ink); }
.ex-card-lime .ico { background: rgba(31, 21, 12, .1); color: var(--ink); }

.next-sec { padding-top: 0; }
.next-card {
  position: relative; display: grid; gap: 6px; padding: clamp(28px, 4vw, 56px); padding-right: 120px; border-radius: 30px;
  border: 1px solid var(--line-2); text-decoration: none; transition: background-color .3s, border-color .3s;
}
.next-card .sec-no { margin: 0 0 8px; }
.next-title { font: 800 clamp(36px, 5.4vw, 76px)/.98 var(--f-display); letter-spacing: -.025em; }
.next-text { color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); }
.next-arrow {
  position: absolute; right: clamp(24px, 4vw, 56px); top: 50%; translate: 0 -50%;
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  background: var(--lime); color: var(--ink); font-size: 28px; transition: transform .3s var(--ease);
}
.next-card:hover { background: rgba(225, 220, 201, .05); border-color: var(--text); }
.next-card:hover .next-arrow { transform: translateX(6px) rotate(-8deg); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .hero-row { grid-template-columns: 1fr; }
  .hero-copy { max-width: 640px; }
  .explore-grid { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .f, .f-extract, .f-fc { grid-column: span 1; }
  .f-extract, .f-fc { grid-column: span 2; }
}

@media (max-width: 899px) {
  :root { --rail: 0px; }
  body { padding-bottom: 84px; }
  .rail {
    inset: auto 10px 10px 10px; width: auto; height: 60px; flex-direction: row; gap: 0; padding: 0 6px;
    border: 1px solid var(--line-2); border-radius: 20px; box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .7);
  }
  .rail-logo, .rail-cta { display: none; }
  .rail-progress { display: none; }
  .rail-nav { flex-direction: row; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; gap: 2px; }
  .rail-nav::-webkit-scrollbar { display: none; }
  .rail-nav a { flex: none; width: auto; height: 44px; padding: 0 14px; }
  .rail-nav .rn { display: none; }
  .rail-nav .rl { position: static; opacity: 1; transform: none; background: none; color: inherit; padding: 0; font-weight: 600; }

  .ai-grid, .faq-grid, .contact-grid, .who-box, .who-panel { grid-template-columns: 1fr; }
  .pains { grid-template-columns: 1fr; }
  .pains li, .pains li + li { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .plans { grid-template-columns: 1fr; }
  .plan.pick { transform: none; }
  .who-tabs { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 4px; }
  .who-tabs [role="tab"] { font-size: 15px; padding: 12px 16px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .hero-top .pill, .page-top .pill { order: 3; }
  .explore-grid { grid-template-columns: 1fr; }
  .next-card { padding-right: clamp(28px, 4vw, 56px); padding-bottom: 116px; }
  .next-arrow { top: auto; bottom: 28px; translate: none; width: 60px; height: 60px; }
  .lab { grid-template-columns: 1fr; grid-template-areas: "tray" "scan" "ledger"; padding: 10px; border-radius: 24px; }
  .bills { grid-template-columns: repeat(2, 1fr); }
  .bill { min-height: 128px; }
  .lab-label { flex-wrap: wrap; }
  .scan-bed { min-height: 120px; }
  .bento { grid-template-columns: 1fr; }
  .f, .f-extract, .f-fc { grid-column: span 1; }
  .f-extract, .f-fc { grid-template-columns: 1fr; }
  .f { padding: 24px; }
  .fc-vis li { grid-template-columns: 1fr auto; }
  .fc-vis .bar { grid-column: 1 / -1; grid-row: 2; }
  .cmp-row { grid-template-columns: 58px 1fr 1fr 74px; padding: 0 12px; gap: 8px; font-size: 12px; }
  .cmp-row .c3 { display: none; }
  .cmp-bar { padding: 0 12px; font-size: 11px; }
  .cmp-bar span:last-child { display: none; }
  .row { grid-template-columns: 1fr; }
  .paper { transform: none; }
  .paper-head img { height: 30px; }
  .volume { padding: 20px; }
  .chat-log { height: 340px; }
  .msg { max-width: 92%; }
  .how-card { padding: 24px; }
  .how-n { font-size: 130px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}
