/* Arcton Ai - base styles (tokens and brand layer in ledger.css + arcton.css) */
:root {
  --plum-950: #150C25; --plum-900: #201238; --plum-800: #2E1A51; --plum-700: #3E236C;
  --plum-600: #52328A; --plum-500: #6440A3;
  --ice-500: #A9D4F0; --ice-400: #F8D66A; --ice-300: #DCEEFA;
  --snow: #FFF9EF; --cream-100: #F7EEDC; --ink-950: #191520; --ink-700: #4B4359; --sage-500: #7BA58D;
  --lav-100: #E6DEF5; --line: rgba(46, 26, 81, 0.16);
  --f-display: 'Lexend', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-ui: 'Lexend', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'Lexend', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 14px; --sidebar-w: 256px; --safe-b: env(safe-area-inset-bottom, 0px);

  --bg: var(--snow); --bg-2: var(--cream-100); --card: #FFFFFF; --text: var(--ink-950); --muted: var(--ink-700);
  --head: var(--plum-800); --tag: var(--plum-700); --focus: var(--plum-600);
  --shadow: 0 1px 0 rgba(46, 26, 81, .06), 0 10px 24px -14px rgba(46, 26, 81, .28);
  --good: #2E6B4A; --good-bg: rgba(123, 165, 141, .22); --warn-bg: #FBEBC0; --warn-text: #5A3F00;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #130F1A; --bg-2: #191324; --card: #1D162A; --text: var(--snow); --muted: #D2BDB6;
  --head: var(--snow); --tag: var(--ice-300); --focus: var(--ice-400); --line: rgba(255, 249, 239, .16);
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 14px 30px -16px rgba(0, 0, 0, .6);
  --good: #A9D3BC; --good-bg: rgba(123, 165, 141, .22); --warn-bg: rgba(169, 212, 240, .16); --warn-text: var(--ice-300);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--f-ui); font-size: 1rem; line-height: 1.55; min-height: 100vh; overflow-x: hidden; font-weight: 400; }
h1, h2, h3, h4 { font-family: var(--f-display); color: var(--head); line-height: 1.18; margin: 0 0 .5em; font-weight: 500; letter-spacing: -.02em; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); } h2 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); } h3 { font-size: 1.15rem; } h4 { font-size: 1rem; font-family: var(--f-ui); font-weight: 800; }
p { margin: 0 0 .8em; overflow-wrap: anywhere; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 300; background: var(--ice-500); color: var(--plum-950); padding: 10px 16px; border-radius: 8px; font-weight: 800; }
.skip:focus { top: 8px; }
.mono, .label-mono, .tag, .field-note, .badge { font-family: var(--f-mono); }
.muted { color: var(--muted); } .small { font-size: .86rem; } .spacer { flex: 1; }
.mono { font-size: .85em; }
.label-mono { display: block; font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.tag { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--tag); margin: 0 0 10px; font-weight: 500; }
.field-note { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--tag); margin: 0 0 8px; }
.field-note::before { content: ''; display: inline-block; width: 28px; height: 1px; background: currentColor; vertical-align: middle; margin-right: 10px; }
.field-note.on-dark { color: var(--ice-300); }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--plum-950); color: var(--snow); display: flex; flex-direction: column; padding: 20px 14px; gap: 18px; overflow-y: auto; z-index: 60;
  background-image: radial-gradient(circle at 0 0, rgba(100, 64, 163,.25), transparent 55%); }
.brand { display: flex; gap: 12px; align-items: center; padding: 4px 8px; }
.brand strong { font-family: var(--f-display); font-size: 1.3rem; display: block; line-height: 1; }
.brand small { color: var(--ice-300); font-size: .64rem; letter-spacing: .06em; }
.brand-logo { width: 40px; height: 40px; border-radius: 10px; flex: none; display: block; } .top-brand .brand-logo { width: 28px; height: 28px; border-radius: 7px; }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--ice-500); position: relative; flex: none; }
.brand-mark::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--ice-500); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: rgba(255,249,239,.82); text-decoration: none; position: relative; font-weight: 600; font-size: .94rem; border: 0; background: none; font-family: inherit; cursor: pointer; text-align: left; }
.nav-item:hover { background: rgba(255,249,239,.07); color: var(--snow); }
.nav-item[aria-current='page'] { background: var(--plum-800); color: var(--snow); }
.nav-item[aria-current='page']::before { content: ''; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--ice-500); }
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-n { font-size: .68rem; opacity: .55; }
.side-foot { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255,249,239,.14); color: rgba(255,249,239,.72); }
.side-foot p { margin: 0 0 4px; } .side-foot .mono { color: var(--ice-300); letter-spacing: .08em; }
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px; padding: 10px clamp(14px, 3vw, 32px); min-height: 64px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-title { margin: 0; font-size: 1.1rem; font-family: var(--f-mono); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--tag); }
.top-brand { display: none; align-items: center; gap: 8px; color: var(--head); } .top-brand strong { font: 700 1.1rem var(--f-display); } .top-brand .brand-logo { width: 40px; height: 40px; border-radius: 10px; flex: none; display: block; } .top-brand .brand-logo { width: 28px; height: 28px; border-radius: 7px; }
.brand-mark { width: 24px; height: 24px; border-width: 2.5px; } .top-brand .brand-mark::after { inset: 4px; }
main { padding: clamp(18px, 3.2vw, 40px) clamp(14px, 3vw, 40px) 64px; max-width: 1280px; width: 100%; margin-inline: auto; outline: none; }
.overlay { position: fixed; inset: 0; background: rgba(21, 12, 37, .55); z-index: 55; }
.bottom-nav { display: none; }
.topbar .menu-toggle { display: none; }
.side-hot { display: none; }
.card-lock { text-align: center; display: grid; justify-items: center; gap: 8px; padding: 28px 16px; border: 1.5px dashed var(--line); background: transparent; box-shadow: none; }
.card-lock p { margin: 0; max-width: 44ch; }
.scan { display: grid; gap: 10px; }
body[data-route='website'] .pitch-btn, body[data-route='website'] .topbar .badge-demo { display: none; }
/* desktop: sidebar hides after a selection and slides in on hover over the left edge */
@media (min-width: 768px) {
  .app.side-collapsed { grid-template-columns: minmax(0, 1fr); }
  .app.side-collapsed .topbar .menu-toggle { display: inline-grid; }
  .app.side-collapsed .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w); transform: translateX(-101%); transition: transform .22s ease, box-shadow .22s; z-index: 80; }
  .app.side-collapsed.peek .sidebar { transform: none; box-shadow: 18px 0 40px rgba(0,0,0,.35); }
  .app.side-collapsed .side-hot { display: block; position: fixed; left: 0; top: 0; bottom: 0; width: 16px; z-index: 79; }
  .app.side-collapsed .side-hot::after { content: ''; position: absolute; left: 0; top: 50%; width: 4px; height: 72px; margin-top: -36px; border-radius: 0 4px 4px 0; background: var(--ice-500); opacity: .75; }
  /* when the sidebar slides in, the page shrinks and moves with it instead of being covered */
  .app.side-collapsed .content { transform-origin: 0 0; transition: transform .26s cubic-bezier(.2,.7,.2,1); will-change: auto; }
  .app.side-collapsed.peek .content { transform: translateX(var(--sidebar-w)) scale(var(--push, .9)); will-change: transform; border-radius: 14px 0 0 14px; overflow: hidden; box-shadow: -12px 0 30px rgba(0,0,0,.18); }
  .app.side-collapsed.peek .side-hot { display: none; }
}

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 2px solid transparent; font: 800 .94rem/1.2 var(--f-ui); cursor: pointer; text-decoration: none; text-align: center; transition: transform .12s ease, background-color .15s, box-shadow .15s; max-width: 100%; }
.btn:active { transform: scale(.96); } .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--ice-500); color: var(--plum-950); box-shadow: 0 4px 0 -1px rgba(21, 12, 37,.28); }
.btn-primary:hover:not([disabled]) { background: var(--ice-400); }
.btn-secondary { background: transparent; color: var(--head); border-color: currentColor; }
.btn-secondary:hover:not([disabled]) { background: color-mix(in srgb, var(--head) 10%, transparent); }
.btn-ghost { background: transparent; color: var(--head); } .btn-ghost:hover:not([disabled]) { background: color-mix(in srgb, var(--head) 10%, transparent); }
.btn.danger { color: #B3261E; } :root[data-theme='dark'] .btn.danger { color: #FFB4A9; }
.btn-sm { min-height: 44px; padding: 4px 14px; font-size: .86rem; } .btn-lg { min-height: 52px; padding: 10px 26px; font-size: 1.02rem; } .btn-xl { min-height: 64px; padding: 14px 36px; font-size: 1.25rem; }
.btn.on-dark { color: var(--snow); } .btn.on-dark.btn-secondary { border-color: rgba(255,249,239,.6); }
.btn[aria-pressed='true'] { background: rgba(169, 212, 240, .22); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--head); cursor: pointer; flex: none; }
.icon-btn:hover { background: color-mix(in srgb, var(--head) 10%, transparent); } .icon-btn.on-dark { color: var(--snow); }
.ic { flex: none; }
.lang { display: inline-flex; align-items: center; gap: 4px; color: var(--head); border: 1.5px solid var(--line); border-radius: 999px; padding: 0 4px 0 12px; min-height: 44px; }
.lang select { width: auto; min-width: 56px; border: 0; background: transparent; color: inherit; font: 700 .86rem var(--f-mono); min-height: 40px; padding: 0 6px; cursor: pointer; }
.lang select option { color: #191520; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid currentColor; font-weight: 500; white-space: nowrap; }
.badge-demo { color: var(--warn-text); background: var(--warn-bg); border-color: transparent; font-weight: 600; }
.badge-demo.on-dark { color: var(--ice-300); background: rgba(169, 212, 240,.16); }
.badge-live, .badge-mission-active, .badge-proof-success { color: var(--good); background: var(--good-bg); border-color: transparent; }
.badge-inference, .badge-mission-idle, .badge-proof-notStarted, .badge-proof-waiting { color: var(--muted); }
.badge-user { color: var(--tag); } .badge-mission-running, .badge-proof-partial { color: var(--warn-text); background: var(--warn-bg); border-color: transparent; }
.badge-mission-error, .badge-proof-miss, .badge-offline { color: #B3261E; background: rgba(179,38,30,.12); border-color: transparent; }
:root[data-theme='dark'] .badge-mission-error, :root[data-theme='dark'] .badge-proof-miss, :root[data-theme='dark'] .badge-offline { color: #FFB4A9; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: 52px; min-width: 220px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; z-index: 70; }
.menu a, .menu button { display: flex; gap: 10px; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; text-decoration: none; color: var(--text); background: none; border: 0; width: 100%; font: 600 .92rem var(--f-ui); cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--bg-2); } .menu-name { padding: 8px 12px; margin: 0; font-weight: 800; display: grid; } .menu-name small { color: var(--muted); font-weight: 500; }

/* ---------- surfaces ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(16px, 2.2vw, 26px); box-shadow: var(--shadow); min-width: 0; position: relative; }
.card-accent { background: var(--plum-800); color: var(--snow); border-color: transparent; background-image: radial-gradient(circle at 100% 0, rgba(169, 212, 240,.16), transparent 50%); }
.card-accent h1, .card-accent h2, .card-accent h3 { color: var(--ice-300); } .card-accent .tag, .card-accent .label-mono { color: var(--ice-300); }
.card-accent .muted { color: rgba(255,249,239,.78); }
:root[data-theme='dark'] .card-accent { background-color: var(--plum-800); }
.card-title { font-size: clamp(1.2rem, 2vw, 1.55rem); }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); margin-bottom: 20px; }
.span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-12 { grid-column: span 12; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin-bottom: .2em; } .lede { color: var(--muted); max-width: 62ch; margin: 0; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.section-h { margin: 28px 0 14px; }
.banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; border-radius: 14px; margin-bottom: 18px; border: 1px solid transparent; }
.banner-warn { background: var(--warn-bg); color: var(--warn-text); } .banner-ok { background: var(--good-bg); color: var(--good); }
.banner > div, .banner { overflow-wrap: anywhere; }
.status-strip { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.empty, .empty-hero { text-align: center; display: grid; justify-items: center; gap: 8px; padding: clamp(28px, 6vw, 64px) 20px; }
.empty-ic { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--plum-800); color: var(--ice-400); }
.empty-hero p { max-width: 56ch; }
.plain { margin: 0 0 12px; padding-left: 1.2em; } .plain li { margin-bottom: 6px; overflow-wrap: anywhere; }
.big-num { font-family: var(--f-display); font-size: 3.2rem; line-height: 1; color: var(--head); } .big-num.sm { font-size: 2.2rem; }
.card-accent .big-num { color: var(--ice-300); }
.stars { color: #C98F00; letter-spacing: 3px; } :root[data-theme='dark'] .stars { color: var(--ice-500); }
.card-accent .stars { color: var(--ice-500); }
.meter { height: 8px; border-radius: 8px; background: color-mix(in srgb, var(--head) 14%, transparent); overflow: hidden; margin: 6px 0; }
.meter i { display: block; height: 100%; background: var(--plum-600); border-radius: 8px; transform-origin: left; animation: grow .7s ease both; }
:root[data-theme='dark'] .meter i { background: var(--ice-500); }
.meter-pos i { background: var(--sage-500); } .meter-gap i { background: var(--ice-500); } .card-accent .meter i { background: var(--ice-500); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--text); font: 700 .88rem var(--f-ui); cursor: pointer; }
.chip[aria-pressed='true'] { background: var(--plum-800); color: var(--snow); border-color: var(--plum-800); }
:root[data-theme='dark'] .chip[aria-pressed='true'] { background: var(--ice-500); color: var(--plum-950); border-color: var(--ice-500); }
.chip-static { min-height: 0; padding: 4px 12px; font-size: .78rem; cursor: default; display: inline-flex; align-items: center; font-family: var(--f-mono); }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; color: var(--text); font: 700 .88rem var(--f-ui); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button[aria-pressed='true'] { background: var(--plum-800); color: var(--snow); }
:root[data-theme='dark'] .seg button[aria-pressed='true'] { background: var(--ice-500); color: var(--plum-950); }
.table-wrap { overflow-x: auto; } .table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.table thead th { font: 500 .7rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); } .table tbody th { font-weight: 700; }
.table-proof td strong { display: block; white-space: nowrap; } .table-proof thead th { white-space: nowrap; font-size: .64rem; letter-spacing: .04em; }
dl.plan { display: grid; gap: 12px; margin: 0 0 14px; } dl.plan dt { font: 500 .72rem var(--f-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); } dl.plan dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.card-accent dl.plan dt { color: var(--ice-300); }
pre.prompt { white-space: pre-wrap; background: var(--bg-2); border-radius: 10px; padding: 12px; font: .78rem/1.5 var(--f-mono); overflow-x: auto; max-height: 260px; }
details { border-bottom: 1px solid var(--line); padding: 6px 0; } summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }

/* ---------- overview ---------- */
.hero-card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); border-radius: 16px; overflow: hidden; background: var(--plum-900); color: var(--snow); margin-bottom: 22px; position: relative; box-shadow: var(--shadow); }
.hero-card.solo { grid-template-columns: minmax(0, 1fr); }
.hero-copy { padding: clamp(18px, 3vw, 32px); position: relative; z-index: 1; min-width: 0; }
.hero-title { color: var(--snow); font-size: clamp(1.8rem, 3.8vw, 2.8rem); margin-bottom: .15em; font-weight: 500; }
.hero-meta { display: flex; gap: 8px; align-items: center; color: var(--ice-300); font-family: var(--f-mono); font-size: .86rem; flex-wrap: wrap; }
.hero-lede { max-width: 48ch; color: rgba(255,249,239,.86); font-size: 1.04rem; margin: 14px 0 22px; }
.kpis { display: flex; gap: clamp(14px, 3vw, 34px); flex-wrap: wrap; margin-bottom: 24px; }
.kpi { display: grid; } .kpi-v { font-family: var(--f-display); font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1; } .kpi-up { color: var(--ice-400); }
.kpi-l { font: 500 .7rem var(--f-mono); letter-spacing: .09em; text-transform: uppercase; color: rgba(255,249,239,.72); margin-top: 4px; }
.hero-cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hero-art { position: relative; color: var(--snow); min-height: 260px; display: grid; align-content: center; }
.fieldmap { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; opacity: .9; }
.hero-score { position: relative; justify-self: center; text-align: center; padding: 16px; background: rgba(21, 12, 37,.62); border-radius: 22px; border: 1px solid rgba(255,249,239,.18); backdrop-filter: blur(4px); }
.ring { color: var(--snow); display: block; margin: 0 auto; } .ring-num { font: 600 38px var(--f-display); fill: currentColor; } .ring-sub { font: 500 10px var(--f-mono); fill: currentColor; opacity: .7; }
.ring-arc { animation: ring 1s .15s ease both; }
.hero-art .label-mono { color: var(--ice-300); }
.sweep { transform-origin: 300px 115px; animation: sweep 6s linear infinite; } .pulse-dot { animation: pulse 2.6s var(--d) ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.chart { width: 100%; height: auto; } .bar { fill: var(--plum-600); animation: rise .6s calc(var(--i) * 30ms) ease both; transform-box: fill-box; transform-origin: bottom; }
:root[data-theme='dark'] .bar { fill: #543D7B; } .bar-hot { fill: var(--ice-500) !important; } .axis { font: 500 10px var(--f-mono); fill: var(--muted); } .axis-hot { fill: var(--head); font-weight: 600; }
.pulse-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.themes { list-style: none; padding: 0; margin: 0 0 8px; } .theme-row { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: .92rem; }
.next-action { display: grid; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,249,239,.2); justify-items: start; }
.next-action .btn-secondary { color: var(--snow); }
.journey { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.journey-step { width: 100%; display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 12px; min-height: 64px; border-radius: 14px; background: var(--bg-2); border: 1.5px solid transparent; color: var(--text); cursor: pointer; font-family: inherit; }
.journey-step:hover { border-color: var(--line); } .journey-step strong { display: block; font-size: .94rem; } .journey-step small { color: var(--muted); display: block; font-size: .78rem; line-height: 1.3; overflow-wrap: anywhere; }
.journey-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--line); font: 600 .8rem var(--f-mono); flex: none; }
.journey .done .journey-n { background: var(--sage-500); color: #10281B; }
.spark-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; } .spark { width: 220px; max-width: 100%; height: auto; } .spark-line { stroke-dasharray: 1; animation: draw 1.2s ease both; }
:root:not([data-theme='dark']) .spark path[fill-opacity] { fill: var(--plum-600); } :root:not([data-theme='dark']) .spark-line { stroke: var(--plum-600); }

/* ---------- signals ---------- */
.signal-list { display: grid; gap: 12px; }
.signal { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--plum-600); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); animation: fadeUp .35s calc(var(--i) * 45ms) ease both; }
:root[data-theme='dark'] .signal { border-left-color: var(--ice-500); } .signal-user { border-left-color: var(--sage-500) !important; }
.signal-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--bg-2); display: grid; place-items: center; color: var(--head); }
.signal-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; } .signal-top .tag { margin: 0; }
.evidence { font-family: var(--f-display); font-size: 1.1rem; font-style: italic; color: var(--text); margin-bottom: 8px; } .evidence.small { font-size: .98rem; }
.signal-conf { max-width: 360px; }

/* ---------- diagnosis / mission ---------- */
.steps { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: center; color: var(--muted); font-weight: 600; } .steps .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; flex: none; }
.steps .now { color: var(--text); } .steps .now .dot { background: var(--ice-500); border-color: var(--ice-500); animation: pulse 1s infinite; } .steps .done { color: var(--good); } .steps .done .dot { background: var(--sage-500); border-color: var(--sage-500); }
.bar-indet { height: 5px; border-radius: 5px; background: var(--line); overflow: hidden; } .bar-indet i { display: block; height: 100%; width: 35%; background: var(--ice-500); animation: indet 1.4s ease-in-out infinite; }
.opp { margin-bottom: 8px; } .opp-title { font-size: clamp(1.5rem, 3vw, 2.2rem); } .opp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 14px 0; }
.explain-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; } .explain-meta strong { display: block; overflow-wrap: anywhere; }
.agents { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.agent { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--bg-2); border: 1.5px solid transparent; transition: border-color .2s, background-color .2s; }
.agent-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--card); display: grid; place-items: center; color: var(--head); } .agent-txt { min-width: 0; } .agent-txt strong, .agent-txt small { display: block; overflow-wrap: anywhere; } .agent-txt small { color: var(--muted); font-size: .8rem; line-height: 1.3; }
.agent-st { grid-column: 2; display: inline-flex; align-items: center; gap: 6px; font: 500 .74rem var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.agent-running { border-color: var(--ice-500); } .agent-complete .agent-st, .agent-fallback .agent-st { color: var(--good); } .agent-fallback { border-color: color-mix(in srgb, var(--ice-500) 50%, transparent); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--ice-500); display: inline-block; animation: spin .8s linear infinite; }
.asset-links { list-style: none; padding: 0; margin: 0; } .asset-links li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; } .asset-links li > span:first-child { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; flex: 1; min-width: 0; }
.timeline { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; position: relative; }
.timeline li { padding: 14px; border-radius: 14px; background: var(--bg-2); display: grid; gap: 4px; border-top: 3px solid var(--line); } .timeline li.done { border-top-color: var(--ice-500); } .timeline small { color: var(--muted); }

/* ---------- website builder ---------- */
.site-toolbar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; justify-content: space-between; }
.urlbar { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.site-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.preview-stage { min-width: 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.device { margin: 0 auto; width: 100%; height: min(78vh, 760px); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); transition: max-width .24s ease; }
.device-desktop { max-width: 100%; } .device-tablet { max-width: 768px; } .device-phone { max-width: 390px; }
.device iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.controls { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; }
.field { display: grid; gap: 6px; margin-bottom: 14px; } .field > span { font: 700 .82rem var(--f-ui); color: var(--muted); }
input[type='text'], input[type='number'], textarea, select { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text); font: 500 1rem var(--f-ui); }
textarea { resize: vertical; min-height: 80px; } select { cursor: pointer; }
input[type='color'] { width: 44px; height: 44px; border: 1.5px solid var(--line); border-radius: 50%; padding: 2px; background: none; cursor: pointer; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; } .swatch { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; } .swatch[aria-pressed='true'] { box-shadow: 0 0 0 3px var(--head); }
.toggles { border: 0; padding: 0; margin: 0 0 14px; } .toggles legend { font: 700 .82rem var(--f-ui); color: var(--muted); padding: 0; margin-bottom: 4px; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; } .check input { width: 22px; height: 22px; accent-color: var(--plum-700); flex: none; }
.theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.theme-chip { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 10px 4px 6px; border-radius: 12px; border: 1.5px solid var(--line); background: transparent; color: var(--text); font: 500 .82rem var(--f-ui); cursor: pointer; text-align: left; }
.theme-chip[aria-pressed='true'] { border-color: var(--head); box-shadow: 0 0 0 2px var(--head) inset; }
.theme-chip i { width: 28px; height: 28px; border-radius: 8px; flex: none; border: 1px solid rgba(0,0,0,.15); }
.theme-ocean i { background: linear-gradient(135deg, #0B2A4A 60%, #F59E0B 60%); } .theme-forest i { background: linear-gradient(135deg, #16372B 60%, #E9C46A 60%); } .theme-sunset i { background: linear-gradient(135deg, #7C2D12 60%, #FDBA74 60%); }
.theme-lavender i { background: linear-gradient(135deg, #3B2A6B 60%, #FDE68A 60%); } .theme-mono i { background: linear-gradient(135deg, #111 60%, #8FC4EA 60%); } .theme-cream i { background: linear-gradient(135deg, #F1EADB 60%, #C2410C 60%); } .theme-night i { background: linear-gradient(135deg, #0E1116 60%, #38BDF8 60%); }
.regen-row { display: grid; gap: 4px; margin-bottom: 12px; justify-items: start; } .more .pair { padding: 10px 0; border-top: 1px dashed var(--line); }

/* ---------- action pack ---------- */
.pack-card { height: 100%; } .pack-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; flex-wrap: wrap; } .pack-offer { background-image: linear-gradient(135deg, transparent 70%, rgba(169, 212, 240,.18)); }
.cta-line { font-weight: 800; color: var(--head); } .merch-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; } .sticker { filter: drop-shadow(0 6px 10px rgba(21, 12, 37,.3)); animation: wobble 4s ease-in-out infinite; transform-origin: center; }
.post-mock { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--bg); } .post-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; } .post-head i { width: 38px; height: 38px; border-radius: 50%; background: var(--plum-800); border: 3px solid var(--ice-500); flex: none; } .post-head small { display: block; color: var(--muted); }
.headlines { margin: 0; padding-left: 1.3em; font-family: var(--f-display); font-size: 1.2rem; display: grid; gap: 10px; } .headlines li::marker { color: var(--tag); font-family: var(--f-mono); font-size: .8em; }

/* ---------- settings / account ---------- */
.seg-wide { display: flex; } .seg-wide button { flex: 1; justify-content: center; }
.connectors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.connector { display: flex; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); flex-wrap: wrap; } .connector > div:first-child { flex: 1; min-width: 180px; } .connector p { margin: 2px 0; }
.connector-side { display: grid; gap: 6px; justify-items: end; align-content: start; }
.avatar-row { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; } .avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--plum-800); color: var(--ice-300); display: grid; place-items: center; font: 600 1.5rem var(--f-display); border: 3px solid var(--ice-500); }
.scene-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .scene-list li { display: flex; gap: 12px; padding: 10px; border-radius: 12px; background: var(--bg-2); } .scene-list small { display: block; color: var(--muted); line-height: 1.35; } .scene-list .mono { color: var(--tag); }

/* ---------- toasts, modal, update bar ---------- */
.toasts { position: fixed; right: 16px; bottom: calc(16px + var(--safe-b)); display: grid; gap: 8px; z-index: 400; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--plum-950); color: var(--snow); border-left: 5px solid var(--ice-500); padding: 12px 16px; border-radius: 12px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.5); animation: fadeUp .25s ease both; overflow-wrap: anywhere; font-weight: 600; }
.toast-success { border-left-color: var(--sage-500); } .toast-error { border-left-color: #FF8A7A; } .toast.out { opacity: 0; transition: opacity .24s; }
#modal-root { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; }
#modal-root[hidden] { display: none; } .modal-backdrop { position: absolute; inset: 0; background: rgba(21, 12, 37,.62); }
.modal { position: relative; background: var(--card); color: var(--text); border-radius: 22px; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); animation: fadeUp .22s ease both; } .modal-wide { width: min(760px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 18px 0 24px; gap: 8px; } .modal-head h2 { margin: 0; } .modal-body { padding: 14px 24px; } .modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 24px 22px; flex-wrap: wrap; }
.update-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(80px + var(--safe-b)); z-index: 350; background: var(--plum-950); color: var(--snow); border: 1px solid var(--ice-500); border-radius: 999px; padding: 8px 8px 8px 20px; display: flex; gap: 14px; align-items: center; max-width: calc(100vw - 24px); }
.update-bar[hidden] { display: none; }

/* ---------- website presentation overlay ---------- */
#present-root { position: fixed; inset: 0; z-index: 250; background: #150C25; } #present-root[hidden] { display: none; }
.sp, .sp iframe { width: 100%; height: 100%; border: 0; display: block; } .sp { position: relative; }
.sp-bar { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(18px + var(--safe-b)); display: flex; gap: 8px; align-items: center; background: rgba(21, 12, 37,.92); padding: 8px 12px; border-radius: 999px; color: var(--snow); flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 20px); border: 1px solid rgba(255,249,239,.2); }
.sp-bar .btn-ghost, .sp-bar .btn-secondary { color: var(--snow); } .sp-progress { width: 120px; height: 6px; background: rgba(255,249,239,.2); border-radius: 6px; overflow: hidden; } .sp-progress i { display: block; height: 100%; width: 14%; background: var(--ice-500); transition: width .25s; }

/* ---------- pitch mode ---------- */
#pitch-root { position: fixed; inset: 0; z-index: 300; } #pitch-root[hidden] { display: none; }
.pitch { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; background: var(--plum-950); color: var(--snow); position: relative; overflow: hidden;
  background-image: radial-gradient(ellipse at 85% 0, rgba(100, 64, 163,.35), transparent 55%), linear-gradient(rgba(255,249,239,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,249,239,.04) 1px, transparent 1px); background-size: auto, 90px 90px, 90px 90px; --head: var(--snow); --muted: #D9C6C0; --text: var(--snow); --tag: var(--ice-300); --line: rgba(255,249,239,.2); --card: rgba(255,249,239,.07); --bg-2: rgba(255,249,239,.08); --bg: transparent; }
.pitch h1, .pitch h2, .pitch h3 { color: var(--snow); }
.pitch-top { display: flex; align-items: center; gap: 14px; padding: 12px clamp(14px, 3vw, 32px); padding-top: max(12px, env(safe-area-inset-top)); flex-wrap: wrap; }
.p-brand { display: inline-flex; gap: 8px; align-items: center; font: 800 1rem var(--f-ui); } .p-dots { display: inline-flex; gap: 6px; } .p-dots i { width: 22px; height: 6px; border-radius: 6px; background: rgba(255,249,239,.22); } .p-dots .past { background: rgba(169, 212, 240,.55); } .p-dots .on { background: var(--ice-500); }
.p-timer { color: var(--ice-300); } .p-scene-n { color: rgba(255,249,239,.7); }
.scene { padding: clamp(10px, 3vh, 36px) clamp(18px, 5vw, 80px); overflow: auto; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 18px; outline: none; }
.scene.enter > * { animation: sceneIn .24s ease both; }
.p-title { font-size: clamp(1.9rem, 4.6vw, 3.6rem); max-width: 22ch; margin: 0; } .p-title + .p-body { margin-top: 16px; } .p-title-xl { font-size: clamp(2.2rem, 6vw, 4.8rem); max-width: 20ch; } .p-body { font-size: clamp(1.1rem, 2vw, 1.5rem); max-width: 54ch; color: rgba(255,249,239,.9); margin: 0; }
.p-biz { font: 600 clamp(1.2rem, 2.4vw, 1.8rem) var(--f-display); color: var(--ice-300); margin: 0; }
.p-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(18px, 4vw, 56px); align-items: center; } .p-split-wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.p-score { display: grid; justify-items: center; gap: 10px; background: rgba(255,249,239,.06); border: 1px solid var(--line); border-radius: 28px; padding: 24px; }
.p-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; } .p-chip { padding: 8px 16px; border: 1.5px solid rgba(255,249,239,.4); border-radius: 999px; font: 600 1rem var(--f-mono); } .p-chip.warn { border-color: var(--ice-500); color: var(--ice-300); }
.p-quote { margin: 0 0 12px; padding: 4px 0 4px 18px; border-left: 4px solid var(--ice-500); font: italic 500 clamp(1.1rem, 1.9vw, 1.5rem)/1.4 var(--f-display); color: var(--snow); }
.p-chart { background: rgba(255,249,239,.06); border-radius: 22px; padding: 16px; } .p-chart .axis { fill: #D9C6C0; } .p-chart .axis-hot { fill: var(--ice-300); } .p-chart .bar { fill: #52328A; }
.p-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); } .p-panel { padding: clamp(16px, 2.4vw, 30px); border-radius: 22px; background: rgba(255,249,239,.07); border: 1px solid var(--line); font-size: clamp(1rem, 1.6vw, 1.25rem); } .p-panel h2 { font-size: clamp(1.3rem, 2.6vw, 2.1rem); } .p-panel-hot { background: var(--plum-700); border-color: var(--ice-500); }
.p-ev { font: italic 500 1.15em var(--f-display); } .p-steps { font-size: clamp(1.1rem, 2vw, 1.5rem); } .p-steps li { color: rgba(255,249,239,.6); } .p-steps .now { color: var(--snow); } .p-steps .done { color: var(--sage-500); }
.p-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 20px); } .p-tile { padding: clamp(12px, 1.8vw, 22px); border-radius: 18px; background: rgba(255,249,239,.07); border: 1px solid var(--line); font-size: clamp(.95rem, 1.5vw, 1.2rem); } .p-tile.hot { background: var(--plum-700); border-color: var(--ice-500); } .p-tile p { margin: 0; }
.p-pack { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: end; } .p-pop { display: grid; gap: 8px; animation: pop .45s calc(var(--n) * 380ms) ease both; font-size: .95rem; }
.p-card { background: rgba(255,249,239,.08); border: 1px solid var(--line); border-radius: 16px; padding: 12px; min-height: 130px; } .p-card.hot { background: var(--plum-700); border-color: var(--ice-500); } .p-card h3 { color: var(--ice-300); font-size: 1.05rem; } .p-card p { font-size: .92rem; margin: 0; }
.p-mini-site { background: var(--plum-900); border: 1px solid var(--line); border-radius: 14px; padding: 14px; min-height: 160px; display: grid; gap: 8px; align-content: start; } .p-mini-site i { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--ice-500); } .p-mini-site b { font: 600 1.05rem/1.15 var(--f-display); } .p-mini-cta, .p-cta-demo { background: var(--ice-500); color: var(--plum-950); font-weight: 800; border-radius: 999px; padding: 8px 14px; justify-self: start; font-size: .85rem; }
.p-cta-demo { padding: 16px 22px; font-size: 1.1rem; min-height: 56px; display: grid; place-items: center; text-align: center; justify-self: stretch; } .p-sticker { display: grid; place-items: center; min-height: 130px; }
.p-close { display: grid; gap: 20px; } .p-flow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font: 600 clamp(1rem, 1.8vw, 1.4rem) var(--f-mono); color: var(--ice-300); } .p-flow i { font-style: normal; opacity: .6; }
.p-intro { display: grid; gap: 22px; justify-items: start; }
.p-caption { margin: 0; padding: 10px clamp(18px, 5vw, 80px); font-size: clamp(1rem, 1.7vw, 1.4rem); color: var(--snow); background: rgba(0,0,0,.25); min-height: 3.4em; display: flex; align-items: center; }
.pitch-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px clamp(14px, 3vw, 32px); padding-bottom: max(10px, var(--safe-b)); border-top: 1px solid var(--line); }
.pitch-bar[data-aud] { justify-content: space-between; border-top: 0; opacity: .55; }
.p-notes { position: absolute; right: clamp(14px, 3vw, 32px); top: 64px; width: min(300px, 32vw); padding: 12px 14px; border-radius: 14px; background: rgba(0,0,0,.35); border: 1px dashed rgba(255,249,239,.3); font-size: .86rem; display: none; }
@media (min-width: 1280px) { .p-notes { display: block; } .pitch:not(.aud) .scene { padding-right: min(340px, 28vw); } }
.pitch.aud .p-title { font-size: clamp(2.2rem, 5.6vw, 4.8rem); } .pitch.aud .p-body, .pitch.aud .p-panel, .pitch.aud .p-tile { font-size: clamp(1.2rem, 2.2vw, 1.9rem); } .pitch.aud .p-caption { font-size: clamp(1.2rem, 2.2vw, 1.9rem); }
.pitch.aud .scene.enter > * { animation-duration: .5s; } .pitch.aud .p-pop { font-size: 1.15rem; } .pitch.aud .p-card p { font-size: 1.05rem; } .pitch.aud .p-cta-demo { font-size: 1.4rem; } .pitch.aud .p-mini-site b { font-size: 1.3rem; }
.pitch.static *, .pitch.static *::before { animation: none !important; transition: none !important; }

/* ---------- motion ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sceneIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes ring { from { stroke-dashoffset: var(--from); } to { stroke-dashoffset: var(--to); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(1.35); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes wobble { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .site-layout { grid-template-columns: 1fr; } .controls { position: static; max-height: none; }
  .opp-grid, .explain-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) and (min-width: 768px) {
  :root { --sidebar-w: 76px; } .nav-label, .nav-n, .side-foot, .brand div { display: none; } .nav-item { justify-content: center; padding: 0; } .nav-item[aria-current='page']::before { left: -10px; } .sidebar { padding: 18px 10px; align-items: center; } .brand { padding: 0; }
}
@media (max-width: 900px) {
  .span-5, .span-6, .span-7 { grid-column: span 12; } .hero-card { grid-template-columns: 1fr; } .hero-art { min-height: 240px; } .grid-3, .connectors, .scene-list { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); } .p-split, .p-split-wide, .p-grid-2 { grid-template-columns: minmax(0, 1fr); } .p-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .app { display: block; padding-bottom: calc(72px + var(--safe-b)); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); height: auto; transform: translateX(-102%); transition: transform .22s ease, visibility 0s linear .22s; padding-top: max(20px, env(safe-area-inset-top)); visibility: hidden; }
  .sidebar.open { transform: none; visibility: visible; transition: transform .22s ease, visibility 0s; box-shadow: 20px 0 50px rgba(0,0,0,.4); }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--plum-950); padding: 6px 4px calc(6px + var(--safe-b)); border-top: 1px solid rgba(255,249,239,.14); }
  .bottom-nav .nav-item { flex-direction: column; gap: 2px; justify-content: center; padding: 4px 2px; min-height: 52px; font-size: .68rem; text-align: center; width: 100%; } .bottom-nav .nav-label { flex: none; max-width: 100%; }
  .bottom-nav .nav-item[aria-current='page'] { background: var(--plum-800); color: var(--ice-300); } .bottom-nav .nav-item[aria-current='page']::before { display: none; }
  .hide-sm, .pitch-btn span, .topbar-title { display: none; } .top-brand { display: inline-flex; } .topbar .menu-toggle { display: inline-grid; } .topbar { gap: 6px; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .pitch-btn { width: 44px; padding: 0; flex: none; } .update-bar { bottom: calc(84px + var(--safe-b)); }
  .toasts { bottom: calc(80px + var(--safe-b)); right: 12px; left: 12px; max-width: none; }
  .opp-grid, .explain-meta { grid-template-columns: 1fr; } .kpis { gap: 18px; } .page-actions .btn { flex: 1 1 auto; }
  .signal { grid-template-columns: 1fr; } .signal-ic { display: none; } .agent { grid-template-columns: 40px minmax(0, 1fr); }
  .p-pack { grid-template-columns: repeat(2, minmax(0, 1fr)); } .p-notes { display: none !important; } .pitch-bar .btn { padding: 6px 12px; font-size: .84rem; } .pitch-bar .btn svg { display: none; }
  .timeline { grid-template-columns: 1fr; }
}
/* living background: the logo and small business icons drift slowly (GPU transform only, no repaint) */
body::before { content: ''; position: fixed; inset: -240px; z-index: -1; pointer-events: none; background: var(--plum-700); opacity: .06;
  -webkit-mask: url(/icons/pattern.svg) 0 0 / 220px 220px repeat; mask: url(/icons/pattern.svg) 0 0 / 220px 220px repeat; animation: drift 80s linear infinite; will-change: transform; }
:root[data-theme='dark'] body::before { background: var(--snow); opacity: .045; }
@keyframes drift { to { transform: translate3d(220px, 220px, 0); } }
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }
/* theme switch: circular reveal (View Transitions) with a soft fallback */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }
.theme-fade, .theme-fade *, .theme-fade *::before { transition: background-color .45s ease, color .45s ease, border-color .45s ease !important; }
.spin-once svg { animation: themeSpin .6s cubic-bezier(.3,.7,.2,1); }
@keyframes themeSpin { from { transform: rotate(-120deg) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
/* source tooltip */
.has-src { cursor: help; -webkit-touch-callout: none; border-radius: 8px; }
.has-src:hover, .has-src:focus-visible { outline: 1.5px dotted var(--ice-500); outline-offset: 3px; }
#src-tip { position: fixed; z-index: 500; max-width: min(300px, calc(100vw - 16px)); padding: 10px 12px; border-radius: 12px; background: var(--plum-950); color: var(--snow); border: 1px solid rgba(255,249,239,.22); box-shadow: 0 14px 30px -10px rgba(0,0,0,.55); font-size: .82rem; line-height: 1.45; pointer-events: none; animation: fadeUp .15s ease both; }
#src-tip[hidden] { display: none; }
#src-tip strong { display: block; color: var(--ice-300); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 3px; }
#src-tip p { margin: 0 0 6px; } #src-tip small { display: block; opacity: .75; }
/* phones: compact scale so more fits on one screen (rem-based sizes shrink with the root) */
@media (max-width: 767px) {
  html { font-size: 14px; }
  main { padding: 12px 12px 24px; }
  .page-head { margin-bottom: 14px; gap: 10px; } .page-head h1 { font-size: 1.6rem; } .lede { font-size: .92rem; }
  .bento { gap: 10px; margin-bottom: 12px; } .card { padding: 14px; } .grid-3 { gap: 10px; }
  .hero-card { margin-bottom: 12px; border-radius: 14px; } .hero-copy { padding: 16px; } .hero-title { font-size: 1.7rem; } .hero-lede { font-size: .92rem; margin: 8px 0 12px; }
  .hero-art { min-height: 0; padding: 0 0 14px; } .fieldmap { display: none; } .hero-score { padding: 8px 14px; } .hero-score .ring { width: 84px; height: 84px; }
  .kpis { gap: 16px; margin-bottom: 12px; } .kpi-v { font-size: 1.5rem; }
  .btn-lg { min-height: 46px; padding: 8px 20px; } .btn-xl { min-height: 52px; font-size: 1.05rem; padding: 10px 24px; }
  .big-num { font-size: 2.2rem; } .big-num.sm { font-size: 1.7rem; }
  .topbar { min-height: 52px; padding-top: 4px; padding-bottom: 4px; }
  .bottom-nav .nav-item { min-height: 48px; font-size: .64rem; } .app { padding-bottom: calc(60px + var(--safe-b)); }
  .journey-step { min-height: 52px; padding: 8px; } .signal { padding: 12px; } .empty-hero { padding: 24px 14px; }
  .p-title { font-size: clamp(1.4rem, 7vw, 2rem); } .p-body { font-size: 1rem; }
}
@media (max-width: 380px) { .top-brand strong, .lang svg { display: none; } .lang { padding-left: 4px; } .topbar { gap: 4px; } .icon-btn { width: 40px; } }
@media (max-height: 520px) and (orientation: landscape) {
  .pitch-top { padding-top: 6px; padding-bottom: 6px; gap: 8px; } .p-caption { min-height: 0; padding-top: 4px; padding-bottom: 4px; font-size: .9rem; } .pitch:not(.aud) .p-caption { display: none; }
  .scene { align-content: start; gap: 10px; padding-top: 8px; } .p-title, .pitch.aud .p-title { font-size: clamp(1.25rem, 4.6vh, 1.9rem); } .p-body, .p-panel, .p-tile { font-size: .95rem; } .p-score .ring { width: 110px; height: 110px; }
  .pitch-bar { padding-top: 6px; } .pitch-bar [data-p='fullscreen'], .pitch-bar [data-p='static'], .pitch-bar [data-p='voice'], .pitch-bar [data-p='restart'] { display: none; }
  .bottom-nav .nav-label { display: none; } .bottom-nav .nav-item { min-height: 44px; } .p-pack { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media print { .sidebar, .topbar, .bottom-nav { display: none; } }

/* business details form */
.biz-form { display: grid; gap: 4px; align-content: start; }
.field-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; } .field-row .input-wrap { flex: 1 1 200px; position: relative; min-width: 0; }
.field-row .btn { flex: none; white-space: normal; }
.input-wrap .prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); pointer-events: none; }
.input-wrap input.has-prefix { padding-left: 28px; } input:disabled { opacity: .55; background: var(--bg-2); }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.needs { margin: 0; padding-left: 1.3em; display: grid; gap: 10px; } .needs li { overflow-wrap: anywhere; } .needs strong { display: block; color: var(--ice-300); } .needs span { font-size: .88rem; opacity: .9; }
.biz-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; align-items: center; }
.biz-chip { font-size: .8rem; padding: 5px 12px; border-radius: 999px; background: rgba(255,249,239,.12); border: 1px solid rgba(255,249,239,.22); overflow-wrap: anywhere; } .biz-chip b { font-weight: 500; color: var(--ice-300); margin-right: 4px; } .biz-chip.is-none { opacity: .75; border-style: dashed; }
.name-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; } .name-idea { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; border-radius: 12px; background: var(--bg-2); } .name-idea .mono { flex: 1 1 140px; font-size: .95rem; overflow-wrap: anywhere; }
@media (max-width: 767px) { .field-pair { grid-template-columns: 1fr; } }
/* AI notice */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; margin: 0 0 16px; background: var(--warn-bg); color: var(--warn-text); border: 1px solid color-mix(in srgb, var(--warn-text) 25%, transparent); font-size: .88rem; }
.notice p { margin: 0; } .notice .ic { margin-top: 2px; }
/* review themes with dropdowns */
.themes { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.theme-item details { border: 0; padding: 0; } .theme-item summary { display: grid; gap: 4px; cursor: pointer; min-height: 44px; padding: 6px 4px; border-radius: 10px; list-style: none; align-content: center; }
.theme-item summary::-webkit-details-marker { display: none; } .theme-item summary::after { content: '▾'; position: absolute; right: 10px; opacity: .6; transition: transform .2s; } .theme-item details { position: relative; } .theme-item details[open] summary::after { transform: rotate(180deg); }
.theme-item summary:hover { background: var(--bg-2); } .theme-item .theme-row { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: .92rem; padding-right: 22px; } .theme-item .meter { display: block; }
.theme-body { padding: 4px 6px 10px; font-size: .88rem; } .theme-body > p { margin: 4px 0 8px; color: var(--muted); }
.reasons { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; } .reasons li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; } .reasons li span { overflow-wrap: anywhere; }
.reason-bar { grid-column: 1 / -1; height: 5px; border-radius: 5px; background: color-mix(in srgb, var(--head) 12%, transparent); overflow: hidden; display: block; } .reason-bar u { display: block; height: 100%; background: var(--ice-500); text-decoration: none; border-radius: 5px; }
.split-bar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; font: 600 .78rem var(--f-mono); } .split-bar span { display: grid; place-items: center; min-width: 26px; color: #130F1A; } .split-bar .know { background: var(--sage-500); } .split-bar .ask { background: var(--ice-500); }
.split-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: .8rem; color: var(--muted); } .split-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; } .split-legend .know { background: var(--sage-500); } .split-legend .ask { background: var(--ice-500); }
/* period selector and reach */
.range-bar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 4px 0 12px; } .range-dates { display: flex; gap: 10px; flex-wrap: wrap; } .range-dates .field { margin: 0; } .range-dates input { min-height: 44px; }
.reach-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: center; } .reach-chart { width: 100%; height: auto; display: block; color: var(--text); }
.reach-stats { margin: 0; display: grid; gap: 10px; } .reach-stats div { padding: 8px 10px; border-radius: 12px; background: var(--bg-2); } .reach-stats dt { font: 500 .68rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); } .reach-stats dd { margin: 2px 0 0; font: 500 1.4rem var(--f-display); } .reach-stats .up { color: var(--good); } .reach-stats .down { color: #B3261E; }
:root[data-theme='dark'] .reach-stats .down { color: #FFB4A9; }
#src-tip small.dyn { color: var(--ice-300); opacity: 1; margin-bottom: 4px; }
/* competitors */
.places { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 20px; }
.place { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); display: grid; gap: 8px; align-content: start; } .place.is-you { border-color: var(--ice-500); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ice-500) 45%, transparent), var(--shadow); }
.place-top { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; } .place-top strong { overflow-wrap: anywhere; }
.place-stats { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 6px; } .place-stats dt { font: 500 .62rem var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); } .place-stats dd { margin: 0; font-weight: 600; }
.place-flags { display: grid; gap: 4px; margin: 0; font-size: .82rem; } .place-flags span { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.cmp-grid { display: grid; gap: 18px; } .cmp-group h4 { margin: 0 0 6px; } .cmp-row { display: grid; grid-template-columns: minmax(80px, 140px) minmax(0, 1fr) 48px; gap: 8px; align-items: center; padding: 3px 0; font-size: .86rem; }
.cmp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cmp-bar { height: 10px; border-radius: 10px; background: color-mix(in srgb, var(--head) 12%, transparent); overflow: hidden; } .cmp-bar i { display: block; height: 100%; background: color-mix(in srgb, var(--head) 55%, transparent); border-radius: 10px; animation: grow .6s ease both; transform-origin: left; }
.cmp-row.is-you .cmp-bar i { background: var(--ice-500); } .cmp-row.is-you { font-weight: 700; } .cmp-row b { text-align: right; }
.radar { width: 100%; max-width: 320px; height: auto; display: block; margin: 0 auto; color: var(--text); } .radar-legend { display: flex; justify-content: center; gap: 16px; margin: 6px 0 0; font-size: .82rem; color: var(--muted); } .radar-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; } .radar-legend .y { background: var(--ice-500); } .radar-legend .g { background: color-mix(in srgb, var(--text) 40%, transparent); }
.tips { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; } .tip { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(255,249,239,.08); } .tip-strength { background: rgba(123,165,141,.18); } .tip-ic { flex: none; margin-top: 2px; color: var(--ice-300); } .tip-strength .tip-ic { color: #A9D3BC; }
@media (max-width: 900px) { .reach-row { grid-template-columns: 1fr; } }
@media (max-width: 767px) { .cmp-row { grid-template-columns: 90px minmax(0, 1fr) 44px; } .places { grid-template-columns: 1fr; } }
.self-start { align-self: start; }
