/* ==========================================================================
   Components ("civic editorial", Stage 6). Class names here are a contract
   with core.js, motion.js and page builders: do not rename without updating
   BUDDYX_PLAN.md and styleguide.html.
   Sections:
     1  Site header (floating glass pill) + primary nav
     2  Site footer                      14  Tabs
     3  Demo role switcher               15  Tables
     4  Buttons                          16  Pagination
     5  Badges                           17  Alerts, notices, toast
     6  Chips                            18  Dialog
     7  Cards (generic, member, logo     19  Breadcrumbs
        tile, event, resource, news,     20  Empty state
        person, avatar, tone art)        21  Price display
     8  Page hero + contour divider      22  Countdown
     9  Section header                   23  Calendar
    10  Stats bar                        24  Toolbar / filter bar
    11  CTA band                         25  Skeleton loader
    12  Forms                            26  Misc (icon, dl, panel, map)
    13  Step indicator                   27  Civic editorial kit (display,
                                             eyebrow, surfaces, stipple,
                                             glass, orbit, journey, event
                                             row, colour tile, process,
                                             stat prose, marquee, hero field)
   ========================================================================== */


/* ==========================================================================
   1. Site header: one floating glass pill (markup rendered by layout.js)
   .site-header (fixed, full width, transparent) > .site-header__bar (the pill)
   Glass fill on .site-header__bar::before, shadow on ::after; motion.css owns
   their opacity and the settle transform on .is-scrolled (motion-spec §5.7).
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  padding: var(--header-inset) 0.5rem 0;
  pointer-events: none; /* only the pill catches clicks */
}
.site-header__bar {
  position: relative;
  isolation: isolate;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  max-width: calc(var(--container-wide) + 1.5rem);
  min-height: var(--header-pill);
  margin-inline: auto;
  padding: 0.375rem 0.4375rem 0.375rem 0.625rem;
  border-radius: var(--radius-pill);
  color: var(--navy-900);
}
.site-header__bar::before,
.site-header__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}
/* Glass. White fill; motion.css sets its opacity (0.72 resting, 0.94 scrolled).
   Text in the pill is navy-900 / ink-700 only: >= 5.4:1 even at 0.72 over the ink hero. */
.site-header__bar::before {
  background: var(--white);
  opacity: 0.84; /* used only if motion.css is absent */
  border: 1px solid var(--glass-light-border);
  -webkit-backdrop-filter: saturate(1.5) blur(var(--glass-blur));
  backdrop-filter: saturate(1.5) blur(var(--glass-blur));
}
.site-header__bar::after {
  box-shadow: var(--shadow-3);
  opacity: 0;
}
/* The mobile panel is position: fixed inside the bar; a transform on the bar would
   make the bar its containing block, so the settle transform is dropped at once. */
html .site-header.is-nav-open .site-header__bar { transform: none; transition: none; }
html .site-header.is-nav-open .site-header__bar::before { opacity: 1; }
/* v1 edge shadow under the header (motion.css 5.6) does not suit a floating pill. */
.site-header::after { display: none; }
@media print { .site-header { position: absolute; } }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--navy-900);
  text-decoration: none;
  min-width: 0;
  padding-right: 0.25rem;
  border-radius: var(--radius-pill);
}
.brand:hover { color: var(--navy-900); }
.brand__seal { width: 2.5rem; height: 2.5rem; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.brand__name {
  font-family: var(--font-serif);
  font-weight: var(--weight-medium);
  font-size: 1.3125rem;
  letter-spacing: -0.01em;
}
.brand__sub {
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
  color: var(--ink-700);
  margin-top: 0.2rem;
  white-space: nowrap;
}

/* DOM order = visual order at every width (WCAG 2.4.3), so no flex `order`:
   brand, .site-header__quick (Join, below 1100px only), .nav-toggle, nav, .site-header__utility
   (login / account / Join, 1100px and up only). Each Join is display:none at the other size. */
.site-header__quick { margin-left: auto; display: flex; align-items: center; }
.site-header__quick .site-header__join { display: none; }
@media (min-width: 30em) {
  .site-header__quick .site-header__join { display: inline-flex; }
}
.site-header__utility { display: none; align-items: center; gap: 0.375rem; }

/* Focus inside the light pill and the glass menu: navy ring (blue-600 is only ~3.3:1 on the 72% glass). */
.site-header :focus-visible { outline-color: var(--navy-800); }

.utility-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  font-weight: var(--weight-medium);
  font-size: var(--step--1);
  color: var(--navy-900);
  text-decoration: none;
}
.utility-link:hover { color: var(--navy-900); background: var(--navy-50); }
.utility-link[aria-current] { background: var(--navy-100); }
.utility-link svg { width: 1.1rem; height: 1.1rem; flex: none; }

/* Menu toggle (below 1100px) */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--navy-900);
  color: var(--white);
  font-weight: var(--weight-semibold);
  font-size: var(--step--1);
}
.nav-toggle:hover { background: var(--navy-800); }
.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  display: block;
  width: 1rem;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur);
}
.nav-toggle__icon { position: relative; }
.nav-toggle__icon::before, .nav-toggle__icon::after { content: ""; position: absolute; left: 0; }
.nav-toggle__icon::before { top: -5px; }
.nav-toggle__icon::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after { transform: translateY(-5px) rotate(-45deg); }

/* --- Mobile panel (below 1100px): a glass sheet under the pill --- */
.primary-nav {
  position: fixed;
  left: 0.5rem;
  right: 0.5rem;
  top: var(--header-bottom, 4.5rem);  /* layout.js sets top inline when opening */
  bottom: 0.5rem;
  margin-top: 0.5rem;
  z-index: var(--z-dropdown);
  background: var(--glass-light-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-light-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-xs) var(--space-m) var(--space-l);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-0.5rem);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility 0s linear var(--dur);
}
.site-header.is-nav-open .primary-nav {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

.nav-list { display: flex; flex-direction: column; }
.nav-item { position: relative; border-bottom: 1px solid var(--border); max-width: none; }

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.7rem 0;
  background: none;
  border: 0;
  color: var(--navy-900);
  font-family: var(--font-serif);
  font-size: var(--step-2);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tight);
  text-align: left;
  text-decoration: none;
}
.nav-link:hover { color: var(--blue-700); }
.nav-link__chev {
  width: 1rem;
  height: 1rem;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--art-chevron) center / contain no-repeat;
  mask: var(--art-chevron) center / contain no-repeat;
  transition: transform var(--dur) var(--ease-out);
}
.nav-trigger[aria-expanded="true"] .nav-link__chev { transform: rotate(180deg); }

/* Current section: a small Chamber-blue dot before the label (shape, not colour alone). */
.nav-link__label { display: inline-flex; align-items: center; }
.nav-link[aria-current] .nav-link__label::before {
  content: "";
  flex: none;
  width: 0.4rem;
  height: 0.4rem;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--blue-500);
}

.subnav {
  display: none;
  padding: 0 0 var(--space-xs) var(--space-s);
  border-left: 1px solid var(--navy-200);
  margin: 0 0 var(--space-s) 0.25rem;
}
.nav-trigger[aria-expanded="true"] + .subnav { display: block; }
.subnav a {
  display: block;
  padding: 0.6rem 0.75rem;
  color: var(--ink-800);
  font-weight: var(--weight-medium);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.subnav a:hover { color: var(--navy-900); background: var(--navy-50); }
.subnav a[aria-current="page"] { color: var(--navy-900); background: var(--navy-50); box-shadow: inset 2px 0 0 var(--blue-500); }
.subnav__note {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0 0.45rem;
  border: 1px solid var(--brown-100);
  border-radius: var(--radius-pill);
  font-size: var(--step--2);
  font-weight: var(--weight-semibold);
  color: var(--brown-700);
  vertical-align: 0.1em;
}

.nav-mobile-utility {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-top: var(--space-m);
}
.nav-mobile-utility .btn { width: 100%; }

/* --- Desktop (1100px and up): one row inside the pill --- */
@media (min-width: 68.75em) {
  .nav-toggle { display: none; }
  .nav-mobile-utility { display: none; }
  .site-header__quick { display: none; }
  .site-header__utility { display: flex; }
  .site-header__utility .utility-link,
  .site-header__utility .site-header__join { display: inline-flex; }
  .site-header__utility .utility-link[hidden],
  .site-header__utility .site-header__join[hidden] { display: none; }

  .primary-nav {
    position: static;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    visibility: visible;
    opacity: 1;
    transform: none;
    overflow: visible;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transition: none;
  }
  .nav-list { flex-direction: row; flex-wrap: nowrap; justify-content: center; gap: 0.125rem; }
  .nav-item { border: 0; }
  .nav-link {
    width: auto;
    min-height: 2.5rem;
    padding: 0.45rem clamp(0.35rem, -0.15rem + 0.75vw, 0.8rem);
    border-radius: var(--radius-pill);
    font-family: var(--font-sans);
    font-size: clamp(0.8125rem, 0.25rem + 0.85vw, 0.9375rem);
    font-weight: var(--weight-medium);
    letter-spacing: 0;
    white-space: nowrap;
    justify-content: flex-start;
    gap: 0.2rem;
  }
  .nav-link:hover,
  .nav-item.is-open > .nav-link { color: var(--navy-900); background: var(--navy-50); }
  .nav-link[aria-current] { background: var(--navy-100); }
  .nav-link[aria-current] .nav-link__label::before { width: 0.3rem; height: 0.3rem; margin-right: 0.4rem; }
  .nav-link__chev { width: 0.65rem; height: 0.65rem; }

  .subnav {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 0;
    min-width: 15.5rem;
    margin: 0;
    padding: 0.5rem;
    background: var(--glass-light-strong);
    border: 1px solid var(--glass-light-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-3);
    z-index: var(--z-dropdown);
  }
  /* Hover bridge across the gap between the pill and the dropdown. */
  .subnav::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 0.875rem; }
  .nav-item:last-child .subnav,
  .nav-item:nth-last-child(2) .subnav { left: auto; right: 0; }
  .subnav a { padding: 0.55rem 0.75rem; font-size: var(--step--1); }

  /* 1100-1359px: seal only (the name stays in the accessible name). */
  @media (max-width: 84.99em) {
    .brand__text {
      position: absolute; width: 1px; height: 1px; overflow: hidden;
      clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
    }
  }
  /* 1100-1535px: login / account as round icon buttons (label stays for AT). */
  @media (max-width: 95.99em) {
    .utility-link { width: 2.5rem; padding: 0; border: 1px solid var(--glass-light-border); }
    .utility-link__label {
      position: absolute; width: 1px; height: 1px; overflow: hidden;
      clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
    }
  }
}


/* ==========================================================================
   2. Site footer: deep ink, a large serif sign-off, faint contour lines
   ========================================================================== */
.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: var(--space-2xl);
  background:
    radial-gradient(50% 80% at 100% 0%, var(--glow-blue) 0%, transparent 70%),
    var(--surface-inverse-deep);
  color: var(--text-on-inverse-muted);
  font-size: var(--step--1);
}
.site-footer::before { /* contour lines, fading out toward the bottom */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--contour-on-ink);
  -webkit-mask: var(--art-contours) 0 0 / 960px auto repeat, linear-gradient(180deg, black, transparent 70%);
  -webkit-mask-composite: source-in;
  mask: var(--art-contours) 0 0 / 960px auto repeat, linear-gradient(180deg, black, transparent 70%);
  mask-composite: intersect;
}
.site-footer a { color: var(--white); text-decoration-color: color-mix(in srgb, var(--white) 40%, transparent); }
.site-footer a:hover { color: var(--sky-300); text-decoration-color: currentColor; }
.site-footer a.btn { text-decoration: none; }

.site-footer__lead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-l);
  padding-block: var(--section-space) var(--space-xl);
  border-bottom: 1px solid var(--border-inverse);
}
.site-footer__signoff {
  max-width: 16ch;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: var(--weight-light);
  font-size: var(--step-5);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}
.site-footer__lead-actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }

.site-footer__grid {
  display: grid;
  gap: var(--space-xl) var(--space-l);
  grid-template-columns: minmax(0, 1fr);
  padding-block: var(--space-xl) var(--space-l);
}
@media (min-width: 40em) {
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 62em) {
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.5fr; }
}

.site-footer__brand { display: flex; flex-direction: column; gap: var(--space-s); }
.site-footer__brand .brand { color: var(--white); align-self: flex-start; }
.site-footer__brand .brand__sub { color: var(--text-on-inverse-subtle); }
.site-footer__seal {
  width: 3rem; height: 3rem;
  background: var(--white);
  border-radius: 50%;
  padding: 2px;
}
.site-footer__contact { font-style: normal; line-height: 1.75; }
.site-footer__contact span { display: block; }
.site-footer__contact .site-footer__label { display: inline; color: var(--white); font-weight: var(--weight-semibold); }

.site-footer__heading {
  color: var(--white);
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: var(--weight-semibold);
  letter-spacing: 0;
  margin-bottom: var(--space-s);
}
.site-footer__links { display: grid; gap: 0.35rem; }
.site-footer__links a { text-decoration: none; display: inline-block; padding-block: 0.15rem; }
.site-footer__links a:hover { text-decoration: underline; }

.footer-news { display: flex; flex-wrap: wrap; gap: var(--space-2xs); margin-top: var(--space-xs); }
.footer-news input {
  flex: 1 1 12rem;
  min-width: 0;
  background: var(--glass-dark);
  border-color: color-mix(in srgb, var(--white) 40%, transparent);
  border-radius: var(--radius-pill);
  padding-inline: 1.1rem;
  color: var(--white);
  box-shadow: none;
}
.footer-news input::placeholder { color: var(--text-on-inverse-subtle); opacity: 1; }
.footer-news input:focus-visible { outline-color: var(--focus-ring-inverse); border-color: var(--white); }

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2xs) var(--space-m);
  padding-block: var(--space-m) calc(var(--space-xl) + 2.5rem); /* room for the demo pill */
  border-top: 1px solid var(--border-inverse);
  color: var(--text-on-inverse-subtle);
  font-size: var(--step--2);
}
.site-footer__base p { max-width: none; }


/* ==========================================================================
   3. Demo role switcher (fixed pill, demo only): quiet ink glass, dashed edge
   ========================================================================== */
.demo-switcher {
  position: fixed;
  left: var(--space-s);
  bottom: var(--space-s);
  z-index: var(--z-demo);
  font-size: var(--step--1);
  max-width: calc(100vw - 2 * var(--space-s));
}
.demo-switcher__toggle {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  padding: 0.4rem 1rem 0.45rem;
  background: var(--glass-dark-strong);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--white);
  border: 1px dashed color-mix(in srgb, var(--white) 45%, transparent);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-2);
  text-align: left;
  line-height: 1.25;
}
.demo-switcher__toggle:hover { background: var(--navy-950); }
.demo-switcher__note {
  font-size: 0.6875rem;
  color: var(--sky-300);           /* >= 5.9:1 on the ink glass */
  font-weight: var(--weight-medium);
  max-width: none;
}
.demo-switcher__current { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: var(--weight-medium); }
.demo-switcher__current strong { color: var(--white); font-weight: var(--weight-bold); }
.demo-switcher__current .nav-link__chev { width: 0.7rem; height: 0.7rem; transform: rotate(180deg); }
.demo-switcher__toggle[aria-expanded="true"] .nav-link__chev { transform: none; }

.demo-switcher__panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.5rem);
  min-width: 15rem;
  padding: var(--space-xs);
  background: var(--surface-raised);
  color: var(--color-text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-3);
}
.demo-switcher__panel :focus-visible { outline-color: var(--focus-ring); }
.demo-switcher__intro { font-size: var(--step--2); color: var(--ink-600); padding: 0.1rem 0.4rem 0.5rem; }
.demo-switcher__list { display: grid; gap: 2px; }
.demo-switcher__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  font-weight: var(--weight-semibold);
  text-align: left;
  color: var(--navy-900);
}
.demo-switcher__option:hover { background: var(--paper); }
.demo-switcher__option[aria-pressed="true"] { background: var(--navy-900); color: var(--white); }
.demo-switcher__option[aria-pressed="true"]::after {
  content: "";
  flex: none;
  width: 1rem; height: 1rem;
  background: var(--sky-300);
  -webkit-mask: var(--art-check) center / contain no-repeat;
  mask: var(--art-check) center / contain no-repeat;
}
.demo-switcher__desc { display: block; font-size: var(--step--2); font-weight: var(--weight-regular); opacity: .85; }


/* ==========================================================================
   4. Buttons: pills
   .btn + one of --primary | --secondary | --ghost | --gold | --on-dark | --danger
   sizes: --sm | --lg, --block; busy: .is-busy (or aria-busy="true")
   --gold is the FEATURE call to action (name kept for compatibility): Chamber
   blue on light surfaces, a light pill on ink, always with a small gold dot.
   On ink surfaces --primary also turns into the light pill and --secondary /
   --ghost turn light, so one markup works on both.
   ========================================================================== */
.btn {
  --btn-bg: var(--navy-800);
  --btn-fg: var(--white);
  --btn-border: var(--btn-bg);
  --btn-bg-hover: var(--navy-950);
  --btn-fg-hover: var(--btn-fg);
  --btn-border-hover: var(--btn-bg-hover);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.875rem;
  padding: 0.65rem 1.4rem;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease-out), color var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.btn:hover { background: var(--btn-bg-hover); border-color: var(--btn-border-hover); color: var(--btn-fg-hover); text-decoration: none; }
.btn:active { box-shadow: var(--shadow-inset); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

.btn--primary { /* default */ }
.btn--secondary {
  --btn-bg: transparent;
  --btn-fg: var(--navy-900);
  --btn-border: var(--navy-800);
  --btn-bg-hover: var(--navy-50);
  --btn-border-hover: var(--navy-800);
}
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--blue-600);
  --btn-border: transparent;
  --btn-bg-hover: var(--blue-50);
  --btn-fg-hover: var(--navy-900);
  --btn-border-hover: transparent;
  padding-inline: 0.9rem;
}
.btn--gold {
  --btn-bg: var(--color-feature);
  --btn-fg: var(--white);              /* 6.2:1 */
  --btn-bg-hover: var(--color-feature-hover);
}
.btn--gold::after { /* the star, reduced to a gold dot */
  content: "";
  flex: none;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 3px var(--glow-gold);
}
.btn--on-dark {
  --btn-bg: transparent;
  --btn-fg: var(--white);
  --btn-border: color-mix(in srgb, var(--white) 55%, transparent);
  --btn-bg-hover: color-mix(in srgb, var(--white) 10%, transparent);
  --btn-border-hover: var(--white);
}
.btn--danger {
  --btn-bg: var(--red-700);
  --btn-bg-hover: var(--red-800);
}

/* Ink surfaces: light filled pill for the main action. */
:is(.page-hero, .cta-band, .surface-ink, .section--ink, .on-dark, .site-footer, .colour-tile, .glass-dark) :is(.btn--primary, .btn--gold) {
  --btn-bg: var(--white);
  --btn-fg: var(--navy-900);               /* 16:1 */
  --btn-border: var(--white);
  --btn-bg-hover: var(--sky-100);
  --btn-border-hover: var(--sky-100);
}
:is(.page-hero, .cta-band, .surface-ink, .section--ink, .on-dark, .site-footer, .colour-tile, .glass-dark) .btn--gold::after {
  box-shadow: 0 0 0 1px var(--gold-800);
}
:is(.page-hero, .cta-band, .surface-ink, .section--ink, .on-dark, .site-footer, .colour-tile, .glass-dark) .btn--secondary {
  --btn-fg: var(--white);
  --btn-border: color-mix(in srgb, var(--white) 55%, transparent);
  --btn-bg-hover: color-mix(in srgb, var(--white) 10%, transparent);
  --btn-border-hover: var(--white);
}
:is(.page-hero, .cta-band, .surface-ink, .section--ink, .on-dark, .site-footer, .colour-tile, .glass-dark) .btn--ghost {
  --btn-fg: var(--text-on-inverse-muted);
  --btn-bg-hover: color-mix(in srgb, var(--white) 10%, transparent);
  --btn-fg-hover: var(--white);
}
/* ...but a light card inside an ink band gets the light-surface buttons back. */
:is(.page-hero, .cta-band, .surface-ink, .section--ink, .on-dark, .site-footer, .colour-tile, .glass-dark) :is(.hero-card, .card, .panel, [data-surface="light"]) .btn--primary {
  --btn-bg: var(--navy-800); --btn-fg: var(--white); --btn-border: var(--navy-800);
  --btn-bg-hover: var(--navy-950); --btn-border-hover: var(--navy-950);
}
:is(.page-hero, .cta-band, .surface-ink, .section--ink, .on-dark, .site-footer, .colour-tile, .glass-dark) :is(.hero-card, .card, .panel, [data-surface="light"]) .btn--gold {
  --btn-bg: var(--color-feature); --btn-fg: var(--white); --btn-border: var(--color-feature);
  --btn-bg-hover: var(--color-feature-hover); --btn-border-hover: var(--color-feature-hover);
}
:is(.page-hero, .cta-band, .surface-ink, .section--ink, .on-dark, .site-footer, .colour-tile, .glass-dark) :is(.hero-card, .card, .panel, [data-surface="light"]) .btn--secondary {
  --btn-fg: var(--navy-900); --btn-border: var(--navy-800); --btn-bg-hover: var(--navy-50); --btn-border-hover: var(--navy-800);
}
:is(.page-hero, .cta-band, .surface-ink, .section--ink, .on-dark, .site-footer, .colour-tile, .glass-dark) :is(.hero-card, .card, .panel, [data-surface="light"]) .btn--ghost {
  --btn-fg: var(--blue-600); --btn-bg-hover: var(--blue-50); --btn-fg-hover: var(--navy-900);
}

.btn--sm { min-height: 2.375rem; padding: 0.45rem 1rem; font-size: var(--step--1); gap: 0.45rem; }
.btn--lg { min-height: 3.375rem; padding: 0.85rem 1.8rem; font-size: 1.0625rem; }
.btn--block { display: flex; width: 100%; }

.btn[aria-disabled="true"] { pointer-events: none; cursor: not-allowed; }
.btn.btn:disabled,
.btn.btn[aria-disabled="true"] {
  --btn-bg: var(--ink-100);
  --btn-fg: var(--ink-600);              /* 6.4:1 */
  --btn-border: var(--ink-200);
  --btn-bg-hover: var(--ink-100);
  --btn-border-hover: var(--ink-200);
  --btn-fg-hover: var(--ink-600);
}
.btn:disabled::after, .btn[aria-disabled="true"]::after { display: none; }

/* Busy: keeps the label readable, adds a spinner, blocks repeat clicks. */
.btn.is-busy,
.btn[aria-busy="true"] {
  pointer-events: none;
  cursor: progress;
}
.btn.is-busy::before,
.btn[aria-busy="true"]::before {
  content: "";
  width: 1em;
  height: 1em;
  flex: none;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: bc-spin 0.7s linear infinite;
}
@keyframes bc-spin { to { transform: rotate(360deg); } }

/* Text-style link button (inline actions inside tables, etc.) */
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--color-link);
  font-weight: var(--weight-semibold);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.link-btn:hover { color: var(--color-link-hover); }

.btn-group { display: flex; flex-wrap: wrap; gap: var(--space-xs); }


/* ==========================================================================
   5. Badges
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.65rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--ink-100);
  color: var(--ink-800);
  font-size: var(--step--2);
  font-weight: var(--weight-semibold);
  line-height: 1.5;
  letter-spacing: 0.01em;
  white-space: nowrap;
  vertical-align: middle;
}
.badge::before { flex: none; }

/* Tier badges. Premier: ink pill with the gold dot (the one place gold marks status). */
.badge--premier {
  background: var(--navy-900);
  color: var(--white);                 /* 16:1 */
  border-color: var(--navy-900);
}
.badge--premier::before {
  content: "";
  width: 0.5em; height: 0.5em;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 2px var(--glow-gold);
}
.badge--standard { background: var(--white); color: var(--navy-800); border-color: var(--navy-200); }

/* Membership status: a leading dot plus text, never colour alone. */
.badge--active::before, .badge--pending::before, .badge--expired::before {
  content: "";
  width: 0.5em; height: 0.5em;
  border-radius: 50%;
  background: currentColor;
}
.badge--active,  .badge--success { background: var(--green-50); color: var(--green-800); border-color: var(--green-300); }
.badge--pending, .badge--warning { background: var(--amber-50); color: var(--amber-800); border-color: var(--amber-300); }
.badge--expired, .badge--danger  { background: var(--red-50); color: var(--red-700); border-color: var(--red-300); }

.badge--cancelled { background: var(--red-50); color: var(--red-700); border-color: var(--red-300); text-decoration: line-through; }
.badge--soldout {
  background: var(--ink-900);
  color: var(--white);
  border-radius: var(--radius-xs);
  letter-spacing: 0.02em;
}
.badge--members {
  background: var(--blue-50);
  color: var(--blue-700);
  border-color: var(--sky-300);
}
.badge--members::before { /* a hollow ring: "member" without the star */
  content: "";
  width: 0.6em; height: 0.6em;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.badge--info { background: var(--blue-50); color: var(--blue-700); border-color: var(--sky-300); }
.badge--neutral { background: var(--surface-raised); color: var(--ink-700); border-color: var(--border-strong); }
.badge--brown { background: var(--brown-50); color: var(--brown-700); border-color: var(--brown-100); }
.badge--lg { font-size: var(--step--1); padding: 0.25rem 0.85rem; }


/* ==========================================================================
   6. Chips (filter chips)
   <button class="chip" aria-pressed="true">Food</button>
   or <label class="chip"><input type="checkbox" class="chip__input"> Food</label>
   ========================================================================== */
.chip-group { display: flex; flex-wrap: wrap; gap: var(--space-2xs); padding: 0; margin: 0; border: 0; }
.chip-group legend { margin-bottom: var(--space-2xs); font-weight: var(--weight-semibold); font-size: var(--step--1); color: var(--ink-800); }

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.375rem;
  padding: 0.35rem 1rem;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  color: var(--ink-800);
  font-size: var(--step--1);
  font-weight: var(--weight-medium);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: background-color var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
}
.chip:hover { border-color: var(--navy-800); color: var(--navy-900); background: var(--navy-50); }
.chip__input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.chip:focus-within { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }
.chip:has(.chip__input:focus:not(:focus-visible)) { outline: none; }

.chip[aria-pressed="true"],
.chip.is-selected,
.chip:has(.chip__input:checked) {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: var(--white);
}
.chip[aria-pressed="true"]::before,
.chip.is-selected::before,
.chip:has(.chip__input:checked)::before {
  content: "";
  width: 0.85rem; height: 0.85rem;
  background: var(--sky-300);          /* 8.6:1 on navy-900 */
  -webkit-mask: var(--art-check) center / contain no-repeat;
  mask: var(--art-check) center / contain no-repeat;
}
.chip__count { font-weight: var(--weight-regular); opacity: .8; }
.chip__remove {
  display: inline-grid;
  place-items: center;
  width: 1.5rem; height: 1.5rem;   /* 24px target (WCAG 2.5.8) */
  margin-right: -0.5rem;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, currentColor 12%, transparent);
  color: inherit;
  font-size: 0.9rem;
  line-height: 1;
}


/* ==========================================================================
   7. Cards: white on paper, hairline edges, no resting shadow
   ========================================================================== */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-m);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 0;
}
.card__title {
  font-family: var(--font-serif);
  font-size: var(--step-2);
  font-weight: var(--weight-regular);
  line-height: 1.18;
  letter-spacing: var(--tracking-tight);
}
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.card__meta { color: var(--color-text-muted); font-size: var(--step--1); }
.card__body { flex: 1; }
.card__footer { margin-top: auto; padding-top: var(--space-xs); display: flex; flex-wrap: wrap; gap: var(--space-2xs); align-items: center; }
.card--flat { box-shadow: none; }
.card--sunken { background: var(--surface-sunken); border-color: transparent; }
.card--accent::before { /* a short brand-gradient rule above the content */
  content: "";
  width: 2.5rem;
  height: 3px;
  border-radius: 3px;
  background: var(--gradient-brand);
}
.card--pad-l { padding: var(--space-l); }

/* Whole card clickable: put .card__link (or .stretched-link) on the title link. */
.card--link { transition: border-color var(--dur-fast), box-shadow var(--dur); }
.card--link:hover { border-color: var(--navy-300); box-shadow: var(--shadow-2); }
.card--link:hover .card__link { text-decoration: underline; text-decoration-thickness: 1px; }
.card__link::after,
.stretched-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card--link:focus-within { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }
.card--link .card__link:focus-visible,
.card--link .stretched-link:focus-visible { outline: none; }

/* --- Logo tile: monogram or placeholder, square ---------------------------- */
.logo-tile {
  --tile-size: 4.5rem;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--tile-size);
  height: var(--tile-size);
  border-radius: calc(var(--tile-size) * 0.22);
  background: var(--tile-bg, var(--navy-900));
  color: var(--tile-fg, var(--white));
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  font-size: calc(var(--tile-size) * 0.34);
  letter-spacing: -0.03em;
  line-height: 1;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--navy-950) 8%, transparent);
  user-select: none;
}
.logo-tile > svg, .logo-tile > img { width: 100%; height: 100%; object-fit: cover; }
svg.logo-tile, svg.logo-tile--placeholder { display: block; background: none; box-shadow: none; border-radius: calc(var(--tile-size) * 0.22); }
.logo-tile--sm { --tile-size: 3rem; }
.logo-tile--lg { --tile-size: 7rem; }
.logo-tile--xl { --tile-size: 9.5rem; }
/* No logo uploaded: quiet paper with a dot grid. */
.logo-tile--placeholder {
  background:
    radial-gradient(circle, var(--navy-200) 0 1px, transparent 1.5px) 0 0 / 8px 8px,
    var(--paper);
  color: var(--ink-600);
  font-size: calc(var(--tile-size) * 0.16);
  font-weight: var(--weight-semibold);
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px var(--border);
}

/* --- Member card (directory, spotlight) ----------------------------------- */
.member-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "logo name" "logo cat" "logo extra";
  grid-template-rows: auto auto 1fr;
  column-gap: var(--space-s);
  row-gap: 0.2rem;
  align-items: start;
  padding: var(--space-s);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--dur-fast), box-shadow var(--dur);
  min-width: 0;
}
.member-card:hover { border-color: var(--navy-300); box-shadow: var(--shadow-2); }
.member-card:focus-within { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }
.member-card__logo { grid-area: logo; }
.member-card__logo .logo-tile { --tile-size: 4rem; }
.member-card__name {
  grid-area: name;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: var(--weight-medium);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--navy-900);
  overflow-wrap: anywhere;
  align-self: end;
}
.member-card__name a { color: inherit; text-decoration: none; }
.member-card__name a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.member-card__name a:focus-visible { outline: none; }
.member-card:hover .member-card__name a { text-decoration: underline; text-decoration-thickness: 1px; }
.member-card__cat { grid-area: cat; color: var(--color-text-muted); font-size: var(--step--1); }
.member-card > .badge,
.member-card__extra { grid-area: extra; justify-self: start; margin-top: 0.4rem; }
/* Vertical variant for the homepage spotlight. */
.member-card--stacked {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "logo" "name" "cat" "extra";
  grid-template-rows: auto;
  justify-items: center;
  text-align: center;
  padding: var(--space-l) var(--space-s) var(--space-m);
}
.member-card--stacked .member-card__logo { margin-bottom: var(--space-xs); }
.member-card--stacked .member-card__logo .logo-tile { --tile-size: 5.5rem; }
.member-card--stacked > .badge, .member-card--stacked .member-card__extra { justify-self: center; }

/* --- Event card: a dated card (big serif day beside a hairline) ------------ */
.event-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  align-content: start;
  gap: 0 var(--space-s);
  padding: var(--space-s);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 0;
}
.event-card > :not(.event-card__date) { grid-column: 2; min-width: 0; }
.event-card__body { display: flex; flex-direction: column; gap: 0.35rem; }
.event-card__body > * { margin: 0; }
.event-card > .event-card__body { margin-top: 0; }
.event-card > * + *:not(.event-card__date) { margin-top: 0.4rem; }
.event-card__date {
  grid-column: 1;
  grid-row: 1 / span 6;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 4rem;
  padding-right: var(--space-xs);
  border-right: 1px solid var(--border);
  line-height: 1;
}
.event-card__month {
  display: block;
  color: var(--blue-700);
  font-size: var(--step--2);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
}
.event-card__day {
  display: block;
  margin-top: 0.3rem;
  color: var(--navy-900);
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: var(--weight-light);
  letter-spacing: -0.03em;
  font-variant-numeric: lining-nums;
}
.event-card__title {
  font-family: var(--font-serif);
  font-size: var(--step-2);
  font-weight: var(--weight-regular);
  line-height: 1.18;
  letter-spacing: var(--tracking-tight);
  color: var(--navy-900);
}
.event-card__title a { color: inherit; text-decoration: none; }
.event-card__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.event-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.9rem;
  color: var(--color-text-muted);
  font-size: var(--step--1);
  max-width: none;
}
.event-card__meta > * { display: inline-flex; align-items: center; gap: 0.3rem; }
.event-card__meta svg { width: 1em; height: 1em; flex: none; }
.event-card__action, .event-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-s); margin-top: var(--space-xs) !important; }
.event-card--past { background: var(--surface-sunken); border-color: transparent; }
.event-card--past .event-card__month { color: var(--ink-600); }
.event-card--past .event-card__day { color: var(--ink-600); }
.event-card--cancelled .event-card__title { text-decoration: line-through; text-decoration-thickness: 1.5px; }
@media (min-width: 40em) {
  .event-card { padding: var(--space-m); column-gap: var(--space-m); }
  .event-card__date { width: 5rem; }
  .event-card__day { font-size: 3rem; }
}

/* --- Resource card -------------------------------------------------------- */
.resource-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.25rem var(--space-s);
  align-content: start;
  padding: var(--space-m);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 0;
  transition: border-color var(--dur-fast), box-shadow var(--dur);
}
.resource-card > :not(.resource-card__icon) { grid-column: 2; }
.resource-card__icon {
  grid-row: 1 / span 5;
  display: grid;
  place-items: center;
  width: 2.75rem; height: 2.75rem;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: var(--step--2);
  font-weight: var(--weight-bold);
  box-shadow: inset 0 0 0 1px var(--blue-100);
}
.resource-card__icon svg { width: 1.3rem; height: 1.3rem; }
.resource-card--pdf .resource-card__icon { background: var(--brown-50); color: var(--brown-700); box-shadow: inset 0 0 0 1px var(--brown-100); }
.resource-card__cat { font-size: var(--step--2); font-weight: var(--weight-semibold); color: var(--green-700); }
.resource-card__title {
  font-family: var(--font-serif);
  font-size: var(--step-1);
  font-weight: var(--weight-medium);
  line-height: 1.22;
  color: var(--navy-900);
}
.resource-card__title a { color: inherit; text-decoration: none; }
.resource-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.resource-card__title a:focus-visible { outline: none; }
.resource-card:focus-within { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }
.resource-card:hover { border-color: var(--navy-300); box-shadow: var(--shadow-2); }
.resource-card:hover .resource-card__title a { text-decoration: underline; text-decoration-thickness: 1px; }
.resource-card__desc { color: var(--ink-700); font-size: var(--step--1); }
.resource-card__link { font-size: var(--step--1); font-weight: var(--weight-semibold); color: var(--blue-600); margin-top: 0.25rem; }

/* --- News card ------------------------------------------------------------ */
.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-width: 0;
  transition: border-color var(--dur-fast), box-shadow var(--dur);
}
.news-card__art { aspect-ratio: 16 / 9; border-radius: 0; }
.news-card__body { display: flex; flex-direction: column; gap: 0.45rem; padding: var(--space-m); flex: 1; }
.news-card__cat { font-size: var(--step--2); font-weight: var(--weight-semibold); color: var(--green-700); }
.news-card__title {
  font-family: var(--font-serif);
  font-size: var(--step-2);
  font-weight: var(--weight-regular);
  line-height: 1.18;
  letter-spacing: var(--tracking-tight);
  color: var(--navy-900);
}
.news-card__title a { color: inherit; text-decoration: none; }
.news-card__title a::after { content: ""; position: absolute; inset: 0; }
.news-card__title a:focus-visible { outline: none; }
.news-card:focus-within { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }
.news-card:hover { border-color: var(--navy-300); box-shadow: var(--shadow-2); }
.news-card:hover .news-card__title a { text-decoration: underline; text-decoration-thickness: 1px; }
.news-card__date { font-size: var(--step--1); color: var(--color-text-muted); }
.news-card__excerpt { font-size: var(--step--1); line-height: 1.6; color: var(--ink-700); }

/* --- Person card (board, team members) ----------------------------------- */
.person-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: var(--space-m);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 0;
}
.person-card__photo { margin-bottom: var(--space-xs); }
.person-card__name {
  font-family: var(--font-serif);
  font-size: var(--step-2);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tight);
  color: var(--navy-900);
}
.person-card__title { font-size: var(--step--1); font-weight: var(--weight-semibold); color: var(--brown-700); }
.person-card__bio { font-size: var(--step--1); color: var(--ink-700); line-height: 1.6; }
.person-card--center { align-items: center; text-align: center; }

/* --- Avatar (initials, used when photo is null) ------------------------- */
.avatar {
  --avatar-size: 4.5rem;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 50%;
  background: var(--navy-50);
  color: var(--navy-900);
  font-family: var(--font-serif);
  font-weight: var(--weight-medium);
  font-size: calc(var(--avatar-size) * 0.36);
  letter-spacing: -0.02em;
  box-shadow: inset 0 0 0 1px var(--navy-200);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { --avatar-size: 2.5rem; }
.avatar--lg { --avatar-size: 6.5rem; }

/* --- Tone art: abstract thumbnails (gallery, news art). No scenery: a tinted
   gradient, a stipple dot-field and faint contour lines. Class names map from
   data (core.js / profile.js): sky, field, mountain, gold, navy. -------- */
.tone-sky, .tone-field, .tone-mountain, .tone-gold, .tone-navy, .tone-art {
  --tone-a: var(--blue-600);
  --tone-b: var(--navy-800);
  --tone-glow: var(--glow-sky);
  --tone-dot: color-mix(in srgb, var(--sky-300) 60%, transparent);
  --tone-line: color-mix(in srgb, var(--white) 14%, transparent);
  position: relative;
  isolation: isolate;
  display: block;
  min-height: 6rem;
  border-radius: inherit;
  overflow: hidden;
  background:
    radial-gradient(110% 90% at 88% 8%, var(--tone-glow) 0%, transparent 60%),
    linear-gradient(155deg, var(--tone-a), var(--tone-b));
}
.tone-sky::before, .tone-field::before, .tone-mountain::before, .tone-gold::before, .tone-navy::before, .tone-art::before,
.tone-sky::after, .tone-field::after, .tone-mountain::after, .tone-gold::after, .tone-navy::after, .tone-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.tone-sky::before, .tone-field::before, .tone-mountain::before, .tone-gold::before, .tone-navy::before, .tone-art::before {
  background-color: var(--tone-dot);
  -webkit-mask: var(--art-stipple) 0 0 / 110px repeat, radial-gradient(80% 100% at 85% 15%, black 0%, transparent 75%);
  -webkit-mask-composite: source-in;
  mask: var(--art-stipple) 0 0 / 110px repeat, radial-gradient(80% 100% at 85% 15%, black 0%, transparent 75%);
  mask-composite: intersect;
}
.tone-sky::after, .tone-field::after, .tone-mountain::after, .tone-gold::after, .tone-navy::after, .tone-art::after {
  background-color: var(--tone-line);
  -webkit-mask: var(--art-contours) 0 40% / 640px auto repeat;
  mask: var(--art-contours) 0 40% / 640px auto repeat;
}
.tone-sky { /* defaults: Chamber blue */ }
.tone-field {
  --tone-a: var(--green-700);
  --tone-b: var(--green-900);
  --tone-glow: var(--glow-sky);
  --tone-dot: color-mix(in srgb, var(--green-300) 55%, transparent);
}
.tone-mountain {
  --tone-a: var(--brown-700);
  --tone-b: var(--brown-800);
  --tone-glow: var(--glow-gold);
  --tone-dot: color-mix(in srgb, var(--brown-100) 45%, transparent);
}
.tone-gold {
  --tone-a: var(--navy-900);
  --tone-b: var(--navy-975);
  --tone-glow: var(--glow-gold);
  --tone-dot: color-mix(in srgb, var(--gold-300) 55%, transparent);
}
.tone-navy {
  --tone-a: var(--navy-800);
  --tone-b: var(--navy-975);
  --tone-glow: var(--glow-blue);
  --tone-dot: color-mix(in srgb, var(--sky-300) 45%, transparent);
}


/* ==========================================================================
   8. Page hero / banner (ink, glow, stipple, contour) + contour divider
   <section class="page-hero"> <div class="container page-hero__inner"> … </div> </section>
   Home (--home): the canvas host [data-hero-field] sits first (motion-spec §9.2);
   with no canvas it is ink + glow + CSS stipple and looks complete.
   Inner: layout.js injects svg.page-hero__contour + div.page-hero__texture.
   ========================================================================== */
.page-hero {
  --hero-pad-top: clamp(2.75rem, 2rem + 3.5vw, 5rem);
  /* Canvas colours for the home connection field (read by motion.js, §5.1.2). */
  --field-sky: var(--sky-300);
  --field-blue: var(--blue-500);
  --field-navy: var(--navy-300);
  --field-green: var(--green-500);
  --field-paper: var(--navy-50);
  --field-gold: var(--gold-500);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--text-on-inverse);
  background:
    radial-gradient(55% 75% at 86% 18%, var(--glow-blue) 0%, transparent 70%),
    radial-gradient(42% 60% at 4% 108%, var(--glow-green) 0%, transparent 70%),
    var(--gradient-ink);
  padding-top: var(--hero-pad-top);
  padding-bottom: clamp(3rem, 2rem + 4vw, 5.5rem);
}
/* The first banner on a page slides up under the floating header. */
main > .page-hero:first-child {
  margin-top: calc(var(--header-space) * -1);
  padding-top: calc(var(--header-space) + var(--hero-pad-top));
}
/* CSS stipple when no texture layer exists (home, and inner pages without JS). */
.page-hero:not(:has(.page-hero__texture))::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--stipple-on-ink);
  -webkit-mask: var(--art-stipple) 0 0 / 140px repeat, radial-gradient(55% 80% at 82% 28%, black 0%, transparent 72%);
  -webkit-mask-composite: source-in;
  mask: var(--art-stipple) 0 0 / 140px repeat, radial-gradient(55% 80% at 82% 28%, black 0%, transparent 72%);
  mask-composite: intersect;
}
.page-hero__texture { z-index: -1; inset: 0; }
.page-hero__contour {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: clamp(7rem, 16vw, 15rem);
  pointer-events: none;
}
/* Hairlines may cross the lede/meta: kept faint so muted text over a line stays >= 6:1. */
.page-hero__contour path {
  fill: none;
  stroke: color-mix(in srgb, var(--sky-300) 30%, transparent);
  stroke-width: 1.25;
  stroke-linecap: round;
}
.page-hero__contour path:first-child { stroke: color-mix(in srgb, var(--sky-500) 45%, transparent); }
.page-hero__contour path:last-child { stroke: color-mix(in srgb, var(--green-500) 40%, transparent); }

/* Home canvas host: covers the hero, under the text. */
.hero-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-field canvas { display: block; width: 100%; height: 100%; }

.page-hero__inner { position: relative; z-index: 1; display: flex; flex-direction: column; gap: var(--space-s); }
.page-hero__title {
  color: var(--white);
  font-family: var(--font-display);
  font-size: var(--step-5);
  font-weight: var(--weight-display);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  max-width: 18ch;
}
.page-hero__lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--text-on-inverse-muted);
  max-width: 48ch;
}
.page-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-xs); }
.page-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-s); color: var(--text-on-inverse-muted); font-weight: var(--weight-medium); }
.page-hero a:not(.btn) { color: var(--white); }
.page-hero a:not(.btn):hover { color: var(--sky-300); }

/* Home: the largest display type on the site. */
.page-hero--home {
  --hero-pad-top: clamp(3.5rem, 1.5rem + 7vw, 8.5rem);
  padding-bottom: clamp(4rem, 2rem + 7vw, 8.5rem);
}
.page-hero--home .page-hero__title { font-size: var(--step-6); max-width: 14ch; }
.page-hero--home .page-hero__lede { max-width: 44ch; }
/* Compact: utility pages (login, forms, 404). */
.page-hero--compact {
  --hero-pad-top: clamp(2rem, 1.5rem + 2vw, 3.25rem);
  padding-bottom: clamp(2.25rem, 1.75rem + 2vw, 3.5rem);
}
.page-hero--compact .page-hero__title { font-size: var(--step-4); }
.page-hero--compact .page-hero__contour { height: clamp(5rem, 10vw, 8rem); }
/* Inside a hero with a sidebar card (event detail). */
@media (min-width: 62em) {
  .page-hero__split { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: var(--space-xl); align-items: end; }
}

/* Contour divider: three hairline field lines between sections.
   <div class="ridge-divider" aria-hidden="true"></div>; layout.js fills it with
   <svg class="ridge-divider__svg"> and three .ridge-divider__path strokes.
   Colour: .ridge-divider (navy hairline), --navy, --sky, --white, or set --ridge-color. */
.ridge-divider {
  display: block;
  height: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--ridge-color, var(--navy-300));
  margin-block: var(--space-m);
  overflow: hidden;
}
.ridge-divider__svg { display: block; width: 100%; height: 100%; }
.ridge-divider__path { fill: none; stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .8; }
.ridge-divider--navy { --ridge-color: var(--navy-800); }
.ridge-divider--sky { --ridge-color: var(--sky-500); }
.ridge-divider--white { --ridge-color: var(--white); }

/* The seal's star, reduced to a small gold dot accent. Use sparingly. */
.star {
  display: inline-block;
  width: 0.5em; height: 0.5em;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 0.18em var(--glow-gold);
  vertical-align: 0.12em;
}


/* ==========================================================================
   9. Section header
   ========================================================================== */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-s) var(--space-l);
  margin-bottom: var(--space-xl);
}
.section-head__text { display: flex; flex-direction: column; gap: var(--space-xs); max-width: 46rem; }
.section-head__title {
  font-size: var(--step-4);
  font-weight: var(--weight-display);
  line-height: 1.05;
  letter-spacing: var(--tracking-display);
}
.section-head__lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-700); max-width: 54ch; }
.section-head__action { font-weight: var(--weight-semibold); white-space: nowrap; text-underline-offset: 0.3em; }
.section-head--center { justify-content: center; text-align: center; }
.section-head--center .section-head__text { align-items: center; }
.section-head--sm .section-head__title { font-size: var(--step-3); }


/* ==========================================================================
   10. Stats bar (serif numbers, small sans captions, gradient underline)
   <dl class="stats-bar"><div class="stat"><dt class="stat__label">…</dt><dd class="stat__value">…</dd></div>…</dl>
   For the home page prefer .stat-prose (section 27).
   ========================================================================== */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (min-width: 48em) { .stats-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat {
  display: flex;
  flex-direction: column-reverse; /* value reads first visually, label first in DOM order (dt/dd) */
  justify-content: flex-end;
  align-items: center;
  gap: 0.6rem;
  padding: var(--space-m) var(--space-s);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.stat:nth-child(2n) { border-right: 0; }
.stat:nth-last-child(-n + 2) { border-bottom: 0; }
@media (min-width: 48em) {
  .stat { border-bottom: 0; border-right: 1px solid var(--border); padding: var(--space-l) var(--space-m); }
  .stat:nth-child(2n) { border-right: 1px solid var(--border); }
  .stat:last-child { border-right: 0; }
}
.stat__value {
  margin: 0;
  padding-bottom: 0.12em;
  color: var(--navy-900);
  font-family: var(--font-serif);
  font-size: var(--step-5);
  font-weight: var(--weight-light);
  line-height: 1;
  letter-spacing: var(--tracking-display);
  font-variant-numeric: lining-nums;
  background: var(--gradient-brand) left bottom / 100% 2px no-repeat;
  max-width: none;
}
.stat__label { color: var(--ink-600); font-size: var(--step--1); font-weight: var(--weight-medium); }
/* v1 overlap over the hero is retired (motion-spec v2); kept as a harmless spacing hook. */
.stats-bar--overlap { position: relative; z-index: 2; margin-top: var(--space-l); }


/* ==========================================================================
   11. CTA band: ink panel with a stipple glow and contour lines
   ========================================================================== */
.cta-band {
  position: relative;
  display: grid;
  gap: var(--space-m);
  padding: clamp(2rem, 1.5rem + 3vw, 4.5rem);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(60% 100% at 100% 0%, var(--glow-blue) 0%, transparent 70%),
    radial-gradient(40% 70% at 0% 100%, var(--glow-green) 0%, transparent 70%),
    var(--gradient-ink);
  color: var(--text-on-inverse-muted);
  overflow: hidden;
  isolation: isolate;
}
.cta-band:not(:has(> .stipple))::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--stipple-on-ink);
  -webkit-mask: var(--art-stipple) 0 0 / 140px repeat, radial-gradient(50% 90% at 95% 10%, black 0%, transparent 75%);
  -webkit-mask-composite: source-in;
  mask: var(--art-stipple) 0 0 / 140px repeat, radial-gradient(50% 90% at 95% 10%, black 0%, transparent 75%);
  mask-composite: intersect;
}
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--contour-on-ink);
  -webkit-mask: var(--art-contours) 0 70% / 960px auto repeat;
  mask: var(--art-contours) 0 70% / 960px auto repeat;
}
.cta-band > :not(.stipple) { position: relative; }
@media (min-width: 52em) { .cta-band { grid-template-columns: minmax(0, 1.4fr) auto; align-items: center; } }
.cta-band__title {
  color: var(--white);
  font-size: var(--step-4);
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-display);
  line-height: 1.05;
  max-width: 18ch;
}
.cta-band__body { font-size: var(--step-1); line-height: 1.5; margin-top: var(--space-s); max-width: 48ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.cta-band a:not(.btn) { color: var(--white); }
.cta-band--field {
  background:
    radial-gradient(60% 100% at 100% 0%, var(--glow-sky) 0%, transparent 70%),
    linear-gradient(155deg, var(--green-800), var(--green-900));
  color: var(--text-on-inverse-muted); /* 6.2:1 on green-800 */
}


/* ==========================================================================
   12. Forms
   ========================================================================== */
.form { display: flex; flex-direction: column; gap: var(--space-m); }
.form-grid { display: grid; gap: var(--space-m); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40em) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid > .span-2, .form-grid > .field--full { grid-column: 1 / -1; }
}

.field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.field__label, .label {
  font-weight: var(--weight-semibold);
  font-size: var(--step--1);
  color: var(--ink-900);
}
.field__req { color: var(--red-700); font-weight: var(--weight-bold); margin-left: 0.15rem; text-decoration: none; }
.field__optional { color: var(--ink-600); font-weight: var(--weight-regular); margin-left: 0.25rem; }
.field__hint, .help-text { font-size: var(--step--1); color: var(--ink-600); line-height: 1.45; }
.field__error, .error-text, .field-error {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  font-size: var(--step--1);
  font-weight: var(--weight-semibold);
  color: var(--red-700);
  line-height: 1.4;
}
.field__error::before, .error-text::before, .field-error::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.05rem; height: 1.05rem;
  margin-top: 0.1rem;
  border-radius: 50%;
  background: var(--red-700);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: var(--weight-bold);
}
.field__error:empty, .error-text:empty, .field-error:empty { display: none; }

/* Text-like controls. Zero-specificity so classes and page CSS win easily. */
.input, .select, .textarea,
:where(input:not([type="checkbox"], [type="radio"], [type="file"], [type="range"], [type="submit"], [type="button"], [type="reset"], [type="color"], [type="hidden"], [type="image"])),
:where(select),
:where(textarea) {
  display: block;
  width: 100%;
  min-height: 2.875rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--color-text);
  font-size: var(--step-0);
  line-height: 1.4;
  box-shadow: var(--shadow-inset);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.textarea, :where(textarea) { min-height: 8rem; resize: vertical; line-height: var(--leading-normal); }
.select, :where(select) {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  background: var(--surface-raised) var(--art-select) right 0.9rem center / 1rem no-repeat;
}
:where(select[multiple]) { background-image: none; padding-right: 0.9rem; }
.input:hover, .select:hover, .textarea:hover,
:where(input, select, textarea):hover { border-color: var(--ink-700); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible,
:where(input, select, textarea):focus-visible {
  outline: var(--focus-width) solid var(--focus-ring);
  outline-offset: 1px;
  border-color: var(--navy-800);
}
::placeholder { color: var(--ink-600); opacity: 1; }
:where(input, select, textarea):disabled, .input:disabled {
  background-color: var(--ink-100);
  color: var(--ink-600);
  cursor: not-allowed;
}
:where(input, textarea)[readonly] { background-color: var(--surface-sunken); }

/* Invalid state (set by BC.form) */
[aria-invalid="true"],
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] {
  border-color: var(--red-700) !important;
  border-width: 2px;
  background-color: var(--red-50);
}
[aria-invalid="true"]:focus-visible { outline-color: var(--red-700); }

/* Input with prefix/suffix ($, @, units) */
.input-group { display: flex; align-items: stretch; }
.input-group__addon {
  display: inline-flex;
  align-items: center;
  padding: 0 0.85rem;
  border: 1px solid var(--border-input);
  background: var(--surface-sunken);
  color: var(--ink-700);
  font-weight: var(--weight-semibold);
}
.input-group__addon:first-child { border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group__addon:last-child { border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-group > input:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > input:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }

/* Fieldset */
.fieldset { display: flex; flex-direction: column; gap: var(--space-s); padding: var(--space-m); border: 1px solid var(--border); border-radius: var(--radius-md); }
.fieldset > legend, .fieldset__legend {
  padding: 0 0.5rem;
  margin-left: -0.5rem;
  font-family: var(--font-serif);
  font-weight: var(--weight-medium);
  color: var(--navy-900);
  font-size: var(--step-1);
}

/* Checkbox & radio: native controls, brand-coloured */
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: var(--step-0);
  line-height: 1.45;
  cursor: pointer;
}
.check input { flex: none; width: 1.2rem; height: 1.2rem; margin: 0.15rem 0 0; accent-color: var(--navy-800); cursor: pointer; }
.check-list { display: flex; flex-direction: column; gap: var(--space-xs); }
.check-list--inline { flex-direction: row; flex-wrap: wrap; gap: var(--space-xs) var(--space-m); }
:where(input[type="checkbox"], input[type="radio"]) { accent-color: var(--navy-800); }

/* Switch: <label class="switch"><input type="checkbox" role="switch" class="switch__input"><span class="switch__track" aria-hidden="true"></span><span class="switch__label">…</span></label> */
.switch { position: relative; display: inline-flex; align-items: center; gap: 0.75rem; cursor: pointer; }
.switch__input { position: absolute; opacity: 0; width: 2.75rem; height: 1.6rem; margin: 0; cursor: pointer; }
.switch__track {
  position: relative;
  flex: none;
  width: 2.75rem;
  height: 1.6rem;
  border-radius: var(--radius-pill);
  background: var(--ink-400);
  border: 1px solid var(--ink-500);
  transition: background-color var(--dur) var(--ease-out);
}
.switch__track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: calc(1.6rem - 6px); height: calc(1.6rem - 6px);
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-1);
  transition: transform var(--dur) var(--ease-out);
}
.switch__input:checked + .switch__track { background: var(--green-700); border-color: var(--green-800); }
.switch__input:checked + .switch__track::after { transform: translateX(1.15rem); }
.switch__input:focus-visible + .switch__track { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }
.switch__input:disabled + .switch__track { opacity: .5; }
.switch__label { font-weight: var(--weight-semibold); }
.switch__state { font-size: var(--step--1); color: var(--ink-600); }

/* File drop zone (BC.upload adds .is-dragover while dragging) */
.dropzone, .file-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: var(--space-l) var(--space-m);
  border: 1px dashed var(--border-input);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  text-align: center;
  transition: border-color var(--dur-fast), background-color var(--dur-fast);
}
.dropzone:hover, .file-drop:hover { border-color: var(--navy-800); background: var(--sky-50); }
.dropzone__input, .file-drop > input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone:focus-within, .file-drop:focus-within { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); border-color: var(--navy-800); }
.dropzone.is-dragover, .dropzone.is-dragging, .dropzone.dragover, .file-drop.is-dragover {
  border-color: var(--green-700);
  border-style: solid;
  background: var(--green-50);
}
.dropzone__icon { width: 2.25rem; height: 2.25rem; color: var(--navy-800); }
.dropzone__label { font-size: var(--step-0); color: var(--ink-800); }
.dropzone__label strong { color: var(--blue-600); text-decoration: underline; }
.dropzone__hint { display: block; font-size: var(--step--1); color: var(--ink-600); }
.dropzone__preview { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2xs); position: relative; z-index: 1; }
.dropzone__preview:empty { display: none; }
.dropzone__preview img { width: 6rem; height: 6rem; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--white); }
.dropzone[aria-invalid="true"], .dropzone.is-invalid { border-color: var(--red-700); background: var(--red-50); }
.file-drop__msg { position: relative; z-index: 1; justify-content: center; }
.file-drop__preview-item { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; margin: 0; font-size: var(--step--2); color: var(--ink-700); }
.file-drop__preview-item img { width: 6rem; height: 6rem; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--white); }

/* Character / word counter (BC.form data-char-counter) */
.char-counter {
  align-self: flex-end;
  font-size: var(--step--2);
  font-weight: var(--weight-semibold);
  color: var(--ink-600);
  font-variant-numeric: tabular-nums;
}
.char-counter.is-over, .char-counter.is-invalid, .char-counter[data-state="over"] { color: var(--red-700); }
.char-counter.is-under, .char-counter[data-state="under"] { color: var(--amber-800); }
.char-counter.is-ok, .char-counter[data-state="ok"] { color: var(--green-700); }

/* Error summary (top of form after a failed submit) */
.error-summary {
  padding: var(--space-m);
  border: 1px solid var(--red-300);
  border-left: 4px solid var(--red-700);
  border-radius: var(--radius-sm);
  background: var(--red-50);
  color: var(--ink-900);
}
.error-summary:focus { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }
.error-summary__title { font-family: var(--font-sans); font-size: var(--step-1); font-weight: var(--weight-semibold); color: var(--red-800); margin-bottom: var(--space-2xs); }
.error-summary ul { margin: 0; padding-left: 1.2rem; list-style: disc; }
.error-summary li + li { margin-top: 0.25rem; }
.error-summary a { color: var(--red-800); font-weight: var(--weight-semibold); }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-s); padding-top: var(--space-xs); }


/* ==========================================================================
   13. Multi-step progress indicator (dotted connectors)
   <ol class="steps" data-step-indicator><li class="is-done">Business</li><li aria-current="step">Contact</li><li>Review</li></ol>
   Numbers come from a CSS counter; done items show a check.
   ========================================================================== */
[data-step-indicator], .steps {
  display: flex;
  counter-reset: bc-step;
  margin: 0 0 var(--space-l);
  padding: 0;
  list-style: none;
}
[data-step-indicator] > li {
  counter-increment: bc-step;
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  max-width: none;
  color: var(--ink-600);
  font-size: var(--step--2);
  font-weight: var(--weight-medium);
  text-align: center;
  line-height: 1.25;
}
[data-step-indicator] > li::before {
  content: counter(bc-step);
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.25rem; height: 2.25rem;
  border: 1px solid var(--ink-500);
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--ink-700);
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: var(--weight-medium);
}
/* dotted connector */
[data-step-indicator] > li + li::after {
  content: "";
  position: absolute;
  top: 1.0625rem;
  right: calc(50% + 1.375rem);
  width: calc(100% - 2.75rem);
  height: 2px;
  background: radial-gradient(circle, var(--ink-400) 1px, transparent 1.4px) left center / 7px 2px repeat-x;
}
[data-step-indicator] > li[aria-current="step"] { color: var(--navy-900); font-weight: var(--weight-semibold); }
[data-step-indicator] > li[aria-current="step"]::before {
  border-color: var(--navy-900);
  background: var(--navy-900);
  color: var(--white);
  box-shadow: 0 0 0 4px var(--navy-100);
}
[data-step-indicator] > li.is-done,
[data-step-indicator] > li[data-done],
[data-step-indicator] > li[data-state="done"] { color: var(--green-800); }
[data-step-indicator] > li.is-done::before,
[data-step-indicator] > li[data-done]::before,
[data-step-indicator] > li[data-state="done"]::before {
  content: "";
  border-color: var(--green-700);
  background-color: var(--green-700);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center;
  background-size: 1rem;
  background-repeat: no-repeat;
}
[data-step-indicator] > li.is-done + li::after,
[data-step-indicator] > li[data-done] + li::after,
[data-step-indicator] > li[data-state="done"] + li::after {
  background: radial-gradient(circle, var(--green-700) 1px, transparent 1.4px) left center / 7px 2px repeat-x;
}
@media (min-width: 40em) {
  [data-step-indicator] > li { font-size: var(--step--1); }
}
.step-panel:focus { outline: none; }


/* ==========================================================================
   14. Tabs (ARIA): wrapper .tabs is optional; styles key off roles.
   ========================================================================== */
[role="tablist"] {
  display: flex;
  gap: 0.25rem;
  margin-bottom: var(--space-l);
  border-bottom: 1px solid var(--border-strong);
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
[role="tab"] {
  position: relative;
  flex: none;
  padding: 0.75rem 1rem;
  border: 0;
  background: none;
  color: var(--ink-700);
  font-size: var(--step-0);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  text-decoration: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
[role="tab"]:hover { color: var(--navy-900); background: var(--paper); }
[role="tab"][aria-selected="true"] { color: var(--navy-900); font-weight: var(--weight-semibold); }
[role="tab"][aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0.75rem; right: 0.75rem; bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--navy-900);
}
[role="tab"]:focus-visible { outline-offset: -3px; }
[role="tabpanel"]:focus-visible { outline-offset: 6px; }
.tab-count { display: inline-block; margin-left: 0.35rem; padding: 0 0.45rem; border-radius: var(--radius-pill); background: var(--ink-100); font-size: var(--step--2); }


/* ==========================================================================
   15. Tables (wrap in .table-wrap for horizontal scroll on small screens)
   ========================================================================== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  -webkit-overflow-scrolling: touch;
}
.table-wrap:focus-visible { outline-offset: 2px; }
.table { width: 100%; font-size: var(--step--1); text-align: left; }
.table caption { padding: var(--space-s); text-align: left; font-weight: var(--weight-semibold); color: var(--navy-900); caption-side: top; }
.table th, .table td { padding: 0.8rem var(--space-s); border-bottom: 1px solid var(--border); vertical-align: top; }
.table thead th {
  background: var(--paper);
  color: var(--ink-700);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
  border-bottom: 1px solid var(--border-strong);
}
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody tr:hover { background: var(--ink-50); }
.table .num, .table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table--compact th, .table--compact td { padding: 0.5rem 0.75rem; }
/* Stacked on narrow screens: give each td a data-label="Column". */
@media (max-width: 39.99em) {
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table--stack tr { display: block; padding: var(--space-xs) 0; border-bottom: 1px solid var(--border); }
  .table--stack td { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--space-xs); border: 0; padding: 0.3rem var(--space-s); text-align: left !important; }
  .table--stack td::before { content: attr(data-label); font-weight: var(--weight-semibold); color: var(--ink-700); }
}


/* ==========================================================================
   16. Pagination: <nav aria-label="Pagination"> rendered by BC.pagination
   ========================================================================== */
nav[aria-label="Pagination"], .pagination {
  display: flex;
  justify-content: center;
  margin-top: var(--space-xl);
}
nav[aria-label="Pagination"] ul, nav[aria-label="Pagination"] ol, .pagination__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
nav[aria-label="Pagination"] { gap: 0.35rem; flex-wrap: wrap; }
nav[aria-label="Pagination"] :is(button, a) {
  display: inline-grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  color: var(--navy-900);
  font-size: var(--step--1);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
nav[aria-label="Pagination"] :is(button, a):hover { border-color: var(--navy-800); background: var(--navy-50); }
nav[aria-label="Pagination"] [aria-current="page"] {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: var(--white);
}
nav[aria-label="Pagination"] :is(button, a):disabled,
nav[aria-label="Pagination"] [aria-disabled="true"] {
  background: var(--ink-50);
  color: var(--ink-500);
  border-color: var(--border);
  pointer-events: none;
}
nav[aria-label="Pagination"] .pagination__gap, nav[aria-label="Pagination"] .ellipsis, .pagination__ellipsis { padding: 0 0.25rem; color: var(--ink-600); }
.pagination__status { width: 100%; text-align: center; margin-top: var(--space-2xs); font-size: var(--step--1); color: var(--ink-600); }


/* ==========================================================================
   17. Alerts, notices, toast
   ========================================================================== */
.alert {
  --alert-fg: var(--color-info);
  --alert-bg: var(--color-info-bg);
  --alert-border: var(--color-info-border);
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.25rem var(--space-xs);
  padding: var(--space-s) var(--space-m) var(--space-s) var(--space-s);
  border: 1px solid var(--alert-border);
  border-left: 3px solid var(--alert-fg);
  border-radius: var(--radius-sm);
  background: var(--alert-bg);
  color: var(--ink-900);
  font-size: var(--step--1);
}
.alert::before {
  content: "i";
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  width: 1.4rem; height: 1.4rem;
  margin-top: 0.05rem;
  border-radius: 50%;
  background: var(--alert-fg);
  color: var(--white);
  font-weight: var(--weight-bold);
  font-size: var(--step--1);
  font-family: var(--font-serif);
  font-style: italic;
}
.alert > * { grid-column: 2; }
.alert__title { font-family: var(--font-sans); font-size: var(--step-0); font-weight: var(--weight-semibold); color: var(--alert-fg); }
.alert p { max-width: 70ch; }
.alert--success { --alert-fg: var(--color-success); --alert-bg: var(--color-success-bg); --alert-border: var(--color-success-border); }
.alert--success::before { content: "\2713"; font-family: var(--font-sans); font-style: normal; }
.alert--warning { --alert-fg: var(--color-warning); --alert-bg: var(--color-warning-bg); --alert-border: var(--color-warning-border); }
.alert--warning::before { content: "!"; font-family: var(--font-sans); font-style: normal; }
.alert--danger, .alert--error { --alert-fg: var(--color-danger); --alert-bg: var(--color-danger-bg); --alert-border: var(--color-danger-border); }
.alert--danger::before, .alert--error::before { content: "!"; font-family: var(--font-sans); font-style: normal; }
.alert__close {
  position: absolute;
  top: 0.4rem; right: 0.4rem;
  width: 2rem; height: 2rem;
  border: 0; border-radius: 50%;
  background: none;
  color: var(--ink-700);
  font-size: 1.25rem;
  line-height: 1;
}
.alert__close:hover { background: color-mix(in srgb, var(--navy-900) 7%, transparent); }

/* Demo simulation notice: marks behaviour that a real server would do.
   Quiet: dashed hairline, faint hatch on paper, ink tag. */
.notice--demo {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  padding: 0.7rem var(--space-s);
  border: 1px dashed var(--navy-300);
  border-radius: var(--radius-sm);
  background:
    repeating-linear-gradient(-45deg, transparent 0 9px, color-mix(in srgb, var(--navy-800) 4%, transparent) 9px 10px),
    var(--paper);
  color: var(--ink-800);
  font-size: var(--step--1);
}
.notice__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--navy-900);
  color: var(--white);
  font-size: var(--step--2);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}
.notice--demo p { margin: 0; flex: 1 1 16rem; }

/* Toast. Container .toast-region (created by BC.toast or layout.js fallback). */
.toast-region, .toast-container, .toast-stack, [data-toast-region] {
  position: fixed;
  right: var(--space-s);
  left: var(--space-s);
  bottom: calc(var(--space-s) + 4.25rem); /* clears the demo pill on mobile */
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xs);
  pointer-events: none;
}
@media (min-width: 40em) {
  .toast-region, .toast-container, .toast-stack, [data-toast-region] { left: auto; bottom: var(--space-m); right: var(--space-m); align-items: flex-end; }
}
body > .toast { position: fixed; right: var(--space-m); bottom: calc(var(--space-m) + 4.25rem); z-index: var(--z-toast); }
.toast {
  --toast-accent: var(--sky-500);
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  width: min(26rem, 100%);
  padding: 0.85rem var(--space-s);
  border: 1px solid var(--glass-dark-border);
  border-radius: var(--radius-md);
  background: var(--glass-dark-strong);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--white);               /* >= 10.8:1 on the ink glass */
  box-shadow: var(--shadow-3);
  font-size: var(--step--1);
  font-weight: var(--weight-medium);
  pointer-events: auto;
  animation: bc-toast-in var(--dur-slow) var(--ease-out); /* CSS-owned per motion-spec §6.4 */
}
.toast::before { /* status dot */
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.4rem;
  border-radius: 50%;
  background: var(--toast-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--toast-accent) 30%, transparent);
}
.toast--success, .toast[data-type="success"] { --toast-accent: var(--green-500); }
.toast--error, .toast[data-type="error"] { --toast-accent: var(--red-300); }
.toast--info, .toast[data-type="info"] { --toast-accent: var(--sky-500); }
.toast.is-leaving {
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); /* core.js removes the node 200ms later */
}
@keyframes bc-toast-in { from { opacity: 0; transform: translateY(0.75rem); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .toast, .toast.is-leaving { animation: none; transition: none; }
}
.toast__close { margin-left: auto; border: 0; border-radius: 50%; background: none; color: var(--text-on-inverse-muted); font-size: 1.1rem; line-height: 1; padding: 0 0.3rem; }
.toast :focus-visible { outline-color: var(--focus-ring-inverse); }


/* ==========================================================================
   18. Dialog (native <dialog class="dialog">)
   ========================================================================== */
.dialog {
  width: min(36rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  color: var(--color-text);
  box-shadow: var(--shadow-3);
  overflow: auto;
}
.dialog--wide { width: min(52rem, calc(100vw - 2rem)); }
.dialog[open] { animation: bc-dialog-in 300ms var(--ease-out); } /* --motion-dur-s; backdrop fade lives in motion.css */
@keyframes bc-dialog-in { from { opacity: 0; transform: translateY(1rem) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dialog[open] { animation: none; } }
.dialog::backdrop { background: color-mix(in srgb, var(--navy-975) 62%, transparent); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-s);
  padding: var(--space-m) var(--space-m) var(--space-s);
  border-bottom: 1px solid var(--border);
}
.dialog__title { font-size: var(--step-2); font-weight: var(--weight-regular); }
.dialog__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5rem; height: 2.5rem;
  margin: -0.4rem -0.4rem 0 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-700);
  font-size: 1.5rem;
  line-height: 1;
}
.dialog__close:hover { background: var(--ink-100); color: var(--navy-900); }
.dialog__body { padding: var(--space-m); display: flex; flex-direction: column; gap: var(--space-s); }
.dialog__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-xs);
  padding: var(--space-s) var(--space-m) var(--space-m);
  border-top: 1px solid var(--border);
  background: var(--surface-sunken);
}


/* ---- Confirmation panel (apply / register / sponsor success states) ----
   <div class="confirm-panel" tabindex="-1"><svg class="icon" aria-hidden="true">…</svg><h2>…</h2><p>…</p></div> */
.confirm-panel { display: flex; flex-direction: column; gap: var(--space-s); }
.confirm-panel .icon { color: var(--green-700); }
.confirm-panel h2, .confirm-panel p { margin: 0; }
.confirm-panel h2:focus { outline: none; }
.confirm-panel h2:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }

/* ---- "* required" note, auto-inserted by core.js above forms ---- */
.form-required-note { margin: 0 0 var(--space-s); font-size: var(--step--1); color: var(--ink-600); }

/* ==========================================================================
   19. Breadcrumbs
   <nav class="breadcrumbs" aria-label="Breadcrumb"><ol><li><a href="index.html">Home</a></li><li><span aria-current="page">Events</span></li></ol></nav>
   ========================================================================== */
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; margin: 0; padding: 0; list-style: none; font-size: var(--step--1); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--ink-600); }
.breadcrumbs li + li::before {
  content: "";
  width: 0.7rem; height: 0.7rem;
  background: currentColor;
  -webkit-mask: var(--art-chevron) center / contain no-repeat;
  mask: var(--art-chevron) center / contain no-repeat;
  transform: rotate(-90deg);
  opacity: .7;
}
.breadcrumbs a { color: var(--blue-600); font-weight: var(--weight-medium); }
.breadcrumbs [aria-current="page"] { color: var(--ink-800); font-weight: var(--weight-medium); text-decoration: none; }
.page-hero .breadcrumbs li { color: var(--text-on-inverse-muted); } /* not subtle: may sit over stipple */
.page-hero .breadcrumbs a { color: var(--white); }
.page-hero .breadcrumbs [aria-current="page"] { color: var(--text-on-inverse-muted); }


/* ==========================================================================
   20. Empty state: an orbit ring with a stipple core and one gold dot
   ========================================================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xl) var(--space-m);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  text-align: center;
}
.empty-state__art {
  position: relative;
  width: 5.5rem; height: 5.5rem;
  margin-bottom: var(--space-2xs);
  border-radius: 50%;
  border: 1px solid var(--navy-200);
  background-color: var(--paper);
}
.empty-state__art::before {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background-color: var(--stipple-on-paper);
  -webkit-mask: var(--art-stipple) 0 0 / 56px repeat;
  mask: var(--art-stipple) 0 0 / 56px repeat;
}
.empty-state__art::after {
  content: "";
  position: absolute;
  top: 8%;
  right: 8%;
  width: 0.55rem; height: 0.55rem;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 1px var(--gold-800);
}
.empty-state__title { font-size: var(--step-2); color: var(--navy-900); }
.empty-state__body { color: var(--ink-700); max-width: 44ch; }
.empty-state__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-xs); margin-top: var(--space-2xs); }


/* ==========================================================================
   21. Price display
   ========================================================================== */
.price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.6rem; }
.price__amount {
  color: var(--navy-900);
  font-family: var(--font-serif);
  font-size: var(--step-3);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tight);
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1.05;
}
.price__original { color: var(--ink-600); font-size: var(--step-0); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.price__note { width: 100%; font-size: var(--step--1); color: var(--ink-600); }
.price--member .price__amount { color: var(--green-800); }
.price--member .price__note { color: var(--green-800); font-weight: var(--weight-semibold); }
.price--free .price__amount { color: var(--green-800); }
.price--sm .price__amount { font-size: var(--step-2); }

/* Side-by-side member vs general prices */
.price-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--border); }
.price-pair__row { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.65rem 0.85rem; background: var(--surface-raised); }
.price-pair dt { font-size: var(--step--2); font-weight: var(--weight-semibold); color: var(--ink-600); }
.price-pair dd { margin: 0; font-family: var(--font-serif); font-size: var(--step-2); font-weight: var(--weight-regular); color: var(--navy-900); font-variant-numeric: lining-nums tabular-nums; }
.price-pair__row--member { background: var(--green-50); }
.price-pair__row--member dd { color: var(--green-800); }
.price-pair__row.is-applied { box-shadow: inset 0 -2px 0 var(--green-500); }
.price-pair__row.is-muted dd { color: var(--ink-600); text-decoration: line-through; }


/* ==========================================================================
   22. Countdown: <span class="countdown" data-countdown>12 days 4 hrs left</span>
   ========================================================================== */
.countdown {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--navy-900);
  font-size: var(--step--1);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}
.countdown::before {
  content: "";
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: var(--green-500);
  box-shadow: 0 0 0 3px var(--green-100);
}
.countdown--urgent { background: var(--amber-50); border-color: var(--amber-300); color: var(--amber-800); }
.countdown--urgent::before { background: var(--amber-800); box-shadow: 0 0 0 3px var(--amber-100); }
.countdown.is-ended, .countdown--ended { background: var(--ink-100); color: var(--ink-700); }
.countdown.is-ended::before, .countdown--ended::before { background: var(--ink-500); box-shadow: none; }


/* ==========================================================================
   23. Calendar (month grid, signage portal)
   ========================================================================== */
.calendar { position: relative; /* contains the absolutely positioned .visually-hidden day labels */ border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-raised); overflow: hidden; }
.calendar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-s);
  border-bottom: 1px solid var(--border);
  background: var(--paper);
}
.calendar__title { font-size: var(--step-2); font-weight: var(--weight-regular); color: var(--navy-900); text-align: center; }
.calendar__table { width: 100%; table-layout: fixed; }
.calendar__table th {
  padding: 0.5rem 0.25rem;
  font-size: var(--step--2);
  font-weight: var(--weight-semibold);
  color: var(--ink-600);
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.calendar__table abbr { text-decoration: none; }
.calendar__table td {
  height: 4.5rem;
  padding: 0.25rem;
  vertical-align: top;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.calendar__table td:last-child { border-right: 0; }
.calendar__table tr:last-child td { border-bottom: 0; }
@media (min-width: 48em) { .calendar__table td { height: 6.5rem; padding: 0.4rem; } }
.calendar__day {
  display: inline-grid;
  place-items: center;
  min-width: 1.75rem; height: 1.75rem;
  border-radius: 50%;
  font-size: var(--step--1);
  font-weight: var(--weight-semibold);
  color: var(--ink-800);
  font-variant-numeric: tabular-nums;
}
.calendar__cell.is-outside, td.is-outside { background: var(--ink-50); }
.calendar__cell.is-outside .calendar__day, td.is-outside .calendar__day { color: var(--ink-600); font-weight: var(--weight-regular); }
.calendar__cell.is-today .calendar__day, td.is-today .calendar__day { background: var(--navy-900); color: var(--white); }
.calendar__cell.is-selected, td.is-selected { box-shadow: inset 0 0 0 2px var(--blue-600); }
.calendar__events { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.calendar__event {
  display: block;
  width: 100%;
  min-height: 1.5rem;            /* WCAG 2.5.8: target >= 24px */
  padding: 0.2rem 0.35rem;
  border: 0;
  border-radius: var(--radius-xs);
  border-left: 3px solid var(--green-700);
  background: var(--green-50);
  color: var(--green-900);
  font-size: 0.75rem;
  font-weight: var(--weight-semibold);
  line-height: 1.25;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calendar__event--pending { border-left-color: var(--amber-800); background: var(--amber-50); color: var(--amber-800); border-left-style: dashed; }
.calendar__event--approved { border-left-color: var(--green-700); }
button.calendar__event:hover { filter: brightness(.96); text-decoration: underline; }
/* td clips overflow, so keep the focus ring inside the button. */
.calendar__event:focus-visible { outline-offset: -3px; }
/* Visible status prefix so pending vs approved never relies on colour or border alone.
   <button class="calendar__event calendar__event--pending"><span class="calendar__event-status">Pending:</span> Title</button> */
.calendar__event-status {
  display: inline;
  margin-right: 0.3em;
  font-weight: var(--weight-bold);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.calendar__event--pending .calendar__event-status::before { content: "\25CB\00a0"; }  /* hollow dot */
.calendar__event--approved .calendar__event-status::before { content: "\25CF\00a0"; } /* solid dot */
/* Screen-reader-only text inside a day cell (full date, event counts). */
.calendar__day .visually-hidden { position: absolute !important; }
.calendar__legend { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-m); padding: var(--space-xs) var(--space-s); border-top: 1px solid var(--border); font-size: var(--step--1); color: var(--ink-700); }
.calendar__legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.calendar__legend i { display: inline-block; width: 0.9rem; height: 0.9rem; border-radius: 2px; background: var(--green-50); border-left: 3px solid var(--green-700); }
.calendar__legend i.is-pending { background: var(--amber-50); border-left: 3px dashed var(--amber-800); }


/* ==========================================================================
   24. Toolbar / filter bar
   ========================================================================== */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-s);
  padding: var(--space-s);
  margin-bottom: var(--space-m);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
}
.toolbar__search { flex: 1 1 16rem; min-width: 0; }
.toolbar__filters { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: flex-end; flex: 1 1 100%; }
.toolbar__field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 10rem; flex: 1 1 10rem; }
.toolbar__spacer { flex: 1 1 auto; }
.toolbar__meta { flex: 1 1 100%; font-size: var(--step--1); color: var(--ink-700); font-weight: var(--weight-medium); }
@media (min-width: 48em) { .toolbar__filters { flex: 0 1 auto; } }

.search-input { position: relative; }
.search-input input {
  padding-left: 2.6rem;
  border-radius: var(--radius-pill);
  background-image: var(--art-search);
  background-repeat: no-repeat;
  background-position: 0.95rem center;
  background-size: 1.1rem;
}
.search-input input::-webkit-search-cancel-button { cursor: pointer; }

.results-count { font-size: var(--step--1); color: var(--ink-700); font-weight: var(--weight-medium); }


/* ==========================================================================
   25. Skeleton loader
   ========================================================================== */
.skeleton {
  display: block;
  border-radius: var(--radius-xs);
  background: linear-gradient(90deg, var(--ink-100) 0%, var(--ink-50) 40%, var(--ink-100) 80%);
  background-size: 300% 100%;
  animation: bc-shimmer 1.4s ease-in-out infinite;
  color: transparent;
  user-select: none;
}
.skeleton--text { height: 0.9em; width: 100%; margin: 0.3em 0; }
.skeleton--text.is-short { width: 60%; }
.skeleton--title { height: 1.4em; width: 70%; }
.skeleton--tile { width: 4rem; height: 4rem; border-radius: var(--radius-md); }
.skeleton--block { height: 8rem; border-radius: var(--radius-md); }
.skeleton-card { display: flex; gap: var(--space-s); padding: var(--space-s); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-raised); }
.skeleton-card > div { flex: 1; }
@keyframes bc-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }


/* ==========================================================================
   26. Misc
   ========================================================================== */
.icon { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -0.15em; flex: none; }

/* Key/value list (profile contact block, order summary) */
.dl { display: grid; grid-template-columns: minmax(6rem, max-content) minmax(0, 1fr); gap: 0.5rem var(--space-s); margin: 0; font-size: var(--step--1); }
.dl dt { font-weight: var(--weight-semibold); color: var(--ink-700); }
.dl dd { margin: 0; color: var(--ink-900); overflow-wrap: anywhere; }

/* Panel: grouped content block (sidebar boxes, summaries). */
.panel { padding: var(--space-m); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-raised); }
.panel--sky { background: var(--paper); border-color: transparent; }
.panel__title { font-size: var(--step-2); margin-bottom: var(--space-xs); }

.spinner { display: inline-block; width: 1.25rem; height: 1.25rem; border: 2px solid var(--navy-200); border-top-color: var(--navy-800); border-radius: 50%; animation: bc-spin .7s linear infinite; }

/* Gallery grid for tone art (profile gallery) */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(10rem, 100%), 1fr)); gap: var(--space-xs); }
.gallery__item { margin: 0; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4 / 3; }
.gallery__item > * { height: 100%; }
.gallery__item figcaption { position: absolute; }

/* Map placeholder (no external maps on file://) */
.map-placeholder {
  display: grid;
  place-items: center;
  min-height: 12rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background:
    repeating-linear-gradient(0deg, transparent 0 39px, color-mix(in srgb, var(--navy-800) 7%, transparent) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, color-mix(in srgb, var(--navy-800) 7%, transparent) 39px 40px),
    var(--paper);
  color: var(--ink-700);
  font-size: var(--step--1);
  font-weight: var(--weight-medium);
  text-align: center;
  padding: var(--space-m);
}

/* Image / thumbnail frame revealed by motion (motion-spec §5.8). Clips its only child. */
[data-motion-media] { display: block; overflow: hidden; border-radius: inherit; }
[data-motion-media] > img,
[data-motion-media] > svg { display: block; width: 100%; height: 100%; object-fit: cover; }


/* ==========================================================================
   27. Civic editorial kit (Stage 6). Reusable pieces for page-builder.
   ========================================================================== */

/* --- Display type: the light editorial serif at fixed steps ------------- */
.display {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  color: var(--color-heading);
  text-wrap: balance;
}
.display--xl { font-size: var(--step-6); }
.display--l { font-size: var(--step-5); }
.display--m { font-size: var(--step-4); }
.display--s { font-size: var(--step-3); line-height: 1.12; }

/* --- Eyebrow: sentence-case kicker with a small dot (not all caps) -------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: var(--blue-700);
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.01em;
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--blue-500);
}

/* --- Section surfaces ------------------------------------------------------
   .surface-ink / .section--ink: deep ink navy (text and links turn light, focus
   ring turns gold). .surface-paper / .section--paper: cool paper grey. */
.surface-paper, .section--paper { background: var(--surface-paper); }
.surface-ink, .section--ink {
  background:
    radial-gradient(50% 70% at 90% 0%, var(--glow-blue) 0%, transparent 70%),
    var(--gradient-ink);
  color: var(--text-on-inverse-muted);
}
:is(.surface-ink, .section--ink) :is(h1, h2, h3, h4, h5, h6, .display, .section-head__title) { color: var(--white); }
:is(.surface-ink, .section--ink) :is(.section-head__lede, .lead, .text-muted) { color: var(--text-on-inverse-muted); }
:is(.surface-ink, .section--ink) a:not(.btn, .chip) { color: var(--white); }
:is(.surface-ink, .section--ink) a:not(.btn, .chip):hover { color: var(--sky-300); }
:is(.surface-ink, .section--ink, .page-hero, .cta-band, .colour-tile) .eyebrow { color: var(--sky-300); }      /* 9.9:1 on ink */
:is(.surface-ink, .section--ink, .page-hero, .cta-band, .colour-tile) .eyebrow::before { background: var(--gold-500); }
:is(.surface-ink, .section--ink) :is(.card, .panel, .hero-card, [data-surface="light"]) { color: var(--color-text); }
:is(.surface-ink, .section--ink) :is(.card, .panel, .hero-card, [data-surface="light"]) :is(h1, h2, h3, h4, h5, h6) { color: var(--color-heading); }
:is(.surface-ink, .section--ink) :is(.card, .panel, .hero-card, [data-surface="light"]) a:not(.btn, .chip) { color: var(--color-link); }

/* --- Stipple layers (motion-spec §5.6). Decorative, aria-hidden.
   <div class="stipple stipple--fine" data-motion="stipple" aria-hidden="true"></div>
   as the FIRST child of a section; the section gets position/overflow below.
   Contrast where a glyph overlaps a dot, layer at full opacity (worst case = dot in a blue glow):
   on ink (--stipple-on-ink, sky-300 30%) white >= 6.3:1, --text-on-inverse-muted >= 5.0:1
   (do not put --text-on-inverse-subtle over stipple: ~3.1:1); on paper (--stipple-on-paper,
   blue-500 26%) ink-900 >= 10.9:1, ink-600 >= 4.7:1. */
.stipple {
  --stipple-color: var(--stipple-on-paper);
  --stipple-tile: 140px;
  --stipple-fade: radial-gradient(60% 80% at 85% 20%, black 0%, transparent 75%);
  position: absolute;
  inset: -6% 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--stipple-color);
  -webkit-mask: var(--art-stipple) 0 0 / var(--stipple-tile) repeat, var(--stipple-fade);
  -webkit-mask-composite: source-in;
  mask: var(--art-stipple) 0 0 / var(--stipple-tile) repeat, var(--stipple-fade);
  mask-composite: intersect;
}
.stipple--fine { --stipple-tile: 110px; }
.stipple--coarse { --stipple-tile: 220px; }   /* the same field scaled: larger, sparser dots */
.stipple--full { --stipple-fade: linear-gradient(black, black); }
.stipple--left { --stipple-fade: radial-gradient(60% 80% at 10% 80%, black 0%, transparent 75%); }
:is(.surface-ink, .section--ink, .page-hero, .cta-band, .colour-tile) .stipple { --stipple-color: var(--stipple-on-ink); }
.section:has(> .stipple), .surface-ink:has(> .stipple), .surface-paper:has(> .stipple) { position: relative; overflow: clip; isolation: isolate; }
:is(.section, .surface-ink, .surface-paper):has(> .stipple) > :not(.stipple) { position: relative; z-index: 1; }
.page-hero > .stipple, .page-hero > .page-hero__texture { z-index: -1; }
.cta-band > .stipple { z-index: -1; }

/* Utility texture on any block: stipple (::before) and/or contours (::after). */
.texture-stipple, .texture-contours { position: relative; isolation: isolate; }
.texture-stipple::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background-color: var(--texture-color, var(--stipple-on-paper));
  -webkit-mask: var(--art-stipple) 0 0 / 140px repeat, radial-gradient(60% 80% at 85% 20%, black 0%, transparent 75%);
  -webkit-mask-composite: source-in;
  mask: var(--art-stipple) 0 0 / 140px repeat, radial-gradient(60% 80% at 85% 20%, black 0%, transparent 75%);
  mask-composite: intersect;
}
.texture-contours::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background-color: var(--contour-color, var(--contour-on-paper));
  -webkit-mask: var(--art-contours) 0 0 / 960px auto repeat;
  mask: var(--art-contours) 0 0 / 960px auto repeat;
}
:is(.surface-ink, .section--ink).texture-stipple { --texture-color: var(--stipple-on-ink); }
:is(.surface-ink, .section--ink).texture-contours { --contour-color: var(--contour-on-ink); }

/* --- Glass cards --------------------------------------------------------- */
.glass {
  padding: var(--space-m);
  background: var(--glass-light-strong);
  border: 1px solid var(--glass-light-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glass);
  -webkit-backdrop-filter: saturate(1.3) blur(var(--glass-blur));
  backdrop-filter: saturate(1.3) blur(var(--glass-blur));
}
.glass-dark {
  padding: var(--space-m);
  background: var(--glass-dark);
  border: 1px solid var(--glass-dark-border);
  border-radius: var(--radius-md);
  color: var(--text-on-inverse-muted);        /* >= 13:1 on the ink + 6% white */
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
}
.glass-dark :is(h2, h3, h4) { color: var(--white); }
.glass-dark a:not(.btn) { color: var(--white); }

/* --- Category orbit (motion-spec §5.4 CSS contract) ------------------------
   .orbit > svg.orbit__rings + .orbit__centre + ul.orbit__list > li.orbit__item(--inner|--outer)[style="--a:…"] > a.chip.chip--orbit
   Below 62em: a wrapped chip list under the centre block. */
.orbit { display: grid; gap: var(--space-l); justify-items: center; text-align: center; }
.orbit__centre { display: flex; flex-direction: column; align-items: center; gap: var(--space-s); max-width: 28rem; }
.orbit__centre :is(h2, h3) { font-size: var(--step-3); font-weight: var(--weight-display); letter-spacing: var(--tracking-tight); line-height: 1.12; }
.orbit__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.orbit__rings { display: none; }
.orbit__rings circle { fill: none; stroke: var(--orbit-line, var(--navy-200)); stroke-width: 0.15; }
.orbit__rings circle + circle { stroke-dasharray: 0.6 0.9; }
.chip--orbit { min-height: 2.75rem; padding-inline: 1.15rem; white-space: nowrap; }
:is(.surface-ink, .section--ink) .orbit { --orbit-line: var(--border-inverse); }
:is(.surface-ink, .section--ink) .chip--orbit {
  background: var(--glass-dark);
  border-color: var(--glass-dark-border);
  color: var(--white);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
:is(.surface-ink, .section--ink) .chip--orbit:hover { background: var(--white); border-color: var(--white); color: var(--navy-900); }
@media (min-width: 62em) {
  .orbit {
    --orbit-size: 40rem;
    --r-inner: calc(var(--orbit-size) * .34);
    --r-outer: calc(var(--orbit-size) * .48);
    --orbit-inner: 0deg;
    --orbit-outer: 0deg;
    position: relative;
    display: grid;
    place-items: center;
    width: min(100%, var(--orbit-size));
    aspect-ratio: 1;
    margin-inline: auto;
  }
  .orbit__centre { position: relative; z-index: 1; max-width: calc(var(--r-inner) * 1.05); }
  .orbit__rings { display: block; position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
  /* The list covers the whole orbit (over the centre), so it lets clicks through; only chips catch them. */
  .orbit__list { position: absolute; inset: 0; display: block; z-index: 2; pointer-events: none; }
  .orbit__item {
    pointer-events: auto;
    position: absolute;
    left: 50%;
    top: 50%;
    --spin: var(--orbit-inner);
    --r: var(--r-inner);
    transform: rotate(calc(var(--a) + var(--spin))) translateX(var(--r))
               rotate(calc(-1 * (var(--a) + var(--spin)))) translate(-50%, -50%);
  }
  .orbit__item--outer { --spin: var(--orbit-outer); --r: var(--r-outer); }
}
@media (min-width: 80em) { .orbit { --orbit-size: 44rem; } }

/* --- Membership journey (motion-spec §5.5) --------------------------------
   section.journey > .container > ol.journey__steps > li.journey__step >
   span.journey__node + svg.journey__icon + h3 + p. Single column below 62em,
   zig-zag above. Static dotted connector until motion.js adds .journey--drawn. */
.journey { --journey-line: var(--blue-500); --journey-node-bg: var(--surface-raised); }
.journey__steps {
  position: relative;
  counter-reset: journey;
  display: grid;
  gap: var(--space-l);
  margin: var(--space-xl) 0 0;
  padding: 0;
  list-style: none;
}
.journey__steps::before { /* static dotted connector (no JS / reduced motion) */
  content: "";
  position: absolute;
  top: 0.6rem;
  bottom: 0.6rem;
  left: calc(0.625rem - 1.5px);
  width: 3px;
  background: radial-gradient(circle, var(--journey-line) 1.5px, transparent 2px) center top / 3px 10px repeat-y;
}
.journey--drawn .journey__steps::before { display: none; }
.journey__step {
  counter-increment: journey;
  position: relative;
  padding-left: 3rem;
  min-width: 0;
}
.journey__node {
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 1.25rem;  /* no z-index: positioned, so it paints above motion.js's z-index:-1 connector */
  height: 1.25rem;
  border-radius: 50%;
  border: 2px solid var(--journey-line);
  background: var(--journey-node-bg);
}
.journey__step.is-reached .journey__node { background: var(--journey-line); }
.journey__step:last-child.is-reached .journey__node { background: var(--gold-500); border-color: var(--gold-800); }
.journey__icon {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: var(--space-xs);
  color: var(--blue-600);
}
.journey__icon :is(path, circle, rect, line, polyline) { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.journey__step :is(h3, h4) { font-family: var(--font-serif); font-size: var(--step-2); font-weight: var(--weight-regular); letter-spacing: var(--tracking-tight); }
.journey__step :is(h3, h4)::before {
  content: "Step " counter(journey);
  display: block;
  margin-bottom: 0.3rem;
  color: var(--blue-700);
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.01em;
}
.journey__step p { margin-top: 0.4rem; color: var(--ink-700); max-width: 40ch; }
@media (min-width: 62em) {
  .journey__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 7rem; row-gap: 0; }
  .journey__steps::before { left: calc(50% - 1.5px); }
  .journey__step { padding: 0 0 var(--space-l); }
  .journey__step:nth-child(odd) { grid-column: 1; }
  .journey__step:nth-child(even) { grid-column: 2; }
  .journey__step:nth-child(1) { grid-row: 1 / span 2; }
  .journey__step:nth-child(2) { grid-row: 2 / span 2; }
  .journey__step:nth-child(3) { grid-row: 3 / span 2; }
  .journey__step:nth-child(4) { grid-row: 4 / span 2; }
  .journey__step:nth-child(5) { grid-row: 5 / span 2; }
  .journey__step:nth-child(6) { grid-row: 6 / span 2; }
  /* Nodes sit 1.5rem either side of the centre line, so the drawn path swings gently. */
  .journey__step:nth-child(odd) .journey__node { left: auto; right: calc(-2rem - 0.625rem); }
  .journey__step:nth-child(even) .journey__node { left: calc(-2rem - 0.625rem); }
  .journey__step:nth-child(odd) { text-align: right; }
  .journey__step:nth-child(odd) .journey__icon { margin-left: auto; }
  .journey__step:nth-child(odd) p { margin-left: auto; }
}
:is(.surface-ink, .section--ink).journey,
:is(.surface-ink, .section--ink) .journey { --journey-line: var(--sky-500); --journey-node-bg: var(--navy-950); }
:is(.surface-ink, .section--ink) .journey__icon { color: var(--sky-300); }
:is(.surface-ink, .section--ink) .journey__step :is(h3, h4)::before { color: var(--sky-300); }
:is(.surface-ink, .section--ink) .journey__step p { color: var(--text-on-inverse-muted); }

/* --- Process steps with dotted connectors (static, no motion hook) --------
   <ol class="process"><li class="process__step"><h3 class="process__title">…</h3><p>…</p></li>…</ol> */
.process { counter-reset: process; display: grid; gap: var(--space-l); margin: 0; padding: 0; list-style: none; }
.process__step { counter-increment: process; position: relative; padding-left: 3.75rem; min-width: 0; }
.process__step::before {
  content: counter(process);
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--navy-300);
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--navy-900);
  font-family: var(--font-serif);
  font-size: 1.25rem;
}
.process__step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(1.375rem - 1px);
  top: 3.25rem;
  bottom: calc(var(--space-l) * -1 + 0.5rem);
  width: 2px;
  background: radial-gradient(circle, var(--ink-400) 1px, transparent 1.4px) center top / 2px 7px repeat-y;
}
.process__step.is-done::before { background: var(--green-700); border-color: var(--green-700); color: var(--white); }
.process__title { font-family: var(--font-serif); font-size: var(--step-2); font-weight: var(--weight-regular); letter-spacing: var(--tracking-tight); margin-bottom: 0.35rem; }
.process__step p { color: var(--ink-700); }
@media (min-width: 48em) {
  .process { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--space-m); }
  .process__step { padding: 4rem 0 0; }
  .process__step:not(:last-child)::after {
    left: 3.5rem;
    right: calc(var(--space-m) * -1 + 0.75rem);
    top: calc(1.375rem - 1px);
    bottom: auto;
    width: auto;
    height: 2px;
    background: radial-gradient(circle, var(--ink-400) 1px, transparent 1.4px) left center / 7px 2px repeat-x;
  }
}
:is(.surface-ink, .section--ink) .process__step::before { background: transparent; border-color: var(--border-inverse); color: var(--white); }
:is(.surface-ink, .section--ink) .process__step p { color: var(--text-on-inverse-muted); }

/* --- Dated event rows (TAPI-style): big serif day, title, tags ------------
   <ul class="event-list"><li><article class="event-row">
     <time class="event-row__date" datetime="2026-11-14"><span class="event-row__day">14</span><span class="event-row__month">Nov, Fri</span></time>
     <div class="event-row__body"><h3 class="event-row__title"><a href="…">…</a></h3><p class="event-row__meta">…</p></div>
     <div class="event-row__aside">badges / action</div>
   </article></li></ul> */
.event-list { display: grid; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.event-row {
  position: relative;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: var(--space-xs) var(--space-m);
  align-items: start;
  padding: var(--space-m) 0;
  border-bottom: 1px solid var(--border);
}
.event-row__date { display: flex; flex-direction: column; line-height: 1; margin: 0; }
.event-row__day {
  color: var(--navy-900);
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 1.8rem + 2.6vw, 4.25rem);
  font-weight: var(--weight-light);
  letter-spacing: -0.035em;
  font-variant-numeric: lining-nums;
}
.event-row__month { margin-top: 0.4rem; color: var(--blue-700); font-size: var(--step--1); font-weight: var(--weight-semibold); }
.event-row__body { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.event-row__title { font-family: var(--font-serif); font-size: var(--step-2); font-weight: var(--weight-regular); letter-spacing: var(--tracking-tight); }
.event-row__title a { color: inherit; text-decoration: none; }
.event-row__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.event-row__title a:focus-visible { outline: none; }
.event-row:focus-within { outline: var(--focus-width) solid var(--focus-ring); outline-offset: 4px; border-radius: var(--radius-xs); }
.event-row:hover .event-row__title a { text-decoration: underline; text-decoration-thickness: 1px; }
.event-row__meta { display: flex; flex-wrap: wrap; gap: 0.15rem 0.9rem; color: var(--ink-600); font-size: var(--step--1); max-width: none; }
.event-row__aside { grid-column: 2; position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs); }
.event-row--past .event-row__day, .event-row--past .event-row__month { color: var(--ink-600); }
@media (min-width: 48em) {
  .event-row { grid-template-columns: 7.5rem minmax(0, 1fr) auto; align-items: center; padding-block: var(--space-l); }
  .event-row__aside { grid-column: 3; justify-content: flex-end; }
}
:is(.surface-ink, .section--ink) .event-list,
:is(.surface-ink, .section--ink) .event-row { border-color: var(--border-inverse); }
:is(.surface-ink, .section--ink) .event-row__day { color: var(--white); }
:is(.surface-ink, .section--ink) .event-row__month { color: var(--sky-300); }
:is(.surface-ink, .section--ink) .event-row__meta { color: var(--text-on-inverse-muted); }

/* --- Colour tiles: bold solid brand blocks with a faint stipple corner -----
   All text in a tile is white. Dots are white at 10% in the TOP-RIGHT corner (away
   from __foot links); worst case white text over a dot: blue (blue-600) 5.1:1,
   green (green-800 fill) 6.4:1, brown (brown-700) 6.1:1, navy/ink >= 12:1.
   Off a dot: navy 16:1, blue 6.2:1, green 7.9:1, brown 7.9:1, ink 19:1. */
.colour-tile {
  --tile-color: var(--navy-900);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-height: 14rem;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-radius: var(--radius-lg);
  background: var(--tile-color);
  color: var(--white);
}
.colour-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: color-mix(in srgb, var(--white) 10%, transparent);
  -webkit-mask: var(--art-stipple) 0 0 / 120px repeat, radial-gradient(60% 60% at 100% 0%, black 0%, transparent 70%);
  -webkit-mask-composite: source-in;
  mask: var(--art-stipple) 0 0 / 120px repeat, radial-gradient(60% 60% at 100% 0%, black 0%, transparent 70%);
  mask-composite: intersect;
}
.colour-tile :is(h2, h3, h4, .colour-tile__title) { color: var(--white); }
.colour-tile__title { font-family: var(--font-serif); font-size: var(--step-3); font-weight: var(--weight-display); line-height: 1.1; letter-spacing: var(--tracking-tight); }
.colour-tile__body { color: var(--white); max-width: 38ch; }
.colour-tile__foot { margin-top: auto; padding-top: var(--space-s); }
.colour-tile a:not(.btn) { color: var(--white); }
.colour-tile--navy { --tile-color: var(--navy-900); }
.colour-tile--blue { --tile-color: var(--blue-600); }
.colour-tile--green { --tile-color: var(--green-800); }
.colour-tile--brown { --tile-color: var(--brown-700); }
.colour-tile--ink { --tile-color: var(--navy-975); }

/* --- Stat prose (motion-spec §5.3): numbers woven into one serif sentence ---
   <p class="stat-prose">… <span class="stat-prose__fig"><span class="stat-prose__num">320+</span> member businesses</span> …</p> */
.stat-prose {
  max-width: 26ch;
  margin: 0;
  color: var(--navy-900);
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: var(--weight-light);
  line-height: 1.2;
  letter-spacing: var(--tracking-tight);
  text-wrap: pretty;
}
@media (min-width: 62em) { .stat-prose { max-width: 30ch; font-size: clamp(2.75rem, 1.5rem + 2.4vw, 3.75rem); } }
.stat-prose__fig { position: relative; white-space: nowrap; font-weight: var(--weight-regular); }
.stat-prose__num { font-variant-numeric: lining-nums tabular-nums; }
.stat-prose__fig::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.08em;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-brand);
  transform: scaleX(var(--motion-rule, 1));
  transform-origin: 0 50%;
}
:is(.surface-ink, .section--ink) .stat-prose { color: var(--white); }

/* --- Marquee (generic; motion-spec v2 cut the member-name marquee, so use only
   for short non-essential lists). Duplicate list is aria-hidden + inert. A
   .marquee__toggle pause button is wired by layout.js (WCAG 2.2.2). -------- */
.marquee { position: relative; display: flex; align-items: center; gap: var(--space-s); }
.marquee__viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  mask: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee__track { display: flex; width: max-content; }
.marquee__list { display: flex; flex: none; align-items: center; gap: var(--marquee-gap, var(--space-xl)); margin: 0; padding: 0 var(--marquee-gap, var(--space-xl)) 0 0; list-style: none; }
.marquee__item { color: var(--ink-700); font-family: var(--font-serif); font-size: var(--step-2); font-weight: var(--weight-light); white-space: nowrap; }
.marquee__toggle {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--navy-900);
}
.marquee__toggle::before { content: ""; width: 0.6rem; height: 0.75rem; border-inline: 2.5px solid currentColor; }
.marquee__toggle[aria-pressed="true"]::before { width: 0; height: 0; border-inline: 0; border-left: 0.65rem solid currentColor; border-block: 0.4rem solid transparent; margin-left: 0.2rem; }
@keyframes bc-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: no-preference) {
  .marquee__track { animation: bc-marquee var(--marquee-dur, 45s) linear infinite; }
  .marquee:hover .marquee__track,
  .marquee:focus-within .marquee__track,
  .marquee.is-paused .marquee__track { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__toggle { display: none; }
  .marquee__viewport { overflow-x: auto; }
  .marquee__list[aria-hidden="true"] { display: none; }
}
:is(.surface-ink, .section--ink) .marquee__item { color: var(--text-on-inverse-muted); }

/* --- Home hero caption + motion pause toggle (motion-spec §5.1, §9.2) ------ */
.hero-field__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs) var(--space-s);
  margin-top: var(--space-l);
  color: var(--text-on-inverse-muted);     /* sits over the stipple: >= 5.0:1 even on a dot */
  font-size: var(--step--1);
}
.hero-field__caption p { margin: 0; max-width: none; }
.hero-field__hint { display: none; }
@media (hover: hover) and (pointer: fine) { .hero-field__hint { display: inline; } }
.motion-toggle {
  min-height: 2.75rem;               /* 44px target */
  padding-inline: 1rem 1.1rem;
  border: 1px solid var(--border-inverse);
}
.motion-toggle::before { /* pause icon; play icon when pressed */
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.7rem;
  border-inline: 2px solid currentColor;
}
.motion-toggle[aria-pressed="true"]::before {
  width: 0;
  height: 0;
  border-inline: 0;
  border-left: 0.6rem solid currentColor;
  border-block: 0.38rem solid transparent;
}

/* --- Focus rings drawn by :focus-within on ink surfaces --------------------
   The ring sits outside the component, on the ink, so it must be the gold
   inverse ring (14:1), not blue-600 (~2.9:1). Inside a light card or panel on
   ink the ring lands on white again, so blue comes back. Last in the file so it
   wins on order as well as specificity. */
:is(.surface-ink, .section--ink, .page-hero, .cta-band, .site-footer, .colour-tile, .glass-dark, .on-dark)
  :is(.chip, .event-row, .card--link, .member-card, .resource-card, .news-card, .dropzone, .file-drop):focus-within {
  outline-color: var(--focus-ring-inverse);
}
:is(.surface-ink, .section--ink, .page-hero, .cta-band, .site-footer, .colour-tile, .glass-dark, .on-dark)
  :is(.card, .panel, .hero-card, [data-surface="light"])
  :is(.chip, .event-row, .card--link, .member-card, .resource-card, .news-card, .dropzone, .file-drop):focus-within {
  outline-color: var(--focus-ring);
}
