/* The station oral exam (D-085, D-086, D-110): the specialist's, the administrator's and the examiner's screens 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; a 0 is a grade and looks like one, an empty cell is a dash. 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); }

main { max-width: 1240px; 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], input[type=search], 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.el-wait { background: var(--amber-soft); color: var(--amber); }
.pill.el-bad { background: var(--bad-soft); color: var(--bad); }

/* ── D-110: grade recording ── */
.track { height: 8px; border-radius: 999px; background: var(--secondary); overflow: hidden; }
.track > i { display: block; height: 100%; border-radius: 999px; background: var(--primary); }
.track.done > i { background: #16a34a; }
.top .zlogo { height: 34px; width: auto; display: block; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a { color: var(--muted-fg); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 15px; min-height: 40px; display: inline-flex; align-items: center; }
.top nav a:hover { background: var(--secondary); }
.top nav a[aria-current=page] { background: var(--accent); color: var(--accent-fg); }
.top .who b { font-weight: 600; font-size: 14px; display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brandline { display: flex; flex-direction: column; line-height: 1.2; }
.brandline b { font-size: 15px; font-weight: 600; }
.brandline small { color: var(--muted-fg); font-size: 12.5px; }
@media (max-width: 1280px) { .brandline small { display: none; } }
.brandline { min-width: 0; } .brandline b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1180px) {
  .top { flex-wrap: wrap; padding: 8px 14px; gap: 8px 10px; }
  .top nav { order: 5; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .top nav a { white-space: nowrap; padding: 6px 10px; }
  .top .who b { max-width: 130px; }
  .top .who small { display: none; }
  main { padding: 16px 14px 40px; }
}
@media (max-width: 480px) { .top .brandline { display: none; } .top .who { padding-left: 8px; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 4px 0 18px; }
.page-head h1 { font-size: 26px; font-weight: 600; margin: 2px 0 0; line-height: 1.2; overflow-wrap: anywhere; }
.page-head .facts { color: var(--muted-fg); font-size: 14px; display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 6px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 16px; }
label.field .hint { display: block; font-size: 12.5px; margin-top: 3px; color: var(--muted-fg); }
label.field.bad input, label.field.bad select, input.bad, select.bad { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(180,35,24,.12); }
.field-err { color: var(--bad); font-size: 13px; margin-top: 3px; display: block; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.seg { display: inline-flex; border: 1px solid var(--input); border-radius: var(--radius); overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; background: #fff; padding: 0 16px; min-height: 42px; cursor: pointer; font-weight: 500; }
.seg button + button { border-left: 1px solid var(--input); }
.seg button[aria-pressed=true] { background: var(--primary); color: #fff; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.filters select, .filters input { min-height: 42px; }

table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.data th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted-fg); text-transform: uppercase; letter-spacing: .03em; padding: 10px; border-bottom: 1px solid var(--border); background: #fcfbf8; white-space: nowrap; }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: center; font-variant-numeric: tabular-nums; }
.tablebox { overflow-x: auto; }
.empty { padding: 28px 22px; color: var(--muted-fg); text-align: center; }
@media (max-width: 700px) {
  table.data.cards thead { display: none; }
  table.data.cards, table.data.cards tbody, table.data.cards tr, table.data.cards td { display: block; width: 100%; }
  table.data.cards tr { padding: 10px 14px; border-bottom: 1px solid var(--border); }
  table.data.cards td { border: 0; padding: 2px 0; text-align: left !important; }
  table.data.cards td[data-l]::before { content: attr(data-l) ': '; color: var(--muted-fg); font-size: 13px; }
  table.data.cards td.cellv { display: inline-block; width: auto; padding: 6px 6px 2px 0; }
}

/* a cell's state: a dash for not started, amber for a draft, the grade once submitted, «absent» its own mark */
.sc { display: inline-flex; min-width: 42px; height: 32px; padding: 0 8px; border-radius: 8px; align-items: center; justify-content: center; font-weight: 600; font-variant-numeric: tabular-nums; border: 1px solid transparent; background: transparent; font-size: 15px; gap: 4px; }
button.sc { cursor: pointer; font-family: inherit; color: inherit; }
button.sc:hover { border-color: var(--primary); }
.sc .stn { display: none; font-size: 11px; font-weight: 500; color: var(--muted-fg); }
@media (max-width: 700px) { .sc .stn { display: inline; } }
.sc.not_started { color: #8f8a81; font-weight: 400; background: #f6f4ef; }
.sc.in_progress { background: var(--amber-soft); color: var(--amber); font-style: italic; }
.sc.submitted { background: #eef2f7; color: var(--foreground); }
.sc.absent { background: var(--bad-soft); color: var(--bad); font-size: 12.5px; font-weight: 600; }
.sc.corrected { box-shadow: inset 0 0 0 2px #93c5fd; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.status.complete, .status.submitted { background: var(--ok-soft); color: var(--ok); }
.status.not_started { background: var(--secondary); color: var(--muted-fg); }
.status.in_progress { background: var(--amber-soft); color: var(--amber); }
.status.absent { background: var(--bad-soft); color: var(--bad); }
.status.incomplete { background: #fde7d9; color: #9a3412; }
.status.final { background: var(--accent); color: var(--accent-fg); }
tr.hl-pending td { background: #fffcf0; } tr.hl-absent td, tr.hl-incomplete td { background: #fff6f4; }
.total { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }

.stations { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.station { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.station .n { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--kicker); display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.station .ex { font-weight: 600; margin: 6px 0 8px; overflow-wrap: anywhere; line-height: 1.3; }
.station .cnt { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; color: var(--muted-fg); margin-top: 6px; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.tiles { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.tiles button { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 0 14px; min-height: 40px; cursor: pointer; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.tiles button b { font-variant-numeric: tabular-nums; }
.tiles button[aria-pressed=true] { background: var(--foreground); color: #fff; border-color: var(--foreground); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 0 0 18px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 10px 16px; min-height: 44px; cursor: pointer; font-weight: 500; color: var(--muted-fg); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected=true] { color: var(--primary); border-bottom-color: var(--primary); }

/* a session: where it is and the one next action (the owner's 11-05) */
.stepper { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; margin: 0 0 16px; }
.stepper ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.stepper li { display: flex; align-items: center; gap: 8px; color: var(--muted-fg); font-weight: 500; font-size: 14.5px; }
.stepper li + li::before { content: ""; width: 28px; height: 2px; background: var(--border); margin-right: 2px; }
.stepper li .k { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border); font-size: 13px; font-weight: 700; background: #fff; }
.stepper li.done { color: var(--foreground); } .stepper li.done .k { background: var(--ok); border-color: var(--ok); color: #fff; }
.stepper li.now { color: var(--primary); font-weight: 600; } .stepper li.now .k { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.stepper .nextline { margin: 10px 0 0; font-size: 14.5px; }
@media (max-width: 700px) { .stepper li + li::before { width: 12px; } .stepper li { font-size: 13px; } }
.plain { font-size: 15.5px; font-weight: 500; margin: 0 0 12px; font-variant-numeric: tabular-nums; }
.station .chg { border: 0; background: transparent; cursor: pointer; padding: 0; margin-top: 8px; font-size: 13.5px; display: inline-flex; gap: 6px; align-items: center; color: var(--primary); min-height: 32px; }
.btn.sm { min-height: 36px; padding: 0 10px; font-size: 13.5px; gap: 6px; }
.btn.danger { background: var(--destructive); border-color: var(--destructive); color: #fff; }
td.rowfix { text-align: right; white-space: nowrap; }
.seg.stpick { margin-bottom: 10px; flex-wrap: wrap; }
.newsum { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14.5px; }
.newsum dt { color: var(--muted-fg); } .newsum dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
details.more-set > summary, details.roster-box > summary { cursor: pointer; color: var(--primary); font-weight: 500; min-height: 36px; display: inline-flex; align-items: center; }
.roster-ok { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--ok); }

/* sessions list */
.sess { display: grid; grid-template-columns: 1fr auto; gap: 8px 18px; padding: 16px 20px; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; align-items: center; }
.sess:last-child { border-bottom: 0; }
.sess:hover { background: #faf8f3; }
.sess h3 { margin: 0; font-size: 17px; font-weight: 600; }
.sess .meta { color: var(--muted-fg); font-size: 14px; display: flex; gap: 2px 14px; flex-wrap: wrap; margin-top: 3px; }
.sess .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.sess .side-r { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
@media (max-width: 600px) { .sess { grid-template-columns: 1fr; } .sess .side-r { align-items: flex-start; text-align: left; } }

/* the new session form */
.stable { width: 100%; border-collapse: collapse; }
.stable td, .stable th { padding: 6px 10px 6px 0; vertical-align: top; text-align: left; }
.stable th { font-size: 13px; color: var(--muted-fg); font-weight: 600; }
.stable td.sn { font-weight: 600; padding-top: 16px; white-space: nowrap; }
.stable input[type=number] { width: 100px; }
.stable select { width: 100%; min-width: 0; }
.sumline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; padding: 10px 14px; border-radius: 10px; background: var(--secondary); margin-top: 8px; font-variant-numeric: tabular-nums; }
.sumline.ok { background: var(--ok-soft); color: var(--ok); } .sumline.bad { background: var(--bad-soft); color: var(--bad); }
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.groups label { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; cursor: pointer; background: #fff; min-height: 52px; }
.groups label.on { border-color: var(--primary); background: var(--accent); }
.groups label input { width: 20px; height: 20px; accent-color: var(--primary); }
.groups label small { color: var(--muted-fg); display: block; font-size: 12.5px; }
.roster { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; margin-top: 10px; }
@media (max-width: 640px) {
  .stable thead { display: none; }
  .stable tr { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .stable td { padding: 0; } .stable td.sn { padding-top: 12px; }
  .stable td.exsel { grid-column: 1 / -1; }
}

/* the examiner's station sheet */
.exhead { border-radius: 16px; border: 1px solid var(--head-border); background: var(--head-bg); padding: 16px 20px; margin-bottom: 14px; }
.exhead h1 { font-size: 24px; font-weight: 600; margin: 2px 0 4px; line-height: 1.2; overflow-wrap: anywhere; }
.exhead .facts { color: var(--head-ink); font-size: 14px; display: flex; flex-wrap: wrap; gap: 2px 16px; }
.exhead .facts b { font-weight: 600; }
.savebar { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 12px; }
/* the save state on its own line, never cut (the judges' r1, 11-05) */
.saveline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.savestate { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; min-height: 36px; border-radius: 18px; font-size: 14px; font-weight: 500; background: var(--ok-soft); color: var(--ok); max-width: 100%; }
.saveline .retry { min-height: 36px; padding: 0 12px; font-size: 14px; }
.saveline .retry[hidden] { display: none; }
.savestate.saving { background: var(--accent); color: var(--accent-fg); }
.savestate.off { background: var(--bad-soft); color: var(--bad); }
.savestate.err { background: var(--bad-soft); color: var(--bad); }
.exrows { list-style: none; margin: 0; padding: 0; }
.exrow { display: grid; grid-template-columns: 30px minmax(0, 1fr) 120px 104px 92px minmax(120px, .8fr); gap: 8px 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.exrow:last-child { border-bottom: 0; }
.exrow .no { color: var(--muted-fg); font-variant-numeric: tabular-nums; font-size: 14px; }
.exrow .who b { display: block; font-weight: 600; overflow-wrap: anywhere; line-height: 1.25; }
.exrow .who small { color: var(--muted-fg); font-size: 13px; font-variant-numeric: tabular-nums; }
.exrow input.score { width: 100%; font-size: 20px; font-weight: 600; text-align: center; min-height: 48px; font-variant-numeric: tabular-nums; padding: 6px; }
.exrow input.score::placeholder { color: #b5afa5; font-weight: 400; }
.exrow input.q, .exrow input.cm { width: 100%; min-height: 44px; font-size: 14.5px; }
.exrow .absbtn { min-height: 48px; width: 100%; padding: 0 8px; font-size: 14px; }
.exrow .absbtn[aria-pressed=true] { background: var(--bad-soft); border-color: #f4b4ad; color: var(--bad); font-weight: 600; }
.exrow .meta { grid-column: 2 / -1; display: flex; gap: 6px 14px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted-fg); }
.exrow .err { color: var(--bad); font-weight: 500; }
.exrow.locked { background: #fafaf8; }
.exrow.locked input, .exrow.locked button.absbtn { background: transparent; border-color: transparent; color: var(--foreground); cursor: default; box-shadow: none; }
.exrow.locked input.score { -webkit-text-fill-color: var(--foreground); opacity: 1; }
.exrow.invalid input.score { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(180,35,24,.12); }
.exrow.hit { outline: 3px solid var(--primary); outline-offset: -3px; }
.more { border: 0; background: transparent; color: var(--primary); cursor: pointer; padding: 4px 0; font-size: 13px; min-height: 32px; }
@media (min-width: 1024px) { .more { display: none; } }
@media (max-width: 1023px) {
  .exrow { grid-template-columns: 28px minmax(0, 1fr) 110px 96px; }
  .exrow input.q, .exrow input.cm { display: none; }
  .exrow.open input.q { display: block; grid-column: 2 / 3; } .exrow.open input.cm { display: block; grid-column: 3 / 5; }
}
@media (max-width: 560px) {
  .exrow { grid-template-columns: minmax(0, 1fr) 100px 88px; padding: 12px; }
  .exrow .no { display: none; }
  .exrow .who { grid-column: 1 / -1; }
  .exrow.open input.q, .exrow.open input.cm { grid-column: 1 / -1; }
  .exrow .meta { grid-column: 1 / -1; }
}
.bottom { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.97); border-top: 1px solid var(--border); padding: 10px 20px calc(10px + env(safe-area-inset-bottom)); z-index: 30; }
.bottom .in { max-width: 1240px; margin: 0 auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bottom .count { flex: 1; min-width: 180px; font-size: 14px; color: var(--muted-fg); }
.bottom .count b { color: var(--foreground); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .bottom { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); } .bottom .count { flex-basis: 100%; font-size: 13px; } .bottom .in { gap: 6px 8px; } .bottom .in .btn { flex: 1 1 0; min-height: 48px; padding: 0 8px; font-size: 15px; } }
body.has-bottom main { padding-bottom: 150px; }
.search { position: relative; flex: 1; min-width: 200px; }
.search input { width: 100%; padding-left: 38px; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-fg); }

dialog { border: 0; border-radius: 16px; padding: 0; max-width: min(560px, calc(100vw - 24px)); width: 100%; box-shadow: 0 20px 60px rgba(15,23,42,.25); color: var(--foreground); }
dialog::backdrop { background: rgba(15,23,42,.4); }
dialog .dh { padding: 18px 22px 8px; } dialog .dh h2 { margin: 0; font-size: 19px; line-height: 1.3; }
dialog .db { padding: 6px 22px 10px; max-height: 62vh; overflow-y: auto; }
dialog .df { padding: 12px 22px 18px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.hist { list-style: none; padding: 0; margin: 8px 0; font-size: 13.5px; }
.hist li { padding: 8px 0; border-top: 1px solid var(--border); }

/* the qaydnoma's preview: the paper itself */
.paperwrap { overflow: hidden; background: #e9e5dd; border-radius: 14px; padding: 18px; }
.paper { background: #fff; color: #000; width: 794px; margin: 0 auto; padding: 38px 56px 30px; font-family: "Times New Roman", Tinos, "Liberation Serif", Times, serif; font-size: 14.5px; line-height: 1.45; box-shadow: 0 4px 18px rgba(0,0,0,.12); transform-origin: top left; }
.paper .plogo { display: block; margin: 0 auto 10px; height: 54px; }
.paper .ptitle { text-align: center; font-weight: 700; font-size: 16px; line-height: 1.35; margin-bottom: 12px; }
.paper .pdraft { text-align: center; color: #000; font-weight: 700; font-size: 14px; letter-spacing: .02em; margin: -6px 0 12px; }
.paper .pfinal { text-align: center; font-size: 13px; margin: -6px 0 12px; }
/* a draft can never pass for the signed paper (the judges' r1, 11-05): the mark across the page, under the text */
.paper { position: relative; }
.paper .pwater { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; overflow: hidden;
  font: 700 128px/1 "Times New Roman", Tinos, serif; color: rgba(0,0,0,.07); letter-spacing: .06em; }
.paper .pwater span { transform: rotate(-35deg); }
.paper > :not(.pwater) { position: relative; }
.paper td.fix { font-weight: 700; }
.paper .pfixes { margin-top: 14px; }
.paper .pfixes .small { font-size: 12px; margin-bottom: 4px; }
.paper .pfixes table { margin-top: 4px; font-size: 12.5px; }
.paper p { margin: 0; }
.paper .ind { padding-left: 22px; }
.paper table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
.paper th, .paper td { border: 1px solid #000; padding: 3px 5px; text-align: center; }
.paper td.nm { text-align: left; }
.paper td.b { font-weight: 700; }
.paper .signs { margin-top: 20px; }
.paper .sl { display: grid; grid-template-columns: 110px 1fr 140px; gap: 16px; align-items: end; margin: 16px 0 0; }
.paper .sl i { border-bottom: 1px solid #000; height: 18px; display: block; font-style: normal; position: relative; }
.paper .sl i::after { content: attr(data-c); position: absolute; top: 19px; left: 0; right: 0; color: #444; font-size: 10px; text-align: center; }
.paper .pfoot { margin-top: 30px; font-size: 11px; color: #444; }

/* the landing */
/* how to try it in three steps, each with its own sign-in (the owner's 11-05: as the earlier OSPE's landing) */
.howto h2 { font-size: 19px; margin: 0 0 14px; }
.dsteps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dstep { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: var(--card); }
.dstep .k { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--primary-fg); font-weight: 700; flex-shrink: 0; }
.dstep .body { min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.dstep h3 { margin: 4px 0 0; font-size: 16px; line-height: 1.25; }
.dstep p { margin: 0; }
.dstep .btn { min-height: 48px; height: auto; padding-top: 6px; padding-bottom: 6px; }
.dstep .as { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; text-align: left; }
.dstep .as small { font-weight: 400; font-size: 12.5px; opacity: .85; }
.step-logins { display: flex; flex-direction: column; gap: 6px; align-self: stretch; }
.step-logins .btn { justify-content: space-between; }
.subhead { font-size: 17px; margin: 22px 0 12px; }
@media (max-width: 900px) { .dsteps { grid-template-columns: 1fr; } }
.landing main { max-width: 1120px; }
.hero { border-radius: 18px; border: 1px solid var(--head-border); background: var(--head-bg); padding: 26px 28px; margin-bottom: 20px; }
.hero h1 { font-size: 30px; font-weight: 600; margin: 6px 0 8px; line-height: 1.15; }
.hero p { margin: 0 0 6px; color: var(--head-ink); max-width: 780px; }
@media (max-width: 560px) { .hero { padding: 18px; } .hero h1 { font-size: 24px; } }
.logins { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.logins .card { margin: 0; }
.login-row { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--border); }
.login-row .grow b { display: block; font-weight: 600; overflow-wrap: anywhere; line-height: 1.25; }
.login-row .grow small { color: var(--muted-fg); font-size: 13px; }
.login-row code { font-size: 13.5px; background: var(--secondary); padding: 2px 6px; border-radius: 6px; }
.notes { margin: 0; padding-left: 20px; } .notes li { margin: 4px 0; }
.ztag { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--kicker); }
@media print { .top, .bottom, .no-print, .tabs, .page-head { display: none !important; } .paperwrap { background: none; padding: 0; } .paper { box-shadow: none; transform: none !important; } main { padding: 0; } }

.page-head .status { white-space: normal; }
.exrow .ro { font-size: 14px; color: var(--muted-fg); overflow-wrap: anywhere; }
.exrow .ro b { color: var(--foreground); font-weight: 500; }
@media (max-width: 1023px) { .exrow.locked .ro { grid-column: 2 / -1; } }
@media (max-width: 560px) { .exrow.locked .ro { grid-column: 1 / -1; } }

/* whole-number grades are tapped, not typed (the judges' r1, 11-05): a row of ≥ 56 px buttons 0 … max, two rows at max 10,
   the chosen one filled; «Kelmagan» its own toggle beside the name, away from the grades */
.exrow.tapping { grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr) 120px; grid-template-areas: "no who who abs" ". taps taps taps" ". q cm cm" ". meta meta meta"; }
.exrow.tapping > .no { grid-area: no; } .exrow.tapping > .who { grid-area: who; } .exrow.tapping > .absbtn { grid-area: abs; }
.exrow.tapping > .stbox { grid-area: taps; } .exrow.tapping input.q { grid-area: q; } .exrow.tapping input.cm { grid-area: cm; } .exrow.tapping .meta { grid-area: meta; }
.taps { display: grid; grid-template-columns: repeat(var(--cols), minmax(56px, 1fr)); gap: 6px; }
.taps .tap { min-height: 56px; min-width: 56px; padding: 0; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--foreground);
  font: 600 20px/1 inherit; font-variant-numeric: tabular-nums; cursor: pointer; touch-action: manipulation; }
.taps .tap[aria-pressed=true] { background: var(--primary); border-color: var(--primary); color: #fff; }
.taps .tap:disabled { opacity: .35; cursor: default; }
.exrow.invalid .taps { outline: 2px solid var(--bad); outline-offset: 3px; border-radius: 12px; }
@media (max-width: 1023px) {
  .exrow.tapping { grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr) 110px; }
  .exrow.tapping.open input.q { grid-area: q; } .exrow.tapping.open input.cm { grid-area: cm; }
}
@media (max-width: 1023px) { .taps { grid-template-columns: repeat(var(--cols-narrow), minmax(56px, 1fr)); } }
@media (max-width: 560px) {
  .exrow.tapping { grid-template-columns: minmax(0, 1fr) 104px; grid-template-areas: "who abs" "taps taps" "q q" "cm cm" "meta meta"; }
  /* a phone: six to a row share its width (≈ 53 px at 390), still 56 px tall */
  .taps { grid-template-columns: repeat(var(--cols-narrow), minmax(0, 1fr)); gap: 4px; } .taps .tap { min-width: 0; }
}

/* the tablet made easy (11-05) */
/* the student being graded now is marked (a blue bar on the left, a light blue row), the mark moves on after a tap and the
   row is scrolled to the middle; one line at the top says «12 / 15 baholandi · saqlandi ✓». */
.exrow { transition: background-color .25s ease, box-shadow .25s ease; scroll-margin: 90px 0 150px; }
.exrow.current { background: var(--accent); box-shadow: inset 6px 0 0 var(--primary); }
.exrow.current .no { color: var(--accent-fg); font-weight: 700; }
.exrow.current .who b { color: var(--accent-fg); }
.exrow.current.invalid { background: var(--bad-soft); box-shadow: inset 6px 0 0 var(--bad); }
.saveline .savestate { font-size: 15.5px; font-weight: 600; min-height: 40px; padding: 7px 14px; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .exrow { transition: none; } }
