:root {
  --navy: #000000;
  --navy-dark: #1a1a1a;
  --navy-contrast: #ffffff;
  --orange: #fb8500;
  --orange-dark: #d97300;
  --bg: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.65);
  --card-bg-strong: rgba(255, 255, 255, 0.85);
  --glass-surface: rgba(255, 255, 255, 0.6);
  --input-bg: rgba(255, 255, 255, 0.7);
  --border: #e3e2df;
  --hover-lift-border: #d8d5cf;
  --text: #000000;
  --text-muted: rgba(0, 0, 0, 0.6);
  --success: #2e7d32;
  --warn: #b45309;
  --danger: #b3261e;
  --success-bg: #eaf6ea;
  --danger-bg: #fdecea;
  --success-border: #bfe3c0;
  --danger-border: #f5c2be;
  --badge-open-bg: #fdf0dc;
  --badge-matched-bg: #fff3e0;
  --badge-success-bg: #e8f5e9;
  --badge-danger-bg: #fdecea;
  --badge-pending-bg: #eef0f3;
  --table-hover: #fbf7f0;
  --thread-bg: #fafbfc;
  --footer-bg: #ffffff;
  --footer-text: #000000;
  --btn-outline-bg: rgba(255, 255, 255, 0.4);
  --btn-outline-hover-bg: rgba(0, 0, 0, 0.06);
  --btn-outline-border: #000000;
  --msg-mine-meta: rgba(255, 255, 255, 0.7);
  --msg-theirs-bg: rgba(255, 255, 255, 0.85);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.16);
  /* Apple-style motion: a gentle overshoot "spring" for interactive feedback, and a
     smooth deceleration curve for anything that just needs to settle into place. */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* Dark theme — follows the OS by default; an explicit toggle (see theme.js) overrides it
   either way via [data-theme] and always wins over the system preference. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #f2f2f3;
    --navy-dark: #ffffff;
    --navy-contrast: #101010;
    --orange-dark: #ff9f33;
    --bg: #121214;
    --card-bg: rgba(255, 255, 255, 0.06);
    --card-bg-strong: rgba(255, 255, 255, 0.1);
    --glass-surface: rgba(255, 255, 255, 0.05);
    --input-bg: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.14);
    --hover-lift-border: rgba(255, 255, 255, 0.28);
    --text: #f2f2f3;
    --text-muted: rgba(255, 255, 255, 0.64);
    --success: #6fcf73;
    --warn: #ffb74d;
    --danger: #ff6b6b;
    --success-bg: rgba(111, 207, 115, 0.16);
    --danger-bg: rgba(255, 107, 107, 0.16);
    --success-border: rgba(111, 207, 115, 0.35);
    --danger-border: rgba(255, 107, 107, 0.35);
    --badge-open-bg: rgba(251, 133, 0, 0.2);
    --badge-matched-bg: rgba(255, 183, 77, 0.18);
    --badge-success-bg: rgba(111, 207, 115, 0.18);
    --badge-danger-bg: rgba(255, 107, 107, 0.18);
    --badge-pending-bg: rgba(255, 255, 255, 0.1);
    --table-hover: rgba(255, 255, 255, 0.04);
    --thread-bg: #1a1a1d;
    --footer-bg: #0c0c0d;
    --footer-text: #f2f2f3;
    --btn-outline-bg: rgba(255, 255, 255, 0.06);
    --btn-outline-hover-bg: rgba(255, 255, 255, 0.1);
    --btn-outline-border: #f2f2f3;
    --msg-mine-meta: rgba(16, 16, 16, 0.6);
    --msg-theirs-bg: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
    --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  }
}
:root[data-theme="dark"] {
  --success-border: rgba(111, 207, 115, 0.35);
  --danger-border: rgba(255, 107, 107, 0.35);
  --navy: #f2f2f3;
  --navy-dark: #ffffff;
  --navy-contrast: #101010;
  --orange-dark: #ff9f33;
  --bg: #121214;
  --card-bg: rgba(255, 255, 255, 0.06);
  --card-bg-strong: rgba(255, 255, 255, 0.1);
  --glass-surface: rgba(255, 255, 255, 0.05);
  --input-bg: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.14);
  --hover-lift-border: rgba(255, 255, 255, 0.28);
  --text: #f2f2f3;
  --text-muted: rgba(255, 255, 255, 0.64);
  --success: #6fcf73;
  --warn: #ffb74d;
  --danger: #ff6b6b;
  --success-bg: rgba(111, 207, 115, 0.16);
  --danger-bg: rgba(255, 107, 107, 0.16);
  --badge-open-bg: rgba(251, 133, 0, 0.2);
  --badge-matched-bg: rgba(255, 183, 77, 0.18);
  --badge-success-bg: rgba(111, 207, 115, 0.18);
  --badge-danger-bg: rgba(255, 107, 107, 0.18);
  --badge-pending-bg: rgba(255, 255, 255, 0.1);
  --table-hover: rgba(255, 255, 255, 0.04);
  --thread-bg: #1a1a1d;
  --footer-bg: #0c0c0d;
  --footer-text: #f2f2f3;
  --btn-outline-bg: rgba(255, 255, 255, 0.06);
  --btn-outline-hover-bg: rgba(255, 255, 255, 0.1);
  --btn-outline-border: #f2f2f3;
  --msg-mine-meta: rgba(16, 16, 16, 0.6);
  --msg-theirs-bg: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--orange-dark); text-decoration: none; transition: color 0.15s ease; }
a:hover { text-decoration: underline; }

/* Replace the browser's default blue focus/selection styling with the brand orange */
input[type="radio"], input[type="checkbox"] { accent-color: var(--orange); }
::selection { background: #ffe0b3; color: #000; }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--orange-dark);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Header — a frosted glass panel: translucent orange with a blur, so page content
   drifting underneath it while scrolling shows through softly, like Liquid Glass. */
.site-header {
  background: rgba(251, 133, 0, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12), var(--glass-highlight);
  transition: box-shadow 0.3s var(--smooth), padding 0.3s var(--smooth);
}
.site-header.scrolled { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18), var(--glass-highlight); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--orange); }
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  flex-wrap: wrap;
  gap: 10px;
  transition: padding 0.3s var(--smooth);
}
.scrolled .header-inner { padding: 9px 20px; }
.brand {
  transition: transform 0.3s var(--spring);
  display: inline-block;
  line-height: 0;
}
.brand:hover { transform: scale(1.04); text-decoration: none; }
.brand-logo {
  height: 44px;
  width: auto;
  display: block;
  transition: height 0.3s var(--smooth);
}
.scrolled .brand-logo { height: 34px; }
.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.main-nav a, .main-nav .link-button {
  color: #fff;
  font-weight: 500;
  position: relative;
  padding-bottom: 2px;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -3px;
  height: 2px;
  background: #fff;
  transition: right 0.35s var(--spring);
}
.main-nav a:hover::after { right: 0; }
.main-nav a:hover, .main-nav .link-button:hover {
  color: #fff;
  text-decoration: none;
  opacity: 0.85;
}
.main-nav .cta {
  /* Fixed, not theme-aware var(--navy) — this sits on the header, which stays a
     constant orange in both themes, so it must not flip light in dark mode. */
  background: #000000;
  color: #ffffff;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: var(--glass-highlight);
  transition: background 0.2s var(--smooth), transform 0.3s var(--spring), box-shadow 0.3s var(--smooth);
}
.main-nav .cta::after { display: none; }

.theme-toggle {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s var(--smooth), transform 0.3s var(--spring);
}
.theme-toggle:hover { background: rgba(255, 255, 255, 0.3); transform: scale(1.08); }
.main-nav .cta:hover {
  background: #1a1a1a;
  text-decoration: none;
  color: #fff;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), var(--glass-highlight);
}

/* Buttons inside the hero sit on a constant orange background regardless of theme,
   so .btn-outline's theme-aware colors would fight it — give it fixed, always-legible
   colors here instead. */
.hero .btn-outline {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.92);
  color: #000000;
}
.hero .btn-outline:hover {
  background: #ffffff;
  border-color: #ffffff;
}

/* Account dropdown — collapses Dashboard/Messages/Notifications/Profile/Admin/Logout
   into one menu instead of cluttering the top nav with a link per feature. */
.account-menu { position: relative; }
.account-menu summary {
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  padding-bottom: 2px;
}
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary::after {
  content: '▾';
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.8;
}
.account-menu summary:hover { opacity: 0.85; }
.account-menu-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  padding: 8px;
  display: flex;
  flex-direction: column;
  min-width: 190px;
  z-index: 200;
}
.account-menu-panel a,
.account-menu-panel .link-button {
  color: #1a1a1a;
  padding: 9px 12px;
  border-radius: 8px;
  font-weight: 500;
  text-align: left;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
}
.account-menu-panel a::after { display: none; }
.account-menu-panel a:hover,
.account-menu-panel .link-button:hover {
  background: #fdf0dc;
  text-decoration: none;
  color: #1a1a1a;
  opacity: 1;
}
.account-menu-panel form.inline-form { width: 100%; }

.inline-form { display: inline; }
.link-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  font-family: inherit;
}

/* Layout */
.page {
  padding: 40px 20px 60px;
  min-height: 60vh;
  animation: pageIn 0.5s var(--smooth) both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  border-top: 3px solid var(--orange);
  padding: 24px 0;
  margin-top: 40px;
}
.site-footer p { margin: 4px 0; }
.site-footer .small { font-size: 0.85rem; color: var(--text-muted); }
.footer-logo { height: 40px; width: auto; margin-bottom: 14px; }
.footer-logo-dark { display: block; }
.footer-logo-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .footer-logo-dark { display: none; }
  :root:not([data-theme="light"]) .footer-logo-light { display: block; }
}
:root[data-theme="dark"] .footer-logo-dark { display: none; }
:root[data-theme="dark"] .footer-logo-light { display: block; }

/* Typography */
h1 { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.015em; margin-top: 0; }
h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; }
.lede { font-size: 1.15rem; color: var(--text-muted); }
.small { font-size: 0.88rem; color: var(--text-muted); }

/* Reveal-on-scroll (progressive enhancement: only hides content once .js is present) */
.js .reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition: opacity 0.7s var(--smooth), transform 0.7s var(--spring);
}
.js .reveal.visible { opacity: 1; transform: translateY(0) scale(1); }

/* Hero — orange glass slab with a soft diagonal sheen, like light hitting glass */
.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 45%),
    var(--orange);
  color: #fff;
  border-radius: 28px;
  padding: 56px 44px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-lg), var(--glass-highlight);
}
.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(45px);
  z-index: 0;
  pointer-events: none;
}
.hero::before {
  width: 280px; height: 280px;
  background: #fff2df;
  opacity: 0.35;
  top: -90px; right: 10%;
  animation: floatBlob 9s ease-in-out infinite;
}
.hero::after {
  width: 200px; height: 200px;
  background: #000;
  opacity: 0.15;
  bottom: -70px; left: 8%;
  animation: floatBlob 12s ease-in-out infinite reverse;
}
.hero > * { position: relative; z-index: 1; }
@keyframes floatBlob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-22px) scale(1.08); }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
  box-shadow: var(--glass-highlight);
  animation: fadeIn 0.8s var(--smooth) both;
}
.hero h1 { color: #fff; max-width: 720px; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.hero p { color: rgba(255, 255, 255, 0.95); max-width: 640px; font-size: 1.08rem; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
.hero-actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.scroll-cue {
  display: inline-flex;
  margin-top: 36px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  gap: 8px;
  align-items: center;
  opacity: 0.9;
}
.scroll-cue .arrow { animation: bounceDown 1.6s ease-in-out infinite; }
@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.stats-row {
  display: flex;
  gap: 24px;
  margin: 28px 0;
  flex-wrap: wrap;
}
.stat-card {
  background: var(--glass-surface);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px 26px;
  text-align: center;
  min-width: 140px;
  box-shadow: var(--glass-highlight);
  transition: transform 0.35s var(--spring), box-shadow 0.3s var(--smooth), border-color 0.3s var(--smooth);
}
.stat-card:hover { transform: translateY(-5px) scale(1.02); box-shadow: var(--shadow-md), var(--glass-highlight); border-color: var(--orange); }
.stat-card .num { font-size: 2.2rem; font-weight: 800; color: var(--orange-dark); letter-spacing: -0.02em; }
.stat-card .label { color: var(--text-muted); font-size: 0.9rem; }
.stats-row .reveal:nth-child(1) { transition-delay: 0.05s; }
.stats-row .reveal:nth-child(2) { transition-delay: 0.15s; }
.stats-row .reveal:nth-child(3) { transition-delay: 0.25s; }

.section-heading { margin-top: 48px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 28px 0;
}
.feature-card {
  background: var(--glass-surface);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--glass-highlight);
  transition: transform 0.35s var(--spring), box-shadow 0.3s var(--smooth), border-color 0.3s var(--smooth);
}
.feature-card:hover { transform: translateY(-6px) scale(1.01); box-shadow: var(--shadow-md), var(--glass-highlight); border-color: var(--orange); }
.feature-card h3 { margin-top: 0; }
.feature-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.feature-grid .reveal:nth-child(2) { transition-delay: 0.15s; }
.feature-grid .reveal:nth-child(3) { transition-delay: 0.25s; }
.feature-grid .reveal:nth-child(4) { transition-delay: 0.35s; }

/* Orange fill, so its text is white */
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(160deg, #ffb44d, var(--orange));
  color: #fff;
  font-weight: 800;
  margin-bottom: 12px;
  box-shadow: var(--glass-highlight);
}
.who-card { border-left: 4px solid var(--orange); }
.who-card.org-side { border-left-color: var(--navy); }

/* Buttons — rounded pill "glass" caps with a soft light sheen across the top half */
.btn {
  display: inline-block;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 55%), var(--navy);
  color: var(--navy-contrast);
  border: none;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: var(--glass-highlight);
  transition: background 0.2s var(--smooth), transform 0.3s var(--spring), box-shadow 0.3s var(--smooth);
}
.btn:hover { background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 55%), var(--navy-dark); text-decoration: none; transform: translateY(-2px) scale(1.03); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28), var(--glass-highlight); }
.btn:active { transform: translateY(0) scale(0.97); box-shadow: var(--glass-highlight); }
.btn-orange { background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 55%), var(--orange); color: #fff; }
.btn-orange:hover { background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 55%), var(--orange-dark); color: #fff; box-shadow: 0 8px 18px rgba(251, 133, 0, 0.35), var(--glass-highlight); }
.btn-outline {
  background: var(--btn-outline-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--btn-outline-border);
  color: var(--text);
  border-radius: 999px;
}
.btn-outline:hover { background: var(--btn-outline-hover-bg); text-decoration: none; transform: translateY(-2px) scale(1.03); box-shadow: var(--shadow-sm); }
.btn-danger { background: var(--danger); color: #fff; border-radius: 999px; }
.btn-danger:hover { background: #8f1f19; }
.btn-small { padding: 6px 14px; font-size: 0.85rem; }

/* Cards */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--glass-highlight);
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--smooth), border-color 0.3s var(--smooth);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm), var(--glass-highlight); border-color: var(--hover-lift-border); }
.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

/* Forms */
form.stacked { max-width: 560px; }
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  font-size: 0.92rem;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--input-bg);
  transition: border-color 0.2s var(--smooth), box-shadow 0.2s var(--smooth);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(251, 133, 0, 0.18);
}
.field textarea { resize: vertical; min-height: 90px; }
.field .hint { color: var(--text-muted); font-size: 0.82rem; margin-top: 4px; }
.field-row { display: flex; gap: 16px; }
.field-row .field { flex: 1; }

.form-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.form-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
}

fieldset { border: 1px solid var(--border); border-radius: 14px; margin-bottom: 16px; }
legend { font-weight: 700; padding: 0 6px; }
.role-toggle { display: flex; gap: 20px; padding: 10px 4px; }
.role-toggle label { font-weight: 500; display: flex; align-items: center; gap: 6px; }

/* Status badges (kept as deliberate color-coded chips, not standard text) */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.badge-open { background: var(--badge-open-bg); color: var(--orange-dark); }
.badge-matched { background: var(--badge-matched-bg); color: var(--warn); }
.badge-completed { background: var(--badge-success-bg); color: var(--success); }
.badge-cancelled { background: var(--badge-danger-bg); color: var(--danger); }
.badge-pending { background: var(--badge-pending-bg); color: var(--text-muted); }
.badge-accepted { background: var(--badge-success-bg); color: var(--success); }
.badge-declined { background: var(--badge-danger-bg); color: var(--danger); }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 12px 0; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
th { color: var(--text-muted); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; }
tbody tr { transition: background 0.25s var(--smooth); }
tbody tr:hover { background: var(--table-hover); }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

/* Map */
#map { height: 520px; border-radius: 20px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.map-legend { display: flex; gap: 20px; margin: 12px 0; flex-wrap: wrap; font-size: 0.9rem; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot-team { background: var(--navy); }
.dot-org { background: #fb8500; }
.dot-request { background: #b3261e; }

/* Messaging */
.conversation-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 10px;
  background: var(--card-bg);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow: var(--glass-highlight);
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--smooth), border-color 0.3s var(--smooth);
}
.conversation-list-item:hover { transform: translateX(4px); box-shadow: var(--shadow-sm), var(--glass-highlight); border-color: var(--orange); }
.thread {
  max-height: 460px;
  overflow-y: auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--thread-bg);
  margin-bottom: 16px;
}
.msg {
  max-width: 70%;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 16px;
  animation: msgIn 0.35s var(--spring) both;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.msg .meta { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 3px; }
.msg-mine { background: var(--navy); color: var(--navy-contrast); margin-left: auto; }
.msg-mine .meta { color: var(--msg-mine-meta); }
.msg-theirs { background: var(--msg-theirs-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--border); }

/* Responsive embed (e.g. the Google Slides pitch deck on the About page) —
   scales to the container width while keeping the source's aspect ratio. */
.slide-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 1280 / 749;
  border-radius: 18px;
  overflow: hidden;
  margin: 20px 0 28px;
  box-shadow: var(--shadow-md), var(--glass-highlight);
}
.slide-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Demonstration Plans — card with a large top-bleed thumbnail, switchable between a
   vertical responsive grid ("List") and a horizontal scrolling row ("Gallery"). */
.demo-plan-card {
  display: flex;
  background: var(--card-bg);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--glass-highlight);
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--smooth), border-color 0.3s var(--smooth);
}
.demo-plan-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm), var(--glass-highlight); border-color: var(--hover-lift-border); }
/* aspect-ratio keeps the thumbnail a perfect square in both layouts — fixed pixel
   width+height in the list row, 100%-width-with-auto-height in the gallery column. */
.demo-plan-thumb { aspect-ratio: 1 / 1; object-fit: cover; display: block; flex-shrink: 0; }
.demo-plan-body { padding: 18px; min-width: 0; }

.demo-plans-grid.demo-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
}
.demo-plans-grid.demo-list .demo-plan-card {
  flex-direction: row;
  align-items: stretch;
}
.demo-plans-grid.demo-list .demo-plan-thumb {
  width: 140px;
  height: 140px;
}
.demo-plans-grid.demo-gallery {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 32px;
  scroll-snap-type: x proximity;
}
.demo-plans-grid.demo-gallery .demo-plan-card {
  flex: 0 0 280px;
  flex-direction: column;
  scroll-snap-align: start;
}
.demo-plans-grid.demo-gallery .demo-plan-thumb {
  width: 100%;
  height: auto;
}

.view-toggle { display: flex; gap: 6px; margin-bottom: 24px; }
.view-toggle button {
  background: var(--btn-outline-bg);
  border: 1px solid var(--btn-outline-border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s var(--smooth);
}
.view-toggle button.active { background: var(--orange); border-color: var(--orange); color: #fff; }

.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
@media (max-width: 800px) {
  .two-col { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; }
  .hero { padding: 40px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
