/* ============================================================
   RAVEN LABS — design system (matches RAVEN Aware v2 shell)
   Champagne gold · navy/parchment dual theme · Inter / IBM Plex Mono
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Nunito+Sans:wght@400;600;700;800;900&family=DM+Mono:wght@400;500&display=swap');

/* ---------- DARK (default) ---------- */
:root{
  --bg:#0A0D14; --bg2:#070A10;
  --surface-1:#0E1219; --surface-2:#131820; --surface-3:#1A1F2A; --surface-hover:#1F2533;
  --border:rgba(255,255,255,.05); --border-strong:rgba(255,255,255,.09);
  --text:#E2E0DB; --text-muted:#9DA1AA; --text-dim:#7A776E; --text-faint:#A5A29A;
  --gold:#C9A84C; --gold-bright:#D9C068; --g80:#B09040; --g60:#947832; --g20:#C8B888;
  --gold-soft:rgba(201,168,76,.08); --gold-soft2:rgba(201,168,76,.04); --gold-soft3:rgba(201,168,76,.14);
  --gold-line:rgba(201,168,76,.30);
  --accent:#B09040; --accent-soft:rgba(201,168,76,.08);
  --danger:#cf7d5e; --danger-soft:rgba(207,125,94,.10); --success:#C9A84C;
  --sh:0 1px 3px rgba(0,0,0,.5),0 0 0 1px rgba(255,255,255,.02);
  --sh2:0 8px 24px rgba(0,0,0,.6),0 0 0 1px rgba(201,168,76,.03);
  --logo-filter:none; --logo-opacity:1;
  --r:6px; --radius:8px; --radius-lg:10px;
  --e:cubic-bezier(.4,0,.2,1);
  --mono:'DM Mono','SF Mono',ui-monospace,monospace;
  --sans:'Nunito Sans',-apple-system,system-ui,sans-serif;
  --sidebar-w:220px;
}
/* ---------- LIGHT ---------- */
[data-theme="light"]{
  --bg:#F5F3EF; --bg2:#EDEAE4;
  --surface-1:#FAF8F5; --surface-2:#F0EDE8; --surface-3:#E5E2DC; --surface-hover:#DBD8D0;
  --border:rgba(0,0,0,.06); --border-strong:rgba(0,0,0,.10);
  --text:#1C1A16; --text-muted:#4A4740; --text-dim:#5E6470; --text-faint:#363C48;
  --gold:#8B6914; --gold-bright:#5C4510; --g80:#7A5C12; --g60:#6A5010; --g20:#3E3214;
  --gold-soft:rgba(139,105,20,.07); --gold-soft2:rgba(139,105,20,.04); --gold-soft3:rgba(139,105,20,.12);
  --gold-line:rgba(139,105,20,.30);
  --accent:#7A5C12; --accent-soft:rgba(139,105,20,.07);
  --danger:#a8552f; --danger-soft:rgba(168,85,47,.08); --success:#8B6914;
  --sh:0 1px 2px rgba(0,0,0,.04),0 0 0 1px rgba(0,0,0,.03);
  --sh2:0 6px 16px rgba(0,0,0,.06),0 0 0 1px rgba(0,0,0,.03);
  --logo-filter:brightness(0.12); --logo-opacity:.9;
}

*{box-sizing:border-box;margin:0;padding:0}
html{height:100%;overflow-x:hidden;overscroll-behavior-x:none}
body{
  min-height:100vh;max-width:100%;overflow-x:hidden;overscroll-behavior-x:none;font-family:var(--sans);background:var(--bg);color:var(--text);
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;line-height:1.55;
  transition:background .3s var(--e),color .3s var(--e);
}
body::before{content:'';position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:radial-gradient(1000px 560px at 80% -10%,var(--gold-soft2),transparent 62%),var(--bg)}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
::selection{background:var(--gold);color:var(--bg)}
:focus-visible{outline:1.5px solid var(--gold);outline-offset:2px}
*::-webkit-scrollbar{width:9px;height:9px}
*::-webkit-scrollbar-thumb{background:var(--surface-3);border-radius:6px;border:2px solid var(--bg)}
*::-webkit-scrollbar-thumb:hover{background:var(--surface-hover)}

/* ============================================================ SIDEBAR (.sb shell) */
.rv-sidebar{position:fixed;top:0;left:0;height:100vh;width:var(--sidebar-w);z-index:60;font-family:'Inter',-apple-system,system-ui,sans-serif;
  background:var(--surface-1);border-right:1px solid var(--border);display:flex;flex-direction:column}
.sb-brand{padding:16px 0 12px;display:flex;align-items:center;justify-content:center}
.sb-brand img{width:100%;height:auto;padding:0 16px;filter:var(--logo-filter);opacity:var(--logo-opacity)}
.sb-brand .sb-tag{font-family:var(--mono);font-size:9px;font-weight:500;letter-spacing:.42em;color:var(--gold);padding-left:.42em}
.sb-nav{flex:1;padding:4px 10px;overflow-y:auto}
.sb-sec{margin-bottom:16px}
.sb-sec-label{font-family:inherit;font-size:10px;font-weight:400;color:var(--text-faint);
  text-transform:uppercase;letter-spacing:.12em;padding:6px 12px 6px}
.ni{display:flex;align-items:center;gap:10px;width:100%;padding:9px 12px;border-radius:8px;
  font-family:inherit;font-size:14px;font-weight:400;color:var(--text-muted);
  transition:all .15s var(--e);margin-bottom:1px;border-left:2px solid transparent}
.ni:hover{background:var(--surface-hover)}
.ni.on{color:var(--gold);font-weight:500;background:var(--gold-soft2);border-left-color:var(--gold);
  animation:navGlow 4s ease-in-out infinite}
.ni svg{width:17px;height:17px;flex-shrink:0;opacity:.45;stroke-width:1.75}
.ni.on svg{opacity:.75}
.ni-badge{margin-left:auto;font-family:var(--mono);font-size:9px;font-weight:500;padding:2px 6px;
  border-radius:3px;background:var(--gold-soft);color:var(--gold);letter-spacing:.04em}
.sb-footer{padding:12px;border-top:1px solid var(--border)}
.sb-theme{width:100%;display:flex;align-items:center;justify-content:center;gap:9px;padding:11px;border-radius:8px;border:1px solid var(--border-strong);background:var(--surface-2);color:var(--text-muted);font-family:var(--sans);font-size:13px;font-weight:700;cursor:pointer;transition:.15s var(--e)}
.sb-theme:hover{color:var(--gold);border-color:var(--gold-line);background:var(--surface-3)}
.sb-theme svg{width:15px;height:15px}
.sb-theme .t-sun{display:none}
[data-theme="light"] .sb-theme .t-sun{display:block}
[data-theme="light"] .sb-theme .t-moon{display:none}
@keyframes navGlow{0%,100%{box-shadow:inset 0 0 0 0 rgba(201,168,76,0)}50%{box-shadow:inset 0 0 12px 0 rgba(201,168,76,0.04)}}

/* ============================================================ HEADER (.hdr) */
.rv-main{margin-left:var(--sidebar-w);min-height:100vh;display:flex;flex-direction:column}
.hdr{position:sticky;top:0;z-index:50;height:50px;min-height:50px;display:flex;align-items:center;
  gap:14px;padding:0 18px;border-bottom:1px solid var(--border);
  background:color-mix(in srgb,var(--surface-1) 88%,transparent);backdrop-filter:blur(12px)}
.hdr-crumb{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text-muted);font-weight:500}
.hdr-crumb .c-root{color:var(--text-faint)}
.hdr-crumb .c-sep{color:var(--text-faint);opacity:.6}
.hdr-crumb .c-cur{color:var(--text)}
.hdr-spacer{flex:1}
.hdr-chip{display:flex;align-items:center;gap:6px;font-family:var(--mono);font-size:10px;letter-spacing:.06em;
  color:var(--gold);background:var(--gold-soft);border:1px solid var(--gold-line);padding:5px 10px;border-radius:999px;font-weight:500}
.hdr-chip svg{width:11px;height:11px}
.theme-toggle{width:32px;height:32px;border-radius:7px;border:1px solid var(--border);background:var(--surface-2);
  color:var(--text-muted);cursor:pointer;display:grid;place-items:center;transition:.15s}
.theme-toggle:hover{color:var(--gold);border-color:var(--gold-line)}
.theme-toggle svg{width:16px;height:16px}
.theme-toggle .t-sun{display:none}
[data-theme="light"] .theme-toggle .t-sun{display:block}
[data-theme="light"] .theme-toggle .t-moon{display:none}
.hdr-cta{display:inline-flex;align-items:center;gap:6px;font-family:var(--sans);font-weight:700;font-size:13px;padding:8px 15px;border-radius:7px;background:var(--gold);color:var(--bg);border:1px solid var(--gold-line);transition:.16s var(--e)}
.hdr-cta:hover{background:var(--gold-bright);transform:translateY(-1px)}
.hdr-cta svg{width:13px;height:13px}
.hdr-cta img{width:17px;height:17px;border-radius:4px}
/* universal bottom ticker (every page, always scrolling) */
.rv-ticker{position:fixed;bottom:0;left:var(--sidebar-w);right:0;height:38px;z-index:40;display:flex;align-items:center;gap:14px;padding:0 16px;background:var(--surface-1);border-top:1px solid var(--border)}
.rv-ticker-label{font-family:var(--mono);font-size:9px;letter-spacing:.16em;color:var(--text-faint);text-transform:uppercase;white-space:nowrap;flex:0 0 auto}
.rv-ticker .marquee-mask{flex:1;min-width:0}
.rv-ticker .marquee-track{gap:10px;animation:marquee 42s linear infinite}
.rv-ticker .ai-logo-chip{padding:5px 11px;font-size:11.5px;background:var(--surface-2)}
.works-with{display:none}

/* mobile burger (hidden ≥920) */
.rv-burger{display:none;width:34px;height:34px;border-radius:7px;border:1px solid var(--border-strong);
  background:var(--surface-2);color:var(--text);place-items:center;cursor:pointer}
.rv-burger svg{width:17px;height:17px}
.rv-scrim{display:none;position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:58}

/* ============================================================ LAYOUT */
.rv-container{max-width:980px;width:100%;margin:0 auto;padding:44px 40px 80px}
.rv-container.wide{max-width:1140px}

.rv-head{margin-bottom:30px}
.rv-badge{display:inline-flex;align-items:center;gap:7px;font-family:var(--mono);font-size:10px;
  letter-spacing:.16em;font-weight:500;color:var(--gold);background:var(--gold-soft);
  border:1px solid var(--gold-line);padding:5px 11px;border-radius:999px;text-transform:uppercase}
.rv-badge.violet{color:var(--g80);background:var(--accent-soft);border-color:var(--gold-line)}
.rv-h1{font-size:clamp(28px,3.6vw,42px);font-weight:800;letter-spacing:-.02em;margin:16px 0 12px;line-height:1.04}
.rv-h1 .g{color:var(--gold);font-weight:800}
.rv-sub{font-size:15.5px;color:var(--text-muted);max-width:64ch;font-weight:400}
.rv-sub strong{color:var(--text);font-weight:600}

/* stat tiles */
.rv-stats{display:flex;flex-wrap:wrap;gap:6px;margin-top:24px}
.rv-stat{flex:1;min-width:130px;background:var(--surface-1);border:1px solid var(--border);border-radius:var(--r);
  padding:13px 15px;transition:.3s var(--e)}
.rv-stat:hover{border-color:var(--border-strong);box-shadow:var(--sh)}
.rv-stat-v{font-size:24px;font-weight:800;color:var(--text);display:flex;align-items:center;gap:6px;letter-spacing:-.01em;line-height:1}
.rv-stat-v .g{color:var(--gold)}
.rv-stat-l{font-family:var(--mono);font-size:9px;letter-spacing:.1em;color:var(--text-faint);text-transform:uppercase;margin-top:8px}
.rv-stat-div{display:none}
.no-cloud{display:inline-block;width:17px;height:15px;color:var(--text-muted)}
.no-cloud svg{width:100%;height:100%}

/* buttons */
.rv-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-family:var(--sans);
  font-weight:500;font-size:13.5px;cursor:pointer;border:1px solid var(--border-strong);background:var(--surface-2);
  color:var(--text);padding:11px 18px;border-radius:var(--radius);transition:.16s var(--e);white-space:nowrap}
.rv-btn:hover{background:var(--surface-hover);transform:translateY(-1px)}
.rv-btn svg{width:15px;height:15px}
.rv-btn-gold{background:var(--gold);color:var(--bg);border:none;font-weight:600}
.rv-btn-gold:hover{background:var(--gold-bright)}
.rv-card{background:var(--surface-1);border:1px solid var(--border);border-radius:var(--r)}

/* toast */
.rv-toast{position:fixed;bottom:26px;left:calc(50% + var(--sidebar-w)/2);transform:translateX(-50%) translateY(18px);
  background:var(--surface-2);border:1px solid var(--gold-line);color:var(--text);font-weight:500;font-size:13px;
  padding:12px 20px;border-radius:var(--radius);box-shadow:var(--sh2);z-index:200;opacity:0;pointer-events:none;
  transition:.28s var(--e);display:flex;align-items:center;gap:9px;font-family:var(--sans)}
.rv-toast::before{content:'';width:6px;height:6px;border-radius:50%;background:var(--gold);box-shadow:0 0 8px var(--gold)}
.rv-toast.visible{opacity:1;transform:translateX(-50%) translateY(0)}
.rv-toast.error-toast{border-color:var(--danger)}
.rv-toast.error-toast::before{background:var(--danger);box-shadow:0 0 8px var(--danger)}
.rv-toast.raven-toast{border-color:var(--gold)}

/* works-with marquee */
.works-with{margin-top:28px}
.works-with-label{font-family:var(--mono);font-size:9px;letter-spacing:.16em;color:var(--text-faint);
  text-transform:uppercase;margin-bottom:12px;text-align:center}
.marquee-mask{overflow:hidden;-webkit-mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent);
  mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent)}
.marquee-track{display:flex;gap:10px;width:max-content;animation:marquee 38s linear infinite}
@keyframes marquee{to{transform:translateX(-50%)}}
.ai-logo-chip{display:flex;align-items:center;gap:8px;padding:8px 14px;background:var(--surface-1);
  border:1px solid var(--border);border-radius:var(--r);font-size:12.5px;font-weight:500;color:var(--text-muted);white-space:nowrap}
.ai-logo-chip img{width:16px;height:16px;border-radius:3px}

/* ============================================================ HOME */
.rv-hero{padding:18px 0 6px;border-bottom:1px solid var(--border);margin-bottom:34px}
.rv-hero-glyph{width:60px;height:60px;border-radius:13px;margin-bottom:20px;box-shadow:0 0 0 1px var(--border),0 12px 36px rgba(0,0,0,.4)}
.rv-hero h1{font-size:clamp(30px,4.6vw,50px);font-weight:800;letter-spacing:-.03em;line-height:1.02}
.rv-hero h1 .g{color:var(--gold);font-weight:800}
.rv-hero p{font-size:16px;color:var(--text-muted);max-width:60ch;margin-top:16px}
.tool-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}
.tool-card{position:relative;overflow:hidden;background:var(--surface-1);border:1px solid var(--border);
  border-radius:var(--r);padding:22px 22px;transition:.3s var(--e)}
.tool-card:hover{transform:translateY(-1px);border-color:var(--border-strong);box-shadow:var(--sh2)}
.tool-card::before{content:'';position:absolute;inset:0;opacity:0;transition:.3s;
  background:radial-gradient(ellipse at 90% 0,var(--gold-soft),transparent 70%)}
.tool-card:hover::before{opacity:1}
.tool-card .tc-ico{position:relative;width:40px;height:40px;border-radius:9px;display:grid;place-items:center;
  background:var(--gold-soft);border:1px solid var(--gold-line);color:var(--gold);margin-bottom:15px}
.tool-card .tc-ico svg{width:21px;height:21px;stroke-width:1.6}
.tool-card h3{position:relative;font-size:18px;font-weight:800;letter-spacing:-.01em}
.tool-card h3 .g{color:var(--gold)}
.tool-card p{position:relative;font-size:13px;color:var(--text-muted);margin-top:7px;line-height:1.6}
.tool-card .tc-go{position:relative;display:inline-flex;align-items:center;gap:6px;margin-top:14px;
  font-family:var(--mono);font-size:10px;letter-spacing:.12em;color:var(--gold);text-transform:uppercase}

/* ============================================================ SMARTDOC */
.drop-zone{position:relative;border:1.5px dashed var(--border-strong);border-radius:var(--r);
  padding:44px 24px;text-align:center;cursor:pointer;transition:.18s;background:var(--surface-1)}
.drop-zone:hover{border-color:var(--gold-line);background:var(--surface-2)}
.drop-zone.dragover{border-color:var(--gold);background:var(--gold-soft)}
.drop-zone input{position:absolute;inset:0;opacity:0;cursor:pointer}
.drop-icon{width:54px;height:54px;margin:0 auto 14px;border-radius:12px;display:grid;place-items:center;
  background:var(--surface-3);border:1px solid var(--border)}
.drop-icon svg{width:26px;height:26px;color:var(--gold)}
.drop-title{font-size:16px;font-weight:500}
.drop-sub{font-size:12px;color:var(--text-dim);margin-top:5px;font-family:var(--mono)}
.drop-formats{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;margin-top:16px}
.format-chip{font-family:var(--mono);font-size:10.5px;padding:4px 9px;border-radius:4px;background:var(--surface-3);border:1px solid var(--border);color:var(--text-muted)}
.file-list{display:flex;flex-direction:column;gap:6px;margin-top:16px}
.file-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 14px;
  background:var(--surface-1);border:1px solid var(--border);border-radius:var(--r);animation:fade-up .3s both}
.file-info{display:flex;align-items:center;gap:11px;min-width:0}
.file-ext{font-family:var(--mono);font-size:10px;font-weight:600;padding:3px 7px;border-radius:4px;flex:0 0 auto}
.file-name{font-size:13px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.file-meta{display:flex;align-items:center;gap:11px;flex:0 0 auto}
.file-size{font-family:var(--mono);font-size:11px;color:var(--text-dim)}
.file-remove{width:22px;height:22px;border-radius:5px;border:none;background:var(--surface-3);color:var(--text-dim);cursor:pointer;font-size:11px;transition:.15s}
.file-remove:hover{background:var(--danger-soft);color:var(--danger)}
.staged-bar{display:none;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;
  padding:12px 16px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r)}
.staged-bar.visible{display:flex;animation:fade-up .3s both}
.staged-text{font-size:12.5px;color:var(--text-muted)}
.staged-count{color:var(--gold);font-weight:600;font-family:var(--mono)}
.staged-actions{display:flex;gap:8px}
.btn-sort,.btn-clear-all{display:inline-flex;align-items:center;gap:6px;font-family:var(--sans);font-size:11.5px;
  font-weight:500;padding:7px 12px;border-radius:5px;border:1px solid var(--border);background:var(--surface-3);color:var(--text-muted);cursor:pointer;transition:.15s}
.btn-sort:hover{color:var(--text);border-color:var(--border-strong)}
.btn-sort.active{color:var(--gold);border-color:var(--gold-line)}
.btn-clear-all:hover{color:var(--danger);border-color:var(--danger)}
.btn-process-wrap{margin-top:20px}
.btn-process{position:relative;overflow:hidden;width:100%;border:1px solid var(--gold-line);cursor:pointer;
  background:var(--gold);color:var(--bg);font-family:var(--sans);font-weight:600;font-size:15px;padding:16px;border-radius:var(--radius);transition:.2s}
.btn-process:disabled{background:var(--surface-2);color:var(--text-dim);border-color:var(--border);cursor:not-allowed}
.btn-process:not(:disabled):hover{background:var(--gold-bright)}
.btn-process.processing{background:var(--surface-2);color:var(--text);border-color:var(--border);cursor:wait}
.btn-process.done{background:var(--g60);color:var(--bg)}
.btn-laser{position:absolute;left:0;top:0;height:100%;width:0;background:linear-gradient(90deg,var(--gold-soft),var(--gold));opacity:0}
.process-status{position:relative;font-family:var(--mono);font-size:12px}
.process-status span{display:inline-block;animation:fade-up .35s both}
.btn-process.processing .btn-label{display:none}
.btn-process:not(.processing) .process-status{display:none}
.btn-label{position:relative}
.result-section{display:none;margin-top:16px}
.result-section.visible{display:block;animation:fade-up .4s both}
.result-actions{display:flex;gap:8px;flex-wrap:wrap}
.btn-action{display:inline-flex;align-items:center;gap:8px;font-family:var(--sans);font-weight:500;font-size:13px;
  padding:12px 16px;border-radius:var(--radius);cursor:pointer;border:1px solid var(--border-strong);
  background:var(--surface-2);color:var(--text);transition:.16s;flex:1;justify-content:center}
.btn-action:hover{background:var(--surface-hover)}
.btn-action-download{background:var(--gold);color:var(--bg);border:none;font-weight:600}
.btn-action-download:hover{background:var(--gold-bright)}
.btn-action svg{width:14px;height:14px}

/* ============================================================ SUPERPROMPT */
.super-wrap{margin-top:6px}
.super-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px;flex-wrap:wrap}
.super-head-left{display:flex;align-items:center;gap:12px}
.super-icon{width:42px;height:42px;border-radius:10px;display:grid;place-items:center;background:var(--gold-soft);border:1px solid var(--gold-line);color:var(--gold)}
.super-icon svg{width:21px;height:21px}
.super-title{font-size:16px;font-weight:500}
.super-sub{font-size:12.5px;color:var(--text-muted);margin-top:2px}
.super-card{position:relative;overflow:hidden;background:var(--bg2);border:1px solid var(--border);border-radius:var(--r);padding:24px;max-height:540px;overflow-y:auto}
.super-card::before{content:'';position:absolute;left:0;top:0;width:2px;height:100%;background:var(--gold)}
.super-content{font-family:var(--mono);font-size:12.5px;line-height:1.85;color:var(--text-muted);white-space:pre-wrap;word-break:break-word}

/* ============================================================ FORGE */
.forge-wrap{margin-top:6px}
.forge{position:relative;background:var(--surface-1);border:1px solid var(--border);border-radius:var(--r);
  overflow:hidden;display:flex;flex-direction:column;height:min(70vh,680px)}
.forge-gate{position:absolute;inset:0;z-index:20;background:color-mix(in srgb,var(--bg) 94%,transparent);
  backdrop-filter:blur(6px);display:grid;place-items:center;padding:28px;transition:opacity .5s,visibility .5s}
.forge-gate.dismissed{opacity:0;visibility:hidden;pointer-events:none}
.forge-setup{text-align:center;max-width:420px}
.forge-setup-icon{width:54px;height:54px;border-radius:12px;margin:0 auto 14px;box-shadow:0 0 0 1px var(--gold-line)}
.forge-setup-sub{font-size:13.5px;color:var(--text-muted);margin-bottom:20px;line-height:1.6}
.forge-setup-sub strong{color:var(--gold)}
.forge-model-btns{display:flex;flex-direction:column;gap:8px}
.forge-setup-btn{display:flex;align-items:center;gap:11px;padding:13px 15px;border-radius:var(--radius);cursor:pointer;
  border:1px solid var(--border-strong);background:var(--surface-2);color:var(--text);font-family:var(--sans);font-weight:500;font-size:13.5px;transition:.16s;text-align:left}
.forge-setup-btn:hover{border-color:var(--gold-line);background:var(--surface-3)}
.forge-setup-btn svg{color:var(--gold);flex:0 0 auto}
.forge-setup-btn>span:nth-child(2){flex:1}
.forge-btn-time{font-family:var(--mono);font-size:9.5px;color:var(--text-dim);letter-spacing:.06em}
.forge-btn-badge{font-family:var(--mono);font-size:8.5px;font-weight:500;letter-spacing:.08em;padding:3px 6px;border-radius:3px;background:var(--gold-soft);color:var(--gold);border:1px solid var(--gold-line)}
.forge-load-progress{display:none;flex-direction:column;gap:9px;margin-top:6px}
.forge-load-bar{height:6px;border-radius:99px;background:var(--surface-3);overflow:hidden}
.forge-load-fill{height:100%;width:0;background:var(--gold);transition:width .3s}
.forge-load-status{font-family:var(--mono);font-size:11px;color:var(--text-muted)}
.forge-setup-error{display:none;margin-top:13px;padding:11px 13px;border-radius:var(--radius);font-size:12.5px;line-height:1.5;background:var(--danger-soft);border:1px solid var(--danger);color:var(--danger)}
.forge-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 15px;border-bottom:1px solid var(--border);background:var(--surface-2)}
.forge-head-left{display:flex;align-items:center;gap:9px}
.forge-head-icon{width:24px;height:24px;border-radius:6px}
.forge-head-title{font-weight:600;letter-spacing:.08em;font-size:13px}
.forge-head-right{display:flex;align-items:center;gap:7px}
.forge-pill{font-family:var(--mono);font-size:9px;font-weight:500;letter-spacing:.08em;padding:5px 8px;border-radius:5px;background:var(--gold-soft);color:var(--gold);border:1px solid var(--gold-line)}
.forge-gear,.forge-clear-btn{width:28px;height:28px;border-radius:6px;border:1px solid var(--border);background:var(--surface-3);color:var(--text-muted);cursor:pointer;display:grid;place-items:center;transition:.15s}
.forge-gear:hover{color:var(--text);border-color:var(--border-strong)}
.forge-clear-btn:hover{color:var(--danger);border-color:var(--danger);background:var(--danger-soft)}
.forge-think-toggle{display:flex;align-items:center;gap:6px;padding:5px 9px;border-radius:6px;cursor:pointer;
  border:1px solid var(--border);background:var(--surface-3);font-family:var(--mono);font-size:9px;font-weight:500;letter-spacing:.06em;color:var(--text-dim);transition:.15s}
.forge-think-toggle.active{border-color:var(--gold-line);color:var(--gold);background:var(--gold-soft)}
.forge-think-state{color:var(--text-muted)}
.forge-think-toggle.active .forge-think-state{color:var(--gold)}
.forge-chat{flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:14px}
.forge-welcome{margin:auto;text-align:center;color:var(--text-dim);display:flex;flex-direction:column;align-items:center;gap:11px}
.forge-welcome img{width:38px;height:38px;border-radius:9px;opacity:.5}
.forge-welcome span{font-size:12.5px;font-family:var(--mono)}
.forge-msg{display:flex;gap:10px;max-width:88%;animation:fade-up .3s both}
.forge-msg-user{align-self:flex-end;flex-direction:row-reverse}
.forge-msg-avatar{width:26px;height:26px;border-radius:6px;flex:0 0 auto}
.forge-msg-bubble{position:relative;padding:12px 15px;border-radius:10px;font-size:14px;line-height:1.65;word-wrap:break-word}
.forge-msg-assistant .forge-msg-bubble{background:var(--surface-3);border:1px solid var(--border);border-top-left-radius:3px}
.forge-msg-user .forge-msg-bubble{background:var(--gold);color:var(--bg);font-weight:500;border-top-right-radius:3px}
.forge-msg-bubble pre{background:var(--bg2);border:1px solid var(--border);border-radius:6px;padding:11px;overflow-x:auto;margin:8px 0;font-family:var(--mono);font-size:12px}
.forge-msg-bubble code{font-family:var(--mono);font-size:.9em;background:var(--surface-hover);padding:1px 5px;border-radius:3px}
.forge-msg-bubble pre code{background:none;padding:0}
.forge-cursor{display:inline-block;width:6px;height:14px;background:var(--gold);margin-left:2px;vertical-align:-2px;animation:blink 1s steps(2) infinite}
@keyframes blink{50%{opacity:0}}
.forge-typing{display:inline-flex;gap:4px;padding:3px 0}
.forge-typing-dot{width:6px;height:6px;border-radius:50%;background:var(--text-dim);animation:bounce 1.2s ease-in-out infinite}
.forge-typing-dot:nth-child(2){animation-delay:.15s}.forge-typing-dot:nth-child(3){animation-delay:.3s}
@keyframes bounce{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-5px);opacity:1}}
.forge-msg-meta{font-family:var(--mono);font-size:9px;color:var(--text-dim);margin-top:6px;letter-spacing:.04em}
.forge-sys{align-self:center;font-family:var(--mono);font-size:10.5px;color:var(--text-dim);background:var(--surface-2);padding:5px 11px;border-radius:5px}
.forge-copy-btn{position:absolute;top:7px;right:7px;width:22px;height:22px;border-radius:5px;border:1px solid var(--border);background:var(--surface-2);color:var(--text-dim);cursor:pointer;display:grid;place-items:center;opacity:0;transition:.15s}
.forge-msg-bubble:hover .forge-copy-btn{opacity:1}.forge-copy-btn:hover{color:var(--gold)}
.forge-error-details{margin-top:8px;font-size:11px}
.forge-error-details summary{cursor:pointer;color:var(--text-dim);font-family:var(--mono)}
.forge-error-details pre{margin-top:6px;background:var(--bg2);padding:9px;border-radius:5px;overflow-x:auto;color:var(--danger)}
.forge-input-wrap{padding:13px;border-top:1px solid var(--border);background:var(--surface-2)}
.forge-bar{display:flex;align-items:flex-end;gap:9px;background:var(--surface-1);border:1px solid var(--border-strong);border-radius:var(--radius);padding:7px 7px 7px 14px;transition:border-color .15s}
.forge-bar:focus-within{border-color:var(--gold-line)}
.forge-textarea{flex:1;background:none;border:none;color:var(--text);font-family:var(--sans);font-size:14px;resize:none;outline:none;max-height:120px;padding:6px 0}
.forge-send{width:36px;height:36px;border-radius:7px;border:none;cursor:pointer;flex:0 0 auto;display:grid;place-items:center;background:var(--surface-3);color:var(--text-dim);transition:.16s}
.forge-send.active{background:var(--gold);color:var(--bg)}
.forge-send:disabled{cursor:not-allowed}
.forge-modal-bg{position:fixed;inset:0;z-index:120;background:rgba(0,0,0,.55);display:none;place-items:center;padding:20px}
.forge-modal-bg.open{display:grid;animation:fade-up .2s both}
.forge-modal{background:var(--surface-1);border:1px solid var(--border-strong);border-radius:var(--r);padding:22px;width:340px}
.forge-modal h3{font-size:15px;margin-bottom:14px;font-weight:500}
.forge-modal label{display:block;font-family:var(--mono);font-size:9.5px;letter-spacing:.08em;color:var(--text-dim);text-transform:uppercase;margin:13px 0 6px}
.forge-modal input{width:100%;background:var(--surface-3);border:1px solid var(--border);border-radius:6px;padding:10px 12px;color:var(--text);font-family:var(--mono);font-size:13.5px}
.forge-modal-close{margin-top:18px;width:100%;padding:11px;border-radius:var(--radius);border:none;cursor:pointer;background:var(--gold);color:var(--bg);font-weight:600;font-size:13.5px}

/* ============================================================ CIPHER */
.cph{margin-top:6px;display:flex;flex-direction:column;gap:16px}
.cph-stage{position:relative;background:var(--surface-1);border:1px solid var(--border);border-radius:var(--r);padding:38px 26px;text-align:center;overflow:hidden}
.cph-stage::before{content:'';position:absolute;inset:0;pointer-events:none;opacity:.6;background:radial-gradient(460px 220px at 50% 0,var(--gold-soft),transparent 70%)}
.cph-orb-wrap{position:relative;width:150px;height:150px;margin:0 auto 6px;display:grid;place-items:center}
.cph-orb{position:relative;z-index:2;width:100px;height:100px;border-radius:50%;border:none;cursor:pointer;display:grid;place-items:center;color:var(--bg);background:var(--gold);box-shadow:0 8px 30px rgba(201,168,76,.3);transition:.2s}
.cph-orb:hover{background:var(--gold-bright)}
.cph-orb:disabled{background:var(--surface-3);color:var(--text-dim);box-shadow:none;cursor:not-allowed}
.cph-orb svg{width:38px;height:38px}
.cph-orb .cph-stop{display:none}
.cph-ring{position:absolute;inset:0;border-radius:50%;border:1.5px solid var(--gold-line);opacity:0}
.cph.recording .cph-ring{opacity:1;animation:cph-pulse 1.6s ease-out infinite}
.cph.recording .cph-ring.r2{animation-delay:.5s}.cph.recording .cph-ring.r3{animation-delay:1s}
@keyframes cph-pulse{0%{transform:scale(1);opacity:.6}100%{transform:scale(1.55);opacity:0}}
.cph.recording .cph-orb{background:var(--danger);color:#fff}
.cph.recording .cph-orb .cph-mic{display:none}.cph.recording .cph-orb .cph-stop{display:block}
.cph-canvas{display:block;width:100%;max-width:500px;height:64px;margin:12px auto 0}
.cph-status{font-family:var(--mono);font-size:11px;letter-spacing:.1em;color:var(--text-muted);margin-top:12px;text-transform:uppercase;min-height:15px}
.cph-status .g{color:var(--gold)}
.cph-timer{font-family:var(--mono);font-size:24px;font-weight:300;color:var(--text);margin-top:4px}
.cph-hint{font-size:12.5px;color:var(--text-dim);margin-top:6px}
.cph-load{display:none;flex-direction:column;gap:8px;max-width:420px;margin:16px auto 0}
.cph-load.show{display:flex}
.cph-load-row{display:flex;flex-direction:column;gap:5px}
.cph-load-row .lbl{display:flex;justify-content:space-between;font-family:var(--mono);font-size:9.5px;color:var(--text-dim)}
.cph-load-bar{height:5px;border-radius:99px;background:var(--surface-3);overflow:hidden}
.cph-load-bar i{display:block;height:100%;width:0;background:var(--gold);transition:width .25s}
.cph-drop{display:inline-flex;align-items:center;gap:8px;margin-top:16px;font-family:var(--mono);font-size:10.5px;letter-spacing:.04em;color:var(--text-dim);cursor:pointer;border:1px dashed var(--border-strong);padding:9px 15px;border-radius:var(--radius);transition:.15s}
.cph-drop:hover{color:var(--gold);border-color:var(--gold-line)}
.cph-drop input{display:none}
.cph-result{display:none;background:var(--surface-1);border:1px solid var(--border);border-radius:var(--r);overflow:hidden}
.cph-result.show{display:block;animation:fade-up .4s both}
.cph-result-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--border);background:var(--surface-2)}
.cph-result-head .t{display:flex;align-items:center;gap:9px;font-weight:500;font-size:13.5px}
.cph-result-head .t svg{width:16px;height:16px;color:var(--gold)}
.cph-meta{font-family:var(--mono);font-size:9.5px;color:var(--text-dim);letter-spacing:.06em}
.cph-text{padding:20px;font-size:15px;line-height:1.8;color:var(--text);white-space:pre-wrap;min-height:84px;max-height:420px;overflow-y:auto}
.cph-text:empty::before{content:'Transcript will appear here…';color:var(--text-dim);font-style:italic}
.cph-text .interim{color:var(--text-dim)}
.cph-actions{display:flex;gap:8px;padding:0 16px 16px}
.cph-actions .rv-btn{flex:1}

/* ============================================================ MISC / FOOT / RESPONSIVE */
@keyframes fade-up{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
.rv-view{display:none}
.rv-view.active{display:block;animation:fade-up .25s both}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.5}}
.page-foot{display:none}
.page-foot .g{color:var(--gold)}
.page-foot a:hover{color:var(--gold)}

@media(max-width:920px){
  .rv-sidebar{transform:translateX(-100%);transition:transform .28s var(--e);width:248px;z-index:62}
  body.nav-open .rv-sidebar{transform:translateX(0)}
  body.nav-open .rv-scrim{display:block}
  .rv-main{margin-left:0}
  .rv-burger{display:grid}
  .rv-container{padding:26px 18px 64px}
  .rv-toast{left:50%}
  .rv-ticker{left:0}
  .tool-grid{grid-template-columns:1fr}
}
