:root {
  color-scheme: dark;
  --bg: #111311;
  --panel: #191c19;
  --panel-2: #202420;
  --line: #30362f;
  --muted: #929a91;
  --text: #f2f2eb;
  --acid: #d7ff45;
  --acid-ink: #182000;
  --amber: #ffc65a;
  --red: #ff6f61;
  --blue: #74b9ff;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.topbar { height: 70px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid var(--line); background: rgba(17,19,17,.96); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--acid); color: var(--acid-ink); font-weight: 950; font-size: 20px; transform: rotate(-4deg); }
.brand div { display: flex; flex-direction: column; }
.brand strong { letter-spacing: -.02em; }
.brand span:last-child { color: var(--muted); font-size: 12px; margin-top: 2px; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.live { color: var(--muted); font-size: 13px; }
.live i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; background: var(--acid); border-radius: 50%; box-shadow: 0 0 0 4px rgba(215,255,69,.12); }
.workspace { height: calc(100vh - 70px); display: grid; grid-template-columns: 238px minmax(310px, 380px) minmax(520px, 1fr); overflow: hidden; }
.filters, .queue, .detail { min-height: 0; }
.filters { padding: 20px 16px; border-right: 1px solid var(--line); overflow-y: auto; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.stat { min-height: 76px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); display: flex; flex-direction: column; justify-content: space-between; }
.stat.hero { grid-column: 1/-1; min-height: 96px; background: var(--acid); color: var(--acid-ink); border: 0; }
.stat span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .72; }
.stat strong { font-size: 29px; letter-spacing: -.05em; }
.search, .desk-select, dialog label { display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 12px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: #121512; color: var(--text); border-radius: 10px; padding: 10px 11px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--acid); box-shadow: 0 0 0 3px rgba(215,255,69,.1); }
textarea { resize: vertical; line-height: 1.45; }
.status-nav { display: flex; flex-direction: column; gap: 3px; margin: 18px 0; }
.status-nav button { display: flex; justify-content: space-between; align-items: center; border: 0; background: transparent; border-radius: 9px; padding: 9px 10px; color: #c4cbc2; text-align: left; cursor: pointer; }
.status-nav button:hover { background: var(--panel); }
.status-nav button.active { background: var(--panel-2); color: var(--acid); }
.status-nav b { min-width: 25px; border-radius: 12px; background: #2b302a; padding: 3px 7px; color: var(--muted); font-size: 11px; text-align: center; }
.status-nav .active b { background: rgba(215,255,69,.13); color: var(--acid); }
.shortcut-help { margin: 20px 4px 0; color: #687066; font-size: 11px; line-height: 1.5; }
.queue { border-right: 1px solid var(--line); background: #151715; display: flex; flex-direction: column; }
.queue-head { padding: 20px 18px 15px; display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid var(--line); }
.eyebrow { color: var(--acid); text-transform: uppercase; letter-spacing: .1em; font-size: 10px; font-weight: 800; }
.queue-head h1 { margin: 3px 0 0; font-size: 23px; letter-spacing: -.04em; }
.queue-head > span { color: var(--muted); font-size: 12px; }
.queue-list { overflow-y: auto; padding: 8px; }
.queue-card { width: 100%; display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid transparent; border-radius: 12px; background: transparent; text-align: left; cursor: pointer; }
.queue-card + .queue-card { border-top-color: #262a26; border-radius: 0; }
.queue-card:hover { background: var(--panel); border-radius: 12px; }
.queue-card.selected { background: var(--panel-2); border-color: #3a4139; border-radius: 12px; box-shadow: inset 3px 0 var(--acid); }
.card-top, .card-meta { display: flex; align-items: center; }
.card-top { justify-content: space-between; }
.card-top b { color: var(--acid); text-transform: uppercase; letter-spacing: .07em; font-size: 9px; }
.card-top em { font-style: normal; font-size: 12px; font-weight: 900; color: var(--acid); }
.queue-card > strong { font-size: 14px; line-height: 1.35; }
.card-meta { color: #a7afa5; font-size: 11px; }
.queue-card small { color: #697068; font-size: 10px; }
.status-dot { width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--amber); }
.status-dot.needs_research { background: var(--blue); }
.status-dot.needs_rewrite { background: #d399ff; }
.status-dot.published { background: var(--acid); }
.status-dot.rejected { background: var(--red); }
.loading, .empty { padding: 30px 18px; color: var(--muted); text-align: center; font-size: 13px; }
.empty { display: flex; flex-direction: column; gap: 7px; }
.detail { position: relative; overflow-y: auto; padding: 26px clamp(24px, 4vw, 64px) 110px; }
.detail-empty { max-width: 410px; margin: 22vh auto 0; text-align: center; color: var(--muted); }
.detail-empty strong { display: block; color: var(--text); font-size: 22px; margin: 20px 0 7px; }
.radar-orbit { display: grid; place-items: center; margin: auto; width: 72px; height: 72px; border: 1px solid #424a40; border-radius: 50%; color: var(--acid); font-size: 32px; box-shadow: 0 0 0 16px #191d18, 0 0 0 17px #2c322b; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.badges { display: flex; flex-wrap: wrap; gap: 7px; }
.badge { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 5px 9px; color: #bec5bc; font-size: 11px; }
.evidence-lead, .status-needs_research { color: var(--amber); border-color: rgba(255,198,90,.35); }
.evidence-confirmed, .evidence-primary_found, .status-published { color: var(--acid); border-color: rgba(215,255,69,.35); }
.score { text-align: right; white-space: nowrap; }
.score span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.score strong { color: var(--acid); font-size: 27px; letter-spacing: -.05em; }
.draft-id { margin: 24px 0 8px; color: #687066; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.detail h2 { max-width: 850px; margin: 0; font-size: clamp(27px, 3.2vw, 45px); line-height: 1.03; letter-spacing: -.055em; }
.reader-button { display: inline-block; margin-top: 17px; padding: 8px 11px; color: var(--acid); background: rgba(215,255,69,.08); border-left: 2px solid var(--acid); font-size: 12px; }
.story { max-width: 760px; margin-top: 28px; color: #e3e6de; font: 17px/1.62 Georgia, "Times New Roman", serif; }
.story p { margin: 0 0 1.05em; }
.evidence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 34px; max-width: 850px; }
.evidence-grid > div { min-height: 98px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.evidence-grid span { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 9px; }
.evidence-grid p { margin: 8px 0 0; color: #ced4cc; font-size: 13px; line-height: 1.45; }
.evidence-grid a { display: inline-block; margin-top: 12px; color: var(--acid); font-size: 13px; text-decoration: none; }
.evidence-grid a.disabled { color: var(--muted); pointer-events: none; }
.technical { max-width: 850px; margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.technical summary { padding: 13px 14px; cursor: pointer; color: var(--muted); font-size: 12px; }
.technical pre { overflow: auto; max-height: 360px; margin: 0; padding: 0 14px 14px; color: #aeb8ab; font-size: 11px; white-space: pre-wrap; }
.actions { position: fixed; left: 618px; right: 0; bottom: 0; display: flex; flex-wrap: wrap; gap: 8px; padding: 14px clamp(24px, 4vw, 64px); border-top: 1px solid var(--line); background: rgba(17,19,17,.94); backdrop-filter: blur(14px); z-index: 4; }
button.ghost, .actions button, .dialog-actions button { border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; background: var(--panel-2); cursor: pointer; }
button.ghost:hover, .actions button:hover { border-color: #596157; }
button.approve { background: var(--acid); border-color: var(--acid); color: var(--acid-ink); font-weight: 850; }
button.danger { background: rgba(255,111,97,.1); border-color: rgba(255,111,97,.35); color: #ff9e95; }
button:disabled { opacity: .35; cursor: not-allowed; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 78% 20%, rgba(215,255,69,.12), transparent 32%), var(--bg); }
.login-shell { width: min(1040px, 100%); min-height: 620px; display: grid; grid-template-columns: minmax(320px, 440px) 1fr; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--panel); box-shadow: 0 35px 100px rgba(0,0,0,.42); }
.login-card { padding: clamp(30px, 5vw, 58px); display: flex; flex-direction: column; justify-content: center; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 64px; }
.login-brand > div { display: flex; flex-direction: column; }
.login-brand > div span { color: var(--muted); font-size: 12px; margin-top: 2px; }
.login-card h1 { margin: 8px 0 6px; font-size: 42px; letter-spacing: -.055em; }
.login-card > p { margin: 0 0 28px; color: var(--muted); line-height: 1.5; }
.login-card form { display: flex; flex-direction: column; gap: 16px; }
.login-card form label { display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 12px; }
.login-card form button { width: 100%; border-radius: 10px; padding: 12px 16px; cursor: pointer; }
.login-error { min-height: 18px; margin: -5px 0 0; color: #ff9e95; font-size: 12px; }
.login-card small { margin-top: 30px; color: #687066; font-size: 10px; line-height: 1.5; }
.login-promise { padding: clamp(34px, 6vw, 76px); display: flex; flex-direction: column; justify-content: flex-end; background: var(--acid); color: var(--acid-ink); }
.login-promise > span { align-self: flex-start; border: 1px solid rgba(24,32,0,.4); border-radius: 999px; padding: 6px 10px; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.login-promise strong { margin-top: 22px; font-size: clamp(28px, 4vw, 53px); line-height: 1.02; letter-spacing: -.06em; }
.login-promise p { margin: 28px 0 0; opacity: .7; font-size: 12px; }
dialog { width: min(620px, calc(100vw - 30px)); border: 1px solid #42483f; border-radius: var(--radius); padding: 0; background: #1b1e1b; color: var(--text); box-shadow: 0 30px 90px rgba(0,0,0,.55); }
dialog::backdrop { background: rgba(4,6,4,.78); backdrop-filter: blur(5px); }
dialog form { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; }
.dialog-head h3 { margin: 4px 0 0; font-size: 23px; }
.icon-button { border: 0; background: transparent; color: var(--muted); font-size: 27px; cursor: pointer; }
.dialog-draft { margin: -5px 0 2px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.dialog-warning { margin: 0; padding: 10px 12px; border-left: 2px solid var(--amber); background: rgba(255,198,90,.06); color: #c8b990; font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; right: 24px; top: 82px; z-index: 30; max-width: 380px; padding: 12px 16px; border-radius: 10px; background: var(--acid); color: var(--acid-ink); font-weight: 750; font-size: 13px; transform: translateY(-16px); opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.bad { background: var(--red); color: #210300; }

@media (max-width: 1050px) {
  .workspace { grid-template-columns: 210px 320px minmax(420px, 1fr); }
  .actions { left: 530px; }
}
@media (max-width: 820px) {
  .workspace { height: auto; min-height: calc(100vh - 70px); grid-template-columns: 170px 1fr; overflow: visible; }
  .filters { grid-row: 1/3; }
  .queue { min-height: calc(100vh - 70px); }
  .detail { display: none; position: fixed; inset: 70px 0 0 170px; z-index: 8; background: var(--bg); }
  .detail:has(#detailContent:not(.hidden)) { display: block; }
  .actions { left: 170px; }
}
@media (max-width: 600px) {
  .topbar { padding: 0 12px; }
  .brand span:last-child, .live { display: none; }
  .workspace { display: block; }
  .filters { border: 0; padding: 12px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat.hero { grid-column: auto; min-height: 76px; }
  .status-nav { display: grid; grid-template-columns: 1fr 1fr; }
  .shortcut-help { display: none; }
  .queue { min-height: 55vh; border: 0; }
  .detail { inset: 70px 0 0; padding: 22px 16px 105px; }
  .detail h2 { font-size: 30px; }
  .evidence-grid { grid-template-columns: 1fr; }
  .actions { left: 0; padding: 10px 12px; }
  .login-page { padding: 12px; }
  .login-shell { min-height: 0; grid-template-columns: 1fr; }
  .login-card { padding: 32px 24px; }
  .login-brand { margin-bottom: 42px; }
  .login-promise { padding: 28px 24px; }
  .login-promise strong { font-size: 28px; }
}
