/* =====================================================================
   rs-sections.css · Section bar with reading progress · v1.6 (3 Dec 2026)
   v1.6: Matthew (3 Dec): where you are and what you have finished show together. The navy ring on the chip
   you are in is drawn on top of the fill (::after), so it shows on a finished, filled chip too (before, the
   fill covered it). Finished = filled with ✓; the ✓ is now navy (done, as on the site's steppers), readable
   on every fill. No extra line (v1.5's "you are here" line was not chosen). Pairs with rs-sections.js v1.6.
   v1.4.2: no Back / Next on phones (below 768px), in either look; the phone-only button styles and the
   44px tap area are gone. From 768px up, as v1.4.1.
   v1.4.1: no icon-only ← / → buttons (Matthew: "never arrows left and right without words"); the
   Back / Next words are never cut off with "…"; on phones their touch area is the bar's full 44px.
   v1.4: "← GCSE menu" and "Next: <page> →" at the ends of the bar on wide screens (.rs-secnav--ends).
   v1.3: the Intro chip (a long intro before the first section gets its own chip, which fills too);
   no page progress line on Skip to pages by default (only the chips fill); a thin navy page line
   (.rs-pageline) under the navbar on pages without a Skip to row.
   v1.2: the section-coloured line (p3, and p23 = p2 + p3, the default) is 4px with 3px white gaps at
   the boundaries; the read-out ink is navy on white (about 14:1).
   v1.1: page progress line (looks p1, p2, p3; see rs-sections.js), placed over the bar's bottom
   border so the bar's height (--rs-sections-h) does not change.
   ReviseScienceUK. Pairs with rs-sections.js (same version).
   The bar is position: fixed under the navbar, so nothing in the page moves when it fades in or
   out. html.rs-sections (set by the script while the page has a bar) publishes its height as
   --rs-sections-h; rs-cards.js v1.5, rs-practical.js v1.5 and sticky.js v1.1 add that to the
   navbar's height, so sticky things sit below the bar. The value is the same whether or not the
   bar is showing at that moment.
   ===================================================================== */

html.rs-sections {
  --rs-sections-h: 46px;
}

@media (max-width: 767.98px) {
  html.rs-sections {
    --rs-sections-h: 44px;
  }
}

.rs-secnav {
  --rs-secnav-ink: var(--rs-ink, #25242f);
  font-family: "ABeeZee", "Calibri", sans-serif;
}

.rs-secnav ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rs-secnav [hidden] {
  display: none !important;
}

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

.rs-secnav a {
  text-decoration: none;
}

.rs-secnav a:focus-visible, .rs-secnav button:focus-visible {
  outline: 3px solid #185abc;
  outline-offset: 2px;
}

/* hidden until the Skip to row has gone, and in full screen: out of sight and out of the tab order
   (the script adds inert). Under the navbar's z-index (1030), so its menus open over the bar. */

.rs-secnav {
  position: fixed;
  z-index: 1029;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}

.rs-secnav.is-on {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity .18s ease, transform .18s ease, visibility 0s;
}

/* =========================================================
   The bar
========================================================= */

.rs-secnav--a {
  left: 0;
  right: 0;
  top: 0;
  box-sizing: border-box;
  height: var(--rs-sections-h, 46px);
  transform: translateY(-6px);
  background: rgb(255 255 255 / 96%);
  border-bottom: 1px solid #dcdfe6;
  box-shadow: 0 6px 12px -8px rgb(0 0 0 / 25%);
}

.rs-secnav--a.is-on {
  transform: none;
}

.rs-secnav--a .rs-secnav-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  height: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 20px;
}

.rs-secnav--a .rs-secnav-chips {
  display: flex;
  flex: 1 1 auto;
  gap: 8px;
  min-width: 0;
}

.rs-secnav--a .rs-secnav-chips > li {
  flex: 1 1 auto;
  min-width: 0;
}

/* v1.4: chips size to their names */

.rs-secnav--a .rs-secnav-chips > li.rs-secnav-chip-intro {
  flex: 0 0 auto;
}

.rs-secnav-chip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--c);
  color: var(--rs-secnav-ink);
  font-size: 15px;
  line-height: 1.1;
  white-space: nowrap;
}

.rs-secnav-chip:hover {
  color: var(--rs-secnav-ink);
}

/* v1.6: the chip's edge and the "where you are" ring sit on top of the fill, so a full fill never hides them */

.rs-secnav-chip::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 6%);
  transition: box-shadow .15s ease;
}

.rs-secnav-chip:hover::after {
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 22%);
}

.rs-secnav-chip-fill {
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--cm);
  border-bottom: 3px solid var(--cs);
  will-change: transform;
}

.rs-secnav-chip-name {
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rs-secnav-chip-tick {
  position: relative;
  display: none;
  color: var(--rs-navy, #394362);
  font-weight: 900;
}

.rs-secnav-chip.is-done .rs-secnav-chip-tick {
  display: inline;
  color: var(--rs-secnav-ink, #25242f);
}

.rs-secnav-chip.is-current {
  font-weight: 700;
}

/* v1.6: navy = where you are; shows on a finished chip as well as a part-read one */

.rs-secnav-chip.is-current::after {
  box-shadow: inset 0 0 0 2px var(--rs-navy, #394362);
}

/* Windows high contrast: box shadows are not drawn there, so the ring uses a system colour */

@media (forced-colors: active) {
  .rs-secnav-chip.is-current::after {
    box-shadow: none;
    border: 2px solid Highlight;
  }
}

.rs-secnav-up {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgb(37, 36, 47);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.rs-secnav-up:hover {
  color: #fff;
  opacity: .85;
}

.rs-secnav-cur {
  display: none;
}

.rs-secnav-caret {
  flex: 0 0 auto;
  font-size: .8em;
  opacity: .85;
}

@media (max-width: 991.98px) {
  .rs-secnav--a .rs-secnav-up {
    display: inline-flex;
  }
}

/* phones, look "a": one row that scrolls sideways; the current chip is kept in view */

@media (max-width: 767.98px) {
  .rs-secnav--a .rs-secnav-inner {
    padding: 0 0 0 10px;
    gap: 6px;
  }
}

@media (max-width: 767.98px) {
  .rs-secnav--a .rs-secnav-chips {
    gap: 6px;
    padding-right: 10px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
  }
}

@media (max-width: 767.98px) {
  .rs-secnav--a .rs-secnav-chips::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .rs-secnav--a .rs-secnav-chips > li {
    flex: 0 0 auto;
    max-width: 72vw;
    scroll-snap-align: center;
  }
}

@media (max-width: 767.98px) {
  .rs-secnav-chip {
    height: 32px;
    padding: 0 11px;
    font-size: 14.5px;
  }
}

@media (max-width: 767.98px) {
  .rs-secnav-up {
    width: 32px;
    height: 32px;
    font-size: 17px;
  }
}

/* phones, look "a2" (the default): just the current section, with a list */

@media (max-width: 767.98px) {
  .rs-secnav--a2 .rs-secnav-chips {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .rs-secnav--a2 .rs-secnav-inner {
    padding: 0 10px;
  }
}

@media (max-width: 767.98px) {
  .rs-secnav--a2 .rs-secnav-cur {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    height: 34px;
    padding: 0 12px;
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    background: var(--c);
    color: var(--rs-secnav-ink);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    box-shadow: inset 0 0 0 2px var(--rs-secnav-ink);
    cursor: pointer;
  }
}

@media (max-width: 767.98px) {
  .rs-secnav--a2 .rs-secnav-cur > span:not(.rs-secnav-chip-fill) {
    position: relative;
  }
}

@media (max-width: 767.98px) {
  .rs-secnav--a2 .rs-secnav-cur-n {
    flex: 0 0 auto;
    font-weight: 400;
    font-size: 13px;
    opacity: .8;
  }
}

@media (max-width: 767.98px) {
  .rs-secnav--a2 .rs-secnav-cur-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 767.98px) {
  .rs-secnav--a2 .rs-secnav-menu {
    top: calc(100% + 4px);
    left: 10px;
    right: 10px;
    width: auto;
  }
}

/* p2 on phones: in A2 the read-out goes in the button, after "2/4"; in A it stays after the chips */

@media (max-width: 767.98px) {
  .rs-secnav--a2.rs-secnav--p2 .rs-secnav-inner > .rs-secnav-pc {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .rs-secnav--a2.rs-secnav--p2 .rs-secnav-cur-pc {
    display: inline;
    flex: 0 0 auto;
    margin-left: -4px;
    font-weight: 400;
    font-size: 13px;
    opacity: .8;
    font-variant-numeric: tabular-nums;
  }
}

@media (max-width: 767.98px) {
  .rs-secnav--a2.rs-secnav--p2 .rs-secnav-cur-pc::before {
    content: "· ";
  }
}

@media (max-width: 767.98px) {
  .rs-secnav--a.rs-secnav--p2:not(.rs-secnav--a2) .rs-secnav-pc {
    min-width: 0;
    padding: 0 10px 0 2px;
    font-size: 13px;
  }
}

/* =========================================================
   v1.4: Back to GCSE menu / Next in this topic. "Go somewhere" controls: dark navy and rounded like the ↑,
   never pastel or chip-shaped, with a thin divider between them and the chips. The script picks the size:
   .rs-secnav--ends-full ("← GCSE menu", "Next: <page> →") or -compact ("← Menu", "Next →"). v1.4.1: there is no
   icon-only size; where the words don't fit, the script leaves the buttons out.
========================================================= */

.rs-secnav-end {
  display: none;
}

.rs-secnav--ends .rs-secnav-end:not([hidden]) {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgb(37, 36, 47);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgb(0 0 0 / 18%);
}

.rs-secnav--ends .rs-secnav-end:hover, .rs-secnav--ends .rs-secnav-end:focus {
  color: #fff;
  background: rgb(57, 56, 72);
}

.rs-secnav-end-ic {
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.rs-secnav-end-full, .rs-secnav-end-short {
  display: none;
}

.rs-secnav--ends-full .rs-secnav-end-full {
  display: inline-flex;
  gap: 4px;
  min-width: 0;
  max-width: 400px;
}

.rs-secnav--ends-compact .rs-secnav-end-short {
  display: inline;
}

.rs-secnav-end-k {
  flex: 0 0 auto;
  font-weight: 400;
  opacity: .9;
}

/* a name too long for 400px is not cut off: the script uses "Next →" instead (overflow hidden only so it can tell) */

.rs-secnav-end-name {
  min-width: 0;
  overflow: hidden;
}

/* the thin divider between the go-somewhere buttons and the chips */

.rs-secnav--ends .rs-secnav-chips {
  padding-left: 10px;
  padding-right: 10px;
  border-left: 1px solid #d4d8e2;
  border-right: 1px solid #d4d8e2;
}

/* v1.4.2: never on phones (the script doesn't add them there either) */

@media (max-width: 767.98px) {
  .rs-secnav-end {
    display: none !important;
  }
}

/* while the script picks the size: every chip as wide as it can get (bold, with its ✓) */

.rs-secnav--measure .rs-secnav-chip {
  font-weight: 700;
}

/* no transitions on anything measured (some site CSS animates every link's padding and width) */

.rs-secnav-end, .rs-secnav-chip, .rs-secnav-cur {
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.rs-secnav--measure .rs-secnav-chip-tick {
  display: inline;
}

/* the mock-up's switch can hide them, to compare */

html[data-rs-ends="off"] .rs-secnav-end {
  display: none !important;
}

/* =========================================================
   Page progress (v1.1). Look classes on the bar: rs-secnav--p1 / p2 / p3 / off.
========================================================= */

.rs-secnav-page {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  overflow: hidden;
  background: rgb(29 43 79 / 10%);
  pointer-events: none;
}

.rs-secnav-page-fill {
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--rs-navy, #1d2b4f);
  will-change: transform;
}

.rs-secnav-page-ticks i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: #fff;
}

.rs-secnav-page-segs {
  position: absolute;
  inset: 0;
  display: none;
  gap: 3px;
}

.rs-secnav-page-seg {
  position: relative;
  flex: 1 1 0;
  min-width: 6px;
  overflow: hidden;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 12%);
}

.rs-secnav-page-segfill {
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--cs);
}

.rs-secnav--p3 .rs-secnav-page {
  height: 4px;
  background: #fff;
}

.rs-secnav--p3 .rs-secnav-page-fill, .rs-secnav--p3 .rs-secnav-page-ticks {
  display: none;
}

.rs-secnav--p3 .rs-secnav-page-segs {
  display: flex;
}

.rs-secnav--off .rs-secnav-page {
  display: none;
}

/* p2: the read-out */

.rs-secnav-pc, .rs-secnav-cur-pc {
  display: none;
}

.rs-secnav--p2 .rs-secnav-pc {
  display: block;
  flex: 0 0 auto;
  min-width: 4ch;
  color: var(--rs-navy, #1d2b4f);
  font-size: 14px;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   The phone list (a2)
========================================================= */

.rs-secnav-menu {
  position: absolute;
  z-index: 2;
  width: min(360px, calc(100vw - 20px));
  max-height: min(70vh, 520px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid #d0d4e0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgb(0 0 0 / 22%);
  text-align: left;
}

.rs-secnav-top, .rs-secnav-item {
  display: grid;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--rs-secnav-ink);
  font-size: 15.5px;
  line-height: 1.2;
}

.rs-secnav-top {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid #eceef3;
  border-radius: 8px 8px 0 0;
  font-weight: 700;
}

.rs-secnav-top:hover, .rs-secnav-item:hover, .rs-secnav-top:focus, .rs-secnav-item:focus {
  background: #f3f4f8;
  color: var(--rs-secnav-ink);
}

.rs-secnav-item {
  grid-template-columns: 14px 1fr auto;
  grid-template-rows: auto 6px;
  column-gap: 10px;
  row-gap: 5px;
}

.rs-secnav-item-dot {
  grid-row: 1 / 3;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 2px var(--cs);
}

.rs-secnav-item-name {
  grid-column: 2;
}

.rs-secnav-item-pc {
  grid-column: 3;
  grid-row: 1 / 3;
  min-width: 3ch;
  color: #5f6475;
  font-size: 13px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rs-secnav-item.is-done .rs-secnav-item-dot {
  background: var(--cs);
}

.rs-secnav-item.is-done .rs-secnav-item-pc {
  color: var(--cs);
  font-weight: 900;
  font-size: 15px;
}

.rs-secnav-item-bar {
  grid-column: 2;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 6%);
}

.rs-secnav-item-fill {
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--cs);
}

.rs-secnav-item[aria-current] {
  background: var(--c);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--cs);
}

.rs-secnav-menu-head {
  margin: 0 0 4px;
  padding: 4px 10px 6px;
  border-bottom: 1px solid #eceef3;
  color: #5f6475;
  font-size: 13.5px;
}

/* =========================================================
   Pages without a Skip to row (v1.3): a thin page progress line under the navbar
========================================================= */

.rs-pageline {
  position: fixed;
  z-index: 1029;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity .18s ease, visibility 0s linear .18s;
}

.rs-pageline.is-on {
  visibility: visible;
  opacity: 1;
  transition: opacity .18s ease, visibility 0s;
}

.rs-pageline-fill {
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--rs-navy, #1d2b4f);
  will-change: transform;
}

/* =========================================================
   Reduced motion, print
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .rs-secnav, .rs-secnav.is-on, .rs-secnav *, .rs-secnav *::after, .rs-pageline, .rs-pageline.is-on {
    transition: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rs-secnav--a {
    transform: none;
  }
}

@media print {
  .rs-secnav, .rs-pageline {
    display: none !important;
  }
}

