/* =========================================================
   Mehnat muhofazasi — platforma
   Brand: logo blue → green
   ========================================================= */
:root {
  --blue: #0b5ed7;
  --blue-600: #094fb6;
  --blue-50: #eaf2ff;
  --green: #22b04f;
  --green-600: #178f3e;
  --green-50: #e7f8ec;
  --amber: #f59e0b;
  --amber-50: #fff4dc;
  --ink: #0c1a2e;
  --ink-2: #33445c;
  --muted: #5d6e86;
  --line: #e2e9f2;
  --bg: #ffffff;
  --tint: #f3f7fc;
  --surface: #ffffff;
  --surface-2: #fbfdff;
  --line-2: #c9d8ec;
  --grad: linear-gradient(120deg, #0b5ed7 0%, #1690d6 50%, #22b04f 100%);
  --r-sm: 12px;
  --r: 20px;
  --r-lg: 28px;
  --shadow-sm: 0 2px 6px rgba(12, 40, 90, .06);
  --shadow: 0 24px 60px -24px rgba(11, 70, 160, .28);
  --header-h: 76px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(11, 94, 215, .45); outline-offset: 2px; border-radius: 8px; }

.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 20px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: transform .2s, box-shadow .2s, background-color .2s, border-color .2s, color .2s;
}
.btn--lg { min-height: 56px; padding: 0 26px; font-size: 16px; border-radius: 16px; }
.btn--primary { background: var(--grad); background-size: 140% 100%; color: #fff; box-shadow: 0 10px 24px -10px rgba(11, 94, 215, .7); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(11, 94, 215, .75); background-position: 100% 0; }
.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn--ghost .ic { transition: transform .2s; }
.btn--ghost:hover .ic { transform: translateX(3px); }
.btn--white { background: #fff; color: var(--blue); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .35); }
.btn--white:hover { transform: translateY(-2px); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255, 255, 255, .82); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(12, 40, 90, .4); }
.header__inner { height: 100%; display: flex; align-items: center; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand__mark { position: relative; width: 48px; height: 48px; border-radius: 14px; overflow: hidden; background: #fff; flex: none; box-shadow: inset 0 0 0 1px var(--line); }
.brand__mark img { position: absolute; width: 76px; height: 76px; max-width: none; left: -14px; top: -7px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.brand__text small { font-size: 12px; font-weight: 600; color: var(--green-600); }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a:not(.btn) { padding: 8px 12px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ink-2); transition: color .2s, background-color .2s; }
.nav a:not(.btn):hover { color: var(--blue); background: var(--blue-50); }
.nav__cta-mobile { display: none; }

.header__actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav + .header__actions { margin-left: 0; }
@media (max-width: 1120px) { .nav + .header__actions { margin-left: auto; } }
.lang { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--tint); border: 1px solid var(--line); }
.lang__btn { border: 0; background: transparent; padding: 6px 10px; border-radius: 9px; font-size: 13px; font-weight: 800; color: var(--muted); cursor: pointer; transition: background-color .2s, color .2s; }
.lang__btn.is-active { background: var(--surface); color: var(--blue); box-shadow: var(--shadow-sm); }

.burger { display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); align-items: center; justify-content: center; cursor: pointer; }
.burger .ic { width: 22px; height: 22px; }
.burger .ic--close { display: none; }
.burger[aria-expanded="true"] .ic--open { display: none; }
.burger[aria-expanded="true"] .ic--close { display: block; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 96px; }
.hero__bg { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #f2f7ff 0%, #ffffff 85%); }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.blob--a { width: 520px; height: 520px; right: -120px; top: -140px; background: radial-gradient(circle, #6fb0ff 0%, transparent 70%); }
.blob--b { width: 460px; height: 460px; right: 18%; bottom: -220px; background: radial-gradient(circle, #7be39b 0%, transparent 70%); }
.grid-lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(11, 94, 215, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(11, 94, 215, .07) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 70% 30%, #000 30%, transparent 75%);
}
.hero__inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink-2); box-shadow: var(--shadow-sm);
}
.pulse { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--green); opacity: 0; animation: pulse 2s infinite; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

.hero h1 { margin-top: 22px; font-size: clamp(34px, 5vw, 58px); font-weight: 800; letter-spacing: -.035em; }
.hero__lead { margin-top: 20px; font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); max-width: 560px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 12px 32px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.stats li { display: flex; flex-direction: column; }
.stats b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.stats b small { font-size: 16px; }
.stats span { font-size: 13px; color: var(--muted); max-width: 130px; line-height: 1.35; }

/* Hero visual */
.hero__visual { position: relative; padding: 64px 24px 52px; }
.mock {
  position: relative; background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow), 0 0 0 8px rgba(255, 255, 255, .6); overflow: hidden;
  transform: perspective(1400px) rotateY(-6deg) rotateX(3deg); transition: transform .6s;
}
.hero__visual:hover .mock { transform: none; }
.mock__bar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.mock__title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.mock__title .ic { width: 18px; height: 18px; color: var(--blue); }
.timer { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; background: var(--blue-50); color: var(--blue); font-weight: 800; font-variant-numeric: tabular-nums; font-size: 14px; }
.timer .ic { width: 16px; height: 16px; }
.mock__body { padding: 22px; }
.mock__meta { display: flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 600; color: var(--muted); }
.mock__progress { flex: 1; height: 6px; border-radius: 6px; background: var(--tint); overflow: hidden; }
.mock__progress i { display: block; height: 100%; background: var(--grad); border-radius: inherit; }
.mock__question { margin-top: 14px; font-weight: 700; font-size: 16px; line-height: 1.4; }
.mock__options { display: grid; gap: 10px; margin-top: 16px; }
.mock__options li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; color: var(--ink-2); }
.mock__options .radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; }
.mock__options .is-selected { border-color: var(--blue); background: var(--blue-50); color: var(--ink); font-weight: 600; }
.mock__options .is-selected .radio { border-color: var(--blue); background: radial-gradient(circle, var(--blue) 40%, transparent 46%); }
.mock__nums { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.mock__nums i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }
.mock__nums .ok { background: var(--green-50); border-color: #bfe8cb; color: var(--green-600); }
.mock__nums .cur { background: var(--blue); border-color: var(--blue); color: #fff; }

.float {
  position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); animation: float 6s ease-in-out infinite;
}
.float b { display: block; font-size: 14px; line-height: 1.25; }
.float small { display: block; font-size: 12px; color: var(--muted); }
.float__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.float__icon--green { background: var(--green-50); color: var(--green-600); }
.float__icon--amber { background: var(--amber-50); color: var(--amber); }
.float--cert { right: -8px; top: 0; }
.float--warn { left: -20px; bottom: 0; animation-delay: -2s; }
.float--course { right: -8px; bottom: 8px; animation-delay: -4s; }
.ring { width: 44px; height: 44px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: var(--tint); stroke-width: 5; }
.ring .ring__val { stroke-width: 5; stroke-linecap: round; stroke-dasharray: 113; stroke-dashoffset: 28; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section--tint { background: var(--tint); }
.section__head { max-width: 720px; margin-bottom: 48px; }
.section__head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section__head h2, .benefits__intro h2, .cta-band h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; letter-spacing: -.03em; }
.section__head p { margin-top: 16px; font-size: 18px; color: var(--muted); }
.kicker { display: inline-block; margin-bottom: 14px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.kicker--light { color: rgba(255, 255, 255, .85); }

.icon-tile { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue); flex: none; }
.icon-tile .ic { width: 24px; height: 24px; }
.icon-tile--green { background: var(--green-50); color: var(--green-600); }
.icon-tile--amber { background: var(--amber-50); color: var(--amber); }
.icon-tile--white { background: rgba(255, 255, 255, .18); color: #fff; }

.chip { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--blue-50); color: var(--blue); }
.chip--green { background: var(--green-50); color: var(--green-600); }
.chip--amber { background: var(--amber-50); color: #b45309; }
.chip--white { background: rgba(255, 255, 255, .18); color: #fff; }

/* Parts */
.parts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.part { padding: 30px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); transition: transform .25s, box-shadow .25s; }
.part:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.part__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.part h3 { margin: 24px 0 18px; font-size: 22px; font-weight: 800; }
.part--featured { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--shadow); }
.ticks { display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; font-size: 15px; color: var(--ink-2); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 6px;
  background: var(--green-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23178f3e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center/14px no-repeat;
}
.part--featured .ticks li { color: rgba(255, 255, 255, .95); }
.part--featured .ticks li::before { background-color: rgba(255, 255, 255, .2); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E"); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.step { position: relative; padding: 28px 24px; background: var(--surface); border-radius: var(--r); border: 1px solid var(--line); }
.step__num { position: absolute; right: 22px; top: 20px; font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1.5px var(--line-2); }
.step h3 { margin-top: 22px; font-size: 18px; font-weight: 800; }
.step p { margin-top: 8px; font-size: 15px; color: var(--muted); }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 52px; right: -21px; width: 22px; height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

/* Benefits */
.benefits { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.benefits__intro { position: sticky; top: calc(var(--header-h) + 32px); }
.benefits__intro p { margin-top: 16px; font-size: 18px; color: var(--muted); }
.badge-card { display: flex; gap: 14px; margin-top: 28px; padding: 18px 20px; border-radius: var(--r); background: var(--green-50); color: #0f5a29; font-size: 14px; font-weight: 600; }
.badge-card .ic { width: 26px; height: 26px; color: var(--green-600); }
.benefits__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.benefit { display: flex; flex-direction: column; gap: 16px; padding: 26px; border: 1px solid var(--line); border-radius: var(--r); transition: border-color .2s, box-shadow .2s; }
.benefit:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.benefit h3 { font-size: 17px; font-weight: 800; }
.benefit p { margin-top: 6px; font-size: 15px; color: var(--muted); }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile { display: flex; flex-direction: column; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); transition: transform .25s, box-shadow .25s, border-color .25s; }
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.tile h3 { margin-top: 20px; font-size: 19px; font-weight: 800; }
.tile p { margin-top: 8px; font-size: 15px; color: var(--muted); flex: 1; }
.tile__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-size: 14px; font-weight: 700; color: var(--blue); }
.tile__more .ic { width: 16px; height: 16px; transition: transform .2s; }
.tile:hover .tile__more .ic { transform: translateX(4px); }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 56px; border-radius: 32px; background: var(--grad); color: #fff; box-shadow: var(--shadow);
}
.cta-band__pattern {
  position: absolute; inset: 0; opacity: .35;
  background-image: radial-gradient(rgba(255, 255, 255, .55) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000);
  mask-image: linear-gradient(90deg, transparent 30%, #000);
}
.cta-band__copy, .cta-band .btn { position: relative; }
.cta-band p { margin-top: 12px; font-size: 18px; opacity: .92; }
.cta-band__list { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 22px; }
.cta-band__list li { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.cta-band__list .ic { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: rgba(255, 255, 255, .22); stroke-width: 3; }

/* News */
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-card { padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); transition: box-shadow .25s, transform .25s; }
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.news-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.news-card time { font-size: 13px; font-weight: 600; color: var(--muted); }
.news-card h3 { margin-top: 18px; font-size: 18px; font-weight: 800; line-height: 1.3; }
.news-card p { margin-top: 10px; font-size: 15px; color: var(--muted); }
.news-card--img { --pad: 26px; overflow: hidden; }
.news-card__img { display: block; margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) 20px; aspect-ratio: 16 / 9; background: var(--tint); }
.news-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) { .news-card--img { --pad: 22px; } }

/* Images in test questions */
.quiz__img { display: block; margin-top: 16px; max-width: 560px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--tint); }
.quiz__img img { display: block; width: 100%; max-height: 360px; object-fit: contain; }
.review__img { display: block; margin: 10px 0 0 44px; max-width: 240px; max-height: 160px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); }

/* Admin image picker */
.img-pick [hidden] { display: none !important; }
.img-pick__drop { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1.5px dashed var(--line); border-radius: 14px; background: var(--surface-2); cursor: pointer; transition: border-color .2s, background-color .2s; }
.img-pick__drop:hover, .img-pick__drop:focus-within { border-color: var(--blue, #0b5ed7); background: var(--tint); }
.img-pick__drop small { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
.img-pick__busy { padding: 16px 18px; border: 1.5px dashed var(--line); border-radius: 14px; font-size: 14px; }
.img-pick__preview { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.img-pick__preview img { max-width: 260px; max-height: 170px; border-radius: 12px; border: 1px solid var(--line); object-fit: contain; background: var(--tint); }
.img-pick__acts { display: flex; flex-wrap: wrap; gap: 8px; }
.with-thumb { display: flex; align-items: center; gap: 12px; }
.thumb { width: 56px; height: 40px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); flex: none; }
.note { margin-top: 20px; font-size: 13px; color: var(--muted); }

/* Verify + contact */
.duo { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; align-items: stretch; }
.verify, .contact { padding: 40px; border-radius: var(--r-lg); border: 1px solid var(--line); }
.verify { background: linear-gradient(160deg, #f1fbf4 0%, #eef5ff 100%); }
.verify h2, .contact h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; }
.verify h2 { margin-top: 20px; }
.verify p, .contact > p { margin-top: 10px; color: var(--muted); }
.verify__form { display: flex; gap: 10px; margin-top: 24px; }
.verify__form input { flex: 1; min-width: 0; }
input, textarea {
  width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  font-size: 16px; transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 110px; }
input:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(11, 94, 215, .12); }
input.is-invalid, textarea.is-invalid { border-color: #e11d48; }
.verify__result:empty { display: none; }
.verify__result { display: flex; gap: 12px; margin-top: 18px; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; animation: rise .35s ease; }
.verify__result b { display: block; font-size: 15px; }
.verify__result .ic { width: 24px; height: 24px; }
.verify__result.is-ok { border-color: #bfe8cb; } .verify__result.is-ok .ic { color: var(--green-600); }
.verify__result.is-bad { border-color: #fecdd3; } .verify__result.is-bad .ic { color: #e11d48; }

.form { display: grid; gap: 14px; margin-top: 24px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label > span { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.form__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; font-weight: 600; }
.check input { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--blue); }
.form__status:empty { display: none; }
.form__status { padding: 12px 16px; border-radius: 12px; background: var(--green-50); color: #0f5a29; font-weight: 700; font-size: 14px; animation: rise .35s ease; }
.contact__list { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.contact__list li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.contact__list .ic { color: var(--blue); }

/* Footer */
.footer { background: #0a1a33; color: #c4d1e4; padding: 64px 0 28px; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer__col { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.footer__col > b { color: #fff; font-size: 15px; margin-bottom: 4px; }
.footer__col > a { font-size: 15px; transition: color .2s; }
.footer__col > a:hover { color: #fff; }
.footer__col .subscribe { margin-top: 14px; width: 100%; }
.footer__contacts { display: grid; gap: 8px; margin-top: 18px; font-size: 14px; }
.footer__contacts li { display: flex; align-items: center; gap: 10px; }
.footer__contacts .ic { width: 18px; height: 18px; color: #6ee08f; }
.footer__demo { color: #6f86a6; }
.brand--light .brand__text strong { color: #fff; }
.brand--light .brand__text small { color: #6ee08f; }
.footer__brand p { margin-top: 16px; font-size: 14px; max-width: 320px; }
.footer__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; align-content: start; }
.footer__nav a { font-size: 15px; transition: color .2s; }
.footer__nav a:hover { color: #fff; }
.subscribe b { color: #fff; font-size: 15px; }
.subscribe__row { display: flex; gap: 8px; margin-top: 12px; }
.subscribe input { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: #fff; }
.subscribe input::placeholder { color: #8aa0bd; }
.subscribe .btn { padding: 0 16px; }
.subscribe__status { display: block; margin-top: 8px; color: #6ee08f; font-weight: 600; min-height: 1em; }
.footer__bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; color: #8aa0bd; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
.nav a { white-space: nowrap; }

@media (max-width: 1320px) {
  .nav a:not(.btn) { padding: 8px 10px; }
  .header__login span { display: none; }
  .header__login { padding: 0 13px; }
}

/* mobile navigation (wide enough for the longer Russian labels) */
@media (max-width: 1120px) {
  :root { --header-h: 68px; }
  .burger { display: inline-flex; }
  .header__login { display: none; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 20px;
    background: var(--surface); overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav a:not(.btn) { padding: 14px 16px; font-size: 18px; border-radius: 12px; }
  .nav__cta-mobile { display: inline-flex; margin-top: 12px; min-height: 54px; }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 980px) {
  .hero { padding: 48px 0 72px; }
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__visual { max-width: 560px; width: 100%; margin-inline: auto; }
  .parts, .tiles, .news { grid-template-columns: 1fr 1fr; }
  .parts > :last-child, .news > :last-child { grid-column: 1 / -1; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step::after { display: none; }
  .benefits { grid-template-columns: 1fr; gap: 36px; }
  .benefits__intro { position: static; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 40px; }
  .duo { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 32px); }
  .section { padding: 64px 0; }
  .section__head { margin-bottom: 32px; }
  .section__head p, .benefits__intro p { font-size: 16px; }
  .brand__mark { width: 42px; height: 42px; border-radius: 12px; }
  .brand__mark img { width: 66px; height: 66px; left: -12px; top: -6px; }
  .brand__text strong { font-size: 15px; }
  .brand__text small { font-size: 11px; }
  .header__actions { gap: 8px; }
  .lang__btn { padding: 6px 8px; }
  .burger { width: 42px; height: 42px; }

  .hero__cta .btn { flex: 1 1 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 18px 16px; margin-top: 36px; }
  .parts > :last-child, .news > :last-child { grid-column: auto; }
  .stats b { font-size: 22px; }
  .hero__visual { padding: 8px 0 0; }
  .mock { transform: none; }
  .mock__body { padding: 16px; }
  .mock__options li { padding: 10px 12px; font-size: 13px; }
  .mock__nums i { width: 26px; height: 26px; }
  .float { position: relative; inset: auto; margin-top: 12px; animation: none; }
  .float--warn, .float--course { display: none; }
  .float--cert { width: fit-content; margin-left: auto; margin-top: -24px; }

  .parts, .tiles, .news, .steps, .benefits__grid { grid-template-columns: 1fr; }
  .part, .tile, .benefit, .news-card { padding: 22px; }
  .cta-band { padding: 32px 24px; border-radius: 24px; }
  .cta-band .btn { width: 100%; }
  .verify, .contact { padding: 26px 20px; }
  .verify__form { flex-direction: column; }
  .form__row { grid-template-columns: 1fr; }
  .form__foot .btn { width: 100%; }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer__col:last-child { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .header__inner { gap: 12px; }
  .header .brand { gap: 10px; }
  .header .brand__mark { width: 42px; height: 42px; border-radius: 12px; }
  .header .brand__mark img { width: 66px; height: 66px; left: -12px; top: -6px; }
  .header .brand__text small { display: none; }
  .header .brand__text strong { max-width: 6.5em; font-size: 14.5px; line-height: 1.15; }
  .header__actions { gap: 6px; }
  .theme-btn, .burger { width: 40px; height: 40px; }
}
@media (max-width: 380px) {
  .brand__text small { display: none; }
  .lang__btn { padding: 6px 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   INNER PAGES & APP COMPONENTS
   ========================================================= */

/* ---------- Nav: current page + dropdown ---------- */
.nav a[aria-current="page"]:not(.btn), .nav__group.is-current > .nav__toggle { color: var(--blue); background: var(--blue-50); }
.nav__group { position: relative; }
.nav__toggle {
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 10px 8px 12px; border: 0; border-radius: 10px; background: none;
  font-size: 15px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: color .2s, background-color .2s;
}
.nav__toggle:hover { color: var(--blue); background: var(--blue-50); }
.nav__toggle .ic { width: 16px; height: 16px; transition: transform .2s; }
.sub {
  position: absolute; top: calc(100% + 10px); left: 50%; width: 340px; padding: 8px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); transform: translate(-50%, 6px); opacity: 0; visibility: hidden;
  transition: opacity .2s, transform .2s, visibility .2s; z-index: 60;
}
.sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nav__group:hover .sub, .nav__group.is-open .sub, .nav__group:focus-within .sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nav__group:hover .nav__toggle .ic, .nav__group.is-open .nav__toggle .ic { transform: rotate(180deg); }
.nav .sub a.sub__item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; font-size: 14px; color: var(--ink); white-space: normal; }
.nav .sub a.sub__item:hover, .nav .sub a.sub__item[aria-current="page"] { background: var(--tint); color: var(--ink); }
.sub__item b { display: block; font-weight: 700; line-height: 1.3; }
.sub__item small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.icon-tile--sm { width: 38px; height: 38px; border-radius: 11px; }
.icon-tile--sm .ic { width: 20px; height: 20px; }

@media (max-width: 1120px) {
  .nav__group { display: flex; flex-direction: column; }
  .nav__toggle { padding: 14px 16px; font-size: 18px; justify-content: space-between; width: 100%; }
  .sub { position: static; width: auto; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: 0; padding: 0 0 6px 10px; display: none; }
  .nav__group.is-open .sub { display: block; transform: none; }
  .nav__group:hover .sub, .nav__group:focus-within .sub { transform: none; }
  .nav__group:not(.is-open):hover .sub { display: none; }
  .nav .sub a.sub__item { padding: 10px 12px; font-size: 16px; }
}

/* ---------- Page hero ---------- */
.page-hero { position: relative; overflow: hidden; padding: 56px 0 64px; background: linear-gradient(180deg, #eef5ff 0%, #f7fbff 100%); border-bottom: 1px solid var(--line); }
.page-hero .grid-lines { -webkit-mask-image: radial-gradient(ellipse 60% 90% at 85% 20%, #000 20%, transparent 70%); mask-image: radial-gradient(ellipse 60% 90% at 85% 20%, #000 20%, transparent 70%); }
.page-hero .blob--a { width: 420px; height: 420px; right: -100px; top: -200px; }
.page-hero__inner { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.page-hero h1 { font-size: clamp(30px, 4.2vw, 48px); font-weight: 800; letter-spacing: -.03em; max-width: 820px; }
.page-hero p { margin-top: 14px; font-size: clamp(16px, 1.5vw, 18px); color: var(--muted); max-width: 680px; }
.page-hero__icon { width: 88px; height: 88px; border-radius: 26px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: var(--shadow); flex: none; }
.page-hero__icon .ic { width: 42px; height: 42px; stroke-width: 1.6; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 14px; font-weight: 600; color: var(--muted); }
.crumbs a { color: var(--blue); }
.crumbs a:hover { text-decoration: underline; }
.crumbs .ic { width: 14px; height: 14px; transform: rotate(-90deg); }

.section--sm { padding: 56px 0; }
.h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -.025em; }
.lead { margin-top: 10px; color: var(--muted); font-size: 17px; }
.note-box { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 14px; background: var(--amber-50); color: #8a5300; font-size: 14px; font-weight: 600; }
.note-box .ic { color: var(--amber); width: 20px; height: 20px; margin-top: 1px; }
.link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 700; color: var(--blue); }
.link .ic { width: 16px; height: 16px; }
.link:hover { text-decoration: underline; }
.muted { color: var(--muted); }

/* ---------- Toolbar: search + chips ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 28px; }
.search { position: relative; display: block; flex: 1 1 280px; max-width: 420px; }
.search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 44px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  font-size: 14px; font-weight: 700; color: var(--ink-2); transition: all .2s;
}
.chip-btn:hover { border-color: var(--blue); color: var(--blue); }
.chip-btn.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-btn .count { margin-left: 6px; opacity: .6; font-weight: 600; }
select {
  min-height: 46px; padding: 0 40px 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6e86' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 12px center/18px no-repeat;
  -webkit-appearance: none; appearance: none; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer;
}
select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(11, 94, 215, .12); }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); background: var(--surface); }
.empty .ic { width: 32px; height: 32px; margin: 0 auto 10px; }

/* ---------- Doc list (legal etc.) ---------- */
.docs { display: grid; gap: 12px; }
.doc { display: flex; align-items: center; gap: 18px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; transition: border-color .2s, box-shadow .2s; }
.doc:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.doc__body { flex: 1; min-width: 0; }
.doc__body h3 { font-size: 16.5px; font-weight: 700; line-height: 1.4; letter-spacing: -.01em; }
.doc__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.doc .btn { flex: none; min-height: 42px; padding: 0 16px; font-size: 14px; }

/* ---------- Cards grid (materials, books) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { min-width: 0; overflow-wrap: anywhere; display: flex; flex-direction: column; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { margin-top: 16px; font-size: 17px; font-weight: 800; line-height: 1.35; flex: 1; }
.card__meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 11px; gap: 8px; }
.btn--sm .ic { width: 17px; height: 17px; }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none; }

.book-cover {
  position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; padding: 18px; display: flex; flex-direction: column; justify-content: space-between;
  color: #fff; background: var(--grad); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}
.book-cover::before { content: ""; position: absolute; left: 12px; top: 0; bottom: 0; width: 2px; background: rgba(255, 255, 255, .25); }
.book-cover b { position: relative; font-size: 16px; line-height: 1.3; font-weight: 800; }
.book-cover span { position: relative; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.book-cover--1 { background: linear-gradient(150deg, #0b5ed7, #2a8af0); }
.book-cover--2 { background: linear-gradient(150deg, #178f3e, #3cc46a); }
.book-cover--3 { background: linear-gradient(150deg, #0a2a5e, #1e5bb8); }
.book-cover--4 { background: linear-gradient(150deg, #0b6e8f, #22b07c); }
.books { grid-template-columns: repeat(4, 1fr); }
.books .card { padding: 16px; }
.books .card h3 { margin-top: 14px; font-size: 15.5px; }

/* ---------- Steps (horizontal procedure) ---------- */
.proc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: p; }
.proc li { position: relative; padding: 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); counter-increment: p; }
.proc li::before { content: counter(p); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; font-size: 15px; }
.proc h3 { margin-top: 14px; font-size: 16.5px; font-weight: 800; }
.proc p { margin-top: 6px; font-size: 14.5px; color: var(--muted); }

/* ---------- Status list (eco plan) ---------- */
.status-list { display: grid; gap: 12px; }
.status-row { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.status-row h3 { flex: 1; font-size: 16px; font-weight: 700; }
.status-row .year { font-size: 14px; color: var(--muted); font-weight: 600; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--done { background: var(--green-50); color: var(--green-600); }
.badge--progress { background: var(--blue-50); color: var(--blue); }
.badge--plan { background: #eef1f5; color: var(--muted); }
.badge--warn { background: var(--amber-50); color: #b45309; }
.badge--bad { background: #ffe9ec; color: #d61f45; }

/* ---------- Two-col layout & side card ---------- */
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.prose p { margin-top: 14px; color: var(--ink-2); font-size: 16.5px; }
.prose p:first-child { margin-top: 0; }
.list-check { display: grid; gap: 12px; margin-top: 18px; }
.list-check li { position: relative; padding-left: 32px; color: var(--ink-2); }
.list-check li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 7px;
  background: var(--blue-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b5ed7' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center/14px no-repeat;
}
.side-card { padding: 28px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.org { display: grid; gap: 12px; }
.org__node { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.org__node b { display: block; font-size: 15px; }
.org__node small { color: var(--muted); font-size: 13px; }
.org__node--head { background: var(--grad); color: #fff; border-color: transparent; }
.org__node--head small { color: rgba(255, 255, 255, .85); }
.org__children { display: grid; gap: 10px; padding-left: 22px; border-left: 2px dashed var(--line-2); margin-left: 22px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fact { padding: 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.fact b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.fact span { color: var(--muted); font-size: 14px; }
.duo-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.box { padding: 30px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.box h2 { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 12px; }

/* ---------- News page ---------- */
.news--page .news-card { display: flex; flex-direction: column; }
.news--page .news-card p { flex: 1; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: grid; gap: 10px; max-width: min(380px, calc(100% - 40px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 600; font-size: 14.5px; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .45); animation: rise .3s ease; transition: opacity .3s, transform .3s; }
.toast .ic { color: #6ee08f; }
.toast--warn .ic, .toast--bad .ic { color: #ffb4c0; }
.toast.is-out { opacity: 0; transform: translateY(8px); }

/* ---------- Alerts ---------- */
.alert { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; font-weight: 600; font-size: 15px; }
.alert .ic { flex: none; }
.alert--amber { background: var(--amber-50); color: #8a5300; } .alert--amber .ic { color: var(--amber); }
.alert--red { background: #ffe9ec; color: #a3102f; } .alert--red .ic { color: #e11d48; }
.alert--green { background: var(--green-50); color: #0f5a29; } .alert--green .ic { color: var(--green-600); }
.alert--blue { background: var(--blue-50); color: #0a3f8f; } .alert--blue .ic { color: var(--blue); }

/* ---------- Quiz ---------- */
.quiz-wrap { max-width: 860px; margin-inline: auto; }
.quiz { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow); }
.quiz__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.quiz__who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.quiz__who b { display: block; font-size: 16px; }
.quiz__who small { display: block; color: var(--muted); font-size: 13.5px; }
.quiz__timer { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 14px; background: var(--blue-50); color: var(--blue); font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; flex: none; }
.quiz__timer.is-low { background: #ffe9ec; color: #d61f45; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .6; } }
.quiz__meta { display: flex; align-items: center; gap: 16px; margin-top: 20px; font-size: 14px; font-weight: 600; color: var(--muted); }
.quiz__bar { flex: 1; height: 8px; border-radius: 8px; background: var(--tint); overflow: hidden; }
.quiz__bar i { display: block; height: 100%; background: var(--grad); border-radius: inherit; transition: width .3s; }
.quiz__body { border: 0; margin: 0; padding: 0; min-width: 0; }
.quiz__q { margin-top: 18px; padding: 0; font-size: clamp(18px, 2.2vw, 22px); font-weight: 800; line-height: 1.35; letter-spacing: -.01em; }
.quiz__opts { display: grid; gap: 10px; margin-top: 20px; }
.opt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); cursor: pointer; font-size: 15.5px; transition: border-color .15s, background-color .15s; }
.opt:hover { border-color: var(--line-2); background: var(--surface-2); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt__mark { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--tint); font-weight: 800; font-size: 14px; color: var(--muted); flex: none; transition: all .15s; }
.opt.is-selected { border-color: var(--blue); background: var(--blue-50); font-weight: 600; }
.opt.is-selected .opt__mark { background: var(--blue); color: #fff; }
.opt:has(input:focus-visible) { outline: 3px solid rgba(11, 94, 215, .45); outline-offset: 2px; }
.quiz__nums { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.quiz__nums button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
.quiz__nums button.is-ans { background: var(--green-50); border-color: #bfe8cb; color: var(--green-600); }
.quiz__nums button.is-cur { background: var(--blue); border-color: var(--blue); color: #fff; }
.quiz__nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.quiz__finish { margin-left: auto; }

.quiz--result { display: grid; gap: 20px; }
.result { display: flex; align-items: center; gap: 32px; }
.result__ring { position: relative; width: 160px; height: 160px; flex: none; }
.result__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.result__ring circle { fill: none; stroke: var(--tint); stroke-width: 10; }
.result__ring .val { stroke-linecap: round; transition: stroke-dashoffset 1s; }
.result__ring.is-pass .val { stroke: var(--green); }
.result__ring.is-fail .val { stroke: #e11d48; }
.result__ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; font-weight: 800; }
.result__body { flex: 1; }
.result__body h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; }
.result__stats { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 14px; }
.result__stats li { display: flex; flex-direction: column; }
.result__stats span { font-size: 13px; color: var(--muted); }
.result__stats b { font-size: 20px; }
.result__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.result__extra { margin-top: 16px; }
.review { display: grid; gap: 10px; }
.review__item { padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); border-left: 4px solid var(--green); }
.review__item.is-bad { border-left-color: #e11d48; }
.review__q { display: flex; align-items: flex-start; gap: 12px; }
.review__q b { flex: 1; font-size: 15.5px; }
.review__q .ic { color: var(--green-600); }
.review__item.is-bad .review__q .ic { color: #e11d48; }
.review__n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--tint); font-size: 12.5px; font-weight: 800; flex: none; }
.review__item p { margin: 6px 0 0 38px; font-size: 14.5px; color: var(--ink-2); }
.review__item p span { color: var(--muted); }
.review__right { color: var(--green-600) !important; font-weight: 600; }

/* Intro card for test page */
.test-intro { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; padding: 36px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.test-intro h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.test-intro__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.test-intro__facts li { padding: 18px; border-radius: 16px; background: var(--tint); }
.test-intro__facts b { display: block; font-size: 24px; font-weight: 800; }
.test-intro__facts span { font-size: 13.5px; color: var(--muted); }
.rules { display: grid; gap: 10px; margin: 18px 0 24px; }
.rules li { display: flex; gap: 10px; color: var(--ink-2); }
.rules .ic { color: var(--green-600); margin-top: 2px; }

/* ---------- Auth (login) ---------- */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 560px; border-radius: 32px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.auth__side { position: relative; padding: 48px; background: var(--grad); color: #fff; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; overflow: hidden; }
.auth__side .cta-band__pattern { opacity: .3; }
.auth__side h2 { position: relative; font-size: clamp(26px, 3vw, 34px); font-weight: 800; }
.auth__side p { position: relative; margin-top: 12px; opacity: .9; }
.auth__side ul { position: relative; display: grid; gap: 12px; }
.auth__side li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.auth__side li .ic { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: rgba(255, 255, 255, .22); stroke-width: 3; }
.auth__form { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.auth__form h1 { font-size: 30px; font-weight: 800; }
.auth__form .form { margin-top: 24px; }
.auth__form .btn { width: 100%; }
.demo-hint { margin-top: 20px; padding: 14px 16px; border-radius: 14px; background: var(--tint); font-size: 14px; color: var(--ink-2); }
.demo-hint code { padding: 2px 6px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.pw { position: relative; }
.pw input { padding-right: 48px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 10px; }
.pw button:hover { color: var(--blue); }
.form__error { color: #d61f45; font-weight: 700; font-size: 14px; }
.form__error:empty { display: none; }

/* ---------- Cabinet ---------- */
.cab-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cab-head h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -.03em; }
.cab-head p { color: var(--muted); margin-top: 6px; }
.cab-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; margin-top: 28px; }
.panel { padding: 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.panel + .panel { margin-top: 24px; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.panel__head h2 { font-size: 20px; font-weight: 800; }
.progress { height: 10px; border-radius: 10px; background: var(--tint); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--grad); border-radius: inherit; transition: width .4s; }
.modules { display: grid; gap: 10px; margin-top: 18px; }
.module { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.module__head { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 0; background: var(--surface); text-align: left; cursor: pointer; }
.module__head:hover { background: var(--surface-2); }
.module__num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--muted); font-weight: 800; font-size: 14px; flex: none; }
.module.is-done .module__num { background: var(--green); color: #fff; }
.module.is-done .module__num .ic { width: 18px; height: 18px; stroke-width: 3; }
.module__title { flex: 1; }
.module__title b { display: block; font-size: 15.5px; line-height: 1.35; }
.module__title small { color: var(--muted); font-size: 13px; }
.module__head > .ic { color: var(--muted); transition: transform .2s; }
.module.is-open .module__head > .ic { transform: rotate(180deg); }
.module__body { display: none; padding: 4px 20px 22px 66px; }
.module.is-open .module__body { display: block; }
.module__body p { margin-top: 10px; color: var(--ink-2); font-size: 15px; }
.module__res { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.res { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--tint); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.res .ic { color: var(--blue); width: 18px; height: 18px; }
.module__body .list-check { margin-top: 14px; }
.module__body .list-check li { font-size: 14.5px; }
.module__foot { margin-top: 18px; }
.exam-box { margin-top: 20px; padding: 18px; border-radius: 16px; border: 1px dashed var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.exam-box b { display: block; }
.exam-box small { color: var(--muted); }
.kv { display: grid; gap: 12px; }
.kv li { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.kv li:last-child { border-bottom: 0; padding-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { text-align: right; }
.mini-list { display: grid; gap: 10px; }
.mini-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--tint); }
.mini-list li > div { flex: 1; min-width: 0; }
.mini-list b { display: block; font-size: 14.5px; }
.mini-list small { color: var(--muted); font-size: 13px; }
.other-courses { display: grid; gap: 10px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: var(--surface-2); font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td .muted { font-size: 13px; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; transition: all .2s; }
.icon-btn:hover { color: #d61f45; border-color: #fecdd3; background: #fff5f6; }
.icon-btn .ic { width: 18px; height: 18px; }

/* ---------- Admin ---------- */
.admin { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; }
.admin__side { position: sticky; top: calc(var(--header-h) + 20px); padding: 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.admin__nav { display: grid; gap: 2px; }
.admin__nav button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 12px; background: none;
  font-size: 14.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; text-align: left;
}
.admin__nav button:hover { background: var(--tint); }
.admin__nav button.is-active { background: var(--ink); color: #fff; }
.admin__nav button .ic { width: 19px; height: 19px; }
.admin__nav .count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--amber-50); color: #b45309; font-size: 12px; font-weight: 800; text-align: center; }
.admin__nav hr { border: 0; border-top: 1px solid var(--line); margin: 8px 4px; }
.admin__main { min-width: 0; }
.admin__main h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -.02em; }
.admin__main > p { color: var(--muted); margin-top: 6px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.kpi { padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; gap: 14px; }
.kpi b { display: block; font-size: 28px; font-weight: 800; line-height: 1.1; }
.kpi span { font-size: 13.5px; color: var(--muted); }
.admin-block { margin-top: 28px; }
.admin-block > h2 { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.admin-block > p { color: var(--muted); font-size: 14.5px; margin-bottom: 14px; }
.form-card { padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.form-card .form { margin-top: 0; }
.form__row--3 { grid-template-columns: repeat(3, 1fr); }
.form label > span small { font-weight: 500; color: var(--muted); }
.opts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt-input { display: flex; align-items: center; gap: 8px; }
.opt-input input[type="radio"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--green); flex: none; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; margin-bottom: 14px; }
.admin-mobile-nav { display: none; }

/* ---------- Contact page ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.c-card { display: flex; align-items: center; gap: 14px; padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.c-card b { display: block; }
.c-card span { color: var(--muted); font-size: 14px; }
.rating { display: flex; gap: 6px; }
.rating label { cursor: pointer; }
.rating input { position: absolute; opacity: 0; }
.rating .ic { width: 34px; height: 34px; color: #d3dcea; transition: color .15s, transform .15s; }
.rating label:hover .ic { transform: scale(1.1); }
.rating .ic.is-on { color: #f5b301; fill: #f5b301; }
.rating input:focus-visible + .ic { outline: 3px solid rgba(11, 94, 215, .45); border-radius: 6px; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 20px; }

/* ---------- Certificate ---------- */
.cert-page { display: grid; gap: 24px; justify-items: center; }
.cert {
  position: relative; width: 100%; max-width: 900px; aspect-ratio: 1.414 / 1; padding: 5.5% 6.5%; background: #fff;
  border-radius: 6px; box-shadow: var(--shadow); color: var(--ink); display: flex; flex-direction: column; overflow: hidden;
}
.cert::before { content: ""; position: absolute; inset: 14px; border: 2px solid transparent; border-radius: 4px; background: var(--grad) border-box; -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.cert::after { content: ""; position: absolute; right: -80px; bottom: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(34, 176, 79, .12), transparent 70%); pointer-events: none; }
.cert__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cert__brand { display: flex; align-items: center; gap: 12px; }
.cert__brand .brand__mark { width: 56px; height: 56px; }
.cert__brand .brand__mark img { width: 88px; height: 88px; left: -16px; top: -8px; }
.cert__brand b { display: block; font-size: 15px; }
.cert__brand small { color: var(--green-600); font-weight: 700; font-size: 12px; }
.cert__no { text-align: right; font-size: 12px; color: var(--muted); }
.cert__no b { display: block; color: var(--ink); font-size: 15px; letter-spacing: .04em; }
.cert__center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.cert__title { font-size: clamp(28px, 5vw, 54px); font-weight: 800; letter-spacing: .14em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cert__sub { margin-top: 4px; font-size: clamp(11px, 1.3vw, 14px); color: var(--muted); }
.cert__name { margin-top: 3%; font-size: clamp(22px, 3.6vw, 38px); font-weight: 800; letter-spacing: -.02em; }
.cert__role { color: var(--muted); font-size: clamp(12px, 1.4vw, 15px); }
.cert__text { margin-top: 2.5%; max-width: 620px; font-size: clamp(11px, 1.4vw, 15px); color: var(--ink-2); }
.cert__score { display: inline-flex; gap: 8px; margin-top: 2.5%; padding: 8px 18px; border-radius: 999px; background: var(--green-50); color: var(--green-600); font-weight: 800; font-size: clamp(12px, 1.5vw, 16px); }
.cert__bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; font-size: clamp(10px, 1.2vw, 13px); color: var(--muted); }
.cert__bottom b { color: var(--ink); }
.cert__sign { text-align: center; min-width: 30%; }
.cert__sign i { display: block; height: 1px; background: var(--ink-2); margin-bottom: 6px; }
.cert__qr { width: clamp(64px, 11vw, 104px); height: clamp(64px, 11vw, 104px); padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.cert__qr img, .cert__qr canvas { width: 100% !important; height: 100% !important; }
.cert-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.verify--page { max-width: 640px; width: 100%; }

@media print {
  @page cert { size: A4 landscape; margin: 0; }
  body[data-page="cert"] { page: cert; }
  body { background: #fff; }
  .header, .footer, .skip, .page-hero, .cert-actions, .toasts, .no-print { display: none !important; }
  .section { padding: 0 !important; }
  .container { width: 100% !important; }
  .cert { max-width: none; width: 297mm; height: 210mm; aspect-ratio: auto; box-shadow: none; border-radius: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* the masked gradient frame is not masked when printing (it covered the whole sheet): use border-image instead */
  .cert::before { background: none; -webkit-mask: none; mask: none; border: 2px solid; border-image: var(--grad) 1; border-radius: 0; }
}

/* ---------- Responsive (inner pages) ---------- */
@media (max-width: 1120px) {
  .books { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .page-hero__icon { width: 68px; height: 68px; border-radius: 20px; }
  .page-hero__icon .ic { width: 32px; height: 32px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .proc { grid-template-columns: 1fr 1fr; }
  .split, .cab-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .test-intro { grid-template-columns: 1fr; padding: 28px; }
  .auth { grid-template-columns: 1fr; }
  .auth__side { padding: 32px; }
  .auth__form { padding: 32px; }
  .admin { grid-template-columns: 1fr; }
  .admin__side { display: none; }
  .admin-mobile-nav { display: block; margin-bottom: 20px; }
  .admin-mobile-nav select { width: 100%; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .page-hero { padding: 36px 0 44px; }
  .page-hero__icon { display: none; }
  .cards, .books, .proc, .duo-cards, .facts { grid-template-columns: 1fr; }
  .books { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .books .card__foot { flex-wrap: wrap; }
  .books .card { padding: 12px; }
  .books .card h3 { font-size: 14px; }
  .book-cover { padding: 14px; }
  .book-cover b { font-size: 14px; }
  .doc { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; }
  .doc .btn { width: 100%; }
  .status-row { flex-wrap: wrap; gap: 8px 12px; }
  .status-row h3 { flex-basis: 100%; order: -1; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search { max-width: none; flex: none; width: 100%; }
  .toolbar select { width: 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .chip-btn { flex: none; }
  .quiz { padding: 18px; border-radius: 22px; }
  .quiz__head { flex-wrap: wrap; }
  .quiz__timer { font-size: 17px; padding: 8px 12px; }
  .opt { padding: 12px; font-size: 14.5px; gap: 10px; }
  .quiz__nums button { width: 32px; height: 32px; }
  .quiz__nav .btn { flex: 1; }
  .quiz__finish { flex-basis: 100% !important; margin-left: 0; }
  .result { flex-direction: column; text-align: center; gap: 18px; }
  .result__stats, .result__actions { justify-content: center; }
  .review__item p { margin-left: 0; }
  .module__body { padding: 4px 16px 18px; }
  .panel, .box, .side-card { padding: 20px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .kpi b { font-size: 24px; }
  .form__row--3, .opts-grid { grid-template-columns: 1fr; }
  .cert { aspect-ratio: auto; min-height: 520px; padding: 28px 22px; }
  .cert__top { flex-direction: column; align-items: flex-start; }
  .cert__no { text-align: left; }
  .cert__center { padding: 24px 0; }
  .cert__bottom { flex-wrap: wrap; }
  .auth { border-radius: 24px; }
  .auth__side { padding: 26px; }
  .auth__form { padding: 26px 20px; }
  .toasts { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}

/* ---------- Soft gradient backgrounds (were inline styles) ---------- */
.section--soft { background: linear-gradient(180deg, #eef5ff 0%, var(--bg) 420px); }
.side-card--soft { background: linear-gradient(160deg, #f1fbf4, #eef5ff); }

/* ---------- Theme toggle (header) ---------- */
.theme-btn { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; flex: none; transition: color .2s, border-color .2s, background-color .2s; }
.theme-btn:hover { color: var(--blue); border-color: var(--blue); }
.theme-btn .ic--sun { display: none; }
[data-theme="dark"] .theme-btn .ic--sun { display: block; }
[data-theme="dark"] .theme-btn .ic--moon { display: none; }

/* =========================================================
   Night mode: <html data-theme="dark">
   Set before paint by the small script in each page <head>;
   toggled by the header button (core.js), saved in localStorage.
   ========================================================= */
[data-theme="dark"] {
  color-scheme: dark;
  --blue: #4c95ff;
  --blue-600: #6aa8ff;
  --blue-50: rgba(76, 149, 255, .14);
  --green: #2fc25e;
  --green-600: #4fd47b;
  --green-50: rgba(47, 194, 94, .14);
  --amber: #fbb33c;
  --amber-50: rgba(251, 179, 60, .14);
  --ink: #e7edf6;
  --ink-2: #c2cede;
  --muted: #8d9db4;
  --line: #233149;
  --line-2: #33446a;
  --bg: #0a111f;
  --tint: #0f1829;
  --surface: #121c2f;
  --surface-2: #0f1828;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, .35);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);
}
[data-theme="dark"] body { transition: background-color .3s, color .3s; }
[data-theme="dark"] .header { background: rgba(10, 17, 31, .82); }
[data-theme="dark"] .header.is-scrolled { box-shadow: 0 6px 24px -14px rgba(0, 0, 0, .8); }
[data-theme="dark"] .hero__bg { background: linear-gradient(180deg, #0d1830 0%, var(--bg) 85%); }
[data-theme="dark"] .blob { opacity: .22; }
[data-theme="dark"] .grid-lines { background-image: linear-gradient(rgba(76, 149, 255, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(76, 149, 255, .08) 1px, transparent 1px); }
[data-theme="dark"] .mock { box-shadow: var(--shadow), 0 0 0 8px rgba(255, 255, 255, .03); }
[data-theme="dark"] .float { background: rgba(18, 28, 47, .92); }
[data-theme="dark"] .page-hero { background: linear-gradient(180deg, #0d1830 0%, var(--bg) 100%); }
[data-theme="dark"] .verify { background: linear-gradient(160deg, #0e2219 0%, #0e1a33 100%); }
[data-theme="dark"] .section--soft { background: linear-gradient(180deg, #0d1830 0%, var(--bg) 420px); }
[data-theme="dark"] .side-card--soft { background: linear-gradient(160deg, #0e2219, #0e1a33); }
[data-theme="dark"] .footer { background: #060c17; border-top: 1px solid var(--line); }

/* Dark text on light status backgrounds → light text on tinted backgrounds */
[data-theme="dark"] .badge-card, [data-theme="dark"] .form__status, [data-theme="dark"] .alert--green { color: #8ce6aa; }
[data-theme="dark"] .note-box, [data-theme="dark"] .alert--amber { color: #fcd38a; }
[data-theme="dark"] .chip--amber, [data-theme="dark"] .badge--warn, [data-theme="dark"] .admin__nav .count { color: #fbc26a; }
[data-theme="dark"] .alert--blue { color: #a9cbff; }
[data-theme="dark"] .alert--red { background: rgba(225, 29, 72, .14); color: #ff9aac; }
[data-theme="dark"] .badge--bad, [data-theme="dark"] .quiz__timer.is-low { background: rgba(225, 29, 72, .16); color: #ff8da1; }
[data-theme="dark"] .badge--plan { background: var(--tint); }
[data-theme="dark"] .form__error { color: #ff8da1; }
[data-theme="dark"] .verify__result.is-ok, [data-theme="dark"] .mock__nums .ok, [data-theme="dark"] .quiz__nums button.is-ans { border-color: rgba(47, 194, 94, .4); }
[data-theme="dark"] .verify__result.is-bad { border-color: rgba(225, 29, 72, .45); }
[data-theme="dark"] .icon-btn:hover { background: rgba(225, 29, 72, .12); border-color: rgba(225, 29, 72, .45); color: #ff8da1; }
[data-theme="dark"] .rating .ic { color: #3a4a66; }

/* Elements that used dark ink as a background */
[data-theme="dark"] .chip-btn.is-active, [data-theme="dark"] .admin__nav button.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
[data-theme="dark"] .toast, [data-theme="dark"] .skip { background: #1d2b46; color: #fff; border: 1px solid var(--line-2); }

/* Images: a touch dimmer so they do not glare */
[data-theme="dark"] .news-card__img img, [data-theme="dark"] .quiz__img img, [data-theme="dark"] .review__img { filter: brightness(.92); }

/* The certificate is a paper document: always light */
[data-theme="dark"] .cert {
  --ink: #0c1a2e; --ink-2: #33445c; --muted: #5d6e86; --line: #e2e9f2;
  --green-50: #e7f8ec; --green-600: #178f3e; --tint: #f3f7fc;
  color: var(--ink);
}
@media print {
  [data-theme="dark"] { color-scheme: light; }
  [data-theme="dark"] body { background: #fff; }
}
/* ---------- Document reader (hujjat.html) ---------- */
.page-hero--doc h1 { font-size: clamp(26px, 3.4vw, 40px); max-width: 860px; }
.section--reader { padding-top: 40px; }
.doc__body h3 a { color: inherit; }
.doc__body h3 a:hover { color: var(--blue); }
.ic--up { transform: rotate(180deg); }
.reader { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
.reader--single { grid-template-columns: minmax(0, 1fr); }
.reader__toc { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow: auto; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.reader__toc summary { display: flex; align-items: center; gap: 10px; padding: 6px 8px; font-weight: 800; cursor: pointer; list-style: none; }
.reader__toc summary::-webkit-details-marker { display: none; }
.reader__toc summary small { margin-left: auto; color: var(--muted); font-weight: 700; }
.reader__toc nav { display: grid; gap: 2px; margin-top: 8px; }
.reader__toc nav a { display: block; padding: 7px 10px; border-radius: 10px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.reader__toc nav a:hover { background: var(--blue-50); color: var(--blue); }
.reader__bar { position: sticky; top: calc(var(--header-h) + 8px); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; margin-bottom: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.reader__find { flex: 1; min-width: 220px; max-width: 420px; }
.reader__find input { padding-right: 64px; }
.reader__count { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 700; color: var(--muted); }
.reader__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.reader__text { padding: clamp(22px, 4vw, 48px); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); font-size: 16.5px; line-height: 1.75; color: var(--ink-2); max-width: 900px; }
.reader__text p { margin: 0 0 .9em; text-align: justify; hyphens: auto; }
.reader__text h2 { margin: 1.8em 0 .8em; padding-top: .4em; font-size: 20px; line-height: 1.35; color: var(--ink); text-align: center; scroll-margin-top: calc(var(--header-h) + 90px); }
.reader__text h3 { margin: 1.5em 0 .6em; font-size: 17px; line-height: 1.4; color: var(--ink); scroll-margin-top: calc(var(--header-h) + 90px); }
.reader__text > :first-child { margin-top: 0; }
.reader__text mark { background: #fde68a; color: #0c1a2e; border-radius: 3px; padding: 0 1px; }
.reader__text mark.is-cur { background: #f59e0b; box-shadow: 0 0 0 2px #f59e0b; }
.reader__pdf { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--tint); }
.reader__pdf iframe { display: block; width: 100%; height: 80vh; min-height: 520px; border: 0; }
.pdf-chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--tint); border: 1px solid var(--line); font-weight: 700; font-size: 14px; max-width: 100%; overflow: hidden; }
.pdf-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
textarea.doc-text { font-size: 14px; line-height: 1.55; min-height: 180px; resize: vertical; }
@media (max-width: 980px) {
  .reader { grid-template-columns: 1fr; gap: 14px; }
  .reader__toc { position: static; max-height: none; }
  .reader__toc nav { max-height: 50vh; overflow: auto; }
  .reader__text { font-size: 16px; }
  .reader__text p { text-align: left; }
}
@media (max-width: 640px) {
  .reader__bar { position: static; }
  .reader__find { min-width: 0; max-width: none; flex-basis: 100%; }
}
[data-theme="dark"] .reader__text mark { background: #b7791f; color: #fff; }
[data-theme="dark"] .reader__text mark.is-cur { background: #f59e0b; color: #0c1a2e; }
@media print {
  body[data-page="doc"] .page-hero { display: block !important; padding: 0 0 12px; background: none; border: 0; }
  body[data-page="doc"] .page-hero__icon, body[data-page="doc"] .crumbs, body[data-page="doc"] .hero__bg { display: none !important; }
  .reader { display: block; }
  .reader__toc, .reader__bar, .alert { display: none !important; }
  .reader__text { border: 0; padding: 0; max-width: none; font-size: 12pt; background: none; }
}
/* =========================================================
   Motion (2026-12): light animations on top of the existing design.
   200–600 ms; all switched off by the prefers-reduced-motion block above
   (it sets animation/transition to none for every element).
   ========================================================= */
@keyframes mm-page-in { from { opacity: 0; } to { opacity: 1; } }
body { animation: mm-page-in .35s ease-out backwards; }

/* hover: buttons and cards lift slightly */
.btn--ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.doc { transition: border-color .2s, box-shadow .2s, transform .25s; }
.doc:hover { transform: translateY(-2px); }
.benefit { transition: border-color .2s, box-shadow .2s, transform .25s; }
.benefit:hover { transform: translateY(-3px); }
.step { transition: transform .25s, box-shadow .25s; }
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.opt { transition: border-color .15s, background-color .15s, transform .2s; }
.opt:hover { transform: translateY(-1px); }

/* sign-in form: wrong login/password → short shake; sending → spinner in the button */
@keyframes mm-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}
.is-shake { animation: mm-shake .42s ease-in-out; border-color: #e11d48; }
@keyframes mm-spin { to { transform: rotate(360deg); } }
.btn.is-loading { opacity: 1; cursor: progress; }
.btn.is-loading .ic { display: none; }
.btn.is-loading::before {
  content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: mm-spin .7s linear infinite;
}
.form__error:not(:empty) { animation: rise .3s ease; }

/* quiz: the next question slides in, the previous one from the other side */
@keyframes mm-q-next { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes mm-q-prev { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.quiz__body.is-enter { animation: mm-q-next .32s ease-out both; }
.quiz__body.is-enter-prev { animation: mm-q-prev .32s ease-out both; }
.quiz__bar i { transition: width .45s cubic-bezier(.2, .7, .3, 1); }
.quiz--result .result { animation: rise .4s ease-out both; }
@media print { .reveal { opacity: 1 !important; transform: none !important; } body { animation: none; } }
