/* =========================================================
   IZORA — PRACTICE PAGE
   On top of the tokens in styles.css, only the pieces that belong to
   this page: level bar, topic list, report buttons.

   The page is screen-locked: practice.html carries `body.page-fit` and the
   shared fit-* layout from styles.css, the same one the mock exam uses. The
   page itself never scrolls — the header is one line and the two panels split
   what is left of the screen. Nothing here may set a height that grows with
   the content, or the lock breaks and the question slides below the fold.
   ========================================================= */

.practice-id { min-width: 0; }

/* The header is one band across the top: identity on the left, the level bar
   on the right. `flex-end` keeps the level bar on the baseline of the title. */
.practice-head { align-items: flex-end; gap: 22px; padding: 2px 0 14px; }
.practice-head h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(21px, 2.2vw, 28px); letter-spacing: -.03em;
  line-height: 1.05; margin: 0;
}
.practice-head p { margin: 6px 0 0; color: var(--text-2); font-size: 14px; max-width: 56ch; }

/* level bar — shows at a glance which step the student is on */
.levelbar { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.levelbar .lv {
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 15px; min-width: 116px;
  display: flex; flex-direction: column; gap: 2px;
  color: var(--text-3); background: transparent;
}
.levelbar .lv b { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; }
.levelbar .lv span { font-size: 14.5px; color: var(--text-2); }
.levelbar .lv.done { border-color: var(--m-strong); color: var(--m-strong); }
.levelbar .lv.done span { color: var(--m-strong); }
.levelbar .lv.on {
  border-color: var(--brand); background: var(--tint); color: var(--brand);
}
.levelbar .lv.on span { color: var(--text); }

/* The question takes the wider share; the map is a companion, not a second
   thing to read. Both are as tall as the screen allows and no taller. */
.practice-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(0, .55fr);
  gap: 18px;
}
@media (max-width: 1240px) { .practice-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, .4fr); } }

/* ---------- the question panel ----------
   `.fit-panel .qstage` (styles.css) already scrolls inside itself. What is
   added here is the action row: «Növbəti sual» (and the button that ends the
   round) is stuck to the bottom edge of the panel. With a short question the
   footer is down there anyway; with a long one the student can read on and the
   button is still where they left it — they never scroll to look for it.
   The shadow only shows when something has scrolled under the row. */
.practice-grid .qstage { padding: 20px 26px 0; }
.practice-grid .qfoot { margin-top: auto; display: block; padding-top: 16px; }
.practice-grid .qact,
.practice-grid .res-act {
  position: sticky; bottom: 0; z-index: 1;
  margin-top: 16px; padding: 12px 0 18px;
  background: var(--panel);
  box-shadow: 0 -16px 20px -16px var(--panel);
}

/* =========================================================
   PHONE
   At 360×640 the header block filled a whole screen and the first
   question started at 684px — the student saw no question at all when
   the page opened. Here the intro text gets tighter and the level bar
   turns from three large cards into a single row.
   ========================================================= */
@media (max-width: 680px) {
  .practice-head { gap: 16px; padding: 4px 0 18px; }
  .practice-head h1 { font-size: 25px; line-height: 1.08; }
  .practice-head p { font-size: 14px; line-height: 1.5; margin-top: 10px; }
  .practice-head .sync-note { margin-top: 10px; font-size: 13px; }

  /* levels: the three cards used to stack. Now they sit on one row in
     equal shares — the current step is visible at a glance. */
  .levelbar { width: 100%; margin-left: 0; gap: 6px; flex-wrap: nowrap; }
  .levelbar .lv { flex: 1 1 0; min-width: 0; padding: 8px 10px; }
  .levelbar .lv b { font-size: 10px; letter-spacing: .06em; }
  .levelbar .lv span {
    font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }

  .sp-side { padding: 16px 16px 4px; }
  .tl-row { grid-template-columns: minmax(0, 1fr) 62px 46px; gap: 10px; }
}

/* footer of the question panel */
.qsrc {
  margin: 14px 0 0; font-size: 12.5px; color: var(--text-3);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.res-act { margin-top: 24px; }
.res-note { margin: 12px 0 0; font-size: 13.5px; color: var(--text-3); line-height: 1.6; }
.res-head code { color: var(--brand); font-size: 13.5px; }

/* topic list — the textual counterpart of the map */
.tl-head {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--text-3); font-weight: 500;
  padding: 20px 0 9px; border-bottom: 1px solid var(--line-soft); margin-bottom: 8px;
}
.tl-head .mono-tag { margin-left: auto; }
.tl-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 76px 54px;
  align-items: center; gap: 12px; padding: 6px 0; font-size: 14px;
}
.tl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.tl-bar { height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.tl-bar i { display: block; height: 100%; border-radius: 3px; transition: width .45s cubic-bezier(.2,.8,.25,1); }
.tl-val {
  text-align: right; font-size: 12.5px; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.tl-row.weak   .tl-bar i { background: var(--m-weak); }
.tl-row.mid    .tl-bar i { background: var(--m-mid); }
.tl-row.strong .tl-bar i { background: var(--m-strong); }
.tl-row.strong .tl-name { color: var(--text); }
.tl-row.locked { opacity: .5; }
.tl-row.locked .tl-val { font-size: 11.5px; }

/* ---------- Knowledge-map panel ----------
   The spiral keeps its size and the topic list takes exactly the height that
   is left, scrolling inside itself. The panel therefore ends where the screen
   ends — it can never push the question down. */
.sp-side { padding: 16px 18px 4px; }
.practice-grid .sp-side { flex: none; }
.practice-grid .sp-side .sp-stage { max-width: 190px; }
.practice-grid #topicList { flex: 1; min-height: 0; max-height: none; }

#topicList {
  padding: 0 18px 18px;
  max-height: 300px; overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
#topicList::-webkit-scrollbar { width: 7px; }
#topicList::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }

/* where progress is stored — js/practice.js → syncNote() */
.practice-head .sync-note { margin-top: 12px; font-size: 13.5px; color: var(--text-3); min-height: 20px; }
.practice-head .sync-note.cloud::before { content: "● "; color: var(--m-strong); }
.practice-head .sync-note.error { color: var(--m-weak); }
.sync-note .linkish {
  background: none; border: 0; padding: 0; font: inherit; color: var(--brand);
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
/* A link inside a sentence was 20px tall — hard to hit with a finger.
   Vertical padding does not affect the line box, so the text stays put
   while the touch target grows. */
@media (pointer: coarse) {
  .sync-note .linkish { padding: 12px 4px; margin: 0 -4px; }
}

/* =========================================================
   QUESTION TYPES — js/practice.js (choice · pick · open)
   ========================================================= */

/* passage — above a reading question; a long text scrolls inside itself so
   the question and the options stay on screen */
.qpassage {
  border: 1px solid var(--line); border-radius: var(--r-sm);
  margin: 0 0 18px; background: var(--tint);
}
.qpassage summary {
  cursor: pointer; padding: 10px 14px;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3);
}
.qpassage-body {
  padding: 0 16px 14px; max-height: min(320px, 34vh); overflow: auto; overscroll-behavior: contain;
  white-space: pre-line; font-size: 15.5px; line-height: 1.62; color: var(--text-2);
}

/* numbered / lettered list — with the book's own keys (1. 2. · a) b)) */
.qkeyed { list-style: none; margin: 0 0 18px; padding: 0; font-size: 16px; line-height: 1.55; color: var(--text-2); }
.qkeyed li { display: flex; gap: 10px; padding: 2px 0; }
.qkeyed .qkey { flex: none; min-width: 22px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.qkeyed.right { padding-left: 14px; border-left: 2px solid var(--line-soft); }

/* multiple choice — the .opt look, with a checkbox */
.pick-opt { cursor: pointer; }
.pick-opt input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--brand); }
.pick-opt:has(input:checked) { border-color: var(--brand); background: var(--tint); }
.pick-opt.correct { border-color: var(--m-strong); background: var(--wash-strong); }
.pick-opt.wrong { border-color: var(--m-weak); background: var(--wash-weak); }
.opt-t { min-width: 0; overflow-wrap: anywhere; }
/* KaTeX: long formulas scroll inside their own line instead of widening the page */
.qtext .katex-display, .opt-t .katex-display { overflow-x: auto; overflow-y: hidden; }
.qtext .katex, .opt-t .katex, .qkeyed .katex { font-size: 1.05em; }

/* code block (informatics: Python listings, spreadsheet formulas).
   `white-space: pre` and no wrapping are the point — a Python line that wraps or
   loses its indentation is a different program. Long lines scroll sideways
   inside the block instead of widening the page. */
.qcode {
  margin: 10px 0; padding: 11px 13px; border: 1px solid var(--line-soft); border-radius: 8px;
  background: var(--tint); overflow-x: auto; overscroll-behavior-x: contain;
  font-size: 14px; line-height: 1.5; color: var(--text);
}
.qcode code {
  display: block; white-space: pre; tab-size: 4;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
.opt-t .qcode, .qkeyed .qcode { margin: 4px 0; font-size: 13px; }
.opt-t .qcode:first-child, .qkeyed .qcode:first-child { margin-top: 0; }
.opt-t .qcode:last-child, .qkeyed .qcode:last-child { margin-bottom: 0; }
@media (max-width: 560px) { .qcode { font-size: 13px; } .opt-t .qcode, .qkeyed .qcode { font-size: 12px; } }
/* Word marks (Azerbaijani language books, js/math.js): "the underlined word",
   "the word in a frame" — the mark is part of the question. */
.qm-u { text-decoration: underline; text-underline-offset: 2px; }
.qm-wavy { text-decoration: underline wavy; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.qm-b { font-weight: 700; }
.qm-box { border: 1.5px solid currentColor; border-radius: 2px; padding: 0 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.qcheck { margin-top: 14px; }
.qhint-inline { margin: 12px 0 0; font-size: 13.5px; color: var(--text-3); }

/* type the answer */
.open-form { display: flex; gap: 10px; flex-wrap: wrap; }
.open-input {
  flex: 1 1 260px; min-width: 0; font: inherit; font-size: 16px; color: var(--text);
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 12px 18px;
}
.open-input:focus { outline: none; border-color: var(--brand); }

/* ---- a written answer: the task usually asks for a reason, so it gets room ---- */
.written-form { display: block; }
.written-input {
  display: block; width: 100%; box-sizing: border-box; font: inherit; font-size: 16px;
  line-height: 1.6; color: var(--text); background: transparent;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 12px 14px; resize: vertical; min-height: 6.5em; overflow: hidden;
}
.written-input:focus { outline: none; border-color: var(--brand); }
/* in a review: what was written, kept on screen but no longer editable */
.written-input.locked { color: var(--text-2); border-style: dashed; }
.written-form .btn { margin-top: 12px; }
/* what grade-written said about this answer */
.written-verdict { margin: 14px 0 0; padding: 12px 14px; border-radius: var(--r-sm); font-size: 15px; line-height: 1.55; }
.written-verdict.right { background: color-mix(in srgb, var(--ok, #3aa655) 12%, transparent); }
.written-verdict.part  { background: color-mix(in srgb, var(--warn, #c8892a) 14%, transparent); }
.written-verdict.wrong { background: color-mix(in srgb, var(--bad, #d05353) 12%, transparent); }
.written-verdict .wv-head { display: block; margin-bottom: 4px; font-weight: 500; }
.written-model { margin: 12px 0 0; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.written-model .wm-head { display: block; font-size: 13px; color: var(--text-3); margin-bottom: 3px; }

/* ---- ordering: the pieces as printed, the sequence typed ---- */
.order-items { margin-bottom: 14px; }
.order-input { flex: 0 1 240px; font-variant-numeric: tabular-nums; }
.order-place { margin-left: auto; padding-left: 12px; font-size: 13.5px; color: var(--text-3); white-space: nowrap; }

/* ---- fill: the drawn sheet, then one button ---- */
.fill-box .qfig { margin-bottom: 0; }
.fill-box .qfig-fill { max-width: 100%; }
.qright { margin: 0 0 14px; font-size: 15px; color: var(--text-2); }

/* more than 6 levels (a subject stepped by book order — English has 19
   sections): the cards do not fit, so only numbers show, plus the name of
   the current level */
.levelbar.many { gap: 5px; max-width: 100%; }
.levelbar.many .lv { min-width: 0; padding: 6px 9px; align-items: center; }
.levelbar.many .lv span { display: none; }
.levelbar.many .lv.on { padding: 6px 12px; }
.levelbar.many .lv.on { max-width: 100%; }
/* a long section name (Informatika: "İnformasiya və informasiya prosesləri…")
   is cut, not pushed past the screen edge */
.levelbar.many .lv.on span { display: block; font-size: 13px; white-space: nowrap;
                             max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 680px) {
  .levelbar.many { flex-wrap: wrap; }
  .levelbar.many .lv { flex: 0 0 auto; }
}

/* =========================================================
   SHORT SCREEN — a laptop is often 1440×760, not 1440×900
   The screen-locked layout has nowhere to give, so the header and the map give
   instead: the spiral shrinks and the sync line drops out. The question keeps
   its size — it is the thing being read.
   ========================================================= */
@media (max-height: 800px) and (min-width: 1081px) {
  /* css/practice.css is loaded by practice.html only, so a bare `.fit-wrap`
     rule here cannot reach the exam page. */
  .fit-wrap { padding-bottom: 12px; }
  .practice-head { padding: 0 0 10px; }
  /* Where progress is stored is the same sentence every time — on a short
     screen those two lines belong to the question. */
  .practice-head .sync-note { display: none; }
  .practice-grid .sp-side { padding: 10px 18px 0; }
  .practice-grid .sp-side .sp-stage { max-width: 138px; }
  /* (below 721px the spiral is hidden outright — css/spiral.css) */

  /* The question, its options and the explanation after the answer have to
     share ~460px. Everything loses a few pixels of air; the question text and
     the options stay at a size that is still comfortable to read. */
  .practice-grid .qstage { padding: 14px 24px 0; }
  .practice-grid .qcue { margin-bottom: 10px; padding: 4px 12px; font-size: 12px; }
  .practice-grid .qtext { font-size: 16.5px; margin-bottom: 12px; }
  .practice-grid .options { gap: 7px; }
  .practice-grid .opt { padding: 9px 16px; font-size: 14.5px; }
  .practice-grid .qfoot { padding-top: 10px; }
  .practice-grid .verdict { margin-bottom: 9px; }
  .practice-grid .explain { padding-left: 13px; }
  .practice-grid .explain p { font-size: 13.5px; line-height: 1.45; }
  .practice-grid .qsrc { margin-top: 9px; font-size: 11.5px; }
  .practice-grid .qact,
  .practice-grid .res-act { margin-top: 10px; padding: 10px 0 14px; }
  /* the sınaq sitting shares the same squeeze */
  .sn-fit .sn-head { padding: 0 0 10px; }
  .sn-grid .qstage { padding: 14px 24px 0; }
  .sn-grid .qcue { margin-bottom: 10px; padding: 4px 12px; font-size: 12px; }
  .sn-grid .qtext { font-size: 16.5px; margin-bottom: 12px; }
  .sn-grid .options { gap: 7px; }
  .sn-grid .opt { padding: 9px 16px; font-size: 14.5px; }
  .sn-grid .qfoot { padding-top: 10px; }
  .sn-grid .qact { margin-top: 10px; padding: 10px 0 14px; }
}

/* =========================================================
   NARROW SCREEN — the lock is off (css/styles.css, max-width:1080px)
   The page scrolls normally there, so everything that only makes sense inside
   a fixed-height panel is undone: a footer pinned to the bottom of a panel
   that is now as tall as its content would follow the student down the page.
   ========================================================= */
@media (max-width: 1080px) {
  /* the columns and the panel spacing are already undone by the shared
     max-width:1080px block in css/styles.css */
  .practice-grid .qstage { padding: 22px 20px 24px; }
  .practice-grid .qfoot { margin-top: 22px; padding-top: 0; }
  .practice-grid .qact,
  .practice-grid .res-act {
    position: static; padding: 0; background: none; box-shadow: none;
  }
  .practice-grid #topicList { flex: none; max-height: 340px; }
}

/* ---- testing model: detour note, block exam, weakness sets ---- */
/* the ten-attempt rule's note is a sentence, not a chip */
.qstage .qcue-note { border-radius: var(--r-sm); line-height: 1.5; margin-bottom: 12px; }

/* a sitting: the dots are the items */
.tally-dots.exam .tdot { cursor: pointer; height: 6px; }
.tally-dots.exam .tdot.set { background: var(--text-2); }
.tally-dots.exam .tdot.cur { box-shadow: 0 0 0 2px var(--ai); }
#tallyText.late { color: var(--m-weak); }
.opt.chosen { border-color: var(--ai); background: var(--tint); }
.opt.chosen .opt-k { border-color: var(--ai); color: var(--ai); }
.exam-act { display: flex; flex-wrap: wrap; gap: 8px; }
.focus-note { font-size: 13px; color: var(--text-3); }

/* the result: missed items, folded */
.exam-review { margin-top: 18px; }
.exam-review h5, .weak-panel h5 {
  margin: 0 0 8px; font-size: 11px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--text-3); font-weight: 500;
}
.exam-miss { border-top: 1px solid var(--line-soft); }
.exam-miss summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; cursor: pointer; font-size: 14px;
}
.exam-miss-body { padding: 0 0 12px; }
.exam-miss-body .qtext { font-size: 14.5px; margin: 0 0 8px; }

/* weakness sets */
.weak-panel { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.weak-panel ul { list-style: none; margin: 0; padding: 0; }
.weak-panel li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--line-soft);
}
.weak-panel li:last-child { border-bottom: 0; }
.weak-panel li.done span:first-child { color: var(--m-strong); }

/* ---- the mistake box (mistakes.html) and sınaq review cards ---- */
.mb-bar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.mb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mb-chip {
  border: 1px solid var(--line); border-radius: var(--r-pill); background: transparent;
  color: var(--text-2); padding: 7px 14px; font: inherit; font-size: 13.5px; cursor: pointer;
}
.mb-chip:hover { border-color: var(--text); color: var(--text); }
.mb-chip.on { border-color: var(--text); color: var(--text); background: var(--tint); }
.mb-card {
  border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--panel);
  padding: 20px 24px; margin-bottom: 14px;
}
.mb-card.fixed { opacity: .72; }
.mb-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px; font-size: 13.5px; color: var(--text-3);
}
.mb-topic b { color: var(--text); font-weight: 500; }
.mb-card .qtext { font-size: 16px; margin: 0 0 12px; }
.mb-card .options { gap: 7px; }
.mb-card .opt { padding: 9px 15px; font-size: 14.5px; }
.mb-card .explain { margin-top: 12px; }
.mb-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft);
}
.mb-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.mb-toggle input { width: 17px; height: 17px; accent-color: var(--brand); }
@media (max-width: 560px) { .mb-card { padding: 16px 16px; } }

/* ---- the sınaq (sinaq.html) ---- */
.sn-card {
  border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--panel);
  padding: 22px 24px; margin-bottom: 22px;
}
.sn-card .res-line { margin: 0 0 14px; }
.sn-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 16px; }
.sn-act .res-note { flex-basis: 100%; margin: 0; }
.sn-plan ul, .sn-cal { list-style: none; margin: 0; padding: 0; }
.sn-plan li, .sn-cal li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: baseline;
  padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 14.5px;
}
.sn-cal li { grid-template-columns: minmax(0, 1fr) auto; }
.sn-plan li.muted { color: var(--text-3); }
.sn-section { margin: 0 0 24px; }
.sn-section h5, .sn-sub-h {
  margin: 0 0 8px; font-size: 11px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--text-3); font-weight: 500;
}
.sn-sub-h { margin-top: 22px; }
.sn-history { display: flex; flex-direction: column; }
.sn-hrow {
  display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 14px; align-items: baseline;
  padding: 10px 2px; border: 0; border-bottom: 1px solid var(--line-soft); background: none;
  color: var(--text); font: inherit; font-size: 14.5px; text-align: left; cursor: pointer;
}
.sn-hrow:hover { background: var(--tint); }
.sn-hrow span:nth-child(2) { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sn-table-wrap { overflow-x: auto; margin-bottom: 8px; }
.sn-table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.sn-table th {
  text-align: left; font-weight: 500; font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3); padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line);
}
.sn-table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.sn-table tr.muted td { color: var(--text-3); white-space: normal; }
.sn-result-head { margin-bottom: 18px; }

/* the sitting: screen-locked, question on the left, the answer sheet on the right */
.sn-fitroot { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sn-grid { grid-template-columns: minmax(0, 1fr) 290px; }
.sn-grid .qstage { display: flex; flex-direction: column; }
.sn-grid .qfoot { margin-top: auto; padding-top: 16px; }
.sn-head .fit-title { font-size: clamp(20px, 2vw, 28px); }
.sn-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.sn-tab {
  border: 1px solid var(--line); border-radius: var(--r-pill); background: transparent;
  color: var(--text-2); padding: 7px 14px; font: inherit; font-size: 13.5px; cursor: pointer;
}
.sn-tab span { color: var(--text-3); font-size: 12px; }
.sn-tab.on { border-color: var(--text); color: var(--text); background: var(--tint); }
.sn-clock.late { color: var(--m-weak); }
.sn-side .sn-sheet { flex: 1; min-height: 0; overflow: auto; padding: 12px 18px; }
.sn-sheet-sub { margin-bottom: 14px; }
.sn-sheet-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 7px; }
.sn-cells { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.sn-cell {
  height: 28px; border: 1px solid var(--line); border-radius: 8px; background: transparent;
  color: var(--text-3); font: inherit; font-size: 12px; cursor: pointer; font-variant-numeric: tabular-nums;
}
.sn-cell.coded { border-style: dashed; }
.sn-cell.set { background: var(--tint); color: var(--text); border-color: var(--text-3); }
.sn-cell.cur { box-shadow: 0 0 0 2px var(--ai); color: var(--text); }
.sn-side-foot { flex: none; padding: 12px 18px 16px; border-top: 1px solid var(--line-soft); }
.sn-side-foot .btn { width: 100%; }
@media (max-width: 1080px) {
  .sn-grid { grid-template-columns: minmax(0, 1fr); }
  .sn-side .sn-sheet { overflow: visible; }
  .sn-cells { grid-template-columns: repeat(9, 1fr); }
}

/* ---- the daily session summary (js/practice.js → sessionSummary) ---- */
.ss { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 18px; margin-bottom: 16px; }
.ss h5 { margin: 0 0 8px; font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--text-3); font-weight: 500; }
.ss ul { list-style: none; margin: 0 0 10px; padding: 0; }
.ss li { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.ss li span { color: var(--text-3); flex: none; }
.ss li b { font-weight: 500; text-align: right; }
.ss em { font-style: normal; font-size: 12.5px; margin-left: 4px; }
.ss em.up { color: var(--m-strong); }
.ss em.down { color: var(--m-weak); }
.ss-streak:empty { display: none; }
.ss-streak { padding-top: 6px; }

/* =========================================================
   BIG OPTIONS (js/optlayout.js) — options that are tables, code or drawings.
   All of them stay fully visible; they go into a grid, share one table
   header, and their tables and code get tighter. js/optlayout.js indents the
   header so it sits exactly over the options' tables.
   ========================================================= */
/* the page's own padding stays (the short-screen rules are tighter already);
   only the corners and the table / code inside get smaller */
.options.opts-big .opt { align-items: flex-start; border-radius: 14px; }
.options.opts-big .opt-t .qcode { font-size: 12.5px; padding: 8px 10px; line-height: 1.42; }
.options.opts-big .opt-t .fig-table th,
.options.opts-big .opt-t .fig-table td,
.opts-head .fig-table th, .opts-head .fig-table td { padding: 4px 8px; min-width: 2.1em; font-size: 14px; }
.options.opts-big .opt .opt-flag { align-self: flex-end; }
.options.opts-grid { display: grid; align-items: stretch; }
.options.opts-grid .opt { height: 100%; }
/* the row every option's table shares is drawn once, above each column */
.options.same-head .opt-t table tr:first-child { display: none; }
.opts-head .fig-table { color: var(--text-3); }
.opts-head .fig-table th, .opts-head .fig-table td { border-color: transparent; }
/* measuring the natural width of the options (a moment, never painted) */
.options.opts-measure .opt-t { width: max-content; max-width: none; flex: none; }
/* still does not fit: which options are below the fold */
.opts-more-hold { position: sticky; bottom: 10px; height: 0; z-index: 2; }
.opts-more {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  white-space: nowrap;
  font: inherit; font-size: 13px; font-weight: 500;
  padding: 7px 16px; border-radius: var(--r-pill);
  border: 1px solid var(--text-3); background: var(--panel-2); color: var(--text);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35); cursor: pointer;
}
.opts-more[hidden] { display: none; }


/* =========================================================
   The book's own papers (paper.html)

   The list of sittings a book prints. The sitting itself reuses the DİM sınaq's
   chrome (.sn-grid, .sn-cells, .sn-side above) — same screen lock, same answer
   sheet — because a student should not have to learn two exam screens.
   ========================================================= */
.pp-head { margin-bottom: 28px; }
.pp-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
}
.pp-card {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  padding: 14px 16px; text-align: left; font: inherit; cursor: pointer;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-sm);
}
.pp-card:hover { border-color: var(--text-3); }
.pp-card.done { background: var(--tint); }
.pp-score { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pp-score.pp-new { color: var(--text-3); font-weight: 400; }
.pp-name { font-size: 15px; }
.pp-meta { font-size: 12.5px; color: var(--text-3); }

/* the review under a result: one card per question that was not fully right */
.pp-rev-head { margin: 32px 0 14px; }
.pp-rev { margin-bottom: 16px; }
.pp-rev-body { padding: 18px 20px 20px; }

/* the buraxılış essay: the word count under the box turns red outside 100–120 */
.bx-words.late { color: var(--m-weak); }
.pp-rev-body .qview { margin-bottom: 4px; }
