@font-face { font-family: 'Noto Sans'; src: url('/fonts/noto-sans-latin-wght-normal.woff2') format('woff2-variations'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Noto Sans'; src: url('/fonts/noto-sans-latin-ext-wght-normal.woff2') format('woff2-variations'); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --paper: #f3f3f1;
  --surface: #ffffff;
  --surface-2: #fafaf9;
  --sunken: #ececea;
  --line: #e4e0d7;
  --line-strong: #cfcac0;
  --ink: #16140f;
  --ink-2: #47433a;
  --ink-3: #6b6558;
  --gold: #c6ad85;
  --gold-deep: #a08b5e;
  --gold-text: #7a6a47;
  --gold-tint: #f4eee2;
  --ok: #2b7549;
  --ok-tint: #e5f1e9;
  --warn: #9a5c08;
  --warn-tint: #fbefd9;
  --bad: #b0352a;
  --bad-tint: #f9e4e1;
  --info: #35577f;
  --info-tint: #e7edf5;
  --shadow-1: 0 1px 2px rgba(22, 20, 15, 0.06);
  --shadow-2: 0 1px 2px rgba(22, 20, 15, 0.05), 0 10px 28px -14px rgba(22, 20, 15, 0.22);
  --shadow-3: 0 2px 6px rgba(22, 20, 15, 0.08), 0 24px 60px -24px rgba(22, 20, 15, 0.35);
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --sans: 'Noto Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --topbar: 56px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: 'kern';
}
::selection { background: #e9dcc3; color: var(--ink); }
input, textarea, select, button { font: inherit; color: inherit; }
a { color: var(--gold-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; text-wrap: balance; letter-spacing: -0.012em; }
h1 { font-size: 30px; font-weight: 680; letter-spacing: -0.022em; }
h2 { font-size: 21px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 650; }
p { margin: 0; }
code, kbd, pre { font-family: var(--mono); font-size: 0.9em; }
:not(pre) > code { background: var(--sunken); border-radius: 4px; padding: 0.08em 0.36em; }
kbd { background: var(--surface); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; font-size: 12px; }
.num, .tabular { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; border-radius: 4px; }
* { scrollbar-width: thin; scrollbar-color: #cdc7bb transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d3cdc1; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #b9b2a4; }
.ic { flex: none; vertical-align: middle; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- buttons ---------- */
.btn {
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; user-select: none;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease), transform 120ms var(--ease), filter 150ms var(--ease);
}
.btn:hover { border-color: var(--gold); color: var(--gold-text); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #111; font-weight: 700; }
.btn.primary:hover { filter: brightness(0.92); color: #111; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dark:hover { background: #2c2920; color: #fff; }
.btn.danger:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; }
.btn.ghost:hover { background: var(--sunken); border-color: transparent; color: var(--ink); }
.btn.sm { height: 32px; padding: 0 13px; font-size: 13px; }
.btn.xs { height: 26px; padding: 0 10px; font-size: 12px; gap: 6px; }
.btn.lg { height: 48px; padding: 0 26px; font-size: 15px; }
.btn.icon { width: 34px; padding: 0; height: 34px; }
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.45; cursor: not-allowed; transform: none; filter: none; }
.btn .spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- fields ---------- */
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, textarea.input, select.input {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--surface); outline: none; transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
textarea.input { height: auto; padding: 10px 14px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(198, 173, 133, 0.28); }
.input::placeholder { color: #8d8677; }
.input.otp { font: 600 28px/1 var(--mono); letter-spacing: 0.42em; text-align: center; height: 60px; padding-left: 0.42em; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.pad { padding: 24px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--sunken); color: var(--ink-2); white-space: nowrap; }
.chip.gold { background: var(--gold-tint); color: var(--gold-text); }
.chip.ok { background: var(--ok-tint); color: var(--ok); }
.chip.warn { background: var(--warn-tint); color: var(--warn); }
.chip.bad { background: var(--bad-tint); color: var(--bad); }
.chip.info { background: var(--info-tint); color: var(--info); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--sunken); color: var(--ink-2); font-size: 14px; }
.notice.warn { background: var(--warn-tint); color: #6b4106; }
.notice.bad { background: var(--bad-tint); color: #7c241c; }
.notice.ok { background: var(--ok-tint); color: #1f5535; }
.notice.info { background: var(--info-tint); color: #2b4766; }
.notice .ic { margin-top: 2px; }

/* ---------- brand / shell ---------- */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.01em; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--ink); display: grid; place-items: center; }
.brand-mark span { width: 10px; height: 10px; border-radius: 3px; background: var(--gold); transform: rotate(45deg); }
.brand small { font-weight: 500; color: var(--ink-3); letter-spacing: 0; }

.center-page { min-height: 100%; display: grid; place-items: center; padding: 40px 16px; }
.auth { width: min(440px, 100%); }
.auth .card { padding: 32px; }
.auth h1 { font-size: 26px; margin: 22px 0 8px; }
.auth .lead { color: var(--ink-2); margin-bottom: 24px; }
.auth form { display: grid; gap: 16px; }
.auth .foot { margin-top: 18px; text-align: center; font-size: 13px; color: var(--ink-3); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--gold-text); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:disabled { color: var(--ink-3); text-decoration: none; cursor: default; }

/* top bar used by candidate pages and recruiter */
.topbar { height: var(--topbar); display: flex; align-items: center; gap: 16px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar .who { font-size: 13px; color: var(--ink-3); }

/* ---------- lobby & intro ---------- */
.lobby { max-width: 980px; margin: 0 auto; padding: 40px 24px 80px; }
.lobby-head { display: flex; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.lobby-head p { color: var(--ink-2); margin-top: 8px; max-width: 62ch; }
.timeline { display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.tl-item:last-child { border-bottom: 0; }
.tl-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--sunken); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tl-item.done .tl-num { background: var(--ok-tint); color: var(--ok); }
.tl-item.active .tl-num { background: var(--gold); color: #111; }
.tl-item h3 { font-size: 15px; }
.tl-item p { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.tl-meta { text-align: right; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tl-break { padding: 8px 20px 8px 80px; font-size: 12px; color: var(--ink-3); background: var(--surface-2); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.rule { display: flex; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--line); }
.rule:nth-child(odd) { border-right: 1px solid var(--line); }
.rule:nth-child(-n + 2) { border-top: 0; }
.rule .ic { color: var(--gold-deep); margin-top: 2px; }
.rule b { display: block; font-size: 14px; }
.rule span { font-size: 13px; color: var(--ink-3); }

/* system check */
.checks { display: grid; gap: 10px; }
.check { display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color 200ms var(--ease), background-color 200ms var(--ease); }
.check .badge { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--sunken); color: var(--ink-3); }
.check.ok { border-color: #bfdcc9; background: #fbfdfb; }
.check.ok .badge { background: var(--ok-tint); color: var(--ok); }
.check.bad { border-color: #ecc4be; }
.check.bad .badge { background: var(--bad-tint); color: var(--bad); }
.check b { font-size: 14px; }
.check p { font-size: 13px; color: var(--ink-3); }
.previews { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 620px; }
.preview { aspect-ratio: 16 / 10; border-radius: var(--r); background: var(--ink); overflow: hidden; position: relative; display: grid; place-items: center; color: #9a9384; font-size: 13px; }
.preview video { width: 100%; height: 100%; object-fit: cover; }
.preview .lbl { position: absolute; left: 10px; bottom: 8px; background: rgba(0, 0, 0, 0.55); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 12px; }

/* ---------- exam shell ---------- */
.exam { height: 100vh; display: grid; grid-template-rows: var(--topbar) 1fr; overflow: hidden; }
.exam-bar { display: flex; align-items: center; gap: 14px; padding: 0 14px 0 18px; background: var(--surface); border-bottom: 1px solid var(--line); min-width: 0; }
.exam-bar .sect { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.exam-bar .sect small { font-size: 12px; color: var(--ink-3); }
.exam-bar .sect b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps { display: flex; gap: 4px; margin-left: 8px; }
.steps i { width: 22px; height: 4px; border-radius: 4px; background: var(--line); }
.steps i.done { background: var(--ok); }
.steps i.on { background: var(--gold); }

.timer { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--sunken); font: 600 15px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); transition: background-color 300ms var(--ease), color 300ms var(--ease); }
.timer .bar { width: 64px; height: 4px; border-radius: 4px; background: rgba(22, 20, 15, 0.1); overflow: hidden; }
.timer .bar i { display: block; height: 100%; background: var(--ink-2); transform-origin: left; transition: transform 1s linear; }
.timer.warn { background: var(--warn-tint); color: var(--warn); }
.timer.warn .bar i { background: var(--warn); }
.timer.crit { background: var(--bad); color: #fff; }
.timer.crit .bar { background: rgba(255, 255, 255, 0.3); }
.timer.crit .bar i { background: #fff; }
.proc-pills { display: flex; gap: 6px; }
.proc-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--ok-tint); color: var(--ok); }
.proc-pill.off { background: var(--bad-tint); color: var(--bad); }
.cam-mini { width: 64px; height: 40px; border-radius: 8px; overflow: hidden; background: var(--ink); flex: none; }
.cam-mini video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.savestate { font-size: 12px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; min-width: 92px; }
.savestate.err { color: var(--bad); }

/* split panes */
.split { display: grid; min-height: 0; height: 100%; }
.pane { min-height: 0; min-width: 0; overflow: auto; background: var(--surface); }
.gutter { background: var(--line); position: relative; z-index: 2; }
.gutter.v { width: 1px; cursor: col-resize; }
.gutter.h { height: 1px; cursor: row-resize; }
.gutter::after { content: ''; position: absolute; inset: -4px; }
.gutter:hover, .gutter.drag { background: var(--gold); }

/* problem statement */
.statement { padding: 24px 28px 48px; max-width: 78ch; }
.statement .meta { display: flex; gap: 8px; margin: 10px 0 18px; }
.statement h2 { font-size: 22px; }
.md { font-size: 15px; line-height: 1.65; color: var(--ink); }
.md > * + * { margin-top: 0.85em; }
.md h1, .md h2, .md h3, .md h4 { margin-top: 1.4em; }
.md h2 { font-size: 18px; } .md h3 { font-size: 16px; } .md h4 { font-size: 15px; }
.md ul, .md ol { padding-left: 1.3em; }
.md li + li { margin-top: 0.3em; }
.md pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; overflow: auto; font-size: 13px; line-height: 1.55; }
.md blockquote { margin-left: 0; padding: 2px 0 2px 14px; border-left: 1px solid var(--line-strong); color: var(--ink-2); }
.md table { border-collapse: collapse; font-size: 13.5px; width: 100%; }
.md th, .md td { border-bottom: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.md th { font-weight: 650; color: var(--ink-2); background: var(--surface-2); }
.example { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.example + .example { margin-top: 12px; }
.example header { padding: 8px 14px; font-size: 12px; font-weight: 700; color: var(--ink-3); background: var(--surface-2); border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: 0.06em; }
.example pre { margin: 0; border: 0; border-radius: 0; background: transparent; padding: 10px 14px; white-space: pre-wrap; word-break: break-word; }
.example .ex-exp { padding: 0 14px 12px; font-size: 13.5px; color: var(--ink-2); }

/* editor area */
.ed-wrap { display: grid; grid-template-rows: 44px 1fr; min-height: 0; height: 100%; background: var(--surface); }
.ed-tools { display: flex; align-items: center; gap: 8px; padding: 0 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); min-width: 0; }
.ed-host { min-height: 0; position: relative; }
.ed-host > .monaco { position: absolute; inset: 0; }
.select { height: 30px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); padding: 0 28px 0 10px; font-size: 13px; font-weight: 600; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6558' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; cursor: pointer; }

/* console */
.console { display: grid; grid-template-rows: 40px 1fr; min-height: 0; height: 100%; background: var(--surface); }
.con-tabs { display: flex; align-items: center; gap: 2px; padding: 0 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.tab { height: 40px; padding: 0 12px; border: 0; background: none; font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer; position: relative; display: inline-flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); }
.tab.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--gold); border-radius: 2px; }
.con-body { overflow: auto; padding: 12px 14px; font-size: 13px; min-height: 0; }
.cases { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.case { height: 28px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.case.pass { color: var(--ok); border-color: #c4dfcd; }
.case.fail { color: var(--bad); border-color: #eac3bd; }
.case.on { box-shadow: 0 0 0 2px var(--gold); }
.case.lock { color: var(--ink-3); background: var(--surface-2); cursor: default; }
.kv { display: grid; gap: 4px; margin-bottom: 12px; }
.kv > span { font-size: 12px; font-weight: 650; color: var(--ink-3); }
.kv pre { margin: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; font-size: 12.5px; }
.kv pre.err { background: #fdf6f5; border-color: #f0d3ce; color: #8a2a20; }
.verdict { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-weight: 650; font-size: 15px; }
.verdict.ok { color: var(--ok); } .verdict.bad { color: var(--bad); }
.empty { display: grid; place-items: center; text-align: center; color: var(--ink-3); padding: 28px 16px; gap: 8px; font-size: 13px; }
.empty .ic { color: #b6ae9f; }
.custom-row { display: grid; gap: 8px; margin-bottom: 12px; }
.custom-row textarea { font-family: var(--mono); font-size: 12.5px; min-height: 40px; }

/* ---------- repo IDE ---------- */
.repo-grid { display: grid; grid-template-columns: 240px 1px minmax(0, 1fr) 1px 380px; height: 100%; min-height: 0; }
.tree { overflow: auto; padding: 8px 0 24px; background: var(--surface-2); font-size: 13px; }
.tree-h { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px 8px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.07em; }
.node { display: flex; align-items: center; gap: 6px; height: 28px; padding-right: 10px; cursor: pointer; color: var(--ink-2); white-space: nowrap; user-select: none; border: 0; background: none; width: 100%; text-align: left; }
.node:hover { background: var(--sunken); }
.node.on { background: var(--gold-tint); color: var(--ink); font-weight: 600; }
.node .ic { color: var(--ink-3); }
.node .mod { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-deep); }
.node .ro { margin-left: auto; color: #a59e8f; }
.ed-tabs { display: flex; align-items: stretch; height: 38px; border-bottom: 1px solid var(--line); background: var(--surface-2); overflow-x: auto; overflow-y: hidden; }
.ed-tab { display: inline-flex; align-items: center; gap: 8px; padding: 0 10px 0 14px; font-size: 13px; color: var(--ink-3); border-right: 1px solid var(--line); cursor: pointer; white-space: nowrap; background: none; border-top: 0; border-bottom: 0; border-left: 0; }
.ed-tab.on { background: var(--surface); color: var(--ink); box-shadow: inset 0 2px 0 var(--gold); }
.ed-tab .x { width: 18px; height: 18px; border-radius: 4px; display: grid; place-items: center; color: var(--ink-3); }
.ed-tab .x:hover { background: var(--sunken); color: var(--ink); }
.repo-center { display: grid; grid-template-rows: 38px minmax(0, 1fr) 1px var(--console-h, 260px); min-height: 0; }
.task-panel { position: absolute; inset: 0; padding: 22px 26px 40px; overflow: auto; background: var(--surface); }
.test-row { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.test-row:last-child { border-bottom: 0; }
.test-row .ic { margin-top: 2px; }
.test-row b { font-size: 13px; font-weight: 600; word-break: break-word; }
.test-row p { font-size: 12.5px; color: var(--ink-3); }
.test-row .t-detail { grid-column: 2 / 4; min-width: 0; }
.term { font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; word-break: break-word; line-height: 1.5; margin: 0; }

/* assistant */
.ai { display: grid; grid-template-rows: 48px minmax(0, 1fr) auto; min-height: 0; height: 100%; background: var(--surface); }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.ai-head b { font-size: 14px; }
.ai-log { overflow: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 100%; font-size: 13.5px; line-height: 1.6; }
.msg.me { align-self: flex-end; background: var(--ink); color: #f4f1ea; padding: 9px 13px; border-radius: 14px 14px 4px 14px; max-width: 88%; white-space: pre-wrap; word-break: break-word; }
.msg.me .ctx { display: block; font-size: 11.5px; color: #c9c1b0; margin-bottom: 4px; font-family: var(--mono); }
.msg.bot { align-self: stretch; }
.msg.bot .who { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--gold-text); margin-bottom: 4px; }
.msg.bot .md { font-size: 13.5px; line-height: 1.6; }
.msg.bot .md pre { font-size: 12px; }
.msg.fail .md { color: var(--bad); }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-deep); animation: blink 1.2s infinite var(--ease); }
.typing i:nth-child(2) { animation-delay: 0.15s; } .typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.ai-compose { border-top: 1px solid var(--line); padding: 10px 12px 12px; display: grid; gap: 8px; background: var(--surface-2); }
.ai-compose textarea { border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; min-height: 64px; max-height: 180px; resize: none; background: var(--surface); outline: none; font-size: 13.5px; }
.ai-compose textarea:focus { border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(198, 173, 133, 0.25); }
.ctx-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 4px 0 10px; border-radius: 999px; background: var(--gold-tint); color: var(--gold-text); font-size: 12px; font-weight: 600; font-family: var(--mono); max-width: 100%; overflow: hidden; }
.ctx-chip button { border: 0; background: none; color: inherit; cursor: pointer; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; }
.ctx-chip button:hover { background: rgba(0, 0, 0, 0.06); }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); cursor: pointer; user-select: none; }
.check-inline input { accent-color: var(--gold-deep); }
.ai-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-suggest button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; height: 28px; padding: 0 11px; font-size: 12px; cursor: pointer; color: var(--ink-2); }
.ai-suggest button:hover { border-color: var(--gold); color: var(--gold-text); }

/* ---------- work simulation ---------- */
.inbox { display: grid; grid-template-columns: 300px 1px minmax(0, 1fr); height: 100%; min-height: 0; }
.mail-list { overflow: auto; background: var(--surface-2); }
.mail-group { padding: 14px 16px 6px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.07em; }
.mail-item { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; width: 100%; text-align: left; cursor: pointer; }
.mail-item:hover { background: var(--sunken); }
.mail-item.on { background: var(--gold-tint); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--gold-tint); color: var(--gold-text); }
.mail-item b { font-size: 13px; display: flex; gap: 6px; align-items: center; }
.mail-item .subj { font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-item .prog { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mail-item .prog.done { color: var(--ok); }
.mail-view { overflow: auto; }
.mail-inner { max-width: 820px; margin: 0 auto; padding: 28px 32px 80px; }
.brief { padding: 14px 16px; border-radius: var(--r); background: var(--gold-tint); color: #4d4128; font-size: 14px; margin-bottom: 22px; }
.mail-head { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; margin: 14px 0 18px; }
.mail-head .avatar { width: 40px; height: 40px; font-size: 14px; }
.mail-head b { font-size: 14px; }
.mail-head .to { font-size: 12.5px; color: var(--ink-3); }
.attach { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.attach header { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 12.5px; font-weight: 650; background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--ink-2); }
.attach table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.attach th, .attach td { padding: 7px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.attach th { color: var(--ink-3); font-weight: 650; font-size: 12px; }
.attach tr:last-child td { border-bottom: 0; }
.attach pre { margin: 0; padding: 10px 12px; font-size: 12px; white-space: pre-wrap; }
.series { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding: 14px 14px 6px; }
.series .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.series .col i { width: 100%; max-width: 38px; background: var(--gold); border-radius: 4px 4px 0 0; }
.series .col span { font-size: 11px; color: var(--ink-3); }
.series .col em { font-size: 11px; font-style: normal; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rate-head { display: flex; align-items: baseline; gap: 12px; margin: 30px 0 12px; }
.resp { padding: 16px 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.resp p { font-size: 14.5px; }
.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.scale button { height: 46px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); cursor: pointer; display: grid; place-items: center; line-height: 1.15; padding: 4px 2px; transition: background-color 140ms var(--ease), border-color 140ms var(--ease), transform 120ms var(--ease); }
.scale button b { font-size: 14px; font-variant-numeric: tabular-nums; }
.scale button span { font-size: 10.5px; color: var(--ink-3); }
.scale button:hover { border-color: var(--gold); }
.scale button:active { transform: scale(0.97); }
.scale button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.scale button.on span { color: #d8d1c2; }

/* ---------- work style ---------- */
.ws { max-width: 920px; margin: 0 auto; padding: 36px 24px 60px; height: 100%; overflow: auto; }
.ws-progress { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 8px 0 28px; }
.ws-progress i { display: block; height: 100%; background: var(--gold); transform-origin: left; transition: transform 300ms var(--ease); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stmt { padding: 26px 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-height: 140px; display: grid; align-content: start; gap: 10px; }
.stmt .lbl { font-size: 12px; font-weight: 700; color: var(--gold-text); letter-spacing: 0.06em; }
.stmt p { font-size: 18px; line-height: 1.45; font-weight: 520; text-wrap: pretty; }
.choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.choice { height: 56px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-weight: 650; font-size: 14px; display: grid; place-items: center; line-height: 1.2; transition: background-color 140ms var(--ease), border-color 140ms var(--ease), transform 120ms var(--ease); }
.choice small { display: block; font-size: 11px; color: var(--ink-3); font-weight: 500; }
.choice:hover { border-color: var(--gold); }
.choice:active { transform: scale(0.97); }
.choice.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.choice.on small { color: #d3cbbb; }
.ws-nav { display: flex; align-items: center; gap: 10px; margin-top: 24px; }
.ws-dots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 26px; }
.ws-dots button { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); font-size: 10px; color: var(--ink-3); cursor: pointer; padding: 0; font-variant-numeric: tabular-nums; }
.ws-dots button.ans { background: var(--gold-tint); border-color: var(--gold); color: var(--gold-text); }
.ws-dots button.cur { box-shadow: 0 0 0 2px var(--ink); }
.swap-in { animation: swapIn 260ms var(--ease); }
@keyframes swapIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(22, 20, 15, 0.55); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade 180ms var(--ease); }
.overlay.solid { background: var(--paper); backdrop-filter: none; }
.dialog { width: min(520px, 100%); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-3); padding: 28px; animation: pop 220ms var(--ease); }
.dialog h2 { margin-bottom: 8px; }
.dialog .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.dialog .icon-lg { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--bad-tint); color: var(--bad); margin-bottom: 16px; }
.dialog .icon-lg.gold { background: var(--gold-tint); color: var(--gold-text); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #f4f1ea; padding: 10px 16px; border-radius: 12px; font-size: 13.5px; box-shadow: var(--shadow-3); display: flex; gap: 10px; align-items: center; animation: toastIn 260ms var(--ease); pointer-events: auto; max-width: min(560px, 92vw); }
.toast.bad { background: var(--bad); }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity 180ms var(--ease), transform 180ms var(--ease); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------- recruiter ---------- */
.r-wrap { max-width: 1360px; margin: 0 auto; padding: 28px 24px 80px; }
.r-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); margin-bottom: 22px; overflow: hidden; }
.stat { padding: 16px 18px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat span { font-size: 12.5px; color: var(--ink-3); }
.stat b { display: block; font-size: 24px; font-weight: 680; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; margin-top: 2px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.search { position: relative; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search input { height: 36px; padding-left: 36px; width: 260px; border-radius: 999px; }
.seg { display: inline-flex; background: var(--sunken); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { white-space: nowrap; flex: none; height: 30px; border: 0; background: none; border-radius: 999px; padding: 0 12px; font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer; font-variant-numeric: tabular-nums; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.tbl-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-size: 12px; font-weight: 650; color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; }
.tbl th.num, .tbl td.num { text-align: right; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.tbl tbody tr { cursor: pointer; transition: background-color 120ms var(--ease); }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .who b { display: block; font-weight: 600; }
.tbl .who span { font-size: 12.5px; color: var(--ink-3); }
.score { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-weight: 650; }
.meter { width: 46px; height: 6px; border-radius: 6px; background: var(--sunken); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 6px; }
.secdots { display: inline-flex; gap: 3px; }
.secdots i { width: 9px; height: 9px; border-radius: 3px; background: var(--line); }
.secdots i.active { background: var(--gold); }
.secdots i.submitted { background: var(--ok); }
.secdots i.skipped { background: var(--bad); }

.detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.d-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 20px; }
.d-head h1 { font-size: 26px; }
.big-score { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 22px; background: var(--ink); color: #fff; flex: none; }
.big-score b { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.big-score span { font-size: 11px; color: #cfc7b6; }
.sec-scores { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; margin-bottom: 22px; }
.sec-score { padding: 14px 16px; border-right: 1px solid var(--line); }
.sec-score:last-child { border-right: 0; }
.sec-score span { font-size: 12.5px; color: var(--ink-3); display: block; }
.sec-score b { font-size: 22px; font-variant-numeric: tabular-nums; font-weight: 680; }
.sec-score em { font-style: normal; font-size: 12px; color: var(--ink-3); display: block; margin-top: 2px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 18px; overflow: hidden; }
.panel > header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel > header h3 { font-size: 15px; }
.panel > .body { padding: 16px 18px; }
.insight { display: grid; gap: 8px; }
.insight li { list-style: none; display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: 14px; line-height: 1.5; }
.insight ul { margin: 0; padding: 0; display: grid; gap: 8px; }
.insight .s .ic { color: var(--ok); } .insight .c .ic { color: var(--bad); } .insight .n .ic { color: var(--ink-3); }
.subtabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 10px; overflow-x: auto; }
.bars { display: grid; gap: 8px; }
.barrow { display: grid; grid-template-columns: 150px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; }
.barrow .track { height: 8px; background: var(--sunken); border-radius: 8px; overflow: hidden; position: relative; }
.barrow .track i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 8px; background: var(--gold-deep); }
.barrow .track.mid::after { content: ''; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--ink-3); }
.timeline-ev { display: grid; gap: 0; max-height: 420px; overflow: auto; font-size: 13px; }
.ev { display: grid; grid-template-columns: 64px 18px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); align-items: start; }
.ev time { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 12px; }
.ev.bad .ic { color: var(--bad); } .ev.warn .ic { color: var(--warn); } .ev.ok .ic { color: var(--ok); } .ev.info .ic { color: var(--ink-3); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery figure { margin: 0; border-radius: 10px; overflow: hidden; background: var(--ink); position: relative; aspect-ratio: 16 / 10; cursor: zoom-in; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery figcaption { position: absolute; left: 6px; bottom: 6px; font-size: 11px; background: rgba(0, 0, 0, 0.6); color: #fff; padding: 1px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.gallery figure.flag { box-shadow: 0 0 0 2px var(--bad); }
.codeview { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; height: 420px; position: relative; }
.codeview > .monaco { position: absolute; inset: 0; }
.diff { font-family: var(--mono); font-size: 12px; line-height: 1.55; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); overflow: auto; max-height: 520px; }
.diff div { padding: 0 12px; white-space: pre; }
.diff .add { background: #e6f3ea; color: #1d5133; }
.diff .del { background: #fbe9e6; color: #7f2a20; }
.diff .hunk { color: var(--ink-3); background: var(--sunken); }
.playback { display: grid; gap: 10px; }
.playback input[type='range'] { width: 100%; accent-color: var(--gold-deep); }
.keyrow { display: grid; grid-template-columns: minmax(0, 1fr) 90px 90px; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: start; }
.keyrow:last-child { border-bottom: 0; }
.pillnum { display: inline-grid; place-items: center; min-width: 26px; height: 24px; border-radius: 7px; font-weight: 700; font-size: 12.5px; background: var(--sunken); font-variant-numeric: tabular-nums; }
.pillnum.k { background: var(--gold-tint); color: var(--gold-text); }
.pillnum.match { background: var(--ok-tint); color: var(--ok); }
.pillnum.off2 { background: var(--bad-tint); color: var(--bad); }
.side .panel { margin-bottom: 14px; }
.decision-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.decision-btns button.on.advance { background: var(--ok); border-color: var(--ok); color: #fff; }
.decision-btns button.on.hold { background: var(--warn); border-color: var(--warn); color: #fff; }
.decision-btns button.on.reject { background: var(--bad); border-color: var(--bad); color: #fff; }
.stars { display: inline-flex; gap: 2px; }
.stars button { border: 0; background: none; padding: 2px; cursor: pointer; color: #cfc7b6; }
.stars button.on { color: var(--gold-deep); }
.stars button.on svg { fill: currentColor; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 12px; box-shadow: var(--shadow-3); }
.hist { display: flex; align-items: flex-end; gap: 3px; height: 56px; }
.hist i { flex: 1; background: var(--gold); border-radius: 3px 3px 0 0; min-height: 2px; }
.hist i.me { background: var(--ink); }

.block-screen { text-align: center; max-width: 460px; }
.block-screen .icon-lg { margin: 0 auto 18px; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--gold-tint); color: var(--gold-text); }

@media (max-width: 1100px) {
  .detail { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-right: 0; }
  .stat:nth-child(n + 4) { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .r-wrap { padding: 18px 16px 60px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar .who { display: none; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .toolbar { min-width: 0; }
  .r-head .btn { flex: 1 1 auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-right: 0 !important; border-top: 1px solid var(--line); }
  .stat:nth-child(-n + 2) { border-top: 0; }
  .sec-scores { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sec-score:nth-child(2) { border-right: 0; }
  .sec-score:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .search input { width: 100%; }
  .search { flex: 1; }
  .rules { grid-template-columns: 1fr; }
  .rule:nth-child(odd) { border-right: 0; }
  .rule:nth-child(2) { border-top: 1px solid var(--line); }
  .barrow { grid-template-columns: 110px 1fr 34px; }
  .keyrow { grid-template-columns: minmax(0, 1fr) 60px 60px; }
  .lobby { padding: 24px 16px 60px; }
  .tl-item { grid-template-columns: 36px 1fr; }
  .tl-meta { grid-column: 2; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
