/*
 * Caulight design system — built around the Caulight logo:
 *   the purple hub-and-spokes (people connected) and the blue arc (a welcoming embrace).
 * Type: Atkinson Hyperlegible (Braille Institute) — built for legibility at every size.
 * Colour: logo purple #AA33CC for brand + primary actions (5.2:1 with white), logo blue #296DFF
 *   for the arc, focus rings and graphics (4.5:1 — not used for small text), deeper shades for text.
 *   Blue (#020066) and orange (#FF6633) colour themes are further down ("Colour themes").
 */
@import url("https://cdn.jsdelivr.net/npm/@fontsource/atkinson-hyperlegible@5.1.1/400.css");
@import url("https://cdn.jsdelivr.net/npm/@fontsource/atkinson-hyperlegible@5.1.1/700.css");
@import url("https://cdn.jsdelivr.net/npm/@fontsource/atkinson-hyperlegible@5.1.1/400-italic.css");

:root {
  --primary: #aa33cc;          /* logo purple */
  --primary-dark: #7b1fa2;     /* links, text on tints */
  --primary-hover: #7b1fa2;    /* primary button hover fill (white text) */
  --primary-deep: #4a1466;
  --primary-tint: #f4e8fa;
  --accent: #296dff;           /* logo blue — arcs, focus, graphics */
  --accent-dark: #1f4fd1;      /* blue text */
  --accent-tint: #e8efff;
  --bg: #f7f6fb;
  --surface: #ffffff;
  --ink: #1c1530;
  --ink-soft: #4f4863;
  --line: #ddd7ea;
  --field-border: #857d9c;
  --muted-fill: #ece9f3;
  --danger: #b3261e;           /* danger text */
  --danger-fill: #b3261e;      /* danger button fill (white text) */
  --danger-tint: #fce8e6;
  --info: #1f4fd1;
  --info-tint: #e8efff;
  --warn: #8a4b00;
  --warn-tint: #fff1dc;
  --star-off: #958cab;
  --brand: #aa33cc;            /* logo and hero artwork */
  --shadow: 0 12px 30px rgba(28, 21, 48, .12);
  color-scheme: light;

  --font: "Atkinson Hyperlegible", "Verdana", system-ui, sans-serif;
  --base: 1.125rem;          /* 18px */
  --leading: 1.6;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 28px;
  --gap: 1.5rem;
  --focus: 0 0 0 3px var(--surface), 0 0 0 6px var(--accent);
  --max: 1200px;
}
html { background: var(--bg); }

body.pref-high-contrast {
  --primary: #6a1b8e;
  --primary-dark: #4a1466;
  --accent: #1a3fb0;
  --accent-dark: #102a80;
  --ink: #000000;
  --ink-soft: #1d1d1d;
  --line: #333333;
  --field-border: #000000;
  --bg: #ffffff;
}
body.pref-high-contrast .card, body.pref-high-contrast .panel, body.pref-high-contrast .btn { border-width: 2px; border-color: var(--ink); }
html:has(body.pref-large-text) { font-size: 120%; }

/* ---------- Dark mode (purple; blue and orange are under "Colour themes") ----------
   <html> carries theme-system (follow the device), theme-light or theme-dark (chosen in Display settings).
   Every text pair meets WCAG AA (4.5:1); borders, focus rings and graphics meet 3:1. */
html.theme-dark {
  --primary: #a633c9;
  --primary-hover: #8a26ad;
  --primary-dark: #dcaaf3;
  --primary-deep: #f3e3fb;
  --primary-tint: #3b1f50;
  --accent: #6b97ff;
  --accent-dark: #a9c1ff;
  --accent-tint: #1f2c57;
  --bg: #140d1f;
  --surface: #1e1430;
  --ink: #f4effb;
  --ink-soft: #c6bcda;
  --line: #3d2f57;
  --field-border: #8c80a8;
  --muted-fill: #2a1e3e;
  --danger: #ff9d94;
  --danger-fill: #b3261e;
  --danger-tint: #4a1a1c;
  --info: #a9c1ff;
  --info-tint: #1f2c57;
  --warn: #ffc27a;
  --warn-tint: #3f2a10;
  --star-off: #7a6d92;
  --brand: #a633c9;
  --shadow: 0 12px 30px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html.theme-system {
    --primary: #a633c9;
    --primary-hover: #8a26ad;
    --primary-dark: #dcaaf3;
    --primary-deep: #f3e3fb;
    --primary-tint: #3b1f50;
    --accent: #6b97ff;
    --accent-dark: #a9c1ff;
    --accent-tint: #1f2c57;
    --bg: #140d1f;
    --surface: #1e1430;
    --ink: #f4effb;
    --ink-soft: #c6bcda;
    --line: #3d2f57;
    --field-border: #8c80a8;
    --muted-fill: #2a1e3e;
    --danger: #ff9d94;
    --danger-fill: #b3261e;
    --danger-tint: #4a1a1c;
    --info: #a9c1ff;
    --info-tint: #1f2c57;
    --warn: #ffc27a;
    --warn-tint: #3f2a10;
    --star-off: #7a6d92;
    --brand: #a633c9;
    --shadow: 0 12px 30px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
html.theme-dark body.pref-high-contrast {
  --primary: #9b2dbf;
  --primary-hover: #7b1fa2;
  --primary-dark: #f0c8ff;
  --primary-deep: #ffffff;
  --accent: #8fb0ff;
  --accent-dark: #c4d4ff;
  --ink: #ffffff;
  --ink-soft: #ece6f5;
  --line: #bfb3d6;
  --field-border: #ffffff;
  --bg: #000000;
  --surface: #0b0610;
  --muted-fill: #1a1226;
}
@media (prefers-color-scheme: dark) {
  html.theme-system body.pref-high-contrast {
    --primary: #9b2dbf;
    --primary-hover: #7b1fa2;
    --primary-dark: #f0c8ff;
    --primary-deep: #ffffff;
    --accent: #8fb0ff;
    --accent-dark: #c4d4ff;
    --ink: #ffffff;
    --ink-soft: #ece6f5;
    --line: #bfb3d6;
    --field-border: #ffffff;
    --bg: #000000;
    --surface: #0b0610;
    --muted-fill: #1a1226;
  }
}
html.theme-dark body.pref-high-contrast .card, html.theme-dark body.pref-high-contrast .panel { border-color: var(--line); }

/* ---------- Colour themes ----------
   <html> also carries color-purple (default), color-blue (#020066) or color-orange (#ff6633), chosen in
   Display settings; each has a light and a dark version and follows the theme-* mode above.
   --brand colours the logo and hero artwork (logos are exempt from contrast rules, so orange uses
   #ff6633 itself); --primary is the shade that carries white text and links at WCAG AA. */
html.color-blue {
  --primary: #020066;
  --primary-hover: #1f1c99;
  --primary-dark: #020066;
  --primary-deep: #01003d;
  --primary-tint: #eaeaf8;
  --accent: #e0501f;
  --accent-dark: #b03a10;
  --accent-tint: #fff0ea;
  --bg: #f6f6fb;
  --surface: #ffffff;
  --ink: #11112e;
  --ink-soft: #47476a;
  --line: #dadaeb;
  --field-border: #7c7ca0;
  --muted-fill: #ebebf5;
  --star-off: #8e8eab;
  --brand: #020066;
}
html.color-blue.theme-dark {
  --primary: #5c58df;
  --primary-hover: #4642c9;
  --primary-dark: #bcbbff;
  --primary-deep: #e7e6ff;
  --primary-tint: #1e1c58;
  --accent: #ff7a4d;
  --accent-dark: #ffab8f;
  --accent-tint: #3d2014;
  --bg: #08081d;
  --surface: #11112f;
  --ink: #f0f0fb;
  --ink-soft: #c1c1dd;
  --line: #2d2c5c;
  --field-border: #8786b2;
  --muted-fill: #1b1a42;
  --star-off: #706f98;
  --brand: #7370ff;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html.color-blue.theme-system {
    --primary: #5c58df;
    --primary-hover: #4642c9;
    --primary-dark: #bcbbff;
    --primary-deep: #e7e6ff;
    --primary-tint: #1e1c58;
    --accent: #ff7a4d;
    --accent-dark: #ffab8f;
    --accent-tint: #3d2014;
    --bg: #08081d;
    --surface: #11112f;
    --ink: #f0f0fb;
    --ink-soft: #c1c1dd;
    --line: #2d2c5c;
    --field-border: #8786b2;
    --muted-fill: #1b1a42;
    --star-off: #706f98;
    --brand: #7370ff;
    color-scheme: dark;
  }
}
html.color-blue body.pref-high-contrast {
  --primary: #020066;
  --primary-hover: #01003d;
  --primary-dark: #020066;
  --primary-deep: #01003d;
  --accent: #a8350d;
  --accent-dark: #7a2508;
}
html.color-blue.theme-dark body.pref-high-contrast {
  --primary: #5c58df;
  --primary-hover: #4642c9;
  --primary-dark: #d6d5ff;
  --primary-deep: #ffffff;
  --accent: #ff9670;
  --accent-dark: #ffc2ad;
  --surface: #07071a;
  --muted-fill: #13123a;
}
@media (prefers-color-scheme: dark) {
  html.color-blue.theme-system body.pref-high-contrast {
    --primary: #5c58df;
    --primary-hover: #4642c9;
    --primary-dark: #d6d5ff;
    --primary-deep: #ffffff;
    --accent: #ff9670;
    --accent-dark: #ffc2ad;
    --surface: #07071a;
    --muted-fill: #13123a;
  }
}
html.color-orange {
  --primary: #c23e12;
  --primary-hover: #9c300b;
  --primary-dark: #a8350d;
  --primary-deep: #5c1c06;
  --primary-tint: #fff0ea;
  --accent: #020066;
  --accent-dark: #020066;
  --accent-tint: #eaeaf8;
  --bg: #fbf7f5;
  --surface: #ffffff;
  --ink: #2a1710;
  --ink-soft: #5d4940;
  --line: #ecdcd4;
  --field-border: #98807a;
  --muted-fill: #f5ebe6;
  --star-off: #a8928a;
  --brand: #ff6633;
}
html.color-orange.theme-dark {
  --primary: #c23e12;
  --primary-hover: #a3340e;
  --primary-dark: #ffb399;
  --primary-deep: #ffe5db;
  --primary-tint: #4a2214;
  --accent: #8f8cff;
  --accent-dark: #c3c1ff;
  --accent-tint: #1e1c58;
  --bg: #1a0d08;
  --surface: #26140d;
  --ink: #fbf1ec;
  --ink-soft: #dcc5ba;
  --line: #4e3227;
  --field-border: #a98a7d;
  --muted-fill: #341d14;
  --star-off: #8f756b;
  --brand: #ff6633;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html.color-orange.theme-system {
    --primary: #c23e12;
    --primary-hover: #a3340e;
    --primary-dark: #ffb399;
    --primary-deep: #ffe5db;
    --primary-tint: #4a2214;
    --accent: #8f8cff;
    --accent-dark: #c3c1ff;
    --accent-tint: #1e1c58;
    --bg: #1a0d08;
    --surface: #26140d;
    --ink: #fbf1ec;
    --ink-soft: #dcc5ba;
    --line: #4e3227;
    --field-border: #a98a7d;
    --muted-fill: #341d14;
    --star-off: #8f756b;
    --brand: #ff6633;
    color-scheme: dark;
  }
}
html.color-orange body.pref-high-contrast {
  --primary: #a8350d;
  --primary-hover: #7a2508;
  --primary-dark: #7a2508;
  --primary-deep: #3d1204;
  --accent: #020066;
  --accent-dark: #020066;
}
html.color-orange.theme-dark body.pref-high-contrast {
  --primary: #c23e12;
  --primary-hover: #a3340e;
  --primary-dark: #ffc7b3;
  --primary-deep: #ffffff;
  --accent: #a9a7ff;
  --accent-dark: #d0cfff;
  --surface: #120905;
  --muted-fill: #2a160e;
}
@media (prefers-color-scheme: dark) {
  html.color-orange.theme-system body.pref-high-contrast {
    --primary: #c23e12;
    --primary-hover: #a3340e;
    --primary-dark: #ffc7b3;
    --primary-deep: #ffffff;
    --accent: #a9a7ff;
    --accent-dark: #d0cfff;
    --surface: #120905;
    --muted-fill: #2a160e;
  }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
body.pref-reduce-motion *, body.pref-reduce-motion *::before, body.pref-reduce-motion *::after { animation: none !important; transition: none !important; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: var(--base); line-height: var(--leading); color: var(--ink); background: var(--bg); }
img, svg { max-width: 100%; display: block; }
svg.icon { display: inline-block; vertical-align: -0.2em; flex-shrink: 0; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--primary-dark); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--primary-deep); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
main:focus, h1:focus { outline: none; box-shadow: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
code, .mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.9em; word-break: break-all; }
mark { background: var(--accent-tint); color: inherit; padding: 0 2px; border-radius: 3px; }
abbr { text-decoration: none; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; margin: 0; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 720px) { .container { padding-inline: 2rem; } }
.narrow { max-width: 760px; }
.narrow-text { max-width: 65ch; }
.section { padding-block: 2.5rem; }
.section-gap { margin-top: 2.5rem; }
.section__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.section__head h1, .section__head h2 { margin: 0; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.lead { font-size: 1.25rem; color: var(--ink-soft); max-width: 60ch; }
.text-warn { color: var(--warn); font-weight: 700; }
.text-success { color: var(--primary-dark); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--ink); color: var(--bg); padding: 0.75rem 1rem; border-radius: var(--radius-sm); }
.skip-link:focus { top: 1rem; }
.main { min-height: 60vh; }
.stack > * + * { margin-top: 1rem; }
.back-link { display: inline-block; margin-bottom: 1rem; font-weight: 700; text-decoration: none; }
.grid-2, .grid-3 { display: grid; gap: 1rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; padding: 0.6rem 1.15rem; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); color: #fff; }
.btn--ghost { background: var(--surface); color: var(--primary-dark); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--primary); background: var(--primary-tint); }
.btn--danger { background: var(--danger-fill); color: #fff; }
.btn--sm { min-height: 40px; padding: 0.35rem 0.9rem; font-size: 0.9375rem; }
.btn--lg { min-height: 56px; padding: 0.8rem 1.6rem; font-size: 1.1rem; }
.btn--block { width: 100%; }
.btn.is-saved { background: var(--primary-tint); border-color: var(--primary); color: var(--primary-deep); }
.icon--filled { fill: currentColor; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--primary-dark); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
form.button_to { display: inline; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
/* User bar: search, the person's own menu and the language toggle. */
.user-bar { background: var(--bg); border-bottom: 1px solid var(--line); }
.user-bar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; padding-block: 0.4rem; }
.header-search { order: 2; flex: 1 1 100%; position: relative; display: flex; align-items: center; }
.header-search .icon { position: absolute; left: 0.9rem; color: var(--ink-soft); pointer-events: none; }
.header-search input[type="search"] { width: 100%; min-height: 44px; padding: 0.4rem 1rem 0.4rem 2.5rem; border: 2px solid var(--field-border); border-radius: 999px; font: inherit; font-size: 1rem; background: var(--surface); color: var(--ink); }
.header-search input[type="search"]::placeholder { color: var(--ink-soft); opacity: 1; }
.user-menu { order: 1; display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.user-menu .btn--small { min-height: 44px; padding: 0.35rem 0.95rem; font-size: 0.95rem; }
/* On small screens the person's links are icons (the name stays available to screen readers). */
.user-menu .nav__link .nav__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.language-form { display: inline; margin: 0; }
.lang-toggle { font-size: 0.95rem; background: none; border: 0; font-family: inherit; }
@media (max-width: 420px) { .lang-toggle .icon { display: none; } }
@media (min-width: 720px) {
  .header-search { order: 0; flex: 1 1 auto; max-width: 440px; }
  .user-menu .nav__link .nav__text { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}
/* Main bar: logo and sections. */
.site-header__inner { position: relative; display: flex; align-items: center; gap: 1rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.45rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; margin: 0; }
.brand__mark { flex-shrink: 0; display: block; width: 40px; height: 40px; color: var(--brand); }
.brand--small .brand__mark { width: 32px; height: 32px; }
/* An uploaded logo (Settings › Logo and icons): its own colours, any width, the mark's height. */
.brand__logo { flex-shrink: 0; display: block; width: auto; max-width: 240px; object-fit: contain; }
.brand--small { font-size: 1.15rem; }
/* A long site title wraps instead of pushing the menu off narrow screens. */
.site-header .brand { min-width: 0; }
.brand__name { overflow-wrap: anywhere; line-height: 1.15; }
.menu-toggle { margin-left: auto; min-width: 48px; min-height: 48px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 1rem; flex-direction: column; gap: 0.25rem; }
.site-nav.is-open { display: flex; }
.nav__link { position: relative; display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; padding: 0.4rem 0.7rem; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1rem; cursor: pointer; }
.nav__link:hover { background: var(--primary-tint); }
.nav__link.is-active { color: var(--primary); background: var(--primary-tint); }
.nav-badge { position: absolute; top: 2px; left: 22px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--primary); color: #fff; font-size: 0.75rem; display: inline-flex; align-items: center; justify-content: center; }
.nav-badge.is-hidden { display: none; }
.account-menu { position: relative; }
.account-menu summary { list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu__panel { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.5rem; background: var(--surface); position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 230px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.account-menu__panel a, .account-menu__panel .link-button { padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); text-align: left; }
.account-menu__panel a:hover { background: var(--primary-tint); }
@media (min-width: 1000px) {
  .menu-toggle { display: none; }
  .site-nav { display: flex; position: static; flex-direction: row; align-items: center; padding: 0; border: 0; margin-left: auto; }
}
.verify-banner { background: var(--warn-tint); font-size: 0.95rem; padding: 0.5rem 0; }
.verify-banner .container { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* ---------- Flash & alerts ---------- */
.flash { border-bottom: 1px solid var(--line); }
.flash--notice { background: var(--primary-tint); }
.flash--error { background: var(--danger-tint); }
.flash__inner { display: flex; align-items: center; gap: 0.75rem; padding-block: 0.75rem; }
.flash__inner p { margin: 0; flex: 1; font-weight: 700; }
.flash__close { border: 0; background: transparent; cursor: pointer; min-width: 40px; min-height: 40px; border-radius: 50%; color: inherit; }
.alert { padding: 1rem 1.25rem; border-radius: var(--radius); border-left: 6px solid; margin: 1rem 0; }
.alert ul { margin: 0.25rem 0 0; padding-left: 1.25rem; }
.alert p:last-child { margin: 0; }
.alert--error { background: var(--danger-tint); border-color: var(--danger); }
.alert--info { background: var(--info-tint); border-color: var(--info); }
.alert--warn { background: var(--warn-tint); border-color: var(--warn); }
.field-error { color: var(--danger); font-weight: 700; }

/* ---------- Hero ----------
   The logo's hub and spokes at page scale: a purple network of connected people beside the
   headline. Light background so the brand colours read as they do in the logo. */
.hero { position: relative; overflow: hidden; background: var(--surface); border-bottom: 1px solid var(--line); }
.hero__inner { position: relative; display: grid; gap: 2rem; padding-block: 3.5rem 4.5rem; }
.hero__text { position: relative; z-index: 1; max-width: 640px; min-width: 0; }
.hero h1 { font-size: clamp(2.5rem, 7vw, 4.6rem); line-height: 1.02; letter-spacing: -0.03em; margin-bottom: 1.25rem; color: var(--ink); }
.hero .lead { color: var(--ink-soft); }
.hero-search { position: relative; z-index: 2; display: flex; align-items: center; gap: 0.5rem; max-width: 600px; margin: 2rem 0 1.25rem; padding: 0.375rem 0.375rem 0.375rem 1.15rem; background: var(--surface); border: 2px solid var(--field-border); border-radius: 999px; box-shadow: 0 6px 18px rgba(28, 21, 48, .08); transition: border-color .15s, box-shadow .15s; }
.hero-search:hover { border-color: var(--primary); }
/* One focus ring around the whole bar, not one inside the field. */
.hero-search:focus-within { border-color: var(--primary); box-shadow: var(--focus); }
.hero-search > .icon { color: var(--ink-soft); }
.hero-search input[type="search"] { flex: 1; width: 100%; min-height: 0; border-radius: 0; min-width: 0; height: 52px; border: 0; padding: 0 0.25rem; font: inherit; font-size: 1.125rem; color: var(--ink); background: transparent; }
.hero-search input[type="search"]::placeholder { color: var(--ink-soft); opacity: 1; }
.hero-search input[type="search"]:focus-visible { outline: none; box-shadow: none; }
.hero-search__submit { flex-shrink: 0; min-height: 52px; padding-inline: 1.6rem; font-size: 1.05rem; }
@media (max-width: 420px) { .hero-search { padding-left: 0.9rem; } .hero-search__submit { padding-inline: 1.1rem; } }
.hero__quick { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hero__quick a { color: var(--primary-dark); background: var(--surface); border: 2px solid var(--line); border-radius: 999px; padding: 0.35rem 0.9rem; text-decoration: none; font-size: 0.95rem; font-weight: 700; }
.hero__quick a:hover { border-color: var(--primary); background: var(--primary-tint); }
.hero__art { position: absolute; inset: 0; pointer-events: none; }
.hero__art svg { position: absolute; right: -4%; top: 50%; transform: translateY(-50%); width: min(52vw, 620px); height: auto; }
.hero-spoke { stroke: var(--brand); stroke-width: 12; stroke-linecap: round; opacity: .9; }
.hero-node { fill: var(--brand); }
.hero-hub { fill: none; stroke: var(--brand); stroke-width: 30; }
/* One orchestrated moment: the spokes reach out from the hub once on load. */
@media (prefers-reduced-motion: no-preference) {
  body:not(.pref-reduce-motion) .hero-spoke { stroke-dasharray: 400; stroke-dashoffset: 400; animation: reach-out .9s cubic-bezier(.3,.7,.2,1) forwards; }
  body:not(.pref-reduce-motion) .hero-spoke:nth-of-type(2n) { animation-delay: .12s; }
  body:not(.pref-reduce-motion) .hero-spoke:nth-of-type(3n) { animation-delay: .24s; }
}
@keyframes reach-out { to { stroke-dashoffset: 0; } }
@media (max-width: 860px) {
  .hero__art svg { width: 110vw; right: -50vw; top: auto; bottom: -25%; transform: none; opacity: .3; }
}

/* ---------- Home pieces ---------- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
.category-tile { display: flex; flex-direction: column; gap: 0.6rem; padding: 1rem; min-height: 112px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; }
.category-tile:hover { border-color: var(--tile); }
.category-tile__icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--tile); }
.upcoming-strip { display: flex; gap: 0.75rem; overflow-x: auto; padding-bottom: 0.5rem; }
.upcoming-chip { display: flex; flex-direction: column; gap: 0.25rem; min-width: 240px; padding: 1rem; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--primary); color: var(--ink); text-decoration: none; }
.band { background: var(--accent-tint); padding-block: 3rem; margin-top: 1rem; }
.steps { display: grid; gap: 1.5rem; counter-reset: none; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { position: relative; }
.steps__num { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: 1.3rem; margin-bottom: 0.75rem; box-shadow: 0 0 0 6px var(--accent-tint); }
/* Steps are a real sequence, so they're joined like the logo's spokes. */
@media (min-width: 760px) {
  .steps li:not(:last-child)::after { content: ""; position: absolute; top: 25px; left: 52px; right: -1.5rem; height: 6px; border-radius: 3px; background: var(--primary); opacity: .35; }
}
.organizer-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--gap); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card__link:hover .card__title { text-decoration: underline; text-underline-offset: 4px; }
.card__link:focus-visible { box-shadow: var(--focus); }
.card__media { position: relative; aspect-ratio: 16 / 10; background: var(--primary-tint); }
.card__img { width: 100%; height: 100%; object-fit: cover; }
.placeholder-img { display: grid; place-items: center; color: #fff; background: var(--ph); }
.card__format { position: absolute; left: 0.75rem; bottom: 0.75rem; }
.card__body { display: flex; flex-direction: column; gap: 0.5rem; padding: 1rem 1.1rem 1.1rem; flex: 1; }
.card__title { font-size: 1.2rem; margin: 0; }
.card__summary { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.card__meta { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.95rem; }
.card__meta li { display: flex; align-items: center; gap: 0.4rem; }
.card__footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 0.5rem; }
.price { font-weight: 700; color: var(--primary-dark); }

/* ---------- Badges, chips, stars ---------- */
.badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.85rem; font-weight: 700; background: var(--primary-tint); color: var(--primary-dark); }
.card__format { background: var(--surface); background: color-mix(in srgb, var(--surface) 95%, transparent); color: var(--ink); }
.badge--confirmed, .badge--approved, .badge--published, .badge--attended, .badge--active, .badge--cleared, .badge--resolved, .badge--verified { background: var(--primary-tint); color: var(--primary-dark); }
.badge--requested, .badge--pending, .badge--submitted, .badge--in-review, .badge--pending-review, .badge--waitlisted, .badge--reviewing, .badge--draft, .badge--featured { background: var(--warn-tint); color: var(--warn); }
.badge--cancelled, .badge--declined, .badge--rejected, .badge--suspended, .badge--failed, .badge--no-show, .badge--expired, .badge--revoked { background: var(--danger-tint); color: var(--danger); }
.badge--paused, .badge--archived, .badge--dismissed, .badge--completed, .badge--not-started, .badge--scheduled { background: var(--muted-fill); color: var(--ink-soft); }
.badge--administrator, .badge--program-manager { background: var(--accent-tint); color: var(--accent-dark); }
.badge--client { background: var(--muted-fill); color: var(--ink); }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0.3rem 0.9rem; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font: inherit; font-size: 0.95rem; font-weight: 700; cursor: pointer; }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-check span { display: inline-flex; align-items: center; min-height: 40px; padding: 0.3rem 0.9rem; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); font-size: 0.95rem; font-weight: 700; }
.chip-check input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-check input:focus-visible + span { box-shadow: var(--focus); }
.star--on { color: var(--primary); fill: var(--primary); stroke: var(--primary-dark); }
.star--off { color: var(--star-off); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); display: inline-block; flex-shrink: 0; }

/* ---------- Forms ---------- */
.form label, .field label { font-weight: 700; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="tel"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], select, textarea {
  width: 100%; min-height: 48px; padding: 0.55rem 0.85rem; border: 2px solid var(--field-border); border-radius: var(--radius-sm); font: inherit; font-size: 1.05rem; background: var(--surface); color: var(--ink);
}
textarea { resize: vertical; line-height: 1.5; }
select[multiple] { min-height: 120px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--info); }
input[type="color"] { width: 64px; height: 48px; padding: 2px; border: 2px solid var(--line); border-radius: var(--radius-sm); }
.hint { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 700; font-size: 1.1rem; padding: 0; margin-bottom: 0.5rem; }
.form-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.form-section > legend { float: left; width: 100%; font-size: 1.25rem; }
.form-section > legend + * { clear: both; }
.form-section > * + * { margin-top: 1rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.check { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.35rem 0; font-weight: 400 !important; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0.15rem 0 0; accent-color: var(--primary); flex-shrink: 0; }
.check--large { padding: 0.75rem 1rem; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 0.5rem; }
.check--large:has(input:checked) { border-color: var(--primary); background: var(--primary-tint); }
.check .count { margin-left: auto; color: var(--ink-soft); font-size: 0.85rem; }
.check-grid { display: grid; gap: 0.25rem 1rem; }
@media (min-width: 640px) { .check-grid { grid-template-columns: 1fr 1fr; } }
.radio-cards { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; inset: 0; }
.radio-card span { display: inline-flex; min-height: 48px; align-items: center; padding: 0.5rem 1.2rem; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-weight: 700; cursor: pointer; }
.radio-card input:checked + span { border-color: var(--primary); background: var(--primary-tint); }
.radio-card input:focus-visible + span { box-shadow: var(--focus); }
.toggle { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; font-weight: 400 !important; }
.toggle input { position: absolute; opacity: 0; }
.toggle__ui { flex-shrink: 0; width: 52px; height: 30px; border-radius: 15px; background: var(--field-border); position: relative; transition: background .15s; margin-top: 2px; }
.toggle__ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked + .toggle__ui { background: var(--primary); }
.toggle input:checked + .toggle__ui::after { transform: translateX(22px); }
.toggle input:focus-visible + .toggle__ui { box-shadow: var(--focus); }
.theme-picker { border: 0; padding: 0; margin: 0 0 0.5rem; }
.theme-picker legend { padding: 0; margin-bottom: 0.25rem; }
.theme-picker__options { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; }
.theme-option { position: relative; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; font-weight: 700; }
.theme-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.theme-option:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.theme-option:has(input:focus-visible) { box-shadow: var(--focus); }
.theme-option__swatch { height: 56px; border-radius: var(--radius-sm); border: 1px solid var(--field-border); }
.theme-option--light .theme-option__swatch { background: linear-gradient(135deg, #ffffff 0 55%, #aa33cc 55% 78%, #296dff 78%); }
.theme-option--dark .theme-option__swatch { background: linear-gradient(135deg, #1e1430 0 55%, #a633c9 55% 78%, #6b97ff 78%); }
.theme-option--system .theme-option__swatch { background: linear-gradient(90deg, #ffffff 0 50%, #1e1430 50%); }
/* Colour swatches: light half, dark half, with the colour across the middle. */
.theme-option--purple .theme-option__swatch { background: linear-gradient(135deg, #ffffff 0 30%, #aa33cc 30% 70%, #1e1430 70%); }
.theme-option--blue .theme-option__swatch { background: linear-gradient(135deg, #ffffff 0 30%, #020066 30% 70%, #11112f 70%); }
.theme-option--orange .theme-option__swatch { background: linear-gradient(135deg, #ffffff 0 30%, #ff6633 30% 70%, #26140d 70%); }
.theme-option__swatch--purple { background: linear-gradient(135deg, #ffffff 0 30%, #aa33cc 30% 70%, #1e1430 70%) !important; }
.theme-option__swatch--blue { background: linear-gradient(135deg, #ffffff 0 30%, #020066 30% 70%, #11112f 70%) !important; }
.theme-option__swatch--orange { background: linear-gradient(135deg, #ffffff 0 30%, #ff6633 30% 70%, #26140d 70%) !important; }
.avatar-field { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* ---------- Auth ---------- */
.auth { display: grid; place-items: center; padding-block: 3rem; }
.auth__card { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2rem; }
.auth__card--wide { max-width: 680px; }

/* ---------- Explore ---------- */
.explore { padding-block: 2rem 3rem; }
.explore__head h1 { margin-bottom: 0.25rem; }
.explore__layout { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.filters-toggle { justify-self: start; }
.filters { display: none; }
.filters.is-open { display: block; }
@media (min-width: 960px) {
  .explore__layout { grid-template-columns: 290px 1fr; align-items: start; }
  .filters-toggle { display: none; }
  .filters { display: block; position: sticky; top: 148px; max-height: calc(100vh - 160px); overflow-y: auto; padding-right: 0.5rem; }
}
.filters__form { display: flex; flex-direction: column; gap: 1rem; }
.filter-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.filter-group legend { float: left; width: 100%; }
.filter-group legend + * { clear: both; }
.filter-sub { font-weight: 700; font-size: 0.95rem; margin: 0.75rem 0 0.25rem; color: var(--ink-soft); }
.date-range { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 0.6rem; align-items: center; }
.near-me { margin: 0.75rem 0; display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-start; }
.results-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.sort-form { display: flex; align-items: center; gap: 0.5rem; }
.sort-form label { font-weight: 700; white-space: nowrap; }
.sort-form select { width: auto; }
.view-toggle { display: flex; gap: 0.4rem; }
.autocomplete { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20; margin: 0; padding: 0.35rem; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); }
.autocomplete li { padding: 0.6rem 0.9rem; border-radius: var(--radius-sm); cursor: pointer; }
.autocomplete li[aria-selected="true"], .autocomplete li:hover { background: var(--primary-tint); }

/* ---------- Maps ---------- */
.map { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: var(--primary-tint); z-index: 0; }
.map--explore { height: 560px; }
.map--small { height: 260px; margin-top: 0.75rem; }
.map-pin span { display: block; width: 28px; height: 28px; background: var(--primary); border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0,0,0,.3); }

/* ---------- Event page ---------- */
.event { padding-block: 1.5rem 3rem; }
.breadcrumbs { font-size: 0.95rem; margin-bottom: 0.75rem; color: var(--ink-soft); }
.event__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.event__tagline { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; color: var(--ink-soft); }
.event__tagline span, .event__tagline a { display: inline-flex; align-items: center; gap: 0.35rem; }
.event__actions { display: flex; gap: 0.5rem; }
.gallery { display: grid; gap: 0.5rem; margin: 1.25rem 0 2rem; border-radius: var(--radius-lg); overflow: hidden; }
.gallery__img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }
@media (min-width: 760px) {
  .gallery--2, .gallery--3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; height: 440px; }
  .gallery--2 .gallery__img--main, .gallery--3 .gallery__img--main { grid-row: span 2; }
  .gallery--2 .gallery__img, .gallery--3 .gallery__img { aspect-ratio: auto; }
  .gallery--2 .gallery__img:not(.gallery__img--main) { grid-row: span 2; }
  .gallery--1 .gallery__img, .gallery--0 .gallery__img { max-height: 460px; }
}
.event__layout { display: grid; gap: 2rem; }
@media (min-width: 960px) { .event__layout { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } .event__side { position: sticky; top: 148px; } }
.event__main > section { margin-bottom: 2.25rem; max-width: 70ch; }
.plain-box { background: var(--accent-tint); border-radius: var(--radius); padding: 1.25rem 1.5rem; font-size: 1.15rem; }
.plain-box.is-emphasized { font-size: 1.3rem; border: 3px solid var(--accent); }
.plain-box h2 { font-size: 1.2rem; display: flex; gap: 0.4rem; align-items: center; }
.plain-box p { margin: 0; }
.prose p { margin-bottom: 1em; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
.expect-list { padding: 0; margin: 0; list-style: none; counter-reset: step; }
.expect-list li { counter-increment: step; display: flex; gap: 0.9rem; align-items: baseline; padding: 0.6rem 0; border-bottom: 1px dashed var(--line); }
.expect-list li::before { content: counter(step); flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-tint); color: var(--primary-dark); font-weight: 700; display: inline-grid; place-items: center; }
.access-section { background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.access-section h2 { display: flex; align-items: center; gap: 0.5rem; }
.access-group { font-size: 1rem; color: var(--ink-soft); margin: 1rem 0 0.4rem; }
.access-list { display: grid; gap: 0.6rem; }
.access-list li { display: flex; gap: 0.6rem; align-items: flex-start; }
.access-list li div { display: flex; flex-direction: column; }
.access-list--plain { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.organizer-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.organizer-card__body { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.organizer-card__name { font-size: 1.25rem; font-weight: 700; margin: 0; }
.organizer-card p { margin-bottom: 0.4rem; }
.contact-organizer summary { list-style: none; display: inline-flex; margin-top: 0.5rem; }
.contact-organizer summary::-webkit-details-marker { display: none; }
.contact-organizer form { margin-top: 1rem; }
.booking-panel { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; }
.booking-panel__price { font-size: 1.6rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; }
.booking-panel__title { font-size: 1.15rem; margin-top: 1rem; }
.date-list { display: flex; flex-direction: column; gap: 0.5rem; max-height: 520px; overflow-y: auto; }
.date-option { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: var(--radius); }
.date-option p { margin: 0; }
.date-option__day { font-weight: 700; }
.date-option.is-full { background: var(--bg); }
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar--initials { position: relative; overflow: hidden; display: inline-grid; place-items: center; background: var(--primary); color: #fff; font-weight: 700; }
.avatar__gravatar { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* ---------- Bookings ---------- */
.summary-box { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1.5rem; }
.summary-box p { margin: 0 0 0.2rem; display: flex; gap: 0.4rem; align-items: center; }
.summary-box__title { font-weight: 700; font-size: 1.15rem; }
.summary-box__img { width: 120px; height: 90px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.booking-list { display: flex; flex-direction: column; gap: 0.75rem; }
.booking-row { display: grid; grid-template-columns: 80px 1fr; gap: 1rem; align-items: center; padding: 0.9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.booking-row__img { width: 80px; height: 64px; border-radius: var(--radius-sm); object-fit: cover; }
.booking-row__body p { margin: 0; }
.booking-row__title { font-weight: 700; font-size: 1.1rem; }
.booking-row__status { grid-column: 1 / -1; display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
@media (min-width: 720px) { .booking-row { grid-template-columns: 80px 1fr auto; } .booking-row__status { grid-column: auto; justify-content: flex-end; } }
.ticket { background: var(--surface); border: 2px solid var(--primary); border-radius: var(--radius-lg); overflow: hidden; }
.ticket__head { background: var(--primary-tint); padding: 1.5rem; border-bottom: 2px dashed var(--primary); }
.ticket__head h1 { margin: 0.5rem 0; }
.ticket__head .lead { margin: 0; color: var(--ink); }
.ticket__details { margin: 0; padding: 1.5rem; display: grid; gap: 1rem; }
.ticket__details > div { display: grid; gap: 0.2rem; }
@media (min-width: 640px) { .ticket__details > div { grid-template-columns: 180px 1fr; } }
.ticket__details dt { font-weight: 700; color: var(--ink-soft); }
.ticket__details dd { margin: 0; }
.ticket .map { margin: 0 1.5rem 1rem; width: auto; }
.ticket__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 1.5rem 1.5rem; }
.cancel-box, .danger-zone { margin: 1.5rem; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.danger-zone { margin: 2rem 0 0; border-color: var(--danger); }
.cancel-box summary, .danger-zone summary { cursor: pointer; font-weight: 700; color: var(--danger); }
.cancel-box form, .danger-zone form { margin-top: 1rem; }
.calendar-sub { position: relative; }
.calendar-sub summary { list-style: none; }
.calendar-sub__panel { margin-top: 0.5rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); max-width: 420px; }

/* ---------- Messages & notifications ---------- */
.conversation-list, .notification-list, .people-list, .session-list, .manage-list { display: flex; flex-direction: column; gap: 0.5rem; }
.conversation-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 0.9rem; align-items: center; padding: 0.9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.conversation-row p { margin: 0; }
.conversation-row.is-unread { border-color: var(--primary); border-width: 2px; }
.conversation-row__name { font-weight: 700; }
.chat__head h1 { font-size: 1.6rem; margin-bottom: 0.25rem; }
.chat__messages { display: flex; flex-direction: column; gap: 0.9rem; height: min(60vh, 560px); overflow-y: auto; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 1rem 0; }
.message { display: flex; gap: 0.6rem; align-items: flex-end; max-width: 85%; }
.message__bubble { background: var(--bg); border-radius: var(--radius) var(--radius) var(--radius) 4px; padding: 0.6rem 0.9rem; }
.message__meta { margin: 0 0 0.2rem; font-size: 0.9rem; display: flex; gap: 0.5rem; }
.message__body p { margin: 0 0 0.4rem; }
.message__body p:last-child { margin: 0; }
.message--mine { align-self: flex-end; flex-direction: row-reverse; }
.message--mine .message__bubble { background: var(--primary-tint); border-radius: var(--radius) var(--radius) 4px var(--radius); }
.chat__form { display: flex; gap: 0.6rem; align-items: flex-end; }
.chat__form textarea { flex: 1; min-height: 56px; }
.notification { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.notification.is-unread { border-left: 6px solid var(--primary); }
.notification__form { display: block; }
.notification__link { width: 100%; display: flex; gap: 0.9rem; align-items: center; padding: 0.9rem 1rem; background: none; border: 0; font: inherit; text-align: left; color: var(--ink); cursor: pointer; border-radius: var(--radius); }
.notification__text { display: flex; flex-direction: column; flex: 1; }
.notification__icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary); flex-shrink: 0; }
.person-row { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; padding: 0.9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.person-row > div:nth-child(2) { flex: 1; min-width: 200px; }
.person-row p { margin: 0.25rem 0 0; }
.inline-perms { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }

/* ---------- Host & admin ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.75rem; margin-bottom: 2rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.stat a { color: inherit; text-decoration: none; display: block; }
.stat--alert { border-color: var(--primary); border-width: 2px; }
.stat__num { display: block; font-size: 2rem; font-weight: 700; color: var(--primary-dark); line-height: 1.1; }
.stat__label { color: var(--ink-soft); font-size: 0.95rem; }
.dash-grid { display: grid; gap: 1.25rem; margin-bottom: 1.5rem; }
@media (min-width: 900px) { .dash-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
.panel h2 { font-size: 1.25rem; }
.session-list li { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.session-list p { margin: 0; }
.manage-row { display: grid; grid-template-columns: 72px 1fr auto; gap: 1rem; align-items: center; padding: 0.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.manage-row p { margin: 0; }
.manage-row__img { width: 72px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); }
.photo-grid { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.photo-grid img { width: 120px; height: 90px; object-fit: cover; border-radius: var(--radius-sm); }
.photo-grid li { display: flex; flex-direction: column; gap: 0.25rem; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: block; overflow-x: auto; }
@media (min-width: 760px) { .table { display: table; } }
.table th, .table td { padding: 0.75rem 0.9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-size: 1rem; }
.table thead th { background: var(--primary-tint); font-size: 0.95rem; }
.table tr.is-muted td { color: var(--ink-soft); }
.attendee summary { cursor: pointer; display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.attendee p { margin: 0.25rem 0; }
.inline-cancel summary { list-style: none; }
.inline-cancel form { margin-top: 0.5rem; min-width: 240px; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.inline-search input { min-width: 240px; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.25rem; margin: 0; }
.dl dt { font-weight: 700; color: var(--ink-soft); }
.dl dd { margin: 0; }
.dl dd p:last-child { margin: 0; }
.plain-list { padding-left: 1.2rem; margin: 0; }
.auth__divider { display: flex; align-items: center; gap: 0.75rem; color: var(--ink-soft); font-size: 0.95rem; margin: 0.5rem 0; }
.auth__divider::before, .auth__divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.plain-list li { margin-bottom: 0.4rem; }
.host-steps { list-style: none; padding: 0; }
.host-steps li { display: flex; align-items: center; gap: 0.5rem; color: var(--ink-soft); }
.host-steps li.is-done { color: var(--ink); }
.host-steps li.is-done .icon { color: var(--primary); }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: middle; }
.admin-thumb { width: 96px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); display: inline-block; margin: 0 0.4rem 0.4rem 0; }
.bar-table { width: 100%; border-collapse: collapse; }
.bar-table th { text-align: left; font-weight: 400; color: var(--ink-soft); width: 60px; padding: 0.2rem 0; font-size: 0.9rem; }
.bar-table td { padding: 0.2rem 0; display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.bar { display: inline-block; height: 14px; min-width: 2px; background: var(--primary); border-radius: 0 7px 7px 0; }
body.admin { background: var(--bg); }
.admin-shell { display: grid; min-height: 100vh; }
@media (min-width: 960px) { .admin-shell { grid-template-columns: 250px 1fr; } }
.admin-nav { background: var(--surface); border-right: 1px solid var(--line); padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 0.15rem; }
.admin-nav__label { color: var(--ink-soft); margin: 0.25rem 0 0.75rem; font-size: 0.9rem; }
.admin-main { padding: 1.5rem 1rem 3rem; min-width: 0; }
@media (min-width: 720px) { .admin-main { padding: 2rem 2.5rem 3rem; } }

/* ---------- Profile, empty, pagination, footer ---------- */
.profile-head { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; margin-bottom: 2rem; }
.profile-head h1 { margin-bottom: 0.25rem; }
.profile-head .lead { margin-bottom: 0.25rem; }
.empty-state { text-align: center; padding: 3rem 1.5rem; background: var(--surface); border: 2px dashed var(--line); border-radius: var(--radius-lg); }
.empty-state__icon { width: 80px; height: 80px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary-dark); }
.empty-state h2 { font-size: 1.4rem; }
.empty-state p { max-width: 46ch; margin-inline: auto; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.5rem; margin-top: 2rem; }
.pagination ol { display: flex; gap: 0.3rem; }
.pagination__page, .pagination__step { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 0.6rem; border-radius: var(--radius-sm); border: 2px solid var(--line); background: var(--surface); text-decoration: none; font-weight: 700; color: var(--ink); }
.pagination__page.is-current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination__gap { padding: 0 0.3rem; }
.site-footer { position: relative; overflow: hidden; background: var(--surface); border-top: 1px solid var(--line); color: var(--ink); margin-top: 3rem; padding-block: 3rem; font-size: 1rem; }
/* A thin echo of the logo's arc along the top edge. */
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, var(--primary) 0 50%, var(--accent) 50% 100%); }
.site-footer a { color: var(--primary-dark); display: block; margin-bottom: 0.4rem; }
.site-footer .muted { color: var(--ink-soft); max-width: 40ch; }
/* The byline sits on the very next line under the site name: the 40px logo makes the name's row
   taller than its text, so the byline is pulled up by that difference. */
.site-footer .brand { margin-bottom: 0; }
.footer-byline { margin: -0.45rem 0 0.9rem; padding-left: calc(40px + 0.5rem); font-weight: 700; font-size: 0.95rem; line-height: 1.3; color: var(--ink-soft); }
.footer-slogan { color: var(--ink); }
.site-footer__grid { display: grid; gap: 2rem; }
@media (min-width: 760px) { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-heading { font-size: 1rem; color: var(--ink); margin-bottom: 0.75rem; }
.site-footer__grid > div:last-child a { display: inline; }

@media print {
  .site-header, .site-footer, .ticket__actions, .cancel-box, .flash-region { display: none !important; }
  .ticket { border: 1px solid #000; }
}

/* ---------- Admin sign-in (Microsoft Entra ID) ---------- */
.admin-auth { background: var(--bg); }
.admin-auth__main { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.admin-auth__card { width: 100%; max-width: 30rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 5vw, 2.5rem); box-shadow: var(--shadow); }
.admin-auth__card h1 { font-size: 1.75rem; }
.admin-auth__card .brand { color: var(--ink-soft); }
.admin-auth__card .button_to { display: block; }

/* ---------- Tags ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0; }
.tag { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 32px; padding: 0.15rem 0.7rem; border-radius: 999px; background: var(--accent-tint); color: var(--accent-dark); font-size: 0.9rem; font-weight: 700; text-decoration: none; }
a.tag:hover { text-decoration: underline; text-underline-offset: 3px; }
.tag--lg { min-height: 44px; font-size: 1rem; padding: 0.3rem 0.95rem; }
.tag__count { font-weight: 400; color: var(--ink-soft); font-size: 0.85rem; }
.tag--chip { padding-right: 0.25rem; }
.tag__remove { display: inline-grid; place-items: center; min-width: 28px; min-height: 28px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1.1rem; cursor: pointer; }
.tag__remove:hover { background: var(--surface); }
.tag-list--editable:empty { display: none; }
.tag-suggestions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ---------- Group spaces ---------- */
.group-head { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 1.5rem; }
.group-head__cover { display: block; width: 100%; aspect-ratio: 4 / 1; object-fit: cover; }
.group-head__body { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; padding: 1.25rem 1.5rem 0.75rem; }
.group-head__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0 0 0.25rem; font-size: 0.95rem; color: var(--ink-soft); }
.group-head__title { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; line-height: 1.15; margin: 0 0 0.25rem; }
.group-head__title a { color: var(--ink); text-decoration: none; }
.group-head__title a:hover { text-decoration: underline; }
.group-head .muted { margin: 0; }
.tabs { display: flex; gap: 0.25rem; overflow-x: auto; padding: 0 1rem; border-top: 1px solid var(--line); }
.tabs__link { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 52px; padding: 0 0.9rem; border-bottom: 4px solid transparent; color: var(--ink); text-decoration: none; font-weight: 700; white-space: nowrap; }
.tabs__link:hover { background: var(--primary-tint); }
.tabs__link.is-active { border-bottom-color: var(--primary); color: var(--primary-dark); }
.tabs__badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--primary); color: #fff; font-size: 0.8rem; display: inline-grid; place-items: center; }
.group-layout { display: grid; gap: 1.5rem; }
@media (min-width: 960px) { .group-layout { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.group-card__placeholder { --ph: var(--primary); background: linear-gradient(135deg, var(--primary) 0 60%, var(--accent) 60%); }
.join-request { position: relative; }
.join-request summary { list-style: none; }
.join-request summary::-webkit-details-marker { display: none; }
.join-request__panel { position: absolute; right: 0; z-index: 10; width: min(360px, 90vw); margin-top: 0.5rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.item-list { display: flex; flex-direction: column; gap: 0.5rem; }
.item-row { display: flex; align-items: flex-start; gap: 0.85rem; padding: 0.85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.item-row > div { flex: 1; min-width: 0; }
.item-row > .icon { flex-shrink: 0; margin-top: 0.2rem; color: var(--primary-dark); }
.item-row__title { font-weight: 700; margin: 0; font-size: 1.05rem; }
.item-row p { margin: 0.2rem 0 0; }
.panel .item-row { border-color: var(--line); background: var(--bg); }
.link-list li { padding: 0.3rem 0; }
.people-list--compact { gap: 0.35rem; }
.person-row--compact { padding: 0.5rem 0.75rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.inline-form select { width: auto; min-height: 40px; }
.form-thumb { display: block; border-radius: var(--radius-sm); margin-bottom: 0.5rem; height: auto; max-width: 100%; }

/* Forum */
.topic__head h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.post, .post--opening { display: flex; gap: 0.9rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.post--opening { border-width: 2px; border-color: var(--primary); margin-bottom: 1.5rem; }
.post__main { flex: 1; min-width: 0; }
.post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 0.5rem; }
.post__permalink { color: var(--ink-soft); }
.post__body { overflow-wrap: anywhere; }
.post__body p:last-child { margin-bottom: 0; }
.post__actions { margin-top: 0.5rem; }
.post--hidden { opacity: .75; border-style: dashed; }
.post-list { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }

/* Documents */
.doc-row { align-items: center; }
.doc-row__thumb { width: 64px; height: 44px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.doc-row__icon { flex-shrink: 0; display: inline-grid; place-items: center; width: 52px; height: 44px; border-radius: var(--radius-sm); background: var(--primary-tint); color: var(--primary-dark); font-size: 0.75rem; font-weight: 700; letter-spacing: .03em; }
.doc-detail__preview img { max-width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.upload-progress { width: 100%; height: 12px; accent-color: var(--primary); }

/* Wiki */
.wiki__head h1 { margin-bottom: 0.25rem; }
.wiki__layout { display: grid; gap: 1.5rem; margin-top: 1rem; }
@media (min-width: 960px) { .wiki__layout:has(.wiki-toc) { grid-template-columns: 240px minmax(0, 1fr); align-items: start; } .wiki-toc { position: sticky; top: 148px; } }
.wiki__body { max-width: 72ch; }
.wiki__body h2, .wiki__body h3, .wiki__body h4 { scroll-margin-top: 150px; margin-top: 1.5em; }
.wiki-toc__title { font-size: 1rem; }
.wiki-toc ol { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.95rem; }
.wiki-toc__item--3 { padding-left: 0.9rem; }
.wiki-toc__item--4 { padding-left: 1.8rem; }
.wiki-checklist { list-style: none; padding-left: 0 !important; }
.wiki-checklist li { display: flex; gap: 0.4rem; }
.wiki-checklist li.is-done { color: var(--ink-soft); }
.wiki-checklist__box { font-size: 1.2rem; line-height: 1.3; }
.wiki-quote { margin: 1.25rem 0; padding: 0.5rem 0 0.5rem 1.25rem; border-left: 6px solid var(--accent); }
.wiki-quote blockquote { margin: 0; font-size: 1.15rem; }
.wiki-quote figcaption { color: var(--ink-soft); }
.wiki-callout { margin: 1.25rem 0; padding: 1rem 1.25rem; border-radius: var(--radius); border-left: 6px solid var(--info); background: var(--info-tint); }
.wiki-callout p { margin: 0; }
.wiki-callout--tip { border-color: var(--primary); background: var(--primary-tint); }
.wiki-callout--warning { border-color: var(--warn); background: var(--warn-tint); }
.wiki-code, .mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.95rem; }
.wiki-code { padding: 1rem; overflow-x: auto; border-radius: var(--radius-sm); background: var(--muted-fill); }
.wiki-image { margin: 1.5rem 0; }
.wiki-image img { max-width: 100%; height: auto; border-radius: var(--radius); }
.wiki-image figcaption { color: var(--ink-soft); font-size: 0.95rem; margin-top: 0.4rem; }
.wiki-file { display: inline-flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; margin: 0.5rem 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; }
.wiki-link--new { color: var(--danger); text-decoration-style: dashed; }
.wiki-tree--nested { margin: 0.5rem 0 0 1.5rem; padding-left: 1rem; border-left: 3px solid var(--line); }
.wiki-tree > li + li { margin-top: 0.5rem; }
.wiki-diff { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.95rem; }
.wiki-diff li { padding: 0.25rem 0.6rem; border-radius: var(--radius-sm); }
.wiki-diff__added { background: var(--primary-tint); }
.wiki-diff__removed { background: var(--danger-tint); text-decoration: line-through; }

/* Block editor */
.editor-help summary { cursor: pointer; font-weight: 700; }
.block-editor__blocks { display: flex; flex-direction: column; gap: 0.6rem; }
.editor-block fieldset { padding: 0.6rem 0.75rem 0.75rem; border: 2px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.editor-block:focus-within fieldset { border-color: var(--accent); }
.editor-block__legend { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.editor-block__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; margin-bottom: 0.5rem; }
.editor-block__toolbar select { width: auto; min-height: 36px; padding: 0.2rem 0.5rem; font-size: 0.9rem; }
.editor-block__type { font-size: 0.85rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.editor-block__spacer { flex: 1; }
.editor-block__tool { display: inline-grid; place-items: center; min-width: 36px; min-height: 36px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; list-style: none; }
.editor-block__tool::-webkit-details-marker { display: none; }
.editor-block__tool:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-tint); }
.editor-block__tool:disabled { opacity: .4; cursor: default; }
.editor-block__insert { position: relative; }
.editor-block__menu { position: absolute; right: 0; z-index: 20; display: flex; flex-direction: column; min-width: 180px; margin-top: 0.3rem; padding: 0.35rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.editor-block__menu button { padding: 0.5rem 0.75rem; border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.editor-block__menu button:hover, .editor-block__menu button:focus-visible { background: var(--primary-tint); }
.editor-block__body > * + * { margin-top: 0.5rem; }
.editor-block__body textarea { min-height: 48px; overflow: hidden; }
.editor-block__row { display: flex; gap: 0.5rem; }
.editor-block__row select { width: auto; }
.editor-heading { font-weight: 700; }
.editor-heading--2 { font-size: 1.5rem; }
.editor-heading--3 { font-size: 1.25rem; }
.editor-block--quote fieldset { border-left: 6px solid var(--accent); }
.editor-block--callout fieldset { border-left: 6px solid var(--info); }
.editor-block--tip fieldset { border-left-color: var(--primary); }
.editor-block--warning fieldset { border-left-color: var(--warn); }
.editor-block__thumb { display: block; max-width: 240px; border-radius: var(--radius-sm); }
.block-editor__add { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 0.75rem; }
@media print { .tabs, .post__actions, .wiki__head .row-actions { display: none !important; } }

/* Link editor and YouTube block */
.link-panel { margin-top: 0.6rem; padding: 0.9rem 1rem; background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); box-shadow: var(--shadow); }
.link-panel > * + * { margin-top: 0.6rem; }
.link-panel__title { margin: 0; font-weight: 700; }
.link-panel .field { position: relative; }
.link-panel__results { list-style: none; margin: 0.25rem 0 0; padding: 0.3rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); max-height: 260px; overflow-y: auto; }
.link-panel__result { padding: 0.45rem 0.6rem; border-radius: var(--radius-sm); cursor: pointer; }
.link-panel__result:hover, .link-panel__result[aria-selected="true"] { background: var(--primary-tint); outline: 2px solid var(--primary); }
.link-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding: 0.35rem 0.6rem; font-size: 0.9rem; background: var(--accent-tint); border-radius: var(--radius-sm); }
.link-bar__url { max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent-dark); }
.wiki-video { margin: 1.5rem 0; }
.wiki-video__frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.wiki-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.wiki-video figcaption { color: var(--ink-soft); font-size: 0.95rem; margin-top: 0.4rem; }

/* Community search and document text */
.search-form input[type="search"] { flex: 1; }
.search-results__snippet { margin: 0.35rem 0 0; color: var(--ink-soft); font-size: 0.95rem; overflow-wrap: anywhere; }
.search-results__snippet mark { background: var(--warn-tint); color: var(--ink); padding: 0 0.1em; border-radius: 3px; }
.doc-text summary { cursor: pointer; }
.doc-text__body { max-height: 60vh; overflow-y: auto; margin-top: 0.75rem; padding-right: 0.5rem; max-width: 72ch; }

/* ---------- Bubbl (staff case management) ---------- */
.bubbl-shell { display: grid; grid-template-columns: minmax(0, 1fr); }
.bubbl-shell > .main { min-width: 0; }
/* Narrow screens (phones, tablets): one bar — "Bubbl" and a button naming the current section — that
   opens every section as a two-column grid. Wide screens: a sticky column beside the page. */
.bubbl-sidebar { min-width: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 0.4rem 1rem; }
.bubbl-sidebar__bar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 44px; }
.bubbl-sidebar__title { display: flex; align-items: center; gap: 0.4rem; margin: 0; font-weight: 700; color: var(--primary-dark); flex-shrink: 0; }
.bubbl-sidebar__toggle { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; min-width: 44px; max-width: 70%; padding: 0.35rem 0.75rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg, transparent); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.bubbl-sidebar__toggle[hidden] { display: none; }
.bubbl-sidebar__toggle:hover { background: var(--primary-tint); }
.bubbl-sidebar__toggle .icon { flex-shrink: 0; }
.bubbl-sidebar__current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubbl-sidebar__chevron { transition: transform 0.15s ease; }
.bubbl-sidebar.is-open .bubbl-sidebar__chevron { transform: rotate(180deg); }
.bubbl-sidebar__panel { padding: 0.25rem 0 0.6rem; }
.bubbl-sidebar__panel[hidden] { display: none; }
.bubbl-sidebar__label { margin: 0.75rem 0 0.35rem; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
.bubbl-sidebar__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem; }
.bubbl-sidebar__link { display: flex; align-items: center; gap: 0.55rem; min-width: 0; min-height: 44px; padding: 0.35rem 0.75rem; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.bubbl-sidebar__link:hover { background: var(--primary-tint); }
.bubbl-sidebar__link.is-active { background: var(--primary); color: #fff; }
.bubbl-sidebar__link .icon { flex-shrink: 0; }
@media (max-width: 359.98px) { .bubbl-sidebar__list { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .bubbl-sidebar__chevron { transition: none; } }
@media (min-width: 1000px) {
  .bubbl-shell { grid-template-columns: 15rem minmax(0, 1fr); }
  .bubbl-sidebar { border-bottom: 0; border-right: 1px solid var(--line); padding: 1.5rem 0.75rem; }
  .bubbl-sidebar__bar { min-height: 0; margin-bottom: 0.5rem; }
  .bubbl-sidebar__toggle { display: none !important; }
  .bubbl-sidebar__panel { display: block !important; padding: 0; position: sticky; top: 1rem; }
  .bubbl-sidebar__list { display: flex; flex-direction: column; }
  .bubbl-sidebar__link { overflow-wrap: normal; }
}
/* The sidebar runs all the way down to the footer: the footer's top gap moves inside the page. */
.bubbl-shell + .site-footer { margin-top: 0; }
.bubbl-shell > .main { padding-bottom: 3rem; }
@media print { .bubbl-sidebar { display: none !important; } .bubbl-shell { display: block; } }

.bubbl-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.25rem; margin-bottom: 1.25rem; }
.bubbl-head__body { flex: 1; min-width: 16rem; }
.bubbl-head__body h1 { margin: 0 0 0.25rem; }
.bubbl-photo { width: 96px; height: 96px; border-radius: var(--radius); object-fit: cover; background: var(--muted-fill); display: grid; place-items: center; font-size: 2rem; font-weight: 700; color: var(--ink-soft); flex-shrink: 0; }
.bubbl-photo--sm { width: 56px; height: 56px; font-size: 1.2rem; }
.bubbl-alerts { display: grid; gap: 0.5rem; margin-bottom: 1.25rem; }
.bubbl-alerts .alert { margin: 0; }
.bubbl-panels { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); align-items: start; }
.bubbl-panels .panel { margin: 0; }
.bubbl-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; margin-bottom: 1.25rem; }
.bubbl-filters .field { margin: 0; }
.bubbl-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; color: var(--ink-soft); font-size: 0.95rem; margin: 0.25rem 0 0; }
.bubbl-fieldgrid { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .bubbl-fieldgrid { grid-template-columns: 1fr 1fr; } .bubbl-fieldgrid .field--wide { grid-column: 1 / -1; } }
.bubbl-nested { border: 1px dashed var(--field-border); border-radius: var(--radius-sm); padding: 0.75rem 1rem; margin-bottom: 0.75rem; }
.bubbl-nested[hidden] { display: none; }
.bubbl-picker input[aria-invalid="true"], .field input[aria-invalid="true"] { border-color: var(--danger); }
.bubbl-wizard__progress { font-weight: 700; color: var(--ink-soft); margin: 0 0 0.75rem; }
.bubbl-wizard__nav { display: flex; gap: 0.5rem; justify-content: space-between; margin-top: 1rem; }
.js-wizard .form-section[data-step]:not(.is-current) { display: none; }
.signature-pad { border: 2px solid var(--field-border); border-radius: var(--radius-sm); background: #fff; }
.signature-pad canvas { display: block; width: 100%; height: 180px; touch-action: none; cursor: crosshair; }
.signature-img { max-width: 360px; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.consent-text { white-space: pre-line; max-height: 22rem; overflow-y: auto; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); gap: 1px; }
.calendar-grid__head { background: var(--primary-tint); font-weight: 700; padding: 0.4rem; text-align: center; font-size: 0.9rem; }
.calendar-grid__day { background: var(--surface); min-height: 7rem; padding: 0.35rem; font-size: 0.9rem; }
.calendar-grid__day.is-other { background: var(--bg); color: var(--ink-soft); }
.calendar-grid__day.is-today { box-shadow: inset 0 0 0 3px var(--accent); }
.calendar-grid__num { font-weight: 700; display: block; margin-bottom: 0.25rem; }
.calendar-entry { display: block; margin-bottom: 0.25rem; padding: 0.15rem 0.35rem; border-radius: 4px; background: var(--primary-tint); color: var(--primary-dark); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-entry--personal { background: var(--muted-fill); color: var(--ink); }
.calendar-entry--cancelled { text-decoration: line-through; }
@media (max-width: 760px) { .calendar-grid { display: none; } }
.calendar-list { display: none; }
@media (max-width: 760px) { .calendar-list { display: block; } }
.audit-changes { font-size: 0.9rem; overflow-wrap: anywhere; }
.audit-changes del { color: var(--danger); }
.audit-changes ins { color: var(--primary-dark); text-decoration: none; font-weight: 700; }
.group-colour { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 50%; vertical-align: middle; }
.group-colour--purple { background: #aa33cc; } .group-colour--blue { background: #296dff; } .group-colour--teal { background: #00897b; }
.group-colour--green { background: #2e7d32; } .group-colour--orange { background: #ff6633; } .group-colour--red { background: #c62828; } .group-colour--grey { background: #757575; }
.post--pinned { border-left: 4px solid var(--primary); }
.post--announcement { background: var(--primary-tint); }
.version-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }

/* Admin › Bubbl data: an import's or export's log */
.log-output { white-space: pre-wrap; max-height: 24rem; overflow: auto; }
