:root {
  color-scheme: light;
  --bg: #f3f5f4;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --ink: #15242e;
  --muted: #60717b;
  --line: #dce3e1;
  --line-strong: #c7d1ce;
  --navy: #142f40;
  --navy-2: #0d2433;
  --teal: #176a5a;
  --teal-dark: #105548;
  --teal-soft: #e5f2ee;
  --gold: #976118;
  --gold-soft: #fbf2df;
  --red: #b33a3a;
  --red-soft: #fbeaea;
  --green: #16724d;
  --green-soft: #e7f5ed;
  --blue-soft: #e8f0f7;
  --purple-soft: #f0eaf7;
  --shadow: 0 18px 45px rgba(17, 42, 54, .08);
  --shadow-small: 0 8px 24px rgba(17, 42, 54, .07);
  --radius: 18px;
  --radius-sm: 12px;
  --shell: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1820;
  --surface: #14232c;
  --surface-2: #182a34;
  --ink: #edf3f1;
  --muted: #aebdbd;
  --line: #2d424a;
  --line-strong: #425a61;
  --navy: #102938;
  --navy-2: #0a202e;
  --teal: #54b49f;
  --teal-dark: #7ac6b4;
  --teal-soft: #153b36;
  --gold: #e4ad58;
  --gold-soft: #3b301e;
  --red: #ff9292;
  --red-soft: #3d2527;
  --green: #71d5a8;
  --green-soft: #17392c;
  --blue-soft: #1d3446;
  --purple-soft: #302841;
  --shadow: 0 20px 55px rgba(0, 0, 0, .27);
  --shadow-small: 0 8px 28px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

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

a { color: inherit; }

button { color: inherit; }

svg { display: block; }

[hidden] { display: none !important; }

.shell { width: min(var(--shell), calc(100% - 40px)); margin-inline: auto; }

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

.skipLink {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 200;
  transform: translateY(-160%);
  padding: 10px 14px;
  background: var(--surface);
  border: 2px solid var(--teal);
  border-radius: 10px;
  font-weight: 750;
  text-decoration: none;
}

.skipLink:focus { transform: translateY(0); }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--gold) 70%, white); outline-offset: 3px; }

.siteHeader {
  position: relative;
  z-index: 20;
  background: var(--navy-2);
  color: #f4f8f7;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.headerInner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.homeLink {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.homeMark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
}

.homeMark svg { width: 30px; fill: none; stroke: #d8aa59; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.homeLink b { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 18px; letter-spacing: .01em; }
.homeLink small { display: block; margin-top: 1px; color: #aebdc4; font-size: 11px; letter-spacing: .04em; }

.headerActions { display: flex; align-items: center; gap: 14px; }
.saveBadge { display: flex; align-items: center; gap: 7px; color: #b8c8ca; font-size: 12px; }
.saveBadge > span { color: #69c4a6; font-size: 10px; }

.iconButton {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .05);
  cursor: pointer;
}

.iconButton:hover { background: rgba(255, 255, 255, .1); }
.iconButton svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.moonIcon { display: none; }
:root[data-theme="dark"] .sunIcon { display: none; }
:root[data-theme="dark"] .moonIcon { display: block; }

.hero {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  color: #fff;
  background:
    radial-gradient(circle at 84% 22%, rgba(52, 137, 116, .32), transparent 26%),
    radial-gradient(circle at 20% 120%, rgba(186, 129, 42, .18), transparent 34%),
    linear-gradient(118deg, #102c3c 0%, #183b49 52%, #102d3a 100%);
}

.hero::after {
  content: "§";
  position: absolute;
  right: max(2vw, calc((100vw - var(--shell)) / 2 - 90px));
  top: -135px;
  color: rgba(255, 255, 255, .025);
  font-family: Georgia, serif;
  font-size: 570px;
  line-height: 1;
  transform: rotate(8deg);
  pointer-events: none;
}

.heroGrid {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(360px, .78fr);
  align-items: center;
  gap: 78px;
  padding-block: 62px;
  position: relative;
  z-index: 1;
}

.eyebrow, .sectionKicker {
  display: inline-block;
  color: var(--gold);
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: .13em;
  text-transform: uppercase;
  font-weight: 800;
}

.hero .eyebrow { color: #e4b86f; }
.hero h1 { margin: 12px 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(45px, 5.2vw, 72px); line-height: .98; letter-spacing: -.035em; font-weight: 500; }
.hero h1 em { color: #e1b262; font-style: normal; }
.heroCopy > p { max-width: 690px; margin: 0; color: #cad7d9; font-size: clamp(16px, 1.65vw, 20px); line-height: 1.6; }
.heroActions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.button {
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--teal); color: #fff; box-shadow: 0 8px 22px rgba(15, 91, 76, .2); }
.button.primary:hover { background: var(--teal-dark); }
.hero .button.primary { background: #d4a34e; color: #172a33; box-shadow: 0 10px 25px rgba(0, 0, 0, .18); }
.hero .button.primary:hover { background: #e4b969; }
.button.ghost { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }
.hero .button.ghost { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.07); color: #fff; }
.hero .button.ghost:hover { background: rgba(255,255,255,.13); }
.button.compact { min-height: 42px; padding: 9px 14px; }
.button.wide { width: 100%; }
.button.danger { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); background: var(--red-soft); color: var(--red); }

.heroPanel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(8, 28, 39, .45);
  backdrop-filter: blur(12px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .22);
}

.heroStat { min-height: 114px; padding: 22px; border-right: 1px solid rgba(255, 255, 255, .1); border-bottom: 1px solid rgba(255, 255, 255, .1); }
.heroStat:nth-child(2), .heroStat:nth-child(4) { border-right: 0; }
.heroStat strong { display: block; font-family: Georgia, serif; font-size: 33px; line-height: 1.05; font-weight: 500; color: #f3f7f6; }
.heroStat span { display: block; margin-top: 7px; color: #aec1c5; font-size: 12px; }
.heroStat.pass strong { color: #e1b262; }
.heroPanel > p { grid-column: 1 / -1; margin: 0; padding: 16px 20px; display: flex; gap: 10px; color: #bbcccf; font-size: 11px; background: rgba(0, 0, 0, .13); }
.heroPanel > p span { width: 18px; height: 18px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #809ba1; border-radius: 50%; font-weight: 800; }

.appShell { position: relative; z-index: 3; margin-top: -26px; padding-bottom: 78px; }

.appTabs {
  min-height: 72px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow);
}

.tabButton {
  min-width: 0;
  min-height: 54px;
  border: 0;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
}

.tabButton svg { width: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabButton:hover { background: var(--surface-2); color: var(--ink); }
.tabButton.on { background: var(--navy); color: #fff; box-shadow: 0 7px 18px rgba(11, 39, 52, .18); }

.appView { padding-top: 48px; }
.sectionHeading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.sectionHeading h2 { margin: 5px 0 5px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 3.1vw, 42px); line-height: 1.15; font-weight: 500; letter-spacing: -.02em; }
.sectionHeading p { margin: 0; max-width: 760px; color: var(--muted); font-size: 14px; }
.textLink { flex: 0 0 auto; color: var(--teal); font-size: 13px; font-weight: 750; text-decoration: none; }
.textLink:hover { text-decoration: underline; }

.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-small); }

.resumeBanner {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--gold-soft);
}

.resumeBanner div { min-width: 0; }
.resumeBanner b { display: block; font-size: 14px; }
.resumeBanner span { display: block; color: var(--muted); font-size: 12px; }

.testControls { padding: 17px 18px; display: grid; grid-template-columns: minmax(360px, 1.15fr) minmax(210px, .8fr) minmax(230px, .8fr); align-items: center; gap: 22px; }
.controlGroup { display: flex; align-items: center; gap: 14px; }
.controlLabel { flex: 0 0 auto; color: var(--muted); font-size: 12px; font-weight: 700; }
.segmented { padding: 3px; display: inline-flex; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.segmented button { min-height: 34px; padding: 6px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 720; cursor: pointer; }
.segmented button.on { background: var(--surface); color: var(--ink); box-shadow: 0 2px 9px rgba(17,42,54,.09); }

.switchControl { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switchControl input { position: absolute; opacity: 0; pointer-events: none; }
.switch { position: relative; width: 42px; height: 24px; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-2); transition: background .18s ease, border-color .18s ease; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .18s ease, background .18s ease; }
.switchControl input:checked + .switch { background: var(--teal); border-color: var(--teal); }
.switchControl input:checked + .switch::after { transform: translateX(18px); background: #fff; }
.switchControl input:focus-visible + .switch { outline: 3px solid color-mix(in srgb, var(--gold) 70%, white); outline-offset: 3px; }
.switchControl b, .switchControl small { display: block; }
.switchControl b { font-size: 12px; }
.switchControl small { color: var(--muted); font-size: 10px; }

.searchControl { min-height: 42px; padding: 0 12px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.searchControl svg { width: 17px; flex: 0 0 auto; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.searchControl input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.searchControl:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 14%, transparent); }

.yearFilters { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0; }
.yearFilters button { min-height: 34px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 760; cursor: pointer; }
.yearFilters button.on { border-color: var(--navy); background: var(--navy); color: #fff; }

.examGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.examCard { position: relative; min-height: 245px; padding: 20px; display: flex; flex-direction: column; overflow: hidden; }
.examCard::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: var(--teal); opacity: .72; }
.examCard.problem::before { background: var(--gold); opacity: 1; }
.examCardHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.examYear { color: var(--teal); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; }
.examBadge { padding: 4px 7px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); font-size: 9px; font-weight: 800; }
.examBadge.warn { background: var(--gold-soft); color: var(--gold); }
.examCard h3 { margin: 14px 0 7px; font-family: Georgia, serif; font-size: 21px; line-height: 1.22; font-weight: 500; }
.examCard > p { margin: 0; color: var(--muted); font-size: 12px; }
.examMeta { margin-top: 16px; display: flex; gap: 12px; color: var(--muted); font-size: 10px; }
.examMeta span { display: inline-flex; align-items: center; gap: 5px; }
.examMeta svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.examProgress { margin-top: 12px; }
.examProgressBar { height: 4px; overflow: hidden; border-radius: 999px; background: var(--line); }
.examProgressBar span { display: block; height: 100%; background: var(--gold); }
.examProgress small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.examCardActions { margin-top: auto; padding-top: 18px; display: flex; align-items: center; gap: 8px; }
.examStart { flex: 1; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 9px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 750; cursor: pointer; }
.examStart:hover { background: var(--teal-dark); }
.sourceMenu { position: relative; }
.sourceButton { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.sourceButton svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.sourceLinksPop { position: absolute; right: 0; bottom: 46px; z-index: 5; width: 205px; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.sourceLinksPop a { display: block; padding: 9px 10px; border-radius: 7px; color: var(--ink); font-size: 11px; text-decoration: none; }
.sourceLinksPop a:hover { background: var(--surface-2); }
.emptyState { grid-column: 1 / -1; padding: 46px 24px; text-align: center; color: var(--muted); }

.randomLayout { display: grid; grid-template-columns: 1.04fr .96fr; gap: 20px; }
.randomCard { min-height: 560px; padding: 46px; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(145deg, var(--surface) 35%, var(--teal-soft)); }
.randomIcon { width: 88px; height: 88px; margin-bottom: 30px; display: grid; place-items: center; border-radius: 25px; background: var(--navy); color: #d8ad62; box-shadow: 0 16px 35px rgba(14, 43, 57, .2); }
.randomIcon svg { width: 54px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.randomCard h3 { max-width: 520px; margin: 11px 0 14px; font-family: Georgia, serif; font-size: clamp(31px, 3.3vw, 44px); line-height: 1.12; font-weight: 500; }
.randomCard > p { max-width: 600px; margin: 0; color: var(--muted); font-size: 14px; }
.randomFacts { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 22px; color: var(--muted); font-size: 11px; }
.randomFacts b { color: var(--ink); font-size: 17px; }
.randomSettings { padding: 30px; }
.randomSettings h3 { margin: 0 0 20px; font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.fieldSet { margin: 0 0 22px; padding: 0; border: 0; }
.fieldSet legend { margin-bottom: 9px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; }
.radioCard { position: relative; margin-top: 8px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; display: flex; align-items: flex-start; gap: 10px; cursor: pointer; background: var(--surface-2); }
.radioCard:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); }
.radioCard input { margin: 3px 0 0; accent-color: var(--teal); }
.radioCard b, .radioCard small { display: block; }
.radioCard b { font-size: 12px; }
.radioCard small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.switchControl.standalone { margin: 0 0 24px; padding: 12px 14px; width: 100%; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.microcopy { margin: 12px 0 0; color: var(--muted); font-size: 10px; text-align: center; }

.runnerView { padding-top: 30px; }
.runnerTop { min-height: 68px; display: grid; grid-template-columns: 190px 1fr 190px; align-items: center; gap: 20px; }
.backButton { justify-self: start; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 720; cursor: pointer; }
.runnerIdentity { min-width: 0; text-align: center; }
.runnerIdentity span { color: var(--teal); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; }
.runnerIdentity h2 { margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.timerBox { justify-self: end; min-width: 152px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: center; }
.timerBox small { display: block; color: var(--muted); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.timerBox strong { font-variant-numeric: tabular-nums; font-size: 18px; letter-spacing: .04em; }
.timerBox.warning { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.runnerProgress { height: 5px; margin-top: 16px; overflow: hidden; border-radius: 999px; background: var(--line); }
.runnerProgress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); transition: width .22s ease; }
.runnerMeta { min-height: 52px; display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 10px; }
.runnerMeta #feedbackMeta { flex: 1; }
.runnerMeta button { border: 0; background: transparent; color: var(--muted); font-size: 10px; font-weight: 720; cursor: pointer; }
.runnerMeta button[aria-pressed="true"] { color: var(--gold); }
.runnerGrid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; align-items: start; gap: 20px; }

.questionCard { min-height: 565px; padding: clamp(25px, 4vw, 46px); display: flex; flex-direction: column; }
.questionHead { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; }
.questionNumber { color: var(--teal); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 850; }
.areaChip { padding: 4px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.areaChip.public { background: var(--blue-soft); color: #3a6a86; }
.areaChip.criminal { background: var(--red-soft); color: var(--red); }
.areaChip.private { background: var(--purple-soft); color: #715c8f; }
:root[data-theme="dark"] .areaChip.public { color: #9bc8e3; }
:root[data-theme="dark"] .areaChip.private { color: #c8afe7; }
.questionSource { margin-left: auto; color: var(--muted); font-size: 9px; }
.questionCard h3 { margin: 0 0 25px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(21px, 2.25vw, 29px); line-height: 1.35; font-weight: 500; letter-spacing: -.01em; }
.answerList { margin: 0; padding: 0; border: 0; display: grid; gap: 10px; }
.answerOption { position: relative; min-height: 59px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; background: var(--surface-2); cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.answerOption:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.answerOption input { position: absolute; opacity: 0; }
.answerLetter { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--muted); font-weight: 800; text-transform: lowercase; }
.answerText { font-size: 13px; line-height: 1.45; }
.answerOption.selected { border-color: var(--teal); background: var(--teal-soft); }
.answerOption.selected .answerLetter { border-color: var(--teal); background: var(--teal); color: #fff; }
.answerOption.correct { border-color: var(--green); background: var(--green-soft); }
.answerOption.correct .answerLetter { border-color: var(--green); background: var(--green); color: #fff; }
:root[data-theme="dark"] .answerOption.correct .answerLetter { color: #08261a; }
.answerOption.wrong { border-color: var(--red); background: var(--red-soft); }
.answerOption.wrong .answerLetter { border-color: var(--red); background: var(--red); color: #fff; }
.answerMark { font-size: 10px; font-weight: 850; }
.answerOption.correct .answerMark { color: var(--green); }
.answerOption.wrong .answerMark { color: var(--red); }
.answerOption.locked { cursor: default; }
.answerOption.locked:hover { transform: none; }

.feedbackBox { margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 12px; background: var(--surface-2); }
.feedbackBox.incorrect { border-left-color: var(--red); }
.feedbackVerdict { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 800; }
.feedbackVerdict .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-size: 12px; }
.feedbackBox.incorrect .feedbackVerdict { color: var(--red); }
.feedbackBox.incorrect .feedbackVerdict .dot { background: var(--red); }
.feedbackBox p { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.lawQuote { margin: 13px 0 0; padding: 12px 14px; border-left: 2px solid var(--gold); background: var(--gold-soft); color: var(--ink); font-family: Georgia, serif; font-size: 12px; }
.lawCitation { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
.lawCitation a { color: var(--teal); font-weight: 700; text-decoration: none; }
.feedbackWarning { margin-top: 12px; padding: 10px 12px; border-radius: 9px; background: var(--gold-soft); color: var(--ink); font-size: 10px; }
.officialKeyNote { margin-top: 9px; font-size: 10px; color: var(--gold); font-weight: 700; }

.questionActions { margin-top: auto; padding-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.questionActions .button { min-width: 120px; }
.questionActions .questionPosition { color: var(--muted); font-size: 10px; }

.paletteCard { position: sticky; top: 20px; padding: 19px; }
.paletteHead { display: flex; align-items: center; justify-content: space-between; }
.paletteHead h3 { margin: 0; font-family: Georgia, serif; font-size: 19px; font-weight: 500; }
.paletteHead span { color: var(--muted); font-size: 10px; }
.palette { margin: 17px 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.palette button { aspect-ratio: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 10px; font-weight: 760; cursor: pointer; }
.palette button.answered { border-color: var(--teal); background: var(--teal-soft); color: var(--teal); }
.palette button.marked { box-shadow: inset 0 -3px var(--gold); }
.palette button.current { border-color: var(--navy); background: var(--navy); color: #fff; }
.palette button.correct { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.palette button.wrong { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.paletteLegend { margin-bottom: 17px; display: flex; flex-wrap: wrap; gap: 9px 12px; color: var(--muted); font-size: 8px; }
.paletteLegend span { display: inline-flex; align-items: center; gap: 4px; }
.paletteLegend i { width: 8px; height: 8px; border-radius: 2px; background: var(--line); }
.paletteLegend i.answered { background: var(--teal); }
.paletteLegend i.marked { background: var(--gold); }
.paletteLegend i.current { background: var(--navy); }

.resultCard { min-height: 565px; padding: clamp(28px, 5vw, 54px); }
.resultHero { text-align: center; }
.resultSeal { width: 78px; height: 78px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-size: 34px; font-weight: 800; }
.resultHero.failed .resultSeal { background: var(--red-soft); color: var(--red); }
.resultHero .sectionKicker { color: var(--green); }
.resultHero.failed .sectionKicker { color: var(--red); }
.resultHero h3 { margin: 5px 0; font-family: Georgia, serif; font-size: 38px; font-weight: 500; }
.resultHero p { margin: 0; color: var(--muted); font-size: 13px; }
.scoreRing { --score: 0; width: 148px; height: 148px; margin: 27px auto; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--green) calc(var(--score) * 1%), var(--line) 0); position: relative; }
.scoreRing::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--surface); }
.scoreRing div { position: relative; text-align: center; }
.scoreRing strong { display: block; font-family: Georgia, serif; font-size: 34px; line-height: 1; }
.scoreRing span { color: var(--muted); font-size: 10px; }
.resultStats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.resultStat { padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); text-align: center; }
.resultStat strong { display: block; font-size: 22px; }
.resultStat span { color: var(--muted); font-size: 9px; }
.resultStat.good strong { color: var(--green); }
.resultStat.bad strong { color: var(--red); }
.resultActions { margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.resultBreakdown { margin-top: 28px; padding-top: 23px; border-top: 1px solid var(--line); }
.resultBreakdown h4 { margin: 0 0 12px; font-family: Georgia, serif; font-size: 19px; font-weight: 500; }
.areaBars { display: grid; gap: 10px; }
.areaBar { display: grid; grid-template-columns: 180px 1fr 54px; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; }
.barTrack { height: 6px; overflow: hidden; border-radius: 999px; background: var(--line); }
.barTrack span { display: block; height: 100%; background: var(--teal); }

.matterOverview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.matterBlock { position: relative; min-height: 246px; padding: 25px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.matterBlock::after { content: ""; position: absolute; right: -32px; bottom: -38px; width: 130px; height: 130px; border-radius: 50%; background: var(--blue-soft); opacity: .7; }
.matterBlock.criminal::after { background: var(--red-soft); }
.matterBlock.private::after { background: var(--purple-soft); }
.matterBlock > span { color: var(--muted); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; }
.matterBlock h3 { margin: 14px 0 10px; font-family: Georgia, serif; font-size: 25px; line-height: 1.17; font-weight: 500; }
.matterBlock p { margin: 0; color: var(--muted); font-size: 12px; }
.matterBlock strong { position: absolute; left: 25px; bottom: 22px; z-index: 1; color: var(--teal); font-size: 10px; }
.studyPlan { margin-top: 18px; padding: 29px; display: grid; grid-template-columns: .52fr 1.48fr; gap: 38px; }
.studyPlan h3, .subHeading h3 { margin: 6px 0 0; font-family: Georgia, serif; font-size: 28px; line-height: 1.18; font-weight: 500; }
.studyPlan ol { margin: 0; padding: 0; list-style: none; counter-reset: steps; display: grid; gap: 16px; }
.studyPlan li { counter-increment: steps; display: grid; grid-template-columns: 31px 1fr; gap: 11px; }
.studyPlan li::before { content: counter(steps); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-size: 11px; font-weight: 850; }
.studyPlan li b, .studyPlan li span { display: block; }
.studyPlan li b { font-size: 12px; }
.studyPlan li span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.subHeading { margin: 40px 0 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.subHeading p { max-width: 420px; margin: 0; color: var(--muted); font-size: 10px; text-align: right; }
.actGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.actCard { min-height: 137px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; background: var(--surface); }
.actHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.actShort { min-width: 38px; padding: 4px 7px; border-radius: 7px; background: var(--navy); color: #fff; font-size: 9px; text-align: center; font-weight: 850; }
.actCount { color: var(--muted); font-size: 9px; }
.actCard h4 { margin: 12px 0 10px; font-size: 12px; line-height: 1.35; }
.actCard a { margin-top: auto; color: var(--teal); font-size: 10px; font-weight: 750; text-decoration: none; }
.legalNotice { margin-top: 18px; padding: 20px; border-left: 4px solid var(--gold); }
.legalNotice b { font-size: 12px; }
.legalNotice p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }

.syllabusTools { margin-bottom: 18px; padding: 14px; display: flex; align-items: center; gap: 16px; }
.syllabusSearch { flex: 1; }
.syllabusTools > span { min-width: 70px; color: var(--muted); font-size: 11px; text-align: right; }
.syllabusGroups { display: grid; gap: 16px; }
.syllabusGroup { overflow: hidden; }
.syllabusGroup > header { padding: 18px 21px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.syllabusGroup h3 { margin: 0; font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
.syllabusGroup header span { color: var(--muted); font-size: 10px; }
.topicList { margin: 0; padding: 0; list-style: none; }
.topicItem { min-height: 61px; padding: 13px 20px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 39px 1fr; align-items: start; gap: 13px; }
.topicItem:last-child { border-bottom: 0; }
.topicNumber { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--teal-soft); color: var(--teal); font-size: 10px; font-weight: 850; }
.topicItem p { margin: 4px 0 0; font-size: 12px; }

.progressStats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 18px; }
.progressStat { padding: 20px; }
.progressStat span { color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; }
.progressStat strong { display: block; margin-top: 7px; font-family: Georgia, serif; font-size: 31px; line-height: 1; font-weight: 500; }
.progressStat small { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; }
.progressLayout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.historyCard, .weakCard { padding: 23px; }
.cardHeading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 15px; }
.cardHeading h3 { margin: 5px 0 0; font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.historyItem { padding: 13px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 16px; }
.historyItem:first-child { border-top: 0; }
.historyItem b, .historyItem small { display: block; }
.historyItem b { font-size: 11px; }
.historyItem small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.historyScore { text-align: right; }
.historyScore strong { display: block; font-size: 16px; }
.historyScore span { color: var(--muted); font-size: 8px; }
.historyScore.passed strong { color: var(--green); }
.historyScore.failed strong { color: var(--red); }
.weakArea { margin-top: 13px; }
.weakAreaHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 10px; }
.weakAreaHead span { color: var(--muted); }
.weakArea .barTrack { margin-top: 6px; }
.emptyProgress { padding: 30px 10px; color: var(--muted); text-align: center; font-size: 11px; }
.dataControls { margin-top: 18px; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.dataControls h3 { margin: 0; font-family: Georgia, serif; font-size: 19px; font-weight: 500; }
.dataControls p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }

.seoSection { border-top: 1px solid var(--line); background: var(--surface-2); }
.seoGrid { padding-block: 54px; display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 32px; }
.seoGrid h2 { margin: 7px 0 12px; font-family: Georgia, serif; font-size: 29px; line-height: 1.17; font-weight: 500; }
.seoGrid p { margin: 0 0 10px; color: var(--muted); font-size: 11px; }
.seoGrid details { border-top: 1px solid var(--line); padding-top: 13px; }
.seoGrid summary { cursor: pointer; font-size: 11px; font-weight: 780; }
.seoGrid details p { margin-top: 10px; }
.seoGrid a { color: var(--teal); }
.siteFooter { padding: 24px 0; background: var(--navy-2); color: #aebfc4; }
.footerInner { display: flex; justify-content: space-between; gap: 30px; font-size: 9px; }
.footerInner p { margin: 0; }
.footerInner b, .footerInner a { color: #eef4f3; }
.footerInner p:last-child { text-align: right; }

.appDialog { width: min(440px, calc(100% - 30px)); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 90px rgba(0,0,0,.35); }
.appDialog::backdrop { background: rgba(7, 20, 28, .65); backdrop-filter: blur(3px); }
.appDialog form { padding: 30px; text-align: center; }
.dialogIcon { width: 48px; height: 48px; margin: 0 auto 15px; display: grid; place-items: center; border-radius: 50%; background: var(--gold-soft); color: var(--gold); font-size: 22px; font-weight: 850; }
.appDialog h2 { margin: 0; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.appDialog p { margin: 9px 0 22px; color: var(--muted); font-size: 12px; }
.dialogActions { display: flex; justify-content: center; gap: 9px; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 300; transform: translateX(-50%); max-width: min(520px, calc(100% - 30px)); padding: 11px 16px; border-radius: 10px; background: var(--navy); color: #fff; box-shadow: var(--shadow); font-size: 11px; font-weight: 700; }

@media (max-width: 980px) {
  .heroGrid { grid-template-columns: 1fr .72fr; gap: 38px; }
  .testControls { grid-template-columns: 1fr 1fr; }
  .testControls .searchControl { grid-column: 1 / -1; }
  .examGrid, .actGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .runnerGrid { grid-template-columns: minmax(0, 1fr) 225px; }
  .palette { gap: 5px; }
  .matterOverview { grid-template-columns: 1fr; }
  .matterBlock { min-height: 210px; }
  .seoGrid { grid-template-columns: 1fr 1fr; }
  .seoGrid > div { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 24px, var(--shell)); }
  .headerInner { min-height: 64px; }
  .homeMark { width: 37px; height: 37px; }
  .homeLink b { font-size: 16px; }
  .homeLink small, .saveBadge { display: none; }
  .iconButton { width: 38px; height: 38px; }
  .hero { min-height: auto; }
  .heroGrid { min-height: auto; grid-template-columns: 1fr; gap: 35px; padding-block: 45px 62px; }
  .hero h1 { font-size: clamp(42px, 13vw, 60px); }
  .heroCopy > p { font-size: 16px; }
  .heroPanel { max-width: none; }
  .heroStat { min-height: 98px; padding: 17px; }
  .heroStat strong { font-size: 28px; }
  .appShell { margin-top: -22px; }
  .appTabs { min-height: 67px; padding: 6px; overflow-x: auto; display: flex; scrollbar-width: none; }
  .appTabs::-webkit-scrollbar { display: none; }
  .tabButton { min-width: 118px; min-height: 53px; padding-inline: 11px; font-size: 10px; }
  .tabButton svg { width: 17px; }
  .appView { padding-top: 35px; }
  .sectionHeading { align-items: flex-start; flex-direction: column; gap: 13px; }
  .sectionHeading h2 { font-size: 31px; }
  .sectionHeading .button { align-self: stretch; }
  .resumeBanner { align-items: flex-start; flex-direction: column; }
  .testControls { grid-template-columns: 1fr; gap: 17px; }
  .testControls .searchControl { grid-column: auto; }
  .controlGroup { align-items: flex-start; flex-direction: column; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
  .examGrid { grid-template-columns: 1fr; }
  .examCard { min-height: 224px; }
  .randomLayout { grid-template-columns: 1fr; }
  .randomCard { min-height: 430px; padding: 30px; }
  .randomIcon { width: 70px; height: 70px; margin-bottom: 24px; }
  .randomIcon svg { width: 43px; }
  .randomSettings { padding: 23px; }
  .runnerTop { grid-template-columns: auto 1fr; gap: 12px; }
  .runnerIdentity { text-align: left; }
  .runnerIdentity h2 { font-size: 16px; }
  .timerBox { grid-column: 1 / -1; width: 100%; justify-self: stretch; }
  .runnerMeta { flex-wrap: wrap; gap: 5px 12px; padding-block: 9px; }
  .runnerMeta #feedbackMeta { flex: 1 1 50%; }
  .runnerGrid { grid-template-columns: 1fr; }
  .paletteCard { position: static; order: -1; padding: 14px; }
  .paletteHead, .paletteLegend { display: none; }
  .palette { margin: 0 0 13px; grid-template-columns: repeat(10, 1fr); gap: 4px; }
  .palette button { border-radius: 6px; font-size: 8px; }
  .paletteCard > .button { min-height: 42px; }
  .questionCard, .resultCard { min-height: 0; padding: 23px 18px; }
  .questionHead { flex-wrap: wrap; }
  .questionSource { width: 100%; margin-left: 0; }
  .questionCard h3 { font-size: 21px; }
  .answerOption { grid-template-columns: 30px 1fr; padding: 12px; }
  .answerMark { grid-column: 2; }
  .questionActions { flex-wrap: wrap; }
  .questionActions .button { min-width: 104px; flex: 1; }
  .questionPosition { width: 100%; order: -1; text-align: center; }
  .resultStats { grid-template-columns: 1fr 1fr; }
  .areaBar { grid-template-columns: 1fr 50px; }
  .areaBar .barTrack { grid-column: 1 / -1; order: 3; }
  .studyPlan { grid-template-columns: 1fr; gap: 24px; }
  .subHeading { align-items: flex-start; flex-direction: column; }
  .subHeading p { text-align: left; }
  .actGrid { grid-template-columns: 1fr; }
  .progressStats { grid-template-columns: 1fr 1fr; }
  .progressLayout { grid-template-columns: 1fr; }
  .dataControls { align-items: flex-start; flex-direction: column; }
  .dataControls .button { width: 100%; }
  .seoGrid { grid-template-columns: 1fr; padding-block: 40px; }
  .seoGrid > div { grid-column: auto; }
  .footerInner { flex-direction: column; }
  .footerInner p:last-child { text-align: left; }
}

@media (max-width: 410px) {
  .heroActions .button { width: 100%; }
  .heroPanel { grid-template-columns: 1fr 1fr; }
  .heroStat { padding: 14px; }
  .tabButton { min-width: 108px; }
  .palette { grid-template-columns: repeat(6, 1fr); }
  .progressStats { grid-template-columns: 1fr; }
}

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

@media print {
  .siteHeader, .hero, .appTabs, .paletteCard, .runnerTop, .runnerMeta, .questionActions, .siteFooter, .seoSection, .toast { display: none !important; }
  body { background: #fff; color: #000; }
  .appShell { width: 100%; margin: 0; padding: 0; }
  .appView { padding: 0; }
  .runnerGrid { display: block; }
  .questionCard, .resultCard { border: 0; box-shadow: none; }
}
