/* Growth OS: "the growth engine". Obsidian and bone, three signal colours that always mean the same thing:
   amber = the buyer (demand), blue = the venture (supply), volt = the match (an outcome, or the next move).
   Three voices in type: grotesk for the engine, serif italic for the buyer's own words, mono for evidence. */
:root {
  --canvas: #F3F1EA; --surface: #FFFFFF; --sunk: #EAE7DE; --line: #DDD9CE; --line-strong: #C5C1B5;
  --ink: #0B0E12; --ink-2: #2A3138; --muted: #5C6570; --faint: #8A929B;
  --accent: #3D6B00; --accent-ink: #FFFFFF; --accent-soft: #E9F4D3; --accent-line: #B5D67A;
  --ok: #2F7A1F; --ok-soft: #E4F2DD; --warn: #9A5B00; --warn-soft: #F8EDD8; --bad: #B8352A; --bad-soft: #F8E4E1;
  --info: #2462B0; --info-soft: #E2ECF8; --violet: #5B47C7; --violet-soft: #ECE9FA;
  --opus: #5B47C7; --sonnet: #2462B0; --haiku: #B24A6B; --gate: #9A5B00; --conn: #5C6570; --tool: #3D6B00;
  --volt: #5E9A00; --buyer: #B86E00; --seller: #2462B0;
  --shadow-pop: 0 18px 40px -16px rgba(11, 14, 18, .28), 0 2px 6px rgba(11, 14, 18, .06);
  --r: 7px; --r-lg: 12px;
  --sans: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
  --side: 236px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --canvas: #07090C; --surface: #0E1217; --sunk: #131920; --line: #232B34; --line-strong: #34404C;
  --ink: #ECE8DF; --ink-2: #CBC8C0; --muted: #8A939E; --faint: #5E6873;
  --accent: #C6FF4A; --accent-ink: #07090C; --accent-soft: #1A230D; --accent-line: #4B6420;
  --ok: #7FD46A; --ok-soft: #14260F; --warn: #FFB347; --warn-soft: #33250E; --bad: #FF6B5E; --bad-soft: #381714;
  --info: #6FB1FF; --info-soft: #122236; --violet: #A99BF5; --violet-soft: #221E3D;
  --opus: #A99BF5; --sonnet: #6FB1FF; --haiku: #F08FB0; --gate: #FFB347; --conn: #8A939E; --tool: #C6FF4A;
  --volt: #C6FF4A; --buyer: #FFB347; --seller: #6FB1FF;
  --shadow-pop: 0 18px 44px -14px rgba(0, 0, 0, .8); color-scheme: dark; } }
:root[data-theme="dark"] {
  --canvas: #07090C; --surface: #0E1217; --sunk: #131920; --line: #232B34; --line-strong: #34404C;
  --ink: #ECE8DF; --ink-2: #CBC8C0; --muted: #8A939E; --faint: #5E6873;
  --accent: #C6FF4A; --accent-ink: #07090C; --accent-soft: #1A230D; --accent-line: #4B6420;
  --ok: #7FD46A; --ok-soft: #14260F; --warn: #FFB347; --warn-soft: #33250E; --bad: #FF6B5E; --bad-soft: #381714;
  --info: #6FB1FF; --info-soft: #122236; --violet: #A99BF5; --violet-soft: #221E3D;
  --opus: #A99BF5; --sonnet: #6FB1FF; --haiku: #F08FB0; --gate: #FFB347; --conn: #8A939E; --tool: #C6FF4A;
  --volt: #C6FF4A; --buyer: #FFB347; --seller: #6FB1FF;
  --shadow-pop: 0 18px 44px -14px rgba(0, 0, 0, .8); color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--canvas); color: var(--ink); font: 14.5px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
/* Tabular figures only where numbers line up: in this font "tnum" also widens commas and full stops in running text. */
.fstep .v, .big-stat b, .money .v, td.num, .kpi b, .stat b { font-variant-numeric: tabular-nums; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.012em; }
h1 { font-size: 28px; line-height: 1.18; font-weight: 650; letter-spacing: -.025em; }
h2 { font-size: 17px; font-weight: 620; }
h3 { font-size: 15px; font-weight: 600; }
h4 { font-size: 13px; font-weight: 600; color: var(--ink-2); }
p { margin: 0; }
code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }
.ic { flex: none; vertical-align: -3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
::selection { background: var(--accent-soft); }

/* ---------- controls */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 15px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 550 13.5px var(--sans); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, transform .06s; }
.btn:hover { background: var(--sunk); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--canvas); }
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-go { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-go:hover { background: var(--accent); filter: brightness(1.08); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--sunk); color: var(--ink); }
.btn-danger { color: var(--bad); }
.btn-sm { height: 29px; padding: 0 10px; font-size: 12.5px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=time], select, textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--ink); font: 14px var(--sans); }
textarea { height: auto; min-height: 72px; padding: 9px 12px; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 550; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.field small { color: var(--muted); font-size: 12.5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; align-items: start; }
.form-grid .span2 { grid-column: span 2; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; color: var(--ink-2); user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 32px; height: 19px; border-radius: 10px; background: var(--line-strong); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(13px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg { display: inline-flex; padding: 3px; background: var(--sunk); border: 1px solid var(--line); border-radius: 9px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--muted); font: 550 13px var(--sans); height: 30px; padding: 0 13px; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--line); }
input[type=range] { width: 100%; accent-color: var(--accent); }
.opts { display: grid; gap: 8px; }
.opt { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.opt:hover { border-color: var(--ink-2); }
.opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.opt .rd { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; margin-top: 2px; }
.opt.on .rd { border: 5px solid var(--accent); }
.opt b { display: block; font-weight: 600; font-size: 14px; }
.opt .d { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ---------- chips, tags, status */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 9px; border-radius: 12px; background: var(--sunk); border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.chip-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.chip-bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.chip-info { background: var(--info-soft); border-color: transparent; color: var(--info); }
.chip-violet { background: var(--violet-soft); border-color: transparent; color: var(--violet); }
.chip-accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.lbl { font-size: 11.5px; font-weight: 550; color: var(--faint); }
.lbl-ok { color: var(--ok); } .lbl-warn { color: var(--warn); } .lbl-info { color: var(--info); } .lbl-violet { color: var(--violet); }
/* source tag: what kind of number this is; click to see where it came from */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px 0 7px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: 550 11.5px var(--sans); cursor: pointer; white-space: nowrap; vertical-align: middle; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.tag:hover { border-color: var(--line-strong); background: var(--sunk); }
.tag.t-measured::before { background: var(--ok); } .tag.t-estimated::before { background: var(--info); } .tag.t-benchmark::before { background: var(--violet); }
.tag.t-answer::before { background: var(--ink); } .tag.t-assumed::before { background: var(--warn); } .tag.t-calc::before { background: var(--line-strong); } .tag.t-sample::before { background: var(--haiku); }
.tag.t-sample { border-style: dashed; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 5px; font-size: 11.5px; font-weight: 600; }
.badge-sample { background: var(--violet-soft); color: var(--violet); }
.nil { color: var(--faint); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.dotst { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--line-strong); }
.dotst.ok { background: var(--ok); } .dotst.warn { background: var(--warn); } .dotst.bad, .dotst.missing { background: var(--bad); } .dotst.unknown { background: var(--faint); }
.dotst.live { background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: ping 1.6s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 80%, 100% { box-shadow: 0 0 0 7px transparent; } }
.spin { display: inline-block; border-radius: 50%; border: 1.75px solid var(--accent-line); border-top-color: var(--accent); animation: rot .8s linear infinite; flex: none; }
@keyframes rot { to { transform: rotate(360deg); } }
.score { display: inline-flex; align-items: center; gap: 8px; min-width: 120px; }
.score-track { flex: 1; height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; min-width: 70px; position: relative; }
.score-track::after { content: ""; position: absolute; left: 60%; top: -2px; bottom: -2px; width: 1px; background: var(--ink-2); opacity: .35; }
.score-fill { display: block; height: 100%; border-radius: 3px; }
.tone-ok { background: var(--ok); } .tone-warn { background: var(--warn); } .tone-bad { background: var(--bad); }
.score-num { font-weight: 650; font-size: 12.5px; width: 22px; text-align: right; }

/* info button + popover */
.i-btn { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font: italic 600 10.5px/1 Georgia, serif; cursor: pointer; padding: 0; vertical-align: 1px; flex: none; }
.i-btn:hover, .i-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.pop { position: absolute; z-index: 60; width: 340px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); padding: 14px 16px; font-size: 13px; line-height: 1.5; color: var(--ink-2); animation: popin .14s ease-out; }
.pop b.pt { display: block; color: var(--ink); font-size: 13.5px; margin-bottom: 4px; }
.pop .src { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: grid; gap: 3px; font-size: 12.5px; }
.pop .src a { overflow-wrap: anywhere; }
@keyframes popin { from { opacity: 0; transform: translateY(-3px); } }

/* ---------- tables, kv, code */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 550; color: var(--muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl-click tbody tr { cursor: pointer; } .tbl-click tbody tr:hover td { background: var(--sunk); }
.kv { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: 8px 16px; margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv .kv { grid-template-columns: minmax(100px, 150px) 1fr; padding: 8px 10px; background: var(--sunk); border-radius: 6px; }
.kv-nested { display: grid; gap: 6px; }
.empty-line { color: var(--muted); font-size: 13px; padding: 6px 0; }
.code { position: relative; }
.code pre { margin: 0; padding: 12px 14px; padding-right: 80px; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; white-space: pre-wrap; word-break: break-word; line-height: 1.55; color: var(--ink-2); max-height: 420px; }
.code-copy { position: absolute; top: 7px; right: 7px; display: inline-flex; align-items: center; gap: 5px; height: 27px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); font: 12px var(--sans); cursor: pointer; }
.code-copy:hover { color: var(--ink); }

/* ---------- toast, modal */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 12px); background: var(--ink); color: var(--canvas); padding: 10px 16px; border-radius: 9px; font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 80; box-shadow: var(--shadow-pop); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); color: #fff; }
.modal-back { position: fixed; inset: 0; z-index: 70; background: color-mix(in srgb, var(--ink) 38%, transparent); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.modal { width: 560px; max-width: 100%; max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-pop); padding: 24px 26px; animation: rise .18s ease-out; }
.modal h2 { font-size: 19px; margin-bottom: 6px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@keyframes fade { from { opacity: 0; } } @keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--ink); color: var(--canvas); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side h2 { font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -.025em; max-width: 15ch; }
.auth-side p { color: color-mix(in srgb, var(--canvas) 70%, transparent); max-width: 42ch; margin-top: 12px; }
.auth-side svg { position: absolute; right: -40px; bottom: 40px; opacity: .9; }
.auth-main { display: grid; place-items: center; padding: 24px; }
.auth-card { width: 380px; max-width: 100%; }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card form { display: grid; gap: 14px; margin-top: 24px; }
.form-error { color: var(--bad); font-size: 13px; }
.auth-foot { margin-top: 26px; color: var(--faint); font-size: 12px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- brand */
.brand { display: flex; align-items: center; gap: 10px; color: inherit; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: var(--canvas); display: grid; place-items: center; flex: none; }
.brand-name { font-weight: 680; font-size: 15px; letter-spacing: -.015em; line-height: 1.1; }
.brand-by { color: var(--muted); font-size: 11.5px; }

/* ---------- shell */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 16px 12px 12px; gap: 2px; border-right: 1px solid var(--line); background: var(--canvas); }
.side-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px 16px; }
.side-top .brand { flex: 1 0 auto; white-space: nowrap; }
.ws-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.ws-btn:hover { border-color: var(--line-strong); }
.mono-badge { width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.ws-btn .t { font-weight: 620; font-size: 13.5px; line-height: 1.25; display: block; }
.ws-btn .s { color: var(--muted); font-size: 12px; display: block; }
.ws-menu { position: absolute; z-index: 30; top: 104px; left: 12px; width: calc(var(--side) - 24px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); padding: 6px; }
.ws-menu a, .ws-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border-radius: 6px; color: var(--ink); background: transparent; border: 0; font: inherit; font-size: 13.5px; cursor: pointer; text-align: left; }
.ws-menu a:hover, .ws-menu button:hover { background: var(--sunk); text-decoration: none; }
.ws-menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 2px; }
.svc-line { display: flex; gap: 9px; align-items: flex-start; padding: 10px 8px 12px; color: var(--ink); font-size: 12.5px; line-height: 1.35; }
.svc-line:hover { text-decoration: none; }
.svc-line .dotst { margin-top: 4px; }
.svc-line b { display: block; font-weight: 600; font-size: 12.5px; }
.svc-line span span { color: var(--muted); }
.nav { display: grid; gap: 1px; margin-top: 4px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 35px; white-space: nowrap; padding: 0 10px; border-radius: 8px; color: var(--ink-2); font-size: 13.5px; font-weight: 500; }
.nav a:hover { background: var(--sunk); text-decoration: none; color: var(--ink); }
.nav a.on { background: var(--surface); color: var(--ink); font-weight: 620; box-shadow: 0 0 0 1px var(--line); }
.nav a .ic { color: var(--muted); } .nav a.on .ic { color: var(--accent); }
.nav .sep { height: 1px; background: var(--line); margin: 8px 10px; }
.nav .cnt { margin-left: auto; font-size: 11.5px; font-weight: 650; color: var(--accent-ink); background: var(--accent); border-radius: 9px; padding: 0 6px; line-height: 17px; }
.acct { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 10px 6px 0; border-top: 1px solid var(--line); }
.acct .av { width: 28px; height: 28px; border-radius: 50%; background: var(--sunk); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--ink-2); flex: none; }
.acct .who { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; line-height: 1.25; overflow: hidden; }
.acct .who span { display: block; font-weight: 400; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; height: 25px; padding: 0 9px; border-radius: 13px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent); font: 600 11.5px var(--sans); cursor: pointer; }
.main { min-width: 0; }
.frame { min-height: 100vh; }
.frame-top { display: flex; justify-content: space-between; align-items: center; padding: 18px 28px; }

/* ---------- page */
.page { max-width: 1080px; padding: 34px 44px 80px; }
.page-wide { max-width: 1280px; }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.ph .sub { color: var(--muted); margin-top: 7px; max-width: 64ch; font-size: 15px; }
.ph-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sec { margin-top: 36px; }
.sec:first-child { margin-top: 0; }
.sec-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sec-h h2 { flex: none; }
.sec-h .grow { flex: 1; }
.sec-h .hint { color: var(--muted); font-size: 13px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel-pad { padding: 18px 20px; }
.rows > * + * { border-top: 1px solid var(--line); }
.row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 600; }
.row .d { color: var(--muted); font-size: 13px; margin-top: 2px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.state { padding: 60px 20px; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.state h3 { color: var(--ink); }
.loading { display: flex; gap: 10px; align-items: center; color: var(--muted); padding: 20px 0; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r); background: var(--sunk); color: var(--ink-2); font-size: 13px; }
.note .ic { margin-top: 1px; color: var(--muted); }
.note-warn { background: var(--warn-soft); color: var(--warn); } .note-warn .ic { color: var(--warn); }
.note-bad { background: var(--bad-soft); color: var(--bad); } .note-bad .ic { color: var(--bad); }
.note-ok { background: var(--ok-soft); color: var(--ok); } .note-ok .ic { color: var(--ok); }
.note-sample { background: var(--violet-soft); color: var(--violet); } .note-sample .ic { color: var(--violet); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font: 550 13.5px var(--sans); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.kbd { font: 11px var(--mono); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; color: var(--muted); }

/* ---------- funnel strip (goal, home, approvals): the arithmetic left to right */
.funnel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.fstep { padding: 16px 16px 14px; position: relative; display: grid; gap: 6px; align-content: start; min-width: 0; }
.fstep + .fstep { border-left: 1px solid var(--line); }
.fstep + .fstep::before { content: ""; position: absolute; left: -6px; top: 26px; width: 10px; height: 10px; background: var(--surface); border-top: 1px solid var(--line); border-right: 1px solid var(--line); transform: rotate(45deg); }
.fstep .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.fstep .v { font-size: 22px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; white-space: nowrap; }
.fstep.rate { background: var(--sunk); }
.fstep.rate .v { font-size: 16px; font-weight: 600; color: var(--ink-2); }
.fstep.out .v { color: var(--accent); }
.fstep .tagrow { min-height: 21px; }
@media (max-width: 1100px) { .funnel { grid-auto-flow: row; grid-template-columns: 1fr 1fr; } .fstep + .fstep { border-left: 0; border-top: 1px solid var(--line); } .fstep + .fstep::before { display: none; } }

/* ---------- flow graph (the signature element) */
.flow-wrap { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.flow { display: block; width: 100%; height: auto; }
.flow .edge { fill: none; stroke: var(--line-strong); stroke-width: 1.25; }
.flow .edge.hot { stroke: var(--accent-line); stroke-width: 2; }
.flow .node rect { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; transition: stroke .2s, fill .2s; }
.flow .node text { fill: var(--ink); font: 600 12.5px var(--sans); }
.flow .node text.sub { fill: var(--muted); font-weight: 450; font-size: 11px; }
.flow .node .bar { transition: fill .2s; }
.flow .node.hot rect { stroke-width: 2; }
.flow .node.dim { opacity: .45; }
.flow .lane { fill: var(--muted); font: 600 11.5px var(--sans); }
.flow .lane-bg { fill: var(--sunk); }
.flow .packet { pointer-events: none; }
.flow .node { cursor: pointer; }
.flow .node:focus { outline: none; } .flow .node:focus rect { stroke: var(--accent); stroke-width: 2; }
.flow-legend { display: flex; gap: 16px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.flow-legend span { display: inline-flex; gap: 6px; align-items: center; }
.flow-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.flow-cap { position: absolute; left: 18px; bottom: 54px; right: 18px; display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-2); pointer-events: none; }
.flow-cap .now { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; box-shadow: 0 4px 14px -8px rgba(0,0,0,.2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- result cards (step outputs) */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; }
.card + .card { margin-top: 12px; }
.card h4 { margin: 16px 0 8px; font-size: 12.5px; color: var(--muted); font-weight: 550; }
.card h4:first-child { margin-top: 0; }
.card .lead { font-size: 15.5px; line-height: 1.5; color: var(--ink); max-width: 70ch; }
.card-title { display: flex; align-items: center; gap: 8px; font-weight: 620; font-size: 14.5px; margin-bottom: 12px; }
.card-title .ic { color: var(--muted); }
.offer-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.offer-list li { padding-left: 14px; border-left: 2px solid var(--accent-line); }
.offer-list .on { font-weight: 550; }
.offer-list .sub { color: var(--muted); font-size: 13px; }
.callout { display: flex; gap: 10px; padding: 11px 13px; border-radius: var(--r); font-size: 13px; margin-top: 10px; }
.callout-warn { background: var(--warn-soft); color: var(--warn); }
.callout-bad { background: var(--bad-soft); color: var(--bad); }
.callout-ok { background: var(--ok-soft); color: var(--ok); }
.callout ul { margin: 4px 0 0; padding-left: 18px; }
.split2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.rivals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rival { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; font-size: 13px; display: grid; gap: 6px; }
.rival .rn { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 620; font-size: 13.5px; }
.rival .rs { color: var(--muted); font-size: 12px; font-weight: 400; }
.rival p { color: var(--ink-2); } .rival .w { color: var(--muted); }
.big-stat { display: flex; align-items: baseline; gap: 10px; }
.big-stat b { font-size: 34px; letter-spacing: -.02em; font-weight: 650; }
.ring { width: 76px; height: 76px; flex: none; }
.ring-wrap { display: flex; gap: 18px; align-items: center; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks li .ic { margin-top: 2px; }
.checks .ok .ic { color: var(--ok); } .checks .bad .ic { color: var(--bad); } .checks .warn .ic { color: var(--warn); }
.money { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.money > div { background: var(--surface); padding: 12px 14px; }
.money .k { color: var(--muted); font-size: 12px; }
.money .v { font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.gate { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.gate-head { padding: 16px 20px; display: flex; gap: 12px; align-items: flex-start; }
.gate-head .ic { margin-top: 2px; }
.gate.auto .gate-head { background: var(--ok-soft); color: var(--ok); }
.gate.wait { border-color: var(--gate); box-shadow: 0 0 0 3px var(--warn-soft); }
.gate.wait .gate-head { background: var(--warn-soft); color: var(--warn); }
.gate.rejected .gate-head, .gate.blocked .gate-head { background: var(--bad-soft); color: var(--bad); }
.gate-head b { display: block; font-size: 14px; color: inherit; }
.gate-head span { font-size: 13px; opacity: .9; }
.gate-body { padding: 16px 20px; display: grid; gap: 14px; }
.gate-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ads { display: grid; gap: 12px; }
.ad-group-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 18px 0 8px; }
.ad-group-title:first-child { margin-top: 0; }
.ad-group-title b { font-size: 13.5px; }
.gad { background: #fff; color: #202124; border: 1px solid #dadce0; border-radius: 10px; padding: 14px 16px; font-family: Arial, "Helvetica Neue", sans-serif; max-width: 620px; }
.gad-top { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.gad-fav { width: 26px; height: 26px; border-radius: 50%; background: #f1f3f4; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #5f6368; }
.gad-sp { font-weight: 700; color: #202124; }
.gad-url { color: #4d5156; }
.gad-h { color: #1a0dab; font-size: 19px; line-height: 1.3; margin: 7px 0 4px; }
.gad-d { color: #4d5156; font-size: 13.5px; line-height: 1.55; }
.kw-under { margin-top: 8px; }
.list-editor { display: grid; gap: 6px; }
.list-editor .le-row { display: flex; gap: 6px; }
.list-editor .le-row input { flex: 1; }
.chip-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px 6px; min-height: 38px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); align-items: center; }
.chip-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chip-input input { border: 0 !important; box-shadow: none !important; height: 24px; padding: 0 4px; flex: 1; min-width: 120px; background: transparent; }
.chip-input .chip button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 0 0 4px; font-size: 14px; line-height: 1; }
.learned { margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--accent); color: var(--ink-2); font-size: 13px; }

/* ---------- responsive */
@media (max-width: 980px) {
  .two-col, .split2, .rivals, .grid2, .grid3 { grid-template-columns: 1fr; }
  .money { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { grid-auto-flow: column; overflow-x: auto; }
  .nav .sep, .acct, .svc-line { display: none; }
  .page { padding: 22px 16px 60px; }
  .form-grid { grid-template-columns: 1fr; } .form-grid .span2 { grid-column: auto; }
  h1 { font-size: 23px; }
}
@media (max-width: 760px) {
  .shell > * { min-width: 0; }
  .side { min-width: 0; max-width: 100vw; }
  .nav { max-width: 100%; grid-auto-columns: max-content; }
  .ws-menu { width: calc(100vw - 24px); }
  .funnel { grid-template-columns: 1fr 1fr; }
  .tabs { max-width: 100%; }
}

/* sign in: Continue with Google, then "or with email" */
.auth-google { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; background: var(--surface, #fff); color: var(--ink, #111); border: 1px solid var(--line, #d0d5dd); text-decoration: none; }
.auth-google:hover { border-color: var(--ink-3, #888); }
.auth-or { display: flex; align-items: center; gap: 10px; margin: 18px 0 -8px; color: var(--muted, #888); font-size: 12px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line, #e3e6ea); }
