:root {
  --bg: #f8f2ea;
  --bg-2: #efe3d4;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --ink: #2f2721;
  --muted: #6f6157;
  --soft: #ad9784;
  --line: rgba(95, 71, 54, 0.18);
  --brand: #6f4f37;
  --brand-2: #9b6b43;
  --brand-3: #d7b98f;
  --evergreen: #2f5f28;
  --evergreen-2: #668e43;
  --evergreen-soft: #e7f0dc;
  --cream: #fff8ea;
  --paper: #f6ead8;
  --gold: #b89231;
  --archive-blue: #dceef5;
  --memory-lavender: #eadff1;
  --heirloom-green: #dfead5;
  --success: #2f6f4e;
  --warning: #9a6417;
  --danger: #a63f3f;
  --blue: #476c7a;
  --shadow: 0 22px 60px rgba(47, 39, 33, 0.12);
  --shadow-sm: 0 10px 28px rgba(47, 39, 33, 0.10);
  --shadow-warm: 0 26px 70px rgba(70, 49, 28, .16);
  --radius: 22px;
  --radius-sm: 14px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  background:
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.11) 1px, transparent 1px),
    radial-gradient(circle at top left, rgba(215, 185, 143, 0.42), transparent 36rem),
    radial-gradient(circle at bottom right, rgba(111, 79, 55, 0.16), transparent 34rem),
    linear-gradient(135deg, #fbf6ef 0%, var(--bg) 42%, #efe1cf 100%);
  background-size: 28px 28px, 28px 28px, auto, auto, auto;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 250, 241, .94), rgba(246, 232, 211, .82)),
    radial-gradient(circle at 20% 0%, rgba(102,142,67,.12), transparent 18rem);
  backdrop-filter: blur(18px);
  overflow: auto;
}
.logo-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 86% 14%, rgba(102,142,67,.18), transparent 8rem),
    linear-gradient(145deg, #fffaf4, #f4e5d0);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.logo-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -48px;
  width: 138px;
  height: 138px;
  opacity: .13;
  background:
    radial-gradient(circle at 50% 58%, transparent 0 9px, var(--evergreen) 10px 12px, transparent 13px),
    conic-gradient(from 25deg, transparent 0 18deg, var(--evergreen) 19deg 24deg, transparent 25deg 72deg, var(--evergreen) 73deg 78deg, transparent 79deg);
  border-radius: 50%;
}
.logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--evergreen), var(--brand-2));
  font-family: var(--serif);
  font-size: 22px;
  margin-bottom: 12px;
}
.brand-name { font-family: var(--serif); font-size: 1.42rem; line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
.brand-kicker { color: var(--muted); font-size: 0.82rem; margin: 8px 0 0; line-height: 1.4; }

.role-panel { margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255,255,255,.68); }
.role-panel label { display: block; color: var(--muted); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 8px; }
.role-panel select { width: 100%; border: 1px solid var(--line); background: #fffaf5; color: var(--ink); border-radius: 12px; padding: 11px 12px; }
.role-hint { margin: 10px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.35; }

.mfrr-quick-actions-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,250,243,.96), rgba(248,237,221,.9));
  margin: 14px 0 18px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(70,45,25,.06);
}
.mfrr-quick-actions-title {
  padding: 12px 14px 8px;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: #9a6a43;
  border-bottom: 1px solid var(--line);
}
.mfrr-quick-actions-box a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 850;
  line-height: 1.25;
  white-space: normal;
}
.mfrr-quick-actions-box a:last-child { border-bottom: 0; }
.mfrr-quick-actions-box a:hover,
.mfrr-quick-actions-box a.active {
  background: linear-gradient(90deg, rgba(231,240,220,.88), rgba(255,255,255,.72));
  color: var(--evergreen);
}
.mfrr-quick-actions-box a::after {
  content: '>';
  margin-left: auto;
  color: #8b5e3c;
  font-size: 18px;
  line-height: 1;
}
.mfrr-quick-icon {
  width: 24px;
  text-align: center;
  flex: 0 0 24px;
}

.nav { margin-top: 20px; display: grid; gap: 7px; }
.nav-section { margin: 16px 8px 6px; color: var(--soft); font-size: .72rem; text-transform: uppercase; font-weight: 900; letter-spacing: .08em; }
.nav a { text-decoration: none; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; color: var(--muted); border: 1px solid transparent; font-weight: 700; font-size: .92rem; }
.nav a:hover { background: rgba(255,255,255,.72); color: var(--ink); border-color: var(--line); }
.nav a.active { background: #fff; color: var(--evergreen); border-color: rgba(102,142,67,.26); box-shadow: 0 8px 20px rgba(64,90,42,.10); }
.nav .icon { width: 24px; height: 24px; border-radius: 9px; display: grid; place-items: center; background: rgba(111,79,55,.09); font-size: .85rem; }
.main { min-width: 0; padding: 26px clamp(18px, 3vw, 42px) 60px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 22px; }
.breadcrumb { color: var(--muted); font-weight: 800; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.global-family-search {
  position: relative;
  flex: 0 0 clamp(260px, 32vw, 430px);
  min-width: 260px;
  max-width: 430px;
  z-index: 60;
}
.global-family-search-box {
  position: relative;
  width: 100%;
  height: 46px;
}
.global-family-search-box::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(47,95,40,.62);
  border-radius: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
}
.global-family-search-box::after {
  content: "";
  position: absolute;
  left: 29px;
  top: 29px;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: rgba(47,95,40,.62);
  transform: rotate(45deg);
  pointer-events: none;
  z-index: 1;
}
.global-family-search-input {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(95, 71, 54, 0.18);
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  padding: 0 76px 0 42px;
  outline: none;
}
.global-family-search-input:focus {
  border-color: rgba(47,95,40,.48);
  box-shadow: 0 0 0 4px rgba(102,142,67,.12), var(--shadow-sm);
}
.global-family-search-clear {
  position: absolute;
  right: 8px;
  top: 7px;
  height: 32px;
  min-width: 58px;
  border: 1px solid rgba(111,79,55,.16);
  border-radius: 999px;
  background: rgba(255,250,244,.92);
  color: var(--brand);
  font-size: .78rem;
  font-weight: 900;
}
.global-family-search-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(560px, calc(100vw - 28px));
  max-height: min(70vh, 560px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fffaf5;
  box-shadow: var(--shadow);
  padding: 12px;
}
.global-family-search-group + .global-family-search-group {
  margin-top: 12px;
  border-top: 1px solid rgba(95,71,54,.12);
  padding-top: 12px;
}
.global-family-search-group h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.global-family-search-items {
  display: grid;
  gap: 8px;
}
.global-family-search-result {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(95,71,54,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.74);
  color: var(--ink);
  text-align: left;
}
.global-family-search-result:hover,
.global-family-search-result:focus {
  background: #fff;
  border-color: rgba(111,79,55,.28);
  outline: none;
}
.global-family-search-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.global-family-search-copy b,
.global-family-search-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.global-family-search-copy b {
  white-space: nowrap;
}
.global-family-search-copy span {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.global-family-search-open {
  color: var(--brand);
  font-size: .78rem;
  font-weight: 900;
}
.global-family-search-empty {
  padding: 16px;
  color: var(--muted);
  line-height: 1.45;
}
.need-a-hand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(116, 87, 65, .18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(102,142,67,.14), transparent 12rem),
    linear-gradient(135deg, #fffaf5, #f7ebd9);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
  margin: 0 0 18px;
}
.need-a-hand-panel::before {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 14px;
  width: 74px;
  height: 74px;
  opacity: .13;
  background: radial-gradient(circle at 50% 68%, transparent 0 7px, var(--evergreen) 8px 10px, transparent 11px), conic-gradient(from 15deg, transparent 0 20deg, var(--evergreen) 21deg 27deg, transparent 28deg 80deg, var(--evergreen) 81deg 87deg, transparent 88deg);
  border-radius: 50%;
  pointer-events: none;
}
.need-a-hand-panel p {
  margin: 0;
}
.need-a-hand-panel p + p {
  margin-top: 6px;
  color: var(--muted);
}
.need-a-hand-panel .actions {
  flex: 0 0 auto;
  margin-top: 0;
  justify-content: flex-end;
}
.user-menu { position: relative; flex: 0 0 auto; }
.user-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-chip { display: inline-flex; align-items: center; gap: 10px; padding: 10px 13px; background: rgba(255,255,255,.76); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-sm); }
.user-chip::after { content: '⌄'; color: var(--muted); font-weight: 900; margin-left: 2px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(145deg, #815d42, #d4b381); color: #fff; display: grid; place-items: center; font-weight: 900; }
.user-chip b { display: block; line-height: 1; font-size: .92rem; }
.user-chip span { color: var(--muted); font-size: .76rem; }
.user-menu-panel { position: absolute; z-index: 50; right: 0; top: calc(100% + 8px); width: min(280px, calc(100vw - 28px)); display: grid; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: #fffaf5; box-shadow: var(--shadow); }
.user-menu-account { display: grid; gap: 3px; padding: 8px 4px 10px; border-bottom: 1px solid rgba(95,71,54,.12); }
.user-menu-account span, .user-menu-account small { color: var(--muted); font-size: .76rem; }
.user-menu-account b { overflow-wrap: anywhere; }
.preview-banner { margin: 0 0 18px; }
.preview-mode-banner { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; padding: 14px 16px; border: 1px solid rgba(71,108,122,.24); border-radius: var(--radius); background: rgba(232,244,248,.92); color: #274c58; box-shadow: var(--shadow-sm); }
.preview-mode-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 16px; background: rgba(71,108,122,.14); font-size: 1.25rem; }
.preview-mode-copy { flex: 1 1 auto; min-width: 0; }
.preview-mode-copy .eyebrow { margin: 0 0 6px; color: #274c58; }
.preview-mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.preview-mode-grid span { display: block; color: var(--muted); font-size: .76rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.preview-mode-grid b { display: block; margin-top: 2px; overflow-wrap: anywhere; }
.modal-backdrop { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 22px; background: rgba(34,25,20,.56); }
.modal-card { width: min(520px, 100%); border: 1px solid var(--line); border-radius: var(--radius); background: #fffaf5; box-shadow: var(--shadow); padding: 22px; }
.modal-card h2 { margin: 0; font-family: var(--serif); font-size: 2rem; }
.modal-card p { color: var(--muted); line-height: 1.55; }
.sign-out-card .actions .btn { min-width: 120px; }

.hero { position: relative; overflow: hidden; border-radius: 30px; padding: clamp(24px, 4vw, 42px); background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(244,226,205,.9)); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 58%, rgba(255,255,255,.4) 58% 59%, transparent 59%),
    radial-gradient(circle at 92% 18%, rgba(102,142,67,.17), transparent 13rem);
  pointer-events: none;
}
.hero::after { content: ""; position: absolute; inset: auto -80px -120px auto; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(215,185,143,.48), transparent 66%); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { margin: 0; max-width: 850px; font-family: var(--serif); font-size: clamp(2rem, 4vw, 4.4rem); line-height: .96; letter-spacing: 0; color: #203d1b; }
.hero p { max-width: 780px; margin: 18px 0 0; color: var(--muted); font-size: 1.03rem; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.evergreen-hero-banner {
  min-height: 250px;
  display: grid;
  align-content: center;
  background:
    linear-gradient(90deg, rgba(255,248,234,.98), rgba(255,248,234,.82) 48%, rgba(231,240,220,.38)),
    radial-gradient(circle at 86% 20%, rgba(184,146,49,.23), transparent 10rem),
    linear-gradient(135deg, #fffaf2, #e7f0dc);
}
.evergreen-hero-banner::after {
  width: 420px;
  height: 420px;
  background:
    radial-gradient(circle at 58% 68%, transparent 0 22px, rgba(47,95,40,.26) 23px 26px, transparent 27px),
    conic-gradient(from -18deg, transparent 0 18deg, rgba(47,95,40,.24) 19deg 25deg, transparent 26deg 66deg, rgba(102,142,67,.22) 67deg 74deg, transparent 75deg 140deg, rgba(184,146,49,.20) 141deg 147deg, transparent 148deg),
    radial-gradient(circle, rgba(244,226,205,.68), transparent 66%);
  opacity: .9;
}
.evergreen-hero-banner .workflow-role-label {
  width: fit-content;
  border: 1px solid rgba(47,95,40,.20);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: var(--evergreen);
  padding: 8px 12px;
}
.evergreen-kicker {
  margin-top: 10px;
  color: var(--brand);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}
.evergreen-page-header {
  background:
    radial-gradient(circle at 100% 0%, rgba(102,142,67,.14), transparent 12rem),
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(246,234,216,.9));
}
.evergreen-journey-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.evergreen-journey-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 22px;
  border: 1px solid rgba(95,71,54,.13);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}
.evergreen-journey-card:nth-child(1) { background: linear-gradient(145deg, #e4f4fb, #f7fbfd); }
.evergreen-journey-card:nth-child(2) { background: linear-gradient(145deg, #fff1bd, #fffaf0); }
.evergreen-journey-card:nth-child(3) { background: linear-gradient(145deg, #eadff1, #fff8fa); }
.evergreen-journey-card:nth-child(4) { background: linear-gradient(145deg, #dfead5, #fbfff6); }
.evergreen-journey-card::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -34px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255,255,255,.42);
}
.evergreen-journey-number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(47,95,40,.88);
  color: #fff;
  font-weight: 900;
  position: relative;
  z-index: 1;
}
.evergreen-journey-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin: 16px auto 10px;
  border-radius: 22px;
  background: rgba(255,255,255,.58);
  color: var(--evergreen);
  font-size: 1.5rem;
  position: relative;
  z-index: 1;
}
.evergreen-journey-card h3,
.evergreen-journey-card p {
  position: relative;
  z-index: 1;
  text-align: center;
}
.evergreen-journey-card h3 { margin: 0; font-size: 1.06rem; }
.evergreen-journey-card p { margin: 8px 0 0; color: #2d4035; line-height: 1.5; }
.evergreen-story-card,
.evergreen-archive-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,250,244,.96), rgba(255,250,244,.70)),
    radial-gradient(circle at 90% 50%, rgba(47,95,40,.14), transparent 14rem);
}
.evergreen-story-card::after,
.evergreen-archive-card::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(34%, 240px);
  background:
    linear-gradient(135deg, rgba(246,234,216,.26), rgba(102,142,67,.16)),
    repeating-linear-gradient(10deg, rgba(111,79,55,.08) 0 1px, transparent 1px 14px);
  pointer-events: none;
}
.evergreen-activity-card .timeline-item {
  border-radius: 16px;
  padding: 10px;
  background: rgba(255,250,244,.64);
}
.evergreen-empty-state,
.friendly-empty {
  border: 1px dashed rgba(95,71,54,.20);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 0%, rgba(102,142,67,.10), transparent 10rem),
    rgba(255,250,244,.72);
}
.evergreen-image-slot {
  min-height: 150px;
  border-radius: 22px;
  border: 1px solid rgba(95,71,54,.12);
  background:
    radial-gradient(circle at 25% 35%, rgba(255,255,255,.65), transparent 3rem),
    linear-gradient(135deg, rgba(246,234,216,.88), rgba(223,234,213,.86)),
    repeating-linear-gradient(90deg, rgba(111,79,55,.08) 0 1px, transparent 1px 12px);
}
.evergreen-sidebar-memory {
  margin: 16px 0 18px;
  overflow: hidden;
  border: 1px solid rgba(95,71,54,.14);
  border-radius: 20px;
  background: rgba(255,250,244,.78);
  box-shadow: var(--shadow-sm);
}
.evergreen-sidebar-memory .evergreen-image-slot {
  min-height: 110px;
  border: 0;
  border-radius: 0;
}
.evergreen-sidebar-memory p {
  margin: 0;
  padding: 14px;
  color: var(--brand);
  font-family: var(--serif);
  font-style: italic;
  line-height: 1.35;
}
.btn { border: 1px solid transparent; border-radius: 999px; padding: 11px 16px; font-weight: 900; display: inline-flex; gap: 9px; align-items: center; justify-content: center; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: linear-gradient(145deg, var(--evergreen), var(--evergreen-2)); color: #fff; box-shadow: 0 12px 26px rgba(47,95,40,.22); }
.btn.secondary { background: rgba(255,255,255,.82); color: var(--brand); border-color: var(--line); }
.btn.ghost { background: transparent; color: var(--brand); border-color: rgba(111,79,55,.18); }
.btn.danger { background: rgba(166,63,63,.10); color: var(--danger); border-color: rgba(166,63,63,.22); }
.btn.success { background: rgba(47,111,78,.12); color: var(--success); border-color: rgba(47,111,78,.22); }
.btn.small { padding: 8px 11px; font-size: .82rem; }
.btn:disabled { opacity: .48; cursor: not-allowed; transform: none; box-shadow: none; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.access-action-list { display: grid; grid-template-columns: 1fr; gap: 8px; align-items: stretch; min-width: 150px; max-width: 190px; }
.access-action-list .btn { width: 100%; min-height: 38px; white-space: normal; line-height: 1.15; padding-inline: 12px; }
.family-access-table { min-width: 980px; table-layout: fixed; }
.family-access-table th:nth-child(1), .family-access-table td:nth-child(1) { width: 52%; }
.family-access-table th:nth-child(2), .family-access-table td:nth-child(2) { width: 12%; }
.family-access-table th:nth-child(3), .family-access-table td:nth-child(3) { width: 14%; }
.family-access-table th:nth-child(4), .family-access-table td:nth-child(4) { width: 22%; }
.invite-note-details { margin-top: 6px; color: var(--muted); }
.invite-note-details summary { cursor: pointer; font-size: .82rem; font-weight: 900; color: var(--brand); }
.invite-note-details .sub { max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
.card ul, .card ol { margin: 12px 0 0 1.2rem; padding: 0; color: var(--muted); line-height: 1.55; }
.card li { margin: 7px 0; }
.card li b { color: var(--ink); }
.access-include-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.access-include-panel { border: 1px solid rgba(95,71,54,.13); border-radius: var(--radius-sm); background: rgba(255,250,244,.76); padding: 14px; min-width: 0; }
.access-include-panel h2, .access-include-panel h3 { margin: 0; }
.access-include-list { margin: 12px 0 0 1.1rem; padding: 0; color: var(--muted); line-height: 1.55; }
.access-include-list li { margin: 7px 0; }

.grid { display: grid; gap: 18px; }
.grid.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: minmax(0, 1fr) minmax(330px, .46fr); }
.section { margin-top: 22px; }
.card { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.card.strong { background: linear-gradient(145deg, var(--surface-strong), rgba(255,250,244,.94)); }
.card h2, .card h3 { margin: 0; letter-spacing: -.02em; }
.card h2 { font-family: var(--serif); font-size: 1.68rem; }
.card h3 { font-size: 1.02rem; }
.card p { color: var(--muted); line-height: 1.55; }
.metric { padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(255,250,244,.78)); box-shadow: var(--shadow-sm); }
.metric .label { color: var(--muted); font-size: .78rem; text-transform: uppercase; font-weight: 900; letter-spacing: .08em; }
.metric .num { margin-top: 8px; font-family: var(--serif); font-size: 2.3rem; line-height: 1; letter-spacing: -.05em; }
.metric .note { margin-top: 9px; color: var(--muted); font-size: .82rem; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-grid.full { grid-template-columns: 1fr; }
.field { display: grid; gap: 7px; }
.field label { color: var(--muted); font-size: .78rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.field input, .field select, .field textarea { border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px; color: var(--ink); background: rgba(255,255,255,.9); outline: none; min-width: 0; }
.field textarea { min-height: 130px; resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(111,79,55,.48); box-shadow: 0 0 0 4px rgba(111,79,55,.08); }
.help-text { color: var(--muted); font-size: .82rem; line-height: 1.45; margin: 6px 0 0; }
.file-drop { position: relative; min-height: 138px; display: grid; place-items: center; text-align: center; border: 1.5px dashed rgba(111,79,55,.35); border-radius: var(--radius); background: rgba(255,250,244,.75); padding: 20px; }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop .big { font-size: 2.2rem; margin-bottom: 8px; }
.file-drop b { display: block; }
.file-drop span { color: var(--muted); font-size: .86rem; }

.grid > *, .card, .metric, .notice, .hero { min-width: 0; }
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.72); }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid rgba(95,71,54,.12); vertical-align: top; }
th { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; background: rgba(247,238,226,.68); }
tr:last-child td { border-bottom: 0; }
td .title { font-weight: 900; }
td .sub { color: var(--muted); font-size: .82rem; margin-top: 3px; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 9px; font-size: .76rem; font-weight: 900; border: 1px solid transparent; white-space: nowrap; }
.badge.neutral { background: rgba(111,79,55,.10); color: var(--brand); border-color: rgba(111,79,55,.12); }
.badge.blue { background: rgba(71,108,122,.12); color: var(--blue); border-color: rgba(71,108,122,.18); }
.badge.warn { background: rgba(154,100,23,.12); color: var(--warning); border-color: rgba(154,100,23,.22); }
.badge.good { background: rgba(47,111,78,.12); color: var(--success); border-color: rgba(47,111,78,.20); }
.badge.bad { background: rgba(166,63,63,.10); color: var(--danger); border-color: rgba(166,63,63,.20); }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 9px; background: rgba(111,79,55,.08); color: var(--brand); font-size: .77rem; font-weight: 800; }

.review-card { display: grid; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.82); }
.review-source-context { display: grid; gap: 12px; border: 1px solid rgba(71,108,122,.18); border-radius: 18px; padding: 14px; background: rgba(244,250,247,.82); }
.source-thumbnail { border: 1px solid rgba(95,71,54,.13); border-radius: 16px; overflow: hidden; background: #fff; max-height: 260px; display: grid; place-items: center; }
.source-thumbnail img { width: 100%; max-height: 260px; object-fit: contain; display: block; }
.review-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.review-head h3 { margin: 0; }
.review-meta { color: var(--muted); font-size: .83rem; line-height: 1.5; }
.extraction-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.extraction-box { border: 1px solid rgba(95,71,54,.13); border-radius: 16px; padding: 13px; background: rgba(248,242,234,.66); }
.extraction-box b { display: block; font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 8px; }
.empty { text-align: center; padding: 38px 18px; color: var(--muted); }
.empty .emoji { font-size: 2.5rem; display: block; margin-bottom: 10px; }
.notice { border: 1px solid rgba(154,100,23,.22); background: rgba(255,245,229,.86); color: #6c4310; border-radius: var(--radius); padding: 14px 16px; line-height: 1.55; }
.notice.good { border-color: rgba(47,111,78,.2); background: rgba(235,249,240,.82); color: #214f38; }
.notice.blue { border-color: rgba(71,108,122,.2); background: rgba(232,244,248,.82); color: #274c58; }
.timeline { display: grid; gap: 12px; }
.timeline-item { display: grid; grid-template-columns: 34px 1fr; gap: 12px; }
.dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(111,79,55,.12); color: var(--brand); font-weight: 900; }
.timeline-title { font-weight: 900; }
.timeline-note { color: var(--muted); font-size: .88rem; line-height: 1.45; margin-top: 3px; }

.profile-card { display: grid; gap: 16px; }
.profile-row { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid rgba(95,71,54,.12); }
.profile-row:last-child { border-bottom: 0; }
.profile-row span { color: var(--muted); }
.profile-row b { text-align: right; }

.mobile-toggle { display: none; }
@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .nav { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .nav-section { grid-column: 1 / -1; }
  .grid.cards-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid.two, .section.grid.two { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .app-shell { display: flex; flex-direction: column; }
  .main { order: 1; }
  .sidebar { order: 2; }
  .main { padding: 18px 14px 44px; }
  .topbar { align-items: stretch; flex-direction: column; }
  .global-family-search {
    order: -1;
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
    width: 100%;
  }
  .global-family-search-panel {
    left: 0;
    right: auto;
    width: 100%;
    max-height: 62vh;
  }
  .global-family-search-result {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }
  .global-family-search-result .badge,
  .global-family-search-open {
    justify-self: start;
  }
  .need-a-hand-panel {
    align-items: stretch;
    flex-direction: column;
  }
  .need-a-hand-panel .actions {
    justify-content: stretch;
  }
  .need-a-hand-panel .btn {
    width: 100%;
  }
  .user-menu { align-self: flex-start; max-width: 100%; }
  .user-menu-panel { left: 0; right: auto; }
  .preview-mode-banner { align-items: stretch; flex-direction: column; }
  .preview-mode-grid { grid-template-columns: 1fr; }
  .preview-mode-banner .btn { width: 100%; }
  .nav { grid-template-columns: 1fr; }
  .grid.cards-4, .grid.cards-3, .form-grid, .extraction-grid { grid-template-columns: 1fr; }
  .hero { border-radius: 22px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
}
@media print {
  .sidebar, .topbar, .hero-actions, .btn { display: none !important; }
  body { background: #fff; }
  .app-shell { display: block; }
  .card, .hero, .metric { box-shadow: none; border-color: #ddd; }
}

/* Admin Review Upgrade */
.review-layout { align-items: start; grid-template-columns: minmax(0, 1fr); }
.review-workbench-card { background: rgba(255,255,255,.94); }
.review-badges { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.review-workbench { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(320px, 1.15fr); gap: 14px; align-items: start; }
.review-layout > .grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.review-workbench-card { min-width: 0; }
.review-workbench-card .source-panel { min-width: 0; }
.review-workbench-card .review-source-context {
  grid-template-columns: minmax(220px, 320px) minmax(320px, 1fr);
  grid-template-areas:
    "header header"
    "image facts"
    "note note"
    "basket basket"
    "actions actions";
  align-items: start;
}
.review-workbench-card .review-source-context > .review-head { grid-area: header; min-width: 0; }
.review-workbench-card .review-source-context > .source-thumbnail { grid-area: image; width: 100%; max-height: 320px; }
.review-workbench-card .review-source-context > .source-thumbnail img { max-height: 320px; }
.review-workbench-card .review-source-context > .fact-grid.compact {
  grid-area: facts;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-width: 0;
}
.review-workbench-card .review-source-context > .source-preview { grid-area: note; min-width: 0; }
.review-workbench-card .review-source-context > .notice.good { grid-area: basket; min-width: 0; }
.review-workbench-card .review-source-context > .actions { grid-area: actions; }
.review-workbench-card .review-source-context .source-fact {
  grid-template-columns: minmax(120px, 150px) minmax(0, 1fr);
}
.review-workbench-card .review-source-context .source-fact b {
  overflow-wrap: break-word;
  word-break: normal;
}
.source-panel { border: 1px solid rgba(95,71,54,.13); border-radius: 18px; padding: 14px; background: rgba(255,250,244,.78); display: grid; gap: 10px; }
.source-panel h4 { margin: 0 0 4px; font-size: .96rem; letter-spacing: -.01em; }
.source-fact { display: grid; grid-template-columns: 112px 1fr; gap: 8px; padding: 9px 0; border-bottom: 1px solid rgba(95,71,54,.10); }
.source-fact:last-of-type { border-bottom: 0; }
.source-fact span { color: var(--muted); font-size: .75rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.source-fact b { font-size: .86rem; line-height: 1.35; overflow-wrap: anywhere; }
.source-preview { border-radius: 15px; background: rgba(255,255,255,.74); border: 1px solid rgba(95,71,54,.10); padding: 12px; }
.source-preview b { display: block; color: var(--muted); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 7px; }
.source-preview p { margin: 0; color: var(--ink); font-size: .86rem; line-height: 1.55; max-height: 190px; overflow: auto; }
.extraction-panel { background: rgba(248,242,234,.76); }
.review-fields { grid-template-columns: repeat(2, minmax(0,1fr)); }
.decision-panel { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 2px; }
.audit-box { border: 1px solid rgba(95,71,54,.13); background: rgba(255,255,255,.70); border-radius: 16px; padding: 12px 14px; }
.audit-box summary { cursor: pointer; font-weight: 900; color: var(--brand); }
.audit-box .timeline { margin-top: 12px; }
.status-guide { display: grid; gap: 10px; margin-top: 14px; }
.status-guide > div { display: grid; grid-template-columns: max-content 1fr; gap: 10px; align-items: center; }
.status-guide span { color: var(--muted); line-height: 1.35; font-size: .9rem; }
@media (max-width: 920px) {
  .review-workbench-card .review-source-context {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "image"
      "facts"
      "note"
      "basket"
      "actions";
  }
  .review-workbench-card .review-source-context .source-fact { grid-template-columns: 1fr; gap: 3px; }
  .review-workbench { grid-template-columns: 1fr; }
  .review-fields { grid-template-columns: 1fr; }
  .source-fact { grid-template-columns: 1fr; gap: 3px; }
}

/* Reports Center Foundation */
.report-builder-grid { align-items: start; }
.report-output-card { overflow: hidden; }
.report-preview { background: #fdfaf5; border: 1px solid rgba(95,71,54,.16); border-radius: 22px; padding: 18px; }
.report-sheet { max-width: 920px; margin: 0 auto; background: #fff; border: 1px solid rgba(95,71,54,.14); border-radius: 20px; padding: clamp(18px, 3vw, 34px); box-shadow: 0 14px 40px rgba(47,39,33,.08); }
.report-header { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; padding-bottom: 18px; border-bottom: 2px solid rgba(111,79,55,.20); }
.report-header .eyebrow { margin: 0 0 6px; color: var(--brand); text-transform: uppercase; letter-spacing: .12em; font-weight: 900; font-size: .75rem; }
.report-header h1 { margin: 0; font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.05em; line-height: 1; }
.report-header p { margin: 10px 0 0; color: var(--muted); line-height: 1.4; }
.report-stamp { border: 1px solid rgba(111,79,55,.22); color: var(--brand); border-radius: 999px; padding: 9px 12px; font-weight: 900; font-size: .78rem; white-space: nowrap; background: rgba(248,242,234,.74); }
.report-summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin: 18px 0; }
.report-summary-strip > div { border: 1px solid rgba(95,71,54,.12); border-radius: 16px; padding: 12px; background: rgba(248,242,234,.62); }
.report-summary-strip b { display: block; font-family: var(--serif); font-size: 1.8rem; line-height: 1; }
.report-summary-strip span { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 900; }
.report-section { margin-top: 22px; }
.report-section h2 { font-family: var(--serif); font-size: 1.45rem; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid rgba(95,71,54,.14); }
.report-section p, .report-section li { color: var(--muted); line-height: 1.55; }
.report-item { break-inside: avoid; border: 1px solid rgba(95,71,54,.12); border-radius: 16px; padding: 13px; background: rgba(255,250,244,.72); margin: 10px 0; }
.report-item b { color: var(--ink); }
.report-item p { margin: 7px 0 0; }
.report-footer { margin-top: 24px; padding-top: 14px; border-top: 1px solid rgba(95,71,54,.14); color: var(--muted); font-size: .82rem; line-height: 1.45; }
@media (max-width: 720px) {
  .report-header { flex-direction: column; }
  .report-summary-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .report-stamp { white-space: normal; }
}
@media print {
  .report-output-card { border: 0 !important; padding: 0 !important; box-shadow: none !important; }
  .report-output-card > .review-head, .report-builder-grid, .section.card:has(.table-wrap) { display: none !important; }
  .report-preview { border: 0 !important; padding: 0 !important; background: #fff !important; }
  .report-sheet { max-width: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
  .report-item, .report-summary-strip > div { background: #fff; }
}

/* Family Access + Permissions Upgrade */
.access-mark { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; border-radius: 999px; padding: 5px 9px; font-size: .76rem; font-weight: 900; border: 1px solid rgba(95,71,54,.14); }
.access-mark.yes { color: #315b3d; background: rgba(69, 139, 82, .12); }
.access-mark.no { color: #8a332d; background: rgba(188, 74, 60, .12); }
.access-mark.limited { color: #72523a; background: rgba(177, 130, 82, .14); }
.table-wrap code { background: rgba(95,71,54,.08); border: 1px solid rgba(95,71,54,.12); padding: 4px 7px; border-radius: 8px; font-weight: 900; color: var(--brand); }

/* Secure Data + File Storage Foundation */
.metric .num.small-num { font-size: clamp(1.9rem, 3vw, 2.7rem); letter-spacing: -.04em; }
.profile-row b { overflow-wrap: anywhere; }

/* AI/OCR Backend Processing Readiness */
.ai-processing-layout { align-items: start; }
.job-grid { display: grid; gap: 14px; }
.job-card { background: rgba(255,255,255,.92); }
.job-facts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px 14px; }
.compact-categories { grid-template-columns: repeat(3, minmax(0,1fr)); }
.category-mini { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.category-mini b { margin: 0; }
@media (max-width: 920px) {
  .job-facts, .compact-categories { grid-template-columns: 1fr; }
}

/* Evidence + Person Linking */
.field.full, .form-grid .full { grid-column: 1 / -1; }
.check-row { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .9rem; line-height: 1.45; border: 1px solid rgba(95,71,54,.12); background: rgba(255,255,255,.72); border-radius: 14px; padding: 12px 13px; }
.check-row input { margin-top: 3px; }
.mini-timeline { display: grid; gap: 8px; margin-top: 10px; }
.evidence-timeline-item { display: grid; grid-template-columns: 78px 1fr; gap: 12px; border: 1px solid rgba(95,71,54,.12); background: rgba(255,250,244,.72); border-radius: 15px; padding: 12px; }
.evidence-timeline-item .year { color: var(--brand); font-family: var(--serif); font-size: 1.08rem; font-weight: 900; line-height: 1.1; }
.evidence-timeline-item p { margin: 4px 0 8px; color: var(--muted); font-size: .86rem; line-height: 1.4; }
.actions.compact { gap: 6px; }
.actions.compact .btn { padding: 7px 9px; }
@media (max-width: 720px) {
  .evidence-timeline-item { grid-template-columns: 1fr; }
}

/* People + Relationship Management Upgrade */
.people-layout { align-items: start; }
.people-card-grid { display: grid; gap: 14px; margin-top: 16px; }
.person-card { border: 1px solid rgba(95,71,54,.14); border-radius: 20px; padding: 16px; background: rgba(255,255,255,.88); box-shadow: 0 12px 28px rgba(47,39,33,.06); }
.person-card h4 { margin: 14px 0 8px; color: var(--brand); font-size: .9rem; text-transform: uppercase; letter-spacing: .07em; }
.person-facts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin: 12px 0; }
.person-facts > div { border: 1px solid rgba(95,71,54,.10); background: rgba(255,250,244,.72); border-radius: 13px; padding: 10px; }
.person-facts span { display: block; color: var(--muted); font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.person-facts b { display: block; color: var(--ink); font-size: .88rem; line-height: 1.35; overflow-wrap: anywhere; }
.person-private-note { border: 1px solid rgba(111,79,55,.18); background: rgba(248,242,234,.72); border-radius: 14px; padding: 11px 12px; color: var(--muted); font-size: .88rem; line-height: 1.45; margin: 10px 0; }
.relationship-tags { max-height: 260px; overflow: auto; padding-right: 4px; }
@media (max-width: 720px) {
  .person-facts { grid-template-columns: 1fr; }
}

/* Private Vault + Sensitive Records Control */
.vault-layout { align-items: start; }
.vault-card-grid { display: grid; gap: 14px; }
.vault-item-card { background: rgba(255,255,255,.92); }

/* v35 AI Intake + Family Group Review Improvements */
.fact-grid.compact { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.family-group-card .notice { margin-top: 12px; }
.notice.warn { background: rgba(181, 94, 45, .10); border-color: rgba(181, 94, 45, .24); color: #6f3d1f; }
.notice.warn ul { margin: 8px 0 0 18px; padding: 0; }
.notice.blue { background: rgba(71, 112, 148, .10); border-color: rgba(71, 112, 148, .22); }
.source-preview { white-space: pre-wrap; line-height: 1.55; color: var(--ink); }
.field select:disabled, .field input:disabled { opacity: .68; cursor: not-allowed; }
@media (max-width: 920px) { .fact-grid.compact { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .fact-grid.compact { grid-template-columns: 1fr; } }

/* v36 Role-based Workflow Dashboard + Menu Design */
.workflow-role-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 10px;
  margin-bottom: 14px;
  color: var(--brand);
  background: rgba(111,79,55,.09);
  border: 1px solid rgba(111,79,55,.14);
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.workflow-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.workflow-panel .review-head { margin-bottom: 10px; }
.workflow-step-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.workflow-step-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(95,71,54,.14);
  border-radius: 20px;
  background: rgba(255,250,244,.74);
}
.workflow-step-number {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--brand-2));
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(111,79,55,.18);
}
.workflow-step-body h3 {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: -.02em;
}
.workflow-step-body p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}
.workflow-step-actions { margin-top: 12px; }
.nav-section {
  border-top: 1px solid rgba(95,71,54,.10);
  padding-top: 13px;
}
.nav-section:first-child {
  border-top: 0;
  padding-top: 0;
}
@media (max-width: 1080px) {
  .workflow-status-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .evergreen-journey-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .workflow-status-strip { grid-template-columns: 1fr; }
  .evergreen-journey-grid { grid-template-columns: 1fr; }
  .workflow-step-card { grid-template-columns: 1fr; }
  .workflow-step-number { width: 38px; height: 38px; }
  .evergreen-hero-banner { min-height: auto; }
  .evergreen-journey-card { min-height: 0; }
}

/* v37 Admin/Super Admin control cleanup */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}
.archive-panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  padding: 14px 16px;
}
.archive-panel summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--brown);
}
.archive-panel[open] summary {
  margin-bottom: 12px;
}
.btn.danger,
.btn.small.danger {
  border-color: #efb5b1;
  background: #fff0ef;
  color: #aa3939;
}

/* v38 source/submission clarity */
.source-panel h4 small, .submission-details-box h4 small { display:block; margin-top:3px; color: var(--muted); font-size:.72rem; font-weight:800; letter-spacing:0; text-transform:none; }
.submission-details-box { border: 1px solid rgba(71,108,122,.18); background: rgba(232,244,248,.52); border-radius: 18px; padding: 14px; display:grid; gap: 8px; }
.submission-details-box h4 { margin: 0 0 4px; }
.compact-note { font-size:.92rem; padding: 10px 12px; }
.census-helper-card { border: 1px solid rgba(95,71,54,.12); border-radius: 18px; padding: 14px; background: rgba(255,250,244,.72); margin-top: 14px; }
.census-helper-card h3 { margin:0 0 6px; }
.census-helper-card .help-text { margin-bottom: 12px; }
.source-preview p { white-space: pre-wrap; }


/* v40 Duplicate Review & Recommendations */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin: 14px 0;
}
.compare-card {
  border: 1px solid rgba(121, 85, 54, 0.18);
  border-radius: 18px;
  background: rgba(255, 250, 244, 0.82);
  padding: 14px;
}
.compare-card h4 {
  margin: 4px 0 8px;
}
.compare-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.duplicate-card {
  border-left: 6px solid rgba(166, 108, 34, 0.28);
}
.duplicate-card .compare-card .label {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  color: var(--muted);
  font-weight: 800;
}
