/* =========================================================
   РетроРозетка — интерактивный курс
   ========================================================= */

:root {
  --cream: #f4efe4;
  --cream-deep: #ebe3d3;
  --paper: #fffaf0;
  --paper-2: #fbf5e9;
  --ink: #1e1b16;
  --ink-soft: #4f483e;
  --muted: #786f61;
  --line: #d9d0c0;
  --line-soft: #e9e1d3;
  --accent: #e94b2c;
  --accent-dark: #c33a1e;
  --accent-soft: #fbe4dc;
  --teal: #116055;
  --teal-light: #1a7a6b;
  --teal-soft: #dceee8;
  --gold: #f3b73f;
  --gold-soft: #fbeccb;
  --green: #2f7d55;
  --green-soft: #e0f0e6;
  --red: #c63b2a;
  --red-soft: #f8e2de;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Unbounded", "Manrope", system-ui, sans-serif;
  --radius: 24px;
  --shadow-card: 0 1px 0 rgba(30, 27, 22, .04), 0 18px 40px -30px rgba(30, 27, 22, .55);
  --shadow-hard: 4px 4px 0 var(--ink);
  --header-h: 76px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 88% -12%, rgba(243, 183, 63, .22), transparent 62%),
    radial-gradient(900px 560px at -8% 18%, rgba(17, 96, 85, .10), transparent 58%),
    var(--cream);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(30, 27, 22, .13) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: .3;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
}

body.modal-open { overflow: hidden; }

::selection { background: var(--gold); color: var(--ink); }

img, svg { display: block; max-width: 100%; }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }

h1, h2, h3, h4, p, figure { margin: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.04;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
}
.skip-link:focus { top: 16px; }

.noscript {
  padding: 14px 20px;
  background: var(--gold);
  color: var(--ink);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

/* ---------- Прогресс-рейка ---------- */

.progress-rail {
  position: fixed;
  inset: 0 0 auto 0;
  height: 4px;
  z-index: 60;
  background: transparent;
}
.progress-rail__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width .6s cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Хедер ---------- */

.site-header {
  position: fixed;
  inset: 4px 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(18px, 4vw, 52px);
  background: rgba(244, 239, 228, .82);
  border-bottom: 1px solid rgba(30, 27, 22, .10);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand__mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.brand:hover .brand__mark { transform: rotate(-7deg) scale(1.04); }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.03em;
}
.brand__sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--muted);
  margin-top: 3px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 32px);
}
.site-nav a {
  position: relative;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink-soft);
  padding: 6px 0;
  transition: color .2s;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transition: right .25s cubic-bezier(.2, .8, .2, 1);
}
.site-nav a:hover,
.site-nav a.is-active { color: var(--ink); }
.site-nav a:hover::after,
.site-nav a.is-active::after { right: 0; }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 9px 9px 18px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .2s, box-shadow .2s;
  white-space: nowrap;
}
.header-cta:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.header-cta__score {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 11px;
  letter-spacing: .04em;
}

/* ---------- Кнопки, бейджи ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s, background .18s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-hard);
}
.btn--primary:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); background: #f05a3b; }
.btn--primary:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn--ghost { background: var(--paper); color: var(--ink); }
.btn--ghost:hover { background: var(--gold); transform: translateY(-2px); }
.btn--dark {
  background: var(--ink);
  color: var(--cream);
  box-shadow: 4px 4px 0 rgba(30, 27, 22, .18);
}
.btn--dark:hover { transform: translate(-2px, -2px); background: #2c2820; }
.btn--small { min-height: 42px; padding: 0 18px; font-size: 13px; }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: #ffc957; transform: translate(-2px, -2px); }
.btn[disabled] { opacity: .55; pointer-events: none; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px;
  border: 1px solid rgba(30, 27, 22, .22);
  border-radius: 999px;
  background: rgba(255, 250, 240, .7);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(233, 75, 44, .5);
  animation: dotPulse 2.4s infinite;
}
.eyebrow--ghost {
  border-color: rgba(244, 239, 228, .28);
  background: rgba(255, 255, 255, .06);
  color: rgba(244, 239, 228, .75);
}
.eyebrow--ghost .eyebrow__dot { background: var(--gold); }

@keyframes dotPulse {
  0% { box-shadow: 0 0 0 0 rgba(233, 75, 44, .5); }
  60% { box-shadow: 0 0 0 7px rgba(233, 75, 44, 0); }
  100% { box-shadow: 0 0 0 0 rgba(233, 75, 44, 0); }
}

/* ---------- Hero ---------- */

.hero {
  max-width: 1320px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 88px) clamp(20px, 4.5vw, 56px) 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, .84fr);
  align-items: center;
  gap: clamp(32px, 4.4vw, 64px);
}

.hero__copy { max-width: 740px; }

.hero h1 {
  margin: 26px 0 24px;
  font-size: clamp(44px, 5.35vw, 78px);
  line-height: .97;
  letter-spacing: -.055em;
}
.hero h1 em {
  font-style: normal;
  position: relative;
  background: linear-gradient(transparent 61%, var(--gold) 61%, var(--gold) 92%, transparent 92%);
  padding: 0 .02em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hero__lead {
  max-width: 560px;
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.65;
  color: var(--ink-soft);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 32px;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 30px;
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--muted);
}
.hero__meta span { display: inline-flex; align-items: baseline; gap: 6px; }
.hero__meta b {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ink);
}

.hero__visual {
  position: relative;
  width: 100%;
  max-width: 600px;
  justify-self: end;
}

.socket-stage {
  position: relative;
  padding: 14px;
  border: 1.5px solid var(--ink);
  border-radius: 34px;
  background: var(--paper);
  box-shadow: 12px 14px 0 rgba(30, 27, 22, .09);
  transform: rotate(1.2deg);
}
.hero-socket {
  width: 100%;
  height: auto;
  border-radius: 24px;
  overflow: hidden;
}

.plug-group {
  transform-origin: 282px 90px;
  animation: plugFloat 5.5s ease-in-out infinite;
}
@keyframes plugFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(-1.2deg); }
}
.sparks { animation: sparkFlicker 2.8s steps(1) infinite; }
@keyframes sparkFlicker {
  0%, 44%, 100% { opacity: .15; }
  46%, 58% { opacity: 1; }
  60%, 72% { opacity: .35; }
}

.sticker {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
  box-shadow: 3px 3px 0 var(--ink);
  pointer-events: none;
}
.sticker--amp {
  top: -20px;
  left: -18px;
  padding: 14px 20px;
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  background: var(--gold);
  font-size: 26px;
  transform: rotate(-7deg);
}
.sticker--volt {
  top: 18%;
  right: -22px;
  width: 76px;
  height: 76px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 19px;
  transform: rotate(8deg);
}
.sticker--type {
  bottom: -18px;
  left: 10%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 9px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: .15em;
  text-align: center;
  transform: rotate(-3deg);
}
.sticker--type b { color: var(--gold); font-size: 12px; letter-spacing: .08em; }

/* ---------- Бегущая строка ---------- */

.ticker {
  width: 104%;
  margin-left: -2%;
  transform: rotate(-1.1deg);
  background: var(--ink);
  color: var(--cream);
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  overflow: hidden;
  padding: 14px 0;
}
.ticker__track {
  display: flex;
  align-items: center;
  gap: 26px;
  width: max-content;
  animation: marquee 42s linear infinite;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ticker__track span { white-space: nowrap; }
.ticker__track i { color: var(--gold); font-style: normal; }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Миссии ---------- */

.missions {
  max-width: 1320px;
  margin: clamp(64px, 8vw, 108px) auto 0;
  padding: clamp(28px, 4vw, 46px);
  border-radius: 32px;
  background:
    radial-gradient(700px 400px at 90% 0%, rgba(243, 183, 63, .13), transparent 60%),
    var(--ink);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}
.missions::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(244, 239, 228, .11) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .5;
  pointer-events: none;
}
.missions > * { position: relative; z-index: 1; }

.missions__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.missions h2 {
  margin-top: 16px;
  font-size: clamp(28px, 3.4vw, 42px);
  color: var(--cream);
}
.missions__progress { width: min(100%, 320px); }
.missions__count {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: .02em;
}
.missions__bar {
  height: 9px;
  margin: 9px 0 10px;
  border-radius: 99px;
  background: rgba(244, 239, 228, .16);
  overflow: hidden;
}
.missions__bar-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width .6s cubic-bezier(.2, .8, .2, 1);
}
.missions__progress p {
  font-size: 12px;
  color: rgba(244, 239, 228, .6);
  line-height: 1.45;
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.mission-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 176px;
  padding: 18px 17px;
  border: 1px solid rgba(244, 239, 228, .2);
  border-radius: 18px;
  background: rgba(255, 255, 255, .055);
  text-decoration: none;
  transition: background .25s, border-color .25s, transform .25s;
  overflow: hidden;
}
.mission-card:hover {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(244, 239, 228, .45);
  transform: translateY(-4px);
}
.mission-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.mission-card__num {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .1em;
  color: rgba(244, 239, 228, .45);
}
.mission-card__state {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(244, 239, 228, .28);
  font-size: 12px;
  font-weight: 800;
  color: rgba(244, 239, 228, .55);
}
.mission-card__state svg { width: 13px; height: 13px; }
.mission-card h3 {
  font-size: 16px;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--cream);
  margin-top: auto;
}
.mission-card p {
  font-size: 11.5px;
  line-height: 1.4;
  color: rgba(244, 239, 228, .58);
}
.mission-card__time {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: .8;
}
.mission-card.is-done {
  background: rgba(243, 183, 63, .12);
  border-color: rgba(243, 183, 63, .55);
}
.mission-card.is-done .mission-card__state {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}
.mission-card.is-done .mission-card__num { color: var(--gold); }

/* ---------- Общие секции ---------- */

.module {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(76px, 9vw, 124px) clamp(20px, 4.5vw, 56px);
}
.module + .module { padding-top: 0; }

.section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 46px); }
.section-head__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.section-head__eyebrow span {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0;
}
.section-head h2 {
  font-size: clamp(34px, 4.4vw, 58px);
  margin-bottom: 16px;
}
.section-head p {
  max-width: 640px;
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.65;
  color: var(--ink-soft);
}

.reveal {
  opacity: 1;
  transform: none;
}
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Анатомия ---------- */

.anatomy-card {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  border: 1.5px solid var(--ink);
  border-radius: 32px;
  background: var(--paper);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.anatomy-card__visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 3vw, 38px);
  background:
    radial-gradient(480px 380px at 50% 42%, rgba(243, 183, 63, .14), transparent 70%),
    var(--paper-2);
  border-right: 1.5px dashed var(--line);
}
.anatomy-svg-wrap {
  width: 100%;
  max-width: 470px;
  aspect-ratio: 1;
}
.anatomy-svg { width: 100%; height: 100%; }
.anatomy-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}
.anatomy-hint__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(233, 75, 44, .16);
}
kbd {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--paper);
}

.part-visual { transition: opacity .3s, filter .3s; }
.anatomy-svg.has-selection .part-visual { opacity: .42; }
.anatomy-svg.has-selection .part-visual.is-active {
  opacity: 1;
  filter: drop-shadow(0 0 12px rgba(233, 75, 44, .55));
}
.hotspot { cursor: pointer; outline: none; }
.hotspot__hit { fill: transparent; }
.hotspot .hotspot__pulse {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  opacity: .5;
  transform-box: fill-box;
  transform-origin: center;
  animation: hotspotPulse 2.6s ease-out infinite;
}
.hotspot .hotspot__dot {
  fill: var(--accent);
  stroke: var(--ink);
  stroke-width: 2;
  transition: fill .2s, stroke .2s;
}
.hotspot .hotspot__num {
  fill: #fff;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  user-select: none;
}
.hotspot:hover .hotspot__dot { fill: var(--gold); stroke: var(--ink); }
.hotspot.is-seen .hotspot__dot { fill: var(--teal); }
.hotspot.is-selected .hotspot__dot { fill: var(--ink); stroke: var(--gold); stroke-width: 3; }
.hotspot.is-selected .hotspot__num { fill: var(--gold); }
.hotspot:focus-visible .hotspot__dot { stroke: var(--gold); stroke-width: 4; }
@keyframes hotspotPulse {
  0% { opacity: .55; transform: scale(.65); }
  70%, 100% { opacity: 0; transform: scale(1.45); }
}

.anatomy-panel {
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 3.4vw, 44px);
}
.anatomy-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.anatomy-panel__index {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--accent);
}
.anatomy-panel__seen {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  color: var(--muted);
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.anatomy-panel__title {
  font-size: clamp(25px, 2.6vw, 34px);
  margin-bottom: 14px;
}
.anatomy-panel__text {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.anatomy-panel__tip {
  position: relative;
  margin-top: 22px;
  padding: 16px 18px 16px 20px;
  border-radius: 14px;
  background: var(--gold-soft);
  border-left: 4px solid var(--gold);
  font-size: 13.5px;
  line-height: 1.55;
  color: #5b4a26;
}
.anatomy-panel__tip b {
  display: block;
  font-size: 10px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #8a6b1f;
  margin-bottom: 5px;
}
.anatomy-panel__nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 26px;
}
.anatomy-panel__progress {
  flex: 1;
  height: 5px;
  border-radius: 100px;
  background: var(--line-soft);
  overflow: hidden;
}
.anatomy-panel__progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--teal);
  transition: width .4s;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { background: var(--gold); transform: translateY(-2px); }
.anatomy-empty__title {
  font-size: clamp(26px, 2.8vw, 36px);
  margin: 18px 0 14px;
}
.anatomy-empty__text {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
  max-width: 340px;
}
.anatomy-empty__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 24px;
}
.anatomy-empty__chips span {
  font-size: 11px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--paper-2);
}
.mission-done-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}
.mission-done-badge svg { width: 15px; height: 15px; }

/* ---------- Типы вилок ---------- */

.types-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  border: 1.5px solid var(--line);
  background: rgba(255, 250, 240, .7);
  color: var(--ink-soft);
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.chip:hover { border-color: var(--ink); transform: translateY(-1px); }
.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}
.types-count {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--muted);
  padding: 8px 14px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  white-space: nowrap;
}
.types-count.is-done {
  color: var(--teal);
  border-color: rgba(17, 96, 85, .35);
  background: var(--teal-soft);
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.type-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 16px 18px;
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  background: var(--paper);
  cursor: pointer;
  text-align: left;
  transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s, background .22s;
  box-shadow: 0 2px 0 rgba(30, 27, 22, .04);
  overflow: hidden;
}
.type-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(220px 160px at 80% 0%, rgba(243, 183, 63, .18), transparent 70%);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.type-card:hover {
  transform: translateY(-4px);
  box-shadow: 5px 7px 0 rgba(30, 27, 22, .09);
}
.type-card:hover::before { opacity: 1; }
.type-card.is-viewed { background: #fffdf7; }
.type-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.type-card__letter {
  display: inline-grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}
.type-card__ground {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--teal);
}
.type-card__ground svg { width: 14px; height: 14px; }
.type-card__ground.is-empty { color: var(--muted); opacity: .55; }
.type-card__face {
  width: 100%;
  display: grid;
  place-items: center;
  padding: 8px 0 4px;
}
.type-card__face svg {
  width: 92px;
  height: 92px;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.type-card:hover .type-card__face svg { transform: scale(1.06) rotate(-2deg); }
.type-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.type-card__country {
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--muted);
}
.type-card__check {
  position: absolute;
  top: 13px;
  right: 13px;
  display: none;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
}
.type-card__check svg { width: 12px; height: 12px; }
.type-card.is-viewed .type-card__check { display: grid; }
.type-card.is-viewed .type-card__ground { display: none; }
.type-card.is-viewed .type-card__letter { background: var(--teal); }

/* ---------- Диалог типа ---------- */

.type-dialog {
  width: min(860px, calc(100% - 28px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink);
}
.type-dialog::backdrop {
  background: rgba(24, 21, 17, .58);
  backdrop-filter: blur(5px);
}
.type-dialog__card {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 34px);
  padding: clamp(24px, 4vw, 40px);
  border: 1.5px solid var(--ink);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: 12px 12px 0 rgba(30, 27, 22, .18);
  animation: dialogIn .3s cubic-bezier(.2, .8, .2, 1);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
@keyframes dialogIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.type-dialog__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s, transform .2s;
}
.type-dialog__close:hover { background: var(--accent); color: #fff; transform: rotate(90deg); }
.type-dialog__close svg { width: 15px; height: 15px; }
.type-dialog__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 22px;
  border-radius: 22px;
  background:
    radial-gradient(260px 220px at 50% 40%, rgba(243, 183, 63, .2), transparent 70%),
    var(--paper-2);
  border: 1px solid var(--line-soft);
}
.type-dialog__face { width: 190px; height: 190px; }
.type-dialog__ground {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
}
.type-dialog__ground.is-empty { background: var(--cream-deep); color: var(--muted); }
.type-dialog__ground svg { width: 13px; height: 13px; }
.type-dialog__kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.type-dialog h3 {
  font-size: clamp(26px, 3vw, 36px);
  margin: 7px 0 4px;
  padding-right: 40px;
}
.type-dialog__countries {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 18px;
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 18px;
}
.spec {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
}
.spec dt {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}
.spec dd {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
}
.type-dialog__note {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.type-dialog__note b { color: var(--ink); }

/* ---------- Игровые карточки ---------- */

.game-shell {
  border: 1.5px solid var(--ink);
  border-radius: 32px;
  background: var(--paper);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px clamp(20px, 3.4vw, 36px);
  background: var(--ink);
  color: var(--cream);
}
.game-kicker {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
}
.game-dots { display: flex; align-items: center; gap: 7px; }
.game-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(244, 239, 228, .22);
  transition: background .25s, transform .25s;
}
.game-dot.is-current { background: var(--gold); transform: scale(1.3); }
.game-dot.is-done { background: #5ec49a; }

.scenario-card { padding: clamp(24px, 4vw, 46px); }
.scenario-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
}
.scenario-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 18px;
  background: var(--gold-soft);
}
.scenario-icon svg { width: 36px; height: 36px; }
.scenario-head h3 {
  font-size: clamp(24px, 3vw, 36px);
  margin-bottom: 8px;
}
.scenario-situation {
  max-width: 760px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.options {
  display: grid;
  gap: 9px;
  max-width: 900px;
  margin-top: 26px;
}
.option {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  width: 100%;
  padding: 15px 17px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--paper-2);
  text-align: left;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s, color .18s;
}
.option:hover:not(:disabled) {
  border-color: var(--ink);
  background: #fff;
  transform: translateX(3px);
}
.option:disabled { cursor: default; }
.option__key {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: -1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  background: var(--paper);
  transition: background .18s, border-color .18s;
}
.option:hover:not(:disabled) .option__key { background: var(--gold); border-color: var(--ink); }
.option.is-correct {
  border-color: var(--green);
  background: var(--green-soft);
  color: #1e5b3d;
}
.option.is-correct .option__key { background: var(--green); border-color: var(--green); color: #fff; }
.option.is-wrong {
  border-color: var(--red);
  background: var(--red-soft);
  color: #8f2a1d;
}
.option.is-wrong .option__key { background: var(--red); border-color: var(--red); color: #fff; }
.option.is-muted { opacity: .5; }

.feedback {
  max-width: 900px;
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 15px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  animation: feedbackIn .28s cubic-bezier(.2, .8, .2, 1);
}
.feedback.is-correct { border-left-color: var(--green); background: var(--green-soft); }
.feedback__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 5px;
}
.feedback__title svg { width: 16px; height: 16px; }
.feedback p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 820px;
}
.feedback__next { margin-top: 14px; }
@keyframes feedbackIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.game-complete {
  padding: clamp(28px, 4vw, 52px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.game-complete__mark {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  margin-bottom: 20px;
  box-shadow: 0 0 0 10px var(--teal-soft);
}
.game-complete__mark svg { width: 30px; height: 30px; }
.game-complete h3 { font-size: clamp(25px, 3.2vw, 38px); margin-bottom: 10px; }
.game-complete p { max-width: 520px; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.game-complete__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.game-complete__recap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.game-complete__recap span {
  font-size: 11px;
  font-weight: 700;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
}

/* ---------- Мифы ---------- */

.myth-shell {
  position: relative;
  border-radius: 32px;
  background:
    radial-gradient(720px 420px at 85% -10%, rgba(233, 75, 44, .18), transparent 60%),
    var(--ink);
  color: var(--cream);
  padding: clamp(26px, 4vw, 48px);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.myth-shell::after {
  content: "?";
  position: absolute;
  right: -22px;
  bottom: -90px;
  font-family: var(--font-display);
  font-size: 340px;
  font-weight: 700;
  line-height: 1;
  color: rgba(244, 239, 228, .045);
  pointer-events: none;
}
.myth-shell > * { position: relative; z-index: 1; }
.myth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.myth-top__left { display: flex; align-items: center; gap: 14px; }
.myth-score {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(244, 239, 228, .6);
}
.myth-score b { color: var(--gold); font-size: 14px; }
.myth-progress {
  display: flex;
  gap: 6px;
}
.myth-progress span {
  width: 24px;
  height: 4px;
  border-radius: 10px;
  background: rgba(244, 239, 228, .18);
}
.myth-progress span.is-done { background: var(--gold); }
.myth-progress span.is-current { background: var(--accent); }

.myth-body { max-width: 840px; margin: clamp(28px, 5vw, 52px) auto 0; }
.myth-label {
  font-family: var(--font-display);
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.myth-statement {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.6vw, 40px);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -.03em;
  color: var(--cream);
  min-height: 2.4em;
}
.myth-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 30px;
}
.myth-btn {
  flex: 1 1 150px;
  min-height: 58px;
  padding: 0 24px;
  border: 1.5px solid rgba(244, 239, 228, .4);
  border-radius: 15px;
  background: rgba(255, 255, 255, .06);
  color: var(--cream);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s, color .2s;
}
.myth-btn:hover:not(:disabled) {
  background: var(--cream);
  color: var(--ink);
  border-color: var(--cream);
  transform: translateY(-2px);
}
.myth-btn:disabled { cursor: default; opacity: .55; }
.myth-btn.is-correct { background: var(--green); border-color: var(--green); color: #fff; opacity: 1; }
.myth-btn.is-wrong { background: var(--red); border-color: var(--red); color: #fff; opacity: 1; }

.myth-feedback {
  margin-top: 22px;
  padding: 20px 22px;
  border-radius: 15px;
  background: rgba(244, 239, 228, .96);
  color: var(--ink);
  animation: feedbackIn .3s cubic-bezier(.2, .8, .2, 1);
}
.myth-feedback__head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 6px;
}
.myth-feedback__head svg { width: 20px; height: 20px; flex-shrink: 0; }
.myth-feedback p { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }
.myth-feedback .feedback__next { margin-top: 14px; }
.myth-result { text-align: center; padding: clamp(10px, 2vw, 24px) 0; }
.myth-result__score {
  font-family: var(--font-display);
  font-size: clamp(56px, 8vw, 92px);
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
  margin: 8px 0 6px;
}
.myth-result__score small { font-size: .35em; color: rgba(244, 239, 228, .5); }
.myth-result h3 { font-size: clamp(27px, 3.4vw, 40px); margin-bottom: 12px; }
.myth-result p { max-width: 520px; margin: 0 auto; color: rgba(244, 239, 228, .65); font-size: 14.5px; line-height: 1.6; }
.myth-review {
  display: grid;
  gap: 8px;
  margin: 26px auto 0;
  max-width: 760px;
  text-align: left;
}
.myth-review__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(244, 239, 228, .1);
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(244, 239, 228, .78);
}
.myth-review__item .mark {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}
.myth-review__item.is-ok .mark { background: var(--green); color: #fff; }
.myth-review__item.is-bad .mark { background: var(--red); color: #fff; }
.myth-review__item b { color: var(--cream); }

/* ---------- Экзамен ---------- */

.quiz-shell {
  border: 1.5px solid var(--ink);
  border-radius: 32px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.quiz-intro {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 32px;
  padding: clamp(28px, 5vw, 58px);
}
.quiz-intro__copy h3 { font-size: clamp(28px, 3.6vw, 44px); margin-bottom: 14px; }
.quiz-intro__copy p { color: var(--ink-soft); font-size: 15.5px; line-height: 1.65; max-width: 520px; }
.quiz-intro__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 26px;
}
.quiz-intro__facts span {
  font-size: 11px;
  font-weight: 700;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.quiz-intro__art {
  display: grid;
  place-items: center;
  padding: 24px;
  border-radius: 24px;
  background:
    radial-gradient(240px 220px at 50% 35%, rgba(243, 183, 63, .28), transparent 70%),
    var(--paper-2);
  border: 1px solid var(--line-soft);
}
.quiz-intro__art svg { width: min(220px, 60vw); height: auto; }
.quiz-card { padding: clamp(24px, 4vw, 46px); }
.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line);
}
.quiz-top__label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.quiz-top__score { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: .05em; }
.quiz-question {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.7vw, 31px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.025em;
  margin-bottom: 22px;
  max-width: 900px;
}
.quiz-options { display: grid; gap: 9px; max-width: 900px; }
.quiz-feedback { max-width: 900px; }
.quiz-results { padding: clamp(28px, 5vw, 58px); }
.quiz-results__top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
  margin-bottom: 34px;
}
.score-ring {
  position: relative;
  width: clamp(140px, 18vw, 190px);
  height: clamp(140px, 18vw, 190px);
  border-radius: 50%;
  background: conic-gradient(var(--teal) calc(var(--p, 0) * 1%), var(--line-soft) 0);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.score-ring::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--paper);
}
.score-ring__text {
  position: relative;
  text-align: center;
  font-family: var(--font-display);
  line-height: 1;
}
.score-ring__text b { display: block; font-size: clamp(38px, 5vw, 54px); letter-spacing: -.05em; }
.score-ring__text span { display: block; margin-top: 6px; font-family: var(--font-body); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.quiz-results__copy .kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.quiz-results__copy h3 { font-size: clamp(28px, 3.6vw, 44px); margin: 8px 0 12px; }
.quiz-results__copy p { color: var(--ink-soft); font-size: 15px; line-height: 1.65; max-width: 580px; }
.quiz-results__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.exam-review {
  border-top: 1px dashed var(--line);
  padding-top: 24px;
  margin-top: 30px;
}
.exam-review h4 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.exam-review__list { display: grid; gap: 7px; }
.exam-review__item {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--paper-2);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.exam-review__item .mark {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
}
.exam-review__item.is-ok .mark { background: var(--green); }
.exam-review__item.is-bad .mark { background: var(--red); }

/* ---------- Сертификат ---------- */

.certificate-wrap {
  margin-top: 28px;
  border-top: 1px dashed var(--line);
  padding-top: 28px;
}
.certificate-wrap__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.certificate-wrap__head h4 {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -.03em;
}
.certificate-wrap__head p { font-size: 12px; color: var(--muted); }
.certificate {
  position: relative;
  padding: clamp(26px, 5vw, 48px);
  border: 2px solid var(--ink);
  border-radius: 8px;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(243, 183, 63, .16), transparent 70%),
    var(--paper);
  text-align: center;
  overflow: hidden;
}
.certificate::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  pointer-events: none;
  opacity: .35;
}
.certificate::after {
  content: "";
  position: absolute;
  inset: 15px;
  border: 1px dashed var(--line);
  border-radius: 2px;
  pointer-events: none;
}
.certificate__stamp {
  position: absolute;
  top: 26px;
  right: 26px;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  transform: rotate(11deg);
  opacity: .85;
  z-index: 1;
}
.certificate__kicker {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
}
.certificate h5 {
  margin: 10px 0 6px;
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
}
.certificate__sub {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.certificate__text {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 6px 0;
}
.cert-name {
  display: block;
  width: min(100%, 420px);
  margin: 4px auto 6px;
  padding: 4px 10px 7px;
  border: none;
  border-bottom: 1.5px solid var(--ink);
  background: transparent;
  font-family: var(--font-display);
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 600;
  text-align: center;
  color: var(--ink);
  border-radius: 0;
  letter-spacing: -.02em;
}
.cert-name::placeholder { color: var(--line); }
.cert-name:focus { outline: none; border-bottom-color: var(--accent); }
.certificate__course {
  max-width: 520px;
  margin: 14px auto 0;
  font-family: var(--font-display);
  font-size: clamp(15px, 2vw, 19px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.02em;
}
.certificate__course b { color: var(--accent); }
.certificate__score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}
.certificate__score span { white-space: nowrap; }
.certificate__score svg { width: 13px; height: 13px; flex-shrink: 0; }

.safety-note {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  max-width: 900px;
  margin: 22px 0 0;
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 250, 240, .66);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}
.safety-note svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--accent);
}
.safety-note b { color: var(--ink); }
.certificate__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  max-width: 620px;
  margin: clamp(26px, 4vw, 40px) auto 0;
  padding-top: 12px;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
}
.certificate__footer span { display: block; }
.certificate__footer b {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
.certificate__sign {
  text-align: right;
  border-top: 1px solid var(--line);
  padding-top: 7px;
  min-width: 150px;
}
.certificate__sign b {
  font-family: "Segoe Script", "Bradley Hand", cursive;
  font-size: 17px;
  color: var(--teal);
}
.certificate-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.certificate-actions p { font-size: 11.5px; color: var(--muted); }
.quiz-locked {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 15px;
  background: var(--gold-soft);
  border: 1px solid rgba(163, 121, 23, .25);
}
.quiz-locked svg { width: 22px; height: 22px; flex-shrink: 0; color: #9a7420; margin-top: 1px; }
.quiz-locked p { font-size: 13.5px; line-height: 1.55; color: #6d551d; }
.quiz-locked b { color: #4f3d10; }

/* ---------- Финальный блок ---------- */

.final-note {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 56px);
}
.final-note__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(20px, 3vw, 38px);
  padding: clamp(28px, 4vw, 48px);
  border: 1.5px solid var(--ink);
  border-radius: 30px;
  background: var(--teal);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}
.final-note__inner::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -80px;
  top: -140px;
  border: 40px solid rgba(244, 239, 228, .06);
  border-radius: 50%;
  pointer-events: none;
}
.final-note__mark {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 20px;
  background: rgba(244, 239, 228, .1);
  border: 1px solid rgba(244, 239, 228, .22);
  font-size: 32px;
  color: var(--gold);
}
.final-note h2 { font-size: clamp(24px, 3.1vw, 38px); margin-bottom: 9px; }
.final-note p { font-size: 14px; line-height: 1.6; color: rgba(244, 239, 228, .72); max-width: 560px; }
.final-note .btn { position: relative; z-index: 1; }
.final-note .btn--primary { background: var(--gold); color: var(--ink); box-shadow: 4px 4px 0 rgba(0, 0, 0, .3); }
.final-note .btn--primary:hover { background: #ffc957; box-shadow: 6px 6px 0 rgba(0, 0, 0, .35); }

/* ---------- Подвал ---------- */

.site-footer {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) clamp(20px, 4.5vw, 56px) 40px;
  border-top: 1px solid rgba(30, 27, 22, .14);
}
.site-footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px dashed var(--line);
}
.brand--footer .brand__mark { background: var(--paper); border-radius: 12px; }
.brand--footer .brand__name { font-size: 17px; }
.site-footer__tagline {
  max-width: 320px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  text-align: right;
}
.site-footer__bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  padding-top: 22px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted);
}
.site-footer__bottom p { max-width: 720px; }
.site-footer__bottom b { color: var(--ink-soft); }
.site-footer__bottom span { white-space: nowrap; }

/* ---------- Тост и конфетти ---------- */

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 18px 13px 13px;
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  background: var(--ink);
  color: var(--cream);
  box-shadow: 6px 6px 0 rgba(30, 27, 22, .16);
  transform: translateY(24px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .35s cubic-bezier(.2, .8, .2, 1);
  max-width: calc(100% - 32px);
}
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  flex-shrink: 0;
}
.toast__mark svg { width: 17px; height: 17px; }
.toast__text { display: flex; flex-direction: column; line-height: 1.3; }
.toast__text b { font-size: 12.5px; }
.toast__text span { font-size: 11px; color: rgba(244, 239, 228, .62); margin-top: 2px; }

.confetti-piece {
  position: fixed;
  top: -14px;
  z-index: 95;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  pointer-events: none;
  animation: confettiFall var(--dur, 2.6s) cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes confettiFall {
  0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { opacity: 0; transform: translate3d(var(--drift, 0px), 105vh, 0) rotate(var(--spin, 480deg)); }
}

/* ---------- Адаптив ---------- */

@media (max-width: 1120px) {
  .type-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mission-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mission-card { min-height: 160px; }
  .hero { padding-top: calc(var(--header-h) + 64px); }
}

@media (max-width: 960px) {
  .site-nav { display: none; }
  .hero {
    grid-template-columns: 1fr;
    padding-top: calc(var(--header-h) + 48px);
    padding-bottom: 52px;
  }
  .hero__copy { max-width: 760px; }
  .hero__visual { justify-self: center; max-width: 520px; margin-top: 14px; }
  .anatomy-card { grid-template-columns: 1fr; }
  .anatomy-card__visual { border-right: none; border-bottom: 1.5px dashed var(--line); }
  .anatomy-panel { min-height: 360px; }
  .anatomy-svg-wrap { max-width: 400px; }
  .quiz-intro { grid-template-columns: 1fr; }
  .quiz-intro__art { order: -1; }
  .quiz-intro__art svg { width: 150px; }
  .type-dialog__card { grid-template-columns: 1fr; }
  .type-dialog__visual { flex-direction: row; justify-content: center; padding: 16px; }
  .type-dialog__face { width: 130px; height: 130px; }
  .type-dialog h3 { padding-right: 34px; }
  .quiz-results__top { grid-template-columns: 1fr; justify-items: start; }
  .score-ring { width: 130px; height: 130px; }
  .final-note__inner { grid-template-columns: auto 1fr; }
  .final-note__inner .btn { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-header { gap: 12px; padding: 0 16px; }
  .brand__sub { display: none; }
  .brand__mark { width: 38px; height: 38px; }
  .header-cta { padding: 8px 8px 8px 14px; font-size: 12px; }
  .header-cta__score { min-width: 42px; height: 26px; font-size: 10px; }
  .hero { padding-left: 18px; padding-right: 18px; }
  .hero h1 { font-size: clamp(38px, 10.6vw, 58px); }
  .hero__meta { gap: 6px 16px; }
  .sticker--amp { left: -8px; top: -14px; font-size: 21px; padding: 11px 16px; }
  .sticker--volt { right: -8px; width: 62px; height: 62px; font-size: 16px; }
  .sticker--type { left: 4%; bottom: -14px; }
  .missions { margin-left: 14px; margin-right: 14px; border-radius: 26px; padding: 24px 18px; }
  .mission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mission-card { min-height: 150px; padding: 15px 14px; }
  .mission-card:last-child { grid-column: 1 / -1; min-height: 120px; }
  .missions__head { gap: 18px; }
  .missions__progress { width: 100%; }
  .module { padding-left: 18px; padding-right: 18px; }
  .section-head h2 { font-size: clamp(31px, 9vw, 44px); }
  .anatomy-panel { padding: 24px 20px; }
  .anatomy-panel__title { font-size: 25px; }
  .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .type-card { padding: 13px 13px 15px; }
  .type-card__face svg { width: 80px; height: 80px; }
  .types-toolbar { align-items: flex-start; }
  .types-count { font-size: 11px; }
  .game-top { padding: 15px 20px; }
  .scenario-card { padding: 24px 20px; }
  .scenario-head { gap: 14px; }
  .scenario-icon { width: 52px; height: 52px; border-radius: 14px; }
  .scenario-icon svg { width: 29px; height: 29px; }
  .scenario-head h3 { font-size: 23px; }
  .scenario-situation { font-size: 14px; }
  .option { padding: 13px 14px; font-size: 13.5px; }
  .myth-shell { border-radius: 26px; padding: 24px 20px 30px; }
  .myth-shell::after { font-size: 240px; bottom: -70px; }
  .myth-top__left { flex-direction: column; align-items: flex-start; gap: 8px; }
  .myth-statement { font-size: clamp(21px, 6.2vw, 30px); }
  .myth-btn { flex-basis: 110px; min-height: 52px; font-size: 12px; }
  .myth-feedback { padding: 17px; }
  .quiz-intro { padding: 24px 20px; }
  .quiz-card { padding: 24px 20px; }
  .quiz-results { padding: 26px 20px; }
  .quiz-intro__art { padding: 18px; }
  .quiz-intro__art svg { width: 120px; }
  .quiz-question { font-size: clamp(19px, 5.5vw, 25px); }
  .certificate { padding: 30px 20px; }
  .certificate__stamp { width: 54px; height: 54px; top: 18px; right: 18px; font-size: 10px; }
  .certificate__footer { flex-direction: column; align-items: flex-start; gap: 16px; }
  .certificate__sign { text-align: left; width: 100%; }
  .final-note { padding-left: 14px; padding-right: 14px; }
  .final-note__inner { grid-template-columns: 1fr; }
  .final-note__mark { width: 56px; height: 56px; font-size: 24px; border-radius: 15px; }
  .site-footer { padding-left: 18px; padding-right: 18px; }
  .site-footer__tagline { text-align: left; }
  .toast { left: 14px; right: 14px; bottom: 14px; max-width: none; }
}

@media (max-width: 460px) {
  .hero__actions .btn { width: 100%; }
  .hero__actions { gap: 10px; }
  .mission-grid { grid-template-columns: 1fr; }
  .mission-card { min-height: 0; }
  .mission-card:last-child { grid-column: auto; min-height: 0; }
  .mission-card p { max-width: 90%; }
  .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .type-card__country { font-size: 10px; }
  .type-dialog__visual { flex-direction: column; }
  .type-dialog__face { width: 140px; height: 140px; }
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .certificate__course { font-size: 14px; }
  .myth-actions { flex-direction: column; }
  .myth-btn { flex-basis: auto; width: 100%; }
}

@media (max-width: 380px) {
  .site-header { padding: 0 12px; }
  .site-header .brand__text { display: none; }
  .header-cta { padding-left: 12px; }
  .hero h1 { font-size: clamp(33px, 10.4vw, 44px); }
  .sticker--amp { font-size: 18px; padding: 9px 13px; }
  .sticker--volt { width: 56px; height: 56px; font-size: 14px; }
}

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

/* ---------- Печать сертификата ---------- */

#printArea { display: none; }

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff !important; }
  body::before { display: none !important; }
  body > * { display: none !important; }
  body > #printArea { display: flex !important; align-items: center; justify-content: center; }
  #printArea { min-height: 190mm; padding: 0; }
  #certificate {
    position: relative !important;
    width: 100% !important;
    margin: 0 !important;
    border-color: #1e1b16 !important;
    background: #fff !important;
    box-shadow: none !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .certificate__stamp { border-color: #e94b2c !important; color: #e94b2c !important; }
  .cert-name { border-bottom-color: #1e1b16 !important; }
}



