/* sinaq.css — imtahan.qebulol.az, phone first */
:root { --bg: #f6f8fb; --card: #fff; --ink: #14213d; --muted: #5b6475; --line: #dde3ec; --blue: #0b6fd6; --blue-d: #0a5cb3;
  --ok: #1b8a4b; --ok-bg: #e7f6ee; --bad: #c62828; --bad-bg: #fdecec; --warn-bg: #fff6df; --flag: #f2a900; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.sq-top { display: flex; gap: 12px; align-items: center; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.sq-logo { font-weight: 700; color: var(--blue); text-decoration: none; }
.sq-home { color: var(--muted); text-decoration: none; }
.sq-main { max-width: 760px; margin: 0 auto; padding: 16px; }
/* always rendered, so assistive technology keeps the live region; it sticks to the top of the screen, where the student is looking, while it has text */
.sq-status { position: sticky; top: 0; z-index: 6; margin: 0; padding: 0; }
/* on the exam screen the sticky bar (clock, Bitir) owns the top edge; sinaq.js puts the class on .sq-main while the bar is drawn */
.sq-has-bar .sq-status { position: static; }
.sq-status:not(:empty) { margin: 0 0 12px; padding: 10px 12px; background: var(--warn-bg); border: 1px solid var(--line); border-radius: 8px; }
h1 { font-size: 1.4rem; margin: 8px 0 12px; }
h2 { font-size: 1.15rem; margin: 0 0 10px; }
h3 { font-size: .95rem; margin: 14px 0 6px; color: var(--muted); }
h4 { margin: 12px 0 4px; font-size: .9rem; color: var(--muted); }
.sq-lead, .sq-expl { color: var(--muted); }
.sq-note { padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.sq-warn { padding: 10px 12px; background: var(--warn-bg); border-radius: 8px; }
.sq-refusal { margin-bottom: 12px; }
.sq-refusal .sq-btn { margin-top: 6px; }
.sq-card, .sq-q, .sq-item, .sq-modal, .sq-mine { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0 0 14px; }
.sq-btn { display: inline-block; min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  color: var(--ink); font: inherit; text-decoration: none; cursor: pointer; }
.sq-btn:disabled { opacity: .5; cursor: default; }
.sq-btn-main { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.sq-btn-main:hover { background: var(--blue-d); }
.sq-subj, .sq-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.sq-chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: inherit;
  text-decoration: none; cursor: pointer; }
.sq-chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.sq-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 8px 0; background: var(--bg); }
.sq-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sq-timer { font-variant-numeric: tabular-nums; font-weight: 700; }
.sq-timer.sq-low { color: var(--bad); }
.sq-group { max-height: 45vh; overflow: auto; margin-bottom: 12px; padding: 12px; background: var(--bg); border-radius: 8px; }
.sq-audio { display: block; width: 100%; margin: 0 0 8px; }
.sq-num { margin: 0 0 6px; font-size: .85rem; font-weight: 400; color: var(--muted); }
.sq-stem { margin-bottom: 12px; overflow-x: auto; }
.sq-fig, .sq-stem img, .sq-group img, .sq-opt img, .sq-model img, .sq-expl img { max-width: 100%; height: auto; }
.sq-opts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.sq-opt { min-width: 0; min-height: 44px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: inherit;
  font: inherit; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.sq-opt[aria-pressed="true"] { border-color: var(--blue); background: #e8f1fd; box-shadow: inset 0 0 0 1px var(--blue); }
.sq-lbl { display: block; margin-bottom: 6px; font-size: .9rem; color: var(--muted); }
.sq-coded, .sq-text, .sq-rep-box textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.sq-coded { max-width: 220px; font-size: 1.2rem; }
.sq-codedrow { display: flex; gap: 8px; align-items: stretch; }
.sq-minus { min-width: 52px; padding: 0 14px; font-size: 1.5rem; line-height: 1; }
.sq-hint { font-size: .9rem; color: var(--bad); }
.sq-words { color: var(--muted); }
.sq-nav { display: flex; justify-content: space-between; gap: 8px; margin: 12px 0; }
.sq-flag[aria-pressed="true"] { border-color: var(--flag); background: #fff4d6; }
.sq-grid { padding: 4px 12px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.sq-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
.sq-cell { height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font: inherit; cursor: pointer; }
.sq-cell.sq-done { background: #e8f1fd; border-color: #9cc3f2; }
.sq-cell.sq-flagged { box-shadow: inset 0 -3px 0 var(--flag); }
.sq-cell.sq-cur { outline: 2px solid var(--blue); }
.sq-modal p:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
.sq-marks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sq-mark { min-width: 44px; min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  font: inherit; cursor: pointer; }
.sq-mark[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.sq-zero { font-size: .85rem; color: var(--muted); }
.sq-mine-ans { padding: 10px; border-radius: 8px; background: var(--bg); white-space: pre-wrap; overflow-wrap: anywhere; }
.sq-model { padding: 10px; border-radius: 8px; background: var(--ok-bg); overflow-x: auto; }
.sq-expl { overflow-x: auto; }
.sq-rubric { margin: 0; padding-left: 18px; color: var(--muted); }
.sq-est-err { color: var(--bad); font-weight: 600; }
.sq-item.sq-need { outline: 2px solid var(--bad); outline-offset: 4px; }
.sq-foot { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; background: var(--bg); }
.sq-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.sq-score { padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.sq-score span { display: block; font-size: .85rem; color: var(--muted); }
.sq-score b { font-size: 1.6rem; }
.sq-score small { color: var(--muted); }
.sq-total { border-color: var(--blue); }
.sq-st-ok { border-left: 4px solid var(--ok); }
.sq-st-bad { border-left: 4px solid var(--bad); }
.sq-st-w { border-left: 4px solid var(--blue); }
.sq-ropts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
.sq-ro { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.sq-ro.sq-key { background: var(--ok-bg); border-color: var(--ok); }
.sq-ro.sq-wrong { background: var(--bad-bg); border-color: var(--bad); }
.sq-link { min-height: 44px; padding: 10px 0; background: none; border: 0; color: var(--blue); font: inherit; text-decoration: underline; cursor: pointer; }
.sq-rep-box { display: grid; gap: 8px; margin-top: 8px; }
.sq-thanks { color: var(--ok); }
.sq-mine ul { margin: 0; padding-left: 18px; }
@media (min-width: 720px) { h1 { font-size: 1.7rem; } }
/* result actions and the share dialog (sinaq-share.js) */
.sq-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.sq-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(10, 20, 40, .6); }
.sq-share { width: 100%; max-width: 420px; max-height: 100%; overflow: auto; padding: 16px; border-radius: 14px; background: var(--card); text-align: center; }
.sq-share-img { display: block; height: 52vh; max-height: 480px; width: auto; max-width: 100%; margin: 8px auto 12px; border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .2); }
.sq-share-label { display: block; margin: 0 0 12px; color: var(--muted); font-size: .9rem; text-align: left; }
.sq-share-name { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 16px; }
.sq-share-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.sq-share-wa { background: #075e54; border-color: #075e54; color: #fff; }        /* WhatsApp's dark teal: white text stays readable */
