:root {
  --bg: #0e1014;
  --panel: #151820;
  --panel-2: #1b1f29;
  --line: #262b37;
  --text: #e7e9ef;
  --muted: #8a92a6;
  --accent: #5ee0c4;
  --accent-ink: #062a22;
  --accent-soft: rgba(94, 224, 196, .12);
  --warn: #f5b84a;
  --warn-soft: rgba(245, 184, 74, .12);
  --danger: #f2706b;
  --bad-soft: rgba(242, 112, 107, .12);
  --ok: #6fd38f;
  --ok-soft: rgba(111, 211, 143, .12);
  --s0: #f2706b; --s1: #f59a62; --s2: #e8c14a; --s3: #a9d461; --s4: #6fd38f; --s5: #5ec4e6;
  --radius: 10px;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, ui-monospace, monospace;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.spacer { flex: 1; }
.label { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* buttons, inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 4px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--text);
  white-space: nowrap; transition: border-color .15s, background .15s; text-decoration: none;
}
.btn:hover { border-color: #3a4152; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: var(--danger); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 28px; padding: 2px 9px; font-size: 12.5px; }
.btn.wide { width: 100%; }
.btn.armed { border-color: var(--warn); color: var(--warn); }
.btn.rec-on { border-color: var(--danger); color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; }
.linkbtn { border: 0; background: none; color: var(--text); padding: 0; text-align: left; }
.linkbtn:hover { color: var(--accent); text-decoration: underline; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }

input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
select { width: auto; }
textarea { resize: vertical; min-height: 34px; field-sizing: content; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }

.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; white-space: nowrap; border: 1px solid var(--line); color: var(--muted); font-family: var(--mono); }
.pill.pending { color: var(--muted); } .pill.live { color: var(--accent); border-color: currentColor; } .pill.finished { color: var(--warn); border-color: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-soft); color: var(--danger); border-color: transparent; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 11px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line); }
.badge.warn { color: var(--warn); border-color: rgba(245, 184, 74, .4); }

/* top bar */
.topbar { height: 52px; display: flex; align-items: center; gap: 14px; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--panel); }
.brand { font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); transform: rotate(45deg); }
.brand-sub { font-weight: 400; }

/* markdown (task description) */
.md { line-height: 1.6; }
.md h1, .md h2, .md h3 { margin: 0 0 10px; font-size: 17px; }
.md p, .md ul, .md ol { margin: 0 0 12px; }
.md ul, .md ol { padding-left: 20px; }
.md li { margin-bottom: 4px; }
.md code { font-family: var(--mono); font-size: 12.5px; background: var(--panel-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; }
.md pre { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow: auto; }
.md pre code { background: none; border: 0; padding: 0; font-size: 12px; }
.md strong { color: #fff; }

.tabs { display: flex; gap: 4px; overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; height: 34px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.tab .check { color: var(--ok); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.center-screen { min-height: calc(100vh - 52px); display: grid; place-items: center; padding: 24px; }
.login-card { width: 360px; padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.login-card h2 { font-size: 18px; }
.login-card p { margin: 0; }
.wait-card { max-width: 520px; padding: 32px 34px; }
.wait-card h2 { font-size: 20px; margin-bottom: 10px; }
.wait-card p { margin: 0 0 10px; }
.wait-card .wait-sub { font-weight: 600; margin-bottom: 14px; }
.consent-card { max-width: 640px; }
.consent-card ul { margin: 14px 0 22px; padding-left: 20px; display: grid; gap: 10px; color: var(--muted); }
.consent-card li b { color: var(--text); }
.consent-card .btn { padding: 9px 18px; }
.consent-card .consent-error { color: var(--danger); margin: 12px 0 0; }
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); z-index: 100; max-width: 420px; }
.save-state { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.save-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.save-state.dirty::before { background: var(--warn); }
.save-state.error::before { background: var(--danger); }
.save-state.error { color: var(--danger); }
.empty { color: var(--muted); padding: 40px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.empty h2 { color: var(--text); }
.empty p { margin: 0; max-width: 520px; }

/* ------------------------------------------------------------- candidate */
.cand { display: grid; grid-template-rows: 52px auto 1fr; height: 100vh; }
.cand .taskbar { display: flex; align-items: center; gap: 12px; padding: 8px 18px; border-bottom: 1px solid var(--line); }
.cand > #content { min-height: 0; display: grid; }
.cand .work { display: grid; grid-template-columns: minmax(320px, 38%) 1fr; min-height: 0; }
.cand .desc { overflow: auto; padding: 20px 22px; border-right: 1px solid var(--line); }
.cand .editor-wrap { display: grid; grid-template-rows: 40px 1fr; min-height: 0; }
.cand .editor-bar { display: flex; align-items: center; gap: 10px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--panel); font-size: 12px; }
.cand .editor { min-height: 0; }
.done-label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.notice { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 18px; }
.banner { padding: 8px 18px; background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid rgba(245, 184, 74, .3); font-size: 13px; }

/* ----------------------------------------------------------------- admin */
.admin { display: grid; grid-template-columns: 250px minmax(0, 1fr); height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); display: grid; grid-template-rows: 52px auto 1fr auto; min-height: 0; }
.sidebar .head { display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--line); }
.sidebar .actions { padding: 12px; }
.sidebar .list { overflow: auto; padding: 0 8px; }
.sidebar .foot { border-top: 1px solid var(--line); padding: 10px 12px; display: flex; gap: 8px; align-items: center; }
.who-am-i { flex: 1; min-width: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-list { padding: 8px 10px; font-size: 13px; }
.s-item { display: block; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--text); margin-bottom: 2px; }
.s-item:hover { background: var(--panel-2); }
.s-item.active { background: var(--panel-2); box-shadow: inset 2px 0 0 var(--accent); }
.s-item .row { display: flex; align-items: center; gap: 8px; }
.s-item .name { font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-item .meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.page { padding: 24px 28px; overflow: auto; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; }
.import-page { max-width: 900px; }
.import-page code { font-family: var(--mono); font-size: 12.5px; }
.kit-text { font-size: 12.5px; min-height: 220px; field-sizing: fixed; }
.import-result { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.problems { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; }
.problems code { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------- interview view */
.iv { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); height: 100%; min-height: 0; }
.iv-head { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.iv-head h1 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.iv-head .pos { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.iv-link { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 20px; background: var(--accent-soft); border-bottom: 1px solid var(--line); font-size: 13px; }
.iv-link input { flex: 1 1 380px; font-size: 12.5px; }
.iv-bar { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; padding: 8px 20px; border-bottom: 1px solid var(--line); background: var(--panel); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg); }
.seg button { border: 0; background: transparent; padding: 4px 11px; color: var(--muted); font-size: 12.5px; }
.seg button.on { background: var(--panel-2); color: var(--text); }
.tabs-seg button { padding: 6px 13px; font-size: 13.5px; font-weight: 500; }
.lvl { display: flex; align-items: center; gap: 8px; }
.lvl select { padding: 4px 8px; }
.stat { display: flex; align-items: baseline; gap: 6px; }
.stat b { font-family: var(--mono); font-size: 19px; }
.stat span { color: var(--muted); font-size: 13px; }
.meter { flex: 1 1 140px; min-width: 100px; max-width: 240px; height: 8px; border-radius: 99px; background: var(--panel-2); position: relative; overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 99px; transition: width .25s; }
.timer { padding: 3px 10px; border: 1px solid var(--line); border-radius: 8px; min-width: 84px; text-align: center; }
.timer.run { border-color: var(--ok); color: var(--ok); }
.timer.warn { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
.timer.over { border-color: var(--danger); color: var(--danger); background: var(--bad-soft); }
.iv-bar .save-state { margin-left: auto; }
.iv-body { overflow: auto; padding: 0 22px 80px; scroll-behavior: smooth; }
.view { padding-top: 18px; }
.view.grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; }

.who { padding-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.who p { margin: 0; color: var(--muted); max-width: 90ch; }
.who .meta { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 3px 10px; font-size: 13px; color: var(--muted); }

.rail { position: sticky; top: 14px; align-self: start; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 190px); overflow: auto; padding-right: 4px; }
.rail a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; text-decoration: none; color: var(--text); padding: 6px 10px; border-radius: 8px; font-size: 13.5px; }
.rail a:hover { background: var(--panel-2); }
.rail .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 20px; }
.panel h2 { font-size: 18px; margin-bottom: 10px; }
.panel > p { margin: 0 0 12px; font-size: 13.5px; }
.flags { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.flag { border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; background: var(--bg); }
.flag b { display: block; margin-bottom: 3px; font-size: 13.5px; }
.flag.r { border-left-color: var(--danger); } .flag.y { border-left-color: var(--warn); } .flag.g { border-left-color: var(--ok); }
.legend-title { margin-top: 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.legend b { font-family: var(--mono); color: var(--text); }
.howto { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rules { margin: 10px 0 0; padding-left: 18px; font-size: 13.5px; }
.rules li { margin: 2px 0; }

.sec { scroll-margin-top: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 20px; overflow: hidden; }
.sec-h { padding: 16px 20px 12px; display: flex; flex-wrap: wrap; gap: 12px 20px; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--line); }
.sec-h h2 { font-size: 19px; }
.sec-h .num { font-family: var(--mono); color: var(--accent); font-size: 14px; margin-right: 8px; }
.sec-h p.why { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; max-width: 80ch; }
.req { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.req span { font-size: 12px; font-family: var(--mono); color: var(--muted); border: 1px solid var(--line); padding: 1px 7px; border-radius: 6px; }
.req span.cur { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.catscore { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.catscore .big { font-size: 28px; font-weight: 600; line-height: 1; color: var(--muted); }
.catscore .big.ok { color: var(--ok); } .catscore .big.warn { color: var(--warn); } .catscore .big.bad { color: var(--danger); }
.catscore .sub { font-size: 12px; color: var(--muted); }
.cv { margin: 0; padding: 9px 20px; background: var(--panel-2); font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; border-bottom: 1px solid var(--line); }
.cv.prior { background: var(--bg); }
.tag { flex: none; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; background: var(--panel-2); color: var(--muted); }
.tag.covered { background: var(--ok-soft); color: var(--ok); } .tag.partial { background: var(--warn-soft); color: var(--warn); } .tag.missing { background: var(--bad-soft); color: var(--danger); }
.tag.plan { background: var(--accent-soft); color: var(--accent); }

.q { padding: 13px 20px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px 18px; }
.q > :not(.qt):not(.scores) { grid-column: 1 / -1; min-width: 0; }
.q.intro { grid-template-columns: minmax(0, 1fr); }
.q.rated { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.q.must-q { box-shadow: inset 3px 0 0 var(--accent); }
.q .qt { font-weight: 500; min-width: 0; }
.q .qt small { display: inline-block; margin-right: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; vertical-align: 2px; background: var(--panel-2); color: var(--muted); }
.q .qt small.sen { background: var(--accent-soft); color: var(--accent); }
.q .qt small.cvq { background: var(--warn-soft); color: var(--warn); }
.q .qt small.taskq { background: rgba(94, 196, 230, .14); color: var(--s5); }
.q .qt small.must { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.q .watch { margin: 0; display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; line-height: 1.45; padding: 7px 10px; border-radius: 8px; background: var(--panel-2); border-left: 3px solid var(--warn); }
.q .watch .label { flex: none; color: var(--warn); }
.q summary { font-size: 13px; color: var(--accent); cursor: pointer; width: max-content; max-width: 100%; list-style: none; }
.q summary::-webkit-details-marker { display: none; }
.q details.ask > summary, .q details.qd > summary, .q details.task-desc > summary { padding: 1px 0; }
.q details.ask > summary::before, .q details.qd > summary::before, .q details.task-desc > summary::before { content: "▸ "; }
.q details.ask[open] > summary::before, .q details.qd[open] > summary::before, .q details.task-desc[open] > summary::before { content: "▾ "; }
.q details.ask > summary, .q details.task-desc > summary { color: var(--muted); }
.ask-body { margin-top: 6px; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.ask-body p { margin: 0; }
.ask-body .say { display: flex; flex-direction: column; gap: 3px; }
.ask-body q { font-size: 15.5px; font-weight: 500; line-height: 1.4; quotes: "“" "”"; }
.ask-body ol.probes { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; }
.ask-body ol.probes li::marker { font-family: var(--mono); color: var(--accent); font-size: 12px; }
.ask-body .tip { color: var(--muted); border-top: 1px dashed var(--line); padding-top: 6px; }
.rub { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.rub-row { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 10px; align-items: start; padding: 6px 8px; border-radius: 7px; border: 1px solid transparent; font-size: 13.5px; }
.rub-row.hit { border-color: var(--accent); background: var(--accent-soft); }
.rub-k { display: flex; flex-direction: column; line-height: 1.2; }
.rub-k b { font-family: var(--mono); font-size: 14px; }
.rub-k span { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.rub-k.b0 b { color: var(--s0); } .rub-k.b1 b { color: var(--s2); } .rub-k.b2 b { color: var(--s3); } .rub-k.b3 b { color: var(--s5); }
.kp-label { margin-top: 10px; }
.q ul.kps { list-style: none; margin: 6px 0 0; padding-left: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.q ul.kps > li { padding-left: 18px; position: relative; }
.q ul.kps > li:not(:has(details))::before { content: "·"; position: absolute; left: 5px; color: var(--muted); }
.q ul.kps > li:has(details) { padding-left: 0; }
.q .kp summary { padding: 3px 0 3px 18px; position: relative; width: auto; color: var(--text); font-size: 14px; }
.q .kp summary::before { content: "+"; position: absolute; left: 2px; top: 3px; font-family: var(--mono); color: var(--accent); font-weight: 600; }
.q .kp[open] summary::before { content: "−"; }
.q .kp summary:hover { color: var(--accent); }
.kp-body { margin: 2px 0 6px 18px; padding: 8px 12px; border-left: 2px solid var(--accent); background: var(--bg); border-radius: 0 7px 7px 0; font-size: 13.5px; line-height: 1.55; }
.kp-body code { font-family: var(--mono); font-size: 12.5px; background: var(--panel-2); padding: 1px 4px; border-radius: 4px; overflow-wrap: anywhere; }
.q textarea { font-size: 13.5px; }

.scores { display: flex; gap: 3px; align-self: start; }
.scores button { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg); font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--muted); padding: 0; }
.scores button:hover { border-color: var(--accent); color: var(--text); }
.scores button.on { color: #10131a; border-color: transparent; }
.scores button.on[data-v="0"] { background: var(--s0); } .scores button.on[data-v="1"] { background: var(--s1); } .scores button.on[data-v="2"] { background: var(--s2); }
.scores button.on[data-v="3"] { background: var(--s3); } .scores button.on[data-v="4"] { background: var(--s4); } .scores button.on[data-v="5"] { background: var(--s5); }
.override { padding: 11px 20px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; background: var(--panel-2); font-size: 13.5px; }
.override .scores button { width: 28px; height: 28px; }
.override.calib { font-weight: 500; border-top: 1px solid var(--line); }
.override.calib.ok { background: var(--ok-soft); } .override.calib.warn { background: var(--warn-soft); } .override.calib.bad { background: var(--bad-soft); }
.bridge { display: flex; flex-direction: column; gap: 2px; padding: 11px 20px 3px; background: var(--panel-2); border-top: 1px solid var(--line); }
.bridge q { font-size: 15px; font-weight: 500; quotes: "“" "”"; }
.slot > .q { border-bottom: 0; }
.sec.act > .q:last-child, .qs > .q:last-child { border-bottom: 0; }

/* practical task inside a question */
.task { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.task-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 10px; background: var(--panel-2); border-bottom: 1px solid var(--line); font-size: 12.5px; }
.task-desc { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.task-desc .md { margin-top: 8px; font-size: 13.5px; }
.task-editor { height: 380px; }
.replay { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.replay input[type=range] { flex: 1; accent-color: var(--accent); }
.replay .mono { white-space: nowrap; font-size: 12px; }
.feed { border-top: 1px solid var(--line); overflow: auto; max-height: 150px; padding: 8px 12px; font-size: 12px; background: var(--panel); }
.feed.tall { max-height: 460px; border: 1px solid var(--line); border-radius: 8px; }
.feed .ev { display: grid; grid-template-columns: 62px 92px 190px minmax(0, 1fr); gap: 8px; padding: 2px 0; }
.feed .ev .t { font-family: var(--mono); color: var(--muted); }
.feed .ev.paste .k, .feed .ev.large-insert .k { color: var(--warn); }
.feed .ev.away .k { color: var(--danger); }
.feed .ev.quiet .k { color: var(--muted); }
.feed .ev .p { color: var(--muted); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* summary */
.sum-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; }
.chart { display: flex; flex-direction: column; gap: 7px; }
.crow, .axis { display: grid; grid-template-columns: 210px minmax(0, 1fr) 56px; gap: 10px; align-items: center; font-size: 13.5px; }
.crow .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow .val { text-align: right; }
.track { position: relative; height: 16px; background: var(--panel-2); border-radius: 5px; }
.track .fill { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: var(--muted); }
.track .fill.ok { background: var(--ok); } .track .fill.warn { background: var(--warn); } .track .fill.bad { background: var(--danger); }
.track .tick { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); border-radius: 1px; }
.track .gridl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.axis { font-size: 11px; color: var(--muted); }
.axis div:nth-child(2) { display: flex; justify-content: space-between; font-family: var(--mono); }
table.lv { width: 100%; border-collapse: collapse; font-size: 14px; }
table.lv th, table.lv td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.lv th { font-size: 12px; color: var(--muted); font-weight: 500; }
table.lv .n { font-family: var(--mono); text-align: right; }
table.plan ul.plan-q { margin: 0; padding-left: 16px; font-size: 13px; }
.verdict { display: flex; flex-direction: column; gap: 10px; }
.verdict select, .verdict textarea { width: 100%; }
.verdict textarea { min-height: 120px; }

@media (max-width: 1100px) {
  .view.grid { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; flex-direction: row; overflow-x: auto; max-height: none; padding-bottom: 6px; }
  .rail a { flex: none; }
  .sum-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .admin { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .sidebar { grid-template-rows: auto; grid-auto-flow: column; }
  .sidebar .list, .sidebar .head { display: none; }
  .q { grid-template-columns: minmax(0, 1fr); }
  .cand .work { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(320px, 1fr); }
  .cand .desc { border-right: 0; border-bottom: 1px solid var(--line); max-height: 40vh; }
  .crow, .axis { grid-template-columns: 110px minmax(0, 1fr) 44px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
