/* model.do v4.0.1 — private decision engine + Debate Beta. No external assets. */
:root {
  --bg: #0e1517;
  --sidebar: #10191b;
  --surface: #141d20;
  --surface-2: #1a2529;
  --surface-3: #202e32;
  --line: #26383e;
  --text: #e9edeb;
  --muted: #8fa2a0;
  --brass: #c9a961;
  --lane-a: #6fb4c4;
  --lane-b: #c48fb4;
  --lane-c: #9bbe8f;
  --danger: #dc8176;
  --ok: #7fc995;
  --glow: color-mix(in srgb, var(--brass) 32%, transparent);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --radius: 12px;
  --maxw: 1040px;
  --sidebar-w: 258px;
}

[data-theme="light"] {
  --bg: #f4f6f5;
  --sidebar: #eef2f0;
  --surface: #ffffff;
  --surface-2: #e8eeeb;
  --surface-3: #dde6e2;
  --line: #d2ddd8;
  --text: #182325;
  --muted: #5d706e;
  --brass: #8f6d21;
  --lane-a: #26758b;
  --lane-b: #8b4976;
  --lane-c: #4e7d43;
  --danger: #b84d42;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font: 15px/1.55 var(--sans);
}
button, select, textarea { font: inherit; }
button, select { color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app-shell { display: flex; min-height: 100dvh; }
.app-main { display: flex; flex: 1; min-width: 0; min-height: 100dvh; flex-direction: column; }

/* Sidebar / workspaces */
.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  width: var(--sidebar-w);
  height: 100dvh;
  flex: 0 0 var(--sidebar-w);
  flex-direction: column;
  padding: 14px 12px;
  border-inline-end: 1px solid var(--line);
  background: var(--sidebar);
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 14px; }
.wordmark { color: var(--text); font: 22px var(--serif); letter-spacing: -.02em; text-decoration: none; }
.wordmark .dot { color: var(--brass); }
.sidebar-close { display: none; }
.new-chat {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface);
  font-weight: 650;
  cursor: pointer;
}
.new-chat:hover { background: var(--surface-2); }
.sidebar-label { margin: 20px 9px 7px; color: var(--muted); font: 700 11px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.expert-picker { display: grid; gap: 3px; }
.expert {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  text-align: start;
  cursor: pointer;
}
.expert:hover { color: var(--text); background: var(--surface); }
.expert.is-active { color: var(--text); background: var(--surface-2); }
.x-icon { display: grid; width: 22px; height: 22px; place-items: center; color: var(--brass); font: 700 15px var(--mono); }
.sidebar-spacer { flex: 1; min-height: 18px; }
.privacy-link { display: flex; align-items: center; gap: 8px; padding: 8px 10px; color: var(--muted); font-size: 12px; text-decoration: none; }
.guest-card { display: grid; gap: 2px; margin-top: 6px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.guest-card strong { font-size: 12px; }
.guest-card span { color: var(--muted); font-size: 11px; }
.sidebar-backdrop { display: none; }

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 60px;
  align-items: center;
  gap: 14px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(12px);
}
.topbar-context { display: flex; min-width: 120px; align-items: center; gap: 9px; }
.current-expert { overflow: hidden; max-width: 150px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-open { display: none; }
.modes { display: flex; gap: 2px; margin-inline: auto; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.mode { padding: 6px 15px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 650; cursor: pointer; }
.mode.is-active { color: var(--text); background: var(--surface-3); }
.mode[data-mode="consensus"].is-active { color: var(--brass); }
.mode[data-mode="debate"] { display: inline-flex; align-items: center; gap: 5px; }
.mode[data-mode="debate"] sup { padding: 1px 4px; border-radius: 999px; color: #101516; background: var(--brass); font: 800 7px var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.mode[data-mode="debate"].is-active { color: var(--brass); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brass) 38%, transparent); }
.topbar-right { display: flex; align-items: center; gap: 7px; }
.iconbtn { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface); cursor: pointer; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); font: 500 11px var(--mono); cursor: pointer; }
.pulse { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.language-control select { max-width: 145px; padding: 7px 30px 7px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface); font-size: 12px; }

/* Hero and conversation */
.stage { display: flex; width: 100%; max-width: var(--maxw); flex: 1; align-self: center; flex-direction: column; padding: 42px 24px 210px; }
.hero { margin: auto 0; padding: 30px 0 55px; }
.eyebrow { color: var(--brass); font: 700 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.hero-title { max-width: 820px; margin: 15px 0 20px; font: 400 clamp(38px, 5.2vw, 70px)/1.05 var(--serif); letter-spacing: -.035em; }
.hero-title em { color: var(--lane-a); font-weight: 400; }
.hero-brass { color: var(--brass); }
.hero-sub { max-width: 620px; margin: 0 0 30px; color: var(--muted); font-size: 16px; }
.hero-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.hero-mode { display: grid; gap: 5px; min-height: 105px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); background: var(--surface); text-align: start; cursor: pointer; }
.hero-mode:hover { border-color: var(--lane-a); transform: translateY(-1px); }
.hero-mode strong { font: 700 12px var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.hero-mode span { color: var(--muted); font-size: 13px; }
.hero-mode-brass { border-color: color-mix(in srgb, var(--brass) 55%, var(--line)); }
.hero-mode-brass strong { color: var(--brass); }
.hero-mode-debate { position: relative; overflow: hidden; border-color: color-mix(in srgb, var(--brass) 74%, var(--line)); background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 91%, var(--brass)), var(--surface)); }
.hero-mode-debate::after { content: ""; position: absolute; width: 110px; height: 110px; inset: -65px -48px auto auto; border-radius: 50%; background: var(--glow); filter: blur(16px); }
.hero-mode-top { display: flex; align-items: center; justify-content: space-between; }
.hero-mode-top b { position: relative; z-index: 1; padding: 2px 6px; border-radius: 999px; color: #101516; background: var(--brass); font: 800 8px var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.starter-wrap { display: grid; gap: 9px; margin-top: 22px; }
.starter-label { color: var(--muted); font: 700 10px var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.starter-prompts { display: flex; flex-wrap: wrap; gap: 7px; }
.starter-prompt { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: transparent; font-size: 12px; text-align: start; cursor: pointer; }
.starter-prompt:hover { border-color: var(--lane-a); color: var(--text); background: var(--surface); }
.trust-strip { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; color: var(--muted); font: 500 11px var(--mono); }
.trust-strip span::before { content: "✓"; margin-inline-end: 6px; color: var(--ok); }
.thread { display: flex; flex-direction: column; gap: 24px; width: 100%; }
.msg-user { max-width: 72%; align-self: flex-end; padding: 11px 15px; border-radius: 15px 15px 3px 15px; background: var(--surface-3); white-space: pre-wrap; }
[dir="rtl"] .msg-user { align-self: flex-start; border-radius: 15px 15px 15px 3px; }
.lanes { display: grid; gap: 12px; width: 100%; }
.lanes[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
.lanes[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lanes[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lane { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-top: 2px solid var(--lane-a); border-radius: var(--radius); background: var(--surface); }
.lane:nth-child(2) { border-top-color: var(--lane-b); }
.lane:nth-child(3) { border-top-color: var(--lane-c); }
.lane.is-chosen { box-shadow: 0 0 0 2px color-mix(in srgb, var(--brass) 60%, transparent); }
.lane.is-chosen { border-top-color: var(--brass); }
.lanes.is-blind .lane { position: relative; }
.lanes.is-blind .lane::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, transparent, var(--brass), transparent); opacity: .55; animation: scan 2.2s ease-in-out infinite; }
@keyframes scan { 50% { opacity: 1; filter: brightness(1.35); } }
.lane-head { display: flex; min-height: 39px; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.lane-label { overflow: hidden; font: 700 11px var(--mono); letter-spacing: .03em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.lane-provider { padding: 2px 6px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font: 600 9px var(--mono); white-space: nowrap; }
.lane-time { margin-inline-start: auto; color: var(--muted); font: 600 9px var(--mono); white-space: nowrap; }
.lane-actions { display: flex; gap: 4px; margin-inline-start: auto; }
.copy-btn, .choose-btn { padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: transparent; font-size: 10px; cursor: pointer; }
.lane-body { min-height: 115px; padding: 14px; overflow-wrap: anywhere; }
.lane-body.is-error { min-height: 50px; color: var(--danger); font-size: 13px; }
.rt p { margin: 0 0 .8em; }
.rt p:last-child { margin-bottom: 0; }
.rt h1, .rt h2, .rt h3 { margin: 1em 0 .45em; line-height: 1.25; }
.rt h1 { font-size: 20px; } .rt h2 { font-size: 17px; } .rt h3 { font-size: 15px; }
.rt ul, .rt ol { margin: .5em 0 .8em; padding-inline-start: 22px; }
.rt code { padding: 2px 4px; border-radius: 4px; background: var(--surface-3); font: .9em var(--mono); }
.rt pre { overflow-x: auto; padding: 12px; border-radius: 8px; background: #091012; }
.rt pre code { padding: 0; background: transparent; }
.cursor::after { content: ""; display: inline-block; width: 6px; height: 1em; margin-inline-start: 3px; vertical-align: -.12em; background: var(--brass); animation: blink .8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.verdict { overflow: hidden; border: 1px solid color-mix(in srgb, var(--brass) 55%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 94%, var(--brass)); }
.verdict-head { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.verdict-title { color: var(--brass); font: 700 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.verdict-sub { color: var(--muted); font-size: 12px; }
.verdict-copy { margin-inline-start: auto; }
.verdict-body { padding: 18px; }
.verdict-body h2, .verdict-body h3 { color: var(--brass); }

/* Debate Beta — the wait becomes a three-act narrative. */
.debate-rail { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.debate-step { position: relative; display: grid; grid-template-columns: 27px 1fr; gap: 9px; align-items: center; min-height: 58px; padding: 9px 14px; color: var(--muted); }
.debate-step + .debate-step { border-inline-start: 1px solid var(--line); }
.debate-step::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--brass); transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
[dir="rtl"] .debate-step::after { transform-origin: right; }
.debate-step.is-active, .debate-step.is-complete { color: var(--text); }
.debate-step.is-active::after, .debate-step.is-complete::after { transform: scaleX(1); }
.debate-step.is-active { background: color-mix(in srgb, var(--surface) 92%, var(--brass)); }
.debate-step-index { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font: 700 10px var(--mono); }
.debate-step.is-active .debate-step-index { border-color: var(--brass); color: var(--brass); box-shadow: 0 0 0 4px var(--glow); }
.debate-step.is-complete .debate-step-index { border-color: var(--ok); color: var(--ok); }
.debate-step-copy { display: grid; gap: 1px; }
.debate-step-copy strong { font: 750 10px var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.debate-step-copy span { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.debate-act { display: grid; gap: 10px; }
.debate-act-head { display: flex; align-items: center; gap: 9px; color: var(--muted); font: 700 10px var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.debate-act-head::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.debate-act-head b { color: var(--brass); }
.debate-response-lanes .lane-label, .debate-rebuttal-lanes .lane-label { color: var(--text); }
.debate-rebuttal-lanes .lane { background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, var(--lane-a)), var(--surface)); }
.debate-rebuttal-lanes .lane:nth-child(2) { background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, var(--lane-b)), var(--surface)); }
.debate-rebuttal-lanes .lane-body { min-height: 180px; }
.debate-verdict { box-shadow: 0 24px 70px rgba(0,0,0,.18); }
.verdict-strength { display: grid; grid-template-columns: 128px 1fr; gap: 18px; align-items: center; padding: 17px 18px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 90%, var(--brass)); }
.strength-dial { --strength: 0; position: relative; display: grid; width: 106px; height: 106px; place-items: center; border-radius: 50%; background: conic-gradient(var(--brass) calc(var(--strength) * 1%), var(--surface-3) 0); }
.strength-dial::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--surface); }
.strength-number { position: relative; display: grid; text-align: center; font: 400 30px/1 var(--serif); }
.strength-number small { margin-top: 3px; color: var(--muted); font: 700 8px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.strength-copy { display: grid; gap: 5px; }
.strength-copy strong { font: 400 23px/1.2 var(--serif); }
.strength-copy span { color: var(--muted); font-size: 12px; }
.strength-copy em { color: var(--brass); font: 700 10px var(--mono); font-style: normal; letter-spacing: .05em; text-transform: uppercase; }
.debate-reveal { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 14px; border-top: 1px solid var(--line); }
.debate-rating { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.debate-rating button { padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: transparent; cursor: pointer; }
.debate-rating button:hover { border-color: var(--brass); }

/* Blind Arena reveal — the product's signature moment */
.arena-reveal { position: relative; overflow: hidden; padding: 20px; border: 1px solid color-mix(in srgb, var(--brass) 58%, var(--line)); border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 96%, var(--brass)), var(--surface)); box-shadow: 0 18px 55px rgba(0,0,0,.16); }
.arena-reveal::after { content: ""; position: absolute; width: 220px; height: 220px; right: -120px; top: -140px; border-radius: 50%; background: var(--glow); filter: blur(28px); pointer-events: none; }
.arena-kicker { color: var(--brass); font: 700 10px var(--mono); letter-spacing: .11em; text-transform: uppercase; }
.arena-reveal h2 { position: relative; margin: 7px 0 4px; font: 400 clamp(23px, 4vw, 34px)/1.15 var(--serif); letter-spacing: -.025em; }
.arena-reveal p { position: relative; margin: 0; color: var(--muted); font-size: 13px; }
.arena-votes { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.arena-vote { min-width: 126px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface-2); font-weight: 700; cursor: pointer; }
.arena-vote:hover { border-color: var(--brass); transform: translateY(-1px); }
.arena-vote.tie { color: var(--muted); background: transparent; }
.arena-reveal.is-revealed { animation: reveal .55s cubic-bezier(.2,.9,.2,1); }
@keyframes reveal { from { transform: scale(.985); box-shadow: 0 0 0 transparent; } 60% { box-shadow: 0 0 0 7px var(--glow); } }
.reveal-line { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.reveal-model { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font: 650 11px var(--mono); }
.reveal-model strong { color: var(--brass); }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 15px; }
.result-action { padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: transparent; font-size: 12px; font-weight: 650; cursor: pointer; }
.result-action:hover { background: var(--surface-2); }
.result-action.primary { border-color: var(--brass); color: #101516; background: var(--brass); }
.result-action.primary:hover { filter: brightness(1.07); }
.result-note { color: var(--muted); font-size: 11px; }
.sysnote { align-self: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--danger); background: var(--surface); font-size: 12px; }
.sysnote.toast { position: fixed; z-index: 60; bottom: 120px; left: 50%; transform: translateX(-50%); }

/* Privacy documents */
.doc { width: min(820px, calc(100% - 32px)); margin: 0 auto; padding: 52px 0 90px; }
.doc h1 { margin: 0 0 8px; font: 400 clamp(38px, 7vw, 60px)/1.05 var(--serif); letter-spacing: -.03em; }
.doc h2 { margin: 36px 0 10px; color: var(--brass); font: 700 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.doc p, .doc li { color: var(--text); }
.doc .muted { color: var(--muted); }
.doc table { width: 100%; border-collapse: collapse; font-size: 13px; }
.doc th, .doc td { padding: 10px; border: 1px solid var(--line); text-align: start; vertical-align: top; }
.doc th { color: var(--muted); background: var(--surface); }
.doc code { padding: 2px 4px; border-radius: 4px; background: var(--surface-2); font-family: var(--mono); }
.doc a { color: var(--lane-a); }

/* Composer */
.composer-wrap { position: fixed; z-index: 19; right: 0; bottom: 0; left: var(--sidebar-w); padding: 12px 22px max(14px, env(safe-area-inset-bottom)); pointer-events: none; }
[dir="rtl"] .composer-wrap { right: var(--sidebar-w); left: 0; }
.composer { width: min(980px, 100%); margin: 0 auto; padding: 10px 12px 8px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--surface) 97%, transparent); box-shadow: 0 -8px 36px color-mix(in srgb, #000 20%, transparent); backdrop-filter: blur(14px); pointer-events: auto; }
.debate-access { margin: -1px -2px 9px; padding: 7px 9px; border: 1px solid color-mix(in srgb, var(--brass) 44%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--surface-2) 90%, var(--brass)); }
.debate-quota-row { display: flex; align-items: center; gap: 8px; color: var(--muted); font: 650 10px var(--mono); }
.debate-live { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--brass); box-shadow: 0 0 12px var(--brass); }
.pass-open { margin-inline-start: auto; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--brass); background: transparent; font: 700 9px var(--mono); cursor: pointer; }
.pass-form { display: flex; gap: 6px; margin-top: 7px; }
.pass-form input { min-width: 0; flex: 1; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; outline: none; color: var(--text); background: var(--bg); font-size: 11px; }
.pass-form button, .pass-form a { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: var(--surface); font-size: 10px; text-decoration: none; cursor: pointer; }
.pass-form button[type="submit"] { border-color: var(--brass); color: #101516; background: var(--brass); }
.composer-tools { display: flex; align-items: center; gap: 9px; padding: 0 2px 8px; }
.model-label { color: var(--muted); font: 700 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.model-picker { display: flex; min-width: 0; flex: 1; flex-wrap: wrap; gap: 6px; }
.model-choice { display: inline-flex; min-width: 0; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.model-choice select { min-width: 130px; max-width: 220px; padding: 5px 26px 5px 8px; border: 0; color: var(--text); background: transparent; font-size: 11px; }
.model-remove { margin-inline-end: 4px; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.model-add { padding: 5px 9px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); background: transparent; font-size: 11px; cursor: pointer; }
.blind-toggle { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: transparent; font: 700 10px var(--mono); cursor: pointer; }
.blind-toggle.is-active { border-color: color-mix(in srgb, var(--brass) 68%, var(--line)); color: var(--brass); background: color-mix(in srgb, var(--surface) 92%, var(--brass)); }
.blind-eye { font-size: 10px; }
.composer-input { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea { width: 100%; max-height: 160px; resize: none; padding: 10px 4px 7px; border: 0; outline: 0; color: var(--text); background: transparent; }
.composer textarea::placeholder { color: var(--muted); }
.send { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border: 0; border-radius: 10px; color: #101516; background: var(--brass); cursor: pointer; }
.send:disabled { opacity: .45; cursor: wait; }
.composer-meta { display: flex; align-items: center; gap: 12px; padding-top: 5px; color: var(--muted); font-size: 10px; }
.dataflow { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dataflow a { text-decoration: underline; text-underline-offset: 2px; }
.meta-right { display: flex; flex: 0 0 auto; align-items: center; gap: 13px; }
.save-toggle { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.save-toggle input { accent-color: var(--brass); }
.destroy { border: 0; color: var(--danger); background: transparent; font-size: 10px; cursor: pointer; }

@media (max-width: 980px) {
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 14px 0 40px rgba(0,0,0,.28); }
  [dir="rtl"] .sidebar { transform: translateX(105%); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-close, .sidebar-open { display: grid; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 29; border: 0; background: rgba(2,8,9,.58); }
  body.sidebar-open .sidebar-backdrop { display: block; }
  .composer-wrap { left: 0; }
  [dir="rtl"] .composer-wrap { right: 0; left: 0; }
  .topbar-context { min-width: auto; }
  .hero-modes { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: 7px; padding: 8px 10px; }
  .topbar-context { order: 1; }
  .topbar-right { order: 2; margin-inline-start: auto; }
  .modes { order: 3; width: 100%; justify-content: stretch; }
  .mode { flex: 1; padding-inline: 5px; }
  .privacy-chip-text { display: none; }
  .language-control select { max-width: 112px; }
  .stage { padding: 26px 14px 235px; }
  .hero { padding: 12px 0 38px; }
  .hero-modes { grid-template-columns: 1fr; }
  .hero-mode { min-height: auto; }
  .lanes[data-count="2"], .lanes[data-count="3"] { grid-template-columns: 1fr; }
  .msg-user { max-width: 88%; }
  .composer-wrap { padding: 8px 8px max(8px, env(safe-area-inset-bottom)); }
  .composer { border-radius: 13px; }
  .model-choice { flex: 1 1 130px; }
  .model-choice select { width: 100%; max-width: none; }
  .blind-toggle span:last-child { display: none; }
  .blind-toggle { padding-inline: 8px; }
  .composer-meta { align-items: flex-end; }
  .dataflow { white-space: normal; }
  .save-toggle span { display: none; }
  .meta-right { gap: 7px; }
  .arena-vote { flex: 1 1 110px; }
  .debate-step { grid-template-columns: 1fr; justify-items: center; padding: 8px 5px; text-align: center; }
  .debate-step-copy span { display: none; }
  .verdict-strength { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .pass-form { flex-wrap: wrap; }
  .pass-form input { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Private aggregate insights */
.insights-page { min-height: 100dvh; background: radial-gradient(circle at 82% 0, color-mix(in srgb, var(--brass) 8%, transparent), transparent 32%), var(--bg); }
.insights-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 70px; }
.insights-head { display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: start; }
.insights-head h1 { margin: 5px 0 7px; font: 400 clamp(32px, 5vw, 56px)/1.05 var(--serif); letter-spacing: -.035em; }
.insights-head p { max-width: 690px; margin: 0; color: var(--muted); }
.insights-login { max-width: 670px; margin: 52px auto 0; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.insights-login label { display: block; margin-bottom: 7px; font-weight: 700; }
.insights-key-row { display: flex; gap: 8px; }
.insights-key-row input { min-width: 0; flex: 1; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; outline: none; color: var(--text); background: var(--bg); }
.insights-key-row button, .insights-toolbar button, .insights-toolbar select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface-2); cursor: pointer; }
.insights-login small { display: block; margin-top: 8px; color: var(--muted); }
.insights-error { color: var(--danger); }
.insights-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 38px 0 13px; color: var(--muted); font-size: 12px; }
.insight-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 9px; }
.insight-card { display: grid; min-height: 126px; align-content: space-between; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.insight-card span { color: var(--muted); font: 700 10px var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.insight-card strong { font: 400 30px var(--serif); }
.insight-card small { color: var(--brass); }
.insight-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.insight-panel { min-height: 260px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.insight-panel h2 { margin: 0 0 16px; font: 700 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.insight-row { display: grid; grid-template-columns: minmax(95px, 1fr) 2fr 46px; gap: 9px; align-items: center; margin: 9px 0; font-size: 12px; }
.insight-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insight-row strong { text-align: end; }
.insight-bar { height: 5px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.insight-bar i { display: block; height: 100%; border-radius: inherit; background: var(--brass); }
.insight-bar .w10 { width: 10%; } .insight-bar .w20 { width: 20%; } .insight-bar .w30 { width: 30%; }
.insight-bar .w40 { width: 40%; } .insight-bar .w50 { width: 50%; } .insight-bar .w60 { width: 60%; }
.insight-bar .w70 { width: 70%; } .insight-bar .w80 { width: 80%; } .insight-bar .w90 { width: 90%; }
.insight-bar .w100 { width: 100%; }
.vote-row { display: grid; gap: 2px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.vote-row span { color: var(--muted); overflow-wrap: anywhere; }
.insight-empty, .insights-foot { color: var(--muted); font-size: 12px; }
.insights-foot { text-align: end; }
@media (max-width: 900px) {
  .insight-cards { grid-template-columns: repeat(2, 1fr); }
  .insight-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .insights-head { grid-template-columns: 1fr; }
  .insights-key-row { flex-direction: column; }
  .insight-cards { grid-template-columns: 1fr; }
}
