/*
 * Comera store skin. Loaded AFTER the core's app.css: it re-maps the core's
 * tokens to the Comera Group palette (brand kit final-kit/tokens, same values as
 * www.comeragroup.co.uk) and adds the store's chrome.
 *
 * Every colour pair is COMPUTED, not eyeballed - site-docs/ACCESSIBILITY.md has
 * the ratios and the script. Rules that came from real failures elsewhere:
 *   - gold (#C8892A) is for fills and dark surfaces only; gold TEXT on a light
 *     surface is --gold-ink.
 *   - every button sets an explicit background (ButtonFace bleed-through has
 *     shipped an invisible button twice on other builds).
 */

@font-face { font-family: "Bebas Neue"; font-weight: 400; font-display: swap;
  src: url("../fonts/bebas-neue-400-latin.5853435d21b1.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap;
  src: url("../fonts/barlow-condensed-600-latin.ba4513495282.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap;
  src: url("../fonts/barlow-condensed-700-latin.e1180918b873.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap;
  src: url("../fonts/barlow-400-latin.81419bf5abb5.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap;
  src: url("../fonts/barlow-500-latin.8e986e86d57e.woff2") format("woff2"); }

:root {
  /* Comera Group */
  --navy: #0D1B2A;
  --navy-mid: #162436;
  --steel: #1B4F7A;
  --gold: #C8892A;
  --gold-ink: #8A5A14;
  --off-white: #F4F2EE;
  --grey-600: #5C5954;

  /* The core's tokens, re-mapped */
  --ink: var(--navy);
  --ink-quiet: var(--grey-600);
  --paper: #FFFFFF;
  --paper-alt: var(--off-white);
  --brand: var(--steel);
  --brand-dark: var(--navy);

  --font-display: "Bebas Neue", "Arial Narrow", sans-serif;
  --font-condensed: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --wrap-wide: 76rem;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  background: var(--paper-alt);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
/* Space under the header. #main, not main: .wrap / .wrap-wide set all four paddings and would
   otherwise win. Full-bleed bands (.hero) pull up by the same amount to sit flush. */
main { flex: 1 0 auto; width: 100%; }
#main { --main-top: clamp(2.25rem, 4vw, 3rem); padding-top: var(--main-top); padding-bottom: 3rem; }

h1, h2, h3 { font-family: var(--font-condensed); font-weight: 700; line-height: 1.15; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }

.wrap-wide {
  max-width: var(--wrap-wide);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 48rem) { .wrap-wide { padding: 0 2rem; } }

/* Header */
.store-header { background: var(--navy); color: var(--off-white); }

/* Sticky header (storefront/js/header.js). Narrow screens: the whole header sticks, tucking
   away while scrolling down and returning on scroll up. Wide screens: only the main bar stays -
   the utility row scrolls off (top = minus its height). Anchors and focus land below it. */
.store-header { position: sticky; top: 0; z-index: 40; transition: transform 0.2s ease, box-shadow 0.2s; }
.store-header.is-scrolled { box-shadow: 0 2px 10px rgb(0 0 0 / 0.25); }
.store-header.is-tucked { transform: translateY(-100%); box-shadow: none; }
.store-header.is-peek { transform: translateY(calc(-1 * var(--peek-offset, 0px))); }
html { scroll-padding-top: 1rem; }
@media (min-width: 64rem) {
  .store-header { top: calc(-1 * var(--utility-h, 2.6rem)); }
  .store-header.is-tucked, .store-header.is-peek { transform: none; }
  html { scroll-padding-top: calc(var(--header-h, 7rem) - var(--utility-h, 2.6rem) + 1rem); }
}
@media (prefers-reduced-motion: reduce) { .store-header { transition: none; } }
.store-header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 1.5rem; min-height: 4rem; padding-top: 0.75rem; padding-bottom: 0.75rem;
}
.store-logo { display: inline-flex; padding: 0.5rem 0; }
.store-logo img { display: block; width: 220px; height: auto; max-width: 60vw; }
.store-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.25rem; }
.store-nav a,
.store-nav-button {
  font-family: var(--font-condensed); font-weight: 600; font-size: 1.05rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--off-white); text-decoration: none;
  min-height: 44px; display: inline-flex; align-items: center;
}
.store-nav-button {
  background: var(--navy); border: 0; padding: 0; cursor: pointer;
}
.store-nav a:hover, .store-nav-button:hover { color: var(--gold); }
.store-nav a:focus-visible, .store-nav-button:focus-visible,
.store-logo:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 3px;
}

/* Footer */
.store-footer { background: var(--navy); color: var(--off-white); padding: 2rem 0; }
.store-footer p { margin: 0; }

/* Pieces */
.eyebrow {
  font-family: var(--font-condensed); font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gold-ink); margin: 0 0 0.25rem;
}
.panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; margin: 0 0 1.5rem;
}
.panel > h2:first-child { margin-top: 0; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table + .actions { margin-top: 1.25rem; }
.extend-choice { margin: 0; }
.extend-note { margin: 0.25rem 0 0; font-size: 0.875rem; }
.extend-confirm { margin-top: 1.25rem; }
/* Discount code box on checkout review (orders/discounts.py). */
.discount-box { margin: 1rem 0; }
.discount-form label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.discount-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.discount-row input { max-width: 16rem; text-transform: uppercase; }
.data-table th, .data-table td {
  text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table th { font-family: var(--font-condensed); font-weight: 700; }
@media (max-width: 40rem) {
  /* Stack table rows on phones rather than scrolling the page sideways. */
  .data-table thead { position: absolute; left: -9999px; }
  .data-table tr { display: block; border-bottom: 1px solid var(--line); padding: 0.5rem 0; }
  .data-table td { display: block; border: 0; padding: 0.15rem 0; }
  .data-table td[data-label]::before {
    content: attr(data-label) ": "; font-weight: 500; color: var(--ink-quiet);
  }
}

/* Grant status tags. Text colours are the core's computed ok/warn/error inks. */
.tag {
  display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px;
  font-size: 0.9rem; font-weight: 500; white-space: nowrap;
}
.tag-current { background: var(--ok-bg); color: var(--ok-ink); }
.tag-suspended { background: var(--error-bg); color: var(--error-ink); }

/* Home */
.hero { background: var(--navy); color: var(--off-white); margin: calc(-1 * var(--main-top)) -1.25rem 2rem; padding: 3rem 0; }
.hero h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.6rem, 7vw, 4.2rem);
  letter-spacing: 0.01em; margin: 0 0 0.5rem; }
.hero .eyebrow { color: var(--gold); }
.company-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  list-style: none; padding: 0; }

/* Form fields the core's stylesheet doesn't cover (it styles text/email/password/select). */
form.stack input[type="date"],
form.stack input[type="time"],
form.stack input[type="number"],
form.stack textarea {
  width: 100%; min-height: 44px; padding: 0.5rem 0.65rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); font: inherit;
}
form.stack input[type="date"], form.stack input[type="time"], form.stack input[type="number"] {
  max-width: 14rem;
}
textarea:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
/* "(required)" / "(optional)" beside a label (team feedback, 6 Oct 2026): plain words, not
   colour or an asterisk alone, so everyone can read it. */
/* End-of-journey pages: the next steps as a row of buttons (DEVELOPING.md). */
.next-steps { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 1rem 0 1.5rem; }
.next-steps form { margin: 0; }
.field-mark { font-weight: 400; color: var(--muted-ink, #4a5561); white-space: nowrap; }
/* Searchable dropdown (storefront/js/combobox.js): one box to choose or type. */
.combo { position: relative; }
form.stack .combo-input {
  width: 100%; min-height: 44px; padding: 0.5rem 2.2rem 0.5rem 0.65rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--paper) no-repeat right 0.75rem center / 0.7rem
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23384350'/%3E%3C/svg%3E");
  color: var(--ink); font: inherit;
}
.combo-input:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.combo-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px);
  max-height: min(22rem, 60vh); overflow-y: auto; margin: 0; padding: 0.25rem 0;
  list-style: none; background: var(--paper); border: 1px solid var(--line-strong);
  border-radius: var(--radius); box-shadow: 0 8px 24px rgb(0 0 0 / 0.15);
}
.combo-group {
  padding: 0.5rem 0.75rem 0.25rem; font-family: var(--font-condensed); font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.85rem; color: var(--gold-ink);
}
.combo-option { padding: 0.55rem 0.75rem 0.55rem 1.25rem; cursor: pointer; }
.combo-option.is-active { background: var(--navy); color: var(--off-white); }
.combo-option[aria-selected="true"] { font-weight: 700; }
.combo-empty { padding: 0.55rem 0.75rem; color: var(--muted, #4a5561); }
/* Radio and checkbox lists (Django renders <div><div><label><input> ...). */
form.stack .choice-list label, form.stack [id$="_tutors"] label, form.stack [id$="_visibility"] label {
  display: flex; gap: 0.6rem; align-items: center; font-weight: 400; min-height: 44px; margin: 0;
}
form.stack input[type="checkbox"], form.stack input[type="radio"] {
  width: 1.25rem; height: 1.25rem; accent-color: var(--brand); flex: none;
}
fieldset.form-group { border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.25rem 0.25rem; margin: 0 0 1.5rem; background: var(--paper); }
fieldset.form-group legend { font-family: var(--font-condensed); font-weight: 700;
  font-size: 1.2rem; padding: 0 0.35rem; }
.form-row { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr)); }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 1rem 0; }
.problems { border-left: 4px solid var(--error-ink); background: var(--error-bg);
  color: var(--error-ink); padding: 0.75rem 1rem; margin: 0 0 1.5rem; border-radius: var(--radius); }
.problems ul { margin: 0.25rem 0 0; padding-left: 1.25rem; }
.status { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-weight: 500;
  background: var(--paper-alt); color: var(--ink); border: 1px solid var(--line-strong); }
.status-scheduled { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-bg); }
.status-returned, .status-submitted { background: var(--warn-bg); color: var(--warn-ink);
  border-color: var(--warn-bg); }
.status-cancelled { background: var(--error-bg); color: var(--error-ink); border-color: var(--error-bg); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.25rem; margin: 0; }
.facts dt { font-weight: 500; color: var(--ink-quiet); }
.facts dd { margin: 0; }
.attendance select { min-height: 44px; padding: 0.3rem 0.4rem; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--paper); color: var(--ink); font: inherit; }

/* Certificate verifier result. Colours are the core's computed ok/warn/error pairs. */
.verify-result { border-left: 6px solid var(--line-strong); }
.verify-result h2 { margin-top: 0; }
.verify-valid { border-left-color: var(--ok-ink); }
.verify-valid h2 { color: var(--ok-ink); }
.verify-expired, .verify-awaiting { border-left-color: var(--warn-ink); }
.verify-expired h2, .verify-awaiting h2 { color: var(--warn-ink); }
.verify-revoked, .verify-superseded, .verify-none { border-left-color: var(--error-ink); }
.verify-revoked h2, .verify-superseded h2, .verify-none h2 { color: var(--error-ink); }

/* --- Catalogue --------------------------------------------------------------- */
/* Per-company accents: fills use the brand accent, text uses its -ink token
   (brand kit final-kit/tokens; ink values are the kit's pre-checked AA pairs). */
.accent-comera-movement-science { --accent: #E04A28; --accent-ink: #D5401F; }
.accent-comera-risk { --accent: #E8AB4A; --accent-ink: #8A5C1A; }
.accent-comera-medical-training { --accent: #1E86C9; --accent-ink: #1B7AB7; }

.lead { font-size: 1.15rem; max-width: 46rem; }
.breadcrumb { font-size: 0.95rem; margin-bottom: 0.5rem; }
.course-head .eyebrow { color: var(--accent-ink, var(--gold-ink)); }

.price-switch { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: center;
  margin: 0 0 1.25rem; color: var(--ink-quiet); }
.price strong { font-size: 1.15rem; }
.price-note { color: var(--ink-quiet); font-size: 0.92rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0 0 1.25rem;
  align-items: center; }
.chip { display: inline-flex; gap: 0.4rem; align-items: center; min-height: 36px; padding: 0.2rem 0.75rem;
  border-radius: 999px; background: var(--paper); border: 1px solid var(--line-strong);
  color: var(--ink); text-decoration: none; }
.chip:hover { border-color: var(--brand); }

/* Quick filters (catalogue.Collection) and the slim filter bar (course_list.html). */
.quick-filters ul { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap;
  gap: 0.5rem; }
.quick-filter { display: inline-flex; align-items: center; min-height: 44px; padding: 0.35rem 1rem;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper);
  color: var(--ink); text-decoration: none; font-weight: 600; }
.quick-filter:hover { border-color: var(--navy); }
.quick-filter-icon { flex: none; width: 20px; height: 20px; margin: 0 0.5rem 0 -0.35rem;
  border-radius: 3px; object-fit: contain; }
@media (max-width: 47.99rem) { /* one swipeable row on a phone */
  .quick-filters ul { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.25rem;
    scrollbar-width: thin; }
  .quick-filter { white-space: nowrap; }
}
.quick-filter[aria-current="true"] { background: var(--navy); border-color: var(--navy);
  color: var(--off-white); }
.quick-filter:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.filter-bar { margin: 0 0 1rem; }
.filter-bar[hidden] { display: none; }
.filter-bar:not([hidden]) { animation: filters-open 0.18s ease-out; }
@keyframes filters-open { from { opacity: 0; transform: translateY(-4px); } }
.filter-fields { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: flex-end;
  padding: 0.6rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filter { display: flex; flex-direction: column; gap: 0.15rem; flex: 1 1 9rem; }
.filter label { font-size: 0.85rem; font-weight: 600; color: var(--muted-ink, #4a5561); margin: 0; }
.filter-narrow { flex: 0 1 6rem; }
.filter select, .filter input { min-height: 44px; padding: 0.35rem 0.5rem; font: inherit;
  font-size: 0.95rem; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: var(--radius); width: 100%; }
.filter select:focus-visible, .filter input:focus-visible { outline: 3px solid var(--brand);
  outline-offset: 1px; }
.listing-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.filter-toggle { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--ink);
  font-weight: 600; }
.filter-toggle::after { content: ""; width: 0.45rem; height: 0.45rem; margin-left: 0.1rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform 0.15s; }
.filter-toggle[aria-expanded="true"] { background: var(--navy); border-color: var(--navy);
  color: var(--off-white); }
.filter-toggle[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
/* Results replaced in place (storefront/js/filters.js): dim while loading, fade the new in. */
#results { transition: opacity 0.16s ease, transform 0.16s ease; }
#results.is-leaving { opacity: 0; transform: translateY(-6px); }
#results.is-arriving .chips,
#results.is-arriving .course-grid > li,
#results.is-arriving .course-rows > li,
#results.is-arriving .course-tiles > li,
#results.is-arriving > .panel { animation: result-in 0.32s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 28ms); }
@keyframes result-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  #results, #results *, .filter-bar:not([hidden]) { animation: none !important; transition: none !important; }
}
.filter-toggle[hidden], .filter-apply[hidden] { display: none; } /* .btn's display would win */

/* Cards or list (storefront/_course_row.html): the switch, and rows that are quick to scan. */
.listing-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 0.5rem 1rem; margin: 0 0 0.75rem; }
.listing-count { margin: 0; color: var(--muted-ink, #4a5561); }
.view-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius);
  overflow: hidden; }
.view-switch a { padding: 0.45rem 1rem; min-height: 44px; display: inline-flex; align-items: center;
  text-decoration: none; color: var(--ink); background: var(--paper); font-weight: 600; }
.view-switch a + a { border-left: 1px solid var(--line-strong); }
.view-switch a[aria-current="true"] { background: var(--navy); color: var(--off-white); }
.view-switch a:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.course-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.course-row { display: grid; gap: 0.25rem 1.25rem; align-items: center; padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--line); border-left: 4px solid var(--accent, var(--gold));
  background: var(--paper); grid-template-columns: 1fr; }
.course-row p { margin: 0; }
.course-row-title { font-size: 1.15rem; margin: 0.1rem 0; }
.course-row-price { font-weight: 700; }
.course-row { grid-template-columns: 72px minmax(0, 1fr); }
.course-row > :not(.course-row-thumb) { grid-column: 2; }
.course-row-thumb { grid-row: 1 / span 4; align-self: start; width: 72px; height: 72px;
  border-radius: var(--radius); overflow: hidden; display: block; background: var(--navy); }
.course-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.course-row-thumb span { display: flex; width: 100%; height: 100%; align-items: center;
  justify-content: center; color: var(--off-white); font-family: var(--font-condensed);
  font-weight: 700; font-size: 1.15rem; letter-spacing: 0.04em;
  border-bottom: 4px solid var(--accent, var(--gold)); box-sizing: border-box; }
@media (min-width: 52rem) {
  .course-row { grid-template-columns: 72px minmax(0, 3fr) minmax(0, 1.6fr) minmax(0, 1fr) auto; }
  .course-row > :not(.course-row-thumb) { grid-column: auto; }
  .course-row-thumb { grid-row: auto; }
  .course-row-price { text-align: right; }
}

/* Tiles (on trial): the picture fills the tile; the facts sit on a dark gradient that is at
   least 88% navy wherever there is text, so white text passes AA on ANY photo (worst case, a
   white photo under 88% #0D1B2A: about 13:1). No picture: the brand colour and initials. */
.course-tiles { display: grid; gap: 1rem; list-style: none; padding: 0; margin: 0;
  grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); }
.course-tile { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, #172C44 100%);
  border-bottom: 5px solid var(--accent, var(--gold)); }
.course-tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.course-tile-mark { position: absolute; inset: 0 0 45% 0; display: flex; align-items: center;
  justify-content: center; color: var(--accent, var(--gold)); font-family: var(--font-display);
  font-size: 2.6rem; letter-spacing: 0.05em; opacity: 0.9; }
.course-tile-body { position: absolute; inset: auto 0 0 0; padding: 2.5rem 1rem 0.85rem;
  color: #fff; background: linear-gradient(to top, rgba(13, 27, 42, 0.94) 0%,
  rgba(13, 27, 42, 0.9) 70%, rgba(13, 27, 42, 0) 100%); }
.course-tile-body p { margin: 0; }
.course-tile-brand { font-family: var(--font-condensed); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: #F0C989; }
.course-tile-title { font-size: 1.05rem; line-height: 1.25; margin: 0.15rem 0 0.3rem;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden; } /* two lines at most, so the text never reaches the badge */
.course-tile-title a { color: #fff; text-decoration: none; }
.course-tile-title a::after { content: ""; position: absolute; inset: 0; } /* whole tile is the link */
.course-tile:hover .course-tile-title a, .course-tile-title a:focus-visible { text-decoration: underline; }
.course-tile:focus-within { outline: 3px solid var(--brand); outline-offset: 2px; }
.course-tile-facts { font-size: 0.9rem; display: flex; align-items: baseline; gap: 0.75rem; }
.course-tile-when { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; } /* one line; the full place is on the course page */
.course-tile-price { flex: none; }
.course-tile-price, .course-tile-price * { color: #fff; font-weight: 700; }

.course-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr));
  list-style: none; padding: 0; margin: 0; }
.course-card { background: var(--paper); border: 1px solid var(--line); border-top: 5px solid
  var(--accent, var(--gold)); border-radius: var(--radius); padding: 1rem 1.25rem; display: flex;
  flex-direction: column; }
.course-card-company { margin: 0; font-family: var(--font-condensed); font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.9rem;
  color: var(--accent-ink, var(--gold-ink)); }
.course-card-title { font-size: 1.35rem; margin: 0.25rem 0; }
.course-card-title a { color: var(--ink); text-decoration: none; }
.course-card-title a:hover { text-decoration: underline; }
.course-card-meta { color: var(--ink-quiet); margin: 0 0 0.5rem; }
.next-dates { margin: 0.25rem 0; padding-left: 1.1rem; }
.course-card-price { margin-top: auto; padding-top: 0.5rem; }
.course-card-action { margin: 0.75rem 0 0; }
/* The next step on every card, row and tile (storefront/_course_cta.html). */
.course-card-action form, .course-row-action form, .course-tile-action form { margin: 0; }
.course-row-action .btn { white-space: nowrap; }
/* Tiles: the next step is a chip in the label's place, above the whole-tile link. Badge-sized
   type, but filled, with an arrow and a hover state so it reads as something to press;
   30px tall clears the 24px minimum target (WCAG 2.2 2.5.8). */
.course-tile-action { position: absolute; top: 0.6rem; left: 0.6rem; right: 0.6rem; z-index: 1; }
.course-tile-action .btn { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 30px;
  padding: 0.2rem 0.65rem; border-radius: 3px; border: 1px solid var(--gold); background: var(--gold);
  color: var(--navy); font-family: var(--font-condensed); font-weight: 700; font-size: 0.8rem;
  line-height: 1.2; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.35); cursor: pointer; }
.course-tile-action .btn::after { content: "\2192"; font-size: 0.95rem; transition: transform 0.15s; }
.course-tile-action .btn:hover, .course-tile-action .btn:focus-visible { background: #DDA046;
  border-color: #DDA046; color: var(--navy); }
.course-tile-action .btn:hover::after { transform: translateX(2px); }
.course-tile-action .btn-quiet { background: var(--off-white); border-color: var(--off-white); }
.course-tile-action .btn-quiet:hover, .course-tile-action .btn-quiet:focus-visible { background: #fff;
  border-color: #fff; }

.course-layout { display: grid; gap: 1.5rem; }
/* Dates come first in the page (the main decision), so phones see them straight
   after the title; wide screens move them to the right-hand column. */
@media (min-width: 60rem) {
  .course-layout { grid-template-columns: minmax(0, 1fr) 26rem; align-items: start; }
  .course-buy { grid-column: 2; grid-row: 1; }
  .course-main { grid-column: 1; grid-row: 1; }
}
.prose p { max-width: 42rem; }
.terms-summary { font-size: 0.92rem; color: var(--ink-quiet); border-top: 1px solid var(--line);
  padding-top: 0.75rem; margin-bottom: 0; }
.dates-table .btn { padding: 0.45rem 0.9rem; }

/* Enquiry honeypot: off-screen for people, still in the form for bots. */
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Basket and checkout ---------------------------------------------------------- */
.steps { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; padding: 0;
  margin: 0 0 1rem; counter-reset: step; color: var(--ink-quiet); }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step) ". "; }
.steps li[aria-current="step"] { color: var(--ink); font-weight: 500; text-decoration: underline;
  text-underline-offset: 0.3em; }
.qty { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0 0 0.25rem; }
.qty-btn { min-width: 44px; min-height: 44px; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--paper); color: var(--ink); font: inherit;
  font-size: 1.2rem; cursor: pointer; }
.qty-btn:hover { border-color: var(--brand); }
.qty-value { min-width: 1.5rem; text-align: center; font-weight: 500; }
.basket-total { text-align: right; margin-top: 1rem; }
.basket-total .actions { justify-content: flex-end; }
.added-panel { border-left: 6px solid var(--ok-ink); }
.edit-link { font-family: var(--font-body); font-weight: 400; font-size: 1rem; margin-left: 0.75rem; }
.facts.totals { margin-top: 1rem; }
.check.consent { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0 0 1rem;
  font-weight: 400; }
.check.consent input { margin-top: 0.2rem; }
.org-fields { border-top: 1px solid var(--line); margin-top: 0.75rem; padding-top: 0.5rem; }
.pay-total { font-size: 1.15rem; }
.btn-pay { font-size: 1.15rem; padding: 0.75rem 1.75rem; }
.place-course { font-size: 1.2rem; margin-top: 1.5rem; }
form.stack input[type="text"].narrow { max-width: 14rem; }
/* Organisation fields only when booking for an organisation (CSS only - no script;
   browsers without :has() simply keep showing them). */
fieldset.form-group:has(input[name="buying_as"][value="individual"]:checked) .org-fields { display: none; }

/* --- Shop chrome (2 Oct 2026): utility bar, sector nav, search, footer ------------------ */
.store-utility { background: #08121D; font-size: 0.85rem; }
.store-utility-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1.5rem;
  min-height: 2.1rem; align-items: center; padding-top: 0.2rem; padding-bottom: 0.2rem; }
.utility-account { margin-left: auto; align-items: center; }
.utility-button { background: transparent; border: 0; padding: 0; cursor: pointer; color: #C9CED6;
  font: inherit; font-family: var(--font-condensed); font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; }
.utility-button:hover, .utility-button:focus-visible { color: var(--gold); }
/* No header item ever breaks across two lines. */
.utility-nav a, .sector-nav a, .store-nav a { white-space: nowrap; }
.utility-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.utility-nav a { color: #C9CED6; text-decoration: none; font-family: var(--font-condensed);
  font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.utility-nav a:hover, .utility-nav a:focus-visible { color: var(--gold); }
.sector-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.sector-nav a { color: var(--off-white); text-decoration: none; font-family: var(--font-condensed);
  font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.98rem; }
.sector-nav a:hover, .sector-nav a:focus-visible { color: var(--gold); }
.header-search { display: flex; align-items: stretch; }
.header-search input { min-height: 40px; width: 12rem; max-width: 40vw; padding: 0.3rem 0.6rem;
  border: 1px solid #3A4B60; border-right: 0; border-radius: var(--radius) 0 0 var(--radius);
  background: var(--navy-mid); color: var(--off-white); font: inherit; }
.header-search input::placeholder { color: #9AA6B4; }
.header-search-button { min-height: 40px; padding: 0 0.8rem; border: 1px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0; background: var(--gold); color: var(--navy);
  font-family: var(--font-condensed); font-weight: 700; letter-spacing: 0.04em; cursor: pointer; }
.header-search-button:hover { background: #DDA046; }
.basket-link { display: inline-flex; align-items: center; gap: 0.35rem; }
.basket-count { display: inline-block; min-width: 1.4rem; padding: 0 0.35rem; border-radius: 999px;
  background: var(--gold); color: var(--navy); font-size: 0.85rem; text-align: center; line-height: 1.4rem; }

.footer-grid { display: grid; gap: 1.5rem 2rem; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  padding-bottom: 1.5rem; }
.footer-grid p { margin: 0.75rem 0 0; color: #C9CED6; max-width: 26rem; }
.footer-small { font-size: 0.9rem; }
.footer-heading { font-family: var(--font-condensed); font-size: 1rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 0.5rem; }
.store-footer ul { list-style: none; padding: 0; margin: 0; }
.store-footer li { margin: 0.3rem 0; }
.store-footer a { color: var(--off-white); }
.store-footer a:hover { color: var(--gold); }
.footer-legal { border-top: 1px solid #22344A; padding-top: 1rem; font-size: 0.85rem; color: #9AA6B4; }

/* --- Buttons on dark surfaces --------------------------------------------------------- */
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--navy);
  font-family: var(--font-condensed); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.btn-gold:hover { background: #DDA046; border-color: #DDA046; color: var(--navy); }
.btn-ghost { background: transparent; border-color: var(--off-white); color: var(--off-white);
  font-family: var(--font-condensed); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.btn-ghost:hover { background: var(--off-white); border-color: var(--off-white); color: var(--navy); }

/* --- Home ------------------------------------------------------------------------------ */
.hero-home { padding: 3.5rem 0; background: radial-gradient(ellipse at 20% 0%, #172C44 0%, var(--navy) 60%); }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 60rem) { .hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.hero-home h1 { font-size: clamp(3rem, 8vw, 5.2rem); line-height: 0.95; text-transform: uppercase; }
.hero-accent { color: var(--gold); }
.hero-lead { color: #C9CED6; max-width: 34rem; font-size: 1.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.next-panel { background: rgba(255, 255, 255, 0.04); border: 1px solid #2A3C52; border-radius: var(--radius);
  padding: 1.25rem; }
.next-panel h2 { margin: 0 0 0.5rem; font-size: 0.9rem; }
.next-list { list-style: none; padding: 0; margin: 0; }
.next-list li + li { border-top: 1px solid #22344A; }
.next-list a { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0 0.75rem; padding: 0.7rem 0;
  color: var(--off-white); text-decoration: none; }
.next-list a:hover .next-title, .next-list a:focus-visible .next-title { color: var(--gold); text-decoration: underline; }
.next-date { grid-row: span 2; font-family: var(--font-condensed); text-transform: uppercase; color: #9AA6B4;
  font-size: 0.85rem; letter-spacing: 0.04em; }
.next-date strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.9rem;
  color: var(--off-white); line-height: 1; letter-spacing: 0.02em; }
.next-title { font-weight: 500; line-height: 1.3; }
.next-meta { color: #9AA6B4; font-size: 0.9rem; }
.next-all { color: var(--gold); font-family: var(--font-condensed); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; text-decoration: none; }
.home-section { margin: 3rem 0; }
.section-title { font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: 0.02em; margin: 0 0 0.5rem; }
.why-grid { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); }
.why-grid li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.why-grid h3 { margin: 0 0 0.4rem; font-size: 1.2rem; }
.why-grid p { margin: 0; color: var(--ink-quiet); }
.cta-band { background: var(--navy); color: var(--off-white); border-radius: var(--radius); padding: 2rem;
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; margin: 3rem 0 1rem; }
.cta-band h2 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 0.25rem; letter-spacing: 0.02em; }
.cta-band p { margin: 0; color: #C9CED6; max-width: 40rem; }
.cta-band .eyebrow { color: var(--gold); }

/* --- Course cards: picture, badge ---------------------------------------------------------- */
.course-card { padding: 0; overflow: hidden; }
.course-card-body { padding: 1rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.course-card-media { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--navy-mid); }
.course-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.course-card-placeholder { display: flex; height: 100%; align-items: center; justify-content: center;
  color: var(--off-white); font-family: var(--font-display); font-size: 1.8rem; letter-spacing: 0.03em;
  text-transform: uppercase; padding: 1rem; text-align: center;
  background: linear-gradient(135deg, var(--navy) 0%, #1B3350 100%); }
.badge { position: absolute; top: 0.6rem; left: 0.6rem; padding: 0.15rem 0.55rem; border-radius: 3px;
  background: var(--navy); color: var(--off-white); font-family: var(--font-condensed); font-weight: 700;
  font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
.badge-book, .badge-elearning, .badge-partner { background: var(--gold); color: var(--navy); }
.course-card-summary { color: var(--ink-quiet); margin: 0 0 0.5rem; }
.price-poa { color: var(--ink-quiet); font-weight: 500; }
.course-hero-image { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius);
  margin-bottom: 1rem; display: block; }

/* One row on laptop widths: logo, sectors, search, account. */
@media (min-width: 64rem) {
  .store-header-inner { flex-wrap: nowrap; gap: 1rem; }
  .store-logo img { width: 180px; }
  .sector-nav { gap: 0.25rem 0.9rem; margin-right: auto; }
  .header-search input { width: 9.5rem; }
  .store-nav { flex-wrap: nowrap; gap: 0.25rem 1rem; }
}

/* "Added to your basket" after adding from a course list (storefront/js/filters.js). */
.added-toast { position: fixed; z-index: 50; left: 50%; bottom: 1rem; transform: translateX(-50%);
  width: min(28rem, calc(100% - 2rem)); padding: 0.85rem 1rem; border-radius: var(--radius);
  background: var(--navy); color: var(--off-white); box-shadow: 0 6px 24px rgb(0 0 0 / 0.3);
  animation: toast-in 0.2s ease-out; }
.added-toast[hidden] { display: none; }
.added-toast p { margin: 0; }
.added-toast .actions { margin-top: 0.6rem; display: flex; gap: 1rem; align-items: center; }
.added-toast a:not(.btn) { color: var(--off-white); }
.added-toast .btn { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.added-toast.is-error { background: #7A1E14; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (prefers-reduced-motion: reduce) { .added-toast { animation: none; } }
.skip-link:focus { z-index: 60; } /* above the sticky header */
/* Focus rings on dark grounds: the default blue ring is too faint on navy (accessibility check,
   8 Oct 2026) - gold, as the header uses. */
.course-tile-action .btn:focus-visible, .added-toast a:focus-visible,
.added-toast .btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* A button that reads as a link - "Remove" on a course's Tutors panel (12 Oct 2026). */
.link-button {
  background: transparent; border: 0; padding: 0.25rem 0; cursor: pointer;
  font: inherit; color: var(--steel); text-decoration: underline; min-height: 44px;
}
.link-button:hover { color: var(--navy); }
.link-button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Home: "Select your sector" in the hero, next dates below it (meeting, 12 Oct 2026, W2). */
.sector-pick { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.sector-pick a { display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.75rem 1rem; min-height: 44px; border-left: 4px solid var(--accent, var(--gold));
  border-radius: var(--radius); background: rgba(255, 255, 255, 0.04); color: var(--off-white);
  text-decoration: none; }
.sector-pick a:hover, .sector-pick a:focus-visible { background: rgba(255, 255, 255, 0.1); }
.sector-pick a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sector-pick-company { display: block; font-family: var(--font-condensed); text-transform: uppercase;
  letter-spacing: 0.06em; font-size: 0.8rem; color: #9AA6B4; }
.sector-pick-name { display: block; font-family: var(--font-display); font-size: 1.45rem; line-height: 1.15;
  text-transform: uppercase; letter-spacing: 0.02em; }
.sector-pick-count { color: #C9CED6; font-size: 0.9rem; white-space: nowrap; }
.next-list-light { display: grid; gap: 0 2rem; }
@media (min-width: 48rem) { .next-list-light { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.next-list-light li, .next-list-light li + li { border-top: 1px solid var(--line); }
.next-list-light a { color: var(--ink); }
.next-list-light .next-date, .next-list-light .next-meta { color: var(--ink-quiet); }
.next-list-light .next-date strong { color: var(--ink); }
.next-list-light a:hover .next-title, .next-list-light a:focus-visible .next-title { color: var(--ink); }
.next-all-light { color: var(--gold-ink); }
