:root {
  /* Neutral base palette — accent is overridden live by /theme.css */
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f5;
  --surface-3: #e6e9ee;
  --ink: #1a1d21;
  --ink-soft: #4a5159;
  --muted: #8b929b;
  --accent: #4f46e5;
  --accent-2: #4f46e5;
  --accent-dark: #3f37c9;
  --on-accent: #ffffff;
  --line: rgba(20, 22, 26, 0.09);
  --line-2: rgba(20, 22, 26, 0.14);
  --ok: #027a48;
  --ok-bg: #ecfdf3;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(20, 16, 12, 0.06);
  --shadow: 0 6px 24px rgba(20, 16, 12, 0.08);
  --shadow-lg: 0 24px 60px rgba(20, 16, 12, 0.14);

  --font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
button { font-family: var(--font); }
::selection { background: rgba(197, 71, 45, 0.18); }

/* Scrollbars */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--line-2); background-clip: padding-box; }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--on-accent); border: 0;
  padding: 13px 18px; border-radius: var(--radius-sm); font-weight: 600; font-size: 15px;
  cursor: pointer; width: 100%; transition: transform .15s var(--ease), background .15s, box-shadow .15s;
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-2);
  padding: 11px 14px; border-radius: var(--radius-sm); cursor: pointer; width: 100%;
  font-size: 14px; font-weight: 600; transition: background .15s, border-color .15s, transform .15s var(--ease);
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--accent); transform: translateY(-1px); }

/* Brand wordmark */
.brand { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 8px; }
.brand.small { font-size: 18px; }
.brand .accent { color: var(--accent); }
.bolt { color: var(--accent); }

/* ============================ AUTH ============================ */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-hero {
  position: relative; overflow: hidden; color: #fff; padding: 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(1200px 500px at -10% -10%, rgba(255,255,255,.18), transparent 60%),
    linear-gradient(150deg, var(--accent-2) 0%, var(--accent) 45%, var(--accent-dark) 100%);
}
.auth-hero::after {
  content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 65%); border-radius: 50%;
}
.auth-hero .brand { color: #fff; position: relative; z-index: 1; }
.auth-hero .brand .accent { color: #ffe2d8; }
.auth-hero .bolt { color: #ffe2d8; }
.hero-copy { position: relative; z-index: 1; }
.hero-copy h1 { font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 16px; }
.hero-copy h1 em { font-style: normal; color: #ffe2d8; }
.hero-copy p { font-size: 17px; line-height: 1.6; color: rgba(255,255,255,.9); max-width: 440px; }
.hero-features { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; }
.hero-feature { display: flex; align-items: center; gap: 12px; font-size: 15px; color: rgba(255,255,255,.95); }
.hero-feature .tick { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; flex-shrink: 0; font-size: 13px; }

.auth-panel { display: grid; place-items: center; padding: 32px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .brand { margin-bottom: 6px; }
.tagline { color: var(--muted); margin: 0 0 28px; font-size: 15px; }
.field { display: block; margin-bottom: 18px; }
.field span { display: block; font-size: 13px; font-weight: 500; color: var(--ink-soft); margin-bottom: 7px; }
.field input {
  width: 100%; padding: 13px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-size: 15px; font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(197,71,45,.12); }
.field input::placeholder { color: #b8ab9b; }
.switch { text-align: center; margin-top: 22px; font-size: 14px; color: var(--muted); }
.switch a { font-weight: 600; }
.alert { background: #fdecea; color: #b42318; padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14px; border: 1px solid #f7d4cf; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ============================ APP / CHAT ============================ */
.app { display: grid; grid-template-columns: 296px 1fr; height: 100vh; overflow: hidden; }
.backdrop { display: none; }
.backdrop.show { display: block; position: fixed; inset: 0; background: rgba(20, 16, 12, 0.4); z-index: 35; }

.sidebar { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.sidebar-top { padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.new-chat {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; border: 0; padding: 12px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s, transform .15s var(--ease);
}
.new-chat:hover { background: var(--accent-dark); transform: translateY(-1px); }
.conv-list { flex: 1; overflow-y: auto; padding: 4px 10px; display: flex; flex-direction: column; gap: 3px; }
.conv-list .group-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 8px 6px; }
.conv-item { padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; color: var(--ink-soft); border: 1px solid transparent; transition: background .12s; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item:hover { background: var(--surface-2); }
.conv-item.active { background: var(--surface-2); color: var(--ink); border-color: var(--line); font-weight: 500; }
.conv-item .meta { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; font-weight: 400; }
.sidebar-footer { border-top: 1px solid var(--line); padding: 12px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; flex-shrink: 0; }
.who { flex: 1; min-width: 0; }
.who .name { font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .role { font-size: 11px; color: var(--muted); }
.icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; transition: background .12s, color .12s; }
.icon-btn:hover { background: var(--surface-2); color: var(--accent); }
.admin-link { display: block; padding: 8px 12px; margin: 0 10px 6px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; color: var(--accent); }
.admin-link:hover { background: var(--surface-2); }
.usage-meter { padding: 10px 16px; border-top: 1px solid var(--line); }
.usage-text { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.usage-bar { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.usage-fill { height: 100%; width: 0%; background: var(--accent); border-radius: 999px; transition: width .3s var(--ease); }
.usage-fill.warn { background: #d98c00; }
.usage-fill.full { background: var(--danger); }

/* Chat main */
.chat { display: flex; flex-direction: column; height: 100vh; min-width: 0; background: var(--bg); }
.chat-topbar { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: rgba(253,248,240,.85); backdrop-filter: blur(8px); }
.chat-topbar .title { font-weight: 600; font-size: 15px; }
.hamburger { display: none; }

.messages { flex: 1; overflow-y: auto; padding: 28px 20px; }
.messages-inner { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }

.row { display: flex; gap: 14px; align-items: flex-start; animation: rise .35s var(--ease); }
.row.user { flex-direction: row-reverse; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.row .ava { width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; font-size: 15px; font-weight: 600; }
.row.assistant .ava { background: linear-gradient(140deg, var(--accent-2), var(--accent)); color: #fff; }
.row.user .ava { background: var(--surface-3); color: var(--ink); }
.bubble { padding: 4px 2px; line-height: 1.6; font-size: 15px; min-width: 0; }
.row.user .bubble { background: var(--accent); color: #fff; padding: 11px 15px; border-radius: 16px 16px 4px 16px; max-width: 78%; }
.row.assistant .bubble { color: var(--ink); }
.bubble :first-child { margin-top: 0; } .bubble :last-child { margin-bottom: 0; }
.bubble p { margin: 0 0 10px; }
.bubble h1, .bubble h2, .bubble h3 { margin: 16px 0 8px; line-height: 1.3; font-weight: 700; }
.bubble h1 { font-size: 20px; } .bubble h2 { font-size: 18px; } .bubble h3 { font-size: 16px; }
.bubble ul, .bubble ol { margin: 0 0 10px; padding-left: 20px; }
.bubble li { margin: 4px 0; }
.bubble strong { font-weight: 700; }
.bubble code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; }
.bubble pre { background: var(--ink); color: #f3ede3; padding: 14px 16px; border-radius: 12px; overflow-x: auto; margin: 0 0 10px; }
.bubble pre code { background: none; padding: 0; color: inherit; }
.bubble blockquote { border-left: 3px solid var(--accent); margin: 0 0 10px; padding: 2px 0 2px 14px; color: var(--ink-soft); }
.bubble hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.bubble table { border-collapse: collapse; margin: 4px 0 12px; font-size: 14px; width: 100%; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); }
.bubble th, .bubble td { border-bottom: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.bubble thead th { background: var(--surface-2); font-weight: 600; }
.bubble tbody tr:last-child td { border-bottom: 0; }
.bubble a { text-decoration: underline; }
.row.user .bubble a { color: #ffe2d8; }

/* typing dots */
.typing-dots { display: inline-flex; gap: 5px; padding: 6px 2px; }
.typing-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: .5; animation: blink 1.2s infinite both; }
.typing-dots i:nth-child(2) { animation-delay: .2s; } .typing-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* empty state + suggestions */
.empty-state { max-width: 640px; margin: 8vh auto 0; text-align: center; }
.empty-state .logo-badge { width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 18px; display: grid; place-items: center; font-size: 30px; background: linear-gradient(140deg, var(--accent-2), var(--accent)); color: #fff; box-shadow: var(--shadow); }
.empty-state h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 8px; }
.empty-state p { color: var(--muted); margin: 0 0 26px; font-size: 16px; }
.suggestions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.suggestion { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; cursor: pointer; transition: border-color .15s, transform .15s var(--ease), box-shadow .15s; }
.suggestion:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.suggestion .s-title { font-weight: 600; font-size: 14px; margin-bottom: 3px; }
.suggestion .s-sub { font-size: 12.5px; color: var(--muted); }

/* composer */
.composer-wrap { padding: 12px 20px 18px; }
.composer-inner { max-width: 780px; margin: 0 auto; }
.file-chip { display: none; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 8px 6px 12px; font-size: 13px; color: var(--ink-soft); margin-bottom: 8px; width: fit-content; }
.file-chip.show { display: inline-flex; }
.file-chip button { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1; }
.composer { display: flex; align-items: flex-end; gap: 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 8px 8px 8px 8px; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(197,71,45,.10); }
.composer textarea { flex: 1; resize: none; max-height: 180px; border: 0; background: none; color: var(--ink); font-size: 15px; font-family: inherit; padding: 9px 6px; outline: none; line-height: 1.5; }
.composer textarea::placeholder { color: #b8ab9b; }
.attach { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; color: var(--muted); flex-shrink: 0; transition: background .12s, color .12s; }
.attach:hover { background: var(--surface-2); color: var(--accent); }
.send { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #fff; border: 0; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; transition: background .15s, transform .15s var(--ease); }
.send:hover { background: var(--accent-dark); }
.send:disabled { background: var(--surface-3); color: var(--muted); cursor: default; }
.disclaimer { text-align: center; font-size: 11.5px; color: var(--muted); margin-top: 10px; }

/* ============================ ADMIN ============================ */
.admin { max-width: 1140px; margin: 0 auto; padding: 30px 24px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.admin-header .brand { white-space: nowrap; }
.admin-header .btn-secondary { width: auto; flex-shrink: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 16px; margin-bottom: 30px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.stat .num { display: block; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 2px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 6px; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 10px; }
.panel-head h3 { margin: 0; font-size: 16px; }
.search { border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-family: inherit; width: 220px; outline: none; background: var(--bg); }
.search:focus { border-color: var(--accent); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: var(--surface-2); }
.badge { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--surface-2); color: var(--ink-soft); }
.badge.qualified { background: var(--ok-bg); color: var(--ok); }
.badge.handed_off { background: #fdecea; color: var(--accent); }
.badge.converted { background: var(--ok-bg); color: var(--ok); }

/* ============================ FILES ============================ */
.files-wrap { max-width: 1140px; margin: 0 auto; padding: 30px 24px; }
.files-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.files-header .brand { white-space: nowrap; }
.files-header .btn-secondary { width: auto; flex-shrink: 0; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.file-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s var(--ease); }
.file-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.file-thumb { height: 150px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-thumb .ext { font-size: 40px; }
.file-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.file-name { font-weight: 600; font-size: 13px; word-break: break-all; }
.file-sum { font-size: 12px; color: var(--accent); font-weight: 500; }
.file-when { font-size: 11px; color: var(--muted); margin-top: auto; padding-top: 4px; }
.file-actions { display: flex; gap: 14px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.file-actions a, .file-actions button { font-size: 12.5px; font-weight: 600; color: var(--accent); background: none; border: 0; cursor: pointer; text-decoration: none; padding: 0; font-family: inherit; }
.file-actions .del { color: var(--muted); margin-left: auto; }
.file-actions .del:hover { color: var(--accent); }
.empty-files { text-align: center; color: var(--muted); padding: 70px 0; }

/* conversation files drawer */
.files-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; cursor: pointer; font-family: inherit; }
.files-btn:hover { border-color: var(--accent); color: var(--accent); }
.topbar-spacer { flex: 1; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 344px; max-width: 86vw; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .25s var(--ease); z-index: 45; display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); font-weight: 700; }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.dfile { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.dfile .th { width: 46px; height: 46px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; font-size: 20px; }
.dfile .th img { width: 100%; height: 100%; object-fit: cover; }
.dfile .info { flex: 1; min-width: 0; }
.dfile .nm { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dfile .sm { font-size: 11px; color: var(--muted); }
.dfile .acts { display: flex; gap: 8px; }
.dfile .acts a { color: var(--accent); }
.drawer-empty { color: var(--muted); text-align: center; padding: 40px 0; font-size: 14px; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-hero { display: none; } }
@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 40; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .hamburger { display: grid; }
  .backdrop { display: none; position: fixed; inset: 0; background: rgba(20,16,12,.4); z-index: 35; }
  .backdrop.show { display: block; }
  .suggestions { grid-template-columns: 1fr; }
  .row.user .bubble { max-width: 85%; }
}

/* ============================ POWER-UPS (streaming, actions, conv mgmt) ============================ */
/* message actions (copy / regenerate) */
.msg-actions { display: flex; gap: 14px; margin-top: 8px; padding-left: 46px; }
.row.user .msg-actions { display: none; }
.msg-actions button { background: none; border: 0; color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 0; font-family: inherit; }
.msg-actions button:hover { color: var(--accent); }

/* stop button state */
.send.stop { background: var(--ink); }
.send.stop:hover { background: #000; }

/* conversation search */
.conv-search { width: 100%; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); font-size: 13px; font-family: inherit; outline: none; }
.conv-search:focus { border-color: var(--accent); }

/* conversation item with menu */
.conv-item { display: flex; align-items: center; gap: 6px; position: relative; }
.conv-item .conv-main { flex: 1; min-width: 0; overflow: hidden; }
.conv-item .conv-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-menu-btn { opacity: 0; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 6px; flex-shrink: 0; }
.conv-item:hover .conv-menu-btn { opacity: 1; }
.conv-menu-btn:hover { background: var(--surface-3); color: var(--ink); }
.conv-menu { position: absolute; right: 8px; top: 36px; z-index: 20; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; display: flex; flex-direction: column; min-width: 130px; }
.conv-menu button { background: none; border: 0; text-align: left; padding: 8px 10px; border-radius: 7px; font-size: 13px; cursor: pointer; color: var(--ink); font-family: inherit; }
.conv-menu button:hover { background: var(--surface-2); }
.conv-menu button.danger { color: var(--danger); }

/* code blocks: ensure hljs (dark theme) sits on our dark surface */
.bubble pre { padding: 0; }
.bubble pre code.hljs { padding: 14px 16px; border-radius: 12px; display: block; overflow-x: auto; }

/* consent + content pages + danger zone */
.consent { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--muted); margin-bottom: 18px; cursor: pointer; }
.consent input { margin-top: 2px; flex-shrink: 0; accent-color: var(--accent); }
.consent a { color: var(--accent); font-weight: 600; }
.doc-wrap { max-width: 760px; margin: 0 auto; padding: 40px 24px; line-height: 1.7; }
.doc-wrap h1 { letter-spacing: -0.02em; }
.doc-wrap h2 { margin-top: 28px; font-size: 18px; }
.doc-wrap a { color: var(--accent); font-weight: 600; }
.danger-zone { border: 1px solid #f3c2bb; background: #fdecea; border-radius: var(--radius); padding: 18px; }
.danger-zone h3 { margin: 0 0 6px; color: #b42318; }
.btn-danger { background: var(--danger); color: #fff; border: 0; padding: 11px 16px; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-danger:hover { filter: brightness(0.93); }
