/* ===========================================================================
   visitor.css - the public redesign, ported from the approved prototype
   ===========================================================================

   Generated by scripts/build-visitor-css.py, not hand-written. It is the
   prototype's own sheets concatenated in the order the prototype links them, so
   the ported markup and this file cannot drift apart:

     theme.css        tokens, base, type, layout, RTL
     components.css   buttons, fields, cards, tables, modal, drawer, overlays
     visuals.css      the product shots: terminal mock, certificate card, motifs
     chrome.css       header, drawer, notices, footer, hero, bands

   None of the four share a selector, which is why the order is safe. The page
   loads its three legacy sheets first (style.css, extra.css, responsive.css) and
   this one last, so the redesign wins where the two define the same thing; those
   three leave when the last legacy section is ported.

   Everything here uses logical properties, so the RTL direction this site needs
   for Arabic comes from the same rules rather than a second stylesheet.
   =========================================================================== */

/* =============================================================================
   DevOps Area — public redesign · token layer and base
   =============================================================================
   This is the production intent, not prototype-only scaffolding. It is the file
   that eventually ships as public/frontend/assets/css/* and replaces the three
   stylesheets currently loaded by frontend/layouts/app.blade.php:
     style.css (10,750 lines) + extra.css (1,500) + responsive.css (~2,805).

   Brand values are unchanged: #5e3fd7 action purple, #040453 ink,
   #F8F6F0 cream paper, Jost. What is added is everything the purchased theme
   never had: a type scale (h1 and h2 currently have NO declared size anywhere,
   style.css:214-243), spacing, radius, elevation, a real z-index scale (the
   current preloader uses 9999999999999999, style.css:1645-1654) and semantic
   state tokens.

   Contrast values in the comments are measured, not assumed. The design system
   screen recomputes them live so they cannot silently rot.

   Conventions:
     - Logical properties only (inset-inline, margin-inline-start, padding-block).
       RTL therefore needs nothing but dir="rtl" on <html>, which the existing
       layouts already apply via body.direction-rtl (layouts/admin.blade.php:67).
     - No transform on layout-affecting properties; transitions always name the
       property, never `all`.
     - No gradients in data surfaces, no decorative fills on charts.

   Open docs/prototypes/platform-redesign/index.html to review it.
   ========================================================================== */

/* ---------------------------------------------------------------- 1. Tokens */

:root {
  color-scheme: light;

  /* Brand ramp. 500 is the single action colour: it never decorates. */
  --brand-50:  #F2EFFE;
  --brand-100: #E4DEFC;
  --brand-200: #C9BCF9;
  --brand-300: #A894F2;
  --brand-400: #8567E6;
  --brand-500: #5E3FD7;
  --brand-600: #4A2EBC;
  --brand-700: #3A2299;
  --brand-800: #2A1873;

  /* Ink. Structure and headings. */
  --ink-900: #030060;
  --ink-800: #040453;
  --ink-700: #0E1170;
  --ink-600: #2A2D7A;

  /* Slate. One cool neutral family, tinted from the ink so borders and text
     read as the same material. 400 and below are decorative: see --text-subtle. */
  --slate-900: #22223A;
  --slate-700: #52526C;
  --slate-600: #6B6A7E;  /* added step: see --text-muted below */
  --slate-500: #767588;  /* the brand grey, kept in the ramp, no longer used for text */
  --slate-400: #929292;
  --slate-300: #B5B4BD;
  --slate-200: #D9D9E3;
  --slate-100: #EDEDF3;

  /* Surfaces. */
  --paper:     #F8F6F0;  /* brand cream: the public reading surface */
  --surface:   #FFFFFF;
  --surface-2: #F9F8F6;
  --surface-3: #F4F2FB;

  /* Structure. */
  --border:        rgba(4, 4, 83, 0.10);  /* dividers, decorative */
  --border-strong: rgba(4, 4, 83, 0.22);
  --border-field:  #8B8BA6;               /* 3.31:1 on white, 3.06:1 on paper.
                                             WCAG 1.4.11 needs 3:1 for form
                                             control boundaries. The old value
                                             #B5B4BD measured 2.05:1 and failed. */

  /* Text roles. */
  --text:           var(--slate-700);  /* 6.98:1 on paper, 7.55:1 on white  AA */
  --text-strong:    var(--ink-800);    /* 16.94:1 on paper                   AAA */
  /* The brand's #767588 measures 4.50:1 on white but only 4.16:1 on the cream
     paper, so muted text fails AA on the main public surface as shipped. The
     palette keeps the brand grey; this role moves one step darker:
     5.27:1 on white, 4.87:1 on paper, 4.96:1 on surface-2. AA everywhere. */
  --text-muted:     var(--slate-600);
  --text-subtle:    var(--slate-400);  /* 3.11:1 - decorative and large text ONLY.
                                          Never for placeholders or captions. */
  --text-disabled:  var(--slate-300);  /* 1.85:1 on --surface-3. WCAG 1.4.3 exempts
                                          inactive components, so this is a
                                          deliberate exemption, not a violation. */
  --text-on-brand:  #FFFFFF;           /* 6.63:1 on --brand-500                  */
  --text-inverse:   #FFFFFF;           /* 17.91:1 on --ink-900                   */
  --link:           var(--brand-500);  /* 6.13:1 on paper                        */
  --link-hover:     var(--brand-600);

  /* Accents. Coral is a highlight, never a primary action. */
  --accent:        #FC8068;  /* 2.49:1 on white - fill only, pair with ink text */
  --accent-strong: #F4623F;  /* 3.15:1 on white - large text or UI only        */
  --accent-text:   #B33A1B;  /* 5.94:1 on white, 5.49:1 on paper  AA text      */
  --accent-tint:   #FFEDE8;
  --accent-on-fill: var(--ink-800); /* 7.34:1 on --accent: ink text on coral     */

  --success:        #45C881;
  --success-text:   #1E7A4C;  /* 5.33:1 on white */
  --success-tint:   #E8F7EE;
  --warning:        #FFC014;
  --warning-text:   #8A5A00;  /* 5.93:1 on white */
  --warning-tint:   #FFF4D6;
  --danger:         #FF3C16;
  --danger-text:    #B32600;  /* 6.57:1 on white */
  --danger-tint:    #FFEBE6;

  --focus-ring: var(--brand-500);

  /* Radius. Varied on purpose: uniform radius on everything is a tell. */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* Elevation. Tinted with the ink hue, never neutral black. */
  --e1: 0 1px 2px rgba(4, 4, 83, 0.06);
  --e2: 0 2px 8px rgba(4, 4, 83, 0.08);
  --e3: 0 8px 24px rgba(4, 4, 83, 0.10);
  --e4: 0 20px 48px rgba(4, 4, 83, 0.14);

  /* Spacing. */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Z-index scale. Replaces 9999 (footer.blade.php:210) and
     9999999999999999 (style.css:1645). Overlay order is declared once. */
  --z-base: 0;
  --z-raised: 10;
  --z-sticky: 100;
  --z-chat: 300;
  --z-cookie: 350;
  --z-drawer: 400;
  --z-modal: 600;
  --z-toast: 700;

  /* Type. IBM Plex Sans for everything, IBM Plex Mono for code, terminals and
     the tabular numerals, because the two are siblings from the same superfamily
     rather than a sans with an unrelated mono bolted on. Chosen over Jost on
     2026-09-17: Jost is geometric and wide, which is elegant in a headline and
     tiring in a table of enrolments. See type-study.html. */
  --font-body: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-num: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --fs-display: clamp(2.5rem, 1.75rem + 3.1vw, 4rem);
  --fs-h1: clamp(2rem, 1.5rem + 2vw, 3rem);
  --fs-h2: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
  --fs-h3: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
  --fs-h4: 1.25rem;
  --fs-h5: 1.125rem;
  --fs-h6: 1rem;
  --fs-body: 1rem;
  --fs-sm: 0.9375rem;
  --fs-xs: 0.875rem;
  --fs-label: 0.8125rem;
  --fs-caption: 0.75rem;   /* hard floor: nothing renders below 12px.
                              style.css:1417 currently sets 8px. */

  --lh-tight: 1.08;
  --lh-heading: 1.24;
  --lh-body: 1.6;

  --ls-display: -0.022em;
  --ls-heading: -0.012em;
  --ls-label: 0.06em;

  --w-light: 300;   /* display only */
  --w-body: 400;
  --w-medium: 500;  /* the brand's heading weight: h1-h6 are 500 today */
  --w-semi: 600;

  --container: 1240px;
  --container-narrow: 720px;
  --measure: 68ch;

  --t-fast: 120ms;
  --t-base: 200ms;
  --t-slow: 320ms;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);

  /* --- Depth -----------------------------------------------------------------
     Controlled on purpose. ONE gradient in the whole system, on the ink hero
     and the closing call to action, plus two radial glows and a hand-authored
     grain. No glassmorphism, no gradient text, no gradient in a data surface. */
  --gradient-hero:
    radial-gradient(120% 120% at 82% 6%, rgba(94, 63, 215, 0.60) 0%, rgba(3, 0, 96, 0) 58%),
    linear-gradient(162deg, #06062B 0%, #030060 52%, #040453 100%);
  --glow-brand: radial-gradient(closest-side, rgba(94, 63, 215, 0.50), rgba(94, 63, 215, 0));
  --glow-coral: radial-gradient(closest-side, rgba(252, 128, 104, 0.34), rgba(252, 128, 104, 0));
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-opacity: 0.05;

  /* Structure on ink, and the two tinted shadows that carry the brand hue. */
  --hairline-on-ink: #2A2D7A;
  --shadow-brand: 0 18px 40px rgba(94, 63, 215, 0.28);
  --shadow-ink: 0 20px 50px rgba(3, 0, 96, 0.38);

  /* The ink hero has its own text roles. Coral reads at 7.19:1 on ink even
     though it fails at 2.49:1 on white, which is why the accent flips here. */
  --hero-bg: var(--ink-900);
  --hero-text: #FFFFFF;        /* 17.91:1 on --hero-bg */
  --hero-text-soft: #C9C9DE;   /* 10.99:1 */
  --hero-accent: var(--brand-300); /* 6.98:1 */
  --hero-accent-2: var(--accent);  /* 7.19:1 */
}

/* ----------------------------------------------------------------- 2. Dark */
/* Shells only. The public marketing pages stay light in this round: dark
   marketing doubles the asset work for no measured benefit. */

[data-theme='dark'] {
  color-scheme: dark;

  --paper:     #0B0B1F;
  --surface:   #14142E;
  --surface-2: #1C1C3D;
  --surface-3: #23234A;

  /* Two components read the grey ramp directly rather than a surface token: the neutral badge
     and the segmented control's track. Left at the light values they painted light grey behind
     light text on this theme, which is where "light chips in dark mode" came from. */
  --slate-100: var(--surface-3);
  --slate-200: #2B2B57;

  --border:        rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.22);
  --border-field:  #7A7A9E;

  --text:          #C9C9DE;  /* 11.03:1 on --surface-2 */
  --text-strong:   #E8E8F2;  /* 14.76:1 on --surface-2 */
  --text-muted:    #A3A3BD;  /*  7.30:1 on --surface-2 */
  --text-subtle:   #7C7C99;
  --text-disabled: #5A5A78;
  /* Text on ink surfaces stays light in both themes; text on the brand fill
     inverts, because the brand itself lightens. Two different jobs, so two
     tokens. Collapsing them into one broke the dark navbar at 1.08:1. */
  --text-inverse:  #F2F2F8;
  --ink-900: #1A1A40;        /* the navbar keeps a distinct surface in dark */

  --brand-500: #8B72F5;      /*  4.98:1 as link on --surface-2 */
  --brand-600: #A594F7;
  --brand-700: #BCAFFA;
  --text-on-brand: #0B0B1F;  /*  5.38:1 on the lightened brand */

  /* Brand tints invert to washes. Left as light surfaces they put light purple
     text on a near-white background: the announcements strip measured about
     1.4:1 in dark mode before this. Tints are translucent so they tint whatever
     surface they sit on instead of fighting it. */
  --brand-50:  rgba(139, 114, 245, 0.14);
  --brand-100: rgba(139, 114, 245, 0.26);
  --brand-200: rgba(168, 148, 242, 0.38);

  --accent:        #FF9E86;
  --accent-strong: #FF8A73;
  --accent-text:   #FF9E86;  /*  8.97:1 on --surface-2 */
  --accent-tint:   rgba(252, 128, 104, 0.16);
  --accent-on-fill: #0B0B1F;

  --success-text: #5FD69A;   /*  9.90:1 */
  --success-tint: rgba(69, 200, 129, 0.16);
  --warning-text: #FFD45C;   /* 12.68:1 */
  --warning-tint: rgba(255, 192, 20, 0.16);
  --danger-text:  #FF8A73;   /*  7.81:1 */
  --danger-tint:  rgba(255, 60, 22, 0.16);

  --link: var(--brand-500);
  --link-hover: var(--brand-600);

  --e1: 0 1px 2px rgba(0, 0, 0, 0.40);
  --e2: 0 2px 8px rgba(0, 0, 0, 0.45);
  --e3: 0 8px 24px rgba(0, 0, 0, 0.50);
  --e4: 0 20px 48px rgba(0, 0, 0, 0.55);

  /* The ink hero stays ink in dark mode, so it keeps a hairline to separate it
     from the page rather than becoming a flat rectangle. */
  --hero-bg: #05053A;
  --hairline-on-ink: #35356E;
  --grain-opacity: 0.035;
}

/* ------------------------------------------------------------------ 3. Base */

*, *::before, *::after { box-sizing: border-box; }

/* A hidden element is hidden. Almost every control here sets its own display (a
   button is inline-flex, a chip row is flex), and a class that sets display beats the
   user-agent rule for [hidden], so without this an element marked hidden stays on
   screen. Two screens were shipping a permanently visible share row because of it. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anything scrolled to, or focused into view, must clear the sticky header.
     With only the spacing token here a target lands underneath the header and
     cannot be clicked, which is exactly what a pager at the foot of a list does.
     --header-h comes from chrome.css; the fallback covers screens that do not
     load it, so the rule can live in the token layer. */
  scroll-padding-block-start: calc(var(--header-h, 0px) + var(--s-5));
}
/* A scroll target can also carry its own margin, for cases where the scrolling
   box is not the document (a drawer, a modal body). */
[data-scroll-target] { scroll-margin-block-start: calc(var(--header-h, 0px) + var(--s-5)); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--w-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

/* Every interactive control gets a visible ring. The old sheets remove outlines
   in places and the admin/student audit recorded unnamed icon-only controls. */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: var(--brand-100); color: var(--ink-800); }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

/* ------------------------------------------------------------ 4. Typography */

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--text-strong);
  font-weight: var(--w-medium);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h5 { font-size: var(--fs-h5); }
h6 { font-size: var(--fs-h6); }

p { margin: 0 0 var(--s-4); max-width: var(--measure); text-wrap: pretty; }
p:last-child { margin-block-end: 0; }

.display {
  font-size: var(--fs-display);
  font-weight: var(--w-light);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
  text-wrap: balance;
}

.lede { font-size: 1.125rem; color: var(--text-muted); }

.eyebrow {
  font-size: var(--fs-label);
  font-weight: var(--w-semi);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-muted);
}

.small { font-size: var(--fs-sm); }
.caption { font-size: var(--fs-caption); color: var(--text-muted); }

/* Style like an h1 without being one. Needed by documentation screens that show a
   specimen of a page header: one h1 per page, including the page documenting the
   rule. */
.as-h1 {
  font-size: var(--fs-h1);
  font-weight: var(--w-medium);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  color: var(--text-strong);
  text-wrap: balance;
  margin: 0;
}

/* Numbers that sit in columns must align. Course counts, prices, durations. */
.tabular { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

/* ---------------------------------------------------------------- 5. Layout */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s-5);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--s-8); }
.section--tight { padding-block: var(--s-7); }

/* Asymmetrical by default: a symmetric three-up card row is the most generic
   layout there is, so card grids opt in explicitly. */
.stack > * + * { margin-block-start: var(--s-4); }
.stack--lg > * + * { margin-block-start: var(--s-6); }

.cluster { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.split { display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: space-between; align-items: center; }

.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid--wide-narrow { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.85fr); }

@media (max-width: 900px) { .grid--wide-narrow { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------- 6. Utilities */

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

/* The first thing a keyboard user meets. */
.skip-link {
  position: absolute;
  inset-block-start: var(--s-2);
  inset-inline-start: var(--s-2);
  z-index: var(--z-toast);
  padding: var(--s-3) var(--s-4);
  background: var(--ink-800);
  color: var(--text-inverse);
  border-radius: var(--r-sm);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--t-base) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-1, .clamp-2, .clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp-1 { -webkit-line-clamp: 1; }
.clamp-2 { -webkit-line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; }

.text-muted { color: var(--text-muted); }
.text-strong { color: var(--text-strong); }
.text-center { text-align: center; }
.mt-0 { margin-block-start: 0; }
.mb-0 { margin-block-end: 0; }
.mb-2 { margin-block-end: var(--s-2); }
.mb-4 { margin-block-end: var(--s-4); }
.mb-6 { margin-block-end: var(--s-6); }

.surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.pad-5 { padding: var(--s-5); }
.pad-6 { padding: var(--s-6); }

/* ---------------------------------------------------------------- 7. Motion */

/* Named properties only. `transition: all` is banned. */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* Overflowing lists, drawers and modals must not chain-scroll the page. */
.no-scroll-chain { overscroll-behavior: contain; }

.touch-manipulation { touch-action: manipulation; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------- 8. RTL */
/* Nothing here yet on purpose: every rule above uses logical properties, so
   dir="rtl" is the whole implementation. Directional glyphs are the exception
   and are flipped explicitly in components.css. */

[dir='rtl'] .flip-rtl { transform: scaleX(-1); }


/* =============================================================================
   DevOps Area — public redesign · component library
   =============================================================================
   Production intent. Depends on theme.css only. Every component carries its
   states (default / hover / active / focus / disabled / loading / error) because
   "no loading, empty or error state" is the most common reason an interface
   feels unfinished — and this platform currently has no designed empty state on
   the wishlist, no loading state on the search box, and no visible error on the
   instructor course form.

   Deliberate choices that avoid the generic admin-template look:
     - Status badges are squared (--r-xs), not pills. Pills are reserved for
       filters, where the shape signals "toggleable".
     - Avatars are squircles (--r-md), not circles.
     - Cards do not combine border + shadow + white by default: elevation is
       only used where it communicates overlap.
     - Buttons come in four weights so a screen is never reduced to
       "one filled + one ghost".
     - 44px minimum block size on every tap target. The audit measured 49 to 97
       sub-40px targets per page.
   ========================================================================== */

/* ----------------------------------------------------------------- 1. Icons */
/* One set, bundled locally. Today the project runs three at once (Iconify via
   the runtime API at api.iconify.design, FontAwesome, and dashicons) and the
   icon-only buttons frequently carry no accessible name. Phosphor is the set
   we bundle; icons inherit currentColor and a single stroke weight. */

.icon {
  inline-size: 1.25em;
  block-size: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm { inline-size: 1em; block-size: 1em; }
.icon--lg { inline-size: 1.5em; block-size: 1.5em; }
.icon--filled { fill: currentColor; stroke: none; }

/* ----------------------------------------------------------------- 2. Button */

.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text-strong);
  --btn-bd: var(--border-field);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-block-size: 44px;
  padding-inline: var(--s-5);
  padding-block: var(--s-3);
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-md);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--w-medium);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: var(--text-muted); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.btn--primary {
  --btn-bg: var(--brand-500);
  --btn-fg: var(--text-on-brand);
  --btn-bd: var(--brand-500);
  box-shadow: var(--e1);
}
.btn--primary:hover { background: var(--brand-600); border-color: var(--brand-600); }

.btn--attention {
  --btn-bg: var(--accent);
  --btn-fg: var(--accent-on-fill);   /* ink on coral measures 7.34:1 */
  --btn-bd: var(--accent);
}
.btn--attention:hover { background: var(--accent-strong); border-color: var(--accent-strong); }

.btn--danger {
  --btn-bg: transparent;
  --btn-fg: var(--danger-text);
  --btn-bd: var(--danger-text);
}
.btn--danger:hover { background: var(--danger-tint); }

.btn--quiet {
  --btn-bg: transparent;
  --btn-bd: transparent;
  --btn-fg: var(--text-strong);
  padding-inline: var(--s-3);
}
.btn--quiet:hover { background: var(--surface-3); border-color: transparent; }

.btn--link {
  --btn-bg: transparent;
  --btn-bd: transparent;
  --btn-fg: var(--link);
  min-block-size: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn--link:hover { background: transparent; color: var(--link-hover); }

.btn--sm { min-block-size: 36px; padding-inline: var(--s-4); padding-block: var(--s-2); font-size: var(--fs-label); }
.btn--lg { min-block-size: 52px; padding-inline: var(--s-6); font-size: var(--fs-body); }

.btn--block { inline-size: 100%; }

.btn[disabled], .btn[aria-disabled='true'], .btn.is-disabled {
  --btn-bg: var(--surface-3);
  --btn-fg: var(--text-disabled);
  --btn-bd: var(--border);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Loading keeps the label so the control never changes width. */
.btn.is-loading { position: relative; color: transparent; pointer-events: none; }
.btn.is-loading::after {
  content: '';
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: 16px;
  block-size: 16px;
  margin-block-start: -8px;
  margin-inline-start: -8px;
  border: 2px solid currentColor;
  border-block-start-color: transparent;
  border-radius: 50%;
  color: var(--btn-fg);
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Icon-only controls must ship an aria-label. */
.btn--icon { inline-size: 44px; min-block-size: 44px; padding: 0; }

/* ------------------------------------------------------------------ 3. Field */

.field { display: grid; gap: var(--s-2); }

.field__label {
  font-size: var(--fs-label);
  font-weight: var(--w-medium);
  color: var(--text-strong);
}
.field__label .req { color: var(--danger-text); margin-inline-start: 2px; }

.field__control {
  inline-size: 100%;
  min-block-size: 44px;
  padding-inline: var(--s-4);
  padding-block: var(--s-3);
  border: 1px solid var(--border-field);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-strong);
  font: inherit;
  font-size: var(--fs-sm);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}
.field__control::placeholder { color: var(--text-muted); }
.field__control:hover { border-color: var(--text-muted); }
.field__control:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px var(--brand-100);
}
.field__control:disabled {
  background: var(--surface-3);
  color: var(--text-disabled);
  cursor: not-allowed;
}

textarea.field__control { min-block-size: 132px; padding-block: var(--s-3); resize: vertical; line-height: 1.55; }

.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-inline-end: var(--s-7);
}
[dir='rtl'] .select {
  background-position: 20px 50%, 15px 50%;
  padding-inline-end: var(--s-4);
  padding-inline-start: var(--s-7);
}

.field__hint { font-size: var(--fs-caption); color: var(--text-muted); }

/* Errors are inline, next to the field, and describe the fix. */
.field--invalid .field__control { border-color: var(--danger-text); }
.field--invalid .field__control:focus { box-shadow: 0 0 0 3px var(--danger-tint); }
.field__error {
  display: flex;
  gap: var(--s-2);
  align-items: flex-start;
  font-size: var(--fs-caption);
  color: var(--danger-text);
  font-weight: var(--w-medium);
}

/* Check, radio and switch share one hit target with their label. */
.choice { display: flex; gap: var(--s-3); align-items: flex-start; min-block-size: 44px; padding-block: var(--s-2); cursor: pointer; }
.choice input { inline-size: 20px; block-size: 20px; margin: 2px 0 0; accent-color: var(--brand-500); flex: none; }
.choice__text { font-size: var(--fs-sm); }
.choice__text .caption { display: block; }

.switch { display: inline-flex; align-items: center; gap: var(--s-3); min-block-size: 44px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inline-size: 1px; block-size: 1px; }
.switch__track {
  inline-size: 46px; block-size: 26px; flex: none;
  border-radius: var(--r-pill);
  background: var(--slate-200);
  border: 1px solid var(--border-strong);
  position: relative;
  transition: background-color var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.switch__track::after {
  content: '';
  position: absolute;
  inset-block-start: 2px;
  inset-inline-start: 2px;
  inline-size: 20px; block-size: 20px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--e1);
  transition: transform var(--t-base) var(--ease);
}
.switch input:checked + .switch__track { background: var(--brand-500); border-color: var(--brand-500); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
[dir='rtl'] .switch input:checked + .switch__track::after { transform: translateX(-20px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* ------------------------------------------------------------------ 4. Badge */
/* Squared status markers. Colour is never the only signal: each carries text. */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 3px var(--s-2);
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  font-size: var(--fs-caption);
  font-weight: var(--w-semi);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.badge--neutral { background: var(--slate-100); color: var(--text); }
.badge--brand   { background: var(--brand-50); color: var(--brand-700); }
.badge--success { background: var(--success-tint); color: var(--success-text); }
.badge--warning { background: var(--warning-tint); color: var(--warning-text); }
.badge--danger  { background: var(--danger-tint); color: var(--danger-text); }
.badge--accent  { background: var(--accent-tint); color: var(--accent-text); }
.badge--solid   { background: var(--ink-800); color: var(--text-inverse); }

.dot { inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* --------------------------------------------------------- 5. Chips, filters */
/* Pills here and only here: the shape means "toggleable". */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-block-size: 36px;
  padding-inline: var(--s-3);
  border: 1px solid var(--border-field);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-label);
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.chip:hover { border-color: var(--brand-500); color: var(--brand-700); }
.chip[aria-pressed='true'], .chip.is-on {
  background: var(--brand-50);
  border-color: var(--brand-500);
  color: var(--brand-700);
  font-weight: var(--w-medium);
}
.chip__count { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.chip__x { display: inline-flex; color: inherit; opacity: 0.7; }
.chip__x:hover { opacity: 1; }

/* A row of chips: applied filters, share targets, or a course's status badges.
   Lives here because two screens now put several chips together, and a chip row
   without a gap is just a word salad. */
/* ------------------------------------------------------- catalogue grid ---- */
/* The shop: a rail of facets beside the results. Lifted out of the catalogue screen's own
   style block now that the screen is the real page, so the grid belongs with the rest of
   the system rather than with the page that happened to demonstrate it first. */
.cat { display: grid; gap: var(--s-6); align-items: start; }
@media (min-width: 1000px) {
  .cat { grid-template-columns: 288px minmax(0, 1fr); gap: var(--s-7); }
}
.cat__rail { display: grid; gap: var(--s-3); align-content: start; }
@media (min-width: 1000px) {
  .cat__rail { position: sticky; inset-block-start: calc(var(--header-h) + var(--s-4)); }
}
/* Below the breakpoint the rail is a sheet behind a button, because five open panels above
   the results spend the first screenful on controls instead of courses. */
.cat__rail-toggle { display: flex; }
@media (min-width: 1000px) { .cat__rail-toggle { display: none; } }
@media (max-width: 999px) {
  .cat__rail { display: none; }
  .cat__rail.is-open { display: grid; }
}

/* --------------------------------------------------- legacy page bodies ---- */
/* The pages still being moved are the old template's markup, and each of them wraps its body in
   .bg-page. That wrapper is what scopes these rules: the redesigned screens do not use it, so this
   compatibility layer cannot reach them. Colours come from the tokens, so a moved page reads in
   both themes; the type scale stays the template's, because retyping sixty screens is not this
   step. Delete a rule from here once the page that needed it has a body of its own. */
.bg-page { background: var(--paper); color: var(--text); }
.bg-page h1, .bg-page h2, .bg-page h3, .bg-page h4, .bg-page h5, .bg-page h6 { color: var(--text-strong); }
.bg-page p, .bg-page li, .bg-page dd, .bg-page dt, .bg-page td, .bg-page th { color: var(--text); }
.bg-page strong, .bg-page b { color: var(--text-strong); }
.bg-page a:not(.btn):not(.theme-btn):not(.nav-link) { color: var(--link); }
.bg-page hr { border-color: var(--border); }
.bg-page blockquote { border-inline-start: 3px solid var(--brand-500); color: var(--text-muted); }
.bg-page .card, .bg-page .accordion-item, .bg-page .modal-content, .bg-page .bg-white { background-color: var(--surface) !important; border-color: var(--border) !important; }
.bg-page table { color: var(--text); border-color: var(--border); }
.bg-page table th, .bg-page table td { border-color: var(--border); }
.bg-page input:not([type='checkbox']):not([type='radio']), .bg-page textarea, .bg-page select {
  background-color: var(--surface);
  color: var(--text);
  border-color: var(--border-field);
}
.bg-page .text-muted, .bg-page .color-gray { color: var(--text-muted) !important; }
.bg-page .bg-light { background-color: var(--surface-2) !important; }
/* The template's heading family, which carried its own dark grey. */
.bg-page .section-heading, .bg-page .section-sub-heading, .bg-page .color-heading { color: var(--text-strong); }
/* Its sizes were two steps out of scale: section headings rendered at 41px, close to the 48px page
   title, and the FAQ's questions at 36px. The elements stay, so the structure and the anchors are
   untouched; the sizes and the line-height come from this system's steps. No rule for h1: the page
   head's own h1 sits inside this wrapper, and it must keep the step meant for a page title. */
.bg-page h2 { font-size: var(--fs-h4); line-height: 1.25; }
.bg-page h3 { font-size: var(--fs-h5); line-height: 1.3; }
.bg-page h4, .bg-page h5 { font-size: var(--fs-h6); line-height: 1.35; }
.bg-page .section-heading { font-size: var(--fs-h4); line-height: 1.25; }
.bg-page .section-sub-heading { font-size: var(--fs-body); line-height: 1.6; color: var(--text-muted); }
/* A question is not a headline, however it is marked up. */
.bg-page .accordion-header, .bg-page .accordion-header .accordion-button { font-size: var(--fs-h6); line-height: 1.4; }
/* One panel of the about page paints itself white without a utility class to catch. */
.bg-page .history-content { background-color: var(--surface); }
/* The FAQ's category pills and accordion rows. The pills are anchors the template paints white with
   the same specificity, and ahead of this sheet for the active one, so they need the last word. */
.bg-page .accordion-button, .bg-page .accordion-body { background-color: var(--surface); color: var(--text); }
.bg-page .accordion-button:not(.collapsed) { background-color: var(--surface-2); color: var(--text-strong); }
.bg-page .nav-link { background-color: var(--surface) !important; color: var(--text) !important; }
.bg-page .nav-link.active { background-color: var(--brand-50) !important; color: var(--brand-700) !important; }
/* The template's filled buttons carry the old brand fill, and one of them the old accent fill with
   white on it, which is 2.49:1. Both become the design's brand fill, which pairs with its own
   readable text colour. !important because the template sets its fills with the same specificity
   and, for the accent, ahead of this sheet. */
.bg-page .theme-button1 { background-color: var(--brand-500) !important; border-color: var(--brand-500) !important; color: var(--text-on-brand) !important; }

/* ------------------------------------------------- legacy card height ---- */
/* A row of cards shares one height, and the rating, author and price block sinks to the bottom of
   each card, so those rows line up across the row instead of sitting wherever the copy above them
   happened to end. The card is already a flex column; what was missing is that it did not fill its
   column, and that nothing absorbed the leftover space between the copy and that block. */
.courses-grids .course-item { block-size: 100%; }
.courses-grids .course-item > .card-body { display: flex; flex-direction: column; flex: 1 1 auto; }
.courses-grids .course-item .course-item-bottom { margin-block-start: auto; }

/* ------------------------------------------------- legacy, in this theme ---- */
/* The card's hover buttons. The markup carries 24px icons, but the old rule pins only their height
   against a shorter button, so each icon rendered 24 by 18 and the pair read as misaligned in the
   card's corner; it could not have been the icons' aspect, since the SVGs are square by attribute.
   The group is also positioned by a fixed left offset that only suited the old card's width, so it
   is anchored to the card's right edge instead. Theme-independent, because it is geometry. */
.course-item-hover-btns { left: auto; right: 25px; }
.course-item-hover-btns .course-item-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: 24px;
  block-size: 24px;
}
.course-item-hover-btns .course-item-btn svg { inline-size: 24px; block-size: 24px; }
/* A gap between them, so the pair reads as two controls rather than one tall glyph. A margin on the
   second rather than a gap on the parent, because the parent is absolutely positioned with a
   resolved width and its own layout is not worth disturbing. */
.course-item-hover-btns .course-item-btn + .course-item-btn { margin-block-start: var(--s-2); }

/* The course card the listing pages still render is the old template's, and it carries Bootstrap's
   `bg-white` utility, so it painted a white rectangle on the dark theme. The utility needs
   !important to undo, and its border likewise. The card itself is rebuilt on this system in its
   own step; this keeps the listings readable until then. */
[data-theme='dark'] .course-item {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text);
}
/* The card's footer row holds the price, the ratings and the Free/Paid label, and sets its own
   colour from the old palette: a navy that measures 1.02:1 against this theme's surface. */
[data-theme='dark'] .course-item .instructor-bottom-item {
  color: var(--text);
}
/* The card's corner tag is white on the accent fill, which is 2.49:1. On this theme the accent
   lightens, so its own dark text is the readable pairing. */
[data-theme='dark'] .course-item .course-tag {
  background: var(--accent);
  color: var(--accent-on-fill);
}

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }

/* ------------------------------------------------------------------- 6. Tabs */

.tabs {
  display: flex;
  gap: var(--s-5);
  border-block-end: 1px solid var(--border);
  overflow-x: auto;
  /* The selected tab's underline is drawn at inset-block-end: -1px so that it covers
     the border above it. Without this 1px of padding it sits outside the scrollport,
     and because overflow-x: auto makes overflow-y compute to auto, the strip grew a
     stray vertical scrollbar on every screen that used it. */
  padding-block-end: 1px;
}
.tab {
  position: relative;
  padding-block: var(--s-3);
  padding-inline: var(--s-1);
  border: 0;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--w-medium);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
.tab:hover { color: var(--text-strong); }
.tab[aria-selected='true'], .tab.is-current { color: var(--brand-700); }
.tab[aria-selected='true']::after, .tab.is-current::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  inset-block-end: -1px;
  block-size: 2px;
  background: var(--brand-500);
  border-radius: 2px;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 3px;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.segmented__item {
  padding: var(--s-2) var(--s-4);
  min-block-size: 38px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: var(--fs-label);
  font-weight: var(--w-medium);
  cursor: pointer;
  /* An option label is one phrase. Left to wrap it breaks mid-word, so the control
     wraps between options instead, which is what flex-wrap above is for. */
  white-space: nowrap;
}
.segmented__item[aria-pressed='true'],
/* The track switcher is a real tablist: role=tab, aria-selected, aria-controls. It carried no
   selected style at all while this rule only covered aria-pressed, so both attributes are listed. */
.segmented__item[aria-selected='true'] { background: var(--surface); color: var(--text-strong); box-shadow: var(--e1); }

/* The built track is not a saved one: it exists only for as long as the visitor's answers do. The
   brand ring marks it as theirs, and the brand fill marks it as the open one. */
.segmented__item[data-track='custom'] { box-shadow: inset 0 0 0 1px var(--brand-300); }
.segmented__item[data-track='custom'][aria-selected='true'] {
  background: var(--brand-50);
  color: var(--brand-700);
  box-shadow: inset 0 0 0 1px var(--brand-300);
}

/* --------------------------------------------------------------- 7. Stepper */
/* The instructor course flow changes the URL (?step=category) and shows nothing
   about progress today. */

.stepper { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.step { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-label); color: var(--text-muted); }
.step__no {
  display: grid;
  place-items: center;
  inline-size: 26px; block-size: 26px;
  border: 1px solid var(--border-field);
  border-radius: 50%;
  font-size: var(--fs-caption);
  font-weight: var(--w-semi);
  font-variant-numeric: tabular-nums;
}
.step--done .step__no { background: var(--success-tint); border-color: var(--success-text); color: var(--success-text); }
.step--current { color: var(--text-strong); font-weight: var(--w-medium); }
.step--current .step__no { background: var(--brand-500); border-color: var(--brand-500); color: var(--text-on-brand); }
.step__sep { inline-size: 18px; block-size: 1px; background: var(--border-strong); }

/* ---------------------------------------------------------- 8. Breadcrumbs */

.crumbs { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; font-size: var(--fs-label); color: var(--text-muted); }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--link); text-decoration: underline; }
.crumbs__sep { color: var(--text-subtle); }

/* -------------------------------------------------------------- 9. Page head */

.page-head { padding-block: var(--s-7) var(--s-6); }
.page-head h1 { margin-block-end: var(--s-3); }
.page-head--ruled { border-block-end: 1px solid var(--border); }

/* ----------------------------------------------------------------- 10. Cards */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card--raised { box-shadow: var(--e2); border-color: transparent; }
.card__body { padding: var(--s-5); }
/* For a card whose children carry their own vertical rhythm, which is what the FAQ band's rows do. */
.card__body--flush { padding-block: 0; }
.card__head { padding: var(--s-5) var(--s-5) 0; }
.card__foot {
  padding: var(--s-4) var(--s-5);
  border-block-start: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
}

/* Course card. Used by the home page, the catalogue and the roadmap. */
.course-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.course-card:hover, .course-card:focus-within {
  box-shadow: var(--e3);
  border-color: transparent;
  transform: translateY(-2px);
}
.course-card__media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-3); overflow: hidden; }
.course-card__media img { inline-size: 100%; block-size: 100%; object-fit: cover; }

/* Drawn where a course has no image of its own. The prototype leaves its media boxes with an
   inline placeholder for the same reason: nothing has to exist on disk and nothing can 404.
   `image_path` is not the test for that: Course::getImagePathAttribute() answers
   uploads/default/course.jpg for a course with no image, so callers test the raw `image`
   column. Both a block size and a ratio are declared so it fills a 16:9 media box and also
   holds its own shape in the legacy card, whose wrapper declares no ratio. */
.course-media-placeholder {
  inline-size: 100%;
  block-size: 100%;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background: var(--brand-50);
  color: var(--brand-500);
}
.course-media-placeholder svg { inline-size: 34%; max-inline-size: 84px; block-size: auto; opacity: 0.5; }
.course-card__flags { position: absolute; inset-block-start: var(--s-3); inset-inline-start: var(--s-3); display: flex; gap: var(--s-2); }
.course-card__body { padding: var(--s-4) var(--s-4) 0; display: grid; gap: var(--s-2); }
.course-card__title { font-size: var(--fs-h6); font-weight: var(--w-medium); line-height: 1.35; }
.course-card__title a { color: inherit; text-decoration: none; }
.course-card__title a:hover { color: var(--link); }
.course-card__meta { display: flex; flex-wrap: wrap; gap: var(--s-3); font-size: var(--fs-caption); color: var(--text-muted); }
.course-card__foot {
  margin-block-start: auto;
  padding: var(--s-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  border-block-start: 1px solid var(--border);
}
.price { font-size: var(--fs-h5); font-weight: var(--w-semi); color: var(--text-strong); font-variant-numeric: tabular-nums; }
.price--free { color: var(--success-text); }

/* Topic cards. These four rules came from the prototype screen's own style block
   (02-home.html:77-80) rather than from a sheet, which is why no sheet had them. */
.cat-card {
  display: grid;
  gap: var(--s-2);
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.cat-card:hover { border-color: var(--brand-300); box-shadow: var(--e3); transform: translateY(-2px); }
.cat-card__n { font-size: var(--fs-caption); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.cat-card__t { font-size: var(--fs-h5); font-weight: var(--w-medium); color: var(--text-strong); }

/* Creator credit. Required by the growth plan and absent everywhere today:
   nothing on a course page credits the person who made the course. */
.credit {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  padding: var(--s-3) var(--s-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--r-sm);
  font-size: var(--fs-caption);
  color: var(--text-muted);
}
.credit strong { color: var(--text-strong); font-weight: var(--w-medium); }

/* ----------------------------------------------------------------- 11. Table */

.table-wrap { overflow-x: auto; overscroll-behavior: contain; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.table { inline-size: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table caption { text-align: start; padding: var(--s-4) var(--s-5); font-size: var(--fs-label); color: var(--text-muted); }
.table th, .table td { padding: var(--s-3) var(--s-4); text-align: start; vertical-align: middle; }
.table thead th {
  font-size: var(--fs-caption);
  font-weight: var(--w-semi);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-muted);
  border-block-end: 1px solid var(--border-strong);
  white-space: nowrap;
}
.table tbody tr { border-block-end: 1px solid var(--border); transition: background-color var(--t-fast) var(--ease); }
.table tbody tr:last-child { border-block-end: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: end; font-variant-numeric: tabular-nums; }
.table__title { font-weight: var(--w-medium); color: var(--text-strong); }
.table__sub { display: block; font-size: var(--fs-caption); color: var(--text-muted); }

/* The same kind of row as the toolbar above the list, so it lines up with it: the toolbar has no
   padding of its own, and this is the other end of the same list, so the two share the toolbar's
   outer step instead of one sitting in a padded box. */
.pager { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; justify-content: space-between; margin-block-start: var(--s-5); }
.pager__pages { display: flex; gap: var(--s-1); align-items: center; flex-wrap: wrap; }
.pager__btn {
  display: grid;
  place-items: center;
  min-inline-size: 40px;
  min-block-size: 40px;
  padding-inline: var(--s-2);
  border: 1px solid var(--border-field);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-label);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  cursor: pointer;
}
.pager__btn:hover { border-color: var(--brand-500); color: var(--brand-700); }
.pager__btn[aria-current='page'] { background: var(--brand-500); border-color: var(--brand-500); color: var(--text-on-brand); font-weight: var(--w-medium); }
.pager__btn[aria-disabled='true'] { color: var(--text-disabled); border-color: var(--border); cursor: not-allowed; }
.pager__info { font-size: var(--fs-caption); color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 12. Alerts */

/* An alert holds ONE child. This was display:flex with a gap, which silently turned a
   direct <span class="alert__title"> plus loose text into two narrow flex columns and
   stacked the title one word per line. Nothing uses the flex for layout (there is no
   icon slot), so block is both simpler and impossible to get wrong. */
.alert {
  display: block;
  padding: var(--s-4);
  border: 1px solid var(--border);
  border-inline-start-width: 3px;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  background: var(--surface);
}
.alert > * + * { margin-block-start: var(--s-3); }
.alert__title { font-weight: var(--w-medium); color: var(--text-strong); display: block; margin-block-end: 2px; }
.alert--info    { background: var(--brand-50);    border-inline-start-color: var(--brand-500); }
.alert--success { background: var(--success-tint); border-inline-start-color: var(--success-text); }
.alert--warning { background: var(--warning-tint); border-inline-start-color: var(--warning-text); }
.alert--danger  { background: var(--danger-tint);  border-inline-start-color: var(--danger-text); }

/* ----------------------------------------------------------------- 13. Empty */

.empty { text-align: center; padding: var(--s-8) var(--s-5); display: grid; gap: var(--s-3); justify-items: center; }
.empty__mark {
  inline-size: 64px; block-size: 64px;
  display: grid; place-items: center;
  border-radius: var(--r-lg);
  background: var(--brand-50);
  color: var(--brand-700);
}
.empty h3 { font-size: var(--fs-h5); }
.empty p { max-inline-size: 46ch; color: var(--text-muted); font-size: var(--fs-sm); }

/* -------------------------------------------------------------- 14. Skeleton */

.skeleton {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%);
  background-size: 400% 100%;
  border-radius: var(--r-sm);
  animation: shimmer 1400ms ease-in-out infinite;
}
.skeleton--text { block-size: 12px; }
.skeleton--title { block-size: 20px; inline-size: 70%; }
.skeleton--media { aspect-ratio: 16 / 9; border-radius: 0; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; background: var(--surface-3); } }

/* --------------------------------------------------------- 15. Modal, drawer */

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 83, 0.5);
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  padding: var(--s-5);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal {
  inline-size: min(560px, 100%);
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--e4);
  overflow: hidden;
}
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); padding: var(--s-5); border-block-end: 1px solid var(--border); }
.modal__body { padding: var(--s-5); }
.modal__foot { display: flex; justify-content: flex-end; gap: var(--s-3); padding: var(--s-4) var(--s-5); background: var(--surface-2); border-block-start: 1px solid var(--border); }

/* Bootstrap has a .modal of its own and this product still loads it: fixed position, full height,
   and display: none until .show is added. The design's modal declares none of that, so Bootstrap's
   values survived and the dialog stayed invisible inside a visible scrim. The design always puts
   its modal inside a scrim, so the reset is scoped there. */
.scrim .modal {
  position: static;
  inset: auto;
  display: block;
  block-size: auto;
  z-index: auto;
}

.drawer {
  position: fixed;
  inset-block: 0;
  inset-inline-end: 0;
  inline-size: min(420px, 92vw);
  background: var(--surface);
  box-shadow: var(--e4);
  z-index: var(--z-drawer);
  display: flex;
  flex-direction: column;
  overscroll-behavior: contain;
}

/* ----------------------------------------------------------------- 16. Toast */
/* aria-live="polite" on the container. Async results must be announced. */

.toast-region {
  position: fixed;
  inset-block-end: var(--s-5);
  inset-inline-end: var(--s-5);
  z-index: var(--z-toast);
  display: grid;
  gap: var(--s-3);
  max-inline-size: min(360px, calc(100vw - 2 * var(--s-5)));
}
.toast {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  padding: var(--s-4);
  background: var(--ink-900);
  color: var(--text-inverse);
  border-radius: var(--r-md);
  box-shadow: var(--e3);
  font-size: var(--fs-sm);
}
.toast__bar { inline-size: 3px; align-self: stretch; border-radius: 2px; background: var(--success); flex: none; }
.toast--error .toast__bar { background: var(--accent); }

/* --------------------------------------------------------------- 17. Tooltip */

.tooltip { position: relative; display: inline-flex; }
.tooltip__bubble {
  position: absolute;
  inset-block-end: calc(100% + 8px);
  inset-inline-start: 50%;
  transform: translateX(-50%);
  padding: var(--s-2) var(--s-3);
  background: var(--ink-900);
  color: var(--text-inverse);
  border-radius: var(--r-sm);
  font-size: var(--fs-caption);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast) var(--ease);
  z-index: var(--z-raised);
}
.tooltip:hover .tooltip__bubble, .tooltip:focus-within .tooltip__bubble { opacity: 1; }

/* ---------------------------------------------------- 18. Avatar, progress */

/* Squircle, not a circle. */
.avatar {
  inline-size: 40px; block-size: 40px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  font-size: var(--fs-label);
  font-weight: var(--w-semi);
  color: var(--text-muted);
  flex: none;
}
.avatar img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.avatar--lg { inline-size: 56px; block-size: 56px; font-size: var(--fs-body); }

.progress { block-size: 6px; background: var(--surface-3); border-radius: var(--r-pill); overflow: hidden; }
.progress__bar { block-size: 100%; background: var(--brand-500); border-radius: inherit; }
.progress--complete .progress__bar { background: var(--success); }

.ring {
  --pct: 62;
  inline-size: 52px; block-size: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--brand-500) calc(var(--pct) * 1%), var(--surface-3) 0);
  position: relative;
}
.ring::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--surface);
}
.ring span { position: relative; font-size: var(--fs-caption); font-weight: var(--w-semi); font-variant-numeric: tabular-nums; }

.rating { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-caption); color: var(--text-muted); }
.rating__stars { display: inline-flex; gap: 1px; color: var(--warning-text); }

/* --------------------------------------------------- 19. Stat, disclosure */

.stat { display: grid; gap: var(--s-2); }
.stat__label { font-size: var(--fs-caption); color: var(--text-muted); }
.stat__value { font-size: var(--fs-h2); font-weight: var(--w-semi); color: var(--text-strong); font-variant-numeric: tabular-nums; line-height: 1; }
.stat__delta { display: inline-flex; align-items: center; gap: var(--s-1); font-size: var(--fs-caption); font-weight: var(--w-medium); }
.stat__delta--up { color: var(--success-text); }
.stat__delta--down { color: var(--danger-text); }

.disclosure { border-block-end: 1px solid var(--border); }
.disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-block-size: 56px;
  padding-block: var(--s-3);
  cursor: pointer;
  font-weight: var(--w-medium);
  color: var(--text-strong);
  list-style: none;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::after {
  content: '';
  inline-size: 9px; block-size: 9px; flex: none;
  border-inline-end: 2px solid var(--text-muted);
  border-block-end: 2px solid var(--text-muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--t-base) var(--ease);
}
.disclosure[open] > summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.disclosure__body { padding-block-end: var(--s-4); color: var(--text); font-size: var(--fs-sm); }

/* ----------------------------------------------------- 20. Roadmap primitives */
/* The home page roadmap ships today as pasted pdf2htmlEX output: two base64
   page PNGs totalling 660,422 characters in every page load, no interaction.
   These are the primitives that replace it, driven by real data. */

.rail { position: relative; padding-inline-start: var(--s-7); }
.rail::before {
  content: '';
  position: absolute;
  inset-block: 6px;
  inset-inline-start: 11px;
  inline-size: 2px;
  background: var(--border-strong);
}
.rail__item { position: relative; padding-block-end: var(--s-5); }
.rail__item:last-child { padding-block-end: 0; }
.rail__node {
  position: absolute;
  inset-inline-start: calc(-1 * var(--s-7) + 4px);
  inset-block-start: 4px;
  inline-size: 16px; block-size: 16px;
  border-radius: 50%;
  border: 2px solid var(--border-field);
  background: var(--paper);
}
.rail__item--done .rail__node { background: var(--success); border-color: var(--success); }
.rail__item--current .rail__node { background: var(--brand-500); border-color: var(--brand-500); box-shadow: 0 0 0 4px var(--brand-100); }
.rail__label { font-weight: var(--w-medium); color: var(--text-strong); }

.phase-rail { display: flex; gap: var(--s-2); overflow-x: auto; padding-block-end: var(--s-2); scroll-snap-type: x mandatory; }
.phase-tab {
  scroll-snap-align: start;
  flex: none;
  display: grid;
  gap: 2px;
  min-inline-size: 148px;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  text-align: start;
  font: inherit;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.phase-tab:hover { border-color: var(--brand-300); }
.phase-tab[aria-selected='true'] { border-color: var(--brand-500); background: var(--brand-50); }
.phase-tab__no { font-size: var(--fs-caption); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.phase-tab__name { font-size: var(--fs-label); font-weight: var(--w-medium); color: var(--text-strong); }
.phase-tab--done .phase-tab__no::before { content: '✓ '; color: var(--success-text); }

.tool-list { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tool {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 3px var(--s-3);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: var(--fs-caption);
  color: var(--text-muted);
}
.tool--preferred { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-text); font-weight: var(--w-medium); }

/* -------------------------------------------------------- 21. Overlays */
/* Overlays used to float over the content, which is audit finding 14: the cookie banner
   (296x140 at z-index 9999, style.css:8671) sat on top of the roadmap and the enrol button. */

/* The consent card. A corner card rather than a full-width bar: it is the pattern people
   already know, it leaves the page behind it readable, and both answers are equally easy to
   reach, which is what consent rules ask for. Fixed rather than in flow, because a bar in
   flow pushes the footer down and reads as page furniture instead of a question. */
.cookie-bar {
  position: fixed;
  inset-block-end: var(--s-5);
  inset-inline-start: var(--s-5);
  inline-size: min(400px, calc(100vw - var(--s-8)));
  max-block-size: calc(100vh - var(--s-8));
  overflow-y: auto;
  z-index: var(--z-cookie);
  /* It also carries the legacy .cookie-consent class, because the consent markup is injected
     by middleware into every page and the pages that have not been migrated yet only have
     style.css: there it must keep the box it has today (296px wide, 140px tall, fixed, 23px
     of left padding, all of it at style.css:8671). These stop that box showing through here,
     since this sheet is loaded after it. */
  min-block-size: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-lg);
  background: var(--ink-900);
  color: var(--text-inverse);
  box-shadow: var(--e4);
}
.cookie-bar__inner {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-5);
}
/* The card is ink in both themes, so its own text is written in fixed light values rather than
   theme tokens: --text-strong and --btn-fg flip for a light surface and measured 1.02:1 here in
   the light theme, which is where the heading and the second action disappeared. */
.cookie-bar__title { margin: 0; font-size: var(--fs-h5); font-weight: var(--w-semi); color: #FFFFFF; }
.cookie-bar p { margin: 0; font-size: var(--fs-sm); color: #D7D7E6; }
.cookie-bar a { color: #FFFFFF; text-decoration: underline; }
/* The actions carry the classes the package ships (allow-button, primary-btn) because the pages
   that are not migrated yet only have style.css and depend on them. On migrated pages those same
   classes fought the design's button: the two actions measured 46px and 36px tall with tops 10px
   apart, so they did not line up. Geometry is set here so both are one row. */
.cookie-bar__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-block-start: var(--s-1); align-items: center; }
.cookie-bar__actions .btn,
.cookie-bar .allow-button,
.cookie-bar .primary-btn {
  /* The second selector list is the point: a legacy rule on the package's own classes made the
     agree button display:block with a 10px top margin, so the two actions sat 5px apart on
     different rows. Higher specificity here, in the card only. */
  display: inline-flex;
  margin-block: 0;
  min-block-size: 40px;
  padding-block: 0;
  font-size: var(--fs-sm);
}
.cookie-bar .js-cookie-consent-decline {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.28);
}
.cookie-bar .js-cookie-consent-decline:hover { background: rgba(255, 255, 255, 0.12); }
@media (max-width: 640px) {
  .cookie-bar { inset-inline: var(--s-4); inline-size: auto; }
}

/* Reserve clearance for overlays we do not control (the Tidio bubble). Space is
   reserved rather than floated over, which is the fix for audit finding 14. */
body { padding-block-end: 0; }
body.has-cookie-bar { padding-block-end: calc(var(--proto-bar-h, 0px) + 96px); }
body.has-prototype-bar { padding-block-end: var(--proto-bar-h, 108px); }

.chat-clearance { block-size: 72px; }

/* Announcement strip. Announcements are already public pages in the sitemap but
   no visitor can reach them: the megaphone only renders for role == 1. */
.announce {
  display: flex;
  gap: var(--s-3);
  align-items: center;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--brand-500);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: var(--fs-sm);
}
.announce--new { background: var(--brand-50); border-inline-start-color: var(--brand-500); }
.announce__date { font-size: var(--fs-caption); color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ------------------------------------------ 22. Roadmap component (production) */
/* Rendered by roadmap.js from roadmap-data.js. Replaces home.blade.php:221-549,
   which is 660,422 characters of base64 artwork with no interaction at all. */

.rmp { display: grid; gap: var(--s-5); }
.rmp__head { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; justify-content: space-between; }
.rmp__trackmeta { max-inline-size: 62ch; }
.rmp__tracktitle { font-size: var(--fs-h4); margin-block-end: var(--s-1); }
.rmp__tracksummary { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); }
.rmp__rail { padding-block: var(--s-2) var(--s-3); border-block: 1px solid var(--border); }
.phase-tab--current { box-shadow: inset 0 0 0 1px var(--brand-300); }
.rmp__detail {
  display: grid;
  gap: var(--s-5);
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.rmp__detailhead { display: grid; gap: var(--s-2); }
.rmp__title { font-size: var(--fs-h3); }
.rmp__summary { margin: 0; color: var(--text); }
.rmp__group { display: grid; gap: var(--s-2); }
.rmp__grouplabel { margin: 0; font-size: var(--fs-label); font-weight: var(--w-medium); color: var(--text-strong); }
.rmp__courses { display: grid; gap: var(--s-3); border-block-start: 1px solid var(--border); padding-block-start: var(--s-5); }
.rmp__courseshead { font-size: var(--fs-label); font-weight: var(--w-medium); color: var(--text-muted); }
.rmp__coursegrid { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.rmp-course {
  display: grid;
  gap: var(--s-2);
  align-content: start;
  padding: var(--s-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.rmp-course__title { font-size: var(--fs-h6); }
.rmp-course__meta { margin: 0; display: flex; flex-wrap: wrap; gap: var(--s-3); font-size: var(--fs-caption); color: var(--text-muted); }
.rmp-course .badge { justify-self: start; }
.rmp__note, .rmp__source { margin: 0; font-size: var(--fs-caption); color: var(--text-muted); }
.rmp__source { padding: var(--s-3); background: var(--surface-3); border-radius: var(--r-sm); }
.rmp--compact .rmp__detail { padding: var(--s-4); }
.rmp--compact .rmp__coursegrid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
/* Compact variant stacks the track switcher above its description: side by side
   the two blocks look unrelated at this width. */
.rmp--compact .rmp__head { flex-direction: column; align-items: flex-start; gap: var(--s-3); }

@media (max-width: 720px) {
  .phase-rail { flex-direction: column; overflow-x: visible; }
  .phase-tab { min-inline-size: 0; inline-size: 100%; }
}

/* ------------------------------------------- 22b. Roadmap journey (the path) */
/* The phases as one route rather than a rail of tabs with a panel detached below it: each phase
   is a node, and the chosen one opens where its own number is, so the detail never drifts away
   from the phase it belongs to. The numbered marks borrow the .step vocabulary the system
   already carries, and the open body reuses .rmp__detail wholesale. */

.journey { list-style: none; margin: 0; padding: 0; }
.journey__node { position: relative; padding-inline-start: var(--s-7); }

/* The route: one line down through every mark, stopped after the last node so it does not run on
   past the end of the road. */
.journey__node::before {
  content: '';
  position: absolute;
  inset-block-start: 34px;
  inset-block-end: 0;
  inset-inline-start: 15px;
  inline-size: 2px;
  background: var(--border);
}
.journey__node:last-child::before { content: none; }

.journey__head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--s-3);
  inline-size: 100%;
  margin: 0;
  padding: var(--s-3) 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--text-strong);
  text-align: start;
  cursor: pointer;
}
.journey__mark {
  display: grid;
  place-items: center;
  inline-size: 32px;
  block-size: 32px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  font-size: var(--fs-caption);
  font-variant-numeric: tabular-nums;
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.journey__head:hover .journey__mark { border-color: var(--brand-300); color: var(--brand-700); }
.journey__label { display: grid; gap: 2px; }
.journey__title { font-weight: var(--w-medium); }
.journey__meta { font-size: var(--fs-caption); color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* Open: the number fills in and the title steps up, so which phase is open is unmistakable
   without introducing a second accent colour. */
.journey__node.is-open .journey__mark {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: var(--text-on-brand);
}
.journey__node.is-open .journey__title { font-size: var(--fs-h6); }
.journey__node.is-open > .journey__body { margin-block-end: var(--s-5); }

@media (min-width: 900px) {
  .journey__node { padding-inline-start: var(--s-8); }
  .journey__node::before { inset-block-start: 42px; inset-inline-start: 19px; }
  .journey__mark { inline-size: 40px; block-size: 40px; font-size: var(--fs-label); }
}

/* The tool filter, and what a filtered path looks like. A match keeps its node and the rest
   recede rather than disappear: the shape of the route is the point, and nothing a visitor was
   reading should vanish underneath them. */
.rmp__filters { display: grid; gap: var(--s-2); }
.segmented__item .chip__count { color: inherit; opacity: 0.7; margin-inline-start: var(--s-2); }
.journey__node.is-dim { opacity: 0.4; }
.journey__node.is-match .journey__mark { border-color: var(--brand-500); color: var(--brand-700); }

/* The visitor's own track: the three questions and the track they build, in one panel, so the
   answers sit directly under the tab that owns them rather than in a card above the tabs. */
.rmp__builder {
  display: grid;
  gap: var(--s-4);
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.rmp__pathq { display: grid; gap: var(--s-2); }
/* The reset sits at the trailing edge, away from the questions it undoes. */
.rmp__pathactions { display: flex; justify-content: flex-end; }

/* The simplified roadmap list: a number, the phase, and what it covers. The journey above it was
   retired from the home page as too much machinery for a band; its styles stay because the
   roadmap page will use them, along with the tool filter's. */
.rmp__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.rmp__listitem {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s-3);
  align-items: baseline;
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--t-base) var(--ease), opacity var(--t-base) var(--ease);
}
.rmp__listitem.is-match { border-color: var(--brand-300); }
.rmp__listno {
  display: grid;
  place-items: center;
  inline-size: 28px;
  block-size: 28px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: var(--fs-caption);
  font-variant-numeric: tabular-nums;
}
.rmp__listtitle { font-weight: var(--w-medium); color: var(--text-strong); text-decoration: none; }
.rmp__listtitle:hover { color: var(--link); text-decoration: underline; }
.rmp__listmeta { display: block; font-size: var(--fs-caption); color: var(--text-muted); }

/* ------------------------------------------------- 23. Prototype-only helpers */
/* Not production CSS: forces states that a reviewer cannot trigger with a mouse
   so the gallery can show hover, focus and active next to each other. */

.is-hover { background: var(--surface-2); border-color: var(--text-muted); }
.btn--primary.is-hover { background: var(--brand-600); border-color: var(--brand-600); }
.is-focus { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.is-active { transform: translateY(1px); }
.state-note { font-size: var(--fs-caption); color: var(--text-muted); }

/* --------------------------------------------------- 24. Filters and toolbars
*/
/* One filter rail, shared by the catalogue and the mentorship list. Those two
   screens had each grown HALF of this block — the catalogue the option rows and the
   counts, the mentorship screen the collapsible header — so the rail rendered
   differently on each despite looking like the same component. This is the union,
   and it is what the Blade port should carry.

   The visible heading of a facet is a button inside the fieldset, not the legend: a
   legend left in flow is painted as a gap in the fieldset's border, which reads as a
   broken edge around the collapse control. The legend stays in the markup, out of
   flow, so the checkbox set keeps its accessible name. */
/* The card a facet sits in, then the fieldset border it shares with the rail. */
.facet { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); padding: var(--s-4); }
fieldset.facet { border-color: var(--border); }
.facet__list { display: grid; gap: var(--s-1); margin-block-start: var(--s-3); }
.facet__opt {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-block-size: 36px;
  font-size: var(--fs-sm);
  cursor: pointer;
}
.facet__opt input { inline-size: 18px; block-size: 18px; accent-color: var(--brand-600); flex: none; margin: 0; }
.facet__opt:hover { color: var(--text-strong); }
.facet__count {
  margin-inline-start: auto;
  font-size: var(--fs-caption);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.facet__opt:has(input:disabled) { color: var(--text-disabled); cursor: not-allowed; }
.facet__opt:has(input:checked) { font-weight: var(--w-medium); color: var(--text-strong); }

/* Collapsible facets. A facet with nothing selected starts closed, so the rail is a
   few scannable lines instead of five open panels, and one with a selection opens
   itself, so a shared link arrives showing what is applied to it. A toggle the
   reviewer has worked overrides that for the session. */
.facet__toggle {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  inline-size: 100%;
  min-block-size: 36px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-strong);
  font: inherit;
  font-size: var(--fs-label);
  font-weight: var(--w-medium);
  text-align: start;
  cursor: pointer;
}
.facet__toggle:hover { color: var(--brand-700); }
.facet__chevron { margin-inline-start: auto; transition: transform var(--t-fast) var(--ease); }
.facet__toggle[aria-expanded='false'] .facet__chevron { transform: rotate(-90deg); }
[dir='rtl'] .facet__toggle[aria-expanded='false'] .facet__chevron { transform: rotate(90deg); }
.facet__state { font-weight: 400; font-size: var(--fs-caption); color: var(--text-muted); }
.facet__toggle[aria-expanded='true'] .facet__state { color: var(--brand-700); }
.facet[data-collapsed] .facet__body { display: none; }
/* Arriving from a chip: ring the group you were sent to, once. */
.facet.is-flash { animation: facet-flash 1400ms var(--ease) 1; }
@keyframes facet-flash {
  0%, 100% { box-shadow: 0 0 0 0 var(--brand-500); }
  25% { box-shadow: 0 0 0 3px var(--brand-500); }
}
@media (prefers-reduced-motion: reduce) {
  .facet.is-flash { animation: none; border-color: var(--brand-500); }
  .facet__chevron { transition: none; }
}

/* An applied filter does two jobs, so it is two controls inside one pill: the label
   takes you to the group, the cross takes the filter off. */
.chip--applied { padding-inline: 0; gap: 0; }
.chip--applied button {
  display: inline-flex;
  align-items: center;
  min-block-size: 34px;
  padding-inline: var(--s-3);
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: var(--fs-label);
  cursor: pointer;
}
.chip--applied .chip__go { font-weight: var(--w-medium); }
.chip--applied .chip__x {
  padding-inline: var(--s-2);
  border-inline-start: 1px solid var(--border-field);
  font-size: var(--fs-sm);
  line-height: 1;
}
.chip--applied .chip__x:hover { background: var(--brand-50); color: var(--brand-700); }

/* A range filter: two labelled number fields side by side. */
.pricebox { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); margin-block-start: var(--s-3); }
.pricebox label { display: block; font-size: var(--fs-caption); color: var(--text-muted); margin-block-end: 4px; }
.pricebox input {
  inline-size: 100%;
  min-block-size: 40px;
  padding-inline: var(--s-3);
  border: 1px solid var(--border-field);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}

/* The row above a list: what is shown on the left, how to sort it on the right. */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
  justify-content: space-between;
  margin-block-end: var(--s-5);
}
.toolbar__group, .sort { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
/* One control style for every select, rather than one per component. The sort control and the page
   size are the same control; the page size sits in the pager rather than in the toolbar, which is
   how it came to render as a browser default. Low specificity on purpose, so a component that
   styles its own select still can. */
select {
  min-block-size: 40px;
  padding-inline: var(--s-3) var(--s-5);
  border: 1px solid var(--border-field);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-sm);
}

/* Inline code. max(), not 0.94em alone: inside a 12px caption the plain shrink lands
   at 11.28px and breaks the minimum type size the audit checks. */
code {
  font-family: var(--font-num);
  font-size: max(0.94em, 12px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  padding-inline: 4px;
}

/* ------------------------------------------------------ 25. Course details */
/* One course: a head that pairs the page with its buy column, a tab strip, and the
   five panels behind it.

   The panels live inside the content column, not beside it. As siblings after the
   grid they began below the taller buy column instead of below the tabs, which is
   the gap that pushed every tab's content to the foot of the screen. */

/* minmax(0, 1fr) at every width, not only on the wide layout. An auto-sized column is
   min-content sized, and the tab strip's min-content is the sum of its tabs, so the strip
   pushed the whole page 80px wider than a 420px phone instead of scrolling inside itself. */
/* A main column with a narrow one beside it: the course page's head and buy card, and the profile
   page's content and its own card. Named for the shape rather than for the first page that needed
   it, since the second page reusing it is what makes it a component. */
.content-aside { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-7); align-items: start; margin-block: var(--s-6) var(--s-7); }
@media (min-width: 1000px) { .content-aside { grid-template-columns: minmax(0, 1fr) 336px; } }

/* The heading's own call to action. On a phone there is one column, so the buy card
   lands after the panels; this is what keeps an action above the fold there. */
.head-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-block-start: var(--s-5); }

/* Author, duration, level, language, rating: one line of facts under the title,
   wrapping rather than truncating. */
.facts { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); font-size: var(--fs-sm); color: var(--text-muted); margin-block-start: var(--s-3); }
.facts > span { display: inline-flex; align-items: center; gap: var(--s-2); }

/* The summary line. Not .panel p: this one sits in the head, above the tab strip. */
.course-lede { margin-block-start: var(--s-4); color: var(--text-muted); max-inline-size: 68ch; }

/* Standalone crumbs: the course page has no page-head band, so the trail stands on the page
   itself and takes the same air the band gives it everywhere else. Without this it began at
   the header's own bottom edge, 32px tighter than every other page's. */
.crumbs--standalone { margin-block-start: var(--s-6); }

/* The head's vertical rhythm. The sheet carried these as inline styles; as scoped rules
   they are one place instead of four attributes, and nothing else that uses a chip row, the
   credit block or a tab strip inherits this column's spacing. Without them the credit block
   sat flush against the calls to action and the tab strip flush against the credit, which
   read as one run-on block. */
.course-badges { margin-block-start: var(--s-5); }
.head-actions + .chips { margin-block-start: var(--s-3); }
.course-col > .credit { margin-block-start: var(--s-5); }
.course-col > .tabs { margin-block-start: var(--s-7); }

/* ------------------------------------------------------- the buy column -- */
.buy { display: grid; gap: var(--s-4); }
@media (min-width: 1000px) {
  .buy { position: sticky; inset-block-start: calc(var(--header-h) + var(--s-4)); }
}
.buy__card { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.buy__media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-3); }
.buy__media img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.buy__play {
  position: absolute; inset-block-end: var(--s-3); inset-inline-start: var(--s-3);
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-block-size: 40px; padding-inline: var(--s-3);
  border: 0; border-radius: var(--r-pill);
  background: var(--ink-900); color: var(--text-inverse);
  font: inherit; font-size: var(--fs-label); font-weight: var(--w-medium);
  cursor: pointer; box-shadow: var(--e2);
}
.buy__play:hover { background: var(--ink-800); }
.buy__body { padding: var(--s-5); display: grid; gap: var(--s-4); }

/* The base paragraph rule carries a 16px bottom margin, and grid items do not collapse
   margins the way blocks do, so every paragraph here was a 16px gap plus a 16px margin.
   The price sat 32px from its note while the buttons below sat 16px apart. The grid's own
   gap is the whole spacing in this card. */
.buy__body > * { margin-block: 0; }
.buy__price { display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap; }
.buy__old { font-size: var(--fs-body); color: var(--text-muted); text-decoration: line-through; font-variant-numeric: tabular-nums; }
.buy__off { font-size: var(--fs-caption); font-weight: var(--w-semi); color: var(--accent-text); }
.buy__ends { font-size: var(--fs-caption); color: var(--accent-text); display: flex; align-items: center; gap: var(--s-2); }
.buy__note { font-size: var(--fs-caption); color: var(--text-muted); text-align: center; }

/* What the course contains, as label and value pairs. Rows with nothing to say are
   not rendered rather than shown as zero. */
.includes { display: grid; gap: var(--s-3); font-size: var(--fs-sm); margin: 0; padding: 0; list-style: none; }
.includes li { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.includes dt, .includes .k { color: var(--text-muted); }
.includes .v { color: var(--text-strong); font-weight: var(--w-medium); }

/* --------------------------------------------------------------- panels -- */
.panel { padding-block: var(--s-6) var(--s-7); }
.panel h2 { font-size: var(--fs-h4); margin-block-end: var(--s-4); }
.panel h3 { font-size: var(--fs-h6); margin-block: var(--s-6) var(--s-3); }
.panel p { color: var(--text-muted); max-inline-size: 72ch; }

/* "What you will be able to do": a tick per line, never one long paragraph. */
.learn { display: grid; gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.learn li { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--fs-sm); }
.learn svg { flex: none; margin-block-start: 3px; color: var(--success-text); }

/* ----------------------------------------------------------- curriculum -- */
.curr__bar { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; justify-content: space-between; margin-block-end: var(--s-4); }
.curr__sec { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.curr__sec + .curr__sec { margin-block-start: var(--s-3); }
.curr__toggle {
  display: flex; align-items: center; gap: var(--s-3);
  inline-size: 100%; min-block-size: 56px;
  padding: var(--s-3) var(--s-4);
  border: 0; background: var(--surface-2); color: var(--text-strong);
  font: inherit; font-size: var(--fs-sm); font-weight: var(--w-medium);
  text-align: start; cursor: pointer;
}
.curr__toggle:hover { background: var(--surface-3); }
.curr__no {
  display: grid; place-items: center; flex: none;
  inline-size: 26px; block-size: 26px;
  border-radius: 50%; background: var(--brand-50); color: var(--brand-700);
  font-size: var(--fs-caption); font-variant-numeric: tabular-nums;
}
.curr__meta { margin-inline-start: auto; font-size: var(--fs-caption); font-weight: 400; color: var(--text-muted); }
.curr__chevron { flex: none; transition: transform var(--t-fast) var(--ease); }
.curr__toggle[aria-expanded='false'] .curr__chevron { transform: rotate(-90deg); }
[dir='rtl'] .curr__toggle[aria-expanded='false'] .curr__chevron { transform: rotate(90deg); }
.curr__sec[data-collapsed] .lec { display: none; }

.lec { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid var(--border); }
.lec__item { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); font-size: var(--fs-sm); }
.lec__item + .lec__item { border-block-start: 1px solid var(--border); }
.lec__item:hover { background: var(--surface-2); }
.lec__icon { flex: none; color: var(--text-muted); }
.lec__title { min-inline-size: 0; }
.lec__dur { margin-inline-start: auto; color: var(--text-muted); font-size: var(--fs-caption); }
.lec__badge { flex: none; }
.lec--locked .lec__title { color: var(--text-muted); }

/* The row is the control. The design's list item keeps its markup, so the button is a sibling of
   the row's text under an absolute overlay rather than a wrapper: the whole line responds, not
   just its title, and the row keeps the shape the design gave it. */
.lec__item { position: relative; }
.lec__play {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: none;
  cursor: pointer;
}
.lec__play:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }

/* A locked lecture has no control, so the row must not offer the hover a live one does. */
.lec--locked:hover { background: none; }

.curr__note { margin-block-start: var(--s-4); max-inline-size: 72ch; }

/* ------------------------------------------------------- 25b. Lecture player */
/* One dialog for every lecture on a course page. The design's modal is sized for forms; a
   lecture needs the width, and the slots below it are the media kinds a lecture can be. */

.modal--player { inline-size: min(880px, 100%); }
.modal__title { font-size: var(--fs-h5); }

.lecture-stage { display: grid; }
.lecture-stage video { inline-size: 100%; aspect-ratio: 16 / 9; background: var(--ink-900); }
.lecture-stage audio { inline-size: 100%; }
.lecture-stage iframe { inline-size: 100%; aspect-ratio: 16 / 9; border: 0; background: var(--surface-2); }
.lecture-stage img {
  inline-size: 100%;
  max-block-size: 70vh;
  object-fit: contain;
  background: var(--surface-2);
  border-radius: var(--r-sm);
}
.lecture-stage__text { font-size: var(--fs-sm); color: var(--text); }

/* -------------------------------------------------- 25c. Threads, instructor */
/* A thread is a card with its replies indented inside it, so a long conversation still reads as
   one thread rather than as a flat list of messages. */
.thread__head { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.thread__who { font-weight: var(--w-medium); color: var(--text-strong); }
.thread__when { font-size: var(--fs-caption); color: var(--text-muted); margin-inline-start: auto; }
.thread__body { margin-block-start: var(--s-3); font-size: var(--fs-sm); color: var(--text); }
.thread__body p:last-child { margin-block-end: 0; }
.thread__meta { margin-block-start: var(--s-3); }
.thread__replies {
  display: grid;
  gap: var(--s-4);
  margin-block-start: var(--s-4);
  padding-inline-start: var(--s-4);
  border-inline-start: 2px solid var(--border);
}
.thread__reply { display: grid; }
.thread__join { margin-block-start: var(--s-5); }

/* The instructor's name is the card's own heading, so it takes no heading rhythm of its own. */
.whocard h3 { margin-block: 0; }
.whocard h3 a { color: inherit; text-decoration: none; }
.whocard h3 a:hover { color: var(--link); }
.whocard__facts { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); font-size: var(--fs-caption); color: var(--text-muted); margin-block-start: var(--s-3); }

/* The other courses by the same instructor, in the grid the sheet uses for them. Not the catalogue's
   Bootstrap row: its negative margins sat the cards twelve pixels inside the panel on one side and
   flush on the other.

   The sheet asks for a 255px minimum, which was measured against a wider column than this one: at
   the course page's 808px content column, 255 fits two cards and leaves the third alone on a row.
   240 fits the three the section shows, and lands within a few pixels of the sheet's own card. */
.grid-cards { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* -------------------------------------------------------------- reviews -- */
.revsum { display: grid; gap: var(--s-5); align-items: center; }
@media (min-width: 760px) { .revsum { grid-template-columns: 200px minmax(0, 1fr); } }
.revsum__avg { text-align: center; }
.revsum__avg b { display: block; font-size: 3rem; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text-strong); }
/* The average and its stars are centred with the number above them. */
.revsum__avg .rating { justify-content: center; }
.revdist { display: grid; gap: var(--s-2); }
.revdist__row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 64px; gap: var(--s-3); align-items: center; font-size: var(--fs-caption); color: var(--text-muted); }
.revdist__bar { block-size: 8px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.revdist__fill { block-size: 100%; background: var(--brand-500); }
.reviews { display: grid; gap: var(--s-4); margin-block-start: var(--s-6); }
.review { border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-4); background: var(--surface); }
.review__head { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.review__who { font-weight: var(--w-medium); color: var(--text-strong); }
.review__when { font-size: var(--fs-caption); color: var(--text-muted); margin-inline-start: auto; }
.review__body { margin-block: var(--s-3) 0; font-size: var(--fs-sm); color: var(--text); }

/* ------------------------------------------------------------ instructor -- */
.whocard { display: grid; gap: var(--s-4); grid-template-columns: 64px minmax(0, 1fr); align-items: start; }
.whocard__avatar {
  inline-size: 64px; block-size: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-100); color: var(--brand-700);
  font-size: var(--fs-h5); font-weight: var(--w-semi);
}

/* ------------------------------------------------------- mentorship list -- */
/* The listing half of 08-mentors.html. The sheet keeps these page-scoped, which is right for a
   prototype and wrong for the platform: the mentorship list is a real screen with its own URL, and
   the same card is what the profile page and the course page's instructor tab will use once they
   move. The rail, the toolbar, the pager, the empty state and the facet rows are already shared
   components and are not restated here.

   The card's optional line, the prototype's "next free slot", has no rule: the list is built from
   instructor and organization rows, which carry no calendar, so the line is not rendered rather
   than rendered empty. */
.mentors { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.mentors > .empty { grid-column: 1 / -1; }
.mentor {
  display: grid; gap: var(--s-4); padding: var(--s-5);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface); align-content: start;
}
.mentor:hover { border-color: var(--brand-500); }
/* The avatar is the design system's own, at its large size, which is the width this column is. */
.mentor__head { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--s-4); align-items: center; }
.mentor__name { margin: 0; font-size: var(--fs-h6); }
.mentor__rate { font-size: var(--fs-sm); color: var(--text-muted); }
.mentor__stats { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); font-size: var(--fs-caption); color: var(--text-muted); }
.mentor__foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  border-block-start: 1px solid var(--border); padding-block-start: var(--s-4);
}

/* -------------------------------------------------- mentorship booking -- */
/* The booking half of 08-mentors.html, ported whole: the week of days, the slots inside a day, the
   summary column beside them, the reading of a time in a zone, and the close control of the dialog
   they open in. The dialog is the design's own `.scrim` + `.modal`, which section 15 already
   carries, so only the close button had to come across.

   Left in the sheet: the state preview (`.seg-row`, `.segmented`) and the lifecycle list
   (`.lifecycle`), which describe the signed-in side of a booking and have no public screen; and
   `.cal__host` and `.legend`, which only that file's own markup used.

   One departure: the sheet draws the week at seven equal columns, which at a phone's width leaves
   roughly fifty pixels per day and wraps every label. Below 700px the strip keeps its days at a
   readable width and scrolls sideways instead. */
.book { display: grid; gap: var(--s-6); align-items: start; }
@media (min-width: 1000px) { .book { grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-7); } }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s-2); overflow-x: auto; }
@media (max-width: 700px) { .week { grid-template-columns: repeat(7, 72px); } }
.day {
  display: grid; gap: 2px; justify-items: center;
  padding: var(--s-3) 2px; border: 1px solid var(--border-field); border-radius: var(--r-md);
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer;
}
.day:hover { border-color: var(--brand-500); }
.day[aria-pressed='true'] { background: var(--brand-500); border-color: var(--brand-500); color: var(--text-on-brand); }
.day[disabled] { color: var(--text-disabled); border-color: var(--border); background: var(--surface-2); cursor: not-allowed; }
.day__dow { font-size: var(--fs-caption); }
.day__num { font-size: var(--fs-h6); font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }
.day__free { font-size: var(--fs-caption); opacity: .9; }

.slots { display: grid; gap: var(--s-2); grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); margin-block-start: var(--s-3); }
.slot {
  position: relative; display: grid; gap: 2px; padding: var(--s-3);
  border: 1px solid var(--border-field); border-radius: var(--r-md);
  background: var(--surface); cursor: pointer; font-size: var(--fs-sm);
}
.slot:hover { border-color: var(--brand-500); }
.slot input { position: absolute; inset-block-start: var(--s-3); inset-inline-end: var(--s-3); inline-size: 18px; block-size: 18px; accent-color: var(--brand-600); }
.slot:has(input:checked) { border-color: var(--brand-500); background: var(--brand-50); }
.slot__time { font-weight: var(--w-medium); color: var(--text-strong); padding-inline-end: var(--s-6); font-variant-numeric: tabular-nums; }
.slot__meta { font-size: var(--fs-caption); color: var(--text-muted); }
/* The reading that was not asked for, kept small and beside the one that was. */
.slot__alt { font-size: var(--fs-caption); color: var(--text-muted); }

.book__side { display: grid; gap: var(--s-4); }
@media (min-width: 1000px) { .book__side { position: sticky; inset-block-start: calc(var(--header-h) + var(--s-4)); } }

.summary { display: grid; gap: var(--s-3); margin: 0; }
.summary div { display: flex; justify-content: space-between; gap: var(--s-3); font-size: var(--fs-sm); }
.summary dt, .summary .k { color: var(--text-muted); }
.summary dd { margin: 0; }
.summary .v { color: var(--text-strong); font-weight: var(--w-medium); }

.tz { display: flex; align-items: flex-start; gap: var(--s-2); font-size: var(--fs-caption); color: var(--text-muted); }
/* Inline, so the globe is the first character of the notice rather than a column beside a text
   block. Two classes because the base .tz rule sets flex and would otherwise win. */
.tz.tz--notice { display: block; }
.tz--notice svg { display: inline; vertical-align: -0.125em; margin-inline-end: var(--s-1); }
.tz--notice .btn { display: inline; margin: 0; padding-inline: 0; vertical-align: baseline; }

.cal__pick { margin: 0; font-size: var(--fs-sm); color: var(--text); }
.cal__pick strong { color: var(--text-strong); }
.cal__none { color: var(--text-muted); }

.modal__close {
  display: inline-flex; align-items: center; justify-content: center;
  inline-size: 36px; block-size: 36px; flex: none;
  border: 1px solid var(--border-field); border-radius: var(--r-pill);
  background: var(--surface); color: var(--text-muted); font: inherit; font-size: var(--fs-h6);
  cursor: pointer; line-height: 1;
}
.modal__close:hover { border-color: var(--brand-500); color: var(--brand-700); }
/* The row of actions in a dialog's foot. The sheet keeps this in its own page block, and the booking
   dialog is the only place this project uses it: without it the foot's two actions stack, because a
   plain div inside a flex row is a block. */
.modal__actions { display: flex; gap: var(--s-3); }
/* The booking dialog carries a week, a day's slots and the summary beside them: wider than the
   design's default 560px, and than the sheet's own 680px, which had no summary column. */
.modal--booking { inline-size: min(880px, 100%); }


/* =============================================================================
   Visuals: product mocks, motifs, and the illustration slot.
   -----------------------------------------------------------------------------
   Everything here is authored as SVG or CSS in this repo, so it works offline,
   carries no licence and stays on brand. Nothing is hotlinked.

   IMAGERY SOURCING DECISION, and why it is not stock illustrations yet:

     The vector stock libraries were checked before pulling anything in.
       unDraw            free for commercial use, no attribution required - BUT
                         the licence prohibits automated download, scrape, link or
                         embed of its assets, and prohibits AI/ML training use. So
                         assets from it must be downloaded by hand from their site,
                         which means they are a swap-in, not something I fetch.
       Hero Patterns     CC BY 4.0, attribution required, and it only ships
                         background patterns, no illustrations.
       SVG Repo          rate limited before the terms could be confirmed.
       Publicdomainvectors / Openclipart
                         CC0, so redistribution is fine, but the quality and the
                         consistency are not there for a hero.
       DrawKit / Storyset / Blush
                         mixed tiers; the usable free ones need per-asset checks.

     So the visuals in this prototype are drawn here, and every image in the
     design is a slot with a fixed aspect ratio that a real asset can replace
     without touching layout. See ASSETS.md for the manifest and the swap steps.

   WHY DRAWN BEATS STOCK HERE: a flat "people at a laptop" illustration would
   fight the bold ink hero and say nothing about DevOps. A terminal, a cluster
   diagram and a pipeline read instantly, at any size, to the actual audience.
   ========================================================================== */

/* --------------------------------------------------------- 1. Product mock */
/* Real markup, not a screenshot, so it stays sharp, reflows, and can be read
   at 5% of the file size. role="img" collapses it into one node for a screen
   reader with a description that says what it demonstrates. */

.mock {
  --mock-bg: #06062B;
  --mock-bd: rgba(255, 255, 255, 0.14);
  --mock-fg: #D7D7E6;
  --mock-dim: #8C8CAB;

  border: 1px solid var(--mock-bd);
  border-radius: var(--r-lg);
  background: var(--mock-bg);
  overflow: hidden;
  box-shadow: var(--shadow-ink);
}
.mock__bar {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: rgba(255, 255, 255, 0.05);
  border-block-end: 1px solid var(--mock-bd);
}
.mock__name { font-size: var(--fs-caption); color: #A9A9C4; font-variant-numeric: tabular-nums; }
.mock__lights { display: flex; gap: 5px; margin-inline-start: auto; }
.mock__lights i {
  inline-size: 9px;
  block-size: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}
.mock__lights i:first-child { background: var(--accent); }
.mock__lights i:nth-child(2) { background: var(--warning); }
.mock__lights i:last-child { background: var(--success); }

.mock__body {
  margin: 0;
  padding: var(--s-5);
  font-family: var(--font-num);
  font-size: 13px;
  line-height: 1.75;
  color: var(--mock-fg);
  overflow-x: auto;
  tab-size: 2;
}
.mock__body b { color: var(--brand-300); font-weight: 400; }
.mock__body em { color: var(--mock-dim); font-style: normal; }
.mock__body i { color: var(--success); font-style: normal; }
.mock__body u { color: var(--accent); text-decoration: none; }
/* style.css gives bare code and pre elements a light plate and inline padding, and a
   bare-element rule applies directly to this markup: every line of the terminal came out on a
   pale strip and shifted left. Reset inside the mock, which draws its own surface. */
.mock__body code {
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
  color: inherit;
  font: inherit;
}

@media (max-width: 640px) {
  .mock__body { font-size: 11.5px; padding: var(--s-4); }
}

/* The floating card that overlaps the mock. Every design system needs at least
   one place where two surfaces overlap; flat rows side by side is what makes a
   layout feel like a wireframe. */
.float-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-brand);
  padding: var(--s-4) var(--s-5);
  display: grid;
  gap: var(--s-3);
}
.float-card__head { display: flex; align-items: center; gap: var(--s-3); }
.float-card__seal {
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  border-radius: var(--r-md);
  background: var(--success-tint);
  color: var(--success-text);
  flex: none;
}
.float-card__title { font-weight: var(--w-medium); color: var(--text-strong); font-size: var(--fs-sm); }
.float-card__id { font-size: var(--fs-caption); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.float-card__row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; font-size: var(--fs-caption); color: var(--text-muted); }

/* ----------------------------------------------------------- 2. Motifs */
/* Decorative only, always aria-hidden, never carrying meaning. Positioned to
   bleed off the edge so the composition is not a tidy centred column. */

.motif { position: absolute; pointer-events: none; color: var(--hero-accent); opacity: 0.5; }
.motif--grid {
  inset-block-start: -40px;
  inset-inline-end: -60px;
  inline-size: 420px;
  block-size: 420px;
  opacity: 0.35;
}
.motif--rings { inset-block-end: -120px; inset-inline-start: -100px; inline-size: 380px; block-size: 380px; opacity: 0.22; }
.motif--glow {
  inline-size: 620px;
  block-size: 620px;
  background: var(--glow-brand);
  opacity: 1;
  border-radius: 50%;
  filter: blur(2px);
}
.motif--glow-coral {
  inset-inline-end: 12%;
  inset-block-start: 56%;
  inline-size: 320px;
  block-size: 320px;
  background: var(--glow-coral);
  opacity: 1;
  border-radius: 50%;
}

/* ------------------------------------------------------ 3. Illustration slot */
/* A fixed aspect ratio box that holds either an authored SVG or a real vector
   asset. Swapping the asset never moves the layout, which is the whole point of
   declaring the slot. In the prototype the slot is visible when empty. */

.illus {
  position: relative;
  aspect-ratio: var(--illus-ratio, 4 / 3);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--surface-2);
}
.illus > svg, .illus > img { inline-size: 100%; block-size: 100%; object-fit: contain; }
.illus--empty { border: 1px dashed var(--border-field); }
.illus--empty::after {
  content: attr(data-slot);
  font-size: var(--fs-caption);
  color: var(--text-muted);
  text-align: center;
  padding: var(--s-4);
}
.illus--wide { --illus-ratio: 16 / 9; }
.illus--square { --illus-ratio: 1 / 1; }
.illus--brand { background: var(--brand-50); }

/* Small inline figure used inside a feature card. */
.figure-mark { inline-size: 100%; block-size: auto; }

/* --------------------------------------------------------- 4. Diagram */
/* The pipeline diagram in "what you get". Authored nodes and connectors so it
   can be recoloured from tokens rather than being a dead image. */

.diagram { display: grid; gap: var(--s-4); }
.diagram__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.diagram__node {
  display: grid;
  gap: 2px;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  min-inline-size: 104px;
}
.diagram__node b { font-size: var(--fs-label); color: var(--text-strong); font-weight: var(--w-medium); }
.diagram__node span { font-size: var(--fs-caption); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.diagram__node--done { border-color: var(--success-text); background: var(--success-tint); }
.diagram__node--doing { border-color: var(--brand-500); background: var(--brand-50); }
.diagram__link { inline-size: 22px; block-size: 2px; background: var(--border-strong); flex: none; }


/* =============================================================================
   Site chrome and page sections. Production intent.
   -----------------------------------------------------------------------------
   Header, navigation, drawers, announcement surfaces, footer, overlays, page
   header, hero and the home page bands. Loaded after components.css.

   Maps onto: frontend/layouts/navbar.blade.php, frontend/layouts/footer.blade.php,
   frontend/layouts/app.blade.php, resources/views/errors/404.blade.php,
   resources/views/vendor/cookie-consent/*, and frontend/home/home.blade.php.
   ========================================================================== */

/* ------------------------------------------------------------- 1. Site header */

:root { --header-h: 72px; }

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: var(--z-sticky);
  background: var(--surface);
  border-block-end: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  min-block-size: 72px;
}
.brand { display: flex; align-items: center; flex: none; }
.brand img { block-size: 34px; inline-size: auto; }

/* The logo carries its own artwork per ground, so it never needs a white plate.
   display:none also drops the hidden variant out of the accessibility tree, so
   only the visible logo is announced. */
.logo--on-dark { display: block; }
.logo--on-light { display: none; }
.site-header.is-stuck .logo--on-dark, .site-header--solid .logo--on-dark { display: none; }
.site-header.is-stuck .logo--on-light, .site-header--solid .logo--on-light { display: block; }
/* The solid header's surface follows the theme, so the logo variant does too. In the dark theme
   that surface is dark, and the dark-ink artwork set above would disappear on it: the swap is
   driven by the theme as well as by the scroll. */
[data-theme='dark'] .site-header.is-stuck .logo--on-dark,
[data-theme='dark'] .site-header--solid .logo--on-dark { display: block; }
[data-theme='dark'] .site-header.is-stuck .logo--on-light,
[data-theme='dark'] .site-header--solid .logo--on-light { display: none; }

.nav-primary { display: flex; gap: var(--s-1); margin-inline-start: var(--s-4); }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-block-size: 44px;
  padding-inline: var(--s-3);
  border-radius: var(--r-sm);
  color: var(--text-strong);
  font-size: var(--fs-sm);
  font-weight: var(--w-medium);
  text-decoration: none;
}
.nav-link:hover { background: var(--surface-3); color: var(--brand-700); }
.nav-link[aria-current='page'] { color: var(--brand-700); }
.nav-link[aria-current='page']::after {
  content: '';
  position: absolute;
  inset-block-end: 14px;
  inline-size: 14px;
  block-size: 2px;
  background: var(--brand-500);
  border-radius: 2px;
}

.nav-utils { display: flex; align-items: center; gap: var(--s-2); margin-inline-start: auto; }

/* Search is a field, not an icon that reveals one. The icon-only search control
   in the current navbar has no accessible name. */
.search-inline { position: relative; inline-size: min(280px, 30vw); }
/* The drawer's field fills the drawer. The prototype used to set this inline per element;
   a class is what the ported markup can carry. */
.search-inline--block { inline-size: 100%; }
.search-inline .field__control { min-block-size: 44px; padding-inline-start: 42px; }
.search-inline__icon {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: var(--s-3);
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: none;
  color: var(--text-strong);
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.icon-btn:hover { background: var(--surface-3); }
.icon-btn__count {
  position: absolute;
  inset-block-start: 4px;
  inset-inline-end: 4px;
  min-inline-size: 17px;
  padding-inline: 4px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-on-fill);
  font-size: var(--fs-caption);
  font-weight: var(--w-semi);
  line-height: 17px;
  font-variant-numeric: tabular-nums;
}
/* The language control prints the code, not a flag: a flag names a country, and this
   control picks a language. Two letters at body weight fit the 44px button, and the
   control is not rendered at all when the site has a single language. */
.lang-code {
  font-weight: var(--w-medium);
  letter-spacing: 0.02em;
}
/* Light and dark. The button shows the theme it is in, so the icon is the state rather
   than the action: sun in light, moon in dark. Both glyphs ship in the markup and the
   sheet hides one, which keeps the swap free of a script that could lag a paint. */
.theme-toggle .icon--moon { display: none; }
[data-theme='dark'] .theme-toggle .icon--sun { display: none; }
[data-theme='dark'] .theme-toggle .icon--moon { display: block; }

.nav-toggle { display: none; }
@media (max-width: 1080px) {
  /* Scoped to the header on purpose. .search-inline is the class in the drawer too, and
     this rule used to hide it there, so the drawer's own search field was invisible at
     exactly the widths where the drawer is the only search a phone gets. */
  .site-header .nav-primary, .site-header .search-inline, .site-header .nav-utils .nav-cta { display: none; }
  .site-header .nav-toggle { display: grid; }
}

/* Header over the ink hero. The header starts transparent so the hero owns the
   top of the viewport, and turns solid once the page scrolls past it. White nav
   text on the ink hero measures 17.91:1 and the logo sits on a white chip, so
   the transparent state is fully legible rather than a decoration. */
.site-header--over-hero { background: transparent; border-block-end-color: transparent; }
.site-header--over-hero .nav-link { color: #FFFFFF; }
.site-header--over-hero .nav-link:hover { background: rgba(255, 255, 255, 0.14); color: #FFFFFF; }
.site-header--over-hero .icon-btn { color: #FFFFFF; }
.site-header--over-hero .icon-btn:hover { background: rgba(255, 255, 255, 0.14); }
.site-header--over-hero .search-inline .field__control {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.34);
  color: #FFFFFF;
}
.site-header--over-hero .search-inline .field__control::placeholder { color: #C9C9DE; }
.site-header--over-hero .search-inline__icon { color: #C9C9DE; }

/* A page with no hero needs the solid header from the first pixel, with no scroll
   to react to. It is the same appearance as .is-stuck has on the home page, which
   is why the two are written as one selector list rather than two rule sets. */
.site-header.is-stuck, .site-header--solid { background: var(--surface); border-block-end-color: var(--border); }
.site-header.is-stuck .nav-link, .site-header.is-stuck .icon-btn,
.site-header--solid .nav-link, .site-header--solid .icon-btn { color: var(--text-strong); }
.site-header.is-stuck .search-inline .field__control,
.site-header--solid .search-inline .field__control { background: var(--surface); border-color: var(--border-field); color: var(--text-strong); }
.site-header.is-stuck .search-inline__icon,
.site-header--solid .search-inline__icon { color: var(--text-muted); }

/* The legacy sheet sets `body, html { height: 100% }` (style.css:81). Body is therefore
exactly one viewport tall while its content overflows, and since body is the sticky
header's containing block, the header only stuck for the first fold: past that its
containing block had scrolled away. Body grows with its content again on the pages that
use this sheet, and the legacy pages keep the rule they were built against. */
body.visitor {
  block-size: auto;
  min-block-size: 100%;
}

/* The hero slides up behind the transparent header, so the ink surface owns the
   top of the viewport instead of starting below a bar. Without this the header is
   transparent over the cream page and its white nav text is unreadable.

   Two selectors, one rule set. The sibling form is what the prototype uses, where the
   header sits inside <main>. Production keeps the header outside <main>, because a page
   header is not main content, so the sibling combinator cannot reach the hero there and
   the hero carries .hero--under-header instead. The values live in one place either way. */
.site-header--over-hero + .hero,
.hero--under-header {
  margin-block-start: calc(-1 * var(--header-h));
  padding-block-start: calc(var(--header-h) + var(--s-7));
}

/* --------------------------------------------------------- 2. Mobile drawer */

.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) var(--s-5); border-block-end: 1px solid var(--border); }
.drawer-body { padding: var(--s-4) var(--s-3); overflow-y: auto; overscroll-behavior: contain; }
.drawer-nav { display: grid; gap: 2px; }
.drawer-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-block-size: 48px;
  padding-inline: var(--s-3);
  border-radius: var(--r-sm);
  color: var(--text-strong);
  font-weight: var(--w-medium);
  text-decoration: none;
}
.drawer-nav a:hover { background: var(--surface-3); }
/* Rows line up. .drawer-nav a sets its own inline padding while the disclosure summary sets
   only block padding, and the two heights differed as well, so a group label started at a
   different x from a plain link and the hover surfaces were different widths. Inside the
   drawer a disclosure summary is a row like any other. */
.drawer-nav .disclosure > summary {
  min-block-size: 48px;
  /* Block padding off: with 12px top and bottom on top of the 48px minimum the group row
     measured 50px against the links' 48, so the list was not quite even. The row is centred
     by align-items, so the label still sits on the same line as its neighbours. */
  padding-block: 0;
  padding-inline: var(--s-3);
  border-radius: var(--r-sm);
}
.drawer-nav .disclosure > summary:hover { background: var(--surface-3); }
.drawer-sep { block-size: 1px; background: var(--border); margin-block: var(--s-3); }

/* ------------------------------------------- 3. Announcements (new surface) */
/* Announcements are already public pages in the sitemap, but the megaphone and
   the slide-in panel currently render only for role == 1 (AppServiceProvider
   :86-90), so a visitor has no way to reach them. */

.announce-panel {
  position: fixed;
  inset-block: 0;
  inset-inline-end: 0;
  inline-size: min(400px, 96vw);
  z-index: var(--z-drawer);
  background: var(--surface);
  box-shadow: var(--e4);
  display: flex;
  flex-direction: column;
  overscroll-behavior: contain;
}
.announce-panel__list { padding: var(--s-3); display: grid; gap: var(--s-2); overflow-y: auto; }
.announce-item {
  display: grid;
  gap: var(--s-2);
  padding: var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
}
.announce-item:hover { background: var(--surface-2); border-color: var(--border-strong); }
.announce-item--new { border-inline-start: 3px solid var(--brand-500); background: var(--brand-50); }
.announce-item__title { font-weight: var(--w-medium); color: var(--text-strong); }
.announce-item__meta { font-size: var(--fs-caption); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.announce-item__excerpt { font-size: var(--fs-sm); color: var(--text); margin: 0; }

.announce-strip { display: grid; gap: var(--s-3); }

/* The home strip is one row per notice: badge, title, date. The prototype carried
   this row as an inline style on each item; it belongs here so the markup has none.
   Scoped to the strip so the header panel keeps its stacked card. Below 640px the
   base .announce-item stack is the right shape, which is why the row is a min-width
   rule rather than the default. */
@media (min-width: 640px) {
  .announce-strip .announce-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--s-3);
  }
  /* Columns are pinned rather than implied by child order, so a notice with no badge
     still puts its title in the middle and its date on the right. */
  .announce-strip .announce-item__title { grid-column: 2; }
  .announce-strip .announce-item__meta { grid-column: 3; }
}

/* ------------------------------------------------------------------ 4. Footer */
/* Three columns, not a four-column link farm, and the permission statement the
   growth plan requires is part of the footer rather than an afterthought. */

.site-footer { margin-block-start: var(--s-8); background: var(--ink-800); color: #C9C9DE; }
.site-footer a { color: #E4E4F0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
/* style.css colours bare elements, and a bare-element rule applies directly to this markup, so
   it beat the colour the footer hands down: the paragraph measured 2.42:1 against the ink.
   Written out because inheritance loses to any direct declaration, whatever the sheet order. */
.site-footer p,
.site-footer li,
.site-footer span { color: inherit; }
.site-footer__top { display: grid; grid-template-columns: minmax(240px, 1.4fr) repeat(2, minmax(160px, 1fr)); gap: var(--s-7); padding-block: var(--s-8) var(--s-6); }
@media (max-width: 860px) { .site-footer__top { grid-template-columns: 1fr; gap: var(--s-6); } }
.site-footer__brand img { block-size: 30px; inline-size: auto; }
.site-footer__about { margin-block-start: var(--s-4); font-size: var(--fs-sm); max-inline-size: 44ch; }
.site-footer h2 { font-size: var(--fs-caption); letter-spacing: var(--ls-label); text-transform: uppercase; color: #8C8CAB; font-weight: var(--w-semi); margin-block-end: var(--s-4); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); font-size: var(--fs-sm); }
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  align-items: center;
  justify-content: space-between;
  padding-block: var(--s-5);
  border-block-start: 1px solid rgba(255, 255, 255, 0.14);
  font-size: var(--fs-caption);
  color: #A9A9C4;
}
.site-footer__legal ul { display: flex; flex-wrap: wrap; gap: var(--s-4); }

/* ------------------------------------------------------------------ 5. Hero */
/* Bold ink hero. The brand's own deep navy is the surface, so the purple finally
   has somewhere to sing and the terminal mock reads as the product rather than
   as decoration. Depth is controlled: one gradient, one radial glow, one grain
   overlay, and one overlap where the certificate card crosses the mock.

   Coral is used as an accent here precisely because it cannot be used on white:
   it measures 2.49:1 on white but 7.19:1 on ink. */

.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--hero-bg);
  background-image: var(--gradient-hero);
  color: var(--hero-text-soft);
  padding-block: var(--s-9) var(--s-9);
  border-block-end: 1px solid var(--hairline-on-ink);
}
.hero__grain {
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  opacity: var(--grain-opacity);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: var(--s-8);
  align-items: center;
}
@media (max-width: 1020px) { .hero__grid { grid-template-columns: 1fr; gap: var(--s-7); } }

.hero h1 {
  color: var(--hero-text);
  font-size: clamp(2.25rem, 1.35rem + 3.4vw, 3.75rem);
  line-height: 1.06;
  margin-block: var(--s-4) var(--s-5);
}
.hero .eyebrow { color: var(--hero-text-soft); }
.hero__rotator { color: var(--hero-accent); }
.hero__lede { font-size: 1.125rem; color: var(--hero-text-soft); max-inline-size: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-block-start: var(--s-6); }
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-6);
  margin-block-start: var(--s-8);
  padding-block-start: var(--s-5);
  border-block-start: 1px solid var(--hairline-on-ink);
}
.hero__stat { display: grid; gap: 2px; }
.hero__stat b { font-size: var(--fs-h4); font-weight: var(--w-semi); color: var(--hero-text); font-variant-numeric: tabular-nums; }
.hero__stat span { font-size: var(--fs-caption); color: var(--hero-text-soft); }

/* A button on the ink surface needs its own weight: the default secondary button
   is a white surface with dark text, which fights the hero. */
.btn--on-ink { --btn-bg: transparent; --btn-fg: #FFFFFF; --btn-bd: rgba(255, 255, 255, 0.38); }
.btn--on-ink:hover { background: rgba(255, 255, 255, 0.12); border-color: #FFFFFF; }

.hero__visual { position: relative; }
/* The card overlaps the mock, so the mock keeps extra space at the bottom: the
   overlap should cross empty panel, never bisect a line of text. */
.hero__visual .mock__body { padding-block-end: var(--s-9); }
.hero__card {
  position: relative;
  z-index: var(--z-raised);
  max-inline-size: 340px;
  margin-block-start: calc(-1 * var(--s-6));
  margin-inline-start: var(--s-6);
}
@media (max-width: 640px) {
  .hero__card { margin-block-start: var(--s-4); margin-inline-start: 0; max-inline-size: none; }
}

/* The rotating phrase in the hero headline. Moved here from the screen's own style block:
   opacity and transform only, and the first phrase is already in the markup, so a slow or
   blocked script cannot leave a gap where the headline should be. */
.rotator { position: relative; display: inline-grid; }
.rotator__item { grid-area: 1 / 1; opacity: 0; transform: translateY(0.35em); transition: opacity 320ms var(--ease), transform 320ms var(--ease); }
.rotator__item.is-on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rotator__item { display: none; }
  .rotator__item:first-child { display: block; opacity: 1; transform: none; }
}

/* ------------------------------------------------------- 6. Section headings */

.section-head { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: flex-end; justify-content: space-between; margin-block-end: var(--s-6); }
.section-head h2 { max-inline-size: 30ch; }
.section-head p { margin: var(--s-2) 0 0; color: var(--text-muted); max-inline-size: 58ch; }

/* Band rhythm. Alternating surfaces, with one dark band for proof and one for
   the closing call to action, so the page reads as chapters instead of one long
   scroll of the same cream. */
.band { padding-block: var(--s-8); }
.band--paper { background: var(--paper); }
.band--surface { background: var(--surface); border-block: 1px solid var(--border); }
.band--tint { background: var(--brand-50); border-block: 1px solid var(--brand-100); }

/* The notices strip sits tight under the hero instead of taking a full band's air.
   Declared after .band because both are single-class selectors on the same element
   and source order is what decides between them; the prototype could keep it in the
   screen's own style block, this sheet cannot. */
.announce-bar { padding-block: var(--s-4); }

.band--ink {
  position: relative;
  overflow: hidden;
  background-color: var(--hero-bg);
  background-image: var(--gradient-hero);
  color: var(--hero-text-soft);
  border-block: 1px solid var(--hairline-on-ink);
}
.band--ink h2, .band--ink h3, .band--ink h4 { color: var(--hero-text); }
.band--ink .section-head p, .band--ink .caption { color: var(--hero-text-soft); }
.band--ink a:not(.btn) { color: var(--brand-300); }
.band--ink .card { background: rgba(255, 255, 255, 0.06); border-color: var(--hairline-on-ink); }
.band--ink .card h3, .band--ink .card .stat__value, .band--ink .achievement b { color: var(--hero-text); }
.band--ink .stat__label, .band--ink .achievement span { color: var(--hero-text-soft); }
.band--ink .quote blockquote { color: var(--hero-text); }
.band--ink .quote figcaption { color: var(--hero-text-soft); }
.band--ink .avatar { background: rgba(255, 255, 255, 0.12); color: var(--hero-text); }
.band--ink .badge--neutral { background: rgba(255, 255, 255, 0.12); color: var(--hero-text-soft); }
.band--ink .badge--brand { background: rgba(168, 148, 242, 0.18); color: var(--brand-300); }

/* --------------------------------------------------- 7. Feature band */
/* Two items of different weight instead of the current three equal cards,
   which is the most generic feature row there is. */

.feature-band { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--s-5); }
@media (max-width: 900px) { .feature-band { grid-template-columns: 1fr; } }
.feature {
  display: grid;
  gap: var(--s-4);
  align-content: start;
  padding: var(--s-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.feature:hover { box-shadow: var(--e3); border-color: transparent; transform: translateY(-2px); }
.feature--lead {
  background: var(--brand-50);
  border-color: transparent;
  box-shadow: var(--e1);
}
.feature__mark {
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--brand-700);
  border: 1px solid var(--border);
}
.feature h3 { font-size: var(--fs-h4); }
.feature p { margin: 0; color: var(--text); font-size: var(--fs-sm); }
.feature__foot { display: flex; align-items: center; gap: var(--s-3); margin-block-start: auto; padding-block-start: var(--s-4); }

/* --------------------------------------------------------- 8. Card rows */

.card-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: var(--s-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-block-end: var(--s-3);
  overscroll-behavior: contain;
}
.card-row > * { scroll-snap-align: start; }
@media (max-width: 700px) { .card-row { grid-auto-columns: 84%; } }

/* ------------------------------------------------------- 9. Mentor, quote */

.mentor-card { display: grid; gap: var(--s-3); text-align: start; }
.mentor-card p { margin: 0; font-size: var(--fs-sm); }
/* The ranking badges the rest of the site shows beside an instructor's name. */
.mentor-card__badges { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.mentor-card__badges img { inline-size: 28px; block-size: 28px; border-radius: 50%; object-fit: cover; }
.mentor-card__head { display: flex; align-items: center; gap: var(--s-3); }
.mentor-card__name { font-weight: var(--w-medium); color: var(--text-strong); }
.mentor-card__role { font-size: var(--fs-caption); color: var(--text-muted); }

.quote { display: grid; gap: var(--s-4); padding: var(--s-6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.quote blockquote { margin: 0; font-size: var(--fs-h5); line-height: 1.5; color: var(--text-strong); }
.quote figcaption { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-sm); color: var(--text-muted); }
/* The proof band: quotes beside the figures. Kept here rather than in the prototype page, which is
   where these two rules lived while the band was only drawn. */
.proof-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--s-5); }
.band--ink .quote { background: rgba(255, 255, 255, 0.06); border-color: var(--hairline-on-ink); }

@media (max-width: 900px) {
  .proof-grid { grid-template-columns: 1fr; }
}

.achievement { display: grid; gap: var(--s-1); }
.achievement b { font-size: var(--fs-h2); font-weight: var(--w-semi); color: var(--text-strong); font-variant-numeric: tabular-nums; }
.achievement span { font-size: var(--fs-sm); color: var(--text-muted); }

.cta-band { display: grid; gap: var(--s-5); justify-items: start; }
/* The closing band floats: it is the last thing before the footer, so it is inset from the edges and
   rounded rather than running edge to edge the way the bands above it do. */
.band--floating { border-radius: var(--r-xl); margin-inline: var(--s-5); margin-block-end: var(--s-8); }
.cta-band h2 { color: var(--hero-text); max-inline-size: 34ch; }
.cta-band p { color: var(--hero-text-soft); max-inline-size: 60ch; }

/* Grain, for any band that wants the texture the hero has. */
.has-grain { position: relative; overflow: hidden; }
.has-grain > .grain-layer {
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  opacity: var(--grain-opacity);
  pointer-events: none;
}

/* ------------------------------------------------------- 10. Page header */

.page-header { padding-block: var(--s-6) var(--s-7); border-block-end: 1px solid var(--border); background: var(--paper); }
.page-header h1 { margin-block: var(--s-3) var(--s-4); max-inline-size: 34ch; }
.page-header__lede { font-size: 1.0625rem; color: var(--text-muted); max-inline-size: 68ch; margin: 0; }
.page-header__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-block-start: var(--s-5); }
.page-header__meta { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-block-start: var(--s-5); font-size: var(--fs-sm); color: var(--text-muted); }
/* A head that carries figures puts them beside the title rather than under it: the title and its
   line hold the left, the figures take the right, and both are bottom-aligned so the two read as
   one row. Below the breakpoint a title and three badges cannot share the width, so they stack. */
.page-header__row { display: grid; gap: var(--s-4); }
/* The head sits on a tinted band with the system's grain layer, so it reads as a distinct region
   rather than as the top of the page body. The band runs the full width and the head inside it
   keeps the container, so the title still lines up with the content below; the band's own edge is
   the separation, so the header's rule and its paper fill come off inside it. */
.page-head-band { padding-block: var(--s-6) var(--s-7); }
.page-head-band .page-header { background: transparent; padding-block: 0; border-block-end: 0; }
@media (min-width: 768px) {
  .page-header--split .page-header__row { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--s-6); }
  .page-header--split .page-header__meta { margin-block-start: 0; }
}

/* ------------------------------------------------------------------ 11. 404 */

.error-page { display: grid; gap: var(--s-5); justify-items: start; padding-block: var(--s-9); max-inline-size: 62ch; }
.error-page__code { font-size: var(--fs-caption); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text-muted); }
.error-page h1 { max-inline-size: 24ch; }
.error-page__links { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* --------------------------------------------------------- 12. Utilities */

.stack-2 { display: grid; gap: var(--s-2); }
.stack-3 { display: grid; gap: var(--s-3); }
.stack-5 { display: grid; gap: var(--s-5); }
