/* ==========================================================================
   Диплом сурах — хичээлийн апп (унших тав тухтай, минимал)
   ========================================================================== */
:root {
  --bg: #ffffff; --bg-2: #f6f7f9; --bg-3: #eceef2; --card: #ffffff;
  --line: #e7e9ee; --line-2: #d6d9e0;
  --text: #111318; --text-2: #4d5563; --text-3: #8a919e;
  --accent: #2563eb; --accent-2: #1d4ed8; --accent-soft: #eaf1ff;
  --ok: #15803d; --ok-soft: #e8f6ee; --bad: #c81e1e; --bad-soft: #fdeeee; --warn: #9a5b00; --warn-soft: #fdf5e2;
  --violet-soft: #f2efff; --violet: #5b3fd1; --on-accent: #ffffff;
  --shadow: 0 1px 2px rgba(17, 19, 24, .06), 0 0 0 1px rgba(17, 19, 24, .04);
  --shadow-lg: 0 18px 40px rgba(17, 19, 24, .12);
  --r: 14px; --top: 56px; --read: 720px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1014; --bg-2: #15181e; --bg-3: #1d2129; --card: #151820;
    --line: #232731; --line-2: #313744;
    --text: #eef0f4; --text-2: #b0b7c3; --text-3: #7d8594;
    --accent: #6ea0ff; --accent-2: #8bb4ff; --accent-soft: rgba(110, 160, 255, .13);
    --ok: #4ade80; --ok-soft: rgba(74, 222, 128, .12); --bad: #f87171; --bad-soft: rgba(248, 113, 113, .13);
    --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12); --violet-soft: rgba(150, 125, 255, .14); --violet: #b4a3ff; --on-accent: #0b1220;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .06); --shadow-lg: 0 18px 44px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1014; --bg-2: #15181e; --bg-3: #1d2129; --card: #151820;
  --line: #232731; --line-2: #313744;
  --text: #eef0f4; --text-2: #b0b7c3; --text-3: #7d8594;
  --accent: #6ea0ff; --accent-2: #8bb4ff; --accent-soft: rgba(110, 160, 255, .13);
  --ok: #4ade80; --ok-soft: rgba(74, 222, 128, .12); --bad: #f87171; --bad-soft: rgba(248, 113, 113, .13);
  --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12); --violet-soft: rgba(150, 125, 255, .14); --violet: #b4a3ff; --on-accent: #0b1220;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .06); --shadow-lg: 0 18px 44px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, figure { margin: 0; }
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
code { font-family: var(--mono); font-size: .88em; padding: .1em .35em; border-radius: 6px; background: var(--bg-3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------------------------------------------------------------- дээд мөр */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(170%) blur(14px); -webkit-backdrop-filter: saturate(170%) blur(14px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.top__inner { display: flex; align-items: center; gap: 10px; max-width: 1080px; height: var(--top); margin: 0 auto; padding: 0 16px; }
.top__brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; letter-spacing: -.01em; white-space: nowrap; }
.top__brand img { width: 28px; height: 28px; border-radius: 8px; }
.top__back { display: grid; place-items: center; width: 36px; height: 36px; margin-left: -6px; border-radius: 10px; color: var(--text); }
.top__back:hover { background: var(--bg-2); }
.top__back svg { width: 20px; height: 20px; }
.top__title { flex: 1; min-width: 0; overflow: hidden; font-size: 14.5px; font-weight: 600; color: var(--text-2); text-overflow: ellipsis; white-space: nowrap; }
body.in-lesson .top__brand span { display: none; }
.iconbtn { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); cursor: pointer; }
.iconbtn:hover { background: var(--bg-2); color: var(--text); }
.iconbtn svg { width: 19px; height: 19px; }
.readbar { height: 2px; }
.readbar span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .1s linear; }

main { max-width: 1080px; margin: 0 auto; padding: 20px 16px calc(64px + env(safe-area-inset-bottom)); outline: none; }
.wrap-read { max-width: var(--read); margin: 0 auto; }

/* ---------------------------------------------------------------- нүүр */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 26px; margin-bottom: 26px; border-radius: 22px; background: linear-gradient(135deg, var(--accent-soft), var(--violet-soft)); }
.hero h1 { font-size: clamp(24px, 4vw, 34px); line-height: 1.2; letter-spacing: -.025em; }
.hero p { margin-top: 8px; color: var(--text-2); font-size: 15px; max-width: 560px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ring { position: relative; width: 112px; height: 112px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring .bg { stroke: color-mix(in srgb, var(--accent) 16%, transparent); }
.ring .fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.ring__txt { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-weight: 700; font-size: 24px; line-height: 1; }
.ring__txt small { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 500; color: var(--text-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); color: var(--text); font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { background: var(--bg-2); }
.btn:active { transform: scale(.98); }
.btn--primary { border-color: transparent; background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-2); }
.btn--ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn svg { width: 18px; height: 18px; }
.sec-h { display: flex; align-items: baseline; gap: 10px; margin: 30px 0 14px; }
.sec-h h2 { font-size: 20px; letter-spacing: -.015em; }
.sec-h span { color: var(--text-3); font-size: 14px; }

.vcards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: 12px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.vcards::-webkit-scrollbar { display: none; }
.vcard { scroll-snap-align: start; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); color: var(--text); transition: transform .15s, box-shadow .15s; }
.vcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.vcard__thumb { position: relative; aspect-ratio: 16 / 9; background: #0b1220; }
.vcard__thumb canvas { width: 100%; height: 100%; display: block; }
.vcard__play { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 8px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12.5px; font-weight: 600; backdrop-filter: blur(6px); }
.vcard__play svg { width: 13px; height: 13px; }
.vcard__body { padding: 11px 13px 13px; }
.vcard__body b { display: block; font-size: 14.5px; line-height: 1.35; }
.vcard__body span { font-size: 12.5px; color: var(--text-3); }

.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.mod { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); color: var(--text); transition: transform .15s, box-shadow .15s; }
.mod:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.mod__top { display: flex; align-items: center; gap: 10px; }
.mod__num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 15px; }
.mod__ch { font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.mod h3 { font-size: 17px; line-height: 1.3; letter-spacing: -.01em; }
.mod p { color: var(--text-2); font-size: 14px; line-height: 1.5; }
.mod__foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px; font-size: 12.5px; color: var(--text-3); }
.bar { flex: 1; height: 6px; border-radius: 6px; background: var(--bg-3); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 6px; background: var(--accent); }
.mod.is-done .bar span { background: var(--ok); }

.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tool { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); color: var(--text); }
.tool:hover { box-shadow: var(--shadow-lg); }
.tool__ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--bg-2); color: var(--accent); }
.tool__ic svg { width: 21px; height: 21px; }
.tool b { display: block; font-size: 15px; }
.tool span { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.install { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--line-2); color: var(--text-2); font-size: 14px; }
.install b { color: var(--text); }
.install svg { flex: none; width: 22px; height: 22px; color: var(--accent); }

/* ---------------------------------------------------------------- модуль */
.mhead { margin: 6px 0 22px; }
.mhead .mod__ch { font-size: 13.5px; }
.mhead h1 { margin-top: 4px; font-size: clamp(24px, 4vw, 32px); line-height: 1.2; letter-spacing: -.02em; }
.mhead p { margin-top: 8px; color: var(--text-2); }
.lessons { display: flex; flex-direction: column; gap: 8px; }
.lrow { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); color: var(--text); }
.lrow:hover { box-shadow: var(--shadow-lg); }
.lrow__n { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line-2); font-size: 13px; font-weight: 700; color: var(--text-2); }
.lrow.is-done .lrow__n { border-color: var(--ok); background: var(--ok); color: var(--on-accent); }
.lrow__n svg { width: 16px; height: 16px; }
.lrow__t { flex: 1; min-width: 0; }
.lrow__t b { display: block; font-size: 15.5px; line-height: 1.35; }
.lrow__t span { font-size: 12.5px; color: var(--text-3); }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip svg { width: 12px; height: 12px; }

/* ---------------------------------------------------------------- хичээл */
.lhead { margin: 4px 0 18px; }
.lhead .crumb { font-size: 13.5px; color: var(--text-3); font-weight: 500; }
.lhead .crumb a { color: var(--text-3); }
.lhead h1 { margin-top: 6px; font-size: clamp(25px, 4.4vw, 34px); line-height: 1.2; letter-spacing: -.025em; }
.lhead__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; color: var(--text-3); font-size: 13.5px; align-items: center; }
.prose > * + * { margin-top: 16px; }
.prose p { font-size: 17px; line-height: 1.75; }
.prose h2 { margin-top: 30px; font-size: 21px; line-height: 1.3; letter-spacing: -.015em; }
.prose ul, .prose ol { margin: 14px 0 0; padding-left: 24px; font-size: 16.5px; line-height: 1.7; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--text-3); }
.prose b, .prose strong { font-weight: 650; }
.prose figure { margin: 22px 0; }
.prose figure img { width: 100%; border-radius: 12px; background: #fff; box-shadow: var(--shadow); cursor: zoom-in; }
.prose figcaption { margin-top: 8px; font-size: 13.5px; color: var(--text-3); line-height: 1.5; text-align: center; }
.math { overflow-x: auto; overflow-y: hidden; padding: 14px 16px; border-radius: 12px; background: var(--bg-2); text-align: center; font-size: 1.05em; }
.math + .mcap { margin-top: 6px; font-size: 13.5px; color: var(--text-3); text-align: center; }
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; box-shadow: var(--shadow); }
.tbl table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--card); }
.tbl th { padding: 10px 12px; text-align: left; font-weight: 600; font-size: 13px; color: var(--text-2); background: var(--bg-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
.tbl tr:last-child td { border-bottom: 0; }
.tcap { margin-top: 8px; font-size: 13.5px; color: var(--text-3); text-align: center; }
.flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
.flow__s { position: relative; flex: 1 1 140px; display: flex; gap: 10px; align-items: flex-start; padding: 12px 12px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow); font-size: 14.5px; line-height: 1.45; }
.flow__s i { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-style: normal; font-size: 12.5px; font-weight: 700; }
.box { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; font-size: 16px; line-height: 1.65; }
.box__ic { flex: none; width: 22px; height: 22px; margin-top: 2px; }
.box__ic svg { width: 22px; height: 22px; }
.box b.box__t { display: block; margin-bottom: 2px; font-size: 14px; letter-spacing: .01em; text-transform: none; }
.box ul { margin: 6px 0 0; padding-left: 20px; }
.box li + li { margin-top: 4px; }
.box--key { background: var(--accent-soft); }
.box--key .box__ic, .box--key .box__t { color: var(--accent); }
.box--analogy { background: var(--violet-soft); }
.box--analogy .box__ic, .box--analogy .box__t { color: var(--violet); }
.box--warn { background: var(--warn-soft); }
.box--warn .box__ic, .box--warn .box__t { color: var(--warn); }
.box--report { padding: 10px 14px; background: var(--bg-2); color: var(--text-2); font-size: 14px; }
.box--report .box__ic { color: var(--text-3); width: 18px; height: 18px; margin-top: 3px; }
.box--report .box__ic svg { width: 18px; height: 18px; }
.ask { border-radius: 14px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.ask summary { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; cursor: pointer; list-style: none; font-weight: 600; font-size: 16px; line-height: 1.5; }
.ask summary::-webkit-details-marker { display: none; }
.ask summary .q { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 700; }
.ask summary .chev { margin-left: auto; flex: none; width: 18px; height: 18px; color: var(--text-3); transition: transform .2s; margin-top: 3px; }
.ask[open] summary .chev { transform: rotate(180deg); }
.ask .a { padding: 0 16px 14px 50px; color: var(--text-2); font-size: 16px; line-height: 1.7; }

/* видео тоглуулагч */
.vp { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: #0b1220; box-shadow: var(--shadow-lg); user-select: none; -webkit-user-select: none; outline: none; }
.vp:focus-visible { box-shadow: 0 0 0 3px var(--accent), var(--shadow-lg); }
.vp__stage { position: relative; }
.vp canvas { display: block; width: 100%; aspect-ratio: 16 / 9; cursor: pointer; }
.vp__cap { min-height: 3.6em; padding: 9px 16px 11px; border-top: 1px solid rgba(255, 255, 255, .07); background: #0b1220; color: #e8edf5; font-size: clamp(14px, 1.8vw, 16.5px); line-height: 1.5; text-align: center; }
.vp.no-cc .vp__cap { display: none; }
.vp__big { position: absolute; inset: 0; display: grid; place-items: center; border: 0; background: rgba(5, 10, 20, .25); cursor: pointer; }
.vp__big span { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: rgba(255, 255, 255, .95); color: #0b1220; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: transform .15s; }
.vp__big:hover span { transform: scale(1.06); }
.vp__big svg { width: 30px; height: 30px; margin-left: 4px; }
.vp__ctl { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 6px; padding: 22px 8px 6px; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); color: #fff; transition: opacity .25s; }
.vp.is-playing .vp__ctl.is-idle { opacity: 0; }
.vp__btn { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; }
.vp__btn:hover { background: rgba(255, 255, 255, .14); }
.vp__btn svg { width: 20px; height: 20px; }
.vp__time { font-size: 12.5px; font-variant-numeric: tabular-nums; opacity: .9; white-space: nowrap; }
.vp__bar { position: relative; flex: 1; height: 26px; cursor: pointer; touch-action: none; }
.vp__bar::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .28); }
.vp__fill { position: absolute; left: 0; top: 11px; height: 4px; border-radius: 4px; background: #6ea0ff; }
.vp__knob { position: absolute; top: 6px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.vp__mark { position: absolute; top: 10px; width: 2px; height: 6px; background: rgba(255, 255, 255, .7); }
.vp__spd { flex: none; min-width: 44px; height: 30px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 8px; background: transparent; color: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.vp:fullscreen, .vp.is-pfs { justify-content: center; border-radius: 0; background: #000; }
.vp:fullscreen .vp__stage, .vp.is-pfs .vp__stage { width: min(100%, calc((100vh - 4.6em) * 16 / 9)); margin: 0 auto; }
.vp:fullscreen .vp__cap, .vp.is-pfs .vp__cap { background: #000; border: 0; font-size: clamp(15px, 2vw, 20px); }
.vp.is-pfs { position: fixed; inset: 0; z-index: 100; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
html.pfs-lock, html.pfs-lock body { overflow: hidden; }
.vchap { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.vchap button { height: 30px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); color: var(--text-2); font-size: 13px; cursor: pointer; }
.vchap button:hover { color: var(--text); border-color: var(--text-3); }

/* тест */
.quiz { margin-top: 34px; padding: 20px; border-radius: 18px; background: var(--bg-2); }
.quiz h2 { display: flex; align-items: center; gap: 8px; font-size: 19px; }
.quiz h2 svg { width: 20px; height: 20px; color: var(--accent); }
.quiz__sub { margin-top: 4px; color: var(--text-3); font-size: 14px; }
.qq { margin-top: 18px; padding: 16px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.qq__q { font-weight: 600; font-size: 16.5px; line-height: 1.5; }
.qq__q i { font-style: normal; color: var(--text-3); margin-right: 6px; }
.opts { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.opt { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); text-align: left; font-size: 15.5px; line-height: 1.5; cursor: pointer; transition: border-color .15s, background .15s; }
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt__l { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--bg-3); font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.opt:disabled { cursor: default; }
.opt.is-ok { border-color: var(--ok); background: var(--ok-soft); }
.opt.is-ok .opt__l { background: var(--ok); color: var(--on-accent); }
.opt.is-bad { border-color: var(--bad); background: var(--bad-soft); }
.opt.is-bad .opt__l { background: var(--bad); color: var(--on-accent); }
.qq__ex { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); color: var(--text-2); font-size: 14.5px; line-height: 1.6; }
.qq__ex b { color: var(--text); }
.qscore { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.qscore b { font-size: 22px; }
.done-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.navl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.navl a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); color: var(--text); font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.navl a span { font-size: 12px; font-weight: 500; color: var(--text-3); }
.navl a.next { text-align: right; grid-column: 2; }

/* дасгал, толь */
.card3d { perspective: 1200px; }
.flash { position: relative; min-height: 240px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow-lg); padding: 24px; cursor: pointer; }
.flash__tag { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.flash__q { margin-top: 10px; font-size: 20px; line-height: 1.45; font-weight: 650; letter-spacing: -.01em; }
.flash__a { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 16.5px; line-height: 1.7; }
.flash__hint { margin-top: 18px; font-size: 13.5px; color: var(--text-3); }
.flash-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.search { width: 100%; height: 46px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--card); color: var(--text); font: inherit; font-size: 16px; }
.search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.gl { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.gl__i { padding: 13px 16px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.gl__i b { font-size: 16px; }
.gl__i .en { color: var(--accent); font-size: 13.5px; font-weight: 600; margin-left: 6px; }
.gl__i p { margin-top: 3px; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.exam-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--text-3); font-size: 14px; }
.empty { padding: 40px 0; text-align: center; color: var(--text-3); }

.zoom { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .86); cursor: zoom-out; animation: fade .2s; }
.zoom img { max-width: 100%; max-height: 100%; border-radius: 8px; background: #fff; }
@keyframes fade { from { opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 70; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); padding: 10px 12px 10px 16px; border-radius: 14px; background: #16181d; color: #fff; font-size: 14.5px; box-shadow: var(--shadow-lg); animation: fade .2s; }
.toast .btn { height: 34px; padding: 0 12px; font-size: 14px; }

@media (max-width: 720px) {
  main { padding: 14px 16px calc(56px + env(safe-area-inset-bottom)); }
  .hero { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 16px; }
  .hero .ring { position: absolute; right: 18px; top: 18px; width: 76px; height: 76px; }
  .hero { position: relative; }
  .hero h1 { padding-right: 84px; }
  .ring__txt { font-size: 18px; }
  .ring__txt small { font-size: 10px; }
  .prose p { font-size: 16.5px; }
  .vp { border-radius: 12px; margin: 0 -4px; }
  .vp__time { display: none; }
  .vp__spd { min-width: 38px; }
  .navl { grid-template-columns: 1fr; }
  .navl a.next { grid-column: 1; }
  .quiz { padding: 16px; margin-left: -4px; margin-right: -4px; }
}
@media (hover: none) {
  .vcard:hover, .mod:hover { transform: none; }
}
