/* App styles. Logical properties only (RTL + LTR). No inline styles anywhere: CSP forbids them.
   Class vocabulary is documented in docs/ui-guide.md. */

/* ---------- Fonts (self-hosted, SIL OFL): Inter for Latin and digits, Almarai for Arabic (owner decision, Dec 2026) ---------- */
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Almarai"; src: url("../fonts/almarai-300.woff2") format("woff2"); font-weight: 300; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Almarai"; src: url("../fonts/almarai-400.woff2") format("woff2"); font-weight: 400 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Almarai"; src: url("../fonts/almarai-700.woff2") format("woff2"); font-weight: 600 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Almarai"; src: url("../fonts/almarai-800.woff2") format("woff2"); font-weight: 800 900; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plex-mono-latin-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  font-family: var(--font-body); font-size: 16px; line-height: 1.7;
  background: var(--plaster); color: var(--night);
}
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); text-wrap: balance; line-height: 1.25; }
p { margin: 0; }
a { color: var(--teal-text); }
a:hover { color: var(--night); }
img { max-width: 100%; }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
/* Any form control without its own style still gets the theme's field colours (zero specificity, so component rules win). */
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]), select, textarea) { background-color: var(--field-bg); color: var(--night); border-color: var(--field-line); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.on-dark :focus-visible { outline-color: var(--rose); }
[dir="rtl"] .flip { transform: scaleX(-1); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.mono { font-family: var(--font-mono); font-weight: 500; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: var(--s-4); top: -100px; z-index: 50; background: var(--surface); color: var(--night); padding: var(--s-2) var(--s-4); border-radius: var(--r-pill); }
.skip-link:focus { top: var(--s-2); }
/* Reduced motion: v3.css stops all movement (floating, spinning, sliding, tilting) and keeps calm fades and colour
   changes; smooth scrolling is turned off here. Components with their own animation stop it themselves. */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--page-max); margin-inline: auto; padding-inline: var(--gutter); }
.page { flex: 1; padding-block: var(--s-12); }
.stack { display: grid; gap: var(--s-4); align-content: start; }
.stack-sm { display: grid; gap: var(--s-2); align-content: start; }
.stack-lg { display: grid; gap: var(--s-8); align-content: start; }
.row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; justify-content: space-between; }
.grid-2 { display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.grid-3 { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.narrow { max-width: 480px; margin-inline: auto; width: 100%; }
.medium { max-width: 760px; margin-inline: auto; width: 100%; }
.min-0 { min-width: 0; }

/* Girih pattern backgrounds (handoff motif 4) */
.girih-gold { background-image: url("../img/girih-gold.svg"); }
.girih-light { background-image: url("../img/girih-light.svg"); }

/* ---------- Site header (dark, girih) ---------- */
.site-head { position: relative; background: var(--head-bg); color: var(--on-panel); overflow: hidden; }
/* Pages with a hero (home): the header becomes the brand's wine block with one darker slanted block, as in the guide. */
.site-head:has(.hero) { background: var(--wine); }
.site-head:has(.hero)::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(112deg, var(--wine-deep) 0 24%, transparent 24.1%); }
[dir="rtl"] .site-head:has(.hero)::before { background: linear-gradient(248deg, transparent 75.9%, var(--wine-deep) 76%); }
.site-nav { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); padding-block: var(--s-5); }
.brand { display: flex; align-items: center; gap: var(--s-3); color: var(--on-panel); text-decoration: none; }
.brand-logo { display: block; width: auto; height: 40px; }
.brand-logo-foot { height: 36px; margin-block-end: var(--s-2); }
@media (max-width: 420px) { .brand-logo { height: 32px; } }
.brand:hover { color: var(--on-panel); }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-6); font-size: 15px; }
.nav-links a { color: var(--on-panel); text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--rose); }
.nav-actions { display: flex; align-items: center; gap: var(--s-2); }
.chip-btn {
  min-width: 48px; height: 44px; padding-inline: 14px; border-radius: var(--r-btn); border: 1px solid var(--night-line);
  background: transparent; color: var(--on-panel); font: inherit; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); text-decoration: none; cursor: pointer;
}
.chip-btn:hover { color: var(--rose); border-color: var(--rose); }
.site-foot { background: var(--foot-bg); color: var(--on-dark-muted); font-size: 14px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-8); padding-block: var(--s-12); }
.site-foot a { color: var(--on-dark-muted); text-decoration: none; }
.site-foot a:hover { color: var(--rose); }

/* ---------- Headings ---------- */
.h-hero { font-size: clamp(36px, 5.6vw, 72px); font-weight: 700; line-height: 1.1; }
.h-page { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; }
.h-section { font-size: 24px; font-weight: 700; }
.h-card { font-size: 19px; font-weight: 600; }
.kicker { font-size: 13px; letter-spacing: .08em; color: var(--muted); font-weight: 500; }
.lede { font-size: 18px; color: var(--muted); max-width: 640px; }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border-radius: var(--r-card); padding: var(--s-6); min-width: 0; }
.card-lg { background: var(--surface); border-radius: var(--r-panel); padding: clamp(24px, 4vw, 40px); min-width: 0; }
.panel-dark { position: relative; overflow: hidden; background: var(--night-2); color: var(--on-panel); border-radius: var(--r-panel); padding: var(--s-6); }
.panel-dark::before { content: ""; position: absolute; inset: 0; background-image: url("../img/girih-gold.svg"); opacity: .1; pointer-events: none; }
.panel-dark > * { position: relative; }
.panel-dark .muted { color: var(--on-dark-muted); }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }
.dashed { border-top: 1px dashed var(--line); }

/* ---------- Buttons ---------- */
.btn {
  min-height: 48px; padding-inline: 24px; border-radius: var(--r-btn); border: 1px solid transparent;
  font: inherit; font-size: 16px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--btn-bg); color: var(--on-accent); }
.btn-primary:hover { background: var(--btn-bg-hover); color: var(--on-accent); }
.btn-accent { background: var(--btn-bg); color: var(--on-accent); }
.btn-accent:hover { background: var(--btn-bg-hover); color: var(--on-accent); }
.btn-secondary { background: var(--surface); color: var(--night); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--accent-text); color: var(--accent-text); }
.btn-ghost { background: transparent; color: var(--teal-text); }
.btn-ghost:hover { background: var(--rose-light); color: var(--wine-deep); }
.btn-danger { background: var(--surface); color: var(--clay); border-color: var(--clay); }
.btn-danger:hover { background: var(--bad-bg); color: var(--bad-fg); }
.btn-sm { min-height: 40px; padding-inline: 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; background: var(--admin-ground); color: var(--muted); border-color: var(--line); }
.icon-btn { width: 44px; height: 44px; border-radius: 22px; border: 0; background: var(--plaster); color: var(--night); display: inline-grid; place-items: center; cursor: pointer; }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--s-5); }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 14px; font-weight: 600; color: var(--night); }
.field .hint { font-size: 13px; color: var(--muted); }
.input, .field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 18px; font: inherit; font-size: 16px; color: var(--night);
  background: var(--field-bg); border: 1px solid var(--field-line); border-radius: var(--r-input);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--teal-text); outline-offset: 1px; }
.field.has-error input, .field.has-error select, .field.has-error textarea, .input-validation-error { border-color: var(--clay); border-width: 2px; }
.field-error, .field-validation-error { font-size: 13px; color: var(--bad-fg); font-weight: 500; }
.field-validation-valid { display: none; }
/* A field hidden by script (e.g. the subcategory list when the chosen category has none). */
.field[hidden] { display: none; }
.check { display: flex; gap: var(--s-3); align-items: flex-start; font-size: 15px; }
.check input { width: 22px; height: 22px; margin-top: 3px; accent-color: var(--night); flex: none; }
.otp-input { font-family: var(--font-mono); letter-spacing: .3em; text-align: center; font-size: 22px; direction: ltr; }
.validation-summary-errors ul, .form-errors ul { margin: 0; padding-inline-start: var(--s-5); }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4) var(--s-5); border-radius: var(--r-input); font-size: 15px; }
.alert-info { background: var(--neutral-bg); color: var(--neutral-fg); }
.alert-ok { background: var(--ok-bg); color: var(--ok-fg); }
.alert-warn { background: var(--warn-bg); color: var(--warn-fg); }
.alert-bad { background: var(--bad-bg); color: var(--bad-fg); }
.alert strong { display: block; }
/* Needs action now (e.g. students past the promised contact time). On a burgundy brand a pale red reads as decoration,
   so this one is solid red with white text and a soft pulsing ring that stops for reduced motion. */
.alert-urgent {
  background: var(--clay); color: #FFFFFF; position: relative;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--clay) 55%, transparent);
  animation: alert-pulse 1.8s ease-out infinite;
}
.alert-urgent a { color: #FFFFFF; text-decoration-thickness: 2px; }
.alert-urgent a:hover { color: #FFFFFF; opacity: .85; }
.alert-urgent a:focus-visible { outline-color: #FFFFFF; }
.alert-urgent a.btn, .alert-urgent a.btn:hover { background: #FFFFFF; color: var(--clay); border-color: #FFFFFF; text-decoration: none; opacity: 1; }
.alert-urgent .bookings-alert-icon {
  inline-size: 30px; block-size: 30px; padding: 6px; border-radius: 50%;
  background: #FFFFFF; color: var(--clay); margin-block-start: -4px;
}
@keyframes alert-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--clay) 55%, transparent); }
  70% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--clay) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--clay) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .alert-urgent { animation: none; } }

/* ---------- Status pill: dot + label like the brand guide chips (never color-only) ---------- */
.pill { display: inline-flex; align-items: center; gap: var(--s-2); padding: 4px 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 500; white-space: nowrap; line-height: 1.5; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill-ok { background: var(--ok-bg); color: var(--ok-fg); }
.pill-warn { background: var(--warn-bg); color: var(--warn-fg); }
.pill-bad { background: var(--bad-bg); color: var(--bad-fg); }
.pill-info { background: var(--info-bg); color: var(--info-fg); }
.pill-neutral { background: var(--neutral-bg); color: var(--neutral-fg); }
.pill-neutral::before { background: transparent; border: 1.5px solid currentColor; }
.tag { display: inline-block; padding: 4px 10px; border-radius: var(--r-chip); font-size: 12px; font-weight: 500; background: var(--neutral-bg); color: var(--ink-2); }
.tag-ok { background: var(--ok-bg); color: var(--ok-fg); }
.ad-tag { padding: 4px 10px; border-radius: var(--r-pill); background: var(--gold); color: var(--ink); font-size: 12px; font-weight: 500; }

/* ---------- Money ---------- */
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money .num { unicode-bidi: isolate; }
.money .cur { font-size: .75em; font-weight: 400; }
.money-lg { font-size: 22px; font-weight: 600; }
.money-xl { font-size: 32px; font-weight: 600; }
.money-neg { color: var(--clay); }

/* ---------- Motifs ---------- */
.octagon { clip-path: var(--octagon); display: grid; place-items: center; }
.arch { border-radius: var(--arch); overflow: hidden; }
.step-num { width: 48px; height: 48px; clip-path: var(--octagon); background: var(--wine); color: var(--on-accent); display: grid; place-items: center; font-family: var(--font-display); font-size: 20px; font-weight: 700; flex: none; }
.step-num.done { background: var(--turquoise); color: var(--on-accent); }
.step-num.todo { background: var(--admin-ground); color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--r-card); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: start; font-size: 13px; font-weight: 500; color: var(--muted); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: var(--s-4); border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .end { text-align: end; }
.empty { padding: var(--s-12) var(--s-6); text-align: center; color: var(--muted); display: grid; gap: var(--s-2); justify-items: center; }

/* ---------- App shells (academy side nav, admin top tabs) ---------- */
.shell { flex: 1; display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 0; }
.shell-nav { position: relative; overflow: hidden; background: var(--panel); color: var(--on-panel); padding: var(--s-6) var(--s-4); display: flex; flex-direction: column; gap: var(--s-6); }
.shell-nav::before { content: ""; position: absolute; inset: 0; background-image: url("../img/girih-gold.svg"); opacity: .1; pointer-events: none; }
.shell-nav > * { position: relative; }
.shell-nav nav { display: grid; gap: 4px; }
.shell-nav nav a { display: flex; align-items: center; gap: var(--s-3); min-height: 44px; padding-inline: var(--s-4); border-radius: 14px; color: var(--on-dark-muted); text-decoration: none; font-size: 15px; }
.shell-nav nav a:hover { color: var(--on-panel); background: var(--night-2); }
.shell-nav nav a[aria-current="page"] { background: var(--night-2); color: var(--rose); font-weight: 600; }
.shell-nav .academy-chip { padding: var(--s-3) var(--s-4); border: 1px solid var(--night-line); border-radius: var(--r-input); font-size: 14px; color: var(--on-dark-muted); }
.shell-main { padding: clamp(20px, 3vw, 40px); min-width: 0; display: grid; gap: var(--s-6); align-content: start; background: var(--plaster); }
.admin-ground { background: var(--admin-ground); }
.tabs { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tabs a { min-height: 40px; display: inline-flex; align-items: center; padding-inline: var(--s-4); border-radius: var(--r-pill); color: var(--on-dark-muted); text-decoration: none; font-size: 15px; border: 1px solid transparent; }
.tabs a:hover { color: var(--on-panel); border-color: var(--night-line); }
.tabs a[aria-current="page"] { background: var(--wine); color: var(--on-accent); font-weight: 600; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .shell-nav nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
}

/* ---------- Stat tiles ---------- */
.stat { display: grid; gap: 4px; }
.stat .label { font-size: 13px; color: var(--muted); }
.stat .value { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* htmx request indicators (htmx's own inline styles are disabled for CSP) */
.htmx-indicator { opacity: 0; transition: opacity 200ms ease-in; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }

/* ---------- Hero (Main.dc.html) ---------- */
.hero { position: relative; padding-block: var(--s-12) var(--s-18); }
.hero-text { max-width: 760px; }
.hero-kicker { align-self: flex-start; justify-self: start; display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: var(--r-pill); border: 1px solid var(--night-line); font-size: 14px; color: var(--on-dark-muted); }
.hero .accent { color: var(--rose); }
.hero-lede { max-width: 560px; font-size: 19px; line-height: 1.7; color: var(--on-dark-muted); }

/* ---------- Admin ---------- */
/* Dark band with top tabs over the admin ground (Admin.dc.html). Continues the dark site header. */
.admin-band { position: relative; overflow: hidden; background: var(--panel); color: var(--on-panel); border-top: 1px solid var(--night-line); }
.admin-band::before { content: ""; position: absolute; inset: 0; background-image: url("../img/girih-gold.svg"); opacity: .1; pointer-events: none; }
.admin-band-inner { position: relative; display: grid; gap: var(--s-4); padding-block: var(--s-4) var(--s-3); }
.admin-console { padding: 4px 10px; border-radius: 8px; background: var(--night-2); color: var(--rose); font-size: 12px; font-weight: 600; }
.admin-tabs { flex-wrap: nowrap; overflow-x: auto; }
.admin-tabs a { flex: none; }
.admin-main { flex: 1; }
.admin-main .hint { display: block; font-size: 13px; }
.admin-main .flip { display: inline-block; }
.admin-filter { align-items: flex-end; }
.admin-filter .field { min-width: min(260px, 100%); }
.admin-stats .value { color: var(--night); text-decoration: none; }
.admin-stats .value:hover { color: var(--teal-text); }
.admin-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s-2) var(--s-4); margin: 0; }
.admin-dl dt { font-size: 14px; color: var(--muted); }
.admin-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.admin-prewrap { white-space: pre-line; overflow-wrap: anywhere; }
.admin-list { margin: 0; padding: 0; list-style: none; }
.admin-list > li { padding-block: var(--s-2); border-bottom: 1px solid var(--line); }
.admin-list > li:last-child { border-bottom: 0; }
.admin-actions { min-width: 220px; }

/* ---------- Academy ---------- */
/* Academy dashboard (Academy.dc.html): side-nav chip, onboarding checklist, facts, agreement text. */
.shell-nav .academy-chip { display: grid; gap: var(--s-2); justify-items: start; }
.academy-chip-kicker { color: var(--on-dark-subtle); }
.academy-chip-name { color: var(--on-panel); font-family: var(--font-display); font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.academy-nav-mark { width: 8px; height: 8px; border-radius: 50%; background: var(--night-line); flex: none; }
.shell-nav nav a[aria-current="page"] .academy-nav-mark { background: var(--rose); }
.academy-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-3); }
.academy-step { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-input); background: var(--surface); }
.academy-step > .stack-sm { flex: 1 1 240px; }
.academy-step-end { margin-inline-start: auto; }
.academy-note { white-space: pre-line; overflow-wrap: anywhere; }
.academy-list { margin: 0; padding: 0; list-style: none; }
.academy-facts { margin: 0; display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.academy-facts dt { font-size: 13px; color: var(--muted); }
.academy-facts dd { margin: 0; font-weight: 500; }
.academy-facts-wide { grid-column: 1 / -1; }
.academy-cell-note { display: block; margin-block-start: var(--s-1); }
.academy-agreement-body { max-width: 72ch; }
.academy-select-sm { min-height: 40px; width: auto; padding-block: 6px; padding-inline: 14px; font-size: 14px; }
.academy-role-notes { margin: 0; padding-inline-start: var(--s-5); font-size: 14px; color: var(--muted); }

/* ---------- Account ---------- */
.account-head { text-align: center; justify-items: center; }
.account-head .muted { max-width: 44ch; }
.account-done { justify-items: center; text-align: center; }
.account-icon { width: 56px; height: 56px; background: var(--panel); }
.account-alt { text-align: center; font-size: 15px; }
.account-small { font-size: 14px; }
.account-names { gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.account-facts { display: grid; gap: var(--s-4); margin: 0; }
.account-facts dt { font-size: 13px; color: var(--muted); }
.account-facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.account-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-6); }
.account-steps > li { display: flex; gap: var(--s-4); align-items: flex-start; }
.account-steps > li > :last-child { flex: 1; }
.account-qr-row { display: flex; flex-wrap: wrap; gap: var(--s-5); align-items: center; }
.account-qr { width: 200px; height: 200px; padding: var(--s-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-input); flex: none; }
.account-key { display: block; padding: var(--s-3) var(--s-4); background: var(--plaster); border-radius: var(--r-input); font-size: 17px; letter-spacing: .04em; overflow-wrap: anywhere; user-select: all; }
.account-codes { list-style: none; margin: 0; padding: var(--s-4); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2) var(--s-4); background: var(--plaster); border-radius: var(--r-input); font-size: 17px; text-align: center; user-select: all; }

/* ---------- Admin catalog ---------- */
.admin-cover { display: block; inline-size: 100%; max-inline-size: 420px; aspect-ratio: 4 / 3; object-fit: cover; background: var(--admin-ground); }
.admin-markdown { overflow-wrap: anywhere; }
.admin-markdown > :first-child { margin-block-start: 0; }
.admin-markdown > :last-child { margin-block-end: 0; }
.admin-compare { display: block; font-size: 13px; }
.admin-categories .input { min-inline-size: 140px; }
.admin-categories .admin-order { min-inline-size: 0; inline-size: 88px; }
.admin-categories td, .admin-categories th { vertical-align: middle; }

/* ---------- Academy courses ---------- */
/* Course editor, cover frame (handoff motif 2: arch), description preview, offering table actions. */
.courses-row-actions { flex-wrap: nowrap; justify-content: flex-end; }
.courses-row-actions form { margin: 0; }
.courses-md-help { margin: 0; padding-inline-start: var(--s-5); display: grid; gap: 2px; }
.courses-cover-row { display: flex; flex-wrap: wrap; gap: var(--s-6); align-items: flex-end; }
.courses-cover { inline-size: min(280px, 100%); aspect-ratio: 4 / 5; background: var(--admin-ground); border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.courses-cover img { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }
.courses-cover-empty { color: var(--muted); font-size: 14px; padding: var(--s-4); text-align: center; }
.courses-cover-form { flex: 1 1 260px; }
.courses-preview { max-width: 72ch; padding: var(--s-6); border: 1px dashed var(--line); border-radius: var(--r-card); }
.courses-preview-body { overflow-wrap: anywhere; }
.courses-preview-body > :first-child { margin-block-start: 0; }
.courses-preview-body > :last-child { margin-block-end: 0; }
.courses-preview-body ul, .courses-preview-body ol, .courses-outcomes { margin: 0; padding-inline-start: var(--s-5); }
.courses-policies { margin: 0; display: grid; gap: var(--s-2); }
.courses-policies dt { font-weight: 600; color: var(--night); }
.courses-policies dd { margin: 0; }

/* ---------- Catalog ---------- */
/* Public catalog (Main.dc.html, Course.dc.html), academy public page, favourites and cart. */
.nav-actions { flex-wrap: wrap; }
.nav-icon { position: relative; width: 44px; min-width: 44px; padding-inline: 0; }
.nav-badge { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 20px; height: 20px; padding-inline: 4px; border-radius: 10px; background: var(--wine); color: var(--on-accent); font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; }
.prewrap { white-space: pre-line; overflow-wrap: anywhere; }
.arrow-link { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 500; text-decoration: none; }

/* Home hero: search form, promises, decorative arch */
.home-hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-12); padding-block-end: 0; }
.home-hero .hero-text { flex: 1 1 560px; min-width: 0; padding-block-end: var(--s-18); }
.home-search { display: flex; flex-wrap: wrap; align-items: stretch; max-width: 720px; padding: var(--s-2); border-radius: var(--r-panel); background: var(--field-bg); border: 1px solid var(--field-line); color: var(--night); }
.home-search-field { flex: 1 1 140px; min-width: 0; display: grid; gap: 2px; align-content: center; padding: 10px 18px; }
.home-search-q { flex: 2 1 220px; }
.home-search-field + .home-search-field { border-inline-start: 1px solid var(--line); }
.home-search-field label { font-size: 12px; font-weight: 600; color: var(--muted); }
.home-search-field input, .home-search-field select { width: 100%; min-height: 32px; padding: 4px 0; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--night); }
.home-search-btn { flex: 0 0 auto; min-height: 56px; border-radius: var(--r-input); }
.home-promises { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-3) 28px; font-size: 15px; color: var(--on-dark-muted); }
.home-promises li { display: flex; align-items: center; gap: var(--s-2); }
.home-promises svg { color: var(--rose); flex: none; }
.home-arch { flex: 0 1 400px; min-width: 0; display: flex; justify-content: center; }
.home-arch-frame { position: relative; width: min(400px, 100%); height: 480px; border-radius: var(--r-panel) var(--r-panel) 0 0; background-color: var(--turquoise); overflow: hidden; display: grid; place-items: center; }
.home-arch-star { position: relative; }
.star-gold { fill: var(--gold); }
.star-night { fill: var(--panel); }
@media (max-width: 900px) {
  .home-arch { display: none; }
  .home-hero .hero-text { padding-block-end: var(--s-12); }
}
@media (max-width: 640px) {
  .home-search-field, .home-search-q { flex-basis: 100%; }
  .home-search-field + .home-search-field { border-inline-start: 0; border-block-start: 1px solid var(--line); }
  .home-search-btn { flex-basis: 100%; }
}

/* Home sections */
.home { gap: var(--s-18); }
.cat-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); }
.cat-tile { height: 140px; padding-inline: var(--s-3); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-3); background: var(--surface); color: var(--night); text-align: center; font-size: 16px; font-weight: 500; text-decoration: none; line-height: 1.3; }
.cat-tile:hover { background: var(--panel); color: var(--on-panel); }
.cat-tile svg { fill: var(--turquoise); flex: none; }
.cat-all { background: var(--panel); color: var(--on-panel); }
.cat-all svg { fill: var(--rose); }
.cat-all:hover { background: var(--night-2); color: var(--rose); }
.cat-tone-0 svg { fill: var(--turquoise); }
.cat-tone-1 svg { fill: var(--lapis); }
.cat-tone-2 svg { fill: var(--wine-deep); }
.cat-tone-3 svg { fill: var(--gold); }
.cat-tone-4 svg { fill: var(--teal-text); }
.cat-tone-5 svg { fill: var(--clay); }
.how-panel { position: relative; overflow: hidden; display: grid; gap: var(--s-12); padding: clamp(28px, 6vw, 72px); border-radius: var(--r-panel); background: var(--night-2); color: var(--on-panel); }
.how-panel::before { content: ""; position: absolute; inset: 0; background-image: url("../img/girih-gold.svg"); opacity: .1; pointer-events: none; }
.how-panel > * { position: relative; }
.how-title { max-width: 760px; font-size: clamp(28px, 4vw, 48px); font-weight: 700; }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-8); grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.how-steps li { display: grid; gap: var(--s-4); align-content: start; padding-block-start: var(--s-6); border-block-start: 1px solid var(--night-line); }
.how-steps p { color: var(--on-dark-muted); line-height: 1.75; }
.how-num { width: 64px; height: 64px; clip-path: var(--octagon); background: var(--wine); color: var(--on-accent); display: grid; place-items: center; font-family: var(--font-display); font-size: 26px; font-weight: 700; }
.academy-cta { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-8); padding: clamp(28px, 5vw, 64px); border-radius: 32px; background: var(--wine); color: var(--on-accent); }
.academy-cta::before { content: ""; position: absolute; inset: 0; background-image: url("../img/girih-ink.svg"); opacity: .14; pointer-events: none; }
.academy-cta > * { position: relative; }
.academy-cta-text { flex: 1 1 420px; min-width: 0; }
.academy-cta-text p { max-width: 620px; font-size: 17px; }
.academy-cta-title { font-size: clamp(26px, 3.6vw, 44px); font-weight: 700; line-height: 1.2; }
.academy-cta-btn { min-height: 56px; white-space: normal; }

/* Course cards (arch covers) */
.course-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); }
.course-grid > li { display: grid; min-width: 0; }
.course-card { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; padding: var(--s-3) var(--s-3) var(--s-5); border-radius: var(--r-card); background: var(--surface); }
.course-cover { position: relative; height: 200px; background-color: var(--rose-light); }
.course-cover img, .course-hero-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* No uploaded image: light rose grounds with the mark in wine, as in the brand guide's course cards. */
.cover-tone-0 { background-color: var(--rose-light); }
.cover-tone-1 { background-color: var(--cover-1); }
.cover-tone-2 { background-color: var(--cover-2); }
.cover-tone-3 { background-color: var(--cover-3); }
.cover-pattern { position: absolute; inset: 0; }
.cover-star { position: absolute; inset-inline: 0; top: 62px; margin-inline: auto; fill: var(--cover-mark); opacity: .3; }
.course-card-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding-inline: var(--s-2); min-width: 0; }
.course-tags { gap: 6px; }
.course-card .h-card { font-size: 20px; line-height: 1.35; overflow-wrap: anywhere; }
.course-card .h-card a { color: var(--night); text-decoration: none; }
.course-card .h-card a:hover { color: var(--teal-text); text-decoration: underline; }
.course-academy { font-size: 14px; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.course-academy-logo { inline-size: 22px; block-size: 22px; object-fit: contain; border-radius: 6px; background: #FFFFFF; border: 1px solid var(--line); flex: none; }
.course-academy:hover { color: var(--teal-text); text-decoration: underline; }
.course-date { display: flex; align-items: center; gap: var(--s-2); font-size: 14px; color: var(--ink-2); }
.course-date svg { flex: none; }
.seats { font-size: 13px; font-weight: 500; color: var(--teal-text); }
.seats-low { color: var(--clay); font-weight: 600; }
.course-card-foot { margin-block-start: auto; padding-block-start: var(--s-3); border-block-start: 1px dashed var(--line); display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-2); }
.course-price { gap: 2px; }
.course-price-label { font-size: 12px; color: var(--muted); }
.price-was { font-size: 13px; color: var(--muted); }
.round-link { flex: none; width: 44px; height: 44px; border-radius: var(--r-btn); background: var(--wine); color: var(--on-accent); display: grid; place-items: center; }
.round-link:hover { background: var(--wine-deep); color: var(--on-accent); }

/* Search results */
.results-layout { display: grid; gap: var(--s-6); align-items: start; }
.results-filters { gap: var(--s-4); }
/* Date inputs have a wide intrinsic size: let them shrink, and stack the pair when there is no room for both. */
.filter-pair { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
.filter-pair .field, .filter-pair input[type="date"] { min-width: 0; inline-size: 100%; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-3); padding-block-start: var(--s-4); }
.pager-status { font-size: 14px; color: var(--muted); }
@media (min-width: 960px) {
  .results-layout { grid-template-columns: 300px minmax(0, 1fr); }
}

/* Course page */
.course-hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-12); padding-block: var(--s-6) var(--s-18); }
.course-hero-text { flex: 1 1 560px; min-width: 0; gap: var(--s-5); }
.course-title { font-size: clamp(32px, 5vw, 64px); overflow-wrap: anywhere; }
.crumbs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); font-size: 14px; color: var(--on-dark-subtle); }
.crumbs li + li::before { content: "/"; margin-inline-end: var(--s-2); }
.crumbs a { color: var(--on-dark-muted); }
.crumbs a:hover { color: var(--rose); }
.course-provider { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.provider-mark { width: 48px; height: 48px; flex: none; background: var(--turquoise); color: var(--on-panel); font-family: var(--font-display); font-weight: 700; }
.provider-mark-lg { width: 80px; height: 80px; font-size: 30px; }
/* Uploaded logos sit on white in both themes so dark or transparent logos stay visible. */
.provider-mark-logo { background: #FFFFFF; padding: 4px; display: grid; place-items: center; border: 1px solid var(--line); }
.logo-row { display: flex; flex-wrap: wrap; gap: var(--s-6); align-items: flex-start; }
.logo-form { flex: 1 1 280px; }
.provider-mark-logo img { inline-size: 100%; block-size: 100%; object-fit: contain; display: block; }
.provider-name { gap: 2px; }
.provider-name a { color: var(--on-panel); font-weight: 600; }
.provider-name a:hover { color: var(--rose); }
.provider-kicker { font-size: 13px; color: var(--on-dark-subtle); }
.provider-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--night-2); color: var(--rose); font-size: 13px; }
.course-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.course-facts li { display: grid; gap: 2px; min-width: 130px; padding: 10px 16px; border: 1px solid var(--night-line); border-radius: 12px; }
.course-facts span { font-size: 12px; color: var(--on-dark-subtle); }
.course-facts strong { font-size: 15px; font-weight: 500; }
.course-hero-cover { position: relative; flex: 0 1 380px; min-width: 0; height: 420px; border-radius: var(--r-panel); overflow: hidden; }
.course-hero-line { display: none; }
.cover-star-lg { top: 125px; }
@media (max-width: 760px) {
  .course-hero-cover { flex-basis: 100%; height: 260px; }
  .cover-star-lg { top: 60px; }
}
.course-layout { display: grid; gap: var(--s-8); align-items: start; }
.course-main { min-width: 0; gap: var(--s-6); }
.book-card { min-width: 0; padding: clamp(20px, 3vw, 28px); border-radius: 28px; background: var(--surface); box-shadow: 0 30px 60px rgba(13, 43, 43, .16); }
@media (min-width: 1000px) {
  .course-layout { grid-template-columns: minmax(0, 1fr) 420px; }
  .book-card { grid-column: 2; grid-row: 1; position: sticky; top: var(--s-6); }
  .course-main { grid-column: 1; grid-row: 1; }
}
.offer-pick { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 10px; }
.offer-opt { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); cursor: pointer; min-width: 0; }
.offer-opt:hover { border-color: var(--accent-text); }
.offer-opt:has(input:checked) { border: 2px solid var(--accent-text); background: var(--rose-light); }
.offer-opt:has(input:disabled) { cursor: not-allowed; opacity: .65; }
.offer-opt input { appearance: none; flex: none; width: 20px; height: 20px; margin: 4px 0 0; border: 2px solid var(--muted); border-radius: 50%; background: transparent; cursor: inherit; }
.offer-opt input:checked { border-color: var(--accent-text); background: radial-gradient(circle, var(--accent-text) 0 45%, transparent 50%); }
/* One bookable date: date and price on top, then short labelled facts with an icon each (easy to scan). */
.offer-body { flex: 1; min-width: 0; display: grid; gap: 12px; }
.offer-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 12px; }
.offer-when { display: grid; gap: 4px; min-width: 0; }
.offer-when strong { font-size: 16px; font-weight: 700; color: var(--night); line-height: 1.4; }
.offer-price { display: grid; justify-items: end; gap: 0; text-align: end; flex: none; }
/* One grid for all facts (rows use display: contents) so every value starts in the same column. */
.offer-facts { display: grid; grid-template-columns: 16px max-content minmax(0, 1fr); align-items: baseline; gap: 8px 8px; padding-block-start: 10px; border-block-start: 1px dashed var(--line); font-size: 13px; line-height: 1.5; }
.offer-fact { display: contents; }
.offer-fact svg { color: var(--accent-text); align-self: center; }
.offer-fact-label { color: var(--muted); white-space: nowrap; }
.offer-fact-value { color: var(--ink-2); font-weight: 600; overflow-wrap: anywhere; }
.final-note { padding-block-start: var(--s-4); border-block-start: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.final-note strong { color: var(--night); }
.assure { list-style: none; margin: 0; padding: var(--s-4); display: grid; gap: 10px; border-radius: 16px; background: var(--ok-bg); font-size: 14px; color: var(--ink-2); }
.assure li { display: flex; align-items: flex-start; gap: 10px; }
.assure svg { flex: none; margin-block-start: 3px; color: var(--teal-text); }
.outcomes { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px 28px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.outcomes li { display: flex; align-items: flex-start; gap: var(--s-3); }
.outcomes svg { flex: none; margin-block-start: 4px; fill: var(--turquoise); }
.course-description { overflow-wrap: anywhere; }
.course-description > * { margin: 0; }
.course-description > * + * { margin-block-start: var(--s-3); }
.course-description ul, .course-description ol { padding-inline-start: var(--s-5); }
.academy-block { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s-6); padding: clamp(20px, 4vw, 32px); }
.academy-block > .stack-sm { flex: 1 1 280px; }
.academy-contact-note { display: flex; align-items: flex-start; gap: var(--s-2); font-size: 14px; color: var(--on-dark-subtle); }
.academy-contact-note svg { flex: none; margin-block-start: 3px; }
.academy-block-link { color: var(--rose); font-weight: 500; }
.academy-block-link:hover { color: var(--on-panel); }
.policy-box { padding: clamp(20px, 4vw, 28px); border: 1.5px dashed var(--line); border-radius: var(--r-panel); }
.policy-list { margin: 0; display: grid; gap: var(--s-3); }
.policy-list > div { padding-block-end: 10px; border-block-end: 1px solid var(--line); }
.policy-list dt { font-weight: 600; }
.policy-list dd { margin: 0; color: var(--muted); }

/* Academy public page */
.academy-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); }
.medium-text { max-width: 72ch; }

/* Favourites and cart */
.me-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.me-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); }
.me-row-main { flex: 1 1 260px; }
.me-row .h-card a { color: var(--night); }
.me-row-off { background: var(--admin-ground); }
.me-small { font-size: 13px; }
.cart-facts { margin: 0; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); }
.cart-facts dt { font-size: 12px; color: var(--muted); }
.cart-facts dd { margin: 0; font-weight: 500; }

/* ---------- Academy bookings ---------- */
/* Registrants, interested list, earnings and overview tiles (Academy.dc.html). */
.bookings-alert-icon { flex: none; margin-block-start: 2px; }
.bookings-alert-link { color: inherit; font-weight: 600; }
.bookings-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3); padding: var(--s-4) var(--s-5); }
.bookings-filters .field { flex: 0 1 260px; }
.bookings-table td { vertical-align: top; }
.bookings-email { overflow-wrap: anywhere; }
.bookings-overdue { color: var(--clay); font-size: 13px; font-weight: 600; }
.bookings-contact { justify-items: start; }
.bookings-contact form { margin: 0; }
.bookings-note { margin: 0; max-width: 32ch; font-size: 14px; }
.bookings-edit { margin-block-start: var(--s-2); min-width: 220px; }
.bookings-edit summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; color: var(--teal-text); font-weight: 500; }
.bookings-edit[open] summary { margin-block-end: var(--s-2); }
.bookings-edit .field textarea.bookings-note-input { min-height: 72px; font-size: 14px; padding: 8px 14px; }
.interested-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.interested-row { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); }
.interested-mark { width: 40px; height: 40px; flex: none; background: var(--wine); color: var(--on-accent); font-weight: 700; }
.wallet-tiles, .dash-tiles { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.wallet-main { grid-column: 1 / -1; border: 2px solid var(--saffron); }
.wallet-later .value { color: var(--muted); }
.dash-bad { color: var(--clay); }

/* ---------- Checkout ---------- */
/* Checkout, payment status (Checkout.dc.html, mobile-first 390px), my bookings, sandbox payment page. */
.co-page { max-width: 560px; margin-inline: auto; width: 100%; }
.co-head { border-radius: var(--r-panel); }
.co-head .h-page { color: var(--on-panel); }
.co-hold { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: var(--panel); }
.co-hold p { color: var(--on-dark-muted); font-size: 14px; }
.co-hold-icon { flex: none; width: 52px; height: 52px; background: var(--wine); color: var(--on-accent); }
.co-clock { font-size: 28px; line-height: 1.2; color: var(--on-panel); unicode-bidi: isolate; }
.co-center { justify-content: center; }
.co-small { font-size: 13px; }
.co-summary { display: flex; gap: 14px; align-items: flex-start; }
.co-thumb { flex: none; width: 64px; height: 64px; border-radius: 12px; background: var(--lapis); display: grid; place-items: center; }
.co-thumb svg { fill: var(--on-panel); }
.co-course { font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.co-facts, .co-dl { margin: 0; display: grid; gap: var(--s-2); }
.co-facts div, .co-dl div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-1) var(--s-4); }
.co-facts dt, .co-dl dt { font-size: 13px; color: var(--muted); }
.co-facts dd, .co-dl dd { margin: 0; font-weight: 500; text-align: end; min-width: 0; overflow-wrap: anywhere; }
.co-dl div { padding-block: var(--s-2); border-block-end: 1px dashed var(--line); }
.co-dl div:last-child { border-block-end: 0; }
.co-total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2); font-weight: 600; }
.co-contact, .co-secure { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.6; color: var(--muted); }
.co-contact svg, .co-secure svg { flex: none; margin-block-start: 3px; }
.co-consent { padding: var(--s-1) 2px; font-size: 14px; line-height: 1.6; }
.co-paybar { position: sticky; bottom: 0; padding-block: var(--s-3); background: var(--plaster); }
.co-pay { min-height: 56px; border-radius: var(--r-input); font-size: 17px; white-space: normal; }
.co-pay .money { color: inherit; }
.co-spinner-row { display: flex; align-items: center; gap: var(--s-3); }
.co-spinner { flex: none; width: 18px; height: 18px; border: 2px solid var(--saffron); transform: rotate(45deg); animation: co-spin 1.6s linear infinite; }
@keyframes co-spin { to { transform: rotate(405deg); } }
.co-done { justify-items: center; text-align: center; padding-block: var(--s-2); color: var(--night); }
.co-ref { font-size: 15px; padding: 6px 12px; border-radius: 8px; background: var(--ok-bg); color: var(--ok-fg); unicode-bidi: isolate; }
.co-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.co-steps li { display: flex; gap: var(--s-3); align-items: flex-start; font-size: 14px; line-height: 1.6; }
.co-steps .step-num { width: 28px; height: 28px; font-size: 13px; background: var(--panel); color: var(--on-panel); }
.co-receipt { scroll-margin-block-start: var(--s-6); }
.co-sandbox-actions .btn { white-space: normal; }
@media print {
  body:has(.co-receipt) .site-head, body:has(.co-receipt) .site-foot { display: none; }
}

/* ---------- Admin finance ---------- */
.admin-journal tbody + tbody { border-top: 2px solid var(--line); }
.admin-journal .admin-journal-head td { background: var(--admin-ground); font-weight: 500; }
.admin-health .label { align-items: center; gap: var(--s-2); }

/* ---------- Academy cases & payouts ---------- */
.wallet-available { background: var(--wine); color: var(--on-accent); }
.wallet-available .label, .wallet-available .money, .wallet-available .cur { color: var(--night); }
.academy-case-facts { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); margin: 0; }
.academy-case-facts dt { font-size: 13px; color: var(--muted); }
.academy-case-facts dd { margin: 0; }
.academy-case-thread { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.academy-case-mine { border-inline-start: 4px solid var(--saffron); }
.academy-case-body { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.academy-cancel-confirm { border: 2px solid var(--clay); }
.academy-cancel-confirm ul { margin: 0; padding-inline-start: var(--s-5); }

/* ---------- Me cases ---------- */
.me-cancel-steps { margin: 0; padding-inline-start: var(--s-5); display: grid; gap: var(--s-2); font-size: 14px; line-height: 1.6; }
.me-refund { padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-input); }
.me-thread { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.me-msg { padding: var(--s-4); border-radius: var(--r-input); background: var(--surface); border: 1px solid var(--line); display: grid; gap: var(--s-2); }
.me-msg p { margin: 0; }
.me-msg-student { margin-inline-start: clamp(0px, 6vw, 48px); background: var(--info-bg); border-color: transparent; }
.me-msg-support { border-inline-start: 4px solid var(--saffron); }
.me-msg-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-1) var(--s-3); font-size: 14px; }
.me-case-decision { border-inline-start: 4px solid var(--teal-text); }

/* ---------- Admin money ---------- */
.admin-overdue { display: inline-block; margin-inline-start: var(--s-2); color: var(--clay); font-size: 13px; font-weight: 600; }
.admin-thread { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-3); }
.admin-msg { padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.admin-msg p { margin: var(--s-2) 0 0; }
.admin-msg-student { border-inline-start: 4px solid var(--turquoise); }
.admin-msg-academy { border-inline-start: 4px solid var(--saffron); }
.admin-msg-support { border-inline-start: 4px solid var(--night); }
.admin-msg-internal { border-style: dashed; border-color: var(--muted); background: var(--admin-ground); }

/* ---------- Marketing public ---------- */
.course-cover .ad-tag { position: absolute; inset-block-end: 12px; inset-inline-start: 12px; z-index: 1; }
.co-coupon .row { flex-wrap: nowrap; }
.co-coupon .row input { flex: 1 1 auto; min-width: 0; }
.inbox-unread { border-inline-start: 4px solid var(--saffron); }

/* ---------- Admin marketing ---------- */
.admin-subnav { flex-wrap: wrap; gap: var(--s-2); }
.admin-review-actions { align-items: flex-start; flex-wrap: wrap; gap: var(--s-4); }
.admin-review-reject { flex: 1 1 320px; }
.admin-checklist summary { cursor: pointer; min-block-size: 44px; display: flex; align-items: center; }
.admin-checklist ul { margin: var(--s-2) 0 0; padding-inline-start: var(--s-5, 20px); }
.admin-main blockquote.admin-msg { margin: 0; }
.admin-defs th[scope="row"] { font-weight: 500; text-align: start; white-space: nowrap; }
.admin-defs td:nth-child(3) { min-inline-size: 280px; }

/* ---------- Academy marketing ---------- */
.mkt-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.mkt-fieldset legend { padding: 0; margin-block-end: var(--s-2); font-weight: 500; }
.mkt-rules { margin: 0; padding-inline-start: var(--s-5); }
.mkt-funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr)); }
.mkt-funnel li { padding: 14px; border-radius: 14px; background: var(--neutral-bg); display: flex; flex-direction: column; gap: var(--s-1); }
.mkt-funnel-value { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mkt-funnel-label { font-size: 13px; color: var(--muted); }
.mkt-compare { margin: 0; display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.mkt-compare div { display: grid; gap: var(--s-1); }
.mkt-compare dt { font-size: 13px; color: var(--muted); }
.mkt-compare dd { margin: 0; }
.mkt-message { margin: 0; padding: var(--s-3) var(--s-4); border-radius: var(--r-input); background: var(--neutral-bg); white-space: pre-line; overflow-wrap: anywhere; }

/* Marketing-cookie consent (banner on public pages + /Consent) */
.consent-banner { position: sticky; bottom: 0; z-index: 50; background: var(--panel); color: var(--on-panel); border-top: 1px solid var(--night-line); box-shadow: 0 -8px 24px rgb(26 18 20 / 0.18); }
.consent-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); padding-block: var(--s-4); }
.consent-inner p { margin: 0; color: var(--on-dark-muted); font-size: 14px; max-width: 70ch; }
.consent-inner a { color: var(--rose); }
.consent-page { max-width: 720px; margin-inline: auto; }
.consent-actions { gap: var(--s-2); }

/* Platform picks & banners (admin-managed home content) */
.pick-tag { position: absolute; inset-block-end: 12px; inset-inline-start: 12px; z-index: 1; padding: 4px 10px; border-radius: var(--r-pill); background: var(--rose-light); color: var(--wine-deep); font-size: 12px; font-weight: 600; }
.home-banner-list { display: grid; gap: var(--s-4); margin: 0; padding: 0; list-style: none; }
.home-banner { position: relative; display: block; overflow: hidden; aspect-ratio: 3 / 1; background: var(--panel); color: var(--on-panel); text-decoration: none; border-radius: var(--r-card); }
.home-banner img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.home-banner-title { position: absolute; inset-inline: 0; inset-block-end: 0; padding: var(--s-4) var(--s-5); background: linear-gradient(to top, rgba(10, 22, 40, .85), rgba(10, 22, 40, 0)); font-size: clamp(18px, 2.4vw, 28px); font-weight: 700; line-height: 1.3; }
.home-banner:hover .home-banner-title, .home-banner:focus-visible .home-banner-title { color: var(--rose); }
.home-banner:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; }
@media (max-width: 640px) { .home-banner { aspect-ratio: 2 / 1; } }
.admin-banner-row { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: flex-start; }
.admin-banner-thumb { inline-size: 240px; max-inline-size: 100%; aspect-ratio: 3 / 1; object-fit: cover; border-radius: 10px; background: var(--admin-ground); border: 1px solid var(--line); }
.admin-control-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s-4); margin: 0; padding: 0; list-style: none; }
.admin-control { display: grid; gap: var(--s-2); block-size: 100%; text-decoration: none; color: inherit; }
.admin-control:hover, .admin-control:focus-visible { border-color: var(--teal-text); }
.admin-control .value { color: var(--night); }

/* ---------- Academy directory ---------- */
.academy-dir { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.academy-dir-card { display: flex; gap: var(--s-4); align-items: flex-start; height: 100%; color: var(--night); text-decoration: none; border: 1px solid var(--line); }
.academy-dir-card:hover { border-color: var(--accent-text); color: var(--night); }
.academy-dir-about { font-size: 14px; }
.academy-dir-count { font-size: 13px; font-weight: 600; color: var(--accent-text); }

/* ---------- Subscription plans ---------- */
.plan-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.plan-card { display: flex; flex-direction: column; gap: var(--s-3); border: 1px solid var(--line); }
.plan-card-highlight { border: 2px solid var(--accent-text); }
.plan-price { font-size: 15px; }
.plan-save { font-size: 13px; font-weight: 600; color: var(--ok-fg); }
.plan-limits { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; flex: 1; }
.plan-limits li { display: flex; justify-content: space-between; gap: var(--s-3); border-bottom: 1px dashed var(--line); padding-block: 4px; }
.plan-trial { color: var(--accent-text); font-weight: 600; border-bottom: 0 !important; }
.plan-usage { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); font-size: 14px; }
.plan-meter { width: 100%; height: 8px; }
.plan-meter::-webkit-meter-optimum-value { background: var(--wine); }
.plan-usage-full strong { color: var(--clay); }
.narrow-start { max-width: 560px; }

/* ---------- Theme switch (light / dark) ---------- */
.theme-to-light { display: none; }
:root[data-theme="dark"] .theme-to-light { display: inline-flex; }
:root[data-theme="dark"] .theme-to-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-to-light { display: inline-flex; }
  :root:not([data-theme="light"]) .theme-to-dark { display: none; }
}
/* Dark theme: the home hero becomes the guide's black block with a wine-black slant, cards get a quiet border. */
:root[data-theme="dark"] .site-head:has(.hero) { background: var(--black); }
:root[data-theme="dark"] .site-head:has(.hero)::before { background: linear-gradient(112deg, #24101A 0 24%, transparent 24.1%); }
:root[data-theme="dark"] .card, :root[data-theme="dark"] .card-lg { border: 1px solid var(--line); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-head:has(.hero) { background: var(--black); }
  :root:not([data-theme="light"]) .site-head:has(.hero)::before { background: linear-gradient(112deg, #24101A 0 24%, transparent 24.1%); }
  :root:not([data-theme="light"]) .card, :root:not([data-theme="light"]) .card-lg { border: 1px solid var(--line); }
}
[dir="rtl"]:root[data-theme="dark"] .site-head:has(.hero)::before { background: linear-gradient(248deg, transparent 75.9%, #24101A 76%); }
@media (prefers-color-scheme: dark) {
  [dir="rtl"]:root:not([data-theme="light"]) .site-head:has(.hero)::before { background: linear-gradient(248deg, transparent 75.9%, #24101A 76%); }
}

/* ---------- Filter dropdown + two-handle price slider ---------- */
.filter-drop { border: 1px solid var(--field-line); border-radius: var(--r-input); background: var(--field-bg); }
.filter-drop > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); min-height: 48px; padding-inline: 14px; font-size: 14px; font-weight: 600; }
.filter-drop > summary::-webkit-details-marker { display: none; }
.filter-drop > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); flex: none; margin-inline-start: var(--s-2); }
.filter-drop[open] > summary::after { transform: rotate(225deg); }
.filter-drop-value { margin-inline-start: auto; font-weight: 500; color: var(--accent-text); font-size: 13px; }
.price-range { padding: var(--s-2) 14px var(--s-4); display: grid; gap: var(--s-2); }
.price-range-bar { position: relative; height: 32px; direction: ltr; }
.price-range-bar::before { content: ""; position: absolute; inset-inline: 0; top: 14px; height: 4px; border-radius: 2px; background: var(--line); }
.price-range-fill { position: absolute; top: 14px; height: 4px; border-radius: 2px; background: var(--accent-text); left: var(--lo, 0%); right: calc(100% - var(--hi, 100%)); }
.price-range-bar input[type="range"] { position: absolute; inset: 0; width: 100%; height: 32px; margin: 0; background: transparent; appearance: none; -webkit-appearance: none; pointer-events: none; }
.price-range-bar input[type="range"]::-webkit-slider-runnable-track { background: transparent; height: 32px; }
.price-range-bar input[type="range"]::-moz-range-track { background: transparent; }
.price-range-bar input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 24px; height: 24px; margin-top: 4px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent-text); cursor: grab; box-shadow: 0 1px 4px rgb(0 0 0 / .2); }
.price-range-bar input[type="range"]::-moz-range-thumb { pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent-text); cursor: grab; }
.price-range-bar input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--focus); outline-offset: 2px; }
.price-range-values { font-size: 14px; font-weight: 600; }
.price-range-values output::after { content: " ر.س"; font-weight: 400; color: var(--muted); }
.price-range-values output:lang(en)::after { content: " SAR"; }

/* Plain dots for lists (no decorative stars) and the checkout "done" ring. */
.dot { flex: none; width: 8px; height: 8px; margin-block-start: 9px; border-radius: 50%; background: var(--accent-text); }
.done-ring { fill: var(--ok-bg); }

/* Category icons: uploaded PNGs (transparent) or the brand mark in one colour. */
.cat-tile svg { fill: var(--accent-text); }
.cat-all svg { fill: var(--on-panel); }
.cat-icon { width: 44px; height: 44px; object-fit: contain; }
.cat-icon-cell { display: grid; gap: var(--s-2); justify-items: start; min-width: 180px; }
.cat-icon-preview { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: var(--admin-ground); padding: 4px; }
.cat-icon-default { fill: var(--accent-text); }
.cat-icon-form { display: grid; gap: var(--s-2); font-size: 13px; }

/* Dark theme: one-colour icons (uploaded category icons, banners' small marks) are lightened so they read on dark tiles. */
:root[data-theme="dark"] .cat-icon { filter: brightness(0) invert(.85); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cat-icon { filter: brightness(0) invert(.85); }
}

/* Password rule checklist under new-password fields. */
.pw-rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.pw-rules li { position: relative; padding-inline-start: 22px; }
.pw-rules li::before {
  content: ""; position: absolute; inset-inline-start: 0; inset-block-start: .35em; inline-size: 12px; block-size: 12px;
  border-radius: 50%; border: 1.5px solid currentColor;
}
.pw-rules li.is-met { color: var(--ok-fg); }
.pw-rules li.is-met::before { background: var(--ok-fg); border-color: var(--ok-fg); }

/* Subcategory chips above the results once a main category is chosen. */
/* One swipeable row (not a wall of chips): scrolls sideways, arrows on wide screens, faded edges when it overflows. */
.subcat-strip { position: relative; display: flex; align-items: center; gap: var(--s-2); min-width: 0; }
.subcat-chips {
  display: flex; flex-wrap: nowrap; gap: var(--s-2); overflow-x: auto; min-width: 0; flex: 1;
  scroll-snap-type: x proximity; scrollbar-width: none; padding-block: 2px; scroll-behavior: smooth;
}
.subcat-chips::-webkit-scrollbar { display: none; }
/* Physical sides (set by chip-strip.js): the faded edge is the side with more chips hidden behind it. */
.subcat-strip.fade-left .subcat-chips { -webkit-mask-image: linear-gradient(to right, transparent, #000 12%); mask-image: linear-gradient(to right, transparent, #000 12%); }
.subcat-strip.fade-right .subcat-chips { -webkit-mask-image: linear-gradient(to left, transparent, #000 12%); mask-image: linear-gradient(to left, transparent, #000 12%); }
.subcat-strip.fade-left.fade-right .subcat-chips {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.subcat-chip { flex: none; white-space: nowrap; scroll-snap-align: start; }
.subcat-arrow {
  flex: none; inline-size: 38px; block-size: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--night); display: grid; place-items: center; cursor: pointer;
}
.subcat-arrow:hover:not(:disabled) { border-color: var(--accent-text); color: var(--accent-text); }
.subcat-arrow:disabled { opacity: .35; cursor: default; }
.subcat-arrow span { inline-size: 8px; block-size: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; }
/* Arrow glyphs follow reading direction: "previous" points to the start side, "next" to the end side. */
[dir="rtl"] .subcat-prev span { transform: rotate(-45deg); }
[dir="rtl"] .subcat-next span { transform: rotate(135deg); }
[dir="ltr"] .subcat-prev span { transform: rotate(135deg); }
[dir="ltr"] .subcat-next span { transform: rotate(-45deg); }
@media (max-width: 640px) { .subcat-arrow { display: none; } }
.subcat-chip {
  display: inline-flex; align-items: center; min-block-size: 38px; padding: 6px 16px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none;
}
.subcat-chip:hover { border-color: var(--accent-text); color: var(--accent-text); }
.subcat-chip.is-active { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--on-accent); }
.subcat-mark { color: var(--muted); margin-inline-end: 4px; }

/* Admin gateway fee row form: rate, fixed amount and save on one line. */
.gateway-form { flex-wrap: nowrap; gap: var(--s-2); align-items: center; }
.gateway-form .input { inline-size: 90px; min-height: 38px; padding: 6px 10px; }

/* Academy wallet: "how your amount is worked out". */
.wallet-formula { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
.wallet-formula > span:not([aria-hidden]) , .wallet-formula strong { padding: 6px 12px; border-radius: var(--r-pill); background: var(--ground); }
.wallet-formula strong { background: var(--btn-bg); color: var(--on-accent); }
.wallet-rates { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: var(--s-3); }
.wallet-rates div { padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-card); }
.wallet-rates dt { font-size: 13px; color: var(--muted); }
.wallet-rates dd { margin: 4px 0 0; font-size: 18px; font-weight: 700; color: var(--night); }

/* ---------- Styled dropdown (fancy-select.js over a native <select data-fancy>) ---------- */
.fs { position: relative; min-width: 0; }
.fs-native { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }
.fs-button {
  inline-size: 100%; min-block-size: 48px; display: flex; align-items: center; gap: 10px; padding: 8px 14px;
  font: inherit; font-size: 15px; color: var(--night); text-align: start; cursor: pointer;
  background: var(--field-bg); border: 1px solid var(--field-line); border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.fs-button:hover { border-color: var(--accent-text); }
.fs-button:focus-visible, .fs.is-open .fs-button {
  outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-text) 18%, transparent);
}
.fs-value { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.fs-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs.is-placeholder .fs-text { color: var(--muted); }
.fs-chevron {
  /* Physical sides on purpose: the arrow points down in both RTL and LTR. */
  flex: none; inline-size: 8px; block-size: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); margin-block-start: -4px; transition: transform .15s ease;
}
.fs.is-open .fs-chevron { transform: rotate(225deg); margin-block-start: 4px; }
.fs-list {
  position: absolute; z-index: 30; inset-inline: 0; inset-block-start: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  max-block-size: 320px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 32px rgb(0 0 0 / .14);
}
.fs-list[hidden] { display: none; }
.fs-option {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer;
  font-size: 14px; color: var(--ink-2); line-height: 1.4;
}
.fs-option:hover, .fs-option.is-active { background: var(--rose-light); color: var(--night); }
.fs-option[aria-selected="true"] { background: var(--btn-bg); color: var(--on-accent); font-weight: 600; }
.fs-option[aria-selected="true"] .fs-icon { filter: brightness(0) invert(1); }
.fs-option-any { color: var(--muted); }
.fs-icon { inline-size: 22px; block-size: 22px; object-fit: contain; flex: none; }
@media (prefers-reduced-motion: reduce) { .fs-button, .fs-chevron { transition: none; } }
:root[data-theme="dark"] .fs-icon { filter: brightness(0) invert(.85); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .fs-icon { filter: brightness(0) invert(.85); }
}

/* Tax invoices and credit notes (/Invoices/{number}): a printable A4 page. */
.tax-doc-wrap { max-width: 860px; padding-block: var(--s-8); }
.tax-doc-head { align-items: flex-start; gap: var(--s-6); }
.tax-doc-qr { flex: none; width: 132px; height: 132px; background: #FFFFFF; padding: 6px; border-radius: 8px; }
.tax-doc-parties p { margin: 0; }
.tax-doc-totals { max-width: 420px; margin-inline-start: auto; }
.tax-doc-grand { font-weight: 700; font-size: 17px; }
.tax-doc-links { margin: 0; padding: 0; list-style: none; }
.vat-incl { display: block; font-size: 12px; }
.tax-rate-field { max-width: 140px; }
@media print {
  .site-head, .site-foot, .tax-doc-actions, .announce-bar { display: none !important; }
  body { background: #FFFFFF; }
  .tax-doc { box-shadow: none; border: 1px solid #DDDDDD; }
  .tax-doc-wrap { padding: 0; max-width: none; }
}

/* Account page: rarely used preferences, folded at the bottom. */
.quiet-settings { font-size: 13px; color: var(--muted); }
.quiet-settings summary { cursor: pointer; width: fit-content; opacity: 0.75; }
.quiet-settings summary:hover, .quiet-settings[open] summary { opacity: 1; }
.quiet-settings-body { padding-block-start: var(--s-2); }
.quiet-settings-body p { font-size: 13px; }
.btn-link { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.export-row { justify-content: flex-end; flex-wrap: wrap; gap: var(--s-2); }

/* Growth: intro video, share/copy rows, personal coupons, field follow, learning paths */
.video-frame { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: var(--r-card); overflow: hidden; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Copy-a-link field: one rounded box holding the link and the copy button. */
.copy-row {
  display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px; padding-inline-start: 16px;
  background: var(--field-bg); border: 1px solid var(--field-line); border-radius: var(--r-input);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.copy-row:focus-within { border-color: var(--teal-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal-text) 18%, transparent); }
.copy-row input {
  flex: 1 1 0; width: 0; min-width: 0; min-height: 40px; padding: 0; border: 0; background: transparent; color: var(--night);
  font: inherit; font-size: 15px; text-overflow: ellipsis; outline: none;
}
.copy-row .btn { flex: 0 0 auto; min-height: 40px; }
.input.input-sm { min-height: 40px; padding: 8px 14px; font-size: 14px; width: auto; min-width: 0; }
.path-add { flex-wrap: wrap; align-items: center; }
.path-add select { flex: 1 1 260px; max-width: 100%; }
.input:focus-visible { border-color: var(--teal-text); outline-offset: 1px; }
.my-coupons { margin-block-start: .5rem; }
.follow-field { align-items: center; flex-wrap: wrap; gap: .5rem .75rem; margin-block: .75rem; }
.path-list > * { width: 100%; }
.path-admin > summary { cursor: pointer; list-style: none; }
.path-admin > summary::-webkit-details-marker { display: none; }

/* Course form: accreditation (health field only) */
.accreditation-box[hidden] { display: none; }

/* Checkout: payment method choice */
.co-methods { border: 0; padding: 0; margin: 0; }
.co-method { align-items: flex-start; padding: 12px 14px; border: 1px solid var(--field-line); border-radius: var(--r-input); background: var(--field-bg); }
.co-method > span { display: flex; flex-direction: column; gap: 2px; }
.co-method:has(input:checked) { border-color: var(--teal-text); }
.co-method:has(input:disabled) { opacity: .75; }
