/* shipsafe, shared styles. Tokens and rules are documented in DESIGN.md. Light theme only. */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-sunk: #f4f4f5;
  --fg: #1a1a1a;
  --fg-muted: #5f6368;
  --fg-faint: #8d9096;
  --border: #e6e6e6;
  --border-strong: #d4d4d4;
  --accent: #fa4b4b;
  --accent-hover: #ec3d3d;
  --accent-press: #d93535;
  --accent-ink: #d42f2f;
  --accent-soft: #fff1f1;
  --link: #0051c3;
  --danger: #c5221f;
  --danger-soft: #fdeceb;
  --warn: #a15c07;
  --warn-soft: #fff6e5;
  --ok: #1e7f3c;
  --ok-soft: #eaf7ee;
  --r-sm: 4px;
  --r: 6px;
  --shadow-float: 0 1px 2px rgb(0 0 0 / 0.04), 0 16px 40px -12px rgb(0 0 0 / 0.18);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

/* ── Base ─────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.2; font-weight: 600; }
h1 { font-size: 40px; letter-spacing: -0.02em; }
h2 { font-size: 24px; letter-spacing: -0.02em; }
h3 { font-size: 15px; }
p { margin: 0 0 12px; }
s { color: var(--fg-faint); }
code, .mono { font-family: var(--mono); }
.muted { color: var(--fg-muted); }
.faint { color: var(--fg-faint); }
.small { font-size: 13px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 680px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 800px) { .grid-2, .grid-main { grid-template-columns: 1fr; } }

/* ── Brand & top bar ──────────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.mark { width: 24px; height: 24px; flex: none; display: block; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-in { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 24px; max-width: 1440px; margin: 0 auto; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar .link { color: var(--fg-muted); font-size: 14px; padding: 6px 8px; }
.topbar .link:hover { color: var(--fg); text-decoration: none; }
@media (max-width: 600px) { .topbar-in { padding: 0 16px; } .topbar .hide-sm { display: none; } }

/* Tools dropdown (native <details>; site.js / app.js close it on outside click and Escape) */
.menu { position: relative; margin-left: auto; }
.menu + .topbar-right { margin-left: 0; }
.menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: var(--r-sm); color: var(--fg-muted); font-size: 14px; cursor: pointer; user-select: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover, .menu[open] > summary { color: var(--fg); background: var(--surface-sunk); }
.menu .chev { transition: transform 150ms var(--ease); }
.menu[open] .chev { transform: rotate(180deg); }
.menu-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; width: 288px; max-width: calc(100vw - 32px); padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-float); }
.menu[open] .menu-pop { animation: menu-in 150ms var(--ease); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
.menu-item { display: flex; align-items: flex-start; gap: 12px; padding: 8px; border-radius: var(--r-sm); color: var(--fg); }
.menu-item:hover { background: var(--surface-sunk); text-decoration: none; }
.menu-ico { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); color: var(--fg-muted); }
.menu-item strong { display: block; font-size: 14px; font-weight: 500; line-height: 1.3; }
.menu-desc { display: block; font-size: 13px; line-height: 1.4; color: var(--fg-muted); }
.menu-foot { margin: 4px 0 0; padding: 8px 8px 4px; border-top: 1px solid var(--border); font: 12px var(--mono); color: var(--fg-faint); }
@media (prefers-reduced-motion: reduce) { .menu .chev { transition: none; } .menu[open] .menu-pop { animation: none; } }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg); font: 500 14px var(--sans); cursor: pointer; white-space: nowrap; transition: background .15s var(--ease), border-color .15s var(--ease); }
.btn:hover { border-color: var(--fg-faint); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary:active { background: var(--accent-press); border-color: var(--accent-press); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--fg-muted); }
.btn-ghost:hover { background: var(--surface-sunk); border-color: transparent; color: var(--fg); }
.btn-danger { color: var(--danger); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn svg { width: 16px; height: 16px; flex: none; }
.text-link { font-size: 13px; color: var(--fg-muted); }
.text-link:hover { color: var(--fg); }

/* ── Badges, cards, misc ──────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); color: var(--fg-muted); font: 500 12px var(--mono); white-space: nowrap; }
.badge.accent { color: var(--accent-ink); background: var(--accent-soft); border-color: transparent; }
.badge.ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.badge.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.badge.danger { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; }
.card h3 { margin-bottom: 4px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { position: relative; padding-left: 22px; font-size: 14px; margin-bottom: 6px; }
.checklist li::before { content: ''; position: absolute; left: 2px; top: 5px; width: 10px; height: 6px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.price { display: flex; align-items: baseline; gap: 10px; font: 600 40px/1 var(--sans); letter-spacing: -0.03em; }
.price s { font-size: 20px; font-weight: 500; }
.price s:empty { display: none; }
/* Launch discount reveal (home.js adds .reveal; without JS the card shows the plain struck anchor + price).
   Before: the anchor stands alone at full size. On apply: a line strikes through it, it shrinks, and the price slides in. */
.price.reveal s { position: relative; text-decoration: none; color: var(--fg); font-size: 40px; font-weight: 600; transition: font-size .3s var(--ease) .3s, color .3s var(--ease) .3s; }
.price.reveal s::after { content: ''; position: absolute; left: -3px; right: -3px; top: 52%; height: 3px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.price.reveal [data-price] { display: inline-block; max-width: 0; opacity: 0; overflow: hidden; transition: max-width .35s var(--ease) .3s, opacity .35s var(--ease) .3s; }
.price.reveal.on s { font-size: 20px; font-weight: 500; color: var(--fg-faint); }
.price.reveal.on s::after { transform: scaleX(1); height: 2px; background: var(--fg-faint); transition: transform .3s var(--ease), height .3s var(--ease) .3s, background .3s var(--ease) .3s; }
.price.reveal.on [data-price] { max-width: 4em; opacity: 1; }
.discount-opt { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 10px; border: 1px dashed var(--accent); border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent-ink); font: 500 13px var(--sans); cursor: pointer; user-select: none; }
.discount-opt[hidden] { display: none; }
.discount-opt input { margin: 0; accent-color: var(--accent); cursor: pointer; }
.discount-opt.on { border-style: solid; border-color: transparent; background: var(--ok-soft); color: var(--ok); cursor: default; }
.discount-opt.on input { accent-color: var(--ok); }
.confetti { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .price.reveal s, .price.reveal s::after, .price.reveal [data-price] { transition: none; }
}
.price-cap { font: 12px var(--mono); color: var(--fg-faint); margin-top: 6px; }
.redact { display: inline-block; height: 9px; border-radius: 3px; background: #e4e4e7; vertical-align: middle; }
.lock { width: 14px; height: 14px; flex: none; color: var(--fg-faint); }
.spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--fg); color: #fff; padding: 10px 16px; border-radius: var(--r); font-size: 14px; z-index: 50; box-shadow: var(--shadow-float); max-width: calc(100% - 32px); }
.toast.err { background: var(--danger); }
.avatar { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); }
.avatar-link { display: inline-flex; border-radius: 50%; }
.avatar-link:hover .avatar { border-color: var(--fg-faint); }
.avatar-initial { display: inline-grid; place-items: center; background: var(--surface-sunk); color: var(--fg-muted); font: 500 12px var(--sans); }

/* Pricing popup (native <dialog>; Escape and backdrop click close it) */
.modal { padding: 0; border: 0; background: transparent; width: 340px; max-width: calc(100vw - 32px); max-height: calc(100svh - 32px); overflow: auto; }
.modal::backdrop { background: rgb(0 0 0 / 0.35); }
.modal[open] { animation: menu-in 180ms var(--ease); }
.modal .price-card { animation: none; box-shadow: var(--shadow-float); }
.modal .problem { padding-right: 44px; }
.modal .problem-line { right: 44px; }
.modal-close { position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--accent-ink); cursor: pointer; }
.modal-close:hover { background: var(--surface); }
@media (prefers-reduced-motion: reduce) { .modal[open] { animation: none; } }
.ts-box:not(:empty) { margin-top: 10px; }

/* ── Landing: hero shell ──────────────────────────────────────────────── */
.hero-shell { display: flex; flex-direction: column; }
.shell { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; width: 100%; max-width: 1440px; margin: 0 auto; padding: 16px; }
.rail { display: flex; gap: 2px; padding: 3px; background: var(--surface-sunk); border: 1px solid var(--border); border-radius: var(--r); overflow-x: auto; }
.rail [role='tab'] { flex: 1; height: 34px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--fg-muted); font: 500 14px var(--sans); cursor: pointer; white-space: nowrap; }
.rail [role='tab'][aria-selected='true'] { background: var(--surface); color: var(--fg); box-shadow: 0 0 0 1px var(--border); }
.panels { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.panel { position: relative; min-height: 460px; padding: 32px 24px; }
.panel[hidden] { display: none; }
.panel.is-entering { animation: panel-in .18s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.more-hint { display: none; }

@media (min-width: 1100px) and (min-height: 640px) {
  .hero-shell { height: 100vh; height: 100svh; }
  .shell { flex: 1; min-height: 0; grid-template-columns: 184px minmax(0, 1fr) 320px; gap: 24px; padding: 24px 24px 0; }  .rail { flex-direction: column; gap: 2px; padding: 0; background: none; border: 0; overflow: visible; }
  .rail [role='tab'] { flex: none; height: 38px; text-align: left; padding: 0 14px; border-radius: 0 var(--r-sm) var(--r-sm) 0; border-left: 2px solid var(--border); font-size: 15px; }
  .rail [role='tab']:hover { color: var(--fg); background: var(--surface-sunk); }
  .rail [role='tab'][aria-selected='true'] { background: none; box-shadow: none; border-left-color: var(--accent); }
  .panels { min-height: 0; }
  .panel { position: absolute; inset: 0; min-height: 0; padding: 40px 44px; overflow: hidden; }
  .pricing-col { min-height: 0; }
  .price-card { animation: bob 6s ease-in-out infinite; box-shadow: var(--shadow-float); }
  .more-hint { display: flex; align-items: center; justify-content: center; gap: 6px; height: 44px; font: 12px var(--mono); color: var(--fg-faint); }
  .more-hint:hover { color: var(--fg); text-decoration: none; }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.status-pill { margin-left: 4px; }
.status-pill .dot { color: var(--ok); }
.price-card .price { margin-top: 12px; }
@media (max-width: 700px) { .status-pill { display: none; } }

/* Overview */
.overview-copy { position: relative; z-index: 1; max-width: 560px; }
.overview-copy h1 { margin-bottom: 12px; }
.overview-copy .lead { font-size: 16px; color: var(--fg-muted); margin-bottom: 20px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 8px; }
.overview-copy .meta { font: 12px var(--mono); color: var(--fg-faint); margin-top: 10px; }
.sim { position: absolute; inset: 0; z-index: 0; }
.sim canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.sim.dragging canvas { cursor: grabbing; }
.panel.dragging { user-select: none; -webkit-user-select: none; }
.pile { position: absolute; left: 0; right: 0; bottom: 0; height: 190px; z-index: 0; pointer-events: none; }
.pile-file { position: absolute; bottom: 0; width: 64px; height: 78px; }
@media (max-width: 1099px), (max-height: 639px) { h1 { font-size: 32px; } .panel-overview { padding-bottom: 210px; } }

/* File icon (static pile + inside tab) */
.file-ico { position: relative; width: 64px; height: 78px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); padding: 8px 6px; font: 8.5px/1.25 var(--mono); color: var(--fg-muted); overflow: hidden; word-break: break-all; }
.file-ico::after { content: ''; position: absolute; top: 0; right: 0; width: 14px; height: 14px; background: var(--surface-sunk); border-left: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); }
.file-ico .ext { position: absolute; left: 6px; bottom: 6px; padding: 1px 4px; border-radius: 2px; color: #fff; font-weight: 600; font-size: 8px; letter-spacing: .04em; }

/* How it works demo */
.demo { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 24px; }
.demo-steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.demo-steps li { counter-increment: s; display: flex; gap: 10px; align-items: center; padding: 10px 0; color: var(--fg-faint); font-size: 14px; transition: color .2s var(--ease); }
.demo-steps li::before { content: counter(s); width: 24px; height: 24px; flex: none; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: var(--r-sm); font: 500 12px var(--mono); transition: all .2s var(--ease); }
.demo-steps li.on { color: var(--fg); }
.demo-steps li.on::before { background: var(--accent); border-color: var(--accent); color: #fff; }
.demo-window { border: 1px solid var(--border); border-radius: var(--r); background: var(--bg); overflow: hidden; max-width: 520px; }
.demo-bar { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-bottom: 1px solid var(--border); background: var(--surface); }
.demo-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.demo-bar span { margin-left: 8px; font: 11px var(--mono); color: var(--fg-faint); }
.demo-stage { position: relative; height: 270px; }
.demo-screen { position: absolute; inset: 0; padding: 20px; opacity: 0; transform: translateY(6px); transition: opacity .25s var(--ease), transform .25s var(--ease); pointer-events: none; }
.demo-screen.on { opacity: 1; transform: none; }
.demo-q { font-weight: 600; font-size: 14px; margin-bottom: 12px; }
.demo-q small { display: block; font: 11px var(--mono); color: var(--fg-faint); font-weight: 400; margin-bottom: 4px; }
.demo-opt { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; margin-bottom: 6px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); font-size: 13px; transition: all .18s var(--ease); }
.demo-opt::before { content: ''; width: 14px; height: 14px; border: 1px solid var(--border-strong); border-radius: 3px; background: var(--surface); transition: all .18s var(--ease); }
.demo-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.demo-opt.on::before { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--surface); }
.demo-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.demo-stats div { border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); padding: 12px; }
.demo-stats b { display: block; font: 600 26px var(--mono); letter-spacing: -0.02em; }
.demo-stats span { font-size: 12px; color: var(--fg-muted); }
.demo-stats .bl b { color: var(--danger); }
.demo-zip { display: flex; align-items: center; gap: 8px; font: 500 13px var(--mono); margin-bottom: 10px; }
.demo-files { list-style: none; margin: 0; padding: 0; font: 12px/1.9 var(--mono); color: var(--fg-muted); }
.demo-files li { opacity: 0; transform: translateX(-6px); transition: all .2s var(--ease); }
.demo-files li.on { opacity: 1; transform: none; }
.demo-files li::before { content: '└ '; color: var(--fg-faint); }
.demo-prompt { margin-top: 10px; font: 12px var(--mono); color: var(--fg); }
.demo-prompt::before { content: '> '; color: var(--accent-ink); }
@media (max-width: 760px) { .demo { grid-template-columns: 1fr; gap: 12px; } .demo-steps { display: flex; gap: 12px; flex-wrap: wrap; } }

/* What's inside: zip → coding agent demo. The terminal is the one dark surface on the site (a product mock). */
.preview-sec { font: 500 12px var(--mono); color: var(--fg); margin: 14px 0 8px; }
.preview-line { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; font: 12px var(--mono); color: var(--fg-faint); }
.agent-demo { position: relative; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.zip { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); transition: opacity .3s var(--ease); }
.zip.done { opacity: .45; }
.zip-row { display: flex; align-items: center; gap: 8px; font: 500 12px var(--mono); }
.zip-row svg, .folder-name svg { width: 14px; height: 14px; flex: none; color: var(--accent-ink); }
.zip-bar { height: 3px; margin-top: 8px; border-radius: 2px; background: var(--border); overflow: hidden; }
.zip-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .9s linear; }
.folder { margin-top: 14px; opacity: 0; transition: opacity .25s var(--ease); }
.folder.on { opacity: 1; }
.folder-name { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); font: 500 12px var(--mono); color: var(--fg); white-space: nowrap; }
.unzip-files { margin-top: 6px; font-size: 11.5px; line-height: 1.75; }
.fly { position: absolute; z-index: 5; margin: 0; pointer-events: none; box-shadow: var(--shadow-float); transition: transform .7s var(--ease); }
.term { display: flex; flex-direction: column; min-height: 380px; background: #141414; border-radius: var(--r); overflow: hidden; font: 12px/1.6 var(--mono); color: #d4d4d4; }
.term-bar { display: flex; align-items: center; gap: 6px; height: 30px; flex: none; padding: 0 12px; border-bottom: 1px solid #262626; }
.term-bar i { width: 8px; height: 8px; border-radius: 50%; background: #3a3a3a; }
.term-bar span { margin-left: 8px; font-size: 11px; color: #8d9096; }
.term-out { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px 14px 4px; }
.term-out > div { white-space: pre-wrap; overflow-wrap: anywhere; }
.t-user { margin: 0 0 8px; padding: 3px 8px; border-radius: 3px; background: #262626; color: #fff; }
.t-tool, .t-done { color: #d4d4d4; margin-top: 6px; }
.t-tool b, .t-done { color: #fff; font-weight: 500; }
.t-tool .dot { color: var(--accent); }
.t-tool.ok .dot, .t-done .dot { color: #4ade80; }
.t-res { color: #8d9096; padding-left: 14px; }
.term-status { flex: none; padding: 2px 14px 8px; min-height: 8px; }
.t-spin { display: inline-block; width: 1ch; color: var(--accent); }
.t-dim { color: #6b6b6b; }
.todos { list-style: none; margin: 2px 0 0; padding: 0 0 0 14px; color: #a1a1aa; }
.todo.on { color: #fff; }
.todo.done { color: #6b6b6b; text-decoration: line-through; }
.term-in { display: flex; align-items: center; gap: 8px; flex: none; min-height: 36px; margin: 0 10px 10px; padding: 6px 10px; border: 1px solid #3a3a3a; border-radius: var(--r-sm); color: #fff; }
.term-in .p { color: #8d9096; }
.mention { color: #8ab4ff; }
.cursor { width: 7px; height: 14px; background: #d4d4d4; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (min-width: 1100px) and (min-height: 640px) {
  .panel-inside { display: flex; flex-direction: column; }
  .agent-demo { flex: 1; min-height: 0; }
  .term { min-height: 0; }
  .unzip { min-height: 0; overflow: hidden; }
}
@media (max-width: 760px) { .agent-demo { grid-template-columns: 1fr; } .term { height: 420px; } .unzip-files { display: none; } }

/* Pricing card */
.price-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; }
.problem { position: relative; height: 62px; margin: -20px -20px 18px; padding: 14px 20px; background: var(--accent-soft); border-bottom: 1px solid #ffdcdc; border-radius: var(--r) var(--r) 0 0; overflow: hidden; }
.problem-line { position: absolute; inset: 14px 20px; font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--accent-ink); opacity: 0; transform: translateY(-6px); transition: opacity .2s var(--ease), transform .2s var(--ease); }
/* Outgoing line fades first; the incoming one starts after it (no overlapping text). */
.problem-line.on { opacity: 1; transform: none; transition-delay: .2s; }
.price-card .checklist { margin: 18px 0 20px; }
/* Lifetime buyers: recent projects in the pricing card's place (home.js). */
.recent-card h3 { margin: 12px 0 6px; }
.recent-card .file-rows { margin-bottom: 16px; }
.recent-card .fr { color: var(--fg); text-decoration: none; }
.recent-card .fr .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.recent-card .fr:hover .t { color: var(--accent); }
.recent-card > p { margin: 0 0 16px; }
.recent-card > .link { display: block; margin-top: 10px; text-align: center; }

/* Below the fold */
.below { border-top: 1px solid var(--border); padding: 64px 0; }
.below h2 { margin-bottom: 4px; }
.below .sub { color: var(--fg-muted); margin-bottom: 24px; }
.cov { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cov h3 { font: 500 12px var(--mono); color: var(--fg-faint); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; }
@media (max-width: 900px) { .cov { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .cov { grid-template-columns: 1fr; } }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 16px var(--mono); color: var(--fg-faint); }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--fg-muted); margin: 0 0 14px; }

footer.site { border-top: 1px solid var(--border); background: var(--surface); padding: 24px 0; font-size: 13px; color: var(--fg-faint); }
footer.site nav { display: flex; gap: 16px; flex-wrap: wrap; }
footer.site a { color: var(--fg-muted); }

/* ── App (dashboard aesthetic) ────────────────────────────────────────── */
.app { font-size: 14px; }
.app .topbar-in { height: 48px; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-muted); min-width: 0; }
.crumb a { color: var(--fg-muted); }
.crumb .sep { color: var(--border-strong); }
.crumb strong { color: var(--fg); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.app-main { padding: 24px 0 64px; min-height: calc(100vh - 48px - 70px); }
.app h1 { font-size: 24px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.notice { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); font-size: 13px; margin-bottom: 16px; }

.login { max-width: 360px; margin: 48px auto; }
.login .btn { width: 100%; margin-top: 8px; }
.login h1 { font-size: 20px; }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font: 500 12px var(--mono); color: var(--fg-faint); padding: 0 12px 8px; border-bottom: 1px solid var(--border); }
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--surface-sunk); }
.table .name { color: var(--fg); font-weight: 500; }
.table .actions { text-align: right; white-space: nowrap; }
.card.flush { padding: 8px 0 0; }
.empty { text-align: center; padding: 40px 12px; color: var(--fg-muted); }

.wizard { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .wizard { grid-template-columns: 1fr; gap: 16px; } .wizard .side { position: static; } }
.wizard .side { position: sticky; top: 16px; }
.step-list { list-style: none; margin: 0; padding: 0; }
.step-list button { width: 100%; display: flex; justify-content: space-between; gap: 8px; text-align: left; background: none; border: 0; border-left: 2px solid var(--border); padding: 8px 12px; color: var(--fg-muted); font: 500 13px var(--sans); cursor: pointer; }
.step-list button:hover { color: var(--fg); background: var(--surface-sunk); }
.step-list button[aria-current='step'] { color: var(--fg); border-left-color: var(--accent); }
.step-list .done { color: var(--ok); font-family: var(--mono); }
.progress { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; margin: 12px 0; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width .25s var(--ease); }
.save-state { font: 12px var(--mono); color: var(--fg-faint); margin-top: 12px; min-height: 18px; }
.side .back { font-size: 13px; color: var(--fg-muted); }

.section-card { padding: 4px 24px; }
.q { padding: 20px 0; border-bottom: 1px solid var(--border); }
.q:last-child { border-bottom: 0; }
.q label.title, .q legend.title { display: block; font-weight: 600; font-size: 14px; margin-bottom: 2px; padding: 0; }
.q fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.q .help { color: var(--fg-muted); font-size: 13px; margin-bottom: 10px; }
.q .req { color: var(--accent-ink); margin-left: 2px; }
input[type='text'], textarea { width: 100%; height: 36px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg); font: 14px var(--sans); margin-top: 6px; }
textarea { height: auto; min-height: 88px; padding: 8px 10px; resize: vertical; }
input[type='text']:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.options { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-top: 8px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; transition: border-color .12s, background .12s; }
.opt:hover { border-color: var(--border-strong); }
.opt input { margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.opt.checked { border-color: var(--accent); background: var(--accent-soft); }
.opt .lbl { font-size: 13.5px; line-height: 1.4; }
.opt .hint { display: block; color: var(--fg-faint); font-size: 12px; margin-top: 2px; }
.consent { border: 0; padding: 0; background: none; font-size: 12.5px; color: var(--fg-muted); }
.consent:hover { border: 0; }
.price-card .btn.is-spent { background: var(--surface-sunk); border-color: var(--border); color: var(--fg-faint); cursor: default; pointer-events: none; }
.buy-step { margin-top: 12px; }
.buy-step[hidden] { display: none; }
.buy-step:not([hidden]) { animation: menu-in 180ms var(--ease); }
.price-card .buy-consent { margin-bottom: 12px; text-align: left; }
.buy-consent.invalid .lbl { color: var(--danger); }
.buy-consent.invalid { animation: nudge 240ms var(--ease); }
@keyframes nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .buy-step:not([hidden]), .buy-consent.invalid { animation: none; } }
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.stat .n { font: 600 28px var(--mono); letter-spacing: -0.02em; line-height: 1.2; }
.stat .l { font-size: 12px; color: var(--fg-muted); }
.stat.blocker .n { color: var(--danger); }
.stat.required .n { color: var(--warn); }
.file-rows .fr { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.file-rows .fr:last-child { border-bottom: 0; }
.file-rows .fr .t { flex: 1; min-width: 0; }
.unlock { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; margin-top: 16px; }
@media (max-width: 800px) { .unlock { grid-template-columns: 1fr; } }
.redacted { margin-top: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg); }

/* Project hub: module cards (added and available), app facts, smart download blocks */
.module-card > p, .module-add > p { margin: 0 0 12px; }
.module-card .row { gap: 8px; }
.module-add { border-style: dashed; background: transparent; }
.mod-stats { min-height: 20px; margin-bottom: 12px; }
.mod-dl:not(:empty) { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.mod-dl .row { gap: 8px; }
.danger-ink { color: var(--danger); }
.hub-sub { font-size: 15px; margin: 24px 0 0; }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; margin: 0; font-size: 13.5px; }
.facts dt { color: var(--fg-faint); font: 12px var(--mono); padding-top: 2px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.side-title { font-weight: 600; font-size: 14px; margin-top: 12px; }
.file-rows .fr .t.mono { overflow-wrap: anywhere; }
@media (max-width: 600px) { .table .hide-sm { display: none; } }

/* ── Legal & 404 ──────────────────────────────────────────────────────── */
.legal { padding: 48px 0 80px; }
.legal h1 { font-size: 24px; }
.legal h2 { font-size: 18px; margin-top: 32px; }
.legal .updated { font: 12px var(--mono); color: var(--fg-faint); margin-bottom: 24px; }
.legal li { margin-bottom: 6px; }

/* ── Resources ────────────────────────────────────────────────────────── */
.resources { padding: 48px 0 80px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.resources h1 { font-size: 24px; }
.res-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 24px 0 16px; }
.res-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.res-filter[hidden] { display: none; }
.res-filter button { height: 32px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--fg-muted); font: 500 13px var(--sans); cursor: pointer; }
.res-filter button:hover { color: var(--fg); border-color: var(--fg-faint); }
.res-filter button[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent); }
.res-count { font: 12px var(--mono); color: var(--fg-faint); }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.res-grid li[hidden] { display: none; }
.res-card { display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); color: var(--fg); transition: border-color .15s var(--ease); }
.res-card:hover { border-color: var(--border-strong); text-decoration: none; }
.res-card:hover .res-ext { color: var(--fg); }
.res-top { display: flex; align-items: flex-start; justify-content: space-between; }
.res-card .menu-ico { width: 36px; height: 36px; color: var(--fg); }
.res-ext { color: var(--fg-faint); }
.res-card h2 { margin: 0 0 4px; font-size: 15px; letter-spacing: 0; }
.res-card p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--fg-muted); }
.res-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; }
.res-plats { display: flex; flex-wrap: wrap; gap: 4px; }
.res-src { font: 12px var(--mono); color: var(--fg-faint); white-space: nowrap; }
.res-note { margin-top: 32px; font-size: 13px; color: var(--fg-faint); }

/* Header "Resources" and "Guides" links: Resources takes the auto margin so both sit just before the Tools dropdown. */
.nav-link { margin-left: auto; }
.nav-link ~ .menu { margin-left: 0; }
.topbar .link[aria-current="page"] { color: var(--fg); }
@media (max-width: 600px) { .topbar-in { gap: 8px; } .topbar .link { padding: 6px 4px; } .topbar .nav-link.hide-sm ~ .menu { margin-left: auto; } }
@media (max-width: 400px) { .topbar-in { gap: 4px; } }

.notfound { min-height: calc(100vh - 56px - 70px); display: grid; place-items: center; text-align: center; padding: 48px 16px; }
.notfound .code { font: 600 64px var(--mono); letter-spacing: -0.04em; color: var(--accent); line-height: 1; margin-bottom: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
