/* ============================================================
   Prawko — style
   ============================================================ */

:root {
  --bg: #0a0d12;
  --bg-soft: #0e131b;
  --panel: #121924;
  --panel-2: #182130;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f6fa;
  --muted: #93a0b4;
  --red: #ff4d3d;
  --red-deep: #e02d1f;
  --green: #37d67a;
  --amber: #f6c453;
  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --radius-lg: 26px;
  --radius: 18px;
  --shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 84% -12%, rgba(255, 77, 61, 0.14), transparent 68%),
    radial-gradient(700px 420px at 4% 6%, rgba(48, 91, 168, 0.12), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

.page-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 62px 62px;
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 100%);
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

img,
svg {
  max-width: 100%;
}

::selection {
  background: rgba(255, 77, 61, 0.35);
  color: #fff;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 22px;
  font-family: var(--body);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease,
    box-shadow 0.18s ease, color 0.18s ease;
  text-align: center;
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, #ff5c4b, #e12a1c 70%);
  color: #fff;
  box-shadow: 0 14px 34px -16px rgba(255, 77, 61, 0.75);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ff6c5c, #ef3424 70%);
  box-shadow: 0 18px 40px -16px rgba(255, 77, 61, 0.9);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
}

.btn-light {
  background: #fff;
  color: #12161f;
  box-shadow: 0 16px 36px -20px rgba(0, 0, 0, 0.65);
}

.btn-light:hover {
  background: #f2f4f8;
}

.btn-lg {
  padding: 16px 27px;
  font-size: 15px;
}

.btn-sm {
  padding: 10px 18px;
  font-size: 13.5px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 13, 18, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(140deg, #ff5c4b, #cf2417);
  color: #fff;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 8px 20px -10px rgba(255, 77, 61, 0.8);
}

.brand-name {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-dot {
  color: var(--red);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: 8px;
}

.main-nav a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease;
}

.main-nav a:hover {
  color: var(--text);
}

.header-cta {
  margin-left: auto;
}

body[data-view="quiz"] .main-nav,
body[data-view="quiz"] .header-cta,
body[data-view="quiz"] .site-footer {
  display: none;
}

/* ------------------------------------------------------------ hero */

.view[hidden] {
  display: none;
}

.hero {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 70px;
  align-items: center;
  padding-top: 78px;
  padding-bottom: 26px;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aab7c9;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(55, 214, 122, 0.12);
  animation: softPulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

.hero-title {
  margin-top: 24px;
  font-family: var(--display);
  font-size: clamp(3.1rem, 6.6vw, 5.35rem);
  font-weight: 800;
  line-height: 0.93;
  letter-spacing: -0.05em;
}

.accent {
  position: relative;
  color: var(--red);
  white-space: nowrap;
}

.accent::after {
  content: "";
  position: absolute;
  left: 1.5%;
  right: 1.5%;
  bottom: -0.02em;
  height: 6px;
  border-radius: 4px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 77, 61, 0.75) 0 24px,
    transparent 24px 38px
  );
  opacity: 0.5;
}

.hero-lead {
  max-width: 50ch;
  margin-top: 26px;
  font-size: 17.5px;
  line-height: 1.7;
  color: #a6b2c4;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 26px;
  font-size: 12.5px;
  color: var(--muted);
}

.note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.note svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #6f8098;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.last-result {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border: 1px solid rgba(55, 214, 122, 0.26);
  border-radius: 999px;
  background: rgba(55, 214, 122, 0.07);
  color: #8fe3b1;
  font-size: 11.5px;
  font-weight: 500;
}

.last-result.is-fail {
  border-color: rgba(246, 196, 83, 0.3);
  background: rgba(246, 196, 83, 0.08);
  color: #f3d486;
}

/* ------------------------------------------------------------ hero mock */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 26px 10px 12px;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: -30px -10px 0;
  background: radial-gradient(closest-side, rgba(255, 77, 61, 0.22), transparent 72%);
  filter: blur(24px);
  z-index: 0;
  pointer-events: none;
}

.exam-mock {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: linear-gradient(160deg, #1b2433, #10151e 70%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transform: rotate(-1.6deg);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.exam-mock:hover {
  transform: rotate(0deg);
}

.mock-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.mock-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mock-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 77, 61, 0.12);
  animation: softPulse 2s ease-in-out infinite;
}

.mock-timer {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0;
  color: #d4dce8;
}

.mock-progress {
  height: 4px;
  margin-top: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.mock-progress span {
  display: block;
  width: 24%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff4d3d, #ff8a5c);
}

.mock-body {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  margin-top: 20px;
}

.mock-sign {
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.8);
}

.mock-sign svg {
  display: block;
  width: 100%;
}

.mock-meta {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #7e8ca2;
}

.mock-question {
  margin-top: 7px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: #eef2f8;
}

.mock-answers {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.mock-btn {
  padding: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #b2bfd1;
  background: rgba(255, 255, 255, 0.02);
}

.mock-btn.is-picked {
  border-color: rgba(255, 77, 61, 0.55);
  background: rgba(255, 77, 61, 0.13);
  color: #ffc4bd;
}

.mock-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: #7e8ca2;
}

.mock-score {
  font-family: var(--mono);
  font-size: 11.5px;
  color: #d9e1ec;
}

.floating-stamp {
  position: absolute;
  z-index: 2;
  top: 2px;
  right: 2px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid rgba(55, 214, 122, 0.3);
  border-radius: 14px;
  background: #12271c;
  color: #a9ecc4;
  font-size: 11.5px;
  line-height: 1.25;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  transform: rotate(3deg);
}

.floating-stamp strong {
  display: block;
  font-family: var(--mono);
  font-size: 13.5px;
  color: #e4ffee;
}

.stamp-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.stamp-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #082014;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------------------------------------------------------------ stats strip */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 44px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: 0 30px;
  border-left: 1px solid var(--line);
}

.stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.stat dt {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7f8ca0;
}

.stat dd {
  margin-top: 5px;
  font-family: var(--display);
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat dd span {
  font-family: var(--body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}

/* ------------------------------------------------------------ sections */

.section {
  padding-top: 96px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 36px;
}

.eyebrow {
  margin-bottom: 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}

.eyebrow--light {
  color: rgba(255, 255, 255, 0.75);
}

.section-head h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 3.4vw, 2.85rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.section-note {
  max-width: 330px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  text-align: right;
}

/* ------------------------------------------------------------ modes */

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.mode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.mode-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.16);
}

.mode-card--feature {
  border-color: transparent;
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(255, 255, 255, 0.18), transparent 65%),
    linear-gradient(155deg, #ff5948, #cf2418 72%);
  box-shadow: 0 30px 60px -34px rgba(255, 77, 61, 0.7);
}

.mode-card--feature:hover {
  border-color: transparent;
}

.mode-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: rgba(255, 77, 61, 0.11);
  color: #ff8a7c;
  flex-shrink: 0;
}

.mode-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mode-icon--soft {
  background: rgba(255, 255, 255, 0.055);
  color: #bdc9da;
}

.mode-card--feature .mode-icon {
  background: rgba(255, 255, 255, 0.17);
  color: #fff;
}

.card-tag {
  margin-top: 20px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7f8ca0;
}

.mode-card--feature .card-tag {
  color: rgba(255, 255, 255, 0.78);
}

.mode-card h3 {
  margin-top: 7px;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.mode-card p {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}

.mode-card--feature p {
  color: rgba(255, 255, 255, 0.83);
}

.mode-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.mode-meta span {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  color: #93a1b6;
  background: rgba(255, 255, 255, 0.02);
}

.mode-card--feature .mode-meta span {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.mode-card .btn,
.mode-card .text-link {
  margin-top: auto;
}

.mode-card .btn {
  margin-top: 24px;
  align-self: flex-start;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding-top: 20px;
  border: 0;
  background: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: color 0.15s ease;
}

.text-link span {
  color: var(--red);
  transition: transform 0.18s ease;
}

.text-link:hover {
  color: #fff;
}

.text-link:hover span {
  transform: translateX(3px);
}

.text-link--button {
  font-family: var(--body);
}

.text-link:disabled {
  color: #5d6a7d;
  cursor: not-allowed;
}

.text-link:disabled span {
  color: #5d6a7d;
}

/* ------------------------------------------------------------ categories */

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.category-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008));
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 77, 61, 0.38);
  background: linear-gradient(165deg, rgba(255, 77, 61, 0.06), rgba(255, 255, 255, 0.015));
}

.category-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.category-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #bdc9da;
}

.category-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.category-arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #7f8ca0;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.category-arrow svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.category-card:hover .category-arrow {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.category-name {
  margin-top: 16px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.category-desc {
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

.category-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  font-size: 11px;
  color: #7f8ca0;
}

.category-progress-row strong {
  font-weight: 600;
  color: #c4cfdd;
}

.category-bar {
  height: 5px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.category-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff4d3d, #ff9166);
  transition: width 0.5s ease;
}

/* ------------------------------------------------------------ rules */

.rules-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.75fr;
  gap: 48px;
  align-items: start;
}

.rules-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 20px;
  padding: 25px 0;
  border-top: 1px solid var(--line);
}

.rule:first-child {
  padding-top: 0;
  border-top: 0;
}

.rule-num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--red);
  padding-top: 2px;
}

.rule-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.rule-title h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.rule-tag {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93a1b6;
}

.rule p {
  max-width: 54ch;
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}

.points-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(170deg, #151d29, #10151e);
  box-shadow: var(--shadow);
}

.points-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.points-total {
  padding: 4px 10px;
  border: 1px solid rgba(255, 77, 61, 0.3);
  border-radius: 999px;
  background: rgba(255, 77, 61, 0.08);
  color: #ff9c90;
  font-family: var(--mono);
  font-size: 11px;
}

.points-table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
}

.points-table th {
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  color: #7f8ca0;
}

.points-table th:last-child,
.points-table td:last-child {
  text-align: right;
}

.points-table td {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.7;
  color: #b7c3d3;
  vertical-align: top;
}

.points-table td:first-child {
  color: var(--text);
  font-weight: 500;
}

.points-table td:last-child {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
}

.points-table tr:last-child td {
  border-bottom: 0;
}

.pass-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid rgba(55, 214, 122, 0.24);
  border-radius: 12px;
  background: rgba(55, 214, 122, 0.07);
  font-size: 12.5px;
  color: #a9e9c2;
}

.pass-line strong {
  font-family: var(--mono);
  font-size: 16px;
  color: #d7ffe8;
}

.points-foot {
  margin-top: 12px;
  font-size: 11.5px;
  color: #7f8ca0;
}

/* ------------------------------------------------------------ CTA band */

.cta-band {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-top: 100px;
  margin-bottom: 92px;
  padding: 52px 54px;
  border-radius: 30px;
  background:
    radial-gradient(650px 320px at 92% 0%, rgba(255, 255, 255, 0.19), transparent 62%),
    linear-gradient(118deg, #ec3b2a, #a8160e 82%);
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  right: 22%;
  top: -40%;
  width: 2px;
  height: 180%;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.28) 0 26px,
    transparent 26px 52px
  );
  transform: rotate(24deg);
  opacity: 0.4;
}

.cta-band h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.cta-band p {
  max-width: 47ch;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
}

.cta-band .btn {
  position: relative;
  flex-shrink: 0;
}

/* ------------------------------------------------------------ footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 42px 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr auto;
  gap: 40px;
  align-items: start;
}

.footer-brand p {
  max-width: 34ch;
  margin-top: 12px;
  font-size: 12.5px;
  color: #7f8ca0;
}

.footer-note {
  font-size: 11px;
  line-height: 1.7;
  color: #6b788b;
}

.footer-year {
  font-size: 11.5px;
  color: #6b788b;
  white-space: nowrap;
}

/* ============================================================
   QUIZ
   ============================================================ */

.quiz-shell {
  max-width: 900px;
  padding-top: 34px;
  padding-bottom: 90px;
}

.quiz-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
}

.round-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  color: #b7c3d3;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
  flex-shrink: 0;
}

.round-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-strong);
  color: #fff;
}

.round-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quiz-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aab7c9;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 77, 61, 0.12);
}

.quiz-timer {
  margin-left: auto;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.quiz-timer.is-urgent {
  border-color: rgba(255, 77, 61, 0.45);
  background: rgba(255, 77, 61, 0.1);
  color: #ff9c90;
  animation: softPulse 1.6s ease-in-out infinite;
}

.quiz-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
}

.quiz-progress-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.quiz-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff4d3d, #ff8b63);
  transition: width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.quiz-progress-label {
  font-size: 11.5px;
  color: #8b98ac;
  white-space: nowrap;
}

.question-card {
  margin-top: 22px;
}

.q-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  box-shadow: 0 26px 70px -46px rgba(0, 0, 0, 0.9);
  animation: qIn 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.q-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.q-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #93a1b6;
  background: rgba(255, 255, 255, 0.025);
}

.chip-scope {
  border-color: rgba(255, 77, 61, 0.28);
  background: rgba(255, 77, 61, 0.09);
  color: #ff9e92;
}

.chip-ghost {
  background: transparent;
}

.q-clock {
  width: 116px;
  flex-shrink: 0;
  text-align: right;
}

.q-clock-time {
  font-family: var(--mono);
  font-size: 11.5px;
  color: #8b98ac;
  font-variant-numeric: tabular-nums;
}

.q-clock-bar {
  height: 4px;
  margin-top: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.q-clock-bar i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff4d3d, #ffa15c);
  transition: width 0.2s linear;
}

.q-clock.is-urgent .q-clock-time {
  color: #ff9c90;
}

.q-body {
  margin-top: 20px;
}

.q-figure {
  width: 164px;
  margin-bottom: 22px;
  padding: 9px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.85);
}

.q-figure svg {
  display: block;
  width: 100%;
}

.q-prompt {
  max-width: 62ch;
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.025em;
}

.q-options {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.q-options--yesno {
  grid-template-columns: 1fr 1fr;
}

.q-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 15px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
  color: var(--text);
  font-family: var(--body);
  font-size: 14.5px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.q-option:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.24);
}

.q-option:active:not(:disabled) {
  transform: scale(0.995);
}

.q-option:disabled {
  cursor: default;
}

.option-marker {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 11.5px;
  font-weight: 600;
  color: #9fadc1;
  flex-shrink: 0;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.option-text {
  flex: 1;
}

.q-option kbd {
  margin-left: auto;
}

.q-option--yesno {
  justify-content: center;
  padding: 18px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.q-option--yesno kbd {
  margin-left: 6px;
}

.q-option.is-selected {
  border-color: rgba(255, 77, 61, 0.6);
  background: rgba(255, 77, 61, 0.1);
}

.q-option.is-selected .option-marker {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.q-option.is-correct {
  border-color: rgba(55, 214, 122, 0.55);
  background: rgba(55, 214, 122, 0.09);
}

.q-option.is-correct .option-marker {
  border-color: var(--green);
  background: var(--green);
  color: #062414;
}

.q-option.is-wrong {
  border-color: rgba(255, 77, 61, 0.55);
  background: rgba(255, 77, 61, 0.09);
}

.q-option.is-wrong .option-marker {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.q-feedback {
  margin-top: 22px;
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  animation: qIn 0.28s ease both;
}

.q-feedback.is-good {
  border-color: rgba(55, 214, 122, 0.28);
  background: rgba(55, 214, 122, 0.055);
}

.q-feedback.is-bad {
  border-color: rgba(255, 77, 61, 0.3);
  background: rgba(255, 77, 61, 0.055);
}

.feedback-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.q-feedback.is-good .feedback-head {
  color: #7fe3a8;
}

.q-feedback.is-bad .feedback-head {
  color: #ff9f94;
}

.feedback-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
}

.q-feedback.is-good .feedback-icon {
  background: rgba(55, 214, 122, 0.16);
  color: #9ff0bf;
}

.q-feedback.is-bad .feedback-icon {
  background: rgba(255, 77, 61, 0.16);
  color: #ffb4ab;
}

.q-feedback p {
  margin-top: 9px;
  font-size: 13.5px;
  line-height: 1.65;
  color: #bcc7d7;
}

.q-feedback .feedback-answer {
  margin-top: 8px;
  font-size: 12.5px;
  color: #93a1b6;
}

.feedback-answer strong {
  color: #e6ecf5;
  font-weight: 600;
}

.kbd,
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--mono);
  font-size: 10px;
  color: #95a3b7;
  line-height: 1;
}

.quiz-underbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
}

.key-hint {
  font-size: 12px;
  color: #7f8ca0;
}

.key-hint kbd {
  margin: 0 1px;
}

#nextBtn {
  min-width: 190px;
}

/* ============================================================
   RESULTS
   ============================================================ */

.results-shell {
  max-width: 940px;
  padding-top: 46px;
  padding-bottom: 96px;
}

.result-hero {
  text-align: center;
}

.verdict-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #b9c5d5;
}

.verdict-badge.is-pass {
  border-color: rgba(55, 214, 122, 0.32);
  background: rgba(55, 214, 122, 0.09);
  color: #8fe7b3;
}

.verdict-badge.is-fail {
  border-color: rgba(255, 77, 61, 0.34);
  background: rgba(255, 77, 61, 0.09);
  color: #ffa599;
}

.result-title {
  margin-top: 18px;
  font-family: var(--display);
  font-size: clamp(2.6rem, 5.4vw, 4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.result-sub {
  max-width: 54ch;
  margin: 14px auto 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}

.score-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.score-main {
  font-family: var(--display);
  font-size: clamp(4.2rem, 8vw, 5.8rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
}

.score-max {
  font-size: 16px;
  font-weight: 500;
  color: #8b98ac;
}

.score-track-wrap {
  position: relative;
  max-width: 520px;
  margin: 30px auto 0;
  padding-bottom: 26px;
}

.score-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
}

.score-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2cb566, #47e08c);
  transition: width 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.score-track-wrap.is-fail .score-fill {
  background: linear-gradient(90deg, #d5684a, #ff5c4b);
}

.score-threshold {
  position: absolute;
  top: -5px;
  bottom: -5px;
  left: 91.89%;
  width: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.55);
}

.score-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  font-size: 10.5px;
  color: #7f8ca0;
  font-variant-numeric: tabular-nums;
}

.scale-max {
  color: #93a1b6;
}

.score-threshold-label {
  position: absolute;
  left: 91.89%;
  bottom: 0;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #a9e9c2;
  white-space: nowrap;
}

.score-track-wrap.is-training .score-threshold {
  display: none;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 46px;
}

.stat-tile {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.stat-tile-value {
  font-family: var(--display);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.stat-tile-label {
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7f8ca0;
}

.result-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 14px;
  margin-top: 14px;
}

.panel-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.022);
}

.panel-card h3 {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.panel-sub {
  margin-top: 3px;
  font-size: 11.5px;
  color: #7f8ca0;
}

.breakdown-list {
  display: grid;
  gap: 13px;
  margin-top: 18px;
}

.breakdown-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
}

.breakdown-name {
  font-size: 12.5px;
  color: #c0cbda;
}

.breakdown-value {
  font-size: 11px;
  color: #8794a8;
  font-variant-numeric: tabular-nums;
}

.breakdown-bar {
  grid-column: 1 / -1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.breakdown-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.42);
}

.breakdown-bar span.is-good {
  background: linear-gradient(90deg, #2cb566, #47e08c);
}

.session-list {
  display: grid;
  gap: 0;
  margin-top: 14px;
}

.session-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
}

.session-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.session-row span {
  color: #8794a8;
}

.session-row strong {
  font-weight: 500;
  color: #dbe3ee;
  text-align: right;
}

.review {
  margin-top: 54px;
}

.review-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.review-head h2 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.filter-group {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
}

.filter-btn {
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: #93a1b6;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.filter-btn:hover {
  color: #fff;
}

.filter-btn.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.review-list {
  display: grid;
  gap: 9px;
}

.review-item {
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.review-item.is-correct {
  border-left-color: rgba(55, 214, 122, 0.65);
}

.review-item.is-wrong {
  border-left-color: rgba(255, 77, 61, 0.7);
}

.review-item.is-skipped {
  border-left-color: rgba(246, 196, 83, 0.7);
}

.review-summary {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 17px;
  cursor: pointer;
  list-style: none;
}

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

.review-summary:hover {
  background: rgba(255, 255, 255, 0.025);
}

.review-status {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.review-item.is-correct .review-status {
  background: rgba(55, 214, 122, 0.14);
  color: #7fe3a8;
}

.review-item.is-wrong .review-status {
  background: rgba(255, 77, 61, 0.14);
  color: #ffa599;
}

.review-item.is-skipped .review-status {
  background: rgba(246, 196, 83, 0.14);
  color: #f6d88f;
}

.review-question {
  flex: 1;
  font-size: 13px;
  line-height: 1.5;
  color: #c8d2e0;
}

.review-points {
  font-family: var(--mono);
  font-size: 10.5px;
  color: #7f8ca0;
  white-space: nowrap;
}

.review-chevron {
  width: 12px;
  height: 12px;
  color: #6f7d91;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.review-chevron svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.review-item[open] .review-chevron {
  transform: rotate(180deg);
}

.review-body {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  padding: 4px 17px 19px 55px;
}

.review-sign {
  padding: 7px;
  border-radius: 12px;
  background: #fff;
  align-self: start;
}

.review-sign svg {
  display: block;
  width: 100%;
}

.review-prompt {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.55;
  color: #e4eaf3;
}

.review-options {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.review-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #a9b5c6;
}

.review-option.is-correct {
  border-color: rgba(55, 214, 122, 0.4);
  background: rgba(55, 214, 122, 0.065);
  color: #c9f5da;
}

.review-option.is-picked.is-wrong {
  border-color: rgba(255, 77, 61, 0.4);
  background: rgba(255, 77, 61, 0.065);
  color: #ffc5bd;
}

.review-option-mark {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.8;
  color: inherit;
  opacity: 0.7;
  flex-shrink: 0;
}

.review-explanation {
  margin-top: 11px;
  padding: 11px 13px;
  border-left: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 0 8px 8px 0;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12.5px;
  line-height: 1.65;
  color: #aab6c7;
}

.review-answer-line {
  margin-top: 8px;
  font-size: 12px;
  color: #8b98ac;
}

.review-answer-line strong {
  color: #dbe4ef;
  font-weight: 600;
}

.review-empty {
  padding: 26px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ============================================================
   MODAL
   ============================================================ */

.modal {
  width: min(430px, calc(100vw - 32px));
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: #141b26;
  color: var(--text);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.9);
}

.modal::backdrop {
  background: rgba(4, 6, 10, 0.7);
  backdrop-filter: blur(5px);
}

.modal h2 {
  margin-top: 6px;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.modal p {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 24px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

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

@keyframes softPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-top: 60px;
  }

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

  .hero-visual {
    padding-top: 12px;
  }

  .exam-mock {
    max-width: 470px;
  }

  .mode-grid {
    grid-template-columns: 1fr 1fr;
  }

  .mode-card--feature {
    grid-column: 1 / -1;
  }

  .rules-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .points-card {
    max-width: 500px;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .main-nav {
    display: none;
  }

  .category-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section {
    padding-top: 76px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .section-note {
    max-width: none;
    text-align: left;
  }

  .cta-band {
    padding: 40px;
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .result-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .review-body {
    padding-left: 17px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 18px;
  }

  .header-inner {
    height: 64px;
    gap: 16px;
  }

  .header-cta {
    margin-left: auto;
    padding: 9px 15px;
    font-size: 12.5px;
  }

  .hero {
    padding-top: 42px;
    gap: 34px;
  }

  .hero-title {
    font-size: clamp(2.9rem, 14vw, 4rem);
  }

  .hero-lead {
    font-size: 15.5px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-visual {
    padding-left: 0;
    padding-right: 0;
  }

  .floating-stamp {
    right: 0;
    top: -6px;
  }

  .stat-strip {
    grid-template-columns: 1fr 1fr;
    gap: 22px 0;
    margin-top: 32px;
  }

  .stat {
    padding: 0 18px;
  }

  .stat:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .stat dt {
    font-size: 9.5px;
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .mode-card--feature {
    grid-column: auto;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .rule {
    grid-template-columns: 38px 1fr;
    gap: 14px;
  }

  .cta-band {
    margin-top: 72px;
    margin-bottom: 68px;
    padding: 32px 26px;
  }

  .site-footer {
    padding: 32px 0;
  }

  .quiz-shell {
    padding-top: 22px;
    padding-bottom: 64px;
  }

  .quiz-timer {
    font-size: 15px;
    padding: 7px 11px;
  }

  .q-card {
    padding: 22px;
    border-radius: 22px;
  }

  .q-head {
    flex-direction: column;
    gap: 12px;
  }

  .q-clock {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
  }

  .q-clock-bar {
    flex: 1;
    margin-top: 0;
  }

  .q-figure {
    width: 132px;
  }

  .q-options--yesno {
    grid-template-columns: 1fr;
  }

  .q-option {
    padding: 14px 15px;
  }

  .quiz-underbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  #nextBtn {
    width: 100%;
  }

  .key-hint {
    text-align: center;
  }

  .results-shell {
    padding-top: 30px;
    padding-bottom: 64px;
  }

  .score-max {
    font-size: 14px;
  }

  .result-stats {
    margin-top: 34px;
  }

  .review-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .review-body {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .review-sign {
    width: 96px;
  }

  .review-points {
    display: none;
  }

  .review-question {
    font-size: 12.5px;
  }

  .modal {
    padding: 22px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .brand-name {
    font-size: 18px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    font-size: 18px;
    border-radius: 9px;
  }

  .eyebrow-pill {
    font-size: 10px;
    letter-spacing: 0.05em;
  }

  .floating-stamp {
    padding: 7px 10px;
    font-size: 10.5px;
  }

  .floating-stamp strong {
    font-size: 12px;
  }

  .mock-body {
    grid-template-columns: 70px 1fr;
  }

  .mock-question {
    font-size: 14px;
  }

  .q-option--yesno {
    letter-spacing: 0.08em;
  }
}

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