/* vantage.css — Vongstaad INSTITUTIONAL — R5B "The Warmth" */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  --bg:           #080705;
  --surface:      #0e0c09;
  --elevated:     #141108;
  --border:       #1e1a12;
  --border-mid:   #2a2418;
  --accent:       #c07828;
  --accent-soft:  #3a2808;
  --accent-hover: #d4893a;
  --text-primary: #eae4d8;
  --text-soft:    #8a8070;
  --text-muted:   #5a5040;
  --text-dim:     #302818;
  --status-on:    #3a9e5f;
  --status-warn:  #c07a20;
  --profit:       #2dcc6f;
  --loss:         #d44040;
  --info:         #3b82f6;
  --font-sans:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;
  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --r:            2px;
  --r-md:         6px;
  --r-input:      22px;
  --shadow:       0 2px 16px rgba(0,0,0,.6);
  --shadow-lg:    0 8px 40px rgba(0,0,0,.8);
  --t:            140ms ease;
}

/* ── Reset ────────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { -webkit-font-smoothing:antialiased; }
body { font-family:var(--font-sans); font-size:13px; line-height:1.55; background:var(--bg); color:var(--text-primary); }
a    { color:inherit; text-decoration:none; }
input,button,select,textarea { font-family:inherit; }
::selection { background:rgba(192,120,40,.25); color:var(--text-primary); }

/* ── Scrollbar ────────────────────────────────────────────────── */
::-webkit-scrollbar       { width:3px; height:3px; }
::-webkit-scrollbar-track { background:var(--bg); }
::-webkit-scrollbar-thumb { background:var(--border-mid); border-radius:2px; }
::-webkit-scrollbar-thumb:hover { background:var(--accent); }
* { scrollbar-width:thin; scrollbar-color:var(--border-mid) var(--bg); }

/* ── App shell ────────────────────────────────────────────────── */
html, body { height:100%; overflow:hidden; }
.app-shell { display:flex; flex-direction:column; height:100vh; }

/* ── Top bar ──────────────────────────────────────────────────── */
.topbar {
  display:flex; align-items:stretch; height:46px;
  background:var(--surface); border-bottom:1px solid var(--border);
  flex-shrink:0; position:relative; z-index:50;
}
.topbar-brand {
  display:flex; flex-direction:column; justify-content:center;
  padding:0 20px; border-right:1px solid var(--border);
  min-width:168px; gap:3px; text-decoration:none;
}
.topbar-wordmark {
  font-family:var(--font-serif); font-weight:700; font-size:20px;
  letter-spacing:.06em; color:var(--text-primary); line-height:1;
}
.topbar-domain {
  font-family:var(--font-sans); font-weight:600; font-size:8px;
  letter-spacing:.22em; color:var(--accent); text-transform:uppercase;
}
.topbar-nav { display:flex; align-items:stretch; border-right:1px solid var(--border); }
.topbar-nav a {
  display:flex; align-items:center; position:relative;
  padding:0 16px; border-right:1px solid var(--border);
  font-size:11px; font-weight:500; color:var(--text-soft);
  transition:color var(--t), background var(--t); white-space:nowrap;
}
.topbar-nav a:hover  { background:rgba(20,17,8,.5); color:var(--text-primary); }
.topbar-nav a.active { background:var(--elevated); color:var(--text-primary); }
.topbar-nav a.active::after {
  content:''; position:absolute; bottom:0; left:0; right:0;
  height:2px; background:var(--accent);
}
.topbar-status {
  flex:1; display:flex; align-items:center; justify-content:flex-end;
  gap:12px; padding:0 18px; position:relative;
}
.topbar-sep { width:1px; height:14px; background:var(--border); }
.topbar-clock { font-family:var(--font-mono); font-size:9px; color:var(--text-muted); }
.tier-badge {
  font-family:var(--font-mono); font-size:9px; letter-spacing:.06em;
  padding:2px 8px; border-radius:var(--r);
  background:var(--accent-soft); color:var(--accent);
}
.bridge-pip { display:inline-block; width:5px; height:5px; border-radius:50%; flex-shrink:0; }
.notif-badge-count {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:14px; height:14px; padding:0 3px; border-radius:7px;
  background:var(--accent); color:var(--bg);
  font-family:var(--font-mono); font-size:8px; font-weight:700;
  margin-left:3px;
}

/* ── Notification bell button ─────────────────────────────────── */
.notif-btn {
  position:relative; display:flex; align-items:center; gap:4px;
  font-family:var(--font-mono); font-size:10px; color:var(--text-soft);
  background:transparent; border:none; cursor:pointer;
  padding:4px 8px; border-radius:var(--r); transition:all var(--t);
}
.notif-btn:hover { color:var(--text-primary); background:var(--elevated); }

/* ── Notification panel ───────────────────────────────────────── */
.notif-panel {
  position:absolute; top:calc(100% + 4px); right:18px;
  width:340px; background:var(--surface); border:1px solid var(--border-mid);
  border-radius:var(--r-md); box-shadow:var(--shadow-lg);
  z-index:200; overflow:hidden;
}
.notif-panel-head {
  padding:10px 14px; border-bottom:1px solid var(--border);
  background:var(--elevated); display:flex; justify-content:space-between; align-items:center;
}
.notif-item {
  padding:10px 14px; border-bottom:1px solid var(--border);
  display:grid; grid-template-columns:8px 1fr auto; gap:10px; align-items:start;
  cursor:pointer; transition:background var(--t);
}
.notif-item:hover { background:rgba(20,17,8,.5); }
.notif-item.unread { background:rgba(192,120,40,.04); }
.notif-item:last-child { border-bottom:none; }
.notif-empty { padding:24px 14px; text-align:center; font-family:var(--font-mono); font-size:10px; color:var(--text-dim); }

/* ── Grace banner ─────────────────────────────────────────────── */
.grace-banner {
  background:var(--accent-soft); border-bottom:1px solid rgba(192,120,40,.25);
  padding:6px 20px; display:flex; align-items:center; gap:10px;
  font-family:var(--font-mono); font-size:9px; letter-spacing:.1em;
  text-transform:uppercase; color:var(--accent); cursor:pointer; flex-shrink:0;
  transition:background var(--t);
}
.grace-banner:hover { background:rgba(58,40,8,.8); }

/* ── App content ──────────────────────────────────────────────── */
.app-content { flex:1; display:flex; overflow:hidden; }

/* ── Sidebar ──────────────────────────────────────────────────── */
.sidebar {
  width:220px; border-right:1px solid var(--border);
  background:var(--surface); display:flex; flex-direction:column; flex-shrink:0;
}
.sidebar-head, .rail-head {
  padding:10px 14px 8px; border-bottom:1px solid var(--border);
}
.sidebar-item {
  padding:10px 14px; border-bottom:1px solid var(--border);
  cursor:pointer; border-left:3px solid transparent;
  transition:background var(--t);
}
.sidebar-item.active { background:var(--elevated); border-left-color:var(--accent); }
.sidebar-item:hover:not(.active) { background:rgba(20,17,8,.4); }
.sidebar-disc-meta { display:flex; align-items:center; gap:6px; margin-top:3px; }
.disc-type-badge {
  font-family:var(--font-mono); font-size:7px; font-weight:700;
  letter-spacing:.12em; text-transform:uppercase; padding:1px 5px;
  border-radius:var(--r); border:1px solid;
}
.disc-type-badge.natural  { color:var(--info); border-color:rgba(59,130,246,.3); background:rgba(59,130,246,.06); }
.disc-type-badge.account  { color:var(--profit); border-color:rgba(45,204,111,.3); background:rgba(45,204,111,.06); }
.sidebar-add { padding:10px 14px; font-size:10px; cursor:pointer; color:var(--accent); font-family:var(--font-mono); letter-spacing:.04em; }
.sidebar-add:hover { text-decoration:underline; }

/* ── Discussion type toggle ───────────────────────────────────── */
.disc-toggle {
  display:flex; background:var(--elevated); border:1px solid var(--border-mid);
  border-radius:var(--r); overflow:hidden;
}
.disc-toggle-btn {
  flex:1; padding:5px 14px; font-family:var(--font-mono); font-size:9px;
  font-weight:600; letter-spacing:.1em; text-transform:uppercase; cursor:pointer;
  background:transparent; border:none; color:var(--text-muted);
  transition:all var(--t); white-space:nowrap;
}
.disc-toggle-btn.active-natural { background:rgba(59,130,246,.12); color:var(--info); }
.disc-toggle-btn.active-account { background:rgba(45,204,111,.12); color:var(--profit); }

/* ── Chat thread ──────────────────────────────────────────────── */
.chat-main  { flex:1; display:flex; flex-direction:column; overflow:hidden; }
.chat-header {
  padding:0 18px; height:40px; border-bottom:1px solid var(--border);
  background:var(--surface); display:flex; align-items:center; gap:12px; flex-shrink:0;
}
.chat-messages { flex:1; overflow-y:auto; padding:18px 20px; display:flex; flex-direction:column; gap:14px; }
.msg-row { display:grid; grid-template-columns:44px 1fr; gap:0 10px; }
.msg-role { text-align:right; padding-top:2px; font-family:var(--font-mono); font-size:9px; }
.msg-role.desk   { color:var(--accent); }
.msg-role.user   { color:var(--text-muted); }
.msg-role.system { color:var(--loss); }
.msg-body p { font-size:13px; line-height:1.65; margin:0 0 3px; }
.msg-body.system p { color:var(--loss); }
.msg-ts { font-family:var(--font-mono); font-size:8px; color:var(--text-dim); }
.wire {
  font-family:var(--font-mono); font-size:8.5px; letter-spacing:.1em;
  text-transform:uppercase; color:var(--text-dim); text-align:center;
  padding:4px 0; border-top:1px solid var(--border); border-bottom:1px solid var(--border);
  margin:2px 0;
}
.rate-banner {
  padding:8px 20px; background:rgba(212,64,64,.06);
  border-top:1px solid rgba(212,64,64,.12);
  font-family:var(--font-mono); font-size:11px; color:var(--loss); flex-shrink:0;
}
.input-bar {
  border-top:1px solid var(--border); padding:10px 20px;
  background:var(--surface); display:flex; align-items:center; gap:10px; flex-shrink:0;
}
.input-slash { font-family:var(--font-mono); font-size:11px; color:var(--text-dim); flex-shrink:0; }
.input-pill {
  flex:1; display:flex; align-items:center;
  background:var(--elevated); border:1px solid var(--border-mid);
  border-radius:var(--r-input); padding:10px 18px;
  transition:border-color var(--t);
}
.input-pill:focus-within { border-color:var(--accent); }
.input-pill input { flex:1; background:transparent; border:none; outline:none; font-size:13px; color:var(--text-primary); }
.input-pill input::placeholder { color:var(--text-dim); }
.send-btn {
  width:30px; height:30px; border-radius:50%; border:none;
  background:var(--accent); color:var(--bg); cursor:pointer;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
  transition:opacity var(--t), transform var(--t);
}
.send-btn:hover:not(:disabled) { opacity:.85; transform:scale(1.05); }
.send-btn:disabled { opacity:.3; cursor:not-allowed; }

/* ── Right rail ───────────────────────────────────────────────── */
.rail {
  width:248px; border-left:1px solid var(--border);
  background:var(--surface); display:flex; flex-direction:column; flex-shrink:0; overflow-y:auto;
}
.rail-section { padding:12px 14px; border-bottom:1px solid var(--border); }
.pos-row  { padding:8px 14px; border-bottom:1px solid var(--border); }

/* ── X402 Signals panel ───────────────────────────────────────── */
.signals-head {
  padding:8px 14px; border-bottom:1px solid var(--border);
  display:flex; justify-content:space-between; align-items:center; cursor:pointer;
  transition:background var(--t);
}
.signals-head:hover { background:rgba(20,17,8,.4); }
.signals-chevron { font-family:var(--font-mono); font-size:9px; color:var(--text-muted); transition:transform var(--t); }
.signals-chevron.open { transform:rotate(180deg); }
.signal-row { padding:7px 14px; border-bottom:1px solid var(--border); display:flex; flex-direction:column; gap:2px; }
.signal-row:last-child { border-bottom:none; }
.signal-dir {
  font-family:var(--font-mono); font-size:8px; font-weight:700;
  letter-spacing:.1em; text-transform:uppercase; padding:1px 5px;
  border-radius:var(--r);
}
.signal-dir.bullish { background:rgba(45,204,111,.12); color:var(--profit); }
.signal-dir.bearish { background:rgba(212,64,64,.12); color:var(--loss); }
.signal-dir.neutral { background:rgba(90,80,64,.15); color:var(--text-muted); }

/* ── Page content (non-chat pages) ───────────────────────────── */
.page { flex:1; overflow-y:auto; }
.page-inner { padding:28px; max-width:1100px; margin:0 auto; }
.page-header { display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:28px; }
.page-title  { font-size:20px; font-weight:600; color:var(--text-primary); letter-spacing:-.02em; }
.page-sub    { font-family:var(--font-mono); font-size:10px; color:var(--text-muted); margin-top:3px; }

/* ── Cards ────────────────────────────────────────────────────── */
.card { background:var(--surface); border:1px solid var(--border); border-radius:var(--r); overflow:hidden; }
.card-head {
  padding:10px 16px; border-bottom:1px solid var(--border);
  background:var(--elevated); display:flex; justify-content:space-between; align-items:center;
}
.card-body { padding:16px; }

/* ── Grid ─────────────────────────────────────────────────────── */
.g2 { display:grid; grid-template-columns:1fr 1fr;        gap:16px; }
.g3 { display:grid; grid-template-columns:1fr 1fr 1fr;    gap:16px; }
.g4 { display:grid; grid-template-columns:repeat(4,1fr);  gap:16px; }

/* ── Stat cell ────────────────────────────────────────────────── */
.stat { background:var(--surface); border:1px solid var(--border); border-radius:var(--r); padding:12px 16px; }
.stat-label { font-family:var(--font-mono); font-size:8px; letter-spacing:.12em; text-transform:uppercase; color:var(--text-muted); margin-bottom:6px; }
.stat-value { font-family:var(--font-mono); font-size:16px; color:var(--text-primary); }

/* ── Table ────────────────────────────────────────────────────── */
.tbl { width:100%; border-collapse:collapse; }
.tbl-head th { padding:7px 16px; font-family:var(--font-mono); font-size:7.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--text-muted); text-align:left; border-bottom:1px solid var(--border); }
.tbl-body td { padding:9px 16px; font-family:var(--font-mono); font-size:10px; border-bottom:1px solid var(--border); vertical-align:middle; }
.tbl-body tr:nth-child(even) td { background:rgba(20,17,8,.4); }
.tbl-body tr:last-child td { border-bottom:none; }
.tbl-foot td { padding:9px 16px; background:var(--elevated); font-family:var(--font-mono); font-size:10px; }

/* ── Forms ────────────────────────────────────────────────────── */
.field { display:flex; flex-direction:column; gap:6px; }
.field label { font-family:var(--font-mono); font-size:9px; text-transform:uppercase; letter-spacing:.1em; color:var(--text-muted); }
.field input, .field textarea, .field select {
  background:var(--elevated); border:1px solid var(--border-mid); border-radius:var(--r);
  color:var(--text-primary); font-family:var(--font-mono); font-size:12px;
  padding:9px 12px; outline:none; transition:border-color var(--t), box-shadow var(--t); width:100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color:var(--accent); box-shadow:0 0 0 2px rgba(192,120,40,.1);
}
.field input::placeholder { color:var(--text-dim); }
.field input[type=password] { letter-spacing:.12em; }
.field select option { background:var(--elevated); }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  font-family:var(--font-mono); font-size:10px; font-weight:500; letter-spacing:.06em;
  padding:8px 18px; border-radius:var(--r); cursor:pointer;
  border:1px solid var(--border-mid); background:var(--elevated); color:var(--text-soft);
  transition:all var(--t); white-space:nowrap; display:inline-flex; align-items:center; gap:6px;
}
.btn:hover    { border-color:var(--text-muted); color:var(--text-primary); }
.btn:disabled { opacity:.3; cursor:not-allowed; }
.btn-primary  { background:var(--accent); color:var(--bg); border-color:var(--accent); font-weight:700; }
.btn-primary:hover:not(:disabled) { background:var(--accent-hover); border-color:var(--accent-hover); }
.btn-danger   { background:rgba(212,64,64,.08); color:var(--loss); border-color:rgba(212,64,64,.25); }
.btn-danger:hover:not(:disabled) { background:rgba(212,64,64,.18); }
.btn-sm       { font-size:9px; padding:4px 10px; }
.btn-lg       { font-size:12px; padding:12px 28px; }
.btn-ghost    { background:transparent; border-color:transparent; }
.btn-ghost:hover { background:var(--elevated); border-color:var(--border-mid); }

/* ── Labels / caps ────────────────────────────────────────────── */
.cap {
  font-family:var(--font-mono); font-size:8px; font-weight:700;
  letter-spacing:.16em; text-transform:uppercase; color:var(--text-muted);
}
.pip { display:inline-block; width:5px; height:5px; border-radius:50%; flex-shrink:0; }

/* ── Badges ───────────────────────────────────────────────────── */
.badge-on     { color:var(--status-on); }
.badge-warn   { color:var(--status-warn); }
.badge-loss   { color:var(--loss); }
.badge-profit { color:var(--profit); }
.badge-buy    { color:var(--accent);  font-weight:700; letter-spacing:.06em; }
.badge-sell   { color:var(--loss);    font-weight:700; letter-spacing:.06em; }

/* ── Progress bar ─────────────────────────────────────────────── */
.progress-wrap { height:3px; background:var(--border); border-radius:2px; overflow:hidden; margin-top:6px; }
.progress-fill { height:100%; border-radius:2px; transition:width 600ms ease; }

/* ── Alerts ───────────────────────────────────────────────────── */
.alert      { padding:10px 16px; border-radius:var(--r); border:1px solid; font-family:var(--font-mono); font-size:11px; line-height:1.55; }
.alert-warn { background:var(--accent-soft);           border-color:rgba(192,120,40,.25); color:var(--accent); }
.alert-loss { background:rgba(212,64,64,.06);           border-color:rgba(212,64,64,.2);  color:var(--loss); }
.alert-on   { background:rgba(58,158,95,.06);           border-color:rgba(58,158,95,.2);  color:var(--status-on); }
.alert-info { background:rgba(59,130,246,.06);          border-color:rgba(59,130,246,.2); color:var(--info); }

/* ── Step progress ────────────────────────────────────────────── */
.step-bar { display:flex; gap:6px; }
.step-seg { height:3px; width:28px; border-radius:1px; background:var(--border); transition:background var(--t); }
.step-seg.done { background:var(--accent); }

/* ── Onboarding / centered pages ──────────────────────────────── */
.center-page { flex:1; display:flex; align-items:center; justify-content:center; padding:40px 20px; overflow-y:auto; }
.form-card   { width:100%; max-width:500px; background:var(--surface); border:1px solid var(--border); border-radius:var(--r); padding:36px; }

/* ── Settings tabs ────────────────────────────────────────────── */
.stab-bar { display:flex; border-bottom:1px solid var(--border); margin-bottom:24px; overflow-x:auto; }
.stab     { padding:10px 18px; font-size:11px; font-weight:500; color:var(--text-muted); border-bottom:2px solid transparent; cursor:pointer; transition:all var(--t); background:transparent; border-top:none; border-left:none; border-right:none; white-space:nowrap; }
.stab:hover   { color:var(--text-primary); }
.stab.active  { color:var(--text-primary); border-bottom-color:var(--accent); }

/* ── Grace page ───────────────────────────────────────────────── */
.grace-card  { position:relative; overflow:hidden; }
.grace-top   { position:absolute; top:0; left:0; right:0; height:3px; background:var(--status-warn); }
.grace-timer { font-family:var(--font-mono); font-size:52px; font-weight:700; color:var(--text-primary); text-align:center; letter-spacing:.04em; }
.check-row   { display:flex; align-items:center; gap:10px; padding:9px 0; }
.check-dashed{ flex:1; border-bottom:1px dashed var(--border); }

/* ── Toggle checkbox ──────────────────────────────────────────── */
.toggle-row  { display:flex; align-items:flex-start; gap:12px; cursor:pointer; padding:7px 0; }
.toggle-box  { width:16px; height:16px; border:1px solid var(--border-mid); border-radius:var(--r); display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:2px; transition:all var(--t); }
.toggle-box.on { background:var(--accent); border-color:var(--accent); }
.toggle-inner  { width:8px; height:8px; background:var(--bg); border-radius:1px; }

/* ── Pair code display ────────────────────────────────────────── */
.pair-code-display {
  font-family:var(--font-mono); font-size:28px; font-weight:700;
  letter-spacing:.25em; color:var(--accent); text-align:center;
  padding:20px; background:var(--elevated); border-radius:var(--r);
  border:1px solid var(--border-mid); margin-bottom:14px;
}

/* ── BUY/SELL direction toggle ────────────────────────────────── */
.dir-toggle { display:flex; gap:8px; }
.dir-btn { flex:1; padding:9px; font-family:var(--font-mono); font-size:11px; font-weight:700; border-radius:var(--r); cursor:pointer; transition:all var(--t); border:1px solid var(--border); background:var(--elevated); color:var(--text-muted); }
.dir-btn.active-buy  { background:rgba(192,120,40,.12); color:var(--accent);  border-color:rgba(192,120,40,.4); }
.dir-btn.active-sell { background:rgba(212,64,64,.12);  color:var(--loss);    border-color:rgba(212,64,64,.4); }

/* ── Score / large mono ───────────────────────────────────────── */
.score-big   { font-family:var(--font-mono); font-size:48px; font-weight:500; line-height:1; color:var(--text-primary); }
.big-balance { font-family:var(--font-mono); font-size:20px; color:var(--text-primary); }

/* ── Token row ────────────────────────────────────────────────── */
.token-row { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; background:var(--elevated); border:1px solid var(--border-mid); border-radius:var(--r); }

/* ── Doctrine pillars ─────────────────────────────────────────── */
.pillars-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:20px; }
.pillar-card {
  background:var(--surface); border:1px solid var(--border); border-radius:var(--r);
  overflow:hidden; cursor:pointer; transition:border-color var(--t);
}
.pillar-card:hover { border-color:var(--border-mid); }
.pillar-card.pillar-open { border-color:var(--accent-soft); }
.pillar-head {
  padding:10px 14px; background:var(--elevated);
  display:flex; justify-content:space-between; align-items:center;
}
.pillar-num { font-family:var(--font-mono); font-size:8px; color:var(--accent); letter-spacing:.1em; }
.pillar-title { font-size:12px; font-weight:500; color:var(--text-primary); margin-top:2px; }
.pillar-body { padding:12px 14px; }

/* ── Library modal ────────────────────────────────────────────── */
.modal-overlay {
  position:fixed; inset:0; background:rgba(8,7,5,.85);
  display:flex; align-items:center; justify-content:center;
  z-index:300; backdrop-filter:blur(4px);
}
.modal-box {
  width:100%; max-width:620px; max-height:80vh;
  background:var(--surface); border:1px solid var(--border-mid);
  border-radius:var(--r-md); box-shadow:var(--shadow-lg);
  display:flex; flex-direction:column; overflow:hidden;
}
.modal-head {
  padding:16px 20px; border-bottom:1px solid var(--border);
  background:var(--elevated); display:flex; justify-content:space-between; align-items:center;
  flex-shrink:0;
}
.modal-body { flex:1; overflow-y:auto; padding:16px 20px; }
.library-item {
  padding:14px; border:1px solid var(--border); border-radius:var(--r);
  margin-bottom:10px; cursor:pointer; transition:border-color var(--t), background var(--t);
}
.library-item:hover { border-color:var(--border-mid); background:var(--elevated); }

/* ── API Key section ──────────────────────────────────────────── */
.api-key-row {
  display:flex; align-items:center; gap:8px; padding:7px 0;
  border-bottom:1px solid var(--border);
}
.api-key-row:last-child { border-bottom:none; }
.api-key-mask {
  flex:1; font-family:var(--font-mono); font-size:11px; color:var(--text-soft);
  background:var(--elevated); border:1px solid var(--border); border-radius:var(--r);
  padding:6px 10px;
}
.key-count-bar { display:flex; align-items:center; gap:6px; margin-bottom:10px; }
.key-count-pip { width:7px; height:7px; border-radius:1px; background:var(--border); transition:background var(--t); }
.key-count-pip.filled { background:var(--accent); }

/* ── Budget / cost cards ──────────────────────────────────────── */
.cost-bar { height:6px; background:var(--border); border-radius:3px; overflow:hidden; margin-top:6px; }
.cost-fill { height:100%; border-radius:3px; background:var(--accent); transition:width 400ms ease; }
.provider-row { display:flex; align-items:center; gap:12px; padding:8px 0; border-bottom:1px solid var(--border); }
.provider-row:last-child { border-bottom:none; }

/* ── Mobile warning ───────────────────────────────────────────── */
.mobile-warning {
  display:none; position:fixed; inset:0; background:var(--bg);
  z-index:999; flex-direction:column; align-items:center; justify-content:center;
  padding:40px; text-align:center;
}
@media (max-width:1023px) {
  .app-shell .mobile-warning { display:flex; }
  .app-shell .topbar, .app-shell .app-content { display:none; }
}

/* ── Public navbar ────────────────────────────────────────────── */
.pub-bar {
  position:fixed; top:0; left:0; right:0; z-index:100;
  height:48px; display:flex; align-items:center; justify-content:space-between;
  padding:0 32px; background:rgba(8,7,5,.92); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
}
.pub-brand { display:flex; flex-direction:column; justify-content:center; gap:3px; }
.pub-wordmark { font-family:var(--font-serif); font-weight:700; font-size:20px; letter-spacing:.06em; color:var(--text-primary); line-height:1; }
.pub-domain   { font-family:var(--font-sans); font-weight:600; font-size:8px; letter-spacing:.22em; color:var(--accent); text-transform:uppercase; }
.pub-nav { display:flex; align-items:center; gap:0; }
.pub-nav a {
  font-family:var(--font-mono); font-size:10px; letter-spacing:.08em;
  text-transform:uppercase; color:var(--text-muted); padding:0 18px; height:48px;
  display:flex; align-items:center; border-left:1px solid var(--border);
  transition:color var(--t), background var(--t);
}
.pub-nav a:hover { color:var(--text-primary); background:rgba(20,17,8,.5); }
.pub-nav a.cta   { color:var(--accent); }
.pub-nav a.cta:hover { color:var(--accent-hover); }

/* ── Marketing / Landing page ─────────────────────────────────── */
.landing-page { min-height:100vh; background:var(--bg); overflow-y:auto; }

.hero {
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  padding:100px 32px 60px; text-align:center; position:relative; overflow:hidden;
}
.hero::before {
  content:''; position:absolute; inset:0;
  background:radial-gradient(ellipse 60% 50% at 50% 40%, rgba(192,120,40,.06) 0%, transparent 70%);
  pointer-events:none;
}
.hero-inner { position:relative; max-width:800px; margin:0 auto; }
.hero-rule { width:40px; height:1px; background:var(--accent); margin:0 auto 32px; }
.hero-wordmark {
  font-family:var(--font-serif); font-weight:700; font-size:clamp(56px, 8vw, 96px);
  letter-spacing:.06em; color:var(--text-primary); line-height:.9; margin-bottom:10px;
}
.hero-domain {
  font-family:var(--font-sans); font-weight:600; font-size:clamp(10px,1.2vw,14px);
  letter-spacing:.35em; color:var(--accent); text-transform:uppercase; margin-bottom:36px;
}
.hero-tagline {
  font-family:var(--font-serif); font-style:italic;
  font-size:clamp(20px,2.5vw,28px); color:var(--text-soft);
  line-height:1.4; margin-bottom:48px;
}
.hero-ctas { display:flex; gap:16px; justify-content:center; flex-wrap:wrap; }
.hero-scroll {
  position:absolute; bottom:32px; left:50%; transform:translateX(-50%);
  font-family:var(--font-mono); font-size:9px; letter-spacing:.12em;
  text-transform:uppercase; color:var(--text-dim); display:flex; flex-direction:column; align-items:center; gap:8px;
}
.hero-scroll-line { width:1px; height:32px; background:var(--border); }

.section { padding:80px 32px; }
.section-inner { max-width:1080px; margin:0 auto; }
.section-label { font-family:var(--font-mono); font-size:9px; letter-spacing:.2em; text-transform:uppercase; color:var(--accent); margin-bottom:16px; }
.section-title { font-family:var(--font-serif); font-size:clamp(28px,3.5vw,42px); font-weight:700; color:var(--text-primary); line-height:1.15; margin-bottom:20px; }
.section-divider { width:100%; height:1px; background:var(--border); }

.feat-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:2px; margin-top:40px; }
.feat-col {
  padding:32px 28px; background:var(--surface); border:1px solid var(--border);
  position:relative; transition:border-color var(--t);
}
.feat-col:first-child { border-radius:var(--r) 0 0 var(--r); }
.feat-col:last-child  { border-radius:0 var(--r) var(--r) 0; }
.feat-col:hover { border-color:var(--border-mid); }
.feat-icon { width:32px; height:32px; border:1px solid var(--border-mid); border-radius:var(--r); display:flex; align-items:center; justify-content:center; margin-bottom:20px; background:var(--elevated); }
.feat-title { font-size:15px; font-weight:600; color:var(--text-primary); margin-bottom:10px; }
.feat-body  { font-size:13px; color:var(--text-soft); line-height:1.7; }

.tier-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-top:40px; }
.tier-col {
  padding:24px 20px; background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r);
}
.tier-col.highlighted { border-color:var(--accent-soft); background:rgba(192,120,40,.03); }
.tier-badge-lg { font-family:var(--font-mono); font-size:10px; font-weight:700; letter-spacing:.1em; color:var(--accent); margin-bottom:8px; }
.tier-name { font-size:16px; font-weight:600; color:var(--text-primary); margin-bottom:12px; }
.tier-feat { font-family:var(--font-mono); font-size:10px; color:var(--text-soft); padding:5px 0; border-bottom:1px solid var(--border); }
.tier-feat:last-child { border-bottom:none; }
.tier-feat.tick::before { content:'· '; color:var(--accent); }

.cta-section {
  padding:100px 32px; text-align:center;
  border-top:1px solid var(--border);
  background:linear-gradient(180deg, transparent 0%, rgba(192,120,40,.03) 100%);
}
.landing-footer {
  border-top:1px solid var(--border); padding:24px 32px;
  display:flex; justify-content:space-between; align-items:center;
}
.footer-brand { display:flex; align-items:baseline; gap:8px; }
.footer-copy { font-family:var(--font-mono); font-size:9px; color:var(--text-dim); }

/* ── Toast notifications ──────────────────────────────────────── */
.vg-toast {
  position:fixed; bottom:24px; right:24px; z-index:1000;
  padding:12px 18px; border-radius:var(--r-md); border:1px solid;
  font-family:var(--font-mono); font-size:11px; max-width:320px;
  box-shadow:var(--shadow-lg); opacity:0; transform:translateY(8px);
  transition:opacity 200ms ease, transform 200ms ease;
}
.vg-toast-in    { opacity:1; transform:translateY(0); }
.vg-toast-info  { background:var(--surface); border-color:var(--border-mid); color:var(--text-primary); }
.vg-toast-error { background:rgba(212,64,64,.08); border-color:rgba(212,64,64,.3); color:var(--loss); }
.vg-toast-ok    { background:rgba(58,158,95,.08); border-color:rgba(58,158,95,.3); color:var(--status-on); }

/* ── Proposal card ────────────────────────────────────────────── */
.proposal-card { margin-top:10px; max-width:360px; }
.proposal-grid { display:grid; grid-template-columns:1fr 1fr 1fr 1fr; gap:8px; margin-bottom:12px; }
.proposal-field-label { font-family:var(--font-mono); font-size:8px; letter-spacing:.08em; text-transform:uppercase; color:var(--text-muted); margin-bottom:3px; }
.proposal-field-val   { font-family:var(--font-mono); font-size:12px; color:var(--text-primary); }

/* ── Session summary strip ────────────────────────────────────── */
.session-strip {
  background:var(--elevated); border-bottom:1px solid var(--border);
  padding:6px 20px; display:flex; gap:24px; align-items:center; flex-shrink:0;
  overflow-x:auto;
}
.session-field { display:flex; flex-direction:column; gap:2px; white-space:nowrap; }
.session-label { font-family:var(--font-mono); font-size:7.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--text-dim); }
.session-value { font-family:var(--font-mono); font-size:11px; color:var(--text-primary); }
.session-sep   { width:1px; height:28px; background:var(--border); flex-shrink:0; }

/* ── Doctrine health indicator ────────────────────────────────── */
.health-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }

[x-cloak] { display:none !important; }
