:root {
  --bg: #fbf7ef;
  --bg-2: #f7f1e4;
  --ink: #45210e;
  --ink-soft: #5a2e15;
  --muted: #7a4c2e;
  --line: #e3d8c5;
  --accent: #f4ba17;
  --accent-dark: #e2ac13;
  --accent-soft: #fdf1d3;
  --good: #567a2e;
  --bad: #a23b22;
  --warn: #a56d44;
  --info: #2f6e7a;
  --card: #fff;
  --brand-900: #45210e;
  --brand-700: #71401f;
  --gold-400: #f6c437;
  --cream: #fbf7ef;
  --shadow: 0 1px 2px #45210e14, 0 8px 24px #45210e1f;
  --shadow-lg: 0 2px 4px #45210e14, 0 18px 40px #45210e29;
  --dur-fast: 0.12s;
  --dur-base: 0.2s;
  --dur-slow: 0.36s;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --logo-url: url(/cyberskill-logo.svg);
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin: 0;
  padding: 0;
  font-family:
    Red Hat Text,
    Red Hat Display,
    -apple-system,
    BlinkMacSystemFont,
    Segoe UI,
    Inter,
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.55;
  overflow-x: hidden;
}
img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}
pre,
code {
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
body.no-select,
body.no-select * {
  -webkit-user-select: none;
  user-select: none;
}
em,
i {
  color: var(--brand-700);
  font-style: normal;
  font-weight: 700;
}
a {
  color: var(--brand-700);
  text-underline-offset: 3px;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  -webkit-text-decoration-color: var(--accent);
  text-decoration-color: var(--accent);
  transition:
    color var(--dur-fast) var(--ease-out),
    text-decoration-color var(--dur-fast) var(--ease-out);
}
a:hover {
  color: var(--ink);
  -webkit-text-decoration-color: var(--accent-dark);
  text-decoration-color: var(--accent-dark);
}
h1,
h2,
h3,
h4 {
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.5em;
  font-family:
    Red Hat Text,
    Red Hat Display,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    Segoe UI,
    sans-serif;
  font-weight: 700;
  line-height: 1.18;
}
h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 700;
}
h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 700;
}
h3 {
  font-size: 1.2rem;
  font-weight: 700;
}
p {
  color: var(--ink-soft);
  margin: 0.4em 0 0.9em;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}
.badge {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  background: var(--ink);
  color: var(--accent);
  border: 1px solid var(--ink);
  border-radius: 999px;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
}
.pill {
  background: var(--bg-2);
  height: 36px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  padding: 0 18px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
}
.chip {
  letter-spacing: 0.01em;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: #fff;
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--brand-700);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-block;
}
.slogan {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brand-700);
  font-size: 0.68rem;
  font-weight: 700;
}
.topbar {
  z-index: 40;
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
  background: #fbf7efe0;
  position: sticky;
  top: 0;
}
.topbar-inner {
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  display: flex;
}
.brand {
  color: var(--ink);
  align-items: center;
  gap: 12px;
  text-decoration: none;
  display: flex;
}
.brand-mark {
  background-color: var(--brand-900);
  background-image: var(--logo-url);
  width: 40px;
  height: 40px;
  box-shadow: var(--shadow);
  background-position: 50%;
  background-size: cover;
  border-radius: 10px;
  flex: 0 0 40px;
}
.brand-mark.sm {
  border-radius: 8px;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
}
.brand-wordmark {
  flex-direction: column;
  min-width: 0;
  line-height: 1.1;
  display: flex;
}
.brand-name {
  letter-spacing: -0.01em;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
}
.brand-sub {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold-400);
  margin-top: 2px;
  font-size: 0.66rem;
  font-weight: 700;
}
.nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px 18px;
  display: flex;
}
.nav a {
  color: var(--ink);
  transition:
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
  border-bottom: 2px solid #0000;
  padding: 6px 2px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}
.nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.hero {
  padding: 60px 0 40px;
  position: relative;
  overflow: hidden;
}
.hero:before {
  content: '';
  pointer-events: none;
  background:
    radial-gradient(1000px 400px at 85% -10%, #f4ba171a, #0000 60%),
    radial-gradient(700px 260px at 10% 20%, #45210e08, #0000 60%);
  position: absolute;
  inset: 0;
}
.hero-grid {
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 36px;
  display: grid;
}
@media (width<=900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}
.hero h1 span {
  background: linear-gradient(
    120deg,
    var(--accent-dark) 0%,
    var(--accent) 60%,
    var(--gold-400) 100%
  );
  color: #0000;
  -webkit-background-clip: text;
  background-clip: text;
  font-weight: 700;
}
.hero p.lede {
  color: var(--ink-soft);
  font-size: 1.1rem;
}
.hero-slogan {
  margin-bottom: 14px;
}
.hero-card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 20px;
  padding: 22px;
}
.hero-stats {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
  display: grid;
}
.stat {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.stat .k {
  color: var(--ink);
  letter-spacing: -0.01em;
  font-family:
    Red Hat Text,
    system-ui,
    sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
}
.stat .l {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
}
.cta-row {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  display: flex;
}
.btn {
  cursor: pointer;
  text-align: center;
  color: var(--ink);
  background: 0 0;
  border: 1px solid #0000;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  background: var(--ink);
  color: var(--cream);
  box-shadow:
    0 2px 0 #45210e2e,
    var(--shadow);
}
.btn.primary:hover {
  background: var(--brand-700);
  color: var(--cream);
}
.btn.accent {
  background: var(--accent);
  color: var(--ink);
  box-shadow:
    0 2px 0 #e2ac1359,
    var(--shadow);
}
.btn.accent:hover {
  background: var(--accent-dark);
  color: var(--ink);
}
.btn.ghost {
  color: var(--ink);
  border-color: var(--line);
  background: 0 0;
}
.btn.ghost:hover {
  background: var(--bg-2);
  border-color: var(--brand-700);
}
.btn.small {
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.85rem;
}
.btn svg {
  stroke-width: 1.75px;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  width: 16px;
  height: 16px;
}
section {
  padding: 50px 0;
}
.section-head {
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
  display: flex;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 16px;
  padding: 22px;
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  display: grid;
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  display: grid;
}
@media (width<=900px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
.feature h3 {
  margin-top: 4px;
}
.feature .ico {
  background: var(--accent-soft);
  width: 44px;
  height: 44px;
  color: var(--ink);
  border: 1px solid #45210e14;
  border-radius: 12px;
  place-items: center;
  font-weight: 700;
  display: grid;
}
.feature .ico svg {
  width: 22px;
  height: 22px;
  stroke: var(--ink);
  stroke-width: 1.75px;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.steps {
  counter-reset: step;
  gap: 12px;
  display: grid;
}
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px 16px 60px;
  position: relative;
}
.step:before {
  counter-increment: step;
  content: counter(step);
  background: var(--ink);
  width: 32px;
  height: 32px;
  color: var(--accent);
  border-radius: 50%;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 700;
  display: grid;
  position: absolute;
  top: 16px;
  left: 16px;
}
.step h4 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}
.step p {
  color: var(--ink-soft);
  margin: 0;
}
.reddit {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 16px;
  display: grid;
}
.reddit .logo {
  color: #fff;
  letter-spacing: -0.02em;
  background: #d13800;
  border-radius: 12px;
  place-items: center;
  width: 48px;
  height: 48px;
  font-family:
    Red Hat Text,
    system-ui,
    sans-serif;
  font-weight: 800;
  display: grid;
}
.reddit .meta {
  color: var(--muted);
  margin-bottom: 8px;
  font-size: 0.85rem;
}
.reddit blockquote {
  background: var(--bg-2);
  border-left: 3px solid var(--accent);
  color: var(--ink-soft);
  border-radius: 8px;
  margin: 0;
  padding: 14px 16px;
  font-style: normal;
}
.reddit .links {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  display: flex;
}
.reddit .links .chip {
  background: var(--card);
}
.donate {
  background: linear-gradient(135deg, var(--accent-soft) 0%, #fce7a3 100%);
  box-shadow: var(--shadow);
  border: 1px solid #ebc966;
  border-radius: 20px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 22px;
  display: grid;
}
@media (width<=700px) {
  .donate {
    text-align: center;
    grid-template-columns: 1fr;
    justify-items: center;
  }
}
.donate .coin {
  background: var(--ink);
  width: 56px;
  height: 56px;
  color: var(--accent);
  box-shadow:
    0 2px 0 #45210e2e,
    var(--shadow);
  border-radius: 14px;
  place-items: center;
  display: grid;
}
.donate .coin svg {
  width: 30px;
  height: 30px;
  stroke: var(--accent);
  stroke-width: 1.75px;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.donate h3 {
  color: var(--ink);
  margin: 0 0 4px;
}
.donate p {
  color: var(--ink-soft);
  margin: 0;
}
#exam {
  scroll-margin-top: 80px;
}
.exam-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 16px;
  overflow: hidden;
}
.exam-head {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  display: flex;
}
.exam-head .title {
  align-items: center;
  gap: 10px;
  font-weight: 700;
  display: flex;
}
.timer {
  background: var(--ink);
  color: var(--accent);
  border: 1px solid var(--ink);
  text-align: center;
  letter-spacing: 0.04em;
  border-radius: 10px;
  min-width: 96px;
  padding: 6px 12px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.2rem;
  font-weight: 700;
}
.timer.warn {
  color: #7a4e00;
  background: #fdf1d3;
  border-color: #e2ac13;
}
.timer.danger {
  color: #6e2614;
  background: #f5d9d1;
  border-color: #a23b22;
}
.exam-body {
  padding: 18px;
}
.start-grid {
  grid-template-columns: 1.1fr 1fr;
  gap: 18px;
  display: grid;
}
@media (width<=800px) {
  .start-grid {
    grid-template-columns: 1fr;
  }
}
.option-row {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 12px 14px;
  display: flex;
}
.option-row label {
  font-weight: 600;
}
.option-row input[type='number'] {
  border: 1px solid var(--line);
  width: 90px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
}
.option-row.fixed .opt-label {
  font-weight: 600;
}
.option-row.fixed .opt-val {
  color: var(--ink);
  letter-spacing: -0.01em;
  align-items: baseline;
  gap: 6px;
  font-family:
    Red Hat Text,
    system-ui,
    sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  display: inline-flex;
}
.option-row.fixed .opt-val small {
  color: var(--muted);
  letter-spacing: 0.02em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 500;
}
.toggle {
  align-items: center;
  gap: 6px;
  display: inline-flex;
}
.toggle input {
  transform: scale(1.15);
}
.rules {
  background: var(--bg-2);
  border: 1px dashed #c9bfa9;
  border-radius: 12px;
  padding: 14px 16px;
}
.rules ul {
  margin: 8px 0 0 18px;
  padding: 0;
}
.rules li {
  color: var(--ink-soft);
  margin: 4px 0;
}
.kbd {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 6px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.82em;
}
.q-layout {
  grid-template-columns: 1fr 240px;
  gap: 18px;
  display: grid;
}
@media (width<=900px) {
  .q-layout {
    grid-template-columns: 1fr;
  }
}
.q-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 20px;
}
.q-num {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}
.q-text {
  white-space: pre-wrap;
  color: var(--ink);
  margin: 4px 0 14px;
  font-size: 1.05rem;
}
.opt {
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
  border-radius: 12px;
  gap: 12px;
  margin-bottom: 10px;
  padding: 12px 14px;
  display: flex;
}
.opt:hover {
  border-color: var(--brand-700);
  background: var(--accent-soft);
}
.opt:active {
  transform: translateY(1px);
}
.opt .letter {
  border: 1px solid var(--line);
  height: 30px;
  color: var(--ink-soft);
  background: #fff;
  border-radius: 8px;
  flex: 0 0 30px;
  place-items: center;
  font-weight: 700;
  display: grid;
}
.opt .txt {
  color: var(--ink);
  white-space: pre-wrap;
  flex: 1;
}
.opt.sel {
  border-color: var(--accent-dark);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-dark);
}
.opt.sel .letter {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent-dark);
}
.opt.correct {
  border-color: var(--good);
  background: #eef3e4;
}
.opt.correct .letter {
  background: var(--good);
  color: #fff;
  border-color: var(--good);
}
.opt.incorrect {
  border-color: var(--bad);
  background: #f9e6df;
}
.opt.incorrect .letter {
  background: var(--bad);
  color: #fff;
  border-color: var(--bad);
}
.opt.disabled {
  cursor: default;
}
.opt .why {
  color: var(--ink-soft);
  background: var(--bg-2);
  border-left: 3px solid var(--line);
  white-space: pre-wrap;
  border-radius: 0 8px 8px 0;
  margin-top: 8px;
  padding: 8px 10px;
  font-size: 0.92rem;
}
code.mark {
  background: var(--accent-soft);
  color: var(--ink);
  white-space: nowrap;
  border: 1px solid #ebc966;
  border-radius: 6px;
  padding: 1px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  font-weight: 700;
}
.r-opt.is-correct code.mark {
  color: #2e4416;
  background: #e0e9ca;
  border-color: #b9c998;
}
.r-opt.is-wrong code.mark {
  color: #6e2614;
  background: #f5d9d1;
  border-color: #d9a99c;
}
.q-text code.mark {
  background: #fde8a8;
  border-color: #e8be3e;
}
.q-actions {
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  display: flex;
}
.q-actions .flag {
  color: var(--ink-soft);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  align-items: center;
  gap: 6px;
  display: inline-flex;
}
.palette {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #fff;
  border-radius: 14px;
  align-self: start;
  padding: 14px;
  position: sticky;
  top: 78px;
}
.palette h4 {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-700);
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
}
.palette-grid {
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  display: grid;
}
.palette-grid button {
  appearance: none;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  background: #fff;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  padding: 6px 0;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  display: flex;
}
.palette-grid button:hover {
  border-color: var(--brand-700);
}
.palette-grid button.answered {
  color: #2e4416;
  background: #e4edd0;
  border-color: #b9c998;
}
.palette-grid button.flagged {
  background: var(--accent-soft);
  color: var(--ink);
  border-color: #ebc966;
}
.palette-grid button.current {
  outline: 2px solid var(--accent-dark);
  outline-offset: 1px;
}
.palette-grid button.current.answered {
  color: #2e4416;
}
.palette-legend {
  color: var(--muted);
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.76rem;
  font-weight: 700;
  display: flex;
}
.swatch-item {
  color: var(--ink-soft);
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  display: flex;
}
.swatch {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 3px;
  width: 12px;
  height: 12px;
}
.swatch.ans {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.swatch.flag {
  background: #fdf1d3;
  border-color: #ebc966;
}
.swatch.un {
  background: #fff;
}
.progress {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 8px;
  margin-top: 6px;
  overflow: hidden;
}
.progress > span {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-dark) 100%);
  height: 100%;
  transition: width 0.3s;
  display: block;
}
.result-hero {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--cream), #f7ecce);
  box-shadow: var(--shadow-lg);
  border-radius: 20px;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 24px;
  display: grid;
}
.score-ring {
  width: 200px;
  height: 200px;
  position: relative;
}
.score-ring.big {
  width: 240px;
  height: 240px;
}
.score-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.score-ring .s-bg {
  stroke: var(--bg-2);
}
.score-ring .s-fg {
  stroke: var(--accent);
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 0.9, 0.32, 1);
}
.score-ring .center {
  text-align: center;
  place-items: center;
  display: grid;
  position: absolute;
  inset: 0;
}
.score-ring .val {
  color: var(--ink);
  letter-spacing: -0.02em;
  font-family:
    Red Hat Text,
    system-ui,
    sans-serif;
  font-size: 3rem;
  font-weight: 700;
}
.score-ring .label {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-700);
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}
.score-ring .pct {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--muted);
  letter-spacing: 0.04em;
  border-radius: 999px;
  margin-top: 8px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}
.result-kpis {
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 16px;
  display: grid;
}
.result-v2 {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--cream) 0%, #f7ecce 55%, #eedba4 100%);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 20px 60px -30px #45210e59,
    inset 0 1px #ffffffb3;
}
.result-v2:before {
  content: '';
  pointer-events: none;
  background: radial-gradient(circle at 30% 30%, #f4ba1742, #f4ba1700 60%);
  border-radius: 50%;
  width: 320px;
  height: 320px;
  position: absolute;
  top: -120px;
  right: -120px;
}
.result-v2:after {
  content: '';
  pointer-events: none;
  background: radial-gradient(circle at 70% 70%, #567a2e24, #567a2e00 60%);
  border-radius: 50%;
  width: 380px;
  height: 380px;
  position: absolute;
  bottom: -140px;
  left: -140px;
}
.result-v2.is-pass {
  background: linear-gradient(135deg, #f2f6e4 0%, #e0e9ca 55%, #ccdaa7 100%);
}
.result-v2.is-pass:before {
  background: radial-gradient(circle at 30% 30%, #567a2e42, #567a2e00 60%);
}
.result-v2.is-fail {
  background: linear-gradient(135deg, #fbeee7 0%, #f5d9d1 55%, #ecbead 100%);
}
.result-v2.is-fail:before {
  background: radial-gradient(circle at 30% 30%, #a23b2242, #a23b2200 60%);
}
.result-v2-top {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 32px;
  padding: 32px 32px 20px;
  display: grid;
  position: relative;
}
.result-v2-left {
  place-items: center;
  display: grid;
}
.result-v2-right {
  min-width: 0;
}
.result-eyebrow {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  display: flex;
}
.result-head {
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 10px 0 6px;
  font-family:
    Red Hat Text,
    system-ui,
    sans-serif;
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.15;
}
.result-sum {
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.55;
}
.result-v2 .result-kpis {
  margin-top: 20px;
}
.result-v2 .stat {
  -webkit-backdrop-filter: saturate(1.1) blur(2px);
  backdrop-filter: saturate(1.1) blur(2px);
  text-align: left;
  background: #ffffffe6;
  border: 1px solid #45210e1a;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 2px #45210e0d;
}
.result-v2 .stat .k {
  color: var(--ink);
  letter-spacing: -0.01em;
  font-family:
    Red Hat Text,
    system-ui,
    sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
}
.result-v2 .stat .l {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-700);
  margin-top: 4px;
  font-size: 0.7rem;
  font-weight: 700;
}
.result-v2-footer {
  border-top: 1px dashed #45210e38;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  padding: 18px 32px 28px;
  display: flex;
  position: relative;
}
.review-gate {
  background: #ffffffd9;
  border: 1px solid #45210e24;
  border-radius: 12px;
  flex: auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 620px;
  padding: 12px 16px;
  display: flex;
}
.review-gate.locked {
  background: #fdf1d3eb;
  border-color: #e8be3e;
}
.review-gate.unlocked {
  background: #e4edd0eb;
  border-color: #b9c998;
}
.review-gate-icon {
  width: 28px;
  height: 28px;
  color: var(--ink);
  flex: 0 0 28px;
  place-items: center;
  display: grid;
}
.review-gate-icon svg {
  stroke: currentColor;
  stroke-width: 1.75px;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  width: 22px;
  height: 22px;
}
.review-gate-title {
  color: var(--ink);
  font-weight: 700;
}
.review-gate-msg {
  color: var(--ink-soft);
  margin-top: 2px;
  font-size: 0.85rem;
}
.result-v2 .cta-row {
  flex: none;
  margin-top: 0;
}
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.pass-tag {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-block;
}
.pass-tag.pass {
  color: #2e4416;
  background: linear-gradient(#e4edd0, #ccdaa7);
  border-color: #b9c998;
}
.pass-tag.fail {
  color: #6e2614;
  background: linear-gradient(#f5d9d1, #e9bfb2);
  border-color: #d9a99c;
}
@media (width<=760px) {
  .result-v2-top {
    text-align: center;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 18px;
    padding: 24px 20px 12px;
  }
  .result-v2-right {
    text-align: center;
  }
  .result-sum {
    margin-left: auto;
    margin-right: auto;
  }
  .result-eyebrow {
    justify-content: center;
  }
  .result-v2-footer {
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px 22px;
  }
  .review-gate {
    max-width: none;
  }
  .result-v2 .cta-row {
    flex-wrap: wrap;
    justify-content: center;
  }
  .result-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .result-hero {
    text-align: center;
    grid-template-columns: 1fr;
    justify-items: center;
  }
}
.review-item {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #fff;
  border-radius: 14px;
  margin-bottom: 14px;
  padding: 18px;
}
.review-item .tag {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
}
.tag.right {
  color: #2e4416;
  background: #e4edd0;
}
.tag.wrong {
  color: #6e2614;
  background: #f5d9d1;
}
.tag.skip {
  background: var(--accent-soft);
  color: #7a4e00;
}
.review-head {
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  display: flex;
}
.review-q {
  color: var(--ink);
  white-space: pre-wrap;
  margin: 4px 0 14px;
  font-size: 1.02rem;
  font-weight: 700;
}
.r-opt {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 12px;
  margin-bottom: 8px;
  padding: 10px 12px;
}
.r-opt.is-correct {
  background: #eef3e4;
  border-color: #b9c998;
}
.r-opt.is-wrong {
  background: #f9e6df;
  border-color: #d9a99c;
}
.r-opt.is-chosen:not(.is-correct):not(.is-wrong) {
  border-color: var(--accent-dark);
  background: var(--accent-soft);
}
.r-line {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  display: flex;
}
.r-line .letter {
  border: 1px solid var(--line);
  height: 28px;
  color: var(--ink-soft);
  background: #fff;
  border-radius: 8px;
  flex: 0 0 28px;
  place-items: center;
  font-weight: 700;
  display: grid;
}
.is-correct .r-line .letter {
  background: var(--good);
  color: #fff;
  border-color: var(--good);
}
.is-wrong .r-line .letter {
  background: var(--bad);
  color: #fff;
  border-color: var(--bad);
}
.r-text {
  min-width: 220px;
  color: var(--ink);
  white-space: pre-wrap;
  flex: 1;
}
.r-line .tag {
  display: inline-block;
}
.r-line .tag.good {
  color: #2e4416;
  background: #e4edd0;
  border: 1px solid #b9c998;
}
.r-line .tag.bad {
  color: #6e2614;
  background: #f5d9d1;
  border: 1px solid #d9a99c;
}
.r-opt .why {
  color: var(--ink-soft);
  border-left: 3px solid var(--line);
  white-space: pre-wrap;
  background: #fff;
  border-radius: 0 8px 8px 0;
  margin-top: 8px;
  padding: 8px 10px;
  font-size: 0.92rem;
}
.is-correct .why {
  border-left-color: var(--good);
}
.is-wrong .why {
  border-left-color: var(--bad);
}
footer {
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  margin-top: 40px;
  padding: 60px 0;
  font-size: 0.9rem;
}
.footer-grid {
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
  display: grid;
}
@media (width<=800px) {
  .footer-grid {
    text-align: center;
    grid-template-columns: 1fr;
  }
}
.footer-col h4 {
  color: var(--ink);
  margin-bottom: 16px;
  font-size: 1rem;
  font-weight: 700;
}
.footer-col p {
  color: var(--ink-soft);
  margin-top: 0;
}
footer a {
  color: var(--brand-700);
  font-weight: 700;
  text-decoration: none;
}
footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.footer-links {
  flex-direction: column;
  gap: 10px;
  display: flex;
}
.footer-bottom {
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  padding-top: 20px;
  font-size: 0.8rem;
}
footer .brand-footer {
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  display: inline-flex;
}
footer .brand-footer .brand-mark {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
}
footer .brand-footer .brand-name {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 700;
}
.social-icon {
  width: 32px;
  height: 32px;
  color: var(--ink);
  transition: all var(--dur-fast) var(--ease-out);
  background: 0 0;
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  padding: 0;
  display: inline-flex;
}
.social-icon:hover {
  color: var(--brand-700);
  transform: translateY(-1px);
}
.social-icon svg {
  fill: currentColor;
  width: 20px;
  height: 20px;
}
.hidden {
  display: none !important;
}
body.tab-hidden .exam-wrap,
body.tab-hidden #intro {
  filter: blur(14px) brightness(0.4);
  pointer-events: none;
}
body.tab-hidden:after {
  content: 'Content hidden — return focus to resume.';
  color: var(--cream);
  letter-spacing: 0.04em;
  z-index: 99;
  background: #45210eb8;
  place-items: center;
  font-weight: 700;
  display: grid;
  position: fixed;
  inset: 0;
}
.watermark {
  pointer-events: none;
  z-index: 1;
  opacity: 0.018;
  background-image: repeating-linear-gradient(-30deg, #0000 0 180px, #45210e40 180px 182px);
  position: fixed;
  inset: 0;
}
#wm-text {
  pointer-events: none;
  z-index: 2;
  opacity: 0.022;
  color: var(--brand-900);
  grid-template-rows: repeat(6, 1fr);
  grid-template-columns: repeat(4, 1fr);
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  display: grid;
  position: fixed;
  inset: 0;
  transform: rotate(-22deg);
}
@media print {
  body {
    display: none;
  }
}
@media (width<=960px) {
  section {
    padding: 40px 0;
  }
  .hero {
    padding: 44px 0 30px;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .topbar-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0;
  }
  .nav {
    gap: 4px 14px;
  }
  .nav a {
    font-size: 0.92rem;
  }
}
@media (width<=760px) {
  .container {
    padding: 0 18px;
  }
  section {
    padding: 32px 0;
  }
  .hero {
    padding: 30px 0 20px;
  }
  .hero p.lede {
    font-size: 1rem;
  }
  .hero-card {
    padding: 18px;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .card {
    padding: 18px;
  }
  .step {
    padding: 14px 14px 14px 50px;
  }
  .step:before {
    width: 26px;
    height: 26px;
    font-size: 0.85rem;
    top: 14px;
    left: 12px;
  }
  .reddit {
    grid-template-columns: auto 1fr;
    gap: 12px;
  }
  .reddit .logo {
    border-radius: 10px;
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
  }
  .reddit blockquote {
    padding: 12px 14px;
    font-size: 0.95rem;
  }
  .reddit .links .chip {
    padding: 3px 8px;
    font-size: 0.78rem;
  }
  .donate {
    padding: 18px;
  }
  .donate .coin {
    border-radius: 12px;
    width: 46px;
    height: 46px;
  }
  .donate .coin svg {
    width: 24px;
    height: 24px;
  }
  .exam-head {
    flex-wrap: wrap;
    row-gap: 8px;
    padding: 12px 14px;
  }
  .exam-head .title {
    flex: auto;
    min-width: 0;
  }
  .exam-body {
    padding: 14px;
  }
  .q-card {
    padding: 16px;
  }
  .q-text {
    font-size: 1rem;
  }
  .opt {
    gap: 10px;
    padding: 11px 12px;
  }
  .opt .letter {
    flex: 0 0 28px;
    height: 28px;
    font-size: 0.92rem;
  }
  .q-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .q-actions > div {
    flex-wrap: wrap;
    flex: 1;
    justify-content: flex-end;
    gap: 6px;
    display: flex;
  }
  .palette {
    padding: 12px;
    position: static;
    top: auto;
  }
  .palette-grid {
    grid-template-columns: repeat(10, 1fr);
    gap: 5px;
  }
  .palette-grid button {
    padding: 6px 0;
    font-size: 0.78rem;
  }
  .timer {
    min-width: 82px;
    padding: 5px 8px;
    font-size: 1.05rem;
  }
  #view-review > div:first-child {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  #view-review > div:first-child > div {
    flex-wrap: wrap;
    gap: 8px;
    display: flex;
  }
  .review-item {
    padding: 14px;
  }
  .review-head {
    flex-wrap: wrap;
    gap: 8px;
  }
  .r-line {
    gap: 8px;
  }
  .result-v2-top {
    text-align: center;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 16px;
    padding: 24px 18px 12px;
  }
  .result-v2-right {
    text-align: center;
  }
  .result-sum {
    margin-left: auto;
    margin-right: auto;
  }
  .result-eyebrow {
    justify-content: center;
  }
  .result-v2-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 18px 22px;
  }
  .review-gate {
    max-width: none;
  }
  .result-v2 .cta-row {
    flex-wrap: wrap;
    justify-content: center;
  }
  .result-v2 .cta-row .btn {
    flex: auto;
    justify-content: center;
  }
  .score-ring.big {
    width: 210px;
    height: 210px;
  }
  .score-ring.big .val {
    font-size: 2.6rem;
  }
  .btn {
    padding: 11px 16px;
    font-size: 0.95rem;
  }
  .btn.small {
    padding: 7px 11px;
    font-size: 0.86rem;
  }
  footer {
    padding: 24px 0 40px;
    font-size: 0.85rem;
  }
}
@media (width<=480px) {
  html {
    font-size: 15px;
  }
  .container {
    padding: 0 14px;
  }
  .topbar-inner {
    gap: 8px;
    padding: 10px 0;
  }
  .brand {
    gap: 8px;
    font-size: 0.95rem;
  }
  .brand-mark {
    border-radius: 8px;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
  }
  .brand-name {
    font-size: 0.98rem;
  }
  .brand-sub {
    letter-spacing: 0.14em;
    font-size: 0.6rem;
  }
  .nav {
    gap: 2px 10px;
  }
  .nav a {
    font-size: 0.86rem;
  }
  .nav a.pill {
    padding: 3px 8px;
    font-size: 0.76rem;
  }
  .hero {
    padding: 24px 0 14px;
  }
  .hero h1 {
    line-height: 1.1;
  }
  .hero .cta-row {
    flex-direction: column;
    align-items: stretch;
  }
  .hero .cta-row .btn {
    justify-content: center;
  }
  .badge {
    padding: 4px 9px;
    font-size: 0.7rem;
  }
  .hero-stats {
    grid-template-columns: 1fr;
  }
  section {
    padding: 26px 0;
  }
  .card {
    padding: 16px;
  }
  .exam-head {
    padding: 10px 12px;
  }
  .exam-head .title {
    font-size: 0.95rem;
  }
  .exam-body {
    padding: 12px;
  }
  .q-card {
    padding: 14px;
  }
  .q-num {
    font-size: 0.72rem;
  }
  .q-text {
    margin: 4px 0 12px;
    font-size: 0.98rem;
  }
  .opt {
    padding: 10px 11px;
    font-size: 0.94rem;
  }
  .palette-grid {
    grid-template-columns: repeat(8, 1fr);
  }
  .timer {
    min-width: 72px;
    padding: 4px 8px;
    font-size: 0.95rem;
  }
  .result-v2-top {
    padding: 20px 14px 8px;
  }
  .result-head {
    font-size: 1.45rem;
  }
  .result-v2 .stat {
    padding: 10px 12px;
  }
  .result-v2 .stat .k {
    font-size: 1.25rem;
  }
  .result-v2 .stat .l {
    font-size: 0.66rem;
  }
  .result-v2-footer {
    padding: 12px 14px 18px;
  }
  .score-ring.big {
    width: 176px;
    height: 176px;
  }
  .score-ring.big .val {
    font-size: 2rem;
  }
  .score-ring.big .pct {
    padding: 2px 8px;
    font-size: 0.72rem;
  }
  .review-gate {
    gap: 10px;
    padding: 10px 12px;
  }
  .review-gate-icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
  }
  .review-gate-icon svg {
    width: 18px;
    height: 18px;
  }
  .review-gate-title {
    font-size: 0.92rem;
  }
  .review-gate-msg {
    font-size: 0.8rem;
  }
  .pass-tag {
    padding: 4px 10px;
    font-size: 0.72rem;
  }
  .donate {
    padding: 14px;
  }
  .donate h3 {
    font-size: 1.05rem;
  }
  .donate .coin {
    border-radius: 10px;
    width: 42px;
    height: 42px;
  }
  .donate .coin svg {
    width: 22px;
    height: 22px;
  }
  .step {
    padding: 12px 12px 12px 46px;
  }
  .review-item {
    padding: 12px;
  }
  .btn {
    justify-content: center;
    width: 100%;
    padding: 10px 14px;
    font-size: 0.92rem;
  }
  .btn.small {
    width: auto;
  }
  .cta-row {
    gap: 8px;
  }
  .lb-table th:nth-child(3),
  .lb-table td:nth-child(3),
  .lb-table th:nth-child(4),
  .lb-table td:nth-child(4) {
    display: none;
  }
  .lb-score {
    font-size: 0.9rem;
  }
}
@media (hover: none) {
  .opt:hover {
    background: var(--bg);
    border-color: var(--line);
  }
  .opt.sel:hover {
    background: var(--accent-soft);
    border-color: var(--accent-dark);
  }
}
.devtools-warning {
  background: var(--brand-900);
  color: var(--cream);
  z-index: 999;
  text-align: center;
  place-items: center;
  padding: 20px;
  display: grid;
  position: fixed;
  inset: 0;
}
.devtools-warning .btn.ghost {
  color: var(--cream);
  border-color: #fbf7ef59;
}
.devtools-warning .btn.ghost:hover {
  background: #fbf7ef1a;
}
.skip-link {
  background: var(--ink);
  color: var(--accent);
  z-index: 100;
  transition: top var(--dur-fast) var(--ease-out);
  border-radius: 0 0 10px 10px;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  position: absolute;
  top: -100%;
  left: 16px;
}
.skip-link:focus {
  top: 0;
}
.alert {
  background: var(--accent-soft);
  color: #7a4e00;
  border: 1px solid #ebc966;
  border-radius: 10px;
  margin: 8px 0;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 700;
}
::selection {
  background: var(--accent);
  color: var(--ink);
}
.auth-box {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 16px;
  padding: 16px;
}
.auth-box h4 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.auth-box p {
  color: var(--ink-soft);
  margin: 0 0 12px;
  font-size: 0.85rem;
}
.auth-form {
  flex-wrap: wrap;
  gap: 8px;
  display: flex;
}
.auth-input {
  border: 1px solid var(--line);
  min-width: 120px;
  font: inherit;
  background: var(--card);
  color: var(--ink);
  border-radius: 8px;
  flex: 1;
  padding: 8px 10px;
}
.global-stats-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 24px;
  display: grid;
}
@media (width<=900px) {
  .global-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (width<=550px) {
  .global-stats-grid {
    grid-template-columns: 1fr;
  }
}
.global-stats-grid .stat {
  background: var(--card);
  border: 1px solid var(--line);
  transition:
    transform var(--dur-fast),
    box-shadow var(--dur-fast),
    border-color var(--dur-fast);
  border-radius: 16px;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  display: flex;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px #00000005;
}
.global-stats-grid .stat:hover {
  border-color: var(--brand-700);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px #0000000d;
}
.global-stats-grid .stat:before {
  content: '';
  background: linear-gradient(90deg, var(--accent), var(--gold-400));
  opacity: 0;
  height: 4px;
  transition: opacity var(--dur-fast);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}
.global-stats-grid .stat:hover:before {
  opacity: 1;
}
.global-stats-grid .stat .k {
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  font-family:
    Red Hat Text,
    system-ui,
    sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
}
.global-stats-grid .stat .l {
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  font-weight: 700;
}
.hard-q-item {
  background: var(--bg-2);
  color: var(--ink);
  border: 1px solid var(--line);
  transition: border-color var(--dur-fast);
  border-radius: 8px;
  justify-content: space-between;
  margin-bottom: 6px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
}
.hard-q-item:hover {
  border-color: var(--bad);
}
.hard-q-item span:last-child {
  color: var(--bad);
}
.leaderboard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  margin-top: 32px;
  padding: 24px 32px;
  box-shadow: 0 4px 20px #00000008;
}
@media (width<=550px) {
  .leaderboard {
    padding: 20px 16px;
  }
}
.leaderboard h4 {
  color: var(--ink);
  align-items: center;
  gap: 8px;
  margin-top: 0;
  margin-bottom: 20px;
  font-family:
    Red Hat Text,
    system-ui,
    sans-serif;
  font-size: 1.3rem;
  display: flex;
}
.lb-scroll {
  border-radius: 12px;
  max-height: 520px;
  overflow-y: auto;
}
.lb-scroll::-webkit-scrollbar {
  width: 6px;
}
.lb-scroll::-webkit-scrollbar-track {
  background: var(--bg-2);
  border-radius: 3px;
}
.lb-scroll::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 3px;
}
.lb-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}
.lb-table {
  border-collapse: separate;
  border-spacing: 0 6px;
  width: 100%;
  margin-top: 8px;
}
.lb-table th {
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  border-bottom: 1px dashed var(--line);
  background: var(--card);
  z-index: 1;
  padding: 0 14px 8px;
  font-size: 0.72rem;
  position: sticky;
  top: 0;
}
.lb-table td {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: background var(--dur-fast) var(--ease-out);
  padding: 12px 14px;
  font-size: 0.92rem;
  font-weight: 600;
}
.lb-table tr td:first-child {
  border-left: 1px solid var(--line);
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}
.lb-table tr td:last-child {
  border-right: 1px solid var(--line);
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}
.lb-table tr:hover td {
  background: var(--card);
}
#leaderboard-body .lb-rank {
  text-align: center;
  width: 44px;
  font-size: 1.15rem;
}
.lb-rank.gold {
  text-shadow: 0 2px 4px #d4af3766;
}
#leaderboard-body .lb-score {
  color: var(--ink);
  text-align: right;
  font-family:
    Red Hat Text,
    system-ui,
    sans-serif;
  font-size: 1.05rem;
}
.lb-date {
  color: var(--muted);
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 500;
}
#leaderboard-body .lb-status {
  text-align: center;
}
.lb-badge {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-block;
}
.lb-badge.pass {
  color: #2e4416;
  background: #e4edd0;
  border: 1px solid #b9c998;
}
.lb-badge.fail {
  color: #6e2614;
  background: #f5d9d1;
  border: 1px solid #d9a99c;
}
:root.dark-mode .lb-badge.pass {
  color: var(--good);
  border-color: var(--good);
  background: oklch(20% 0.04 148);
}
:root.dark-mode .lb-badge.fail {
  color: var(--bad);
  border-color: var(--bad);
  background: oklch(20% 0.05 25);
}
.lb-count {
  text-align: center;
  color: var(--muted);
  margin-top: 12px;
  font-size: 0.78rem;
  font-weight: 600;
}
.theme-toggle {
  z-index: 9999;
  border: 1px solid var(--line);
  background: var(--card);
  width: 44px;
  height: 44px;
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition:
    background var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out),
    transform var(--dur-fast) var(--ease-spring);
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  display: flex;
  position: fixed;
  bottom: 20px;
  right: 20px;
}
.theme-toggle:hover {
  transform: scale(1.1);
}
.theme-toggle:active {
  transform: scale(0.95);
}
:root.dark-mode {
  --bg: oklch(14% 0.02 44);
  --bg-2: oklch(22% 0.02 44);
  --ink: oklch(96% 0.03 83.7);
  --ink-soft: oklch(88% 0.016 44);
  --muted: #bfae94;
  --line: oklch(40% 0.02 44);
  --accent: #f4c32e;
  --accent-dark: #e2ac13;
  --accent-soft: oklch(22% 0.06 84);
  --good: #5bb069;
  --bad: #e5694a;
  --warn: #f4ba17;
  --info: #5c9ddb;
  --card: oklch(18% 0.02 44);
  --brand-900: oklch(96% 0.03 83.7);
  --brand-700: oklch(88% 0.016 44);
  --gold-400: #f4c32e;
  --cream: oklch(14% 0.02 44);
  --shadow: inset 0 1px 0 oklch(100% 0 0/0.05), 0 4px 8px oklch(0% 0 0/0.4);
  --shadow-lg: inset 0 1px 0 oklch(100% 0 0/0.05), 0 16px 32px oklch(0% 0 0/0.5);
}
:root.dark-mode body {
  background: var(--bg);
  color: var(--ink);
}
:root.dark-mode .topbar {
  border-bottom-color: var(--line);
  background: oklch(14% 0.02 44/0.92);
}
:root.dark-mode .exam-wrap,
:root.dark-mode .q-card {
  background: var(--card);
  border-color: var(--line);
}
:root.dark-mode .hero {
  background: linear-gradient(170deg, oklch(18% 0.02 44) 0%, oklch(14% 0.02 44) 100%);
}
:root.dark-mode .watermark {
  opacity: 0.012;
}
:root.dark-mode #wm-text {
  opacity: 0.016;
}
:root.dark-mode .btn.ghost {
  border-color: var(--line);
  color: var(--ink);
}
:root.dark-mode .btn.ghost:hover {
  background: var(--bg-2);
}
:root.dark-mode .pill {
  background: var(--bg-2);
  border-color: var(--line);
  color: var(--ink-soft);
}
:root.dark-mode .kbd {
  background: var(--bg-2);
  border-color: var(--line);
  color: var(--ink);
}
:root.dark-mode code.mark {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: oklch(40% 0.08 84);
}
:root.dark-mode .auth-box {
  background: var(--bg-2);
  border-color: var(--line);
}
:root.dark-mode ::selection {
  background: var(--accent);
  color: var(--bg);
}
:root.dark-mode .stat {
  background: var(--card);
  border-color: var(--line);
}
:root.dark-mode .start-grid {
  color: var(--ink);
}
:root.dark-mode section {
  border-color: var(--line);
}
:root.dark-mode .nav a {
  color: var(--ink-soft);
}
:root.dark-mode .nav a:hover {
  color: var(--ink);
}
:root.dark-mode .chip {
  background: var(--bg-2);
  border-color: var(--line);
  color: var(--ink-soft);
}
:root.dark-mode .option-row input[type='number'] {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}
:root.dark-mode .rules {
  border-color: var(--line);
}
:root.dark-mode .alert {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: oklch(40% 0.08 84);
}
:root.dark-mode .opt .letter {
  background: var(--bg-2);
  border-color: var(--line);
}
:root.dark-mode .opt.correct {
  border-color: var(--good);
  background: oklch(20% 0.04 148);
}
:root.dark-mode .opt.correct .letter {
  background: var(--good);
  border-color: var(--good);
}
:root.dark-mode .opt.incorrect {
  border-color: var(--bad);
  background: oklch(20% 0.05 25);
}
:root.dark-mode .opt.incorrect .letter {
  background: var(--bad);
  border-color: var(--bad);
}
:root.dark-mode .q-text code.mark {
  color: var(--accent);
  background: oklch(22% 0.06 84);
  border-color: oklch(40% 0.08 84);
}
:root.dark-mode .palette {
  background: var(--card);
  border-color: var(--line);
}
:root.dark-mode .palette-grid button {
  background: var(--bg-2);
  border-color: var(--line);
  color: var(--ink);
}
:root.dark-mode .palette-grid button.answered {
  border-color: var(--good);
  color: var(--good);
  background: oklch(20% 0.04 148);
}
:root.dark-mode .palette-grid button.flagged {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
:root.dark-mode .palette-grid button.current.answered {
  color: var(--good);
}
:root.dark-mode .swatch.ans {
  border-color: var(--good);
  background: oklch(20% 0.04 148);
}
:root.dark-mode .swatch.flag {
  background: var(--accent-soft);
  border-color: var(--accent);
}
:root.dark-mode .swatch.un {
  background: var(--bg-2);
}
:root.dark-mode .domain-bar-fill.high {
  background: linear-gradient(90deg, oklch(18% 0.03 148), oklch(16% 0.02 148));
}
:root.dark-mode .domain-bar-fill.mid {
  background: linear-gradient(90deg, oklch(22% 0.06 84), oklch(20% 0.05 84));
}
:root.dark-mode .domain-bar-fill.low {
  background: linear-gradient(90deg, oklch(18% 0.03 25), oklch(16% 0.02 25));
}
:root.dark-mode .feature .ico {
  background: var(--accent-soft);
  border-color: var(--line);
}
:root.dark-mode .option-row {
  background: var(--bg-2);
  border-color: var(--line);
}
:root.dark-mode .hero:before {
  background:
    radial-gradient(1000px 400px at 85% -10%, #f4ba170d, #0000 60%),
    radial-gradient(700px 260px at 10% 20%, #45210e05, #0000 60%);
}
:root.dark-mode .timer {
  background: var(--card);
  border-color: var(--line);
  color: var(--accent);
}
:root.dark-mode .timer.warn {
  border-color: var(--warn);
  color: var(--warn);
  background: oklch(22% 0.06 84);
}
:root.dark-mode .timer.danger {
  border-color: var(--bad);
  color: var(--bad);
  background: oklch(20% 0.05 25);
}
:root.dark-mode .donate {
  background: linear-gradient(135deg, var(--accent-soft) 0%, oklch(22% 0.06 84) 100%);
  border-color: oklch(40% 0.08 84);
}
:root.dark-mode .donate .coin {
  background: var(--card);
}
:root.dark-mode .donate .btn.primary {
  background: var(--accent);
  color: var(--bg);
}
:root.dark-mode .donate .btn.primary:hover {
  background: var(--accent-dark);
}
:root.dark-mode .lb-table th {
  background: var(--card);
}
:root.dark-mode .lb-scroll::-webkit-scrollbar-track {
  background: var(--bg);
}
:root.dark-mode .lb-scroll::-webkit-scrollbar-thumb {
  background: var(--line);
}
:root.dark-mode .result-v2 {
  background: var(--card);
  border-color: var(--line);
  box-shadow:
    0 20px 60px -30px #45210e59,
    inset 0 1px #ffffff0d;
}
:root.dark-mode .result-v2:before,
:root.dark-mode .result-v2:after {
  opacity: 0.3;
}
:root.dark-mode .result-v2.is-pass {
  background: linear-gradient(135deg, oklch(18% 0.03 148) 0%, oklch(16% 0.02 148) 100%);
}
:root.dark-mode .result-v2.is-pass:before {
  background: radial-gradient(circle at 30% 30%, #5bb0692e, #0000 60%);
}
:root.dark-mode .result-v2.is-fail {
  background: linear-gradient(135deg, oklch(18% 0.03 25) 0%, oklch(16% 0.02 25) 100%);
}
:root.dark-mode .result-v2.is-fail:before {
  background: radial-gradient(circle at 30% 30%, #e5694a2e, #0000 60%);
}
:root.dark-mode .result-hero {
  background: linear-gradient(135deg, var(--card), var(--bg-2));
}
:root.dark-mode .result-v2 .stat {
  background: var(--bg-2);
  border-color: var(--line);
  box-shadow: none;
}
:root.dark-mode .result-v2-footer {
  border-top-color: var(--line);
}
:root.dark-mode .review-gate {
  background: var(--bg-2);
  border-color: var(--line);
}
:root.dark-mode .review-gate.locked {
  border-color: var(--warn);
  background: oklch(22% 0.06 84);
}
:root.dark-mode .review-gate.unlocked {
  border-color: var(--good);
  background: oklch(20% 0.04 148);
}
:root.dark-mode .r-opt {
  background: var(--bg);
}
:root.dark-mode .r-opt.is-correct {
  border-color: var(--good);
  background: oklch(20% 0.04 148);
}
:root.dark-mode .r-opt.is-wrong {
  border-color: var(--bad);
  background: oklch(20% 0.05 25);
}
:root.dark-mode .r-line .letter {
  background: var(--bg-2);
  border-color: var(--line);
}
:root.dark-mode .is-correct .r-line .letter {
  background: var(--good);
  border-color: var(--good);
}
:root.dark-mode .is-wrong .r-line .letter {
  background: var(--bad);
  border-color: var(--bad);
}
:root.dark-mode .r-opt .why {
  background: var(--bg-2);
  border-left-color: var(--line);
}
:root.dark-mode .is-correct .why {
  border-left-color: var(--good);
}
:root.dark-mode .is-wrong .why {
  border-left-color: var(--bad);
}
:root.dark-mode .tag.right {
  color: var(--good);
  background: oklch(20% 0.04 148);
}
:root.dark-mode .tag.wrong {
  color: var(--bad);
  background: oklch(20% 0.05 25);
}
:root.dark-mode .tag.skip {
  background: var(--accent-soft);
  color: var(--accent);
}
:root.dark-mode .r-line .tag.good {
  color: var(--good);
  border-color: var(--good);
  background: oklch(20% 0.04 148);
}
:root.dark-mode .r-line .tag.bad {
  color: var(--bad);
  border-color: var(--bad);
  background: oklch(20% 0.05 25);
}
:root.dark-mode .is-correct code.mark {
  color: var(--good);
  border-color: var(--good);
  background: oklch(20% 0.04 148);
}
:root.dark-mode .is-wrong code.mark,
:root.dark-mode .r-opt.is-wrong code.mark {
  color: var(--bad);
  border-color: var(--bad);
  background: oklch(20% 0.05 25);
}
:root.dark-mode .pass-tag.pass {
  border-color: var(--good);
  color: var(--good);
  background: oklch(20% 0.04 148);
}
:root.dark-mode .pass-tag.fail {
  border-color: var(--bad);
  color: var(--bad);
  background: oklch(20% 0.05 25);
}
:root.dark-mode footer {
  background: var(--bg-2);
  border-top-color: var(--line);
}
:root.dark-mode footer a {
  color: var(--accent);
}
:root.dark-mode footer a:hover {
  color: var(--ink);
}
:root.dark-mode .review-item {
  background: var(--card);
  border-color: var(--line);
}
.pill-skip {
  color: #6b4a15;
  background: #f3e9d5;
  border-color: #e3cb87;
}
.pill-correct {
  color: #245b34;
  background: #e6f3ea;
  border-color: #aecfb6;
}
.pill-wrong {
  color: #7a2a21;
  background: #f5ddd9;
  border-color: #e0a69e;
}
:root.dark-mode .pill-skip {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: oklch(40% 0.08 84);
}
:root.dark-mode .pill-correct {
  border-color: var(--good);
  color: var(--good);
  background: oklch(20% 0.04 148);
}
:root.dark-mode .pill-wrong {
  border-color: var(--bad);
  color: var(--bad);
  background: oklch(20% 0.05 25);
}
.domain-breakdown {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 24px;
  padding: 20px;
}
.domain-breakdown h4 {
  margin: 0 0 16px;
  font-size: 1rem;
}
.domain-bar {
  margin-bottom: 12px;
}
.domain-bar:last-child {
  margin-bottom: 0;
}
.domain-bar-label {
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 0.85rem;
  display: flex;
}
.domain-bar-label span:first-child {
  font-weight: 600;
}
.domain-bar-track {
  background: var(--line);
  border-radius: 12px;
  height: 24px;
  position: relative;
  overflow: hidden;
}
.domain-bar-fill {
  height: 100%;
  transition: width 1s var(--ease-out);
  color: #fff;
  border-radius: 12px;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  padding-right: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
}
.domain-bar-fill.high {
  background: linear-gradient(90deg, #86a64e, #567a2e);
}
.domain-bar-fill.mid {
  background: linear-gradient(90deg, #e2ac13, #c8930a);
}
.domain-bar-fill.low {
  background: linear-gradient(90deg, #d06040, #a23b22);
}
.dashboard-box {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 16px;
  padding: 20px;
}
.dashboard-box h4 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}
.dashboard-box .sub {
  color: var(--muted);
  margin: 0 0 16px;
  font-size: 0.85rem;
}
.history-list {
  gap: 8px;
  display: grid;
}
.history-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-size: 0.85rem;
  display: flex;
}
.history-score {
  font-size: 1rem;
  font-weight: 700;
}
.history-score.pass {
  color: var(--good);
}
.history-score.fail {
  color: var(--bad);
}
.history-meta {
  color: var(--muted);
  font-size: 0.8rem;
}
.confetti-container {
  pointer-events: none;
  z-index: 9998;
  position: fixed;
  inset: 0;
  overflow: hidden;
}
.confetti-container.hidden {
  display: none;
}
.confetti-piece {
  border-radius: 2px;
  width: 10px;
  height: 10px;
  animation: 3s ease-in forwards confetti-fall;
  position: absolute;
  top: -10px;
}
@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(105vh) rotate(720deg) scale(0.3);
  }
}
::view-transition-old(root) {
  animation-duration: 0.35s;
  animation-timing-function: var(--ease-out);
}
::view-transition-new(root) {
  animation-duration: 0.35s;
  animation-timing-function: var(--ease-out);
}
::view-transition-old(root) {
  animation-name: fade-out, slide-out;
}
::view-transition-new(root) {
  animation-name: fade-in, slide-in;
}
@keyframes fade-in {
  0% {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes fade-out {
  0% {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@keyframes slide-in {
  0% {
    transform: translateY(10px);
  }
  to {
    transform: translateY(0);
  }
}
@keyframes slide-out {
  0% {
    transform: translateY(0);
  }
  to {
    transform: translateY(-10px);
  }
}
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.opt:has(input[type='radio']:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.lang-select {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  border-radius: 4px;
  outline: none;
  padding: 4px 8px;
  font-family: inherit;
  font-size: 0.85rem;
}
.lang-select:focus {
  border-color: var(--accent);
}
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  80% {
    opacity: 1;
    transform: scale(1.2);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.radar-polygon {
  transform-origin: 50%;
  transition: all 0.5s;
}
.radar-polygon:hover {
  fill-opacity: 0.5;
  stroke-width: 3px;
}
.radar-dot {
  transform-origin: 50%;
  transition: r 0.2s;
}
.radar-dot:hover {
  r: 6;
}
.radar-label {
  pointer-events: none;
}
.footer-title {
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.18;
}
@media (prefers-reduced-motion: reduce) {
  *,
  :before,
  :after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
.theme-toggle,
.social-icon,
.btn.small,
.nav a {
  min-width: 44px;
  min-height: 44px;
}
:root.dark-mode .btn.accent {
  color: #1c0e04;
}
:root.dark-mode .btn.ghost {
  border-color: var(--ink-soft);
}
