:root {
  color-scheme: light;
  --ink: #252b31;
  --muted: #626a72;
  --line: #dfe3e7;
  --paper: #fbfbfc;
  --panel: #ffffff;
  --brand-green: #5bdf82;
  --brand-green-ink: #1f7d43;
  --brand-green-soft: #effcf3;
  --brand-purple: #8e2c8e;
  --brand-purple-ink: #5b1a64;
  --brand-purple-soft: #fbf0fb;
  --brand-charcoal: #3f454b;
  --blue: var(--brand-purple);
  --blue-ink: var(--brand-purple-ink);
  --moss: var(--brand-green-ink);
  --sage: #dff8e8;
  --donor: var(--brand-green-ink);
  --donor-soft: var(--brand-green-soft);
  --seeker: var(--brand-purple);
  --seeker-soft: var(--brand-purple-soft);
  --coral: #c26072;
  --gold: #b88b35;
  --lavender: var(--brand-purple);
  --danger: #a23a3f;
  --shadow: 0 18px 50px rgba(63, 69, 75, 0.13);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.role-donor {
  --role-accent: var(--donor);
  --role-soft: var(--donor-soft);
}

body.role-seeker {
  --role-accent: var(--seeker);
  --role-soft: var(--seeker-soft);
}

body.role-admin {
  --role-accent: var(--blue);
  --role-soft: #edf5f7;
}

body.role-clinic {
  --role-accent: var(--moss);
  --role-soft: #f0f5ef;
}

a { color: inherit; text-decoration: none; }

button, input, select, textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(251, 251, 252, 0.9);
  border-bottom: 1px solid rgba(223, 227, 231, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 196px;
  color: var(--brand-charcoal);
}

.brand-logo {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.brand-text {
  color: var(--brand-charcoal);
  font-size: 1.02rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  font-size: 0.78rem;
  letter-spacing: 0;
}

body.role-donor .brand-mark {
  background: var(--donor);
}

body.role-seeker .brand-mark {
  background: var(--seeker);
}

.primary-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.primary-nav a,
.session-pill,
.nav-toggle {
  border: 1px solid transparent;
  border-radius: 8px;
}

.primary-nav a {
  padding: 9px 11px;
  color: #33484c;
  font-size: 0.94rem;
}

.primary-nav a:hover,
.primary-nav a.active {
  background: var(--brand-purple-soft);
  color: var(--blue-ink);
}

.session-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 9px;
  background: white;
  border-color: var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: white;
  border-color: var(--line);
}

main {
  outline: none;
}

.page {
  padding: clamp(28px, 5vw, 60px) clamp(16px, 4vw, 48px);
}

.hero {
  min-height: calc(100vh - 68px);
  display: grid;
  align-items: end;
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 64px);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("clinic-match-hero.png") center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(18, 20, 24, 0.86), rgba(55, 26, 65, 0.58) 48%, rgba(91, 223, 130, 0.16)),
    radial-gradient(circle at 76% 24%, rgba(91, 223, 130, 0.36), transparent 34%);
}

.hero-content {
  width: min(760px, 100%);
  color: white;
  padding-bottom: min(10vh, 78px);
}

.hero-logo {
  display: block;
  width: min(168px, 34vw);
  height: auto;
  margin: 0 0 24px;
  filter: drop-shadow(0 16px 34px rgba(0, 0, 0, 0.34));
}

.eyebrow {
  margin: 0 0 12px;
  color: #dfeeea;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  max-width: 13ch;
  margin-bottom: 16px;
  font-size: clamp(2.8rem, 7vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.04rem;
}

.lede {
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.02rem, 2vw, 1.22rem);
}

.hero-actions,
.actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-actions {
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  color: var(--blue-ink);
  font-weight: 750;
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.btn.secondary {
  background: var(--brand-green-soft);
  border-color: #b9efc9;
  color: var(--brand-green-ink);
}

.btn.danger {
  background: #fff1ef;
  border-color: #f0c7c1;
  color: var(--danger);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.section-band {
  border-top: 1px solid var(--line);
  background: #f4f1e9;
}

.brand-direction-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.brand-panel {
  min-height: 210px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.brand-panel.donor {
  border-color: #c7dacb;
  background: linear-gradient(180deg, #ffffff, var(--brand-green-soft));
}

.brand-panel.seeker {
  border-color: #d2d4ec;
  background: linear-gradient(180deg, #ffffff, var(--brand-purple-soft));
}

.brand-panel.inclusive {
  border-color: #ead7a8;
  background: linear-gradient(180deg, #ffffff, #fff7e4);
}

.brand-panel h3 {
  margin-top: 14px;
}

.deck-proof-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.proof-stat {
  min-height: 180px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.proof-stat b {
  display: block;
  color: var(--brand-purple);
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1;
}

.proof-stat strong {
  display: block;
  margin-top: 10px;
  color: var(--brand-charcoal);
}

.business-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.business-card {
  border-top: 4px solid var(--brand-purple);
}

.business-card b {
  display: block;
  margin: 16px 0 8px;
  color: var(--brand-purple);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
}

.business-note {
  margin-top: 14px;
}

.scope-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.scope-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.scope-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.excluded-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}

.excluded-list li {
  padding: 10px 12px;
  border: 1px solid #f0c7c1;
  border-radius: 8px;
  background: #fff7f5;
  color: var(--danger);
  font-weight: 760;
}

.roadmap-heading {
  margin-top: 34px;
}

.roadmap-card {
  border-top: 4px solid var(--blue);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-heading p {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(25, 42, 44, 0.03);
}

.card-body {
  padding: 18px;
}

.feature-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #eff4f4;
  color: var(--blue);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

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

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 65px);
}

.sidebar {
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: #f4f1e9;
}

.sidebar nav {
  display: grid;
  gap: 6px;
}

.sidebar a {
  padding: 10px 12px;
  border-radius: 8px;
  color: #33484c;
}

.sidebar a:hover,
.sidebar a.active {
  background: white;
  color: var(--blue-ink);
}

.workspace {
  min-width: 0;
  padding: clamp(18px, 4vw, 36px);
}

.experience-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--role-accent, var(--blue)) 36%, var(--line));
  border-radius: 8px;
  background: var(--role-soft, #edf5f7);
}

.experience-banner strong {
  display: block;
  margin-bottom: 2px;
}

.experience-banner .tag {
  background: white;
  color: var(--role-accent, var(--blue-ink));
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(92px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.status-step {
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.status-step strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.86rem;
}

.status-step.current {
  border-color: var(--blue);
  background: #edf5f7;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.stat {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.stat b {
  display: block;
  font-size: 1.7rem;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.admin-stat b {
  font-size: 1.45rem;
}

.admin-status-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.admin-status-card .card-body {
  min-height: 128px;
}

.admin-status-card h3 {
  margin-top: 10px;
}

.admin-section {
  margin-top: 24px;
}

.admin-section .section-heading {
  margin-bottom: 12px;
}

.admin-safety-item + .admin-safety-item {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.checklist-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.checklist-row:last-child {
  border-bottom: 0;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}

.pill-list li,
.tag {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 8px;
  padding: 4px 8px;
  background: #edf4f3;
  color: #27464d;
  font-size: 0.82rem;
  font-weight: 700;
}

.tag.warn { background: #fff6df; color: #77500b; }
.tag.good { background: #eaf5e9; color: #305b35; }
.tag.stop { background: #fff1ef; color: var(--danger); }
.tag.note { background: #f0eef9; color: #514b81; }

.could-match-badge {
  border: 1px solid #dfbf69;
  background: #fff3cf;
  color: #6f4a08;
}

.finalized-badge {
  border: 1px solid #9dc8a0;
  background: #e6f6e7;
  color: #244f2a;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field-marker {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 8px;
  background: #eef3f1;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  vertical-align: 1px;
}

.field-marker.required {
  background: #eaf5e9;
  color: #305b35;
}

label {
  color: #31474b;
  font-size: 0.86rem;
  font-weight: 760;
}

input, select, textarea {
  width: 100%;
  border: 1px solid #cfdadb;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 10px 11px;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.donor-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.donor-flow-main,
.donor-preview-rail {
  min-width: 0;
}

.donor-preview-rail {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}

.profile-progress {
  margin-bottom: 14px;
}

.verification-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.verification-card h3 {
  margin-top: 10px;
}

.readiness-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.readiness-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.readiness-item:last-child {
  border-bottom: 0;
}

.readiness-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
}

.readiness-dot.complete {
  background: var(--moss);
}

.consent-card {
  margin-top: 16px;
}

.compliance-choice-grid {
  margin-top: 12px;
}

.success-alert {
  border-color: #c5dfc4;
  background: #edf8ec;
  color: #294b2e;
}

.locked-alert {
  border-color: #e6c785;
  background: #fff7e4;
}

.progress-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  align-items: center;
}

.progress-meter {
  height: 12px;
  overflow: hidden;
  border-radius: 8px;
  background: #dfe8e5;
}

.progress-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-green), var(--brand-purple));
}

.step-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.step-tabs.seeker-tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.step-tab {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: #33484c;
  font-weight: 780;
  text-align: left;
}

.step-tab span {
  display: grid;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: #edf4f3;
  color: var(--blue-ink);
  font-size: 0.78rem;
}

.step-tab.active {
  border-color: var(--blue);
  background: #edf5f7;
  color: var(--blue-ink);
}

.step-header {
  display: flex;
  gap: 16px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

.file-drop {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px dashed #bdcdcb;
  border-radius: 8px;
  background: #fbfaf6;
}

.file-drop input {
  padding: 0;
  border: 0;
  background: transparent;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice-tile {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.choice-tile input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-purple);
}

.choice-tile:has(input:checked) {
  border-color: var(--blue);
  background: #edf5f7;
  color: var(--blue-ink);
}

.photo-strip {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 6px;
  height: 92px;
  margin-bottom: 14px;
}

.photo-strip span {
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(49, 95, 123, 0.9), rgba(96, 122, 82, 0.72)),
    url("clinic-match-hero.png") center / cover;
}

.photo-strip span:nth-child(2) {
  background:
    linear-gradient(135deg, rgba(119, 112, 168, 0.78), rgba(184, 139, 53, 0.62)),
    url("clinic-match-hero.png") center / cover;
}

.photo-strip span:nth-child(3) {
  background:
    linear-gradient(135deg, rgba(185, 101, 90, 0.76), rgba(49, 95, 123, 0.7)),
    url("clinic-match-hero.png") center / cover;
}

.first-glance-card h3 {
  margin-top: 12px;
}

.preview-grid {
  align-items: start;
}

.expanded-profile {
  grid-column: span 1;
}

.profile-section {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.profile-section h4 {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: #33484c;
  text-transform: uppercase;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: minmax(150px, 0.38fr) minmax(0, 1fr);
  gap: 12px;
}

.detail-list dt {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 780;
}

.detail-list dd {
  min-width: 0;
  margin: 0;
}

.match-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(150px, 0.4fr));
  gap: 10px;
  margin-bottom: 16px;
}

.match-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 16px;
  overflow: hidden;
  border-left: 5px solid var(--role-accent, var(--blue));
}

.match-card + .match-card {
  margin-top: 12px;
}

.match-card-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.match-card-side {
  display: grid;
  align-items: start;
  justify-items: end;
  padding: 18px 18px 18px 0;
}

.review-indicator {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 8px;
  background: #f7f4ed;
  color: #5c675f;
  font-size: 0.8rem;
  font-weight: 760;
}

.criteria-list {
  display: grid;
  gap: 9px;
  margin: 14px 0 0;
}

.criteria-row {
  display: grid;
  gap: 5px;
}

.criteria-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #405459;
  font-size: 0.82rem;
  font-weight: 760;
}

.criteria-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 8px;
  background: #e2e9e7;
}

.criteria-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-green), var(--brand-purple));
}

.decision-panel {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.compatibility,
.readiness-score {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  align-self: start;
  border-radius: 8px;
  background: #edf5f7;
  color: var(--blue-ink);
  font-weight: 850;
}

.readiness-score {
  width: 106px;
  height: 106px;
  padding: 12px;
  align-content: center;
  text-align: center;
  border: 1px solid color-mix(in srgb, var(--role-accent, var(--blue)) 34%, var(--line));
  background: radial-gradient(circle at 50% 34%, white 0 36%, var(--role-soft, #edf5f7) 37% 100%);
  color: var(--role-accent, var(--blue-ink));
}

.readiness-score strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1;
}

.readiness-score span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.15;
}

.expanded-profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--role-soft, #edf5f7);
}

.inclusive-note {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #dfd6ec;
  border-radius: 8px;
  background: #fbf9ff;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 18px;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  padding-left: 16px;
  border-left: 3px solid var(--line);
}

.timeline-item.active {
  border-color: var(--moss);
}

.match-notice {
  border-color: #cfa5d1;
  background: linear-gradient(135deg, var(--brand-purple-soft), var(--brand-green-soft));
}

.match-notice > strong {
  display: block;
  margin-top: 10px;
}

.safety-action {
  border-style: solid;
}

.chat-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.chat-list {
  border-right: 1px solid var(--line);
  background: #f7f4ee;
}

.chat-thread-button {
  display: block;
  width: 100%;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.chat-thread-button.active {
  background: white;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
}

.chat-header,
.chat-composer {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.chat-composer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  overflow: auto;
  background: #fbfaf6;
}

.admin-message-preview {
  max-height: 220px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.message {
  max-width: 76%;
  padding: 10px 12px;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--line);
}

.message.me {
  margin-left: auto;
  background: #edf5f7;
  border-color: #c8dfe8;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th, td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f4f1e9;
  font-size: 0.82rem;
  color: #405459;
  text-transform: uppercase;
}

.empty-state {
  padding: 28px;
  border: 1px dashed #bdcdcb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
}

.alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #e6c785;
  border-radius: 8px;
  background: #fff7e4;
  color: #66501f;
}

.footer-note {
  padding: 18px clamp(16px, 4vw, 48px) 36px;
  color: var(--muted);
}

@media (max-width: 920px) {
  .topbar {
    grid-template-columns: auto auto 1fr;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .primary-nav {
    display: none;
    position: absolute;
    inset: 66px 12px auto 12px;
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow);
  }

  .primary-nav.open {
    display: flex;
  }

  .session-pill {
    justify-self: end;
  }

  .grid.three,
  .grid.four,
  .grid.two,
  .brand-direction-grid,
  .deck-proof-grid,
  .business-grid,
  .stat-grid,
  .admin-metrics,
  .admin-status-board,
  .verification-grid,
  .detail-grid,
  .donor-flow,
  .layout,
  .chat-layout {
    grid-template-columns: 1fr;
  }

  .donor-preview-rail {
    position: static;
  }

  .step-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step-tabs.seeker-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .match-toolbar {
    grid-template-columns: 1fr;
  }

  .match-card {
    grid-template-columns: minmax(0, 1fr) 120px;
  }

  .chat-list {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 720px;
    align-items: end;
    padding: 24px 16px;
  }

  .hero::after {
    background: linear-gradient(180deg, rgba(16, 31, 35, 0.38), rgba(16, 31, 35, 0.88));
  }

  .hero-content {
    padding-bottom: 38px;
  }

  .brand {
    min-width: auto;
  }

  .brand-text {
    display: none;
  }

  h1 {
    font-size: clamp(3rem, 18vw, 4.7rem);
  }

  .page,
  .workspace {
    padding: 20px 14px;
  }

  .form-grid,
  .match-card,
  .experience-banner,
  .expanded-profile-hero,
  .chat-composer,
  .progress-topline,
  .detail-list div {
    grid-template-columns: 1fr;
  }

  .step-tabs {
    grid-template-columns: 1fr;
  }

  .step-tabs.seeker-tabs,
  .choice-grid {
    grid-template-columns: 1fr;
  }

  .step-header {
    display: grid;
  }

  .step-actions {
    justify-content: stretch;
  }

  .step-actions .btn {
    flex: 1 1 100%;
  }

  .match-card-side {
    justify-items: stretch;
    padding: 0 18px 18px;
  }

  .compatibility,
  .readiness-score {
    width: 100%;
    height: 52px;
  }

  .readiness-score {
    display: flex;
    justify-content: space-between;
    text-align: left;
  }

  .readiness-score span {
    margin-top: 0;
  }

  .session-pill {
    max-width: 150px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}
