:root {
  --forest: #173f35;
  --forest-deep: #0e2c25;
  --moss: #55755f;
  --sage: #dfe8da;
  --cream: #f5f1e7;
  --paper: #fffdf8;
  --clay: #ba6746;
  --gold: #d2a13a;
  --sky: #d9e9ea;
  --ink: #17312a;
  --muted: #63716b;
  --border: #d8d5c8;
  --danger: #9d352d;
  --danger-soft: #f7dfd8;
  --shadow: 0 18px 55px rgba(23, 49, 42, 0.09);
  --radius: 22px;
  --display: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  --forest: #85bea3;
  --forest-deep: #d7efe3;
  --moss: #9fbaa9;
  --sage: #243d34;
  --cream: #101916;
  --paper: #18251f;
  --clay: #e08a68;
  --gold: #e7bc60;
  --sky: #233c3d;
  --ink: #f4f0e8;
  --muted: #b3c0ba;
  --border: #34483f;
  --danger: #ff9a8e;
  --danger-soft: #472621;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 78px;
  padding: 12px clamp(16px, 4vw, 56px);
  border-bottom: 1px solid color-mix(in srgb, var(--border), transparent 15%);
  background: color-mix(in srgb, var(--cream), transparent 5%);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 16px 16px 16px 5px;
  background: var(--forest-deep);
  color: var(--cream);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -1px;
}

:root[data-theme="dark"] .brand-mark { background: #d7efe3; color: #0e2c25; }

.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { font-family: var(--display); font-size: 22px; line-height: 1.05; }
.brand-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }

.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

.chapter-picker {
  display: grid;
  gap: 1px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--paper);
}

.chapter-picker span { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.chapter-picker select { max-width: 230px; border: 0; outline: 0; background: transparent; color: var(--ink); font-weight: 800; }

.icon-button, .avatar-button {
  min-width: 42px;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--paper);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.avatar-button { border-color: var(--forest); background: var(--forest-deep); color: var(--cream); }
:root[data-theme="dark"] .avatar-button { color: #0e2c25; }

.primary-nav {
  position: sticky;
  top: 78px;
  z-index: 20;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--cream), transparent 4%);
  backdrop-filter: blur(16px);
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 15px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.nav-item span { font-size: 18px; }
.nav-item:hover, .nav-item.active { background: var(--sage); color: var(--forest-deep); }

main { width: min(1180px, calc(100% - 32px)); min-height: 72vh; margin: 0 auto; }
.view { padding: clamp(26px, 5vw, 64px) 0 80px; }
.narrow-view { width: min(920px, 100%); margin: 0 auto; }

.welcome-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: clamp(30px, 7vw, 90px);
  overflow: hidden;
  min-height: 500px;
  margin-bottom: clamp(52px, 8vw, 92px);
  padding: clamp(34px, 6vw, 76px);
  border-radius: 38px 38px 38px 10px;
  background:
    radial-gradient(circle at 88% 18%, rgba(210, 161, 58, 0.33) 0 4%, transparent 4.2%),
    radial-gradient(circle at 92% 25%, rgba(210, 161, 58, 0.18) 0 12%, transparent 12.2%),
    linear-gradient(135deg, #173f35, #204f41 54%, #345f4e);
  box-shadow: var(--shadow);
  color: #fffdf8;
}

.welcome-panel::before,
.welcome-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
}
.welcome-panel::before { width: 420px; height: 420px; right: -170px; bottom: -230px; }
.welcome-panel::after { width: 250px; height: 250px; right: -80px; bottom: -110px; }

.welcome-copy { align-self: center; }
.eyebrow { margin: 0 0 8px; color: var(--clay); font-size: 12px; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; }
.welcome-panel .eyebrow { color: #ecc774; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.05; }
h1, h2 { font-family: var(--display); letter-spacing: -0.035em; }
h1 { margin-bottom: 20px; font-size: clamp(45px, 7vw, 78px); }
h1 em { color: #edc468; font-weight: 400; }
h2 { margin-bottom: 12px; font-size: clamp(27px, 4vw, 38px); }
h3 { margin-bottom: 8px; font-size: 20px; }
.welcome-copy > p:not(.eyebrow) { max-width: 690px; color: #e2eee8; font-size: clamp(17px, 2.2vw, 21px); }

.welcome-actions, .card-actions, .moderation-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 14px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 900;
  line-height: 1.2;
}
.button.primary { background: var(--forest-deep); color: var(--cream); }
.welcome-panel .button.primary { background: #f3ce7b; color: #173f35; }
.button.secondary { border-color: var(--forest); background: var(--paper); color: var(--forest-deep); }
.button.quiet { border-color: var(--border); background: transparent; color: var(--forest-deep); }
.welcome-panel .button.quiet { border-color: rgba(255,255,255,.4); color: #fff; }
.button.danger { border-color: var(--danger); background: transparent; color: var(--danger); }
.button.small-button { min-height: 38px; padding: 8px 12px; font-size: 13px; }
.button.full { width: 100%; }
.button[disabled] { opacity: .52; cursor: not-allowed; }

.next-move {
  align-self: center;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 26px 26px 26px 8px;
  background: rgba(255,255,255,.09);
  backdrop-filter: blur(8px);
}
.next-move .eyebrow { padding: 5px 9px 8px; }
.next-move > button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 13px 9px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.14);
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-align: left;
}
.next-move > button:last-child { border-bottom: 0; }
.next-move > button:hover { border-radius: 14px; background: rgba(255,255,255,.08); }
.next-move > button > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: rgba(255,255,255,.12); color: #f3ce7b; font-size: 18px; font-weight: 950; }
.next-move strong, .next-move small { display: block; }
.next-move small { margin-top: 2px; color: #d5e5dd; line-height: 1.35; }
.next-move b { color: #f3ce7b; font-size: 18px; }

.invitation-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  margin: -48px 0 clamp(52px, 8vw, 86px);
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid var(--border);
  border-radius: 26px 26px 26px 8px;
  background: var(--paper);
  box-shadow: 0 16px 42px rgba(20, 55, 46, .09);
}
.invitation-strip h2 { margin-bottom: 7px; font-size: clamp(25px, 3vw, 33px); }
.invitation-strip p:last-child { margin-bottom: 0; color: var(--muted); }
.invitation-strip .button { min-width: 220px; }

.board-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.filter-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.filter-chip { min-height: 40px; padding: 8px 13px; border: 1px solid var(--border); border-radius: 999px; background: var(--paper); color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 900; }
.filter-chip.active { border-color: var(--forest); background: var(--sage); color: var(--forest-deep); }
.inline-status { padding: 12px 0; color: var(--muted); font-weight: 800; }
.inline-status.error { color: var(--danger); }

.board-glance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 6px 0 32px;
  border: 1px solid var(--border);
  border-radius: 18px 18px 18px 6px;
  background: var(--border);
}
.board-glance > div { padding: 17px 20px; background: var(--paper); }
.board-glance strong, .board-glance span { display: block; }
.board-glance strong { color: var(--forest-deep); font-family: var(--display); font-size: 28px; line-height: 1; }
.board-glance span { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 800; }

.activity-section { margin: 44px 0 62px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; }
.count-pill { min-width: 32px; padding: 5px 10px; border-radius: 999px; background: var(--sage); color: var(--forest-deep); font-size: 13px; font-weight: 950; text-align: center; }
.activity-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }

.activity-card {
  position: relative;
  overflow: hidden;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) var(--radius) 7px;
  background: var(--paper);
  box-shadow: 0 10px 34px rgba(23, 49, 42, 0.055);
}
.activity-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.activity-card, .activity-card:hover { transition: transform .18s ease, box-shadow .18s ease; }
.activity-card.has-cover { display: grid; grid-template-columns: minmax(190px, .55fr) minmax(0, 1.7fr); }
.cover-image { width: 100%; height: 100%; min-height: 250px; object-fit: cover; background: var(--sage); }
.card-color { height: 7px; background: var(--moss); }
.type-project .card-color { background: var(--clay); }
.type-exchange .card-color { background: var(--gold); }
.type-opportunity .card-color { background: #3e747b; }
.card-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr); gap: clamp(20px, 4vw, 48px); padding: clamp(20px, 3vw, 30px); }
.card-main { min-width: 0; }
.card-side { display: flex; flex-direction: column; min-width: 0; }
.card-kicker { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.type-label { color: var(--forest-deep); font-size: 11px; font-weight: 950; letter-spacing: .09em; text-transform: uppercase; }
.status-label { padding: 4px 8px; border-radius: 999px; background: var(--sage); color: var(--forest-deep); font-size: 10px; font-weight: 950; text-transform: uppercase; }
.activity-card h3 { font-family: var(--display); font-size: 25px; }
.activity-card .summary { display: -webkit-box; overflow: hidden; color: var(--muted); -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.card-meta { display: grid; gap: 8px; margin: 0; color: var(--muted); font-size: 13px; }
.card-meta span { display: flex; align-items: center; gap: 8px; }
.card-meta b { color: var(--ink); }
.card-actions { margin-top: 18px; }
.card-actions .button { flex: 1; }
.card-menu { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-weight: 900; }
.outcome-note { margin-top: 14px; padding: 12px; border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; background: var(--sage); color: var(--forest-deep); font-size: 13px; }
.faith-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--moss); font-size: 12px; font-weight: 900; }

.good-section { padding: 32px; border-radius: 28px 28px 28px 8px; background: var(--sage); }
.good-section .count-pill { background: var(--paper); }
.good-section .activity-card { box-shadow: none; }

.panel { border: 1px solid var(--border); border-radius: var(--radius) var(--radius) var(--radius) 7px; background: var(--paper); box-shadow: 0 10px 32px rgba(23,49,42,.04); }
.empty-board { max-width: 650px; margin: 70px auto; padding: 44px; text-align: center; }
.empty-mark { display: grid; width: 62px; height: 62px; margin: 0 auto 18px; place-items: center; border-radius: 50%; background: var(--sage); color: var(--clay); font-size: 28px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.starter-board { margin: 56px 0 20px; }
.starter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.starter-grid button { display: grid; align-content: start; min-height: 205px; padding: 24px; border: 1px solid var(--border); border-radius: 20px 20px 20px 7px; background: var(--paper); color: var(--ink); cursor: pointer; text-align: left; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.starter-grid button:hover { transform: translateY(-3px); border-color: var(--moss); box-shadow: var(--shadow); }
.starter-grid button > span { display: grid; width: 42px; height: 42px; margin-bottom: 28px; place-items: center; border-radius: 13px; background: var(--sage); color: var(--forest-deep); font-size: 20px; font-weight: 950; }
.starter-grid strong, .starter-grid small { display: block; }
.starter-grid strong { font-family: var(--display); font-size: 22px; line-height: 1.08; }
.starter-grid small { margin-top: 8px; color: var(--muted); line-height: 1.45; }
.caught-up { margin: 70px auto 0; text-align: center; color: var(--muted); }
.caught-up > span { display: grid; width: 44px; height: 44px; margin: 0 auto 12px; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--forest); font-weight: 950; }
.caught-up strong { display: block; color: var(--ink); font-family: var(--display); font-size: 25px; }

.page-intro { max-width: 750px; margin-bottom: 30px; }
.page-intro h1 { font-size: clamp(42px, 7vw, 68px); }
.page-intro > p:last-child { max-width: 660px; color: var(--muted); font-size: 18px; }
.form-card, .gate-card { padding: clamp(22px, 4vw, 38px); }
.join-card { border-color: color-mix(in srgb, var(--forest), transparent 35%); box-shadow: var(--shadow); }
.gate-card { margin-bottom: 24px; }
.gate-card h2 { font-size: 30px; }

form { display: grid; gap: 18px; }
label { display: grid; gap: 7px; color: var(--ink); font-size: 14px; font-weight: 900; }
.field-label { margin: 0 0 8px; font-size: 14px; font-weight: 900; }
input, select, textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--cream);
  color: var(--ink);
  padding: 10px 12px;
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted), transparent 15%); }
.form-grid { display: grid; gap: 15px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.type-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.type-picker label { cursor: pointer; }
.type-picker input, .segmented input { position: absolute; opacity: 0; pointer-events: none; }
.type-picker label > span { display: grid; min-height: 90px; align-content: center; padding: 13px; border: 1px solid var(--border); border-radius: 16px; background: var(--cream); color: var(--forest-deep); text-align: center; }
.type-picker label > span small { margin-top: 5px; color: var(--muted); font-weight: 600; }
.type-picker input:checked + span { border: 2px solid var(--forest); background: var(--sage); box-shadow: inset 0 0 0 2px var(--paper); }
.exchange-direction { padding: 20px; border-radius: 16px; background: var(--sage); }
.segmented { display: flex; gap: 8px; }
.segmented label { flex: 1; cursor: pointer; }
.segmented label > span { display: block; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--paper); text-align: center; }
.segmented input:checked + span { border-color: var(--forest); background: var(--forest-deep); color: var(--cream); }
.safety-note { margin-top: 14px; padding: 14px; border-left: 4px solid var(--gold); background: var(--paper); color: var(--muted); font-size: 13px; font-weight: 600; }
.safety-note a { color: var(--forest-deep); font-weight: 900; }
.form-details { border: 1px solid var(--border); border-radius: 15px; background: var(--cream); }
.form-details summary { padding: 14px 16px; cursor: pointer; font-weight: 950; }
.form-details[open] { padding: 0 16px 16px; }
.form-details[open] summary { margin: 0 -16px 14px; }
.checkline { display: flex; align-items: flex-start; gap: 10px; font-weight: 700; }
.checkline input { width: 19px; min-height: 19px; flex: 0 0 19px; margin-top: 2px; accent-color: var(--forest); }
.form-status { min-height: 22px; margin: 0; color: var(--forest-deep); font-size: 13px; font-weight: 850; }
.form-status.error { color: var(--danger); }
.privacy-line { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }
.form-submit-row { display: grid; gap: .65rem; }
.text-link { color: var(--forest-deep); font-weight: 900; }
.handoff-link { display: block; margin-top: 8px; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; text-decoration: underline; }

.auth-grid, .onboarding-grid, .account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.recovery-card { grid-column: 1 / -1; padding: 18px 24px; }
.recovery-card summary { cursor: pointer; color: var(--forest-deep); font-weight: 950; }
.recovery-card[open] summary { margin-bottom: 12px; }
.recovery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 18px; }
.onboarding-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step-card { position: relative; padding: 26px; }
.step-card.complete { opacity: .68; }
.step-card.complete::after { content: "Complete"; position: absolute; top: 18px; right: 18px; padding: 4px 8px; border-radius: 999px; background: var(--sage); color: var(--forest-deep); font-size: 10px; font-weight: 950; text-transform: uppercase; }
.step-number { display: grid; width: 34px; height: 34px; margin-bottom: 16px; place-items: center; border-radius: 50%; background: var(--forest-deep); color: var(--cream); font-weight: 950; }
.account-identity { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; padding: 22px; }
.profile-avatar { display: grid; width: 56px; height: 56px; flex: 0 0 56px; place-items: center; border-radius: 18px 18px 18px 5px; background: var(--forest-deep); color: var(--cream); font-family: var(--display); font-size: 24px; font-weight: 900; }
.account-identity h2 { margin-bottom: 3px; }
.account-identity .button { margin-left: auto; }
.account-grid { margin-top: 20px; }
.notice-list { display: grid; gap: 10px; }
.notice-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.notice-item:last-child { border-bottom: 0; }
.notice-item strong { display: block; }
.notice-item p, .notice-item time { margin: 3px 0 0; color: var(--muted); font-size: 12px; }

.connection-list { display: grid; gap: 14px; }
.connection-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 20px; }
.connection-card h2 { margin-bottom: 6px; font-size: 25px; }
.connection-card p { margin-bottom: 4px; color: var(--muted); }
.connection-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.metric-card { padding: 18px; }
.metric-card strong { display: block; font-family: var(--display); font-size: 34px; }
.metric-card span { color: var(--muted); font-size: 12px; font-weight: 850; }
.steward-grid { display: grid; gap: 18px; }
.steward-grid > .panel { padding: 26px; }
.moderation-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.moderation-item:last-child { border-bottom: 0; }
.moderation-item h3 { font-family: var(--display); font-size: 23px; }
.moderation-item p { color: var(--muted); }
.moderation-actions { margin-top: 10px; }

.safety-intro h1 { color: var(--danger); }
.urgent-card { margin-bottom: 20px; padding: 24px; border: 1px solid color-mix(in srgb, var(--danger), transparent 45%); border-radius: var(--radius); background: var(--danger-soft); color: var(--danger); }
.urgent-card strong { font-family: var(--display); font-size: 26px; }
.urgent-card p { margin: 6px 0 0; }
.safety-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.resource-card { position: relative; overflow: hidden; padding: 28px; }
.resource-card > span { position: absolute; top: 12px; right: 16px; color: var(--sage); font-family: var(--display); font-size: 58px; font-weight: 950; line-height: 1; }
.resource-card p, .resource-card a { position: relative; }
.resource-card .text-link { display: block; margin-top: 14px; font-size: 12px; }
.youth-boundary { margin-top: 20px; padding: clamp(26px, 5vw, 48px); }

.modal { width: min(650px, calc(100% - 24px)); max-height: min(88vh, 820px); overflow: auto; padding: 30px; border: 1px solid var(--border); border-radius: 24px 24px 24px 8px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 100px rgba(0,0,0,.28); }
.toast { position: fixed; z-index: 90; right: 18px; bottom: 88px; max-width: min(420px, calc(100% - 36px)); padding: 14px 18px; border: 1px solid var(--forest); border-radius: 14px 14px 14px 5px; background: var(--forest-deep); color: var(--cream); box-shadow: var(--shadow); font-weight: 850; }
.toast.error { border-color: var(--danger); background: var(--danger); color: #fff; }
.modal::backdrop { background: rgba(8,25,20,.66); backdrop-filter: blur(4px); }
.modal-close { position: sticky; z-index: 2; top: 0; float: right; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 50%; background: var(--paper); cursor: pointer; font-size: 24px; line-height: 1; }
.modal h2 { padding-right: 42px; }
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.detail-list div { padding: 12px; border-radius: 12px; background: var(--cream); }
.detail-list span, .detail-list strong { display: block; }
.detail-list span { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.thread-messages { display: grid; gap: 10px; margin: 18px 0; }
.thread-message { max-width: 85%; padding: 12px 14px; border-radius: 16px 16px 16px 4px; background: var(--sage); }
.thread-message.mine { justify-self: end; border-radius: 16px 16px 4px 16px; background: var(--forest-deep); color: var(--cream); }
.thread-message strong, .thread-message small { display: block; }
.thread-message p { margin: 4px 0; white-space: pre-wrap; }
.thread-message small { color: inherit; opacity: .7; }
.private-location { padding: 14px; border: 1px solid var(--gold); border-radius: 14px; background: color-mix(in srgb, var(--gold), transparent 85%); }

.site-footer { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 20px; align-items: center; padding: 38px clamp(18px, 5vw, 70px) 110px; border-top: 1px solid var(--border); background: var(--paper); color: var(--muted); }
.site-footer strong, .site-footer span { display: block; }
.site-footer strong { color: var(--ink); font-family: var(--display); font-size: 24px; }
.site-footer p { margin: 0; text-align: center; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.site-footer a, .site-footer button { border: 0; background: none; color: var(--forest-deep); cursor: pointer; font-size: 13px; font-weight: 900; text-decoration: none; }

@media (max-width: 920px) {
  .welcome-panel { grid-template-columns: 1fr; min-height: 0; }
  .next-move { max-width: 620px; }
  .invitation-strip { grid-template-columns: 1fr; }
  .invitation-strip .button { width: fit-content; }
  .activity-card.has-cover { grid-template-columns: minmax(160px, .45fr) minmax(0, 1.55fr); }
  .card-body { grid-template-columns: 1fr; gap: 20px; }
  .starter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .type-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .onboarding-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .safety-grid { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; text-align: center; }
  .site-footer nav { justify-content: center; }
}

@media (max-width: 680px) {
  body { padding-bottom: 72px; }
  .site-header { min-height: 68px; padding: 10px 14px; }
  .brand-mark { width: 42px; height: 42px; flex-basis: 42px; border-radius: 14px 14px 14px 5px; }
  .brand-copy strong { font-size: 19px; }
  .brand-copy small { display: none; }
  .chapter-picker { max-width: 140px; padding: 5px 8px; }
  .chapter-picker select { max-width: 120px; font-size: 12px; }
  .icon-button { display: none; }
  .primary-nav { position: fixed; top: auto; right: 0; bottom: 0; left: 0; z-index: 40; justify-content: space-around; gap: 0; padding: 7px max(8px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); border-top: 1px solid var(--border); border-bottom: 0; box-shadow: 0 -12px 32px rgba(23,49,42,.08); }
  .nav-item { display: grid; min-width: 60px; gap: 0; justify-items: center; padding: 5px 8px; font-size: 10px; }
  .nav-item span { font-size: 20px; line-height: 1; }
  main { width: min(100% - 22px, 1180px); }
  .view { padding-top: 20px; padding-bottom: 38px; }
  .welcome-panel { gap: 24px; margin-bottom: 48px; padding: 30px 22px; border-radius: 28px 28px 28px 8px; }
  .welcome-copy h1 { font-size: 44px; }
  .welcome-actions .button { width: 100%; }
  .next-move { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; }
  .next-move .eyebrow { grid-column: 1 / -1; }
  .next-move > button { display: grid; grid-template-columns: 34px 1fr; align-content: start; min-height: 92px; padding: 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; }
  .next-move > button > span { width: 34px; height: 34px; }
  .next-move > button strong { align-self: center; font-size: 13px; line-height: 1.2; }
  .next-move > button small, .next-move > button b { display: none; }
  .invitation-strip { margin-top: -24px; margin-bottom: 48px; }
  .invitation-strip .button { width: 100%; }
  .board-toolbar { align-items: flex-start; flex-direction: column; }
  .filter-row { justify-content: flex-start; overflow-x: auto; width: calc(100vw - 11px); margin-left: 0; padding-right: 18px; flex-wrap: nowrap; scrollbar-width: none; }
  .filter-chip { white-space: nowrap; }
  .board-glance { grid-template-columns: 1fr; }
  .board-glance > div { display: flex; align-items: baseline; gap: 8px; padding: 13px 16px; }
  .activity-card.has-cover { display: block; }
  .cover-image { height: auto; min-height: 0; aspect-ratio: 16 / 8.5; }
  .good-section { margin-inline: -11px; padding: 26px 11px; border-radius: 0; }
  .starter-grid { grid-template-columns: 1fr; }
  .starter-grid button { min-height: 0; grid-template-columns: 46px 1fr; column-gap: 14px; }
  .starter-grid button > span { grid-row: 1 / 3; margin: 0; }
  .form-grid.two, .auth-grid, .account-grid, .recovery-grid { grid-template-columns: 1fr; }
  .type-picker { grid-template-columns: 1fr 1fr; }
  .type-picker label > span { min-height: 82px; font-size: 13px; }
  .account-identity { align-items: flex-start; flex-wrap: wrap; }
  .account-identity .button { width: 100%; margin-left: 0; }
  .connection-card { grid-template-columns: 1fr; }
  .connection-actions { justify-content: flex-start; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal { padding: 22px 18px; }
  .detail-list { grid-template-columns: 1fr; }
  .site-footer { padding-bottom: 40px; }
  .toast { right: 12px; bottom: 86px; left: 12px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
