body.exam-edition {
  --canvas: #e8edff;
  --surface: #f7f8ff;
  --ink: #201941;
  --muted: #453c66;
  --line: #c4c9ed;
  --accent: #5131aa;
  --tint: #e0e0fd;
  --soft: #d6dcfa;
  --exam-backdrop: radial-gradient(ellipse at 13% 8%, #e0dbff 0, transparent 45%),
    linear-gradient(120deg, #eef1ff, #dbe8ff 66%, #e7efff);
  --exam-type: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

body.exam-edition.exam-customs {
  --canvas: #e4f5ed;
  --surface: #f2fbf6;
  --ink: #0d302d;
  --muted: #345951;
  --line: #accfbc;
  --accent: #075b48;
  --tint: #d3f0df;
  --soft: #c0e7d3;
  --exam-backdrop: linear-gradient(135deg, #d9f1e4, #edf8ef 62%, #e0f4ec);
}

body.exam-edition {
  color: var(--ink);
  background: var(--exam-backdrop);
}

body.exam-edition.signed-out .sidebar {
  padding-inline: max(28px, calc((100vw - 1216px) / 2));
  background: var(--surface);
  border-color: var(--line);
}

body.exam-edition.signed-out .topbar { padding-inline: max(28px, calc((100vw - 1216px) / 2)); }
body.exam-edition .brand { color: var(--ink); }
body.exam-edition .brand-mark { background: var(--accent); color: white; }
body.exam-edition.signed-out #account-button { color: var(--accent); border-color: var(--line); background: var(--surface); }
body.exam-edition.signed-out #app { max-width: 1272px; padding: 52px 28px 48px; }
body.exam-edition:not(.signed-out) .topbar { background: var(--surface); }

.edition-landing { font-family: var(--exam-type); }
.edition-landing a { color: var(--accent); text-underline-offset: .23em; font-weight: 650; }
.edition-landing :focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.exam-hero {
  display: grid;
  grid-template-columns: minmax(0, .98fr) minmax(0, 1.02fr);
  align-items: center;
  gap: clamp(32px, 6vw, 92px);
}

.exam-copy { max-width: 600px; }
.exam-kicker {
  margin: 0 0 19px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .05em;
  font-size: .875rem;
  text-transform: uppercase;
}

.edition-landing .exam-copy h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--exam-type);
  font-weight: 700;
  font-size: clamp(3.1rem, 7.6vw, 7.1rem);
  letter-spacing: -.071em;
  line-height: .99;
}

.exam-copy h1 em { display: block; color: var(--accent); font-style: normal; }
.exam-lede {
  max-width: 43ch;
  margin: 24px 0;
  font-size: clamp(1.05rem, 1.7vw, 1.24rem);
  line-height: 1.56;
  color: var(--muted);
}

.exam-actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.exam-note { color: var(--muted); font-size: .9rem; line-height: 1.55; margin: 16px 0 0; }
.edition-landing .exam-primary {
  min-height: 48px;
  padding: 11px 18px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 9px;
}
.edition-landing .exam-primary:hover { filter: brightness(.89); }

.exam-art { position: relative; margin: 0; min-width: 0; overflow: hidden; }
.exam-art img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; }
.exam-fnp .exam-art { border-radius: 40% 18px 18px 18px; background: var(--tint); }
.exam-fnp .exam-art figcaption {
  position: absolute;
  inset: auto 16px 16px auto;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  color: #25194d;
  background: #eef0ff;
  border-radius: 11px;
  font-size: .9rem;
  line-height: 1.35;
}
.exam-fnp .exam-art figcaption strong { color: #5131aa; font-size: 1.2rem; }

.exam-customs .exam-hero {
  --ink: #f5fff9;
  --muted: #cae7dc;
  --accent: #bcf5bd;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #103a32;
}

.exam-customs .exam-copy {
  align-self: center;
  padding: clamp(26px, 4.2vw, 64px);
}

.edition-landing .exam-copy h1 { text-wrap: pretty; }
.exam-customs .exam-copy h1 { font-size: clamp(2.85rem, 5.1vw, 5.4rem); letter-spacing: -.059em; }
.exam-customs .exam-hero .exam-primary { color: #10362c; border-radius: 5px; }
.exam-customs .exam-art img { height: 100%; min-height: 460px; object-position: 47% center; }

.exam-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--tint);
  border-bottom: 1px solid var(--line);
}
.exam-facts li { padding: 16px 19px; color: var(--ink); font-size: .95rem; }
.exam-facts li + li { border-inline-start: 1px solid var(--line); }
.exam-facts strong { display: inline-block; margin-right: 4px; font-size: 1.4rem; color: var(--accent); }

.exam-topics { margin-block: clamp(50px, 7vw, 95px); scroll-margin-block-start: 12px; }
.exam-section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px 40px; margin-bottom: 22px; }
.exam-section-head p { color: var(--muted); max-width: 48ch; margin: 0; }
.edition-landing h2 { margin: 0; color: var(--ink); font-size: clamp(1.8rem, 3.3vw, 2.8rem); line-height: 1.12; letter-spacing: -.043em; }
.exam-topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.exam-topic-grid li { padding: 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.exam-topic-grid h3 { margin: 0 0 6px; font-size: 1.02rem; color: var(--accent); }
.exam-topic-grid p { color: var(--muted); margin: 0; }
.exam-customs .exam-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-block-start: 1px solid var(--line); }
.exam-customs .exam-topic-grid li { background: transparent; border-radius: 0; border: 0; border-block-end: 1px solid var(--line); padding-inline: 0 22px; }
.exam-customs .exam-topic-grid li:nth-child(even) { border-inline-start: 1px solid var(--line); padding-inline: 22px 0; }

.exam-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(22px, 5vw, 74px); align-items: start; }
.exam-details p { color: var(--muted); max-width: 60ch; }
.exam-plan { padding: clamp(20px, 3.2vw, 40px); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.exam-plan .exam-primary { margin-top: 18px; }
.exam-price strong { font-size: 2rem; color: var(--ink); }
.exam-price span { display: block; }
.exam-guide { padding-block: 12px 18px; }
.exam-references { list-style: none; padding: 0; margin: 20px 0 0; border-block-start: 1px solid var(--line); }
.exam-references li { border-block-end: 1px solid var(--line); }
.exam-references a { display: inline-flex; align-items: center; min-height: 48px; padding-block: 6px; }

@media (max-width: 820px) {
  body.exam-edition.signed-out #app { padding: 32px 22px; }
  .exam-hero, .exam-customs .exam-hero { grid-template-columns: 1fr; }
  .exam-hero { gap: 25px; }
  .exam-customs .exam-hero { gap: 0; }
  .edition-landing .exam-copy h1 { font-size: clamp(2.85rem, 10vw, 5.1rem); }
  .exam-art img, .exam-customs .exam-art img { aspect-ratio: 16 / 10; height: auto; min-height: 0; }
  .exam-facts { grid-template-columns: repeat(2, 1fr); }
  .exam-facts li { padding: 11px 14px; }
  .exam-facts li:nth-child(3) { border-inline-start: 0; }
  .exam-facts li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .exam-section-head { align-items: start; flex-direction: column; gap: 8px; }
  .exam-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exam-details { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  body.exam-edition.signed-out .sidebar, body.exam-edition.signed-out .topbar { padding-inline: 14px; }
  body.exam-edition.signed-out #app { padding-inline: 16px; }
  .exam-kicker { letter-spacing: .03em; margin-bottom: 14px; }
  body.exam-edition.signed-out .brand { max-width: calc(100vw - 105px); }
  body.exam-edition.signed-out #brand-name { line-height: 1.15; }
  .exam-facts strong { display: block; }
  .exam-topic-grid { gap: 8px; }
  .exam-topic-grid li { padding: 14px; }
  .exam-customs .exam-topic-grid li { padding-inline: 0 12px; }
  .exam-customs .exam-topic-grid li:nth-child(even) { padding-inline: 12px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .exam-edition *, .exam-edition *::before, .exam-edition *::after { transition: none !important; animation: none !important; }
}
