/* ============================================================
   Shared GCSE subject-page shell
   Hoisted from the inline <style> blocks that all 30 GCSE
   subject pages were carrying verbatim. One source of truth for
   .px-page, .px-title, .unit collapsibles, .paper rows, links,
   grade boundaries, colophon and responsive breakpoints.
   ============================================================ */
.px-page, .px-page * { box-sizing: border-box; }
.px-page {
  --accent:        #15803d;
  --accent-soft:   #dcfce7;
  --accent-border: #bbf7d0;
  --accent-text:   #166534;
  --text:    #111827;
  --body:    #374151;
  --muted:   #6b7280;
  --surface: #ffffff;
  --bg:      #f8fafc;
  --border:  #e5e7eb;
  background: var(--surface);
  color: var(--body);
  font-family: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  max-width: 980px;
  margin: 28px auto 56px;
  padding: 32px clamp(20px, 4vw, 44px);
  border-radius: 12px;
  box-shadow:
    0 1px 2px rgba(8, 18, 50, 0.08),
    0 8px 24px rgba(8, 18, 50, 0.18),
    0 32px 80px rgba(8, 18, 50, 0.28);
}
.px-page h1, .px-page h2, .px-page h3, .px-page h4 {
  font-family: "Manrope", "Karla", sans-serif;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.015em;
}
.px-page a { color: var(--accent); text-decoration: none; }
.px-page a:hover { text-decoration: underline; }
.px-page p { margin: 0; }
.px-title { border-bottom: 1px solid var(--border); padding-bottom: 18px; margin-bottom: 24px; }
.px-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: 6px;
}
.px-title h1 { font-size: clamp(28px, 4.5vw, 36px); font-weight: 700; letter-spacing: -0.025em; margin-bottom: 8px; }
.px-title .lede { color: var(--muted); font-size: 15px; max-width: 65ch; margin-bottom: 16px; }
.cta-spec {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px;
  background: var(--accent); color: #fff !important; border-radius: 6px;
  font-size: 14px; font-weight: 700; text-decoration: none !important;
  margin: 6px 0 14px; transition: all .15s ease;
  box-shadow: 0 2px 6px rgba(21,128,61,0.18);
}
.cta-spec:hover { background: var(--accent-text); transform: translateY(-1px); text-decoration: none !important; }
.cta-spec .arrow { font-size: 12px; opacity: 0.85; }
.quick-links { display: flex; flex-wrap: wrap; gap: 6px; }
.quick-links a {
  display: inline-flex; align-items: center; gap: 5px; padding: 7px 13px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; font-weight: 600; color: var(--text); transition: all .15s ease;
}
.quick-links a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.quick-links .arrow { font-size: 11px; opacity: 0.5; }

.section { margin-bottom: 36px; scroll-margin-top: 70px; }
.section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 22px; font-weight: 700; color: var(--text); }

.unit {
  border: 1px solid var(--border); border-radius: 8px; padding: 0; margin-bottom: 12px;
  background: var(--surface); overflow: hidden;
}
.unit > summary {
  list-style: none; cursor: pointer; padding: 16px 44px 16px 20px;
  position: relative; user-select: none;
}
.unit > summary::-webkit-details-marker { display: none; }
.unit > summary::after {
  content: "›"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 22px; font-weight: 400; line-height: 1; transition: transform .18s ease;
}
.unit[open] > summary::after { transform: translateY(-50%) rotate(90deg); }
.unit > summary:hover { background: var(--bg); }
.unit h3 {
  font-size: 16px; font-weight: 700; margin: 0;
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.unit h3 .unit-counts {
  color: var(--muted); font-size: 11.5px; font-weight: 500;
  font-family: "Karla", sans-serif; letter-spacing: 0; margin-left: auto;
}
.unit > .papers-list { padding: 4px 20px 18px; }

.papers-list { display: grid; gap: 6px; }
.paper {
  display: grid; grid-template-columns: 88px 1fr auto; gap: 14px;
  align-items: center; padding: 10px 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
}
.paper .year { font-family: "Manrope", sans-serif; font-weight: 700; font-size: 14px; color: var(--text); }
.links { display: flex; gap: 6px; flex-wrap: wrap; }
.links a, .links em {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600;
  padding: 5px 10px; border-radius: 4px; transition: all .12s ease; font-style: normal;
}
.links a.qp { background: var(--accent); color: white; }
.links a.qp:hover { background: var(--accent-text); text-decoration: none; }
.links a.ms { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.links a.ms:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.links em { background: var(--surface); color: var(--muted); border: 1px dashed var(--border); }

.boundaries { display: flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.boundaries .g {
  display: inline-flex; align-items: baseline; gap: 2px; padding: 3px 7px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 4px; font-size: 11px;
}
.boundaries .g .l { font-weight: 700; color: var(--accent); font-size: 10px; }
.boundaries .g .v { font-weight: 600; color: var(--text); }

.colophon {
  text-align: center; color: var(--muted); font-size: 11px;
  margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border);
}
@media (max-width: 640px) {
  .px-page { margin: 16px 12px 40px; padding: 22px 18px; border-radius: 8px; }
  .paper { grid-template-columns: 1fr; gap: 8px; }
  .boundaries { flex-wrap: wrap; }
  .unit h3 { flex-direction: column; align-items: flex-start; gap: 2px; }
}
