/* ═══════════════════════════════════════════════════════════════════════════
   Athenor Academy — Design System · Components
   © 2026 Squareflow Agency Athens. All rights reserved.

   Mirrors the components on page "02 · Components" of the Athenor Academy
   Figma file. Every value comes from athenor-tokens.css.

   Naming (BEM-style, namespaced):
     .ath-<component>                 block        .ath-btn
     .ath-<component>--<modifier>     variant      .ath-btn--primary
     .ath-<component>__<part>         inner part   .ath-dialog__title

   Legacy aliases: the earlier class names (.btn, .input, .tag …) are listed in
   the same selectors so existing screens keep working while their markup moves
   to the .ath-* names. Remove an alias once nothing uses it.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--ath-color-canvas);
  color: var(--ath-color-text);
  font-family: var(--ath-font-sans);
  font-size: var(--ath-text-body);
  line-height: 1.6;
  font-weight: var(--ath-weight-regular);
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ath-font-serif);
  font-weight: var(--ath-weight-regular);
  line-height: 1.15;
  margin: 0 0 var(--ath-space-2);
}
h1 { font-size: var(--ath-text-display-l); }
h2 { font-size: var(--ath-text-heading-1); }
h3 { font-size: var(--ath-text-heading-2); }
h4 { font-size: var(--ath-text-title); font-family: var(--ath-font-sans); font-weight: var(--ath-weight-bold); }
h5 { font-size: var(--ath-text-body); font-family: var(--ath-font-sans); font-weight: var(--ath-weight-bold); }
h6 {
  font-size: var(--ath-text-label); font-family: var(--ath-font-sans); font-weight: var(--ath-weight-bold);
  letter-spacing: 0.08em; text-transform: uppercase;
}
p { margin: 0 0 var(--ath-space-3); }
/* Greek is never shown in all caps (owner rule): every uppercase caption, in all three stylesheets, keeps its authored
   case where the text is Greek. Latin-only uppercase (.ath-checkout__promo codes, first-letter capitals) is not listed.
   A new text-transform: uppercase rule must be added here; verify.mjs fails the build otherwise. */
:is(
  h6, .ath-card__kicker, .card-kicker, .table th, .ath-kicker,
  .ath-search-panel__label, .ath-mega__label, .ath-drawer__label, .ath-footer__heading,
  .ath-receipt__label, .ath-settings-preview__label,
  .athenor-rise .rise-statement .rise-h, .athenor-rise .rise-card-hint, .athenor-rise .rise-tl-date,
  .athenor-rise .rise-sort-pile h4, .athenor-rise .rise-q-num,
  .ath-tag-phase, .ath-qz-qhead h2, .ath-qz-kicker, .ath-as-kicker, .ath-ext-kind, .ath-res-kind,
  .adm-brand__tag, .adm-sb-group, .adm-page-kicker, .adm-kpi .lbl, .adm-tbl th,
  .ath-cred-plate__kicker, .ath-curr-section__kicker, .ath-pl-grades__kicker, .ath-pl-sheet-kicker, .ath-legal__toc-title
):lang(el) { text-transform: none; }
a { color: var(--ath-color-recognition); text-underline-offset: 3px; }
a:hover { color: var(--ath-color-action-hover); }
img { display: block; max-width: 100%; }
figure { margin: 0; }
figcaption { font-size: var(--ath-text-caption); margin-top: var(--ath-space-1); color: var(--ath-color-text-secondary); }
input::placeholder, textarea::placeholder { color: var(--ath-color-text-secondary); opacity: 1; }
::selection { background: var(--ath-color-selected); color: var(--ath-color-text); }
:focus { outline: none; }
:focus-visible { outline: var(--ath-focus-ring-width) solid var(--ath-color-focus); outline-offset: 2px; }

.ath-text-secondary { color: var(--ath-color-text-secondary); }
.hr { height: 1px; border: 0; margin: var(--ath-space-4) 0; background: var(--ath-color-border); }

/* ── Button · Component/Button ──────────────────────────────────────────── */
.ath-btn, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--ath-space-2);
  min-height: 44px; padding: 10px 20px;
  font-family: var(--ath-font-sans); font-size: var(--ath-text-body); font-weight: var(--ath-weight-bold); line-height: 1.25;
  color: var(--ath-color-text); text-decoration: none; white-space: nowrap; cursor: pointer;
  background: transparent; border: 1px solid transparent; border-radius: var(--ath-radius-md);
  transition: background-color var(--ath-duration-fast) var(--ath-ease-standard),
              border-color var(--ath-duration-fast) var(--ath-ease-standard),
              color var(--ath-duration-fast) var(--ath-ease-standard);
}
.ath-btn:hover, .btn:hover { text-decoration: none; }
.ath-btn svg, .btn svg { display: block; flex: none; }
.ath-btn:focus-visible, .btn:focus-visible { outline: 3px solid var(--ath-color-focus); outline-offset: 2px; }
.ath-btn:disabled, .btn:disabled, .ath-btn[aria-disabled="true"], .btn[aria-disabled="true"] { cursor: not-allowed; }

/* Primary */
.ath-btn--primary, .btn-primary { background: var(--ath-color-action); border-color: var(--ath-color-action); color: var(--ath-color-text-on-action); }
.ath-btn--primary:hover, .btn-primary:hover { background: var(--ath-color-action-hover); border-color: var(--ath-color-action-hover); color: var(--ath-color-text-on-action); }
.ath-btn--primary:active, .btn-primary:active { background: var(--ath-color-action-pressed); border-color: var(--ath-color-action-pressed); }
.ath-btn--primary:disabled, .btn-primary:disabled { background: var(--ath-color-selected); border-color: var(--ath-color-selected); color: var(--ath-color-text-secondary); }

/* Secondary */
.ath-btn--secondary, .btn-secondary { background: var(--ath-color-surface); border-color: var(--ath-color-border); color: var(--ath-color-text); }
.ath-btn--secondary:hover, .btn-secondary:hover { background: var(--ath-color-selected); color: var(--ath-color-text); }
.ath-btn--secondary:active, .btn-secondary:active { background: var(--ath-color-surface); border-color: var(--ath-color-border-strong); }
.ath-btn--secondary:disabled, .btn-secondary:disabled { background: var(--ath-color-selected); color: var(--ath-color-text-secondary); }

/* Tertiary (text button) */
.ath-btn--tertiary, .btn-ghost { color: var(--ath-color-action); padding-inline: var(--ath-space-3); }
.ath-btn--tertiary:hover, .btn-ghost:hover { background: var(--ath-color-subtle); color: var(--ath-color-action-hover); }
.ath-btn--tertiary:active, .btn-ghost:active { background: var(--ath-color-selected); }
.ath-btn--tertiary:disabled, .btn-ghost:disabled { color: var(--ath-color-text-secondary); background: transparent; }

/* Destructive · Admin/Button · Destructive */
.ath-btn--destructive, .btn-danger { background: var(--ath-color-error); border-color: var(--ath-color-error); color: var(--ath-color-text-on-action); }
.ath-btn--destructive:hover, .btn-danger:hover { background: var(--ath-error-500); border-color: var(--ath-error-500); color: var(--ath-color-text-on-action); filter: brightness(0.92); }
.ath-btn--destructive:active, .btn-danger:active { filter: brightness(0.84); }

/* Icon-only (44 × 44 target) */
.ath-btn--icon, .btn-icon { width: 44px; height: 44px; min-height: 44px; padding: 0; color: var(--ath-color-text-secondary); }
.ath-btn--icon:hover, .btn-icon:hover { background: var(--ath-color-subtle); color: var(--ath-color-text); }

/* Full width — may wrap so a long label never forces overflow */
.ath-btn--block, .btn-block { width: 100%; white-space: normal; }

@media (max-width: 767px) {
  .ath-btn, .btn { min-height: 48px; }
  .ath-btn--icon, .btn-icon { min-height: 44px; }
}

/* ── Field · Form/Field ─────────────────────────────────────────────────── */
.ath-field, .field { display: flex; flex-direction: column; gap: var(--ath-space-2); }
.ath-field__label, .ath-field > label, .field > label {
  display: block; margin: 0;
  font-size: var(--ath-text-small); line-height: var(--ath-leading-small); font-weight: var(--ath-weight-bold);
  color: var(--ath-color-text);
}
.ath-field__hint { font-size: var(--ath-text-small); line-height: var(--ath-leading-small); color: var(--ath-color-text-secondary); }
.ath-field__error {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: var(--ath-text-small); line-height: var(--ath-leading-small); color: var(--ath-color-error);
}
.ath-field__error[hidden] { display: none; }
.ath-input--code { font-size: 22px; letter-spacing: .35em; font-variant-numeric: tabular-nums; }

.ath-input, .input {
  width: 100%; min-height: 48px; padding: 11px 12px;
  font: inherit; font-size: var(--ath-text-body); line-height: var(--ath-leading-body);
  color: var(--ath-color-text); caret-color: var(--ath-color-action);
  background: var(--ath-color-surface);
  border: 1px solid var(--ath-color-border-strong); border-radius: var(--ath-radius-md);
  transition: border-color var(--ath-duration-fast) var(--ath-ease-standard);
}
.ath-input:hover, .input:hover { border-color: var(--ath-color-text); }
.ath-input:focus-visible, .input:focus-visible { border-color: var(--ath-color-action); outline: 2px solid var(--ath-color-focus); outline-offset: 1px; }
.ath-input[aria-invalid="true"], .input[aria-invalid="true"] { border: 2px solid var(--ath-color-error); padding: 10px 11px; }
.ath-input:disabled, .input:disabled { background: var(--ath-color-subtle); color: var(--ath-color-text-secondary); border-color: var(--ath-color-border); cursor: not-allowed; }
textarea.ath-input, textarea.input { min-height: 120px; resize: vertical; }

/* ── Radio · Component/Radio ────────────────────────────────────────────── */
.radio { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; }
.radio input, .ath-seg__option input, .seg-opt input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.ath-radio__dot, .radio .dot {
  width: 20px; height: 20px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--ath-color-border-strong); background: var(--ath-color-surface);
}
.radio:hover .dot { border-color: var(--ath-color-action); }
.radio input:checked + .dot {
  border-color: var(--ath-color-action); background: var(--ath-color-action);
  box-shadow: inset 0 0 0 4px var(--ath-color-surface);
}
.radio input:focus-visible + .dot { outline: 2px solid var(--ath-color-focus); outline-offset: 2px; }

/* ── Checkbox + radio · Component/Checkbox, Component/Radio ─────────────────
   Styles a real <input type="checkbox"> / <input type="radio"> (appearance: none):
   semantics stay native. Checkbox = square with a check; radio = circle with a dot. */
.ath-choice {
  appearance: none; -webkit-appearance: none; flex: none; display: inline-grid; place-content: center;
  width: 20px; height: 20px; margin: 0; cursor: pointer;
  border: 1.5px solid var(--ath-color-border-strong); background: var(--ath-color-surface);
  transition: border-color var(--ath-duration-fast) var(--ath-ease-standard), background-color var(--ath-duration-fast) var(--ath-ease-standard);
}
.ath-choice[type="checkbox"] { border-radius: var(--ath-radius-sm); }
.ath-choice[type="radio"] { border-radius: 50%; }
.ath-choice:hover { border-color: var(--ath-color-action); }
.ath-choice:focus-visible { outline: 2px solid var(--ath-color-focus); outline-offset: 2px; }
.ath-choice:checked { border-color: var(--ath-color-action); background: var(--ath-color-action); }
.ath-choice[type="checkbox"]:checked::before {
  content: ""; width: 10px; height: 5px; border-left: 2px solid var(--ath-color-text-on-action); border-bottom: 2px solid var(--ath-color-text-on-action);
  transform: rotate(-45deg) translate(1px, -1px);
}
.ath-choice[type="radio"]:checked { box-shadow: inset 0 0 0 4px var(--ath-color-surface); }
.ath-choice:disabled { background: var(--ath-color-subtle); border-color: var(--ath-color-border); cursor: not-allowed; }
/* a read-only answer (a quiz review, a closed poll) still shows what was chosen */
.ath-choice:disabled:checked { border-color: var(--ath-color-text-secondary); background: var(--ath-color-text-secondary); }
.ath-choice-row { display: flex; align-items: center; gap: 10px; min-height: 28px; font-size: 15px; cursor: pointer; }
.ath-choice-row--top { align-items: flex-start; }
.ath-choice-row:has(.ath-choice:checked) { font-weight: var(--ath-weight-bold); }
.ath-choice-row:has(.ath-choice:disabled) { color: var(--ath-color-text-secondary); cursor: not-allowed; }
.ath-choice-row__count { margin-left: auto; font-size: var(--ath-text-caption); font-weight: var(--ath-weight-regular); color: var(--ath-color-text-secondary); }

/* ── Segmented control · View toggle ────────────────────────────────────── */
.ath-seg, .seg {
  display: inline-flex; overflow: hidden;
  background: var(--ath-color-surface);
  border: 1px solid var(--ath-color-border); border-radius: var(--ath-radius-md);
}
.ath-seg__option, .seg-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; font-size: var(--ath-text-small); font-weight: var(--ath-weight-semibold); cursor: pointer;
}
.ath-seg__option + .ath-seg__option, .seg-opt + .seg-opt { border-left: 1px solid var(--ath-color-border); }
.ath-seg__option:has(input:checked), .seg-opt:has(input:checked) { background: var(--ath-color-selected); color: var(--ath-color-recognition); }
.ath-seg__option:not(:has(input:checked)):hover, .seg-opt:not(:has(input:checked)):hover { background: var(--ath-color-subtle); }
.ath-seg__option:has(input:focus-visible), .seg-opt:has(input:focus-visible) { outline: 2px solid var(--ath-color-focus); outline-offset: -2px; }

/* ── Tag · Course/Tag ───────────────────────────────────────────────────── */
.ath-tag, .tag {
  display: inline-flex; align-items: center; gap: var(--ath-space-1);
  padding: 4px 8px; border: 1px solid transparent; border-radius: var(--ath-radius-sm);
  font-size: var(--ath-text-label); line-height: var(--ath-leading-label); font-weight: var(--ath-weight-bold);
}
.ath-tag--neutral { background: var(--ath-color-subtle); color: var(--ath-color-text-secondary); }
.ath-tag--recognition, .tag-accent { background: var(--ath-color-selected); color: var(--ath-color-recognition); }

/* ── Status badge · Admin/Status badge ──────────────────────────────────── */
.ath-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border: 1px solid var(--ath-color-border-strong); border-radius: var(--ath-radius-full);
  background: var(--ath-color-subtle); color: var(--ath-color-text);
  font-size: var(--ath-text-label); line-height: var(--ath-leading-label); font-weight: var(--ath-weight-bold);
}
.ath-badge--info { background: var(--ath-color-info-surface); border-color: var(--ath-color-info); }
.ath-badge--success { background: var(--ath-color-success-surface); border-color: var(--ath-color-success); }
.ath-badge--warning { background: var(--ath-color-warning-surface); border-color: var(--ath-color-warning); }
.ath-badge--error { background: var(--ath-color-error-surface); border-color: var(--ath-color-error); }
.ath-badge--brand { background: var(--ath-color-selected); border-color: var(--ath-color-recognition); color: var(--ath-color-recognition); }

/* ── Card ───────────────────────────────────────────────────────────────── */
.ath-card, .card {
  display: flex; flex-direction: column; gap: var(--ath-space-2);
  padding: var(--ath-space-5); border-radius: var(--ath-radius-lg);
  background: var(--ath-color-surface); box-shadow: var(--ath-shadow-hairline);
}
.elev-md, .elev-lg { box-shadow: var(--ath-shadow-hairline), var(--ath-shadow-card); }
.elev-sm { box-shadow: var(--ath-shadow-hairline); }
.ath-card__kicker, .card-kicker {
  font-size: var(--ath-text-caption); font-weight: var(--ath-weight-bold); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ath-color-recognition);
}
.ath-card__title { font-family: var(--ath-font-serif); font-size: var(--ath-text-title); line-height: var(--ath-leading-title); }
.ath-card__body { margin: 0; flex: 1; font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); }
.card-meta { display: flex; align-items: center; gap: 6px; font-size: var(--ath-text-caption); color: var(--ath-color-text-secondary); }


/* ── Table · Admin/Table header cell ────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: var(--ath-text-small); }
.table th {
  padding: 12px 16px; text-align: left;
  background: var(--ath-color-subtle); color: var(--ath-color-text-secondary);
  font-family: var(--ath-font-sans); font-size: var(--ath-text-label); font-weight: var(--ath-weight-bold);
  letter-spacing: 0.04em; text-transform: uppercase;
  border-bottom: 1px solid var(--ath-color-border);
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--ath-color-border); }
.table tbody tr:hover { background: var(--ath-color-subtle); }

/* ── Dialog · Admin/Confirm dialog ──────────────────────────────────────── */
.ath-dialog__backdrop {
  position: fixed; inset: 0; z-index: 220; display: grid; place-items: center;
  padding: var(--ath-space-4); background: var(--ath-color-scrim);
}
.ath-dialog__backdrop--top { z-index: 1200; }   /* a confirmation answers whatever opened it, drawers included */
.ath-dialog {
  width: min(480px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; gap: var(--ath-space-4);
  padding: 28px; border-radius: var(--ath-radius-xl); outline: none;
  background: var(--ath-color-elevated); box-shadow: var(--ath-shadow-overlay);
}
.ath-dialog--md { width: min(720px, 100%); }
.ath-dialog--lg { width: min(860px, 100%); }
.ath-dialog__title { flex: none; margin: 0; font-family: var(--ath-font-serif); font-size: var(--ath-text-heading-2); line-height: var(--ath-leading-heading-2); font-weight: var(--ath-weight-regular); }
.ath-dialog__body { margin: 0; font-size: var(--ath-text-body); color: var(--ath-color-text-secondary); }
.ath-dialog__scroll { min-height: 0; overflow-y: auto; }
.ath-dialog__actions { flex: none; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--ath-space-3); }
@media (max-width: 480px) { .ath-dialog { padding: var(--ath-space-5); } .ath-dialog__actions > * { flex: 1 1 auto; } }

/* ── The certificate seal (Lens) ─────────────────────────────────────────────
   Design direction B "Lens" with a plain check (lensSealSvg() in pages/_credential.js): the issue ceremony, the
   certificate cards of Your Credentials and the credential page, and a verified certificate. Its colours are these
   --seal-* variables, Light here and Dark below; the ceremony adds its moving layers' own (.ath-ceremony). */
.ath-seal {
  display: block; width: 100%; height: 100%;
  --seal-d0: var(--ath-lavender-400); --seal-d1: var(--ath-lavender-500); --seal-d2: var(--ath-lavender-700);       /* disc */
  --seal-r0: var(--ath-lavender-300); --seal-r1: var(--ath-lavender-400); --seal-r2: var(--ath-lavender-700);       /* rim */
  --seal-gloss: 0.42; --seal-groove: var(--ath-ink); --seal-groove-op: 0.22; --seal-ring-a: 0.35; --seal-ring-b: 0.4; --seal-bevel: 0.5;
  --seal-mark: var(--ath-white);
}
:root[data-theme="dark"] .ath-seal {
  --seal-d0: var(--ath-lavender-100); --seal-d1: var(--ath-lavender-200); --seal-d2: var(--ath-lavender-300);
  --seal-r0: var(--ath-lavender-050); --seal-r1: var(--ath-lavender-100); --seal-r2: var(--ath-lavender-300);
  --seal-gloss: 0.6; --seal-groove: var(--ath-lavender-700); --seal-groove-op: 0.18; --seal-ring-a: 0.6; --seal-ring-b: 0.7; --seal-bevel: 0.7;
  --seal-mark: var(--ath-ink);
}
.ath-seal__stop--d0 { stop-color: var(--seal-d0); } .ath-seal__stop--d1 { stop-color: var(--seal-d1); } .ath-seal__stop--d2 { stop-color: var(--seal-d2); }
.ath-seal__stop--r0 { stop-color: var(--seal-r0); } .ath-seal__stop--r1 { stop-color: var(--seal-r1); } .ath-seal__stop--r2 { stop-color: var(--seal-r2); }
.ath-seal__stop--g0 { stop-color: var(--ath-white); stop-opacity: var(--seal-gloss); }
.ath-seal__stop--g1 { stop-color: var(--ath-white); stop-opacity: 0.04; }
.ath-seal__stop--g2 { stop-color: var(--ath-white); stop-opacity: 0; }
.ath-seal__grooves { stroke: var(--seal-groove); stroke-opacity: var(--seal-groove-op); }
.ath-seal__ring { stroke: var(--ath-white); }
.ath-seal__ring--a { stroke-opacity: var(--seal-ring-a); } .ath-seal__ring--b { stroke-opacity: var(--seal-ring-b); }
.ath-seal__bevel { stroke: var(--ath-white); stroke-opacity: var(--seal-bevel); }
.ath-seal__mark { stroke: var(--seal-mark); }
.ath-seal__mark path { stroke-dasharray: 1 1; stroke-dashoffset: 0; }

/* ── Dialog · Credential ceremony ───────────────────────────────────────────
   Shown once, right after Moodle confirms a certificate was issued (credential-ceremony.js; the choreography is
   credentialCeremony() in motion.js). A confirmation dialog (.ath-dialog) with a glass surface and the large seal (design
   direction B "Lens", sealCeremonySvg()). The CSS below is the FINAL, resting state — motion.js animates towards it, so
   reduced motion / no GSAP simply shows it. The seal's colours are the --seal-* variables: Light here, Dark just below. */
.ath-ceremony__backdrop { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ath-ceremony {
  --cer-seal: clamp(120px, 38vw, 176px);
  --seal-orbit: var(--ath-lavender-400); --seal-p0: var(--ath-lavender-300); --seal-p1: var(--ath-lavender-400); --seal-halo: var(--ath-lavender-300);
  --cer-shadow: color-mix(in srgb, var(--ath-ink) 36%, transparent);
  width: min(440px, 100%); align-items: center; gap: var(--ath-space-3); padding: var(--ath-space-6) var(--ath-space-6) var(--ath-space-5); text-align: center;
  border: 1px solid color-mix(in srgb, var(--ath-color-border) 70%, transparent);
  background: radial-gradient(120% 62% at 50% 0%, color-mix(in srgb, var(--ath-color-action) 14%, transparent), transparent 72%), color-mix(in srgb, var(--ath-color-elevated) 94%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.15); backdrop-filter: blur(16px) saturate(1.15);
}
:root[data-theme="dark"] .ath-ceremony {
  --seal-orbit: var(--ath-lavender-300); --seal-p1: var(--ath-lavender-300); --cer-shadow: color-mix(in srgb, var(--ath-dark-canvas) 85%, transparent);
}
.ath-ceremony__stage { position: relative; flex: none; width: var(--cer-seal); height: var(--cer-seal); margin: var(--ath-space-2) auto var(--ath-space-3); }
.ath-ceremony__seal, .ath-ceremony__dust { position: absolute; inset: 0; width: 100%; height: 100%; }
.ath-ceremony__dust { overflow: visible; pointer-events: none; }
/* the ambient mote field: BEHIND the seal, a margin around it, sides and top only (it stops at the seal's lower edge — never over the words) */
.ath-ceremony__ambient { position: absolute; left: -22%; top: -22%; width: 144%; height: 122%; pointer-events: none; }
.ath-ceremony__shadow { position: absolute; left: 10%; right: 10%; bottom: -5%; height: 16%; border-radius: 50%; background: radial-gradient(closest-side, var(--cer-shadow), transparent); }
.ath-ceremony__svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ath-ceremony__glint { stop-color: var(--ath-white); }
.ath-ceremony__halo { stroke: var(--seal-halo); stroke-opacity: 0.45; }
.ath-ceremony__orbit { stroke: var(--seal-orbit); stroke-opacity: 0.75; }
.ath-ceremony__sp--0 { fill: var(--seal-p0); } .ath-ceremony__sp--1 { fill: var(--seal-p1); }
.ath-ceremony__mote { fill: var(--ath-color-action); }
.ath-ceremony__mote--1 { fill: var(--ath-lavender-300); }
.ath-ceremony__mote--2 { fill: var(--ath-color-recognition); }
.ath-ceremony__title { max-width: 22ch; text-wrap: balance; }
.ath-ceremony__title:focus { outline: none; }
.ath-ceremony__detail { display: flex; flex-direction: column; align-items: center; gap: var(--ath-space-2); min-width: 0; max-width: 100%; }
.ath-ceremony__course { position: relative; margin: 0; padding-top: var(--ath-space-4); font: var(--ath-weight-regular) var(--ath-text-title) / var(--ath-leading-title) var(--ath-font-serif); color: var(--ath-color-recognition); text-wrap: balance; overflow-wrap: anywhere; }
.ath-ceremony__course::before { content: ""; position: absolute; top: 0; left: 50%; width: 40px; height: 1px; margin-left: -20px; background: var(--ath-color-recognition); opacity: 0.45; }
.ath-ceremony__date { margin: 0; font-size: var(--ath-text-small); line-height: var(--ath-leading-small); color: var(--ath-color-text-secondary); }
/* the slot the LinkedIn button will fill (Player: its credential is looked up after the dialog opens) — reserved so Close never jumps */
.ath-ceremony__slot { min-height: 44px; }
/* actions, in order: primary · LinkedIn · Close — one calm column at every width */
.ath-ceremony__actions { flex-direction: column; flex-wrap: nowrap; align-items: stretch; width: min(100%, 320px); gap: var(--ath-space-2); margin-top: var(--ath-space-3); }
@media (max-width: 480px) {
  .ath-ceremony { padding: var(--ath-space-5) var(--ath-space-4) var(--ath-space-4); gap: var(--ath-space-2); }
  .ath-ceremony__actions { width: 100%; }
}
@media (max-height: 700px) { .ath-ceremony { --cer-seal: 104px; overflow-y: auto; } }   /* a small or landscape phone: the dialog scrolls rather than clipping */

/* ── Progress milestones (quiz 24 px · section 44 px · course 88 px) ──────────────────────────────────────────────────
   Quiet, flat badges; only the course badge has glass and one particle. Built by assets/js/app/milestones.js, animated by
   motion.js (milestoneQuiz / milestoneSection / milestoneCourse). Colours come from the semantic tokens through --ms-*, so
   Light / Dark follow the theme; the quiz badge turns success-green inside a passed result. Design: frontend/.build/preview/milestone-badges/. */
.ath-milestone {
  --ms-ink: var(--ath-color-recognition); --ms-disc: var(--ath-color-subtle); --ms-particle: var(--ath-lavender-400);
  --ms-glass-a: var(--ath-color-surface); --ms-glass-b: var(--ath-lavender-200); --ms-bevel: var(--ath-white); --ms-gloss: var(--ath-white); --ms-track-opacity: 0.22;
  display: block; flex: none;
}
:root[data-theme="dark"] .ath-milestone { --ms-particle: var(--ath-color-action); --ms-glass-a: var(--ath-color-selected); --ms-glass-b: var(--ath-color-surface); --ms-bevel: var(--ath-color-action); --ms-track-opacity: 0.28; }
.ath-qz-result.is-pass .ath-milestone { --ms-ink: var(--ath-color-success); --ms-track-opacity: 0.25; }
.ath-milestone__ink { stroke: var(--ms-ink); }
.ath-milestone__track { stroke: var(--ms-ink); stroke-opacity: var(--ms-track-opacity); }
.ath-milestone__disc { fill: var(--ms-disc); }
.ath-milestone__particle { fill: var(--ms-particle); }
.ath-milestone__bevel { stroke: var(--ms-bevel); }
.ath-milestone--course { width: 88px; height: 88px; }
.ath-milestone--section { width: 44px; height: 44px; }
.ath-milestone--quiz { width: 24px; height: 24px; margin-top: 2px; }
/* while the Player decides whether this result is a celebration (a higher moment may claim it), nothing flashes: it keeps its space */
.ath-qz-result[data-ms-pending] .ath-milestone, .ath-qz-result[data-ms-pending] [data-ms-text] { visibility: hidden; }
.ath-milestone-verdict { display: flex; align-items: flex-start; gap: var(--ath-space-3); }
.ath-qz-result [data-quiz-verdict="fail"] { font-size: clamp(18px, 16px + .5vw, 22px); }   /* a calm notice, not a headline */
.ath-qz-result__actions { display: flex; flex-wrap: wrap; gap: var(--ath-space-3); margin-top: var(--ath-space-3); }
.ath-completion__badge { display: grid; place-items: center; }

/* the section toast: non-modal, in the Player's footer wrapper — directly ABOVE the footer row (Previous / Next), never over it */
.ath-pl-footer-wrap { position: relative; }
.ath-milestone-slot { position: absolute; inset-inline: 0; bottom: 100%; display: flex; justify-content: flex-end; padding-bottom: var(--ath-space-3); pointer-events: none; }
.ath-milestone-toast {
  pointer-events: auto; width: 340px; max-width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: var(--ath-space-3); align-items: center;
  padding: var(--ath-space-2) var(--ath-space-1) var(--ath-space-2) var(--ath-space-4); border-radius: var(--ath-radius-lg);
  background: var(--ath-color-surface); box-shadow: var(--ath-shadow-hairline), var(--ath-shadow-overlay);
}
.ath-milestone-toast__text { margin: 0; font-size: var(--ath-text-small); line-height: 20px; }
.ath-milestone-toast__text strong { display: block; font-weight: var(--ath-weight-bold); }
.ath-milestone-toast__text span { color: var(--ath-color-text-secondary); }
.ath-milestone-toast__close { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--ath-radius-md); background: transparent; color: var(--ath-color-text-secondary); cursor: pointer; }
.ath-milestone-toast__close:hover { color: var(--ath-color-text); background: var(--ath-color-subtle); }
@media (max-width: 480px) { .ath-milestone-toast { width: 100%; } }

/* ── Navigation (legacy .nav row) ───────────────────────────────────────── */
.nav { display: flex; align-items: center; gap: var(--ath-space-4); }
.nav a { color: inherit; text-decoration: none; font-size: 15px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--ath-color-recognition); }

/* ═══════════════════════════════════════════════════════════════════════════
   Patterns · Site shell — header, mega menu, popovers, drawer, footer
   Figma: Nav/Header · Desktop / Mobile, Component/Mega Menu, Nav/Language
   switcher, Component/Profile Dropdown, Nav/Notifications panel,
   Nav/Mobile drawer, Nav/Footer.
   ═══════════════════════════════════════════════════════════════════════════ */
:root { --ath-header-h: 64px; --ath-gutter: clamp(16px, 4.5vw, 112px); }
@media (min-width: 1024px) { :root { --ath-header-h: 80px; } }

/* The header mount and its root take no box of their own, so the header is sticky
   against the whole page while the announcement bar above it scrolls away. */
[data-site-header], .ath-header-root { display: contents; }
.ath-header-sentinel { display: block; height: 1px; margin-bottom: -1px; }
/* Motion GL-03: at the top the header sits on the page; under scroll its border and a soft shadow fade in */
.ath-header { transition: border-color var(--ath-duration-fast) var(--ath-ease-standard), box-shadow var(--ath-duration-fast) var(--ath-ease-standard); }
:root[data-header-watch]:not([data-header-stuck]) .ath-header { border-bottom-color: transparent; }
:root[data-header-stuck] .ath-header { box-shadow: var(--ath-shadow-card); }
html { scroll-padding-top: calc(var(--ath-header-h) + 16px); }
.ath-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ath-color-surface);
  border-bottom: 1px solid var(--ath-color-border);
}
.ath-header__bar {
  display: flex; align-items: center; gap: var(--ath-space-6);
  height: var(--ath-header-h); padding-inline: var(--ath-gutter);
}
.ath-brand { display: inline-flex; align-items: baseline; gap: 6px; flex: none; color: var(--ath-color-text); text-decoration: none; }
.ath-brand:hover { color: var(--ath-color-text); }
.ath-brand__name { font: var(--ath-weight-regular) 26px/1 var(--ath-font-serif); }
.ath-brand__tag { font: var(--ath-weight-bold) 10px/1 var(--ath-font-sans); letter-spacing: 0.12em; }

.ath-header__explore {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px;
  border: 0; border-radius: var(--ath-radius-md); background: none; cursor: pointer;
  font: var(--ath-weight-bold) var(--ath-text-body) var(--ath-font-sans); color: var(--ath-color-text);
}
.ath-header__explore:hover { background: var(--ath-color-subtle); }
.ath-header__explore[aria-expanded="true"] { background: var(--ath-color-selected); color: var(--ath-color-recognition); }
.ath-header__explore svg { transition: transform var(--ath-duration-standard) var(--ath-ease-move); }
.ath-header__explore[aria-expanded="true"] svg { transform: rotate(180deg); }

.ath-search-field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--ath-color-border-strong); border-radius: var(--ath-radius-md);
  background: var(--ath-color-canvas); color: var(--ath-color-text-secondary);
}
.ath-search-field:focus-within { outline: 2px solid var(--ath-color-focus); outline-offset: 2px; }
.ath-search-field input { flex: 1; min-width: 0; border: 0; background: none; font: var(--ath-weight-regular) var(--ath-text-body) var(--ath-font-sans); color: var(--ath-color-text); }
.ath-search-field input:focus { outline: none; }

.ath-header__actions { display: flex; align-items: center; gap: var(--ath-space-2); flex: none; margin-left: auto; }
.ath-header__search ~ .ath-header__actions { margin-left: 0; }
.ath-hbtn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 0; border-radius: var(--ath-radius-md); background: none; color: var(--ath-color-text); cursor: pointer; text-decoration: none;
}
.ath-hbtn:hover, .ath-hbtn[aria-expanded="true"] { background: var(--ath-color-subtle); color: var(--ath-color-text); }
.ath-count {
  position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--ath-radius-full);
  background: var(--ath-color-action); color: var(--ath-color-text-on-action);
  font: var(--ath-weight-bold) 11px/18px var(--ath-font-sans); text-align: center;
}

.ath-lang-btn, .ath-avatar-btn {
  display: inline-flex; align-items: center; gap: var(--ath-space-2); min-height: 44px; padding: 0 10px;
  border: 0; border-radius: var(--ath-radius-md); background: none; cursor: pointer;
  font: var(--ath-weight-semibold) 15px var(--ath-font-sans); color: var(--ath-color-text);
}
.ath-avatar-btn { padding: 0 8px 0 4px; border-radius: var(--ath-radius-full); font-weight: var(--ath-weight-bold); }
.ath-lang-btn:hover, .ath-lang-btn[aria-expanded="true"],
.ath-avatar-btn:hover, .ath-avatar-btn[aria-expanded="true"] { background: var(--ath-color-subtle); }
.ath-lang-btn .ath-chev, .ath-avatar-btn .ath-chev { transition: transform var(--ath-duration-standard) var(--ath-ease-move); }
.ath-lang-btn[aria-expanded="true"] .ath-chev, .ath-avatar-btn[aria-expanded="true"] .ath-chev { transform: rotate(180deg); }

/* Particle field · Motion BG-01 — behind everything (z-index -1 under the root's own background,
   which the body paints), never interactive. */
.ath-particles { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
@media print { .ath-particles { display: none; } }

/* Announcement bar · Nav/Top bar (Announcement) */
.ath-topbar {
  display: flex; align-items: center; gap: var(--ath-space-4); min-height: 40px; padding-inline: var(--ath-gutter);
  background: var(--ath-color-subtle); border-bottom: 1px solid var(--ath-color-border);
  font-size: var(--ath-text-small); color: var(--ath-color-text-secondary);
}
.ath-marquee {
  flex: 1; min-width: 0; overflow: hidden; clip-path: inset(0);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ath-marquee__track { display: flex; width: max-content; animation: ath-marquee 48s linear infinite; }
.ath-marquee__track > ul, .ath-marquee__group { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.ath-marquee__track li, .ath-marquee__item { display: flex; align-items: center; gap: 8px; padding-inline: 28px; white-space: nowrap; }
.ath-marquee__track li::before, .ath-marquee__item::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ath-color-action); opacity: .7; }
.ath-marquee__track a { display: inline-flex; align-items: center; min-height: 24px; padding-inline: 2px; color: var(--ath-color-text); font-weight: var(--ath-weight-bold); }
.ath-marquee:hover .ath-marquee__track, .ath-marquee:focus-within .ath-marquee__track, .ath-marquee.is-paused .ath-marquee__track { animation-play-state: paused; }
@keyframes ath-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ath-marquee { overflow-x: auto; }
  .ath-marquee__track { animation: none; }
  .ath-marquee__track > ul[aria-hidden="true"], .ath-marquee__group[aria-hidden="true"], .ath-marquee__toggle { display: none; }
}
.ath-marquee__toggle {
  position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-left: 4px;
  border: 1px solid var(--ath-color-border); border-radius: var(--ath-radius-full);
  background: var(--ath-color-surface); color: var(--ath-color-text); cursor: pointer;
}

/* Popovers · language, cart, notifications, account */
.ath-pop { position: relative; }
.ath-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 55; min-width: 240px; padding: var(--ath-space-2);
  background: var(--ath-color-elevated); border: 1px solid var(--ath-color-border); border-radius: var(--ath-radius-lg);
  box-shadow: var(--ath-shadow-overlay);
}
.ath-menu__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--ath-space-3); padding: 8px 12px; }
.ath-menu__head strong { font-size: 17px; }
.ath-menu__group { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; }
.ath-menu__group + .ath-menu__group { border-top: 1px solid var(--ath-color-border); }
.ath-menu__item {
  display: flex; align-items: center; gap: var(--ath-space-3); width: 100%; min-height: 44px; padding: 0 12px;
  border: 0; border-radius: var(--ath-radius-md); background: none; cursor: pointer; text-align: left; text-decoration: none;
  font: var(--ath-weight-regular) var(--ath-text-body) var(--ath-font-sans); color: var(--ath-color-text);
}
.ath-menu__item:hover, .ath-menu__item:focus-visible { background: var(--ath-color-subtle); color: var(--ath-color-text); }
.ath-menu__item[aria-current] { font-weight: var(--ath-weight-bold); color: var(--ath-color-recognition); background: var(--ath-color-selected); }
.ath-menu__item svg { flex: none; color: var(--ath-color-text-secondary); }
.ath-menu__item--danger, .ath-menu__item--danger svg { color: var(--ath-color-error); }
.ath-menu__item--danger:hover { background: var(--ath-color-error-surface); color: var(--ath-color-error); }
.ath-menu__end { margin-left: auto; color: var(--ath-color-text-secondary); font-size: var(--ath-text-small); }
.ath-menu__who { display: flex; gap: var(--ath-space-3); align-items: center; padding: 10px 12px 14px; min-width: 0; }
.ath-menu__who small { display: block; color: var(--ath-color-text-secondary); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ath-menu--account { width: min(320px, calc(100vw - 32px)); }
.ath-menu--site { min-width: 280px; }
.ath-menu__profile { display: inline-block; margin-top: 2px; font-size: var(--ath-text-small); font-weight: var(--ath-weight-semibold); color: var(--ath-color-action); text-decoration: none; }
.ath-menu__profile:hover { text-decoration: underline; }
.ath-menu__count {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--ath-radius-full);
  background: var(--ath-color-action); color: var(--ath-color-text-on-action);
  font: var(--ath-weight-bold) 12px/22px var(--ath-font-sans); text-align: center;
}
/* a live session of the learner's is joinable now (header.js loadLiveNow): said in words, beside "Live sessions" */
.ath-menu__live { margin-left: auto; padding: 2px 8px; border-radius: var(--ath-radius-full); background: var(--ath-color-success-surface); color: var(--ath-color-success); font-size: 12px; font-weight: var(--ath-weight-bold); line-height: 18px; white-space: nowrap; }
.ath-menu__prefs { gap: var(--ath-space-2); padding: 10px 12px; }
.ath-menu__pref { display: flex; align-items: center; justify-content: space-between; gap: var(--ath-space-3); min-height: 40px; font-size: var(--ath-text-body); color: var(--ath-color-text); }
.ath-menu__select {
  min-height: 36px; padding: 0 28px 0 10px; border: 1px solid transparent; border-radius: var(--ath-radius-md);
  font: var(--ath-weight-regular) 15px var(--ath-font-sans); color: var(--ath-color-text-secondary); cursor: pointer;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23615d70' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 9l4-4 4 4M8 15l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 6px center;
  appearance: none; -webkit-appearance: none;
}
.ath-menu__select:hover { background-color: var(--ath-color-subtle); }
.ath-menu__select option { color: var(--ath-color-text); background: var(--ath-color-surface); }
.ath-seg--compact { padding: 3px; gap: 2px; background: var(--ath-color-subtle); border-color: transparent; }
.ath-seg__button {
  min-height: 30px; padding: 0 10px; border: 1px solid transparent; border-radius: 6px; background: none; cursor: pointer;
  font: var(--ath-weight-regular) 14px var(--ath-font-sans); color: var(--ath-color-text-secondary);
}
.ath-seg__button:hover { color: var(--ath-color-text); }
.ath-seg__button[aria-pressed="true"] { background: var(--ath-color-surface); border-color: var(--ath-color-border); color: var(--ath-color-text); font-weight: var(--ath-weight-bold); }
.ath-menu--notifications { width: min(380px, calc(100vw - 32px)); }
.ath-menu--cart { width: min(400px, calc(100vw - 32px)); padding: 0; overflow: hidden; }

.ath-notices { display: flex; flex-direction: column; gap: 2px; max-height: min(460px, calc(100vh - 200px)); overflow-y: auto; }
.ath-notice { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) 8px; gap: var(--ath-space-3); padding: 10px 12px; border-radius: var(--ath-radius-md); color: var(--ath-color-text); text-decoration: none; }
.ath-notice:hover { background: var(--ath-color-subtle); color: var(--ath-color-text); }
.ath-notice:focus-visible { outline: 2px solid var(--ath-color-focus); outline-offset: -2px; }
.ath-notice--unread { background: color-mix(in srgb, var(--ath-color-selected) 55%, transparent); }
.ath-notice__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--ath-radius-md); background: var(--ath-color-subtle); color: var(--ath-color-text-secondary); }
.ath-notice__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ath-notice__title { font-size: var(--ath-text-small); line-height: 1.35; overflow-wrap: anywhere; }
.ath-notice--unread .ath-notice__title { font-weight: var(--ath-weight-bold); }
.ath-notice__text { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.4; color: var(--ath-color-text-secondary); }
.ath-notice__time { font-size: 12px; color: var(--ath-color-text-secondary); }
.ath-notice__dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--ath-color-action); }
.ath-menu__head-action { padding: 0; border: 0; background: none; font: inherit; font-size: var(--ath-text-small); font-weight: var(--ath-weight-bold); color: var(--ath-color-action); cursor: pointer; }
.ath-menu__head-action:hover { text-decoration: underline; }
.ath-menu__empty { margin: 0; padding: 16px 12px; font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); }
.ath-menu__foot-link { display: block; margin-top: 4px; padding: 10px 12px; border-top: 1px solid var(--ath-color-border); font-size: var(--ath-text-small); font-weight: var(--ath-weight-bold); text-align: center; color: var(--ath-color-action); text-decoration: none; }
.ath-menu__foot-link:hover { background: var(--ath-color-subtle); }

/* Cart lines (dropdown + mobile sheet) */
.ath-cart__head { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 20px 12px; }
.ath-cart__list { list-style: none; margin: 0; padding: 0 20px; }
.ath-cart__line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--ath-color-border); }
.ath-cart__thumb { width: 64px; height: 48px; border-radius: var(--ath-radius-md); display: grid; place-items: center; font-weight: var(--ath-weight-semibold); font-size: 18px; text-decoration: none; }
.ath-cart__title { font-size: var(--ath-text-small); font-weight: var(--ath-weight-semibold); color: var(--ath-color-text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ath-cart__meta { font-size: var(--ath-text-caption); color: var(--ath-color-text-secondary); }
.ath-cart__remove { background: none; border: 0; padding: 0; min-height: 24px; font: inherit; font-size: var(--ath-text-caption); color: var(--ath-color-text-secondary); cursor: pointer; }
.ath-cart__foot { display: flex; flex-direction: column; gap: 12px; padding: 14px 20px 20px; border-top: 1px solid var(--ath-color-border); background: var(--ath-color-subtle); }
.ath-cart__total { display: flex; justify-content: space-between; align-items: baseline; }
.ath-cart__note { margin-top: -8px; font-size: var(--ath-text-caption); color: var(--ath-color-text-secondary); }
.ath-cart__view { display: flex; align-items: center; justify-content: center; min-height: 40px; font-size: var(--ath-text-small); text-decoration: none; }
.ath-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px 24px 24px; text-align: center; }
.ath-empty__icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--ath-color-selected); color: var(--ath-color-recognition); }
.ath-empty p { margin: 0; max-width: 28ch; font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); }

/* Search results (under the header field) */
.ath-search-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--ath-color-surface); border-bottom: 1px solid var(--ath-color-border); box-shadow: var(--ath-shadow-overlay); }
.ath-search-panel__inner { max-width: 880px; margin: 0 auto; padding: var(--ath-space-5) var(--ath-gutter) var(--ath-space-6); }
.ath-search-panel__field { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--ath-color-text); }
.ath-search-panel__field input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; font: inherit; font-size: clamp(20px, 2.4vw, 28px); color: var(--ath-color-text); outline: none; }
.ath-search-panel__label { margin: 20px 0 10px; font-size: var(--ath-text-caption); font-weight: var(--ath-weight-bold); letter-spacing: .08em; text-transform: uppercase; color: var(--ath-color-text-secondary); }
.ath-search-panel__note { margin: 0; color: var(--ath-color-text-secondary); }
.ath-search-panel__note--hint { margin-top: 20px; }
.ath-search-panel__all { margin-top: var(--ath-space-2); }
.ath-search-hit { display: flex; gap: 12px; align-items: center; padding: 10px 8px; margin: 0 -8px; border-radius: var(--ath-radius-md); color: inherit; text-decoration: none; }
.ath-search-hit:hover { background: var(--ath-color-subtle); color: inherit; }
.ath-search-hit__thumb { width: 44px; height: 32px; flex: none; border-radius: 6px; display: grid; place-items: center; font-weight: var(--ath-weight-semibold); font-size: 14px; }
.ath-search-hit small { display: block; font-size: var(--ath-text-caption); color: var(--ath-color-text-secondary); }

/* Mega menu · Component/Mega Menu (Explore) */
.ath-mega { position: absolute; left: 0; right: 0; top: 100%; width: min(1728px, calc(100vw - 2 * var(--ath-gutter))); margin-inline: auto; padding-top: 10px; }
.ath-mega__card {
  display: grid; grid-template-columns: minmax(220px, 22%) minmax(0, 1fr) minmax(280px, 26%); min-height: 0; max-height: calc(100vh - var(--ath-header-h) - 24px); overflow: auto;
  background: var(--ath-color-surface); border: 1px solid var(--ath-color-border); border-radius: var(--ath-radius-lg); box-shadow: var(--ath-shadow-overlay);
}
.ath-mega__areas { display: flex; flex-direction: column; gap: 4px; padding: 32px 20px; border-right: 1px solid var(--ath-color-border); }
.ath-mega__label { padding: 0 16px 12px; font-size: var(--ath-text-label); font-weight: var(--ath-weight-bold); letter-spacing: .06em; text-transform: uppercase; color: var(--ath-color-text-secondary); }
.ath-mega__area {
  position: relative; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px;
  border: 0; border-radius: var(--ath-radius-md); background: none; cursor: pointer; text-align: left; text-decoration: none;
  font: var(--ath-weight-regular) 17px var(--ath-font-sans); color: var(--ath-color-text);
}
.ath-mega__area:hover { background: var(--ath-color-subtle); color: var(--ath-color-text); }
.ath-mega__area[aria-current="true"] { background: var(--ath-color-selected); color: var(--ath-color-recognition); font-weight: var(--ath-weight-bold); }
.ath-mega__area[aria-current="true"]::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--ath-color-action); }
.ath-mega__area small { font-size: var(--ath-text-caption); font-weight: var(--ath-weight-regular); color: var(--ath-color-text-secondary); }
.ath-mega__list { display: flex; flex-direction: column; min-width: 0; padding: 36px 44px; }
.ath-mega__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--ath-color-border); }
.ath-mega__title { font-family: var(--ath-font-serif); font-size: 30px; line-height: 1.2; }
.ath-mega__head span { color: var(--ath-color-text-secondary); font-size: 15px; }
.ath-mega__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 8px 32px; }
.ath-mega__course { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--ath-radius-md); color: var(--ath-color-text); text-decoration: none; }
.ath-mega__course:hover { background: var(--ath-color-subtle); color: var(--ath-color-text); }
.ath-mega__course strong { font-size: 17px; }
.ath-mega__course small { font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); }
.ath-mega__all { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 20px; font-weight: var(--ath-weight-bold); }
.ath-mega__feature { display: flex; flex-direction: column; gap: 14px; padding: 36px; background: var(--ath-color-subtle); }
.ath-mega__feature-title { font-family: var(--ath-font-serif); font-size: 28px; line-height: 1.2; }
.ath-mega__feature p { margin: 0; color: var(--ath-color-text-secondary); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ath-mega__feature .ath-btn { align-self: flex-start; }
@media (max-width: 1279px) {
  .ath-mega__card { grid-template-columns: 240px minmax(0, 1fr); }
  .ath-mega__feature { display: none; }
}

/* Drawer · Nav/Mobile drawer (site pages only — account items stay in the account menu) */
.ath-scrim { position: fixed; inset: 0; z-index: 60; background: var(--ath-color-scrim); }
.ath-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61; width: min(380px, 90vw); overflow: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 20px calc(20px + env(safe-area-inset-bottom, 0px));
  background: var(--ath-color-surface); box-shadow: var(--ath-shadow-overlay);
}
.ath-drawer__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ath-drawer .ath-search-field { flex: none; width: 100%; font: var(--ath-weight-regular) var(--ath-text-body) var(--ath-font-sans); }
.ath-drawer__group { display: flex; flex-direction: column; padding-top: 8px; border-top: 1px solid var(--ath-color-border); }
.ath-drawer__label { padding: 8px 4px 4px; font-size: var(--ath-text-label); font-weight: var(--ath-weight-bold); letter-spacing: .06em; text-transform: uppercase; color: var(--ath-color-text-secondary); }
.ath-drawer__link {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 4px;
  border: 0; background: none; cursor: pointer; text-align: left; text-decoration: none;
  font: var(--ath-weight-regular) 17px var(--ath-font-sans); color: var(--ath-color-text);
}
.ath-drawer__link:hover { color: var(--ath-color-recognition); }
.ath-drawer__link[aria-current="page"] { color: var(--ath-color-recognition); font-weight: var(--ath-weight-bold); }
.ath-drawer__link small { font-size: var(--ath-text-caption); color: var(--ath-color-text-secondary); }
.ath-drawer__sub { display: flex; flex-direction: column; padding: 0 0 8px 12px; }
.ath-drawer__sub .ath-drawer__link { font-size: 16px; min-height: 44px; color: var(--ath-color-text-secondary); }
.ath-drawer__cta { display: grid; gap: 10px; padding-top: 16px; margin-top: auto; }

.ath-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 85vh; overflow: auto;
  padding-bottom: env(safe-area-inset-bottom); border-radius: 16px 16px 0 0;
  background: var(--ath-color-surface); box-shadow: var(--ath-shadow-overlay);
}

/* Header responsive */
@media (max-width: 1279px) {
  .ath-header__bar { gap: var(--ath-space-4); }
  .ath-avatar-btn__name { display: none; }
  .ath-avatar-btn .ath-chev { display: none; }
}
@media (max-width: 380px) {
  .ath-header__bar { gap: 6px; }
  .ath-brand__name { font-size: 22px; }
  .ath-hbtn { width: 40px; height: 40px; }
}

/* Footer · Nav/Footer */
.ath-footer { margin-top: clamp(64px, 8vw, 120px); padding: 56px var(--ath-gutter) calc(32px + env(safe-area-inset-bottom, 0px)); background: var(--ath-ink); color: var(--ath-dark-text); }
.ath-footer a { color: var(--ath-dark-text); text-decoration: none; }
.ath-footer a:hover { color: var(--ath-dark-text); text-decoration: underline; text-underline-offset: 3px; }
.ath-footer__button { padding: 0; border: 0; background: none; color: var(--ath-dark-text); font: inherit; text-align: left; cursor: pointer; }
.ath-footer__button:hover { text-decoration: underline; text-underline-offset: 3px; }
.ath-footer :focus-visible { outline-color: var(--ath-blue-100); }
.ath-footer__grid { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: 40px; }
.ath-footer__brand .ath-brand__name { display: block; margin-bottom: 10px; font-size: 28px; }
.ath-footer__brand p { margin: 0; max-width: 34ch; color: var(--ath-dark-muted); }
.ath-footer__heading { margin: 0 0 12px; font: var(--ath-weight-bold) 13px var(--ath-font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ath-lavender-300); }
.ath-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ath-footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--ath-dark-border); color: var(--ath-dark-muted); font-size: var(--ath-text-small);
}
.ath-footer__lang { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.ath-footer__lang button { min-height: 32px; padding: 6px 2px; border: 0; background: none; font: inherit; color: var(--ath-dark-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ath-footer__lang [aria-current] { color: var(--ath-dark-text); font-weight: var(--ath-weight-bold); }
@media (max-width: 1023px) { .ath-footer__grid { grid-template-columns: 1fr 1fr; } .ath-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .ath-footer__grid { grid-template-columns: 1fr; } }

/* Purchases and receipts (purchases.html): the purchase history with a summary, and beside it from 1024px the invoice
   details and help; each purchase is its course (thumbnail, title), date, receipt and code, amount and status, and the
   ways to its receipt and course */
.ath-purchases { display: grid; gap: clamp(32px, 4vw, 48px); align-items: start; }
.ath-purchases__summary { display: flex; flex-wrap: wrap; gap: var(--ath-space-3); margin: 0 0 var(--ath-space-5); }
.ath-purchases__stat { display: flex; flex-direction: column; gap: 2px; flex: 1 1 160px; padding: var(--ath-space-4) var(--ath-space-5); border-radius: var(--ath-radius-lg); background: var(--ath-color-surface); box-shadow: var(--ath-shadow-hairline); }
.ath-purchases__stat dt { font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); }
.ath-purchases__stat dd { margin: 0; font: var(--ath-weight-bold) var(--ath-text-title) / 1.3 var(--ath-font-sans); overflow-wrap: anywhere; }
.ath-purchases__list { display: flex; flex-direction: column; gap: var(--ath-space-3); margin: 0; padding: 0; list-style: none; }
.ath-purchases__side { display: flex; flex-direction: column; gap: var(--ath-space-4); }
.ath-purchases__panel { display: flex; flex-direction: column; gap: var(--ath-space-3); padding: var(--ath-space-5); border-radius: var(--ath-radius-lg); background: var(--ath-color-surface); box-shadow: var(--ath-shadow-hairline); }
.ath-purchases__panel-title { margin: 0; font: var(--ath-weight-bold) var(--ath-text-body) / 1.4 var(--ath-font-sans); }
.ath-purchases__panel-text { margin: 0; font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); }
.ath-purchases__panel .ath-settings-form { max-width: none; }
.ath-purchases .ath-empty-state { background: var(--ath-color-surface); }
@media (min-width: 1024px) { .ath-purchases { grid-template-columns: minmax(0, 1fr) 340px; } .ath-purchases__side { position: sticky; top: calc(var(--ath-header-h) + var(--ath-space-5)); } }
.ath-purchase { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: var(--ath-space-3) var(--ath-space-5); align-items: start; padding: var(--ath-space-4); border-radius: var(--ath-radius-lg); background: var(--ath-color-surface); box-shadow: var(--ath-shadow-hairline); }
.ath-purchase__thumb { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--ath-radius-md); background: var(--ath-color-selected); color: var(--ath-color-recognition); }
.ath-purchase__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ath-purchase__art[hidden] { display: none; }
.ath-purchase__body { display: flex; flex-direction: column; gap: var(--ath-space-1); min-width: 0; }
.ath-purchase__title { margin: 0; font: var(--ath-weight-bold) var(--ath-text-body) / 1.4 var(--ath-font-sans); overflow-wrap: anywhere; }
.ath-purchase__title a { color: var(--ath-color-text); text-decoration: none; }
.ath-purchase__title a:hover { color: var(--ath-color-action); text-decoration: underline; text-underline-offset: 3px; }
.ath-purchase__meta { margin: 0; font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); }
.ath-purchase__actions { display: flex; flex-wrap: wrap; gap: var(--ath-space-2); margin-top: var(--ath-space-2); }
.ath-purchase__actions:empty { display: none; }
.ath-purchase__end { display: flex; flex-direction: column; align-items: flex-end; gap: var(--ath-space-2); text-align: right; }
.ath-purchase__amount { font-size: var(--ath-text-title); white-space: nowrap; }
.ath-purchase__granted { font-size: var(--ath-text-small); font-weight: var(--ath-weight-bold); color: var(--ath-color-recognition); }
@media (max-width: 639px) {
  .ath-purchase { grid-template-columns: 72px minmax(0, 1fr); }
  .ath-purchase__end { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; padding-top: var(--ath-space-3); border-top: 1px solid var(--ath-color-border); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Patterns · Page sections (shared by the marketing and content pages)
   ═══════════════════════════════════════════════════════════════════════════ */
.ath-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.ath-page > main { flex: 1 1 0%; }
.ath-container { width: 100%; max-width: calc(var(--ath-container-2xl) + 2 * var(--ath-gutter)); margin-inline: auto; padding-inline: var(--ath-gutter); }
.ath-container--narrow { max-width: calc(880px + 2 * var(--ath-gutter)); }
.ath-kicker {
  display: inline-block; margin-bottom: var(--ath-space-3);
  font: var(--ath-weight-bold) var(--ath-text-label) / var(--ath-leading-label) var(--ath-font-sans);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ath-color-action);
}
.ath-section { padding-block: clamp(64px, 7vw, 120px); }
.ath-section--tint { background: color-mix(in srgb, var(--ath-color-subtle) 88%, transparent); }
.ath-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--ath-space-5); margin-bottom: clamp(28px, 3vw, 44px); }
.ath-section__head > div { max-width: 62ch; }
.ath-section__title { margin: 0; font-size: clamp(30px, 22px + 1.6vw, 44px); line-height: 1.15; text-wrap: balance; }
.ath-section__lead { margin: var(--ath-space-3) 0 0; font-size: var(--ath-text-body); line-height: 1.6; color: var(--ath-color-text-secondary); }
.ath-link-arrow { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: var(--ath-weight-bold); color: var(--ath-color-action); text-decoration: none; white-space: nowrap; }
.ath-link-arrow::after { content: "→"; transition: transform var(--ath-duration-fast) var(--ath-ease-standard); }
.ath-link-arrow:hover { color: var(--ath-color-action-hover); }
.ath-link-arrow:hover::after { transform: translateX(3px); }
@media (max-width: 767px) { .ath-section__head { flex-direction: column; align-items: flex-start; } }

/* Chips (hero quick searches, filters) */
.ath-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ath-space-2); }
.ath-chips[hidden] { display: none; }
.ath-chips__label { font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); }
.ath-chip {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 1px solid var(--ath-color-border);
  border-radius: var(--ath-radius-full); background: var(--ath-color-surface); color: var(--ath-color-text);
  font-size: var(--ath-text-small); text-decoration: none;
}
.ath-chip:hover { border-color: var(--ath-color-action); color: var(--ath-color-recognition); background: var(--ath-color-subtle); }

/* Course grid + loading skeleton (Course card · Skeleton) */
.ath-course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(20px, 2vw, 32px); }
.ath-course-grid--message { display: block; }
/* Rows (Figma · Learner / Wishlist): the same course card as image · details, one per line; a vertical card below 768 */
.ath-course-grid--rows { --ath-row-media: clamp(200px, 24vw, 300px); grid-template-columns: 1fr; gap: var(--ath-space-5); }
@media (min-width: 768px) {
  .ath-course-grid--rows .ath-course-card { display: grid; grid-template-columns: var(--ath-row-media) minmax(0, 1fr); gap: 0 var(--ath-space-5); padding: var(--ath-space-4); }
  .ath-course-grid--rows .ath-course-card__media { align-self: start; border-radius: var(--ath-radius-md); }
  .ath-course-grid--rows .ath-course-card__wish { top: calc(var(--ath-space-4) + 12px); right: auto; left: calc(var(--ath-space-4) + var(--ath-row-media) - 56px); }
  .ath-course-grid--rows .ath-course-card__body { padding: var(--ath-space-1) 0; }
  .ath-course-grid--rows .ath-course-card__title-slot { min-height: 0; }
  .ath-course-grid--rows .ath-course-card__foot { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .ath-course-grid--rows .ath-course-card__foot .ath-btn--block { width: auto; }
}
.ath-course-skeleton { display: flex; flex-direction: column; gap: 12px; padding-bottom: var(--ath-space-5); overflow: hidden; border: 1px solid var(--ath-color-border); border-radius: var(--ath-radius-lg); background: var(--ath-color-surface); }
.ath-course-skeleton__media { display: block; aspect-ratio: 16 / 10; margin-bottom: 4px; background: var(--ath-color-selected); }
.ath-course-skeleton > .ath-skeleton-line { margin-inline: var(--ath-space-4); }
/* a placeholder line (loading skeletons): calm, and only pulses when motion is welcome */
.ath-skeleton-line { display: block; width: 62%; height: 12px; border-radius: 4px; background: var(--ath-color-selected); }
.ath-skeleton-line--tag { width: 28%; height: 18px; }
.ath-skeleton-line--title { width: 78%; height: 18px; }
.ath-skeleton-line--short { width: 44%; }
.ath-skeleton-line--price { width: 22%; height: 20px; margin-top: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .ath-skeleton-line, .ath-course-skeleton__media { animation: ath-skeleton-pulse 1.6s var(--ath-ease-standard) infinite alternate; }
}
@keyframes ath-skeleton-pulse { to { opacity: .55; } }

/* Steps · How a programme works */
.ath-steps { --ath-steps-gap: clamp(24px, 3vw, 48px); list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--ath-steps-gap); }
.ath-step__num { display: block; margin-bottom: var(--ath-space-3); font: var(--ath-weight-regular) 40px/1 var(--ath-font-serif); color: var(--ath-color-action); }
.ath-step__title { margin: 0 0 var(--ath-space-2); font: var(--ath-weight-bold) var(--ath-text-title) / var(--ath-leading-title) var(--ath-font-sans); }
.ath-step__text { margin: 0; color: var(--ath-color-text-secondary); }
/* the method line (Motion HM-05): a connector from each step's number to the next, on one row (wide screens) */
@media (min-width: 1024px) {
  .ath-steps:has(> .ath-step:nth-child(3):last-child) .ath-step { position: relative; }
  .ath-steps:has(> .ath-step:nth-child(3):last-child) .ath-step:not(:last-child)::after {
    content: ""; position: absolute; top: 19px; left: 64px; right: calc(-1 * var(--ath-steps-gap) + 16px); height: 2px;
    border-radius: 1px; background: color-mix(in srgb, var(--ath-color-action) 45%, transparent); transform-origin: left center;
  }
  .ath-steps--armed .ath-step:not(:last-child)::after { transform: scaleX(0); }
  .ath-steps--armed .ath-step__num { opacity: .35; }
  .ath-steps--armed.is-drawn .ath-step__num { opacity: 1; transition: opacity var(--ath-duration-slow) var(--ath-ease-standard); }
  .ath-steps--armed.is-drawn .ath-step:not(:last-child)::after { transform: scaleX(1); transition: transform var(--ath-duration-slow) var(--ath-ease-move); }
  /* ~1 s in all: node 1, connector, node 2, connector, node 3 */
  .ath-steps--armed.is-drawn .ath-step:nth-child(1)::after { transition-delay: 120ms; }
  .ath-steps--armed.is-drawn .ath-step:nth-child(2) .ath-step__num { transition-delay: 360ms; }
  .ath-steps--armed.is-drawn .ath-step:nth-child(2)::after { transition-delay: 480ms; }
  .ath-steps--armed.is-drawn .ath-step:nth-child(3) .ath-step__num { transition-delay: 720ms; }
}
@media (prefers-reduced-motion: reduce) { .ath-steps--armed .ath-step__num { opacity: 1; } .ath-steps--armed .ath-step::after { transform: none !important; } }

/* Split: copy beside media */
.ath-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 96px); align-items: center; }
.ath-split__media { position: relative; margin: 0; aspect-ratio: 16 / 10; border-radius: var(--ath-radius-lg); overflow: hidden; }
.ath-split__copy .ath-link-arrow { margin-top: var(--ath-space-4); }
@media (max-width: 900px) { .ath-split { grid-template-columns: 1fr; } }
.ath-checklist { list-style: none; margin: var(--ath-space-5) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--ath-space-3); }
.ath-checklist li { position: relative; padding-left: 30px; }
.ath-checklist li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ath-color-selected) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2351417c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") no-repeat center;
}

/* Callout band · Credentials anyone can verify */
.ath-callout {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ath-space-5);
  padding: clamp(28px, 4vw, 48px); border-radius: var(--ath-radius-xl); background: var(--ath-color-selected);
}
.ath-callout > div:first-child { max-width: 62ch; }
.ath-callout__title { margin: 0; font-size: clamp(26px, 20px + 1vw, 34px); }
.ath-callout__text { margin: var(--ath-space-3) 0 0; color: var(--ath-color-text-secondary); }
.ath-callout__actions { display: flex; flex-wrap: wrap; gap: var(--ath-space-3); }

/* Accordion · Component/Accordion (native <details>, keyboard and screen-reader friendly) */
.ath-accordion { margin-top: var(--ath-space-5); border-top: 1px solid var(--ath-color-border); }
.ath-accordion__item { border-bottom: 1px solid var(--ath-color-border); }
.ath-accordion__summary {
  display: flex; align-items: center; gap: var(--ath-space-3); min-height: 60px; padding: 12px 0; cursor: pointer; list-style: none;
  font-weight: var(--ath-weight-bold); font-size: 17px;
}
.ath-accordion__summary::-webkit-details-marker { display: none; }
.ath-accordion__summary::before {
  content: ""; flex: none; width: 10px; height: 10px; margin: 0 6px 0 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform var(--ath-duration-standard) var(--ath-ease-move); color: var(--ath-color-action);
}
.ath-accordion__item[open] .ath-accordion__summary::before { transform: rotate(45deg); }
.ath-accordion__body { margin: 0; padding: 0 0 20px 34px; color: var(--ath-color-text-secondary); max-width: 70ch; }

/* ── Course card · Vertical (Figma) ─────────────────────────────────────── */
.ath-course-card {
  position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden;
  border-radius: var(--ath-radius-lg); background: var(--ath-color-surface); box-shadow: var(--ath-shadow-hairline);
  transition: box-shadow var(--ath-duration-standard) var(--ath-ease-standard), transform var(--ath-duration-standard) var(--ath-ease-standard);
}
.ath-course-card:hover { box-shadow: var(--ath-shadow-hairline), var(--ath-shadow-card); transform: translateY(calc(-1 * var(--ath-distance-xs))); }
.ath-course-card:focus-within { box-shadow: var(--ath-shadow-hairline), var(--ath-shadow-card); }
.ath-course-card__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ath-color-selected); }
.ath-course-card__art { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ath-color-recognition); background: linear-gradient(135deg, var(--ath-color-selected), var(--ath-color-subtle)); }
.ath-course-card__art[hidden] { display: none; }
.ath-course-card__art svg { opacity: 0.7; }
.ath-course-card__wish {
  position: absolute; top: 12px; right: 12px; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: var(--ath-color-surface); color: var(--ath-color-text-secondary); cursor: pointer;
  box-shadow: var(--ath-shadow-hairline);
}
.ath-course-card__wish:hover { color: var(--ath-color-action); }
.ath-course-card__wish[aria-pressed="true"] { color: var(--ath-color-action); }
.ath-course-card__body { display: flex; flex-direction: column; gap: var(--ath-space-2); flex: 1; padding: var(--ath-space-5); }
.ath-course-card__tags { display: flex; flex-wrap: wrap; gap: var(--ath-space-2); margin-bottom: var(--ath-space-1); }
.ath-course-card__done { background: var(--ath-color-success-surface); color: var(--ath-color-success); }
/* Title slot: always reserves 2 lines so cards in a row align; longer titles clamp to 2 */
.ath-course-card__title-slot { min-height: calc(2 * var(--ath-leading-title)); }
.ath-course-card__title {
  font: var(--ath-weight-regular) 22px / var(--ath-leading-title) var(--ath-font-serif); color: var(--ath-color-text); text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ath-course-card__title:hover { color: var(--ath-color-recognition); }
.ath-course-card__subtitle, .ath-course-card__meta { font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); }
.ath-course-card__rating { display: inline-flex; align-items: center; gap: 4px; font-size: var(--ath-text-small); font-weight: var(--ath-weight-bold); color: var(--ath-color-action); }
.ath-course-card__cert { display: inline-flex; align-items: center; gap: 6px; font-size: var(--ath-text-small); color: var(--ath-color-recognition); }
.ath-course-card__foot { display: flex; flex-direction: column; gap: var(--ath-space-3); margin-top: auto; padding-top: var(--ath-space-4); }
.ath-course-card__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.ath-course-card__price strong { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; font: var(--ath-weight-bold) 24px / 1.2 var(--ath-font-sans); }
/* the access line beside the price (not the spans of a sale price inside <strong>) */
.ath-course-card__price > span { font-size: var(--ath-text-caption); color: var(--ath-color-text-secondary); }
/* on sale: the regular price struck through, then the new one, larger, in the brand colour */
.ath-course-card__price .athenor-price-now { font-size: 26px; }
.ath-course-card__price .athenor-price-was { margin-right: 0; font-size: 17px; font-weight: var(--ath-weight-regular); }
.ath-course-card__progress { display: flex; flex-direction: column; gap: 8px; }
.ath-course-card__progress-head { display: flex; justify-content: space-between; font-size: var(--ath-text-small); }
.ath-course-card__progress-head span { color: var(--ath-color-text-secondary); }
.ath-progress { height: 6px; border-radius: var(--ath-radius-full); background: var(--ath-color-selected); overflow: hidden; }
.ath-progress__bar { display: block; height: 100%; border-radius: inherit; background: var(--ath-color-action); }
.ath-progress__bar--done { background: var(--ath-color-success); }

/* Status tag: the state in words, the dot is decoration only (credentials, enrolments) */
.ath-tag--success { background: var(--ath-color-success-surface); color: var(--ath-color-success); }
.ath-tag__dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: currentColor; }

/* Switch: a native checkbox drawn as a toggle (Figma · Components / Toggle) — still a checkbox to assistive tech */
.ath-switch {
  appearance: none; position: relative; flex: none; width: 44px; height: 24px; margin: 0; border-radius: var(--ath-radius-full);
  background: var(--ath-color-border-strong); cursor: pointer; transition: background var(--ath-duration-fast) var(--ath-ease-standard);
}
.ath-switch::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ath-color-surface);
  box-shadow: var(--ath-shadow-hairline); transition: transform var(--ath-duration-fast) var(--ath-ease-standard);
}
.ath-switch:checked { background: var(--ath-color-action); }
.ath-switch:checked::before { transform: translateX(20px); }
.ath-switch:disabled { opacity: .5; cursor: not-allowed; }
.ath-switch:focus-visible { outline: 2px solid var(--ath-color-focus); outline-offset: 2px; }
.ath-switch-row { display: flex; align-items: center; justify-content: space-between; gap: var(--ath-space-5); cursor: pointer; }
.ath-switch-row__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ath-switch-row__label { font-weight: var(--ath-weight-bold); }
.ath-switch-row__hint { font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); }

/* Description list: label · value pairs */
.ath-dl { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 10px 20px; margin: 0; font-size: var(--ath-text-small); }
.ath-dl dt { color: var(--ath-color-text-secondary); }
.ath-dl dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 479px) { .ath-dl { grid-template-columns: 1fr; gap: 2px; } .ath-dl dd + dt { margin-top: 10px; } }

/* ═══════════════════════════════════════════════════════════════════════════
   Patterns · Listing pages (catalogue, wishlist, my courses)
   ═══════════════════════════════════════════════════════════════════════════ */
/* Page head band with breadcrumb (Figma · Public / Catalogue) */
.ath-page-head { padding-block: clamp(32px, 4vw, 56px) clamp(32px, 4vw, 52px); background: color-mix(in srgb, var(--ath-color-subtle) 90%, transparent); border-bottom: 1px solid var(--ath-color-border); }
.ath-page-head__title { margin: var(--ath-space-3) 0 0; font-size: clamp(34px, 26px + 2vw, 52px); line-height: 1.1; text-wrap: balance; max-width: 22ch; }
.ath-page-head__search { margin-top: var(--ath-space-5); max-width: 560px; background: var(--ath-color-surface); }
.ath-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); }
.ath-breadcrumb a { color: var(--ath-color-action); text-decoration: none; }
.ath-breadcrumb a:hover { text-decoration: underline; }
.ath-breadcrumb [aria-current] { color: var(--ath-color-text); }

.ath-text-button { min-height: 32px; padding: 0 2px; border: 0; background: none; cursor: pointer; font: var(--ath-weight-semibold) var(--ath-text-small) var(--ath-font-sans); color: var(--ath-color-action); text-decoration: underline; text-underline-offset: 3px; }
.ath-text-button:hover { color: var(--ath-color-action-hover); }
.ath-text-button:disabled { color: var(--ath-color-text-secondary); text-decoration: none; cursor: default; }

/* Category chips: single-select toggle buttons that scroll sideways on narrow screens */
.ath-chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 4px 2px; }
.ath-chips--scroll::-webkit-scrollbar { display: none; }
.ath-chip--toggle { flex: none; min-height: 40px; padding: 0 16px; cursor: pointer; font: inherit; font-size: var(--ath-text-small); }
.ath-chip--toggle[aria-pressed="true"], .ath-chip--toggle[aria-selected="true"] { background: var(--ath-color-selected); border-color: var(--ath-color-recognition); color: var(--ath-color-recognition); font-weight: var(--ath-weight-bold); }
.ath-chip__badge { min-width: 20px; margin-left: 6px; padding: 1px 7px; border-radius: var(--ath-radius-full); background: var(--ath-color-action); color: var(--ath-color-text-on-action); font-size: var(--ath-text-caption); font-weight: var(--ath-weight-bold); text-align: center; }
.ath-chip--removable { gap: 6px; min-height: 32px; padding: 0 10px 0 12px; border-color: transparent; background: var(--ath-color-selected); color: var(--ath-color-recognition); font: var(--ath-weight-semibold) var(--ath-text-small) var(--ath-font-sans); cursor: pointer; }
.ath-chip--removable:hover { border-color: var(--ath-color-recognition); }
.ath-chip--new { animation: ath-chip-in var(--ath-duration-fast) var(--ath-ease-standard) both; }
@keyframes ath-chip-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ath-chip--new { animation: none; } }

/* Filter panel · Filter/Panel, Filter/Group */
.ath-filters { position: sticky; top: calc(var(--ath-header-h) + 24px); display: flex; flex-direction: column; }
.ath-filters__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--ath-color-border); }
.ath-filters__title { margin: 0; font: var(--ath-weight-bold) var(--ath-text-title) / var(--ath-leading-title) var(--ath-font-sans); }
.ath-filter-group { border-bottom: 1px solid var(--ath-color-border); }
.ath-filter-group--flat { padding: 12px 0; }
.ath-filter-group__summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 48px; cursor: pointer; list-style: none;
  font-weight: var(--ath-weight-bold);
}
.ath-filter-group__summary::-webkit-details-marker { display: none; }
.ath-filter-group__summary::after {
  content: ""; width: 8px; height: 8px; margin-right: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform var(--ath-duration-standard) var(--ath-ease-move);
}
.ath-filter-group[open] > .ath-filter-group__summary::after { transform: rotate(-135deg); }
.ath-filter-group__options { display: flex; flex-direction: column; gap: 6px; padding-bottom: 14px; }
.ath-choice-row--touch { min-height: 44px; }

/* Results bar · Results bar */
.ath-results-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: var(--ath-space-4); }
.ath-results-bar__count { font-size: var(--ath-text-title); }
.ath-results-bar__sort { display: flex; align-items: center; gap: 10px; font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); }
.ath-results-bar__sort .ath-input { width: auto; min-height: 44px; padding-block: 8px; }
.ath-results-bar--mobile { flex-direction: column; align-items: stretch; }
.ath-results-bar__controls { display: flex; gap: 10px; }
.ath-results-bar__controls > * { flex: 1 1 0; min-width: 0; }
.ath-active-filters { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 var(--ath-space-5); padding: 0; }

/* Pagination · Pagination */
.ath-pagination ul { list-style: none; display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; }
.ath-pagination__page, .ath-pagination__step {
  display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 6px; border: 0; border-radius: var(--ath-radius-md);
  background: none; color: var(--ath-color-text); font: var(--ath-weight-semibold) var(--ath-text-body) var(--ath-font-sans); cursor: pointer;
}
.ath-pagination__page:hover, .ath-pagination__step:hover:not(:disabled) { background: var(--ath-color-subtle); }
.ath-pagination__page[aria-current="page"] { background: var(--ath-color-action); color: var(--ath-color-text-on-action); }
.ath-pagination__step:disabled { color: var(--ath-color-border-strong); cursor: not-allowed; opacity: 0.5; }
.ath-pagination__gap { min-width: 24px; text-align: center; color: var(--ath-color-text-secondary); }

/* Empty state · Results/State (No results) */
.ath-empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: clamp(40px, 6vw, 72px) 24px; text-align: center;
  border-radius: var(--ath-radius-lg); background: var(--ath-color-surface); box-shadow: var(--ath-shadow-hairline);
}
.ath-empty-state__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--ath-color-selected); color: var(--ath-color-recognition); }
.ath-empty-state__title { margin: 8px 0 0; font-size: var(--ath-text-heading-2); }
.ath-empty-state__text { margin: 0; max-width: 46ch; color: var(--ath-color-text-secondary); }

/* Mobile filter sheet · Catalogue · Filters open */
.ath-filter-sheet { display: flex; flex-direction: column; }
.ath-filter-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--ath-color-border); }
.ath-filter-sheet__body { padding: 0 20px; overflow: auto; }
.ath-filter-sheet__foot { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); background: var(--ath-color-surface); border-top: 1px solid var(--ath-color-border); }

/* ── Prose (authored rich text from the course content) ─────────────────── */
.ath-prose { font-size: 17px; line-height: 1.65; color: var(--ath-color-text); max-width: 70ch; }
.ath-prose > :first-child { margin-top: 0; }
.ath-prose > :last-child { margin-bottom: 0; }
.ath-prose p, .ath-prose ul, .ath-prose ol { margin: 0 0 var(--ath-space-4); }
.ath-prose li { margin-bottom: var(--ath-space-1); }
.ath-checklist--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px 32px; margin-top: 0; }
.ath-checklist--compact { gap: var(--ath-space-2); margin-top: 0; font-size: var(--ath-text-small); }
.ath-checklist--compact li { padding-left: 26px; }
.ath-checklist--compact li::before { width: 18px; height: 18px; top: 1px; }

/* ── Section navigation · Nav/Course section nav (sticky under the header) ── */
.ath-section-nav { position: sticky; top: var(--ath-header-h); z-index: 20; background: var(--ath-color-surface); border-bottom: 1px solid var(--ath-color-border); }
.ath-section-nav ul { list-style: none; display: flex; gap: var(--ath-space-1); margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.ath-section-nav ul::-webkit-scrollbar { display: none; }
.ath-section-nav a {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 14px; white-space: nowrap; text-decoration: none;
  color: var(--ath-color-text-secondary); font-weight: var(--ath-weight-semibold); border-bottom: 2px solid transparent;
}
.ath-section-nav a:hover { color: var(--ath-color-text); }
.ath-section-nav a[aria-current="true"] { color: var(--ath-color-recognition); border-bottom-color: var(--ath-color-action); }

/* ── Curriculum · Curriculum/Week, Curriculum/Session row ───────────────── */
.ath-curriculum { border-top: 1px solid var(--ath-color-border); }
.ath-curriculum__module { border-bottom: 1px solid var(--ath-color-border); }
.ath-curriculum__toggle {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; width: 100%; min-height: 56px; padding: 12px 4px;
  border: 0; background: none; cursor: pointer; text-align: left; font: inherit; color: var(--ath-color-text);
}
.ath-curriculum__toggle:hover { background: var(--ath-color-subtle); }
.ath-curriculum__chev { display: grid; color: var(--ath-color-action); transform: rotate(-90deg); transition: transform var(--ath-duration-standard) var(--ath-ease-move); }
.ath-curriculum__toggle[aria-expanded="true"] .ath-curriculum__chev { transform: none; }
.ath-curriculum__meta { font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); white-space: nowrap; }
.ath-curriculum__lessons { list-style: none; margin: 0; padding: 0 4px 12px 34px; }
.ath-curriculum--flat .ath-curriculum__lessons { padding-left: 4px; }
.ath-curriculum__lesson { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; min-height: 44px; padding: 8px 0; border-bottom: 1px solid color-mix(in srgb, var(--ath-color-border) 60%, transparent); }
.ath-curriculum__lesson:last-child { border-bottom: 0; }
.ath-curriculum__num { min-width: 22px; font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); font-variant-numeric: tabular-nums; }

/* ── Instructor · Instructor card ───────────────────────────────────────── */
.ath-instructor { display: grid; grid-template-columns: auto 1fr; gap: var(--ath-space-5); padding: var(--ath-space-5); border-radius: var(--ath-radius-lg); background: var(--ath-color-surface); box-shadow: var(--ath-shadow-hairline); }
.ath-instructor__name { margin: 0; font-size: var(--ath-text-heading-2); }
.ath-instructor__role { display: block; margin: 4px 0 var(--ath-space-3); font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); }
@media (max-width: 520px) { .ath-instructor { grid-template-columns: 1fr; } }

/* ── Enrol panel · Enrol panel ──────────────────────────────────────────── */
.ath-enrol { display: flex; flex-direction: column; gap: var(--ath-space-4); padding: var(--ath-space-5); border-radius: var(--ath-radius-lg); background: var(--ath-color-surface); box-shadow: var(--ath-shadow-hairline), var(--ath-shadow-card); }
.ath-enrol__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.ath-enrol__price strong { font: var(--ath-weight-regular) 40px / 1.1 var(--ath-font-serif); }
.ath-enrol__price span { font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); }
.ath-enrol__sale { margin: -8px 0 0; font-size: var(--ath-text-small); font-weight: var(--ath-weight-bold); color: var(--ath-color-warning); }
.ath-enrol__actions { flex-direction: column; align-items: stretch; }
.ath-enrol__includes { padding-top: var(--ath-space-4); border-top: 1px solid var(--ath-color-border); }
.ath-enrol__title { margin: 0 0 var(--ath-space-3); font: var(--ath-weight-bold) var(--ath-text-body) var(--ath-font-sans); }
.ath-course-wish[aria-pressed="true"] { color: var(--ath-color-recognition); }

.ath-state { padding-block: clamp(64px, 10vw, 140px); }
.ath-empty-state--compact { padding: var(--ath-space-6) var(--ath-space-5); }
.ath-empty-state--error .ath-empty-state__icon { background: var(--ath-color-error-surface); color: var(--ath-color-error); }
/* the error takes focus so it is announced; it is not a control, so it draws no focus ring */
.ath-empty-state--error:focus { outline: none; }
.ath-empty-state__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--ath-space-3) var(--ath-space-5); margin-top: var(--ath-space-2); }
.ath-empty-state__link { display: inline-flex; align-items: center; min-height: 44px; font-weight: var(--ath-weight-bold); color: var(--ath-color-action); text-decoration: underline; text-underline-offset: 3px; }

/* Learner page (.ath-learner): title, lead and titled sections — My learning, Credentials, Wishlist, Notifications */
.ath-learner { padding-block: clamp(32px, 4vw, 56px) clamp(56px, 6vw, 96px); }
.ath-learner__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--ath-space-5) var(--ath-space-7); }
.ath-learner__note { margin: var(--ath-space-5) 0 0; font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); }
.ath-learner__back { margin-bottom: var(--ath-space-5); font-size: var(--ath-text-small); }
.ath-learner__back a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--ath-color-action); font-weight: var(--ath-weight-bold); text-decoration: underline; text-underline-offset: 3px; }
.ath-learner__title { margin: 0; font-size: clamp(32px, 24px + 1.6vw, 52px); line-height: 1.15; overflow-wrap: anywhere; }
.ath-learner__lead { margin: var(--ath-space-4) 0 0; max-width: 62ch; color: var(--ath-color-text-secondary); }
.ath-learner__section { margin-top: clamp(40px, 5vw, 64px); }
.ath-learner__section-title { margin: 0 0 var(--ath-space-5); font-size: var(--ath-text-heading-2); line-height: var(--ath-leading-heading-2); }

/* ── Account settings shell · Learner / Account settings ────────────────── */
.ath-settings { padding-block: clamp(36px, 5vw, 64px) clamp(56px, 6vw, 96px); }
.ath-settings__title { margin: 0 0 clamp(24px, 3vw, 40px); font-size: clamp(34px, 26px + 2vw, 52px); }
.ath-settings__layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.ath-settings__nav { min-width: 0; }
.ath-settings__nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ath-settings__link {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: var(--ath-radius-md);
  color: var(--ath-color-text); text-decoration: none; font-size: 15px;
}
.ath-settings__link svg { flex: none; color: var(--ath-color-text-secondary); }
.ath-settings__link:hover { background: var(--ath-color-subtle); color: var(--ath-color-text); }
.ath-settings__link[aria-current] { background: var(--ath-color-selected); color: var(--ath-color-recognition); font-weight: var(--ath-weight-bold); }
.ath-settings__link[aria-current] svg { color: var(--ath-color-recognition); }
.ath-settings__link[aria-current]::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--ath-color-action); }
.ath-settings__content { display: flex; flex-direction: column; gap: var(--ath-space-5); max-width: 760px; min-width: 0; }
.ath-settings__heading { margin: 0; font-size: clamp(28px, 22px + 1vw, 34px); }
.ath-settings__lead { margin: -8px 0 0; color: var(--ath-color-text-secondary); }
/* Settings sections (Figma · Learner / Settings): flat — a title, then rows separated by a rule; a switch or an action at
   the end of a row; a form's outcome line under its button. */
.ath-settings-section { display: flex; flex-direction: column; gap: var(--ath-space-4); }
.ath-settings-section__title { margin: 0; font: var(--ath-weight-bold) var(--ath-text-title) / var(--ath-leading-title) var(--ath-font-sans); }
.ath-settings-section__text { margin: 0; color: var(--ath-color-text-secondary); }
.ath-settings-rows { display: flex; flex-direction: column; }
.ath-settings-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: var(--ath-space-4); border-top: 1px solid var(--ath-color-border); }
.ath-settings-row__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 240px; }
.ath-settings-row__label { font-weight: var(--ath-weight-bold); }
.ath-settings-row__hint { margin: 0; font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); }
.ath-settings-form { display: flex; flex-direction: column; align-items: flex-start; gap: var(--ath-space-4); max-width: 520px; }
.ath-settings-form > .ath-field, .ath-settings-form > .ath-fieldset { align-self: stretch; }
.ath-fieldset { display: flex; flex-direction: column; gap: var(--ath-space-3); min-width: 0; margin: 0; padding: 0; border: 0; }
.ath-fieldset legend { margin-bottom: var(--ath-space-2); padding: 0; font-weight: var(--ath-weight-bold); }
.ath-settings-danger { display: flex; flex-direction: column; align-items: flex-start; gap: var(--ath-space-2); padding: var(--ath-space-4) var(--ath-space-5); border: 1px solid var(--ath-color-error); border-radius: var(--ath-radius-lg); }
.ath-settings-danger__title { margin: 0; color: var(--ath-color-error); font: var(--ath-weight-bold) var(--ath-text-body) / var(--ath-leading-body) var(--ath-font-sans); }
.ath-settings-danger .ath-btn { margin-top: var(--ath-space-2); }
/* Receipt (Figma · Learner / Receipt detail; Receipt · Print A4) */
.ath-receipt { display: flex; flex-direction: column; gap: var(--ath-space-5); max-width: 820px; }
.ath-receipt__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ath-space-3); }
.ath-receipt__title { margin: 0; font-size: clamp(26px, 22px + 1vw, 32px); }
.ath-receipt__actions { display: flex; flex-wrap: wrap; gap: var(--ath-space-3); }
.ath-receipt__parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--ath-space-5); }
.ath-receipt__parties p { margin: 0; }
.ath-receipt__label { margin: 0 0 var(--ath-space-2); font: var(--ath-weight-bold) var(--ath-text-caption) / 1.4 var(--ath-font-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--ath-color-text-secondary); }
.ath-receipt__facts { display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr); gap: 8px 24px; margin: 0; }
.ath-receipt__facts dt { color: var(--ath-color-text-secondary); font-size: var(--ath-text-small); }
.ath-receipt__facts dd { margin: 0; font-weight: var(--ath-weight-bold); overflow-wrap: anywhere; }
.ath-receipt__mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: var(--ath-weight-regular); font-size: var(--ath-text-small); }
.ath-receipt__lines { width: 100%; border-collapse: collapse; border-top: 1px solid var(--ath-color-text); }
.ath-receipt__lines th { padding: 12px 8px; font-size: var(--ath-text-caption); font-weight: var(--ath-weight-bold); color: var(--ath-color-text-secondary); text-align: right; border-bottom: 1px solid var(--ath-color-border); }
.ath-receipt__lines td { padding: 14px 8px; text-align: right; border-bottom: 1px solid var(--ath-color-border); }
.ath-receipt__lines :is(th, td):first-child { padding-left: 0; text-align: left; }
.ath-receipt__lines :is(th, td):last-child { padding-right: 0; }
.ath-receipt__totals { display: grid; grid-template-columns: auto auto; justify-content: end; gap: 8px 24px; margin: 0; text-align: right; }
.ath-receipt__totals dt { color: var(--ath-color-text-secondary); font-size: var(--ath-text-small); }
.ath-receipt__totals dd { margin: 0; }
.ath-receipt__totals .ath-receipt__total { color: var(--ath-color-text); font-weight: var(--ath-weight-bold); font-size: var(--ath-text-body); }
dd.ath-receipt__total { font-size: var(--ath-text-title); }
.ath-receipt__note { margin: 0; font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); }
@media (max-width: 479px) {
  .ath-receipt__facts { grid-template-columns: 1fr; gap: 2px; }
  .ath-receipt__facts dd { margin-bottom: 8px; }
  .ath-receipt__lines :is(th, td):nth-child(2), .ath-receipt__lines :is(th, td):nth-child(3) { display: none; }
}
@media print {
  @page { size: A4; margin: 18mm; }
  .ath-topbar, .ath-receipt .ath-breadcrumb, .ath-receipt__actions { display: none !important; }
  .ath-learner { padding: 0; }
  .ath-receipt { color: #000; }
}
.ath-settings-preview { display: flex; flex-direction: column; gap: 4px; align-self: stretch; padding: var(--ath-space-3) var(--ath-space-4); border: 1px solid var(--ath-color-border); border-radius: var(--ath-radius-md); background: var(--ath-color-subtle); }
.ath-settings-preview__label { font: var(--ath-weight-bold) var(--ath-text-caption) / 1.4 var(--ath-font-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--ath-color-text-secondary); }
.ath-form-message { margin: 0; font-size: var(--ath-text-small); }
.ath-form-message[hidden] { display: none; }
.ath-form-message--error { color: var(--ath-color-error); }
.ath-form-message--success { color: var(--ath-color-success); }
.ath-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--ath-space-4); }
.ath-avatar { display: grid; place-items: center; flex: none; overflow: hidden; border-radius: 50%; background: var(--ath-color-selected); color: var(--ath-color-recognition); font-weight: var(--ath-weight-bold); }
.ath-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ath-avatar--lg { width: 72px; height: 72px; font-size: 22px; }
.ath-profile-card { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--ath-space-5); }
.ath-profile-card__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 180px; }
.ath-profile-card__name { font-size: var(--ath-text-title); }
.ath-profile-card__upload { align-self: flex-start; max-width: 100%; margin-top: 8px; white-space: normal; cursor: pointer; }
@media (max-width: 1023px) {
  .ath-settings__layout { grid-template-columns: 1fr; }
  .ath-settings__nav ul { flex-direction: row; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .ath-settings__nav ul::-webkit-scrollbar { display: none; }
  .ath-settings__link { white-space: nowrap; border: 1px solid var(--ath-color-border); border-radius: var(--ath-radius-full); }
  .ath-settings__link[aria-current]::before { display: none; }
}

/* ── Onboarding · Learner / Onboarding (ACCOUNT-05) — the page is the learner's welcome ──────────────────────────── */
.ath-welcome { flex: 1; display: grid; place-items: start center; padding: clamp(32px, 6vw, 72px) var(--ath-gutter); background: var(--ath-color-canvas); }
.ath-welcome__card { display: flex; flex-direction: column; gap: var(--ath-space-4); width: min(560px, 100%); padding: clamp(24px, 4vw, 40px); border: 1px solid var(--ath-color-border); border-radius: var(--ath-radius-lg); background: var(--ath-color-surface); }
.ath-welcome__step { margin: 0; font: var(--ath-weight-bold) var(--ath-text-caption) / 1.4 var(--ath-font-sans); color: var(--ath-color-action); }
.ath-welcome__bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: -8px; }
.ath-welcome__bars span { height: 4px; border-radius: 2px; background: var(--ath-color-selected); }
.ath-welcome__bars .is-done { background: var(--ath-color-action); }
.ath-welcome__title { margin: 0; font-size: clamp(28px, 22px + 1.4vw, 34px); line-height: 1.2; }
.ath-welcome__title:focus { outline: none; }
.ath-welcome__lead { margin: -4px 0 0; color: var(--ath-color-text-secondary); }
.ath-welcome__form { display: flex; flex-direction: column; gap: var(--ath-space-5); }
.ath-welcome__topics { display: flex; flex-wrap: wrap; gap: 10px; }
.ath-welcome__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ath-space-3); }
.ath-welcome__actions > :last-child { margin-left: auto; }
/* a checkbox drawn as a chip (Figma · Onboarding · Step 2) — still a checkbox to assistive tech */
.ath-chip-check { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border: 1px solid var(--ath-color-border-strong); border-radius: var(--ath-radius-full); cursor: pointer; font-size: 15px; }
.ath-chip-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--ath-color-action); }
.ath-chip-check:has(input:checked) { border-color: var(--ath-color-action); background: var(--ath-color-selected); font-weight: var(--ath-weight-bold); }
.ath-chip-check:has(input:focus-visible) { outline: 2px solid var(--ath-color-focus); outline-offset: 2px; }
.ath-welcome-prompt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ath-space-4); margin: var(--ath-space-5) 0; padding: var(--ath-space-4) var(--ath-space-5); border-radius: var(--ath-radius-lg); background: var(--ath-color-selected); }
.ath-welcome-prompt__title { margin: 0; font: var(--ath-weight-bold) var(--ath-text-title) / var(--ath-leading-title) var(--ath-font-sans); }
.ath-welcome-prompt__text { margin: 4px 0 0; color: var(--ath-color-text-secondary); }
/* the catalogue: the learner's own topics (onboarding) lead the category chips, marked with a dot */
.ath-chip--interest::before { content: ""; width: 6px; height: 6px; margin-right: 2px; border-radius: 50%; background: var(--ath-color-action); }

/* ── Cookie consent · Public / Home · Cookie banner (ACCOUNT-07) — shown only when there is an optional category ── */
.ath-cookie-banner { position: fixed; inset: auto 0 0 0; z-index: 900; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ath-space-4) var(--ath-space-6); padding: var(--ath-space-4) var(--ath-gutter); border-top: 1px solid var(--ath-color-border); background: var(--ath-color-surface); box-shadow: var(--ath-shadow-card); }
.ath-cookie-banner__text { flex: 1 1 420px; min-width: 0; }
.ath-cookie-banner__title { margin: 0 0 4px; font: var(--ath-weight-bold) var(--ath-text-body) / var(--ath-leading-body) var(--ath-font-sans); }
.ath-cookie-banner__text p { margin: 0; font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); }
.ath-cookie-banner__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ath-space-3); }

/* ── Faculty · Public / Faculty, Instructor profile (ACCOUNT-08) ─────────────── */
.ath-page-head__lead { margin: var(--ath-space-3) 0 0; max-width: 62ch; color: var(--ath-color-text-secondary); }
.ath-faculty__body { padding-block: clamp(32px, 4vw, 56px) clamp(56px, 6vw, 96px); }
.ath-faculty__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--ath-space-4); margin: 0; padding: 0; list-style: none; }
.ath-faculty-card { position: relative; display: flex; align-items: center; gap: var(--ath-space-4); height: 100%; padding: var(--ath-space-4) var(--ath-space-5); border: 1px solid var(--ath-color-border); border-radius: var(--ath-radius-lg); background: var(--ath-color-surface); color: var(--ath-color-text); }
.ath-faculty-card:hover, .ath-faculty-card:focus-within { border-color: var(--ath-color-action); }
/* the name is the card's link to the profile: its hit area covers the card; the LinkedIn link sits above it */
.ath-faculty-card__name::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.ath-faculty-card__name:focus-visible { outline: none; }
.ath-faculty-card__name:focus-visible::after { outline: 2px solid var(--ath-color-focus); outline-offset: 2px; }
.ath-faculty-card .ath-linkedin { position: relative; z-index: 1; margin-left: auto; }
.ath-faculty-card .ath-avatar { width: 48px; height: 48px; font-size: 15px; }
.ath-faculty-card__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ath-faculty-card__name { color: inherit; font-weight: var(--ath-weight-bold); text-decoration: none; }
.ath-faculty-card__role, .ath-faculty-card__meta { font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); }
/* Faculty · Loading: an instructor card's frame with placeholder lines (pages.mjs SHELL_BODY.faculty) */
.ath-faculty-skeleton { display: flex; align-items: center; gap: var(--ath-space-4); padding: var(--ath-space-4) var(--ath-space-5); border: 1px solid var(--ath-color-border); border-radius: var(--ath-radius-lg); background: var(--ath-color-surface); }
.ath-faculty-skeleton__avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--ath-color-selected); }
.ath-faculty-skeleton__text { display: flex; flex: 1; flex-direction: column; gap: 10px; min-width: 0; padding-block: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .ath-faculty-skeleton__avatar { animation: ath-skeleton-pulse 1.6s var(--ath-ease-standard) infinite alternate; }
}
.ath-avatar--xl { width: 112px; height: 112px; font-size: 32px; }
.ath-faculty-profile__id { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ath-space-5); margin-top: var(--ath-space-4); }
.ath-faculty-profile__id .ath-page-head__title { margin: 0; }
.ath-faculty-profile__body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(24px, 4vw, 48px); align-items: start; padding-block: clamp(32px, 4vw, 56px) clamp(56px, 6vw, 96px); }
.ath-faculty-profile__main { display: flex; flex-direction: column; gap: clamp(32px, 4vw, 48px); min-width: 0; }
.ath-faculty-profile__facts { padding: var(--ath-space-5); border: 1px solid var(--ath-color-border); border-radius: var(--ath-radius-lg); background: var(--ath-color-surface); }
.ath-faculty-profile__facts dl { display: grid; gap: 4px; margin: 0; }
.ath-faculty-profile__facts dt { font-size: var(--ath-text-small); color: var(--ath-color-text-secondary); }
.ath-faculty-profile__facts dd { margin: 0 0 var(--ath-space-3); font-weight: var(--ath-weight-bold); }
.ath-faculty-profile__links { display: flex; flex-direction: column; gap: 4px; }
.ath-instructor__links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ath-space-2) var(--ath-space-5); margin-top: var(--ath-space-2); }
.ath-instructor__profile { display: inline-flex; align-items: center; min-height: 44px; color: var(--ath-color-action); font-weight: var(--ath-weight-bold); }
/* LinkedIn (pages/_faculty.js linkedinLinkHTML): an icon on a faculty card, a button on the profile, a link on the course page */
.ath-linkedin { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 8px; min-height: 44px; color: var(--ath-color-action); font-weight: var(--ath-weight-bold); text-decoration: none; }
.ath-linkedin:hover { text-decoration: underline; }
.ath-linkedin:focus-visible { outline: 2px solid var(--ath-color-focus); outline-offset: 2px; border-radius: var(--ath-radius-sm); }
.ath-linkedin--card { width: 44px; border: 1px solid var(--ath-color-border); border-radius: 50%; }
.ath-linkedin--card:hover { background: var(--ath-color-selected); text-decoration: none; }
.ath-linkedin--button { margin-top: var(--ath-space-3); padding: 0 var(--ath-space-4); border: 1px solid var(--ath-color-border-strong); border-radius: var(--ath-radius-full); background: var(--ath-color-surface); }
.ath-linkedin--button:hover { border-color: var(--ath-color-action); text-decoration: none; }
@media (max-width: 1023px) { .ath-faculty-profile__body { grid-template-columns: 1fr; } }

/* ── View as student · Admin / View as student · Audit banner (ACCOUNT-10) ─── */
.ath-viewas { position: sticky; top: 0; z-index: 1000; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding: 10px var(--ath-gutter); background: var(--ath-ink); color: var(--ath-dark-text); font-weight: var(--ath-weight-bold); font-size: var(--ath-text-small); }
.ath-viewas__exit { min-height: 32px; padding: 0 4px; border: 0; background: none; color: var(--ath-dark-text); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ath-viewas__exit:focus-visible { outline: 2px solid var(--ath-lavender-300); outline-offset: 2px; }

/* ── Shared helpers drawn by the scripts (cards.js, util.js) ──────────────────────────────────────────────────────────── */
/* a course image covering its frame (course cards, cart, course hero, My Courses) */
.ath-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* a course family's language line on its card */
.ath-family-langs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ath-family-langs__badge { align-self: flex-start; }
.ath-family-langs__also { font-size: 13px; color: var(--athenor-ink-2); }
/* a person's photo or initials (util.js avatarHTML): the caller's size comes in as custom properties */
.ath-user-avatar { display: grid; flex: none; place-items: center; overflow: hidden; width: var(--ath-av-size, 40px); height: var(--ath-av-size, 40px); border-radius: 50%; background: var(--color-accent-100); color: var(--color-accent-700); font-size: var(--ath-av-font, 13px); font-weight: 600; }
.ath-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
