:root {
  --navy-950: #0b1e2d;
  --navy-800: #17364a;
  --navy-650: #31556a;
  --paper: #fffdf8;
  --surface: #ffffff;
  --line: #dce7eb;
  --aqua: #74d5df;
  --aqua-deep: #168ca0;
  --coral: #ffaaa6;
  --coral-deep: #c8565a;
  --yellow: #ffd761;
  --yellow-deep: #a66b00;
  --green: #9fd8b4;
  --shadow: 0 18px 55px rgb(11 30 45 / 10%);
  --radius-large: 28px;
  --radius-medium: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--navy-950);
  background:
    radial-gradient(circle at 12% 18%, rgb(116 213 223 / 16%), transparent 24rem),
    radial-gradient(circle at 88% 78%, rgb(255 215 97 / 13%), transparent 25rem),
    var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.65rem 1rem;
  border-radius: 0.6rem;
  color: white;
  background: var(--navy-950);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

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

.site-header {
  width: min(1180px, calc(100% - 2rem));
  min-height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--navy-950);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  display: block;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 5px 18px rgb(11 30 45 / 14%);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav a {
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  color: var(--navy-650);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--navy-950);
  background: rgb(116 213 223 / 22%);
}

.site-nav a:focus-visible,
.brand:focus-visible,
.subject-card:focus-visible,
.board-card:focus-visible,
.paper-subject-card:focus-visible,
.official-link-card:focus-visible,
.text-link:focus-visible,
.site-footer a:focus-visible {
  outline: 3px solid var(--aqua-deep);
  outline-offset: 3px;
}

.welcome {
  width: min(1180px, calc(100% - 2rem));
  min-height: calc(100vh - 160px);
  margin: 0 auto;
  padding: clamp(2.25rem, 5vw, 4.5rem) 0 5rem;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--aqua-deep);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  line-height: 1.12;
}

h1 {
  max-width: 13ch;
  margin-right: auto;
  margin-bottom: 1.25rem;
  margin-left: auto;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  letter-spacing: -0.065em;
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

.subject-card {
  min-width: 0;
  overflow: hidden;
  display: block;
  border: 1px solid rgb(11 30 45 / 8%);
  border-radius: var(--radius-large);
  color: var(--navy-950);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.subject-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 65px rgb(11 30 45 / 16%);
}

.biology-card {
  background: linear-gradient(145deg, #e5f7ed, #b9e7ca);
}

.chemistry-card {
  background: linear-gradient(145deg, #fff0ef, #ffc6c2);
}

.physics-card {
  background: linear-gradient(145deg, #fff7d8, #ffe48c);
}

.subject-art {
  width: 100%;
  height: clamp(190px, 20vw, 250px);
  display: block;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 350ms ease;
}

.subject-card:hover .subject-art {
  transform: scale(1.045);
}

.past-papers-panel {
  margin-top: clamp(1.25rem, 2vw, 1.75rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  overflow: hidden;
  border-radius: var(--radius-large);
  color: white;
  background:
    radial-gradient(circle at 82% 22%, rgb(116 213 223 / 24%), transparent 13rem),
    linear-gradient(135deg, var(--navy-950), var(--navy-800));
  box-shadow: var(--shadow);
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.past-papers-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 65px rgb(11 30 45 / 18%);
}

.past-papers-panel:focus-visible {
  outline: 3px solid var(--aqua-deep);
  outline-offset: 3px;
}

.paper-graphic {
  position: relative;
  width: 82px;
  height: 92px;
  display: block;
  flex: 0 0 auto;
  border: 2px solid rgb(11 30 45 / 12%);
  border-radius: 11px;
  background: var(--surface);
  box-shadow:
    -10px 10px 0 var(--coral),
    0 13px 28px rgb(0 0 0 / 18%);
  transform: rotate(2deg);
}

.paper-graphic::before {
  position: absolute;
  top: 15px;
  left: 14px;
  width: 28px;
  height: 7px;
  border-radius: 999px;
  background: var(--aqua);
  content: "";
}

.paper-graphic::after {
  position: absolute;
  right: 12px;
  bottom: 13px;
  width: 17px;
  height: 8px;
  border-bottom: 4px solid #3f9c68;
  border-left: 4px solid #3f9c68;
  content: "";
  transform: rotate(-45deg);
}

.paper-lines,
.paper-lines::before,
.paper-lines::after {
  position: absolute;
  left: 14px;
  width: 48px;
  height: 4px;
  border-radius: 999px;
  background: #d9e5ea;
  content: "";
}

.paper-lines {
  top: 38px;
}

.paper-lines::before {
  top: 12px;
  left: 0;
}

.paper-lines::after {
  top: 24px;
  left: 0;
  width: 34px;
}

.past-papers-copy {
  display: flex;
  flex-direction: column;
}

.resource-kicker {
  margin-bottom: 0.15rem;
  color: var(--aqua);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.resource-title {
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.resource-description {
  max-width: 56ch;
  margin-top: 0.2rem;
  color: rgb(255 255 255 / 72%);
  font-size: 0.9rem;
}

.resource-action {
  padding: 0.72rem 1rem;
  border-radius: 999px;
  color: var(--navy-950);
  background: var(--yellow);
  font-size: 0.85rem;
  font-weight: 900;
  white-space: nowrap;
}

.subject-card-content {
  position: relative;
  min-height: 135px;
  padding: 1.25rem 1.55rem 1.45rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.subject-symbol {
  width: 3.25rem;
  height: 3.25rem;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid rgb(11 30 45 / 12%);
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 900;
  background: rgb(255 255 255 / 72%);
}

.subject-icon {
  overflow: hidden;
  padding: 0;
  background: var(--subject-wash);
}

.subject-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.18);
}

.subject-name {
  margin-top: 0;
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  font-weight: 900;
  letter-spacing: -0.045em;
}

.card-action {
  margin-top: auto;
  font-size: 0.92rem;
  font-weight: 850;
}

.site-footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.65rem 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  color: var(--navy-650);
  font-size: 0.84rem;
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer a {
  color: var(--navy-800);
  font-weight: 800;
  text-decoration: none;
}

.subject-page {
  --subject-accent: var(--aqua);
  --subject-deep: var(--aqua-deep);
  --subject-wash: #eaf9fb;
}

.biology-page {
  --subject-accent: var(--green);
  --subject-deep: #28784c;
  --subject-wash: #ebf8ef;
}

.chemistry-page {
  --subject-accent: var(--coral);
  --subject-deep: var(--coral-deep);
  --subject-wash: #fff0ef;
}

.physics-page {
  --subject-accent: var(--yellow);
  --subject-deep: var(--yellow-deep);
  --subject-wash: #fff8dc;
}

.subject-page .site-nav a[aria-current="page"] {
  background: var(--subject-wash);
}

.subject-hero {
  width: min(1100px, calc(100% - 2rem));
  margin: clamp(2.5rem, 5vw, 5rem) auto 0;
  padding: clamp(2rem, 5vw, 4rem);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3rem;
  border: 1px solid rgb(11 30 45 / 7%);
  border-radius: var(--radius-large);
  background:
    radial-gradient(circle at 92% 18%, rgb(255 255 255 / 70%), transparent 11rem),
    var(--subject-wash);
}

.subject-heading {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.subject-heading .subject-symbol {
  width: 4.75rem;
  height: 4.75rem;
  border-color: var(--subject-accent);
  font-size: 1.75rem;
}

.subject-heading h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.5rem);
}

.subject-heading .eyebrow {
  color: var(--subject-deep);
}

.subject-hero > p {
  max-width: 43ch;
  margin-bottom: 0.4rem;
  color: var(--navy-650);
}

.topic-section {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(4rem, 7vw, 6rem) 0;
}

.section-heading {
  margin-bottom: 1.75rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.section-heading .eyebrow {
  color: var(--subject-deep);
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.05em;
}

.topic-count {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--subject-deep);
  background: var(--subject-wash);
  font-size: 0.78rem;
  font-weight: 850;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.topic-card {
  min-height: 220px;
  padding: 1.35rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background-image:
    linear-gradient(
      180deg,
      rgb(255 255 255 / 20%) 0%,
      rgb(255 255 255 / 5%) 38%,
      rgb(255 255 255 / 82%) 72%,
      rgb(255 255 255 / 97%) 100%
    ),
    var(--topic-image);
  background-position: center;
  background-size: cover;
  box-shadow: 0 10px 30px rgb(11 30 45 / 5%);
}

.topic-card-link {
  color: var(--navy-950);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.topic-card-link:hover {
  border-color: var(--subject-deep);
  transform: translateY(-5px);
  box-shadow: 0 18px 42px rgb(11 30 45 / 12%);
}

.topic-card-link:focus-visible {
  outline: 3px solid var(--subject-deep);
  outline-offset: 3px;
}

.topic-card h3 {
  margin: auto 0 0;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.topic-hub-breadcrumb {
  width: min(1100px, calc(100% - 2rem));
  margin: 1.5rem auto 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--navy-650);
  font-size: 0.82rem;
}

.topic-hub-breadcrumb a {
  color: var(--navy-800);
  font-weight: 750;
  text-decoration: none;
}

.topic-hub-breadcrumb a:hover {
  text-decoration: underline;
}

.topic-hub-hero {
  width: min(1100px, calc(100% - 2rem));
  min-height: 390px;
  margin: 1.25rem auto 0;
  padding: clamp(2.25rem, 6vw, 5rem);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.cells-hub-hero {
  background-image:
    linear-gradient(
      90deg,
      rgb(255 255 255 / 97%) 0%,
      rgb(255 255 255 / 88%) 44%,
      rgb(255 255 255 / 18%) 76%
    ),
    url("../images/topics/biology/cells-and-microscopy.jpg");
}

.topic-hub-copy {
  max-width: 610px;
}

.topic-hub-copy h1 {
  max-width: 11ch;
  margin: 0 0 1rem;
  font-size: clamp(3.1rem, 7vw, 5.8rem);
}

.topic-hub-copy > p:last-child {
  max-width: 55ch;
  margin-bottom: 0;
  color: var(--navy-650);
  font-size: 1.02rem;
}

.topic-hub-library {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(4rem, 7vw, 6rem) 0;
}

.learning-material-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.learning-material-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  color: var(--navy-950);
  background: var(--surface);
  box-shadow: 0 12px 34px rgb(11 30 45 / 7%);
  text-decoration: none;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.learning-material-card:hover {
  border-color: var(--subject-deep);
  transform: translateY(-5px);
  box-shadow: 0 22px 50px rgb(11 30 45 / 13%);
}

.learning-material-card:focus-visible {
  outline: 3px solid var(--subject-deep);
  outline-offset: 3px;
}

.learning-material-card > img {
  width: 100%;
  height: 235px;
  display: block;
  object-fit: cover;
}

.learning-material-content {
  min-height: 250px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.material-type {
  margin-bottom: 0.6rem;
  color: var(--subject-deep);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.material-title {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.material-description {
  margin-top: 0.8rem;
  color: var(--navy-650);
  font-size: 0.92rem;
}

.material-action {
  margin-top: auto;
  padding-top: 1.25rem;
  font-size: 0.88rem;
  font-weight: 850;
}

.resource-hero {
  width: min(1100px, calc(100% - 2rem));
  margin: clamp(2.5rem, 5vw, 5rem) auto 0;
  padding: clamp(2.25rem, 5vw, 4.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  overflow: hidden;
  border-radius: var(--radius-large);
  color: white;
  background:
    radial-gradient(circle at 84% 22%, rgb(116 213 223 / 26%), transparent 16rem),
    linear-gradient(135deg, var(--navy-950), var(--navy-800));
}

.resource-hero h1 {
  max-width: none;
  margin: 0 0 1rem;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
}

.resource-hero .eyebrow {
  color: var(--aqua);
}

.resource-hero p:last-child {
  max-width: 58ch;
  margin-bottom: 0;
  color: rgb(255 255 255 / 72%);
}

.paper-graphic-large {
  width: 118px;
  height: 138px;
  margin-right: 1rem;
  border-radius: 15px;
  transform: rotate(4deg);
}

.paper-graphic-large::before {
  top: 22px;
  left: 20px;
  width: 42px;
  height: 9px;
}

.paper-graphic-large::after {
  right: 17px;
  bottom: 18px;
  width: 23px;
  height: 11px;
}

.paper-graphic-large .paper-lines,
.paper-graphic-large .paper-lines::before,
.paper-graphic-large .paper-lines::after {
  left: 20px;
  width: 70px;
  height: 5px;
}

.paper-graphic-large .paper-lines {
  top: 56px;
}

.paper-graphic-large .paper-lines::before {
  top: 17px;
  left: 0;
}

.paper-graphic-large .paper-lines::after {
  top: 34px;
  left: 0;
  width: 50px;
}

.paper-library {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(4rem, 7vw, 6rem) 0;
}

.paper-subject-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.paper-subject-card {
  min-height: 250px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  box-shadow: 0 10px 30px rgb(11 30 45 / 5%);
}

a.paper-subject-card {
  color: var(--navy-950);
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

a.paper-subject-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 44px rgb(11 30 45 / 12%);
}

.biology-paper-card {
  background: linear-gradient(145deg, #f3fbf6, #d9f1e2);
}

.chemistry-paper-card {
  background: linear-gradient(145deg, #fff7f6, #ffe0dd);
}

.physics-paper-card {
  background: linear-gradient(145deg, #fffdf4, #fff0b5);
}

.paper-subject-number {
  color: var(--navy-650);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.paper-subject-card h3 {
  margin: auto 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  letter-spacing: -0.04em;
}

.paper-subject-card p {
  margin-bottom: 1.25rem;
  color: var(--navy-650);
  font-size: 0.9rem;
}

.coming-label {
  align-self: flex-start;
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  color: var(--navy-800);
  background: rgb(255 255 255 / 70%);
  font-size: 0.72rem;
  font-weight: 850;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.board-card {
  --board-accent: var(--aqua);
  min-height: 315px;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-top: 6px solid var(--board-accent);
  border-radius: var(--radius-medium);
  color: var(--navy-950);
  background: var(--surface);
  box-shadow: 0 10px 30px rgb(11 30 45 / 5%);
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.board-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 44px rgb(11 30 45 / 12%);
}

.board-aqa {
  --board-accent: #5d9de0;
  --board-wash: #edf5ff;
}

.board-pearson {
  --board-accent: #8c74d8;
  --board-wash: #f2effd;
}

.board-ocr {
  --board-accent: #ef8b68;
  --board-wash: #fff0ea;
}

.board-wjec {
  --board-accent: #49a778;
  --board-wash: #eaf8f0;
}

.board-monogram {
  width: 4.2rem;
  height: 4.2rem;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid var(--board-accent);
  border-radius: 1.15rem;
  color: var(--navy-950);
  background: rgb(255 255 255 / 78%);
  font-size: 0.95rem;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.board-card h3 {
  margin: 1.75rem 0 0.45rem;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  letter-spacing: -0.045em;
}

.board-card p {
  max-width: 44ch;
  margin-bottom: 1rem;
  color: var(--navy-650);
  font-size: 0.86rem;
}

.board-card-action {
  margin-top: auto;
  font-size: 0.82rem;
  font-weight: 900;
}

.affiliation-note {
  margin: 2rem 0 0;
  padding: 1rem 1.15rem;
  border-left: 4px solid var(--aqua);
  color: var(--navy-650);
  background: rgb(116 213 223 / 10%);
  font-size: 0.78rem;
}

.breadcrumb {
  width: min(1100px, calc(100% - 2rem));
  margin: 1.5rem auto -1.35rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--navy-650);
  font-size: 0.8rem;
  font-weight: 750;
}

.breadcrumb a {
  color: var(--navy-800);
  text-underline-offset: 0.2em;
}

.paper-detail-hero {
  --board-accent: var(--aqua);
  --board-wash: #eaf9fb;
  width: min(1100px, calc(100% - 2rem));
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
  padding: clamp(2rem, 5vw, 3.75rem);
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgb(11 30 45 / 7%);
  border-radius: var(--radius-large);
  background:
    radial-gradient(circle at 90% 18%, rgb(255 255 255 / 75%), transparent 12rem),
    var(--board-wash);
}

.paper-detail-hero .eyebrow {
  color: var(--navy-650);
}

.paper-detail-hero h1 {
  max-width: none;
  margin: 0 0 0.75rem;
  font-size: clamp(2.65rem, 6vw, 5rem);
}

.paper-detail-hero > div > p:last-of-type {
  max-width: 58ch;
  margin-bottom: 0;
  color: var(--navy-650);
}

.paper-hero-codes {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.paper-hero-codes > span {
  min-width: 13.5rem;
  padding: 0.62rem 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.18rem;
  border: 1px solid rgb(11 30 45 / 10%);
  border-radius: 0.75rem;
  background: rgb(255 255 255 / 68%);
}

.paper-hero-codes small {
  color: var(--navy-650);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.paper-hero-codes strong {
  font-size: 0.9rem;
}

.paper-detail-section {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3.5rem, 6vw, 5rem) 0 0;
}

.qualification-grid,
.official-link-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.qualification-grid:has(.qualification-card:nth-child(3)) {
  grid-template-columns: repeat(3, 1fr);
}

.qualification-card {
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: var(--surface);
  box-shadow: 0 10px 30px rgb(11 30 45 / 5%);
}

.qualification-card > span,
.external-label {
  color: var(--aqua-deep);
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.qualification-card h3 {
  margin: 0.7rem 0 1.1rem;
  font-size: 1.25rem;
}

.tag-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
}

.tag-list li {
  padding: 0.34rem 0.58rem;
  border-radius: 999px;
  color: var(--navy-650);
  background: #f2f6f7;
  font-size: 0.7rem;
  font-weight: 750;
}

.official-resources {
  padding-bottom: 0.5rem;
}

.external-notice,
.topic-map-intro {
  max-width: 70ch;
  margin: -0.75rem 0 1.5rem;
  color: var(--navy-650);
  font-size: 0.9rem;
}

.official-link-card {
  min-height: 220px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  color: var(--navy-950);
  background:
    linear-gradient(145deg, rgb(116 213 223 / 9%), transparent 55%),
    var(--surface);
  box-shadow: 0 10px 30px rgb(11 30 45 / 5%);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    transform 160ms ease;
}

.official-link-card:hover {
  border-color: var(--aqua-deep);
  transform: translateY(-4px);
}

.official-link-card h3 {
  margin: 1.4rem 0 0.5rem;
  font-size: 1.3rem;
}

.official-link-card p {
  margin-bottom: 1rem;
  color: var(--navy-650);
  font-size: 0.85rem;
}

.official-link-action {
  margin-top: auto;
  font-size: 0.8rem;
  font-weight: 900;
}

.topic-map-section {
  padding-bottom: clamp(4rem, 7vw, 6rem);
}

.text-link {
  color: var(--navy-800);
  font-size: 0.84rem;
  font-weight: 850;
  text-decoration: none;
}

.topic-map-grid {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  list-style: none;
}

.topic-map-grid li {
  min-height: 90px;
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 800;
}

.topic-map-grid li span {
  color: var(--aqua-deep);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.pearson-paper-library {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

.paper-filter-bar {
  margin-bottom: 1rem;
  padding: 1rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: var(--surface);
}

.route-filter {
  min-width: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  border: 0;
}

.route-filter legend,
.series-filter > span {
  width: 100%;
  margin-bottom: 0.4rem;
  color: var(--navy-650);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-filter button {
  padding: 0.55rem 0.78rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy-650);
  background: #f5f8f9;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
}

.route-filter button:hover,
.route-filter button[aria-pressed="true"] {
  border-color: #8c74d8;
  color: var(--navy-950);
  background: #f2effd;
}

.route-filter button:focus-visible,
.series-filter select:focus-visible,
.paper-file-link:focus-visible,
.paper-series summary:focus-visible,
.pearson-catalogue-note a:focus-visible {
  outline: 3px solid var(--aqua-deep);
  outline-offset: 3px;
}

.series-filter {
  width: min(235px, 100%);
  display: flex;
  flex-direction: column;
}

.series-filter select {
  width: 100%;
  min-height: 2.55rem;
  padding: 0.45rem 2.2rem 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  color: var(--navy-950);
  background: var(--surface);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 750;
}

.paper-series-list {
  display: grid;
  gap: 0.8rem;
}

.paper-series {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: var(--surface);
  box-shadow: 0 8px 26px rgb(11 30 45 / 5%);
}

.paper-series[hidden],
.paper-route-block[hidden] {
  display: none;
}

.paper-series summary {
  padding: 1.15rem 1.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}

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

.paper-series summary::after {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  content: "+";
  background: #f2effd;
  font-size: 1.2rem;
  font-weight: 850;
}

.paper-series[open] summary::after {
  content: "−";
}

.paper-series summary > span:first-child {
  display: flex;
  flex-direction: column;
}

.paper-series summary small {
  color: var(--navy-650);
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.paper-series summary strong {
  margin-top: 0.15rem;
  font-size: 1.2rem;
}

.series-resource-count {
  margin-left: auto;
  color: var(--navy-650);
  font-size: 0.72rem;
  font-weight: 750;
}

.paper-series-content {
  padding: 0 1.3rem 1.3rem;
  border-top: 1px solid var(--line);
}

.paper-route-block {
  padding-top: 1.35rem;
}

.paper-route-block + .paper-route-block {
  margin-top: 1.35rem;
  border-top: 1px solid var(--line);
}

.paper-route-heading {
  margin-bottom: 0.75rem;
}

.paper-route-heading > span {
  color: #765dc3;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.paper-route-heading h4 {
  margin: 0.25rem 0 0;
  font-size: 1rem;
}

.paper-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
}

.paper-table {
  width: 100%;
  min-width: 710px;
  border-collapse: collapse;
  background: white;
  font-size: 0.76rem;
}

.paper-table th,
.paper-table td {
  padding: 0.78rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

.paper-table tr:last-child th,
.paper-table tr:last-child td {
  border-bottom: 0;
}

.paper-table thead th {
  color: var(--navy-650);
  background: #f7f9fa;
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.paper-table tbody th strong,
.paper-table tbody th span {
  display: block;
}

.paper-table tbody th span {
  margin-top: 0.1rem;
  color: var(--navy-650);
  font-size: 0.67rem;
  font-weight: 650;
}

.tier-label {
  padding: 0.3rem 0.5rem;
  display: inline-flex;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 850;
}

.tier-foundation {
  color: #8b4a18;
  background: #fff0df;
}

.tier-higher {
  color: #4f3e8c;
  background: #f0ecff;
}

.paper-file-link {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: var(--navy-800);
  font-weight: 850;
  text-decoration: none;
}

.paper-file-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.paper-file-link span {
  color: #765dc3;
}

.paper-unavailable {
  color: #81919b;
  font-size: 0.68rem;
  font-weight: 700;
}

.pearson-catalogue-note {
  margin-top: 1rem;
  padding: 1rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-left: 4px solid #8c74d8;
  color: var(--navy-650);
  background: #f6f3ff;
  font-size: 0.76rem;
}

.pearson-catalogue-note strong {
  color: var(--navy-950);
}

.pearson-catalogue-note p {
  max-width: 68ch;
  margin: 0.2rem 0 0;
}

.pearson-catalogue-note a {
  flex: 0 0 auto;
  color: var(--navy-800);
  font-weight: 850;
  text-decoration: none;
}

@media (max-width: 1050px) and (min-width: 801px) {
  .board-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  .site-header {
    padding: 0.75rem 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.7rem;
  }

  .site-nav {
    width: 100%;
    padding-bottom: 0.25rem;
    overflow-x: auto;
  }

  .site-nav a {
    flex: 0 0 auto;
  }

  .welcome {
    min-height: auto;
    padding-top: 2rem;
  }

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

  .past-papers-panel {
    grid-template-columns: auto 1fr;
  }

  .resource-action {
    grid-column: 1 / -1;
    justify-self: stretch;
    text-align: center;
  }

  .subject-art {
    height: clamp(190px, 52vw, 280px);
  }

  .subject-card-content {
    min-height: 125px;
  }

  .subject-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.5rem;
  }

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

  .paper-subject-grid {
    grid-template-columns: 1fr;
  }

  .learning-material-grid {
    grid-template-columns: 1fr;
  }

  .board-grid,
  .qualification-grid,
  .qualification-grid:has(.qualification-card:nth-child(3)),
  .official-link-grid {
    grid-template-columns: 1fr;
  }

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

  .paper-filter-bar,
  .pearson-catalogue-note {
    align-items: stretch;
    flex-direction: column;
  }

  .series-filter {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .brand span {
    font-size: 0.92rem;
  }

  .welcome {
    padding-top: 1.5rem;
  }

  h1 {
    font-size: clamp(2.55rem, 14vw, 4rem);
  }

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

  .past-papers-panel {
    grid-template-columns: 1fr;
  }

  .paper-graphic {
    margin-left: 0.75rem;
  }

  .resource-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .topic-hub-hero {
    min-height: 340px;
    padding: 2rem;
    background-position: 62% center;
  }

  .topic-hub-copy h1 {
    font-size: clamp(2.55rem, 13vw, 4rem);
  }

  .paper-graphic-large {
    margin: 0 0 0.75rem 1.25rem;
  }

  .topic-card {
    min-height: 190px;
  }

  .paper-detail-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .topic-map-grid {
    grid-template-columns: 1fr;
  }

  .paper-series summary {
    padding: 1rem;
  }

  .paper-series-content {
    padding: 0 1rem 1rem;
  }

  .series-resource-count {
    display: none;
  }

  .section-heading,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
