/* Шрифты с нашего сервера: Inter и Cormorant Garamond (лицензия SIL OFL). Браузер слушателя не обращается к Google. */
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600 700; font-display: swap; src: url(fonts/cormorant-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600 700; font-display: swap; src: url(fonts/cormorant-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600 700; font-display: swap; src: url(fonts/cormorant-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/inter-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/inter-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Кабинет ZanEx. Цвета и шрифты - как на zanex.kz. */
:root {
  --bg: #F6F2E9; --surface: #FFFDF8; --surface-2: #FBF8F1; --ink: #14231C; --muted: #5A665F;
  --line: rgba(20, 35, 28, .13); --line-2: rgba(20, 35, 28, .24);
  --accent: #8C6D23; --btn: #0F3B2D; --btn-ink: #F4EEDD; --btn-hover: #164B3A;
  --tint: rgba(201, 165, 76, .12); --band: #0B3124; --band-2: #08281E; --band-ink: #F1EBDA; --band-muted: rgba(236, 229, 210, .72);
  --gold: #C9A54C; --ivory: #ECE5D2;
  --ok: #1F6B45; --ok-bg: rgba(31, 107, 69, .10); --warn: #8A5A00; --warn-bg: rgba(201, 140, 20, .14); --bad: #A23B2A; --bad-bg: rgba(162, 59, 42, .10);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A261C; --surface: #0E3024; --surface-2: #0C2B20; --ink: #ECE5D2; --muted: #A9B3AB;
    --line: rgba(236, 229, 210, .13); --line-2: rgba(236, 229, 210, .26);
    --accent: #D5B567; --btn: #C9A54C; --btn-ink: #072219; --btn-hover: #DDBF6E; --tint: rgba(201, 165, 76, .10);
    --band: #072219; --band-2: #051a13;
    --ok: #6FCB98; --ok-bg: rgba(111, 203, 152, .12); --warn: #E8B860; --warn-bg: rgba(232, 184, 96, .13); --bad: #F08C78; --bad-bg: rgba(240, 140, 120, .12);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); }
body.m-learner, body.m-public { font-size: 17px; }
a { color: var(--accent); text-underline-offset: 2px; }
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0 0 .5em; }
h1 { font: 600 2rem/1.1 var(--serif); letter-spacing: -.005em; }
h1, h2, .lessons .n, .result .score, .mark { font-variant-numeric: lining-nums; }
h2 { font: 600 1.45rem/1.15 var(--serif); }
h3 { font-size: 1.02rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.s { font-size: .84rem; }
.num { font-variant-numeric: tabular-nums; }
.r { text-align: right; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* шапка */
.top { background: var(--band); color: var(--band-ink); padding-top: env(safe-area-inset-top, 0px); position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 1120px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 16px; min-height: 56px; flex-wrap: wrap; }
.mark { font: 600 1.4rem var(--serif); color: var(--band-ink); text-decoration: none; letter-spacing: .02em; }
.mark span { color: var(--gold); font: 500 .8rem var(--sans); letter-spacing: .01em; margin-left: 10px; vertical-align: 3px; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.nav a { color: var(--band-muted); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: .92rem; }
.nav a:hover { color: var(--band-ink); background: rgba(255, 255, 255, .06); }
.nav a.on { color: var(--band-ink); background: rgba(201, 165, 76, .2); }
.top-who { margin-left: auto; font-size: .88rem; color: var(--band-muted); min-width: 0; overflow-wrap: anywhere; }
.top-out { margin: 0; }
.top-out .linkbtn { color: var(--band-muted); }
.m-admin .top-out { margin-left: auto; }
.linkbtn { background: none; border: 0; padding: 4px 0; font: inherit; font-size: .88rem; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 760px) {
  .top-in { gap: 6px 12px; padding-block: 8px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .nav a { white-space: nowrap; padding: 6px 9px; }
  .mark span { display: none; }
}

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 16px; }
main.wrap { padding-block: 26px 60px; }
.narrow { max-width: 720px; }
main.narrow { margin-inline: auto; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 16px; }
.head h1 { margin: 0 0 4px; }
.head p { margin: 0; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: .86rem; margin: 0 0 8px; }
.crumbs a { color: var(--muted); }
.rules { font-size: .9rem; color: var(--muted); border-left: 3px solid var(--gold); padding: 4px 0 4px 12px; max-width: 80ch; }

/* блоки, таблицы */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; min-width: 0; margin: 16px 0; }
.empty p { margin: 0; color: var(--muted); }
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin: 12px 0 20px; }
.tbl table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-weight: 600; font-size: .8rem; color: var(--muted); background: var(--surface-2); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th.r, .tbl td.r { text-align: right; }
.people td.links { white-space: nowrap; }
.cpeople .links { margin-top: 6px; }
.cpeople .linkbtn { text-align: left; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 0 0 18px; }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.facts dt { font-size: .8rem; color: var(--muted); }
.facts dd { margin: 2px 0 0; }
.pill { display: inline-block; font-size: .76rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; background: var(--tint); color: var(--accent); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.gray { background: var(--line); color: var(--muted); }
.msg { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: .95rem; }
.msg.ok { background: var(--ok-bg); color: var(--ok); }
.msg.bad { background: var(--bad-bg); color: var(--bad); }
.msg.warn { background: var(--warn-bg); color: var(--warn); }
.danger { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); }

/* формы */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--btn); color: var(--btn-ink); border: 0; border-radius: 10px; padding: 11px 18px; font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer; min-height: 44px; }
.btn:hover { background: var(--btn-hover); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn.ghost:hover { background: var(--tint); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.form label { display: block; font-size: .88rem; font-weight: 600; margin: 0 0 14px; }
.form label > input, .form label > select, .form label > textarea { margin-top: 5px; }
.form .chk { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.form .chk input { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--btn); flex: none; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 0; margin: 0 0 14px; min-width: 0; }
legend { font-weight: 600; font-size: .9rem; padding: 0 6px; }
input[type=text], input:not([type]), input[type=number], input[type=date], input[type=password], select, textarea {
  width: 100%; font: inherit; font-weight: 400; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 11px; min-height: 44px;
}
textarea { resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid2 .span2 { grid-column: 1 / -1; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
@media (max-width: 680px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } }

/* вход слушателя */
.enter { padding-top: 6vh; }
.pinform { display: flex; gap: 10px; margin: 14px 0 22px; }
.pinform input { width: 9.5ch; font: 600 1.6rem var(--sans); letter-spacing: .3em; text-align: center; padding: 8px; min-height: 56px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); }
.pinform .btn { min-height: 56px; padding-inline: 26px; }
details.policy { padding: 0; }
details.policy summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style-position: inside; }
details.policy[open] summary { border-bottom: 1px solid var(--line); }
.policy-body { padding: 4px 18px 14px; max-height: 60vh; overflow-y: auto; font-size: .95rem; line-height: 1.6; }
.policy-body h3, .policy-page h3 { font-size: 1.02rem; margin: 1.1em 0 .4em; }
.policy-body ul, .policy-page ul { padding-left: 1.2em; }
.policy-page { max-width: 72ch; line-height: 1.65; }
.policy-page h1 { font-size: 1.8rem; }
.consent { font-size: .95rem; line-height: 1.6; background: var(--surface-2); border-left: 3px solid var(--gold); padding: 12px 14px; }

/* полоса курса с профилем уступов */
.band { background: var(--band); color: var(--band-ink); border-bottom: 1px solid rgba(201, 165, 76, .25); }
.band-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px 40px; align-items: end; padding-block: 30px 26px; }
.band h1 { font-size: 2.35rem; color: var(--band-ink); margin-bottom: .3em; }
.band p { color: var(--band-muted); margin-bottom: .4em; max-width: 60ch; }
.band .band-meta { color: var(--band-ink); font-size: .95rem; }
.bench { width: 100%; height: auto; max-height: 150px; overflow: visible; }
.bench path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.bench .b-done { stroke: var(--gold); stroke-width: 4; }
.bench .b-cur { stroke: var(--gold); stroke-width: 2; stroke-dasharray: 6 5; }
.bench .b-todo { stroke: rgba(236, 229, 210, .3); stroke-width: 1.5; }
@media (max-width: 760px) { .band-in { grid-template-columns: 1fr; padding-block: 22px 18px; } .band h1 { font-size: 1.9rem; } .bench { max-height: 90px; } }

/* список уроков - это последовательность, поэтому с номерами */
.lessons { list-style: none; margin: 8px 0 24px; padding: 0; border-top: 1px solid var(--line); }
.lessons li a { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto; gap: 4px 14px; align-items: baseline; padding: 15px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.lessons li a:hover { background: var(--tint); }
.lessons .n { font: 600 1.5rem/1 var(--serif); color: var(--muted); font-variant-numeric: lining-nums tabular-nums; }
.lessons .t { font-weight: 500; }
.lessons .st { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.lessons .st.ok { color: var(--ok); }
.lessons .st.warn { color: var(--warn); }
.lessons li.done .n { color: var(--gold); }
.lessons li.cur a { box-shadow: inset 3px 0 0 var(--gold); }
@media (max-width: 560px) { .lessons li a { grid-template-columns: 2.2rem minmax(0, 1fr); } .lessons .st { grid-column: 2; } }
.testbox .big { font-size: 1.1rem; font-weight: 600; }
.big.ok { color: var(--ok); } .big.bad { color: var(--bad); }

/* урок */
.lesson { max-width: 900px; margin: 0 auto; padding-bottom: 90px; }
.lesson h1 .ln { color: var(--accent); }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; margin: 14px 0 20px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.slides { margin: 16px 0 26px; outline: none; }
.stage { position: relative; aspect-ratio: 16 / 9; background: var(--band-2); border-radius: 12px; overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.wm { position: absolute; inset: -20%; display: flex; flex-wrap: wrap; align-content: space-around; justify-content: space-around; gap: 40px 60px; transform: rotate(-24deg); pointer-events: none; }
.wm span { font: 500 15px var(--sans); color: rgba(120, 120, 120, .2); white-space: nowrap; }
.slides figcaption { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.sbtn { font: 600 .95rem var(--sans); min-height: 44px; min-width: 96px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; }
.sbtn:hover { background: var(--tint); }
.sbtn[disabled] { opacity: .4; cursor: default; }
.count { color: var(--muted); }
.fs { margin-left: auto; }
.slides:fullscreen { background: #000; display: flex; flex-direction: column; justify-content: center; padding: 12px; }
.slides:fullscreen .stage { border-radius: 0; max-height: calc(100vh - 80px); width: 100%; aspect-ratio: auto; flex: 1; }
.slides:fullscreen figcaption { color: #ECE5D2; }
.slides:fullscreen .sbtn { background: #0E3024; color: #ECE5D2; border-color: rgba(236,229,210,.3); }
.count b { color: var(--ink); }
.prose { max-width: 68ch; font-size: 1.04rem; line-height: 1.7; }
.prose h2 { margin-top: 1.4em; }
.prose h3 { margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose .norm { font-size: .9rem; color: var(--muted); border-left: 3px solid var(--gold); padding: 2px 0 2px 12px; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; margin: 10px 0 16px; }
.prose th, .prose td { border: 1px solid var(--line-2); padding: 7px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); }
.prose th, .prose td { overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
@media (max-width: 480px) { .prose table { font-size: .86rem; } .prose th, .prose td { padding: 6px 6px; } }
.read-end { height: 1px; }
.donebar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line-2); z-index: 15; padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -6px 18px rgba(0, 0, 0, .06); }
.donebar-in { max-width: 900px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.donebar form { margin: 0; }
.dtime { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 0; }
.dtime .s { font-weight: 400; }

/* тест */
.testhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; position: sticky; top: 56px; background: var(--bg); padding: 10px 0; z-index: 10; border-bottom: 1px solid var(--line); }
.testhead h1 { margin: 0; }
.timer { font: 600 1.6rem var(--sans); font-variant-numeric: tabular-nums; padding: 6px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); }
.timer.low { color: var(--bad); border-color: var(--bad); }
.qs { list-style: none; padding: 0; max-width: 760px; }
.qq { margin: 22px 0; }
.qq .qn { color: var(--accent); font-variant-numeric: tabular-nums; margin-right: .35em; }
.qq fieldset { border: 0; padding: 0; margin: 0; }
.qq legend { font-weight: 600; font-size: 1.04rem; padding: 0; margin-bottom: 10px; line-height: 1.45; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; margin-bottom: 8px; cursor: pointer; background: var(--surface); }
.opt input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--btn); flex: none; }
.opt:has(input:checked) { border-color: var(--gold); background: var(--tint); }
.testfoot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; max-width: 760px; padding: 16px 0; border-top: 1px solid var(--line); }
.result .score { font: 600 3rem/1 var(--serif); font-variant-numeric: lining-nums; margin: 6px 0 14px; }
.result .score span { font-size: 1.6rem; color: var(--muted); }
.result.ok h1 { color: var(--ok); } .result.bad h1 { color: var(--bad); }
.mistakes { padding-left: 1.3em; margin: 0 0 20px; }
.mistakes li { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.mistakes p { margin: 0 0 4px; }
.mistakes .q { font-weight: 600; }
.mistakes span { color: var(--muted); }
.mistakes .mine { color: var(--bad); }
.mistakes .right { color: var(--ok); }
.mistakes .basis { color: var(--muted); font-size: .9em; }
.again { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 6px 0 16px; }

/* разбор попытки у администратора */
.review { padding-left: 1.4em; }
.review > li { margin-bottom: 16px; padding-left: 6px; }
.review > li.bad { border-left: 3px solid var(--bad); }
.review > li.ok { border-left: 3px solid var(--ok); }
.review .q { font-weight: 600; margin-bottom: 4px; }
.review ul { margin: 0; padding-left: 1.2em; }
.review li.right { color: var(--ok); }
.review .tag { font-size: .75rem; border: 1px solid currentColor; border-radius: 6px; padding: 0 5px; margin-left: 4px; }

footer.foot { color: var(--muted); font-size: .82rem; padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px)); text-align: center; }
.m-learner footer.foot { padding-bottom: 100px; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print { .top, .donebar, .nav, .btn { display: none !important; } body { background: #fff; color: #000; } }
.lang-switch { margin: 0 0 .6em; color: var(--muted); }
.lang-switch b { font-weight: 600; }
/* код доступа компании (0.6) */
.code { font: 600 clamp(1.15rem, 5.6vw, 1.7rem) ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; overflow-wrap: anywhere; margin: 0 0 6px; }
.code-in { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; }
.code-in::placeholder { text-transform: none; letter-spacing: .02em; }
.company-access .acts { margin-bottom: 10px; }
.company-access .acts form { margin: 0; }
