/* Shriftlar: o'zimizda saqlanadi, zavod tarmog'ida tashqi resurslarga bog'lanmaslik uchun. */
@font-face { font-family: 'Big Shoulders Display'; font-weight: 800; font-display: swap; src: url('fonts/big-shoulders-display-latin-800-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Big Shoulders Display'; font-weight: 800; font-display: swap; src: url('fonts/big-shoulders-display-latin-ext-800-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Big Shoulders Display'; font-weight: 900; font-display: swap; src: url('fonts/big-shoulders-display-latin-900-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Big Shoulders Display'; font-weight: 900; font-display: swap; src: url('fonts/big-shoulders-display-latin-ext-900-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-display: swap; src: url('fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-display: swap; src: url('fonts/ibm-plex-sans-latin-ext-400-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 500; font-display: swap; src: url('fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 500; font-display: swap; src: url('fonts/ibm-plex-sans-latin-ext-500-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; font-display: swap; src: url('fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; font-display: swap; src: url('fonts/ibm-plex-sans-latin-ext-600-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url('fonts/ibm-plex-mono-latin-ext-400-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url('fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url('fonts/ibm-plex-mono-latin-ext-500-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 600; font-display: swap; src: url('fonts/ibm-plex-mono-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 600; font-display: swap; src: url('fonts/ibm-plex-mono-latin-ext-600-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: dark;
  --bg: #0B0E11;
  --bg-2: #12161B;
  --bg-3: #1A2027;
  --line: #272E36;
  --line-2: #414B56;
  --text: #EEF0F2;
  --text-2: #B7BFC8;
  --muted: #8A949F;
  --heat: #FF5A1F;
  --heat-soft: #FFB23E;
  --heat-ink: #120703;
  --ok: #3DD083;
  --bad: #FF5B4A;
  --display: 'Big Shoulders Display', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, p, ul, dl, dd, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ul { list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--heat-soft); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.loading { padding: 40px var(--gutter); color: var(--muted); font-family: var(--mono); font-size: 14px; }

.display {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.005em;
  line-height: .9;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Fabrika belgisi ---------- */
.brandbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px;
  padding: 10px var(--gutter);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-slab { flex: none; width: 22px; height: 8px; background: var(--heat); }
.brand-name {
  font-family: var(--display); font-weight: 800; font-size: 19px; line-height: 1;
  letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
}
.brand-form { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.brandbar-right { display: flex; align-items: center; gap: 20px; min-width: 0; }
.exam-test {
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap;
}

/* ---------- Tugmalar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; padding: 0 28px;
  border: 1px solid transparent; border-radius: 0;
  font-family: var(--sans); font-weight: 600; font-size: 16px; line-height: 1.2;
  text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s, opacity .15s;
}
.btn-primary { background: var(--heat); color: var(--heat-ink); }
.btn-primary:hover:not(:disabled) { background: #FF7238; }
.btn-primary:disabled { background: var(--bg-3); color: var(--muted); cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-2); background: var(--bg-2); }
.btn-wide { width: 100%; }
.btn-arrow { font-family: var(--mono); font-weight: 500; transition: transform .15s; }
.btn:hover:not(:disabled) .btn-arrow { transform: translateX(4px); }

/* ---------- Maydonlar ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label {
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-2);
}
.field-control {
  display: flex; align-items: stretch;
  background: var(--bg);
  border: 1px solid var(--line-2);
  transition: border-color .15s;
}
.field-control:focus-within { border-color: var(--heat-soft); }
.field-control:has([aria-invalid='true']) { border-color: var(--bad); }
.field-prefix {
  display: flex; align-items: center; padding-left: 14px;
  font-family: var(--mono); font-size: 16px; color: var(--text-2);
}
.field input {
  flex: 1; width: 100%; min-width: 0; height: 52px; padding: 0 14px;
  background: transparent; border: 0; outline: 0; font-size: 16px; border-radius: 0;
}
.field input[type='tel'] { font-family: var(--mono); padding-left: 10px; }
.field input::placeholder { color: #5F6974; }
.field-error, .form-error { color: var(--bad); font-size: 13px; line-height: 1.35; }
.field-error:empty, .form-error:empty { display: none; }

/* ---------- Boshlash sahifasi ---------- */
.start {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(400px, 1fr);
  min-height: 100dvh;
}
.start-hero {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 100dvh;
  overflow: hidden;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  --grid: rgba(255, 255, 255, .022);
}
.start-title { position: relative; z-index: 1; padding: clamp(24px, 6vh, 64px) var(--gutter) 0; }
.start-title h1 {
  margin: 14px 0 18px -.02em;
  font-size: clamp(96px, 13.2vw, 224px);
  line-height: .84;
  letter-spacing: .012em;
}
.start-sub { max-width: 44ch; color: var(--text-2); font-size: clamp(15px, 1.2vw, 18px); line-height: 1.45; }
.start-drawing {
  flex: 1; display: flex; align-items: flex-end;
  min-height: 0; margin-top: 16px;
}
.start-drawing .drawing { display: block; width: 100%; max-height: 46vh; }

.start-panel {
  display: flex; flex-direction: column; gap: 26px;
  padding: clamp(20px, 4vh, 44px) clamp(20px, 3vw, 44px);
  background: var(--bg-2);
  border-left: 1px solid var(--line);
}
.params { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.param { padding: 14px 14px 12px; }
.param + .param { border-left: 1px solid var(--line); }
.param-value {
  font-family: var(--display); font-weight: 900; font-size: 46px; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.param-unit { margin-left: 3px; font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--muted); }
.param-label { margin-top: 6px; font-size: 12.5px; line-height: 1.25; color: var(--muted); }
.rules { display: grid; gap: 8px; color: var(--text-2); font-size: 14px; line-height: 1.4; }
.rules li { position: relative; padding-left: 18px; }
.rules li::before {
  content: ''; position: absolute; left: 0; top: .55em; width: 8px; height: 2px; background: var(--heat);
}
.panel-title {
  padding-top: 22px; border-top: 1px solid var(--line);
  font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1; letter-spacing: .02em; text-transform: uppercase;
}
.start-form { display: flex; flex-direction: column; gap: 16px; margin-top: -10px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.panel-foot {
  margin-top: auto; padding-top: 4px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; color: var(--muted);
}

/* ---------- Texnik chizmalar ---------- */
.drawing .d-line { fill: none; stroke: var(--line-2); stroke-width: 1.1; }
.drawing .d-hot { fill: none; stroke: #FF8A4A; stroke-width: 1.1; }
.drawing .d-shell { fill: none; stroke: var(--text-2); stroke-width: 2.4; }
.drawing .d-dim { fill: none; stroke: var(--muted); stroke-width: .8; }
.drawing .d-pin { fill: var(--text-2); }
.drawing .d-surface { fill: none; stroke: #FFE2A0; stroke-width: 2; }
.drawing .d-arrow { fill: none; stroke: var(--text-2); stroke-width: 1.6; }
.drawing .d-text { fill: var(--text-2); font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; }

/* ---------- Savol sahifasi ---------- */
.exam { display: flex; flex-direction: column; min-height: 100dvh; }
.exam-top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 14, 17, .96);
  border-bottom: 1px solid var(--line);
}
.timer { display: flex; align-items: baseline; gap: 10px; }
.timer-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.timer-value {
  font-family: var(--mono); font-weight: 600; font-size: 28px; line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  transition: color .3s;
}
.timer[data-heat='warm'] .timer-value { color: var(--heat-soft); }
.timer[data-heat='hot'] .timer-value { color: var(--heat); animation: pulse 1s steps(2, jump-none) infinite; }
@keyframes pulse { from { opacity: 1; } to { opacity: .55; } }

.heatbar { height: 6px; background: var(--bg-3); }
.heatbar-fill {
  height: 100%;
  background: var(--text-2);
  transform-origin: left center;
  transition: transform .2s linear, background-color .4s;
}
.heatbar-fill[data-heat='warm'] { background: var(--heat-soft); }
.heatbar-fill[data-heat='hot'] { background: var(--heat); box-shadow: 0 0 18px rgba(255, 90, 31, .7); }

.exam-main {
  flex: 1;
  display: flex; flex-direction: column;
  width: 100%; max-width: 900px; margin: 0 auto;
  padding: clamp(20px, 5vh, 56px) var(--gutter) 0;
}
.q-meta { display: flex; flex-direction: column; gap: 10px; margin-bottom: clamp(16px, 3.5vh, 32px); }
.q-count { font-family: var(--display); font-weight: 900; line-height: 1; }
.q-count-now { font-size: 44px; }
.q-count-of { font-size: 24px; color: var(--muted); font-weight: 800; }
.ticks { display: flex; gap: 3px; }
.tick { flex: 1; height: 3px; background: var(--bg-3); }
.tick.is-done { background: var(--line-2); }
.tick.is-current { background: var(--heat); }

.q-text {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -.005em;
  outline: 0;
  text-wrap: pretty;
}
.q-form { flex: 1; display: flex; flex-direction: column; margin-top: clamp(18px, 3.5vh, 32px); }
.opts { display: grid; gap: 10px; }
.opt {
  position: relative;
  display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: stretch;
  background: var(--bg-2);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color .12s, background-color .12s;
}
.opt:hover { border-color: var(--line-2); background: var(--bg-3); }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opt:has(input:focus-visible) { outline: 2px solid var(--heat-soft); outline-offset: 2px; }
.opt-key {
  display: flex; align-items: center; justify-content: center;
  border-right: 1px solid var(--line);
  font-family: var(--mono); font-weight: 600; font-size: 15px; color: var(--muted);
  transition: background-color .12s, color .12s, border-color .12s;
}
.opt-text { padding: 15px 18px; font-size: 17px; line-height: 1.4; color: var(--text); }
.opt.is-selected { border-color: var(--heat); background: #1E140F; }
.opt.is-selected .opt-key { background: var(--heat); border-right-color: var(--heat); color: var(--heat-ink); }

.q-actions {
  position: sticky; bottom: 0;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  margin-top: auto;
  padding: 18px 0 calc(18px + var(--safe-b));
  background: linear-gradient(to top, var(--bg) 78%, rgba(11, 14, 17, 0));
}
.q-actions .btn { min-width: 280px; }
.notice {
  width: 100%; padding: 10px 14px;
  border-left: 3px solid var(--heat-soft); background: var(--bg-3);
  font-size: 14px; color: var(--text-2);
}

/* ---------- Natija ---------- */
.result { min-height: 100dvh; display: flex; flex-direction: column; }
.result-main {
  flex: 1; display: flex; flex-direction: column; gap: 18px; align-items: center;
  width: 100%; max-width: 820px; margin: 0 auto;
  padding: clamp(12px, 3vh, 36px) var(--gutter) 40px;
}
.cert { width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); overflow: hidden; }
.cert-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line-2);
}
.cert-head h1 {
  font-family: var(--mono); font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.cert-head p { font-family: var(--mono); font-size: 13px; color: var(--text-2); white-space: nowrap; }
.cert-no { font-family: var(--sans); }
.cert-score {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 26px 22px 14px;
}
.cert-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.score-big {
  margin-top: 4px;
  font-family: var(--display); font-weight: 900; font-size: clamp(96px, 17vw, 156px); line-height: .9;
  font-variant-numeric: tabular-nums;
}
.score-of { font-size: .42em; font-weight: 800; color: var(--muted); }
.score-verdict { margin-top: 10px; font-size: 18px; font-weight: 500; }

.stamp {
  flex: none;
  padding: 8px 18px 6px;
  border: 5px solid currentColor;
  outline: 1.5px solid currentColor; outline-offset: 3px;
  font-family: var(--display); font-weight: 900; font-size: clamp(38px, 7.5vw, 66px); line-height: 1;
  letter-spacing: .03em; text-transform: uppercase;
  transform: rotate(-7deg);
  animation: stamp .32s cubic-bezier(.2, 1.6, .4, 1) .15s backwards;
}
.is-pass .stamp { color: var(--ok); }
.is-fail .stamp { color: var(--bad); }
@keyframes stamp { from { opacity: 0; transform: rotate(-7deg) scale(1.9); } to { opacity: 1; transform: rotate(-7deg) scale(1); } }

.score-meter {
  display: flex; align-items: center; gap: 16px;
  padding: 30px 22px 22px;
}
.score-track { position: relative; flex: 1; height: 10px; background: var(--bg-3); }
.score-fill { height: 100%; }
.is-pass .score-fill { background: var(--ok); }
.is-fail .score-fill { background: var(--bad); }
.score-mark { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--text); }
.score-mark span {
  position: absolute; bottom: calc(100% + 3px); right: 0;
  font-family: var(--mono); font-size: 10.5px; color: var(--text-2); white-space: nowrap;
}
.score-percent { font-family: var(--mono); font-weight: 600; font-size: 22px; min-width: 2.8em; text-align: right; }

.cert-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-2); }
.cert-cell { padding: 12px 22px 14px; min-width: 0; border-bottom: 1px solid var(--line); }
.cert-cell:nth-child(even) { border-left: 1px solid var(--line); }
.cert-value { margin-top: 3px; font-weight: 500; overflow-wrap: anywhere; }
.cert-note { padding: 14px 22px 16px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }

.fatal {
  min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px;
  max-width: 720px; margin: 0 auto; padding: 40px var(--gutter);
}
.fatal h1 { font-size: clamp(56px, 11vw, 112px); }
.fatal h1:not(.display) { font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: .95; }
.fatal p:not(.eyebrow) { color: var(--text-2); max-width: 46ch; }

/* ---------- Admin ---------- */
.admin { min-height: 100dvh; }
.admin > .brandbar { border-bottom: 1px solid var(--line); }
.admin-main { max-width: 1320px; margin: 0 auto; padding: clamp(20px, 4vh, 44px) var(--gutter) 64px; }
.admin-main > .notice { margin-bottom: 16px; }
.admin-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px;
  margin-bottom: clamp(20px, 4vh, 36px);
}
.admin-head h1 { font-size: clamp(64px, 9vw, 124px); }
.backlink {
  display: inline-block; margin-bottom: 18px;
  font-family: var(--mono); font-size: 13px; color: var(--text-2); text-decoration: none;
}
.backlink:hover { color: var(--text); }

.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); margin-bottom: 26px; }
.stats-inline { display: flex; margin: 0; }
.stat { padding: 14px 18px; min-width: 0; }
.stats-inline .stat { min-width: 104px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-value {
  font-family: var(--display); font-weight: 900; font-size: 44px; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-label { margin-top: 5px; font-size: 13px; line-height: 1.25; color: var(--muted); }
.stat.is-pass .stat-label::before { content: '✓ '; color: var(--ok); }
.stat.is-fail .stat-label::before { content: '✕ '; color: var(--bad); }

.modules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.module { display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line); transition: border-color .15s; }
.module:hover { border-color: var(--line-2); }
.module-drawing { background: var(--bg); border-bottom: 1px solid var(--line); }
.module-drawing .drawing { display: block; width: 100%; height: auto; }
.module-drawing .d-text, .module-drawing .d-dim, .module-drawing .d-callpin { display: none; }
.module-body { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.module-title { font-size: 60px; }
.module-title a { text-decoration: none; }
.module-title a:hover { color: var(--heat-soft); }
.module-sub { color: var(--text-2); font-size: 14.5px; line-height: 1.4; max-width: 64ch; }
.admin-head .module-sub { margin-top: 12px; }
.module-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); padding: 12px 0; }
.module-stats dt { font-size: 12px; line-height: 1.2; color: var(--muted); }
.module-stats dd {
  margin-top: 3px;
  font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Status: ikki qism orasida 2px bo'shliq, rang bilan birga matn ham bor. */
.outcome { display: flex; gap: 2px; height: 8px; }
.outcome.is-empty { background: var(--bg-3); }
.outcome-pass { background: var(--ok); }
.outcome-fail { background: var(--bad); }
.outcome > span:first-child { border-radius: 2px 0 0 2px; }
.outcome > span:last-child { border-radius: 0 2px 2px 0; }

.linkbox {
  display: flex; align-items: stretch; min-width: 0; max-width: 100%;
  border: 1px solid var(--line-2); background: var(--bg);
}
.linkbox-url {
  flex: 1; min-width: 0; padding: 10px 12px;
  font-family: var(--mono); font-size: 13px; line-height: 1.4; color: var(--text-2);
  text-decoration: none; overflow-wrap: anywhere;
}
.linkbox-url:hover { color: var(--text); }
.linkbox-copy {
  flex: none; padding: 0 14px;
  background: var(--bg-3); border: 0; border-left: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 12px; color: var(--text);
}
.linkbox-copy:hover { background: var(--line); }
.admin-head > .linkbox { min-width: 320px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.segs { display: flex; flex-wrap: wrap; border: 1px solid var(--line-2); }
.seg {
  display: flex; align-items: center; gap: 8px;
  min-height: 42px; padding: 0 14px;
  background: transparent; border: 0;
  font-size: 14px; color: var(--text-2);
}
.seg + .seg { border-left: 1px solid var(--line-2); }
.seg:hover { background: var(--bg-2); color: var(--text); }
.seg.is-active { background: var(--text); color: var(--bg); font-weight: 600; }
.seg-count { font-family: var(--mono); font-size: 12px; opacity: .75; }
.search {
  flex: 1 1 260px; max-width: 360px; height: 44px; padding: 0 14px;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 0; font-size: 15px;
  -webkit-appearance: none; appearance: none;
}
.search:focus { outline: 0; border-color: var(--heat-soft); }
.search::placeholder { color: #6B7580; }

.table-wrap { border: 1px solid var(--line); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th {
  padding: 11px 16px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); text-align: left; white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--bg-2); }
.person { font-weight: 500; white-space: normal; }
.chip {
  display: inline-block; margin-left: 8px; padding: 1px 7px;
  border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 11px; color: var(--text-2);
}
.mono { font-family: var(--mono); font-size: 14px; text-decoration: none; }
.mono-dim { font-family: var(--mono); font-size: 13.5px; color: var(--muted); }
.strong { font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; }
.status-icon { font-size: 13px; }
.status.is-pass .status-icon { color: var(--ok); }
.status.is-fail .status-icon { color: var(--bad); }
.status.is-live { color: var(--text-2); }
.status.is-live .status-icon { color: var(--heat-soft); font-size: 10px; }
.empty { padding: 56px 20px; border: 1px dashed var(--line-2); text-align: center; color: var(--muted); }

/* ---------- Moslashuv ---------- */
@media (max-width: 1080px) {
  .modules { grid-template-columns: minmax(0, 1fr); }
  .module { flex-direction: row; }
  .module-drawing { flex: 0 0 36%; border-bottom: 0; border-right: 1px solid var(--line); display: flex; align-items: center; }
}
@media (max-width: 920px) {
  .start { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .start-hero { min-height: 0; }
  .start-title { padding-top: 22px; }
  .start-title h1 { font-size: min(23vw, 168px); margin-bottom: 12px; }
  .start-drawing { margin-top: 10px; }
  .start-drawing .drawing { max-height: 200px; }
  .start-panel { border-left: 0; border-top: 1px solid var(--line); padding-inline: var(--gutter); padding-bottom: calc(24px + var(--safe-b)); }
  .panel-foot { margin-top: 0; }
}
@media (max-width: 720px) {
  .brandbar { min-height: 50px; padding-block: 8px; }
  .brand-name { font-size: 16px; }
  .exam .brand-name, .exam .brand-form { display: none; }
  .admin .exam-test { display: none; }
  .exam-test { font-size: 11px; }
  .brandbar-right { gap: 12px; flex: 1; justify-content: space-between; }
  .exam .brand { flex: none; }
  .timer-label { display: none; }
  .q-count-now { font-size: 36px; }
  .q-count-of { font-size: 20px; }
  .q-actions .btn { width: 100%; min-width: 0; }
  .opt { grid-template-columns: 40px minmax(0, 1fr); }
  .opt-text { padding: 12px 13px; font-size: 15.5px; }
  .cert-head, .cert-score, .score-meter, .cert-cell, .cert-note { padding-inline: 16px; }
  .cert-score { padding-top: 20px; }
  .result-main .btn { width: 100%; }
  .cert-grid { grid-template-columns: minmax(0, 1fr); }
  .cert-cell:nth-child(even) { border-left: 0; }

  .module { flex-direction: column; }
  .module-drawing { flex: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats .stat { border-left: 0; border-bottom: 1px solid var(--line); }
  .stats .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .stats .stat:last-child:nth-child(odd) { grid-column: 1 / -1; border-bottom: 0; }
  .stats-inline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
  .stats-inline .stat { min-width: 0; padding: 10px; border-bottom: 0; }
  .stats-inline .stat + .stat { border-left: 1px solid var(--line); }
  .stats-inline .stat-value { font-size: 32px; }
  .stats-inline .stat-label { font-size: 11.5px; }
  .admin-head > .linkbox { min-width: 0; width: 100%; }
  .segs { width: 100%; }
  .seg { flex: 1 1 auto; justify-content: center; padding: 0 8px; font-size: 13px; }
  .search { max-width: none; flex-basis: 100%; }

  /* Jadval telefonda kartochkalarga aylanadi */
  .table-wrap { border: 0; overflow: visible; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table tr { margin-bottom: 10px; padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--line); }
  .table td { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 4px 0; border: 0; white-space: normal; }
  .table td::before {
    content: attr(data-label);
    flex: none;
    font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  }
  .table tbody tr:hover td { background: none; }
}
@media (max-width: 360px) {
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .param-value { font-size: 38px; }
  .stamp { padding: 6px 12px 4px; border-width: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
