/* =============================================================
   Guide blocks — Step, Callout, Video
   Appended by inc/blocks.php via enqueue_style, so these styles
   only load on pages that actually use a block.

   All values come from the tokens in style.css :root. The three
   callout tints are the only additions; they are derived from
   existing hues at ~6% saturation over the page background.
   ============================================================= */

/* Editor-only hint shown when a block has no content yet. */
.mlv-block-hint{
  margin:0;padding:var(--space-sm);
  border:1px dashed var(--color-line);
  border-radius:var(--radius-sm);
  color:var(--color-muted);
  font-size:var(--fs-small);
}

/* Visually hidden, but read by screen readers — carries the step
   number into the heading so "Step 2: Do the tests" is announced. */
.screen-reader-text{
  position:absolute!important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

/* ============================================================
   BLOCK: Step  (.mlv-step)
   Used by: "Step 1–4" guides (8 langs) AND the [0]–[8] eVisa
   guides (3 langs). ~59 instances.

   A left rail carries the sequence: numbered disc + connecting
   line. No card around each step — 5–9 stacked cards would be
   heavier than the content deserves, and the rail communicates
   "ordered, connected, N of them" at a glance, which matters
   for readers who aren't fluent in English.
   ============================================================ */
.mlv-steps{ margin:var(--space-lg) 0; }

.mlv-step{
  position:relative;
  display:grid;
  grid-template-columns:3rem 1fr;
  gap:var(--space-md);
  padding-bottom:var(--space-lg);
}
.mlv-step:last-child{ padding-bottom:0 }

/* the connecting line */
.mlv-step::before{
  content:"";
  position:absolute;
  left:1.5rem;
  top:3rem;
  bottom:0;
  width:2px;
  transform:translateX(-1px);
  background:var(--color-line);
}
.mlv-step:last-child::before{ display:none }

.mlv-step__marker{
  width:3rem;height:3rem;
  display:grid;place-items:center;
  border-radius:50%;
  background:var(--color-surface);
  border:2px solid var(--color-primary-bright);
  color:var(--color-primary-bright);
  font-family:var(--font-display);
  font-weight:700;
  font-size:1.125rem;
  line-height:1;
  position:relative;
  z-index:1;
}

.mlv-step__body{ min-width:0; padding-top:.35rem }

.mlv-step__title{
  font-family:var(--font-display);
  font-weight:700;
  font-size:var(--fs-h3);
  line-height:var(--lh-snug);
  margin:0 0 var(--space-xs);
  color:var(--color-ink);
}
.mlv-step__content > :first-child{ margin-top:0 }
.mlv-step__content > :last-child{ margin-bottom:0 }
.mlv-step__content p{ margin:0 0 var(--space-sm) }
.mlv-step__content ul{ margin:0 0 var(--space-sm); padding-left:1.25rem }
.mlv-step__content li{ margin-bottom:.35rem }
.mlv-step__content a{ color:var(--color-primary); text-underline-offset:2px }

/* screenshot inside a step — framed so a gov.uk screengrab
   reads as "a picture of another website", not as our page */
.mlv-step__figure{ margin:var(--space-md) 0 0 }
.mlv-step__figure img{
  display:block;width:100%;height:auto;
  border:1px solid var(--color-line);
  border-radius:var(--radius-md);
  background:var(--color-surface-gray);
  box-shadow:var(--shadow-sm);
}
.mlv-step__caption{
  font-size:var(--fs-small);
  color:var(--color-muted);
  margin-top:var(--space-xs);
}

/* ---- click-to-load video facade (used inside a Step, and by
   the standalone Video block). No YouTube JS or cookies load
   until the visitor actually clicks play. ---- */
.mlv-embed{ margin:var(--space-md) 0 0 }
.mlv-embed__frame{
  position:relative;
  aspect-ratio:16/9;
  border-radius:var(--radius-md);
  overflow:hidden;
  background:#2f3131;
  box-shadow:var(--shadow-sm);
}
.mlv-embed__frame iframe{ position:absolute;inset:0;width:100%;height:100%;border:0 }

.mlv-embed__btn{
  position:absolute;inset:0;
  display:grid;place-items:center;
  width:100%;height:100%;
  padding:0;margin:0;border:0;
  background:transparent;
  cursor:pointer;
}
.mlv-embed__thumb{
  position:absolute;inset:0;
  width:100%;height:100%;
  object-fit:cover;
  display:block;
}
.mlv-embed__scrim{
  position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(0,0,0,.15),rgba(0,0,0,.45));
}
.mlv-embed__play{
  position:relative;
  width:4.5rem;height:4.5rem;border-radius:50%;
  background:var(--color-primary-bright);
  display:grid;place-items:center;
  box-shadow:0 4px 18px rgba(0,0,0,.35);
  transition:transform .15s ease;
}
.mlv-embed__btn:hover .mlv-embed__play,
.mlv-embed__btn:focus-visible .mlv-embed__play{ transform:scale(1.06) }
.mlv-embed__btn:focus-visible{ outline:3px solid var(--color-primary-bright); outline-offset:3px }
.mlv-embed__play svg{ width:1.5rem;height:1.5rem;fill:#fff;margin-left:3px }
.mlv-embed__label{
  position:absolute;left:0;right:0;bottom:0;
  padding:var(--space-sm) var(--space-md);
  color:#fff;font-size:var(--fs-small);
  text-align:left;
  text-shadow:0 1px 2px rgba(0,0,0,.5);
}
.mlv-embed__caption{ font-size:var(--fs-small);color:var(--color-muted);margin-top:var(--space-xs) }

@media (max-width:600px){ .mlv-embed__play{ width:3.5rem;height:3.5rem } }

/* =============================================================
   Callout  (.mlv-callout)
   Used by: "Need help?" on every guide, plus warnings and
   confirmations.

   A pill label straddling the top edge of a tinted, outlined
   panel. The pill shape is borrowed from the language switcher
   and the enrol badge, so it reads as part of the same system
   rather than a generic documentation admonition.
   ============================================================= */
.mlv-callout{
  position:relative;
  /* Room for the label to overhang the top edge. */
  margin:2.25rem 0 var(--space-lg);
  padding:var(--space-md);
  border:1.5px solid var(--tone,var(--color-primary-bright));
  border-radius:var(--radius-lg);
  background:var(--tone-bg,#fdf5f5);
}
/* Tints deepened a step. Body text is --color-ink on these, which
   keeps contrast well above 15:1 — comfortably past WCAG AAA, so
   there is no legibility cost. */
.mlv-callout--info   { --tone:#3a5a9b; --tone-bg:#e8eef8 }
.mlv-callout--warning{ --tone:var(--color-primary-bright); --tone-bg:var(--color-primary-wash) }
.mlv-callout--success{ --tone:var(--color-success); --tone-bg:#e7f1ec }

.mlv-callout__title{
  position:absolute;
  top:0;
  left:1.25rem;
  transform:translateY(-50%);
  max-width:calc(100% - 2.5rem);
  margin:0;
  padding:.4rem .85rem;
  border-radius:var(--radius-pill);
  background:var(--tone);
  color:#fff;
  font-family:var(--font-display);
  font-weight:700;
  font-size:var(--fs-small);
  line-height:1.2;
  /* Hungarian and Ukrainian headings run long; wrapping beats
     overflowing the corner. */
  white-space:normal;
  text-wrap:balance;
}

.mlv-callout__content > :first-child{ margin-top:0 }
.mlv-callout__content > :last-child{ margin-bottom:0 }
.mlv-callout__content p{ margin:0 0 var(--space-xs) }
.mlv-callout__content a{ color:var(--tone); font-weight:500 }

/* Label/value rows for phone and email — keeps a number out of a
   sentence, where word order differs by language. */
.mlv-callout__list{ margin:var(--space-sm) 0 0; display:grid; gap:.35rem }
.mlv-callout__row{ display:flex; gap:var(--space-xs); flex-wrap:wrap }
.mlv-callout__label{ color:var(--color-muted); font-size:var(--fs-body); min-width:5.5rem }
.mlv-callout__value{ font-weight:500 }

@media (max-width:480px){
  .mlv-callout__title{ left:1rem; max-width:calc(100% - 2rem) }
}

/* =============================================================
   Plain text and standalone image sections
   ============================================================= */
.mlv-text{ margin:var(--space-md) 0 }
.mlv-text > :first-child{ margin-top:0 }
.mlv-text > :last-child{ margin-bottom:0 }

.mlv-figure{ margin:var(--space-lg) 0 }
.mlv-figure img{
  display:block;width:100%;height:auto;
  border:1px solid var(--color-line);
  border-radius:var(--radius-md);
  background:var(--color-surface-gray);
  box-shadow:var(--shadow-sm);
}

/* =============================================================
   Guide header — title beside the featured image.
   The image previously ran the full container width at 16/9,
   which on a 1280px container is a ~720px-tall banner before a
   single word of the guide. Pairing it with the title keeps the
   reader near the content.
   ============================================================= */
.course-single__head--split{
  display:grid;
  grid-template-columns:1fr;
  gap:var(--space-md);
  align-items:center;
  margin-bottom:var(--space-lg);
}
@media (min-width:860px){
  /* Near-equal columns. With the smaller --fs-title the heading no
     longer needs the extra width, so the image gets closer to half —
     it was reading as a thumbnail rather than a lead image. */
  .course-single__head--split{ grid-template-columns:1fr 1fr; gap:var(--space-lg) }
}
.course-single__headText > :first-child{ margin-top:0 }
.course-single__headText > :last-child{ margin-bottom:0 }
/* Back-link now sits above the header grid. */
.course-single__head--split{ margin-top:var(--space-sm) }
.course-single__head--split .course-single__media{
  margin:0;
  /* 3:2 suits landscape photography better than 4:3 and gives more
     height at the same width. */
  aspect-ratio:3/2;
  max-height:400px;
  border-radius:var(--radius-lg);
  overflow:hidden;
}
.course-single__head--split .course-single__media img{
  display:block;width:100%;height:100%;object-fit:cover;
}

/* =============================================================
   Admin: the Guide content builder.
   Flexible Content renders in a normal meta box, so these are
   light touches rather than layout surgery.
   ============================================================= */
.acf-flexible-content .layout{ border-radius:8px }
.acf-flexible-content .acf-fc-layout-handle{
  font-weight:600;
  letter-spacing:.01em;
}
.acf-flexible-content .acf-image-uploader img{
  max-width:120px;height:auto;border-radius:6px;
}

/* =============================================================
   Defensive sizing: the guide body carries site-wide image
   rules, so state these explicitly rather than relying on
   cascade order.
   ============================================================= */
.mlv-embed__thumb{
  max-width:none;
  width:100%;
  height:100%;
  margin:0;
  border:0;
  border-radius:0;
  box-shadow:none;
}
.mlv-step__figure img,
.mlv-figure img{ max-width:100%; margin:0 }

/* =============================================================
   Corrections against site-wide rules in main.css
   ============================================================= */

/* .course-single__content h2 sets a 2.5rem top margin, which
   outranks .mlv-step__title and pushes the heading down while
   the numbered marker stays put — so the number appears to sit
   above its own step. Match the specificity and reset it. */
.course-single__content .mlv-step__title,
.post-single__content .mlv-step__title{ margin-top:0 }

/* Step screenshots: cap the width. Full content width is too
   dominant for a UI screengrab, and the guides that use them
   carry nine or ten in a row. Wide enough to read a gov.uk
   form, narrow enough to scroll past. */
.mlv-step__figure{ max-width:min(620px,100%) }
.mlv-figure{ max-width:min(720px,100%) }

/* Tall images (phone / app-store screenshots, height >= 1.3x width):
   a narrower frame so one screenshot doesn't fill the screen. The
   --tall class is added by template-parts/guide-blocks.php. */
.mlv-step__figure--tall{ max-width:min(340px,100%) }
.mlv-figure--tall{ max-width:min(360px,100%) }

/* =============================================================
   Tables inside a Text section — e.g. the CEFR comparison on
   the Functional Skills guide. Framed as a card so it reads as
   a discrete reference rather than loose columns of text.
   ============================================================= */
.mlv-text table,
.mlv-table table{
  width:100%;
  margin:var(--space-md) 0;
  border-collapse:separate;
  border-spacing:0;
  font-size:var(--fs-body);
  background:var(--color-surface);
  border:1px solid var(--color-line);
  border-radius:var(--radius-md);
  overflow:hidden;
  box-shadow:var(--shadow-sm);
}
.mlv-text th,
.mlv-text td,
.mlv-table th,
.mlv-table td{
  padding:.65rem .9rem;
  text-align:left;
  vertical-align:top;
  border-bottom:1px solid var(--color-line-subtle);
}
.mlv-text thead th,
.mlv-table thead th{
  background:var(--color-surface-gray);
  font-family:var(--font-display);
  font-weight:700;
  font-size:var(--fs-small);
  letter-spacing:.01em;
  color:var(--color-ink);
  border-bottom:1px solid var(--color-line);
}
.mlv-text tbody tr:last-child td,
.mlv-table tbody tr:last-child td{ border-bottom:0 }
.mlv-text tbody tr:nth-child(even) td,
.mlv-table tbody tr:nth-child(even) td{ background:rgba(0,0,0,.015) }
/* First column carries the row's subject, so give it weight. */
.mlv-text tbody td:first-child,
.mlv-table tbody td:first-child{ font-weight:500 }

@media (max-width:600px){
  .mlv-text th,
  .mlv-text td,
  .mlv-table th,
  .mlv-table td{ padding:.5rem .6rem; font-size:var(--fs-small) }
}

/* =============================================================
   Admin: the Guide content builder.
   Loaded on the Guide edit screen by maclav_guide_admin_styles().
   ============================================================= */

/* A modest floor only. An earlier version set 520px here, from
   when a whole guide lived in one Text section; now that guides
   are split into small sections that is far too tall — and
   min-height also stops ACF's drag handle (bottom-right of each
   editor) shrinking the box. Keep the floor low and let the
   handle do the rest. */
.acf-field[data-name="content"] .acf-editor-wrap iframe,
.acf-field[data-name="content"] .acf-editor-wrap textarea,
.acf-field[data-name="content"] .acf-editor-wrap.delay iframe{
  min-height:150px;
}

/* Section headers: make the layout name and order easy to scan
   when a guide has a dozen sections. */
.acf-flexible-content .layout .acf-fc-layout-handle{
  font-weight:600;
  padding-block:.6rem;
}
.acf-flexible-content .layout .acf-fc-layout-order{
  background:var(--color-primary-bright,#c61d23);
  color:#fff;
}

/* Table section wrapper: allow sideways scroll on narrow screens
   rather than squeezing columns into unreadable slivers. */
.mlv-table{ margin:var(--space-lg) 0; max-width:100%; overflow-x:auto }
.mlv-table table{ min-width:min(34rem,100%) }

/* =============================================================
   Page sections — Text + image split
   Used by the "Page with sections" template (About Us and
   similar). The floating card reuses the frosted-glass
   treatment from .hero__trust on the homepage, so the two read
   as the same device rather than two different cards.
   ============================================================= */

.mlv-section__title{
  font-family:var(--font-display);
  font-weight:700;
  font-size:var(--fs-h2);
  line-height:var(--lh-snug);
  margin:0 0 var(--space-sm);
  color:var(--color-ink);
  text-wrap:balance;
}

.mlv-split{
  display:grid;
  grid-template-columns:1fr;
  gap:var(--space-md);
  align-items:center;
  margin:var(--space-lg) 0;
}
@media (min-width:860px){
  .mlv-split{ grid-template-columns:1fr 1fr; gap:var(--space-lg) }
  /* Flip puts the image first in the visual order while leaving the
     text first in the DOM — so a screen reader and a keyboard user
     still meet the heading before the picture. */
  .mlv-split--flip .mlv-split__text{ order:2 }
  .mlv-split--flip .mlv-split__media{ order:1 }
}
.mlv-split--noimage{ grid-template-columns:1fr }

/* Below the two-column breakpoint, sections carrying a name card put the
   photo first: the image and card together read as the heading. Above it
   the grid handles order, so this only applies while stacked. */
@media (max-width:859px){
  .mlv-split--hascard .mlv-split__media{ order:1 }
  .mlv-split--hascard .mlv-split__text{ order:2 }
  /* A little more room between the card and the bio that follows. */
  .mlv-split--hascard .mlv-split__media{ margin-bottom:var(--space-xs) }
}

/* Boxed variant: a subtle panel per section. With several bios in a
   row this gives each one an edge to sit against, so the page reads as
   a set of people rather than a column of loose text. */
.mlv-split--boxed{
  padding:var(--space-md);
  background:var(--color-surface);
  border:1px solid var(--color-line);
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow-sm);
  margin:var(--space-md) 0;
}
@media (min-width:860px){
  .mlv-split--boxed{ padding:var(--space-lg) }
}
/* Inside a panel the image keeps a lighter shadow — two heavy shadows
   stacked reads as a mistake rather than depth. */
.mlv-split--boxed .mlv-split__figure{ box-shadow:var(--shadow-sm) }
.mlv-split--boxed .mlv-split__media::before{ display:none }

.mlv-split__text > :first-child{ margin-top:0 }
.mlv-split__text > :last-child{ margin-bottom:0 }
.mlv-split__text{ line-height:1.75 }
.mlv-split__text p{ margin:0 0 var(--space-sm) }
.mlv-split__text a{ color:var(--color-primary); text-underline-offset:2px }

.mlv-split__media{ position:relative }
.mlv-split__figure{
  margin:0;
  border-radius:var(--radius-xl);
  overflow:hidden;
  box-shadow:var(--shadow-lg);
}
.mlv-split__figure img{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:4/3;
  object-fit:cover;
  /* 20 Nov: crop from near the top rather than the centre, so heads in
     staff portraits (About Us) aren't cut off. Landscape photos are
     barely affected. */
  object-position:50% 20%;
  max-width:none;
}

/* Soft brand accent behind the image, as on the homepage hero. */
.mlv-split__media::before{
  content:"";
  position:absolute;
  inset:auto -6% -8% auto;
  width:55%;
  aspect-ratio:1;
  background:radial-gradient(circle, rgba(159,0,18,.08), transparent 70%);
  z-index:-1;
}

/* Floating name/role card */
.mlv-split__card{
  position:absolute;
  left:1rem;
  bottom:1rem;
  max-width:min(18rem,calc(100% - 2rem));
  padding:.9rem 1.1rem;
  background:rgba(255,255,255,.55);
  -webkit-backdrop-filter:blur(16px) saturate(140%);
  backdrop-filter:blur(16px) saturate(140%);
  border:1px solid rgba(255,255,255,.45);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-lg);
}
.mlv-split__card-name{
  display:block;
  font-family:var(--font-display);
  font-weight:700;
  font-size:1rem;
  line-height:1.2;
  color:var(--color-ink);
}
.mlv-split__card-role{
  display:block;
  margin-top:.15rem;
  font-size:var(--fs-small);
  line-height:1.4;
  color:var(--color-primary);
  font-weight:500;
}

/* Browsers without backdrop-filter get a solid panel rather than a
   washed-out one that makes the text unreadable. */
@supports not (backdrop-filter: blur(1px)){
  .mlv-split__card{ background:rgba(255,255,255,.94) }
}

@media (max-width:600px){
  .mlv-split__card{ left:.75rem; bottom:.75rem; padding:.7rem .9rem }
  .mlv-split__card-name{ font-size:.9375rem }
}

/* =============================================================
   Contact Form 7 — card container and the required-field note.
   The field vocabulary (.cf-row, .cf-field, .cf-label, .cf-req)
   already lives in main.css; this only adds the surrounding
   panel and the legend above it.
   ============================================================= */
.page-single__content .wpcf7{
  padding:var(--space-md);
  background:var(--color-surface);
  border:1px solid var(--color-line);
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow-sm);
  margin:var(--space-lg) 0;
}
@media (min-width:860px){
  .page-single__content .wpcf7{ padding:var(--space-lg) }
}

/* "Fields marked * are required." — the key an asterisk needs in
   order to mean anything. */
.page-single__content .wpcf7 .cf-note{
  margin:0 0 var(--space-md);
  font-size:var(--fs-small);
  color:var(--color-muted);
}

/* The form sits in a panel now, so the response message needs its
   own edge rather than borrowing the page background. */
.page-single__content .wpcf7-response-output{
  border:1px solid var(--color-line);
  background:var(--color-surface-gray);
}

/* Conditional follow-up block (see the cf-conditional module in
   main.js). [hidden] needs an explicit display:none because the
   form rules set display on .cf-field. */
.page-single__content .wpcf7 .cf-conditional[hidden]{ display:none }
.page-single__content .wpcf7 .cf-conditional{ margin-bottom:var(--space-md) }

/* -------------------------------------------------------------
   Row alignment.

   main.css sets `align-items: end` on .cf-row, so the two cells
   bottom-align — which keeps the inputs level when one label
   wraps to two lines. But a validation message under one field
   makes that cell taller, and its neighbour gets pushed down to
   keep the bottoms level.

   Top-aligning fixes that, at the cost of the original benefit.
   Subgrid gets both: label, input and message each occupy their
   own row, shared across the whole .cf-row, so every part lines
   up regardless of wrapping or messages. The start-alignment
   below is the fallback for browsers without subgrid.
   ------------------------------------------------------------- */
.page-single__content .wpcf7 .cf-row{ align-items:start }

@supports (grid-template-rows: subgrid){
  .page-single__content .wpcf7 .cf-row{
    grid-template-rows:auto auto auto;
    align-items:stretch;
  }
  .page-single__content .wpcf7 .cf-row > .cf-field{
    display:grid;
    grid-row:span 3;
    grid-template-rows:subgrid;
    gap:0;
  }
}

/* =============================================================
   Enrol page — registration form beside the intro, and the
   Apply by / Next intake facts.
   ============================================================= */

/* main.css grids the intro at 1.1fr 0.9fr from 900px, centred —
   sized for a photo. A form needs more width than the copy does.
   Breakpoint matches main.css so there is no gap between them.
   20 Nov: the intro column is centred against the form, so when the
   copy is shorter than the form (dates/towns switched off) the spare
   space splits above and below it instead of sitting underneath.
   The form itself stays top-aligned, and when the copy is the taller
   of the two, centring has no effect. */
@media (min-width:900px){
  .enrol-intro.has-form .enrol-intro__inner{
    grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);
    align-items:start;
  }
  .enrol-intro.has-form .enrol-intro__body{ align-self:center }

  /* 20 Nov: a little more air between title, accent line, intro text
     and notice, so the shorter column fills more of the height beside
     the form. Enrol page only, desktop only. */
  .enrol-intro.has-form .enrol-intro__title{ margin-bottom:2.25rem }
  .enrol-intro.has-form .enrol-intro__title::after{ margin-top:var(--space-md) }
  .enrol-intro.has-form .enrol-intro__notice.mlv-callout:has(.mlv-callout__title){ margin-top:3rem }
}
/* The form stays in view while the course information scrolls past,
   just below the sticky site header (72px, main.css). When the form
   is taller than the window, main.js lowers this offset so the form
   scrolls up until Submit is in view and stops there. */
@media (min-width:1200px){
  .enrol-intro.has-form .enrol-form{ position:sticky; top:calc(72px + var(--space-sm)) }
}

/* Apply by / Next intake. Label above value: the label is the
   constant and the date is what changes, so the eye lands on the
   part that matters. */
.enrol-facts{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:var(--space-sm);
  max-width:32rem;
  margin:var(--space-md) 0 0;
  padding:0;
  list-style:none;
}
.enrol-facts__item{
  background:var(--color-surface);
  border:1px solid var(--color-line);
  border-radius:var(--radius-md);
  box-shadow:var(--shadow-sm);
  padding:.85rem 1.1rem;
}
.enrol-facts__label{
  display:block;
  font-size:var(--fs-small);
  color:var(--color-muted);
  margin-bottom:.15rem;
}
.enrol-facts__value{
  display:block;
  font-family:var(--font-display);
  font-weight:700;
  font-size:1.25rem;
  line-height:1.15;
  color:var(--color-ink);
}
/* The deadline is the date that carries urgency. */
.enrol-facts__value--urgent{ color:var(--color-primary) }

@media (max-width:420px){
  .enrol-facts{ grid-template-columns:1fr }
}

/* The form card. Matches the panels used for guide callouts and
   About Us bios, with a heavier shadow because it is the primary
   action on the page. */
.enrol-form{
  background:var(--color-surface);
  border:1px solid var(--color-line);
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow-lg);
  padding:var(--space-md);
}
@media (min-width:860px){
  .enrol-form{ padding:2rem var(--space-lg) }
}
.enrol-form__head{ margin-bottom:var(--space-sm) }
.enrol-form__heading{
  font-family:var(--font-display);
  font-weight:700;
  font-size:var(--fs-h2);
  line-height:var(--lh-snug);
  margin:0;
  color:var(--color-ink);
}
.enrol-form__intro{
  margin:.35rem 0 0;
  color:var(--color-muted);
  font-size:var(--fs-small);
  line-height:1.5;
}

/* The form styling in main.css is scoped to .page-single__content,
   which this template does not use. Repeat the field rules here so
   the form looks the same wherever it appears. */
.enrol-form .cf-note{ margin:0 0 .75rem; font-size:var(--fs-small); color:var(--color-muted) }
.enrol-form .cf-req{ color:var(--color-primary-bright) }
.enrol-form .cf-optional{ color:var(--color-muted); font-weight:400 }
.enrol-form .cf-field{ display:block; margin-bottom:.8rem }
.enrol-form .cf-label{ display:block; font-weight:600; font-size:var(--fs-body); margin-bottom:.3rem }
.enrol-form input[type="text"],
.enrol-form input[type="email"],
.enrol-form input[type="tel"],
.enrol-form select,
.enrol-form textarea{
  width:100%;
  font:inherit;
  font-size:var(--fs-body);
  padding:.6rem .9rem;
  border:1px solid var(--color-line);
  border-radius:var(--radius-sm);
  background:var(--color-surface);
  color:var(--color-ink);
}
.enrol-form select{ text-overflow:ellipsis }
.enrol-form .cf-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  /* 20 Nov: rows a touch tighter (16px -> ~13px). */
  gap:.8rem var(--space-md);
  margin-bottom:.8rem;
  align-items:start;
}
.enrol-form .cf-row .cf-field{ margin-bottom:0 }
/* Stack the pairs only while the card is genuinely narrow. */
@media (max-width:899px){
  .enrol-form .cf-row{ grid-template-columns:1fr }
}
/* A label that wraps to two lines would otherwise push its input
   below its neighbour's. Subgrid gives label, input and message
   their own shared rows. */
@supports (grid-template-rows: subgrid){
  .enrol-form .cf-row{ grid-template-rows:auto auto auto; align-items:stretch }
  .enrol-form .cf-row > .cf-field{
    display:grid; grid-row:span 3; grid-template-rows:subgrid; gap:0;
  }
}
.enrol-form .cf-conditional[hidden]{ display:none }
/* 20 Nov: consent line in small, muted type like the contact form's,
   so on desktop it fits on one line in English. CF7 indents list items
   by 1em by default; removed so the checkbox lines up with the fields. */
.enrol-form .cf-consent{ display:flex; gap:.6rem; align-items:flex-start; margin:.9rem 0; font-size:.8125rem; color:var(--color-muted); line-height:1.5 }
.enrol-form .cf-consent .wpcf7-list-item{ margin:0 }
.enrol-form .cf-consent input[type="checkbox"]{ margin-top:.2rem; flex-shrink:0 }
.enrol-form .cf-consent a{ color:var(--color-primary) }
.enrol-form .cf-submit{ margin:0 }
.enrol-form .cf-submit .btn{ width:100% }
.enrol-form .wpcf7-response-output{
  border:1px solid var(--color-line);
  background:var(--color-surface-gray);
  border-radius:var(--radius-sm);
  margin:var(--space-md) 0 0;
  padding:var(--space-sm);
}

/* -------------------------------------------------------------
   Enrol page — eyebrow as a benefit badge, and the Need help
   panel.
   ------------------------------------------------------------- */

/* "Enrolment open" reads as a status that could one day be false.
   Styled as a pill it carries a benefit instead — change the text
   in the Eyebrow field to something like "100% free · Fully
   funded" and it needs no toggle. */
.enrol-intro .eyebrow{
  display:inline-block;
  padding:.35rem .9rem;
  border-radius:var(--radius-pill);
  background:#fdf1f1;
  color:var(--color-primary);
  font-size:var(--fs-small);
  font-weight:600;
  letter-spacing:0;
  text-transform:none;
  margin-bottom:var(--space-sm);
}

/* Need help: a soft panel rather than loose text at the foot of
   the page, so it reads as a place to turn rather than a
   footnote. */
.enrol-help__inner{
  background:var(--color-soft-blue);
  border-radius:var(--radius-xl);
  padding:var(--space-md);
}
@media (min-width:860px){
  .enrol-help__inner{ padding:var(--space-lg) }
}
.enrol-help__inner .enrol-help__label{ color:#3a4a6b; font-weight:500 }
.enrol-help__inner .enrol-help__value{ color:var(--color-primary); font-weight:600 }
.enrol-help__inner .enrol-help__sms{ color:#3a4a6b; margin-bottom:0 }
.enrol-help__inner .enrol-help__heading{ margin-top:0 }

/* -------------------------------------------------------------
   Enrol page — key points.
   Sits between the intro and the dates, filling the column beside
   a tall form with selling copy rather than whitespace.
   ------------------------------------------------------------- */
.enrol-points{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem 1.5rem;
  margin:var(--space-md) 0 0;
  padding:0;
  list-style:none;
  font-size:var(--fs-body);
}
.enrol-points__item{
  display:flex;
  align-items:center;
  gap:.45rem;
  color:var(--color-ink);
}
.enrol-points__tick{
  flex:0 0 auto;
  width:1.05rem;
  height:1.05rem;
  fill:none;
  stroke:var(--color-primary-bright);
  stroke-width:2.5;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* -------------------------------------------------------------
   Enrol page — the walkthrough disclosure.
   A full-width button that expands the player beneath it, rather
   than opening a tab. On a landing page, sending someone away
   mid-decision loses them.
   ------------------------------------------------------------- */
.enrol-video{ margin-top:var(--space-lg); max-width:34rem }

.enrol-video__toggle{
  width:100%;
  justify-content:center;
  gap:.6rem;
}
.enrol-video__icon{
  width:1.1rem;
  height:1.1rem;
  fill:currentColor;
  flex:0 0 auto;
  transition:transform .2s ease;
}
/* Rotate the triangle to point down once the panel is open — a
   small confirmation that the button toggles rather than links. */
.enrol-video__toggle[aria-expanded="true"] .enrol-video__icon{ transform:rotate(90deg) }

.enrol-video__panel[hidden]{ display:none }
.enrol-video__panel{
  margin-top:var(--space-sm);
  animation:mlv-slide-down .22s ease both;
}
@keyframes mlv-slide-down{
  from{ opacity:0; transform:translateY(-.4rem) }
  to{ opacity:1; transform:none }
}

.enrol-video__frame{
  position:relative;
  aspect-ratio:16/9;
  border-radius:var(--radius-lg);
  overflow:hidden;
  background:var(--color-dark);
  box-shadow:var(--shadow-sm);
}
.enrol-video__frame iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}

@media (prefers-reduced-motion:reduce){
  .enrol-video__panel{ animation:none }
  .enrol-video__icon{ transition:none }
}

/* Full-width button when the URL is not a YouTube link and the
   plain-link fallback is used instead. */
.enrol-intro__cta .btn--block{ width:100%; max-width:34rem }

/* -------------------------------------------------------------
   Enrol page — course information (14 Nov 2026; layout 16 Nov;
   one field per part 17 Nov).
   Beside the form: the notice (the guides' Callout, warning tone)
   and two buttons — jump to the form on phones, down to the course
   information at every size. Below the form: the towns card, then
   the course parts. Each part's look comes from the field it is
   typed into, so editing the text can't break the styling.
   ------------------------------------------------------------- */

/* Notice: .mlv-callout supplies the panel and the pill; this only
   sets its width and spacing beside the form. */
.enrol-intro__notice.mlv-callout{
  max-width:34rem;
  margin:var(--space-md) 0 0;
}
.enrol-intro__notice.mlv-callout:has(.mlv-callout__title){ margin-top:2.25rem }

.enrol-intro__actions{
  display:flex;
  flex-wrap:wrap;
  gap:var(--space-sm);
  margin-top:var(--space-md);
}
.enrol-jump,
.enrol-more{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
}
.enrol-jump__icon{
  width:1.1rem;
  height:1.1rem;
  fill:none;
  stroke:currentColor;
  stroke-width:2.5;
  stroke-linecap:round;
  stroke-linejoin:round;
}
@media (min-width:900px){
  .enrol-intro.has-form .enrol-jump{ display:none }
  /* Nothing left to show when this language has no button label yet. */
  .enrol-intro.has-form .enrol-intro__actions:not(:has(.enrol-more)){ display:none }
}

/* The section sits on the page background, so the white cards inside
   it stand out. scroll-margin keeps its top clear of the sticky
   header (72px, main.css) when the button scrolls to it. */
.enrol-details{
  padding-block:var(--space-lg) var(--space-md);
  scroll-margin-top:72px;
}

/* Towns in a card (same surface as the date boxes and guide cards),
   A–Z down each column: quicker to scan for "is my town here?"
   than a comma-separated paragraph. */
.enrol-areas{
  margin:0 0 var(--space-lg);
  padding:var(--space-lg);
  background:var(--color-surface);
  border:1px solid var(--color-line);
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow-sm);
}
.enrol-areas:last-child{ margin-bottom:0 }
@media (max-width:599px){
  .enrol-areas{ padding:var(--space-md) }
}
.enrol-areas__intro{
  margin:0 0 var(--space-sm);
  font-weight:600;
  font-size:var(--fs-body-lg);
  color:var(--color-ink);
}
.enrol-areas__label{
  display:flex;
  align-items:center;
  gap:.45rem;
  margin:0 0 .6rem;
  font-weight:600;
}
.enrol-areas__tick{
  flex:0 0 auto;
  width:1.05rem;
  height:1.05rem;
  fill:none;
  stroke:var(--color-success);
  stroke-width:2.5;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.enrol-areas__list{
  columns:5 9rem;
  column-gap:var(--space-md);
  margin:0;
  padding:0;
  list-style:none;
}
.enrol-areas__list li{
  break-inside:avoid;
  padding:.15rem 0;
}

/* Course parts */
.enrol-course{
  display:grid;
  gap:var(--space-md);
  line-height:1.65;
}
.enrol-course a{ text-decoration:underline; text-underline-offset:2px }
.enrol-course :is(.enrol-course__intro, .enrol-course__times-intro, .enrol-course__details-list) > :first-child{ margin-top:0 }
.enrol-course :is(.enrol-course__intro, .enrol-course__times-intro, .enrol-course__details-list) > :last-child{ margin-bottom:0 }

/* Opening paragraph: the lead. */
.enrol-course__intro{
  font-size:var(--fs-body-lg);
  max-width:var(--measure, 44rem);
}

/* Lesson times: every list item in this field is a numbered card. */
.enrol-course__times :is(ol,ul){
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:var(--space-md);
  margin:0;
  padding:0;
  counter-reset:enrol-opt;
}
.enrol-course__times li{
  list-style:none;
  counter-increment:enrol-opt;
  position:relative;
  margin:0;
  padding:var(--space-md) var(--space-md) var(--space-md) 4rem;
  background:var(--color-surface);
  border:1px solid var(--color-line);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm);
}
.enrol-course__times li::before{
  content:counter(enrol-opt);
  position:absolute;
  left:var(--space-md);
  top:var(--space-md);
  display:grid;
  place-items:center;
  width:2rem;
  height:2rem;
  border-radius:50%;
  background:var(--color-primary-bright);
  color:#fff;
  font-weight:700;
  font-size:var(--fs-small);
  line-height:1;
}
.enrol-course__times p{ margin:0 0 var(--space-xs) }
.enrol-course__times > :last-child{ margin-bottom:0 }

/* Note and details: side by side on wide screens. */
.enrol-course__extra{
  display:grid;
  gap:var(--space-md);
  align-items:start;
}
.enrol-course__note.mlv-callout{ margin:0 }
.enrol-course__note.mlv-callout:has(.mlv-callout__title){ margin-top:1.1rem }

.enrol-course__details-heading{
  margin:0 0 .6rem;
  font-weight:600;
}
/* Details: every list item in this field gets a green tick. */
.enrol-course__details-list :is(ul,ol){
  display:grid;
  gap:.6rem;
  margin:0;
  padding:0;
}
.enrol-course__details-list li{
  list-style:none;
  position:relative;
  margin:0;
  padding-left:1.9rem;
}
.enrol-course__details-list li::before{
  content:"";
  position:absolute;
  left:0;
  top:.2rem;
  width:1.25rem;
  height:1.25rem;
  background:no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232d6a4f' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

/* Shown only until the content is moved into the separate fields. */
.enrol-course--legacy{ display:block; max-width:var(--measure, 44rem) }

@media (min-width:700px){
  .enrol-course__times :is(ol,ul){ grid-template-columns:repeat(2,minmax(0,1fr)) }
}
@media (min-width:960px){
  .enrol-course__extra{
    grid-template-columns:repeat(2,minmax(0,1fr));
    column-gap:var(--space-lg);
  }
}

/* =============================================================
   Page sections — Cards (20 Sep)
   A short set of ideas as a grid: one column on phones, two from
   640px. Card surface matches the boxed Text + image panel; the
   icon tile uses the same pale red as the warning callout and the
   homepage Why MacLav backdrop (--color-primary-wash).
   ============================================================= */

.mlv-cards{ margin:var(--space-lg) 0 }
.mlv-cards__intro{
  margin:0 0 var(--space-md);
  color:var(--color-muted);
  font-size:var(--fs-body-lg);
}
.mlv-cards__grid{
  display:grid;
  grid-template-columns:1fr;
  gap:var(--space-md);
}
@media (min-width:640px){
  .mlv-cards__grid{ grid-template-columns:repeat(2, minmax(0, 1fr)) }
}
.mlv-card{
  padding:var(--space-md);
  background:var(--color-surface);
  border:1px solid var(--color-line);
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow-sm);
}
.mlv-card__icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:3rem;
  height:3rem;
  margin-bottom:var(--space-sm);
  border-radius:var(--radius-md);
  background:var(--color-primary-wash);
  color:var(--color-primary);
}
.mlv-card__icon .icon{ width:1.5rem; height:1.5rem }
/* Two classes deep on purpose: .page-single__content h2 (main.css) adds a
   large top margin to every h2 in page content, and card titles are h2s when
   the section has no heading — that margin was opening a gap under the icon. */
.mlv-card .mlv-card__title{
  font-family:var(--font-display);
  font-weight:700;
  font-size:var(--fs-h3);
  line-height:var(--lh-snug);
  margin:0 0 var(--space-sm);
  color:var(--color-ink);
  text-wrap:balance;
}
/* A short red accent line under each card title — cards only. Page H1s
   have no accent line (under consideration: all H1s or none, 20 Sep). */
.mlv-card__title::after{
  content:"";
  display:block;
  width:2.5rem;
  height:3px;
  margin-top:0.6rem;
  border-radius:var(--radius-pill);
  background:var(--color-primary);
}
.mlv-card__text{ margin:0 }

/* 20 Nov: consent/privacy line on the contact form at 13px, matching
   the enrol form, so it stays on one line. */
.page-single__content .wpcf7 .cf-consent{ font-size:.8125rem }

/* 21 Nov: homepage hero on phones and tablets (below 900px; desktop
   unchanged). The trust card is centred and hangs off the bottom edge
   of the photo instead of sitting over the middle of it, so the face
   stays clear. It is a little wider, so the text runs to fewer lines.
   The margin under the photo makes room for the part that hangs below,
   so the content after it moves down by only that much. */
@media (max-width:899.98px){
  .hero__media:has(.hero__trust){ margin-bottom:2.75rem }
  .hero__trust{
    left:0;
    right:0;
    bottom:-2.75rem;
    width:min(21rem, calc(100% - 2rem));
    max-width:none;
    margin-inline:auto;
  }
}

/* 21 Nov: the "jump to the form" button is no longer shown. The form
   starts just below the notice on phones, so it added nothing. The
   "More information" button still shows whenever it has a label. */
.enrol-jump{ display:none }
.enrol-intro__actions:not(:has(.enrol-more)){ display:none }

/* 21 Nov: SEOPress's floating "Cookie preferences" button is replaced by
   a link in the footer (footer.php), which presses this hidden button to
   reopen the cookie panel. Hidden, not switched off: the setting must
   stay on in SEOPress or the footer link has nothing to press.
   Only hidden while the footer link is showing: if a SEOPress update
   ever changes its button, the footer link stays hidden and the floating
   button comes back, so visitors never lose the way to change their mind.
   !important because SEOPress prints its own inline styles for it. */
body:has(.site-footer__cookie-link:not([hidden])) .seopress-user-consent.seopress-edit-choice{ display:none !important }

/* The footer link is a button (it opens a panel rather than going to a
   page), styled to match the Privacy Policy link beside it. */
.site-footer__cookie-link{
  padding:0;
  border:0;
  background:none;
  font:inherit;
  color:var(--color-on-dark-muted);
  cursor:pointer;
}
.site-footer__cookie-link:hover{ color:#fff }
.site-footer__cookie-link[hidden]{ display:none }
