/* ПДР Тести (pdrtesty.com) — статичные страницы (главная, билеты, темы, вопросы, аккаунт). Шапка и цвета — как в тренажёре (styles.css). */
:root {
  --forest: #17383c; --forest-2: #21494e; --lime: #c9e98a;
  --bg: #f4f6f6; --surface: #ffffff; --surface-2: #f8f9f9; --chip: #eceff0; --line: #dde3e3; --line-2: #c3cdce; --line-hover: #8fa5a8;
  --ink: #14272b; --text: #2a3a3e; --soft: #536569; --accent: #1d5359; --tint: #e8eeee;
  --primary-bg: #17383c; --primary-fg: #ffffff; --primary-hover: #24494e;
  --green: #2c7650; --green-ink: #1f5a3b; --green-bg: #e5f3e9; --green-line: #9ccdae; --green-fill: #2c7650;
  --red: #a9432f; --red-ink: #87331f; --red-bg: #fbebe7; --red-line: #e3a597; --red-fill: #a9432f; --amber: #8a5f0e;
  --focus: #1d6f78; --shadow: 0 1px 2px rgba(20, 39, 43, .04), 0 10px 30px rgba(20, 39, 43, .06); --header-h: 64px;
  --font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light; font-family: var(--font); color: var(--text); background: var(--bg); -webkit-text-size-adjust: 100%;
}
:root[data-theme="dark"] {
  --bg: #0d1618; --surface: #152124; --surface-2: #1a282b; --chip: #223236; --line: #2a3b3f; --line-2: #3b5055; --line-hover: #5f7a7f;
  --ink: #eef3f1; --text: #d3ddda; --soft: #9fb0ac; --accent: #c9e98a; --tint: #1b2c2f;
  --primary-bg: #c9e98a; --primary-fg: #17383c; --primary-hover: #d8f2a6;
  --green: #74cf9c; --green-ink: #a6e6c1; --green-bg: rgba(116, 207, 156, .12); --green-line: rgba(116, 207, 156, .45); --green-fill: #2f8a5c;
  --red: #f08f7a; --red-ink: #ffb9a9; --red-bg: rgba(240, 143, 122, .12); --red-line: rgba(240, 143, 122, .45); --red-fill: #b9533d; --amber: #e3b65c;
  --focus: #c9e98a; --shadow: none; color-scheme: dark;
}
[data-theme="dark"] .site-header { background: #10282b; }
[data-theme="dark"] .q-image img, [data-theme="dark"] .answer img { filter: brightness(.94); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); font-size: 16px; line-height: 1.6; -webkit-tap-highlight-color: rgba(201, 233, 138, .3); }
a { color: var(--accent); }
img { max-width: 100%; }
button { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.site-header :focus-visible { outline-color: var(--lime); }
.skip-link { position: absolute; z-index: 200; top: 8px; left: 8px; padding: 10px 14px; border-radius: 10px; color: var(--forest); background: var(--lime); font-weight: 700; text-decoration: none; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- Шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 22px; height: var(--header-h); padding: 0 clamp(16px, 2.6vw, 32px); color: #fff; background: var(--forest); }
.brand { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; min-height: 44px; color: #fff; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: var(--forest); background: var(--lime); font-size: 13px; font-weight: 800; letter-spacing: -.3px; }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: -.5px; }
.brand-name b { color: #a9c0b2; font-weight: 800; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: #d3e0d6; font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.site-nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .1); }
.site-nav .nav-cta { display: none; }
.header-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 12px; color: var(--forest); background: var(--lime); font-size: 15px; font-weight: 800; text-decoration: none; }
.cta:hover { background: #d8f2a6; }
.theme-toggle { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255, 255, 255, .18); border-radius: 12px; color: #e6eee7; background: transparent; cursor: pointer; }
.theme-toggle:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.theme-toggle .i-sun, [data-theme="dark"] .theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
.lang-switch { display: inline-flex; flex: 0 0 auto; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, .2); }
.lang-switch a { display: grid; place-items: center; min-width: 38px; height: 36px; padding: 0 8px; border-radius: 9px; color: #a9bcb0; font-size: 13px; font-weight: 700; text-decoration: none; }
.lang-switch a:hover { color: #fff; }
.lang-switch a.active { color: var(--forest); background: #f1f5f2; }
.account-link { display: inline-flex; align-items: center; gap: 8px; max-width: 180px; height: 44px; padding: 0 14px 0 5px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 12px; color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.account-link:hover, .account-link[aria-current="page"] { background: rgba(255, 255, 255, .08); }
.account-avatar { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px; color: var(--forest); background: var(--lime); font-size: 14px; font-weight: 800; }
.account-label { overflow: hidden; text-overflow: ellipsis; }

/* ---------- Страница ---------- */
.page { max-width: 880px; margin: 0 auto; padding: 24px 16px 48px; }
.page-wide { max-width: 1140px; padding-right: clamp(16px, 3vw, 32px); padding-left: clamp(16px, 3vw, 32px); }
.crumbs { margin-bottom: 18px; color: var(--soft); font-size: 14px; }
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs i { margin: 0 6px; font-style: normal; color: var(--soft); }
h1 { margin: 0 0 12px; color: var(--ink); font-size: clamp(26px, 3.6vw, 34px); line-height: 1.25; letter-spacing: -.6px; text-wrap: balance; }
h2 { margin: 36px 0 12px; color: var(--ink); font-size: 21px; line-height: 1.3; letter-spacing: -.3px; text-wrap: balance; }
h3 { color: var(--ink); }
.lead { max-width: 44em; margin: 0 0 20px; color: var(--soft); font-size: 17px; }
.note { padding: 12px 16px; border-left: 3px solid var(--line-hover); border-radius: 0 10px 10px 0; color: var(--text); background: var(--tint); font-size: 15px; }
.meta { margin: 0 0 10px; color: var(--soft); font-size: 14px; }
.meta a { color: var(--accent); }
.muted { color: var(--soft); }
.notice { padding: 12px 16px; border-radius: 12px; color: var(--green-ink); background: var(--green-bg); }

/* ---------- Кнопки ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 12px; color: var(--ink); background: var(--surface); font-size: 15px; font-weight: 700; text-decoration: none; transition: background-color .15s ease, border-color .15s ease; }
.button:hover { border-color: var(--line-hover); background: var(--surface-2); }
.button.primary { border-color: var(--primary-bg); color: var(--primary-fg); background: var(--primary-bg); }
.button.primary:hover { border-color: var(--primary-hover); background: var(--primary-hover); }
.button.big { min-height: 54px; padding: 0 24px; border-radius: 14px; font-size: 17px; }
.button.wide { width: 100%; }
.button.danger { border-color: var(--red-line); color: var(--red); }
button.button { font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.link { display: inline-flex; align-items: center; min-height: 44px; margin: 8px auto 0; padding: 0; border: 0; color: var(--accent); background: none; font: inherit; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.auth-box .link { display: flex; margin: 8px auto 0; }

/* ---------- Вопрос ---------- */
.question { padding: clamp(18px, 3vw, 32px); border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.question h1 { font-size: clamp(20px, 2.6vw, 25px); line-height: 1.4; letter-spacing: -.3px; }
.q-image { margin: 16px 0; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); text-align: center; }
.q-image img { width: auto; max-width: 100%; height: auto; max-height: 360px; object-fit: contain; }
.hint { margin: 16px 0 10px; color: var(--soft); font-size: 15px; }
.answers { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.answer { display: grid; grid-template-columns: 32px 1fr; gap: 14px; align-items: center; width: 100%; min-height: 60px; padding: 12px 16px 12px 12px; border: 1.5px solid var(--line); border-radius: 14px; color: var(--text); background: var(--surface); font: inherit; font-size: 16px; line-height: 1.5; text-align: left; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.answer:hover { border-color: var(--line-hover); background: var(--surface-2); }
.answer .num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--ink); background: var(--chip); font-size: 15px; font-weight: 800; }
.answer img { display: block; width: auto; height: auto; max-width: 100%; max-height: 170px; margin-top: 6px; }
.answer.right { border-color: var(--green-line); color: var(--green-ink); background: var(--green-bg); }
.answer.right .num { color: #fff; background: var(--green-fill); }
.answer.wrong { border-color: var(--red-line); color: var(--red-ink); background: var(--red-bg); }
.answer.wrong .num { color: #fff; background: var(--red-fill); }
.answers.done .answer { cursor: default; }
.solution { margin-top: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.solution summary { display: flex; align-items: center; min-height: 52px; padding: 0 16px; color: var(--accent); font-weight: 700; cursor: pointer; }
.solution[open] summary { border-bottom: 1px solid var(--line); }
.solution .correct { margin: 14px 16px 0; }
.solution h2 { margin: 16px 16px 6px; font-size: 16px; }
.solution .explanation { margin: 0 16px 16px; }
.explanation { margin: 0; color: var(--text); font-size: 15px; line-height: 1.65; white-space: pre-line; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; }
.pager a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; }
.pager a:hover { text-decoration: underline; }

/* ---------- Списки ---------- */
.qlist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.qlist.numbered { counter-reset: q; }
.qlist li { padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 16px; }
.qlist.numbered li::before { counter-increment: q; content: counter(q) '. '; color: var(--soft); font-weight: 700; font-variant-numeric: tabular-nums; }
.qlist a { color: var(--ink); text-decoration: none; }
.qlist a:hover { color: var(--accent); text-decoration: underline; }
.qlist small { display: block; color: var(--soft); font-size: 13px; }
.qlist small.img { display: inline; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; }
.grid a { display: grid; place-items: center; height: 46px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; text-decoration: none; }
.grid a:hover { border-color: var(--line-hover); background: var(--surface-2); }
.grid a.active { border-color: var(--primary-bg); color: var(--primary-fg); background: var(--primary-bg); }
/* Темы: колонками, нумерация идёт сверху вниз */
.topics { margin: 0; padding: 0; list-style: none; column-width: 330px; column-gap: 10px; }
.topics li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; margin: 0 0 8px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 15px; line-height: 1.4; break-inside: avoid; }
.topics li:hover { border-color: var(--line-hover); }
.topics a { color: var(--ink); text-decoration: none; }
.topics a:hover { text-decoration: underline; text-underline-offset: 3px; }
.topics a b { color: var(--soft); font-variant-numeric: tabular-nums; }
.topics small { flex: 0 0 auto; color: var(--soft); font-size: 13px; }
.facts { padding-left: 20px; }
.facts li { margin: 8px 0; }
.sources { color: var(--soft); font-size: 14px; }
.related { margin-top: 32px; }
.site-footer { padding: 24px 16px 32px; border-top: 1px solid var(--line); color: var(--soft); font-size: 14px; text-align: center; }
.site-footer p { max-width: 760px; margin: 6px auto; }
.site-footer a { display: inline-block; padding: 6px 2px; }

/* ---------- Главная ---------- */
.hero { max-width: 760px; padding: clamp(16px, 4vw, 44px) 0 12px; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: 15px; font-weight: 700; }
.hero h1 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.12; letter-spacing: -1.2px; }
.hero .lead { font-size: 18px; }
.hero .actions { margin: 24px 0 18px; }
.facts-line { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.facts-line li { padding: 5px 12px; border-radius: 99px; color: var(--text); background: var(--chip); font-size: 14px; font-weight: 600; }
.facts-text { margin: 0; color: var(--soft); font-size: 15px; }
.more-link { margin: 16px 0 0; font-weight: 700; }
.more-link a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.more-link a:hover { text-decoration: underline; }
.personal { margin-top: 28px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.personal h2 { margin-top: 0; }
.personal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.personal-grid small { display: block; color: var(--soft); font-size: 14px; }
.personal-grid strong { color: var(--ink); font-size: 32px; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.personal-grid .of { color: var(--soft); font-size: 15px; }
.personal .bar { height: 8px; margin-top: 6px; border-radius: 99px; overflow: hidden; background: var(--chip); }
.personal .bar span { display: block; width: 0; height: 100%; background: var(--primary-bg); }
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mode { display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--line); border-radius: 16px; color: inherit; background: var(--surface); text-decoration: none; transition: border-color .15s ease; }
.mode:hover { border-color: var(--line-hover); }
.mode h3 { margin: 0 0 6px; font-size: 18px; }
.mode p { flex: 1; margin: 0 0 14px; color: var(--soft); font-size: 15px; }
.mode span { color: var(--accent); font-size: 15px; font-weight: 700; }
.mode:first-child { border-color: var(--forest); color: #fff; background: var(--forest); }
.mode:first-child h3 { color: #fff; }
.mode:first-child p { color: #c9d7cd; }
.mode:first-child span { color: var(--lime); }
.rules-box { margin-top: 32px; padding: 4px 22px 20px; border-radius: 18px; background: var(--tint); }

/* ---------- Аккаунт ---------- */
.auth-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 10px; }
.auth-box { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.auth-box h2 { margin-top: 0; }
.why { padding: 4px 22px 18px; border-radius: 18px; background: var(--tint); }
.why ul { padding-left: 18px; }
.why li { margin: 8px 0; }
.tabs { display: inline-flex; gap: 4px; margin-bottom: 16px; padding: 4px; border-radius: 12px; background: var(--chip); }
.tabs button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 9px; color: var(--soft); background: transparent; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.tabs button.active { color: var(--primary-fg); background: var(--primary-bg); }
.field { display: grid; gap: 6px; margin: 14px 0; color: var(--ink); font-size: 14px; font-weight: 600; }
.field input { min-height: 48px; padding: 0 14px; border: 1.5px solid var(--line-2); border-radius: 12px; color: var(--ink); background: var(--surface); font: inherit; font-size: 16px; }
.field input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
.form-error { min-height: 1em; margin: 6px 0; color: var(--red); font-size: 14px; }
.form-ok { margin: 6px 0; color: var(--green); font-size: 14px; }
.form-error:empty, .form-ok:empty { display: none; }
.profile-head { display: flex; gap: 16px; align-items: center; }
.profile-head h1 { margin: 0; }
.profile-head p { margin: 2px 0; color: var(--soft); font-size: 14px; }
.profile-head .sync { color: var(--green); }
.avatar { display: grid; place-items: center; flex: 0 0 56px; width: 56px; height: 56px; border-radius: 16px; color: var(--forest); background: var(--lime); font-size: 24px; font-weight: 800; }
.stat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat-cards > div { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.stat-cards small { display: block; color: var(--soft); font-size: 13px; }
.stat-cards strong { color: var(--ink); font-size: 28px; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.stat-cards span { margin-left: 4px; color: var(--soft); font-size: 14px; }
.topic-stats { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); font-size: 14px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--soft); font-weight: 600; background: var(--surface-2); }
td a { color: var(--ink); }
.pct { font-weight: 700; font-variant-numeric: tabular-nums; }
.pct.good { color: var(--green); } .pct.mid { color: var(--amber); } .pct.low { color: var(--red); }
.exam-history { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.exam-history li { display: flex; justify-content: space-between; gap: 10px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 15px; }
.exam-history .pass { color: var(--green); } .exam-history .fail { color: var(--red); }
.exam-history li { padding: 0; }
.exam-history a { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 10px 16px; color: var(--text); text-decoration: none; }
.exam-history a:hover { background: var(--surface-2); }
.exam-history a span { display: grid; gap: 2px; }
.exam-history small { color: var(--soft); font-size: 13px; }
.exam-history .kind { justify-self: start; margin-right: 4px; padding: 1px 8px; border-radius: 99px; color: var(--text); background: var(--chip); font-size: 12px; font-style: normal; font-weight: 700; }
.exam-history b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.exam-history + .button { margin-top: 10px; }
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.auth-layout + .settings { margin-top: 20px; }
.settings form { display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.settings form > .button { align-self: flex-start; margin-top: auto; }
.settings h3 { margin: 0 0 8px; font-size: 16px; }
.settings .field:first-of-type { margin-top: 0; }
.settings p { color: var(--soft); font-size: 14px; }
.settings .danger { border-color: var(--red-line); }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.chart .col { display: flex; flex: 1; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.chart .col span { width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: #5fae80; }
.chart .col small { margin-top: 4px; color: var(--soft); font-size: 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-page .tabs { margin-top: 6px; }
.admin-page .scroll { overflow-x: auto; }
.admin-page .stat-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-page .stat-cards span { display: block; margin: 2px 0 0; color: var(--soft); font-size: 12px; }
.admin-page .card-live { border-color: #5fae80; }
.chart.stacked .col { min-width: 0; }
.chart.stacked .col small { white-space: nowrap; }
.chart.stacked.dense { gap: 1px; }
.chart.stacked .bar { display: flex; flex-direction: column-reverse; width: 100%; height: 100%; }
.chart.stacked .bar span { display: block; width: 100%; min-height: 0; border-radius: 0; }
.chart.stacked .bar .s-live { background: #5fae80; }
.chart.stacked .bar .s-bounce { background: #d9a441; }
.chart.stacked .bar .s-bot { background: #8a8f98; }
.chart.stacked .bar span:last-child { border-radius: 4px 4px 0 0; }
.s-live { background: #5fae80; }
.s-bounce { background: #d9a441; }
.s-bot { background: #8a8f98; }
.legend { display: flex; gap: 14px; margin-top: 6px; color: var(--soft); font-size: 13px; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 2px; }
.funnel .meter { width: 30%; min-width: 80px; }
.funnel .meter span { display: block; height: 8px; border-radius: 4px; background: #5fae80; }
.visits td { white-space: nowrap; font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.seg { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #102a20; }
.seg-live { background: #5fae80; }
.seg-bounce { background: #d9a441; }
.seg-bot { background: #8a8f98; }

/* ---------- Адаптив ---------- */
@media (max-width: 1000px) {
  .site-header { gap: 12px; }
  .site-nav a { padding: 0 9px; }
  .account-label { display: none; }
  .account-link { width: 44px; padding: 0; justify-content: center; }
}
@media (max-width: 900px) {
  .site-header { position: static; flex-wrap: wrap; gap: 0 8px; height: auto; padding: 7px 10px 0; }
  .header-tools { gap: 6px; }
  .header-tools .cta { display: none; }
  .site-nav { order: 3; flex: 0 0 calc(100% + 20px); gap: 4px; margin: 6px -10px 0; padding: 0 10px 8px; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav .nav-cta { display: inline-flex; order: -1; color: var(--forest); background: var(--lime); font-weight: 800; }
  .site-nav a { flex: 0 0 auto; min-height: 40px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .14); }
  .site-nav a[aria-current="page"] { border-color: rgba(255, 255, 255, .4); }
  .lang-switch a { min-width: 34px; padding: 0 6px; }
}
@media (max-width: 760px) {
  .auth-layout, .settings, .two { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .page { padding-top: 18px; }
  .hero { padding-top: 6px; }
  .hero h1 { font-size: 30px; letter-spacing: -.8px; }
  .hero .lead { font-size: 16px; }
  .hero .actions .button { flex: 1 1 100%; }
  .modes { grid-template-columns: 1fr; }
  .personal { padding: 18px; }
  .personal-grid { grid-template-columns: 1fr 1fr; }
  .personal-grid > div:first-child { grid-column: 1 / -1; }
  .question { padding: 16px 14px; border-radius: 16px; }
  .answer { grid-template-columns: 30px 1fr; gap: 12px; padding: 12px 12px 12px 10px; }
  .pager { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 400px) {
  .header-tools { gap: 4px; }
  .theme-toggle, .account-link { width: 40px; height: 40px; }
  .lang-switch a { min-width: 30px; height: 34px; padding: 0 4px; }
}
@media (max-width: 350px) {
  .brand-name { display: none; }
}

/* Оригинал вопроса на украинском в русской версии */
.original { margin: 10px 0 0; font-size: 0.9rem; color: var(--muted, var(--ink)); opacity: .85; }
.original summary { cursor: pointer; width: fit-content; }
.original p { margin: 8px 0 4px; font-weight: 600; }
.original ol { margin: 0; padding-left: 1.4em; }
