/* ==========================================================================
   Pathways Board Portal — stylesheet
   Standalone (does not load or modify the public site's styles.css).
   Design tokens, fonts and component styling mirror the public Pathways site:
   navy / blue / green / gold, Playfair Display headings, Source Sans 3 body.
   ========================================================================== */

:root {
  --navy: #052B52;
  --navy-dark: #081d33;
  --blue: #1267B2;
  --green: #247447;
  --gold: #D9A321;
  --white: #FAFAF7;
  --warm: #F1EEE6;
  --slate: #374553;
  --line: rgba(5, 43, 82, 0.12);
  --danger: #a12a2a;
  --danger-bg: #fbeceb;
  --info-bg: #e9f1f9;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius: 6px;
  --header-h: 84px;
  --hero-h: 220px;
  --nav-w: 264px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--slate);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input { font-family: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Protected pages stay invisible until the session + profile are verified. */
html.auth-pending .portal-shell { visibility: hidden; }

.noscript-msg {
  max-width: 560px; margin: 80px auto; padding: 24px; text-align: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}

/* ---------- shared buttons / forms ---------- */

.eyebrow {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--blue);
}

.gold-rule { width: 56px; height: 3px; background: var(--gold); border-radius: 2px; margin: 14px 0 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; letter-spacing: 0.05em;
  padding: 13px 28px; border-radius: 3px; border: 2px solid transparent;
  transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover:not(:disabled) { background: #c4901d; transform: translateY(-1px); }
.btn:disabled { opacity: 0.65; cursor: not-allowed; }
.btn-block { width: 100%; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.field input {
  width: 100%; font-size: 16px; padding: 12px 14px; color: var(--navy);
  background: #fff; border: 1px solid rgba(5, 43, 82, 0.28); border-radius: 4px;
}
.field input:focus { border-color: var(--blue); }

.form-message {
  font-size: 15px; padding: 12px 14px; border-radius: 4px; margin-bottom: 18px;
  border-left: 4px solid; }
.form-message.is-error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.form-message.is-info  { background: var(--info-bg); color: var(--navy); border-color: var(--blue); }

.text-link {
  background: none; border: none; padding: 0; font-size: 14.5px; font-weight: 600;
  color: var(--blue); text-decoration: underline; text-underline-offset: 3px;
}
.text-link:hover { color: var(--navy); }

/* ==========================================================================
   LOGIN / RESET PAGES
   ========================================================================== */

.login-page {
  min-height: 100vh;
  background:
    linear-gradient(160deg, rgba(5, 43, 82, 0.96) 0%, rgba(8, 29, 51, 0.98) 100%);
}

.login-shell {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 32px 16px;
}

.login-card {
  width: 100%; max-width: 440px; background: #fff; border-radius: 8px;
  padding: 36px 40px 40px; border-top: 5px solid var(--gold);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.login-brand img { height: 92px; width: auto; margin: 0 auto 18px; }
.login-card .eyebrow { text-align: center; }
.login-card h1 {
  font-family: var(--font-display); font-size: 34px; line-height: 1.2;
  color: var(--navy); text-align: center; margin-top: 6px;
}
.login-card .gold-rule { margin: 14px auto 16px; }
.login-intro { text-align: center; font-size: 15.5px; margin-bottom: 24px; }
.login-links { margin-top: 18px; text-align: center; }

.login-footnote {
  max-width: 440px; text-align: center; margin-top: 22px;
  font-size: 13.5px; color: rgba(255, 255, 255, 0.72);
}
.login-footnote a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

.field-hint { font-size: 13px; color: var(--slate); margin-top: 5px; }

/* ==========================================================================
   PORTAL SHELL
   ========================================================================== */

.portal-header {
  position: sticky; top: 0; z-index: 100; background: #fff;
  border-bottom: 1px solid var(--line); border-top: 4px solid var(--navy);
}
.portal-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 10px 28px; min-height: var(--header-h);
}

.portal-brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.portal-brand img { height: 62px; width: auto; flex-shrink: 0; }
.portal-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.portal-brand-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); }
.portal-brand-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--navy); }

.portal-user { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.portal-user-info { display: flex; flex-direction: column; text-align: right; line-height: 1.25; }
.portal-user-name { font-weight: 700; color: var(--navy); font-size: 15.5px; }
.portal-user-title { font-size: 13px; }

.role-badge {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--info-bg); color: var(--navy);
}
.role-badge.role-administrator { background: var(--navy); color: #fff; }
.role-badge.role-board_member  { background: #e3f0e8; color: var(--green); }
.role-badge.role-read_only     { background: var(--warm); color: var(--slate); }

.btn-logout {
  background: transparent; color: var(--navy); font-size: 13px; font-weight: 700;
  letter-spacing: 0.05em; padding: 10px 18px; border: 2px solid var(--navy); border-radius: 3px;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-logout:hover:not(:disabled) { background: var(--navy); color: #fff; }
.btn-logout:disabled { opacity: 0.6; cursor: wait; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: space-between;
  width: 34px; height: 22px; background: none; border: none; padding: 0;
}
.nav-toggle span { display: block; width: 100%; height: 2.5px; background: var(--navy); border-radius: 2px; transition: transform 0.25s ease, opacity 0.2s ease; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }

.portal-body { display: flex; align-items: stretch; min-height: calc(100vh - var(--header-h) - 4px); }
/* Dashboard page: the hero replaces the header above .portal-body, so size against it instead. */
.portal-hero + .portal-body { min-height: calc(100vh - var(--hero-h)); }

.portal-nav {
  width: var(--nav-w); flex-shrink: 0; background: var(--navy);
  padding: 24px 0 20px; display: flex; flex-direction: column;
}
.portal-nav-link {
  display: flex; align-items: center; gap: 14px; padding: 14px 26px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82); border-left: 4px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.portal-nav-link:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.portal-nav-link.is-active { background: rgba(255, 255, 255, 0.1); color: var(--gold); border-left-color: var(--gold); }
.portal-nav-link:focus-visible { outline-color: var(--gold); outline-offset: -3px; }
.nav-icon { width: 20px; height: 20px; flex-shrink: 0; }
.portal-nav-user { display: none; padding: 6px 26px 14px; margin-bottom: 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
.portal-nav-user-name { display: block; color: #fff; font-weight: 700; }
.portal-nav-user-meta { display: block; font-size: 13px; color: rgba(255, 255, 255, 0.7); }
.portal-nav-note { margin: auto 26px 0; padding-top: 24px; font-size: 12.5px; color: rgba(255, 255, 255, 0.55); }

.portal-main { flex: 1; min-width: 0; padding: 36px 40px 64px; max-width: 1240px; }
.portal-main:focus { outline: none; }

.page-head { margin-bottom: 28px; }
.page-head h1 { font-family: var(--font-display); font-size: 36px; line-height: 1.2; color: var(--navy); margin-top: 4px; }
.page-sub { max-width: 68ch; margin-top: 4px; font-size: 17px; }

/* ---------- cards & panels ---------- */

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin-bottom: 30px; }

.summary-card {
  --card-accent: var(--blue);
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--card-accent);
  border-radius: var(--radius); padding: 22px 24px 20px; display: flex; flex-direction: column;
  box-shadow: 0 2px 10px rgba(5, 43, 82, 0.05);
}
.summary-card.accent-blue  { --card-accent: var(--blue); }
.summary-card.accent-green { --card-accent: var(--green); }
.summary-card.accent-gold  { --card-accent: var(--gold); }
.summary-card.accent-navy  { --card-accent: var(--navy); }
.summary-card h2 { font-family: var(--font-display); font-size: 21px; color: var(--navy); margin-bottom: 10px; }
.card-empty { font-size: 15px; color: var(--slate); margin-bottom: 14px; }
.card-metric { margin-bottom: 14px; }
.metric-value { font-family: var(--font-display); font-size: 42px; font-weight: 700; color: var(--navy); line-height: 1; }
.metric-label { display: block; font-size: 13.5px; margin-top: 4px; }
.card-link {
  margin-top: auto; font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--blue);
}
.card-link:hover { color: var(--gold); }
.card-status { margin-top: auto; font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); opacity: 0.75; }

/* ---------- Documents workspace (Build 10B) — folder cards ---------- */

.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }

.doc-card {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; text-align: left;
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy);
  border-radius: var(--radius); padding: 22px 24px 20px;
  box-shadow: 0 2px 10px rgba(5, 43, 82, 0.05);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.doc-card:hover { box-shadow: 0 8px 22px rgba(5, 43, 82, 0.14); transform: translateY(-2px); }
.doc-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.doc-card-icon { width: 34px; height: 34px; color: var(--gold); margin-bottom: 14px; }
.doc-card-title { font-family: var(--font-display); font-size: 20px; color: var(--navy); margin-bottom: 8px; }
.doc-card-desc { font-size: 14.5px; color: var(--slate); margin-bottom: 16px; }

.doc-card-open {
  margin-top: auto; display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--blue);
}
.doc-card-chevron { width: 15px; height: 15px; transition: transform 0.15s ease; }
.doc-card:hover .doc-card-chevron, .doc-card:focus-visible .doc-card-chevron { transform: translateX(3px); }

/* ---------- Documents workspace (Build 10C) — breadcrumb + folder detail ---------- */

.doc-breadcrumb { font-size: 13px; font-weight: 600; color: var(--slate); margin-bottom: 6px; }
.doc-breadcrumb a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.doc-breadcrumb a:hover { color: var(--navy); }

.doc-head-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.doc-head-row h1 { margin: 0; }

.doc-back-btn { display: inline-flex; align-items: center; gap: 8px; }
.doc-state-back { display: block; margin-top: 14px; }

/* Build 10D: Upload Document sits with Back to Documents, near the folder heading. */
.doc-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.doc-upload-btn { display: inline-flex; align-items: center; gap: 8px; }

.ef input[type="file"] { padding: 8px 10px; background: var(--white); }

@media (max-width: 640px) {
  .doc-head-row { flex-direction: column; align-items: flex-start; }
  .doc-head-actions { width: 100%; }
  .doc-head-actions .btn { flex: 1 1 auto; }
}

.btn-icon { width: 16px; height: 16px; flex-shrink: 0; }
.btn .btn-icon { margin-right: 2px; }

.doc-list { display: flex; flex-direction: column; gap: 14px; }
.doc-item {
  display: flex; align-items: flex-start; gap: 18px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: 0 2px 10px rgba(5, 43, 82, 0.05);
}
.doc-item-icon { width: 26px; height: 26px; color: var(--blue); flex-shrink: 0; margin-top: 3px; }
.doc-item-main { flex: 1; min-width: 0; }
.doc-item-title { font-family: var(--font-display); font-size: 19px; color: var(--navy); margin-bottom: 4px; }
.doc-item-desc { font-size: 14.5px; margin-bottom: 8px; }
.doc-item-meta { font-size: 13px; color: var(--slate); opacity: 0.85; }
.doc-item-actions { display: flex; flex-shrink: 0; gap: 10px; }
.doc-item-action { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 640px) {
  .doc-item { flex-direction: column; }
  .doc-item-actions { width: 100%; }
  .doc-item-action { flex: 1; justify-content: center; }
}

/* ---------- Version History (Build 10E) ---------- */

.vh-head-row { display: flex; justify-content: flex-end; margin-bottom: 14px; }

.doc-version-list { display: flex; flex-direction: column; gap: 12px; }
.doc-version-item {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px;
}
.doc-version-main { flex: 1; min-width: 0; }
.doc-version-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.doc-version-number { font-family: var(--font-display); font-size: 17px; color: var(--navy); }
.doc-version-meta { font-size: 13px; color: var(--slate); opacity: 0.85; }
.doc-version-notes { font-size: 14px; margin-top: 6px; }
.doc-version-actions { display: flex; flex-shrink: 0; gap: 8px; }

@media (max-width: 640px) {
  .doc-version-item { flex-direction: column; }
  .doc-version-actions { width: 100%; }
  .doc-version-actions .btn { flex: 1; justify-content: center; }
}

/* ---------- Manage Document / Archive (Build 10F) ---------- */

.manage-danger-zone {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line);
}
.manage-danger-zone h3 { font-family: var(--font-display); font-size: 17px; color: var(--navy); margin-bottom: 4px; }
.manage-danger-zone p { font-size: 14px; margin-bottom: 12px; }

.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 22px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; }
.panel h2 { font-family: var(--font-display); font-size: 22px; color: var(--navy); }
.panel .gold-rule { margin: 10px 0 16px; }
.panel-note { font-size: 14px; margin-bottom: 14px; }

.id-list { display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px; }
.id-list dt { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); }
.id-list dd { color: var(--navy); font-weight: 600; }

.data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table th, .data-table td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.data-table th { font-weight: 600; color: var(--navy); }
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

.pill { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.pill-ok { background: #e3f0e8; color: var(--green); }
.pill-restricted { background: var(--warm); color: var(--slate); }

/* ---------- module placeholder pages ---------- */

.empty-state {
  background: #fff; border: 1px dashed rgba(5, 43, 82, 0.3); border-radius: var(--radius);
  padding: 48px 32px; text-align: center; max-width: 720px;
}
.empty-state svg { width: 44px; height: 44px; color: var(--gold); margin: 0 auto 14px; }
.empty-state h2 { font-family: var(--font-display); font-size: 24px; color: var(--navy); margin-bottom: 8px; }
.empty-state p { max-width: 52ch; margin: 0 auto; }
.empty-state .card-status { margin-top: 18px; display: block; }

/* ---------- blocker (network problem while verifying) ---------- */

.portal-blocker {
  position: fixed; inset: 0; z-index: 500; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px; padding: 24px;
  background: rgba(250, 250, 247, 0.98); text-align: center; color: var(--navy); font-size: 18px;
}
.portal-blocker p { max-width: 46ch; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 960px) {
  :root { --header-h: 76px; }
  .portal-header-inner { padding: 8px 18px; gap: 12px; }
  .portal-brand img { height: 50px; }
  .portal-brand-eyebrow { display: none; }
  .portal-user-info, .role-badge { display: none; }
  .nav-toggle { display: flex; }

  .portal-body { flex-direction: column; }
  .portal-nav { width: 100%; padding: 8px 0; display: none; }
  .portal-nav.is-open { display: flex; }
  .portal-nav-user { display: block; }
  .portal-nav-note { display: none; }
  .portal-main { padding: 26px 20px 48px; }
  .page-head h1 { font-size: 30px; }
}

@media (max-width: 520px) {
  .login-card { padding: 28px 22px 32px; }
  .login-card h1 { font-size: 30px; }
  .panel { padding: 20px 18px; }
  .panel-grid { grid-template-columns: 1fr; }
  .id-list { grid-template-columns: 1fr; gap: 2px; }
  .id-list dd { margin-bottom: 10px; }
}

/* ==========================================================================
   ORGANIZATIONAL BASELINE DASHBOARD (Build 4D) — js/baseline.js
   Read-only, qualitative. Statuses are shown exactly as stored; tone colours
   are visual aids only and never imply a numerical score.
   ========================================================================== */

/* ---------- loading / error / empty states ---------- */

.baseline-state {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 44px 32px; text-align: center; max-width: 720px;
}
.baseline-state h2 { font-family: var(--font-display); font-size: 24px; color: var(--navy); margin-bottom: 8px; }
.baseline-state p { max-width: 54ch; margin: 0 auto; }
.baseline-state .btn { margin-top: 20px; }
.baseline-state.state-loading { border-style: dashed; color: var(--navy); font-size: 17px; }
.baseline-state.state-incomplete,
.baseline-state.state-error,
.baseline-state.state-auth { border-left: 5px solid var(--gold); text-align: left; }
.baseline-state.state-incomplete p,
.baseline-state.state-error p,
.baseline-state.state-auth p { margin: 0; }
.baseline-state.state-not_found { border-style: dashed; }

.baseline-spinner {
  display: block; width: 30px; height: 30px; margin: 0 auto 14px;
  border: 3px solid var(--line); border-top-color: var(--gold); border-radius: 50%;
  animation: baseline-spin 0.9s linear infinite;
}
@keyframes baseline-spin { to { transform: rotate(360deg); } }

/* ---------- current assessment banner ---------- */

.assessment-banner {
  background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--gold);
  border-radius: var(--radius); padding: 22px 26px 20px; margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(5, 43, 82, 0.05);
}
.assessment-banner h2 {
  font-family: var(--font-display); font-size: 26px; line-height: 1.25;
  color: var(--navy); margin: 4px 0 14px; overflow-wrap: anywhere;
}
.assessment-meta { display: flex; flex-wrap: wrap; gap: 14px 40px; }
.assessment-meta dt { font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.assessment-meta dd { color: var(--navy); font-weight: 600; font-size: 16.5px; }
.assessment-meta .pill { display: inline-block; margin-top: 2px; }

/* ---------- summary stats ---------- */

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.stat-card {
  --card-accent: var(--blue);
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--card-accent);
  border-radius: var(--radius); padding: 20px 22px 18px; display: flex; flex-direction: column;
  box-shadow: 0 2px 10px rgba(5, 43, 82, 0.05);
}
.stat-card.accent-blue  { --card-accent: var(--blue); }
.stat-card.accent-green { --card-accent: var(--green); }
.stat-card.accent-gold  { --card-accent: var(--gold); }
.stat-card.accent-navy  { --card-accent: var(--navy); }
.stat-value { font-family: var(--font-display); font-size: 44px; font-weight: 700; line-height: 1; color: var(--navy); font-variant-numeric: tabular-nums; }
.stat-label { margin-top: 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--slate); }

/* ---------- about panel ---------- */

.about-baseline { margin-bottom: 30px; }
.about-baseline p { max-width: 82ch; }
.about-note { margin-top: 12px; font-size: 14px; font-style: italic; color: var(--slate); opacity: 0.9; }

/* ---------- area cards ---------- */

.areas-toolbar {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 8px 20px; margin-bottom: 14px;
}
.areas-toolbar h2 { font-family: var(--font-display); font-size: 24px; color: var(--navy); }
.areas-actions { display: flex; align-items: center; gap: 10px; color: var(--slate); }

.area-list { display: flex; flex-direction: column; gap: 16px; }

.area-card {
  background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--navy);
  border-radius: var(--radius); box-shadow: 0 2px 10px rgba(5, 43, 82, 0.05);
  min-width: 0;
}
.area-card.is-open { border-left-color: var(--gold); }
.area-title { font-size: inherit; }

.area-toggle {
  width: 100%; display: flex; align-items: center; gap: 16px; text-align: left;
  padding: 18px 22px 12px; background: none; border: none; color: var(--navy);
  border-radius: var(--radius);
}
.area-toggle:hover .area-name { color: var(--blue); }
.area-toggle:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }

.area-badge {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy); color: #fff; font-family: var(--font-display); font-size: 20px; font-weight: 700;
}
.area-title-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.area-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); }
.area-name { font-family: var(--font-display); font-size: 22px; line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; }
.area-count { flex-shrink: 0; font-size: 14px; font-weight: 700; color: var(--slate); white-space: nowrap; }
.area-chevron { flex-shrink: 0; width: 22px; height: 22px; color: var(--navy); transition: transform 0.2s ease; }
.area-card.is-open .area-chevron { transform: rotate(180deg); }

.area-desc { padding: 0 22px 8px 80px; font-size: 15px; max-width: 90ch; }

.area-dist { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 4px 22px 18px 80px; }
.dist-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); }
.status-dist { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.dist-item { display: inline-flex; align-items: center; gap: 6px; }
.dist-n { font-size: 14px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }

/* ---------- status badges (tone is visual only) ---------- */

.status-badge {
  display: inline-block; max-width: 100%; padding: 3px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; line-height: 1.5; letter-spacing: 0.02em;
  border: 1px solid transparent; overflow-wrap: anywhere; white-space: normal;
}
.status-badge.tone-yes      { background: #e3f0e8; color: #1b5a37; border-color: #b9d8c6; }
.status-badge.tone-no       { background: #fbeceb; color: #8f2323; border-color: #efc4c1; }
.status-badge.tone-progress { background: #fbf1d6; color: #74540a; border-color: #ecd68f; }
.status-badge.tone-early    { background: #e9f1f9; color: #0d4f8b; border-color: #bfd6ec; }
.status-badge.tone-none     { background: #eceff2; color: #374553; border-color: #d0d6dd; }
.status-badge.tone-figure   { background: #fff; color: var(--navy); border-color: rgba(5, 43, 82, 0.35); font-variant-numeric: tabular-nums; }
.status-badge.tone-other    { background: var(--warm); color: var(--slate); border-color: #ddd8cc; }

/* ---------- expanded indicator details ---------- */

.area-panel { border-top: 1px solid var(--line); padding: 6px 22px 18px; }

.indicator-head, .indicator {
  display: grid; gap: 6px 18px; align-items: start;
  grid-template-columns: 56px minmax(0, 1.5fr) minmax(120px, 0.7fr) minmax(0, 1.2fr) minmax(0, 1.4fr);
}
.indicator-head {
  padding: 12px 0 8px; border-bottom: 2px solid var(--line);
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue);
}
.indicator { padding: 12px 0; border-bottom: 1px solid var(--line); }
.indicator:last-child { border-bottom: none; }
.ind-cell { min-width: 0; }
.ind-text { overflow-wrap: anywhere; font-size: 15px; }
.ind-strong { color: var(--navy); font-weight: 600; }
.ind-num-value { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.note-empty { color: var(--slate); opacity: 0.6; }

/* labels exist for screen readers on desktop (the header row shows them visually) */
.ind-label {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (max-width: 1100px) {
  .indicator-head { display: none; }
  .indicator {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "num text status"
      "obs obs obs"
      "gap gap gap";
  }
  .ind-num { grid-area: num; }
  .ind-indicator { grid-area: text; }
  .ind-status { grid-area: status; }
  .ind-obs { grid-area: obs; }
  .ind-gap { grid-area: gap; }
  .ind-note .ind-label {
    position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal;
    display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--blue); margin-bottom: 1px;
  }
  .ind-note { padding-left: 74px; }
}

@media (max-width: 960px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .assessment-banner { padding: 18px 18px 16px; }
  .assessment-banner h2 { font-size: 22px; }
  .stat-value { font-size: 36px; }
  .area-toggle { flex-wrap: wrap; gap: 6px 12px; padding: 16px 16px 10px; }
  .area-name { font-size: 19px; }
  .area-chevron { order: 3; }
  .area-count { order: 4; flex-basis: 100%; padding-left: 54px; }
  .area-desc, .area-dist { padding-left: 16px; padding-right: 16px; }
  .area-panel { padding: 4px 16px 14px; }
  .indicator {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "num" "text" "status" "obs" "gap";
    gap: 4px;
  }
  .ind-note { padding-left: 0; }
  .ind-status .ind-label {
    position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal;
    display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--blue); margin-bottom: 3px;
  }
}

@media (max-width: 380px) {
  .stat-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   STRATEGIC PARTNERSHIPS PIPELINE (Build 5B) — js/partnerships.js
   Read-only. Reuses the Baseline state boxes and stat cards. Tier and status
   colours are visual aids only: every badge also carries its text label.
   ========================================================================== */

.stat-card.accent-slate { --card-accent: var(--slate); }
.stat-card.accent-warm  { --card-accent: #b9b19c; }
.stat-note { margin-top: 4px; font-size: 13px; line-height: 1.35; color: var(--slate); }

.btn-secondary { background: #fff; color: var(--navy); border-color: rgba(5, 43, 82, 0.35); }
.btn-secondary:hover:not(:disabled) { background: var(--warm); border-color: var(--navy); }

.partner-note {
  background: var(--info-bg); border-left: 4px solid var(--blue); border-radius: 4px;
  padding: 14px 18px; margin-bottom: 24px; max-width: 86ch; color: var(--navy);
}
.partner-note p { font-size: 15px; line-height: 1.55; }

.partner-subhead {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--blue); margin: 4px 0 10px;
}

/* ---------- search / filters ---------- */

.partner-tools {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 24px;
}
.partner-filters { display: flex; flex-wrap: wrap; gap: 14px 16px; align-items: flex-end; }
.pf-field { flex: 1 1 170px; min-width: 0; }
.pf-field.pf-search { flex: 2 1 260px; }
.pf-field label { display: block; font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 5px; }
.pf-field input, .pf-field select {
  width: 100%; font-family: inherit; font-size: 15.5px; padding: 10px 12px; color: var(--navy);
  background: #fff; border: 1px solid rgba(5, 43, 82, 0.28); border-radius: 4px;
}
.pf-field input:focus, .pf-field select:focus { border-color: var(--blue); }
.pf-field select:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.pf-actions { flex: 0 0 auto; }
.pf-actions .btn { padding: 10px 20px; }

/* ---------- pipeline ---------- */

.pipeline-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; }
.pipeline-head h2 { font-family: var(--font-display); font-size: 26px; color: var(--navy); }
.pipeline-count { font-size: 14px; font-weight: 600; color: var(--slate); }
.partner-legend { font-size: 14px; margin: 4px 0 14px; max-width: 86ch; }

.partner-table-wrap {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(5, 43, 82, 0.05); overflow: hidden;
}
.partner-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
.partner-table thead th {
  text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--navy); background: var(--warm); padding: 12px 10px; border-bottom: 1px solid var(--line);
}
.partner-table th.col-org { padding-left: 16px; }
.partner-table tbody th, .partner-table tbody td {
  padding: 12px 10px; vertical-align: top; text-align: left; font-weight: 400;
  border-bottom: 1px solid var(--line); overflow-wrap: anywhere;
}
.partner-table tbody tr:last-child > * { border-bottom: none; }
.partner-table tbody th.cell-org { padding-left: 16px; }
.partner-table tbody tr:hover { background: rgba(241, 238, 230, 0.45); }
.partner-row.is-tier-1 > .cell-org { box-shadow: inset 4px 0 0 var(--gold); }
.org-name { font-weight: 700; color: var(--navy); font-size: 15px; line-height: 1.35; }

.col-org { width: 19%; } .col-tier { width: 8%; } .col-status { width: 14%; }
.col-pillar { width: 11%; } .col-category { width: 10%; } .col-owner { width: 9%; }
.col-contact { width: 10%; } .col-next { width: 10%; } .col-follow { width: 9%; }

.dash { color: #5b6673; }
.cell-sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--slate); }

/* tier badges: Tier 1 is the strongest; Tier 3 the quietest */
.tier-badge {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap;
  padding: 2px 9px; border-radius: 4px; border: 1.5px solid var(--navy); color: var(--navy); background: #fff;
}
.tier-badge.tier-1 { background: var(--navy); color: #fff; border-bottom: 3px solid var(--gold); }
.tier-badge.tier-2 { background: var(--info-bg); }
.tier-badge.tier-3 { border-color: rgba(55, 69, 83, 0.45); color: var(--slate); }

/* status badges, grouped by pipeline stage */
.pstatus {
  display: inline-block; white-space: nowrap; font-size: 12px; font-weight: 700; line-height: 1.3;
  padding: 3px 9px; border-radius: 999px; border: 1.5px solid transparent;
}
.pstatus.pstatus-not-contacted { background: #fff; color: var(--slate); border: 1.5px dashed #6b7785; }
.pstatus.pstatus-in-progress   { background: var(--info-bg); color: var(--navy); border-color: var(--blue); }
.pstatus.pstatus-established   { background: #e3f0e8; color: #1b5a37; border-color: var(--green); }
.pstatus.pstatus-on-hold-closed { background: var(--warm); color: var(--slate); border-color: rgba(55, 69, 83, 0.3); }
.pstatus.pstatus-other         { background: #fff; color: var(--slate); border-color: rgba(55, 69, 83, 0.3); }

.partner-filter-empty { margin: 0; }

/* ---------- responsive: stacked cards below the wide-table breakpoint ---------- */

@media (max-width: 1180px) {
  .partner-table, .partner-table tbody, .partner-table tr, .partner-table td, .partner-table th { display: block; }
  .partner-table thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .partner-table { table-layout: auto; }
  .partner-table tbody tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .partner-table tbody tr:last-child { border-bottom: none; }
  .partner-table tbody th, .partner-table tbody td { padding: 3px 0; border-bottom: none; }
  .partner-table tbody th.cell-org { padding: 0 0 8px; }
  .partner-row.is-tier-1 { box-shadow: inset 4px 0 0 var(--gold); }
  .partner-row.is-tier-1 > .cell-org { box-shadow: none; }
  .partner-table td::before {
    content: attr(data-label); display: block; font-size: 11.5px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue);
  }
  .partner-table tbody td { display: grid; grid-template-columns: 140px minmax(0, 1fr); column-gap: 12px; align-items: baseline; }
  .partner-table td::before { grid-column: 1; }
  .partner-table td > :not(:first-child) { grid-column: 2; }
  .partner-table td .cell-sub { margin-top: 0; }
}

@media (max-width: 640px) {
  .partner-tools { padding: 14px; }
  .pf-field, .pf-field.pf-search { flex: 1 1 100%; }
  .pf-actions, .pf-actions .btn { width: 100%; }
  .partner-table tbody td { grid-template-columns: 112px minmax(0, 1fr); }
  .pipeline-head h2 { font-size: 22px; }
}

@media (max-width: 1180px) {
  .partner-table td > .tier-badge, .partner-table td > .pstatus { justify-self: start; }
}
@media (max-width: 380px) {
  .partner-table tbody td { grid-template-columns: 92px minmax(0, 1fr); column-gap: 8px; }
  .pstatus { white-space: normal; }
}

/* ==========================================================================
   EDIT PARTNERSHIP (Build 5C) — js/partnerships.js
   Edit button, confirmation banner, and the accessible edit dialog.
   ========================================================================== */

html.modal-open { overflow: hidden; }

/* Edit column only exists for users who may edit: make room without widening the table. */
.partner-table.can-edit .col-org { width: 17%; }
.partner-table.can-edit .col-tier { width: 7%; }
.partner-table.can-edit .col-status { width: 13%; }
.partner-table.can-edit .col-pillar { width: 10%; }
.partner-table.can-edit .col-category { width: 9%; }
.partner-table.can-edit .col-owner { width: 9%; }
.partner-table.can-edit .col-contact { width: 10%; }
.partner-table.can-edit .col-next { width: 9%; }
.partner-table.can-edit .col-follow { width: 8%; }
.partner-table.can-edit .col-actions { width: 8%; }

.btn-edit {
  font-family: inherit; font-size: 13px; font-weight: 700; letter-spacing: 0.03em;
  padding: 4px 10px; border-radius: 4px; background: #fff; color: var(--navy); white-space: nowrap;
  border: 1.5px solid rgba(5, 43, 82, 0.4);
}
.partner-table tbody td.cell-actions { padding-left: 4px; padding-right: 6px; }
.btn-edit:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

.partner-toast {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
  padding: 12px 18px; margin-bottom: 20px; border-radius: 4px; border-left: 5px solid var(--green);
  background: #e3f0e8; color: #1b4d31; font-weight: 600;
}
.partner-toast.is-warning { border-left-color: var(--gold); background: #fbf3dc; color: var(--navy); }
.partner-toast:focus { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- dialog ---------- */

.partner-dialog {
  margin: auto; border: none; padding: 0; border-radius: 8px; color: var(--slate); background: #fff;
  width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 40px);
  box-shadow: 0 20px 60px rgba(5, 43, 82, 0.35);
}
.partner-dialog[open] { display: flex; }
.partner-dialog::backdrop { background: rgba(8, 29, 51, 0.6); }
.edit-form { display: flex; flex-direction: column; width: 100%; min-height: 0; max-height: inherit; }
.edit-head { padding: 22px 28px 14px; border-bottom: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: 8px 8px 0 0; }
.edit-head h2 { font-family: var(--font-display); font-size: 26px; line-height: 1.25; color: var(--navy); margin: 2px 0 4px; overflow-wrap: anywhere; }
.edit-sub { font-size: 14px; }
.edit-body { padding: 18px 28px 8px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.edit-foot {
  display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px 12px;
  padding: 14px 28px 18px; border-top: 1px solid var(--line); background: var(--white); border-radius: 0 0 8px 8px;
}
.edit-saving { margin-right: auto; font-weight: 600; color: var(--navy); }
.edit-foot .btn { padding: 11px 24px; }

.edit-group { border: none; margin: 0 0 18px; min-width: 0; }
.edit-group legend {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--blue); padding: 0 0 8px; margin-bottom: 2px; border-bottom: 2px solid var(--gold); width: 100%;
}
.edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; padding-top: 12px; }
.ef { min-width: 0; }
.ef.ef-wide { grid-column: 1 / -1; }
.ef label { display: block; font-size: 13.5px; font-weight: 700; color: var(--navy); margin-bottom: 5px; }
.ef-req { font-weight: 400; color: var(--slate); }
.ef input, .ef select, .ef textarea {
  width: 100%; font-family: inherit; font-size: 16px; padding: 10px 12px; color: var(--navy);
  background: #fff; border: 1px solid rgba(5, 43, 82, 0.35); border-radius: 4px;
}
.ef textarea { resize: vertical; line-height: 1.5; }
.ef input:focus, .ef select:focus, .ef textarea:focus { border-color: var(--blue); outline: 2px solid var(--blue); outline-offset: 1px; }
.ef [aria-invalid="true"] { border-color: var(--danger); background: var(--danger-bg); }
.ef input:disabled, .ef select:disabled, .ef textarea:disabled { background: var(--warm); color: var(--slate); }
.ef-error { margin-top: 4px; font-size: 13.5px; font-weight: 600; color: var(--danger); }
.ef-hint { margin-top: 4px; font-size: 13px; color: var(--slate); }

.edit-discard {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 12px 14px; margin-bottom: 18px; border-radius: 4px; border-left: 4px solid var(--gold);
  background: #fbf3dc; color: var(--navy); font-weight: 600;
}
.edit-discard-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.edit-discard .btn { padding: 8px 16px; }

@media (max-width: 1180px) {
  .partner-table td.cell-actions { display: block; padding-top: 8px; }
  .partner-table td.cell-actions::before { content: none; }
  .btn-edit { padding: 8px 18px; font-size: 14px; }
}

@media (max-width: 640px) {
  .partner-dialog { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; margin: 0; }
  .edit-head { border-radius: 0; padding: 16px 18px 12px; }
  .edit-head h2 { font-size: 22px; }
  .edit-body { padding: 14px 18px 6px; }
  .edit-foot { padding: 12px 18px 16px; border-radius: 0; }
  .edit-grid { grid-template-columns: minmax(0, 1fr); }
  .edit-foot .btn { flex: 1 1 auto; }
  .edit-saving { flex-basis: 100%; }
}

/* ==========================================================================
   ADD PARTNERSHIP (Build 5C.1) — shares the Build 5C dialog
   ========================================================================== */

.pipeline-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.btn-add { padding: 9px 20px; font-size: 14px; }
.baseline-state .btn + .btn { margin-left: 10px; }

@media (max-width: 640px) {
  .pipeline-head-actions { width: 100%; justify-content: space-between; }
  .btn-add { width: 100%; }
}

/* ==========================================================================
   ARCHIVE & RESTORE PARTNERSHIPS (Build 5C.2) — js/partnerships.js
   View toggle, archived-view notice and layout, Restore button, archive zone
   in the edit dialog, and the shared confirmation dialog.
   ========================================================================== */

.view-toggle { display: inline-flex; flex-wrap: wrap; gap: 0; margin: 10px 0 14px; border: 1.5px solid rgba(5, 43, 82, 0.4); border-radius: 6px; overflow: hidden; background: #fff; max-width: 100%; }
.view-btn {
  font-family: inherit; font-size: 14.5px; font-weight: 700; color: var(--navy); background: #fff;
  padding: 9px 18px; border: none; border-radius: 0; cursor: pointer;
}
.view-btn + .view-btn { border-left: 1.5px solid rgba(5, 43, 82, 0.4); }
.view-btn:hover { background: var(--warm); }
.view-btn.is-active, .view-btn.is-active:hover { background: var(--navy); color: #fff; }
.view-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.view-count { font-weight: 400; opacity: 0.85; }

.archived-note {
  margin: 0 0 14px; padding: 12px 16px; border-radius: 4px; border-left: 5px solid var(--slate);
  background: var(--warm); color: var(--navy);
}
.archived-note p { font-size: 15px; line-height: 1.55; max-width: 86ch; }

/* Archived view shows the identifying columns only. */
.partner-table.is-archived .col-contact, .partner-table.is-archived .cell-contact,
.partner-table.is-archived .col-next, .partner-table.is-archived .cell-next,
.partner-table.is-archived .col-follow, .partner-table.is-archived .cell-follow { display: none; }
.partner-table.is-archived .col-org { width: 26%; }
.partner-table.is-archived .col-tier { width: 10%; }
.partner-table.is-archived .col-status { width: 18%; }
.partner-table.is-archived .col-pillar { width: 17%; }
.partner-table.is-archived .col-category { width: 15%; }
.partner-table.is-archived .col-owner { width: 14%; }
.partner-table.is-archived.has-restore .col-org { width: 22%; }
.partner-table.is-archived.has-restore .col-tier { width: 8%; }
.partner-table.is-archived.has-restore .col-status { width: 16%; }
.partner-table.is-archived.has-restore .col-pillar { width: 15%; }
.partner-table.is-archived.has-restore .col-category { width: 13%; }
.partner-table.is-archived.has-restore .col-owner { width: 12%; }
.partner-table.is-archived.has-restore .col-actions { width: 14%; }
.partner-table.is-archived .partner-row { background: rgba(241, 238, 230, 0.35); }

.btn-restore {
  font-family: inherit; font-size: 13px; font-weight: 700; letter-spacing: 0.03em; white-space: nowrap;
  padding: 5px 12px; border-radius: 4px; background: #fff; color: var(--green);
  border: 1.5px solid var(--green); cursor: pointer;
}
.btn-restore:hover { background: var(--green); color: #fff; }
.btn-restore:focus-visible, .btn-danger:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.btn-danger {
  background: #fff; color: var(--danger); border: 1.5px solid var(--danger); font-weight: 700; cursor: pointer;
}
.btn-danger:hover:not(:disabled) { background: var(--danger); color: #fff; }
.btn-danger:disabled { opacity: 0.55; cursor: not-allowed; }

.archive-zone {
  margin: 8px 0 16px; padding: 16px 18px; border: 1px solid rgba(161, 42, 42, 0.35); border-radius: 6px;
  background: #fff;
}
.archive-zone h3 { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--danger); margin-bottom: 6px; }
.archive-zone p { font-size: 14.5px; margin-bottom: 12px; max-width: 70ch; }
.archive-zone .btn { padding: 9px 20px; }

.confirm-dialog {
  margin: auto; border: none; padding: 0; border-radius: 8px; color: var(--slate); background: #fff;
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 40px);
  box-shadow: 0 20px 60px rgba(5, 43, 82, 0.4);
}
.confirm-dialog::backdrop { background: rgba(8, 29, 51, 0.65); }
.confirm-inner { padding: 24px 28px 22px; border-top: 4px solid var(--gold); border-radius: 8px; }
.confirm-inner h2 { font-family: var(--font-display); font-size: 24px; line-height: 1.25; color: var(--navy); margin-bottom: 10px; }
.confirm-org { font-weight: 700; color: var(--navy); font-size: 17px; margin-bottom: 8px; overflow-wrap: anywhere; }
.confirm-inner p { line-height: 1.55; }
.confirm-note { margin-top: 12px; padding: 10px 12px; border-radius: 4px; border-left: 4px solid var(--gold); background: #fbf3dc; color: var(--navy); font-weight: 600; font-size: 14.5px; }
.confirm-inner .form-message { margin-top: 12px; }
.confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 12px; margin-top: 20px; }
.confirm-actions .btn { padding: 11px 22px; }

@media (max-width: 1180px) {
  .btn-restore { padding: 8px 18px; font-size: 14px; }
}
@media (max-width: 640px) {
  .view-toggle { display: flex; width: 100%; }
  .view-btn { flex: 1 1 50%; padding: 10px 8px; font-size: 14px; }
  .confirm-dialog { width: calc(100vw - 24px); }
  .confirm-inner { padding: 18px 18px 16px; }
  .confirm-actions .btn { flex: 1 1 auto; }
}

/* ==========================================================================
   PARTNERSHIP DETAIL + ACTIVITY HISTORY (Build 5D) — js/partnerships.js
   Organization link, detail dialog, activity timeline, Log Activity form.
   ========================================================================== */

.org-link {
  font: inherit; font-weight: 700; font-size: 15px; line-height: 1.35; color: var(--navy);
  background: none; border: none; padding: 0; margin: 0; text-align: left; cursor: pointer;
  text-decoration: underline; text-decoration-color: rgba(18, 103, 178, 0.45); text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.org-link:hover { color: var(--blue); text-decoration-color: var(--blue); }
.org-link:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 2px; }

.detail-dialog { width: min(900px, calc(100vw - 32px)); }
.detail-titlerow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.detail-titlerow h2:focus { outline: none; }
.detail-badge {
  display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; background: var(--slate); color: #fff; white-space: nowrap;
}
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 12px; }
.detail-actions .btn { padding: 8px 18px; font-size: 14.5px; }
.detail-actions .btn[hidden] { display: none; }
.btn-restore-lg { color: var(--green); border-color: var(--green); }
.btn-restore-lg:hover:not(:disabled) { background: var(--green); color: #fff; border-color: var(--green); }
.detail-body { padding-top: 16px; }
.detail-body .archived-note { margin-bottom: 18px; }

.detail-group { margin: 0 0 18px; min-width: 0; }
.detail-group h3, .activity-head h3 {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--blue); padding: 0 0 8px; border-bottom: 2px solid var(--gold);
}
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; padding-top: 12px; }
.detail-item { min-width: 0; }
.detail-item.is-wide { grid-column: 1 / -1; }
.detail-item dt, .act-field dt {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); margin-bottom: 2px;
}
.detail-item dd, .act-field dd { color: var(--navy); font-size: 15.5px; line-height: 1.5; overflow-wrap: anywhere; }
.detail-item dd.is-long, .act-field.is-long dd { white-space: pre-wrap; }
.detail-item .dash, .act-field .dash { color: var(--slate); }

.detail-state {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 16px; margin: 12px 0;
  border-radius: 4px; background: var(--warm); color: var(--navy);
}
.detail-state.is-error { background: var(--danger-bg); color: var(--danger); border-left: 4px solid var(--danger); }
.detail-state.is-empty { border-left: 4px solid var(--gold); font-weight: 600; }
.detail-state .btn { padding: 7px 16px; font-size: 14px; }

/* activity */
.activity-section { margin-top: 26px; }
.activity-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; border-bottom: 2px solid var(--gold); margin-bottom: 8px; }
.activity-head h3 { border-bottom: none; padding-bottom: 8px; }
.activity-head .btn { margin-bottom: 8px; }
.activity-head .btn[hidden] { display: none; }
.activity-intro { font-size: 14px; margin: 6px 0 14px; max-width: 80ch; }
.act-note { font-size: 13.5px; color: var(--slate); margin-bottom: 8px; }

.activity-list { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 3px solid rgba(5, 43, 82, 0.18); }
.act-item { position: relative; padding: 0 0 20px 18px; }
.act-item:last-child { padding-bottom: 6px; }
.act-item::before {
  content: ""; position: absolute; left: -27px; top: 5px; width: 13px; height: 13px; border-radius: 50%;
  background: #fff; border: 3px solid var(--blue);
}
.act-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; color: var(--navy); }
.act-date { font-weight: 700; font-size: 15.5px; white-space: nowrap; }
.act-sep { color: var(--slate); }
.act-type {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue);
  background: var(--info-bg); padding: 2px 9px; border-radius: 3px;
}
.act-subject { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.act-subject.is-empty { font-weight: 400; color: var(--slate); }
.act-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 20px; margin-top: 8px; padding: 12px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 4px; }
.act-field { min-width: 0; }
.act-field.is-wide { grid-column: 1 / -1; }

/* Log Activity form */
.log-panel { margin: 0 0 20px; padding: 16px 18px 14px; background: var(--warm); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 4px; }
.log-panel h4 { font-family: var(--font-display); font-size: 20px; color: var(--navy); margin-bottom: 4px; }
.log-panel .ef-hint { margin: 0 0 12px; max-width: 80ch; }
.log-panel .form-message { margin-bottom: 12px; }
.log-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px 12px; margin-top: 16px; }
.log-actions .btn { padding: 10px 22px; }
.log-actions .edit-saving { margin-right: auto; }
.log-panel[hidden] { display: none; }

@media (max-width: 900px) {
  .act-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .detail-dialog { width: 100vw; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .act-fields { grid-template-columns: minmax(0, 1fr); }
  .activity-list { padding-left: 12px; }
  .act-item { padding-left: 14px; }
  .act-item::before { left: -21px; }
  .activity-head .btn { width: 100%; }
  .detail-actions .btn { flex: 1 1 auto; }
  .log-panel { padding: 14px; }
  .log-actions .btn { flex: 1 1 auto; }
  .log-actions .edit-saving { flex-basis: 100%; }
}

/* =====================================================================
   BASELINE ASSESSMENT MANAGEMENT
   ===================================================================== */
.bl-toast { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 18px; padding: 12px 16px; border-radius: 4px; border: 1px solid var(--line); border-left: 4px solid var(--blue); background: var(--info-bg); color: var(--slate); font-size: 15px; line-height: 1.5; }
.bl-toast:focus { outline: 3px solid var(--gold); outline-offset: 2px; }
.bl-toast.is-success { border-left-color: var(--green); background: #eaf5ee; }
.bl-toast.is-warning { border-left-color: var(--gold); background: #fbf3dc; }
.bl-toast.is-error { border-left-color: var(--danger); background: var(--danger-bg); }
.bl-toast p { flex: 1 1 auto; margin: 0; }
.bl-toast button { flex: 0 0 auto; background: none; border: 0; color: var(--navy); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 2px 4px; }
.bl-toast button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.assess-actions { margin: 0 0 24px; padding: 18px 20px; background: var(--warm); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 4px; }
.assess-actions-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.assess-actions-head h3 { font-family: var(--font-display); font-size: 22px; color: var(--navy); }
.progress-list { display: grid; gap: 12px; margin-top: 14px; }
.progress-list:empty { display: none; }
.progress-card { padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 4px; }
.progress-card h4 { font-family: var(--font-display); font-size: 19px; color: var(--navy); margin-bottom: 4px; }
.progress-card progress { width: 100%; margin: 8px 0; }
.progress-meta { color: var(--slate); font-size: 14px; }
.progress-count { font-weight: 600; color: var(--navy); }
.progress-card .btn { margin-top: 8px; padding: 10px 22px; }

.assessment-lock-note { margin-top: 8px; font-size: 14px; color: var(--slate); }
.assessment-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.editor-head { margin: 0 0 18px; }
.editor-head h2 { font-family: var(--font-display); font-size: 28px; color: var(--navy); }
.editor-sub, .editor-note { color: var(--slate); font-size: 15px; max-width: 80ch; margin-top: 4px; }
.editor-progress { margin: 14px 0; }
.editor-progress-text { font-weight: 600; color: var(--navy); margin-bottom: 6px; }
progress.editor-bar, .progress-card progress { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 12px; border: 0; border-radius: 6px; background: #dfe5ea; overflow: hidden; }
progress.editor-bar::-webkit-progress-bar, .progress-card progress::-webkit-progress-bar { background: #dfe5ea; border-radius: 6px; }
progress.editor-bar::-webkit-progress-value, .progress-card progress::-webkit-progress-value { background: var(--blue); border-radius: 6px; }
progress.editor-bar::-moz-progress-bar, .progress-card progress::-moz-progress-bar { background: var(--blue); border-radius: 6px; }
.editor-details { margin: 14px 0; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.editor-details > summary { padding: 12px 16px; font-weight: 600; color: var(--navy); cursor: pointer; }
.editor-details > summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.editor-details[open] > summary { border-bottom: 1px solid var(--line); }
.editor-details .bl-grid { padding: 16px; }

.bl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.bl-field { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bl-field.bl-wide { grid-column: 1 / -1; }
.bl-field label { font-weight: 600; color: var(--navy); font-size: 14px; }
.bl-field input, .bl-field select, .bl-field textarea { width: 100%; font: inherit; font-size: 15px; color: var(--slate); padding: 9px 11px; background: #fff; border: 1px solid rgba(5, 43, 82, 0.35); border-radius: var(--radius); }
.bl-field textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.bl-field input:focus-visible, .bl-field select:focus-visible, .bl-field textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; border-color: var(--navy); }
.bl-field [aria-invalid="true"] { border-color: var(--danger); background: var(--danger-bg); }
.bl-req { color: var(--danger); }
.bl-error { color: var(--danger); font-size: 13px; min-height: 0; }
.bl-error:empty { display: none; }

.editor-issues { margin: 14px 0; padding: 12px 16px; background: var(--danger-bg); border: 1px solid var(--danger); border-left-width: 4px; border-radius: 4px; color: var(--slate); }
.editor-issues:focus { outline: 3px solid var(--gold); outline-offset: 2px; }
.editor-issues-list { margin: 8px 0 0; padding-left: 20px; }
.editor-issues-list li { margin: 3px 0; }
.editor-issues-list button, .editor-issues-more { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; cursor: pointer; text-align: left; }
.editor-issues-list button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.editor-bar-actions { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px 12px; margin-top: 24px; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 4px; box-shadow: 0 -4px 14px rgba(5, 43, 82, 0.08); }
.editor-bar-actions .btn { padding: 10px 20px; }
.editor-saving { margin-right: auto; color: var(--slate); font-size: 14px; }
.editor-reload { margin-left: 10px; }

.bl-items { display: grid; gap: 14px; }
.bl-item { padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.bl-item-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 12px; margin-bottom: 10px; }
.bl-item-num { font-weight: 700; color: var(--blue); min-width: 3.2ch; }
.bl-item-text { flex: 1 1 260px; font-weight: 600; color: var(--navy); min-width: 0; overflow-wrap: anywhere; }
.bl-item-grid { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr) minmax(0, 2fr); gap: 12px 16px; }
.bl-flag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--warm); color: var(--slate); border: 1px solid var(--line); }
.bl-flag.is-done { background: #eaf5ee; color: var(--green); border-color: rgba(36, 116, 71, 0.4); }

.history-panel { margin-top: 32px; }
.history-items { display: grid; gap: 10px; list-style: none; padding: 0; }
.history-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.history-item.is-selected { border-color: var(--blue); border-left: 4px solid var(--blue); }
.history-main { min-width: 0; flex: 1 1 280px; }
.history-name { font-weight: 700; color: var(--navy); overflow-wrap: anywhere; }
.history-tag { display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #fbf3dc; color: var(--navy); border: 1px solid var(--gold); }
.history-meta { margin-top: 3px; color: var(--slate); font-size: 14px; }
.history-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.history-actions .btn { padding: 8px 16px; font-size: 14px; }
.history-current { font-size: 14px; font-weight: 600; color: var(--green); }

.compare-legend { color: var(--slate); font-size: 14px; margin: 6px 0 14px; max-width: 80ch; }
.compare-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.compare-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0; }
.compare-filter-label { font-weight: 600; color: var(--navy); }
.compare-filter select { font: inherit; padding: 8px 10px; border: 1px solid rgba(5, 43, 82, 0.35); border-radius: var(--radius); background: #fff; }
.compare-filter select:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
.cmp-items { display: grid; gap: 12px; }
.cmp-item { padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 4px; }
.cmp-item.cmp-changed { border-left-color: var(--blue); }
.cmp-item.cmp-unchanged { border-left-color: #b9c2ca; }
.cmp-item.cmp-new { border-left-color: var(--green); }
.cmp-item.cmp-none { border-left-color: var(--gold); }
.cmp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-bottom: 8px; }
.cmp-num { font-weight: 700; color: var(--blue); }
.cmp-dash { color: var(--slate); }
.cmp-name { font-weight: 600; color: var(--navy); flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.cmp-tag, .cmp-changed-tag { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--warm); color: var(--navy); border: 1px solid var(--line); }
.cmp-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cmp-col { min-width: 0; padding: 10px 12px; background: var(--white); border: 1px solid var(--line); border-radius: 4px; }
.cmp-col-title { font-weight: 700; color: var(--navy); font-size: 14px; margin-bottom: 6px; }
.cmp-fields { display: grid; gap: 6px; margin: 0; }
.cmp-field { min-width: 0; }
.cmp-text { overflow-wrap: anywhere; white-space: pre-wrap; }
.cmp-notassessed { color: var(--slate); font-style: italic; }
.cmp-none-match { padding: 14px; color: var(--slate); background: var(--warm); border-radius: 4px; }

.bl-dialog { margin: auto; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 1px solid var(--navy); border-top: 5px solid var(--gold); border-radius: 6px; background: #fff; color: var(--slate); overflow: auto; }
.bl-dialog::backdrop { background: rgba(5, 43, 82, 0.55); }
.bl-dialog-inner { padding: 22px 24px; }
.bl-dialog-inner h2 { font-family: var(--font-display); font-size: 24px; color: var(--navy); margin-bottom: 6px; }
.bl-dialog-sub, .bl-dialog-note { color: var(--slate); font-size: 14px; margin-bottom: 12px; }
.bl-dialog-org { font-weight: 600; color: var(--navy); }
.bl-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.bl-dialog-actions .btn { padding: 10px 22px; }

@media (max-width: 1180px) {
  .bl-item-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .bl-item-grid .bl-field:first-child { grid-column: 1 / -1; }
  .compare-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .bl-grid, .bl-item-grid, .cmp-cols { grid-template-columns: minmax(0, 1fr); }
  .compare-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-head h2 { font-size: 23px; }
  .editor-bar-actions { justify-content: stretch; }
  .editor-bar-actions .btn { flex: 1 1 auto; }
  .editor-saving { flex-basis: 100%; }
  .history-actions, .history-actions .btn { width: 100%; }
  .bl-dialog-inner { padding: 18px; }
  .bl-dialog-actions .btn { flex: 1 1 auto; }
  .assess-actions-head .btn { width: 100%; }
}
@media (max-width: 380px) {
  .compare-summary { grid-template-columns: minmax(0, 1fr); }
}
#compare-view .areas-actions { flex-wrap: wrap; min-width: 0; }
select.compare-filter { max-width: 100%; }

/* ==========================================================================
   GRANTS & RESOURCE OPPORTUNITIES (Build 6B) — js/grants.js
   Read-only tracker. Reuses the Partnerships table, filters, stat cards,
   status badges and detail dialog; this block only adds what is grant-specific:
   a five-card summary row, column widths, and type / pillar badges. Every
   badge also carries its text label, so colour is never the only signal.
   ========================================================================== */

/* Five summary cards (Total, Cash, In-Kind, Technology, Other) */
.stat-grid.stat-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.stat-grid-5 .stat-card { padding: 18px 18px 16px; }
.stat-grid-5 .stat-label { line-height: 1.3; }
@media (max-width: 1100px) {
  .stat-grid.stat-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .stat-grid.stat-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .stat-grid.stat-grid-5 { grid-template-columns: minmax(0, 1fr); }
}

/* Table columns (wide layout; the shared stacked-card layout takes over at 1180px) */
.grant-table .col-g-org      { width: 15%; }
.grant-table .col-g-opp      { width: 18%; }
.grant-table .col-g-type     { width: 13%; }
.grant-table .col-g-status   { width: 11%; }
.grant-table .col-g-amount   { width: 9%; }
.grant-table .col-g-pillar   { width: 15%; }
.grant-table .col-g-deadline { width: 9%; }
.grant-table .col-g-follow   { width: 10%; }
.grant-table .cell-amount { font-variant-numeric: tabular-nums; }
.grant-table .opp-link { font-weight: 600; }

/* Opportunity type badges */
.gtype {
  display: inline-block; font-size: 12px; font-weight: 700; line-height: 1.3;
  padding: 3px 9px; border-radius: 4px; border: 1.5px solid transparent;
}
.gtype.gtype-cash   { background: #fbf3dc; color: var(--navy); border-color: var(--gold); }
.gtype.gtype-inkind { background: #e3f0e8; color: #1b5a37; border-color: var(--green); }
.gtype.gtype-tech   { background: var(--info-bg); color: var(--navy); border-color: var(--blue); }
.gtype.gtype-other  { background: var(--warm); color: var(--slate); border-color: rgba(55, 69, 83, 0.35); }

/* Pathways pillar badges (Unassigned is quiet and dashed) */
.gpillar {
  display: inline-block; font-size: 12px; font-weight: 600; line-height: 1.3;
  padding: 2px 8px; border-radius: 4px; border: 1.5px solid rgba(5, 43, 82, 0.35);
  background: #fff; color: var(--navy);
}
.gpillar.gpillar-service    { background: var(--info-bg); border-color: var(--navy); }
.gpillar.gpillar-stability  { background: #e3f0e8; color: #1b5a37; border-color: var(--green); }
.gpillar.gpillar-leadership { background: #fbf3dc; border-color: var(--gold); }
.gpillar.gpillar-multiple   { background: #fff; border-color: rgba(5, 43, 82, 0.5); }
.gpillar.is-unassigned      { color: var(--slate); font-weight: 400; border-style: dashed; border-color: rgba(55, 69, 83, 0.45); }

/* External links inside the detail dialog */
.detail-item dd a.ext-link {
  color: var(--blue); font-weight: 600; text-decoration: underline;
  text-decoration-color: rgba(18, 103, 178, 0.45); text-underline-offset: 3px; overflow-wrap: anywhere;
}
.detail-item dd a.ext-link:hover { color: var(--navy); text-decoration-color: var(--navy); }

@media (max-width: 1180px) {
  .grant-table td > .gtype, .grant-table td > .gpillar { justify-self: start; }
}

/* ==========================================================================
   GRANTS — ADD / EDIT / ARCHIVE / RESTORE (Build 6C) — js/grants.js
   Reuses the Partnerships dialog, form, toggle, banner and confirmation styles.
   Only what is new for Grants is defined here.
   ========================================================================== */

/* Rolling checkbox row in the opportunity form */
.ef.ef-check .check-row {
  display: flex; align-items: center; gap: 10px; margin: 2px 0 0;
  font-size: 15px; font-weight: 700; color: var(--navy); cursor: pointer;
}
.ef.ef-check input[type="checkbox"] { width: 20px; height: 20px; flex: none; padding: 0; margin: 0; accent-color: var(--navy); }

/* Archived view: quiet shading, same columns as the active view */
.grant-table.grant-archived .partner-row { background: rgba(241, 238, 230, 0.35); }

/* Banner (success / conflict / no longer available) inside the detail dialog */
.detail-body .partner-toast { margin-bottom: 16px; }

/* ==========================================================================
   GRANTS — APPLICATIONS & ACTIVITY HISTORY (Build 6D) — js/grants.js
   Sections inside the Opportunity Detail dialog. The form, banner, badge and
   detail-grid styles are reused from earlier builds.
   ========================================================================== */

.btn-sm { padding: 7px 16px; font-size: 14px; }

.rel-section { margin: 4px 0 24px; min-width: 0; }
.rel-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px;
  padding-bottom: 8px; border-bottom: 2px solid var(--gold);
}
.rel-head h3 { font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); margin: 0; }
.rel-head .btn[hidden] { display: none; }
.rel-note { padding: 14px 0 4px; color: var(--slate); }
.rel-note p { margin: 0 0 10px; }

.app-card { margin-top: 14px; padding: 14px 16px 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; min-width: 0; }
.app-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.app-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.app-card-label { font-weight: 700; color: var(--navy); }
.app-card .detail-grid { padding-top: 10px; }
.app-card .detail-item { padding-bottom: 6px; }

.gact-list { list-style: none; margin: 0; padding: 0; }
.gact-item { margin-top: 14px; padding: 4px 0 4px 14px; border-left: 3px solid var(--gold); min-width: 0; }
.gact-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.gact-date { font-weight: 700; color: var(--navy); }
.gact-type {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: var(--warm); color: var(--navy); border: 1px solid rgba(5, 43, 82, 0.25);
}
.gact-subject { font-weight: 700; overflow-wrap: anywhere; }
.gact-notes { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.gact-meta { display: flex; flex-wrap: wrap; gap: 2px 20px; margin-top: 6px; font-size: 14px; }
.gact-meta-item { overflow-wrap: anywhere; }

/* Banner stays visible while the detail dialog scrolls, so a save result is never off-screen. */
.detail-body .partner-toast { position: sticky; top: 0; z-index: 2; box-shadow: 0 -20px 0 0 #fff; }
.partner-toast .btn-sm { margin-left: auto; }

@media (max-width: 640px) {
  .app-card { padding: 12px 12px 4px; }
  .rel-head .btn { width: 100%; }
  .app-card-head .btn { width: 100%; }
}

/* ==========================================================================
   EXECUTIVE DASHBOARD — GRANTS & RESOURCES SNAPSHOT (Build 6E) — js/dashboard.js
   Reuses the dashboard's .stat-grid / .stat-card / .panel / .panel-grid / .gold-rule /
   .card-link patterns. Only the list styling for the two panels is new.
   ========================================================================== */

.grants-dash { margin: 0 0 30px; }
.grants-dash-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 20px; }
.grants-dash-head h2 { font-family: var(--font-display); font-size: 24px; color: var(--navy); margin: 0; }
.grants-dash-head .gold-rule { margin: 10px 0 12px; }
.grants-dash-head .card-link { margin-top: 4px; }
.grants-dash-status { margin: 0 0 16px; padding: 12px 16px; border-radius: 4px; border-left: 5px solid var(--gold); background: #fbf3dc; color: var(--navy); font-weight: 600; }
.grants-dash-status[hidden] { display: none; }
.grants-dash .stat-grid { margin-bottom: 22px; }

.gdash-list { list-style: none; margin: 0; padding: 0; }
.gdash-item { padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.gdash-item:first-child { padding-top: 0; }
.gdash-item:last-child { border-bottom: none; padding-bottom: 2px; }
.gdash-item.is-overdue { border-left: 4px solid var(--danger); padding-left: 12px; margin-left: -2px; }
.gdash-link { color: var(--navy); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(18, 103, 178, 0.45); text-underline-offset: 3px; overflow-wrap: anywhere; }
.gdash-link:hover { color: var(--blue); text-decoration-color: var(--blue); }
.gdash-link:focus-visible, .gdash-more .card-link:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
.gdash-opp { font-weight: 600; }
.gdash-action { margin: 4px 0 0; font-size: 15px; overflow-wrap: anywhere; }
.gdash-by { margin: 2px 0 0; font-size: 14px; color: var(--slate); }
.gdash-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 6px 0 0; font-size: 14px; }
.gdash-meta-top { margin: 0 0 4px; }
.gdash-date { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.gdash-badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--warm); color: var(--navy); border: 1px solid rgba(5, 43, 82, 0.25);
}
.gdash-badge-overdue { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); text-transform: uppercase; letter-spacing: 0.06em; }
.gdash-badge-type { background: var(--info-bg); color: var(--blue); border-color: rgba(18, 103, 178, 0.35); }
.gdash-more { margin-top: 12px; margin-bottom: 0; }

@media (max-width: 640px) {
  .grants-dash-head h2 { font-size: 21px; }
}

/* ==========================================================================
   EXECUTIVE DASHBOARD — STRATEGIC PARTNERSHIPS SNAPSHOT (Build 5E) — js/dashboard.js
   Same layout as the Grants snapshot; the .gdash-* list styles are shared.
   ========================================================================== */

.partners-dash { margin: 0 0 30px; }
.partners-dash-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 20px; }
.partners-dash-head h2 { font-family: var(--font-display); font-size: 24px; color: var(--navy); margin: 0; }
.partners-dash-head .gold-rule { margin: 10px 0 12px; }
.partners-dash-head .card-link { margin-top: 4px; }
.partners-dash-status { margin: 0 0 16px; padding: 12px 16px; border-radius: 4px; border-left: 5px solid var(--gold); background: #fbf3dc; color: var(--navy); font-weight: 600; }
.partners-dash-status[hidden] { display: none; }
.partners-dash .stat-grid { margin-bottom: 22px; }

@media (max-width: 640px) {
  .partners-dash-head h2 { font-size: 21px; }
}

/* ==========================================================================
   BOARD ACTIONS — READ-ONLY TRACKER (Build 8B) — js/board-actions.js
   Reuses the Partnerships / Grants table, filter, badge and dialog styles.
   Only what is new for Board Actions is defined here.
   ========================================================================== */

.ba-count-note { margin: -8px 0 22px; font-size: 14px; color: var(--slate); }

/* Empty state (no Board Action recorded yet) */
.ba-empty { margin-top: 8px; }

/* Table column widths (wide layout) */
.ba-table .col-ba-action { width: 27%; }
.ba-table .col-ba-type   { width: 16%; }
.ba-table .col-ba-date   { width: 11%; }
.ba-table .col-ba-status { width: 11%; }
.ba-table .col-ba-prio   { width: 9%; }
.ba-table .col-ba-owner  { width: 13%; }
.ba-table .col-ba-due    { width: 13%; }
.ba-table .org-link { font-weight: 600; text-align: left; }
.ba-sub { display: block; margin-top: 3px; font-size: 13px; color: var(--slate); overflow-wrap: anywhere; }
.ba-dates { display: flex; flex-direction: column; gap: 6px; }
.ba-date-line { display: block; }
.ba-date-label {
  display: block; font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue);
}
.ba-table .dash { color: var(--slate); }

/* Action type: one neutral badge (the type describes the record; it is not a rating) */
.btype {
  display: inline-block; font-size: 12px; font-weight: 700; line-height: 1.3;
  padding: 3px 9px; border-radius: 4px; border: 1.5px solid rgba(5, 43, 82, 0.35);
  background: #fff; color: var(--navy);
}

/* Priority: administrative follow-through only. Normal is quiet; High and Urgent are emphasized, not judged. */
.bprio {
  display: inline-block; font-size: 12px; font-weight: 700; line-height: 1.3;
  padding: 3px 9px; border-radius: 4px; border: 1.5px solid transparent;
}
.bprio.bprio-normal { background: #fff; color: var(--slate); border-color: rgba(55, 69, 83, 0.35); font-weight: 600; }
.bprio.bprio-high   { background: #fbf3dc; color: var(--navy); border-color: var(--gold); }
.bprio.bprio-urgent { background: var(--navy); color: #fff; border-color: var(--navy); }
.bprio.bprio-other  { background: #fff; color: var(--slate); border-color: rgba(55, 69, 83, 0.35); }

.ba-table td > .btype, .ba-table td > .bprio { justify-self: start; }
.ba-table td > .pstatus { justify-self: start; }

/* Detail dialog: short explanatory line under each group heading */
.detail-intro { margin: 8px 0 0; font-size: 14px; color: var(--slate); max-width: 70ch; }

/* Archived history (collapsed until opened) */
.ba-archive { margin-top: 34px; border-top: 2px solid var(--line); padding-top: 10px; }
.ba-archive-title { font-family: inherit; font-size: inherit; margin: 0; }
.ba-archive-toggle {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--navy);
  background: none; border: none; padding: 10px 2px; cursor: pointer;
}
.ba-archive-toggle:hover { color: var(--blue); }
.ba-archive-toggle:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 3px; }
.ba-archive-caret {
  flex: none; width: 0; height: 0; border-left: 7px solid currentColor;
  border-top: 5px solid transparent; border-bottom: 5px solid transparent; transition: transform 0.15s;
}
.ba-archive.is-open .ba-archive-caret { transform: rotate(90deg); }
.ba-archive .archived-note { margin: 8px 0 14px; }
.ba-archive-none { padding: 10px 2px; color: var(--slate); }
.ba-table.ba-archived .partner-row { background: rgba(241, 238, 230, 0.35); }
@media (prefers-reduced-motion: reduce) { .ba-archive-caret { transition: none; } }

/* ==========================================================================
   BOARD ACTIONS — ADD / EDIT / ARCHIVE / RESTORE (Build 8C) — js/board-actions.js
   Reuses the Partnerships / Grants dialog, form, banner and confirmation styles.
   ========================================================================== */
.ba-toolbar { display: flex; justify-content: flex-end; margin: 0 0 14px; }
.ba-toolbar[hidden], .ba-toolbar:empty { display: none; }
.ba-toolbar .btn-add[hidden] { display: none; }
.ba-toolbar:has(.btn-add[hidden]) { display: none; }
@media (max-width: 640px) { .ba-toolbar { justify-content: stretch; } }

/* ==========================================================================
   BOARD ACTIONS — EXECUTIVE DASHBOARD SNAPSHOT (Build 8E) — js/dashboard.js
   Same layout as the Grants and Partnerships snapshots; the .gdash-* list styles are shared.
   ========================================================================== */
.board-dash { margin: 0 0 30px; }
.board-dash-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 20px; }
.board-dash-head h2 { font-family: var(--font-display); font-size: 24px; color: var(--navy); margin: 0; }
.board-dash-head .gold-rule { margin: 10px 0 12px; }
.board-dash-head .card-link { margin-top: 4px; }
.board-dash-status { margin: 0 0 16px; padding: 12px 16px; border-radius: 4px; border-left: 5px solid var(--gold); background: #fbf3dc; color: var(--navy); font-weight: 600; }
.board-dash-status[hidden] { display: none; }
.board-dash .stat-grid { margin-bottom: 10px; }
.board-dash-foot { margin: 0 0 22px; font-size: 14px; color: var(--slate); }
.gdash-badge-urgent { background: var(--navy); color: #fff; border-color: var(--navy); }
@media (max-width: 640px) {
  .board-dash-head h2 { font-size: 21px; }
}

/* ==========================================================================
   PROGRAMS — PROGRAM READINESS (Build 7B) — js/programs.js
   Colour marks READINESS STATUS only (gray / yellow / green / red). It never
   colours a whole card or page and is never an overall score. Program status
   and launch level are stored values and are shown in neutral navy / gold.
   ========================================================================== */
:root {
  --rd-gray: #5a6673;      --rd-gray-bg: #eef0f2;    --rd-gray-line: #a9b1ba;
  --rd-yellow: #6f5200;    --rd-yellow-bg: #fbf3dc;  --rd-yellow-line: #d9a321;
  --rd-green: #1b5a37;     --rd-green-bg: #e3f0e8;   --rd-green-line: #247447;
  --rd-red: #a12a2a;       --rd-red-bg: #fbeceb;     --rd-red-line: #a12a2a;
}
.stat-card.accent-red { --card-accent: var(--rd-red); }

.rd-warn {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 20px; padding: 12px 16px;
  border-radius: 4px; border-left: 5px solid var(--gold); background: #fbf3dc; color: var(--navy); font-weight: 600;
}
.rd-warn p { margin: 0; flex: 1 1 320px; }
.rd-warn[hidden] { display: none; }

/* ----- status badges ----- */
.rd-status {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; border: 1.5px solid; line-height: 1.5;
}
.rd-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.rd-tone-gray    { background: var(--rd-gray-bg);   color: var(--rd-gray);   border-color: var(--rd-gray-line); }
.rd-tone-yellow  { background: var(--rd-yellow-bg); color: var(--rd-yellow); border-color: var(--rd-yellow-line); }
.rd-tone-green   { background: var(--rd-green-bg);  color: var(--rd-green);  border-color: var(--rd-green-line); }
.rd-tone-red     { background: var(--rd-red-bg);    color: var(--rd-red);    border-color: var(--rd-red-line); }
.rd-tone-na      { background: #fff;                color: var(--slate);     border-color: rgba(55, 69, 83, 0.35); }
.rd-tone-na::before { border-radius: 2px; }
.rd-tone-unknown { background: #fff; color: var(--rd-gray); border-color: var(--rd-gray-line); border-style: dashed; }

.rd-icon { width: 15px; height: 15px; flex: 0 0 auto; }
.rd-crit {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 4px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; border: 1.5px solid; line-height: 1.5; white-space: nowrap;
}
.rd-crit-plain   { background: #fff; color: var(--navy); border-color: rgba(5, 43, 82, 0.4); }
.rd-crit-open    { background: #fff; color: var(--rd-red); border-color: var(--rd-red-line); border-style: dashed; }
.rd-crit-blocked { background: var(--rd-red-bg); color: var(--rd-red); border-color: var(--rd-red-line); }

/* ----- program badges + Launch Hold ----- */
.rd-badges { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 8px 0 0; }
.rd-badges:empty { display: none; }
.rd-pbadge {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 5px 12px; border-radius: 4px;
  border: 1px solid rgba(5, 43, 82, 0.28); background: #fff; color: var(--navy); font-weight: 700; font-size: 14.5px;
}
.rd-pbadge-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--slate); }
.rd-pbadge.is-hold { border-color: var(--gold); background: #fbf3dc; }
.rd-hold {
  display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 0; padding: 12px 14px; border-radius: 4px;
  border-left: 5px solid var(--gold); background: #fbf3dc; color: var(--navy);
}
.rd-hold[hidden] { display: none; }
.rd-hold .rd-icon { width: 20px; height: 20px; margin-top: 2px; color: #8a6400; }
.rd-hold-text { display: flex; flex-direction: column; gap: 3px; font-size: 14.5px; line-height: 1.5; min-width: 0; }
.rd-hold-text strong { letter-spacing: 0.12em; font-size: 13.5px; }
.rd-hold-sub { font-weight: 600; }

/* ----- landing cards ----- */
.rd-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 22px; margin-bottom: 8px; }
.rd-card {
  display: flex; flex-direction: column; gap: 14px; background: #fff; border: 1px solid var(--line);
  border-top: 4px solid var(--navy); border-radius: var(--radius); padding: 22px 24px 22px;
  box-shadow: 0 2px 10px rgba(5, 43, 82, 0.05); min-width: 0;
}
.rd-card-name { font-family: var(--font-display); font-size: 22px; line-height: 1.25; color: var(--navy); text-transform: uppercase; letter-spacing: 0.02em; overflow-wrap: anywhere; }
.rd-card-sub { margin: 2px 0 0; font-size: 15.5px; }
.rd-card .rd-badges { margin: 0; }
.rd-card .rd-hold { margin: 0; }
.rd-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; }
.rd-metric { display: flex; flex-direction: column; min-width: 0; padding: 8px 10px; border-radius: 4px; background: var(--warm); border-left: 3px solid rgba(5, 43, 82, 0.2); }
.rd-metric-value { font-family: var(--font-display); font-size: 28px; font-weight: 700; line-height: 1.1; color: var(--navy); font-variant-numeric: tabular-nums; }
.rd-metric-value.is-text { font-family: var(--font-body); font-size: 13.5px; font-weight: 700; color: var(--rd-gray); padding: 6px 0 4px; }
.rd-metric-label { margin-top: 3px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--slate); line-height: 1.3; }
.rd-metric-green  { border-left-color: var(--rd-green-line); }
.rd-metric-yellow { border-left-color: var(--rd-yellow-line); }
.rd-metric-red    { border-left-color: var(--rd-red-line); }
.rd-metric-red .rd-metric-value { color: var(--rd-red); }
.rd-next { border-top: 1px solid var(--line); padding-top: 12px; min-width: 0; }
.rd-next-label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); margin-bottom: 4px; }
.rd-next-text { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.rd-next-text.is-none { color: var(--slate); opacity: 0.85; font-style: italic; }
.rd-next-meta { margin: 4px 0 0; font-size: 13.5px; color: var(--slate); overflow-wrap: anywhere; }
.rd-view { margin-top: auto; align-self: flex-start; padding: 10px 24px; }
.rd-foot { margin: 14px 0 22px; }

/* ----- detail header ----- */
.rd-back { display: inline-block; margin: 0 0 14px; font-size: 14px; font-weight: 700; letter-spacing: 0.05em; color: var(--blue); }
.rd-back:hover { color: var(--navy); text-decoration: underline; }
.rd-head { margin: 0 0 22px; padding: 20px 24px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius); }
.rd-head h2 { font-family: var(--font-display); font-size: 30px; line-height: 1.2; color: var(--navy); margin: 2px 0 2px; overflow-wrap: anywhere; }
.rd-head h2:focus { outline: none; }
.rd-sub { font-size: 17px; margin: 0; }
.rd-about { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.rd-about dt { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); margin-bottom: 2px; }
.rd-about dd { margin: 0; overflow-wrap: anywhere; line-height: 1.55; }
.rd-stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 8px; }
.rd-stat-text { font-family: var(--font-body); font-size: 17px; padding: 12px 0 8px; color: var(--rd-gray); }

/* ----- filters ----- */
.rd-filter-row { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: flex-end; }
.rd-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 420px; }
.rd-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: #fff; color: var(--navy); border: 1.5px solid rgba(5, 43, 82, 0.3);
}
.rd-chip:hover { background: var(--warm); border-color: var(--navy); }
.rd-chip.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.rd-chip-count { font-size: 12px; font-weight: 700; padding: 0 7px; border-radius: 999px; background: rgba(5, 43, 82, 0.1); color: inherit; min-width: 22px; text-align: center; }
.rd-chip.is-active .rd-chip-count { background: rgba(255, 255, 255, 0.22); }
.rd-cat-field { flex: 0 1 260px; }
#pd-count { margin: 16px 0 16px; }

/* ----- requirement list ----- */
.rd-cat { margin: 0 0 26px; }
.rd-cat-title {
  display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--blue); padding: 0 0 8px; border-bottom: 2px solid var(--gold); margin: 0 0 12px;
}
.rd-cat-count { font-size: 12px; padding: 0 8px; border-radius: 999px; background: var(--warm); color: var(--slate); letter-spacing: 0; }
.rd-req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rd-req { background: #fff; border: 1px solid var(--line); border-left: 4px solid rgba(5, 43, 82, 0.18); border-radius: var(--radius); padding: 14px 18px 14px; min-width: 0; }
.rd-req.is-critical { border-left-color: rgba(5, 43, 82, 0.45); }
.rd-req.is-critical-open { border-left: 5px solid var(--rd-red-line); }
.rd-req-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 14px; }
.rd-req-name { font-size: 17px; line-height: 1.35; color: var(--navy); margin: 0; flex: 1 1 260px; overflow-wrap: anywhere; }
.rd-req-badges { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; justify-content: flex-end; }
.rd-req-desc { margin: 8px 0 0; line-height: 1.55; overflow-wrap: anywhere; }
.rd-req-note { margin: 10px 0 0; font-size: 14.5px; font-style: italic; color: var(--slate); }
.rd-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 20px; margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); }
.rd-meta-item { min-width: 0; }
.rd-meta-item.is-wide { grid-column: 1 / -1; }
.rd-meta dt, .rd-hist-field dt { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.rd-meta dd, .rd-hist-field dd { margin: 1px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.5; }
.rd-meta dd.is-empty, .rd-hist-field dd.is-empty { color: var(--slate); opacity: 0.7; }
.rd-req-actions { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 12px; }

/* ----- assess form: read-only fields ----- */
.ef input[readonly] { background: var(--warm); color: var(--slate); cursor: default; }

/* ----- history dialog ----- */
.rd-hist-list { list-style: none; margin: 0; padding: 0; }
.rd-hist-item { margin: 0 0 16px; padding: 4px 0 4px 14px; border-left: 3px solid var(--gold); min-width: 0; }
.rd-hist-item.is-latest { border-left-color: var(--navy); }
.rd-hist-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.rd-hist-date { font-weight: 700; color: var(--navy); }
.rd-hist-latest { font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); }
.rd-hist-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; margin: 8px 0 0; }
.rd-hist-field { min-width: 0; }
.rd-hist-field.is-wide { grid-column: 1 / -1; }

@media (max-width: 1180px) {
  .rd-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .rd-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .rd-card-grid { grid-template-columns: minmax(0, 1fr); }
  .rd-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .rd-about, .rd-meta, .rd-hist-grid { grid-template-columns: minmax(0, 1fr); }
  .rd-head { padding: 16px 16px; }
  .rd-head h2 { font-size: 25px; }
  .rd-req { padding: 12px 14px; }
  .rd-req-badges { justify-content: flex-start; }
  .rd-req-actions .btn, .rd-view { width: 100%; }
  .rd-cat-field { flex: 1 1 100%; }
}

/* ==========================================================================
   PROGRAMS — PROGRAM INFORMATION & GOVERNANCE CONTROLS (Build 7C) — js/programs.js
   Program definition is presented apart from readiness. Governance notices use the
   portal's gold; nothing here colours a status as a score.
   ========================================================================== */
.rd-info { margin: 0 0 24px; padding: 18px 24px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.rd-info-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.rd-section-title {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); margin: 0;
}
.rd-info-actions { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.rd-info-actions .btn[hidden] { display: none; }
.rd-info-note { margin: 6px 0 0; font-size: 14px; color: var(--slate); max-width: 86ch; }
.rd-info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.rd-info-item { min-width: 0; }
.rd-info-item.is-wide { grid-column: 1 / -1; }
.rd-info-item dt { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.rd-info-item dd { margin: 1px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.55; }
.rd-info-item dd.is-empty { color: var(--slate); opacity: 0.7; }
.rd-info-hint { display: block; font-size: 12.5px; color: var(--slate); }
.rd-readiness-title { margin: 6px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--gold); font-size: 13px; }
.rd-readiness-title:focus { outline: none; }

.rd-gov-note { margin: 0 0 14px; padding: 12px 14px; border-radius: 4px; border-left: 5px solid var(--gold); background: #fbf3dc; color: var(--navy); }
.rd-gov-note p { margin: 0; font-size: 15px; line-height: 1.55; }
.rd-warn-strong {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 12px 14px; border-radius: 4px;
  border: 1.5px solid var(--rd-red-line); border-left-width: 6px; background: var(--rd-red-bg); color: #6d1b1b;
}
.rd-warn-strong[hidden] { display: none; }
.rd-warn-strong .rd-icon { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; color: var(--rd-red); }
.rd-warn-strong p { margin: 0; font-size: 15px; line-height: 1.55; font-weight: 600; }
#sl-panel-text { white-space: pre-line; }
.rd-confirm.is-strong { border-color: var(--rd-red-line); background: var(--rd-red-bg); }
.rd-confirm.is-strong #sl-panel-text { font-weight: 600; color: #6d1b1b; }

@media (max-width: 900px) { .rd-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .rd-info { padding: 14px 16px 16px; }
  .rd-info-grid { grid-template-columns: minmax(0, 1fr); }
  .rd-info-actions { width: 100%; }
  .rd-info-actions .btn { flex: 1 1 100%; }
}

/* ==========================================================================
   PROGRAMS — ACTIVITY & SERVICE DELIVERY (Build 7D) — js/programs.js
   The third layer of the program detail page. Deliberately restrained: navy / blue / warm
   neutral only. Readiness red / yellow / green are never used to suggest activity performance.
   ========================================================================== */
.sd-section { margin: 32px 0 8px; padding: 18px 24px 22px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: var(--radius); }
.sd-section .rd-hold { margin-top: 14px; }
.sd-section .rd-warn { margin-top: 14px; }
.sd-state { margin: 16px 0 0; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 4px; color: var(--navy); background: var(--warm); }
.sd-state p { margin: 0 0 8px; }
.sd-state p:last-child { margin-bottom: 0; }
.sd-state.is-error { border-style: solid; border-left: 5px solid var(--gold); background: #fbf3dc; }
.sd-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 16px 0 6px; }
.sd-stat-grid[hidden], .sd-toolbar[hidden], .sd-act-list[hidden], .sd-empty[hidden], #sd-stats-note[hidden] { display: none; }
.sd-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 14px 0 8px; }
.sd-toolbar .pipeline-count { margin: 0; }
.sd-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--navy); cursor: pointer; }
.sd-check input { width: 18px; height: 18px; }
.sd-act-list, .sd-out-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sd-act, .sd-out { padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--navy); border-radius: 4px; }
.sd-act.is-archived { border-left-color: #b9b19c; background: var(--warm); }
.sd-out { border-left-color: var(--blue); }
.sd-act-top, .sd-out-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 14px; }
.sd-act-title { margin: 0; font-family: var(--font-display); font-size: 19px; line-height: 1.3; color: var(--navy); overflow-wrap: anywhere; }
.sd-act-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.sd-type, .sd-archived {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; padding: 3px 10px; border-radius: 999px;
  border: 1.5px solid rgba(5, 43, 82, 0.35); color: var(--navy); background: var(--info-bg);
}
.sd-archived { background: var(--warm); color: var(--slate); border-color: #b9b19c; }
.sd-act .rd-meta, .sd-out .rd-meta { margin-top: 10px; }
.sd-out-type { font-weight: 700; color: var(--navy); }
.sd-out-qty { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.sd-out-list { margin-top: 12px; }
.sd-out-note { margin: 12px 0 0; font-size: 14.5px; color: var(--slate); }
.sd-out-note.is-warn { color: #6d4a00; font-weight: 600; }
.sd-empty { margin: 14px 0 0; padding: 16px 18px; border: 1px dashed var(--line); border-radius: 4px; color: var(--slate); background: var(--warm); }
.sd-view-sec { margin: 0 0 26px; }
.sd-view-sec .rd-section-title { margin-bottom: 8px; }
.sd-view-sec .rd-info-head .btn { margin-left: auto; }
#av-message { margin: 0 28px 14px; }
.sd-pii-note { color: var(--navy); font-weight: 600; }
.sd-confirm-text { margin: 0; line-height: 1.6; font-size: 16px; color: var(--navy); overflow-wrap: anywhere; }
.sd-confirm { max-width: 540px; }

@media (max-width: 900px) { .sd-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .sd-section { padding: 14px 16px 18px; }
  .sd-stat-grid { gap: 12px; }
  .sd-act, .sd-out { padding: 12px 14px; }
  .sd-act .rd-req-actions .btn, .sd-out .rd-req-actions .btn { width: 100%; }
  #av-message { margin: 0 16px 12px; }
}

/* ==========================================================================
   Build 7E — Outcomes & Impact
   Restrained badges: no green "success" colour is used; status is a description, not a grade.
   ========================================================================== */
.oi-section .oi-sub { margin-top: 26px; padding-top: 20px; border-top: 2px solid var(--navy); }
.oi-section .oi-sub + .oi-sub { margin-top: 34px; }
.oi-sub-title { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--navy); }
.oi-badge {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; padding: 3px 10px; border-radius: 999px;
  border: 1.5px solid var(--navy); color: var(--navy); background: #fff;
}
.oi-b-verified { background: var(--navy); color: #fff; }
.oi-b-documented { background: var(--info-bg); border-color: rgba(5, 43, 82, 0.35); }
.oi-b-unable { background: var(--warm); color: var(--slate); border-color: #b9b19c; border-style: dashed; }
.oi-b-internal { background: var(--warm); color: var(--slate); border-color: #b9b19c; }
.oi-b-board { background: var(--info-bg); color: var(--navy); border-color: var(--navy); }
.oi-b-public { background: #fff; color: var(--navy); border-color: var(--navy); box-shadow: inset 0 0 0 2px var(--gold); }
.oi-b-retired { background: #eee; color: #555; border-color: #999; text-decoration: line-through; }
.oi-item .rd-meta { margin-top: 10px; }
.oi-section .sd-check, .oi-section .sd-toolbar { flex-wrap: wrap; }
#rs-panel-text { white-space: pre-line; }
#rs-panel.rd-confirm { margin-bottom: 16px; }
#rs-panel.is-strong { border-color: var(--rd-red-line); background: var(--rd-red-bg); }
#rs-panel.is-strong #rs-panel-text { font-weight: 600; color: #6d1b1b; }
#oi-hold[hidden], #oi-o-stats[hidden], #oi-i-stats[hidden], #oi-o-toolbar[hidden], #oi-i-toolbar[hidden] { display: none; }
@media (max-width: 640px) { .oi-section .rd-info-head { flex-wrap: wrap; } }

/* ==========================================================================
   Build 7F — Programs executive summary on the Executive Dashboard
   Counts and stored statuses only. No scores, percentages, gauges or meters; green is not used as a success colour.
   ========================================================================== */
.programs-dash { margin: 0 0 30px; }
.programs-dash-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 20px; }
.programs-dash-head h2 { font-family: var(--font-display); font-size: 24px; color: var(--navy); margin: 0; }
.programs-dash-head .gold-rule { margin: 10px 0 12px; }
.programs-dash-head .card-link { margin-top: 4px; }
.programs-dash-sub { margin: 0 0 16px; color: var(--slate); max-width: 80ch; }
.programs-dash-status { margin: 0 0 16px; padding: 12px 16px; border-radius: 4px; border-left: 5px solid var(--gold); background: #fbf3dc; color: var(--navy); font-weight: 600; }
.programs-dash-status[hidden] { display: none; }
.pg-cards { display: flex; flex-direction: column; gap: 18px; margin-bottom: 22px; }
.pg-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: var(--radius); padding: 20px 22px; box-shadow: 0 2px 10px rgba(5, 43, 82, 0.05); }
.pg-card.is-hold { border-top-color: var(--gold); }
.pg-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 16px; }
.pg-name { margin: 0; font-family: var(--font-display); font-size: 22px; color: var(--navy); overflow-wrap: anywhere; }
.pg-subtitle { margin: 2px 0 0; color: var(--slate); }
.pg-view { white-space: nowrap; }
.pg-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.pg-badge { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: 0.03em; padding: 3px 10px; border-radius: 999px; border: 1.5px solid rgba(5, 43, 82, 0.35); background: var(--info-bg); color: var(--navy); }
.pg-badge-hold { background: #fbf3dc; border-color: #d9a321; color: #6f5200; text-transform: uppercase; letter-spacing: 0.08em; }
.pg-hold-note { margin: 12px 0 0; padding: 10px 14px; border-left: 5px solid var(--gold); background: #fbf3dc; color: var(--navy); font-size: 14.5px; }
.pg-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; margin-top: 18px; }
.pg-group { min-width: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.pg-group-title { margin: 0 0 10px; font-size: 12.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--navy); }
.pg-stats, .pg-totals-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.pg-totals-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pg-stat { display: flex; flex-direction: column; min-width: 0; }
.pg-stat-value { font-family: var(--font-display); font-size: 28px; font-weight: 700; line-height: 1.1; color: var(--navy); font-variant-numeric: tabular-nums; }
.pg-stat-value.pg-stat-text { font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1.6; color: var(--slate); }
.pg-stat-label { margin-top: 4px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--slate); overflow-wrap: anywhere; }
.pg-unavailable { margin: 0; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 4px; background: var(--warm); color: var(--navy); }
.pg-note { margin: 12px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--slate); }
.pg-attention-list { margin: 0 0 6px; padding-left: 20px; }
.pg-attention-list li { margin: 0 0 6px; overflow-wrap: anywhere; }
@media (max-width: 900px) { .pg-groups { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .pg-card { padding: 16px; } .pg-totals-grid { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   Build 9A — Executive status indicators (Red / Yellow / Green / Gray)
   A small dot plus visible text. Colours are secondary and never replace the stated fact; they are
   not scores or ratings, and metric numbers are never coloured.
   ========================================================================== */
.st-ind {
  --st-fg: #5a6673; --st-bg: #eef0f2; --st-line: #a9b1ba; --st-dot: #7b8794;
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  padding: 2px 10px 2px 8px; border-radius: 999px; border: 1.5px solid var(--st-line);
  background: var(--st-bg); color: var(--st-fg); font-size: 13px; font-weight: 700; line-height: 1.4; vertical-align: middle;
}
.st-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--st-dot); }
.st-text { min-width: 0; overflow-wrap: anywhere; }
.st-red    { --st-fg: #8f2222; --st-bg: #fbeceb; --st-line: #a12a2a; --st-dot: #a12a2a; }
.st-yellow { --st-fg: #6f5200; --st-bg: #fbf3dc; --st-line: #d9a321; --st-dot: #d9a321; }
.st-green  { --st-fg: #1b5a37; --st-bg: #e3f0e8; --st-line: #247447; --st-dot: #247447; }
.st-gray   { --st-fg: #4b5662; --st-bg: #eef0f2; --st-line: #a9b1ba; --st-dot: #7b8794; }

.st-legend { margin: 0 0 22px; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.st-legend-title { margin: 0 0 6px; font-family: inherit; font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate); }
.st-legend-list { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; }
.st-legend-list li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--slate); }
.st-legend-note { margin: 6px 0 0; font-size: 13px; color: var(--slate); }

.st-banner-text { margin-left: 8px; }
.st-unavailable .st-banner-text { margin-left: 8px; }
.pg-badges .st-ind { font-size: 12.5px; }
.pg-conditions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.pg-attention-list { list-style: none; padding-left: 0; }
.pg-attention-item { margin: 0 0 8px; }
.gdash-meta .st-ind { font-size: 12px; padding: 1px 9px 1px 7px; }
.pg-unavailable .st-ind, .pg-stat-text .st-ind { font-size: 13px; }

/* ==========================================================================
   Board Portal hero (Build 10) — Dashboard page only. Full-width, top-level
   band that sits ABOVE BOTH the navy sidebar and the Dashboard workspace;
   the old white .portal-header is not built on this page (see shell.js).
   Visual shell only: no data, no navigation, no functional change — the
   authenticated-user area and Sign Out are relocated here, not rebuilt.
   ========================================================================== */
.portal-hero {
  position: relative; overflow: hidden; z-index: 100;
  width: 100%; min-height: var(--hero-h);
  background: url('../images/board-portal-hero.webp') center center / cover no-repeat;
  color: #fff;
  border-bottom: 4px solid var(--gold);
}
.portal-hero::before {
  /* Right-side color treatment over the mountain: warm gold shading through the
     center-right, transitioning into deep navy at the far edge for the user area.
     The fixed-width white logo panel sits above this (opaque, unaffected); the
     dark pool just past it keeps the hero title readable without boxing the text. */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(8, 29, 51, 0.42) 22%,
      rgba(8, 29, 51, 0.28) 32%,
      rgba(8, 29, 51, 0) 46%,
      rgba(217, 163, 33, 0.24) 56%,
      rgba(217, 163, 33, 0.30) 66%,
      rgba(8, 29, 51, 0.55) 82%,
      rgba(8, 29, 51, 0.88) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0.18) 100%);
}
.portal-hero-inner {
  position: relative; z-index: 1; height: 100%; min-height: var(--hero-h);
  display: flex; align-items: stretch; gap: 0; padding: 0;
}
.portal-hero-logo-panel {
  /* Exactly matches the navy sidebar's width so the vertical edge below it
     (white block above, navy sidebar below) lines up perfectly. */
  flex-shrink: 0; width: var(--nav-w);
  display: flex; align-items: center; justify-content: center;
  background: var(--white); /* same background as the Dashboard workspace (body background) */
}
.portal-hero-logo {
  display: block; max-width: 72%; max-height: 72%; width: auto; height: auto;
}
.portal-hero-text { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 32px 0 56px; }
.portal-hero-title {
  margin: 0; font-family: var(--font-display); font-weight: 700; font-style: normal;
  font-size: 34px; line-height: 1.15; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,0.55), 0 1px 22px rgba(0,0,0,0.4);
}
.portal-hero-pillars {
  margin: 10px 0 0; font-size: 14px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: #bfe4cf; /* subtle sage */
}
.portal-hero-pillars span { color: var(--gold); margin: 0 4px; }
.portal-hero-sub {
  margin: 10px 0 0; max-width: 52ch; font-size: 15px; line-height: 1.5; color: rgba(255,255,255,0.85);
}

.portal-hero-user { flex-shrink: 0; display: flex; align-items: center; padding-right: 28px; }
.portal-hero-user .portal-user { display: flex; align-items: center; gap: 14px; }
.portal-hero-user .portal-user-name { color: #fff; }
.portal-hero-user .portal-user-title { color: rgba(255,255,255,0.75); }
.portal-hero-user .btn-logout { border-color: rgba(255,255,255,0.7); color: #fff; }
.portal-hero-user .btn-logout:hover:not(:disabled) { background: #fff; color: var(--navy); }

@media (max-width: 960px) {
  :root { --hero-h: 168px; }
  .portal-hero-text { padding: 0 16px 0 24px; }
  .portal-hero-user { padding-right: 16px; }
  .portal-hero-user .portal-user-info, .portal-hero-user .role-badge { display: none; }
  .portal-hero-title { font-size: 24px; }
  .portal-hero-pillars { font-size: 11.5px; letter-spacing: 0.06em; }
  .portal-hero-sub { display: none; }
  .portal-hero .nav-toggle { display: flex; margin: 0 14px 0 4px; }
}
@media (max-width: 520px) {
  :root { --hero-h: 140px; }
  .portal-hero-logo { max-width: 78%; max-height: 78%; }
  .portal-hero-text { padding: 0 10px 0 18px; }
  .portal-hero-title { font-size: 19px; }
  .portal-hero-pillars { display: flex; flex-direction: column; gap: 2px; }
  .portal-hero-pillars span { display: none; }
  .portal-hero-user .btn-logout { padding: 8px 12px; font-size: 12px; }
}
