:root {
  color-scheme: light;
  --ink-950: #0b1f3a;
  --ink-900: #142a47;
  --ink-700: #42526a;
  --ink-500: #66758a;
  --ink-300: #a8b3c2;
  --blue-700: #1746a2;
  --blue-600: #155eef;
  --blue-100: #eaf2ff;
  --teal-700: #08796d;
  --teal-100: #e5f7f3;
  --red-600: #d92d4b;
  --red-100: #fff0f2;
  --gold-500: #f5b51b;
  --gold-100: #fff8df;
  --gold-text: #8b4d00;
  --green-700: #16834b;
  --green-100: #e9f8ef;
  --accent-on-solid: #ffffff;
  --surface: #ffffff;
  --canvas: #f5f7fa;
  --canvas-blue: #edf4ff;
  --line: #dfe5ec;
  --line-strong: #c8d1dc;
  --header-bg: rgba(255, 255, 255, 0.96);
  --hero-ink: #0b1f3a;
  --hero-ink-2: #142a47;
  --tab-bg: #ebeff4;
  --track-bg: #e9edf2;
  --article-text: #31445f;
  --option-hover: #f8fbff;
  --score-track: #e2e7ed;
  --shadow-sm: 0 1px 2px rgba(11, 31, 58, 0.06), 0 4px 12px rgba(11, 31, 58, 0.04);
  --shadow-lg: 0 20px 50px rgba(11, 31, 58, 0.14);
  --radius: 8px;
  --shell: 1180px;
  --header-height: 76px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink-950: #f4f7fb;
  --ink-900: #e3eaf2;
  --ink-700: #c0cad8;
  --ink-500: #9aa9bc;
  --ink-300: #738399;
  --blue-700: #b8d0ff;
  --blue-600: #82afff;
  --blue-100: #183153;
  --teal-700: #63d5c8;
  --teal-100: #173632;
  --red-600: #ff8095;
  --red-100: #3b202b;
  --gold-500: #f7c64b;
  --gold-100: #352d18;
  --gold-text: #ffd36b;
  --green-700: #68d293;
  --green-100: #173426;
  --accent-on-solid: #0b1f3a;
  --surface: #152237;
  --canvas: #0d1624;
  --canvas-blue: #112640;
  --line: #2c3b50;
  --line-strong: #43546c;
  --header-bg: rgba(13, 22, 36, 0.96);
  --tab-bg: #101c2d;
  --track-bg: #27364a;
  --article-text: #c5cfdd;
  --option-hover: #192a42;
  --score-track: #304056;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.22), 0 5px 14px rgba(0, 0, 0, 0.16);
  --shadow-lg: 0 22px 54px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--ink-950);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  transition: background 180ms ease, color 180ms ease;
}

body.nav-open,
body.dialog-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

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

button {
  color: inherit;
}

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

img {
  display: block;
  max-width: 100%;
}

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

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  letter-spacing: 0;
}

h1 {
  font-size: 3.75rem;
}

h2 {
  font-size: 2.25rem;
}

h3 {
  font-size: 1.25rem;
}

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink-950);
  box-shadow: var(--shadow-lg);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(11, 31, 58, 0.18);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-copy strong {
  font-size: 0.98rem;
  line-height: 1.3;
}

.brand-copy small {
  color: var(--ink-500);
  font-size: 0.75rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.desktop-nav a {
  position: relative;
  padding: 25px 14px 24px;
  color: var(--ink-700);
  font-size: 0.92rem;
  font-weight: 700;
}

.desktop-nav a::after {
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--blue-600);
  content: "";
  opacity: 0;
  transform: scaleX(0.3);
  transition: opacity 160ms ease, transform 160ms ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--blue-600);
}

.desktop-nav a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.useful-links-menu {
  position: relative;
}

.useful-links-menu summary {
  position: relative;
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  padding: 0 31px 0 14px;
  color: var(--ink-700);
  font-size: 0.92rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.useful-links-menu summary::-webkit-details-marker,
.mobile-useful-links summary::-webkit-details-marker {
  display: none;
}

.useful-links-menu summary::after,
.mobile-useful-links summary::after {
  position: absolute;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.useful-links-menu summary::after {
  right: 15px;
  top: calc(50% - 5px);
}

.useful-links-menu[open] summary,
.useful-links-menu summary:hover {
  color: var(--blue-600);
}

.useful-links-menu[open] summary::after,
.mobile-useful-links[open] summary::after {
  transform: translateY(4px) rotate(225deg);
}

.useful-links-menu summary:focus-visible {
  border-radius: 4px;
  outline: 3px solid rgba(21, 94, 239, 0.2);
  outline-offset: -5px;
}

.useful-links-panel {
  position: absolute;
  top: calc(100% - 8px);
  left: 0;
  width: 310px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.desktop-nav .useful-links-panel a {
  display: block;
  border-radius: 5px;
  padding: 11px 12px;
  color: var(--ink-900);
}

.desktop-nav .useful-links-panel a::after {
  display: none;
}

.desktop-nav .useful-links-panel a:hover {
  background: var(--canvas-blue);
  color: var(--blue-600);
}

.useful-links-panel strong,
.useful-links-panel span {
  display: block;
}

.useful-links-panel strong {
  margin-bottom: 2px;
  font-size: 0.86rem;
}

.useful-links-panel span {
  color: var(--ink-500);
  font-size: 0.76rem;
  font-weight: 600;
}

.app-store-badge-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  line-height: 0;
  transition: filter 160ms ease, transform 160ms ease;
}

.app-store-badge-link:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.app-store-badge {
  width: 180px;
  height: auto;
}

.header-app-link {
  flex: 0 0 auto;
}

.header-app-link .app-store-badge {
  width: 146px;
}

.theme-toggle {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-900);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.theme-toggle:hover {
  border-color: var(--blue-600);
  background: var(--blue-100);
  transform: translateY(-1px);
}

.theme-glyph {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
}

.theme-glyph::before {
  content: "\263E";
  font-size: 1.35rem;
  line-height: 1;
}

[data-theme="dark"] .theme-glyph::before {
  content: "\2600";
  font-size: 1.25rem;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--ink-950);
  transition: transform 160ms ease, opacity 160ms ease;
}

.menu-button[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-button[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-button[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: var(--header-height) 0 0;
  z-index: 49;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px;
  background: var(--surface);
}

.mobile-nav a {
  display: block;
  border-bottom: 1px solid var(--line);
  padding: 17px 2px;
  font-size: 1.1rem;
  font-weight: 750;
}

.mobile-nav a.active {
  color: var(--blue-600);
}

.mobile-useful-links {
  border-bottom: 1px solid var(--line);
}

.mobile-useful-links summary {
  position: relative;
  padding: 17px 28px 17px 2px;
  font-size: 1.1rem;
  font-weight: 750;
  list-style: none;
  cursor: pointer;
}

.mobile-useful-links summary::after {
  top: calc(50% - 6px);
  right: 6px;
}

.mobile-useful-links > div {
  display: grid;
  gap: 4px;
  padding-bottom: 14px;
}

.mobile-nav .mobile-useful-links a {
  border: 0;
  border-radius: 5px;
  padding: 11px 14px;
  background: var(--canvas);
  color: var(--ink-700);
  font-size: 0.92rem;
}

.mobile-nav .mobile-useful-links a:hover {
  background: var(--canvas-blue);
  color: var(--blue-600);
}

.mobile-nav .mobile-app-link {
  display: flex;
  justify-content: center;
  margin-top: 18px;
  border: 0;
  padding: 0;
  background: transparent;
}

.mobile-app-link .app-store-badge {
  width: 184px;
}

.loading-screen {
  display: grid;
  min-height: calc(100vh - var(--header-height));
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--ink-500);
}

.loader {
  width: 36px;
  height: 36px;
  border: 3px solid var(--line);
  border-top-color: var(--blue-600);
  border-radius: 50%;
  animation: spin 750ms linear infinite;
}

.noscript-message {
  margin: 32px;
  padding: 18px;
  border: 1px solid var(--red-600);
  border-radius: var(--radius);
  background: var(--red-100);
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--blue-600);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.eyebrow.on-dark {
  color: #b9d2ff;
}

.muted-copy {
  color: var(--ink-500);
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 18px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

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

.button-primary {
  background: var(--blue-600);
  color: var(--accent-on-solid);
  box-shadow: 0 8px 20px rgba(21, 94, 239, 0.22);
}

.button-primary:hover {
  background: var(--blue-700);
}

.button-light {
  border-color: rgba(255, 255, 255, 0.72);
  background: #fff;
  color: var(--hero-ink);
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink-900);
}

.button-secondary:hover {
  border-color: var(--blue-600);
  color: var(--blue-600);
}

.button-hero-outline {
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(11, 31, 58, 0.42);
  color: #fff;
}

.button-hero-outline:hover {
  border-color: #fff;
  background: rgba(11, 31, 58, 0.7);
}

.button-danger {
  background: var(--red-600);
  color: var(--accent-on-solid);
}

.button-quiet {
  min-height: 42px;
  padding-inline: 12px;
  background: transparent;
  color: var(--ink-700);
}

.button[disabled] {
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.46;
  transform: none;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-hero {
  position: relative;
  min-height: 490px;
  overflow: hidden;
  background: var(--hero-ink);
  color: #fff;
}

.home-hero::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(11, 31, 58, 1) 0%, rgba(11, 31, 58, 0.96) 52%, rgba(11, 31, 58, 0.34) 100%),
    url("/assets/history/bayeux-tapestry.jpg");
  background-position: center;
  background-size: cover;
  content: "";
}

.home-hero::after {
  display: none;
  content: "";
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 490px;
  align-items: center;
  padding-block: 66px;
}

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

.hero-copy h1 {
  max-width: 670px;
  margin-bottom: 20px;
}

.hero-copy .lead {
  max-width: 610px;
  margin-bottom: 28px;
  color: #d6dfeb;
  font-size: 1.15rem;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 30px;
  color: #d6dfeb;
  font-size: 0.88rem;
  font-weight: 700;
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-proof span::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-500);
  content: "";
}

.progress-band {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.progress-band-inner {
  display: grid;
  grid-template-columns: 1.1fr repeat(3, 0.55fr);
  gap: 0;
  align-items: stretch;
}

.resource-band-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.resource-band .metric:first-child {
  border-left: 0;
  padding-left: 0;
}

.progress-overview,
.metric {
  padding: 23px 24px;
}

.metric {
  border-left: 1px solid var(--line);
}

.progress-overview {
  padding-left: 0;
}

.progress-heading,
.metric span {
  display: block;
  color: var(--ink-500);
  font-size: 0.8rem;
  font-weight: 750;
}

.progress-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.progress-heading strong {
  color: var(--ink-950);
}

.progress-track {
  height: 7px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 7px;
  background: var(--track-bg);
}

.progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue-600);
  transition: width 500ms ease;
}

.metric strong {
  display: block;
  margin-top: 2px;
  font-size: 1.3rem;
}

.app-promo {
  overflow: hidden;
  border-bottom: 1px solid #263c59;
  background: var(--hero-ink-2);
  color: #fff;
  animation: app-promo-in 420ms ease both;
}

.app-promo-inner {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  padding-block: 38px;
}

.app-promo-icon {
  width: 112px;
  height: 112px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.app-promo-copy .eyebrow {
  margin-bottom: 7px;
}

.app-promo-copy h2 {
  margin-bottom: 8px;
  font-size: 1.85rem;
}

.app-promo-copy > p:not(.eyebrow) {
  max-width: 680px;
  margin-bottom: 13px;
  color: #cdd8e7;
}

.app-check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-check-list li {
  position: relative;
  padding-left: 18px;
  color: inherit;
  font-size: 0.84rem;
  font-weight: 750;
}

.app-check-list li::before {
  position: absolute;
  top: 6px;
  left: 2px;
  width: 5px;
  height: 9px;
  border-right: 2px solid var(--gold-500);
  border-bottom: 2px solid var(--gold-500);
  content: "";
  transform: rotate(45deg);
}

.page-section {
  padding-block: 72px;
}

.page-section.white {
  background: var(--surface);
}

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

.section-heading-copy {
  max-width: 720px;
}

.section-heading h1,
.section-heading h2 {
  margin-bottom: 10px;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--ink-500);
}

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

.path-card,
.chapter-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.path-card:hover,
.chapter-card:hover {
  border-color: #a8c5ff;
  box-shadow: 0 12px 28px rgba(11, 31, 58, 0.11);
  transform: translateY(-3px);
}

.path-card {
  display: flex;
  min-height: 310px;
  flex-direction: column;
}

.path-art {
  position: relative;
  height: 142px;
  overflow: hidden;
  background: var(--hero-ink-2);
}

.path-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  transition: transform 450ms ease;
}

.path-card:hover .path-art img {
  transform: scale(1.035);
}

.path-art::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(11, 31, 58, 0.58), transparent);
  content: "";
}

.path-number {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 1;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 850;
}

.path-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.path-body h3 {
  margin-bottom: 9px;
}

.path-body p {
  margin-bottom: 20px;
  color: var(--ink-500);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: var(--blue-600);
  font-weight: 800;
}

.text-link::after {
  content: ">";
  transition: transform 160ms ease;
}

.path-card:hover .text-link::after,
.chapter-card:hover .text-link::after {
  transform: translateX(3px);
}

.resume-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  border-left: 5px solid var(--gold-500);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 20px;
  background: var(--gold-100);
}

.resume-strip p {
  margin: 2px 0 0;
  color: var(--ink-700);
}

.exam-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.exam-fact {
  padding: 25px;
  background: var(--surface);
}

.exam-fact strong {
  display: block;
  margin-bottom: 2px;
  font-size: 1.55rem;
}

.exam-fact span {
  color: var(--ink-500);
}

.page-hero {
  padding-block: 58px 48px;
  background: var(--hero-ink);
  color: #fff;
}

.page-hero .section-heading {
  margin-bottom: 0;
}

.page-hero .section-heading p {
  color: #ccd7e5;
}

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

.chapter-card {
  display: grid;
  min-height: 220px;
  grid-template-columns: 185px 1fr;
}

.chapter-cover {
  min-height: 220px;
  overflow: hidden;
  background: var(--hero-ink-2);
}

.chapter-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chapter-card-content {
  display: flex;
  flex-direction: column;
  padding: 22px;
}

.chapter-card-content h2 {
  margin-bottom: 9px;
  font-size: 1.28rem;
}

.chapter-card-content p {
  margin-bottom: 18px;
  color: var(--ink-500);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 14px;
  color: var(--ink-500);
  font-size: 0.82rem;
  font-weight: 700;
}

.status-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  border-radius: 4px;
  padding: 4px 8px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.status-label.complete {
  background: var(--green-100);
  color: var(--green-700);
}

.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.search-wrap {
  position: relative;
  width: min(440px, 100%);
}

.search-wrap::before {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--ink-500);
  border-radius: 50%;
  content: "";
  transform: translateY(-60%);
}

.search-wrap::after {
  position: absolute;
  top: 29px;
  left: 28px;
  width: 7px;
  height: 2px;
  background: var(--ink-500);
  content: "";
  transform: rotate(45deg);
}

.search-input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 15px 0 43px;
  background: var(--surface);
  color: var(--ink-950);
}

.search-input:focus {
  border-color: var(--blue-600);
  outline: 3px solid rgba(21, 94, 239, 0.16);
}

.tabs {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--tab-bg);
}

.tab {
  min-height: 40px;
  border: 0;
  border-radius: 4px;
  padding: 0 15px;
  background: transparent;
  color: var(--ink-500);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

.tab.active {
  background: var(--surface);
  color: var(--ink-950);
  box-shadow: var(--shadow-sm);
}

.group-block + .group-block {
  margin-top: 42px;
}

.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.group-title h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
}

.group-title span {
  color: var(--ink-500);
  font-size: 0.86rem;
}

.test-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.test-card {
  display: flex;
  min-height: 156px;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.test-card:hover {
  border-color: #9bbdff;
  box-shadow: 0 10px 24px rgba(11, 31, 58, 0.1);
  transform: translateY(-2px);
}

.test-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.test-index {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 0.78rem;
  font-weight: 850;
}

.score-badge {
  border-radius: 4px;
  padding: 4px 8px;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 0.72rem;
  font-weight: 850;
}

.test-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.new-badge {
  border-radius: 4px;
  padding: 4px 8px;
  background: var(--red-600);
  color: var(--accent-on-solid);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.6;
  text-transform: uppercase;
}

.score-badge.not-passed {
  background: var(--red-100);
  color: var(--red-600);
}

.test-card h3 {
  margin-bottom: 7px;
  font-size: 1rem;
}

.test-card p {
  margin-bottom: 0;
  color: var(--ink-500);
  font-size: 0.86rem;
}

.test-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  color: var(--blue-600);
  font-size: 0.82rem;
  font-weight: 850;
}

.empty-state {
  padding: 56px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.empty-state h2 {
  margin-bottom: 7px;
  font-size: 1.3rem;
}

.reader-header {
  border-bottom: 1px solid var(--line);
  padding-block: 27px 24px;
  background: var(--surface);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--ink-500);
  font-size: 0.82rem;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: var(--blue-600);
}

.reader-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.reader-title-row h1 {
  max-width: 760px;
  margin-bottom: 8px;
  font-size: 2.4rem;
}

.reader-title-row p {
  margin-bottom: 0;
  color: var(--ink-500);
}

.reader-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 760px);
  gap: 52px;
  align-items: start;
  justify-content: center;
  padding-block: 34px 80px;
}

.reader-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.reader-sidebar-title {
  display: block;
  margin-bottom: 10px;
  color: var(--ink-500);
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.reader-progress {
  margin-bottom: 21px;
}

.reader-progress .progress-heading {
  font-size: 0.75rem;
}

.toc {
  max-height: calc(100vh - 270px);
  overflow: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: 7px;
  scrollbar-width: thin;
}

.toc button {
  display: block;
  width: 100%;
  border: 0;
  border-left: 3px solid transparent;
  padding: 9px 10px;
  background: transparent;
  color: var(--ink-700);
  font-size: 0.8rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.toc button:hover,
.toc button.active {
  border-left-color: var(--blue-600);
  background: var(--blue-100);
  color: var(--blue-700);
}

.reader-sidebar-actions {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.reader-article {
  min-width: 0;
  padding-bottom: 20px;
  background: var(--surface);
}

.reader-article-intro {
  margin-bottom: 34px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
}

.reader-article-intro p {
  color: var(--ink-700);
  font-size: 1.06rem;
}

.study-section {
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.study-section + .study-section {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  padding-top: 39px;
}

.study-section > h2 {
  margin-bottom: 17px;
  font-size: 1.65rem;
}

.study-content h3 {
  margin: 29px 0 12px;
  font-size: 1.18rem;
}

.study-content h4 {
  margin: 24px 0 10px;
  font-size: 1.02rem;
}

.study-content p,
.study-content li {
  color: var(--article-text);
}

.study-content p {
  margin-bottom: 17px;
}

.study-content ul {
  margin-bottom: 20px;
  padding-left: 24px;
}

.study-content li + li {
  margin-top: 7px;
}

.study-figure {
  margin: 28px 0;
}

.study-figure img {
  max-height: 540px;
  border-radius: 6px;
  object-fit: cover;
}

.study-figure figcaption {
  margin-top: 9px;
  color: var(--ink-500);
  font-size: 0.8rem;
}

.mobile-reader-nav {
  display: none;
}

.quiz-page {
  min-height: calc(100vh - var(--header-height));
  padding-block: 30px 70px;
}

.quiz-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.quiz-status-copy {
  min-width: 0;
}

.quiz-status-copy h1 {
  overflow: hidden;
  margin-bottom: 3px;
  font-size: 1.18rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quiz-status-copy p {
  margin-bottom: 0;
  color: var(--ink-500);
  font-size: 0.82rem;
}

.timer {
  display: inline-flex;
  min-width: 105px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-950);
  font-variant-numeric: tabular-nums;
  font-weight: 850;
}

.timer.warning {
  border-color: #ef8b00;
  background: var(--gold-100);
  color: var(--gold-text);
}

.quiz-progress {
  height: 6px;
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--track-bg);
}

.quiz-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue-600);
  transition: width 220ms ease;
}

.quiz-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: start;
}

.question-panel {
  min-height: 550px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.question-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
  color: var(--ink-500);
  font-size: 0.78rem;
  font-weight: 800;
}

.question-panel h2 {
  max-width: 820px;
  margin-bottom: 14px;
  font-size: 1.65rem;
}

.question-instruction {
  margin-bottom: 24px;
  color: var(--ink-500);
  font-size: 0.9rem;
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  position: relative;
  display: grid;
  min-height: 60px;
  grid-template-columns: 34px 1fr;
  gap: 13px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 12px 15px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.option:hover {
  border-color: #8ab0ff;
  background: var(--option-hover);
}

.option.selected {
  border-color: var(--blue-600);
  background: var(--blue-100);
  box-shadow: 0 0 0 1px var(--blue-600);
}

.option.correct {
  border-color: #47a878;
  background: var(--green-100);
  box-shadow: 0 0 0 1px #47a878;
}

.option.wrong {
  border-color: #ed7187;
  background: var(--red-100);
  box-shadow: 0 0 0 1px #ed7187;
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-letter {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-700);
  font-size: 0.78rem;
  font-weight: 850;
}

.selected .option-letter {
  border-color: var(--blue-600);
  background: var(--blue-600);
  color: var(--accent-on-solid);
}

.correct .option-letter {
  border-color: var(--green-700);
  background: var(--green-700);
  color: var(--accent-on-solid);
}

.wrong .option-letter {
  border-color: var(--red-600);
  background: var(--red-600);
  color: var(--accent-on-solid);
}

.option-text {
  color: var(--ink-900);
  line-height: 1.4;
}

.feedback {
  margin-top: 20px;
  border-left: 4px solid var(--green-700);
  padding: 15px 17px;
  background: var(--green-100);
}

.feedback.incorrect {
  border-left-color: var(--red-600);
  background: var(--red-100);
}

.feedback strong {
  display: block;
  margin-bottom: 4px;
}

.feedback p {
  margin-bottom: 0;
  color: var(--ink-700);
}

.question-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.question-actions-right {
  display: flex;
  gap: 9px;
}

.quiz-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 19px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.quiz-sidebar h2 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.quiz-sidebar > p {
  margin-bottom: 16px;
  color: var(--ink-500);
  font-size: 0.8rem;
}

.question-map {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.question-map button {
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink-700);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.question-map button.current {
  border-color: var(--blue-600);
  background: var(--blue-600);
  color: var(--accent-on-solid);
}

.question-map button.answered {
  border-color: #96b7f8;
  background: var(--blue-100);
  color: var(--blue-700);
}

.question-map button.correct {
  border-color: #65b58a;
  background: var(--green-100);
  color: var(--green-700);
}

.question-map button.wrong {
  border-color: #f09aab;
  background: var(--red-100);
  color: var(--red-600);
}

.question-map-key {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 20px;
  color: var(--ink-500);
  font-size: 0.72rem;
}

.question-map-key span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.question-map-key i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--line-strong);
}

.question-map-key .answered-key {
  background: var(--blue-600);
}

.quiz-sidebar .button {
  width: 100%;
}

.results-page {
  min-height: calc(100vh - var(--header-height));
  padding-block: 56px 80px;
}

.result-hero {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 34px;
  align-items: center;
  margin-bottom: 38px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 38px;
}

.score-ring {
  display: grid;
  width: 170px;
  height: 170px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--green-700) var(--score-angle), var(--score-track) 0);
}

.score-ring.failed {
  background: conic-gradient(var(--red-600) var(--score-angle), var(--score-track) 0);
}

.score-ring-inner {
  display: grid;
  width: 136px;
  height: 136px;
  place-items: center;
  border-radius: 50%;
  background: var(--canvas);
  text-align: center;
}

.score-ring strong {
  display: block;
  font-size: 2.35rem;
  line-height: 1;
}

.score-ring span {
  color: var(--ink-500);
  font-size: 0.75rem;
}

.result-copy h1 {
  margin-bottom: 9px;
  font-size: 2.6rem;
}

.result-copy > p {
  max-width: 620px;
  margin-bottom: 20px;
  color: var(--ink-500);
}

.result-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 22px;
}

.result-metrics span {
  color: var(--ink-500);
  font-size: 0.78rem;
}

.result-metrics strong {
  display: block;
  color: var(--ink-950);
  font-size: 1.25rem;
}

.review-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.review-heading h2 {
  margin-bottom: 0;
  font-size: 1.5rem;
}

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

.review-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--surface);
}

.review-item.correct-review {
  border-left: 4px solid var(--green-700);
}

.review-item.wrong-review {
  border-left: 4px solid var(--red-600);
}

.review-item h3 {
  margin-bottom: 13px;
  font-size: 1rem;
}

.review-answer {
  margin-bottom: 6px;
  color: var(--ink-700);
  font-size: 0.88rem;
}

.review-answer strong {
  color: var(--ink-950);
}

.review-explanation {
  margin: 12px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--ink-500);
  font-size: 0.86rem;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 70px;
  align-items: start;
}

.about-layout h1 {
  margin-bottom: 18px;
  font-size: 3rem;
}

.about-copy {
  color: var(--ink-700);
  font-size: 1.04rem;
}

.about-copy h2 {
  margin: 36px 0 12px;
  color: var(--ink-950);
  font-size: 1.25rem;
}

.about-copy a:not(.button) {
  color: var(--blue-600);
  font-weight: 800;
}

.faq-hero {
  overflow: hidden;
  border-bottom: 5px solid var(--gold-500);
  padding-block: 64px 58px;
  background: #0b1f3a;
  color: #fff;
}

.faq-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  gap: 72px;
  align-items: end;
}

.faq-hero-copy {
  max-width: 690px;
}

.faq-hero-copy h1 {
  margin-bottom: 14px;
  font-size: 3.35rem;
}

.faq-hero-copy > p:not(.eyebrow, .faq-guidance-note) {
  max-width: 620px;
  margin-bottom: 14px;
  color: #d5dfeb;
  font-size: 1.12rem;
}

.faq-guidance-note {
  margin-bottom: 0;
  color: #9eb0c5;
  font-size: 0.8rem;
  font-weight: 700;
}

.faq-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  border-left: 1px solid rgba(255, 255, 255, 0.24);
}

.faq-facts div {
  display: flex;
  min-height: 88px;
  flex-direction: column-reverse;
  justify-content: center;
  border-right: 1px solid rgba(255, 255, 255, 0.24);
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  padding: 15px 20px;
}

.faq-facts dt {
  color: #aebed0;
  font-size: 0.78rem;
  font-weight: 750;
}

.faq-facts dd {
  margin: 0 0 1px;
  color: #fff;
  font-size: 1.62rem;
  font-weight: 850;
  line-height: 1.15;
}

.faq-page {
  min-height: 680px;
}

.faq-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.faq-search-wrap {
  width: min(650px, 100%);
}

.faq-toolbar-meta {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 18px;
  color: var(--ink-500);
  font-size: 0.84rem;
  font-weight: 750;
}

.faq-expand-button {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--blue-600);
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.faq-expand-button:hover {
  border-color: var(--blue-600);
  background: var(--blue-100);
}

.faq-expand-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.faq-filters {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin-bottom: 48px;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.faq-filter {
  min-height: 40px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink-700);
  font-size: 0.84rem;
  font-weight: 780;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.faq-filter:hover {
  border-color: var(--blue-600);
  color: var(--blue-600);
}

.faq-filter.active {
  border-color: var(--blue-600);
  background: var(--blue-600);
  color: var(--accent-on-solid);
}

.faq-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 58px;
  align-items: start;
}

.faq-aside {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  border-left: 4px solid var(--teal-700);
  padding: 4px 0 4px 20px;
}

.faq-aside h2 {
  margin-bottom: 9px;
  font-size: 1.22rem;
}

.faq-aside p:not(.eyebrow) {
  margin-bottom: 16px;
  color: var(--ink-500);
  font-size: 0.9rem;
}

.faq-aside .text-link {
  font-size: 0.86rem;
}

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

.faq-group + .faq-group {
  margin-top: 46px;
}

.faq-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.faq-group-heading h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

.faq-group-heading span {
  color: var(--ink-500);
  font-size: 0.78rem;
  font-weight: 750;
}

.faq-list {
  border-top: 1px solid var(--line-strong);
}

.faq-item {
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.faq-item summary {
  display: grid;
  min-height: 72px;
  grid-template-columns: minmax(0, 1fr) 22px;
  gap: 20px;
  align-items: center;
  padding: 18px 8px;
  color: var(--ink-900);
  font-weight: 800;
  list-style: none;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

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

.faq-item summary:hover {
  background: var(--option-hover);
  color: var(--blue-600);
}

.faq-chevron {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: border-color 160ms ease, background 160ms ease, transform 180ms ease;
}

.faq-chevron::before,
.faq-chevron::after {
  position: absolute;
  top: 9px;
  left: 5px;
  width: 8px;
  height: 2px;
  background: currentColor;
  content: "";
}

.faq-chevron::after {
  transform: rotate(90deg);
}

.faq-item[open] summary {
  color: var(--blue-600);
}

.faq-item[open] .faq-chevron {
  border-color: var(--blue-600);
  background: var(--blue-100);
  transform: rotate(45deg);
}

.faq-answer {
  max-width: 760px;
  padding: 0 52px 24px 8px;
  color: var(--article-text);
  animation: faq-answer-in 180ms ease both;
}

.faq-answer p {
  margin-bottom: 11px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer a {
  color: var(--blue-600);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-empty {
  margin-top: 10px;
}

.faq-empty .button {
  margin-top: 8px;
}

.faq-help-band {
  border-top: 1px solid var(--line);
  padding-block: 48px;
  background: var(--canvas-blue);
}

.faq-help-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.faq-help-inner h2 {
  margin-bottom: 7px;
  font-size: 1.8rem;
}

.faq-help-inner p:not(.eyebrow) {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--ink-500);
}

.faq-help-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

@keyframes faq-answer-in {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
}

.trust-list {
  display: grid;
  gap: 1px;
  margin-top: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.trust-item {
  padding: 18px;
  background: var(--surface);
}

.trust-item strong {
  display: block;
  margin-bottom: 3px;
}

.trust-item span {
  color: var(--ink-500);
  font-size: 0.88rem;
}

.legal-hero .section-heading-copy {
  max-width: 790px;
}

.legal-content {
  max-width: 840px;
}

.legal-content h2 {
  margin: 38px 0 12px;
  font-size: 1.35rem;
}

.legal-content p,
.legal-content li {
  color: var(--ink-700);
}

.legal-content a:not(.button) {
  color: var(--blue-600);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-updated {
  margin-bottom: 24px;
  font-size: 0.86rem;
  font-weight: 750;
}

.legal-summary {
  border-left: 5px solid var(--blue-600);
  padding: 18px 20px;
  background: var(--canvas-blue);
}

.legal-summary strong {
  display: block;
  margin-bottom: 4px;
}

.legal-summary p {
  margin: 0;
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 42px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 29px;
  background: var(--surface);
  color: var(--ink-500);
  font-size: 0.82rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a:hover {
  color: var(--blue-600);
}

.footer-inner > span a {
  color: var(--blue-600);
  font-weight: 750;
}

.footer-control {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  cursor: pointer;
}

.footer-control:hover {
  color: var(--blue-600);
}

.footer-social-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.footer-social-row > span {
  color: var(--ink-700);
  font-weight: 750;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-link {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 2px 7px rgba(11, 31, 58, 0.14);
  transition: box-shadow 160ms ease, filter 160ms ease, transform 160ms ease;
}

.social-link:hover {
  box-shadow: 0 7px 16px rgba(11, 31, 58, 0.2);
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.social-icon {
  width: 23px;
  height: 23px;
  background: currentColor;
  mask: var(--social-icon) center / contain no-repeat;
  -webkit-mask: var(--social-icon) center / contain no-repeat;
}

.social-facebook {
  --social-icon: url("/assets/social/facebook.svg");
  background: #0866ff;
}

.social-youtube {
  --social-icon: url("/assets/social/youtube.svg");
  border-color: var(--line-strong);
  background: #fff;
  color: #ff0000;
}

.social-x {
  --social-icon: url("/assets/social/x.svg");
  background: #050505;
}

.social-tiktok {
  --social-icon: url("/assets/social/tiktok.svg");
  background: #050505;
}

.social-instagram {
  --social-icon: url("/assets/social/instagram.svg");
  background: linear-gradient(135deg, #7638fa, #e1306c 56%, #ffb900);
}

.social-soundcloud {
  --social-icon: url("/assets/social/soundcloud.svg");
  background: #ff5500;
}

.consent-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 90;
  display: grid;
  width: min(900px, calc(100% - 40px));
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  margin-inline: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: consent-in 240ms ease both;
}

.consent-copy strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

.consent-copy p {
  margin: 0;
  color: var(--ink-500);
  font-size: 0.86rem;
}

.consent-copy a {
  color: var(--blue-600);
  font-weight: 800;
}

.consent-actions {
  display: flex;
  gap: 8px;
}

.consent-actions .button {
  min-height: 44px;
  white-space: nowrap;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  max-width: min(390px, calc(100% - 40px));
  border-radius: 6px;
  padding: 13px 16px;
  background: var(--hero-ink);
  color: #fff;
  box-shadow: var(--shadow-lg);
  font-weight: 700;
  animation: toast-in 220ms ease both;
}

.confirm-dialog {
  width: min(470px, calc(100% - 32px));
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow-lg);
}

.confirm-dialog::backdrop {
  background: rgba(11, 31, 58, 0.64);
  backdrop-filter: blur(4px);
}

.dialog-body {
  padding: 26px;
}

.dialog-body h2 {
  margin-bottom: 10px;
  font-size: 1.4rem;
}

.dialog-body p {
  color: var(--ink-500);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding: 16px 26px;
  background: var(--canvas);
}

.error-page {
  display: grid;
  min-height: calc(100vh - var(--header-height));
  place-items: center;
  padding: 30px;
  text-align: center;
}

.error-page div {
  max-width: 540px;
}

.error-page h1 {
  margin-bottom: 12px;
  font-size: 2rem;
}

.not-found-code {
  margin-bottom: 8px;
  color: var(--blue-600);
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1;
}

.error-actions {
  justify-content: center;
  margin-top: 24px;
}

.error-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes app-promo-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes consent-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@media (max-width: 1120px) {
  .site-header {
    backdrop-filter: none;
  }

  .desktop-nav,
  .header-app-link {
    display: none !important;
  }

  .menu-button {
    display: block;
  }
}

@media (max-width: 980px) {
  h1 {
    font-size: 3.1rem;
  }

  .progress-band-inner {
    grid-template-columns: 1fr repeat(3, 0.5fr);
  }

  .resource-band-inner {
    grid-template-columns: repeat(4, 1fr);
  }

  .desktop-nav a {
    padding-inline: 10px;
  }

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

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

  .reader-layout {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 32px;
  }

  .faq-hero-inner {
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 42px;
  }

  .faq-layout {
    grid-template-columns: 205px minmax(0, 1fr);
    gap: 36px;
  }

  .faq-help-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
  }

  .faq-help-actions {
    justify-content: flex-start;
  }

  .quiz-layout {
    grid-template-columns: minmax(0, 1fr) 240px;
  }

  .question-map {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 68px;
  }

  h1 {
    font-size: 2.45rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .shell {
    width: min(100% - 28px, var(--shell));
  }

  .desktop-nav {
    display: none;
  }

  .header-app-link {
    display: none !important;
  }

  .menu-button {
    display: block;
  }

  .brand-mark {
    width: 41px;
    height: 41px;
  }

  .brand-copy strong {
    font-size: 0.88rem;
  }

  .brand-copy small {
    display: none;
  }

  .home-hero,
  .hero-inner {
    min-height: 520px;
  }

  .home-hero::before {
    background-image:
      linear-gradient(90deg, rgba(11, 31, 58, 0.96), rgba(11, 31, 58, 0.78)),
      url("/assets/history/bayeux-tapestry.jpg");
  }

  .hero-inner {
    align-items: flex-start;
    padding-block: 54px;
  }

  .hero-copy .lead {
    font-size: 1rem;
  }

  .hero-proof {
    gap: 9px 17px;
  }

  .progress-band-inner {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .resource-band-inner {
    grid-template-columns: 1fr 1fr;
  }

  .progress-overview {
    grid-column: 1 / -1;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
  }

  .metric {
    padding: 16px 8px;
    border-left: 0;
    text-align: center;
  }

  .metric + .metric {
    border-left: 1px solid var(--line);
  }

  .resource-band .metric {
    border-bottom: 1px solid var(--line);
    padding: 16px 10px;
  }

  .resource-band .metric:first-child {
    padding-left: 10px;
  }

  .resource-band .metric:nth-child(odd) {
    border-left: 0;
  }

  .resource-band .metric:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .app-promo-inner {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 22px;
    padding-block: 32px;
  }

  .app-promo-icon {
    width: 86px;
    height: 86px;
    border-radius: 14px;
  }

  .app-promo-copy h2 {
    font-size: 1.55rem;
  }

  .app-promo-actions {
    grid-column: 1 / -1;
    width: 100%;
  }

  .page-section {
    padding-block: 52px;
  }

  .section-heading,
  .library-toolbar,
  .reader-title-row,
  .result-hero,
  .about-layout {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading {
    display: flex;
    gap: 16px;
  }

  .path-grid,
  .test-grid,
  .exam-facts {
    grid-template-columns: 1fr;
  }

  .exam-facts {
    gap: 1px;
  }

  .path-card {
    min-height: 0;
  }

  .resume-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .page-hero {
    padding-block: 42px 36px;
  }

  .faq-hero {
    padding-block: 44px 38px;
  }

  .faq-hero-inner {
    display: block;
  }

  .faq-hero-copy h1 {
    font-size: 2.45rem;
  }

  .faq-hero-copy > p:not(.eyebrow, .faq-guidance-note) {
    font-size: 1rem;
  }

  .faq-facts {
    margin-top: 30px;
  }

  .faq-facts div {
    min-height: 76px;
  }

  .faq-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .faq-toolbar-meta {
    justify-content: space-between;
  }

  .faq-filters {
    width: calc(100% + 14px);
    margin-bottom: 36px;
    padding-right: 14px;
  }

  .faq-layout {
    display: block;
  }

  .faq-aside {
    position: static;
    margin-bottom: 42px;
  }

  .faq-item summary {
    min-height: 66px;
    gap: 14px;
    padding-block: 16px;
  }

  .faq-answer {
    padding: 0 38px 22px 8px;
  }

  .faq-help-band {
    padding-block: 38px;
  }

  .faq-help-actions {
    width: 100%;
  }

  .chapter-card {
    grid-template-columns: 112px 1fr;
  }

  .chapter-cover {
    min-height: 230px;
  }

  .chapter-card-content {
    padding: 18px;
  }

  .tabs {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .reader-title-row {
    display: flex;
  }

  .reader-title-row h1 {
    font-size: 1.9rem;
  }

  .reader-layout {
    display: block;
    padding-block: 22px 60px;
  }

  .reader-sidebar {
    display: none;
  }

  .mobile-reader-nav {
    display: block;
    margin-bottom: 26px;
  }

  .mobile-reader-nav select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    padding: 0 12px;
    background: var(--surface);
    color: var(--ink-950);
  }

  .reader-article {
    padding: 0;
  }

  .quiz-page {
    padding-block: 20px 44px;
  }

  .quiz-status-bar {
    align-items: start;
  }

  .quiz-layout {
    display: block;
  }

  .question-panel {
    min-height: 0;
    padding: 22px 17px;
  }

  .question-panel h2 {
    font-size: 1.35rem;
  }

  .option {
    grid-template-columns: 31px 1fr;
    padding: 12px;
  }

  .quiz-sidebar {
    position: static;
    margin-top: 16px;
  }

  .question-map {
    grid-template-columns: repeat(8, 1fr);
  }

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

  .question-actions-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .result-hero {
    display: flex;
    gap: 24px;
  }

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

  .result-copy h1 {
    font-size: 2rem;
  }

  .score-ring {
    align-self: center;
  }

  .result-metrics {
    justify-content: center;
  }

  .result-copy .button-row {
    justify-content: center;
  }

  .review-heading,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .review-heading {
    display: flex;
  }

  .footer-social-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .about-layout {
    display: grid;
    gap: 30px;
  }

  .about-layout h1 {
    font-size: 2.35rem;
  }

  .consent-banner {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

@media (max-width: 460px) {
  .button-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-copy .button {
    width: 100%;
  }

  .consent-banner {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: calc(100% - 24px);
    padding: 16px;
  }

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

  .legal-actions {
    display: grid;
  }

  .faq-facts div {
    padding-inline: 14px;
  }

  .faq-help-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .faq-help-actions .button,
  .faq-help-actions .app-store-badge-link {
    width: 100%;
  }

  .not-found-code {
    font-size: 3.5rem;
  }

  .error-header-actions .button {
    display: none;
  }

  .app-promo-inner {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
  }

  .app-promo-icon {
    width: 76px;
    height: 76px;
  }

  .chapter-card {
    display: block;
  }

  .chapter-cover {
    min-height: 145px;
    max-height: 145px;
  }

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

  .timer {
    min-width: 88px;
  }

  .quiz-status-copy h1 {
    max-width: 180px;
  }
}

/* ---------------------------------------------------------------------------
   iOS app promotion surfaces
   Band on the home page, inline cards at high-intent moments, and the #app page.
   --------------------------------------------------------------------------- */

.app-promo-actions {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.text-link.on-dark {
  color: #cfe0ff;
}

.app-proof {
  margin: 12px 0 0;
  color: var(--ink-500);
  font-size: 0.84rem;
  font-weight: 700;
}

.app-promo .app-proof,
.app-page-hero .app-proof {
  color: #cdd8e7;
}

.app-inline-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  margin: 30px 0;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue-600);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 26px 28px;
  background: var(--canvas-blue);
}

.app-inline-cta.compact {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.app-inline-copy h3 {
  margin: 0 0 8px;
  font-size: 1.28rem;
}

.app-inline-copy > p:not(.eyebrow) {
  margin: 0 0 14px;
  max-width: 640px;
  color: var(--ink-700);
}

.app-inline-cta .app-check-list li {
  color: var(--ink-900);
}

.app-inline-cta .app-check-list li::before {
  border-color: var(--blue-600);
}

.app-inline-actions {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.app-inline-actions .app-proof {
  margin: 0;
  max-width: 210px;
}

.resume-actions {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.resume-app-note {
  margin: 0;
  color: var(--ink-700);
  font-size: 0.84rem;
}

.resume-app-note a {
  color: var(--blue-700);
  font-weight: 800;
}

.app-sidebar-cta {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--canvas-blue);
}

.app-sidebar-cta strong {
  font-size: 0.95rem;
}

.app-sidebar-cta p {
  margin: 0;
  color: var(--ink-700);
  font-size: 0.85rem;
}

.app-sidebar-cta .app-store-badge-link {
  justify-self: start;
}

.app-sidebar-cta .app-store-badge {
  width: 160px;
}

.app-page-hero {
  padding-block: 62px 54px;
  background: var(--hero-ink);
  color: #fff;
}

.app-page-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 54px;
  align-items: center;
}

.app-page-hero h1 {
  margin: 6px 0 16px;
  font-size: 2.9rem;
  line-height: 1.08;
}

.app-page-hero .lead {
  max-width: 640px;
  margin-bottom: 26px;
  color: #ccd7e5;
  font-size: 1.08rem;
}

.app-page-icon {
  width: 190px;
  height: 190px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

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

.app-feature-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.app-feature-number {
  display: block;
  margin-bottom: 10px;
  color: var(--blue-600);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.09em;
}

.app-feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

.app-feature-card p {
  margin: 0;
  color: var(--ink-700);
  font-size: 0.94rem;
}

.app-compare-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.app-compare {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  text-align: left;
}

.app-compare th,
.app-compare td {
  border-bottom: 1px solid var(--line);
  padding: 15px 18px;
  font-size: 0.92rem;
  vertical-align: top;
}

.app-compare thead th {
  background: var(--tab-bg);
  color: var(--ink-500);
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.app-compare tbody th {
  color: var(--ink-950);
  font-weight: 750;
}

.app-compare td {
  color: var(--ink-700);
}

.app-compare .app-column {
  border-left: 1px solid var(--line);
  background: var(--canvas-blue);
  color: var(--ink-950);
  font-weight: 750;
}

.app-compare tbody tr:last-child th,
.app-compare tbody tr:last-child td {
  border-bottom: 0;
}

.app-faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 60px;
  align-items: start;
}

.app-faq-layout h2 {
  margin: 6px 0 14px;
  font-size: 2.1rem;
}

.app-faq-layout .button-row {
  margin-top: 24px;
}

.app-faq {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.app-faq details {
  padding: 18px 20px;
  background: var(--surface);
}

.app-faq summary {
  color: var(--ink-950);
  cursor: pointer;
  font-weight: 800;
}

.app-faq summary::marker {
  color: var(--blue-600);
}

.app-faq details p {
  margin: 12px 0 0;
  color: var(--ink-700);
  font-size: 0.94rem;
}

@media (max-width: 980px) {
  .app-page-hero-inner {
    grid-template-columns: minmax(0, 1fr) 140px;
    gap: 32px;
  }

  .app-page-hero h1 {
    font-size: 2.3rem;
  }

  .app-page-icon {
    width: 140px;
    height: 140px;
    border-radius: 24px;
  }

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

  .app-faq-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }
}

@media (max-width: 760px) {
  .app-page-hero {
    padding-block: 34px 32px;
  }

  .app-inline-cta {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 22px;
  }

  .app-inline-actions .app-proof {
    width: 100%;
    max-width: none;
  }

  .app-page-hero-inner {
    align-items: start;
    grid-template-columns: minmax(0, 1fr);
  }

  .app-page-icon {
    order: -1;
    width: 96px;
    height: 96px;
    border-radius: 18px;
  }

  .app-feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .resume-actions {
    justify-items: stretch;
  }

  .resume-app-note {
    text-align: center;
  }
}

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

@media print {
  .site-header,
  .reader-sidebar,
  .mobile-reader-nav,
  .reader-title-row .button,
  .site-footer {
    display: none !important;
  }

  body,
  .reader-article {
    background: #fff;
  }

  .reader-layout {
    display: block;
    padding: 0;
  }
}
