@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("assets/fonts/manrope-cyrillic-wght-normal-Dvxsihut.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("assets/fonts/manrope-latin-wght-normal-DHIcAJRg.woff2") format("woff2-variations");
}

@font-face {
  font-family: "Sofia Sans Condensed Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 1 1000;
  src: url("assets/fonts/sofia-sans-condensed-cyrillic-wght-normal-BoqAdnJd.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Sofia Sans Condensed Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 1 1000;
  src: url("assets/fonts/sofia-sans-condensed-latin-wght-normal-DsAD_hOx.woff2") format("woff2-variations");
}

:root {
  --font-display: "Sofia Sans Condensed Variable", "Arial Narrow", sans-serif;
  --font-ui: "Manrope Variable", "Segoe UI", Arial, sans-serif;
  --bg: #080605;
  --bg-soft: #120b09;
  --surface: #18100d;
  --surface-2: #211410;
  --line: #f1dfb724;
  --line-strong: #ee8a1e66;
  --text: #f1dfb7;
  --bright: #fff1cf;
  --muted: #b7a98d;
  --orange: #ee8a1e;
  --orange-2: #ff9d27;
  --red: #ad3b13;
  --green: #9cc78d;
  --teal: #7ecdc5;
  --radius: 8px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-ui);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 76% 10%, #ad3b1324, transparent 34rem),
    linear-gradient(#5209064d, transparent 24rem),
    linear-gradient(#080605 0%, #120b09 45%, #080605 100%);
  font-family: var(--font-ui);
  font-weight: 460;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(#fff1cf05 1px, transparent 1px),
    linear-gradient(90deg, #fff1cf03 1px, transparent 1px);
  background-size: 30px 30px;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
dl,
dd {
  margin-top: 0;
}

h1,
h2,
h3,
h4,
strong {
  color: var(--bright);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-stretch: 75%;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  border-bottom: 1px solid transparent;
  background: #080605d6;
  backdrop-filter: blur(18px);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.brand,
.desktop-nav,
.hero-actions,
.family-jump,
.mobile-cta,
.site-footer nav {
  display: flex;
  align-items: center;
}

.brand {
  min-width: 0;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.brand img,
.site-footer img {
  flex: none;
  border: 1px solid #ad3b13bf;
  border-radius: 50%;
  background: #090807;
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desktop-nav {
  display: none;
}

.header-action {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: #18100de0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 950;
  text-transform: uppercase;
}

.header-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.nav-pinned,
.toc-pinned {
  color: #190a04 !important;
  background: var(--orange);
}

.hero {
  position: relative;
  min-height: 86svh;
  overflow: hidden;
  border-bottom: 1px solid #ee8a1e33;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 44%, #ee8a1e26, transparent 20rem),
    radial-gradient(circle at 22% 28%, #ad3b132e, transparent 26rem),
    linear-gradient(90deg, #080605 0%, #080605e8 48%, #080605ba 100%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(transparent, #080605 88%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 86svh;
  max-width: var(--max);
  align-items: end;
  gap: 28px;
  margin: 0 auto;
  padding: 96px 18px 72px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow,
.section-kicker,
.panel-label {
  margin: 0;
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero h1 {
  margin: 10px 0 0;
  font-size: 4.7rem;
  line-height: 0.88;
}

.hero-lead {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--bright);
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 850;
  line-height: 1.05;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.button-primary {
  border: 1px solid var(--orange-2);
  color: #190a04;
  background: linear-gradient(135deg, var(--orange-2), var(--orange));
  box-shadow: 0 14px 34px #ad3b1333;
}

.button-secondary {
  border: 1px solid var(--line);
  color: var(--text);
  background: #18100dd1;
}

.button:disabled,
.header-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  filter: grayscale(0.4);
  box-shadow: none;
}

.hero-glass {
  position: relative;
  max-width: 520px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0b0706;
  box-shadow: 0 22px 56px #00000057;
}

.hero-glass img {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 760;
  object-fit: contain;
}

.hero-glass figcaption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--bright);
  background: #080605cf;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 76px 18px;
  scroll-margin-top: 78px;
}

.band {
  max-width: none;
  border-top: 1px solid #ee8a1e2e;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(#ee8a1e14, transparent 340px),
    #0a07066b;
}

.band > * {
  max-width: var(--max);
  margin-right: auto;
  margin-left: auto;
}

.section-head {
  display: grid;
  gap: 12px;
  max-width: 780px;
  margin-bottom: 26px;
}

.section-head h2 {
  margin: 0;
  font-size: 2.55rem;
  line-height: 1;
}

.section-head p:not(.section-kicker) {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.lesson-number {
  width: fit-content;
  margin-bottom: 12px;
  padding: 6px 9px 5px;
  border: 1px solid #ee8a1e45;
  border-radius: var(--radius);
  color: #190a04;
  background: var(--orange);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.mode-grid,
.learning-path,
.core-grid,
.question-flow,
.taste-map,
.cheatsheet-grid,
.source-grid {
  display: grid;
  gap: 14px;
}

.mode-grid {
  grid-template-columns: repeat(auto-fit, minmax(164px, 1fr));
}

.mode-grid a,
.learning-path article,
.core-grid article,
.question-flow article,
.taste-map article,
.rule-card,
.lesson-check,
.scenario-result,
.family-section,
.style-card,
.trainer-card,
.cheatsheet-grid article,
.source-grid article,
.print-note {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #18100de8;
}

.mode-grid a,
.learning-path article {
  display: grid;
  min-height: 132px;
  align-content: start;
  gap: 9px;
  padding: 16px;
  border-top-color: var(--red);
  color: var(--text);
  text-decoration: none;
}

.mode-grid a:hover,
.mode-grid a:focus-visible {
  border-color: var(--orange);
  outline: 0;
  background: #20130fe8;
}

.mode-grid span,
.learning-path span,
.question-flow span {
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 950;
  line-height: 1;
}

.mode-grid strong,
.learning-path strong,
.question-flow strong,
.taste-map strong,
.rule-card strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1;
  text-transform: uppercase;
}

.mode-grid p,
.learning-path p,
.question-flow p,
.taste-map p,
.rule-card p,
.core-grid p,
.scenario-result dd,
.family-head p,
.guest-line,
.style-brief dd,
.style-say,
.trainer-feedback,
.cheatsheet-grid p,
.source-grid a,
.print-note p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.core-grid article {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-top-color: var(--orange);
}

.core-grid h3,
.scenario-result h3,
.family-head h3,
.trainer-card h3,
.cheatsheet-grid h3 {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1;
}

.core-grid p,
.cheatsheet-grid p {
  margin: 0;
}

.question-flow article {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.lesson-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  padding: 14px;
}

.lesson-check input {
  width: 24px;
  height: 24px;
  accent-color: var(--orange);
}

.lesson-check span {
  color: var(--bright);
  font-size: 0.96rem;
  font-weight: 760;
  line-height: 1.45;
}

.taste-map {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.taste-map article {
  min-height: 118px;
  padding: 16px;
  border-top-color: var(--orange);
}

.rule-card {
  margin-top: 16px;
  padding: 18px;
  border-color: #9cc78d5f;
  background: #102014d9;
}

.picker-layout {
  display: grid;
  gap: 16px;
}

.scenario-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.scenario-list button,
.trainer-options button,
.family-jump a {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: #080605b8;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.scenario-list button.is-active {
  border-color: var(--orange);
  color: #190a04;
  background: var(--orange);
}

.scenario-result {
  display: grid;
  min-height: 320px;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border-top-color: var(--teal);
}

.scenario-result dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.scenario-result div {
  padding-top: 12px;
  border-top: 1px solid #fff0d612;
}

.scenario-result dt,
.style-brief dt {
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.scenario-result dd {
  margin: 6px 0 0;
}

.family-jump {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.family-jump a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 0 12px;
}

.style-families {
  display: grid;
  gap: 22px;
}

.style-tools {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #15100de6;
}

.style-tools label {
  display: grid;
  gap: 8px;
}

.style-tools span {
  color: var(--orange);
  font-family: var(--font-display);
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.style-tools input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid #fff0d622;
  border-radius: var(--radius);
  color: var(--bright);
  background: #080605;
  font: inherit;
}

.style-tools p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.family-section {
  display: grid;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  gap: 18px;
  padding: 14px;
  border-top-color: var(--orange);
}

.family-section > * {
  min-width: 0;
}

.family-summary {
  display: block;
  cursor: pointer;
  list-style: none;
}

.family-summary::-webkit-details-marker {
  display: none;
}

.family-summary::marker {
  content: "";
}

.family-summary .family-head {
  position: relative;
  padding-right: 42px;
}

.family-summary .family-head::after {
  content: "Открыть";
  position: absolute;
  top: 0;
  right: 0;
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.family-section[open] .family-summary .family-head::after {
  content: "Свернуть";
}

.family-head {
  display: grid;
  gap: 10px;
}

.family-head h3 {
  margin: 6px 0 8px;
}

.guest-line {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #ee8a1e3d;
  border-radius: var(--radius);
  background: #08060596;
}

.guest-line span {
  color: var(--orange);
  font-family: var(--font-display);
  font-weight: 950;
  text-transform: uppercase;
}

.guest-line strong {
  font-size: 1rem;
  line-height: 1.35;
}

.guest-line em {
  color: var(--muted);
  font-style: normal;
}

.family-compare {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #fff0d612;
  border-radius: var(--radius);
  background: #08060582;
}

.family-compare > strong {
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.compare-scroll {
  overflow-x: auto;
}

.family-compare table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.family-compare th,
.family-compare td {
  padding: 10px;
  border-top: 1px solid #fff0d612;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
}

.family-compare thead th {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.family-compare tbody th {
  color: var(--bright);
  font-weight: 850;
}

.style-grid {
  display: grid;
  gap: 14px;
}

.style-card {
  display: grid;
  overflow: hidden;
}

.style-visual {
  margin: 0;
  background:
    linear-gradient(90deg, #080605 0%, #120b08 50%, #080605 100%);
}

.style-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 760;
  object-fit: contain;
  background: #080605;
}

.style-visual figcaption {
  padding: 9px 12px 10px;
  border-top: 1px solid #fff0d612;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.style-card-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.style-card h4 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-row li {
  min-height: 28px;
  padding: 7px 8px 0;
  border: 1px solid #ee8a1e29;
  border-radius: var(--radius);
  color: var(--text);
  background: #ee8a1e14;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
}

.scales {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #fff0d612;
  border-radius: var(--radius);
  background: #08060582;
}

.scale-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 10px;
  align-items: center;
}

.scale-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.scale-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.scale-track i {
  height: 9px;
  border-radius: 999px;
  background: #fff0d612;
}

.scale-track i.is-on {
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.style-brief {
  display: grid;
  gap: 10px;
  margin: 0;
}

.style-say {
  margin: 0;
  padding: 12px;
  border: 1px solid #ee8a1e2e;
  border-radius: var(--radius);
  color: var(--bright);
  background: #08060596;
  font-weight: 800;
}

.style-more {
  border-top: 1px solid #fff0d612;
  padding-top: 10px;
}

.style-more summary {
  cursor: pointer;
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 950;
  line-height: 1.1;
  text-transform: uppercase;
}

.style-more .style-brief {
  margin-top: 10px;
}

.style-brief div {
  display: grid;
  gap: 5px;
  padding-top: 10px;
  border-top: 1px solid #fff0d612;
}

.style-brief dd {
  margin: 0;
}

.trainer-panel {
  display: grid;
  gap: 14px;
}

.trainer-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #080605b8;
}

.trainer-progress strong {
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1;
}

.trainer-progress span {
  color: var(--muted);
  font-size: 0.95rem;
}

.trainer-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-top-color: var(--orange);
}

.trainer-card h3 {
  max-width: 760px;
}

.trainer-options {
  display: grid;
  gap: 9px;
}

.trainer-options button {
  padding: 12px;
  text-align: left;
  line-height: 1.2;
}

.trainer-options button.is-correct {
  border-color: #9cc78d87;
  color: #081007;
  background: var(--green);
}

.trainer-options button.is-wrong {
  border-color: #ff8f7685;
  color: var(--bright);
  background: #5a120c;
}

.trainer-feedback {
  min-height: 48px;
  margin: 0;
}

.trainer-next {
  justify-self: start;
}

.trainer-next:disabled,
.trainer-options button:disabled:not(.is-correct):not(.is-wrong) {
  cursor: default;
  opacity: 0.74;
}

.cheatsheet-grid article {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-top-color: var(--orange);
}

.cheatsheet-grid h3 {
  margin-bottom: 2px;
}

.print-note {
  display: grid;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  padding: 16px;
}

.print-note p {
  margin: 0;
}

.sources-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #120b09f2;
}

.sources-panel summary {
  cursor: pointer;
  color: var(--bright);
  font-family: var(--font-display);
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.sources-panel p {
  max-width: 840px;
  margin: 12px 0;
  color: var(--muted);
}

.source-grid a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid #ee8a1e30;
  border-radius: var(--radius);
  color: var(--orange);
  font-family: var(--font-display);
  font-weight: 950;
  text-transform: uppercase;
  text-decoration: none;
}

.site-footer {
  display: grid;
  gap: 18px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 38px 18px 92px;
  border-top: 1px solid var(--line);
}

.site-footer > div {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 4px 12px;
  align-items: center;
}

.site-footer img {
  grid-row: span 2;
}

.site-footer strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1;
  text-transform: uppercase;
}

.site-footer span {
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer nav {
  flex-wrap: wrap;
  gap: 10px;
}

.site-footer a {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.mobile-cta {
  position: fixed;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 12px;
  z-index: 25;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #080605db;
  backdrop-filter: blur(18px);
}

.mobile-cta a {
  display: grid;
  min-height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: #18100deb;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.mobile-cta a:first-child {
  border-color: var(--orange);
  color: #190a04;
  background: var(--orange);
}

@media (width >= 700px) {
  .site-header {
    min-height: 72px;
    padding-right: 28px;
    padding-left: 28px;
  }

  .brand {
    font-size: 1.3rem;
  }

  .desktop-nav {
    display: flex;
    gap: 16px;
  }

  .desktop-nav a {
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 1.03rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
  }

  .hero-content {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
    padding-right: 28px;
    padding-left: 28px;
  }

  .hero h1 {
    font-size: 7.6rem;
  }

  .hero-lead {
    font-size: 2.45rem;
  }

  .section {
    padding: 88px 28px;
    scroll-margin-top: 88px;
  }

  .band > * {
    padding-right: 28px;
    padding-left: 28px;
  }

  .section-head {
    grid-template-columns: minmax(0, 0.85fr) minmax(290px, 0.62fr);
    max-width: none;
    align-items: end;
  }

  .section-head .section-kicker {
    grid-column: 1 / -1;
  }

  .section-head h2 {
    font-size: 3.35rem;
  }

  .mode-grid,
  .learning-path,
  .core-grid,
  .taste-map,
  .cheatsheet-grid,
  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .question-flow {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .picker-layout {
    grid-template-columns: minmax(0, 0.78fr) minmax(320px, 0.68fr);
    align-items: start;
  }

  .scenario-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .style-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .style-visual img {
    max-height: 220px;
  }

  .style-brief {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trainer-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .print-note {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .site-footer {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding-right: 28px;
    padding-bottom: 44px;
    padding-left: 28px;
  }

  .mobile-cta {
    display: none;
  }
}

@media (width >= 1040px) {
  .hero h1 {
    font-size: 9rem;
  }

  .section-head h2 {
    font-size: 4.05rem;
  }

  .learning-path {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .core-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .taste-map {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (width <= 520px) {
  .header-action {
    min-width: 64px;
    padding: 0 10px;
  }

  .hero h1 {
    font-size: 4.1rem;
  }

  .hero-lead {
    font-size: 1.62rem;
  }

  .section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .section:last-of-type {
    padding-bottom: 120px;
  }

  .taste-map,
  .scenario-list {
    grid-template-columns: 1fr;
  }

  .family-section {
    padding: 10px;
  }

  .style-card-body,
  .trainer-card,
  .scenario-result {
    padding: 14px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .button,
  .header-action,
  .desktop-nav a,
  .scenario-list button,
  .trainer-options button,
  .trainer-next,
  .family-jump a,
  .mobile-cta a {
    transition: border-color 0.15s, filter 0.15s, transform 0.15s, background 0.15s, color 0.15s;
  }

  .button:hover,
  .header-action:hover,
  .desktop-nav a:hover,
  .scenario-list button:hover,
  .trainer-options button:hover,
  .family-jump a:hover,
  .mobile-cta a:hover {
    filter: brightness(1.08);
  }

  .button:active,
  .header-action:active,
  .scenario-list button:active,
  .trainer-options button:active,
  .mobile-cta a:active {
    transform: scale(0.98);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.wiki-shell {
  display: grid;
  gap: 22px;
  width: min(100%, 1460px);
  margin: 0 auto;
  padding: 82px 14px 0;
}

.wiki-sidebar {
  min-width: 0;
  scroll-margin-top: 84px;
}

.toc-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #120b09f2;
  box-shadow: 0 18px 48px #00000033;
}

.toc-title {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--bright);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  user-select: none;
}

.toc-title::-webkit-details-marker {
  display: none;
}

.toc-title::marker {
  content: "";
}

.toc-title::after {
  content: "Свернуть";
  color: var(--orange);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.toc-details:not([open]) .toc-title {
  border-bottom: 0;
}

.toc-details:not([open]) .toc-title::after {
  content: "Открыть";
}

.toc-nav {
  display: grid;
  max-height: 58svh;
  overflow: auto;
  padding: 10px;
  scrollbar-color: #ee8a1e66 #080605;
}

.toc-nav a {
  display: block;
  padding: 7px 8px;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.25;
  text-decoration: none;
}

.toc-nav > a {
  color: var(--bright);
  font-weight: 800;
}

.toc-nav ul {
  display: grid;
  gap: 1px;
  margin: 0 0 8px;
  padding: 0 0 0 14px;
  border-left: 1px solid #ee8a1e30;
  list-style: none;
}

.toc-nav li a {
  color: var(--muted);
  font-size: 0.82rem;
}

.toc-nav a:hover,
.toc-nav a:focus-visible {
  color: #190a04;
  outline: 0;
  background: var(--orange);
}

.toc-group {
  display: grid;
  gap: 2px;
  margin-top: 4px;
  padding: 4px 0 6px;
  border-top: 1px solid #fff0d60f;
}

.toc-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border-radius: 6px;
  color: var(--bright);
  cursor: pointer;
  font-weight: 850;
  line-height: 1.2;
  list-style: none;
}

.toc-group summary::-webkit-details-marker {
  display: none;
}

.toc-group summary::after {
  content: "+";
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 950;
}

.toc-group[open] summary::after {
  content: "-";
}

.toc-group a {
  margin-left: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.wiki-content {
  min-width: 0;
}

.test-shell {
  display: grid;
  gap: 22px;
  width: min(100%, 1460px);
  margin: 0 auto;
  padding: 82px 14px 78px;
}

.test-sidebar,
.test-content {
  min-width: 0;
}

.test-content .section {
  max-width: none;
  padding: 46px 0;
}

.test-intro h1 {
  margin: 0;
  font-size: 3.4rem;
  line-height: 0.95;
}

.test-stat-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.test-stat-list div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.test-stat-list dt,
.test-stat-list dd {
  margin: 0;
}

.test-stat-list dd {
  color: var(--bright);
  font-weight: 850;
}

.test-person-grid,
.test-question-list,
.test-options,
.test-actions,
.test-result {
  display: grid;
  gap: 14px;
}

.test-person-grid label {
  display: grid;
  gap: 8px;
}

.test-person-grid span {
  color: var(--orange);
  font-family: var(--font-display);
  font-weight: 950;
  text-transform: uppercase;
}

.test-person-grid input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--bright);
  background: #080605b8;
}

.test-progress-line {
  display: grid;
  gap: 9px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #080605b8;
}

.test-progress-line span {
  color: var(--bright);
  font-weight: 850;
}

.test-progress-line div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #fff0d612;
}

.test-progress-line i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--orange));
  transition: width 0.2s ease;
}

.test-step-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.test-step-nav button {
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid #fff0d612;
  border-radius: var(--radius);
  color: var(--text);
  background: #08060582;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 850;
  text-align: left;
}

.test-step-nav button:disabled {
  opacity: 0.46;
}

.test-step-nav button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 7px;
  border-radius: 50%;
  color: #190a04;
  background: var(--orange);
  font-size: 0.78rem;
  font-weight: 950;
}

.test-step-nav button.is-active {
  border-color: var(--orange);
  color: var(--bright);
  background: #ee8a1e18;
}

.test-step-nav button.is-complete {
  border-color: #9cc78d87;
}

.test-section-summary {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

.test-question-group {
  display: grid;
  gap: 14px;
  scroll-margin-top: 92px;
}

.test-group-head {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid #ee8a1e3d;
  border-radius: var(--radius);
  background: #08060596;
}

.test-group-head span {
  color: var(--orange);
  font-family: var(--font-display);
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.test-group-head h3 {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1;
}

.test-group-head p {
  margin: 0;
  color: var(--muted);
}

.test-timer {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #ee8a1e3d;
  border-radius: var(--radius);
  background: #080605b8;
}

.test-timer-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.test-timer strong {
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 1.85rem;
  line-height: 1;
}

.test-timer span {
  color: var(--muted);
  font-weight: 850;
}

.test-timer-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #fff0d612;
}

.test-timer-track i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), var(--red));
  transition: width 0.18s linear;
}

.test-timer.is-expired {
  border-color: #ff8f7685;
}

.test-timer.is-answered {
  border-color: #9cc78d87;
}

.test-question {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #15100df2;
}

.test-question legend {
  display: grid;
  gap: 6px;
  width: 100%;
  margin-bottom: 10px;
  color: var(--bright);
  font-size: 1.05rem;
  font-weight: 850;
  line-height: 1.35;
}

.test-question legend span,
.test-question legend em {
  width: fit-content;
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.test-options {
  grid-template-columns: 1fr;
  gap: 8px;
}

.test-options label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid #fff0d612;
  border-radius: var(--radius);
  color: var(--text);
  background: #08060582;
}

.test-options input {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--orange);
}

.test-options label.is-correct {
  border-color: #9cc78d87;
  color: #081007;
  background: var(--green);
}

.test-options label.is-wrong {
  border-color: #ff8f7685;
  color: var(--bright);
  background: #5a120c;
}

.test-question.is-correct {
  border-color: #9cc78d5f;
}

.test-question.is-wrong {
  border-color: #ff8f7685;
}

.test-explain {
  min-height: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.test-actions {
  grid-template-columns: 1fr;
}

.test-step-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.start-test-inline {
  justify-self: start;
  min-width: min(100%, 320px);
}

.test-step-actions [hidden],
.test-actions [hidden] {
  display: none;
}

.test-result {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #15100df2;
}

.test-result:empty {
  display: none;
}

.test-result strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1;
  text-transform: uppercase;
}

.test-result p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.test-result ul {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--text);
}

.test-result li span {
  color: var(--green);
}

.test-result.is-pass {
  border-color: #9cc78d87;
  background: #102014d9;
}

.test-result.is-fail {
  border-color: #ff8f7685;
  background: #200b08d9;
}

.test-result.is-pending {
  border-color: var(--orange);
}

.wiki-content .section {
  max-width: none;
  padding: 36px 0;
  scroll-margin-top: 90px;
}

.wiki-content .reference-intro {
  padding-top: 18px;
}

.reference-intro .section-head {
  max-width: 860px;
}

.wiki-content .band {
  margin-right: -14px;
  margin-left: -14px;
  padding-right: 14px;
  padding-left: 14px;
}

.wiki-content .band > * {
  max-width: none;
  padding-right: 0;
  padding-left: 0;
}

.wiki-content .section-head {
  grid-template-columns: 1fr;
  max-width: 920px;
  gap: 9px;
  margin-bottom: 20px;
}

.wiki-content .section-head h2 {
  font-size: 2.55rem;
}

.wiki-content .section-head p:not(.section-kicker) {
  max-width: 760px;
}

.mode-grid a,
.learning-path article,
.core-grid article,
.question-flow article,
.taste-map article,
.rule-card,
.lesson-check,
.scenario-result,
.family-section,
.style-card,
.trainer-card,
.cheatsheet-grid article,
.source-grid article,
.print-note {
  scroll-margin-top: 94px;
}

.learning-path article,
.core-grid article,
.question-flow article,
.taste-map article,
.cheatsheet-grid article,
.source-grid article {
  background: #15100de6;
}

.family-section {
  background: #15100df2;
}

.style-visual img {
  max-height: 230px;
}

.site-footer {
  width: min(100%, 1460px);
  max-width: none;
}

@media (width >= 700px) {
  .wiki-shell {
    padding-right: 22px;
    padding-left: 22px;
  }

  .wiki-content .section {
    padding: 44px 0;
  }

  .wiki-content .section-head {
    grid-template-columns: minmax(0, 0.78fr) minmax(280px, 0.58fr);
  }

  .wiki-content .section-head h2 {
    font-size: 3rem;
  }

  .wiki-content .band {
    margin-right: -22px;
    margin-left: -22px;
    padding-right: 22px;
    padding-left: 22px;
  }

  .test-shell {
    padding-right: 22px;
    padding-left: 22px;
  }

  .test-person-grid,
  .test-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .test-step-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (width >= 1040px) {
  .wiki-shell {
    grid-template-columns: 310px minmax(0, 1fr);
    align-items: start;
    gap: 28px;
    padding-top: 94px;
  }

  .wiki-sidebar {
    position: sticky;
    top: 88px;
    max-height: calc(100svh - 102px);
  }

  .toc-nav {
    max-height: calc(100svh - 156px);
  }

  .wiki-content .section:first-child {
    padding-top: 0;
  }

  .wiki-content .section-head h2 {
    font-size: 3.35rem;
  }

  .question-flow {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
  }

  .mode-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .style-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .test-shell {
    grid-template-columns: 310px minmax(0, 1fr);
    align-items: start;
    gap: 28px;
    padding-top: 94px;
  }

  .test-sidebar {
    position: sticky;
    top: 88px;
  }

  .test-intro h1 {
    font-size: 4.6rem;
  }
}

@media (width >= 1280px) {
  .wiki-shell {
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 34px;
  }

  .test-shell {
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 34px;
  }
}

@media (width <= 699px) {
  .wiki-shell {
    padding-bottom: 76px;
  }

  .wiki-content,
  .test-content {
    order: 1;
  }

  .wiki-sidebar,
  .test-sidebar {
    order: 2;
  }

  .toc-card {
    margin-top: 8px;
  }

  .toc-nav {
    max-height: 46svh;
  }

  .wiki-content .section {
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .wiki-content .section:last-of-type {
    padding-bottom: 108px;
  }

  .wiki-content .section-head h2 {
    font-size: 2.25rem;
  }

  .question-flow,
  .style-grid {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    scrollbar-color: #ee8a1e66 #080605;
  }

  .question-flow article {
    min-width: 76vw;
    scroll-snap-align: start;
  }

  .style-grid {
    align-items: stretch;
    width: calc(100vw - 58px);
    max-width: calc(100vw - 58px);
  }

  .style-card {
    flex: 0 0 84vw;
    min-width: 0;
    scroll-snap-align: start;
  }


  .brand span {
    white-space: normal;
  }

  .test-shell {
    padding-bottom: 90px;
  }

  .test-content .section {
    padding-top: 42px;
    padding-bottom: 42px;
  }

  .test-intro h1 {
    font-size: 2.7rem;
  }
}

@media print {
  .site-header,
  .hero,
  .wiki-sidebar,
  .test-sidebar,
  .family-jump,
  .trainer-panel,
  .mobile-cta,
  .site-footer,
  .print-note {
    display: none !important;
  }

  body {
    color: #1e1712;
    background: #fff;
  }

  .section,
  .band,
  .band > * {
    max-width: none;
    padding: 18px 0;
    border: 0;
    background: #fff;
  }

  .learning-path article,
  .core-grid article,
  .question-flow article,
  .taste-map article,
  .rule-card,
  .lesson-check,
  .family-section,
  .style-card,
  .cheatsheet-grid article {
    break-inside: avoid;
    color: #1e1712;
    border-color: #c9b99c;
    background: #fff;
  }
}
