/* ============================================================================
   DMA PUBLIC WEBSITE THEME — "Style N: The Federation"
   Derived from input/design-reference/styleN-federation.html (LOCKED).
   Layer order: tokens → global → layout. Page-type / page-specific CSS is added
   per screen in later sprints. Shares ONLY the brand tokens (css/shared/tokens.brand.css).
   ============================================================================ */

/* ---------- TOKENS (public) ----------
   THEME-AWARE semantic surface layer. Light on bare :root; dark values are redefined in ONE place
   below (:root[data-theme="dark"] for the explicit choice + a prefers-color-scheme block for System).
   Components must consume THESE tokens, never hardcode a surface colour — that is what lets the whole
   site flip themes from one block. Brand tokens (navy/red) come from css/shared/tokens.brand.css and
   are theme-constant; only their ON-SURFACE roles (e.g. red-as-text) are re-mapped per theme here. */
:root {
  --pub-ink:   #1a1c24;   /* body text */
  --pub-mut:   #5c606c;   /* secondary text */
  --pub-bg:    #ffffff;   /* page background */
  --pub-soft:  #f3f5f8;   /* soft section background */
  --pub-soft-2:#f6f6f3;
  --pub-line:  #e3e6ec;   /* borders / dividers */

  --pub-card:      #ffffff;              /* cards / panels / solid surfaces */
  --pub-header-bg: #ffffff;              /* solid (scrolled / no-hero) header */
  --pub-field-bg:  #ffffff;              /* form inputs / selects / textareas / search */
  --pub-shadow:    color-mix(in srgb,var(--brand-navy) 10%,transparent);/* standard elevation shadow */
  --pub-shadow-lg: color-mix(in srgb,var(--brand-navy) 16%,transparent);/* larger elevation (dropdowns, drawers) */
  --pub-on-brand:  #ffffff;              /* text/icons that sit ON navy/red brand bands (theme-constant) */
  --pub-red-ink:   var(--brand-red);     /* red used as TEXT/LINKS (5.4:1 on white); re-mapped on dark */
  --pub-accent-ink: var(--brand-navy);  /* navy used as TEXT/links/headings; re-mapped on dark */

  --pub-font:  'Libre Franklin', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --pub-maxw:  1600px;   /* match the homepage/menu content width (--v3-wrap-max) */
  --pub-radius: 6px;
  --pub-header-h: 72px;
}

/* ---------- DARK THEME (single source; whole site adapts from these) ----------
   Explicit choice wins via [data-theme]; System (no explicit choice) follows the OS. The inline
   pre-paint script in <head> sets data-theme before first paint (no flash). */
:root[data-theme="dark"] {
  --pub-ink:   #e8eaf1;
  --pub-mut:   #a2a8b8;   /* 7.6:1 on --pub-bg */
  --pub-bg:    #14161d;
  --pub-soft:  #1b1e27;
  --pub-soft-2:#1b1e27;
  --pub-line:  #2d3342;

  --pub-card:      #1e2230;
  --pub-header-bg: #171a24;
  --pub-field-bg:  #171a22;
  --pub-shadow:    rgba(0, 0, 0, .45);
  --pub-shadow-lg: rgba(0, 0, 0, .60);
  --pub-on-brand:  #ffffff;
  --pub-red-ink:   #ec7b74;   /* lighter red for text/links on dark — clears AA (see report) */
  --pub-accent-ink: #a6abf2;   /* light periwinkle — navy accent on dark (7.2:1) */
}
@media (prefers-color-scheme: dark) {
  /* System: apply dark unless the user explicitly chose light or dark */
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --pub-ink:   #e8eaf1;
    --pub-mut:   #a2a8b8;
    --pub-bg:    #14161d;
    --pub-soft:  #1b1e27;
    --pub-soft-2:#1b1e27;
    --pub-line:  #2d3342;

    --pub-card:      #1e2230;
    --pub-header-bg: #171a24;
    --pub-field-bg:  #171a22;
    --pub-shadow:    rgba(0, 0, 0, .45);
    --pub-shadow-lg: rgba(0, 0, 0, .60);
    --pub-on-brand:  #ffffff;
    --pub-red-ink:   #ec7b74;
  --pub-accent-ink: #a6abf2;   /* light periwinkle — navy accent on dark (7.2:1) */
  }
}
/* colour transition on theme flip (gated for reduced-motion) */
@media (prefers-reduced-motion: no-preference) {
  .dma-public, .pub-header, .pub-card, .pub-field input, .pub-field select, .pub-field textarea {
    transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease, border-color var(--motion-fast) ease;
  }
}

/* ---------- GLOBAL ---------- */
html { margin: 0; }
/* sticky footer: body fills the viewport, main grows, footer sits at the bottom (no white gap) */
.dma-public { font-family: var(--pub-font); color: var(--pub-ink); line-height: 1.6; background: var(--pub-bg);
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
.dma-public > main { flex: 1 0 auto; }
.dma-public > .pub-footer { flex-shrink: 0; }
.dma-public *, .dma-public *::before, .dma-public *::after { box-sizing: border-box; }
.dma-public a { color: inherit; text-decoration: none; }
.dma-public img { max-width: 100%; }
.dma-public h1, .dma-public h2, .dma-public h3, .dma-public h4 { letter-spacing: -0.01em; line-height: 1.2; }

.pub-wrap { max-width: var(--pub-maxw); margin: 0 auto; padding: 0 clamp(24px,4vw,64px); }  /* match .v3-wrap (homepage/menu) exactly */

/* skip link (a11y) */
.pub-skip { position: absolute; left: -9999px; top: 0; background: var(--brand-navy); color: #fff; padding: 10px 16px; z-index: 200; }
.pub-skip:focus { left: 8px; top: 8px; }

/* ---------- BUTTONS (public primitives) ---------- */
/* EVERY variant carries the same 1.5px border, so every button is the same height.
   It used to be `border: 0` here with only .pub-btn--ghost adding `1.5px solid`, which made an
   outlined button 3px taller than a filled one. Side by side in a flex row the two were centred
   on each other, so the outlined button sat ~1.5px high and the pair looked misaligned.
   A TRANSPARENT border is the fix rather than a per-variant colour: the background paints under
   the border (background-clip defaults to border-box), so a filled button looks exactly as if it
   were outlined in its own colour, and it keeps working for any future variant or palette with
   nothing to keep in sync. Do not set this back to `border: 0`. */
.pub-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 0.88rem;
  padding: 11px 20px; border-radius: 4px; border: 1.5px solid transparent; cursor: pointer; white-space: nowrap; line-height: 1.2;
  transition: filter .15s, background .15s, color .15s; }
.pub-btn svg { width: 1.05em; height: 1.05em; flex: 0 0 auto; }
/* ============================================================================
   CANONICAL button colour mapping — text colour is DETERMINISTIC from the background.
   Selectors are DOUBLED (.pub-btn.pub-btn--X = specificity 0,2,0) so they beat the global
   `.dma-public a { color: inherit }` (0,1,1). Without this, anchor-buttons (<a class="pub-btn">)
   inherit the section's text colour — white in the hero, ink on light sections — so the SAME red
   background showed white text in one place and dark text in another. No !important needed.
   Mapping:  red bg → white · navy bg → white · transparent-on-light → navy · transparent-on-dark → white.
   ============================================================================ */
.pub-btn.pub-btn--primary { background: var(--brand-red); color: #fff; }          /* red  → white  (5.44:1) */
.pub-btn.pub-btn--primary:hover { filter: brightness(1.08); }
.pub-btn.pub-btn--navy { background: var(--brand-navy); color: #fff; }            /* navy → white  (14.57:1) */
.pub-btn.pub-btn--navy:hover { background: var(--brand-navy-700); }
.pub-btn.pub-btn--ghost { background: transparent; border: 1.5px solid var(--brand-navy); color: var(--pub-accent-ink); } /* transparent-on-LIGHT → navy (14.57:1) */
@media (hover: hover) { .pub-btn.pub-btn--ghost:hover { background: var(--brand-navy); color: #fff; } }
/* transparent-on-DARK contexts (hero photo, navy CTA band) → white outline + white text; hover inverts */
.pub-hero .pub-btn.pub-btn--ghost, .pub-cta-band .pub-btn.pub-btn--ghost { border-color: rgba(255,255,255,.55); color: #fff; }
@media (hover: hover) { .pub-hero .pub-btn.pub-btn--ghost:hover, .pub-cta-band .pub-btn.pub-btn--ghost:hover { background: #fff; color: var(--pub-accent-ink); } }

/* ---------- HEADER / NAV (transparent over hero → solid on scroll) ---------- */
.pub-header { position: fixed; top: 0; left: 0; right: 0; z-index: 60; transition: background .3s, box-shadow .3s; }
.pub-header.is-solid { background: var(--pub-header-bg); box-shadow: 0 2px 14px -8px var(--pub-shadow); border-bottom: 1px solid var(--pub-line); }
.pub-nav { display: flex; align-items: center; justify-content: space-between; height: var(--pub-header-h); gap: 24px; }
/* The DMA logo asset is an opaque, light-on-white mark (no transparency). It reads correctly on
   white; on dark contexts (transparent nav over hero) we sit it on a white chip instead of
   inverting it (inversion turned the whole opaque rectangle white — the "white block" bug). */
.pub-nav__logo { display: inline-flex; border-radius: 5px; transition: background .3s, padding .3s; }
.pub-nav__logo img { height: 40px; display: block; border-radius: 4px; }
.pub-nav.on-hero .pub-nav__logo { background: #fff; padding: 5px 9px; }

.pub-menu { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; font-weight: 600; font-size: 0.93rem; }
.pub-menu > li { position: relative; }
.pub-menu > li > a { display: inline-flex; align-items: center; gap: 5px; padding: 8px 0; transition: color .2s; }
.pub-menu > li > a:hover { color: var(--pub-red-ink); }
.pub-nav.on-hero .pub-menu > li > a { color: #fff; }
/* hover only recolours TOP-LEVEL links on the hero; submenu links keep their own readable
   hover (navy on the light dropdown) — see .pub-submenu a:hover below. */
.pub-nav.on-hero .pub-menu > li > a:hover { color: #ffd9d4; }
.pub-menu__caret { width: 8px; height: 8px; }

/* submenu (menu → submenu MPA structure) */
.pub-submenu { position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--pub-card);
  border: 1px solid var(--pub-line); border-radius: var(--pub-radius); box-shadow: 0 24px 46px -28px var(--pub-shadow-lg);
  padding: 8px; list-style: none; margin: 8px 0 0; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s, transform .18s, visibility .18s; z-index: 70; }
.pub-menu > li:hover > .pub-submenu,
.pub-menu > li:focus-within > .pub-submenu { opacity: 1; visibility: visible; transform: none; }
.pub-submenu a { display: block; padding: 9px 12px; border-radius: 5px; font-weight: 500; font-size: 0.9rem; color: var(--pub-ink); }
.pub-submenu a:hover { background: var(--pub-soft); color: var(--pub-accent-ink); }

/* mobile nav toggle */
.pub-nav__toggle { display: none; width: 42px; height: 42px; border: 0; background: transparent; cursor: pointer; color: inherit; }
.pub-nav.on-hero .pub-nav__toggle { color: #fff; }
.pub-nav__toggle svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ---------- SECTION PRIMITIVES ---------- */
.pub-section { padding: 70px 0; }
.pub-section--soft { background: var(--pub-soft); }
.pub-section__head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.pub-kicker { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--pub-red-ink); font-weight: 600; margin-bottom: 10px; }
.pub-section__head h2 { font-weight: 600; font-size: 2rem; }

/* ---------- FOOTER ---------- */
.pub-footer { background: var(--brand-navy-900); color: #c2c3e4; }
/* Minimal persistent newsletter row (one line: label + email + button; inline desktop, stacked mobile). */
.pub-footer__nl { border-bottom: 1px solid rgba(255,255,255,.12); }
.pub-footer__nlwrap { display: flex; align-items: center; justify-content: space-between; gap: 16px 44px; flex-wrap: wrap; padding: 22px 0; }
.pub-footer__nlintro b { display: block; color: #fff; font-weight: 600; font-size: 1rem; }
.pub-footer__nlintro span { font-size: 0.85rem; color: #a9abd6; }
.pub-footer__nlform { flex: 1 1 380px; max-width: 470px; }
.pub-footer__nlrow { display: flex; gap: 10px; }
.pub-footer__nlrow input { flex: 1; min-width: 0; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08);
  color: #fff; border-radius: 8px; padding: 11px 13px; font-family: inherit; font-size: 0.92rem; }
.pub-footer__nlrow input::placeholder { color: #9a9cc4; }
.pub-footer__nlrow input:focus { outline: none; border-color: #fff; }
.pub-footer__nlrow .pub-btn { flex: none; }
.pub-footer__nlnote { color: #9a9cc4; font-size: 0.76rem; margin: 8px 0 0; }
.pub-footer__nlnote a { display: inline; color: #c2c3e4; text-decoration: underline; padding: 0; }
.pub-footer__nlmsg { font-size: 0.85rem; margin-bottom: 8px; padding: 8px 11px; border-radius: 7px; }
.pub-footer__nlmsg.is-ok { background: rgba(52,168,83,.18); color: #b6f0c4; }
.pub-footer__nlmsg.is-err { background: rgba(192,57,43,.22); color: #f3b4ad; }
@media (max-width: 640px) {
  .pub-footer__nlwrap { flex-direction: column; align-items: stretch; }
  .pub-footer__nlform { max-width: none; }
  .pub-footer__nlrow { flex-direction: column; }
  .pub-footer__nlrow .pub-btn { width: 100%; justify-content: center; }
}
.pub-footer__main { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding: 52px 0 32px; }
/* opaque light-on-white logo → sit it on a white chip on the navy footer (no inversion). */
.pub-footer__logo { height: 40px; background: #fff; padding: 7px 11px; border-radius: 6px; margin-bottom: 14px; display: inline-block; }
.pub-footer p { font-size: 0.88rem; max-width: 34ch; }
.pub-footer h4 { color: #fff; margin-bottom: 12px; font-size: 0.98rem; font-weight: 600; }
.pub-footer a { display: block; color: #c2c3e4; font-size: 0.88rem; padding: 4px 0; }
.pub-footer a:hover { color: #fff; }
.pub-footer__soc { display: flex; gap: 10px; margin-top: 14px; }
.pub-footer__soc a { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; display: grid; place-items: center; padding: 0; }
.pub-footer__soc svg { width: 16px; height: 16px; fill: #c2c3e4; }
.pub-footer__soc a:hover svg { fill: #fff; }
.pub-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0; font-size: 0.8rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.pub-footer__bottom a { display: inline; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
  .pub-nav__toggle { display: grid; place-items: center; }
  .pub-menu { position: fixed; top: var(--pub-header-h); left: 0; right: 0; background: var(--pub-card); flex-direction: column;
    gap: 0; padding: 10px 16px 20px; border-bottom: 1px solid var(--pub-line); box-shadow: 0 18px 30px -20px var(--pub-shadow-lg);
    display: none; }
  .pub-menu.is-open { display: flex; }
  .pub-menu > li > a { color: var(--pub-ink); padding: 12px 4px; border-bottom: 1px solid var(--pub-line); }
  .pub-nav.on-hero .pub-menu > li > a { color: var(--pub-ink); }
  .pub-submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0;
    padding: 0 0 8px 12px; margin: 0; }
  .pub-footer__main { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  /* Scoped OUT of the V4 brand layer (.dma3d): the hero slider, committee cards, chapter showcase and
     other V4 motion are core brand elements the client requires running. Non-V4 primitives still honour
     the reduced-motion preference. (Was a blanket `.dma-public *` kill that froze the whole site.) */
  .dma-public *:not(.dma3d):not(.dma3d *) { transition: none !important; }
}

/* ---------- INTERIOR PAGE PRIMITIVES (About / Contact / Error placeholders) ---------- */
/* header clearance is handled once on <main> (components.css); this is just the page's own spacing */
.pub-page { padding: 56px 0 70px; }
.pub-page__title { font-weight: 600; font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; }
.pub-page__title--narrow { max-width: 22ch; }
.pub-lead { color: var(--pub-ink); max-width: 72ch; font-size: 1.2rem; line-height: 1.65; font-weight: 500; margin: 0 0 26px; }
.pub-note { color: var(--pub-mut); margin-top: 24px; font-size: 0.92rem; }
.pub-note--sm { margin-top: 16px; font-size: 0.85rem; }
/* The canonical action row (17 Nov 2026): it lived only in membership-register.css, so the 13 portal
   and payment pages that use it without loading that file got NO gap — on My Mentor Profile "Edit my
   profile" and "Withdraw from Programme" touched. Same declaration, now in the global layer; a form
   wrapping one button (Withdraw) is a flex item like any other. */
.pub-reg__actions { display: flex; align-items: center; gap: 16px; margin-top: 22px; flex-wrap: wrap; }
.pub-link { color: var(--pub-accent-ink); font-weight: 700; }

/* ---- Policy links are always underlined -----------------------------------------------------
   A link to the privacy policy, the terms or the refund policy usually sits inside a consent
   sentence — "I agree to ... as described in the privacy policy" — where it is the only link in a
   paragraph of plain text. Colour alone is not enough to mark it: it fails WCAG 1.4.1 (colour is
   the only visual means of conveying it is a link) and, in practice, people tick the box without
   realising there was something to read.

   Matched on the DESTINATION rather than a class, deliberately. The requirement is about where
   the link goes, and these links are written in half a dozen views in three different styles;
   keying on the href means a new one is underlined the day it is added, without anyone having to
   remember a class name. The consent banner already did this locally — this makes it the rule.  */
.dma3d a[href*="/privacy"],
.dma3d a[href*="/terms"],
.dma3d a[href*="/refund-policy"],
.dma3d a[href*="/cancellation-policy"] {
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}
/* TWO DELIBERATE EXCEPTIONS.

   1. A policy link rendered AS A BUTTON is already unmistakably interactive; underlining a filled
      pill just looks broken.
   2. A policy link inside the FOOTER NAV or the site map is one entry in a list of links, sitting
      beside Membership, Contact Us and Site Map. Underlining three of six would read as a defect,
      not as emphasis — and the reason for the rule (a lone link hidden in a sentence of plain
      text) does not apply to a list whose every item is a link. */
.dma3d a.v4-btn[href*="/privacy"],
.dma3d a.v4-btn[href*="/terms"],
.dma3d a.v4-btn[href*="/refund-policy"],
.dma3d a.pub-btn[href*="/privacy"],
.dma3d a.pub-btn[href*="/terms"],
.dma3d a.pub-btn[href*="/refund-policy"],
.dma3d .ft-nav a[href*="/privacy"],
.dma3d .ft-nav a[href*="/terms"],
.dma3d .ft-nav a[href*="/refund-policy"],
.dma3d .ft-nav a[href*="/cancellation-policy"] {
    text-decoration: none;
}
.pub-kicker--error { color: var(--pub-red-ink); }

/* intro copy under a centred section head */
.pub-section__head p { color: var(--pub-mut); margin-top: 10px; }

/* ---- Button motion (shared, tokenized). Hover lift only on pointer devices. ---- */
.pub-btn { transition: transform var(--motion-fast) var(--ease-out),
    box-shadow var(--motion-fast) var(--ease-out), background var(--motion-fast) var(--ease-out), filter var(--motion-fast) var(--ease-out); }
@media (hover: hover) {
  .pub-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px color-mix(in srgb,var(--brand-navy) 50%,transparent); }
}
.pub-btn:active { transform: translateY(0); }
.pub-btn:focus-visible { outline: 2px solid var(--brand-navy); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .pub-btn { transition: none !important; }
  .pub-btn:hover, .pub-btn:active { transform: none !important; box-shadow: none !important; }
}

/* ---- Header actions (expandable search + staff login + CTA) ---- */
.pub-nav__actions { display: flex; align-items: center; gap: 14px; }
.pub-menu__auth { display: none; }
@media (max-width: 960px) {
  .pub-login { display: none; }                 /* desktop login link hidden; drawer login shows */
  .pub-menu__auth { display: block; border-top: 1px solid var(--pub-line); margin-top: 6px; padding-top: 6px; }
  .pub-nav__actions { gap: 8px; }
}

/* ---------- THEME TOGGLE (Light / Dark / System) ---------- */
.pub-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.pub-theme { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0;
  background: transparent; color: inherit; cursor: pointer; border-radius: 8px;
  transition: background var(--motion-fast) ease, color var(--motion-fast) ease; }
@media (hover: hover) { .pub-theme:hover { background: var(--brand-navy-tint); color: var(--pub-accent-ink); } }
.pub-nav.on-hero .pub-theme { color: #fff; }   /* white on the transparent-over-hero header */
.pub-nav.on-hero .pub-theme:hover { background: rgba(255,255,255,.16); color: #fff; }
.pub-theme:focus-visible { outline: 2px solid var(--brand-navy); outline-offset: 2px; }
.pub-nav.on-hero .pub-theme:focus-visible { outline-color: #fff; }
.pub-theme svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.pub-theme__i { display: none; }
:root[data-theme="light"]  .pub-theme__i--light,
:root[data-theme="dark"]   .pub-theme__i--dark,
:root[data-theme="system"] .pub-theme__i--system,
:root:not([data-theme])    .pub-theme__i--system { display: inline-block; }
@media (prefers-reduced-motion: reduce) { .pub-theme { transition: none; } }

/* Validation messages + required asterisk are always RED, on every public layout
   (incl. _CheckoutLayout, which does not load components.css). Independent of the
   brand accent token, which this theme maps to teal. */
.req-star, .v4-req { color: #d32f2f; margin-left: 3px; font-weight: 700; line-height: 1; }
.pub-field__err,
.field-validation-error,
.text-danger,
.validation-summary-errors li,
.dma-captcha__msg.is-error,
.v4-err,
/* An over-limit word counter is a validation message, so it takes the ONE validation colour
   rather than a second red of its own (js/public/word-limit.js toggles .is-over). */
.mp-wordcount.is-over,
.v4-formsummary ul li { display: block; color: #d32f2f; font-size: 0.82rem; margin-top: 6px; }
/* THE ERRORED-FIELD OUTLINE. One rule, both field wrappers (.pub-field on the member
   login and the rest of the site, .v4-field on the V4 contact form).

   THE DOUBLED .input-validation-error IS DELIBERATE - do not "tidy" it away. The V4 base
   rule `.dma3d .v4-field input{border:2px solid var(--border)}` in interior-v4.css is
   also (0,2,1), and interior-v4.css loads AFTER this file, so at equal specificity the
   base rule won on order and the errored box kept its pale border while only the message
   turned red. Repeating the class makes this (0,3,1), which beats that rule and the
   `:focus` rule too, so an errored field STAYS red while it is focused instead of
   flipping to the accent colour. Same doubling convention the .pub-btn modifiers use. */
.pub-field input.input-validation-error.input-validation-error,
.pub-field select.input-validation-error.input-validation-error,
.pub-field textarea.input-validation-error.input-validation-error,
.v4-field input.input-validation-error.input-validation-error,
.v4-field select.input-validation-error.input-validation-error,
.v4-field textarea.input-validation-error.input-validation-error {
    border-color: #d32f2f;
    border-width: 2px;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, .12);
}

/* Dark ground: #d32f2f is 3.46:1 on the dark surface, under the 4.5:1 AA floor, so the
   SAME one rule lifts to a lighter red there. Still one validation colour for the whole
   public site - login, contact, checkout - it just tracks the background it sits on. */
:root[data-theme="dark"] .req-star,
:root[data-theme="dark"] .v4-req,
:root[data-theme="dark"] .pub-field__err,
:root[data-theme="dark"] .field-validation-error,
:root[data-theme="dark"] .text-danger,
:root[data-theme="dark"] .validation-summary-errors li,
:root[data-theme="dark"] .dma-captcha__msg.is-error,
:root[data-theme="dark"] .v4-err,
:root[data-theme="dark"] .mp-wordcount.is-over,
:root[data-theme="dark"] .v4-formsummary ul li { color: #ff6b6b; }
:root[data-theme="dark"] .pub-field input.input-validation-error.input-validation-error,
:root[data-theme="dark"] .pub-field select.input-validation-error.input-validation-error,
:root[data-theme="dark"] .pub-field textarea.input-validation-error.input-validation-error,
:root[data-theme="dark"] .v4-field input.input-validation-error.input-validation-error,
:root[data-theme="dark"] .v4-field select.input-validation-error.input-validation-error,
:root[data-theme="dark"] .v4-field textarea.input-validation-error.input-validation-error { border-color: #ff6b6b; }

/* Human check (CAPTCHA) widget — <dma-captcha>, js/shared/captcha.js (16 Nov 2026). The box
   reserves Turnstile's 65px so the button below does not jump when it draws; a lazy widget takes
   no room until the visitor starts using its form. Error colour = the shared validation red above. */
.dma-captcha { min-height: 65px; margin: 6px 0 16px; max-width: 100%; overflow: hidden; }
.dma-captcha[data-captcha-lazy]:not(.is-rendered) { min-height: 0; margin: 0; }
.dma-captcha__msg { margin: -8px 0 14px; font-size: 0.88rem; line-height: 1.45; color: var(--pub-mut); }

/* ── Category + tag chips and the list filter banner (D-DELTA-20261116-CategoriesAndTags) ──
   Shared primitives: _TaxonomyChips.cshtml / _TaxonomyFilterBanner.cshtml on every public content
   page. Theme tokens only (V4 maps --pub-* onto its palette), so light and dark both work. */
/* Doubled with .dma3d: the V4 reset zeroes margin/padding on blocks, which put the chips 1px under the rule. */
.pub-tx, .dma3d .pub-tx { display: flex; flex-direction: column; gap: 10px; margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--pub-line); }
.pub-tx__row, .dma3d .pub-tx__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.pub-tx__lbl { font-size: 0.78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--pub-mut); margin-right: 4px; }
.pub-tx__chip, .dma3d .pub-tx__chip { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 12px; border-radius: 999px; box-sizing: border-box;
  font-size: 0.86rem; font-weight: 600; line-height: 1.2; text-decoration: none; color: var(--pub-ink);
  background: var(--pub-card); border: 1px solid color-mix(in srgb, var(--pub-ink) 18%, transparent);
  transition: border-color .15s, background-color .15s; }
.pub-tx__chip--cat { font-weight: 700; }
a.pub-tx__chip:focus-visible { outline: 3px solid var(--pub-accent, currentColor); outline-offset: 2px; }
@media (hover: hover) { a.pub-tx__chip:hover { border-color: var(--pub-ink); } }
/* On a card the strip is compact and sits with the text, not under a rule. */
.v4-card .pub-tx, .dma3d .v4-card .pub-tx { margin: 0 0 10px; padding-top: 0; border-top: 0; gap: 6px; }
.v4-card .pub-tx__lbl { display: none; }
.v4-card .pub-tx__chip, .dma3d .v4-card .pub-tx__chip { min-height: 26px; padding: 2px 10px; font-size: 0.8rem; }

/* Doubled with .dma3d: a V4 rule zeroes padding on blocks inside the list panel. */
.pub-txf, .dma3d .pub-txf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 20px;
  padding: 12px 16px; border-radius: 12px; background: var(--pub-card); border: 1px solid color-mix(in srgb, var(--pub-ink) 16%, transparent);
  color: var(--pub-ink); font-size: 0.95rem; }
.pub-txf__clear { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; color: var(--pub-ink); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .pub-tx__chip { transition: none; } }


/* Month filter on the blog / news / press lists (16 Nov 2026): the pill used the browser's own arrow,
   which sat against the rounded right edge. Own chevron (two currentColor gradients, so it follows the
   theme) 18px in from the edge, with room for it in the right padding. */
.pub-monthsel, .dma3d .pub-monthsel { -webkit-appearance: none; appearance: none; padding: 8px 40px 8px 16px; border-radius: 50px;
  font-size: 13px; font-weight: 700; background-color: var(--surface, var(--pub-card)); color: var(--dark, var(--pub-ink));
  border: 2px solid var(--border, var(--pub-line)); cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 23px) calc(50% + 1px), calc(100% - 18px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.pub-monthsel:focus-visible { outline: 3px solid var(--saffron, currentColor); outline-offset: 2px; }
