/* OSPE (D-085, D-086): the examiner's tablet sheet and the exam office's screen in the school version's look: design-system
   school-theme.css's values read here without Tailwind (warm paper, the friendly blue main action, soft cards), Onest (OFL,
   fonts/OFL.txt) for Uzbek Latin and Cyrillic, served from this app so a tablet without internet draws the same. A white top
   bar; red only for a problem (the recording's dot is the one red); a chosen 0 is dark neutral. Patterns from lane D's judged
   mock-ups (engine ops/engineer-d/proposals/2026-10-27-ospe/, r4 A− 8.5 / A− 8.8), not their code. */
@font-face { font-family: Onest; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/assets/fonts/onest-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/assets/fonts/onest-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Onest; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/assets/fonts/onest-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* school-theme.css (design-system, studio 1ea3a18c) */
  --background: #fbfaf7; --foreground: #1f2430; --card: #fff; --primary: #1e63b5; --primary-fg: #fff;
  --secondary: #f3efe8; --muted-fg: #525967; --accent: #eaf1fb; --accent-fg: #1e4fa8; --destructive: #b42318;
  --border: #e6e1d8; --input: #cfc8bc; --radius: 10px;
  --head-bg: linear-gradient(100deg, #e4eefb 0%, #ecf2fb 46%, #f7f1e5 100%); --head-border: #d6e2f2; --head-ink: #3f4a5c; --kicker: #3d5a80;
  --ok: #166534; --ok-soft: #dcfce7; --ok-ring: #86efac;
  --amber: #92400e; --amber-soft: #fef3c7; --amber-ring: #fcd34d; --amber-band: #fef8e7; --amber-line: #f3d27a;
  --bad: #b42318; --bad-soft: #fee4e2;
  --zero: #ebe7e0; --zero-ring: #a8a29e; --paper: #f7f4ee; --question-line: #c9daf2;
  font-family: Onest, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--foreground); background: var(--background);
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .02em; }
.hidden { display: none !important; }
.ic { flex-shrink: 0; }
.muted { color: var(--muted-fg); }
.small { font-size: 14px; }
.xs { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow, .grow { flex: 1; min-width: 0; }
.kicker { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--kicker); display: flex; align-items: center; gap: 6px; margin: 0; }

/* ── the top bar: white, the session's line under the station's, the examiner on the right ── */
.top { display: flex; align-items: center; gap: 14px; padding: 10px 20px; min-height: 64px; background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.top .logo { color: var(--primary); display: grid; place-items: center; }
.top .grow { display: flex; flex-direction: column; line-height: 1.25; }
/* a long station name wraps to two lines, never an ellipsis (round 4: «Измерение артериального давлен…» at 834) */
.top .brand { font-weight: 600; font-size: 16px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.top .sub { color: var(--muted-fg); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .sub:empty { display: none; }
.kicker.session-line { margin: 0 0 6px; text-transform: none; letter-spacing: 0; font-size: 13px; }
.top select { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 6px 8px; min-height: 36px; }
.top .who { display: flex; align-items: center; gap: 10px; padding-left: 14px; border-left: 1px solid var(--border); line-height: 1.2; }
.top .who small { display: block; color: var(--muted-fg); font-size: 13px; }
.top .link { border: 0; background: transparent; color: var(--muted-fg); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; min-height: 36px; }
.top .link:hover { background: var(--secondary); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; background: #ffe4d1; color: #8f3b0c; flex-shrink: 0; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.n2 { background: #fbe1e8; color: #962646; } .avatar.n3 { background: #d2f1ec; color: #0c6159; }
.net { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.net.on { background: var(--ok-soft); color: var(--ok); }
.net.off { background: var(--amber-soft); color: var(--amber); }

main { max-width: 1100px; margin: 0 auto; padding: 22px 24px 40px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 18px; }
.card.blue { border-color: var(--question-line); }
.pad { padding: 20px 22px; }
.card h2 { margin: 0; font-size: 17px; font-weight: 700; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 22px 12px; border-bottom: 1px solid var(--border); }
.card-head .xs { color: var(--muted-fg); }

label.field { display: block; font-size: 14px; color: var(--muted-fg); margin-bottom: 10px; }
label.field input, label.field textarea, label.field select { display: block; width: 100%; margin-top: 4px; color: var(--foreground); }
input[type=text], input[type=password], input[type=number], input[type=date], textarea, select.input {
  border: 1px solid var(--input); border-radius: var(--radius); padding: 10px 12px; background: #fff; min-height: 44px;
}
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(30,99,181,.25); outline-offset: 1px; }
textarea { min-height: 88px; resize: vertical; width: 100%; }
input.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 24px; letter-spacing: .14em; text-transform: uppercase; height: 56px; border: 2px solid var(--primary); box-shadow: 0 0 0 4px rgba(30,99,181,.1); flex: 1; min-width: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--input); border-radius: var(--radius); padding: 0 18px; min-height: 44px; cursor: pointer; background: #fff; color: var(--foreground); font-weight: 500; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--secondary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.btn.primary:hover { background: #1a579f; }
.btn.lg { min-height: 56px; font-size: 16px; border-radius: 12px; padding: 0 22px; }
.btn.xl { min-height: 64px; font-size: 18px; font-weight: 600; border-radius: 12px; padding: 0 26px; }
.btn.wide { width: 100%; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--primary); padding: 0 10px; min-height: 36px; }
.btn.ghost:hover { background: var(--accent); }
/* Send stays neutral grey until the sheet is complete (never a faded blue that looks pressable) */
.btn.off, .btn:disabled { background: var(--secondary); border-color: var(--border); color: #6b7280; cursor: not-allowed; }

.msg { padding: 12px 14px; border-radius: var(--radius); margin: 10px 0; font-size: 15px; display: flex; gap: 10px; align-items: flex-start; }
.msg.err { background: var(--bad-soft); color: var(--bad); }
.msg.ok { background: var(--ok-soft); color: var(--ok); }
.msg.warn { background: var(--amber-band); color: #5c3a0a; border: 1px solid var(--amber-line); }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 500; white-space: nowrap; background: var(--secondary); color: var(--foreground); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--amber-soft); color: var(--amber); }
.pill.mild { background: #fefce8; color: #854d0e; box-shadow: inset 0 0 0 1px #fde68a; }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--accent); color: var(--accent-fg); }
.rec { position: relative; display: inline-flex; width: 12px; height: 12px; }
.rec::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: rgba(180,35,24,.3); animation: ping 1.4s infinite; }
.rec::after { content: ''; position: relative; width: 12px; height: 12px; border-radius: 50%; background: var(--destructive); }
@keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .rec::before { animation: none; } }

/* ── the examiner: sign-in and the station ── */
.head { position: relative; overflow: hidden; border-radius: 16px; border: 1px solid var(--head-border); background: var(--head-bg); padding: 20px 24px; margin-bottom: 20px; }
.head h1 { font-size: 28px; font-weight: 600; line-height: 1.15; margin: 4px 0 0; }
.head .facts { margin: 8px 0 0; color: var(--head-ink); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.signin { max-width: 480px; margin: 48px auto; }
.signin h1 { font-size: 26px; font-weight: 600; margin: 0 0 6px; }
.queue li { display: flex; align-items: center; gap: 10px; padding: 0 22px; height: 44px; border-bottom: 1px solid var(--border); font-size: 15px; }
.queue li:last-child { border-bottom: 0; }
.queue li.done { color: var(--muted-fg); }
ol.plain, ul.plain { list-style: none; margin: 0; padding: 0; }
.colleagues li { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; }
.colleagues .who { flex: 1; min-width: 0; line-height: 1.25; }
.colleagues .who b { display: block; font-weight: 500; overflow-wrap: anywhere; }
.colleagues .who span { display: block; font-size: 13px; color: var(--muted-fg); }
.colleagues .state { display: block; font-size: 13px; margin-top: 2px; }
.colleagues .state.on { color: var(--ok); }

/* ── the examiner's sheet ── */
.split { display: grid; gap: 20px; align-items: start; }
.split > * { min-width: 0; }
.side { display: none; }
/* the pinned block under the top bar: the timer band (under 1024) and, offline, the calm banner at every width (round 4) */
.pin { position: sticky; top: 64px; z-index: 10; margin: -22px -24px 18px; background: rgba(251,250,247,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--border); }
.band { padding: 12px 24px; display: flex; align-items: center; gap: 20px; }
.pin .offband { margin: 0; border-radius: 0; border-width: 1px 0 0; padding: 10px 24px; align-items: center; }
.pin .offband span { font-size: 13.5px; }
.timer { display: flex; align-items: baseline; gap: 8px; }
.timer .big { font-size: 44px; line-height: 1; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.timer.up .big { color: var(--bad); }
.track { height: 10px; border-radius: 999px; background: var(--secondary); overflow: hidden; }
.track > i { display: block; height: 100%; border-radius: 999px; background: var(--primary); }
.track.thin { height: 6px; } .track.green > i { background: #16a34a; }
.recline { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.recline b { font-weight: 500; }
.band .cand { padding-left: 20px; border-left: 1px solid var(--border); text-align: right; line-height: 1.2; }
.band .cand .mono { font-size: 22px; font-weight: 600; }
.title-line { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; flex-wrap: wrap; scroll-margin-top: 96px; }
.title-line h1 { font-size: 22px; font-weight: 600; margin: 0; }
.question p.q { font-size: 17px; font-weight: 600; line-height: 1.35; margin: 8px 0 0; }
.question p.note { font-size: 13px; color: var(--muted-fg); margin: 8px 0 0; }
.lines li { display: flex; flex-direction: column; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--border); scroll-margin-top: 200px; }
.lines li:last-child { border-bottom: 0; }
.lines .what { display: flex; align-items: flex-start; gap: 12px; flex: 1; min-width: 0; }
.lines .n { margin-top: 1px; width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 600; background: var(--secondary); color: var(--muted-fg); font-variant-numeric: tabular-nums; }
.lines li.done .n { background: var(--primary); color: #fff; }
.lines .text { font-size: 15.5px; line-height: 1.35; font-weight: 500; margin: 0; }
.lines li.done .text { font-weight: 400; }
.lines .own { font-size: 13px; color: var(--kicker); font-weight: 600; display: block; margin-top: 2px; }
.lines .meta { margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-fg); }
.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; background: var(--accent); color: var(--accent-fg); padding: 2px 6px; font-weight: 500; font-variant-numeric: tabular-nums; }
.meta .unsent { color: var(--amber); display: inline-flex; align-items: center; gap: 4px; }
.meta .changed { color: var(--accent-fg); display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }
.marks li.changed span .ic { color: var(--accent-fg); vertical-align: -2px; margin-left: 2px; }
/* Send offline: what it does, under the word */
.btn.two .two-line { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.btn.two .two-line small { font-size: 12px; font-weight: 500; opacity: .9; }
.pts { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; flex-shrink: 0; border: 1px solid var(--input); border-radius: var(--radius); overflow: hidden; background: #fff; }
.pts button { border: 0; border-left: 1px solid var(--input); background: #fff; min-height: 56px; min-width: 64px; padding: 4px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.pts button:first-child { border-left: 0; }
.pts button b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 4px; }
.pts button small { font-size: 12.5px; color: var(--muted-fg); white-space: nowrap; }
.pts button[aria-pressed=true] small { color: inherit; font-weight: 600; }
.pts button.full[aria-pressed=true] { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 2px var(--ok-ring); }
.pts button.part[aria-pressed=true] { background: var(--amber-soft); color: var(--amber); box-shadow: inset 0 0 0 2px var(--amber-ring); }
.pts button.zero[aria-pressed=true] { background: var(--zero); color: var(--foreground); box-shadow: inset 0 0 0 2px var(--zero-ring); }
.pts button.pick[aria-pressed=true] { background: var(--accent); color: var(--accent-fg); box-shadow: inset 0 0 0 2px #93b4e3; }
.pts button:disabled { cursor: default; }
.pts.global button { min-height: 64px; }
.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255,255,255,.97); backdrop-filter: blur(6px); border-top: 1px solid var(--border); box-shadow: 0 -4px 12px rgba(31,36,48,.06); }
.bottom .in { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 12px 24px; }
.bottom .count { font-size: 15px; line-height: 1.2; margin: 0; }
.bottom .left { font-size: 13px; color: var(--muted-fg); line-height: 1.2; margin: 3px 0 8px; }
.spacer { height: 104px; }
.offband { display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--amber-line); background: var(--amber-band); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; }
.offband .ico { width: 36px; height: 36px; border-radius: 50%; background: var(--amber-soft); color: var(--amber); display: grid; place-items: center; flex-shrink: 0; }
.offband b { display: block; color: #5c3a0a; font-size: 15px; }
.offband span { color: #6b4a12; font-size: 14px; }
.offband .count { margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: #fff; border: 1px solid var(--amber-line); color: var(--amber); font-weight: 600; font-size: 14px; }

/* sent and locked */
.locked-head { display: flex; align-items: flex-start; gap: 16px; }
.locked-head .ico { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; flex-shrink: 0; }
.locked-head h1 { font-size: 28px; font-weight: 600; margin: 0; line-height: 1.15; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.tile { border: 1px solid var(--border); background: var(--paper); border-radius: 12px; padding: 14px 16px; }
.tile p { margin: 0; font-size: 14px; color: var(--muted-fg); }
.tile .v { font-size: 32px; font-weight: 600; color: var(--foreground); font-variant-numeric: tabular-nums; line-height: 1.2; }
.tile .v small { font-size: 18px; color: var(--muted-fg); font-weight: 500; }
.marks { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; }
.marks li { border: 1px solid var(--border); border-radius: 8px; background: #fff; text-align: center; padding: 6px 2px; line-height: 1.25; }
.marks li span { display: block; font-size: 11px; color: var(--muted-fg); font-variant-numeric: tabular-nums; }
.marks li b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.facts-list { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.facts-list li { display: flex; align-items: flex-start; gap: 8px; }
.facts-list .ic { color: var(--muted-fg); margin-top: 2px; }
.next-code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 34px; font-weight: 600; margin: 4px 0 0; }

@media (min-width: 768px) {
  .lines li { flex-direction: row; align-items: center; }
  .pts.line { width: 340px; }
  .pts.line button { padding: 4px 4px; }
}
/* the desk of the sheet: at 1024 and wider the timer, progress and Send sit in a 288 px side column */
@media (min-width: 1024px) {
  .split.sheet { grid-template-columns: minmax(0, 1fr) 288px; }
  .split.station { grid-template-columns: minmax(0, 1fr) 340px; }
  .side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 84px; }
  .side .card { margin: 0; }
  .side .timer { flex-direction: column; align-items: stretch; gap: 2px; }
  .side .timer .big { font-size: 60px; }
  .narrow-only { display: none !important; }
  .pin:not(.off) { display: none; }
  .pin.off { margin: -22px -24px 18px; border-bottom: 0; background: transparent; }
  .pin.off .offband { border-width: 0 0 1px; }
  .pin.off ~ .split .side { top: 150px; }
}
@media (max-width: 1023.98px) { .wide-only { display: none !important; } }
@media (max-width: 767.98px) { .top .who .name { display: none; } .top .who { padding-left: 10px; } }
@media (max-width: 640px) {
  main { padding: 14px 14px 32px; }
  .pin { margin: -14px -14px 14px; }
  .band { padding: 10px 14px; }
  .pin .offband { padding: 10px 14px; }
  .top { padding: 8px 12px; }
  .top .who small, .top .who span.name { display: none; }
  .tiles { grid-template-columns: 1fr; }
}

/* ── the office (1440) ── */
body.office { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
/* the side bar's column runs the page's full height; its contents stay in view (D-088: it stopped at 900 px on long pages) */
.sidebar { background: #fff; border-right: 1px solid var(--border); }
.sidebar .in { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .org { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 56px; border-bottom: 1px solid var(--border); line-height: 1.2; }
.sidebar .org b { font-size: 13px; font-weight: 600; display: block; }
.sidebar .org small { font-size: 12px; color: var(--muted-fg); }
.sidebar nav { padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: 8px; color: var(--foreground); text-decoration: none; font-size: 14px; }
.sidebar nav a:hover { background: var(--secondary); }
.sidebar nav a[aria-current=page] { background: var(--accent); color: var(--accent-fg); font-weight: 500; }
.sidebar .here { margin: 8px 12px; padding: 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--border); font-size: 12.5px; color: var(--muted-fg); line-height: 1.5; }
.sidebar .here b { display: flex; align-items: center; gap: 6px; color: var(--foreground); font-size: 12.5px; margin-bottom: 4px; }
.sidebar .me { margin-top: auto; border-top: 1px solid var(--border); padding: 12px 16px; display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 1.25; }
.sidebar .me small { display: block; color: var(--muted-fg); font-size: 12px; }
/* the bar is the same signed in or out: the sign-in's language select sits padded in it */
.page > .bar { height: 56px; border-bottom: 1px solid var(--border); background: var(--background); display: flex; align-items: center; gap: 14px; padding: 0 32px; position: sticky; top: 0; z-index: 10; }
.page > .bar select.input { min-height: 36px; padding: 4px 10px; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted-fg); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; }
.crumbs a { color: var(--muted-fg); text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.crumbs b { color: var(--foreground); font-weight: 500; }
.office main { max-width: 1184px; padding: 28px 32px 48px; margin: 0; }
.office .head h1 { font-size: 28px; }
.office .head .actions { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); display: flex; gap: 8px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 0 0 18px; }
.tabs a { padding: 10px 12px; font-size: 14px; color: var(--muted-fg); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current=page] { color: var(--foreground); font-weight: 500; border-bottom-color: var(--primary); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chips a { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--foreground); text-decoration: none; font-size: 14px; }
.chips a[aria-current=page] { background: var(--primary); border-color: var(--primary); color: #fff; }
.chips a .cnt { background: rgba(255,255,255,.25); border-radius: 999px; padding: 0 7px; font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; }
.stat p { margin: 0; font-size: 14px; color: var(--muted-fg); }
.stat .v { font-size: 28px; font-weight: 600; color: var(--foreground); font-variant-numeric: tabular-nums; margin: 4px 0; }
.stat .v small { font-size: 16px; color: var(--muted-fg); font-weight: 500; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th, table.grid td { padding: 0 14px; height: 48px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
table.grid th { font-size: 12.5px; color: var(--muted-fg); font-weight: 500; white-space: nowrap; height: 40px; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid td.n, table.grid th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.grid td.c, table.grid th.c { text-align: center; }
table.grid td.score .g { display: block; font-size: 12px; font-weight: 400; color: var(--muted-fg); }
table.grid td.score { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
/* the commentary mark takes its verdict's colour from its span (round 3), never one fixed green */
table.grid td.score .ic { vertical-align: -3px; margin-left: 4px; }
table.grid tr.flag > td { background: #fffbeb; }
table.grid tr.detail > td { background: #fcfbf9; height: auto; padding: 16px 20px; }
table.grid tr.click { cursor: pointer; } table.grid tr.click:hover > td { background: var(--accent); }
.cand b { display: block; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 600; font-size: 14px; }
.cand span { display: block; font-size: 13px; color: var(--muted-fg); }
.strip { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 12px; align-items: center; margin-bottom: 18px; }
.step { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; line-height: 1.3; }
.step .k { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 600; font-size: 14px; flex-shrink: 0; }
.step.later { background: var(--paper); } .step.later .k { background: var(--secondary); color: var(--muted-fg); }
.step b { font-size: 14px; font-weight: 600; } .step span { display: block; font-size: 13px; color: var(--muted-fg); }
.strip > .ic { color: var(--muted-fg); }
.foot { font-size: 13px; color: var(--muted-fg); margin: 10px 0 18px; line-height: 1.55; }
.brl { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.brl aside { background: var(--paper); border-left: 1px solid var(--border); padding: 18px 20px; font-size: 13px; color: var(--muted-fg); }
.brl aside .kv { display: flex; justify-content: space-between; align-items: baseline; color: var(--foreground); font-size: 14px; margin-bottom: 10px; }
.brl aside .kv b { font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 12px; }
.lean-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.quote { border-left: 3px solid var(--border); padding-left: 10px; color: var(--muted-fg); font-style: italic; margin: 4px 0; }
.builder .station { border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 14px; background: var(--paper); }
.builder .station h3 { margin: 14px 0 8px; font-size: 14px; font-weight: 600; color: var(--muted-fg); }
.builder .line { display: grid; grid-template-columns: 1fr 90px auto; gap: 8px; margin-bottom: 8px; align-items: start; }
.builder .exline { display: grid; grid-template-columns: 260px 1fr auto; gap: 8px; margin-bottom: 8px; align-items: start; }
.codes-table td.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 20px; letter-spacing: .16em; font-weight: 700; }
.office .signin-wrap { grid-column: 1 / -1; }

/* ── one candidate at a station (D-088) ── */
.cand-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.cand-grid .col { min-width: 0; }
.player .play { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.player .play:disabled { background: var(--secondary); color: #8a8f98; cursor: not-allowed; }
.timeline { position: relative; margin-top: 18px; }
.timeline .lane { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 28px; }
.timeline .lane-label { font-size: 12.5px; color: var(--muted-fg); display: flex; align-items: center; gap: 6px; min-width: 0; }
.timeline .ticks .lane-label { color: var(--foreground); font-weight: 500; }
.timeline .lane-head { margin: 10px 0 4px 172px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-fg); }
.speech { position: relative; height: 12px; border-radius: 999px; background: var(--secondary); }
.speech i { position: absolute; top: 0; bottom: 0; border-radius: 999px; opacity: .6; }
.sp-candidate { background: #1e63b5; } .sp-examiner { background: #5b34a8; } .sp-other { background: #0e6a64; }
.tick-row { position: relative; height: 32px; }
.tick-row .rule { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--border); }
.dot { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%; border: 0; color: #fff; font-size: 10.5px; font-weight: 600; display: grid; place-items: center; cursor: pointer; padding: 0; font-variant-numeric: tabular-nums; }
.dot.full, .dot-k.full { background: #16a34a; } .dot.part, .dot-k.part { background: #d97706; } .dot.zero, .dot-k.zero { background: #78716c; }
.dot.no { box-shadow: 0 0 0 4px #fca5a5; } .dot-k.no { background: #fff; box-shadow: inset 0 0 0 3px #fca5a5; }
.timeline .axis .marks { position: relative; height: 18px; font-size: 11px; color: var(--muted-fg); font-variant-numeric: tabular-nums; }
.timeline .axis .marks span { position: absolute; transform: translateX(-50%); }
.timeline .head-line { position: absolute; inset: 0; pointer-events: none; }
.timeline .head-line .ph { position: relative; height: 100%; }
.playhead { position: absolute; top: 0; bottom: 18px; width: 2px; background: var(--primary); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot-k { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.at { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--border); background: #fff; color: var(--primary); font-size: 12px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.at:disabled { color: var(--muted-fg); cursor: default; }
.transcript li { display: grid; grid-template-columns: 64px 128px minmax(0, 1fr); gap: 12px; padding: 10px 22px; border-bottom: 1px solid var(--border); align-items: start; }
.transcript li:last-child { border-bottom: 0; }
.transcript p { margin: 0; font-size: 15px; line-height: 1.5; }
.transcript .flag-line { margin-top: 6px; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; border: 1px solid var(--border); border-radius: 8px; background: #fff; padding: 3px 8px; }
.speaker { display: inline-flex; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; justify-self: start; }
.speaker.sp-candidate { background: #e0ecff; color: #1e63b5; opacity: 1; } .speaker.sp-examiner { background: #eee7fb; color: #5b34a8; opacity: 1; } .speaker.sp-other { background: #d9f3f0; color: #0e6a64; opacity: 1; }
.side-by-side td { height: auto; padding-top: 8px; padding-bottom: 8px; }
.side-by-side td.c b { display: block; font-size: 15px; }
.side-by-side td.c .sub { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted-fg); font-variant-numeric: tabular-nums; }
.side-by-side .v-no { color: var(--bad); display: inline-flex; } .side-by-side .v-check { color: var(--amber); display: inline-flex; }
.side-by-side tr.sum td { background: var(--paper); font-weight: 600; }
.side-by-side tr.sum td .g { display: block; font-size: 12px; font-weight: 400; color: var(--muted-fg); white-space: nowrap; }
.sheet-card.no { border-color: #f3b4ad; }
.sheet-card .sc-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.sheet-card .sc-head b { display: block; font-size: 15px; font-weight: 600; }
.sheet-card .sc-who { min-width: 0; }
.sheet-card .sc-who > * { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-card .score-block { text-align: right; line-height: 1.2; }
.sheet-card .score-block .v { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sheet-card .score-block .v small { font-size: 14px; color: var(--muted-fg); font-weight: 400; }
.sheet-card .sc-note { margin: 0; padding: 10px 18px; border-bottom: 1px solid var(--border); color: var(--muted-fg); }
.sheet-card .sc-body { padding: 14px 18px 16px; }
.sheet-card .item { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.sheet-card .item p { margin: 0; }
.quote-box { margin-top: 8px; display: flex; gap: 10px; align-items: flex-start; border-left: 3px solid #9dbde6; background: #f5f8fd; border-radius: 8px; padding: 8px 10px; font-size: 13.5px; line-height: 1.4; }
.avatar.xs { width: 22px; height: 22px; font-size: 10px; }
/* the examiners' read */
table.lean td { height: auto; padding-top: 12px; padding-bottom: 12px; vertical-align: top; }
table.lean th.bar-h, table.lean td.bar-c { width: 240px; padding-right: 28px; }
table.lean td b { white-space: nowrap; }
table.lean th.bar-h { display: table-cell; }
table.lean th.bar-h span { display: inline-block; width: 33.3%; text-align: center; white-space: nowrap; } table.lean th.bar-h span:first-child { text-align: left; } table.lean th.bar-h span:last-child { text-align: right; }
.lean-bar { position: relative; height: 10px; border-radius: 999px; background: linear-gradient(90deg, #fde7c7, #f3efe8 50%, #fde7c7); margin-top: 8px; }
.lean-bar .mid { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; background: var(--input); }
.lean-bar .pt { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; transform: translate(-50%, -50%); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--input); }
.lean-bar .pt.ok { background: #16a34a; } .lean-bar .pt.mild { background: #eab308; } .lean-bar .pt.warn { background: #d97706; } .lean-bar .pt.none { background: #a8a29e; }
.codes-at { display: flex; gap: 20px; align-items: center; border-bottom: 1px solid var(--border); }
.codes-at img { border: 1px solid var(--border); border-radius: 8px; background: #fff; flex-shrink: 0; }
.codes-at .url { font-size: 18px; font-weight: 600; margin: 4px 0 0; overflow-wrap: anywhere; }

/* the demo's landing (D-089) */
.demo-steps { margin: 10px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 18px; }
.demo-grid .card-head .xs { white-space: nowrap; }
.demo-grid .card { margin: 0; }
.demo-grid td.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 18px; letter-spacing: .12em; font-weight: 700; text-align: right; }
.demo-office { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; }

@media (max-width: 1100px) {
  body.office { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brl { grid-template-columns: 1fr; }
  .cand-grid { grid-template-columns: 1fr; }
}
@media print {
  .top, .no-print, .sidebar, .office .bar, .bottom { display: none !important; }
  body, body.office { background: #fff; display: block; }
  .card { border: 0; }
}

/* round 3: a locked builder reads as a page (no white inputs, no resize grips); the own-question line's tag */
.builder .ro { margin-top: 4px; min-height: 22px; color: var(--foreground); font-size: 15px; padding: 2px 0; }
.builder .ro.pre { white-space: pre-wrap; font-size: 14px; }
.builder.locked .line, .builder.locked .exline { border-bottom: 1px solid var(--border); padding-bottom: 8px; align-items: baseline; }
.builder .line { grid-template-columns: 1fr 90px 240px auto; }
.builder .own-box { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--muted-fg); padding-top: 10px; }
.colleagues .state.sent { color: var(--ok); display: flex; align-items: center; gap: 4px; }
.sheet-card .item.own { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; }
/* an examiner's tag («Ekzaminator 1 · Rahimova D.») wraps inside its column, never over the words */
.transcript .speaker { white-space: normal; line-height: 1.35; border-radius: 8px; max-width: 100%; }

/* round 4 (D-091) */
.nowrap { white-space: nowrap; }
/* the examiners: one column grid for every station's table */
table.lean { table-layout: fixed; }
table.lean col.c-ex { width: 236px; } table.lean col.c-mean { width: 92px; } table.lean col.c-bar { width: 240px; }
table.lean col.c-dev { width: 220px; } table.lean col.c-cands { width: 150px; } table.lean col.c-means { width: auto; }
table.lean .sample { display: block; margin-top: 4px; }
/* the results' stepper: the steps that exist */
.strip.two { grid-template-columns: 1fr auto 1fr; }
/* the one-candidate page: the decision named, then the spread, then what the commentary is */
.msg.decision > div { display: flex; flex-direction: column; gap: 2px; }
.msg.decision .fact { font-weight: 500; }
/* the transcript's search */
.search { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--input); border-radius: 8px; background: #fff; color: var(--muted-fg); flex-shrink: 0; }
.search input { border: 0; outline: 0; font: inherit; font-size: 14px; width: 190px; background: transparent; color: var(--foreground); }
.search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,99,181,.12); }
.card-head:has(.search) { align-items: center; }
/* the demo's landing: each session says its language; codes aligned to the card's inset; full-width buttons on a phone */
.demo-grid .card-head .lang-pill { margin-left: auto; }
table.demo-codes td:first-child { padding-left: 22px; white-space: nowrap; }
table.demo-codes td:last-child { padding-right: 22px; }
.demo-office { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.demo-office .side-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.demo-office .pw { display: inline-flex; align-items: center; gap: 8px; }
.demo-office .pw b { font-size: 16px; letter-spacing: .06em; }
.demo-reset { display: flex; gap: 8px; align-items: flex-start; }
@media (max-width: 640px) {
  .demo .btn.lg { width: 100%; }
  .demo-office { grid-template-columns: 1fr; }
  .demo-office .side-box { justify-content: flex-start; }
  table.demo-codes td { padding: 0 10px; }
  table.demo-codes td:first-child { padding-left: 22px; } table.demo-codes td:last-child { padding-right: 22px; }
  .demo-grid td.code { font-size: 16px; letter-spacing: .08em; }
}
/* 7 / 7: room between the count and its bar when nothing is left to say (round 4) */
.count + .track { margin-top: 8px; }

/* round 5 (D-092): the decision taken on the page; the search counted and marked; long words in four-cell rows; the builder's
   labels on one line; the landing's buttons level; the office's question on the tablet */
.msg.decision .grow { min-width: 0; }
.msg.decision .how { font-size: 14px; color: #6b4a12; margin-top: 4px; }
.msg.decision .decide { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.msg.ok.decision { border: 1px solid var(--ok-ring); }
.search-wrap { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.search-wrap .found { color: var(--muted-fg); white-space: nowrap; font-weight: 500; }
.transcript mark { background: #fde68a; color: inherit; border-radius: 3px; padding: 0 2px; }
/* round 9 (D-096): a line of four or more choices sizes its cells by their words, so the unlabelled middle ones are narrow and
   «Не выполнил» keeps one line beside «Выполнил» (one 0 word on the whole sheet) */
.pts.line.many { grid-auto-columns: auto; }
.pts.line.many button { padding: 4px 6px; min-width: 0; }
.pts.line.many button.part { min-width: 44px; }
.pts.line.many button small { white-space: nowrap; }
.row.top { align-items: flex-start; }
.demo-grid .card { display: flex; flex-direction: column; }
.demo-grid .card > .foot-pad { margin-top: auto; }
.msg.ask > div { display: flex; flex-direction: column; gap: 2px; }

/* round 6 (D-093) */
.pill.progress { background: #fff; color: var(--kicker); box-shadow: inset 0 0 0 1px var(--question-line); }
table.grid tr.marking > td { background: #f6f9fd; }
.section-h { font-size: 15px; font-weight: 600; margin: 4px 0 12px; }
.live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 18px; }
.live-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.live-card.on { box-shadow: inset 3px 0 0 var(--primary); }
.live-card .lc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.live-card .lc-now { margin: 0; font-size: 20px; font-weight: 600; }
.live-card .lc-now.muted { font-size: 14px; font-weight: 400; }
.live-card .lc-ex { display: flex; flex-direction: column; gap: 8px; }
.live-card .lc-ex li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.live-card .lc-ex li.off .grow { color: var(--muted-fg); }
.live-card .lc-prog { display: inline-flex; align-items: center; gap: 8px; }
.live-card .lc-prog .bar { width: 64px; height: 6px; border-radius: 3px; background: var(--secondary); overflow: hidden; }
.live-card .lc-prog .bar i { display: block; height: 100%; background: var(--primary); }
.live-card .lc-foot { margin: 2px 0 0; padding-top: 10px; border-top: 1px solid var(--border); }
.msg.decision .answer { font-weight: 500; }
.ask-card { display: flex; flex-direction: column; gap: 8px; }
.ask-card .ask-line { font-weight: 500; }
.ask-card .ask-flag { background: #fff; border: 1px solid var(--amber-line); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.ask-card .ask-answer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ask-card .ask-answer input { flex: 1 1 220px; min-height: 44px; border: 1px solid var(--input); border-radius: var(--radius); padding: 0 12px; background: #fff; }
/* the product's wordmark (round 6): «ОСПЭ» is set in capitals, but Onest's Cyrillic О С П Э alone on a line read as «оспэ»;
   tracked out, as a wordmark is, they read as the capitals they are */
.mark, .sidebar .org b.mark { letter-spacing: .08em; font-weight: 800; font-size: 15px; line-height: 1; display: inline-block; padding: 5px 8px 4px; border-radius: 6px; background: var(--primary); color: var(--primary-fg, #fff); }
.sidebar .org b.mark { display: table; margin-bottom: 4px; }
/* round 8: on the landing's bar the badge is its own width beside the shield, as the office side bar's (the bar's column
   stretched it into a blue band to the language menu) */
.top .brand.mark { display: inline-block; align-self: flex-start; flex: none; overflow: visible; }
/* the owner session's 21:5x (D-096): on the landing's top bar the plain name beside the shield, as ielts/medical.demo's header
   (kit.css .k-brand); the office side bar's badge stays */
.top .brand.mark { background: none; color: var(--foreground); padding: 0; border-radius: 0; font-size: 17px; }
/* round 7: the Day's top row has three figures; the station's full name under its short one; parts that never break inside */
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.live-card .lc-full { display: block; margin-top: 2px; }
.nw { white-space: nowrap; }
@media (max-width: 767.98px) { .stats.three { grid-template-columns: 1fr; } }
