/* =========================================================
   Latihan SKD 2026 — 330 soal, tiga tingkat
   Tema: kertas ujian, tinta hijau, aksen kuning.
   ========================================================= */

/* ---------- 1. Tokens & reset ---------- */
:root {
  --paper: #f3efe4;
  --paper-2: #ece6d8;
  --paper-3: #e2dac9;
  --white: #fffdf7;
  --ink: #16211d;
  --ink-2: #25332c;
  --muted: #5f675e;
  --line: #d5cbb7;
  --line-2: #b9ad95;
  --forest: #1d5a45;
  --forest-2: #2a7358;
  --amber: #c58b27;
  --red: #b24a37;
  --blue: #2e6088;

  --sans: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-width: 320px;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(22, 33, 29, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 33, 29, 0.028) 1px, transparent 1px);
  background-size: 88px 88px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

h1, h2, h3, h4, p, dl, dd, dt, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
strong { font-weight: 500; }

::selection { background: var(--forest); color: var(--paper); }

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

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border: 2px solid var(--paper-2);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ---------- 2. Utilities ---------- */
.wrap {
  width: min(var(--wrap), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 11px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 11px;
  transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 16px; }

.view:not([hidden]) { animation: viewIn 0.4s var(--ease) both; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 3. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 239, 228, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-header__inner {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-right: auto;
  flex-shrink: 0;
}

.brand__mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.brand__name {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.brand__name span {
  margin-left: 3px;
  color: var(--muted);
  font-weight: 300;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  position: relative;
  padding-block: 6px;
  font-size: 12px;
  color: var(--muted);
  transition: color 0.2s var(--ease-soft);
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); }

/* ---------- 4. Buttons & tags ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition:
    background-color 0.22s var(--ease-soft),
    color 0.22s var(--ease-soft),
    border-color 0.22s var(--ease-soft),
    transform 0.22s var(--ease);
}
.btn span { transition: transform 0.25s var(--ease); }
.btn:hover span { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--paper);
}
.btn--primary:hover { background: var(--ink); border-color: var(--ink); }

.btn--outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn--outline:hover { background: var(--ink); color: var(--paper); }

.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink);
}
.btn--ghost:hover { background: var(--paper-2); }

.btn--light {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}
.btn--light:hover { background: var(--white); border-color: var(--white); }

.btn--link {
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
}
.btn--link:hover { border-color: var(--ink); }

.btn--small { padding: 9px 13px; font-size: 12px; }
.btn--block { width: 100%; justify-content: space-between; }

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag--TWK { color: var(--forest); background: #e8f0ea; border-color: #b9d2c2; }
.tag--TIU { color: var(--blue); background: #e8eef5; border-color: #b8cadc; }
.tag--TKP { color: #865717; background: #f6ead7; border-color: #dfc79f; }
.tag--light {
  color: var(--paper);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.3);
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  align-items: center;
  gap: clamp(40px, 6vw, 92px);
  padding-block: clamp(48px, 7vh, 88px) clamp(58px, 8vh, 100px);
}

.hero::after {
  content: "330";
  position: absolute;
  right: -16px;
  bottom: -22px;
  z-index: 0;
  font-family: var(--serif);
  font-size: clamp(12rem, 27vw, 25rem);
  font-weight: 400;
  line-height: 0.66;
  letter-spacing: -0.08em;
  color: rgba(22, 33, 29, 0.035);
  pointer-events: none;
}

.hero__copy,
.hero__visual { position: relative; z-index: 1; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow__mark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--forest);
  box-shadow: 0 0 0 4px rgba(29, 90, 69, 0.12);
}

.hero h1 {
  margin-bottom: 28px;
  font-size: clamp(3.1rem, 7vw, 6.4rem);
  font-weight: 500;
  line-height: 0.93;
  letter-spacing: -0.065em;
}
.hero h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--forest);
}

.hero__lead {
  max-width: 540px;
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  line-height: 1.75;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 32px;
}

.hero__last {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.hero__last strong { color: var(--forest); font-weight: 500; }

.hero__stats {
  display: flex;
  gap: clamp(28px, 4vw, 54px);
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.hero__stats div { display: flex; flex-direction: column; gap: 2px; }
.hero__stats dt {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}
.hero__stats dd {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Preview card */
.hero__visual { padding: 8px 0 0; }

.preview {
  position: relative;
  background: var(--white);
  border: 1px solid var(--ink);
  box-shadow: 12px 12px 0 rgba(22, 33, 29, 0.14);
}

.preview__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.preview__live { display: inline-flex; align-items: center; gap: 7px; }
.preview__live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #76c69d;
  box-shadow: 0 0 0 3px rgba(118, 198, 157, 0.16);
}

.preview__body { padding: 22px; }

.preview__meta {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
}
.preview__clock { margin-left: auto; letter-spacing: 0.04em; }

.preview__q {
  margin-top: 24px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.preview__numbers {
  margin-top: 4px;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.preview__options {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}
.preview__option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-2);
}
.preview__letter {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted);
  flex-shrink: 0;
}
.preview__option.is-selected {
  margin-inline: -8px;
  padding-inline: 8px;
  background: #e9f0eb;
  border-color: #b9d2c2;
}
.preview__option.is-selected .preview__letter {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--paper);
}
.preview__check {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--forest);
}

.preview__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted);
}
.preview__progress {
  flex: 1;
  height: 3px;
  background: var(--paper-2);
}
.preview__progress i {
  display: block;
  width: 5.5%;
  height: 100%;
  background: var(--forest);
}

.hero__stamp {
  position: absolute;
  left: -28px;
  bottom: -24px;
  width: 112px;
  height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6px var(--line);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.hero__stamp strong {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* ---------- 6. Resume ---------- */
.resume-wrap { padding-bottom: 0; }
.resume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.resume__label {
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest);
}
.resume__text { font-size: 13px; color: var(--muted); }
.resume__text strong { color: var(--ink); }
.resume__note { margin-top: 4px; font-size: 11px; color: var(--muted); }
.resume__actions { display: flex; align-items: center; gap: 8px; }

/* ---------- 7. Sections ---------- */
.section {
  padding-block: clamp(72px, 9vw, 120px);
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.46fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section-label {
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-head h2 {
  font-size: clamp(2.1rem, 4.2vw, 3.8rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
}
.section-note {
  max-width: 390px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- 8. Mode cards ---------- */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.mode-grid--tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.mode-card {
  min-height: 410px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line-2);
  transition: border-color 0.25s var(--ease-soft), transform 0.25s var(--ease);
}
.mode-card:hover { border-color: var(--ink); transform: translateY(-2px); }

.mode-card--all,
.mode-card--featured {
  position: relative;
  overflow: hidden;
  background: var(--forest);
  border-color: var(--forest);
  color: var(--paper);
}
.mode-card--all::after,
.mode-card--featured::after {
  content: "200";
  position: absolute;
  right: -12px;
  bottom: 38px;
  z-index: 0;
  font-family: var(--serif);
  font-size: 9rem;
  font-weight: 400;
  line-height: 0.6;
  letter-spacing: -0.08em;
  color: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.mode-card--featured::after { content: "110"; }
.mode-card--all > *,
.mode-card--featured > * { position: relative; z-index: 1; }

.mode-card--medium { box-shadow: inset 0 3px 0 var(--amber); }
.mode-card--hard { box-shadow: inset 0 3px 0 var(--red); }

.mode-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.mode-card__no {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}
.mode-card__count {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  text-align: right;
}
.mode-card--all .mode-card__count,
.mode-card--featured .mode-card__count { color: rgba(255, 255, 255, 0.72); }
.mode-card--featured .mode-card__no { color: rgba(255, 255, 255, 0.72); }

.mode-card__level {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest);
}
.mode-card--featured .mode-card__level { color: rgba(255, 255, 255, 0.72); }
.mode-card--medium .mode-card__level { color: #8a5d13; }
.mode-card--hard .mode-card__level { color: var(--red); }

.mode-card__body h3 {
  margin-bottom: 5px;
  font-size: clamp(1.7rem, 2.4vw, 2.15rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}
.mode-card__full {
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--forest);
}
.mode-card--all .mode-card__full,
.mode-card--featured .mode-card__full { color: rgba(255, 255, 255, 0.68); }
.mode-card__body > p:not(.mode-card__full):not(.mode-card__level) {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.mode-card--all .mode-card__body > p:not(.mode-card__level),
.mode-card--featured .mode-card__body > p:not(.mode-card__level) { color: rgba(255, 255, 255, 0.74); }

.mode-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}
.mode-card__chips li {
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.8);
}
.mode-card:not(.mode-card--featured) .mode-card__chips li {
  border-color: var(--line);
  color: var(--muted);
}

.mode-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
}
.mode-note > span {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--forest);
}
.mode-note strong { color: var(--ink); font-weight: 500; }

/* ---------- 9. Score band ---------- */
.score-section {
  position: relative;
  overflow: hidden;
  padding-block: clamp(72px, 9vw, 120px);
  background: var(--ink);
  color: var(--paper);
}
.score-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 88px 88px;
  pointer-events: none;
}
.score-section > .wrap { position: relative; z-index: 1; }

.section-head--light h2 { color: var(--paper); }
.section-label--light { color: rgba(255, 255, 255, 0.52); }
.section-note--light { color: rgba(255, 255, 255, 0.62); }

.rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.rule {
  padding: 28px 32px 30px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}
.rule:not(:first-child) { padding-left: 32px; }
.rule:last-child { padding-right: 0; border-right: 0; }
.rule__no {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--amber);
}
.rule h3 {
  margin: 18px 0 10px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.rule p {
  font-size: 12px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.62);
}

.formula {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-top: 36px;
}
.formula span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}
.formula strong {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3vw, 2.6rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-align: right;
  color: var(--paper);
}
.score-note {
  max-width: 720px;
  margin-top: 22px;
  font-size: 11px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------- 10. Coverage ---------- */
.coverage__table { border-top: 1px solid var(--ink); }
.coverage__row {
  display: grid;
  grid-template-columns: 70px 100px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.coverage__row strong {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
}
.coverage__row p { font-size: 12px; line-height: 1.7; color: var(--muted); }

/* ---------- 11. Footer ---------- */
.site-footer {
  display: grid;
  grid-template-columns: 1.2fr 0.6fr 0.8fr;
  gap: 32px;
  padding-block: 32px 40px;
  border-top: 1px solid var(--line);
}
.site-footer__brand a {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}
.site-footer__brand p {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
}
.site-footer__links { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer__links a {
  font-size: 11px;
  color: var(--muted);
  transition: color 0.2s;
}
.site-footer__links a:hover { color: var(--ink); }
.site-footer__copy {
  font-size: 10px;
  line-height: 1.7;
  text-align: right;
  color: var(--muted);
}

body[data-view="quiz"] .site-header,
body[data-view="quiz"] .site-footer { display: none; }
body[data-view="quiz"] { background-color: var(--paper-2); }

/* ---------- 12. Quiz shell ---------- */
.quiz-shell {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper-2);
}

.quizbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-inline: clamp(16px, 3vw, 32px);
  border-bottom: 1px solid var(--line);
  background: rgba(243, 239, 228, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.quizbar__exit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 0;
  font-size: 12px;
  color: var(--muted);
  transition: color 0.2s;
  flex-shrink: 0;
}
.quizbar__exit:hover { color: var(--ink); }
.quizbar__center {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-inline: auto;
  min-width: 0;
}
.quizbar__label {
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quizbar__progress {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.quizbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.quizbar__timer {
  min-width: 64px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-align: right;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span {
  width: 16px;
  height: 1px;
  background: var(--ink);
}

.quiz-layout {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  flex: 1;
}

/* ---------- 13. Navigator ---------- */
.navigator {
  position: sticky;
  top: 72px;
  height: calc(100svh - 72px);
  padding: 24px 20px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--paper);
}
.navigator__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.navigator__head h2 {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
#nav-close { display: none; }

.navigator__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted);
}
.navigator__legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-2);
}
.dot--done { background: var(--forest); }
.dot--current { background: var(--amber); }
.dot--flag { background: var(--red); }

.navigator__groups { margin-top: 24px; }
.nav-group { margin-bottom: 22px; }
.nav-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-group__head strong { color: var(--ink); font-weight: 500; }
.nav-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}
.nav-btn {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--white);
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  transition:
    background-color 0.18s var(--ease-soft),
    border-color 0.18s var(--ease-soft),
    color 0.18s var(--ease-soft);
}
.nav-btn:hover { border-color: var(--ink); color: var(--ink); }
.nav-btn.is-answered {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--paper);
}
.nav-btn.is-current {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
  border-color: var(--ink);
  color: var(--ink);
}
.nav-btn.is-answered.is-current { color: var(--paper); }
.nav-btn.is-flagged::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--amber);
}

.navigator__foot {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ---------- 14. Question panel ---------- */
.quiz-main {
  min-width: 0;
  padding: clamp(24px, 3.5vw, 48px) clamp(20px, 4vw, 64px) 64px;
}
.quiz-progress {
  height: 3px;
  margin-bottom: 20px;
  background: var(--line);
}
.quiz-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--forest);
  transition: width 0.3s var(--ease);
}

.question-panel {
  max-width: 960px;
  padding: clamp(24px, 4vw, 48px);
  background: var(--white);
  border: 1px solid var(--line-2);
  box-shadow: 6px 6px 0 rgba(22, 33, 29, 0.06);
}

.question-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.question-panel__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
}
.question-panel__number {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}

.q-difficulty {
  padding: 3px 7px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.q-difficulty--mudah { color: var(--forest); border-color: #b9d2c2; background: #e8f0ea; }
.q-difficulty--medium { color: #8a5d13; border-color: #dfc79f; background: #f6ead7; }
.q-difficulty--sulit { color: var(--red); border-color: #e0bdb5; background: #f7e7e3; }

.question-panel__question {
  max-width: 820px;
  font-size: clamp(1.22rem, 2.2vw, 1.7rem);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.025em;
  outline: none;
}

.question-panel__figure {
  margin-top: 24px;
  padding: 22px;
  border: 1px dashed var(--line-2);
  background: var(--paper);
  font-family: var(--mono);
  font-size: clamp(1rem, 1.9vw, 1.35rem);
  line-height: 2;
  letter-spacing: 0.06em;
  text-align: center;
  white-space: pre-wrap;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 32px;
}
.option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper);
  text-align: left;
  transition:
    background-color 0.2s var(--ease-soft),
    border-color 0.2s var(--ease-soft),
    transform 0.2s var(--ease);
}
.option:hover {
  border-color: var(--ink);
  background: var(--white);
  transform: translateY(-1px);
}
.option__letter {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.option__text {
  padding-top: 3px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
}
.option.is-selected {
  background: var(--ink);
  border-color: var(--ink);
}
.option.is-selected .option__letter {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}
.option.is-selected .option__text { color: var(--paper); }

.question-panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.flag-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 11px;
  color: var(--muted);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.flag-btn:hover { background: var(--paper-2); color: var(--ink); }
.flag-btn.is-flagged {
  color: #865717;
  background: #f6ead7;
  border-color: #dfc79f;
}

.quiz-hint {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 2;
  color: var(--muted);
}
.quiz-hint kbd {
  display: inline-block;
  min-width: 18px;
  padding: 1px 4px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  background: var(--paper);
  font-family: var(--mono);
  font-size: 9px;
  text-align: center;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(22, 33, 29, 0.42);
  backdrop-filter: blur(2px);
}
body.nav-open { overflow: hidden; }

/* ---------- 15. Result ---------- */
.result { padding-block: clamp(48px, 7vw, 88px) 80px; }
.result__head .section-label { margin-bottom: 20px; }
.result__headline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.52fr);
  align-items: end;
  gap: 48px;
}
.result__headline h1 {
  font-size: clamp(3.4rem, 8vw, 7.2rem);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.07em;
}
.result__headline h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.04em;
  color: var(--forest);
}
.result__headline h1 span {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 0.22em;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  vertical-align: super;
}
.result__headline p {
  padding-bottom: 10px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}
.result__headline .result__status {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.result__headline .result__status.is-pass { color: var(--forest); border-color: #b9d2c2; background: #e8f0ea; }
.result__headline .result__status.is-fail { color: var(--red); border-color: #e0bdb5; background: #f7e7e3; }
.result__headline .result__status.is-neutral { color: var(--muted); background: var(--paper-2); }

.result__grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.score-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px;
  background: var(--ink);
  color: var(--paper);
}
.score-ring {
  position: relative;
  width: min(230px, 70vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--amber) calc(var(--score, 0) * 1%), rgba(255, 255, 255, 0.12) 0);
}
.score-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--ink);
}
.score-ring > div {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.score-ring strong {
  font-family: var(--serif);
  font-size: 72px;
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.04em;
}
.score-ring span {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.score-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.score-facts div {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.score-facts div:nth-child(odd) { border-right: 1px solid rgba(255, 255, 255, 0.18); }
.score-facts div:nth-child(even) { padding-left: 18px; }
.score-facts dt {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.score-facts dd {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
}

.breakdown {
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--line-2);
}
.breakdown__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.breakdown__head h2 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.breakdown__head span {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  text-align: right;
}
.breakdown__row {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.breakdown__row:last-child { padding-bottom: 0; border-bottom: 0; }
.breakdown__row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 12px;
}
.breakdown__row-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.breakdown__row-score {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}
.bar { height: 4px; background: var(--paper-2); }
.bar i {
  display: block;
  height: 100%;
  background: var(--forest);
  transition: width 0.6s var(--ease);
}
.breakdown__row-note {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted);
}
.breakdown__note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
}

.result__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

/* ---------- 16. Review ---------- */
.review {
  margin-top: clamp(56px, 8vw, 96px);
  padding-top: clamp(36px, 5vw, 56px);
  border-top: 1px solid var(--line);
}
.review__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.review__head h2 {
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
}
.review__filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 10px;
  color: var(--muted);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.filter span {
  margin-left: 4px;
  font-family: var(--mono);
  font-size: 8px;
}
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.review-item { border-bottom: 1px solid var(--line); }
.review-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  text-align: left;
}
.review-number {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
}
.review-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.review-topic {
  overflow: hidden;
  font-size: 11px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-difficulty {
  padding-left: 8px;
  border-left: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.review-status {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.review-status.is-correct { color: var(--forest); }
.review-status.is-wrong { color: var(--red); }
.review-status.is-empty { color: var(--amber); }
.review-plus {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  color: var(--muted);
  transition: transform 0.2s var(--ease);
}
.review-item.is-open .review-plus { transform: rotate(45deg); }

.review-body {
  padding: 0 0 28px 56px;
}
.review-question {
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}
.review-figure {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px dashed var(--line-2);
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 2;
  text-align: center;
  white-space: pre-wrap;
}
.review-options { display: flex; flex-direction: column; gap: 6px; }
.review-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 12px;
  line-height: 1.6;
}
.review-option__letter {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted);
}
.review-option__text { padding-top: 2px; }
.review-option.is-key {
  border-color: var(--forest);
  background: #e9f0eb;
}
.review-option.is-key .review-option__letter {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--paper);
}
.review-option.is-wrong-pick {
  border-color: var(--red);
  background: #f7e9e5;
}
.review-option.is-wrong-pick .review-option__letter {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
}
.review-option__meta {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}
.review-label {
  padding: 3px 5px;
  border: 1px solid currentColor;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.review-option.is-key .review-label--key { color: var(--forest); }
.review-option.is-wrong-pick .review-label--pick { color: var(--red); }
.review-points {
  margin-left: auto;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
}
.review-explain {
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 2px solid var(--forest);
  background: var(--paper-2);
}
.review-explain strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--forest);
}
.review-explain p {
  font-size: 11px;
  line-height: 1.75;
  color: var(--muted);
}
.review-empty {
  padding: 40px 0;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- 17. Dialog, toast, noscript ---------- */
.dialog {
  width: min(460px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 10px 10px 0 rgba(22, 33, 29, 0.16);
}
.dialog::backdrop {
  background: rgba(22, 33, 29, 0.5);
  backdrop-filter: blur(3px);
}
.dialog form { padding: 28px; }
.dialog__eyebrow {
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest);
}
.dialog h2 {
  font-size: 26px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.04em;
}
.dialog__text {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}
.dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 26px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 100;
  padding: 14px 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
}

/* ---------- 18. Responsive ---------- */
@media (max-width: 1100px) {
  .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-grid--tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mode-card { min-height: 340px; }
  .hero { gap: 48px; }
  .result__grid { grid-template-columns: 330px minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .site-nav { display: none; }
  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 56px;
    padding-block: 56px 80px;
  }
  .hero__copy { max-width: 720px; }
  .hero__visual { width: min(100%, 560px); }
  .hero::after { font-size: 18rem; right: 0; bottom: 0; }
  .section-head,
  .result__headline { grid-template-columns: 1fr; gap: 20px; }
  .section-note { max-width: 560px; }
  .rules { grid-template-columns: 1fr; }
  .rule {
    padding: 24px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }
  .rule:not(:first-child) { padding-left: 0; }
  .rule:last-child { border-bottom: 0; }
  .result__grid { grid-template-columns: 1fr; }
  .score-card { flex-direction: row; justify-content: center; gap: 48px; }
  .score-ring { width: 210px; flex-shrink: 0; }
  .score-facts { width: auto; min-width: 260px; margin-top: 0; }
  .review__head { align-items: flex-start; flex-direction: column; gap: 18px; }
  .review-body { padding-left: 0; }
  .quiz-layout { grid-template-columns: 1fr; }
  .navigator {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 60;
    width: min(340px, 88vw);
    height: 100svh;
    padding: 20px;
    border-right: 1px solid var(--line-2);
    transform: translateX(-102%);
    transition: transform 0.32s var(--ease);
    box-shadow: 12px 0 32px rgba(22, 33, 29, 0.14);
  }
  .navigator.is-open { transform: none; }
  #nav-close { display: inline-grid; }
  .nav-toggle { display: inline-flex; }
  .quiz-main { padding-inline: clamp(16px, 4vw, 40px); }
}

@media (max-width: 700px) {
  :root { --gutter: 16px; }
  .site-header__inner { height: 66px; gap: 16px; }
  .brand__mark { width: 36px; height: 36px; }
  .brand__name { font-size: 13px; }
  .header-action { padding: 8px 10px; font-size: 11px; }
  .hero { padding-block: 44px 64px; }
  .hero h1 { font-size: clamp(2.8rem, 13vw, 4.2rem); }
  .hero__lead { font-size: 14px; }
  .hero__stats { gap: 26px; margin-top: 34px; }
  .hero__stats dt { font-size: 1.4rem; }
  .preview { box-shadow: 7px 7px 0 rgba(22, 33, 29, 0.14); }
  .preview__body { padding: 18px; }
  .hero__stamp { display: none; }
  .resume { align-items: flex-start; flex-direction: column; gap: 14px; }
  .mode-grid { grid-template-columns: 1fr; }
  .mode-card { min-height: 0; }
  .mode-card--all,
  .mode-card--featured { min-height: 330px; }
  .formula { align-items: flex-start; flex-direction: column; gap: 10px; }
  .formula strong { text-align: left; }
  .coverage__row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px 16px;
    padding: 18px 0;
  }
  .coverage__row p { grid-column: 1 / -1; }
  .site-footer { grid-template-columns: 1fr; gap: 20px; }
  .site-footer__copy { text-align: left; }
  .result { padding-block: 40px 64px; }
  .score-card {
    flex-direction: column;
    gap: 28px;
    padding: 24px;
  }
  .score-ring { width: min(220px, 70vw); }
  .score-facts { width: 100%; min-width: 0; }
  .breakdown { padding: 24px; }
  .breakdown__head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .breakdown__head span { text-align: left; }
  .result__actions .btn { width: 100%; justify-content: center; }
  .review-toggle { grid-template-columns: 32px minmax(0, 1fr) 18px; gap: 10px; }
  .review-status { grid-column: 2; justify-self: start; }
  .review-plus { grid-column: 3; grid-row: 1 / span 2; }
  .review-main { gap: 6px; }
  .review-topic { white-space: normal; }
  .review-option { flex-wrap: wrap; }
  .review-option__meta { margin-left: 32px; }
  .quizbar { height: 64px; gap: 8px; padding-inline: 12px; }
  .quizbar__label { display: none; }
  .quizbar__center { margin-inline: auto; }
  .quizbar__actions { gap: 7px; }
  .quizbar__timer { min-width: 0; font-size: 9px; }
  .quizbar__exit { font-size: 11px; }
  .quiz-main { padding: 16px 12px 48px; }
  .question-panel { padding: 22px 16px; box-shadow: 4px 4px 0 rgba(22, 33, 29, 0.06); }
  .question-panel__head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .question-panel__number { align-self: flex-end; }
  .question-panel__question { font-size: 1.16rem; }
  .question-panel__figure { padding: 16px 10px; font-size: 1rem; letter-spacing: 0.02em; }
  .option { padding: 13px 12px; gap: 10px; }
  .option__text { font-size: 13px; }
  .question-panel__foot {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .flag-btn {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-content: center;
    border-color: var(--line);
  }
  #prev-btn { grid-column: 1; grid-row: 2; justify-content: center; }
  #next-btn { grid-column: 2; grid-row: 2; justify-content: center; }
  .quiz-hint { display: none; }
  .dialog form { padding: 22px; }
  .dialog h2 { font-size: 23px; }
  .dialog__actions { flex-direction: column-reverse; }
  .dialog__actions .btn { width: 100%; }
}

@media (max-width: 420px) {
  .header-action span { display: none; }
  .hero__actions { align-items: stretch; flex-direction: column; }
  .hero__actions .btn { width: 100%; justify-content: space-between; }
  .hero__actions .btn--link { justify-content: center; }
  .quizbar__exit { gap: 4px; }
  .quizbar__exit span { display: none; }
  .quizbar__timer { display: none; }
  .quizbar__actions .btn--small { padding: 8px 9px; font-size: 10px; }
  .score-facts div { padding-block: 12px; }
  .score-facts dd { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
