:root {
  --bg: #16181b; --panel: #1e2126; --panel2: #24282e; --ink: #e8e6df;
  --muted: #a8aeb4; --faint: #7b828a; --line: #33383e; --accent: #d2564c;
  --accent-soft: #3a2523; --mono: Consolas, ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.6 "Segoe UI", system-ui, sans-serif; }
a { color: inherit; }
main { max-width: 1080px; margin: 0 auto; padding: 24px 20px 80px; }
header.top { display: flex; align-items: center; gap: 24px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 10; }
.brand { display: inline-flex; flex-direction: column; line-height: 1.05; font-weight: 700; letter-spacing: .12em; text-decoration: none; color: var(--accent); }
.brand .barch { color: var(--muted); font-weight: 400; margin-left: 6px; }
.brand .btag { color: var(--faint); font-weight: 400; font-size: 9.5px; letter-spacing: .26em; margin-top: 3px; }
header.top nav { display: flex; gap: 18px; flex: 1; }
header.top nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
header.top nav a:hover { color: var(--ink); }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.who a { color: var(--muted); text-decoration: none; }
.who .uname { color: var(--ink); }
.role { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; border-radius: 3px; padding: 1px 6px; }
.role-reader { background: #2a2f36; color: var(--muted); }
.role-editor { background: #143a2c; color: #5dcaa5; }
.role-admin { background: var(--accent-soft); color: var(--accent); }
footer { text-align: center; color: var(--faint); font-size: 12.5px; padding: 30px; border-top: 1px solid var(--line); }
.credits { position: fixed; right: 14px; bottom: 12px; z-index: 60; width: max-content;
  max-width: min(340px, calc(100vw - 28px)); background: var(--panel2); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 8px 28px rgba(0,0,0,.45); font-size: 13px; }
.credits > summary { cursor: pointer; list-style: none; padding: 8px 14px; color: var(--muted);
  display: flex; align-items: center; gap: 7px; font-weight: 600; letter-spacing: .02em; }
.credits > summary::-webkit-details-marker { display: none; }
.credits > summary::before { content: "\25B8"; font-size: 10px; color: var(--faint); transition: transform .15s ease; }
.credits[open] > summary::before { transform: rotate(90deg); }
.credits[open] > summary { border-bottom: 1px solid var(--line); color: var(--ink); }
.credits-body { padding: 10px 14px 12px; }
.credits-body > p { margin: 0 0 9px; color: var(--faint); font-size: 12px; }
.credit { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 7px 0; }
.credit strong { color: var(--ink); font-weight: 600; margin-right: 2px; }
.credit a { color: var(--accent); text-decoration: none; font-size: 11.5px; border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 8px; }
.credit a:hover { border-color: var(--accent); background: var(--accent-soft); }
h1 { font-size: 26px; margin: 18px 0 8px; } h2 { font-size: 18px; margin: 26px 0 10px; color: var(--muted); }
.small { color: var(--faint); font-size: 12.5px; } .mono { font-family: var(--mono); }
.notice { background: var(--accent-soft); border: 1px solid var(--accent); color: var(--ink); border-radius: 6px; padding: 8px 14px; }

.stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
#q, .field { width: 100%; padding: 12px 16px; font-size: 16px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; outline: none; }
#q:focus, .field:focus { border-color: var(--accent); }
.field-sm { padding: 5px 8px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 5px; width: 110px; }
.filters { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kf { background: var(--panel2); color: var(--muted); border: 1px solid var(--line); border-radius: 16px; padding: 3px 11px; font-size: 12.5px; cursor: pointer; }
.kf.sel { background: var(--accent-soft); color: var(--ink); border-color: var(--accent); }

.hit { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 10px 0; }
.hit .meta { color: var(--faint); font-size: 12.5px; margin-bottom: 6px; display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.snippet { line-height: 1.7; }
.snippet .ctx { color: var(--muted); }
.snippet .ctxhit { color: var(--ink); }
.snippet mark, .hit mark { background: var(--accent-soft); color: var(--accent); padding: 0 2px; border-radius: 2px; }
.chip { display: inline-block; background: var(--panel2); border: 1px solid var(--line); border-radius: 20px; padding: 3px 12px; margin: 3px 4px 3px 0; font-size: 13px; text-decoration: none; }
.chip:hover { border-color: var(--accent); }
.chip .k { color: var(--faint); font-size: 11px; margin-left: 6px; }
.tslink { color: var(--accent); text-decoration: none; font-family: var(--mono); font-size: 12.5px; }

.seg { padding: 5px 10px; border-radius: 6px; display: flex; gap: 14px; scroll-margin-top: 130px; }
.seg.active { background: var(--accent-soft); }
.seg.flash { animation: flash 2.5s ease; }
@keyframes flash { 0%,60% { background: var(--accent-soft); } 100% { background: transparent; } }
.seg .t { color: var(--faint); font-family: var(--mono); font-size: 12px; min-width: 52px; cursor: pointer; }
.seg .t:hover { color: var(--accent); }
.seg.banter { opacity: .5; }
.player-wrap { position: sticky; top: 55px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; z-index: 4; display: flex; align-items: center; gap: 16px; }
.player-wrap audio { flex: 1; }
.autojump { font-size: 12.5px; color: var(--muted); white-space: nowrap; cursor: pointer; }
.rumble-link { color: #85c742; text-decoration: none; font-weight: 500; }
.rumble-link:hover { text-decoration: underline; }
.rumble-btn { border-color: #4a6b2a; color: #85c742; white-space: nowrap; text-decoration: none; }
.rumble-btn:hover { border-color: #85c742; }
.rumble-edit { margin: 8px 0 0; display: flex; gap: 8px; align-items: center; }
.rel { border-left: 3px solid var(--line); padding: 6px 14px; margin: 10px 0; }
.rel .pred { color: var(--accent); font-family: var(--mono); font-size: 13px; }
.rel .status { font-size: 11px; border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; color: var(--muted); margin-left: 6px; }
.rel .ev { color: var(--muted); font-size: 13.5px; font-style: italic; margin-top: 3px; }
.cols { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }

/* autocomplete (shared by home + graph) */
.acwrap { position: relative; }
.acmenu { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; z-index: 40; overflow: hidden; display: none; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.acitem { padding: 9px 14px; cursor: pointer; font-size: 14px; }
.acitem:hover, .acitem.active { background: var(--accent-soft); }
.acitem .k { color: var(--faint); font-size: 11px; margin-left: 6px; }

/* graph */
.gctrls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.gctrls .acwrap { flex: 1; min-width: 280px; }
.gctrls input#gsearch { width: 100%; padding: 9px 14px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; }
.gctrls label { color: var(--muted); font-size: 13px; }
.gctrls select { background: var(--panel2); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 5px; }
.glegend { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 10px; }
.glegend .lg { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.glegend .lg i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.glegend .lg i.dash { width: 16px; height: 0; border-radius: 0; border-top: 2px dashed #555b63; }
.glegend .lghint { font-size: 12px; color: var(--faint); }
.glegend .kf { cursor: pointer; padding: 2px 8px; border: 1px solid var(--line); border-radius: 20px; user-select: none; }
.glegend .kf:hover { border-color: var(--accent); }
.glegend .kf:not(.active) { opacity: .38; text-decoration: line-through; }

/* browse directory */
.bctrls { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 14px 0 10px; }
.bctrls input#bq { flex: 1; min-width: 220px; padding: 9px 14px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; }
.bctrls label { color: var(--muted); font-size: 13px; }
.bctrls select { background: var(--panel2); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 5px; }
.bkinds { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 16px; }
.bk { cursor: pointer; padding: 4px 12px; border: 1px solid var(--line); border-radius: 20px; font-size: 13px; color: var(--muted); user-select: none; }
.bk b { color: var(--faint); font-weight: 600; margin-left: 3px; }
.bk:hover { border-color: var(--accent); }
.bk.active { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.bk .bkdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.bresults { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.bcard { display: flex; flex-direction: column; gap: 5px; padding: 11px 14px; background: var(--panel);
  border: 1px solid var(--line); border-left: 3px solid #888; border-radius: 8px; text-decoration: none; color: var(--ink); overflow: hidden; }
.bcard:hover { background: var(--panel2); border-color: var(--accent); }
.bname { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bmeta { color: var(--faint); font-size: 12px; display: flex; align-items: center; gap: 8px; }
.bkpill { font-style: normal; padding: 1px 8px; border-radius: 20px; font-size: 11px; white-space: nowrap; }

/* editor: inline entity/claim editing */
.editbox { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin: 12px 0; }
.editrow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.editrow label { color: var(--muted); font-size: 13px; display: flex; gap: 6px; align-items: center; }
.editrow input, .editrow select { background: var(--panel2); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; }
.editrow input[name=name] { min-width: 240px; }
.inlform { display: inline; }
.inlform button { background: none; border: none; color: var(--faint); cursor: pointer; font-size: 13px; line-height: 1; padding: 0 3px; }
.inlform button:hover { color: var(--accent); }
.aka { white-space: nowrap; }
.rel { position: relative; }
.reldel { position: absolute; top: 6px; right: 2px; }
.reldel button { font-size: 15px; }
#cywrap { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; position: relative; }
#cy { height: 74vh; }
.gstatus { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); color: var(--faint); font-size: 14px; pointer-events: none; }
#cywrap:fullscreen { padding: 0; } #cywrap:fullscreen #cy { height: 100vh; }
#edgeinfo { position: fixed; right: 20px; bottom: 20px; max-width: 400px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: none; z-index: 30; }
#edgeinfo .status { font-size: 11px; border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; color: var(--muted); }
#edgeinfo .ev { color: var(--muted); font-style: italic; font-size: 13px; margin: 6px 0; }

/* timeline */
.tctrls { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 10px 0 14px; }
.tctrls label { color: var(--muted); font-size: 13px; }
.tctrls input, .tctrls select { background: var(--panel2); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }

/* buttons & forms */
.btn { background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 11px 18px; font-size: 15px; cursor: pointer; }
.btn:hover { filter: brightness(1.1); }
.btn2 { background: var(--panel2); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; cursor: pointer; font-size: 13px; }
.btn2:hover { border-color: var(--accent); } .btn2.danger:hover { border-color: var(--accent); color: var(--accent); }
.stack { display: flex; flex-direction: column; gap: 10px; max-width: 480px; margin-bottom: 20px; }
.inline { display: inline; }
.utable { width: 100%; border-collapse: collapse; font-size: 14px; }
.utable th { text-align: left; color: var(--faint); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.utable td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.utable select { background: var(--panel2); color: var(--ink); border: 1px solid var(--line); border-radius: 5px; padding: 4px; }
textarea.field { font-family: inherit; resize: vertical; }
.tablewrap { overflow-x: auto; }

/* info tooltips */
.info { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-style: italic; font-weight: 700; cursor: help; position: relative; vertical-align: middle; margin-left: 6px; }
.info:hover { border-color: var(--accent); color: var(--accent); }
.info::after { content: attr(data-tip); position: absolute; left: 22px; top: -4px; width: 300px; background: var(--panel2); border: 1px solid var(--accent); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; font-style: normal; font-weight: 400; line-height: 1.5; color: var(--ink); z-index: 50; display: none; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.info:hover::after { display: block; }
@media (max-width: 700px) { .info::after { left: auto; right: 0; width: 220px; } }

/* captcha */
.captcha { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.captcha label { display: block; margin-bottom: 6px; color: var(--muted); }

/* karaoke word highlight */
.wd { transition: color .1s; }
.wd.wnow { color: var(--accent); font-weight: 600; }

/* manual claim badge */
.badge-manual { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; background: #143a2c; color: #5dcaa5; border-radius: 3px; padding: 1px 6px; margin-left: 6px; }

/* audit log */
.audit td { font-size: 13px; }
.evtag { font-size: 11px; border-radius: 3px; padding: 1px 7px; white-space: nowrap; }
.evtag-ok { background: #143a2c; color: #5dcaa5; }
.evtag-bad { background: var(--accent-soft); color: var(--accent); }

/* ---- document ingestion: queue + review ---- */
.doctbl { width: 100%; border-collapse: collapse; margin-top: 12px; }
.doctbl th { text-align: left; font-size: 12px; color: var(--faint); font-weight: 600; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.doctbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dtitle { font-weight: 600; }
.dnote { color: var(--accent); }
.dstatus { font-size: 12.5px; white-space: nowrap; }
.s-processing { color: var(--muted); }
.s-pending { color: #efb027; font-weight: 600; }
.s-approved { color: #5dcaa5; }
.s-rejected { color: var(--faint); }
.s-error { color: var(--accent); }

.entchips { display: flex; flex-wrap: wrap; gap: 6px; }
.entchip { display: inline-flex; align-items: baseline; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 6px; padding: 4px 10px; font-size: 13px; }
.entchip i { font-style: normal; font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }

/* kind accents (match the graph/browse palette) */
.k-person { border-left-color: #d2564c; } .rmeta i.k-person { color: #d2564c; }
.k-organization { border-left-color: #5dcaa5; } .rmeta i.k-organization { color: #5dcaa5; }
.k-intelligence_service { border-left-color: #85b7eb; } .rmeta i.k-intelligence_service { color: #85b7eb; }
.k-operation { border-left-color: #efb027; } .rmeta i.k-operation { color: #efb027; }
.k-country { border-left-color: #afa9ec; } .rmeta i.k-country { color: #afa9ec; }
.k-place { border-left-color: #b4b2a9; } .rmeta i.k-place { color: #b4b2a9; }
.k-event { border-left-color: #ed93b1; } .rmeta i.k-event { color: #ed93b1; }
.k-book { border-left-color: #97c459; } .rmeta i.k-book { color: #97c459; }
.k-family { border-left-color: #f0997b; } .rmeta i.k-family { color: #f0997b; }

.rctrls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.rlist { display: flex; flex-direction: column; gap: 8px; }
.rrow { display: flex; gap: 12px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; cursor: pointer; }
.rrow:hover { border-color: var(--accent); }
.rrow input[type=checkbox] { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.rbody { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rclaim { font-size: 15px; }
.rclaim .pred { color: var(--accent); font-family: var(--mono); font-size: 13px; padding: 0 4px; }
.rmeta { font-size: 12px; color: var(--faint); }
.rmeta i { font-style: normal; }
.rquote { color: var(--muted); font-size: 13.5px; border-left: 2px solid var(--line); padding-left: 10px; }
.loose { color: #efb027; }

/* ---- connection finder ---- */
.cfctrls { margin: 14px 0 6px; }
#cfinputs { display: flex; flex-direction: column; gap: 8px; max-width: 620px; }
.cfpick { display: flex; align-items: center; gap: 8px; }
.cfpick .cfq { flex: 1; padding: 9px 14px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; }
.cfpick .cfq:focus { border-color: var(--accent); outline: none; }
.cfpick .cfmenu { left: 0; right: 34px; }
.cfdel { background: none; border: none; color: var(--faint); font-size: 20px; cursor: pointer; line-height: 1; padding: 0 4px; }
.cfdel:hover { color: var(--accent); }
.cfrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.cfopt { color: var(--muted); font-size: 13px; }
.cfopt select { background: var(--panel2); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }
#cfstatus { min-height: 18px; margin: 8px 0; color: var(--muted); }

.cfsum { font-size: 15px; }
.cfsum a, .cfnode { text-decoration: none; }
.cfpair { margin: 10px 0 16px; }
.cfpairhd { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.cfpairhd b { color: var(--ink); }
.cfno, .cfarr { color: var(--faint); }
.cfpath { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 2px; margin: 5px 0; padding-left: 4px; }
.cfnode { display: inline-block; background: var(--panel2); border: 1px solid var(--line); border-left: 3px solid; border-radius: 6px; padding: 4px 11px; font-size: 13.5px; color: var(--ink); }
.cfnode:hover { background: var(--accent-soft); }
.cfarr { padding: 0 3px; }

.cflist { display: flex; flex-wrap: wrap; gap: 8px; }
.cfconn { display: inline-flex; flex-direction: column; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 7px; padding: 7px 12px; text-decoration: none; color: var(--ink); }
.cfconn:hover { border-color: var(--accent); }
.cfconn.cfhub { opacity: .62; }
.cfcname { font-size: 14px; font-weight: 600; }
.cfcmeta { font-size: 11.5px; color: var(--faint); }
.cfcmeta i { font-style: normal; }
.hubtag { background: #2a2f36; color: var(--muted); border-radius: 3px; padding: 0 5px; font-size: 10px; }

#cfwrap { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; position: relative; }
#cfcy { height: 62vh; }
.edgeinfo2 { position: fixed; right: 20px; bottom: 20px; max-width: 420px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: none; z-index: 30; }
.edgeinfo2 .pred { color: var(--accent); font-family: var(--mono); font-size: 13px; }
.edgeinfo2 .status { font-size: 11px; border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; color: var(--muted); }
.edgeinfo2 .ev { color: var(--muted); font-style: italic; font-size: 13px; margin: 6px 0; }
.edgeinfo2 .tslink { color: var(--accent); text-decoration: none; font-size: 13px; }

/* connection-finder hop labels + hub markers */
.cfhop { font-family: var(--mono); font-size: 11.5px; color: var(--accent); padding: 0 3px; white-space: nowrap; }
.hopst { font-style: normal; font-size: 10px; color: #efb027; margin-left: 3px; }
.cfnode.cfnhub { opacity: .6; border-style: dashed; }
.edgeinfo2 .small { color: var(--faint); margin-top: 4px; }

/* active state for graph toolbar toggles (e.g. edge labels) */
.btn2.sel { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }

/* entity vitals (birth/death dates + places) */
.vitals { color: var(--muted); font-size: 14px; margin: 2px 0 10px; }
.vitals b { color: var(--ink); font-variant-numeric: tabular-nums; }
.vitals a { color: var(--accent); text-decoration: none; }
.vitals a:hover { text-decoration: underline; }
.vsep { color: var(--faint); margin: 0 5px; }
.editbox code { background: var(--panel2); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; font-size: 12px; }

/* review: reverse a claim whose subject/object the extractor got backwards */
.flipctl { cursor: pointer; user-select: none; color: var(--muted); white-space: nowrap; }
.flipctl input { vertical-align: -1px; margin-right: 2px; accent-color: #efb027; }
.rrow.flipped { border-color: #efb027; }
.rrow.flipped .rclaim b { color: #efb027; }

/* English rendering shown beside a verbatim non-English evidence quote */
.rquote-en, .ev-en { color: var(--faint); font-size: 12.5px; border-left: 2px solid var(--line); padding-left: 10px; margin-top: 3px; font-style: italic; }
.rquote-en i, .ev-en i { font-style: normal; font-size: 9.5px; letter-spacing: .06em; background: var(--panel2); border-radius: 3px; padding: 0 4px; margin-right: 5px; color: var(--muted); }

/* ---- admin search analytics ---- */
.sctrls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 14px 0 6px; }
.chip.sel { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.statrow { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 4px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 8px; padding: 10px 16px; min-width: 110px; }
.stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.stat.warn { border-left-color: #efb027; } .stat.warn b { color: #efb027; }
td.zero, .zero { color: #efb027; font-weight: 600; }
.botflag { font-size: 9.5px; background: #2a2f36; color: var(--muted); border-radius: 3px; padding: 1px 5px; margin-left: 5px; letter-spacing: .04em; }
.mono { font-family: var(--mono); font-size: 12px; }
.doctbl.audit td { padding: 5px 10px; }

/* ---- privacy / legal page ---- */
.fsep { margin: 0 6px; opacity: .5; }
.flink { color: var(--muted); text-decoration: none; }
.flink:hover { color: var(--accent); text-decoration: underline; }
.legal { max-width: 780px; }
.legal h2 { font-size: 16px; color: var(--ink); margin: 26px 0 8px; }
.legal p, .legal li { color: var(--muted); font-size: 14.5px; }
.legal li { margin: 3px 0; }
.legal a { color: var(--accent); }
.legal code { background: var(--panel2); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; font-size: 12.5px; }
.legal .doctbl td { vertical-align: top; font-size: 13.5px; }
.legal .doctbl td:first-child { width: 32%; }
