/* ============================================================
   Nora — AI Chief of Staff · proposal deck
   Obsidian design system (Said). Dark glassmorphism, periwinkle accent.
   Tokens mirror the reference shared.css; demo components added below.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:              #0a0a0b;
  --surface-1:       hsl(240 5% 5%);
  --surface-2:       hsl(240 5% 7.5%);
  --surface-3:       hsl(240 5% 10%);
  --surface-4:       hsl(240 5% 14%);
  --surface-hover:   hsl(240 5% 12%);
  --border:          hsl(0 0% 100% / 0.06);
  --border-strong:   hsl(0 0% 100% / 0.10);
  --fg:              hsl(0 0% 93%);
  --fg-muted:        hsl(0 0% 55%);
  --fg-dim:          hsl(0 0% 38%);
  --primary:         hsl(226 80% 78%);
  --primary-dim:     hsl(226 60% 55%);
  --primary-bg:      hsl(226 80% 78% / 0.10);
  --green:           hsl(140 65% 55%);
  --green-bg:        hsl(140 65% 50% / 0.12);
  --amber:           hsl(38 92% 60%);
  --amber-bg:        hsl(38 92% 50% / 0.12);
  --red:             hsl(0 72% 60%);
  --red-bg:          hsl(0 72% 50% / 0.12);
  --radius:          10px;
  --radius-lg:       14px;
  --radius-xl:       18px;
  --font:            -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', sans-serif;
  --mono:            'JetBrains Mono', 'SF Mono', 'Fira Code', ui-monospace, monospace;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--fg); line-height: 1.55; letter-spacing: -0.005em; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
code, .mono { font-family: var(--mono); }
::selection { background: hsl(226 80% 78% / 0.28); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: hsl(240 5% 18%); border-radius: 999px; border: 2px solid var(--bg); }

/* ── Top nav ─────────────────────────────────────────────── */
.topnav { position: sticky; top: 0; z-index: 100; background: hsl(240 5% 5% / 0.82); backdrop-filter: blur(24px) saturate(180%); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; height: 54px; }
.nav-brand { display: flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 600; color: var(--fg); }
.nav-brand .wm { color: var(--primary); display: flex; }
.nav-brand .tag { font-size: 11px; color: var(--fg-dim); font-weight: 500; }
.nav-links { display: flex; gap: 2px; flex-wrap: wrap; }
.nav-links a { font-size: 12.5px; font-weight: 500; padding: 6px 11px; border-radius: 7px; color: var(--fg-muted); transition: all 0.15s; display: inline-flex; align-items: center; gap: 6px; }
.nav-links a:hover { color: var(--fg); background: hsl(0 0% 100% / 0.04); }
.nav-links a.active { color: var(--fg); background: hsl(0 0% 100% / 0.07); }
.nav-links a .ndot { width: 6px; height: 6px; border-radius: 50%; }
.ndot.green { background: var(--green); } .ndot.amber { background: var(--amber); } .ndot.primary { background: var(--primary); }
.nav-links a.live { color: var(--primary); }
.nav-links a.cmp { color: var(--fg-muted); border: 1px solid var(--border); margin-right: 6px; }
.nav-links a.cmp:hover { color: var(--fg); border-color: var(--border-strong); }

/* ── Page ────────────────────────────────────────────────── */
.page { max-width: 1100px; margin: 0 auto; padding: 40px 32px 90px; }
.page-wide { max-width: 1200px; }

/* ── Hero ────────────────────────────────────────────────── */
.hero { text-align: center; padding: 64px 0 52px; position: relative; }
.hero::before { content: ''; position: absolute; top: -10%; left: 50%; transform: translateX(-50%); width: 680px; height: 680px; max-width: 100%; background: radial-gradient(circle, hsl(226 80% 78% / 0.09) 0%, transparent 65%); pointer-events: none; z-index: -1; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--primary); background: var(--primary-bg); padding: 5px 14px; border-radius: 20px; margin-bottom: 24px; }
.hero-title { font-size: 50px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.08; color: var(--fg); margin-bottom: 20px; }
.hero-title .accent { color: var(--primary); }
.hero-sub { font-size: 16.5px; line-height: 1.65; color: var(--fg-muted); max-width: 640px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 11px 22px; border-radius: 9px; color: #0b0b14; background: var(--primary); transition: all 0.15s; }
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 6px 26px -8px hsl(226 80% 78% / 0.6); transform: translateY(-1px); }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; padding: 11px 22px; border-radius: 9px; color: var(--fg-muted); border: 1px solid var(--border-strong); transition: all 0.15s; }
.btn-ghost:hover { color: var(--fg); border-color: hsl(0 0% 100% / 0.18); background: hsl(0 0% 100% / 0.03); }

/* ── Page header (interior pages) ────────────────────────── */
.phead { padding: 24px 0 32px; }
.phead .eyebrow { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--primary); margin-bottom: 14px; }
.phead h1 { font-size: 36px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.12; margin-bottom: 16px; }
.phead h1 .accent { color: var(--primary); }
.phead .lede { font-size: 16px; color: var(--fg-muted); max-width: 76ch; line-height: 1.6; }

/* ── Section ─────────────────────────────────────────────── */
.section { margin-bottom: 60px; }
.section-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--fg-muted); margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.section-label .ln { flex: 1; height: 1px; background: var(--border); }
.section-sub { font-size: 14.5px; color: var(--fg-muted); margin: -8px 0 20px; max-width: 76ch; }

/* ── Cards & grid ────────────────────────────────────────── */
.card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px 22px; transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.card.hover:hover { border-color: var(--border-strong); background: var(--surface-3); transform: translateY(-2px); }
.card-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-bg); color: var(--primary); display: grid; place-items: center; margin-bottom: 16px; }
.card-icon svg { width: 21px; height: 21px; }
.card h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: var(--fg); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card p { font-size: 13px; color: var(--fg-muted); line-height: 1.6; }
.card p + p { margin-top: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 860px){ .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .hero-title { font-size: 34px; } .nav-links { display: none; } }

/* ── Pipeline ────────────────────────────────────────────── */
.pipeline { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.pipe-step { flex: 1; min-width: 150px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 18px; }
.pipe-step.accent { border-color: var(--primary-dim); background: hsl(226 80% 78% / 0.05); }
.pipe-num { width: 26px; height: 26px; border-radius: 8px; background: var(--primary-bg); color: var(--primary); font-size: 12px; font-weight: 700; display: grid; place-items: center; margin-bottom: 14px; }
.pipe-step h4 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.pipe-step p { font-size: 12.5px; color: var(--fg-muted); line-height: 1.55; }
.pipe-arrow { display: flex; align-items: center; padding: 36px 6px 0; color: var(--fg-dim); }
@media (max-width: 860px){ .pipe-arrow { transform: rotate(90deg); padding: 6px 0; align-self: center; } }

/* ── Stats ───────────────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 860px){ .stats-row { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.stat-value { font-size: 30px; font-weight: 600; color: var(--fg); letter-spacing: -0.025em; }
.stat-value.accent { color: var(--primary); }
.stat-value .unit { font-size: 14px; color: var(--fg-muted); font-weight: 500; margin-left: 3px; }
.stat-label { font-size: 11.5px; color: var(--fg-dim); margin-top: 5px; }

/* ── Table ───────────────────────────────────────────────── */
.table-wrap { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.table-head { padding: 14px 20px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--fg-muted); font-family: var(--mono); }
table { width: 100%; border-collapse: collapse; }
th { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-dim); text-align: left; padding: 11px 18px; border-bottom: 1px solid var(--border); }
td { font-size: 13px; color: var(--fg-muted); padding: 12px 18px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: hsl(0 0% 100% / 0.02); }
td:first-child { color: var(--fg); font-weight: 500; }
td b, td strong { color: var(--fg); font-weight: 600; }
td code, .prose code, .callout code, .card code { background: hsl(226 60% 70% / 0.12); color: var(--primary); padding: 1.5px 6px; border-radius: 5px; font-size: 12px; font-family: var(--mono); }
.yes { color: var(--green); font-weight: 600; } .partial { color: var(--amber); font-weight: 600; } .no { color: var(--red); font-weight: 600; }

/* ── Pills ───────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; padding: 3px 10px; border-radius: 6px; white-space: nowrap; }
.pill .pd { width: 6px; height: 6px; border-radius: 50%; }
.pill-green { color: var(--green); background: var(--green-bg); } .pill-green .pd { background: var(--green); }
.pill-amber { color: var(--amber); background: var(--amber-bg); } .pill-amber .pd { background: var(--amber); }
.pill-red   { color: var(--red);   background: var(--red-bg); }   .pill-red .pd { background: var(--red); }
.pill-blue  { color: var(--primary); background: var(--primary-bg); } .pill-blue .pd { background: var(--primary); }
.pill-live  { color: var(--green); background: var(--green-bg); } .pill-live .pd { background: var(--green); animation: pulse-dot 1.5s infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:0.35} }

/* ── Callout ─────────────────────────────────────────────── */
.callout { border-left: 3px solid var(--border-strong); background: var(--surface-2); border-radius: 0 var(--radius) var(--radius) 0; padding: 15px 18px; margin-bottom: 16px; font-size: 13.5px; color: var(--fg-muted); line-height: 1.6; }
.callout.primary { border-left-color: var(--primary); background: hsl(226 80% 78% / 0.05); }
.callout.primary b { color: var(--primary); }
.callout.amber { border-left-color: var(--amber); } .callout.amber b { color: var(--amber); }
.callout.red { border-left-color: var(--red); } .callout.red b { color: var(--red); }
.callout b { color: var(--fg); }

/* ── Prose ───────────────────────────────────────────────── */
.prose { font-size: 14px; color: var(--fg-muted); }
.prose p { margin-bottom: 10px; } .prose strong { color: var(--fg); font-weight: 600; }
.prose ul { margin: 8px 0; padding-left: 4px; }
.prose li { margin: 7px 0; padding-left: 20px; position: relative; line-height: 1.55; }
.prose li::before { content: ''; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); opacity: 0.7; }

/* ── Architecture diagram ────────────────────────────────── */
.arch-canvas { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px 32px; overflow-x: auto; }
.arch-row { display: flex; align-items: center; justify-content: center; gap: 0; }
.arch-box { background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 14px 18px; min-width: 160px; text-align: center; }
.arch-box.highlight { border-color: var(--primary-dim); background: var(--primary-bg); }
.arch-box.green { border-color: hsl(140 65% 50% / 0.4); background: var(--green-bg); }
.arch-box h5 { font-size: 12.5px; font-weight: 600; margin-bottom: 3px; }
.arch-box h5.accent { color: var(--primary); }
.arch-box p { font-size: 10.5px; color: var(--fg-dim); }
.arch-arrow { color: var(--fg-dim); padding: 0 14px; display: flex; align-items: center; }
.arch-down { color: var(--fg-dim); display: flex; flex-direction: column; align-items: center; padding: 7px 0; font-size: 18px; }
.arch-down .l { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg-dim); margin-bottom: 2px; }
.arch-fan { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.arch-fan .arch-box { min-width: 140px; }

/* ── Phases timeline ─────────────────────────────────────── */
.phases { display: flex; flex-direction: column; }
.phase { display: grid; grid-template-columns: 40px 1fr; gap: 16px; position: relative; padding-bottom: 22px; }
.phase:not(:last-child)::before { content: ''; position: absolute; left: 19px; top: 30px; bottom: 0; width: 2px; background: var(--border); }
.phase .pm { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; z-index: 1; background: var(--surface-4); border: 1px solid var(--border-strong); color: var(--fg-muted); }
.phase.done .pm { background: var(--green); border-color: var(--green); color: #08120c; }
.phase.active .pm { background: var(--primary-bg); border-color: var(--primary); color: var(--primary); }
.phase .pt { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 8px; }
.phase .pdesc { font-size: 13.5px; color: var(--fg-muted); margin-top: 5px; line-height: 1.55; }

/* ── Code block ──────────────────────────────────────────── */
.code { background: hsl(240 8% 3.5%); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.code-head .lang { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-dim); }
.code-head .fname { font-size: 11px; color: var(--fg-muted); font-family: var(--mono); }
.code pre { margin: 0; padding: 15px; overflow-x: auto; font-size: 12px; line-height: 1.7; color: hsl(220 14% 80%); font-family: var(--mono); }
.code .k { color: hsl(226 70% 78%); } .code .s { color: hsl(140 45% 65%); } .code .c { color: var(--fg-dim); font-style: italic; } .code .ty { color: hsl(38 80% 72%); }

/* ── Marketplace card (Codex skills/plugins) ─────────────── */
.mkt { display: flex; align-items: flex-start; gap: 13px; padding: 15px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); transition: all 0.15s; }
.mkt.hover:hover { border-color: var(--border-strong); background: var(--surface-3); }
.mkt-ic { width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; background: var(--surface-4); font-size: 18px; }
.mkt-ic.glow { background: var(--primary-bg); }
.mkt-body { flex: 1; min-width: 0; }
.mkt-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mkt-desc { font-size: 12.5px; color: var(--fg-muted); margin-top: 3px; line-height: 1.5; }
.mkt-check { color: var(--green); flex-shrink: 0; font-size: 15px; }
.mkt-add { color: var(--fg-dim); flex-shrink: 0; font-size: 18px; }

/* ── Footer ──────────────────────────────────────────────── */
.foot { max-width: 1100px; margin: 0 auto; padding: 24px 32px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--fg-dim); }
.foot a { color: var(--primary); }

/* ============================================================
   DEMO components (Codex-on-Mac, voice-controlled)
   ============================================================ */

/* mac desktop frame */
.mac { background: var(--surface-1); border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden; box-shadow: 0 24px 70px hsl(0 0% 0% / 0.55); }
.mac-bar { display: flex; align-items: center; gap: 8px; padding: 11px 15px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.traffic { width: 12px; height: 12px; border-radius: 50%; }
.traffic.r { background: #ff5f57; } .traffic.y { background: #febc2e; } .traffic.g { background: #28c840; }
.mac-title { margin-left: 10px; font-size: 11.5px; color: var(--fg-muted); display: flex; align-items: center; gap: 7px; }
.mac-title .wm { color: var(--primary); display: flex; }
.mac-right { margin-left: auto; font-size: 10.5px; color: var(--fg-dim); }

/* phone control strip */
.ctrlstrip { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: hsl(226 80% 78% / 0.05); border-bottom: 1px solid var(--border); font-size: 12px; color: var(--fg-muted); }
.ctrlstrip .phone-ic { width: 16px; height: 16px; color: var(--primary); }
.ctrlstrip b { color: var(--fg); }

/* replay controls */
.replay-bar { display: flex; align-items: center; gap: 12px; padding: 12px 15px; background: var(--surface-2); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.replay-bar .btn-replay { padding: 8px 16px; font-size: 12.5px; font-weight: 600; border-radius: 8px; background: var(--primary); color: #0b0b14; transition: 0.15s; }
.replay-bar .btn-replay:hover { filter: brightness(1.08); }
.scene-tabs { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow-x: auto; max-width: 100%; }
.scene-tabs button { padding: 7px 13px; font-size: 12px; color: var(--fg-muted); border-right: 1px solid var(--border); transition: 0.12s; }
.scene-tabs button:last-child { border-right: 0; }
.scene-tabs button.active { background: var(--primary-bg); color: var(--primary); font-weight: 600; }
.scene-tabs button:hover:not(.active) { background: hsl(0 0% 100% / 0.03); color: var(--fg); }
.replay-bar .state { margin-left: auto; font-size: 11.5px; color: var(--fg-dim); font-family: var(--mono); }

/* status header w/ live waveform */
.status-head { display: flex; align-items: center; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--border); background: radial-gradient(circle at 14% 0%, hsl(226 80% 78% / 0.08), transparent 60%); }
.statedot { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--primary-bg); border: 1px solid hsl(226 80% 78% / 0.3); color: var(--primary); transition: 0.2s; }
.statedot.live { background: var(--green-bg); border-color: hsl(140 65% 50% / 0.4); color: var(--green); }
.statedot svg { width: 19px; height: 19px; }
.status-txt .s1 { font-size: 13px; font-weight: 600; }
.status-txt .s2 { font-size: 11.5px; color: var(--fg-dim); margin-top: 1px; }

/* waveform (brand-consistent) */
.wave { display: inline-flex; align-items: center; gap: 2.5px; height: 16px; }
.wave span { width: 3px; border-radius: 2px; background: var(--primary); height: 5px; }
.wave.green span { background: var(--green); }
.wave.animate span { animation: wv 0.85s ease-in-out infinite; }
.wave span:nth-child(1){height:6px;animation-delay:0s} .wave span:nth-child(2){height:13px;animation-delay:.12s}
.wave span:nth-child(3){height:16px;animation-delay:.24s} .wave span:nth-child(4){height:9px;animation-delay:.36s}
.wave span:nth-child(5){height:13px;animation-delay:.18s} .wave span:nth-child(6){height:6px;animation-delay:.30s}
@keyframes wv { 0%,100%{transform:scaleY(0.5)} 50%{transform:scaleY(1)} }

/* conversation */
.conv { padding: 20px 22px 24px; min-height: 320px; max-height: 440px; overflow-y: auto; display: flex; flex-direction: column; gap: 13px; }
.conv .empty { color: var(--fg-dim); font-size: 13.5px; text-align: center; padding: 80px 0; }
@keyframes fadein { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

.msg { max-width: 84%; padding: 11px 15px; border-radius: 13px; font-size: 13.5px; line-height: 1.55; animation: fadein 0.3s ease; }
.msg .who { display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 6px; }
.msg.you { align-self: flex-end; background: var(--surface-4); border: 1px solid var(--border); border-bottom-right-radius: 4px; }
.msg.you .who { color: var(--fg-dim); justify-content: flex-end; }
.msg.cairn { align-self: flex-start; background: hsl(226 60% 60% / 0.08); border: 1px solid hsl(226 70% 70% / 0.22); border-bottom-left-radius: 4px; }
.msg.cairn .who { color: var(--primary); }

/* activity rows */
.act { align-self: flex-start; display: flex; align-items: center; gap: 9px; padding: 8px 13px; font-size: 12.5px; color: var(--fg-muted); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); max-width: 90%; animation: fadein 0.3s ease; }
.act.think { font-style: italic; }
.act .spin { width: 13px; height: 13px; border: 2px solid var(--border-strong); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.act .tname { font-family: var(--mono); font-size: 11.5px; color: var(--primary); }
.act .targ { color: var(--fg-dim); font-family: var(--mono); font-size: 11px; }
.act .tok { margin-left: auto; color: var(--green); font-size: 11px; font-weight: 600; white-space: nowrap; }
.act .ic { width: 14px; height: 14px; color: var(--fg-dim); flex-shrink: 0; }

/* data card */
.datacard { align-self: stretch; border: 1px solid var(--border); border-radius: var(--radius); background: hsl(240 8% 3.5%); overflow: hidden; animation: fadein 0.3s ease; }
.datacard .dh { font-family: var(--mono); font-size: 10px; color: var(--fg-dim); padding: 7px 13px; border-bottom: 1px solid var(--border); background: var(--surface-2); text-transform: uppercase; letter-spacing: 0.06em; }
.datacard table { width: 100%; }
.datacard td { padding: 7px 13px; font-size: 12.5px; border-bottom: 1px solid var(--border); }
.datacard tr:last-child td { border-bottom: 0; }
.datacard td:last-child { text-align: right; color: var(--fg); font-family: var(--mono); }
.datacard td .org { color: var(--primary); }
.datacard tr.total td { background: hsl(226 80% 78% / 0.05); }
.datacard tr.total td:first-child { color: var(--fg); font-weight: 600; }
.datacard tr.total td:last-child { color: var(--green); font-weight: 600; }

/* approval gate */
.approve-card { align-self: stretch; border: 1px solid hsl(38 92% 55% / 0.4); border-radius: var(--radius); background: var(--surface-3); padding: 15px; animation: fadein 0.3s ease; }
.approve-card .ah { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--fg-muted); margin-bottom: 11px; }
.approve-card .ah .ai { width: 28px; height: 28px; border-radius: 8px; background: var(--amber-bg); display: grid; place-items: center; color: var(--amber); }
.approve-card .ah .ai svg { width: 15px; height: 15px; }
.approve-card .ah .tg { margin-left: auto; font-size: 10px; padding: 2px 9px; border-radius: 999px; background: var(--amber-bg); color: var(--amber); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.approve-card .ad { background: hsl(240 8% 3.5%); border: 1px solid var(--border); border-radius: 8px; padding: 11px 13px; margin-bottom: 12px; }
.approve-card .ad .r { display: flex; justify-content: space-between; padding: 3px 0; font-size: 12.5px; }
.approve-card .ad .r .k { color: var(--fg-dim); } .approve-card .ad .r .v { color: var(--fg); font-weight: 500; text-align: right; }
.approve-card .aa { display: flex; align-items: center; gap: 9px; }
.approve-card .abtn { padding: 8px 18px; font-size: 12.5px; font-weight: 600; border-radius: 8px; border: 1px solid var(--border-strong); transition: 0.12s; }
.approve-card .abtn.ok { background: var(--green); color: #08120c; border-color: var(--green); }
.approve-card .abtn.no { background: var(--surface-4); color: var(--fg); }
.approve-card .abtn:hover { filter: brightness(1.1); }
.approve-card .ahint { margin-left: auto; font-size: 11px; color: var(--fg-dim); }
.approve-card.resolved { opacity: 0.6; } .approve-card.resolved .aa { display: none; }
.approve-card .verdict { font-size: 12px; font-weight: 600; margin-left: auto; }
.verdict.ok { color: var(--green); } .verdict.no { color: var(--red); }

/* result line */
.resline { align-self: flex-start; display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-radius: var(--radius); background: var(--green-bg); border: 1px solid hsl(140 65% 50% / 0.3); font-size: 13px; color: hsl(140 55% 75%); max-width: 90%; animation: fadein 0.3s ease; }
.resline.no { background: var(--red-bg); border-color: hsl(0 72% 50% / 0.3); color: hsl(0 70% 78%); }

/* phone hint footer of demo */
.demo-foot { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 12px; color: var(--fg-dim); }
.demo-foot .mic { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; background: var(--primary-bg); border: 1px solid hsl(226 80% 78% / 0.3); display: grid; place-items: center; color: var(--primary); }
.demo-foot .mic svg { width: 16px; height: 16px; }

/* misc utils */
.tag-i { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--surface-4); color: var(--fg-muted); }
.tag-i.glow { background: var(--primary-bg); color: var(--primary); }
.divider { border: none; border-top: 1px solid var(--border); margin: 28px 0; }

/* ============================================================
   AUTHENTIC CODEX UI — faithful replicas of the real app
   (desktop window, mobile app, plugins/skills marketplace,
    "you're connected" setup). Codex-accurate dark palette.
   ============================================================ */
:root {
  --cx-bg:      #0d0d0e;
  --cx-side:    #0a0a0b;
  --cx-elev:    #161618;
  --cx-elev2:   #1d1d20;
  --cx-bd:      rgba(255,255,255,0.07);
  --cx-bd2:     rgba(255,255,255,0.11);
  --cx-fg:      #ededee;
  --cx-mut:     #8a8a90;
  --cx-dim:     #5c5c62;
  --cx-teal:    #2dd4bf;
}

/* ---- Codex squircle app icon ---- */
.cxicon { border-radius: 26%; background: linear-gradient(150deg, #7aa2ff 0%, #8b7bff 50%, #b06bff 100%); display: grid; place-items: center; color: #fff; flex-shrink: 0; box-shadow: 0 2px 10px hsl(250 80% 60% / 0.35); }
.cxicon svg { width: 58%; height: 58%; }

/* ---- Codex DESKTOP window ---- */
.codex { background: var(--cx-bg); border: 1px solid var(--cx-bd2); border-radius: 12px; overflow: hidden; box-shadow: 0 26px 70px hsl(0 0% 0% / 0.6); color: var(--cx-fg); }
.cx-bar { display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 14px; background: #111113; border-bottom: 1px solid var(--cx-bd); }
.cx-bar .tl { width: 12px; height: 12px; border-radius: 50%; }
.cx-bar .tl.r{background:#ff5f57}.cx-bar .tl.y{background:#febc2e}.cx-bar .tl.g{background:#28c840}
.cx-bar .back { color: var(--cx-dim); margin-left: 6px; display: flex; }
.cx-bar .ttl { font-size: 12.5px; color: var(--cx-mut); margin: 0 auto; display: flex; align-items: center; gap: 8px; }
.cx-bar .ttl .dots { color: var(--cx-dim); }
.cx-bar .rt { display: flex; gap: 12px; color: var(--cx-dim); }
.cx-bar .rt svg { width: 15px; height: 15px; }

.cx-body { display: grid; grid-template-columns: 196px 1fr; min-height: 430px; }
@media (max-width: 720px){ .cx-body { grid-template-columns: 1fr; } .cx-side { display: none; } }

/* sidebar */
.cx-side { background: var(--cx-side); border-right: 1px solid var(--cx-bd); padding: 10px 8px; display: flex; flex-direction: column; gap: 1px; overflow: hidden; }
.cx-item { display: flex; align-items: center; gap: 9px; padding: 6px 9px; border-radius: 7px; font-size: 12.5px; color: var(--cx-mut); cursor: default; }
.cx-item:hover { background: rgba(255,255,255,0.04); color: var(--cx-fg); }
.cx-item svg { width: 15px; height: 15px; opacity: 0.8; flex-shrink: 0; }
.cx-grp { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cx-dim); padding: 13px 9px 5px; }
.cx-proj { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 7px; font-size: 12.5px; color: var(--cx-mut); cursor: default; }
.cx-proj:hover { background: rgba(255,255,255,0.03); }
.cx-proj.active { background: rgba(255,255,255,0.06); color: var(--cx-fg); }
.cx-proj svg { width: 14px; height: 14px; opacity: 0.7; flex-shrink: 0; }
.cx-proj .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-proj .kbd { font-size: 10px; color: var(--cx-dim); background: rgba(255,255,255,0.05); padding: 1px 5px; border-radius: 4px; }
.cx-proj .sub { font-size: 10.5px; color: var(--cx-dim); }
.cx-side .spacer { flex: 1; }

/* main */
.cx-main { display: flex; flex-direction: column; min-width: 0; }
.cx-thread { flex: 1; padding: 22px 26px 8px; overflow-y: auto; max-height: 430px; display: flex; flex-direction: column; gap: 14px; }
.cx-thread .empty { color: var(--cx-dim); font-size: 13px; text-align: center; margin: auto; }
.cx-umsg { align-self: flex-end; max-width: 74%; background: #2a2a2e; color: var(--cx-fg); padding: 9px 15px; border-radius: 16px; font-size: 13.5px; line-height: 1.5; animation: fadein 0.3s ease; }
.cx-amsg { align-self: flex-start; max-width: 92%; font-size: 13.5px; line-height: 1.62; color: #d6d6d8; animation: fadein 0.3s ease; }
.cx-amsg b { color: var(--cx-fg); font-weight: 600; }
.cx-acts { display: flex; align-items: center; gap: 13px; color: var(--cx-dim); margin-top: -4px; }
.cx-acts svg { width: 14px; height: 14px; }
.cx-acts .t { font-size: 11px; font-family: var(--mono); }

/* activity (thinking / tool) — Codex style */
.cx-run { align-self: flex-start; display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--cx-mut); animation: fadein 0.3s ease; max-width: 92%; }
.cx-run.think { font-style: italic; color: var(--cx-dim); }
.cx-run .spin { width: 13px; height: 13px; border: 2px solid var(--cx-bd2); border-top-color: var(--cx-teal); border-radius: 50%; animation: spin 0.8s linear infinite; flex-shrink: 0; }
.cx-run .tn { font-family: var(--mono); font-size: 11.5px; color: #9db8ff; }
.cx-run .ta { font-family: var(--mono); font-size: 11px; color: var(--cx-dim); }
.cx-run .tok { margin-left: 6px; color: var(--cx-teal); font-size: 11px; font-family: var(--mono); }
.cx-run .tic { width: 14px; height: 14px; color: var(--cx-dim); flex-shrink: 0; }

/* data card in thread */
.cx-data { align-self: stretch; border: 1px solid var(--cx-bd); border-radius: 10px; overflow: hidden; background: #0a0a0b; animation: fadein 0.3s ease; }
.cx-data .dh { font-family: var(--mono); font-size: 10px; color: var(--cx-dim); padding: 7px 13px; border-bottom: 1px solid var(--cx-bd); text-transform: uppercase; letter-spacing: 0.05em; }
.cx-data table { width: 100%; border-collapse: collapse; }
.cx-data td { padding: 7px 13px; font-size: 12.5px; color: var(--cx-mut); border-bottom: 1px solid var(--cx-bd); }
.cx-data tr:last-child td { border-bottom: 0; }
.cx-data td:last-child { text-align: right; color: var(--cx-fg); font-family: var(--mono); }
.cx-data td .org { color: #9db8ff; }
.cx-data tr.total td { background: rgba(45,212,191,0.06); }
.cx-data tr.total td:first-child { color: var(--cx-fg); font-weight: 600; }
.cx-data tr.total td:last-child { color: var(--cx-teal); font-weight: 600; }

/* pending-approval pill in thread */
.cx-pending { align-self: flex-start; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--amber); background: rgba(245,180,80,0.08); border: 1px solid rgba(245,180,80,0.2); padding: 8px 13px; border-radius: 9px; animation: fadein 0.3s ease; }
.cx-pending.resolved-ok { color: var(--cx-teal); background: rgba(45,212,191,0.08); border-color: rgba(45,212,191,0.2); }
.cx-pending.resolved-no { color: var(--red); background: var(--red-bg); border-color: rgba(220,80,80,0.2); }

/* composer */
.cx-composer { padding: 10px 14px 14px; }
.cx-input { background: #141416; border: 1px solid var(--cx-bd); border-radius: 13px; padding: 12px 14px 9px; }
.cx-input .ph { font-size: 13px; color: var(--cx-dim); margin-bottom: 11px; }
.cx-toolbar { display: flex; align-items: center; gap: 8px; }
.cx-plus { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: var(--cx-mut); border: 1px solid var(--cx-bd); }
.cx-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--cx-mut); padding: 4px 9px; border-radius: 7px; border: 1px solid var(--cx-bd); }
.cx-chip .d { width: 7px; height: 7px; border-radius: 50%; }
.cx-chip .d.red { background: #ff5f57; } .cx-chip .d.green { background: #28c840; }
.cx-chip svg { width: 12px; height: 12px; opacity: 0.7; }
.cx-toolbar .sp { flex: 1; }
.cx-mic { color: var(--cx-mut); display: flex; } .cx-mic svg { width: 16px; height: 16px; }
.cx-send { width: 28px; height: 28px; border-radius: 50%; background: var(--cx-fg); color: #0d0d0e; display: grid; place-items: center; }
.cx-send svg { width: 15px; height: 15px; }

/* ---- Codex MOBILE app ---- */
.cphone { width: 280px; flex-shrink: 0; background: #050506; border: 9px solid #18181b; border-radius: 38px; overflow: hidden; box-shadow: 0 26px 70px hsl(0 0% 0% / 0.6); position: relative; }
@media (max-width: 860px){ .cphone { width: 100%; max-width: 320px; margin: 0 auto; } }
.cp-screen { background: #060607; display: flex; flex-direction: column; height: 520px; position: relative; }
.cp-status { display: flex; align-items: center; justify-content: space-between; padding: 9px 18px 4px; font-size: 11px; color: var(--cx-fg); font-weight: 600; }
.cp-status .ic { display: flex; gap: 4px; color: var(--cx-mut); }
.cp-top { display: flex; align-items: center; gap: 8px; padding: 6px 12px 10px; }
.cp-top .bk { color: var(--cx-mut); display: flex; }
.cp-host { display: flex; flex-direction: column; gap: 1px; background: #18181b; border-radius: 13px; padding: 5px 12px; }
.cp-host .a { font-size: 12px; font-weight: 600; color: var(--cx-fg); }
.cp-host .b { font-size: 9.5px; color: var(--cx-dim); display: flex; align-items: center; gap: 4px; }
.cp-body { flex: 1; padding: 10px 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.cp-hero { margin: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--cx-mut); }
.cp-hero .cxicon { width: 52px; height: 52px; }
.cp-hero .a { font-size: 14px; color: var(--cx-fg); font-weight: 500; }
.cp-hero .b { font-size: 12.5px; color: var(--cx-mut); display: flex; align-items: center; gap: 5px; }
.cp-bubble { align-self: flex-end; max-width: 84%; background: #2a2a2e; color: var(--cx-fg); font-size: 12.5px; line-height: 1.45; padding: 8px 12px; border-radius: 14px; animation: fadein 0.3s ease; }
.cp-note { align-self: flex-start; max-width: 88%; font-size: 11.5px; color: var(--cx-dim); animation: fadein 0.3s ease; display:flex; gap:6px; }
.cp-amsg { align-self: flex-start; max-width: 92%; font-size: 12.5px; line-height: 1.5; color: #d6d6d8; animation: fadein 0.3s ease; }
.cp-amsg b { color: var(--cx-fg); font-weight: 600; }
.cp-amsg .cp-copy { color: var(--cx-dim); margin-top: 5px; display: inline-flex; } .cp-amsg .cp-copy svg { width: 13px; height: 13px; }
.cp-act { align-self: flex-start; font-size: 11px; color: var(--cx-dim); display: flex; align-items: center; gap: 6px; }
.cp-act .cv { color: var(--cx-teal); }
.cp-toast { align-self: center; font-size: 11.5px; padding: 6px 13px; border-radius: 999px; background: rgba(45,212,191,0.1); color: var(--cx-teal); border: 1px solid rgba(45,212,191,0.25); animation: fadein 0.3s ease; }
.cp-toast.no { background: var(--red-bg); color: var(--red); border-color: rgba(220,80,80,0.25); }

/* phone footer (chips + input + mic) */
.cp-foot { padding: 8px 12px 14px; }
.cp-chips { display: flex; gap: 6px; margin-bottom: 8px; }
.cp-chips span { font-size: 10px; color: var(--cx-mut); background: #18181b; border-radius: 999px; padding: 4px 10px; }
.cp-inrow { display: flex; align-items: center; gap: 8px; background: #18181b; border-radius: 999px; padding: 6px 8px 6px 12px; }
.cp-inrow .plus { color: var(--cx-mut); }
.cp-inrow .txt { flex: 1; font-size: 12px; color: var(--cx-dim); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cp-inrow .txt.typed { color: var(--cx-fg); }
.cp-mic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--cx-mut); flex-shrink: 0; transition: 0.2s; }
.cp-mic.live { background: #2dd4bf; color: #03201c; box-shadow: 0 0 0 0 rgba(45,212,191,0.5); animation: micpulse 1.2s infinite; }
.cp-mic svg { width: 16px; height: 16px; }
@keyframes micpulse { 0%{box-shadow:0 0 0 0 rgba(45,212,191,0.45)} 70%{box-shadow:0 0 0 12px rgba(45,212,191,0)} 100%{box-shadow:0 0 0 0 rgba(45,212,191,0)} }

/* phone approval bottom-sheet */
.cp-sheet { position: absolute; left: 8px; right: 8px; bottom: 8px; background: #161618; border: 1px solid var(--cx-bd2); border-radius: 18px; padding: 14px; box-shadow: 0 -10px 40px hsl(0 0% 0% / 0.6); animation: sheetup 0.3s ease; z-index: 5; }
@keyframes sheetup { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.cp-sheet .sh-h { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--cx-fg); font-weight: 600; margin-bottom: 4px; }
.cp-sheet .sh-h .ai { width: 22px; height: 22px; border-radius: 6px; background: var(--amber-bg); color: var(--amber); display: grid; place-items: center; } .cp-sheet .sh-h .ai svg { width: 13px; height: 13px; }
.cp-sheet .sh-sub { font-size: 11px; color: var(--cx-mut); margin-bottom: 10px; line-height: 1.4; }
.cp-sheet .sh-d { background: #0a0a0b; border: 1px solid var(--cx-bd); border-radius: 9px; padding: 8px 11px; margin-bottom: 11px; }
.cp-sheet .sh-d .r { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; font-size: 11px; }
.cp-sheet .sh-d .r .k { color: var(--cx-dim); } .cp-sheet .sh-d .r .v { color: var(--cx-fg); text-align: right; }
.cp-sheet .sh-a { display: flex; gap: 8px; }
.cp-sheet .sh-btn { flex: 1; padding: 9px; border-radius: 11px; font-size: 12.5px; font-weight: 600; }
.cp-sheet .sh-btn.ok { background: var(--cx-teal); color: #03201c; }
.cp-sheet .sh-btn.no { background: #232327; color: var(--cx-fg); }

/* ---- Plugins / Skills MARKETPLACE (mirrors the real panel) ---- */
.mkt-panel { background: var(--cx-bg); border: 1px solid var(--cx-bd2); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-md, 0 20px 50px rgba(0,0,0,.5)); }
.mkt-panel-bar { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; background: #111113; border-bottom: 1px solid var(--cx-bd); }
.mkt-panel-bar .tl{width:11px;height:11px;border-radius:50%}.mkt-panel-bar .r{background:#ff5f57}.mkt-panel-bar .y{background:#febc2e}.mkt-panel-bar .g{background:#28c840}
.mkt-tabs { display: flex; gap: 18px; padding: 12px 20px 0; }
.mkt-tabs .tb { font-size: 13.5px; color: var(--cx-mut); padding-bottom: 10px; border-bottom: 2px solid transparent; }
.mkt-tabs .tb.on { color: var(--cx-fg); font-weight: 600; border-bottom-color: var(--cx-fg); }
.mkt-tools { display: flex; align-items: center; gap: 10px; padding: 12px 20px; }
.mkt-tools .srch { flex: 1; display: flex; align-items: center; gap: 8px; background: #161618; border: 1px solid var(--cx-bd); border-radius: 9px; padding: 7px 12px; font-size: 12.5px; color: var(--cx-dim); }
.mkt-tools .by { font-size: 12px; color: var(--cx-mut); display: flex; align-items: center; gap: 5px; }
.mkt-sech { font-size: 12px; color: var(--cx-mut); padding: 4px 20px 8px; }
.mkt-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; padding: 0 20px 18px; }
@media (max-width: 720px){ .mkt-cols { grid-template-columns: 1fr; } }
.mkt-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--cx-bd); }
.mkt-row .ic { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; background: var(--cx-elev); font-size: 17px; }
.mkt-row .ic.glow { background: linear-gradient(150deg,#7aa2ff,#b06bff); }
.mkt-row .bd { flex: 1; min-width: 0; }
.mkt-row .nm { font-size: 13px; font-weight: 600; color: var(--cx-fg); }
.mkt-row .ds { font-size: 11.5px; color: var(--cx-mut); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkt-row .act { flex-shrink: 0; color: var(--cx-dim); font-size: 17px; width: 22px; text-align: center; }
.mkt-row .act.added { color: var(--cx-teal); }

/* ---- "You're connected" setup card ---- */
.cx-connect { background: #161618; border: 1px solid var(--cx-bd2); border-radius: 16px; padding: 26px 24px; max-width: 380px; }
.cx-connect .chk { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--cx-mut); display: grid; place-items: center; margin: 0 auto 14px; color: var(--cx-fg); }
.cx-connect h4 { text-align: center; font-size: 18px; font-weight: 600; margin-bottom: 6px; color: var(--cx-fg); }
.cx-connect .sub { text-align: center; font-size: 12px; color: var(--cx-mut); margin-bottom: 20px; line-height: 1.5; }
.cx-toggle { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.cx-toggle .ti { width: 30px; height: 30px; border-radius: 8px; background: var(--cx-elev); display: grid; place-items: center; color: var(--cx-mut); flex-shrink: 0; } .cx-toggle .ti svg { width: 15px; height: 15px; }
.cx-toggle .tb { flex: 1; }
.cx-toggle .tn { font-size: 12.5px; font-weight: 500; color: var(--cx-fg); }
.cx-toggle .td { font-size: 10.5px; color: var(--cx-dim); margin-top: 1px; }
.cx-toggle .sw { width: 38px; height: 22px; border-radius: 999px; background: #2dd4bf; position: relative; flex-shrink: 0; }
.cx-toggle .sw::after { content: ''; position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; }
.cx-toggle .sw.off { background: #2c2c30; } .cx-toggle .sw.off::after { right: auto; left: 2px; }
.cx-connect .done { margin-top: 18px; width: 100%; padding: 11px; border-radius: 999px; background: var(--cx-fg); color: #0d0d0e; font-size: 13px; font-weight: 600; }

/* ---- WhatsApp mock (dark) ---- */
.wa { max-width: 330px; background: #0b141a; border: 1px solid var(--border-strong); border-radius: 16px; overflow: hidden; box-shadow: 0 20px 50px hsl(0 0% 0% / 0.45); }
.wa-bar { display:flex; align-items:center; gap:10px; padding:10px 13px; background:#1f2c33; }
.wa-av { width:34px; height:34px; border-radius:50%; background:linear-gradient(150deg,#25d366,#128c7e); display:grid; place-items:center; color:#04130b; font-weight:700; font-size:14px; flex-shrink:0; }
.wa-nm { font-size:13.5px; font-weight:600; color:#e9edef; }
.wa-st { font-size:11px; color:#8696a0; }
.wa-ic { margin-left:auto; color:#8696a0; display:flex; gap:14px; } .wa-ic svg{width:17px;height:17px}
.wa-body { padding:14px 12px; display:flex; flex-direction:column; gap:7px; background:#0b141a; min-height:240px; }
.wa-msg { max-width:84%; padding:7px 10px; border-radius:9px; font-size:12.5px; line-height:1.45; }
.wa-msg.in { align-self:flex-start; background:#1f2c33; color:#e9edef; border-top-left-radius:3px; }
.wa-msg.out { align-self:flex-end; background:#005c4b; color:#e9edef; border-top-right-radius:3px; }
.wa-msg b { color:#fff; }
.wa-msg .tk { display:block; text-align:right; font-size:9.5px; color:#8696a0; margin-top:2px; }
.wa-msg.out .tk { color:#9fd8c8; }
.wa-input { margin:0 12px 12px; padding:9px 14px; background:#1f2c33; border-radius:999px; font-size:12.5px; color:#8696a0; display:flex; align-items:center; gap:8px; }
.wa-input svg{width:16px;height:16px}

/* ---- copyable prompt box ---- */
.copybox { position: relative; }
.copybox .copybtn { position:absolute; top:8px; right:8px; font-size:11px; font-weight:600; padding:5px 12px; border-radius:7px; background:var(--surface-4); color:var(--fg); border:1px solid var(--border-strong); cursor:pointer; z-index:2; transition:.12s; }
.copybox .copybtn:hover { background:var(--surface-hover); }
.copybox .copybtn.done { color:var(--green); border-color:hsl(140 65% 50% / .4); }
.copybox .code pre { white-space: pre-wrap; color: var(--fg); }
.gstep { display:grid; grid-template-columns:34px 1fr; gap:14px; margin-bottom:22px; }
.gstep .gn { width:34px; height:34px; border-radius:9px; background:var(--primary-bg); color:var(--primary); font-weight:700; font-size:14px; display:grid; place-items:center; }
.gstep .gt { font-size:15.5px; font-weight:600; margin-bottom:4px; }
.gstep .gd { font-size:13.5px; color:var(--fg-muted); line-height:1.55; }
.gstep .gd code { background:hsl(226 60% 70% / 0.12); color:var(--primary); padding:1.5px 6px; border-radius:5px; font-size:12px; font-family:var(--mono); }

/* ============================================================
   Nora V1 (Hermes build) — doc-site additions
   ============================================================ */

/* engine tag chip */
.engine-tag { display:inline-flex; align-items:center; gap:6px; font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.12em; padding:3px 10px; border-radius:999px; background:var(--primary-bg); color:var(--primary); }

/* status pills for the tracker */
.st { display:inline-flex; align-items:center; gap:6px; font-size:10.5px; font-weight:700; padding:3px 9px; border-radius:6px; white-space:nowrap; text-transform:uppercase; letter-spacing:.04em; }
.st .d { width:6px; height:6px; border-radius:50%; }
.st.done  { color:var(--green);   background:var(--green-bg); }  .st.done .d  { background:var(--green); }
.st.wip   { color:var(--primary); background:var(--primary-bg); } .st.wip .d  { background:var(--primary); animation:pulse-dot 1.5s infinite; }
.st.plan  { color:var(--fg-muted);background:hsl(0 0% 100% / .05); } .st.plan .d { background:var(--fg-muted); }
.st.risk  { color:var(--amber);   background:var(--amber-bg); }  .st.risk .d  { background:var(--amber); }
.st.block { color:var(--red);     background:var(--red-bg); }    .st.block .d { background:var(--red); }

/* a tracked-decision card */
.decision { border:1px solid var(--border); border-left:3px solid var(--primary); background:var(--surface-2); border-radius:0 var(--radius) var(--radius) 0; padding:14px 16px; margin-bottom:12px; }
.decision .q { font-size:13.5px; font-weight:600; color:var(--fg); margin-bottom:4px; }
.decision .a { font-size:13px; color:var(--fg-muted); line-height:1.55; }
.decision .a b { color:var(--fg); }
.decision .tag { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--primary); margin-bottom:7px; display:block; }

/* docs page: sticky table-of-contents rail */
.docwrap { display:grid; grid-template-columns:200px 1fr; gap:32px; align-items:start; }
@media (max-width:860px){ .docwrap { grid-template-columns:1fr; } .toc { display:none; } }
.toc { position:sticky; top:74px; display:flex; flex-direction:column; gap:2px; font-size:12.5px; }
.toc .tt { font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.12em; color:var(--fg-dim); margin-bottom:8px; }
.toc a { color:var(--fg-muted); padding:5px 10px; border-radius:7px; border-left:2px solid transparent; }
.toc a:hover { color:var(--fg); background:hsl(0 0% 100% / .03); }
.toc a.active { color:var(--primary); border-left-color:var(--primary); background:var(--primary-bg); }
.anchor { scroll-margin-top:74px; }

/* Hermes agent pane (server-side execution view) — periwinkle */
.vps { background:#0c0d0f; border:1px solid var(--border-strong); border-radius:12px; overflow:hidden; box-shadow:0 24px 70px hsl(0 0% 0% / 0.55); }
.vps-bar { display:flex; align-items:center; gap:9px; height:42px; padding:0 14px; background:#121316; border-bottom:1px solid var(--border); }
.vps-bar .dt { width:11px; height:11px; border-radius:50%; }
.vps-bar .dt.o { background:var(--primary); } .vps-bar .dt.m { background:#3a3a40; } .vps-bar .dt.x { background:#3a3a40; }
.vps-bar .ttl { font-size:12px; color:var(--fg-muted); margin-left:6px; font-family:var(--mono); display:flex; align-items:center; gap:8px; }
.vps-bar .host { margin-left:auto; font-size:10.5px; color:var(--fg-dim); font-family:var(--mono); }
.vps-thread { padding:18px 20px; min-height:340px; max-height:460px; overflow-y:auto; display:flex; flex-direction:column; gap:11px; font-family:var(--mono); }
.vps-thread .empty { color:var(--fg-dim); font-size:13px; text-align:center; margin:auto; font-family:var(--font); }
.vps-line { font-size:12px; line-height:1.55; animation:fadein .3s ease; }
.vps-line .pr { color:var(--primary); }
.vps-line.sys { color:var(--fg-dim); }
.vps-line.usr { color:var(--fg); }
.vps-tool { align-self:flex-start; display:flex; align-items:center; gap:9px; font-size:11.5px; color:var(--fg-muted); animation:fadein .3s ease; max-width:96%; }
.vps-tool .sp { width:12px; height:12px; border:2px solid var(--border-strong); border-top-color:var(--primary); border-radius:50%; animation:spin .8s linear infinite; flex-shrink:0; }
.vps-tool .tn { color:var(--primary); } .vps-tool .ta { color:var(--fg-dim); }
.vps-tool .ok { margin-left:auto; color:var(--green); }
.vps-tool .ret { margin-left:auto; color:var(--primary); font-size:10.5px; }
.vps-amsg { align-self:flex-start; max-width:94%; font-size:12.5px; line-height:1.6; color:#d6d6d8; font-family:var(--font); animation:fadein .3s ease; }
.vps-amsg b { color:var(--fg); font-weight:600; }
.vps-meter { align-self:flex-start; display:flex; align-items:center; gap:8px; font-size:10.5px; color:var(--fg-dim); font-family:var(--mono); animation:fadein .3s ease; margin-top:2px; }
.vps-meter .bar { width:120px; height:5px; border-radius:3px; background:var(--surface-4); overflow:hidden; }
.vps-meter .bar i { display:block; height:100%; background:linear-gradient(90deg, var(--green), var(--primary)); transition:width .4s ease; }
.vps-meter .tk { color:var(--green); }
.vps-data { align-self:stretch; border:1px solid var(--border); border-radius:10px; overflow:hidden; background:#08090b; animation:fadein .3s ease; }
.vps-data .dh { font-size:10px; color:var(--fg-dim); padding:7px 13px; border-bottom:1px solid var(--border); text-transform:uppercase; letter-spacing:.05em; }
.vps-data table { width:100%; border-collapse:collapse; }
.vps-data td { padding:7px 13px; font-size:12px; color:var(--fg-muted); border-bottom:1px solid var(--border); }
.vps-data tr:last-child td { border-bottom:0; }
.vps-data td:last-child { text-align:right; color:var(--fg); }
.vps-data td .org { color:var(--primary); }
.vps-data tr.total td { background:var(--primary-bg); }
.vps-data tr.total td:first-child { color:var(--fg); font-weight:600; }
.vps-data tr.total td:last-child { color:var(--primary); font-weight:600; }

/* ============================================================
   Dashboard shell + collapsible sidebar
   ============================================================ */
body.dash { display:flex; align-items:flex-start; }
body.dash > .page { flex:1; min-width:0; }

.sidebar { position:sticky; top:0; align-self:flex-start; flex-shrink:0; width:252px; height:100vh; overflow-y:auto; background:var(--surface-1); border-right:1px solid var(--border); display:flex; flex-direction:column; padding:14px 12px; z-index:50; }
.sb-brand { display:flex; align-items:center; gap:9px; font-size:15px; font-weight:600; color:var(--fg); padding:6px 10px 14px; }
.sb-brand .wm { color:var(--primary); display:flex; }
.sb-brand .sb-tag { font-size:9.5px; color:var(--fg-dim); font-weight:600; letter-spacing:.04em; margin-left:auto; text-transform:uppercase; }
.sb-nav { display:flex; flex-direction:column; gap:3px; flex:1; }
.sb-group { display:flex; flex-direction:column; }
.sb-ghead { display:flex; align-items:center; gap:6px; width:100%; padding:10px 10px 5px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.11em; color:var(--fg-dim); cursor:pointer; background:none; border:none; text-align:left; }
.sb-ghead:hover { color:var(--fg-muted); }
.sb-ghead .chev { margin-left:auto; transition:transform .18s; width:13px; height:13px; }
.sb-group:not(.open) .chev { transform:rotate(-90deg); }
.sb-items { display:flex; flex-direction:column; gap:1px; overflow:hidden; max-height:640px; transition:max-height .22s ease, opacity .18s; }
.sb-group:not(.open) .sb-items { max-height:0; opacity:0; pointer-events:none; }
.sb-item { display:flex; align-items:center; gap:10px; padding:7px 10px; border-radius:8px; font-size:13px; color:var(--fg-muted); transition:.12s; }
.sb-item:hover { background:hsl(0 0% 100% / .04); color:var(--fg); }
.sb-item.active { background:var(--primary-bg); color:var(--primary); font-weight:600; }
.sb-item svg { width:15px; height:15px; flex-shrink:0; opacity:.85; }
.sb-item .lbl { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sb-item .ndot { flex-shrink:0; }
.sb-foot { margin-top:10px; padding:10px 10px 4px; font-size:11.5px; color:var(--fg-dim); border-top:1px solid var(--border); display:flex; align-items:center; gap:7px; }
.sb-foot:hover { color:var(--fg); }

.sb-toggle { display:none; position:fixed; top:12px; left:12px; z-index:70; width:40px; height:40px; border-radius:10px; background:var(--surface-3); border:1px solid var(--border-strong); color:var(--fg); cursor:pointer; }
.sb-toggle svg { width:18px; height:18px; }
.sb-scrim { display:none; }
@media (max-width:900px){
  body.dash { display:block; }
  .sidebar { position:fixed; inset:0 auto 0 0; transform:translateX(-100%); transition:transform .22s ease; box-shadow:0 0 50px rgba(0,0,0,.55); }
  body.dash.nav-open .sidebar { transform:none; }
  body.dash > .page { padding-top:64px; }
  .sb-toggle { display:grid; place-items:center; }
  body.dash.nav-open .sb-scrim { display:block; position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:40; }
}

/* ============================================================
   Landing cover (no sidebar)
   ============================================================ */
body.cover { min-height:100vh; display:grid; place-items:center; position:relative; overflow:hidden; }
body.cover::before { content:''; position:absolute; top:-20%; left:50%; transform:translateX(-50%); width:900px; height:900px; max-width:120%; background:radial-gradient(circle, hsl(226 80% 78% / 0.10) 0%, transparent 62%); pointer-events:none; }
.cover-wrap { position:relative; text-align:center; padding:40px 28px; max-width:680px; }
.cover-mark { display:inline-flex; align-items:center; gap:12px; font-size:30px; font-weight:600; letter-spacing:-.02em; }
.cover-mark .wm { color:var(--primary); display:flex; }
.cover-tag { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.16em; color:var(--primary); margin:16px 0 26px; }
.cover-wrap h1 { font-size:42px; font-weight:600; letter-spacing:-.03em; line-height:1.1; margin-bottom:18px; }
.cover-wrap h1 .accent { color:var(--primary); }
.cover-wrap .lead { font-size:16px; color:var(--fg-muted); line-height:1.65; max-width:560px; margin:0 auto 34px; }
.btn-primary.big { font-size:14.5px; padding:14px 30px; border-radius:11px; }
.cover-meta { margin-top:26px; font-size:12px; color:var(--fg-dim); font-family:var(--mono); }
@media (max-width:600px){ .cover-wrap h1 { font-size:32px; } .cover-mark { font-size:25px; } }
