/* ── Reset & variables ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #1b1b1d;
  --surface:      #242526;
  --surface-2:    #2d2d30;
  --border:       #3d3d40;
  --primary:      #2574c2;
  --primary-h:    #3a8fd4;
  --text:         #e3e3e3;
  --text-muted:   #9a9a9a;
  --radius:       8px;
  --max-w:        1200px;
  --canadian-red: #d52b1e;   /* Official Canadian flag red (Pantone 032 C approx) */
}

/* ── Maple leaf icon ─────────────────────────────────────────────────────── */
.icon-maple {
  display: inline-block;
  width:  0.85em;
  height: 0.85em;
  color:  var(--canadian-red);
  vertical-align: -0.1em;
  flex-shrink: 0;
  margin-left: 0.2em;
}

html { color-scheme: dark; font-size: 20px; }
body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-h); }
img { max-width: 100%; height: auto; }
/* Leaflet tile images must not be constrained by the global img reset */
.leaflet-container img { max-width: none; }

/* ── Layout ─────────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.main-content { flex: 1; }

/* ── Navbar ─────────────────────────────────────────────────────── */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* ── Global scope filter bar — LED console aesthetic ─────────────────────── */
.scope-bar {
  background: #0b1320;
  border-bottom: 1px solid rgba(255,255,255,0.055);
  box-shadow: 0 2px 14px rgba(0,0,0,0.45), inset 0 -1px 0 rgba(255,255,255,0.04);
  position: sticky;
  top: 60px;          /* navbar height */
  z-index: 99;
}
.scope-bar__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: .32rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  flex-wrap: nowrap;
  min-width: 0;
}
/* Licence-scope buttons scroll horizontally on narrow screens; the lens sits OUTSIDE
   this box so its dropdown isn't clipped by overflow-x. */
.scope-bar__scroll {
  display: flex;
  align-items: center;
  gap: .3rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}
.scope-bar__scroll::-webkit-scrollbar { display: none; }
.scope-bar__lens {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-shrink: 0;
  position: relative;   /* anchor for the lens dropdown menu */
}
.scope-bar__label {
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(255,255,255,0.22);
  margin-right: .4rem;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: ui-monospace, 'SF Mono', 'Fira Code', monospace;
}
/* Unlit button — dim, recessed */
.scope-btn {
  --lc: rgba(255,255,255,0.45);
  padding: .2rem .6rem;
  border-radius: 3px;   /* CAD terminal button — sharp, not pill */
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.035);
  color: rgba(255,255,255,0.28);
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s, text-shadow .15s;
  font: inherit;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}
.scope-btn:hover {
  background: color-mix(in srgb, var(--lc) 14%, rgba(255,255,255,0.04));
  border-color: color-mix(in srgb, var(--lc) 55%, transparent);
  color: color-mix(in srgb, var(--lc) 90%, white);
}
/* Lit / active — LED glow */
.scope-btn--active {
  background: color-mix(in srgb, var(--lc) 18%, transparent);
  border-color: color-mix(in srgb, var(--lc) 85%, transparent);
  color: var(--lc);
  box-shadow:
    0 0 6px  color-mix(in srgb, var(--lc) 65%, transparent),
    0 0 18px color-mix(in srgb, var(--lc) 28%, transparent),
    inset 0 0 4px color-mix(in srgb, var(--lc) 15%, transparent);
  text-shadow: 0 0 7px color-mix(in srgb, var(--lc) 90%, white);
}
/* "All" button: white glow when active */
.scope-btn--all { --lc: rgba(255,255,255,0.45); }
.scope-btn--all.scope-btn--active {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.88);
  box-shadow: 0 0 6px rgba(255,255,255,0.12), 0 0 14px rgba(255,255,255,0.06);
  text-shadow: 0 0 6px rgba(255,255,255,0.5);
}
/* Thin vertical rule between paramedic ladder and RN/MD */
.scope-bar__divider {
  display: inline-block;
  width: 1px;
  height: 1.25em;
  background: rgba(255,255,255,0.1);
  margin: 0 .35rem;
  flex-shrink: 0;
  align-self: center;
}
.navbar__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar__brand-group {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.navbar__brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.15;
  color: var(--text);
}
.navbar__brand:hover { color: var(--primary-h); }
.navbar__logo { width: 28px; height: 28px; }
.navbar__links { display: flex; align-items: center; gap: 1.25rem; font-size: .88rem; }
.navbar__links a { color: var(--text-muted); }
.navbar__links a:hover { color: var(--text); }

/* ── Navbar dropdowns ───────────────────────────────────────────── */
.navbar__dropdown { position: relative; }

.navbar__dropbtn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: .88rem;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: .2rem;
  padding: 0;
  transition: color .15s;
}
.navbar__dropbtn:hover,
.navbar__dropdown.is-open .navbar__dropbtn { color: var(--text); }

.navbar__chevron {
  width: 14px;
  height: 14px;
  transition: transform .2s;
  flex-shrink: 0;
}
.navbar__dropdown.is-open .navbar__chevron { transform: rotate(180deg); }

.navbar__dropmenu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  padding: .4rem 0;
  z-index: 200;
  white-space: nowrap;
}
.navbar__dropdown.is-open .navbar__dropmenu { display: block; }

.navbar__dropmenu a {
  display: block;
  padding: .45rem 1.1rem;
  font-size: .85rem;
  color: var(--text-muted);
  transition: background .12s, color .12s;
}
.navbar__dropmenu a:hover { background: var(--surface-2); color: var(--text); }
.navbar__dropmenu-heading {
  display: block;
  padding: .35rem 1.1rem .1rem;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  pointer-events: none;
  user-select: none;
}
.navbar__dropmenu a + .navbar__dropmenu-heading,
.navbar__dropmenu-divider + .navbar__dropmenu-heading {
  margin-top: .25rem;
  padding-top: .45rem;
  border-top: 1px solid var(--border);
}
.navbar__dropmenu-divider {
  height: 1px;
  background: var(--border);
  margin: .35rem .6rem;
}
.navbar__dropmenu-viewall {
  font-size: .8rem !important;
  color: var(--primary) !important;
}
.navbar__dropmenu-viewall:hover { color: var(--primary-h) !important; background: none !important; }
.navbar__dropmenu-pending { opacity: .65; }
.navbar__dropmenu-badge {
  font-size: .65rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: .05rem .3rem;
  margin-left: .25rem;
  color: var(--text-muted);
  vertical-align: middle;
}

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, #1a2d45 0%, var(--bg) 60%);
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.hero__inner { max-width: 720px; margin: 0 auto; }
.hero__logo { width: 52px; height: 52px; margin-bottom: 1rem; opacity: .9; }
.hero__title { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 800; line-height: 1.05; margin-bottom: .5rem; }
.hero__subtitle { font-size: 1rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.hero__btns {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  justify-content: center;
}
/* On the Wire sits a touch smaller — optically balanced with the two main btns */
.hero__btns .on-the-wire-btn {
  margin-left: .25rem;
}

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: .65rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  transition: background .2s, color .2s;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-h); color: #fff; }
.btn--secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn--secondary:hover { background: var(--border); color: var(--text); }
.btn--ghost {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid color-mix(in srgb, var(--primary) 35%, transparent);
}
.btn--ghost:hover {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  border-color: var(--primary);
  color: var(--primary);
}
.btn--sm   { padding: .35rem .85rem; font-size: .8rem; border-radius: 4px; }
.btn--pill  { border-radius: 4px; }   /* name retained; now a sharp small button */

/* ── Home sections ──────────────────────────────────────────────── */
.home-section { padding: 3rem 1.5rem; }
.home-section--alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.home-section--flush { padding-top: 1.25rem; }

/* ── Topic accordion tiles ──────────────────────────────────────── */
.topic-accordion {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.topic-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s;
}
.topic-tile:hover { border-color: var(--primary); }

.topic-tile__header {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  cursor: pointer;
  user-select: none;
}

.topic-tile__icon { width: 44px; height: 44px; flex-shrink: 0; margin-top: .1rem; }

.topic-tile__heading { flex: 1; min-width: 0; }
.topic-tile__title {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .2rem;
  text-decoration: none;
}
.topic-tile__title:hover { color: var(--primary-h); }
.topic-tile__heading p { font-size: .85rem; color: var(--text-muted); line-height: 1.4; margin: 0; }

.topic-tile__chevron {
  width: 18px; height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: .25rem;
  transition: transform .25s ease;
}
.topic-tile.is-open .topic-tile__chevron { transform: rotate(180deg); }

.topic-tile__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  border-top: 1px solid transparent;
}
.topic-tile.is-open .topic-tile__body { border-top-color: var(--border); }

.topic-tile__links {
  list-style: none;
  padding: .75rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.topic-tile__link {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  color: var(--primary);
  padding: .3rem 0;
  text-decoration: none;
  border-radius: 4px;
  transition: color .15s;
}
.topic-tile__link:hover { color: var(--primary-h); }
.topic-tile__link svg { width: 14px; height: 14px; flex-shrink: 0; opacity: .7; }
.topic-tile__link--pending {
  color: var(--text-muted);
  cursor: default;
}
.topic-tile__link--pending:hover { color: var(--text-muted); }

/* ── Feature icons row ──────────────────────────────────────────── */
.features { padding: 4rem 1.5rem; }
.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  text-align: center;
}
.feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 1.5rem 1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;   /* CAD row — left-stripe activates on hover */
  color: var(--text);
  transition: border-color .2s, border-left-color .2s;
}
.feature-card:hover { border-color: var(--border); border-left-color: var(--primary); color: var(--text); }
.feature-card img { width: 72px; height: 72px; }
.feature-card h3 { font-size: 1.05rem; }
.feature-card p { font-size: .9rem; color: var(--text-muted); }

/* ── Section titles ─────────────────────────────────────────────── */
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--border);
}

/* Section title + companion action button on the same row */
.section-title-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--border);
}
.section-title-row .section-title {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  flex: 1 1 auto;
}
.section-title-row .btn--sm {
  flex-shrink: 0;
  align-self: center;
  white-space: nowrap;
  margin-bottom: .15rem;     /* optical alignment with baseline */
}

/* "On the Wire" dispatch button — subtle pulse on the antenna emoji */
.on-the-wire-btn {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  letter-spacing: .01em;
}

/* LIVE chip inside the On the Wire button */
.live-chip {
  display: inline-flex;
  align-items: center;
  gap: .3em;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .07em;
  color: #fff;
  background: #10b981;
  border-radius: 3px;    /* CAD broadcast indicator — sharp */
  padding: .1em .45em .12em;
  line-height: 1;
  vertical-align: middle;
  font-family: ui-monospace, 'SF Mono', monospace;
}
/* Small dot inside the chip */
.live-chip::before {
  content: '';
  display: inline-block;
  width: .42em;
  height: .42em;
  border-radius: 50%;
  background: #fff;
  opacity: .9;
  animation: live-chip-blink 4.5s ease-in-out infinite;
}
/* Double-blink every ~4.5 s; mostly steady, two quick pulses then a pause */
@keyframes live-chip-blink {
  0%,  55%, 100% { opacity: .9; transform: scale(1);    }
  60%             { opacity: .1; transform: scale(.6);   }
  65%             { opacity: .9; transform: scale(1.1);  }
  70%             { opacity: .1; transform: scale(.6);   }
  75%             { opacity: .9; transform: scale(1);    }
}

.section-cta { margin-top: 2rem; text-align: center; }

/* ── Topic filter bar ───────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.75rem;
  padding: .6rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .88rem;
}
.filter-bar__label { color: var(--text-muted); }
.filter-bar__topic {
  font-weight: 700;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  padding: .15rem .55rem;
  border-radius: 3px;
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: .8em;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.filter-bar__clear {
  margin-left: auto;
  color: var(--text-muted);
  font-size: .82rem;
}
.filter-bar__clear:hover { color: var(--text); }
.guides-preview, .blog-preview { padding: 3rem 1.5rem; }

/* ── Cards ──────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card-grid--wide {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

/* ── Topic catalogue listing header ──────────────────────────────── */
.topic-cat-header {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-top: .75rem;
}
.topic-cat-header__icon {
  width: 48px;
  height: 48px;
  opacity: .8;
  flex-shrink: 0;
}
.topic-cat-header__count {
  color: var(--text-muted);
  font-size: .88rem;
  margin: .2rem 0 0;
}
.card {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;   /* CAD row hover activates stripe */
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color .2s, border-left-color .2s;
}
.card:hover { border-color: var(--border); border-left-color: var(--primary); }
.card--unavailable { opacity: .55; cursor: default; }
.card--unavailable:hover { border-color: var(--border); transform: none; }
.card__icon { width: 56px; height: 56px; }
.card__title { font-size: 1.1rem; font-weight: 700; }
.card__text { font-size: .9rem; color: var(--text-muted); flex: 1; }
.card__updated {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin: .5rem 0 0;
  padding: .15rem .45rem .15rem .5rem;
  border-radius: 2px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  background: transparent;
  font-size: .62rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-family: ui-monospace, 'SF Mono', 'Fira Code', monospace;
}
.card__updated::before { display: none; }   /* left-border stripe replaces dot */
.card__link { font-size: .85rem; color: var(--primary); }
.card__badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .15rem .45rem;
  border-radius: 4px;
  width: fit-content;
}
.card__badge--revealjs { background: #1a2f1a; color: #6fcf97; border: 1px solid #2d5a2d; }
.card__badge--pptx     { background: #1e2a3a; color: #90caf9; border: 1px solid #2a4a6a; }
.card__context { font-size: .78rem; color: var(--text-muted); font-style: italic; }

/* ── Badge ──────────────────────────────────────────────────────── */
.badge { font-size: .7rem; padding: .15rem .45rem; border-radius: 4px; font-weight: 600; vertical-align: middle; }
.badge--pending { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.badge--private { background: #2a1f3a; color: #c4a0e8; border: 1px solid #5a3a7a; }

/* ── Topic tile section label & contact ─────────────────────────── */
.topic-tile__section-label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: .6rem 0 .2rem;
  border-top: 1px solid var(--border);
  margin-top: .35rem;
}
.topic-tile__link--locked { color: var(--primary); }
.topic-tile__link--locked:hover { color: var(--primary-h); }
.topic-tile__contact {
  font-size: .78rem;
  color: var(--text-muted);
  padding: .5rem 1.5rem .25rem;
  line-height: 1.4;
}
.topic-tile__contact a { color: var(--primary); }

/* ── Page header ────────────────────────────────────────────────── */
.page-header {
  padding: 3rem 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.page-header h1 { font-size: 2rem; margin-bottom: .4rem; }
.page-header p { color: var(--text-muted); }

/* ── Blog post list ─────────────────────────────────────────────── */
.post-list { display: flex; flex-direction: column; gap: 1.25rem; }
.post-card {
  display: block;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color .2s;
}
.post-card:hover { border-color: var(--primary); color: var(--text); }
.post-card__meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .5rem; font-size: .85rem; color: var(--text-muted); }
.post-card__title { font-size: 1.2rem; font-weight: 700; margin-bottom: .4rem; }
.post-card__excerpt { font-size: .9rem; color: var(--text-muted); }
.post-card__link { font-size: .85rem; color: var(--primary); margin-top: .5rem; display: inline-block; }
.post-card__eyebrow {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--primary);
  margin-bottom: .4rem;
}
.post-card--featured { border-color: var(--primary-h); margin-bottom: 1rem; }
.post-card__title--lg { font-size: 1.5rem; }
.post-list--compact { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.25rem; }
.post-card--compact { padding: .9rem 1.25rem; }
.post-card--compact .post-card__title { font-size: 1rem; margin-bottom: 0; }

/* ── Blog feature section (homepage) ────────────────────────────── */
.blog-feature-row {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 860px) {
  .blog-feature-row { grid-template-columns: 1fr; }
}

/* ── Subscribe box ──────────────────────────────────────────────── */
.blog-subscribe-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.blog-subscribe-box__heading {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .4rem;
}
.blog-subscribe-box__sub {
  font-size: .88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.subscribe-form__row {
  display: flex;
  gap: .5rem;
  margin-bottom: .6rem;
}
.subscribe-form__input {
  flex: 1;
  min-width: 0;
  padding: .5rem .75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: .9rem;
}
.subscribe-form__input:focus {
  outline: none;
  border-color: var(--primary);
}
.subscribe-form__btn { white-space: nowrap; }
.subscribe-form__btn--full { width: 100%; margin-top: .5rem; }
.subscribe-form__msg {
  font-size: .85rem;
  margin-top: .5rem;
  line-height: 1.4;
}
.subscribe-form__msg--ok  { color: #7ac47a; }
.subscribe-form__msg--err { color: #e07070; }
.subscribe-feed-row {
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
  font-size: .83rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  align-items: center;
}
.subscribe-feed-row__label { }
.subscribe-feed-row__link { color: var(--primary); }
.subscribe-feed-row__link:hover { color: var(--primary-h); }

/* Sidebar variant (blog index) */
.blog-subscribe-box--sidebar { position: sticky; top: 80px; }

/* ── Blog index two-column layout ───────────────────────────────── */
.blog-index-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
  padding-bottom: 3rem;
}
@media (max-width: 800px) {
  .blog-index-layout { grid-template-columns: 1fr; }
  .blog-subscribe-box--sidebar { position: static; }
}

/* ── Feed link (blog index header) ─────────────────────────────── */
.feed-link {
  font-size: .83rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: .2rem;
}
.feed-link:hover { color: var(--primary); }

/* ── Tags ───────────────────────────────────────────────────────── */
.tag {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .1rem .4rem;
  font-size: .75rem;
  color: var(--text-muted);
}

/* ── Blog post body ─────────────────────────────────────────────── */
.post { padding: 2rem 1.5rem; }
.post__header { margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.post__title { font-size: 2rem; margin-bottom: .75rem; }
.post__meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .9rem; color: var(--text-muted); }
.post__byline {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: .9rem;
}
.post__author {
  display: flex;
  align-items: center;
  gap: .6rem;
}
.post__author-photo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.post__author-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.post__author-name {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
}
.post__author-name a { color: var(--text); }
.post__author-name a:hover { color: var(--primary); }
.post__author-credential {
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: .35rem;
}
.post__author-handle {
  font-size: .8rem;
  color: var(--primary);
  font-style: italic;
}
.post__footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

.prose { max-width: 720px; line-height: 1.8; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin: 1.5rem 0 .75rem; font-weight: 700; }
.prose h2 { font-size: 1.4rem; border-bottom: 1px solid var(--border); padding-bottom: .3rem; }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { margin: .75rem 0 1rem 1.5rem; }
.prose li { margin-bottom: .3rem; }
.prose a { color: var(--primary); }
.prose a:hover { color: var(--primary-h); }
.prose code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .1rem .35rem;
  font-size: .88em;
  font-family: 'Fira Code', 'Cascadia Code', monospace;
}
.prose pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1rem 0;
}
.prose pre code { background: none; border: none; padding: 0; }
.prose img { border-radius: var(--radius); margin: 1rem 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .9rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: .5rem .75rem; }
.prose th { background: var(--surface-2); }
.prose blockquote {
  border-left: 3px solid var(--primary);
  margin: 1rem 0;
  padding: .5rem 1rem;
  color: var(--text-muted);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ── Lead text ──────────────────────────────────────────────────── */
.lead { font-size: 1.05rem; color: var(--text-muted); max-width: 720px; margin-bottom: 2rem; line-height: 1.7; }

/* ── Empty state ────────────────────────────────────────────────── */
.empty-state { color: var(--text-muted); font-style: italic; padding: 2rem 0; }

/* ── Footer ─────────────────────────────────────────────────────── */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem 1.5rem;
  margin-top: 4rem;
  font-size: .9rem;
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
}
.footer__col { display: flex; flex-direction: column; gap: .5rem; }
.footer__heading { font-weight: 700; color: var(--text); margin-bottom: .25rem; }
.footer__col a { color: var(--text-muted); }
.footer__col a:hover { color: var(--text); }
.footer__copyright {
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
  color: var(--text-muted);
  font-size: .8rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.footer__copyright a { color: var(--text-muted); }

/* Valhalla rune */
.footer__valhalla { text-decoration: none; }
.footer__valhalla:hover { color: var(--primary); }
.footer__rune,
.valhalla-rune {
  font-size: .95em;
  opacity: .5;
  letter-spacing: .02em;
  transition: opacity .2s;
  user-select: none;
}
.footer__valhalla:hover .footer__rune { opacity: .9; }
.valhalla-rune { font-size: 1em; }
strong:hover .valhalla-rune,
p:hover .valhalla-rune { opacity: .8; }

/* ── Journal grid ───────────────────────────────────────────────── */
.journal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}
.journal-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color .2s;
}
.journal-card:hover { border-color: var(--primary); color: var(--text); }
.journal-card__thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.journal-card__thumb img { width: 72px; height: 72px; object-fit: cover; }
.journal-card__body { display: flex; flex-direction: column; gap: .3rem; }
.journal-card__handle { font-size: .72rem; font-weight: 700; color: var(--primary); letter-spacing: .04em; text-transform: uppercase; }
.journal-card__name { font-size: .95rem; font-weight: 700; line-height: 1.3; }
.journal-card__desc { font-size: .82rem; color: var(--text-muted); flex: 1; line-height: 1.5; }

/* ── Coming soon ────────────────────────────────────────────────── */
.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4rem 2rem;
  gap: 1rem;
  color: var(--text-muted);
}
.coming-soon img { width: 96px; height: 96px; opacity: .6; }
.coming-soon h2 { font-size: 1.4rem; color: var(--text); }
.coming-soon p { max-width: 480px; }

/* ── Research reader ────────────────────────────────────────────────── */
.reader-feed-link { font-size: .85rem; color: var(--primary); white-space: nowrap; }
.reader-feed-link:hover { color: var(--primary-h); }

.article-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2.5rem; }

.article-card {
  display: block;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color .2s, border-left-color .15s;
  text-decoration: none;
}
.article-card:hover { border-color: var(--border); border-left-color: var(--primary); color: var(--text); }
.article-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .75rem;
  align-items: center;
  margin-bottom: .4rem;
  font-size: .78rem;
}
.article-card__journal {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-size: .72rem;
}
.article-card__date { color: var(--text-muted); }
.article-card__title { font-size: 1rem; font-weight: 700; line-height: 1.4; margin-bottom: .35rem; }
.article-card__authors { font-size: .82rem; color: var(--text-muted); margin-bottom: .4rem; }
.article-card__abstract { font-size: .85rem; color: var(--text-muted); line-height: 1.55; margin-bottom: .4rem; }
.article-card__doi { font-size: .75rem; color: var(--text-muted); font-family: 'Fira Code', monospace; }

.reader-attribution { font-size: .82rem; color: var(--text-muted); margin-top: 1rem; }
.reader-attribution a { color: var(--primary); }

/* ── Reader tag filters ─────────────────────────────────────────── */
.reader-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-bottom: 1.5rem;
  padding: .75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.reader-filters__label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: .25rem;
  flex-shrink: 0;
}
.reader-filter-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: .78rem;
  padding: .25rem .7rem;
  transition: background .12s, color .12s, border-color .12s;
}
.reader-filter-btn:hover { border-color: var(--primary); color: var(--text); }
.reader-filter-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.reader-filter-btn-inline {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  text-decoration: underline;
}
.reader-no-results {
  color: var(--text-muted);
  padding: 2rem 0;
  font-style: italic;
}

/* ── Topic hub (home page) ──────────────────────────────────────── */
.topic-hub {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.topic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.25rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  transition: border-color .2s, box-shadow .2s;
}
.topic-card:hover { border-color: var(--primary); }

.topic-card__head {
  display: flex;
  align-items: center;
  gap: .7rem;
}
.topic-card__icon { width: 36px; height: 36px; flex-shrink: 0; opacity: .85; }

.topic-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  line-height: 1.2;
}
.topic-card__title:hover { color: var(--primary-h); }

.topic-card__desc {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
  flex: 1;
}

.topic-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .25rem;
}

.topic-chip {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 3px;
  font-size: .72rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid currentColor;
  line-height: 1.4;
  transition: opacity .15s, background .15s;
  white-space: nowrap;
}
.topic-chip--available {
  color: var(--primary);
  background: rgba(37,116,194,.12);
}
.topic-chip--available:hover {
  background: rgba(37,116,194,.25);
  color: var(--primary-h);
}
.topic-chip--pending {
  color: var(--text-muted);
  border-color: var(--border);
  background: transparent;
  opacity: .45;
  cursor: default;
  pointer-events: none;
}

/* ── Beta banner ─────────────────────────────────────────────────── */
.beta-banner {
  background: color-mix(in srgb, #f59e0b 18%, var(--surface));
  border-bottom: 1px solid color-mix(in srgb, #f59e0b 40%, transparent);
  font-size: .82rem;
  overflow: hidden;          /* used during dismiss animation */
}
.beta-banner__inner {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .45rem 1rem;
  flex-wrap: wrap;
}
.beta-tag {
  display: inline-block;
  padding: .15rem .5rem;
  background: #b45309;
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .07em;
  border-radius: 3px;
  flex-shrink: 0;
}
.beta-banner__text {
  flex: 1;
  color: var(--text);
  margin: 0;
}
.beta-banner__link {
  color: #92400e;
  font-weight: 600;
  margin-left: .4em;
}
.beta-banner__link:hover { text-decoration: underline; }
.beta-banner__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  padding: .2rem .4rem;
  border-radius: 3px;
  flex-shrink: 0;
  transition: color .15s, background .15s;
}
.beta-banner__close:hover { color: var(--text); background: rgba(0,0,0,.07); }

/* ── Content maturity badges — CAD status blocks ────────────────────
   Left-border stripe + monospace label. Reads like a unit status code
   on a real dispatch board: no background fill, just a coloured stripe.
   ─────────────────────────────────────────────────────────────────── */
.maturity-badge {
  display: inline-flex;
  align-items: center;
  gap: .25em;
  padding: .15rem .45rem .15rem .5rem;
  border-radius: 2px;
  border: 1px solid var(--border);
  border-left: 3px solid currentColor;   /* status stripe */
  background: transparent;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
  cursor: default;
  font-family: ui-monospace, 'SF Mono', 'Fira Code', monospace;
}
.maturity-badge--draft  { color: var(--text-muted); }
.maturity-badge--review { color: #d97706; }
.maturity-badge--beta   { color: var(--primary); }
.maturity-badge--stable { color: #10b981; }

/* ── Report error FAB + modal ────────────────────────────────────── */
.report-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 800;
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding: .5rem .9rem;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  transition: color .15s, border-color .15s, box-shadow .15s;
}
.report-fab:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 3px 14px rgba(0,0,0,.18);
}
.report-fab__icon { font-style: normal; }

.report-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.report-modal-overlay[hidden] { display: none; }
.report-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 8px 32px rgba(0,0,0,.22);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  outline: none;          /* focus target, style suppressed */
}
.report-modal__hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.report-modal__title { font-size: 1.1rem; font-weight: 700; margin: 0; }
.report-modal__sub   { font-size: .82rem; color: var(--text-muted); margin: .3rem 0 0; }
.report-modal__close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-muted);
  padding: .2rem .35rem;
  border-radius: 4px;
  line-height: 1;
  flex-shrink: 0;
  transition: color .15s, background .15s;
}
.report-modal__close:hover { color: var(--text); background: rgba(0,0,0,.07); }

.report-form-row    { display: flex; flex-direction: column; gap: .35rem; }
.report-label       { font-size: .8rem; font-weight: 600; color: var(--text-muted); }
.report-required    { color: var(--primary); }
.report-input {
  padding: .5rem .7rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: .85rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .15s;
}
.report-input:focus       { outline: none; border-color: var(--primary); }
.report-input--readonly   { opacity: .6; cursor: default; }
.report-textarea          { resize: vertical; min-height: 90px; font-family: inherit; }
.report-form-actions      { display: flex; flex-direction: column; gap: .6rem; }
.report-msg               { font-size: .82rem; margin: 0; padding: .5rem .7rem; border-radius: var(--radius); }
.report-msg--ok           { background: color-mix(in srgb, #10b981 12%, var(--surface)); color: #059669; border: 1px solid #10b981; }
.report-msg--err          { background: color-mix(in srgb, #ef4444 10%, var(--surface)); color: #dc2626; border: 1px solid #ef4444; }

/* ── Contribute form page ────────────────────────────────────────── */
.contribute-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 820px) { .contribute-layout { grid-template-columns: 1fr; } }

.contribute-cla {
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  font-size: .82rem;
  line-height: 1.6;
}
.contribute-cla__heading {
  font-size: .88rem;
  font-weight: 700;
  margin: 0 0 .6rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.contribute-cla__icon { font-style: normal; }

.contribute-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-row        { display: flex; flex-direction: column; gap: .35rem; }
.form-label      { font-size: .82rem; font-weight: 600; color: var(--text-muted); }
.form-input, .form-select, .form-textarea {
  padding: .55rem .75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: .88rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-textarea { resize: vertical; min-height: 80px; font-family: inherit; }

.form-checkgroup {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem .75rem;
}
@media (max-width: 520px) { .form-checkgroup { grid-template-columns: 1fr; } }
.form-check-label {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .83rem;
  cursor: pointer;
}
.form-check-label input[type="checkbox"] { accent-color: var(--primary); width: 15px; height: 15px; flex-shrink: 0; }

.form-agree {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .83rem;
  line-height: 1.5;
}
.form-agree input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; flex-shrink: 0; margin-top: .15rem; }

.contribute-sidebar__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  font-size: .83rem;
  line-height: 1.55;
}
.contribute-sidebar__card h3 { font-size: .9rem; margin: 0 0 .6rem; }
.contribute-sidebar__card p  { color: var(--text-muted); margin: 0 0 .8rem; }
.contribute-sidebar__card ul { margin: 0; padding-left: 1.2rem; color: var(--text-muted); }
.contribute-sidebar__card li { margin-bottom: .25rem; }

/* sidebar wrapper — stacks cards vertically */
.contribute-sidebar { display: flex; flex-direction: column; gap: 1.1rem; }

/* attribution example quote */
.contribute-sidebar__example {
  margin: .6rem 0 .8rem;
  padding: .5rem .85rem;
  border-left: 3px solid var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
  font-size: .82rem;
  border-radius: 0 4px 4px 0;
}

/* maturity lifecycle list in sidebar */
.contribute-sidebar__stages {
  list-style: none;
  padding: 0;
  margin: .5rem 0 .8rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.contribute-sidebar__stages li {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  color: var(--text-muted);
  margin: 0;
}

/* required field asterisk */
.form-required { color: #dc2626; margin-left: .15rem; }

.contribute-form-msg { font-size: .85rem; padding: .65rem .9rem; border-radius: var(--radius); margin-top: .5rem; }
.contribute-form-msg--ok  { background: color-mix(in srgb, #10b981 12%, var(--surface)); color: #059669; border: 1px solid #10b981; }
.contribute-form-msg--err { background: color-mix(in srgb, #ef4444 10%, var(--surface)); color: #dc2626; border: 1px solid #ef4444; }

/* ── Global tooltip ─────────────────────────────────────────────── */
.site-tooltip {
  display: none;
  position: absolute;
  z-index: 9000;
  max-width: 280px;
  padding: .5rem .75rem;
  background: color-mix(in srgb, var(--text) 92%, transparent);
  color: var(--surface);
  font-size: .78rem;
  line-height: 1.45;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,.22);
  pointer-events: none;
  transition: opacity .15s ease;
  word-wrap: break-word;
}

/* ── Topic matrix ───────────────────────────────────────────────── */
/* ── Entry cards (role-based quick paths) ────────────────────────────────── */
.entry-cards-section {
  padding-top: 1.6rem;
  padding-bottom: 0;
}

.entry-cards__label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin: 0 0 .65rem;
}

.entry-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}

.entry-card {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, border-left-color .15s;
}

.entry-card:hover {
  border-color: var(--border);
  border-left-color: var(--primary);
}

.entry-card__icon {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  opacity: .75;
}

.entry-card__body {
  flex: 1;
  min-width: 0;
}

.entry-card__title {
  font-weight: 700;
  font-size: .88rem;
  color: var(--text);
  margin: 0 0 .18rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-card__desc {
  font-size: .74rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.35;
}

.entry-card__arrow {
  color: var(--primary);
  font-size: 1rem;
  flex-shrink: 0;
  opacity: .6;
  transition: opacity .15s, transform .15s;
}

.entry-card:hover .entry-card__arrow {
  opacity: 1;
  transform: translateX(3px);
}

@media (max-width: 680px) {
  .entry-cards {
    grid-template-columns: 1fr;
  }
  .entry-card__desc { display: none; }  /* Keep compact on mobile */
}

@media (min-width: 681px) and (max-width: 860px) {
  .entry-cards {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── View toggle (Matrix | Browse) ──────────────────────────────────────── */
/* ── Control bar: licence filter + view toggle on one row ────────────────── */
.content-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 1rem;
}

/* ── Licence scope filter ─────────────────────────────────────────────────── */
.licence-filter {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-wrap: wrap;
}

.licence-filter__label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-right: .2rem;
  white-space: nowrap;
}

.licence-filter__btn {
  --lc: var(--text-muted);
  padding: .22rem .65rem;
  border-radius: 3px;    /* CAD filter button */
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid color-mix(in srgb, var(--lc) 35%, transparent);
  background: transparent;
  color: color-mix(in srgb, var(--lc) 80%, var(--text));
  /* Smooth transitions for all state changes */
  transition: background .16s ease, color .16s ease, border-color .16s ease,
              box-shadow .16s ease, opacity .16s ease, transform .16s ease;
  font: inherit;
  line-height: 1;
}
.licence-filter__btn:hover {
  background: color-mix(in srgb, var(--lc) 12%, transparent);
  border-color: var(--lc);
  opacity: 1 !important;
  transform: none !important;
}
/* Selected / active state — filled with the scope colour */
.licence-filter__btn--active {
  background: var(--lc);
  color: #fff;
  border-color: var(--lc);
  box-shadow: 0 1px 8px color-mix(in srgb, var(--lc) 40%, transparent);
  opacity: 1;
  transform: none;
}
/* Faded state — when a filter is active but this btn is NOT selected */
.licence-filter__btn--faded {
  opacity: 0.38;
  transform: scale(0.95);
}
/* "All" button uses neutral colour */
#lf-all {
  --lc: var(--text-muted);
}
#lf-all.licence-filter__btn--active {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: none;
}
/* All-button faded = scope filter is active */
#lf-all.licence-filter__btn--faded {
  opacity: 0.38;
  transform: scale(0.95);
}
/* Clinical catalogue "All" variant */
#ccat-lf-all.licence-filter__btn--active {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: none;
}
#ccat-lf-all.licence-filter__btn--faded {
  opacity: 0.38;
  transform: scale(0.95);
}

/* ── Scope-hidden state ───────────────────────────────────────────────────── */
.scope-hidden {
  display: none !important;
}
.scope-section-empty {
  display: none !important;
}

/* ── View toggle ─────────────────────────────────────────────────────────── */
.view-toggle {
  display: inline-flex;
  gap: .3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;   /* segmented control — sharp */
  padding: .2rem;
  /* margin-bottom removed — handled by .content-controls gap */
}

.view-toggle__btn {
  padding: .3rem .9rem;
  border-radius: 3px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-muted);
  transition: background .15s, color .15s;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: .35em;
}
.view-toggle__btn--active {
  background: var(--primary);
  color: #fff;
}
.view-toggle__btn:not(.view-toggle__btn--active):hover {
  color: var(--text);
}

/* ── View panels ─────────────────────────────────────────────────────────── */
.view-panel          { display: none; }
.view-panel--active  { display: block; }

/* ── Bookshelf: topic tabs ───────────────────────────────────────────────── */
.bookshelf-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1.2rem;
}

.bookshelf-tab {
  padding: .32rem .85rem;
  border-radius: 3px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: background .15s, color .15s, border-color .15s;
  font: inherit;
}
.bookshelf-tab:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--primary) 45%, transparent);
}
.bookshelf-tab--active {
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
}

/* ── Bookshelf: type sections + horizontal scroll rows ───────────────────── */
.bookshelf-shelf {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  min-height: 10rem;
}

.bookshelf-empty {
  color: var(--text-muted);
  font-size: .85rem;
  padding: 2rem 0;
}

/* Each section: spine on left, scrolling row on right */
.bookshelf-type-section {
  display: flex;
  gap: 0;
  align-items: stretch;
}

/* ── Book spine ── */
.bookshelf-spine {
  --spine: var(--primary);
  flex-shrink: 0;
  width: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: color-mix(in srgb, var(--spine) 10%, var(--surface));
  border-left: 3px solid var(--spine);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid color-mix(in srgb, var(--spine) 20%, var(--border));
  border-radius: 4px 0 0 4px;
  padding: .8rem 0;
  cursor: default;
  user-select: none;
}

.bookshelf-spine__label {
  writing-mode: vertical-lr;
  transform: rotate(180deg);   /* bottom-to-top — traditional book spine */
  font-size: .62rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--spine);
}

.bookshelf-spine__count {
  font-size: .6rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--spine) 70%, var(--text-muted));
  writing-mode: horizontal-tb;
  background: color-mix(in srgb, var(--spine) 15%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--spine) 30%, transparent);
  border-radius: 999px;
  width: 1.3rem;
  text-align: center;
  line-height: 1.3rem;
}

.bookshelf-type-row {
  flex: 1;
  display: flex;
  gap: .65rem;
  overflow-x: auto;
  padding: .65rem .65rem .65rem .7rem;
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 6px 6px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  align-items: stretch;
}
.bookshelf-type-row::-webkit-scrollbar { height: 3px; }
.bookshelf-type-row::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ── Book tile ───────────────────────────────────────────────────────────── */
.book-tile {
  --spine: var(--primary);
  flex: 0 0 9rem;          /* fixed width — row scrolls horizontally */
  min-height: 12rem;
  display: flex;
  flex-direction: column;
  border-radius: 4px 6px 6px 4px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--spine);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
  position: relative;
}
.book-tile:hover {
  transform: translateY(-5px) rotate(0.5deg);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--spine) 28%, rgba(0,0,0,.1));
  z-index: 2;
}

/* Cover illustration strip at top of tile */
.book-tile__cover {
  width: 100%;
  aspect-ratio: 3 / 2;
  background: var(--spine);
  overflow: hidden;
  flex-shrink: 0;
}
.book-tile__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* SVGs are white-on-transparent; the background above shows the spine colour */
  mix-blend-mode: normal;
}

/* Badge — pinned to top-left so it sits at the same height on every tile */
.book-tile__badge {
  position: absolute;
  top: .45rem;
  left: .55rem;
  font-size: .57rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--spine);
  background: color-mix(in srgb, var(--spine) 12%, transparent);
  border-radius: 4px;
  padding: .15rem .4rem;
  line-height: 1.4;
}

.book-tile__title {
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.35;
  padding: .2rem .55rem .3rem;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-tile__desc {
  font-size: .69rem;
  color: var(--text-muted);
  line-height: 1.38;
  padding: 0 .55rem .4rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.book-tile__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .32rem .55rem;
  border-top: 1px solid var(--border);
  gap: .3rem;
}

.book-tile__topic {
  font-size: .6rem;
  color: var(--text-muted);
  text-transform: capitalize;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-tile__date {
  font-size: .58rem;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: .75;
  flex-shrink: 0;
}

.book-tile__lock {
  font-size: .65em;
  margin-left: .25em;
  opacity: .8;
  vertical-align: middle;
}

/* Guide and catalogue tiles are slightly taller to accommodate longer descriptions */
.book-tile--guide,
.book-tile--catalogue {
  min-height: 13rem;
}
/* Guide cover — tinted with the topic colour since no SVG yet */
.book-tile--guide .book-tile__cover,
.book-tile--catalogue .book-tile__cover {
  background: color-mix(in srgb, var(--spine) 70%, #1e293b);
}

/* ── Bookshelf footer ────────────────────────────────────────────────────── */
.bookshelf-footer {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}
.bookshelf-footer__link {
  font-size: .78rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.bookshelf-footer__link:hover { text-decoration: underline; }

/* ── Discover view ───────────────────────────────────────────────────────── */
.discover-section {
  margin-bottom: 2rem;
}

.discover-section__hd {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  margin-bottom: .85rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}

.discover-section__label {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text);
}

.discover-section__sub {
  font-size: .72rem;
  color: var(--text-muted);
}

.discover-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: .75rem;
}

.discover-card {
  --dc-accent: var(--primary);
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color .15s, border-left-color .14s;
}
.discover-card:hover {
  border-color: var(--border);
  border-left-color: var(--dc-accent);
}
/* Type-coloured accent on featured cards */
.discover-card--featured        { border-top: 3px solid var(--dc-accent); }
.discover-card--popular         { border-top: 3px solid var(--dc-accent); }
.discover-card--primer          { --dc-accent: #6366f1; }
.discover-card--runsheet        { --dc-accent: #0ea5e9; }

/* Cover image strip — SVG on spine-coloured background */
.discover-card__cover {
  width: 100%;
  aspect-ratio: 16 / 7;
  background: var(--dc-accent);
  overflow: hidden;
  flex-shrink: 0;
}
.discover-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Inner padding wraps everything after the cover */
.discover-card > :not(.discover-card__cover) {
  padding-left: .85rem;
  padding-right: .85rem;
}
.discover-card > .discover-card__badge { padding-top: .65rem; }
.discover-card > :last-child           { padding-bottom: .75rem; }

.discover-card__badge {
  font-size: .6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .12rem .45rem .12rem .4rem;
  border-radius: 2px;
  align-self: flex-start;
  font-family: ui-monospace, 'SF Mono', monospace;
  border-left: 3px solid currentColor;
  background: transparent !important;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.discover-card__badge--primer {
  background: color-mix(in srgb, #6366f1 13%, var(--surface));
  color: #4f46e5;
  border: 1px solid color-mix(in srgb, #6366f1 30%, transparent);
}
.discover-card__badge--runsheet {
  background: color-mix(in srgb, var(--primary) 13%, var(--surface));
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
}

.discover-card__topic {
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}

.discover-card__title {
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin: 0;
}

.discover-card__desc {
  font-size: .74rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.discover-card__date {
  font-size: .65rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: .2rem;
}

/* ── Topic matrix (PCR aesthetic) ───────────────────────────────────────── */

/* PCR-style chart header strip above the table */
.pcr-chart-header {
  display: flex;
  align-items: center;
  gap: 0;
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: .67rem;
  font-family: 'Courier New', Courier, monospace;
  overflow: hidden;
}

.pcr-chart-header__field {
  padding: .35rem .8rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: .05rem;
}
.pcr-chart-header__field:last-child { border-right: none; flex: 1; }

.pcr-chart-header__key {
  font-size: .56rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}

.pcr-chart-header__val {
  font-size: .67rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.pcr-chart-header__val--live {
  color: #10b981;
}

.topic-matrix-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1rem;               /* header strip takes top radius + margin */
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
}

.topic-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
  min-width: 580px;
}

.topic-matrix thead tr {
  background: color-mix(in srgb, var(--surface) 97%, var(--primary));
  border-bottom: 2px solid var(--border);
}

.topic-matrix th {
  padding: .65rem .9rem;
  font-weight: 700;
  color: var(--text-muted);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-family: 'Courier New', Courier, monospace;
  white-space: nowrap;
  text-align: center;
  vertical-align: top;
  line-height: 1.2;
  border-right: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.topic-matrix th:last-child { border-right: none; }

/* Row striping — alternating clinical chart rows */
.topic-matrix tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--primary) 3%, transparent);
}

/* Topic cell gets a left accent — like a PCR section divider */
.tm-topic-cell {
  padding: .6rem .9rem;
  white-space: nowrap;
  border-left: 3px solid color-mix(in srgb, var(--primary) 30%, transparent);
}

.tm-col-topic {
  text-align: left !important;
  min-width: 120px;
}

/* Subtitle line under column header label */
.tm-col-sub {
  display: block;
  font-size: .62rem;
  font-weight: 400;
  letter-spacing: .02em;
  text-transform: none;
  color: color-mix(in srgb, var(--text-muted) 65%, transparent);
  margin-top: .15rem;
  white-space: nowrap;
}

/* Usage hint above the matrix */
.tm-hint {
  font-size: .76rem;
  color: var(--text-muted);
  margin: .5rem 0 .6rem;
  opacity: .8;
}

/* Tooltip affordance on column headers */
.tm-col[data-tip] {
  cursor: help;
  text-decoration: underline dotted;
  text-decoration-color: color-mix(in srgb, var(--text-muted) 50%, transparent);
  text-underline-offset: 3px;
}
.tm-col[data-tip]:hover {
  color: var(--text);
}

/* Tooltip affordance on topic cells */
.tm-topic-cell[data-tip] {
  cursor: help;
}

.topic-matrix tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.topic-matrix tbody tr:last-child { border-bottom: none; }
.topic-matrix tbody tr:hover {
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}

.tm-topic-link {
  font-weight: 700;
  font-size: .88rem;
  color: var(--text);
  text-decoration: none;
}
.tm-topic-link:hover { color: var(--primary); }

.tm-cell {
  padding: .5rem .65rem;
  text-align: center;
  vertical-align: middle;
}

/* ── tm-pill — CAD classification tags (not pills) ──────────────────
   Sharp rectangles + monospace. No rounded pill shapes.
   ─────────────────────────────────────────────────────────────────── */
.tm-pill {
  display: inline-flex;
  align-items: center;
  gap: .3em;
  padding: .18rem .55rem;
  border-radius: 2px;
  font-size: .68rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: filter .15s;
  font-family: ui-monospace, 'SF Mono', 'Fira Code', monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
}
a.tm-pill:hover { filter: brightness(1.1); }

.tm-pill--count {
  background: color-mix(in srgb, var(--primary) 13%, var(--surface));
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 32%, transparent);
}

/* ── Dispatch feed-status tags — CAD channel indicators ─────────────
   live    = RSS + PubMed feeds active    → green stripe, pulsing dot
   pubmed  = PubMed-only automated feed   → blue stripe, steady dot
   offline = no automated feed yet        → amber stripe, hollow dot

   Left-border stripe = CAD channel status board vocabulary.
   ───────────────────────────────────────────────────────────────────── */
.tm-pill--dispatch {
  display: inline-flex;
  align-items: center;
  gap: .32em;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  border-radius: 2px;
  padding-left: .55rem;   /* room for the stripe */
  position: relative;
  border-left: 3px solid currentColor;
}

/* Live: green */
.tm-pill--dispatch-live {
  background: rgba(16, 185, 129, .08);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, .28);
  border-left: 3px solid #10b981;
}
/* PubMed-only: blue */
.tm-pill--dispatch-pubmed {
  background: rgba(59, 130, 246, .08);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, .25);
  border-left: 3px solid #3b82f6;
}
/* Offline: amber */
.tm-pill--dispatch-offline {
  background: rgba(245, 158, 11, .07);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, .25);
  border-left: 3px solid #d97706;
}

/* Status dots shared base */
.tm-live-dot,
.tm-pubmed-dot,
.tm-offline-dot {
  display: inline-block;
  width: .52em;
  height: .52em;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Live dot — pulsing green fill */
.tm-live-dot {
  background: #10b981;
  animation: tm-pulse 1.8s ease-in-out infinite;
}
@keyframes tm-pulse {
  0%, 100% { opacity: 1;  transform: scale(1);   }
  50%       { opacity: .3; transform: scale(.65); }
}

/* PubMed dot — steady blue fill */
.tm-pubmed-dot {
  background: #3b82f6;
}

/* Offline dot — hollow amber ring */
.tm-offline-dot {
  background: transparent;
  border: 1.5px solid #f59e0b;
}

/* Backwards-compat alias — same treatment as dispatch-live */
.tm-pill--live {
  background: rgba(16, 185, 129, .08);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, .28);
  border-left: 3px solid #10b981;
}

.tm-pill--shared {
  background: color-mix(in srgb, var(--text-muted) 9%, var(--surface));
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-style: italic;
  font-size: .68rem;
}

/* Track badge (DS, and future Research / Leadership) — a discipline TAG, deliberately
   distinct from the license scope-badge spectrum so it does not read as a level.
   Left accent bar + squared corners + neutral text = "category", not "rung". */
.tm-pill--label {
  background: color-mix(in srgb, #8b5cf6 10%, var(--surface));
  color: var(--text);
  border: 1px solid color-mix(in srgb, #8b5cf6 28%, transparent);
  border-left: 3px solid #7c3aed;
  border-radius: 2px;
  letter-spacing: .03em;
}

/* Scope badges in matrix */
.tm-scopes {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .25rem;
  justify-content: center;
}

.scope-badge--pending {
  opacity: .35;
  cursor: default;
  pointer-events: none;
}

/* Empty cell */
.tm-empty {
  color: var(--text-muted);
  opacity: .35;
  font-size: .9rem;
  display: inline-block;
}

/* Legend */
.tm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  margin-top: .9rem;
  font-size: .76rem;
  color: var(--text-muted);
  align-items: center;
}
.tm-legend__item {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.tm-legend__ex { pointer-events: none; cursor: default; }

/* ── tm-pill--spokes: button reset so it looks identical to the <a> pill ── */
button.tm-pill--spokes {
  border: none;
  cursor: pointer;
  font: inherit;
  transition: filter .15s, transform .15s, box-shadow .15s;
}
button.tm-pill--spokes:hover {
  filter: brightness(1.2);
  box-shadow: inset 0 0 0 1px var(--primary);
}
button.tm-pill--spokes:active {
  transform: translateY(0);
  box-shadow: none;
}

/* One-shot pulse to teach users that count badges are interactive */
@keyframes tm-badge-pulse {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0   color-mix(in srgb, var(--primary) 50%, transparent); }
  40%  { transform: scale(1.18); box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 0%,  transparent); }
  70%  { transform: scale(1.08); box-shadow: 0 0 0 0   transparent; }
  100% { transform: scale(1);    box-shadow: none; }
}
.tm-pill--pulse {
  animation: tm-badge-pulse .7s ease-out forwards;
}

/* ── Hub-and-spoke overlay ───────────────────────────────────────────────── */
.spoke-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: none;           /* JS toggles display + active class */
  pointer-events: none;
}
.spoke-overlay--active {
  pointer-events: auto;
}

/* Backdrop */
.spoke-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  transition: background .22s ease, backdrop-filter .22s ease;
}
.spoke-overlay--active .spoke-overlay__backdrop {
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(2px);
}

/* Full-viewport SVG for spoke lines */
.spoke-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.spoke-line {
  stroke: #111;
  stroke-width: 1.5px;
  fill: none;
  opacity: 0.55;
  /* transition is set per-line in JS (staggered) */
}

/* Hub (mirrors the chip, positioned absolutely via JS left/top) */
.spoke-hub {
  position: fixed;
  transform: translate(-50%, -50%);
  min-width: 2.4rem;
  min-height: 2.4rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: .25rem .55rem;
  pointer-events: auto;
  animation: spoke-hub-pulse 1.6s ease-out infinite;
  z-index: 2;
}
.spoke-hub__count {
  line-height: 1;
}
.spoke-hub__all {
  display: block;
  font-size: .6rem;
  font-weight: 500;
  color: rgba(255,255,255,.82);
  text-decoration: none;
  letter-spacing: .03em;
  margin-top: .15rem;
  white-space: nowrap;
}
.spoke-hub__all:hover { color: #fff; text-decoration: underline; }
@keyframes spoke-hub-pulse {
  0%   { box-shadow: 0 0 0 0   color-mix(in srgb, var(--primary) 55%, transparent); }
  65%  { box-shadow: 0 0 0 12px transparent; }
  100% { box-shadow: 0 0 0 0   transparent; }
}

/* Spoke nodes */
.spoke-node {
  position: fixed;
  transform: translate(-50%, -50%) scale(0.55);
  opacity: 0;
  transition: transform .32s cubic-bezier(.34, 1.56, .64, 1),
              opacity    .22s ease;
  z-index: 2;
}
.spoke-overlay--active .spoke-node { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Stagger delays (0–9 covers up to 12-item two-ring layout) */
.spoke-node--delay-0 { transition-delay: .05s; }
.spoke-node--delay-1 { transition-delay: .10s; }
.spoke-node--delay-2 { transition-delay: .15s; }
.spoke-node--delay-3 { transition-delay: .20s; }
.spoke-node--delay-4 { transition-delay: .25s; }
.spoke-node--delay-5 { transition-delay: .30s; }
.spoke-node--delay-6 { transition-delay: .35s; }
.spoke-node--delay-7 { transition-delay: .40s; }
.spoke-node--delay-8 { transition-delay: .45s; }
.spoke-node--delay-9 { transition-delay: .50s; }

/* Node link button */
.spoke-node__link {
  display: block;
  padding: .42rem 1rem;
  background: var(--surface);
  border: 1.5px solid var(--primary);
  border-radius: 4px;
  color: var(--text);
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  max-width: 200px;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .4);
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.spoke-node__link:hover,
.spoke-node__link:focus-visible {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .5);
  text-decoration: none;
}

/* ── Research Funding Catalogue ─────────────────────────────────── */
.funding-disclaimer {
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .7rem 1rem;
  font-size: .83rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.funding-disclaimer strong { color: var(--text); }

.funding-group { margin-bottom: 2.5rem; }

.funding-group__heading {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1.1rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--border);
}

/* Funder type badge (left of group heading) */
.funding-type-badge {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 4px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.funding-type-badge--federal      { background: #1d4ed8; color: #fff; }
.funding-type-badge--charity      { background: #dc2626; color: #fff; }
.funding-type-badge--international{ background: #0891b2; color: #fff; }
.funding-type-badge--provincial   { background: #059669; color: #fff; }

/* Funding card grid */
.funding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

.funding-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  transition: border-color .2s, box-shadow .2s;
}
.funding-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

/* Card header: org badge + deadline */
.funding-card__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  flex-wrap: wrap;
}

/* Org badge */
.funding-org-badge {
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 4px;
  white-space: nowrap;
}
.funding-org-badge--federal       { background: color-mix(in srgb, #1d4ed8 14%, var(--surface)); color: #1d4ed8; border: 1px solid color-mix(in srgb, #1d4ed8 30%, transparent); }
.funding-org-badge--charity       { background: color-mix(in srgb, #dc2626 12%, var(--surface)); color: #dc2626; border: 1px solid color-mix(in srgb, #dc2626 28%, transparent); }
.funding-org-badge--international { background: color-mix(in srgb, #0891b2 12%, var(--surface)); color: #0891b2; border: 1px solid color-mix(in srgb, #0891b2 28%, transparent); }
.funding-org-badge--provincial    { background: color-mix(in srgb, #059669 12%, var(--surface)); color: #059669; border: 1px solid color-mix(in srgb, #059669 28%, transparent); }

/* Deadline badge */
.funding-deadline {
  display: inline-flex;
  align-items: center;
  gap: .3em;
  padding: .15rem .45rem .15rem .5rem;
  border-radius: 2px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-muted);
  font-size: .67rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-muted);
  background: transparent;
  font-family: ui-monospace, 'SF Mono', monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: background .2s, color .2s, border-color .2s;
}
.funding-deadline__icon { font-style: normal; }

.funding-deadline--ok     { background: color-mix(in srgb, #10b981 10%, var(--surface)); color: #059669;  border-color: color-mix(in srgb, #10b981 35%, transparent); }
.funding-deadline--soon   { background: color-mix(in srgb, #f59e0b 11%, var(--surface)); color: #b45309;  border-color: color-mix(in srgb, #f59e0b 35%, transparent); }
.funding-deadline--urgent { background: color-mix(in srgb, #ef4444 10%, var(--surface)); color: #dc2626;  border-color: color-mix(in srgb, #ef4444 35%, transparent); }

/* Card content */
.funding-card__name {
  font-size: .97rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}
.funding-card__org {
  font-size: .78rem;
  color: var(--text-muted);
  margin: -.4rem 0 0;
}
.funding-card__desc {
  font-size: .83rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

/* Meta dl */
.funding-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem .75rem;
  margin: 0;
  font-size: .78rem;
}
.funding-meta__item { display: contents; }
.funding-meta__item--wide {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  grid-column: 1 / -1;
}
.funding-meta__label {
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.funding-meta__val { color: var(--text); }

/* Tags */
.funding-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}
.funding-tag {
  font-size: .69rem;
  font-weight: 600;
  padding: .15rem .45rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--text-muted) 10%, var(--surface));
  color: var(--text-muted);
  border: 1px solid var(--border);
  text-transform: lowercase;
}
.funding-tag--province {
  background: color-mix(in srgb, #059669 12%, var(--surface));
  color: #059669;
  border-color: color-mix(in srgb, #059669 30%, transparent);
  font-weight: 700;
  text-transform: uppercase;
}

/* Apply button */
.funding-apply-btn {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  margin-top: auto;
  padding: .45rem .9rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  align-self: flex-start;
  transition: background .15s;
}
.funding-apply-btn:hover { background: var(--primary-h); }

/* ── Funding Radar — ranked opportunity-fit cards ───────────────── */
.funding-radar-narrative {
  margin: 0 0 2rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.funding-radar-count {
  margin-left: auto;
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
  text-transform: none;
}
.funding-radar-empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}
.funding-radar-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.funding-card--ranked { padding-top: 1.1rem; }

.funding-rank {
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: .15rem .45rem;
  border-radius: 3px;
  background: color-mix(in srgb, var(--text-muted) 8%, var(--surface));
  border: 1px solid var(--border);
}

.fit-bar {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  margin: .15rem 0 .1rem;
}
.fit-bar__track {
  height: 6px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--text-muted) 12%, var(--surface));
  overflow: hidden;
}
.fit-bar__fill {
  height: 100%;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--primary) 60%, transparent),
    var(--primary));
  border-radius: 3px;
  transition: width .25s ease;
}
.fit-bar__label {
  font-size: .76rem;
  color: var(--text-muted);
  font-family: ui-monospace, 'SF Mono', monospace;
}
.fit-bar__label strong { color: var(--text); font-weight: 700; }
.fit-bar__components { opacity: .7; }

.fit-rationale {
  align-items: center;
  font-size: .72rem;
}
.fit-rationale__label {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .65rem;
}
.fit-chip {
  text-transform: lowercase;
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 25%, transparent);
}

/* ── Article card tags ──────────────────────────────────────────── */
.article-card__tag {
  background: #1a2d40;
  color: #5ba8d4;
  border: 1px solid #2a4d6a;
  border-radius: 3px;
  font-size: .68rem;
  font-weight: 600;
  padding: .1rem .35rem;
  letter-spacing: .02em;
}
.article-card__tag--clinical {
  background: #1f2d1a;
  color: #7ac47a;
  border-color: #3a5a2a;
}
.article-card__tag--data {
  background: #1a1f2d;
  color: #9ab8e8;
  border-color: #2a3a5a;
}
.article-card__tag--quality {
  background: #2d251a;
  color: #e8c47a;
  border-color: #5a4020;
}
.article-card__tag--informatics {
  background: #1a2d2a;
  color: #6ecfbe;
  border-color: #2a5a50;
}
.article-card__tag--technology {
  background: #252022;
  color: #c4a0e8;
  border-color: #4a3060;
}
.article-card__tag--pharmacology {
  background: #2d1f10;
  color: #e8a87c;
  border-color: #5a3a18;
}

/* ── Catalogue ───────────────────────────────────────────────────── */
.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.catalogue-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.1rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.catalogue-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  color: var(--text);
}
.catalogue-card__class {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #e8a87c;
  margin-bottom: .4rem;
}
.catalogue-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: .4rem;
}
.catalogue-card__mechanism {
  font-size: .82rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: .6rem;
}
.catalogue-card__summary {
  font-size: .88rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: .8rem;
  line-height: 1.55;
}
.catalogue-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-top: auto;
}
.catalogue-card__routes {
  font-size: .72rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* Catalogue entry page */
.catalogue-entry-wrap { padding-top: 1.5rem; padding-bottom: 3rem; }
.catalogue-breadcrumb {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.catalogue-breadcrumb a { color: var(--primary); }
.catalogue-entry-header {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.catalogue-entry-header__class {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #e8a87c;
  margin-bottom: .5rem;
}
.catalogue-entry-header__title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: .5rem;
}
.catalogue-entry-header__mechanism {
  font-size: .95rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: .9rem;
}
.catalogue-entry-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}
.catalogue-entry-header__routes { font-size: .82rem; color: var(--text-muted); }
.catalogue-entry-header__updated {
  font-size: .75rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* Two-column layout: sidebar TOC + prose */
.catalogue-entry-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: start;
}
.catalogue-entry-toc {
  position: sticky;
  top: 75px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.catalogue-entry-toc__label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: .6rem;
}
.catalogue-entry-toc .toc { list-style: none; }
.catalogue-entry-toc .toc li { margin-bottom: .3rem; }
.catalogue-entry-toc .toc a {
  font-size: .82rem;
  color: var(--text-muted);
  transition: color .12s;
}
.catalogue-entry-toc .toc a:hover { color: var(--text); }

/* prose styles shared with guides */
.catalogue-prose { min-width: 0; }
.catalogue-prose h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2rem 0 .75rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--border);
}
.catalogue-prose h3 { font-size: 1.05rem; font-weight: 700; margin: 1.5rem 0 .5rem; }
.catalogue-prose p { margin-bottom: 1rem; line-height: 1.75; }
.catalogue-prose ul, .catalogue-prose ol {
  margin: .5rem 0 1rem 1.5rem; line-height: 1.7;
}
.catalogue-prose li { margin-bottom: .25rem; }
.catalogue-prose strong { color: var(--text); font-weight: 600; }
.catalogue-prose em { color: var(--text-muted); }
.catalogue-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: .88rem;
}
.catalogue-prose th, .catalogue-prose td {
  padding: .5rem .75rem;
  border: 1px solid var(--border);
  text-align: left;
}
.catalogue-prose th {
  background: var(--surface-2);
  font-weight: 600;
  color: var(--text-muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.catalogue-prose tr:nth-child(even) td { background: rgba(255,255,255,.02); }
.catalogue-prose code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: .1rem .35rem;
  font-size: .85em;
  font-family: ui-monospace, monospace;
}

@media (max-width: 820px) {
  .catalogue-entry-layout { grid-template-columns: 1fr; }
  .catalogue-entry-toc { position: static; }
}

/* ── Guide iframe wrapper ────────────────────────────────────────── */
/* Fills the full viewport below the 60px navbar; body scroll disabled */
body:has(.guide-frame-container) { overflow: hidden; }
.guide-frame-container {
  width: 100%;
  height: calc(100vh - 60px);
  overflow: hidden;
}
.guide-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Primer / Runsheet layout ────────────────────────────────────── */
.primer-layout,
.runsheet-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
  padding: 2rem 1.5rem 4rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.primer-sidebar {
  position: sticky;
  top: 76px;          /* below 60px navbar + breathing room */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.primer-sidebar__heading {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .75rem;
}
.primer-sidebar__list { list-style: none; display: flex; flex-direction: column; gap: .1rem; }
.primer-sidebar__link {
  display: block;
  font-size: .85rem;
  color: var(--text-muted);
  padding: .3rem .4rem;
  border-radius: 4px;
  text-decoration: none;
  transition: color .15s, background .15s;
}
.primer-sidebar__link:hover { color: var(--text); background: var(--surface-2); }
.primer-sidebar__link--active { color: var(--primary) !important; font-weight: 600; }

.primer-body__header { margin-bottom: 2rem; }
.primer-body__breadcrumb { font-size: .8rem; color: var(--text-muted); margin-bottom: .75rem; }
.primer-body__breadcrumb a { color: var(--text-muted); }
.primer-body__breadcrumb a:hover { color: var(--primary); }
.primer-body__title { font-size: 1.9rem; font-weight: 800; margin-bottom: .4rem; }
.primer-body__subtitle { font-size: 1rem; color: var(--text-muted); margin-bottom: .75rem; }
.primer-body__tags { display: flex; flex-wrap: wrap; gap: .4rem; }
/* ── Content last-edited — CAD timestamp tag ─── */
.content-last-edited {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .75rem;
  margin-bottom: 0;
  padding: .18rem .5rem .18rem .55rem;
  border-radius: 2px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  background: transparent;
  font-size: .62rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .07em;
  text-transform: uppercase;
  font-family: ui-monospace, 'SF Mono', 'Fira Code', monospace;
}
.content-last-edited::before { display: none; }   /* left-border replaces dot */

/* Runsheets use same sidebar — slightly denser prose */
.runsheet-prose { max-width: 100%; }
.runsheet-prose h2 {
  font-size: 1.05rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .25rem;
  margin: 1.5rem 0 .6rem;
}
.runsheet-prose pre {
  padding: .7rem 1rem;
  font-size: .8rem;
  margin: .5rem 0 1rem;
}
.runsheet-prose p { margin-bottom: .6rem; font-size: .9rem; }
.runsheet-prose table { font-size: .82rem; }

/* ── Organizations table ────────────────────────────────────────── */
.org-table-wrap { overflow-x: auto; margin-bottom: 1rem; }
.org-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.org-table th {
  background: var(--surface-2);
  border-bottom: 2px solid var(--border);
  padding: .6rem .9rem;
  text-align: left;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.org-table td {
  border-bottom: 1px solid var(--border);
  padding: .75rem .9rem;
  vertical-align: top;
}
.org-table tr:hover td { background: var(--surface); }
.org-table a { color: var(--primary); font-weight: 600; }
.org-table a:hover { color: var(--primary-h); }
.org-acronym { color: var(--text-muted); font-weight: 400; font-size: .85em; }
.org-desc { font-size: .82rem; color: var(--text-muted); margin-top: .2rem; line-height: 1.45; }
.org-city { font-size: .82rem; color: var(--text-muted); white-space: nowrap; }

/* ── Per-topic org catalogue page ──────────────────────────────────── */
.org-cat-section { margin-bottom: 2.5rem; }
.org-cat-section__heading {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .78rem;
}
.org-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.org-card {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.org-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.org-card__header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .4rem;
}
.org-card__name  { font-size: .9rem; color: var(--text); }
.org-card__acronym { font-size: .78rem; color: var(--text-muted); }
.org-card__meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.org-card__city { font-size: .78rem; color: var(--text-muted); }
.org-card__desc { font-size: .82rem; color: var(--text-muted); line-height: 1.5; margin: 0; flex: 1; }
.org-card__link { font-size: .75rem; color: var(--primary); margin-top: auto; word-break: break-all; }
.org-card:hover .org-card__link { text-decoration: underline; }
.badge--scope {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: .7rem;
  padding: .15rem .45rem;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Blog cards ─────────────────────────────────────────────────── */
.blog-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1rem;
}
.blog-card-item {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s, border-left-color .15s;
}
.blog-card-item:hover { border-color: var(--border); border-left-color: var(--primary); }
.blog-card-item__top { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.blog-card-item__title { font-size: 1rem; font-weight: 700; margin: 0; }
.blog-card-item__desc { font-size: .85rem; color: var(--text-muted); line-height: 1.5; flex: 1; }
.blog-type-badge {
  font-size: .68rem; font-weight: 700; padding: .15rem .45rem;
  border-radius: 4px; text-transform: uppercase; letter-spacing: .03em;
}
.blog-type-badge--blog     { background: #1a2d1a; color: #7ac47a; border: 1px solid #3a5a2a; }
.blog-type-badge--podcast   { background: #1a1a3a; color: #8888e8; border: 1px solid #3a3a6a; }
.blog-type-badge--newsletter { background: #2a1a1a; color: #d48888; border: 1px solid #5a2a2a; }
.blog-lang-badge {
  font-size: .68rem; font-weight: 700; padding: .15rem .4rem;
  border-radius: 4px; background: #1a2d40; color: #5ba8d4; border: 1px solid #2a4d6a;
}
.blog-lang-badge--fr { background: #2d1a1a; color: #e07070; border-color: #5a2a2a; }
.blog-province { font-size: .72rem; color: var(--text-muted); }

/* ── Sites list ─────────────────────────────────────────────────── */
.sites-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1rem; }
.site-item {
  padding: 1.1rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s;
}
.site-item:hover { border-color: var(--primary); }
.site-item__meta { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.site-item__name { font-size: 1rem; font-weight: 700; color: var(--primary); }
.site-item__name:hover { color: var(--primary-h); }
.site-item__desc { font-size: .87rem; color: var(--text-muted); margin: .3rem 0 .4rem; line-height: 1.55; }
.site-item__url { font-size: .78rem; color: var(--text-muted); font-family: 'Fira Code', monospace; }
.site-lang { font-size: .7rem; color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border); padding: .1rem .3rem; border-radius: 3px; }
.site-cat-badge {
  font-size: .68rem; font-weight: 700; padding: .15rem .45rem; border-radius: 4px;
  text-transform: uppercase; letter-spacing: .03em;
}
.site-cat-badge--guidelines  { background: #1a2d1a; color: #7ac47a; border: 1px solid #3a5a2a; }
.site-cat-badge--government   { background: #1a2540; color: #6ab0e8; border: 1px solid #2a4060; }
.site-cat-badge--open-data    { background: #2a1f1a; color: #d4a87a; border: 1px solid #5a3a20; }
.site-cat-badge--reference    { background: #2a1a2d; color: #c4a0e8; border: 1px solid #5a3a6a; }

/* ── Data catalogue ─────────────────────────────────────────────── */
.data-list { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 1rem; }
.data-card {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s;
}
.data-card:hover { border-color: var(--primary); }
.data-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .5rem;
  flex-wrap: wrap;
}
.data-card__name { font-size: 1rem; font-weight: 700; color: var(--primary); display: block; }
.data-card__name:hover { color: var(--primary-h); }
.data-card__provider { font-size: .8rem; color: var(--text-muted); margin-top: .15rem; }
.data-card__badges { display: flex; gap: .4rem; flex-shrink: 0; flex-wrap: wrap; }
.data-card__desc { font-size: .87rem; color: var(--text-muted); line-height: 1.6; margin-bottom: .75rem; }
.data-card__meta {
  display: flex; flex-wrap: wrap; gap: .5rem 1.25rem;
  font-size: .78rem; color: var(--text-muted);
  border-top: 1px solid var(--border); padding-top: .6rem;
}
.data-card__meta strong { color: var(--text); }
.data-type-badge {
  font-size: .68rem; font-weight: 700; padding: .15rem .45rem; border-radius: 4px;
  background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border);
}
.data-access-badge {
  font-size: .68rem; font-weight: 700; padding: .15rem .45rem; border-radius: 4px;
}
.data-access-badge--open    { background: #1a2d1a; color: #7ac47a; border: 1px solid #3a5a2a; }
.data-access-badge--request { background: #2a1f1a; color: #d4a87a; border: 1px solid #5a3a20; }

/* ── About / policy pages ───────────────────────────────────────── */
.about-wrap { max-width: 900px; margin: 0 auto; padding: 2rem 0 4rem; }
.about-section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}
.about-section:last-child { border-bottom: none; }
.about-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: .75rem;
}
.about-section p { color: var(--text-muted); line-height: 1.75; margin-bottom: .75rem; }
.about-section p:last-child { margin-bottom: 0; }
.about-section ul, .about-section ol { margin-left: 1.25rem; margin-bottom: .75rem; color: var(--text-muted); line-height: 1.75; }
.about-section li { margin-bottom: .3rem; }

.about-licence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.about-licence-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}
.about-licence-card__badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: .15rem .5rem;
  margin-bottom: .6rem;
  color: var(--primary);
}
.about-licence-card h3 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .45rem;
}
.about-licence-card p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* About — profile block */
.about-profile {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
.about-profile__photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
/* Rectangular variant for photos with non-transparent backgrounds */
.about-profile__photo--rect {
  width: 120px;
  height: 144px;
  border-radius: var(--radius);
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.about-profile__bio { flex: 1; }
.about-profile__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .2rem !important;
}
.about-profile__handle {
  font-size: .8rem;
  font-weight: 400;
  font-style: italic;
  color: var(--primary);
  margin-left: .5rem;
  vertical-align: middle;
}
.about-profile__roles {
  font-size: .85rem;
  color: var(--primary);
  margin-bottom: .75rem !important;
}
@media (max-width: 600px) {
  .about-profile { flex-direction: column; align-items: center; text-align: center; }
  .about-profile__photo { width: 96px; height: 96px; }
}

.about-section--links { display: flex; flex-direction: column; gap: .75rem; border-bottom: none; }
.about-policy-link {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s;
}
.about-policy-link:hover { border-color: var(--primary); color: var(--text); }
.about-policy-link strong { font-size: .95rem; margin-bottom: .2rem; }
.about-policy-link span { font-size: .85rem; color: var(--text-muted); }

/* Prose wrapper for editorial + COI pages */
.prose-wrap { padding: 2rem 0 4rem; max-width: 740px; }
.about-prose h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 2rem 0 .6rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--border);
}
.about-prose p { color: var(--text-muted); line-height: 1.8; margin-bottom: .9rem; }
.about-prose ul { margin: .25rem 0 1rem 1.5rem; color: var(--text-muted); line-height: 1.75; }
.about-prose li { margin-bottom: .5rem; }
.about-prose li strong { color: var(--text); }
.about-prose a { color: var(--primary); }
.about-prose a:hover { color: var(--primary-h); }
.about-prose code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: .1rem .3rem;
  font-size: .85em;
}
.about-prose__lead {
  font-size: 1.05rem;
  color: var(--text) !important;
  border-left: 3px solid var(--primary);
  padding-left: 1rem;
}
.about-prose__updated {
  font-size: .8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2.5rem !important;
}

/* ── Navbar — CW language button ───────────────────────────────── */
.navbar__lang-btn--cw {
  border-color: #8a6a3a !important;
  color: #c49a5a !important;
  font-size: .7rem;
}
.navbar__lang-btn--cw:hover,
.navbar__lang-btn--cw.navbar__lang-btn--active {
  background: #3a2a14 !important;
  color: #e0b87a !important;
  border-color: #c49a5a !important;
}

/* ── Navbar — T&R dropdown item highlight ──────────────────────── */
.navbar__dropmenu-recon {
  color: #9abf7a !important;
  font-style: italic;
}
.navbar__dropmenu-recon:hover { color: #b8d498 !important; }

/* ── About page — land acknowledgement inline ───────────────────── */
.about-land-ack-text {
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: .5rem;
}
.about-land-ack-text a { color: var(--primary); }
.about-land-ack-sencoten {
  font-size: .9rem;
  font-style: italic;
  color: #8abf8a;
  letter-spacing: .04em;
  margin-top: .5rem;
  padding: .6rem .9rem;
  background: #1a2d1a;
  border-left: 3px solid #5a8a5a;
  border-radius: 0 var(--radius) var(--radius) 0;
  display: inline-block;
}
.about-policy-link--recon {
  border-left: 3px solid #5a8a5a;
}
.about-policy-link--recon:hover { border-color: #9abf7a; }

/* ── Truth & Reconciliation page ───────────────────────────────── */
.recon-wrap { max-width: 900px; margin: 0 auto; padding: 2rem 0 4rem; }

.recon-section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}
.recon-section:last-child { border-bottom: none; }
.recon-section > h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.recon-section > p,
.recon-section > ul {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: .75rem;
}
.recon-section > ul { margin-left: 1.25rem; }

/* Land acknowledgement block */
.recon-land-ack {
  display: flex;
  gap: 0;
  background: #141e14;
  border: 1px solid #3a5a3a;
  border-radius: var(--radius);
  overflow: hidden;
}
.recon-land-ack__cedar-bar {
  width: 5px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #8a5a2a, #5a8a5a, #8a5a2a);
}
.recon-land-ack__body { padding: 1.5rem 1.75rem; flex: 1; }
.recon-land-ack__heading {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: #9abf7a;
}

/* Language blocks (EN, SENĆOŦEN, CW) */
.recon-lang-block {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--border);
  background: var(--surface);
}
.recon-lang-block:last-child { margin-bottom: 0; }

.recon-lang-block--en {
  border-left-color: var(--primary);
  background: var(--surface);
}
.recon-lang-block--sencoten {
  border-left-color: #5a8a5a;
  background: #141e14;
}
.recon-lang-block--cw {
  border-left-color: #8a6a2a;
  background: #1e1a0e;
}

.recon-lang-tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  padding: .2rem .5rem;
  height: 1.6rem;
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  white-space: nowrap;
  margin-top: .1rem;
}
.recon-lang-tag--sencoten {
  background: #1a2d1a;
  color: #8abf8a;
  border-color: #3a5a3a;
  font-size: .58rem;
}
.recon-lang-tag--cw {
  background: #2d2010;
  color: #c49a5a;
  border-color: #5a4020;
  font-size: .58rem;
}

.recon-indigenous-text {
  font-size: 1.0rem;
  font-style: italic;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: .5rem;
}
.recon-indigenous-gloss {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: .75rem;
  padding-left: .75rem;
  border-left: 2px solid var(--border);
}
.recon-cw-trans {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: .75rem;
  padding-left: .75rem;
  border-left: 2px solid #5a4020;
}
.recon-cw-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #c49a5a;
  margin-bottom: .75rem;
}

.recon-note {
  font-size: .8rem;
  line-height: 1.65;
  color: var(--text-muted);
  padding: .6rem .9rem;
  border-radius: var(--radius);
  margin-top: .75rem;
}
.recon-note--language {
  background: #1a1a2d;
  border: 1px solid #2a2a5a;
}
.recon-note--language a { color: #7a9abf; }
.recon-note--language a:hover { color: #a0bfe0; }

/* Commitment list */
.recon-commit-list {
  margin: .75rem 0 .75rem 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.recon-commit-list li {
  padding: .75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.65;
  border-left: 3px solid var(--primary);
}
.recon-commit-list li strong { color: var(--text); }

/* FR training cards */
.recon-fr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .75rem;
  margin: 1rem 0;
}
.recon-fr-card {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1rem;
}
.recon-fr-card__icon { font-size: 1.5rem; flex-shrink: 0; line-height: 1; margin-top: .1rem; }
.recon-fr-card__icon--text {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .04em;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--primary) 14%, var(--surface));
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  border-radius: 4px;
  margin-top: 0;
}
.recon-fr-card > div { display: flex; flex-direction: column; gap: .2rem; }
.recon-fr-card strong { font-size: .9rem; color: var(--text); }
.recon-fr-card span { font-size: .8rem; color: var(--text-muted); line-height: 1.5; }

/* CW vocabulary list */
.recon-cw-list {
  list-style: none;
  padding: 0;
  margin: .75rem 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.recon-cw-list li {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .6rem .9rem;
  background: #1e1a0e;
  border-left: 3px solid #8a6a2a;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.recon-cw-phrase {
  font-style: italic;
  color: #e0c890;
  font-size: .9rem;
}
.recon-cw-gloss {
  font-size: .8rem;
  color: var(--text-muted);
}

/* CW glossary table */
.recon-gloss-details {
  margin-top: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.recon-gloss-details summary {
  padding: .75rem 1.1rem;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  color: #c49a5a;
  user-select: none;
}
.recon-gloss-details summary:hover { color: #e0b87a; }
.recon-gloss-details[open] summary { border-bottom: 1px solid var(--border); }
.recon-gloss-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
}
.recon-gloss-table th {
  text-align: left;
  padding: .5rem .9rem;
  background: var(--surface-2);
  color: var(--text-muted);
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.recon-gloss-table td {
  padding: .45rem .9rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}
.recon-gloss-table td:first-child { color: #e0c890; font-style: italic; }
.recon-gloss-table td:last-child { font-size: .75rem; opacity: .8; }

/* Resources */
.recon-resources { margin-top: 1.25rem; }
.recon-resources h3 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .75rem;
  color: var(--text);
}
.recon-resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .65rem;
}
.recon-resource-card {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: .75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color .15s;
}
.recon-resource-card:hover { border-color: var(--primary); }
.recon-resource-card strong { font-size: .85rem; color: var(--primary); }
.recon-resource-card span { font-size: .78rem; color: var(--text-muted); line-height: 1.45; }

/* Language roadmap */
.recon-lang-roadmap {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin: 1rem 0;
}
.recon-lang-roadmap-item {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: .85rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.recon-lang-roadmap-item--done {
  background: var(--surface);
  border-color: var(--border);
}
.recon-lang-roadmap-item--progress {
  background: #1e1a0e;
  border-color: #5a4020;
}
.recon-lang-roadmap-item strong { color: var(--text); }
.recon-lang-roadmap-tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 1.6rem;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
}
.recon-lang-roadmap-tag--progress {
  background: #2d2010;
  color: #c49a5a;
  border-color: #5a4020;
}

/* ── Chinuk Wawa home welcome banner ────────────────────────────── */
.cw-welcome-banner {
  background: #1a140a;
  border-bottom: 2px solid #5a4020;
  padding: 1.25rem 0;
}
.cw-welcome-banner__inner {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
.cw-welcome-banner__text { flex: 1; }
.cw-welcome-banner__cw {
  font-style: italic;
  color: #e0c890;
  font-size: .95rem;
  margin-bottom: .35rem;
  line-height: 1.7;
}
.cw-welcome-banner__en {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: .75rem;
  padding-left: .75rem;
  border-left: 2px solid #5a4020;
}
.cw-welcome-banner__en a,
.cw-welcome-banner__link { color: #c49a5a; }
.cw-welcome-banner__en a:hover,
.cw-welcome-banner__link:hover { color: #e0b87a; }
.cw-welcome-banner__lang-note {
  flex-shrink: 0;
  width: 160px;
  padding: .75rem;
  background: #2d2010;
  border: 1px solid #5a4020;
  border-radius: var(--radius);
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.cw-welcome-banner__lang-note p { margin-bottom: .4rem; }
.cw-welcome-banner__lang-note p:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .cw-welcome-banner__inner { flex-direction: column; }
  .cw-welcome-banner__lang-note { width: auto; }
}

/* ── Guide chapter layout ───────────────────────────────────────── */
body:has(.guide-layout) { overflow-x: hidden; }

.guide-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 60px);
  align-items: start;
}

/* Sidebar */
.guide-sidebar {
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--surface);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.guide-sidebar__inner {
  padding: 1.5rem 0 2rem;
}
.guide-sidebar__header {
  padding: 0 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: .75rem;
}
.guide-sidebar__guide-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  line-height: 1.3;
}
.guide-sidebar__guide-title:hover { color: var(--primary-h); }
.guide-sidebar__icon { width: 22px; height: 22px; flex-shrink: 0; opacity: .8; }

.guide-sidebar__part { margin-bottom: .25rem; }
.guide-sidebar__part-label {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: .7rem 1.25rem .25rem;
}
.guide-sidebar__list { list-style: none; }
.guide-sidebar__link {
  display: block;
  padding: .3rem 1.25rem;
  font-size: .84rem;
  color: var(--text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color .12s, background .12s, border-color .12s;
  line-height: 1.4;
}
.guide-sidebar__link:hover { color: var(--text); background: var(--surface-2); }
.guide-sidebar__link--active {
  color: var(--primary) !important;
  border-left-color: var(--primary);
  background: var(--surface-2);
  font-weight: 600;
}

/* Main content area */
.guide-main {
  padding: 2.5rem 3rem 4rem;
  min-width: 0;
  max-width: 860px;
}

.guide-body__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.guide-breadcrumb {
  font-size: .82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.guide-breadcrumb a { color: var(--text-muted); }
.guide-breadcrumb a:hover { color: var(--primary); }
.guide-breadcrumb__sep { opacity: .5; }

/* Larger prose for guide reading */
.guide-prose { max-width: 100%; line-height: 1.8; }
.guide-prose h1 { font-size: 1.9rem; font-weight: 800; margin-bottom: 1rem; margin-top: 0; }
.guide-prose h2 { font-size: 1.4rem; border-bottom: 1px solid var(--border); padding-bottom: .3rem; }
.guide-prose h3 { font-size: 1.15rem; }

/* Prev/next nav */
.guide-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.guide-nav__btn {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .75rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s;
  max-width: 48%;
}
.guide-nav__btn:hover { border-color: var(--primary); color: var(--text); }
.guide-nav__btn--next { margin-left: auto; text-align: right; }
.guide-nav__label { font-size: .72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.guide-nav__title { font-size: .9rem; font-weight: 600; }

/* Mobile sidebar toggle button */
.guide-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  left: 1rem;
  z-index: 50;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: .5rem 1rem .5rem .75rem;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  gap: .4rem;
  align-items: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
  font-family: inherit;
}
.guide-sidebar-toggle svg { width: 16px; height: 16px; }

/* ── Admonitions ────────────────────────────────────────────────── */
.admonition {
  margin: 1.25rem 0;
  border-radius: var(--radius);
  border-left: 3px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}
.admonition__title {
  padding: .55rem 1rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .02em;
  border-bottom: 1px solid var(--border);
}
.admonition__body {
  padding: .6rem 1rem .8rem;
  font-size: .9rem;
  line-height: 1.65;
}
.admonition__body p:last-child { margin-bottom: 0; }

.admonition--note  { border-color: #2a6496; background: #0d1f2d; }
.admonition--note .admonition__title  { background: #112a40; color: #6ab4e0; }

.admonition--tip   { border-color: #2a7a3a; background: #0d1f10; }
.admonition--tip .admonition__title   { background: #122418; color: #70c87a; }

.admonition--warning { border-color: #7a5a0a; background: #201800; }
.admonition--warning .admonition__title { background: #2a2000; color: #d4aa30; }

.admonition--important { border-color: #7a2a2a; background: #200000; }
.admonition--important .admonition__title { background: #2a0d0d; color: #e08080; }

.admonition--caution { border-color: #7a5a0a; background: #201800; }
.admonition--caution .admonition__title { background: #2a2000; color: #d4aa30; }

.admonition--danger { border-color: #8a0000; background: #200000; }
.admonition--danger .admonition__title { background: #2a0000; color: #ff8080; }

/* ── Guide figure ────────────────────────────────────────────────── */
.guide-figure { max-width: 100%; border-radius: var(--radius); margin: 1rem 0; }
.guide-figure-wrap { margin: 1.5rem 0; }
.guide-figure-wrap figcaption {
  font-size: .82rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: .4rem;
  font-style: italic;
}

/* ── Language toggle ─────────────────────────────────────────────── */
.navbar__lang {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}
.navbar__lang-btn {
  font-size: .73rem;
  font-weight: 700;
  padding: .22rem .42rem;
  border-radius: 5px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: .04em;
  transition: background .15s, color .15s;
  line-height: 1;
}
.navbar__lang-btn:hover { color: var(--text); background: transparent; }
.navbar__lang-btn--active {
  background: #3da89e;
  color: #fff;
}
.navbar__lang-btn--active:hover { background: #4ab8ad; color: #fff; }

/* ── Province picker ─────────────────────────────────────────────────────── */
.prov-picker {
  display: flex;
  align-items: center;
}

.prov-picker__btn {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .5rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
}

.prov-picker__btn:hover,
.prov-picker__btn[aria-expanded="true"] {
  color: var(--color-text);
  border-color: var(--color-border);
  background: var(--color-surface);
}

/* Lit up when a province is actively set */
.prov-picker__btn[data-set="1"] {
  color: var(--color-accent, #c41230);
  border-color: var(--color-accent, #c41230);
}
.prov-picker__btn[data-set="1"] .prov-picker__flag {
  stroke: var(--color-accent, #c41230);
}

.prov-picker__flag {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  stroke: currentColor;
}

.prov-picker__label {
  min-width: 1.5ch;
  text-align: center;
}

.prov-picker__menu {
  min-width: 14rem;
}

.prov-picker__option {
  display: block;
  width: 100%;
  padding: .45rem 1rem;
  text-align: left;
  background: transparent;
  border: none;
  font-size: .85rem;
  color: var(--color-text);
  cursor: pointer;
  transition: background .12s;
}

.prov-picker__option:hover {
  background: var(--color-surface-hover, rgba(0,0,0,.06));
}

.prov-picker__option--active {
  font-weight: 700;
  color: var(--color-accent, #c41230);
}

.prov-picker__option--clear {
  color: var(--color-text-muted);
  font-style: italic;
}

/* ── Members navbar ─────────────────────────────────────────────── */
.navbar__members-link {
  color: var(--text-muted);
  font-size: .88rem;
  transition: color .15s;
}
.navbar__members-link:hover { color: var(--text); }

.navbar__dropbtn--members { gap: .35rem; }

.navbar__member-badge {
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: 20px;
  letter-spacing: .03em;
  text-transform: capitalize;
}
.navbar__member-badge--viewer {
  background: #1a2d2a;
  color: #6ecfbe;
  border: 1px solid #2a5a50;
}
.navbar__member-badge--editor {
  background: #252022;
  color: #c4a0e8;
  border: 1px solid #4a3060;
}

/* Right-aligned dropdown (for the Members menu at far right of nav) */
.navbar__dropmenu--right {
  left: auto;
  right: 0;
  transform: none;
}

/* ── Login page ──────────────────────────────────────────────────── */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 2rem 1.5rem;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.login-card__logo {
  width: 52px;
  height: 52px;
  margin-bottom: 1rem;
  opacity: .85;
}
.login-card__title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: .35rem;
}
.login-card__sub {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 1.5rem;
}
.login-card__error {
  background: #2d1a1a;
  border: 1px solid #6a2a2a;
  color: #e87a7a;
  border-radius: var(--radius);
  padding: .6rem 1rem;
  font-size: .88rem;
  margin-bottom: 1rem;
  text-align: left;
}
.login-card__help {
  margin-top: 1.5rem;
  font-size: .82rem;
  color: var(--text-muted);
}

.login-form { text-align: left; }
.login-form__field { margin-bottom: 1rem; }
.login-form__label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .35rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.login-form__input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .6rem .85rem;
  color: var(--text);
  font-size: .95rem;
  font-family: inherit;
  transition: border-color .15s;
}
.login-form__input:focus {
  outline: none;
  border-color: var(--primary);
}
.login-form__input--error { border-color: #6a2a2a; }
.login-form__btn { width: 100%; margin-top: .5rem; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .primer-layout,
  .runsheet-layout { grid-template-columns: 1fr; }
  .primer-sidebar { position: static; }

  /* Guide: collapse sidebar into overlay on tablet/mobile */
  .guide-layout { grid-template-columns: 1fr; }
  .guide-sidebar {
    position: fixed;
    left: -280px;
    top: 60px;
    width: 260px;
    height: calc(100vh - 60px);
    z-index: 40;
    transition: left .25s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,.4);
  }
  .guide-sidebar--open { left: 0; }
  .guide-sidebar-toggle { display: flex; }
  .guide-main { padding: 1.5rem 1.25rem 3rem; }
}
@media (max-width: 640px) {
  .navbar__links { gap: .75rem; font-size: .82rem; }
  .hero { padding: 1.75rem 1rem 1.5rem; }
  .features, .guides-preview, .blog-preview { padding: 2rem 1rem; }
  .guide-main { padding: 1rem 1rem 2.5rem; }
  .guide-nav { flex-direction: column; }
  .guide-nav__btn { max-width: 100%; }
  .guide-nav__btn--next { text-align: left; }
}

/* ── Presentations page ──────────────────────────────────────────────────── */
.pres-wrap { padding: 2rem 0 4rem; }

/* ── Dispatch ───────────────────────────────────────────────────── */
.dispatch-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.5rem 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  flex-wrap: wrap;
}
.dispatch-header__title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: .3rem;
  line-height: 1.2;
}
.dispatch-header__back { color: var(--text-muted); }
.dispatch-header__back:hover { color: var(--primary); }
.dispatch-header__sep { color: var(--border); margin: 0 .4rem; }
.dispatch-header__sub { color: var(--text-muted); font-size: .92rem; }
.dispatch-feed-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .75rem;
  font-weight: 700;
  padding: .35rem .75rem;
  border: 1px solid var(--border);
  border-radius: 3px;    /* CAD button */
  color: var(--text-muted);
  white-space: nowrap;
  transition: border-color .15s, color .15s;
  margin-top: .25rem;
  font-family: ui-monospace, 'SF Mono', monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.dispatch-feed-btn:hover { border-color: #3da89e; color: #3da89e; }

/* Two-column layout */
.dispatch-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
  padding-top: 1.75rem;
  padding-bottom: 3rem;
}
@media (max-width: 800px) {
  .dispatch-layout { grid-template-columns: 1fr; }
  .dispatch-sidebar { display: flex; flex-wrap: wrap; gap: 1rem; }
  .dispatch-filter-group { flex: 1 1 160px; }
}

/* Sidebar */
.dispatch-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.dispatch-filter-group { margin-bottom: 1.5rem; }
.dispatch-filter-group__label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.dispatch-filter-btn {
  display: flex;
  align-items: center;
  gap: .35em;
  font-size: .83rem;
  padding: .3rem .5rem .3rem .45rem;
  border-radius: 3px;
  color: var(--text-muted);
  margin-bottom: 2px;
  border-left: 2px solid transparent;
  transition: background .12s, color .12s, border-left-color .12s;
  line-height: 1.3;
}
.dispatch-filter-btn:hover { background: var(--surface-2); color: var(--text); }
.dispatch-filter-btn.is-active {
  background: color-mix(in srgb, var(--primary) 6%, transparent);
  color: var(--text);
  font-weight: 600;
  border-left-color: var(--primary);   /* CAD: active selector gets the stripe */
}

/* Topic count badge inside filter button */
.dispatch-topic-count {
  margin-left: auto;
  font-size: .65rem;
  font-variant-numeric: tabular-nums;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;    /* monospace count tag */
  padding: .05rem .35rem;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.4;
  font-family: ui-monospace, 'SF Mono', monospace;
}
.dispatch-filter-btn.is-active .dispatch-topic-count {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border-color: color-mix(in srgb, var(--primary) 30%, transparent);
  color: var(--primary);
}

/* Status dots inside filter buttons — same colours, slightly smaller */
.dispatch-status-dot {
  display: inline-block;
  width: .48em;
  height: .48em;
  border-radius: 50%;
  flex-shrink: 0;
}
.dispatch-status-dot--live    { background: #10b981; animation: tm-pulse 1.8s ease-in-out infinite; }
.dispatch-status-dot--pubmed  { background: #3b82f6; }
.dispatch-status-dot--offline { background: transparent; border: 1.5px solid #f59e0b; }

/* Feed explainer */
.dispatch-feed-explainer {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.dispatch-feed-explainer__heading { font-weight: 700; color: var(--text); margin-bottom: .4rem; }
.dispatch-feed-explainer__apps { margin-top: .5rem; }

/* Main area */
.dispatch-count {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.dispatch-count__clear { color: var(--primary); font-size: .82rem; }

/* ── Dispatch incident board ─────────────────────────────────────────────────
   Contiguous flush rows — no gaps, no card radius. Left-border stripe
   colour = content type, matching the type badge. This is the CAD
   incident-board vocabulary: rows highlight, they don't float.
   ─────────────────────────────────────────────────────────────────────────── */
.dispatch-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.dispatch-card {
  display: block;
  padding: 1rem 1.25rem 1rem 1rem;
  background: var(--surface);
  border: none;
  border-bottom: 1px solid var(--border);
  border-left: 4px solid var(--dispatch-stripe, var(--border));
  border-radius: 0;
  color: var(--text);
  transition: border-left-color .12s, background .12s;
}
.dispatch-list .dispatch-card:last-child { border-bottom: none; }
.dispatch-card:hover {
  background: color-mix(in srgb, var(--dispatch-stripe, var(--primary)) 4%, var(--surface));
  color: var(--text);
}

/* ── Stripe colours — match the type badge accent colours ── */
.dispatch-card--journal    { --dispatch-stripe: #6baed6; }
.dispatch-card--whitepaper { --dispatch-stripe: #4ab8ad; }
.dispatch-card--opinion    { --dispatch-stripe: #9898f0; }
.dispatch-card--blog       { --dispatch-stripe: #7ac47a; }
.dispatch-card--podcast    { --dispatch-stripe: #e0944a; }
.dispatch-card--video      { --dispatch-stripe: #e07070; }
.dispatch-card--news       { --dispatch-stripe: #d4b84a; }
.dispatch-card--social     { --dispatch-stripe: #9898f0; }

.dispatch-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .6rem;
  align-items: center;
}

/* Content-type badge */
.dispatch-type-badge {
  display: inline-flex;
  align-items: center;
  gap: .3em;
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .18rem .45rem;
  border-radius: 4px;
  border: 1px solid;
}
.dispatch-type-badge--journal    { background: #162236; color: #6baed6; border-color: #2a4a6a; }
.dispatch-type-badge--whitepaper { background: #1a2e2c; color: #4ab8ad; border-color: #2a4a46; }
.dispatch-type-badge--opinion    { background: #1e1a3a; color: #9898f0; border-color: #3a3a7a; }
.dispatch-type-badge--blog       { background: #1a2f1a; color: #7ac47a; border-color: #2d5a2d; }
.dispatch-type-badge--podcast    { background: #2a1a10; color: #e0944a; border-color: #5a3a1a; }
.dispatch-type-badge--video      { background: #2a1414; color: #e07070; border-color: #5a2222; }
.dispatch-type-badge--news       { background: #2a2510; color: #d4b84a; border-color: #5a4e1a; }
.dispatch-type-badge--social     { background: #1a1a3a; color: #9898f0; border-color: #3a3a7a; }

/* Topic badge */
.dispatch-topic-badge {
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .15rem .4rem;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* Region badge */
.dispatch-region-badge {
  font-size: .65rem;
  padding: .15rem .4rem;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* Language badge */
.dispatch-lang-badge {
  font-size: .65rem;
  font-weight: 700;
  padding: .15rem .4rem;
  border-radius: 4px;
  text-transform: uppercase;
}
.dispatch-lang-badge--fr { background: #dbeafe; color: #1e40af; }
.dispatch-lang-badge--es { background: #fef9c3; color: #854d0e; }

.dispatch-card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: .4rem;
}
.dispatch-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem;
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.dispatch-card__source { font-weight: 600; color: var(--text); }
.dispatch-card__sep    { opacity: .4; }
.dispatch-card__excerpt {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: .5rem;
}
.dispatch-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .25rem;
}
.dispatch-card__tag {
  font-size: .7rem;
  padding: .1rem .35rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
}
.dispatch-card__doi { font-size: .72rem; color: var(--text-muted); margin-top: .3rem; font-family: monospace; }

.dispatch-attribution {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Navbar top-level link (non-dropdown) */
.navbar__link {
  font-size: .9rem;
  color: var(--text-muted);
  padding: .25rem .4rem;
  border-radius: 4px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.navbar__link:hover { color: var(--text); background: var(--surface); }

/* ── Interviews ─────────────────────────────────────────────────── */
.interview-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 3rem;
}
.interview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color .2s;
}
.interview-card:hover { border-color: var(--primary); }

.interview-card__badges {
  display: flex;
  gap: .5rem;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}
.interview-badge {
  display: inline-flex;
  align-items: center;
  gap: .3em;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .2rem .5rem;
  border-radius: 4px;
  border: 1px solid;
}
.interview-badge--podcast   { background: #1a1a3a; color: #9898f0; border-color: #3a3a7a; }
.interview-badge--radio     { background: #1a2f1a; color: #7ac47a; border-color: #2d5a2d; }
.interview-badge--video     { background: #2a1a10; color: #e0944a; border-color: #5a3a1a; }
.interview-badge--lang      { background: var(--surface-2); color: var(--text-muted); border-color: var(--border); }
.interview-badge--lang-fr   { background: #2d1a1a; color: #e07070; border-color: #5a2a2a; }

.interview-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: .5rem;
  line-height: 1.3;
}
.interview-card__title a { color: var(--text); }
.interview-card__title a:hover { color: var(--primary); }

.interview-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: .75rem;
}
.interview-card__sep { opacity: .4; }
.interview-card__outlet { font-weight: 600; color: var(--text); }

.interview-card__desc {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1rem;
}
.interview-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: .5rem;
}
.interview-card__link {
  font-size: .85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}
.interview-card__link--primary { color: var(--primary); }
.interview-card__link--primary:hover { color: var(--primary-h); }
.interview-card__link:not(.interview-card__link--primary) { color: var(--text-muted); }
.interview-card__link:not(.interview-card__link--primary):hover { color: var(--text); }

.interview-card__player {
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}
.interview-card__player audio {
  accent-color: var(--primary);
  border-radius: var(--radius);
}

.interview-contact {
  font-size: .83rem;
  color: var(--text-muted);
  margin-top: .5rem;
}

/* Speaker card */
.pres-speaker-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.pres-speaker-card__profile {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.pres-speaker-card__photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.pres-speaker-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .15rem;
}
.pres-speaker-card__handle {
  font-size: .82rem;
  color: var(--primary);
  font-style: italic;
  margin-bottom: .5rem;
}
.pres-speaker-card__bio {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}
.pres-speaker-card__topics-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.pres-speaker-card__topics ul {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .3rem .75rem;
}
.pres-speaker-card__topics li {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.pres-speaker-card__cta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}
.pres-speaker-card__cta-note {
  font-size: .82rem;
  color: var(--text-muted);
  margin: 0;
}

/* Engagement list */
.pres-section__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.pres-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.pres-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.pres-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-bottom: .45rem;
}
.pres-card--upcoming { border-color: var(--primary); }
.pres-card__upcoming-badge {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: #0d2a45;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 4px;
  padding: .1rem .4rem;
}
.pres-card__date, .pres-card__location {
  font-size: .8rem;
  color: var(--text-muted);
}
.pres-card__date::after { content: "·"; margin-left: .5rem; }
.pres-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .2rem;
}
.pres-card__event {
  font-size: .88rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: .5rem;
}
.pres-card__event a { color: var(--text-muted); text-decoration: underline; }
.pres-card__event a:hover { color: var(--primary); }
.pres-card__desc {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: .6rem;
}
.pres-card__slides-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .82rem;
  color: var(--primary);
}
.pres-card__slides-link:hover { color: var(--primary-h); }
/* format type pill — shared between presentations + slides pages */
.pres-format-pill {
  display: inline-flex;
  align-items: center;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .08em;
  padding: .15rem .45rem;
  border-radius: 4px;
  line-height: 1;
  vertical-align: middle;
  /* default (html) */
  background: color-mix(in srgb, var(--primary) 15%, var(--surface));
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
}
.pres-format-pill--pptx {
  background: color-mix(in srgb, #f97316 15%, var(--surface));
  color: #ea580c;
  border-color: color-mix(in srgb, #f97316 35%, transparent);
}
.pres-format-pill--pdf {
  background: color-mix(in srgb, #ef4444 15%, var(--surface));
  color: #dc2626;
  border-color: color-mix(in srgb, #ef4444 35%, transparent);
}

.tag--small { font-size: .72rem !important; padding: .1rem .35rem !important; }

@media (max-width: 600px) {
  .pres-speaker-card__profile { flex-direction: column; align-items: center; text-align: center; }
  .pres-speaker-card__photo { width: 64px; height: 64px; }
  .pres-speaker-card__cta { flex-direction: column; align-items: flex-start; }
}

/* ── Theatre / Slides page ──────────────────────────────────────────────── */
.theatre-wrap {
  background: #0a0608;
  overflow: hidden;
}
.theatre-stage {
  position: relative;
  min-height: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3.5rem 1rem 0;
}

/* Curtains */
.theatre-curtain {
  position: absolute;
  top: 0;
  bottom: 100px; /* above audience */
  width: clamp(60px, 10vw, 130px);
  z-index: 2;
  pointer-events: none;
}
.theatre-curtain--left {
  left: 0;
  background: linear-gradient(to right,
    #5c0a14 0%, #8b1020 40%, #a01225 70%, transparent 100%);
}
.theatre-curtain--right {
  right: 0;
  background: linear-gradient(to left,
    #5c0a14 0%, #8b1020 40%, #a01225 70%, transparent 100%);
}

/* Proscenium / content area */
.theatre-proscenium {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.theatre-header { text-align: center; }
.theatre-eyebrow {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .25em;
  color: #c9a84c;
  text-transform: uppercase;
  margin: 0 0 .35rem;
}
.theatre-title {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 800;
  color: #f5f0e8;
  margin: 0;
  text-shadow: 0 2px 20px rgba(0,0,0,.6);
}

/* Deck cards */
.theatre-carousel {
  width: 100%;
  position: relative;
}
.theatre-deck {
  display: none;
}
.theatre-deck--active {
  display: block;
  animation: theatre-fade-in .35s ease;
}
@keyframes theatre-fade-in {
  from { opacity: 0; transform: scale(.97); }
  to   { opacity: 1; transform: scale(1); }
}
.theatre-deck__inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  transition: background .2s, border-color .2s, transform .2s;
  box-shadow: 0 8px 40px rgba(0,0,0,.5), 0 0 80px rgba(201,168,76,.05);
}
.theatre-deck__inner:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(201,168,76,.45);
  box-shadow: 0 8px 40px rgba(0,0,0,.6), inset 3px 0 0 rgba(201,168,76,.5);
}
.theatre-deck__screen {
  aspect-ratio: 16/10;
  background: radial-gradient(ellipse at center, #1a2a3a 0%, #06111c 100%);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  position: relative;
  overflow: hidden;
}
.theatre-deck__screen-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(37,116,194,.18) 0%, transparent 70%);
  pointer-events: none;
}
.theatre-deck__icon {
  width: 52px;
  height: 52px;
  opacity: .7;
  filter: invert(1) brightness(1.2);
  position: relative;
  z-index: 1;
}
.theatre-deck__info {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  justify-content: center;
}
.theatre-deck__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f0ebe0;
  margin: 0;
  line-height: 1.3;
}
.theatre-deck__desc {
  font-size: .88rem;
  color: rgba(240,235,224,.65);
  line-height: 1.6;
  margin: 0;
}
.theatre-deck__from {
  font-size: .78rem;
  color: rgba(240,235,224,.4);
  margin: 0;
  font-style: italic;
}
.theatre-deck__cta {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
  font-weight: 600;
  color: #c9a84c;
  margin-top: .25rem;
}
.theatre-deck__inner:hover .theatre-deck__cta { text-decoration: underline; }

/* Carousel nav */
.theatre-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  margin-top: .5rem;
}
.theatre-nav__btn {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #f0ebe0;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  transition: background .15s;
}
.theatre-nav__btn:hover { background: rgba(255,255,255,.16); }
.theatre-nav__dots { display: flex; gap: .5rem; }
.theatre-nav__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: none;
  cursor: pointer;
  transition: background .15s;
}
.theatre-nav__dot--active { background: #c9a84c; }

/* Empty state */
.theatre-empty {
  text-align: center;
  color: rgba(240,235,224,.45);
  font-size: .9rem;
  padding: 2rem;
}

/* Audience silhouette */
.theatre-audience {
  width: 100%;
  margin-top: 2rem;
  position: relative;
  z-index: 2;
}
.theatre-audience svg {
  width: 100%;
  height: 120px;
  display: block;
  fill: #1a0d10;
}

@media (max-width: 600px) {
  .theatre-deck__inner { grid-template-columns: 1fr; }
  .theatre-deck__screen { aspect-ratio: 16/7; }
  .theatre-curtain { width: 40px; }
}

/* ── Admin dashboard ─────────────────────────────────────────────────────── */

.admin-dash {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}
.admin-dash__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.admin-dash__title  { font-size: 1.6rem; font-weight: 800; margin: 0; }
.admin-dash__sub    { font-size: .875rem; color: var(--text-muted); margin: .2rem 0 0; }
.admin-dash__actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.admin-dash__refresh-msg { font-size: .82rem; }

/* Summary cards */
.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  border-left: 3px solid var(--border);
}
.admin-card--ok      { border-left-color: #4caf50; }
.admin-card--warn    { border-left-color: #f0a500; }
.admin-card--error   { border-left-color: #f44336; }
.admin-card--running { border-left-color: var(--primary); animation: admin-pulse 1.5s infinite; }
@keyframes admin-pulse { 0%,100%{opacity:1} 50%{opacity:.6} }
.admin-card__label   { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.admin-card__value   { font-size: 1.6rem; font-weight: 800; margin: .25rem 0 .1rem; line-height: 1; }
.admin-card__value--sm { font-size: 1rem; font-weight: 700; }
.admin-card__sub     { font-size: .78rem; color: var(--text-muted); }

/* Section */
.admin-section        { margin-bottom: 2.5rem; }
.admin-section__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.admin-section__badge {
  font-size: .62rem;
  font-weight: 700;
  background: transparent;
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-muted);
  border-radius: 2px;
  padding: .1rem .45rem .1rem .4rem;
  color: var(--text-muted);
  font-family: ui-monospace, 'SF Mono', monospace;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* Three-column grid for breakdown tables */
.admin-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 860px) { .admin-grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .admin-grid-3 { grid-template-columns: 1fr; } }

/* Tables */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.admin-table--full { width: 100%; }
.admin-table th {
  text-align: left;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  padding: .35rem .5rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.admin-table td {
  padding: .4rem .5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table__row--zero  td { color: var(--text-muted); }
.admin-table__row--muted td { opacity: .5; }
.admin-table__row--warn  td { background: rgba(240,165,0,.06); }
.admin-table__date { font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-table__empty { color: var(--text-muted); font-style: italic; }

/* Status pill */
.admin-status       { font-size: .62rem; font-weight: 700; padding: .15rem .45rem .15rem .4rem; border-radius: 2px; border-left: 3px solid currentColor; font-family: ui-monospace, 'SF Mono', monospace; letter-spacing: .06em; text-transform: uppercase; }
.admin-status--ok   { background: #f0fdf4; color: #166534; }
.admin-status--warn { background: #fffbeb; color: #92400e; }
.admin-status--error{ background: #fef2f2; color: #991b1b; }

/* Buttons */
.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
}
.admin-btn:disabled { opacity: .5; cursor: not-allowed; }
.admin-btn--primary { background: var(--primary); color: #fff; }
.admin-btn--primary:hover:not(:disabled) { opacity: .88; }

/* Link */
.admin-link { color: var(--primary); text-decoration: none; font-size: .8rem; }
.admin-link:hover { text-decoration: underline; }

/* <details> expander */
.admin-details { font-size: .875rem; }
.admin-details summary {
  cursor: pointer;
  color: var(--primary);
  font-size: .82rem;
  font-weight: 600;
  user-select: none;
}

/* ── Topic section layout ──────────────────────────────────────── */
.topic-section {
  margin-bottom: 2.5rem;
}
.topic-section__hd {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.4rem;
}
.topic-section__label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0;
}
.topic-section__view-all {
  font-size: 0.8rem;
  color: var(--primary);
  margin-left: auto;
  white-space: nowrap;
}

/* ── Clinical Catalogue ───────────────────────────────────────────────────── */
.ccat-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.8rem;
  padding: 0.6rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 2rem;
}
.ccat-legend__label { font-weight: 600; color: var(--text-muted); }
.ccat-legend__note  { color: var(--text-muted); font-style: italic; }

.ccat-section { margin-bottom: 2.5rem; }
.ccat-section__heading {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.4rem;
  margin-bottom: 0.75rem;
}

.ccat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.75rem;
}

.ccat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.ccat-card--pending { opacity: 0.72; }

.ccat-card__hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.ccat-card__title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.3;
}
.ccat-card__scope { display: flex; gap: 0.25rem; flex-shrink: 0; }
.ccat-card__desc  { font-size: 0.82rem; color: var(--text-muted); line-height: 1.45; margin: 0; }
.ccat-card__note  { font-size: 0.75rem; color: var(--text-muted); font-style: italic; margin: 0; }
.ccat-card__link  { font-size: 0.78rem; color: var(--primary); margin-top: auto; }

/* Scope level badges */
.scope-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.scope-badge--fr  { background: color-mix(in srgb, #10b981 15%, var(--surface)); color: #059669; border: 1px solid #10b981; }
.scope-badge--emr { background: color-mix(in srgb, #3b82f6 15%, var(--surface)); color: #2563eb; border: 1px solid #3b82f6; }
.scope-badge--pcp { background: color-mix(in srgb, #8b5cf6 15%, var(--surface)); color: #7c3aed; border: 1px solid #8b5cf6; }
.scope-badge--acp { background: color-mix(in srgb, #f59e0b 15%, var(--surface)); color: #d97706; border: 1px solid #f59e0b; }
.scope-badge--ccp { background: color-mix(in srgb, #ef4444 15%, var(--surface)); color: #dc2626; border: 1px solid #ef4444; }

/* ── Equipment Catalogue Table ──────────────────────────────────────── */
.ecat-table-wrap {
  overflow-x: auto;
  margin-bottom: 2rem;
}
.ecat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.ecat-table th {
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.45rem 0.75rem;
  border-bottom: 2px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
.ecat-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text);
}
.ecat-table tr:last-child td { border-bottom: none; }
.ecat-table tr:hover td { background: color-mix(in srgb, var(--primary) 4%, var(--surface)); }

.ecat-table__title { min-width: 160px; font-weight: 600; }
.ecat-table__link  { color: var(--primary); text-decoration: none; }
.ecat-table__link:hover { text-decoration: underline; }
.ecat-table__desc  { color: var(--text-muted); max-width: 340px; font-size: 0.82rem; line-height: 1.4; }
.ecat-table__brands { min-width: 160px; }
.ecat-table__xref  { min-width: 160px; }

.ecat-brand {
  display: inline-block;
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1rem 0.35rem;
  font-size: 0.74rem;
  margin: 0.1rem 0.1rem 0 0;
  color: var(--text-muted);
}

.ecat-xref-link {
  display: inline-block;
  font-size: 0.74rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin: 0.1rem 0.1rem 0 0;
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border));
  text-decoration: none;
  white-space: nowrap;
}
.ecat-xref-link:hover { background: color-mix(in srgb, var(--primary) 18%, var(--surface)); }
.ecat-xref-none { color: var(--text-muted); font-size: 0.78rem; }

/* ── Catalogue Item Page ────────────────────────────────────────────── */
.catitem-breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.catitem-breadcrumb a { color: var(--primary); text-decoration: none; }
.catitem-breadcrumb a:hover { text-decoration: underline; }
.catitem-breadcrumb span[aria-hidden] { margin: 0 0.25rem; }

.catitem-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 820px) {
  .catitem-layout { grid-template-columns: 1fr; }
}

.catitem-section {
  margin-top: 1.75rem;
}
.catitem-section__h {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.catitem-section--pending { opacity: 0.8; }
.catitem-placeholder {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
}

.catitem-scope {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.catitem-scope__note {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}
.catitem-scope-note {
  margin-top: 0.5rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  font-style: italic;
}

.catitem-brands {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.catitem-brands li {
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  font-size: 0.84rem;
  color: var(--text);
}

/* ── Connections sidebar ─────────────────────────────────────────────── */
.catitem-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  position: sticky;
  top: 80px;
}
.catitem-sidebar__h {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.catitem-sidebar__note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}
.catitem-connections {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.catitem-conn {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.catitem-conn:last-child { border-bottom: none; }

.catitem-conn__topic {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.catitem-conn--available .catitem-conn__topic { color: var(--primary); }

.catitem-conn__link {
  font-size: 0.84rem;
  color: var(--primary);
  text-decoration: none;
}
.catitem-conn__link:hover { text-decoration: underline; }
.catitem-conn__na {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Maple leaf size variants ────────────────────────────────────────── */
.icon-maple--lg   { width: 1.1em;  height: 1.1em;  vertical-align: -0.2em; }
.icon-maple--h1   { width: 1.2em;  height: 1.2em;  vertical-align: -0.15em; margin-left: 0.3em; }
.icon-maple--badge { width: 0.75em; height: 0.75em; vertical-align: -0.05em; }

/* ── Canadian brand highlight ───────────────────────────────────────── */
.ecat-brand--ca {
  border-color: color-mix(in srgb, var(--canadian-red) 40%, var(--border));
  background: color-mix(in srgb, var(--canadian-red) 8%, var(--surface));
  color: var(--text);
}

/* ── Manufacturer Catalogue ─────────────────────────────────────────── */
.mfr-disclaimer {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1.5rem;
  padding: 0.5rem 0.75rem;
  background: color-mix(in srgb, var(--canadian-red) 6%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--canadian-red) 20%, var(--border));
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.mfr-disclaimer svg { flex-shrink: 0; align-self: center; }
.mfr-disclaimer__sep { opacity: 0.4; }

.mfr-section-h {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.4rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.mfr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.mfr-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.mfr-card:hover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
}
.mfr-card--canadian {
  border-left: 3px solid var(--canadian-red);
  background: color-mix(in srgb, var(--canadian-red) 4%, var(--surface));
}
.mfr-card--canadian:hover {
  background: color-mix(in srgb, var(--canadian-red) 9%, var(--surface));
  border-color: var(--canadian-red);
}

.mfr-card__hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.mfr-card__name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.3;
}
.mfr-card__location {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin: 0;
}
.mfr-card__desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}
.mfr-card__products {
  list-style: none;
  padding: 0;
  margin: 0.2rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.mfr-card__products li {
  font-size: 0.72rem;
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1rem 0.35rem;
  color: var(--text-muted);
}
.mfr-card__more {
  color: var(--primary) !important;
  background: transparent !important;
  border-color: transparent !important;
  font-style: italic;
}

.mfr-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  flex-shrink: 0;
  white-space: nowrap;
}
.mfr-badge--ca {
  background: color-mix(in srgb, var(--canadian-red) 12%, var(--surface));
  color: var(--canadian-red);
  border-color: color-mix(in srgb, var(--canadian-red) 40%, var(--border));
}
.mfr-badge--dist {
  background: color-mix(in srgb, #10b981 12%, var(--surface));
  color: #059669;
  border-color: color-mix(in srgb, #10b981 40%, var(--border));
}
.mfr-badge--std {
  background: color-mix(in srgb, #f97316 12%, var(--surface));
  color: #ea580c;
  border-color: color-mix(in srgb, #f97316 40%, var(--border));
}
.mfr-card--distributor { border-left: 3px solid #10b981; }
.mfr-card--standards   { border-left: 3px solid #f97316; }
.mfr-section-note {
  font-size: .83rem;
  color: var(--text-muted);
  margin: -.5rem 0 1rem;
}

/* Related items grid on manufacturer page */
.mfr-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.5rem;
}
.mfr-related-card {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.15s;
}
.mfr-related-card:hover { border-color: var(--primary); }
.mfr-related-card__cat  { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.mfr-related-card__title { font-size: 0.84rem; font-weight: 600; color: var(--text); }

/* Canadian brand in catitem brands list */
.catitem-brand--ca { border-color: color-mix(in srgb, var(--canadian-red) 40%, var(--border)); }


/* ── Citation System ─────────────────────────────────────────────────────────
   Evidence badges, inline superscripts, reference lists, catalogue cards,
   detail page, filter bar, EBP registry section.
   ─────────────────────────────────────────────────────────────────────────── */

/* Evidence level badges — colour-coded green→amber→red by quality */
.ev-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: .15rem .42rem;
  border-radius: 4px;
  letter-spacing: .03em;
  vertical-align: middle;
  margin-right: .3rem;
  cursor: default;
}
.ev-badge--1a { background: #0f2e1c; color: #4ede8c; border: 1px solid #1e5c38; }
.ev-badge--1b { background: #122b1e; color: #6dd49a; border: 1px solid #256640; }
.ev-badge--2a { background: #102030; color: #5bafd4; border: 1px solid #1e4a6a; }
.ev-badge--2b { background: #132336; color: #7abcd9; border: 1px solid #235074; }
.ev-badge--3  { background: #2b2514; color: #d4b55b; border: 1px solid #5c4e18; }
.ev-badge--4  { background: #2b1e10; color: #d4955b; border: 1px solid #5c3c18; }
.ev-badge--5  { background: #2b1414; color: #cf7070; border: 1px solid #5c2020; }

/* Inline superscript citations */
.cite-sup {
  font-size: .72em;
  vertical-align: super;
  white-space: nowrap;
  line-height: 0;
}
.cite-sup__link {
  color: var(--primary);
  text-decoration: none;
  padding: 0 .08em;
  font-weight: 500;
}
.cite-sup__link:hover { text-decoration: underline; color: var(--primary-h, var(--primary)); }

/* Inline cite spans (from markdown [@key] filter) */
.inline-cite { }
.inline-cite__link {
  color: var(--primary);
  font-size: .92em;
  text-decoration: none;
  border-bottom: 1px dotted var(--primary);
}
.inline-cite__link:hover { border-bottom-style: solid; }
.inline-cite--missing {
  color: #cf7070;
  font-size: .85em;
  font-family: monospace;
}

/* Page reference list (bibliography) */
.ref-list {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.ref-list__heading {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.ref-list__ol { list-style: decimal; padding-left: 1.5rem; }
.ref-list__item {
  font-size: .83rem;
  color: var(--text-muted);
  margin-bottom: .9rem;
  line-height: 1.6;
}
.ref-list__item--missing { color: #cf7070; }
.ref-list__authors { font-weight: 600; color: var(--text); }
.ref-list__title { font-style: italic; }
.ref-list__journal { color: var(--text); }
.ref-list__doi,
.ref-list__pmid {
  display: inline-block;
  font-size: .73rem;
  background: var(--surface-2, var(--surface));
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: .08rem .3rem;
  margin-left: .25rem;
  color: var(--primary);
  text-decoration: none;
}
.ref-list__doi:hover,
.ref-list__pmid:hover { border-color: var(--primary); }

/* Citation catalogue filter bar */
.cite-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.25rem;
  align-items: center;
}
.cite-filters__search {
  flex: 1;
  min-width: 200px;
  padding: .45rem .8rem;
  background: var(--surface-2, var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius, 6px);
  color: var(--text);
  font-size: .88rem;
}
.cite-filters__search:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.cite-filters__select {
  padding: .42rem .7rem;
  background: var(--surface-2, var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius, 6px);
  color: var(--text);
  font-size: .84rem;
  cursor: pointer;
}
.cite-filters__clear {
  padding: .4rem .65rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius, 6px);
  color: var(--text-muted);
  font-size: .85rem;
  text-decoration: none;
  line-height: 1;
}
.cite-filters__clear:hover { border-color: var(--primary); color: var(--text); }

/* Results bar (count + exports row) */
.cite-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.25rem;
}
.cite-count { font-size: .84rem; color: var(--text-muted); margin: 0; }
.cite-exports {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}
.cite-exports__label { font-size: .78rem; color: var(--text-muted); }
.cite-exports__link {
  font-size: .76rem;
  padding: .2rem .5rem;
  background: var(--surface-2, var(--surface));
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  text-decoration: none;
}
.cite-exports__link:hover { color: var(--text); border-color: var(--primary); }

/* Citation catalogue card */
.cite-grid { }   /* inherits .catalogue-grid layout */
.cite-card { position: relative; display: flex; flex-direction: column; }
.cite-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .4rem;
}
.cite-card__year {
  font-size: .76rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.cite-card__authors {
  font-size: .79rem;
  color: var(--text-muted);
  margin: .2rem 0 .15rem;
  line-height: 1.4;
}
.cite-card__journal {
  font-size: .79rem;
  color: var(--text-muted);
  margin: .15rem 0;
}
.cite-card__summary {
  flex: 1;
  margin: .3rem 0 .5rem;
  font-size: .82rem;
  line-height: 1.55;
}
.cite-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin-top: auto;
}
.tag--study-type {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  color: var(--primary);
}

/* Citation detail page */
.cite-detail { max-width: 820px; }
.cite-detail__title-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
}
.cite-detail__authors-full {
  font-size: .84rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: .25rem;
}
.cite-detail__meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem 1.5rem;
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius, 6px);
}
.cite-detail__meta-cell { }
.cite-detail__meta-label {
  font-size: .7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .2rem;
}
.cite-detail__meta-val { font-size: .88rem; line-height: 1.45; }
.cite-detail__meta-vol { color: var(--text-muted); font-size: .82rem; margin-left: .3rem; }
.cite-detail__links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.cite-detail__abstract-section { margin: 1.5rem 0; }
.cite-detail__section-heading {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: .75rem;
}
.cite-detail__abstract {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.72;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-left: 3px solid var(--border);
  border-radius: 0 var(--radius, 6px) var(--radius, 6px) 0;
}
.cite-detail__note {
  margin: 1rem 0;
  padding: .75rem 1rem;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  border-radius: var(--radius, 6px);
  font-size: .85rem;
  color: var(--text-muted);
}
.cite-detail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin: 1rem 0;
}
.cite-detail__export {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  margin: 1.25rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.cite-detail__export-label { font-size: .78rem; color: var(--text-muted); }
.cite-detail__related { margin-top: 2rem; }
.cite-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem;
  margin-top: .75rem;
}
.cite-related-card {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: .85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius, 6px);
  text-decoration: none;
  transition: border-color .15s;
}
.cite-related-card:hover { border-color: var(--primary); }
.cite-related-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cite-related-card__year { font-size: .73rem; color: var(--text-muted); }
.cite-related-card__title {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
}
.cite-related-card__author { font-size: .75rem; color: var(--text-muted); margin: 0; }
.cite-detail__formatted { margin-top: 1.5rem; }
.cite-detail__apa {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding: .85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius, 6px);
}
.cite-detail__back { margin-top: 2rem; font-size: .85rem; }

/* EBP registry section */
.cite-ebp-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.cite-ebp-section__heading {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: .4rem;
}
.cite-ebp-section__subtitle {
  font-size: .86rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  max-width: 640px;
}
.cite-ebp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.cite-ebp-card {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius, 6px);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.cite-ebp-card:hover { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 5%, var(--surface)); }
.cite-ebp-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cite-ebp-card__org { font-size: .73rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.cite-ebp-card__badges { display: flex; gap: .3rem; }
.cite-badge {
  font-size: .66rem;
  font-weight: 700;
  padding: .1rem .35rem;
  border-radius: 3px;
  letter-spacing: .03em;
}
.cite-badge--oa { background: #0e2e1a; color: #4ede8c; border: 1px solid #1a5530; }
.cite-badge--ca { background: #2e1a1a; color: #e06060; border: 1px solid #5c2020; }
.cite-ebp-card__name { font-size: .95rem; font-weight: 600; color: var(--text); margin: 0; }
.cite-ebp-card__desc { font-size: .81rem; color: var(--text-muted); line-height: 1.55; flex: 1; }
.cite-ebp-card__cta { font-size: .8rem; color: var(--primary); font-weight: 600; margin-top: .25rem; }

/* ── FR Guide Preview (non-viewer landing) ────────────────────────────────── */
.fr-preview-body { max-width: 780px; }
.fr-preview-body .lead { font-size: 1.05rem; line-height: 1.7; color: var(--text); margin-bottom: 1.25rem; }
.fr-preview-body p { font-size: .95rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1rem; }
.fr-preview__section-heading {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: var(--text);
}
.fr-preview__list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.fr-preview__list li {
  font-size: .9rem;
  color: var(--text-muted);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.55;
}
.fr-preview__list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
.fr-preview__cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  border-radius: var(--radius, 6px);
}
.fr-preview__cta-box strong { font-size: .95rem; color: var(--text); }
.fr-preview__cta-box p { font-size: .85rem; color: var(--text-muted); margin: .2rem 0 0; }

/* ── Researcher directory ──────────────────────────────────────────────────── */

/* Transparency notice */
.researchers-notice {
  display: flex;
  gap: 1rem;
  background: color-mix(in srgb, var(--primary) 7%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  border-radius: var(--radius, 6px);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.researchers-notice__icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1.6; }
.researchers-notice__body p { margin: 0 0 .7rem; font-size: .9rem; line-height: 1.65; color: var(--text); }
.researchers-notice__body p:last-child { margin-bottom: 0; }
.researchers-notice__mcnally { color: var(--text-muted) !important; }

/* Ethics / privacy panel */
.researchers-ethics {
  border: 1px solid var(--border);
  border-radius: var(--radius, 6px);
  background: var(--surface);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.researchers-ethics__summary {
  cursor: pointer;
  padding: .85rem 1.25rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-muted);
  list-style: none;
  user-select: none;
  transition: color .15s;
}
.researchers-ethics__summary:hover { color: var(--text); }
.researchers-ethics__summary::-webkit-details-marker { display: none; }
.researchers-ethics[open] .researchers-ethics__summary { border-bottom: 1px solid var(--border); }
.researchers-ethics__body {
  padding: 1.25rem 1.5rem 1.5rem;
}
.researchers-ethics__body h3 {
  font-size: .95rem;
  font-weight: 700;
  margin: 1.25rem 0 .35rem;
  color: var(--text);
}
.researchers-ethics__body h3:first-child { margin-top: 0; }
.researchers-ethics__body p {
  font-size: .86rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 .5rem;
}

/* Stats bar */
.researchers-stats {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.researchers-stats a { color: var(--primary); text-decoration: none; }
.researchers-stats a:hover { text-decoration: underline; }
.researchers-stats__sep { opacity: .4; }

/* Results count */
.researchers-results-count {
  font-size: .84rem;
  color: var(--text-muted);
  margin: -.25rem 0 1rem;
}

/* Filter form */
.researchers-filters {
  margin-bottom: 1.5rem;
}
.researchers-filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
}
.researchers-filters__search {
  flex: 1 1 220px;
  padding: .5rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius, 6px);
  background: var(--surface);
  color: var(--text);
  font-size: .88rem;
  min-width: 0;
}
.researchers-filters__search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 20%, transparent);
}
.researchers-filters__select {
  padding: .5rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius, 6px);
  background: var(--surface);
  color: var(--text);
  font-size: .88rem;
  cursor: pointer;
}
.researchers-filters__select:focus {
  outline: none;
  border-color: var(--primary);
}
.researchers-filters__btn { font-size: .88rem; padding: .5rem 1rem; }

/* Researcher grid */
.researchers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Researcher card */
.researcher-card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius, 6px);
  transition: border-color .15s;
}
.researcher-card:hover { border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.researcher-card--claimed {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
  background: color-mix(in srgb, var(--primary) 4%, var(--surface));
}

.researcher-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
}
.researcher-card__name-row {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.researcher-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.researcher-card__verified {
  font-size: .8rem;
  color: #059669;
  font-weight: 700;
  flex-shrink: 0;
}
.researcher-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  flex-shrink: 0;
}
.researcher-card__title {
  font-size: .8rem;
  color: var(--text-muted);
  margin: 0;
  font-style: italic;
}
.researcher-card__affil {
  font-size: .84rem;
  color: var(--text);
  margin: 0;
  font-weight: 500;
}
.researcher-card__focus {
  font-size: .82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.researcher-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .25rem;
}
.researcher-card__link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .78rem;
  padding: .22rem .55rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s;
}
.researcher-card__link--web     { background: var(--surface-2); color: var(--text-muted); border-color: var(--border); }
.researcher-card__link--web:hover { color: var(--text); border-color: var(--primary); }
.researcher-card__link--linkedin { background: #162842; color: #60a5fa; border-color: #2a4a6a; }
.researcher-card__link--linkedin:hover { background: #1e3a5a; }
.researcher-card__link--rg      { background: #1a2e2a; color: #5ab8aa; border-color: #2a5040; }
.researcher-card__link--rg:hover { background: #1e3a34; }
.researcher-card__link--scholar { background: #1e2a10; color: #9dc44a; border-color: #3a5020; }
.researcher-card__link--scholar:hover { background: #263814; }

/* Researcher misc badges */
.researcher-badge {
  font-size: .68rem;
  font-weight: 700;
  padding: .12rem .4rem;
  border-radius: 3px;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.researcher-badge--province   { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.researcher-badge--nonclinical{ background: color-mix(in srgb, #6b7280 15%, var(--surface)); color: #6b7280; border: 1px solid #6b7280; }
.researcher-badge--role       { background: color-mix(in srgb, var(--primary) 15%, var(--surface)); color: var(--primary); border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent); }
.researcher-badge--network    { background: #1a2d40; color: #60a5fa; border: 1px solid #2a4a6a; }

/* CTA row */
.researchers-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius, 6px);
}

/* Community roadmap */
.researchers-roadmap {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.researchers-roadmap__heading {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.researchers-roadmap__body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.5rem 0 .4rem;
}
.researchers-roadmap__body p {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 .5rem;
  max-width: 720px;
}

/* Responsive */
@media (max-width: 640px) {
  .researchers-grid { grid-template-columns: 1fr; }
  .researchers-filters__row { flex-direction: column; align-items: stretch; }
  .researchers-filters__search,
  .researchers-filters__select { width: 100%; }
  .researcher-card__header { flex-direction: column; }
  .researchers-cta-row { flex-direction: column; }
  .researchers-notice { flex-direction: column; gap: .5rem; }
}

/* ── Listing sort bar (primers, runsheets) ───────────────────────────────── */
.listing-sort-bar {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 1rem;
  flex-wrap: wrap;
}
.listing-sort-bar__label {
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-right: .1rem;
}
.listing-sort-bar__btn {
  display: inline-flex;
  align-items: center;
  padding: .25rem .65rem;
  border-radius: 3px;
  font-size: .75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--surface) 60%, var(--bg));
  border: 1px solid var(--border);
  text-decoration: none;
  transition: color .12s, background .12s, border-color .12s;
}
.listing-sort-bar__btn:hover { color: var(--text); border-color: var(--text-muted); }
.listing-sort-bar__btn--active {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}

/* ── Researchers viz (map + Sankey) ──────────────────────────────────────── */
.researchers-viz {
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, .75rem);
  /* No overflow:hidden — Leaflet needs to render canvas layers beyond container edges */
  background: var(--surface);
}
/* Apply corner clipping only to the tab bar (top) and bottom edge of last panel */
.researchers-viz__tabs {
  border-radius: var(--radius-lg, .75rem) var(--radius-lg, .75rem) 0 0;
  overflow: hidden;
}
.researchers-viz__tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 60%, var(--bg));
}

.researchers-viz__tab {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1.1rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}
.researchers-viz__tab:hover { color: var(--text); }
.researchers-viz__tab--active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.researchers-viz__panel {
  padding: 0;
}
.researchers-viz__panel--hidden { display: none; }

#researcher-map {
  height: 380px;
  width: 100%;
}

.researchers-viz__hint {
  margin: 0;
  padding: .45rem .9rem;
  font-size: .72rem;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--surface) 80%, var(--bg));
  border-top: 1px solid var(--border);
  text-align: center;
}

.researchers-viz__sankey-note {
  margin: 0;
  padding: .7rem 1rem .5rem;
  font-size: .75rem;
  color: var(--text-muted);
}

#researcher-sankey {
  padding: .5rem 1.5rem 1.25rem;
  overflow-x: auto;
}

.sankey-label {
  font-size: .72rem;
  fill: var(--text-muted);
  font-family: inherit;
}

.sankey-link {
  transition: opacity .15s;
}
.sankey-link:hover { opacity: .8; }

@media (max-width: 640px) {
  #researcher-map { height: 280px; }
}

/* ── Getting Started page ────────────────────────────────────────────────── */
.gs-page { max-width: 780px; padding-top: 3rem; padding-bottom: 4rem; }

.gs-hero {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border);
}
.gs-hero__title {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: .6rem;
  letter-spacing: -.02em;
}
.gs-hero__sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
}

.gs-section { margin-bottom: 2.8rem; }
.gs-section__heading {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.gs-section p {
  font-size: .95rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: .75rem;
}
.gs-section p:last-child { margin-bottom: 0; }

/* Scope hierarchy row */
.gs-scope-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1rem 0;
}
.gs-scope-row__arrow {
  color: var(--text-muted);
  font-size: .85rem;
  opacity: .5;
}

/* Three view cards */
.gs-views {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: .5rem;
}
.gs-view-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}
.gs-view-card__label {
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--primary);
  margin-bottom: .4rem;
}
.gs-view-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .5rem;
}
.gs-view-card__desc {
  font-size: .84rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* Resource type list */
.gs-type-list {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  margin: .5rem 0 0;
}
.gs-type-item {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: .75rem;
  align-items: baseline;
  font-size: .9rem;
  line-height: 1.6;
}
.gs-type-item__name {
  font-weight: 700;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .18em .55em;
  border-radius: 2px;
  text-align: center;
  white-space: nowrap;
  color: #fff;
  font-family: ui-monospace, 'SF Mono', monospace;
}
.gs-type-item__name--primer   { background: #7c3aed; }
.gs-type-item__name--runsheet { background: #0ea5e9; }
.gs-type-item__name--guide    { background: #10b981; }
.gs-type-item__name--catalogue{ background: #f59e0b; }
.gs-type-item__name--dispatch { background: var(--primary); }
.gs-type-item dd {
  margin: 0;
  color: var(--text-muted);
}

/* CTA row */
.gs-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

@media (max-width: 640px) {
  .gs-hero__title { font-size: 1.8rem; }
  .gs-type-item { grid-template-columns: 1fr; }
  .gs-type-item__name { width: fit-content; }
  .gs-cta { flex-direction: column; }
  .gs-cta .btn { text-align: center; }
}


/* ═══════════════════════════════════════════════════════════════
   BIOSURVEILLANCE
   ═══════════════════════════════════════════════════════════════ */

/* Severity colour tokens */
:root {
  --sev-emergency: #dc2626;   /* red-600  */
  --sev-alert:     #ea580c;   /* orange-600 */
  --sev-advisory:  #ca8a04;   /* yellow-600 */
  --sev-info:      #2563eb;   /* blue-600  */
  --sev-emergency-bg: #fef2f2;
  --sev-alert-bg:     #fff7ed;
  --sev-advisory-bg:  #fefce8;
  --sev-info-bg:      #eff6ff;
}

/* Header */
.biosurveil-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
}
.biosurveil-header__title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 .4rem;
}
.biosurveil-header__sub {
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0;
  font-size: .95rem;
}
.biosurveil-header__badge {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
  padding: .3rem .65rem .3rem .55rem;
  border-radius: 3px;
  border: 1px solid #fca5a5;
  border-left: 3px solid var(--sev-emergency);
  background: var(--sev-emergency-bg);
  font-size: .72rem;
  font-weight: 700;
  color: var(--sev-emergency);
  font-family: ui-monospace, 'SF Mono', monospace;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.biosurveil-live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sev-emergency);
  animation: biosurveil-pulse 2s infinite;
}
@keyframes biosurveil-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}

/* Province chip row */
.biosurveil-provinces {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.biosurveil-province-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.biosurveil-province-chip {
  padding: .25rem .65rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  font-size: .75rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-muted);
  background: var(--bg);
  transition: background .15s, color .15s, border-color .15s;
}
.biosurveil-province-chip:hover {
  background: var(--bg-secondary);
  color: var(--text);
}
.biosurveil-province-chip--active {
  background: var(--accent, #2563eb);
  color: #fff;
  border-color: transparent;
}

/* Layout */
.biosurveil-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  align-items: start;
}
@media (max-width: 768px) {
  .biosurveil-layout { grid-template-columns: 1fr; }
  .biosurveil-sidebar { display: none; }
}

/* Sidebar */
.biosurveil-filter-group { margin-bottom: 1.75rem; }
.biosurveil-filter-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin: 0 0 .5rem;
}
.biosurveil-filter-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.biosurveil-filter-link {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .5rem .3rem .45rem;
  border-radius: 3px;
  border-left: 2px solid transparent;
  font-size: .875rem;
  text-decoration: none;
  color: var(--text-muted);
  transition: background .15s, color .15s, border-left-color .12s;
}
.biosurveil-filter-link:hover { background: var(--surface-2); color: var(--text); }
.biosurveil-filter-link--active {
  background: color-mix(in srgb, var(--sev-stripe, var(--primary)) 7%, transparent);
  color: var(--text);
  font-weight: 600;
  border-left-color: var(--sev-stripe, var(--primary));
}
/* Severity stripe colours on active sidebar links */
.biosurveil-filter-link--sev-emergency { --sev-stripe: var(--sev-emergency); }
.biosurveil-filter-link--sev-alert     { --sev-stripe: var(--sev-alert); }
.biosurveil-filter-link--sev-advisory  { --sev-stripe: var(--sev-advisory); }
.biosurveil-filter-link--sev-info      { --sev-stripe: var(--sev-info); }

.biosurveil-sev-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.biosurveil-sev-dot--emergency { background: var(--sev-emergency); }
.biosurveil-sev-dot--alert     { background: var(--sev-alert); }
.biosurveil-sev-dot--advisory  { background: var(--sev-advisory); }
.biosurveil-sev-dot--info      { background: var(--sev-info); }

.biosurveil-source-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  font-size: .85rem;
}
.biosurveil-source-list a { color: var(--accent, #2563eb); }

/* Province tags (used in sidebar + cards) */
.biosurveil-prov-tag {
  display: inline-block;
  padding: .1rem .4rem;
  border-radius: .25rem;
  font-size: .7rem;
  font-weight: 700;
  background: var(--bg-secondary);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Result count */
.biosurveil-count {
  font-size: .875rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

/* ── Biosurveillance incident board ─────────────────────────────────────────
   Severity-coded flush rows. No gaps, no card radius.
   Left-border stripe width communicates urgency (emergency = 5px).
   Minimal background tint keeps the board readable at a glance.
   ─────────────────────────────────────────────────────────────────────────── */
.biosurveil-cards {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.biosurveil-card {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  border-left: 4px solid var(--border);
  padding: 1rem 1.25rem 1rem 1rem;
  background: var(--surface);
  transition: background .12s, border-left-color .12s;
}
.biosurveil-cards .biosurveil-card:last-child { border-bottom: none; }
.biosurveil-card:hover { background: color-mix(in srgb, var(--sev-stripe, var(--primary)) 5%, var(--surface)); }

/* Severity stripes — P1 thru P4 weight */
.biosurveil-card--emergency {
  --sev-stripe: var(--sev-emergency);
  border-left: 5px solid var(--sev-emergency);   /* P1: extra width = critical */
  background: color-mix(in srgb, var(--sev-emergency) 4%, var(--surface));
}
.biosurveil-card--alert {
  --sev-stripe: var(--sev-alert);
  border-left: 4px solid var(--sev-alert);
  background: color-mix(in srgb, var(--sev-alert) 3%, var(--surface));
}
.biosurveil-card--advisory {
  --sev-stripe: var(--sev-advisory);
  border-left: 4px solid var(--sev-advisory);
  background: var(--surface);
}
.biosurveil-card--info {
  --sev-stripe: var(--sev-info);
  border-left: 4px solid var(--sev-info);
  background: var(--surface);
}

.biosurveil-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .5rem;
}
.biosurveil-sev-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .18rem .5rem .18rem .45rem;
  border-radius: 2px;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  font-family: ui-monospace, 'SF Mono', monospace;
  border-left: 3px solid currentColor;
}
/* Severity blocks — solid fill for maximum urgency legibility.
   P1/P2 solid, P3/P4 use outline variant for visual hierarchy. */
.biosurveil-sev-badge--emergency { background: var(--sev-emergency); color: #fff; border-left-color: rgba(0,0,0,.3); }
.biosurveil-sev-badge--alert     { background: var(--sev-alert);     color: #fff; border-left-color: rgba(0,0,0,.3); }
.biosurveil-sev-badge--advisory  { background: transparent; color: var(--sev-advisory); border-left-color: var(--sev-advisory); border-color: color-mix(in srgb, var(--sev-advisory) 40%, transparent); border-left-color: var(--sev-advisory); }
.biosurveil-sev-badge--info      { background: transparent; color: var(--sev-info); border-left-color: var(--sev-info); border-color: color-mix(in srgb, var(--sev-info) 35%, transparent); border-left-color: var(--sev-info); }

.biosurveil-card__type {
  font-size: .65rem;
  font-weight: 700;
  color: var(--text-muted);
  font-family: ui-monospace, 'SF Mono', monospace;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.biosurveil-card__provinces { display: flex; gap: .25rem; }

.biosurveil-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin: .3rem 0 .5rem;
  line-height: 1.4;
}
.biosurveil-card__link {
  color: var(--text);
  text-decoration: none;
}
.biosurveil-card__link:hover { text-decoration: underline; }

.biosurveil-card__summary {
  font-size: .875rem;
  color: var(--text-muted);
  margin: 0 0 .75rem;
  line-height: 1.55;
}

.biosurveil-card__footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .8rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(0,0,0,.06);
  padding-top: .6rem;
  margin-top: .5rem;
}
.biosurveil-card__source { font-weight: 600; }
.biosurveil-card__read-more {
  margin-left: auto;
  color: var(--accent, #2563eb);
  text-decoration: none;
  font-weight: 600;
}
.biosurveil-card__read-more:hover { text-decoration: underline; }

/* Empty state */
.biosurveil-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

/* ── Monitor nav link ────────────────────────────────────────────────────── */
.navbar__link--monitor {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  font-weight: 600;
  color: var(--text-muted);
}
.navbar__link--monitor:hover { color: var(--text); }
.navbar__dropmenu-monitor {
  display: flex;
  align-items: center;
  gap: .5em;
  font-weight: 600;
}
.navbar__monitor-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
  animation: monitor-pulse 2s ease-in-out infinite;
}
@keyframes monitor-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.8); }
}

/* ── Monitor view-toggle button ─────────────────────────────────────────── */
.view-toggle__btn--monitor { gap: .4em; }
.view-toggle__monitor-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
  animation: monitor-pulse 2s ease-in-out infinite;
}
.view-toggle__btn--active .view-toggle__monitor-dot { background: #fff; }

/* ── Monitor panel ───────────────────────────────────────────────────────── */
.monitor-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  padding: .75rem 0 1rem;
  border-bottom: 1px solid var(--border, rgba(0,0,0,.08));
  margin-bottom: .75rem;
}
.monitor-header__label {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-weight: 700;
  font-size: .95rem;
}
.monitor-live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
  animation: monitor-pulse 2s ease-in-out infinite;
}
.monitor-header__sub  { font-size: .8rem; color: var(--text-muted); flex: 1; }
.monitor-header__link { font-size: .82rem; font-weight: 600; color: var(--accent, #2563eb); margin-left: auto; white-space: nowrap; }
.monitor-header__link:hover { text-decoration: underline; }

.monitor-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.monitor-item {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .55rem .65rem;
  border-radius: 6px;
  background: var(--surface, #f8fafc);
  border-left: 3px solid transparent;
  transition: background .12s;
}
.monitor-item--emergency { border-left-color: #dc2626; }
.monitor-item--alert     { border-left-color: #f97316; }
.monitor-item--advisory  { border-left-color: #eab308; }
.monitor-item--info      { border-left-color: #3b82f6; }
.monitor-item:hover      { background: var(--surface-hover, #f0f4f8); }

.monitor-item__sev  { font-size: .9rem; flex-shrink: 0; line-height: 1.4; }
.monitor-item__body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.monitor-item__title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  line-height: 1.35;
}
.monitor-item__title:hover { text-decoration: underline; color: var(--accent, #2563eb); }
.monitor-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem;
  font-size: .73rem;
  color: var(--text-muted);
}
.monitor-item__source { font-weight: 600; }
.monitor-item__sms-badge {
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 4px;
  padding: 0 .35em;
  font-size: .7rem;
  font-weight: 700;
}
.monitor-footer, .monitor-empty {
  padding: .75rem 0 .25rem;
  display: flex;
  justify-content: flex-end;
}
.monitor-empty {
  flex-direction: column;
  align-items: center;
  padding: 2.5rem;
  color: var(--text-muted);
  gap: .75rem;
}

/* ── Biosurveillance SMS badge (card view) ───────────────────────────────── */
.biosurveil-sms-badge {
  display: inline-flex;
  align-items: center;
  gap: .2em;
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 4px;
  padding: .1em .45em;
  font-size: .72rem;
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════════════════════════
   CAD CONSOLE SIGNATURE ELEMENTS
   Design vocabulary borrowed from EMS: dispatch screens, ECG monitors,
   Motorola radios, clinical dashboards. Used sparingly as section breaks
   and accent marks to distinguish paramedicine.science from generic SaaS.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── ECG trace divider ──────────────────────────────────────────────────────
   Replaces plain <hr> between major page sections. A near-flat baseline
   with a single QRS spike — the EMS heartbeat. Used as:
     <div class="trace-divider" aria-hidden="true"><svg …/></div>
   or by applying .trace-divider to an <hr>.
   ─────────────────────────────────────────────────────────────────────────── */
.trace-divider {
  display: block;
  width: 100%;
  height: 20px;
  margin: 2rem 0;
  opacity: .18;
  color: var(--primary);
}
.trace-divider svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── CAD section eyebrow ────────────────────────────────────────────────────
   Draftsman's annotation style — spec-label before a section heading.
   Usage: <span class="cad-eyebrow">DISPATCH ·</span>
   ─────────────────────────────────────────────────────────────────────────── */
.cad-eyebrow {
  display: block;
  font-family: ui-monospace, 'SF Mono', 'Fira Code', monospace;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .4rem;
  opacity: .7;
}

/* ── CAD incident row ───────────────────────────────────────────────────────
   A row that reads like a CAD incident list entry.
   Left-border = priority stripe. Monospace meta. Dense.
   Usage: <div class="cad-row cad-row--priority-1"> … </div>
   ─────────────────────────────────────────────────────────────────────────── */
.cad-row {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: .6rem .85rem .6rem .7rem;
  border-left: 3px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: border-left-color .12s, background .12s;
}
.cad-row:hover {
  border-left-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 4%, transparent);
}
.cad-row--p1 { border-left-color: #dc2626; }
.cad-row--p2 { border-left-color: #d97706; }
.cad-row--p3 { border-left-color: #3b82f6; }
.cad-row--p4 { border-left-color: #10b981; }
.cad-row__code {
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .07em;
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 4ch;
}
.cad-row__body { flex: 1; min-width: 0; }
.cad-row__timestamp {
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: .62rem;
  color: var(--text-muted);
  letter-spacing: .04em;
  flex-shrink: 0;
}

/* ── Lens selector (notes/lens.md) — anonymous relevance viewpoint, lives in the scope
   bar. Native <details> disclosure, no JS island; reorders the home topic matrix, never
   gates. Styled to match the CAD-terminal scope bar. */
.lens-select { position: relative; display: inline-block; flex-shrink: 0; }
.lens-select__current {
  cursor: pointer;
  list-style: none;
  padding: .2rem .55rem;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 3px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.78);
  font: inherit;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
  white-space: nowrap;
}
.lens-select__current::-webkit-details-marker { display: none; }
.lens-select__current::after {
  content: "";
  display: inline-block;
  margin-left: .4rem;
  border: 4px solid transparent;
  border-top-color: rgba(255,255,255,0.45);
  vertical-align: middle;
  transform: translateY(-1px);
}
.lens-select[open] .lens-select__current {
  border-color: rgba(255,255,255,0.4);
  color: #fff;
  background: rgba(255,255,255,0.07);
}
.lens-select__menu {
  position: absolute;
  z-index: 120;
  top: calc(100% + 5px);
  right: 0;                 /* open leftward — the lens sits near the bar's right edge */
  min-width: 150px;
  background: #0b1320;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 4px;
  box-shadow: 0 8px 26px rgba(0,0,0,0.55);
  padding: .25rem;
  display: flex;
  flex-direction: column;
}
.lens-select__opt {
  padding: .32rem .55rem;
  border-radius: 3px;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  white-space: nowrap;
  font-size: .72rem;
  font-weight: 600;
}
.lens-select__opt:hover { background: rgba(255,255,255,0.06); color: #fff; }
.lens-select__opt.is-active { color: #fff; box-shadow: inset 2px 0 0 #7c3aed; }

/* Lens emphasis — priority topics for the active viewpoint. Subtle; never hides the rest. */
.tm-row--lens .tm-topic-link { font-weight: 700; }
.tm-row--lens .tm-topic-cell {
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--primary) 55%, transparent);
}

/* ── Print styles (launch-polish) ────────────────────────────────────────────
   Runsheets, primers, and catalogue monographs get printed for station walls and
   binders. Override the dark-theme variables to ink-friendly black-on-white, strip
   the app chrome, and let the content run full width on a single column. */
@media print {
  :root {
    --bg:         #fff;
    --surface:    #fff;
    --surface-2:  #fff;
    --border:     #ccc;
    --text:       #000;
    --text-muted: #444;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
    line-height: 1.45;
  }

  /* App chrome and interactive widgets: not for paper. */
  .beta-banner,
  .navbar,
  .scope-bar,
  .footer,
  .report-fab,
  .report-modal-overlay,
  .report-modal,
  .runsheet-sidebar,
  .catitem-sidebar,
  .contribute-sidebar,
  .filter-bar,
  .section-cta,
  .skip-link,
  aside,
  button,
  form {
    display: none !important;
  }

  /* Collapse multi-column layouts to a single content column. */
  .runsheet-layout,
  .catitem-layout,
  .contribute-layout {
    display: block !important;
  }

  /* Content runs full width, no card shells, shadows, or dark fills. */
  .main-content,
  .container,
  .primer-body,
  .runsheet-body,
  .catitem-main,
  .prose {
    max-width: 100% !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
  }

  a { color: #000 !important; text-decoration: none; }
  h1, h2, h3, h4 { color: #000 !important; page-break-after: avoid; }
  pre, blockquote, table, figure, img, li { page-break-inside: avoid; }
  .prose pre, .prose code { font-size: 9pt; }
  img { max-width: 100% !important; height: auto !important; }

  @page { margin: 1.8cm; }
}
