/* ==========================================================================
   GBLIP Partner Portal — client preview styles
   A static, self-contained stylesheet for the client-review preview. Values
   mirror themes/gblip/assets/css/tokens.css and DESIGN-SYSTEM.md so the
   preview reads as the same portal. Nothing here is loaded by WordPress.
   ========================================================================== */

/* ---- 1. Tokens ----------------------------------------------------------- */

:root {
  --brand-plum: #98005d;
  --brand-plum-dark: #7a004a;
  --brand-navy: #093254;
  --brand-navy-dark: #06243e;
  --brand-amber: #faa21a;
  --brand-sand: #d9bba0;
  --brand-dusk: #605f6d;
  --brand-slate: #7990af;
  --brand-clay: #a4867b;

  --n-50: #f6f8fa;
  --n-100: #edf1f5;
  --n-200: #dfe5ec;
  --n-300: #c7d1dc;
  --n-400: #9aa9b9;

  --surface-page: #faf8f5;
  --surface-card: #fff;
  --surface-sunken: #f1eeea;
  --surface-accent: #fdf4e7;
  --surface-brand-tint: #fbf0f6;
  --surface-success-tint: #eaf5f0;
  --surface-info-tint: #eaf0f6;

  --text-heading: #093254;
  --text-body: #28394a;
  --text-muted: #546575;
  --text-subtle: #6f8093;
  --text-on-dark-muted: #b9c6d6;

  --border-subtle: #dfe5ec;
  --border-default: #c7d1dc;
  --border-accent: #f0ddbe;

  --status-success: #12704f;
  --status-success-text: #0e5b41;
  --status-warning: #8a5200;
  --status-info: #2f5a85;

  --font-display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-ui: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 999px;
  --pebble-1: 72% 28% 58% 42% / 38% 62% 38% 62%;
  --pebble-2: 30% 70% 40% 60% / 62% 35% 65% 38%;
  --pebble-3: 64% 36% 33% 67% / 68% 40% 60% 32%;
  --pebble-4: 38% 62% 70% 30% / 34% 66% 34% 66%;

  --shadow-xs: 0 1px 2px rgba(9, 50, 84, .06);
  --shadow-md: 0 4px 12px rgba(9, 50, 84, .08), 0 1px 3px rgba(9, 50, 84, .06);
  --shadow-lg: 0 12px 28px rgba(9, 50, 84, .12), 0 2px 6px rgba(9, 50, 84, .06);
  --shadow-focus: 0 0 0 3px rgba(152, 0, 93, .18);

  --ease-out: cubic-bezier(.2, .8, .3, 1);
  --duration-fast: 120ms;
  --duration-base: 180ms;
  --duration-slow: 260ms;

  --sidebar: 264px;
  --topbar: 64px;
  --content-max: 1240px;
  --gutter: 24px;
  --tap: 44px;
}

@media (max-width: 767px) {
  :root { --gutter: 16px; }
}

/* ---- 2. Base ------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-body);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--brand-plum); text-underline-offset: 2px; }
a:hover { color: var(--brand-plum-dark); }
img { max-width: 100%; height: auto; }
p { margin: 0; }
p + p { margin-top: 12px; }
ul, ol { margin: 0; }

h1, h2, h3 { margin: 0; color: var(--text-heading); line-height: 1.25; }
h1 {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 2.6vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.2;
}
h2 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.0625rem; font-weight: 600; }

svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--brand-plum); outline-offset: 2px; border-radius: var(--radius-sm); }
.on-dark :focus-visible { outline-color: var(--brand-amber); }
[tabindex="-1"]:focus-visible { outline: none; }

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 1000;
  padding: 10px 16px;
  background: #fff;
  border-radius: var(--radius-md);
  font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; box-shadow: var(--shadow-lg); }

.muted { color: var(--text-muted); }
.small { font-size: .8125rem; }

.eyebrow {
  display: block;
  margin: 0 0 6px;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.eyebrow a { color: inherit; }

/* ---- 3. App shell -------------------------------------------------------- */

.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }

.shell {
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column;
  background: var(--brand-navy);
  color: #fff;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.shell__brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 22px;
  color: #fff;
  text-decoration: none;
}
.shell__brand:hover { color: #fff; }
.shell__brand img { width: 32px; }
.shell__wordmark { font-family: var(--font-display); font-size: .875rem; font-weight: 700; line-height: 1.2; }
.shell__wordmark span {
  display: block; margin-top: 2px;
  color: var(--brand-sand);
  font-family: var(--font-ui);
  font-size: .75rem; font-weight: 400;
  letter-spacing: .09em; text-transform: uppercase;
}

.shell__nav { flex: 1; padding: 0 12px; }

.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: var(--tap);
  padding: 10px 12px;
  margin-bottom: 2px;
  border-radius: var(--radius-md);
  color: var(--text-on-dark-muted);
  font-size: .875rem; font-weight: 500;
  text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.is-active { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 600; }
.nav-item.is-active::before {
  content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--brand-amber);
}
.nav-item__count {
  margin-left: auto; min-width: 20px; padding: 1px 7px;
  border-radius: var(--radius-full);
  background: var(--brand-amber); color: var(--brand-navy);
  font-size: .6875rem; font-weight: 700; text-align: center;
}

.shell__section-label {
  margin: 20px 12px 6px;
  color: #8fa3b8;
  font-family: var(--font-display);
  font-size: .6875rem; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase;
}

.shell__footer {
  display: grid; gap: 10px;
  padding: 16px 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: .75rem;
  color: #a9b8c8;
}
.shell__footer-label { color: #a9b8c8; }

/* Demonstration control: which audience the preview is showing. */
.mode-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  padding: 3px;
  background: var(--brand-navy-dark);
  border-radius: var(--radius-md);
}
.mode-switch button {
  min-height: 36px; padding: 6px 8px;
  border-radius: 8px;
  color: var(--text-on-dark-muted);
  font-size: .8125rem; font-weight: 600;
}
.mode-switch button:hover { color: #fff; }
.mode-switch button[aria-pressed="true"] { background: rgba(255, 255, 255, .14); color: #fff; }

.shell__about {
  justify-self: start;
  color: var(--brand-sand);
  font-size: .8125rem; font-weight: 600;
  text-decoration: underline; text-underline-offset: 2px;
}

.shell .shell__close, .drawer-backdrop { display: none; }

/* ---- 4. Top bar ---------------------------------------------------------- */

.main-col { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 70;
  display: flex; align-items: center; gap: 12px;
  min-height: var(--topbar);
  padding: 8px var(--gutter);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
}
.topbar .topbar__menu { display: none; }

.search-trigger {
  display: flex; align-items: center; gap: 10px;
  flex: 1 1 auto; min-width: 0; max-width: 440px;
  min-height: 40px;
  padding: 7px 12px;
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-align: left;
  white-space: nowrap;
}
.search-trigger:hover { border-color: var(--n-400); }
.search-trigger svg { width: 18px; height: 18px; }
.search-trigger__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.search-trigger kbd {
  padding: 1px 6px;
  background: var(--n-100);
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  font: 600 .6875rem var(--font-ui);
}

.topbar__actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.icon-btn {
  position: relative;
  display: inline-grid; place-items: center;
  width: var(--tap); height: var(--tap);
  border-radius: var(--radius-md);
  color: var(--text-muted);
}
.icon-btn:hover { background: var(--n-100); color: var(--text-heading); }
.icon-btn__count {
  position: absolute; top: 5px; right: 5px;
  display: grid; place-items: center;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--brand-plum);
  border: 2px solid #fff;
  border-radius: var(--radius-full);
  color: #fff;
  font-size: .625rem; font-weight: 700; line-height: 1;
}

.account-btn {
  display: flex; align-items: center; gap: 8px;
  min-height: var(--tap);
  padding: 4px 8px;
  border-radius: var(--radius-md);
  color: var(--text-heading);
  font-size: .875rem; font-weight: 600;
}
.account-btn:hover { background: var(--n-100); }
.account-btn > svg { width: 16px; height: 16px; color: var(--text-muted); }

/* ---- 5. Popovers --------------------------------------------------------- */

.popover-wrap { position: relative; }
.popover {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 200;
  width: 280px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.popover--wide { width: 380px; padding: 0; overflow: hidden; }
.popover__header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.popover__header strong { color: var(--text-heading); font-size: .875rem; }
.popover__footer {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: .8125rem;
}
.popover__footer a, .popover__footer button { font-weight: 600; }
.popover__note { padding: 10px 16px 0; color: var(--text-muted); font-size: .75rem; }

.menu-label {
  padding: 10px 12px 4px;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: .625rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
}
.menu-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: var(--text-body);
  font-size: .875rem;
  text-align: left; text-decoration: none;
}
.menu-item:hover { background: var(--n-100); color: var(--text-heading); }
.menu-item svg { width: 18px; height: 18px; color: var(--text-muted); }
.menu-item--story { color: var(--brand-plum); font-weight: 600; }
.menu-item--story svg { color: var(--brand-plum); }
.menu-sep { height: 1px; margin: 6px 0; background: var(--border-subtle); }
.menu-head { padding: 10px 12px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--border-subtle); }
.menu-head b { display: block; color: var(--text-heading); font-size: .875rem; }
.menu-head span { color: var(--text-muted); font-size: .75rem; }

.notif {
  display: flex; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: inherit;
  text-decoration: none;
  font-size: .875rem;
  line-height: 1.45;
}
.notif:last-of-type { border-bottom: 0; }
.notif:hover { background: var(--n-50); color: inherit; }
.notif.is-unread { background: var(--surface-brand-tint); }
.notif strong { color: var(--text-heading); font-weight: 600; }
.notif small { display: block; margin-top: 2px; color: var(--text-muted); font-size: .75rem; }

/* ---- 6. Buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap);
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: .875rem; font-weight: 600; line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: var(--brand-plum); color: #fff; }
.btn--primary:hover { background: #850052; color: #fff; }
.btn--secondary { background: #fff; border-color: var(--border-default); color: var(--text-heading); box-shadow: var(--shadow-xs); }
.btn--secondary:hover { background: var(--n-50); border-color: var(--n-400); color: var(--text-heading); }
.btn--ghost { color: var(--brand-plum); }
.btn--ghost:hover { background: var(--n-100); }
/* Share a Success Story: navy so it reads as distinct from plum actions without competing with them. */
.btn--story { background: var(--brand-navy); color: #fff; }
.btn--story:hover { background: var(--brand-navy-dark); color: #fff; }
.on-dark .btn--story { background: var(--brand-amber); color: var(--brand-navy); }
.on-dark .btn--story:hover { background: #ffb445; color: var(--brand-navy); }
.btn--sm { min-height: 36px; padding: 7px 12px; font-size: .8125rem; }
.btn--block { width: 100%; }
@media (pointer: coarse) { .btn--sm { min-height: var(--tap); } }

.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--brand-plum);
  font-size: .875rem; font-weight: 600;
  text-decoration: underline; text-underline-offset: 2px;
}
.text-link:hover { color: var(--brand-plum-dark); }
.text-link svg { width: 15px; height: 15px; }

/* ---- 7. Review notes -----------------------------------------------------
   The only way the preview talks about itself on a screen. Deliberately unlike
   any portal component: a dashed border, a striped ground and a labelled kind.
   Kinds: Decision needed, Example, Concept, Existing feature, In this preview. */

.review-note {
  display: grid; gap: 4px;
  padding: 12px 16px;
  background: repeating-linear-gradient(135deg, #fcfbf8 0 10px, #f4f1ea 10px 20px);
  border: 1.5px dashed #8a9aab;
  border-radius: var(--radius-md);
  color: var(--text-body);
  font-size: .875rem;
  line-height: 1.5;
}
.review-note p + p { margin-top: 0; }
.review-note a { font-weight: 600; }
.review-note__label {
  display: flex; align-items: center; gap: 6px;
  color: var(--text-muted);
  font-size: .6875rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}
.review-note__label svg { width: 14px; height: 14px; }
.review-note--decision { border-color: #c9892b; }
.review-note--decision .review-note__label { color: var(--status-warning); }
.review-note--concept { border-color: #6f93bd; }
.review-note--concept .review-note__label { color: var(--status-info); }

/* ---- 8. Page layout ------------------------------------------------------ */

main { flex: 1; }
.page { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 32px var(--gutter) 88px; }
.page--narrow { max-width: 880px; }

.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 18px; color: var(--text-muted); font-size: .8125rem; }
.breadcrumbs a { font-weight: 600; }

.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-header__lead { max-width: 720px; margin-top: 8px; color: var(--text-muted); font-size: 1.0625rem; }
.page-header__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { font-family: var(--font-ui); font-size: 1.125rem; font-weight: 600; letter-spacing: 0; }
.section-head__meta { color: var(--text-muted); font-size: .875rem; }
.section-head a, .section-head .text-link { font-size: .875rem; font-weight: 600; }
.section-intro { margin: -6px 0 14px; color: var(--text-muted); font-size: .875rem; }

.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 36px; }

.layout-rail { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 32px; align-items: start; }
.rail > * + * { margin-top: 20px; }

/* ---- 9. Cards, pills, chips, avatars ------------------------------------- */

.card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: 24px;
}
.card--flush { padding: 0; overflow: hidden; }
.card--accent { background: var(--surface-accent); border-color: var(--border-accent); }
.card--tint { background: var(--surface-brand-tint); border-color: #f0d9e7; }
.card > .eyebrow:first-child { margin-bottom: 10px; }
.card h2 { font-size: 1.125rem; }
.card p { font-size: .9375rem; }

a.card-link, .card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: box-shadow var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}
a.card-link:hover, button.card-link:hover { color: inherit; border-color: var(--border-default); box-shadow: var(--shadow-md); transform: translateY(-2px); }
button.card-link { width: 100%; text-align: left; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: .75rem; font-weight: 600; line-height: 1.3;
  white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.pill--open { background: var(--surface-brand-tint); color: var(--brand-plum); }
.pill--progress { background: var(--surface-info-tint); color: var(--status-info); }
.pill--success { background: var(--surface-success-tint); color: var(--status-success-text); }
.pill--warning { background: var(--surface-accent); color: var(--status-warning); }
.pill--neutral { background: var(--n-100); color: var(--text-muted); }

/* Content-kind labels: what a thing is, rather than its status. Icon + word, no dot. */
.kind {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: .75rem; font-weight: 600; line-height: 1.4;
  white-space: nowrap;
}
.kind svg { width: 13px; height: 13px; stroke-width: 2; }
.kind--meeting { background: var(--surface-brand-tint); color: var(--brand-plum); }
.kind--event { background: var(--surface-info-tint); color: var(--status-info); }
.kind--question { background: var(--surface-info-tint); color: var(--status-info); }
.kind--request { background: var(--surface-accent); color: var(--status-warning); }
.kind--idea { background: var(--surface-brand-tint); color: var(--brand-plum); }
.kind--discussion { background: var(--n-100); color: var(--text-muted); }

.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  background: var(--n-100);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .75rem; font-weight: 500;
  white-space: nowrap;
}
.chip--more { background: transparent; border-color: var(--border-subtle); }

.avatar, .pebble {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 48px; height: 48px;
  color: #fff;
  font-family: var(--font-display);
  font-size: .8125rem; font-weight: 700; letter-spacing: .02em;
}
.avatar { border-radius: 50%; background: var(--brand-dusk); }
.pebble { border-radius: var(--pebble-1); background: var(--brand-plum); }
.pebble--2 { border-radius: var(--pebble-2); }
.pebble--3 { border-radius: var(--pebble-3); }
.pebble--4 { border-radius: var(--pebble-4); }
.avatar--sm, .pebble--sm { width: 32px; height: 32px; font-size: .6875rem; }
.pebble--lg { width: 64px; height: 64px; font-size: 1.125rem; }
.pebble--xl { width: 96px; height: 96px; font-size: 1.5rem; }
.bg-plum { background: var(--brand-plum); color: #fff; }
.bg-navy { background: var(--brand-navy); color: #fff; }
.bg-dusk { background: var(--brand-dusk); color: #fff; }
.bg-clay { background: var(--brand-clay); color: #fff; }
.bg-slate { background: var(--brand-slate); color: var(--brand-navy); }
.bg-amber { background: var(--brand-amber); color: var(--brand-navy); }

/* ---- 10. Rows ------------------------------------------------------------ */

.rows { background: #fff; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); overflow: hidden; }
.row-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: inherit;
  text-decoration: none;
}
.row-item:last-child { border-bottom: 0; }
a.row-item:hover, button.row-item:hover { background: var(--n-50); color: inherit; }
button.row-item { width: 100%; text-align: left; }
.row-item__main { flex: 1; min-width: 0; }
.row-item__title { display: block; color: var(--text-heading); font-weight: 600; line-height: 1.35; }
.row-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 3px; color: var(--text-muted); font-size: .8125rem; }
.row-item__aside { flex-shrink: 0; display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: .8125rem; }
.row-item__arrow { color: var(--brand-plum); }
.row-item__arrow svg { width: 18px; height: 18px; }

.file-icon {
  display: grid; place-items: center; flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: var(--n-100);
  color: var(--text-muted);
}
.file-icon svg { width: 18px; height: 18px; }
.file-icon--brand { background: var(--surface-brand-tint); color: var(--brand-plum); }
.file-icon--info { background: var(--surface-info-tint); color: var(--status-info); }
.file-icon--ok { background: var(--surface-success-tint); color: var(--status-success); }
.file-icon--warn { background: var(--surface-accent); color: var(--status-warning); }

/* ---- 11. Tabs and views --------------------------------------------------
   One behaviour (preview.js), three looks: pill views as in the current
   portal, underline section tabs, and the Collaboration card tabs. */

.views { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.views [role="tab"] {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px;
  padding: 7px 16px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: .875rem; font-weight: 600;
}
.views [role="tab"]:hover { border-color: var(--border-default); color: var(--text-heading); }
.views [role="tab"][aria-selected="true"] { background: var(--brand-plum); border-color: var(--brand-plum); color: #fff; }
.views__count { font-weight: 400; opacity: .8; }

.section-tabs {
  display: flex; gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
}
.section-tabs::-webkit-scrollbar { display: none; }
.section-tabs [role="tab"] {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--tap);
  padding: 8px 14px;
  margin-bottom: -1px;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-size: .875rem; font-weight: 600;
  white-space: nowrap;
}
.section-tabs [role="tab"]:hover { color: var(--text-heading); }
.section-tabs [role="tab"][aria-selected="true"] { border-bottom-color: var(--brand-plum); color: var(--brand-plum); }
.tab-count {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  background: var(--brand-plum); color: #fff;
  border-radius: var(--radius-full);
  font-size: .6875rem; font-weight: 700;
}

/* Demonstration switch for time-based states (a meeting before and after). */
.state-switch { margin-bottom: 22px; }
.state-switch__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--text-muted); font-size: .875rem; }
.state-switch [role="tablist"] { display: inline-flex; gap: 2px; padding: 3px; background: #fff; border-radius: var(--radius-full); box-shadow: var(--shadow-xs); }
.state-switch [role="tab"] { min-height: 34px; padding: 6px 14px; border-radius: var(--radius-full); color: var(--text-muted); font-size: .8125rem; font-weight: 600; }
.state-switch [role="tab"][aria-selected="true"] { background: var(--brand-navy); color: #fff; }

/* ---- 12. Filters and search ---------------------------------------------- */

.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.search-input { position: relative; flex: 1 1 280px; min-width: 0; }
.search-input svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-subtle); pointer-events: none; }
.search-input .input { padding-left: 40px; }

.filter-bar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 10px; align-items: end; margin-bottom: 12px; }
.filter-bar--short { grid-template-columns: repeat(3, minmax(0, 180px)) auto; }
.filter-bar label { display: grid; gap: 4px; color: var(--text-muted); font-size: .75rem; font-weight: 600; }
.filter-bar .select { min-height: 40px; padding-top: 7px; padding-bottom: 7px; font-size: .875rem; }

.more-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: .875rem;
}
.more-filters label { display: flex; align-items: center; gap: 8px; }
.more-filters .select { min-height: 38px; width: auto; font-size: .875rem; padding-top: 6px; padding-bottom: 6px; }

.result-count { color: var(--text-muted); font-size: .875rem; }
.result-count b { color: var(--text-heading); }

.empty { padding: 36px 24px; text-align: center; color: var(--text-muted); font-size: .9375rem; }
.empty b { display: block; margin-bottom: 4px; color: var(--text-heading); }

/* ---- 13. Forms ----------------------------------------------------------- */

.field { display: block; }
.field + .field, .field + .field-grid, .field-grid + .field, .field-grid + .field-grid { margin-top: 20px; }
.field__label { display: block; margin-bottom: 6px; color: var(--text-heading); font-size: .9375rem; font-weight: 600; }
.field__req { margin-left: 6px; color: var(--text-muted); font-size: .75rem; font-weight: 400; }
.field__hint { display: block; margin: -2px 0 8px; color: var(--text-muted); font-size: .875rem; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
fieldset.field { margin: 0; padding: 0; border: 0; min-width: 0; }
fieldset.field > legend { padding: 0; }

.input, .select, .textarea {
  display: block; width: 100%;
  min-height: var(--tap);
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-body);
  font-size: 1rem; /* never below 16px: iOS zooms on focus otherwise */
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.input::placeholder, .textarea::placeholder { color: var(--text-subtle); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--n-400); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-plum); box-shadow: var(--shadow-focus); outline: none; }
.textarea { min-height: 112px; resize: vertical; line-height: 1.5; }
.textarea--short { min-height: 80px; }
.select {
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23546575' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* Checkbox and radio chips: the input stays a real, visible control. */
.choice-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-chips label {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px;
  padding: 7px 14px 7px 11px;
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  font-size: .875rem;
  cursor: pointer;
}
.choice-chips label:hover { border-color: var(--n-400); }
.choice-chips label:has(input:checked) { background: var(--surface-brand-tint); border-color: var(--brand-plum); color: var(--brand-plum); font-weight: 600; }
.choice-chips label:has(input:focus-visible) { outline: 2px solid var(--brand-plum); outline-offset: 2px; }
.choice-chips input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand-plum); }

.choice-list { display: grid; gap: 8px; }
.choice-list label {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: .9375rem;
  cursor: pointer;
}
.choice-list label:has(input:checked) { background: var(--surface-brand-tint); border-color: var(--brand-plum); }
.choice-list label:has(input:focus-visible) { outline: 2px solid var(--brand-plum); outline-offset: 2px; }
.choice-list input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand-plum); flex-shrink: 0; }
.choice-list small { display: block; color: var(--text-muted); font-size: .8125rem; }

.check-inline { display: flex; align-items: flex-start; gap: 10px; font-size: .9375rem; cursor: pointer; }
.check-inline input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--brand-plum); flex-shrink: 0; }

/* Five-point agreement scale. */
.scale { margin: 0; padding: 0; border: 0; }
.scale + .scale { margin-top: 18px; }
.scale legend { margin-bottom: 8px; color: var(--text-heading); font-size: .9375rem; font-weight: 600; }
.scale__options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.scale__options label {
  display: grid; justify-items: center; gap: 4px;
  padding: 8px 4px;
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: .75rem; line-height: 1.2; text-align: center;
  cursor: pointer;
}
.scale__options label:has(input:checked) { background: var(--surface-brand-tint); border-color: var(--brand-plum); color: var(--brand-plum); font-weight: 600; }
.scale__options label:has(input:focus-visible) { outline: 2px solid var(--brand-plum); outline-offset: 2px; }
.scale__options input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand-plum); }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border-subtle); }
.toggle-row:last-child { border-bottom: 0; padding-bottom: 0; }
.toggle-row b { display: block; color: var(--text-heading); font-size: .9375rem; }
.toggle-row small { color: var(--text-muted); font-size: .8125rem; }
.toggle { position: relative; display: inline-block; width: 44px; height: 26px; flex-shrink: 0; }
.toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.toggle span { position: absolute; inset: 0; background: var(--n-300); border-radius: var(--radius-full); transition: background-color var(--duration-base) var(--ease-out); pointer-events: none; }
.toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-xs); transition: transform var(--duration-base) var(--ease-out); }
.toggle input:checked + span { background: var(--brand-plum); }
.toggle input:checked + span::after { transform: translateX(18px); }
.toggle input:focus-visible + span { outline: 2px solid var(--brand-plum); outline-offset: 2px; }

.form-section { padding: 24px; background: #fff; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.form-section + .form-section { margin-top: 16px; }
.form-section__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.form-section__head h2 { font-size: 1.125rem; }
.form-section__head p { margin-top: 4px; color: var(--text-muted); font-size: .9375rem; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.form-actions__note { margin-left: auto; color: var(--text-muted); font-size: .8125rem; }

/* ---- 14. Feedback -------------------------------------------------------- */

.banner {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  margin-bottom: 24px;
  background: var(--surface-accent);
  border: 1px solid var(--border-accent);
  border-left: 4px solid var(--brand-amber);
  border-radius: var(--radius-md);
}
.banner > svg { width: 22px; height: 22px; color: var(--status-warning); }
.banner__text { flex: 1; min-width: 0; font-size: .9375rem; }
.banner__text strong { color: var(--text-heading); }
.banner__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.callout { display: flex; gap: 12px; padding: 14px 16px; background: var(--surface-info-tint); border-radius: var(--radius-md); font-size: .9375rem; }
.callout > svg { color: var(--status-info); margin-top: 1px; }
.callout--accent { background: var(--surface-accent); }
.callout--accent > svg { color: var(--status-warning); }
.callout strong { color: var(--text-heading); }

.form-success { padding: 64px 24px; background: #fff; border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); text-align: center; }
.form-success h2 { font-size: 1.5rem; }
.form-success p:not(.eyebrow) { max-width: 540px; margin: 12px auto 24px; color: var(--text-muted); }
.form-success__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.success-mark { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 16px; background: var(--status-success); border-radius: var(--pebble-1); color: #fff; }
.success-mark svg { width: 28px; height: 28px; stroke-width: 2.2; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 900;
  transform: translateX(-50%);
  width: max-content; max-width: min(480px, calc(100% - 32px));
  padding: 12px 18px;
  background: var(--brand-navy-dark);
  color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: .875rem; line-height: 1.45; text-align: center;
}

.dialog {
  width: min(640px, calc(100% - 32px));
  max-height: calc(100vh - 64px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  color: var(--text-body);
}
.dialog::backdrop { background: rgba(9, 50, 84, .5); }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 0 24px; }
.dialog__body { padding: 14px 24px 24px; }
.dialog--search { margin-top: 10vh; }
.note-kinds { display: grid; gap: 8px; margin: 14px 0 16px; padding-left: 18px; font-size: .9375rem; }

.preview-pill {
  position: fixed; right: 18px; bottom: 18px; z-index: 80;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px;
  padding: 6px 14px;
  background: rgba(6, 36, 62, .95);
  color: #fff;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  font-size: .8125rem;
}
.preview-pill strong { color: var(--brand-amber); }
.preview-pill:hover { background: var(--brand-navy); }

/* ---- 15. Dashboard ------------------------------------------------------- */

.welcome { margin-bottom: 22px; }
.welcome__org { margin-top: 6px; color: var(--text-muted); font-size: 1.0625rem; }

.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 36px; }
.quick__item {
  display: flex; align-items: center; gap: 12px;
  min-height: 68px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  color: var(--text-heading);
  font-size: .875rem; font-weight: 600; line-height: 1.3;
  text-decoration: none;
  transition: box-shadow var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}
.quick__item:hover { color: var(--text-heading); border-color: var(--border-default); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.quick__icon { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: var(--pebble-2); background: var(--surface-brand-tint); color: var(--brand-plum); }
.quick__icon svg { width: 18px; height: 18px; }
/* Share a Success Story is promoted on the dashboard rather than fixed in the
   header on every page. Warm sand, not amber: an invitation, not a deadline. */
.story-banner {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 24px;
  margin-bottom: 28px;
  background: linear-gradient(120deg, #f7eee5, #fcf8f3);
  border: 1px solid #ecdccb;
  border-radius: var(--radius-lg);
}
.story-banner__mark { width: 52px; height: 52px; flex-shrink: 0; }
.story-banner__mark svg { width: 24px; height: 24px; }
.story-banner__text { flex: 1; min-width: 0; }
.story-banner h2 { font-size: 1.125rem; }
.story-banner p { margin-top: 4px; color: var(--text-body); font-size: .9375rem; }
.story-banner .btn { flex-shrink: 0; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 32px; align-items: start; }
.dash-main > * + * { margin-top: 36px; }
.dash-rail > * + * { margin-top: 20px; }

.attention { display: grid; gap: 8px; }
.attn {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 14px 14px 16px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--brand-plum);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}
.attn.is-dismissing { opacity: 0; transform: translateX(12px); }
.attn__icon { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--n-100); color: var(--text-muted); }
.attn__icon svg { width: 16px; height: 16px; }
.attn__icon--brand { background: var(--surface-brand-tint); color: var(--brand-plum); }
.attn__icon--warn { background: var(--surface-accent); color: var(--status-warning); }
.attn__icon--ok { background: var(--surface-success-tint); color: var(--status-success); }
.attn__body { flex: 1; min-width: 0; font-size: .9375rem; line-height: 1.45; }
.attn__body a { font-weight: 600; text-decoration: none; }
.attn__body a:hover { text-decoration: underline; }
.attn__meta { display: block; margin-top: 2px; color: var(--text-muted); font-size: .8125rem; }
.attn__dismiss { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: var(--radius-sm); color: var(--text-subtle); }
.attn__dismiss:hover { background: var(--n-100); color: var(--text-body); }
.attn__dismiss svg { width: 14px; height: 14px; }
@media (pointer: coarse) { .attn__dismiss { width: var(--tap); height: var(--tap); } }

.collab-card { display: grid; gap: 10px; }
.collab-card__title { color: var(--text-heading); font-size: 1.0625rem; font-weight: 600; text-decoration: none; }
.collab-card__title:hover { color: var(--brand-plum); }
.collab-card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding-top: 12px; border-top: 1px solid var(--border-subtle); color: var(--text-muted); font-size: .8125rem; }
.collab-card__foot .who { display: inline-flex; align-items: center; gap: 8px; color: var(--text-body); font-weight: 600; }
.match-flag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: var(--surface-success-tint); color: var(--status-success-text); border-radius: var(--radius-sm); font-size: .75rem; font-weight: 600; }
.match-flag svg { width: 12px; height: 12px; stroke-width: 2.2; }

/* Date block shared by the dashboard rail and Meetings & Events. */
.date-block {
  display: grid; place-items: center; align-content: center; flex-shrink: 0;
  width: 50px; min-height: 54px;
  padding: 6px 0;
  background: var(--surface-sunken);
  border-radius: var(--radius-sm);
  text-align: center;
}
.date-block__month { color: var(--brand-plum); font-family: var(--font-display); font-size: .625rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.date-block__day { color: var(--text-heading); font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; line-height: 1.05; }
.date-block--event { background: var(--surface-info-tint); }
.date-block--event .date-block__month { color: var(--status-info); }

.upcoming-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border-subtle); }
.upcoming-item:first-of-type { padding-top: 4px; }
.upcoming-item:last-of-type { border-bottom: 0; padding-bottom: 0; }
.upcoming-item__title { display: block; margin-top: 4px; color: var(--text-heading); font-size: .9375rem; font-weight: 600; line-height: 1.3; text-decoration: none; }
.upcoming-item__title:hover { color: var(--brand-plum); }
.upcoming-item__meta { margin-top: 2px; color: var(--text-muted); font-size: .8125rem; }
.upcoming-item .pill { margin-top: 6px; }

.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { border-bottom: 1px solid var(--border-subtle); }
.link-list li:last-child { border-bottom: 0; }
.link-list a { display: block; padding: 10px 0; color: var(--text-heading); text-decoration: none; }
.link-list a:hover b { color: var(--brand-plum); }
.link-list b { display: block; font-size: .9375rem; }
.link-list span { color: var(--text-muted); font-size: .8125rem; }

.contrib-line { font-size: .9375rem; }
.contrib-line b { color: var(--text-heading); }

.spotlight { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }
.spotlight .eyebrow { color: var(--brand-amber); }
.spotlight h2 { margin-bottom: 8px; color: #fff; font-size: 1.0625rem; }
.spotlight p { color: var(--text-on-dark-muted); font-size: .875rem; }
.spotlight a { display: inline-block; margin-top: 12px; color: var(--brand-sand); font-size: .875rem; font-weight: 600; }

/* ---- 16. Committees ------------------------------------------------------ */

.model-strip {
  display: grid; grid-template-columns: auto repeat(4, minmax(0, 1fr)); gap: 12px 18px; align-items: center;
  padding: 18px 22px;
  margin-bottom: 32px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}
.model-strip__label { max-width: 170px; color: var(--text-heading); font-size: .875rem; font-weight: 600; line-height: 1.35; }
.model-strip__item { display: flex; align-items: center; gap: 10px; font-size: .875rem; line-height: 1.3; }
.model-strip__item small { display: block; color: var(--text-muted); font-size: .75rem; }

.committee-mark { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: var(--pebble-2); background: var(--surface-brand-tint); color: var(--brand-plum); }
.committee-mark svg { width: 19px; height: 19px; }
.committee-mark--lg { width: 56px; height: 56px; }
.committee-mark--lg svg { width: 26px; height: 26px; }
.committee-mark--info { background: var(--surface-info-tint); color: var(--status-info); }
.committee-mark--neutral { background: var(--n-100); color: var(--text-muted); }

.committee-group + .committee-group { margin-top: 32px; }
.committee-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.committee-card { display: grid; gap: 10px; align-content: start; }
.committee-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.committee-card h3 { font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; }
.committee-card p { color: var(--text-body); font-size: .9375rem; }
.committee-card__facts { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-top: 12px; border-top: 1px solid var(--border-subtle); color: var(--text-muted); font-size: .8125rem; }
.committee-card__facts span { display: inline-flex; align-items: center; gap: 6px; }
.committee-card__facts svg { width: 14px; height: 14px; }
.committee-card__cta { color: var(--brand-plum); font-size: .875rem; font-weight: 600; }

.detail-hero {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 28px;
  padding: 26px;
  margin-bottom: 18px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
}
.detail-hero__main { max-width: 760px; }
.title-line { display: flex; align-items: center; gap: 16px; }
.detail-hero__lead { margin: 16px 0 14px; font-size: 1.0625rem; }
.detail-hero__actions { display: grid; justify-items: end; gap: 10px; flex-shrink: 0; }

.section-nav {
  position: sticky; top: calc(var(--topbar) + 8px); z-index: 20;
  display: flex; gap: 4px;
  padding: 5px;
  margin-bottom: 28px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  overflow-x: auto;
  scrollbar-width: none;
}
.section-nav::-webkit-scrollbar { display: none; }
.section-nav a { display: flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 7px; color: var(--text-muted); font-size: .875rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.section-nav a:hover { background: var(--n-100); color: var(--text-heading); }
[data-section] { scroll-margin-top: calc(var(--topbar) + 76px); }

.next-meeting { border-top: 4px solid var(--brand-plum); }
.next-meeting__when { display: flex; align-items: center; gap: 16px; margin: 16px 0; }
.next-meeting__when .date-block { width: 64px; min-height: 68px; }
.next-meeting__when .date-block__day { font-size: 1.625rem; }
.next-meeting__when strong { display: block; color: var(--text-heading); }
.next-meeting__when span { color: var(--text-muted); font-size: .875rem; }
.next-meeting__prep { display: grid; gap: 6px; margin: 0 0 18px; padding: 14px 16px; background: var(--n-50); border-radius: var(--radius-md); font-size: .875rem; list-style: none; }
.next-meeting__prep li { display: flex; align-items: center; gap: 8px; }
.next-meeting__prep svg { width: 16px; height: 16px; color: var(--text-muted); }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.people { list-style: none; margin: 0; padding: 0; }
.person { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border-subtle); }
.person:last-child { border-bottom: 0; }
.person__who { flex: 1; min-width: 0; }
.person__name { display: block; color: var(--text-heading); font-size: .9375rem; font-weight: 600; }
.person__title { display: block; color: var(--text-muted); font-size: .8125rem; overflow-wrap: anywhere; }

.detail-list { display: grid; gap: 14px; margin: 0; }
.detail-list div { display: grid; gap: 1px; }
.detail-list dt { color: var(--text-muted); font-size: .75rem; }
.detail-list dd { margin: 0; color: var(--text-heading); font-size: .9375rem; font-weight: 600; }
.detail-list dd.regular { font-weight: 400; color: var(--text-body); }


/* ---- 17. Meetings & Events ----------------------------------------------- */

.kind-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: -8px 0 20px; color: var(--text-muted); font-size: .875rem; }
.kind-legend span { display: inline-flex; align-items: center; gap: 8px; }

.event-list { display: grid; gap: 10px; }
.event-row {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  color: inherit;
  text-align: left;
  text-decoration: none;
  width: 100%;
}
a.event-row:hover, button.event-row:hover { color: inherit; border-color: var(--border-default); box-shadow: var(--shadow-md); }
.event-row--meeting { border-left: 3px solid var(--brand-plum); }
.event-row--event { border-left: 3px solid var(--status-info); }
.event-row__main { flex: 1; min-width: 0; }
.event-row__title { display: block; margin-top: 4px; color: var(--text-heading); font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.event-row__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; color: var(--text-muted); font-size: .875rem; }
.event-row__aside { display: grid; justify-items: end; gap: 6px; flex-shrink: 0; }
.archive-year { margin: 4px 0 10px; color: var(--text-heading); font-family: var(--font-display); font-size: 1rem; font-weight: 700; }
.material-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.meeting-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.meeting-head__when { margin-top: 8px; color: var(--text-muted); font-size: 1.0625rem; }
.meeting-head__status { display: grid; justify-items: end; gap: 8px; flex-shrink: 0; }

.phase-label { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.phase-label__num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-navy); color: #fff; font-family: var(--font-display); font-size: .75rem; font-weight: 700; }
.phase-label h2 { font-family: var(--font-ui); font-size: 1.125rem; font-weight: 600; letter-spacing: 0; }

.agenda { list-style: none; margin: 0; padding: 0; }
.agenda li { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
.agenda li:last-child { border-bottom: 0; }
.agenda time { flex-shrink: 0; width: 48px; color: var(--brand-plum); font-size: .875rem; font-weight: 700; }
.agenda b { display: block; color: var(--text-heading); }
.agenda small { color: var(--text-muted); font-size: .8125rem; }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 26px; font-size: .9375rem; }
.check-list li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 12px; height: 7px; border-left: 2px solid var(--status-success); border-bottom: 2px solid var(--status-success); transform: rotate(-45deg); }

.attendance-figure { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 4px; }
.attendance-figure b { color: var(--brand-plum); font-family: var(--font-display); font-size: 2.5rem; line-height: 1; }
.attendance-orgs { margin-top: 12px; color: var(--text-muted); font-size: .875rem; }

.staff-inline summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: var(--tap); color: var(--brand-plum); font-size: .9375rem; font-weight: 600; cursor: pointer; list-style: none; }
.staff-inline summary::-webkit-details-marker { display: none; }
.staff-inline summary svg { transition: transform var(--duration-base) var(--ease-out); }
.staff-inline[open] summary svg { transform: rotate(180deg); }
.staff-inline .choice-list { margin-top: 10px; }

/* ---- 18. Knowledge Hub --------------------------------------------------- */

.hub-search { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; margin-bottom: 32px; background: #fff; border: 1px solid var(--border-default); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.hub-search > svg { color: var(--text-muted); }
.hub-search input { flex: 1; min-width: 0; min-height: 40px; border: 0; background: transparent; font-size: 1.0625rem; }
.hub-search input:focus { outline: none; }
.hub-search:focus-within { border-color: var(--brand-plum); box-shadow: var(--shadow-focus); }

.featured-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 14px; }
.featured-card {
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 210px;
  padding: 22px;
  background: linear-gradient(160deg, #fff, var(--n-100));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-heading);
  text-decoration: none;
}
.featured-card h3 { margin: 4px 0 6px; font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; }
.featured-card p { color: var(--text-muted); font-size: .875rem; }
.featured-card__cta { margin-top: 14px; color: var(--brand-plum); font-size: .875rem; font-weight: 600; }
.featured-card--dark { background: linear-gradient(150deg, var(--brand-navy), #174b75); border-color: var(--brand-navy); color: #fff; }
.featured-card--dark h3 { color: #fff; }
.featured-card--dark p { color: #d8e1eb; }
.featured-card--dark .eyebrow, .featured-card--dark .featured-card__cta { color: var(--brand-sand); }
.featured-card:hover { color: inherit; box-shadow: var(--shadow-md); }

.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.category-tile { display: grid; gap: 6px; align-content: start; min-height: 172px; padding: 18px; background: #fff; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); text-align: left; }
.category-tile:hover { border-color: var(--brand-plum); box-shadow: var(--shadow-md); }
.category-tile b { margin-top: 4px; color: var(--text-heading); font-size: 1rem; }
.category-tile span:not(.category-icon) { color: var(--text-muted); font-size: .8125rem; line-height: 1.45; }
.category-tile small { margin-top: auto; padding-top: 6px; color: var(--brand-plum); font-size: .8125rem; font-weight: 600; }
.category-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--pebble-2); }
.category-icon svg { width: 19px; height: 19px; }
.tint-sand { background: #f7eee5; color: #79502f; }
.tint-plum { background: var(--surface-brand-tint); color: var(--brand-plum); }
.tint-info { background: var(--surface-info-tint); color: var(--status-info); }
.tint-amber { background: var(--surface-accent); color: var(--status-warning); }

.video-frame {
  position: relative;
  display: grid; place-items: center;
  aspect-ratio: 16 / 9; max-width: 100%;
  background: linear-gradient(150deg, var(--brand-navy), #1c5585);
  border-radius: var(--radius-lg);
  color: #fff;
  overflow: hidden;
}
.video-frame__play { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: rgba(255, 255, 255, .16); border: 2px solid rgba(255, 255, 255, .7); }
.video-frame__play svg { width: 30px; height: 30px; fill: #fff; stroke: none; margin-left: 4px; }
.video-frame__caption { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: #d8e1eb; font-size: .8125rem; }

.rating { display: flex; flex-wrap: wrap; gap: 8px; }
.rating button { min-height: 40px; padding: 8px 16px; background: #fff; border: 1px solid var(--border-default); border-radius: var(--radius-full); color: var(--text-heading); font-size: .875rem; font-weight: 600; }
.rating button:hover { border-color: var(--n-400); }
.rating button[aria-pressed="true"] { background: var(--surface-brand-tint); border-color: var(--brand-plum); color: var(--brand-plum); }

/* ---- 19. Collaboration --------------------------------------------------- */

.hub-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
.hub-tabs [role="tab"] {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-align: left;
}
.hub-tabs [role="tab"]:hover { border-color: var(--border-default); }
.hub-tabs [role="tab"] > svg { width: 24px; height: 24px; margin-top: 2px; color: var(--brand-plum); }
.hub-tabs b { display: block; color: var(--text-heading); font-size: 1rem; }
.hub-tabs small { display: block; margin-top: 2px; color: var(--text-muted); font-size: .8125rem; line-height: 1.4; }
.hub-tabs [role="tab"][aria-selected="true"] { background: var(--surface-brand-tint); border-color: var(--brand-plum); box-shadow: inset 0 0 0 1px var(--brand-plum); }

.collab-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.board-list { position: sticky; top: calc(var(--topbar) + 16px); padding: 16px; }
.board-list button { display: flex; justify-content: space-between; gap: 8px; width: 100%; min-height: 38px; padding: 8px 10px; border-radius: 8px; color: var(--text-body); font-size: .875rem; text-align: left; }
.board-list button:hover { background: var(--n-100); }
.board-list button[aria-pressed="true"] { background: var(--surface-brand-tint); color: var(--brand-plum); font-weight: 600; }
.board-list button span { color: var(--text-muted); font-weight: 400; }
.board-list__group { margin: 12px 10px 4px; color: var(--text-muted); font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.type-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.type-filter button { min-height: 34px; padding: 5px 12px; background: #fff; border: 1px solid var(--border-subtle); border-radius: var(--radius-full); color: var(--text-muted); font-size: .8125rem; font-weight: 600; }
.type-filter button:hover { color: var(--text-heading); border-color: var(--border-default); }
.type-filter button[aria-pressed="true"] { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }
@media (pointer: coarse) { .type-filter button { min-height: var(--tap); } }

.post-list { display: grid; gap: 12px; }
.post-card { display: grid; gap: 8px; padding: 20px; }
.post-card__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.post-card h3 { font-size: 1.0625rem; }
.post-card p { color: var(--text-body); font-size: .9375rem; }
.post-card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--border-subtle); color: var(--text-muted); font-size: .8125rem; }
.post-card__foot .who { display: inline-flex; align-items: center; gap: 8px; color: var(--text-body); }
.fulfilled-note { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface-success-tint); border-radius: var(--radius-md); color: var(--status-success-text); font-size: .8125rem; }
.fulfilled-note svg { width: 16px; height: 16px; }
.fulfilled-note a { color: inherit; font-weight: 600; }

.outcome { padding: 10px 12px; background: var(--n-50); border-radius: var(--radius-md); font-size: .9375rem; }

.insight-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 24px; margin-bottom: 16px; background: var(--brand-navy); border-radius: var(--radius-lg); color: #fff; }
.insight-intro h2 { color: #fff; }
.insight-intro p { max-width: 700px; margin-top: 6px; color: #d8e1eb; font-size: .9375rem; }
.insight-intro .eyebrow { color: var(--brand-amber); }
.insight-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.insight-card { display: grid; gap: 10px; align-content: start; padding: 20px; }
.insight-card h3 { font-size: 1rem; }
.insight-card p { font-size: .9375rem; }
.insight-card footer { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border-subtle); }

/* ---- 20. Success Story --------------------------------------------------- */

.story-hero { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; margin-bottom: 22px; }
.story-hero__mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: var(--pebble-3); background: var(--brand-navy); color: var(--brand-amber); }
.story-hero__mark svg { width: 30px; height: 30px; }
.story-hero p:not(.eyebrow) { max-width: 760px; margin-top: 10px; font-size: 1.0625rem; }

.reassure {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  margin-bottom: 18px;
  padding: 0;
  list-style: none;
}
.reassure li { display: flex; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); font-size: .875rem; line-height: 1.4; }
.reassure b { display: block; color: var(--text-heading); font-size: .9375rem; }
.reassure__num { display: grid; place-items: center; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-brand-tint); color: var(--brand-plum); font-family: var(--font-display); font-size: .75rem; font-weight: 700; }

.story-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.story-themes { margin: 10px 0 0; padding-left: 20px; font-size: .9375rem; }
.story-themes li + li { margin-top: 4px; }
.prefill-note { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 16px; background: var(--surface-success-tint); border-radius: var(--radius-md); color: var(--status-success-text); font-size: .9375rem; }
.prefill-note svg { width: 18px; height: 18px; }
.status-steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.status-steps li { display: flex; gap: 10px; font-size: .875rem; }
.status-steps li::before { content: ""; flex-shrink: 0; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--n-300); }
.status-steps li.is-done::before { background: var(--status-success); }
.status-steps li.is-current::before { background: var(--brand-amber); box-shadow: 0 0 0 3px var(--surface-accent); }
.status-steps b { display: block; color: var(--text-heading); }

/* ---- 21. Organization profile -------------------------------------------- */

.org-hero { display: flex; align-items: center; gap: 22px; padding: 26px; margin-bottom: 18px; background: #fff; border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); }
.org-hero__main { flex: 1; min-width: 0; }
.org-hero__meta { margin-top: 10px; color: var(--text-muted); font-size: .875rem; }
.org-hero__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.own-org-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; margin-bottom: 18px; background: var(--n-100); border-radius: var(--radius-md); font-size: .875rem; }

.fact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.fact-grid h3 { margin-bottom: 6px; font-size: .9375rem; }
.fact-grid p, .fact-grid li { font-size: .9375rem; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }

.prompt-answer { padding-left: 14px; margin-top: 16px; border-left: 3px solid var(--brand-sand); }
.prompt-answer h3 { color: var(--text-muted); font-size: .8125rem; font-weight: 600; }
.prompt-answer p { margin-top: 4px; color: var(--text-body); font-size: 1rem; }

.sub-block + .sub-block { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border-subtle); }
.sub-block h3 { margin-bottom: 8px; font-size: .9375rem; }

.person-entry { padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
.person-entry:last-child { border-bottom: 0; padding-bottom: 0; }
.person-entry__row { display: flex; align-items: flex-start; gap: 12px; }
.person-entry details { margin: 8px 0 0 44px; font-size: .875rem; }
.person-entry summary { color: var(--brand-plum); font-weight: 600; cursor: pointer; }
.person-entry details p { margin-top: 6px; color: var(--text-body); }

.level-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: .9375rem; }
.level-dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--pebble-4); background: linear-gradient(145deg, #9aa9b9, #e2e8ee); color: var(--brand-navy); font-family: var(--font-display); font-size: .75rem; font-weight: 800; }

/* ---- 22. My Activity ----------------------------------------------------- */

.glance { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 0; margin-bottom: 28px; }
.glance__item { padding: 18px 16px; border-right: 1px solid var(--border-subtle); }
.glance__item:last-child { border-right: 0; }
.glance__item b { display: block; color: var(--text-heading); font-family: var(--font-display); font-size: 1.625rem; line-height: 1.1; }
.glance__item span { color: var(--text-muted); font-size: .8125rem; line-height: 1.3; }

.month-label { margin: 18px 0 8px; color: var(--text-muted); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.month-label:first-child { margin-top: 0; }

.recognition-lead { max-width: 680px; color: var(--text-muted); }
.recognition-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.badge-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.badge { display: flex; gap: 12px; padding: 14px; background: var(--n-50); border-radius: var(--radius-lg); }
.badge__stone { display: grid; place-items: center; flex-shrink: 0; width: 48px; height: 48px; border-radius: var(--pebble-3); }
.badge__stone svg { width: 22px; height: 22px; }
.badge b { display: block; color: var(--text-heading); font-size: .9375rem; }
.badge small { display: block; color: var(--text-muted); font-size: .8125rem; line-height: 1.35; }
.badge .meter { margin-top: 8px; }
.badge--pending .badge__stone { background: #fff; border: 2px dashed var(--border-default); color: var(--text-subtle); }

.meter { display: block; height: 8px; background: var(--n-200); border-radius: var(--radius-full); overflow: hidden; }
.meter__fill { display: block; height: 100%; background: var(--brand-plum); border-radius: inherit; }
.meter__fill--info { background: var(--status-info); }

.collective { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 8px; }
.collective b { color: var(--brand-plum); font-family: var(--font-display); font-size: 2rem; line-height: 1; }
.collective span { color: var(--text-muted); font-size: .875rem; }

/* ---- 23. Surveys and settings -------------------------------------------- */

.survey-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.survey-card { display: grid; gap: 8px; }
.survey-card + .survey-card { margin-top: 12px; }
.survey-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.survey-card .who-sees { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: .8125rem; }
.survey-card .who-sees svg { width: 15px; height: 15px; }
.survey-card .btn { justify-self: start; margin-top: 4px; }
.feedback-examples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.feedback-examples .card { padding: 18px; }
.feedback-examples h3 { margin: 8px 0 4px; font-size: .9375rem; }
.feedback-examples p { color: var(--text-muted); font-size: .875rem; }

.survey-form { max-width: 760px; margin: 0 auto; }
.survey-form__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 22px; color: var(--text-muted); font-size: .875rem; }
.question + .question { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border-subtle); }
.question__num { margin-bottom: 4px; color: var(--text-muted); font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }

.settings-section + .settings-section { margin-top: 16px; }

/* ---- 24. Staff workspace ------------------------------------------------- */

.work-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.work-card { display: grid; gap: 6px; align-content: start; padding: 18px; border-top: 3px solid var(--brand-amber); }
.work-card--calm { border-top-color: var(--border-default); }
.work-card b { color: var(--text-heading); font-family: var(--font-display); font-size: 1.75rem; line-height: 1; }
.work-card h3 { font-size: .9375rem; }
.work-card p { color: var(--text-muted); font-size: .8125rem; }
.work-card .text-link { margin-top: 6px; }

.manage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.manage-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; }
.manage-card h3 { font-size: 1rem; }
.manage-card p { margin-top: 2px; color: var(--text-muted); font-size: .8125rem; }

.queue { display: grid; gap: 12px; }
.queue-item { display: grid; gap: 8px; border-left: 4px solid var(--brand-amber); }
.queue-item__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.queue-item h3 { font-size: 1.0625rem; }
.queue-item p { color: var(--text-muted); font-size: .875rem; }
.queue-item__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.tag-panel { margin-top: 4px; border: 1px dashed var(--border-default); border-radius: var(--radius-md); background: var(--n-50); }
.tag-panel summary { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 12px; color: var(--text-heading); font-size: .875rem; font-weight: 600; cursor: pointer; }
.tag-panel > div { padding: 0 12px 12px; display: grid; gap: 8px; font-size: .875rem; }

.table-wrap { position: relative; overflow-x: auto; background: #fff; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); }
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table th, .data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); text-align: left; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table th { color: var(--text-muted); font-size: .75rem; font-weight: 600; background: var(--n-50); white-space: nowrap; }
.data-table td b { color: var(--text-heading); }
.num { font-variant-numeric: tabular-nums; }

.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.report-card h3 { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 700; }
.report-card > p { margin-top: 2px; color: var(--text-muted); font-size: .8125rem; }
.metric-list { list-style: none; margin: 14px 0 0; padding: 0; }
.metric { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--border-subtle); }
.metric__label { color: var(--text-body); font-size: .9375rem; }
.metric__value { color: var(--text-heading); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.metric__value--none { color: var(--text-subtle); font-weight: 400; }
.metric .source { grid-column: 1 / -1; justify-self: start; }

.source { display: inline-flex; align-items: center; gap: 5px; padding: 1px 7px; border-radius: var(--radius-sm); font-size: .6875rem; font-weight: 600; white-space: nowrap; }
.source::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.source--tracked { background: var(--surface-success-tint); color: var(--status-success-text); }
.source--tracked::before { background: var(--status-success); }
.source--staff { background: var(--n-100); color: var(--text-muted); }
.source--staff::before { background: var(--brand-dusk); }
.source--new { background: var(--surface-info-tint); color: var(--status-info); }
.source--new::before { border: 2px solid var(--status-info); width: 5px; height: 5px; }
.source--external { background: #fffaf2; border: 1px dashed #e3b86f; color: var(--status-warning); }
.source--external::before { background: transparent; border: 2px dashed var(--brand-amber); width: 5px; height: 5px; }

.mini-bars { display: grid; gap: 8px; margin-top: 12px; }
.mini-bars div { display: grid; grid-template-columns: 130px minmax(0, 1fr) 28px; gap: 10px; align-items: center; font-size: .8125rem; }
.mini-bars i { display: block; height: 8px; background: var(--n-100); border-radius: var(--radius-full); overflow: hidden; }
.mini-bars em { display: block; height: 100%; background: var(--brand-plum); border-radius: inherit; }
.mini-bars b { color: var(--text-heading); text-align: right; font-variant-numeric: tabular-nums; }

.spark { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; align-items: end; height: 96px; margin-top: 12px; }
.spark div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.spark i { display: block; width: min(26px, 100%); background: var(--brand-plum); border-radius: 4px 4px 0 0; }
.spark span { color: var(--text-muted); font-size: .6875rem; }

/* Links inside card titles, and spacing inside form sections. */
.post-card h3 a, .insight-card h3 a { color: var(--text-heading); text-decoration: none; }
.post-card h3 a:hover { color: var(--brand-plum); text-decoration: underline; }
.form-section > .field, .form-section > .field-grid, .form-section > .callout { margin-top: 20px; }
.form-section > :first-child { margin-top: 0; }
.question > fieldset.field { margin-top: 0; }
.manage-card > span:last-child { min-width: 0; }

/* Headings styled as eyebrow labels keep the label size inside cards. */
h2.eyebrow, h3.eyebrow { font-family: var(--font-display); font-size: .6875rem; font-weight: 600; letter-spacing: .09em; line-height: 1.4; }

/* Long strategic tag paths wrap instead of pushing the card wider. */
.tag-panel .chip { white-space: normal; }

/* Review notes keep a consistent gap from whatever they annotate. */
* + .review-note { margin-top: 14px; }
.review-note + * { margin-top: 16px; }
.more-filters .review-note { flex-basis: 100%; margin-top: 0; }

/* ---- 25. Partner directory ----------------------------------------------- */

.org-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.org-card { display: grid; gap: 10px; align-content: start; padding: 20px; }
.org-card__top { display: flex; align-items: center; gap: 12px; }
.org-card h3 { font-size: 1rem; line-height: 1.3; }
.org-card__sector { color: var(--text-muted); font-size: .8125rem; }
.org-card p { font-size: .875rem; }
.org-card__facts { display: grid; gap: 4px; padding-top: 10px; border-top: 1px solid var(--border-subtle); color: var(--text-muted); font-size: .8125rem; }
.org-card__facts span { display: flex; align-items: center; gap: 6px; }
.org-card__facts svg { width: 14px; height: 14px; }

/* ---- 26. Messages --------------------------------------------------------
   Mirrors the portal's messaging: inbox, one conversation, choosing someone.
   Online status is the only addition, and always pairs the dot with words. */

.msg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.msg-row {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
}
.msg-row:hover { border-color: var(--n-400); box-shadow: var(--shadow-xs); color: inherit; }
/* Unread is carried by weight and a count, not by colour alone. */
.msg-row--unread { border-left: 3px solid var(--brand-plum); }
.msg-row--unread .msg-row__who, .msg-row--unread .msg-row__subject { color: var(--text-heading); font-weight: 700; }
.msg-row__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.msg-row__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.msg-row__who { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; color: var(--text-heading); font-size: .875rem; font-weight: 600; }
.msg-row__top time { color: var(--text-muted); font-size: .75rem; white-space: nowrap; }
.msg-row__subject { color: var(--text-body); font-size: .875rem; }
.msg-row__preview { overflow: hidden; color: var(--text-muted); font-size: .8125rem; text-overflow: ellipsis; white-space: nowrap; }
.msg-row__badge { display: grid; place-items: center; flex-shrink: 0; min-width: 22px; height: 22px; padding: 0 8px; background: var(--brand-plum); color: #fff; border-radius: var(--radius-full); font-size: .75rem; font-weight: 700; }

.presence { position: relative; display: inline-flex; flex-shrink: 0; }
.presence--online::after {
  content: ""; position: absolute; right: -2px; bottom: -2px;
  width: 12px; height: 12px;
  background: var(--status-success);
  border: 2px solid #fff;
  border-radius: 50%;
}
.online { display: inline-flex; align-items: center; gap: 6px; color: var(--status-success-text); font-size: .75rem; font-weight: 600; white-space: nowrap; }
.online::before { content: ""; width: 7px; height: 7px; background: var(--status-success); border-radius: 50%; }

.online-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; margin-bottom: 18px; background: #fff; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
.online-strip .online { font-size: .875rem; }
.avatar-stack { display: inline-flex; }
.avatar-stack > * { margin-right: -6px; border: 2px solid #fff; }

.msg-topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; font-size: .875rem; font-weight: 600; }
.msg-actions { display: flex; gap: 4px; }
.msg-context { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; color: var(--text-muted); font-size: .875rem; }
.msg-context svg { width: 15px; height: 15px; }

/* Both sides share one column: a letter, not a chat. */
.msg-thread { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 14px; }
.msg {
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--border-default);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.msg--mine { border-left-color: var(--brand-plum); background: var(--n-50); }
.msg__meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.msg__who { color: var(--text-heading); font-size: .875rem; font-weight: 600; }
.msg__meta time { color: var(--text-muted); font-size: .75rem; white-space: nowrap; }
.msg__body { max-width: 72ch; font-size: .9375rem; overflow-wrap: anywhere; }
.msg-reply { padding-top: 24px; border-top: 1px solid var(--border-subtle); }
.reply-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0 14px; color: var(--text-muted); font-size: .875rem; }

.people-group + .people-group { margin-top: 22px; }
.people-group__title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 8px; color: var(--text-muted); font-family: var(--font-ui); font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.people-group__title .online { font-size: .8125rem; letter-spacing: 0; text-transform: none; }
.people-card { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); }
.people-card .person { padding: 12px 16px; }
.people-group--online .people-card { background: #f7fbf9; border-color: #cfe5da; }

/* ---- 27. Responsive ------------------------------------------------------ */

@media (max-width: 1199px) {
  .search-trigger kbd, .account-btn .topbar__label { display: none; }
  .glance { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .glance__item:nth-child(3) { border-right: 0; }
  .glance__item:nth-child(-n+3) { border-bottom: 1px solid var(--border-subtle); }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-grid > :first-child { grid-column: 1 / -1; min-height: 180px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-tile { min-height: 0; }
  .filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .manage-grid, .org-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-strip__label { grid-column: 1 / -1; max-width: none; }
  .feedback-examples { grid-template-columns: 1fr; }
}

@media (max-width: 1023px) {
  .app { display: block; }
  .shell {
    position: fixed; inset: 0 auto 0 0; z-index: 300;
    width: min(300px, 86vw); height: auto;
    transform: translateX(-100%);
    transition: transform var(--duration-slow) var(--ease-out);
    box-shadow: var(--shadow-lg);
    visibility: hidden;
  }
  .shell.is-open { transform: none; visibility: visible; }
  .shell .shell__close { display: inline-grid; position: absolute; top: 14px; right: 12px; color: var(--text-on-dark-muted); }
  .shell .shell__close:hover { background: rgba(255, 255, 255, .1); color: #fff; }
  .drawer-backdrop { display: block; position: fixed; inset: 0; z-index: 290; background: rgba(9, 50, 84, .48); opacity: 0; pointer-events: none; transition: opacity var(--duration-base) var(--ease-out); }
  .drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
  .topbar .topbar__menu { display: inline-grid; }
  .preview-pill { display: none; }

  .dash-grid, .layout-rail, .story-layout, .recognition-grid, .collab-layout { grid-template-columns: minmax(0, 1fr); }
  .board-list { position: static; }
  .quick {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 6px;
    scrollbar-width: none;
  }
  .quick::-webkit-scrollbar { display: none; }
  .quick__item { flex: 0 0 auto; scroll-snap-align: start; }
  .report-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767px) {
  .page { padding-top: 22px; }
  .page-header, .meeting-head { flex-direction: column; gap: 14px; }
  .page-header__actions, .meeting-head__status { justify-content: flex-start; justify-items: start; }
  .detail-hero, .org-hero { flex-direction: column; align-items: flex-start; padding: 20px; gap: 16px; }
  .detail-hero__actions { justify-items: start; }
  .org-hero__actions { justify-content: flex-start; }
  .card, .form-section { padding: 18px; }

  .search-trigger { flex: 0 0 var(--tap); width: var(--tap); min-height: var(--tap); padding: 0; justify-content: center; border: 0; background: transparent; }
  .search-trigger__label, .account-btn .topbar__label { display: none; }
  .topbar .topbar__create { width: var(--tap); padding: 0; }
  .topbar .topbar__create .topbar__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .topbar { gap: 4px; padding-inline: 12px; }
  .topbar__actions { gap: 2px; }
  .popover, .popover--wide { position: fixed; left: 12px; right: 12px; top: calc(var(--topbar) + 4px); width: auto; max-height: calc(100vh - 90px); overflow-y: auto; }

  .hub-tabs, .committee-grid, .featured-grid, .insight-grid, .field-grid, .reassure, .fact-grid,
  .badge-grid, .survey-grid, .manage-grid, .org-grid, .model-strip { grid-template-columns: minmax(0, 1fr); }
  .hub-tabs [role="tab"] { padding: 12px 14px; }
  .filter-bar, .filter-bar--short { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar > .btn { grid-column: 1 / -1; }
  .banner { flex-wrap: wrap; }
  .banner__actions { width: 100%; }
  .story-banner { flex-wrap: wrap; gap: 14px; padding: 18px; }
  .story-banner__mark { width: 44px; height: 44px; }
  .story-banner__mark svg { width: 20px; height: 20px; }
  .story-banner__text { flex: 1 1 0; }
  .story-banner .btn { flex-basis: 100%; }
  .msg-row { gap: 12px; padding: 14px; }
  .msg { padding: 14px 16px; }
  .insight-intro { flex-direction: column; align-items: flex-start; }
  .event-row { flex-wrap: wrap; }
  .event-row__main { flex-basis: calc(100% - 70px); }
  .event-row__aside { width: 100%; justify-items: start; grid-auto-flow: column; justify-content: start; align-items: center; padding-left: 66px; }
  .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .glance__item { border-right: 0; border-bottom: 1px solid var(--border-subtle); }
  .glance__item:nth-child(odd) { border-right: 1px solid var(--border-subtle); }
  .glance__item:nth-last-child(-n+2) { border-bottom: 0; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .form-actions__note { width: 100%; margin-left: 0; }
  .form-actions .btn { flex: 1 1 auto; }
  .row-item { padding: 12px 14px; }
  .row-item__aside .pill { display: none; }
  .section-nav { margin-inline: calc(var(--gutter) * -1); border-radius: 0; border-inline: 0; }
  /* Tabs wrap on phones so none are hidden off the edge. */
  .section-tabs { flex-wrap: wrap; overflow-x: visible; }
  .mini-bars div { grid-template-columns: 100px minmax(0, 1fr) 28px; }
  .welcome__org { font-size: 1rem; }
}

@media (max-width: 479px) {
  .category-grid { grid-template-columns: minmax(0, 1fr); }
  .scale__options { gap: 4px; }
  .scale__options label { padding: 8px 2px; font-size: .6875rem; }
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .pebble--xl { width: 72px; height: 72px; font-size: 1.125rem; }
  .next-meeting__when { flex-wrap: wrap; }
  .attendance-figure b { font-size: 2rem; }
}

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