/* ! rs-home.css v1.5 (17 Nov, night: wider cards that share their rows, pills on one line; v1.4 17 Nov, evening: shorter topic cards, a one-row footer that never wraps inside a button, "Coming soon"; v1.3 17 Nov: the spec topics' revision sheet and chapter quiz menus, .rs-dd; v1.2 16 Nov 2026, evening: Matthew's two reviews) · GCSE Chemistry home page (chemistry/GCSE/index.html only; pageWhitelist)
   With rs-home.js. Page state lives on <html>, set by the inline script at the top of the page's Custom Code before
   anything is drawn, so nothing jumps: hm-js (scripts on), hm-returning (course already chosen), hm-editing (course
   being changed), hm-has-plan (a saved plan), hm-ready (rs-home.js has drawn the page). If rs-home.js never runs,
   hm-js is taken off at "load" and the page falls back to the course selector and the full menu.
   Colours: navy and neutrals for structure; chemistry orange for the logo, the main actions and the Start here band;
   each topic has its own soft tint (12, no repeats). All text passes WCAG AA.
   Quick routes: style B (pale tint buttons), chosen by Matthew on 16 Nov. */

:root {
  --hm-ink: var(--rs-ink, #25242f);
  --hm-navy: var(--rs-navy, #394362);
  --hm-chem: var(--rs-chem, #d33c16);
  --hm-chem-deep: #a42d12;
  --hm-chem-soft: #fff0ec;
  --hm-chem-tint: #ffd6c8;
  --hm-chem-line: #f2bcb0;
  --hm-muted: #5d6273;
  --hm-line: #e0e3e8;
  --hm-soft: #f5f6fb;
  --hm-skill: #eef0f7;
  --hm-skill-line: #c9cee0;
  --hm-r: 12px;
  --hm-bg: #f6f5f3;
  --hm-navy-soft: #eef0f7;
  --hm-navy-line: #c9cee0;
}

/* ---------- topic tints (Matthew chose "Unique", 16 Nov): a different soft tint for each topic, in menu order; 12 hues round the
   colour wheel, missing out the chemistry orange, taken 5 apart so neighbouring topics differ a lot ----------
   --hm-t soft background, --hm-t-line border, --hm-t-acc accent (card top, progress fill), --hm-t-ink small text (AA on --hm-t) */

.hm-tint-start {
  --hm-t: #fff0ec;
  --hm-t-line: #f2bcb0;
  --hm-t-acc: #d33c16;
  --hm-t-ink: #a42d12;
}

.hm-tint-0 {
  --hm-t: #faeaf0;
  --hm-t-line: #eac2cf;
  --hm-t-acc: #ca547b;
  --hm-t-ink: #68122f;
}

.hm-tint-1 {
  --hm-t: #eafaf5;
  --hm-t-line: #c2eadd;
  --hm-t-acc: #54caa3;
  --hm-t-ink: #12684b;
}

.hm-tint-2 {
  --hm-t: #f4eafa;
  --hm-t-line: #dac2ea;
  --hm-t-acc: #9954ca;
  --hm-t-ink: #441268;
}

.hm-tint-3 {
  --hm-t: #f2faea;
  --hm-t-line: #d6eac2;
  --hm-t-acc: #8fca54;
  --hm-t-ink: #3d6812;
}

.hm-tint-4 {
  --hm-t: #eaeefa;
  --hm-t-line: #c2ccea;
  --hm-t-acc: #5471ca;
  --hm-t-ink: #122868;
}

.hm-tint-5 {
  --hm-t: #faf6ea;
  --hm-t-line: #eae0c2;
  --hm-t-acc: #caac54;
  --hm-t-ink: #685312;
}

.hm-tint-6 {
  --hm-t: #eaf9fa;
  --hm-t-line: #c2e7ea;
  --hm-t-acc: #54c0ca;
  --hm-t-ink: #126168;
}

.hm-tint-7 {
  --hm-t: #faeafa;
  --hm-t-line: #eac2ea;
  --hm-t-acc: #ca54ca;
  --hm-t-ink: #681268;
}

.hm-tint-8 {
  --hm-t: #eafaed;
  --hm-t-line: #c2eac9;
  --hm-t-acc: #54ca67;
  --hm-t-ink: #126821;
}

.hm-tint-9 {
  --hm-t: #edeafa;
  --hm-t-line: #c9c2ea;
  --hm-t-acc: #6754ca;
  --hm-t-ink: #211268;
}

.hm-tint-10 {
  --hm-t: #fafaea;
  --hm-t-line: #eaeac2;
  --hm-t-acc: #caca54;
  --hm-t-ink: #686812;
}

.hm-tint-11 {
  --hm-t: #eaf4fa;
  --hm-t-line: #c2daea;
  --hm-t-acc: #5499ca;
  --hm-t-ink: #124468;
}

.hm-section {
  margin-top: 0;
  padding-top: 20px;
  background: var(--hm-bg);
  color: var(--hm-ink);
  font-family: "ABeeZee", "Lexend", system-ui, sans-serif;
}

.hm-page {
  position: relative;
  width: 100%;
  max-width: 1500px;
  padding: 0 20px 48px;
  background: #fff;
  color: var(--hm-ink);
}

.hm-num {
  font-family: "Lexend", "ABeeZee", sans-serif;
  font-variant-numeric: tabular-nums;
}

/* ---------- header ---------- */

.hm-head {
  padding-top: 86.5px;
}

/* clears the fixed navbar, as the old logo row did */

.hm-logo {
  display: block;
  width: auto;
  height: 72px;
  max-width: 100%;
}

.hm-titlebar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--hm-chem);
}

.hm-titlebar h1 {
  margin: 0;
  color: var(--hm-ink);
}

.hm-head-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 43px;
  padding-bottom: 6px;
}

.hm-ks-btn {
  padding: 6px 10px;
  border: 1px solid #d0d4e0;
  border-radius: 8px;
  background: #fff;
  color: var(--hm-ink);
  font: inherit;
  font-size: 0.85em;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.hm-ks-btn:hover {
  background: var(--hm-navy-soft);
}

.hm-ks-btn:focus-visible {
  outline: 3px solid #185abc;
  outline-offset: 2px;
}

.hm-ks .dropdown-menu {
  font-size: 0.95rem;
}

.hm-h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--hm-ink);
}

.hm-step-n {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  background: var(--hm-chem);
  color: #fff;
  font-family: "Lexend", sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
}

.hm-lead {
  margin: 0 0 10px;
  color: var(--hm-muted);
  max-width: 62ch;
}

.hm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border: 2px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}

.hm-btn:focus-visible, .hm-link-btn:focus-visible, .hm-card-open:focus-visible, .hm-route:focus-visible, .hm-quiz:focus-visible, .hm-dialog button:focus-visible {
  outline: 3px solid #185abc;
  outline-offset: 2px;
}

/* main actions: a soft orange tint with a dark orange border and text (no large solid orange) */

.hm-btn--primary {
  background: var(--hm-chem-soft);
  border-color: var(--hm-chem);
  color: var(--hm-chem-deep);
}

.hm-btn--primary:hover {
  background: var(--hm-chem-tint);
  color: var(--hm-chem-deep);
}

.hm-link-btn {
  padding: 2px 6px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #185abc;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 1. course ---------- */

.hm-course {
  margin: 12px 0 4px;
}

.hm-course-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hm-course-first {
  flex: 1 1 auto;
}

.hm-course-line {
  display: none;
  flex: 1 1 auto;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
  padding: 10px 0;
  font-size: 1.05rem;
}

.hm-course-label {
  color: var(--hm-muted);
}

.hm-status-slot {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
}

.hm-course-done-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

/* returning visitor: the step folds to one line */

.hm-js.hm-returning .hm-course-first {
  display: none;
}

.hm-js.hm-returning .hm-course-line {
  display: flex;
}

.hm-js.hm-returning:not(.hm-editing) .hm-selector-row, .hm-js.hm-returning:not(.hm-editing) .hm-page > .row:has(.course-selector-container), .hm-js.hm-returning:not(.hm-editing) .hm-course-done {
  display: none;
}

.hm-js.hm-returning .hm-course-done-row .hm-btn {
  min-height: 40px;
}

.hm-step-n--first {
  background: var(--hm-navy);
}

.hm-js.hm-returning .hm-step-n {
  display: none;
}

/* the course selector row (the site's own component, unchanged) */

.hm-selector-row {
  margin: 0;
}

.hm-selector-row > [class*="col"] {
  padding-left: 0;
  padding-right: 0;
}

.hm-selector.rs-selector-toolbar {
  margin-bottom: 0;
}

/* the menu (linkID 13) stays in the page as the data source (and for the roadmap); the cards replace it on screen */

.hm-js .hm-menu-row, .hm-js .hm-page > .row:has(section.rs-menu) {
  display: none !important;
}

/* no scripts: the plain page (course selector + full menu) */

html:not(.hm-js) .hm-course-line, html:not(.hm-js) .hm-course-done-row, html:not(.hm-js) .hm-find, html:not(.hm-js) .hm-jump, html:not(.hm-js) .hm-topics, html:not(.hm-js) .hm-head-btns .hm-plan-link {
  display: none !important;
}

/* room kept for what rs-home.js draws, so nothing below moves when it arrives */

.hm-js .hm-jump:empty {
  min-height: 52px;
}

.hm-js #hmTopics:empty {
  min-height: 900px;
}

.hm-status-slot {
  min-height: 72px;
}

.hm-status-slot--lg {
  min-width: 260px;
}

/* the status tools' size, kept before they move in */

.hm-status-slot--sm {
  display: none;
}

@media (min-width: 768px) {
  .hm-js.hm-returning:not(.hm-editing) .hm-course-done-row {
    display: none;
  }
}

/* ---------- 2. find ---------- */

.hm-find {
  margin: 10px 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--hm-navy-line);
  border-radius: var(--hm-r);
  background: var(--hm-navy-soft);
}

.hm-find-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.hm-search {
  position: relative;
  flex: 1 1 auto;
}

.hm-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--hm-navy);
  stroke-width: 2.4;
  stroke-linecap: round;
  pointer-events: none;
}

.hm-search input {
  width: 100%;
  min-height: 52px;
  padding: 10px 14px 10px 46px;
  border: 2px solid #7d849a;
  border-radius: 10px;
  background: #fff;
  color: var(--hm-ink);
  font: inherit;
  font-size: 1.08rem;
}

.hm-search input::placeholder {
  color: #767b8c;
}

.hm-search input:focus {
  outline: none;
  border-color: var(--hm-navy);
  box-shadow: 0 0 0 3px rgb(57 67 98 / 25%);
}

.hm-search-pop {
  position: absolute;
  z-index: 60;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: min(70vh, 520px);
  overflow-y: auto;
  border: 1px solid var(--hm-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 32px rgb(23 25 67 / 18%);
}

.hm-search-list {
  margin: 0;
  padding: 6px;
  list-style: none;
}

.hm-search-group {
  padding: 8px 10px 4px;
  color: var(--hm-muted);
  font-size: 0.8rem;
}

.hm-res {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--hm-ink);
  cursor: pointer;
}

.hm-res[aria-selected="true"] {
  background: var(--hm-navy-soft);
  box-shadow: inset 3px 0 0 var(--hm-navy);
}

.hm-res-title {
  display: block;
  font-weight: 700;
}

.hm-res-title .rs-badge {
  margin-left: 6px;
  vertical-align: 2px;
}

.hm-res-sub {
  display: block;
  margin-top: 2px;
  color: var(--hm-muted);
  font-size: 0.86rem;
}

.hm-res-def {
  display: block;
  margin-top: 3px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.hm-res mark {
  padding: 0;
  background: #ffe2a8;
  color: inherit;
}

.hm-res.is-later {
  color: var(--hm-muted);
  cursor: default;
}

.hm-res.is-later .hm-res-title {
  font-weight: 400;
}

.hm-res .rs-badge {
  font-size: 0.56rem;
}

.hm-search-foot {
  margin: 0;
  padding: 6px 14px 10px;
  color: var(--hm-muted);
  font-size: 0.82rem;
}

.hm-search-foot:empty {
  display: none;
}

.hm-btn--helper {
  flex: 0 0 auto;
  background: var(--hm-chem-soft);
  border-color: var(--hm-chem);
  color: var(--hm-chem-deep);
}

.hm-btn--helper svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}

.hm-btn--helper:hover {
  background: var(--hm-chem-tint);
  border-color: var(--hm-chem-deep);
  color: var(--hm-chem-deep);
}

/* ---------- show my topics (on the folded course line) ---------- */

.hm-btn--show {
  min-height: 36px;
  margin-left: 4px;
  padding: 5px 14px;
  border-color: var(--hm-chem);
  background: #fff;
  color: var(--hm-chem-deep);
  font-size: 0.95rem;
}

.hm-btn--show:hover {
  background: var(--hm-chem-soft);
  color: var(--hm-chem-deep);
}

/* the live "Order by" select is replaced by the Order control above the cards */

#cs-order-wrapper {
  display: none !important;
}

/* ---------- pills: the approved set, readable size, AA contrast (all 5.4:1 or more) ---------- */

.hm-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.hm-pill--new {
  background: #fff1c2;
  color: #6b4800;
}

.hm-pill--upd {
  background: #e3efff;
  color: #0b4a8f;
}

.hm-pill--prac {
  background: #e2f4e5;
  color: #1a6a2a;
}

.hm-pill--calc {
  background: #e2f3f6;
  color: #0b6375;
}

.hm-pill--calc::before {
  content: "";
  display: inline-block;
  width: 0.62rem;
  height: 0.7rem;
  margin-right: 4px;
  vertical-align: -1px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 16'%3E%3Cpath fill-rule='evenodd' d='M3 0h8a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3Zm0 1.8A1.2 1.2 0 0 0 1.8 3v10A1.2 1.2 0 0 0 3 14.2h8a1.2 1.2 0 0 0 1.2-1.2V3A1.2 1.2 0 0 0 11 1.8Zm.6 1.4h6.8v3H3.6ZM3.6 8h1.8v1.8H3.6Zm2.5 0h1.8v1.8H6.1Zm2.5 0h1.8v1.8H8.6Zm-5 3h1.8v1.8H3.6Zm2.5 0h1.8v1.8H6.1Zm2.5 0h1.8v1.8H8.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 16'%3E%3Cpath fill-rule='evenodd' d='M3 0h8a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3Zm0 1.8A1.2 1.2 0 0 0 1.8 3v10A1.2 1.2 0 0 0 3 14.2h8a1.2 1.2 0 0 0 1.2-1.2V3A1.2 1.2 0 0 0 11 1.8Zm.6 1.4h6.8v3H3.6ZM3.6 8h1.8v1.8H3.6Zm2.5 0h1.8v1.8H6.1Zm2.5 0h1.8v1.8H8.6Zm-5 3h1.8v1.8H3.6Zm2.5 0h1.8v1.8H6.1Zm2.5 0h1.8v1.8H8.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.hm-pill--refresh {
  background: #f0e8fb;
  color: #5a2d91;
}

.hm-pill--comm {
  background: var(--hm-navy);
  color: #fff;
}

.hm-pill--next {
  background: #fde6df;
  color: #9a2c10;
}

.hm-pill--build {
  background: var(--hm-chem-deep);
  color: #fff;
}

.hm-pill--start {
  background: #c2381a;
  color: #fff;
}

.hm-pill--off {
  background: #eceef2;
  color: #4e5365;
}

/* ---------- quick routes ---------- */

.hm-jump {
  margin: 0 0 14px;
}

.hm-routes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

/* each route has its own colour: --r-acc edge/icon, --r-soft tint, --r-line border, --r-ink text on the tint (AA) */

.hm-route {
  --r-acc: var(--hm-navy);
  --r-soft: var(--hm-navy-soft);
  --r-line: var(--hm-navy-line);
  --r-ink: var(--hm-navy);
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 6px 12px;
  border: 1.5px solid #cfd3dc;
  border-radius: 10px;
  background: #fff;
  color: var(--hm-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background-color .12s, border-color .12s;
}

.hm-route[data-route="start"] {
  --r-acc: var(--hm-chem);
  --r-soft: var(--hm-chem-soft);
  --r-line: var(--hm-chem-line);
  --r-ink: var(--hm-chem-deep);
}

.hm-route[data-route="calc"] {
  --r-acc: #1f8a9c;
  --r-soft: #e3f3f5;
  --r-line: #b5dde3;
  --r-ink: #0b5f6d;
}

.hm-route[data-route="prac"] {
  --r-acc: #2aa537;
  --r-soft: #e6f6ec;
  --r-line: #b9e2c6;
  --r-ink: #1d6b2a;
}

.hm-route-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--r-soft);
  color: var(--r-acc);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

.hm-route-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.hm-route-name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.hm-route-sub {
  color: var(--hm-muted);
  font-size: 0.8rem;
  line-height: 1.25;
}

.hm-route-n {
  flex: 0 0 auto;
  min-width: 1.8rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--r-soft);
  color: var(--r-ink);
  font-size: 0.8rem;
  text-align: center;
}

.hm-route:active {
  transform: translateY(1px);
}

.hm-route:focus-visible {
  outline: 3px solid #185abc;
  outline-offset: 2px;
}

/* Matthew chose B (16 Nov): soft tint buttons, each in its own pale colour with darker text */

.hm-route {
  border-color: var(--r-line);
  background: var(--r-soft);
  color: var(--r-ink);
  box-shadow: 0 1px 0 var(--r-line);
}

.hm-route-icon, .hm-route-n {
  background: #fff;
}

.hm-route-sub {
  color: var(--r-ink);
}

.hm-route:hover {
  border-color: var(--r-acc);
  filter: brightness(0.97);
}

.hm-route[aria-expanded="true"] {
  border-color: var(--r-acc);
  box-shadow: inset 0 0 0 1px var(--r-acc);
}

@media (prefers-reduced-motion: reduce) {
  .hm-route {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hm-route:hover, .hm-route:active {
    transform: none !important;
  }
}

.hm-route-panel {
  margin-top: 10px;
}

.hm-route-panel[hidden] {
  display: none;
}

.hm-route:focus-visible, .hm-view button:focus-visible, .hm-seg button:focus-visible, .hm-pg:focus-visible, .hm-sheet:focus-visible {
  outline: 3px solid #185abc;
  outline-offset: 2px;
}

/* 29 Nov 2026 (a11y): .hm-seg clips its children (overflow: hidden), which hid this ring on the end buttons; draw it inside the button */

.hm-seg button:focus-visible {
  outline-offset: -3px;
}

/* ---------- topics head: title, Cards | Path, Order ---------- */

.hm-topics {
  margin-top: 0;
}

.hm-topics-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 10px;
}

.hm-topics-head .hm-h2 {
  margin: 0;
}

.hm-view {
  display: inline-flex;
  padding: 3px;
  border-radius: 12px;
  background: var(--hm-soft);
  border: 1px solid var(--hm-line);
}

.hm-view button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 6px 16px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--hm-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.hm-view svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.hm-view button[aria-pressed="true"] {
  background: var(--hm-navy);
  color: #fff;
}

.hm-order {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 10px;
  min-height: 44px;
  margin: 0 0 0 auto;
}

.hm-order-label {
  color: var(--hm-muted);
  font-size: 0.9rem;
}

.hm-order-note {
  margin: 0;
  color: var(--hm-muted);
  font-size: 0.9rem;
}

.hm-seg {
  display: inline-flex;
  border: 1px solid #7d849a;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.hm-seg button {
  min-height: 38px;
  padding: 4px 14px;
  border: 0;
  border-right: 1px solid #9aa0b4;
  background: #fff;
  color: var(--hm-ink);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.hm-seg button:last-child {
  border-right: 0;
}

.hm-seg button[aria-pressed="true"] {
  background: var(--hm-navy);
  color: #fff;
}

/* ---------- topic card: one component for both views ---------- */

.hm-tile {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border: 2px solid var(--hm-t-line, var(--hm-line));
  border-radius: 10px;
  background: var(--hm-t, var(--hm-soft));
  font-size: 1.7rem;
  line-height: 1;
}

.hm-tile-n {
  position: absolute;
  top: 3px;
  left: 5px;
  color: var(--hm-t-ink, var(--hm-navy));
  font-family: "Lexend", sans-serif;
  font-size: 0.66rem;
  font-weight: 400;
}

.is-reordered .hm-tile-n {
  display: none;
}

.is-empty .hm-tile {
  border-style: dashed;
  border-color: #c4c8d2;
  background: #fff;
  filter: grayscale(1);
  opacity: 0.75;
}

.is-empty .hm-tile-n {
  color: #3a3f50;
}

/* AA even in the faded tile */

.hm-meter {
  display: flex;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hm-meter li {
  flex: 1 1 0;
  height: 8px;
  max-width: 26px;
  border-radius: 3px;
  background: var(--hm-t-acc, var(--hm-navy));
}

.hm-meter li.is-later {
  border: 1.5px dashed #b9bdc8;
  background: transparent;
}

.hm-meter-text {
  margin: 5px 0 0;
  color: var(--hm-muted);
  font-size: 0.86rem;
}

.hm-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* card footer: a compact pair of buttons, one line, the same height on every card (36px) */

.hm-quiz, .hm-more, .hm-quiz-later {
  box-sizing: border-box;
  height: 36px;
  white-space: nowrap;
}

.hm-quiz {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1.5px solid #4a5577;
  border-radius: 8px;
  background: #4a5577;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 1px 0 rgb(23 25 67 / 18%);
  transition: background-color .12s, transform .06s;
}

.hm-quiz-ico {
  display: inline-grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #fff;
  color: #4a5577;
  font-size: 0.68rem;
}

.hm-quiz:hover {
  border-color: var(--hm-navy);
  background: var(--hm-navy);
  color: #fff;
}

.hm-quiz:hover .hm-quiz-ico {
  color: var(--hm-navy);
}

.hm-quiz:active {
  transform: translateY(1px);
  box-shadow: none;
  background: #252c45;
}

.hm-quiz:focus-visible {
  outline: 3px solid #185abc;
  outline-offset: 2px;
}

.hm-quiz-short {
  display: none;
}

.hm-quiz-tag {
  padding: 2px 5px;
  border-radius: 5px;
  background: #fff;
  color: var(--hm-navy);
  font-size: 0.62rem;
  line-height: 1.1;
}

.hm-quiz-later {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1.5px dashed #c4c8d2;
  border-radius: 8px;
  color: #6f7484;
  font-size: 0.82rem;
}

@media (prefers-reduced-motion: reduce) {
  .hm-quiz {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hm-quiz:active {
    transform: none;
  }
}

.hm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.hm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--hm-line);
  border-top: 4px solid var(--hm-t-acc, var(--hm-navy));
  border-radius: var(--hm-r);
  background: #fff;
}

.hm-card.is-empty, .hm-card.is-off {
  border: 1.5px dashed #c4c8d2;
  border-top-width: 1.5px;
  background: #fbfbfd;
}

.hm-card:not(.is-off):hover {
  border-color: var(--hm-t-line, var(--hm-line));
  box-shadow: 0 4px 14px rgb(23 25 67 / 8%);
}

.hm-card.is-open {
  border-color: var(--hm-t-acc);
  box-shadow: 0 0 0 1px var(--hm-t-acc);
}

.hm-card-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.hm-card-text {
  flex: 1 1 auto;
  min-width: 0;
}

.hm-card h3 {
  margin: 0;
  font-size: 1.14rem;
  font-weight: 400;
  line-height: 1.25;
}

.hm-card-open {
  all: unset;
  cursor: pointer;
  color: var(--hm-ink);
  font-weight: 700;
}

.hm-card-open::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--hm-r);
  z-index: 1;
}

.hm-card:has(.hm-card-open:focus-visible) {
  outline: 3px solid #185abc;
  outline-offset: 2px;
}

.hm-card-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.hm-blurb {
  margin: 6px 0 0;
  color: var(--hm-muted);
  font-size: 0.93rem;
  line-height: 1.45;
}

.hm-progress {
  margin-top: 2px;
}

.hm-leads {
  margin: 0;
  color: var(--hm-muted);
  font-size: 0.88rem;
}

.hm-leads b {
  font-weight: 400;
  color: var(--hm-ink);
}

.hm-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.hm-card {
  container: hm-card / inline-size;
}

@container hm-card (max-width: 275px) {
  .hm-quiz-long {
    display: none;
  }
}

@container hm-card (max-width: 275px) {
  .hm-quiz-short {
    display: inline;
  }
}

/* "Pages" looks like the secondary button; the card's title button (whose hit area covers the card) does the work */

.hm-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 0 10px;
  border: 1.5px solid #767c90;
  border-radius: 8px;
  background: #fff;
  color: var(--hm-navy);
  font-size: 0.86rem;
  font-weight: 700;
}

.hm-card:not(.is-off):hover .hm-more {
  border-color: var(--hm-navy);
  background: var(--hm-navy-soft);
}

.hm-more::after {
  content: "▾";
}

.is-open > .hm-card-foot .hm-more::after {
  content: "▴";
}

.is-empty .hm-blurb, .is-empty .hm-card-open, .is-off h3, .is-off .hm-blurb {
  color: #5d6273;
}

/* Cards view */

.hm-start {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--hm-chem-line);
  border-radius: 14px;
  background: var(--hm-chem-soft);
}

.hm-start-label, .hm-then {
  margin: 0 0 10px;
  color: var(--hm-ink);
  font-size: 1rem;
}

.hm-start-flag {
  margin-right: 2px;
}

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

.hm-then {
  color: var(--hm-muted);
}

.hm-grid > .hm-panel {
  grid-column: 1 / -1;
}

/* the open topic's pages */

.hm-panel {
  position: relative;
  z-index: 2;
  padding: 14px 16px 16px;
  border: 2px solid var(--hm-t-acc, var(--hm-navy));
  border-radius: var(--hm-r);
  background: #fff;
  container-type: inline-size;
}

.hm-grid > .hm-panel::before {
  content: "";
  position: absolute;
  top: -10px;
  left: calc(var(--hm-tab-l, 24px) + var(--hm-tab-w, 40px) / 2 - 9px);
  width: 16px;
  height: 16px;
  border-top: 2px solid var(--hm-t-acc, var(--hm-navy));
  border-left: 2px solid var(--hm-t-acc, var(--hm-navy));
  background: #fff;
  transform: rotate(45deg);
}

.hm-card > .hm-panel {
  margin: 0 -2px -2px;
  padding: 12px 0 0;
  border: 0;
  border-top: 2px solid var(--hm-t-line, var(--hm-line));
  border-radius: 0;
}

.hm-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.hm-panel-head h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 400;
}

.hm-panel-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hm-sheet {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 14px;
  border: 1.5px solid #767c90;
  border-radius: 999px;
  background: #fff;
  color: var(--hm-ink);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.hm-sheet:hover {
  border-color: var(--hm-navy);
  background: var(--hm-soft);
  color: var(--hm-ink);
}

.hm-panel .hm-lead {
  margin: 0 0 10px;
}

.hm-list {
  display: grid;
  gap: 8px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@container (min-width: 600px) {
  .hm-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(var(--rows), auto);
    grid-auto-flow: column;
  }
}

.hm-pg {
  display: grid;
  grid-template-columns: 1.9rem minmax(0, 1fr) auto 0.8rem;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  height: 100%;
  padding: 8px 12px;
  border: 1.5px solid #767c90;
  border-radius: 10px;
  background: #fff;
  color: var(--hm-ink);
  text-decoration: none;
}

.hm-pg:hover {
  border-color: var(--hm-t-acc, var(--hm-navy));
  background: var(--hm-t, var(--hm-navy-soft));
  color: var(--hm-ink);
}

.hm-pg:hover .hm-pg-name {
  text-decoration-color: currentColor;
}

.hm-pg-n {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--hm-navy);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 400;
}

.is-skill .hm-pg-n, .hm-panel .hm-pg-n {
  background: var(--hm-navy);
}

.hm-pg-name {
  font-weight: 700;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-color: rgb(37 36 47 / 30%);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.hm-pg-topic {
  display: block;
  margin-top: 2px;
  color: var(--hm-muted);
  font-size: 0.82rem;
  font-weight: 400;
  text-decoration: none;
}

.hm-pg-pills {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.hm-pg-go {
  color: var(--hm-t-ink, var(--hm-navy));
  font-size: 1.4rem;
  line-height: 1;
}

.hm-later {
  margin-top: 10px;
}

.hm-later.rs-menu .topic {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: none !important;
}

.hm-later.rs-menu .topic::before {
  display: none !important;
}

/* Path view */

.hm-path-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 24px;
  align-items: start;
}

.hm-path {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hm-stop {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 0 16px;
  padding-bottom: 16px;
}

.hm-stop::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 58px;
  bottom: 0;
  width: 4px;
  border-radius: 2px;
  background: var(--hm-t-line, var(--hm-line));
}

.hm-stop:last-child::before {
  display: none;
}

.hm-stop.is-empty::before, .hm-stop.is-off::before {
  background: repeating-linear-gradient(to bottom, #c4c8d2 0 6px, transparent 6px 12px);
}

.hm-stop-body {
  min-width: 0;
}

.hm-stop .hm-card {
  gap: 8px;
  padding: 12px 14px;
}

.hm-stop .hm-card .hm-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
}

.hm-stop .hm-card .hm-meter {
  flex: 1 1 160px;
  max-width: 280px;
}

.hm-stop .hm-card .hm-meter-text {
  margin: 0;
}

.hm-stop-flag {
  position: absolute;
  left: 0;
  top: -22px;
  width: 58px;
  text-align: center;
  color: var(--hm-chem-deep);
  font-size: 0.8rem;
  font-weight: 700;
}

.hm-path > .hm-stop:first-child {
  margin-top: 24px;
}

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

.hm-fork-note {
  margin: 0 0 8px;
  color: var(--hm-muted);
  font-size: 0.93rem;
}

.hm-stop.is-off .hm-tile {
  filter: grayscale(1);
  opacity: 0.5;
}

.hm-rail {
  position: sticky;
  top: 16px;
}

.hm-rail-card {
  padding: 14px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-r);
  background: var(--hm-soft);
}

.hm-rail-card h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  font-weight: 700;
}

.hm-rail-card ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hm-rail-card li {
  line-height: 1.45;
}

.hm-rail-card p {
  margin: 8px 0 0;
  color: var(--hm-muted);
  font-size: 0.9rem;
}

/* ---------- helper dialog ---------- */

.hm-dialog {
  width: min(560px, calc(100vw - 20px));
  max-height: calc(100dvh - 20px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  color: var(--hm-ink);
  box-shadow: 0 20px 60px rgb(23 25 67 / 30%);
}

.hm-dialog::backdrop {
  background: rgb(37 36 47 / 45%);
}

.hm-dialog-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 14px;
  font-family: "ABeeZee", system-ui, sans-serif;
}

.hm-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
}

.hm-dialog-step {
  margin: 0;
  color: var(--hm-muted);
  font-size: 0.85rem;
}

.hm-dialog-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: var(--hm-soft);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.hm-dialog-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 400;
  outline: none;
}

.hm-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hm-dialog-body p {
  margin: 0;
  color: var(--hm-muted);
}

.hm-dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--hm-line);
}

.hm-private {
  margin: 0;
  color: var(--hm-muted);
  font-size: 0.82rem;
}

.hm-pickgrid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hm-pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 12px;
  border: 1.5px solid var(--hm-line);
  border-radius: 999px;
  background: #fff;
  color: var(--hm-ink);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.hm-pick[aria-pressed="true"] {
  border-color: var(--hm-navy);
  background: var(--hm-navy-soft);
}

.hm-pick[aria-pressed="true"]::before {
  content: "✓";
  color: var(--hm-navy);
  font-weight: 700;
}

.hm-feel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 46vh;
  overflow-y: auto;
}

.hm-feel li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--hm-soft);
}

.hm-seg {
  display: inline-flex;
  border: 1px solid #7d849a;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.hm-seg button {
  min-height: 34px;
  padding: 4px 10px;
  border: 0;
  border-right: 1px solid #cfd5e2;
  background: #fff;
  color: var(--hm-ink);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.hm-seg button:last-child {
  border-right: 0;
}

.hm-seg button[aria-pressed="true"] {
  background: var(--hm-navy);
  color: #fff;
}

.hm-times {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.hm-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 8px;
  border: 2px solid var(--hm-line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.hm-time b {
  font-family: "Lexend", sans-serif;
  font-size: 1.3rem;
  font-weight: 400;
}

.hm-time span {
  color: var(--hm-muted);
  font-size: 0.82rem;
}

.hm-time[aria-pressed="true"] {
  border-color: var(--hm-navy);
  background: var(--hm-navy-soft);
}

.hm-sugs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: sug;
}

.hm-sug a {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 2px 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--hm-chem-line);
  border-radius: 12px;
  color: var(--hm-ink);
  text-decoration: none;
}

.hm-sug a:hover {
  border-color: var(--hm-chem);
  background: var(--hm-chem-soft);
}

.hm-sug a::before {
  counter-increment: sug;
  content: counter(sug);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--hm-chem);
  color: #fff;
  font-family: "Lexend", sans-serif;
  font-weight: 400;
}

.hm-sug-title {
  font-weight: 700;
}

.hm-sug-why {
  color: var(--hm-muted);
  font-size: 0.86rem;
}

/* ---------- responsive ---------- */

@media (max-width: 991.98px) {
  .hm-path-wrap {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 991.98px) {
  .hm-rail {
    position: static;
  }
}

@media (max-width: 1099.98px) {
  .hm-routes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1099.98px) {
  .hm-js .hm-jump:empty {
    min-height: 112px;
  }
}

@media (max-width: 767.98px) {
  .hm-status-slot--lg {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .hm-status-slot--sm {
    display: block;
    min-height: 78px;
    margin-left: auto;
  }
}

@media (max-width: 767.98px) {
  .hm-course-done-row {
    flex-direction: column;
    align-items: flex-end;
  }
}

/* the title row: buttons on their own line, so How it works (added by rs-cards.js) never moves anything */

@media (max-width: 767.98px) {
  .hm-head-btns {
    flex: 1 0 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 767.98px) {
  .hm-find-row {
    flex-direction: column;
  }
}

@media (max-width: 767.98px) {
  .hm-btn--helper {
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .hm-page {
    padding: 0 12px 40px;
  }
}

@media (max-width: 575.98px) {
  .hm-logo {
    height: 54px;
  }
}

@media (max-width: 575.98px) {
  .hm-titlebar h1 {
    font-size: 1.55rem;
    white-space: nowrap;
  }
}

@media (max-width: 575.98px) {
  .hm-head-btns .ct-help-btn {
    font-size: 0.78em;
  }
}

@media (max-width: 575.98px) {
  .hm-course-line {
    font-size: 1rem;
    padding: 6px 0;
  }
}

@media (max-width: 575.98px) {
  .hm-btn--show {
    margin-left: 0;
  }
}

@media (max-width: 575.98px) {
  .hm-find {
    padding: 12px;
    margin-left: -4px;
    margin-right: -4px;
  }
}

@media (max-width: 575.98px) {
  .hm-routes {
    gap: 8px;
  }
}

@media (max-width: 575.98px) {
  .hm-route {
    min-height: 48px;
    max-height: 64px;
    padding: 5px 8px;
    gap: 7px;
  }
}

@media (max-width: 575.98px) {
  .hm-route-icon {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 575.98px) {
  .hm-route-name {
    font-size: 0.92rem;
  }
}

@media (max-width: 575.98px) {
  .hm-route-n {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .hm-js .hm-jump:empty {
    min-height: 104px;
  }
}

/* phones: the count stays in the button for screen readers and in its tooltip */

@media (max-width: 575.98px) {
  .hm-route-sub {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (max-width: 575.98px) {
  .hm-view {
    width: 100%;
    order: 2;
  }
}

@media (max-width: 575.98px) {
  .hm-order {
    order: 3;
    margin: 0;
    justify-content: flex-start;
  }
}

@media (max-width: 575.98px) {
  .hm-view button {
    flex: 1 1 0;
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .hm-seg button {
    padding: 4px 10px;
    font-size: 0.86rem;
  }
}

@media (max-width: 575.98px) {
  .hm-grid, .hm-grid--start {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
}

@media (max-width: 575.98px) {
  .hm-start {
    padding: 10px;
    margin-left: -4px;
    margin-right: -4px;
  }
}

@media (max-width: 575.98px) {
  .hm-card {
    padding: 12px;
    gap: 10px;
  }
}

@media (max-width: 575.98px) {
  .hm-tile {
    width: 50px;
    height: 50px;
    font-size: 1.45rem;
  }
}

@media (max-width: 575.98px) {
  .hm-stop {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 0 8px;
  }
}

@media (max-width: 575.98px) {
  .hm-stop .hm-tile {
    width: 40px;
    height: 40px;
    font-size: 1.15rem;
    border-radius: 8px;
  }
}

@media (max-width: 575.98px) {
  .hm-stop .hm-tile-n {
    font-size: 0.56rem;
    top: 1px;
    left: 3px;
  }
}

@media (max-width: 575.98px) {
  .hm-stop::before {
    left: 18px;
    top: 40px;
  }
}

@media (max-width: 575.98px) {
  .hm-stop-flag {
    width: 40px;
    font-size: 0.7rem;
  }
}

@media (max-width: 575.98px) {
  .hm-fork {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 575.98px) {
  .hm-panel {
    padding: 12px;
  }
}

@media (max-width: 575.98px) {
  .hm-pg {
    grid-template-columns: 1.7rem minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px 10px;
  }
}

@media (max-width: 575.98px) {
  .hm-pg-n {
    width: 1.7rem;
    height: 1.7rem;
  }
}

@media (max-width: 575.98px) {
  .hm-pg-go {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .hm-times {
    gap: 6px;
  }
}

@media (max-width: 389.98px) {
  .hm-route {
    gap: 6px;
    padding: 5px 7px;
  }
}

@media (max-width: 389.98px) {
  .hm-route-icon {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 389.98px) {
  .hm-route-name {
    font-size: 0.88rem;
  }
}

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

/* ---------- helper v2: topics, quick check, plan ---------- */

.hm-dialog[open] {
  display: flex;
}

.hm-dialog-inner {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100dvh - 20px);
}

.hm-dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 2px;
}

.hm-feel {
  max-height: none;
  overflow: visible;
}

.hm-feel li {
  align-items: center;
}

.hm-feel-name {
  flex: 1 1 140px;
  font-weight: 700;
}

.hm-feel-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.hm-pick--small {
  min-height: 34px;
  padding: 4px 10px;
  font-size: 0.85rem;
}

.hm-helper-course {
  color: var(--hm-ink) !important;
}

.hm-can-topic h3 {
  margin: 4px 0 6px;
  font-size: 1.02rem;
  font-weight: 700;
}

.hm-can {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hm-can li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--hm-soft);
}

.hm-can-text {
  flex: 1 1 220px;
  line-height: 1.35;
}

.hm-seg--can button {
  min-height: 36px;
  padding: 4px 9px;
}

.hm-seg--can button[data-v="yes"][aria-pressed="true"] {
  background: #1a6a2a;
}

.hm-seg--can button[data-v="bit"][aria-pressed="true"] {
  background: #6b4800;
}

.hm-seg--can button[data-v="no"][aria-pressed="true"] {
  background: var(--hm-chem-deep);
}

.hm-note-small {
  font-size: 0.86rem;
}

.hm-sug-sec {
  display: block;
  color: var(--hm-ink);
  font-size: 0.86rem;
  font-weight: 400;
}

.hm-plan-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hm-btn--save {
  min-height: 40px;
  border-color: var(--hm-navy);
  background: #fff;
  color: var(--hm-navy);
  font-size: 0.92rem;
}

.hm-btn--save:hover:not(:disabled) {
  background: var(--hm-navy);
  color: #fff;
}

.hm-btn--save:disabled {
  border-color: #1a6a2a;
  color: #1a6a2a;
  cursor: default;
}

.hm-plan-link {
  padding: 6px 10px;
  border: 1px solid var(--hm-navy);
  border-radius: 8px;
  background: var(--hm-navy-soft);
  color: var(--hm-navy);
  font: inherit;
  font-size: 0.85em;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
}

.hm-plan-link:focus-visible {
  outline: 3px solid #185abc;
  outline-offset: 2px;
}

.hm-plan-link {
  display: none;
}

.hm-has-plan .hm-plan-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 575.98px) {
  .hm-dialog-inner {
    padding: 12px 12px 10px;
  }
}

@media (max-width: 575.98px) {
  .hm-seg button {
    padding: 4px 8px;
    font-size: 0.82rem;
    min-height: 40px;
  }
}

@media (max-width: 575.98px) {
  .hm-plan-link {
    font-size: 0.78em;
  }
}

/* ---------- v1.1 (16 Nov review) ---------- */

/* route lists (quizzes, calculators, practicals, start): the topic's emoji in its own tint, beside the number */

.hm-pg--ico {
  grid-template-columns: 1.9rem 2rem minmax(0, 1fr) auto 0.8rem;
}

.hm-pg-ico {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1.5px solid var(--hm-t-line, var(--hm-line));
  border-radius: 8px;
  background: var(--hm-t, var(--hm-soft));
  font-size: 1.05rem;
  line-height: 1;
}

/* Path: the roadmap panel stays below the navbar (and the section bar, if a page has one: rs-cards.js puts both in --rs-nav-h) */

.hm-rail {
  top: calc(var(--rs-nav-h, 70px) + 12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* the small support card under it (wording and links as in the site's support card) */

.hm-support {
  border-color: #eadf9f;
  background: #fffbe6;
}

.hm-rail-card .hm-support-k {
  margin: 0 0 4px;
  color: #6b5a00;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hm-rail-card .hm-support-intro {
  margin: 0;
  color: var(--hm-ink);
}

.hm-rail-card .hm-support-actions {
  margin: 10px 0 0;
}

.hm-support-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1.5px solid var(--hm-chem);
  border-radius: 8px;
  background: var(--hm-chem-soft);
  color: var(--hm-chem-deep);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.hm-support-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hm-support-btn:hover {
  background: var(--hm-chem-tint);
  color: var(--hm-chem-deep);
}

.hm-support-btn:focus-visible, .hm-support-fb a:focus-visible, .hm-preview a:focus-visible {
  outline: 3px solid #185abc;
  outline-offset: 2px;
}

.hm-rail-card .hm-support-fb {
  margin: 8px 0 0;
  font-size: 0.85rem;
}

.hm-support-fb a {
  color: #185abc;
  font-weight: 700;
}

/* Path: the Start here pair opens its pages full width under the pair, pointing at the card (as in Cards) */

.hm-stop-body > .hm-panel--below {
  margin-top: 14px;
}

.hm-stop-body > .hm-panel--below::before {
  content: "";
  position: absolute;
  top: -10px;
  left: calc(var(--hm-tab-l, 24px) + var(--hm-tab-w, 40px) / 2 - 9px);
  width: 16px;
  height: 16px;
  border-top: 2px solid var(--hm-t-acc, var(--hm-navy));
  border-left: 2px solid var(--hm-t-acc, var(--hm-navy));
  background: #fff;
  transform: rotate(45deg);
}

/* Path, wide screens: the topic's first pages beside its bar */

.hm-preview {
  display: none;
  padding: 10px 12px;
  border: 1px solid var(--hm-t-line, var(--hm-line));
  border-radius: 10px;
  background: var(--hm-t, var(--hm-soft));
}

.hm-preview-k {
  margin: 0 0 6px;
  color: var(--hm-t-ink, var(--hm-navy));
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hm-preview ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hm-preview a {
  position: relative;
  z-index: 2;
  color: var(--hm-ink);
  font-size: 0.9rem;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-color: rgb(37 36 47 / 35%);
  text-underline-offset: 3px;
}

.hm-preview a:hover {
  text-decoration-color: currentColor;
}

.hm-preview-more, .hm-preview-none {
  margin: 6px 0 0;
  color: var(--hm-muted);
  font-size: 0.82rem;
}

@media (min-width: 1200px) {
  .hm-stop:not(.is-skill) .hm-card:has( > .hm-preview) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 34%);
    column-gap: 20px;
    row-gap: 0;
    align-items: start;
  }
}

@media (min-width: 1200px) {
  .hm-stop:not(.is-skill) .hm-card:has( > .hm-preview) > * {
    grid-column: 1;
    margin-top: 8px;
  }
}

@media (min-width: 1200px) {
  .hm-stop:not(.is-skill) .hm-card:has( > .hm-preview) > :first-child {
    margin-top: 0;
  }
}

@media (min-width: 1200px) {
  .hm-stop:not(.is-skill) .hm-card > .hm-preview {
    display: block;
    grid-column: 2;
    grid-row: 1 / span 8;
    align-self: stretch;
    margin-top: 0;
  }
}

@media (min-width: 1200px) {
  .hm-stop:not(.is-skill) .hm-card > .hm-panel {
    grid-column: 1 / -1;
  }
}

/* the helper: topic chips, one toggle, then up to 3 one-tap checks */

.hm-dialog .hm-pickgrid {
  gap: 8px;
}

.hm-dialog .hm-pick {
  min-height: 40px;
}

.hm-teacher-row {
  margin: 4px 0 0 !important;
}

.hm-pick--teacher {
  border-style: dashed;
}

.hm-pick--teacher[aria-pressed="true"] {
  border-style: solid;
}

.hm-can-topic-name {
  display: block;
  margin-bottom: 2px;
  color: var(--hm-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

@media (max-width: 575.98px) {
  .hm-pg--ico {
    grid-template-columns: 1.7rem 1.8rem minmax(0, 1fr) auto;
  }
}

@media (max-width: 575.98px) {
  .hm-pg-ico {
    width: 1.8rem;
    height: 1.8rem;
    font-size: 0.95rem;
  }
}

/* ---------- v1.2 (Matthew's second round, 16 Nov) ---------- */

/* Order: Exam board, with a course chosen: one card per specification topic, numbered as the specification numbers it */

.hm-tile--spec {
  padding: 2px;
  color: var(--hm-t-ink, var(--hm-navy));
  font-family: "Lexend", "ABeeZee", sans-serif;
  font-size: 0.95rem;
  line-height: 1.05;
  text-align: center;
  overflow-wrap: anywhere;
}

.hm-spec-quizzes {
  position: relative;
  z-index: 2;
  margin: 0;
  color: var(--hm-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.hm-spec-quizzes a {
  color: #185abc;
  font-weight: 700;
}

.hm-spec-quizzes a:focus-visible {
  outline: 3px solid #185abc;
  outline-offset: 2px;
}

.hm-panel-links .hm-quiz {
  white-space: nowrap;
}

/* Support us: the navbar's own button (rs-nav.css styles it only inside #rsMainNav, so the same values are repeated here) */

.hm-support .hm-support-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: #ffdd00;
  color: #202124;
  font: 600 14px/1 "ABeeZee", sans-serif;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 2px 4px rgb(0 0 0 / 14%);
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease, box-shadow 150ms ease;
}

.hm-support .hm-support-trigger svg {
  width: 20px;
  height: 20px;
}

.hm-support .hm-support-trigger:hover {
  color: #202124;
  filter: brightness(1.04);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 7px 14px rgb(0 0 0 / 20%);
}

.hm-support .hm-support-trigger:active {
  transform: translateY(0) scale(0.97);
}

.hm-support .hm-support-trigger:focus-visible {
  outline: 3px solid #185abc;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .hm-support .hm-support-trigger {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hm-support .hm-support-trigger:hover, .hm-support .hm-support-trigger:active {
    transform: none;
  }
}

/* the helper: the teacher question is a separate tick box under the chips, not a chip */

.hm-teacher {
  margin-top: 6px;
  padding: 10px 12px;
  border-top: 1px solid var(--hm-line);
  border-radius: 0 0 8px 8px;
  background: var(--hm-soft);
}

.hm-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  margin: 0;
  color: var(--hm-ink);
  font-size: 0.95rem;
  cursor: pointer;
}

.hm-check input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--hm-navy);
}

.hm-check input:focus-visible {
  outline: 3px solid #185abc;
  outline-offset: 2px;
}

.hm-teacher-list {
  margin: 6px 0 0 30px;
}

.hm-dialog .hm-teacher-q {
  margin: 0 0 2px;
  color: var(--hm-ink);
  font-size: 0.9rem;
  font-weight: 700;
}

/* quick check: answered count and "Answer 3 more" */

.hm-dialog .hm-can-progress {
  margin: 2px 0 0;
  color: var(--hm-muted);
  font-size: 0.86rem;
}

.hm-can-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 10px 12px;
  border: 1px dashed var(--hm-navy-line);
  border-radius: 10px;
}

.hm-can-more span {
  color: var(--hm-muted);
  font-size: 0.86rem;
}

/* plan: the time it is sized to */

.hm-plan-time {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.hm-plan-time-k {
  color: var(--hm-muted);
  font-size: 0.9rem;
}

.hm-panel > .hm-spec-quizzes {
  margin: -4px 0 10px;
}

/* the helper: wider on larger screens, a full-width sheet on phones; chips grouped under the specification's sections */

.hm-dialog {
  width: min(920px, calc(100vw - 32px));
}

.hm-dialog .hm-pick-section {
  margin: 4px 0 -2px;
  color: var(--hm-ink);
  font-family: "Lexend", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
}

.hm-dialog .hm-teacher {
  position: sticky;
  bottom: -2px;
  z-index: 1;
}

.hm-dialog .hm-teacher-list {
  max-height: 30vh;
  overflow-y: auto;
}

@media (min-width: 768px) {
  .hm-dialog-inner {
    padding: 18px 24px 16px;
  }
}

@media (min-width: 768px) {
  .hm-dialog .hm-pickgrid {
    gap: 6px;
  }
}

@media (min-width: 768px) {
  .hm-dialog .hm-pick {
    min-height: 36px;
    padding: 4px 11px;
    font-size: 0.9rem;
  }
}

@media (max-width: 575.98px) {
  .hm-dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
    margin: auto 0 0;
    border-radius: 16px 16px 0 0;
  }
}

@media (max-width: 575.98px) {
  .hm-dialog-inner {
    max-height: 100dvh;
  }
}

.hm-dialog .hm-pick {
  text-align: left;
}

/* ---------- v1.3: a specification topic drawn from several topics: "Revision sheet ▾" / "Chapter quiz ▾" menus (the same
   component as the topic box at the end of content pages) ---------- */

.hm-card.hm-dd-open {
  z-index: 20;
}

.hm-page .rs-dd {
  position: relative;
  z-index: 3;
  display: inline-flex;
}

.hm-page .rs-dd-btn {
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}

.hm-page .hm-quiz.rs-dd-btn {
  min-height: 36px;
}

.hm-page .rs-dd-caret {
  margin-left: 6px;
  font-size: 0.8em;
}

.hm-page .rs-dd-btn[aria-expanded="true"] .rs-dd-caret {
  display: inline-block;
  transform: rotate(180deg);
}

.hm-page .rs-dd-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: max-content;
  min-width: 15rem;
  max-width: min(22rem, calc(100vw - 24px));
  margin: 0;
  padding: 6px;
  border: 1px solid #c9cee0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgb(23 25 67 / 18%);
  list-style: none;
}

.hm-page .hm-panel-links .rs-dd-menu {
  right: 0;
  left: auto;
}

.hm-page .rs-dd-menu[hidden] {
  display: none;
}

.hm-page .rs-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--hm-ink);
  text-decoration: none;
}

.hm-page .rs-dd-item:hover {
  background: var(--hm-t, var(--hm-soft));
}

.hm-page .rs-dd-item:focus-visible, .hm-page .rs-dd-btn:focus-visible {
  outline: 3px solid #185abc;
  outline-offset: 2px;
}

.hm-page .rs-dd-tile {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--hm-t-line, var(--hm-line));
  border-radius: 8px;
  background: var(--hm-t, var(--hm-soft));
  font-size: 1rem;
}

.hm-page .rs-dd-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}

.hm-page .rs-dd-name {
  font-weight: 700;
  line-height: 1.2;
}

.hm-page .rs-dd-sub {
  color: var(--hm-muted);
  font-size: 0.8rem;
  line-height: 1.2;
}

.hm-page .rs-dd-tag {
  flex: 0 0 auto;
}

@media (prefers-reduced-motion: reduce) {
  .hm-page .rs-dd-btn[aria-expanded="true"] .rs-dd-caret {
    transform: none;
  }
}

@media (max-width: 575.98px) {
  .hm-page .rs-dd {
    display: contents;
  }
}

@media (max-width: 575.98px) {
  .hm-page .hm-card-foot, .hm-page .hm-panel-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 575.98px) {
  .hm-page .rs-dd-menu {
    position: relative;
    z-index: 3;
    top: auto;
    left: auto;
    right: auto;
    order: 9;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    max-width: none;
    box-shadow: none;
  }
}

@media (max-width: 575.98px) {
  .hm-page .hm-panel-links .rs-dd-menu {
    left: auto;
    right: auto;
  }
}

@media (max-width: 575.98px) {
  .hm-page .rs-dd-btn {
    position: relative;
    z-index: 3;
  }
}

.hm-tile--spec.hm-tile--emoji {
  font-size: 1.6rem;
}

/* ---------- v1.4 (Matthew, 17 Nov 17:45): shorter topic cards; the footer always one tidy row ---------- */

.hm-card {
  gap: 9px;
  padding: 12px 13px;
}

.hm-card-top {
  gap: 10px;
}

.hm-tile {
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
}

.hm-tile--spec {
  font-size: 0.92rem;
}

/* a specification number always on one line: the tile widens for Edexcel's "Topic 1" */

.hm-tile--spec:not(.hm-tile--emoji) {
  width: auto;
  min-width: 50px;
  padding: 0 7px;
  white-space: nowrap;
  overflow-wrap: normal;
}

.hm-tile--spec.hm-tile--emoji {
  font-size: 1.4rem;
}

/* long titles wrap between words only, never cut */

.hm-card h3 {
  font-size: 1.08rem;
  line-height: 1.22;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
  text-wrap: pretty;
}

/* every card title looks the same (Matthew, 17 Nov 18:01): bold, whether it is the button that opens the list (several
   pages) or plain text (one page, Coming soon, not on your course); empty and off-course cards keep the faded colour */

.hm-card > .hm-card-top h3, .hm-card > .hm-card-top h3 .hm-card-open {
  font-weight: 700;
}

.is-empty > .hm-card-top h3 {
  color: #5d6273;
}

.hm-card-flags {
  margin-top: 4px;
}

.hm-blurb {
  margin: 3px 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* the bar and "n of n pages" share one line */

.hm-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
}

.hm-progress .hm-meter {
  flex: 1 1 auto;
  min-width: 40px;
}

.hm-meter li {
  height: 7px;
}

.hm-meter-text {
  flex: 0 0 auto;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.3;
  white-space: nowrap;
}

/* a one-page card: a short bar, then "1 page: <name>" (the name may wrap, between words) */

.hm-progress--one .hm-meter {
  flex: 0 0 auto;
  width: 56px;
  min-width: 0;
}

.hm-meter-text--one {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
}

.hm-one-name {
  color: var(--hm-ink);
}

/* no page published yet: "Coming soon" instead of "0 of n" and an empty bar */

.hm-progress--soon {
  flex-wrap: wrap;
  gap: 4px 8px;
}

.hm-soon {
  display: inline-flex;
  align-items: center;
  padding: 1px 9px;
  border: 1.5px dashed #8d93a5;
  border-radius: 999px;
  background: #fff;
  color: #4e5365;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.hm-soon-page {
  min-width: 0;
  color: var(--hm-muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

/* the footer: one row, Quiz on the left, Pages or Open page on the right; nothing wraps inside a button */

.hm-card-foot {
  flex-wrap: nowrap;
  min-width: 0;
}

.hm-card-foot > * {
  flex: 0 0 auto;
}

.hm-card-foot .hm-quiz, .hm-card-foot .hm-more, .hm-card-foot .hm-single, .hm-card-foot .rs-dd-btn {
  height: 36px;
  min-height: 36px;
  white-space: nowrap;
}

.hm-single {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-sizing: border-box;
  margin-left: auto;
  padding: 0 10px;
  border: 1.5px solid #767c90;
  border-radius: 8px;
  background: #fff;
  color: var(--hm-navy);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.hm-single:hover {
  border-color: var(--hm-navy);
  background: var(--hm-navy-soft);
  color: var(--hm-navy);
}

.hm-single:focus-visible {
  outline: 3px solid #185abc;
  outline-offset: 2px;
}

.hm-single-short {
  display: none;
}

.hm-single-go {
  flex: 0 0 auto;
}

/* (widths inside the card's padding) "Chapter quiz" is "Quiz" below 340px (it was 275px), so Quiz and Pages or Open page
   always fit on one row; below 246px "Open page" is "Open"; below 250px the quiz button is a little tighter */

@container hm-card (max-width: 339px) {
  .hm-quiz-long {
    display: none;
  }
}

@container hm-card (max-width: 339px) {
  .hm-quiz-short {
    display: inline;
  }
}

@container hm-card (max-width: 245px) {
  .hm-single-long {
    display: none;
  }
}

@container hm-card (max-width: 245px) {
  .hm-single-short {
    display: inline;
  }
}

@container hm-card (max-width: 250px) {
  .hm-card-foot .hm-quiz {
    gap: 4px;
    padding: 0 8px;
  }
}

@media (max-width: 575.98px) {
  .hm-card {
    gap: 8px;
    padding: 11px 12px;
  }
}

@media (max-width: 575.98px) {
  .hm-tile {
    width: 46px;
    height: 46px;
    font-size: 1.35rem;
  }
}

@media (max-width: 575.98px) {
  .hm-tile--spec {
    font-size: 0.82rem;
  }
}

@media (max-width: 575.98px) {
  .hm-tile--spec:not(.hm-tile--emoji) {
    min-width: 46px;
    padding: 0 6px;
  }
}

/* phones: the Chapter quiz menu opens in the flow, on its own line under the buttons (the buttons stay on one row) */

@media (max-width: 575.98px) {
  .hm-page .hm-card-foot {
    flex-wrap: wrap;
  }
}

/* the Path view keeps its own wider bar */

.hm-stop .hm-card .hm-progress {
  flex-wrap: nowrap;
}

.hm-stop .hm-card .hm-progress--soon, .hm-stop .hm-card .hm-progress--one {
  flex-wrap: wrap;
}

.hm-stop .hm-card .hm-progress--one .hm-meter {
  flex: 0 0 auto;
}

/* ---------- v1.5 draft (Matthew, 17 Nov 21:03): wider cards, the same layout for every card ---------- */

/* fewer, wider cards: 4 per row at 1470 and 1280, 3 at 1024, 2 at 768, 1 on phones */

@media (min-width: 576px) {
  .hm-grid:not(.hm-grid--start) {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/* the label switches (Chapter quiz / Quiz, Open page / Open) now measure the footer, not the card, so that the card
   can share its rows with the others in its row (a container card cannot be a subgrid) */

.hm-card {
  container: none;
}

.hm-card-foot {
  container: hm-card / inline-size;
}

/* every card in a row shares its rows: title and blurb, bar, pills, buttons */

@media (min-width: 576px) {
  .hm-grid > .hm-card {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 4;
    row-gap: 9px;
    align-content: start;
  }
}

@media (min-width: 576px) {
  .hm-grid > .hm-card > .hm-card-top {
    grid-row: 1;
  }
}

@media (min-width: 576px) {
  .hm-grid > .hm-card > .hm-progress {
    grid-row: 2;
    align-self: center;
  }
}

@media (min-width: 576px) {
  .hm-grid > .hm-card > .hm-counts {
    grid-row: 3;
    align-self: start;
  }
}

@media (min-width: 576px) {
  .hm-grid > .hm-card > .hm-card-foot {
    grid-row: 4;
    align-self: end;
    margin-top: 0;
  }
}

/* the pills always on one line on the cards (the Path view's narrower cards may still wrap them) */

.hm-grid > .hm-card > .hm-counts {
  flex-wrap: nowrap;
}

/* the bars all the same length: segments share the width, and the "n of n pages" text has a fixed width */

.hm-meter li {
  max-width: none;
}

.hm-meter-text {
  min-width: 6.4rem;
  text-align: right;
}

.hm-progress--one .hm-meter {
  flex: 1 1 auto;
  width: auto;
  min-width: 40px;
}

.hm-meter-text--one {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 72%;
  text-align: right;
}

/* the narrowest phones: slightly tighter pills, so four still fit on one line */

@media (max-width: 359.98px) {
  .hm-counts {
    gap: 4px;
  }
}

@media (max-width: 359.98px) {
  .hm-counts .hm-pill {
    padding: 2px 6px;
  }
}

@media (min-width: 576px) {
  .hm-grid:not(.hm-grid--start) {
    grid-template-columns: repeat(auto-fill, minmax(max(280px, calc((100% - 42px) / 4)), 1fr));
  }
}

.hm-grid > .hm-card > .hm-counts {
  flex-wrap: wrap;
}

.hm-ogrp {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

@media (max-width: 575.98px) {
  .hm-order {
    row-gap: 6px;
  }
}

.hm-dialog .hm-pickgrid {
  gap: 6px;
}

.hm-dialog .hm-pickgrid .hm-pick {
  min-height: 32px;
  padding: 3px 11px !important;
  font-size: 0.88rem;
}

.hm-dialog .hm-teacher {
  padding: 8px 10px;
}

.hm-dialog .hm-teacher-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0;
}

.hm-dialog .hm-teacher-q {
  flex-basis: 100%;
}

.hm-dialog .hm-teacher-list label.hm-check {
  min-height: 30px;
  padding: 2px 10px 2px 8px;
  border: 1.5px dashed var(--hm-line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.86rem;
  font-weight: 400;
  gap: 6px;
}

.hm-dialog .hm-teacher-list label.hm-check input {
  width: 16px;
  height: 16px;
}

.hm-dialog .hm-teacher-list label.hm-check:has(input:checked) {
  border-style: solid;
  border-color: var(--hm-navy);
  background: var(--hm-navy-soft);
}

.hm-dialog .hm-helper-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  margin: 0;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--hm-navy-soft);
  font-size: 0.88rem;
}

.hm-can-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px dashed var(--hm-navy-line);
  border-radius: 10px;
}

.hm-can-tabs-k, .hm-can-more-note {
  color: var(--hm-muted);
  font-size: 0.86rem;
}

.hm-can-tab {
  min-width: 40px;
  min-height: 34px;
  padding: 4px 10px;
  border: 1.5px solid #c9cee0;
  border-radius: 999px;
  background: #fff;
  color: #25242f;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.hm-can-tab[aria-pressed="true"] {
  border-color: #394362;
  background: #394362;
  color: #fff;
}

.hm-can-tabs .hm-btn--save {
  margin-left: auto;
}

.hm-dialog-body {
  padding: 6px !important;
  margin: 0 -4px;
}

.hm-dialog .hm-dialog-title:focus, .hm-dialog .hm-dialog-title:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* rs-home.css v1.6 (28 Nov 2026): Exam board order in the A-level layout (headings, short cards, side panel, support card) */

.hm-spec-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

@media (min-width: 1280px) {
  .hm-spec-wrap {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

@media (min-width: 1600px) {
  .hm-spec-wrap {
    grid-template-columns: minmax(0, 1fr) 380px;
  }
}

.hm-spec-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.hm-spec-group {
  padding: 14px;
  border-radius: 12px;
  background: #f7f8fb;
}

.hm-spec-h {
  margin: 0 0 12px;
  font-size: 1.08rem;
  color: #121643;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.hm-spec-num {
  font-weight: 800;
}

.hm-spec-note {
  font-size: .84rem;
  font-weight: 400;
  color: #4c5166;
}

.hm-spec-side {
  display: none;
}

/* the whole side column is sticky; rs-home sets its top as the page scrolls so the panel and the support card both stay reachable */

@media (min-width: 1280px) {
  .hm-spec-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: calc(var(--rs-nav-h, 70px) + 12px);
    align-self: start;
  }
}

/* quiz and revision sheet buttons side by side, sharing the row */

.hm-p2-acts {
  flex-wrap: nowrap;
}

.hm-p2-acts > * {
  flex: 1 1 auto;
  min-width: 0;
}

.hm-p2-acts .hm-quiz, .hm-p2-acts .hm-sheet, .hm-p2-acts .rs-dd > button, .hm-p2-acts .rs-dd > a {
  width: 100%;
  justify-content: center;
  white-space: nowrap;
  padding-left: 10px;
  padding-right: 10px;
  gap: 6px;
}

@media (max-width: 1599.98px) {
  .hm-p2-acts .hm-quiz, .hm-p2-acts .hm-sheet {
    font-size: .86rem;
    padding-left: 8px;
    padding-right: 8px;
  }
}

@media (max-width: 1599.98px) {
  .hm-p2-acts {
    gap: 6px;
  }
}

.hm-spec-pick {
  padding: 16px 18px;
  border: 1px dashed #c9ccd6;
  border-radius: 10px;
  color: #5a5f73;
  background: #fff;
}

.hm-spec-pick p {
  margin: 0;
}

.hm-panel--side {
  margin: 0 !important;
}

.hm-panel--side::before {
  display: none !important;
}

@media (min-width: 576px) {
  .hm-spec-main .hm-grid:not(.hm-grid--start) {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

/* v1.6c: A-level style cards, panel and support card (exam board order) */

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

/* titles and pills on one line: three cards a row (the page has a maximum width, so never four), two on tablets, one on phones */

@media (max-width: 991.98px) {
  .hm-c2-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 659.98px) {
  .hm-c2-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hm-c2 {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  background: #fff;
  border: 1.5px solid var(--hm-t-line, #d6d9e2);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--hm-t-acc, #3d4670);
  font-family: inherit;
  transition: background-color 120ms ease, transform 120ms ease;
}

/* no page ready yet: dashed grey, grey words, a black and white emoji; still opens to show what is coming */

.hm-c2.is-later {
  border: 1.5px dashed #a9adba;
  box-shadow: 3px 3px 0 #c9ccd6;
}

.hm-c2.is-later .hm-c2-t, .hm-c2.is-later .hm-c2-ref {
  color: #7a7f8f;
}

.hm-c2.is-later .hm-c2-ic {
  filter: grayscale(1);
  opacity: .65;
}

/* the open card fills with its colour */

.hm-c2.is-open {
  background: var(--hm-t, #eef0f6);
  border-width: 2px;
  border-color: var(--hm-t-acc, #3d4670);
  padding: 9.5px 11.5px;
}

.hm-c2.is-later.is-open {
  background: #f1f2f5;
}

.hm-c2:hover {
  transform: translateY(-2px);
}

.hm-c2:focus-visible {
  outline: 3px solid #185abc;
  outline-offset: 3px;
}

.hm-c2-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hm-c2-ic {
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1;
}

.hm-c2-t {
  font-family: Lexend, ABeeZee, sans-serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.25;
  color: #25242f;
}

.hm-c2 .hm-counts {
  margin: 0;
  flex-wrap: nowrap;
  gap: 4px;
}

.hm-c2 .hm-counts .hm-pill {
  white-space: nowrap;
  padding: 2px 6px;
  letter-spacing: -0.01em;
}

.hm-c2 .hm-counts {
  gap: 3px;
}

.hm-c2-t {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hm-c2-ref {
  margin-top: auto;
  font-size: 12px;
  color: var(--hm-t-ink, #5a5f73);
}

.hm-spec-group {
  background: #f7f8fb;
}

.hm-c2-inline:not(:empty) {
  margin-top: 12px;
}

/* 30 Nov 2026 (cardpanel): below 1280px a card's pages open straight under the row of the card that was pressed, on both
   menus (RSCardRow in rs-home.js). The panel spans the grid; a notch in the card's colour points at the card, as the
   Cards view's panel does (.hm-grid > .hm-panel::before). From 1280px the side column shows the pages instead. */

.hm-rowpanel {
  grid-column: 1 / -1;
  min-width: 0;
  padding-top: 8px;
}

.hm-rowpanel > .hm-p2::before {
  content: "";
  position: absolute;
  top: -9px;
  left: calc(var(--hm-tab-l, 24px) + var(--hm-tab-w, 40px) / 2 - 8px);
  width: 16px;
  height: 16px;
  border-top: 2px solid var(--hm-t-acc, #3d4670);
  border-left: 2px solid var(--hm-t-acc, #3d4670);
  background: var(--hm-t, #eef0f6);
  transform: rotate(45deg);
}

.hm-rowpanel > .hm-p2 {
  border: 2px solid var(--hm-t-acc, #3d4670);
}

.hm-rowpanel > .hm-p2 > .hm-p2-head {
  border-radius: 8px 8px 0 0;
}

@media (min-width: 1280px) {
  .hm-rowpanel {
    display: none;
  }
}

/* no overflow clipping: the quiz and revision sheet drop-downs must open over the support card (Matthew 22:36) */

.hm-p2 {
  position: relative;
  z-index: 3;
  background: #fff;
  padding: 0;
  border: 1.5px solid var(--hm-t-line, #d6d9e2);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--hm-t-acc, #3d4670);
}

.hm-p2-head {
  display: block;
  padding: 12px 16px;
  background: var(--hm-t, #eef0f6);
  border-radius: 8.5px 8.5px 0 0;
}

.hm-p2-head .hm-p2-title {
  margin: 0;
}

.hm-p2-body {
  padding: 12px 16px 16px;
}

.hm-p2-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hm-p2-ic {
  flex: 0 0 auto;
  font-size: 24px;
  line-height: 1;
}

.hm-p2-title {
  margin: 0 0 8px;
  font-family: Lexend, sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
  color: #121643;
}

.hm-p2-meter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hm-p2-bar {
  flex: 1;
  height: 4px;
  background: #e3e5ec;
  border-radius: 2px;
  overflow: hidden;
}

.hm-p2-bar > span {
  display: block;
  height: 4px;
  background: var(--hm-t-acc, #3d4670);
}

.hm-p2-ready {
  font-size: 13px;
  color: #5a5f73;
  white-space: nowrap;
}

.hm-p2-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.hm-p2-row > a, .hm-p2-row.is-later {
  display: flex;
  flex-wrap: wrap;
  row-gap: 4px;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px dotted #c9ccd6;
  text-decoration: none;
  color: #121643;
  font-size: 15px;
}

.hm-p2-row.is-later {
  color: #8a8fa3;
}

.hm-p2-name {
  flex: 1 1 auto;
  min-width: 0;
}

/* pills and Open drop to a second line, on the right, when they don't fit beside the name (Matthew 22:53) */

.hm-p2-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

.hm-p2-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hm-p2-go {
  font-size: 12px;
  white-space: nowrap;
  color: var(--hm-t-ink, #9c4a32);
}

.hm-p2-row.is-later .hm-p2-go {
  color: #8a8fa3;
}

.hm-p2-acts {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 12px;
}

.hm-s2 {
  background: #fff;
  padding: 0;
  border: 1.5px solid #efd77c;
  border-radius: 10px;
  box-shadow: 3px 3px 0 #000;
  overflow: hidden;
}

.hm-s2-head {
  padding: 15px 18px 14px;
  background: #fffcbd;
}

.hm-s2-head .hm-s2-t {
  margin-bottom: 0;
}

.hm-s2-body {
  padding: 14px 18px 16px;
}

.hm-s2-k {
  margin: 0;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6b5d00;
}

.hm-s2-t {
  margin: 6px 0 10px;
  font-family: Lexend, sans-serif;
  font-weight: 600;
  font-size: 19px;
  line-height: 1.25;
  color: #121643;
}

.hm-s2-p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.5;
  color: #414141;
}

.hm-s2-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin: 0 0 10px;
}

.hm-s2-chips > span {
  padding: 4px 7px;
  border-radius: 7px;
  background: #f1f3f5;
  color: #303030;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.hm-s2-act {
  margin: 0;
  text-align: center;
}

.hm-s2-fb {
  margin: 10px 0 0;
  text-align: center;
  font-size: 13px;
  color: #5a5f73;
}

.hm-p2-acts > .rs-dd {
  display: flex;
  position: relative;
}

.hm-p2-acts .hm-quiz-ico {
  flex-shrink: 0;
}

.hm-c2 {
  padding-left: 10px;
  padding-right: 10px;
}

/* Matthew 20:26: in the panel the quiz button is just its words (no tick, no New/Updated tag); its dropdown list keeps its tags */

.hm-p2-acts .hm-quiz .hm-quiz-ico, .hm-p2-acts .hm-quiz .hm-quiz-tag {
  display: none;
}

/* Support us: the navbar's own button (rs-nav.css #rsMainNav .rs-social-action.rs-support-trigger), centred */

.hm-s2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  color: #202124;
  background: #ffdd00;
  font: 600 14px/1 "ABeeZee", sans-serif;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 4px rgb(0 0 0 / 14%);
  transition: transform 150ms ease, filter 150ms ease, box-shadow 150ms ease;
}

.hm-s2-btn svg {
  width: 20px;
  height: 20px;
}

.hm-s2-btn:hover {
  filter: brightness(1.04);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 7px 14px rgb(0 0 0 / 20%);
  color: #202124;
}

.hm-s2-btn:active {
  transform: translateY(0) scale(0.97);
}

.hm-s2-btn:focus-visible {
  outline: 3px solid #185abc;
  outline-offset: 2px;
}

/* bottom line: the code on the left, the page count on the right */

.hm-c2-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
}

.hm-c2-foot .hm-c2-ref {
  margin-top: 0;
}

.hm-c2-n {
  flex: 0 0 auto;
  font-size: 12px;
  color: #5a5f73;
}

.hm-c2.is-later .hm-c2-n {
  color: #7a7f8f;
}

/* one-page cards: the title is the page's link, stretched over the whole card; Quiz and Revision sheet sit on top of it */

.hm-c2--one {
  position: relative;
  cursor: pointer;
}

.hm-c2--one .hm-c2-link {
  color: #25242f;
  text-decoration: none;
}

.hm-c2--one .hm-c2-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
}

.hm-c2--one:hover .hm-c2-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hm-c2--one:has(.hm-c2-link:focus-visible) {
  outline: 3px solid #185abc;
  outline-offset: 3px;
}

.hm-c2--one .hm-c2-link:focus-visible {
  outline: none;
}

.hm-c2-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.hm-c2-row > .hm-c2-head, .hm-c2-row > .hm-counts {
  flex: 1 1 auto;
  min-width: 0;
}

.hm-c2--one .hm-c2-mini {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}

.hm-c2--one .hm-c2-foot {
  margin-top: auto;
}

.hm-c2-mini {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

/* Open page: the topic's colour; Quiz: the site's quiz navy (as .hm-quiz); Revision sheet: the grey outline (as .hm-sheet) */

.hm-c2-mini--go {
  border: 1.5px solid var(--hm-t-acc, #3d4670);
  background: #fff;
  color: var(--hm-t-ink, #3d4670);
}

.hm-c2-mini--go:hover {
  background: var(--hm-t, #eef0f6);
  color: var(--hm-t-ink, #3d4670);
}

.hm-c2-mini--quiz {
  border: 1.5px solid #4a5577;
  border-radius: 6px;
  background: #4a5577;
  color: #fff;
}

.hm-c2-mini--quiz:hover {
  background: #3a4466;
  border-color: #3a4466;
  color: #fff;
}

.hm-c2-mini--sheet {
  border: 1.5px solid #767c90;
  background: #fff;
  color: var(--hm-ink, #25242f);
}

.hm-c2-mini--sheet:hover {
  border-color: var(--hm-navy, #394362);
  background: var(--hm-soft, #f4f5f9);
  color: var(--hm-ink, #25242f);
}

.hm-c2-mini:focus-visible {
  outline: 3px solid #185abc;
  outline-offset: 2px;
}

/* v1.6i (Matthew 22:32): the quick-route panels in the same card style: a header strip in the tab's colour, soft outline, offset shadow;
   pills on one line; numbers only in Start revising; three a row on wide screens; in Exam board order, grouped under the spec headings */

.hm-panel--route {
  --rc: #4a5577;
  --rl: #b9bfd3;
  --rt: #eef0f6;
  padding: 0;
  border: 1.5px solid var(--rl);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--rc);
  background: #fff;
}

.hm-panel--route-start {
  --rc: #d9572f;
  --rl: #f3b9a5;
  --rt: #fdeee8;
}

.hm-panel--route-calc {
  --rc: #2a8f8c;
  --rl: #a6d8d6;
  --rt: #e6f5f4;
}

.hm-panel--route-prac {
  --rc: #3a9a52;
  --rl: #b3dcbd;
  --rt: #e9f6ec;
}

.hm-panel--route > .hm-panel-head {
  margin: 0;
  padding: 12px 16px;
  background: var(--rt);
  border-radius: 8.5px 8.5px 0 0;
}

.hm-panel--route > .hm-panel-body {
  padding: 12px 16px 16px;
  container-type: inline-size;
}

.hm-panel--route .hm-lead {
  max-width: none;
}

.hm-panel--route .hm-pg {
  border: 1.5px solid #e1e4ec;
  border-radius: 10px;
  min-height: 0;
  padding: 8px 12px;
}

.hm-panel--route .hm-pg:hover {
  border-color: var(--rc);
  background: var(--rt);
}

.hm-panel--route .hm-pg-pills {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
}

.hm-panel--route:not(.hm-panel--route-start) .hm-pg-n {
  display: none;
}

.hm-panel--route:not(.hm-panel--route-start) .hm-pg--ico {
  grid-template-columns: 2rem minmax(0, 1fr) auto .8rem;
}

.hm-route-h {
  margin: 14px 0 8px;
  font-size: 1rem;
  font-weight: 400;
  color: #121643;
}

.hm-route-h:first-child {
  margin-top: 2px;
}

@container (min-width: 1150px) {
  .hm-panel--route .hm-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(var(--rows3), auto);
    grid-auto-flow: column;
  }
}

/* the revision plan inside Start revising, in the same style: soft outline, no heavy gradient border, the heading once */

.hm-panel--route .rp-panel {
  border: 1.5px solid var(--rl);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  margin-bottom: 14px;
}

.hm-panel--route .rp-panel-k {
  display: none;
}

.hm-panel--route .rp-item {
  border: 1.5px solid #e1e4ec;
  border-radius: 10px;
  box-shadow: none;
}

/* the side panel's drop-downs span the panel's width, so they never run off a narrow screen (Matthew 22:50) */

.hm-page .hm-p2-acts {
  position: relative;
}

.hm-page .hm-p2-acts > .rs-dd {
  position: static;
}

.hm-page .hm-p2-acts .rs-dd-menu {
  left: 0;
  right: 0;
  width: auto;
  min-width: 0;
  max-width: none;
}

/* side panel: Chapter quiz and Revision sheet the same height (Matthew 23:56) */

.hm-page .hm-p2-acts .hm-quiz, .hm-page .hm-p2-acts .hm-sheet {
  box-sizing: border-box;
  height: 40px;
  min-height: 40px;
  padding-top: 0;
  padding-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.hm-search-group {
  margin: 10px 4px 4px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #eef1f8;
  color: #121643;
  font-size: 0.9rem;
  font-weight: 800;
}

.hm-search-group:first-child {
  margin-top: 4px;
}

.hm-res-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.hm-res-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1.5px solid #c9d2e3;
  border-radius: 999px;
  background: #fff;
  color: #121643;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.hm-res-chip:hover, .hm-res-chip:focus-visible {
  border-color: #3b4566;
  background: #eef1f8;
}

.hm-res-pages .hm-res-chip.is-extra {
  display: none;
}

.hm-res-pages.is-all .hm-res-chip.is-extra {
  display: inline-flex;
}

.hm-res-more {
  border-style: dashed;
  color: #4a5468;
}

