/* =====================================================================
   Postpartum+ design system
   Warm, calm, modern consumer-health styling. One palette, one type scale,
   reusable components. Mobile is a first-class layout, not a fallback.
   ===================================================================== */

/* ---------- Tokens ---------------------------------------------------- */
:root {
  --paper: #faf7f2;
  --paper-2: #f3eee6;
  --paper-3: #ebe4d9;
  --surface: #ffffff;
  --ink: #1b2a26;
  --ink-2: #3d4c47;
  --muted: #5a655f;
  --brand: #1f4d40;
  --brand-600: #2a6353;
  --brand-700: #173b31;
  --brand-800: #112b24;
  --brand-soft: #e3eee7;
  --brand-tint: #f1f6f2;
  --accent: #c3664c;
  --accent-600: #ab5540;
  --accent-soft: #f8e7df;
  --gold-soft: #f6ecd6;
  --sky-soft: #e6eff2;
  --line: rgba(27, 42, 38, 0.12);
  --line-strong: rgba(27, 42, 38, 0.24);
  --danger: #a4372c;
  --danger-soft: #fbe8e4;
  --success: #2b6b53;
  --success-soft: #e2f0e8;
  --warn-soft: #fbf1d6;
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow-xs: 0 1px 2px rgba(27, 42, 38, 0.05);
  --shadow-sm: 0 2px 6px rgba(27, 42, 38, 0.06), 0 1px 2px rgba(27, 42, 38, 0.04);
  --shadow: 0 12px 32px rgba(27, 42, 38, 0.09);
  --shadow-lg: 0 28px 70px rgba(27, 42, 38, 0.18);
  --font-display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;
  --tap: 44px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Reset + base --------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}
body.has-modal,
body.has-drawer {
  overflow: hidden;
}
img,
svg,
video {
  max-width: 100%;
  display: block;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
a {
  color: var(--brand);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--brand-700);
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0 0 0.45em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.35rem, 4.6vw, 3.6rem);
  font-variation-settings: "opsz" 144, "SOFT" 40;
  letter-spacing: -0.025em;
}
h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  font-variation-settings: "opsz" 96, "SOFT" 30;
}
h3 {
  font-size: 1.32rem;
  font-variation-settings: "opsz" 48;
}
h4 {
  font-size: 1.08rem;
  font-family: var(--font-body);
  font-weight: 650;
  letter-spacing: 0;
}
p {
  margin: 0 0 1em;
}
p:last-child {
  margin-bottom: 0;
}
small,
.small {
  font-size: 0.875rem;
}
.fine {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
}
.muted {
  color: var(--muted);
}
.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 62ch;
}
.eyebrow {
  display: inline-block;
  justify-self: start;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
}
.eyebrow.accent {
  color: var(--accent-600);
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.hidden,
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid rgba(195, 102, 76, 0.6);
  outline-offset: 3px;
  border-radius: 6px;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: top 0.15s;
}
.skip-link:focus {
  top: 12px;
}
::selection {
  background: var(--accent-soft);
}

.container {
  width: min(var(--container), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}
.container.narrow {
  width: min(760px, calc(100% - var(--gutter) * 2));
}
.section {
  padding: clamp(48px, 7vw, 88px) 0;
}
.section.tight {
  padding: clamp(28px, 4vw, 48px) 0;
}
.section.flush-top {
  padding-top: 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: clamp(22px, 3vw, 36px);
}
.section-head h2 {
  margin: 0;
  max-width: 24ch;
}
.section-head p {
  color: var(--ink-2);
  max-width: 52ch;
  margin: 10px 0 0;
}
.section-head .btn {
  flex: none;
}
.stack > * + * {
  margin-top: var(--stack, 16px);
}
.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.cluster > *,
.section-head > * {
  min-width: 0;
  max-width: 100%;
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ---------- Buttons --------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.15s var(--ease), background 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 6px 18px rgba(31, 77, 64, 0.22);
}
.btn-primary:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
}
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent-600);
  border-color: var(--accent-600);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--brand);
  padding-inline: 12px;
}
.btn-ghost:hover {
  background: var(--brand-tint);
  color: var(--brand-700);
}
.btn-soft {
  background: var(--brand-soft);
  color: var(--brand-700);
}
.btn-soft:hover {
  background: #d6e6dc;
  color: var(--brand-800);
}
.btn-light {
  background: #fff;
  color: var(--brand-700);
  border-color: #fff;
}
.btn-light:hover {
  background: var(--paper);
  color: var(--brand-800);
}
.btn-ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover {
  background: #8e2f25;
  color: #fff;
}
.btn-sm {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 0.875rem;
}
.btn-lg {
  min-height: 52px;
  padding: 14px 26px;
  font-size: 1.02rem;
}
.btn-block {
  width: 100%;
}
.btn-icon {
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border-radius: 50%;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.btn .icon {
  font-size: 1.1em;
  line-height: 1;
}
.link-btn {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
}
.link-btn:hover {
  text-decoration: underline;
}
.link-btn::after {
  content: "→";
  transition: transform 0.15s var(--ease);
}
.link-btn:hover::after {
  transform: translateX(3px);
}
/* A way back points back, and only once. */
.link-btn.back::after {
  content: none;
}

/* ---------- Chips, tags, pills ---------------------------------------- */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip-group.scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
  max-width: 100%;
  flex: 1 1 auto;
}
.chip-group.scroll::-webkit-scrollbar {
  display: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}
.chip.active,
.chip[aria-pressed="true"],
.chip[aria-selected="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
/* Plain lists inside cards: the Navigator's plan sections. Text items keep
   a quiet marker; a list of link buttons has none. */
ul.plain {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}
ul.plain li {
  line-height: 1.5;
}
ul.plain li > .link-btn:only-child {
  margin-left: -18px;
}
ul.plain:has(> li > .link-btn:only-child) {
  list-style: none;
  padding-left: 0;
}
ul.plain:has(> li > .link-btn:only-child) li > .link-btn {
  margin-left: 0;
}
/* A chip that wraps a real checkbox or radio (the Navigator form): the
   input stays visible for assistive tech and keyboard users, the chip shows
   the state. */
label.chip {
  cursor: pointer;
  user-select: none;
}
.chip input[type="checkbox"],
.chip input[type="radio"] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--ink);
  flex: 0 0 auto;
}
.chip:has(input:checked) {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.chip:has(input:checked) input {
  accent-color: #fff;
}
.chip:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.tag {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--paper-2);
  color: var(--ink-2);
  white-space: nowrap;
}
.tag.brand {
  background: var(--brand-soft);
  color: var(--brand-700);
}
.tag.accent {
  background: var(--accent-soft);
  color: #9d4b37;
}
.tag.gold {
  background: var(--gold-soft);
  color: #7a5a1e;
}
.tag.danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.tag.outline {
  background: transparent;
  border: 1px solid var(--line);
}

/* ---------- Cards ----------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.card-pad {
  padding: clamp(18px, 2.4vw, 26px);
}
.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  text-align: left;
  width: 100%;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s;
}
.card-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
  color: inherit;
}
.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.card-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.card-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.card-grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card-grid.wide-left {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}
.card-grid.wide-right {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}
.icon-badge {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--brand-soft);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 14px;
  justify-self: start;
}
.icon-badge.accent {
  background: var(--accent-soft);
}
.icon-badge.gold {
  background: var(--gold-soft);
}
.icon-badge.sky {
  background: var(--sky-soft);
}
.card h3 {
  margin-bottom: 6px;
}
.card p {
  color: var(--ink-2);
}
.card .link-btn {
  margin-top: 12px;
}
.card.soft {
  background: var(--brand-tint);
  border-color: transparent;
}
.card.dark {
  background: var(--brand-700);
  color: #e6efe9;
  border-color: transparent;
}
.card.dark h2,
.card.dark h3 {
  color: #fff;
}
.card.dark p {
  color: #cfdcd5;
}
.card.warm {
  background: var(--accent-soft);
  border-color: transparent;
}
.card.gold {
  background: var(--gold-soft);
  border-color: transparent;
}

/* ---------- Avatars --------------------------------------------------- */
.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-700);
  overflow: hidden;
  width: 40px;
  height: 40px;
  font-size: 1.15rem;
  line-height: 1;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-xs {
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
}
.avatar-sm {
  width: 34px;
  height: 34px;
  font-size: 1rem;
}
.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 1.6rem;
}
.avatar-xl {
  width: 88px;
  height: 88px;
  font-size: 2.4rem;
}

/* ---------- Forms ----------------------------------------------------- */
.form {
  display: grid;
  gap: 16px;
}
/* Grid items default to min-width:auto, so a card or a row inside a form
   would grow past the container to fit a two-column row on a phone. */
.form > * {
  min-width: 0;
}
.field {
  display: grid;
  gap: 6px;
}
.field > label,
.field > .label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}
.field-hint {
  font-size: 0.8125rem;
  color: var(--muted);
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(31, 77, 64, 0.12);
}
input::placeholder,
textarea::placeholder {
  color: #98a29e;
}
textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233d4c47' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 38px;
}
input[type="file"] {
  padding: 8px 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95rem;
  line-height: 1.45;
  cursor: pointer;
  min-height: var(--tap);
  padding: 6px 0;
}
.check input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--brand);
  flex: none;
}
/* The two agreements at sign-up, right above the button. */
.consent-checks {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 2px;
}
.consent-checks legend {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
  padding: 0;
}
.consent-checks .fine {
  margin: 4px 0 0;
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 68px;
}
.password-field .toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 34px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand);
}
.password-field .toggle:hover {
  background: var(--brand-tint);
}
.avatar-picker {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.avatar-picker legend {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  padding: 0;
}
.avatar-picker label {
  position: relative;
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 60px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  font-size: 1.4rem;
}
.avatar-picker label small {
  font-size: 0.7rem;
  color: var(--muted);
}
.avatar-picker input {
  position: absolute;
  opacity: 0;
  inset: 0;
}
.avatar-picker label:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-tint);
  box-shadow: 0 0 0 3px rgba(31, 77, 64, 0.12);
}
.avatar-picker label:has(input:focus-visible) {
  outline: 3px solid rgba(195, 102, 76, 0.6);
  outline-offset: 2px;
}
.notice {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.5;
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--line);
}
.notice-info {
  background: var(--brand-tint);
  border-color: transparent;
}
.notice-success {
  background: var(--success-soft);
  color: var(--success);
  border-color: transparent;
}
.notice-error {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: transparent;
}
.notice-warn {
  background: var(--warn-soft);
  border-color: transparent;
  color: #5f4610;
}

/* ---------- Tabs + segmented controls --------------------------------- */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--paper-2);
  border-radius: 999px;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab {
  min-height: 38px;
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.tab:hover {
  color: var(--ink);
}
.tab.active,
.tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.tabs.tabs-block {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  width: 100%;
}
.tabs.tabs-block .tab {
  text-align: center;
  padding-inline: 8px;
}
.subnav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(20px, 3vw, 32px);
}
.subnav::-webkit-scrollbar {
  display: none;
}
.subnav button,
.subnav a {
  min-height: var(--tap);
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  text-decoration: none;
}
.subnav button:hover,
.subnav a:hover {
  color: var(--ink);
}
.subnav .active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---------- Empty, loading, error ------------------------------------- */
.empty {
  text-align: center;
  padding: clamp(28px, 5vw, 48px) 20px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand-700);
}
.empty h3,
.empty .gate-title {
  margin-bottom: 6px;
}
h1.gate-title {
  font-size: 1.35rem;
}
.empty p {
  color: var(--ink-2);
  max-width: 44ch;
  margin-inline: auto;
}
.empty .btn-row {
  justify-content: center;
  margin-top: 16px;
}
.empty.tone-error {
  border-style: solid;
  border-color: var(--danger-soft);
}
.empty.tone-error .empty-icon {
  background: var(--danger-soft);
  color: var(--danger);
}
.empty.gate {
  background: var(--brand-tint);
  border: 0;
}
.skeleton-group {
  display: grid;
  gap: 14px;
}
.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 20px;
  display: grid;
  gap: 10px;
}
.skeleton span {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: var(--paper-2);
}
.skeleton span:nth-child(1) {
  width: 40%;
  height: 16px;
}
.skeleton span:nth-child(2) {
  width: 90%;
}
.skeleton span:nth-child(3) {
  width: 70%;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.4s infinite;
}
.skeleton-line {
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}
.is-busy {
  opacity: 0.6;
  pointer-events: none;
}

/* ---------- Crisis bar ------------------------------------------------ */
.crisis-bar {
  background: var(--brand-800);
  color: #e6efe9;
  font-size: 0.85rem;
}
.crisis-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 6px 0;
}
.crisis-bar a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  margin-left: 6px;
  white-space: nowrap;
}
.crisis-bar a:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}
/* The National Maternal Mental Health Hotline gets its own line under 988. */
.crisis-bar .container {
  flex-wrap: wrap;
  row-gap: 2px;
}
.crisis-bar .crisis-mama {
  flex-basis: 100%;
  order: 3;
  padding-bottom: 2px;
}
.crisis-bar .crisis-mama a {
  margin-left: 2px;
}
/* On a phone the bar stays one line (design.css D1); the hotline is on the
   Care page, the check-in support card, every mental-health guide and the
   safety page. */
@media (max-width: 480px) {
  .crisis-bar .crisis-mama {
    display: none;
  }
}

/* ---------- Header ---------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 247, 242, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(27, 42, 38, 0.06);
}
.site-header .container {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}
.brand .mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font: 600 1.05rem var(--font-display);
  letter-spacing: -0.02em;
}
.brand .wordmark {
  font: 600 1.32rem var(--font-display);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.primary-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
}
.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 550;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.primary-nav a:hover {
  background: var(--paper-2);
  color: var(--ink);
}
.primary-nav a.active {
  color: var(--ink);
  background: var(--paper-2);
}
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 4px 12px 4px 6px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}
.account-btn:hover {
  border-color: var(--ink);
}
body:not(.signed-in) .account-btn {
  padding: 4px 16px;
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
body:not(.signed-in) .account-btn:hover {
  background: var(--brand-700);
}
.account-text {
  display: grid;
  text-align: left;
  line-height: 1.15;
}
.account-text small {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.account-text b {
  font-size: 0.9rem;
  max-width: 130px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
}
.account-btn .chev {
  color: var(--muted);
}
.account-menu {
  position: absolute;
  right: max(var(--gutter), calc((100vw - var(--container)) / 2));
  top: calc(var(--header-h) - 8px);
  width: 280px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 70;
}
.account-menu.open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.account-menu-identity {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 10px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.account-menu-identity small {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}
.account-menu-identity b {
  font-weight: 600;
}
.account-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  text-align: left;
  font-size: 0.95rem;
  color: var(--ink);
}
.account-menu button:hover {
  background: var(--paper-2);
}
.account-menu button .icon {
  width: 22px;
  text-align: center;
  color: var(--muted);
}
.account-menu .danger {
  color: var(--danger);
}
/* The menu button shows at every width: on desktop it opens the full menu
   (the family tools, About, the fund, feedback) beside the short top bar. */
.menu-btn {
  display: inline-flex;
  width: var(--tap);
  height: var(--tap);
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  align-items: center;
  justify-content: center;
}
.menu-btn:hover {
  border-color: var(--ink);
}

/* ---------- Notifications -------------------------------------------- */
.notif-btn {
  position: relative;
  display: inline-flex;
  width: var(--tap);
  height: var(--tap);
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  align-items: center;
  justify-content: center;
}
.notif-btn[hidden] {
  display: none;
}
.notif-btn:hover {
  border-color: var(--ink);
}
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #b3261e;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  border: 2px solid var(--surface);
}
.notif-panel {
  position: absolute;
  right: max(var(--gutter), calc((100vw - var(--container)) / 2));
  top: calc(var(--header-h) - 8px);
  width: min(380px, calc(100vw - 2 * var(--gutter)));
  max-height: min(70vh, 560px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 71;
}
.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 8px;
}
.notif-head h2 {
  font-size: 1.15rem;
  margin: 0;
}
.notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.notif-item,
.notif-requests {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 8px;
  border: 0;
  border-radius: 12px;
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.notif-item:hover,
.notif-requests:hover,
.notif-item:focus-visible,
.notif-requests:focus-visible {
  background: var(--brand-soft);
}
.notif-item.new {
  background: rgba(31, 77, 64, 0.06);
}
.notif-requests {
  align-items: center;
  border-bottom: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
  margin-bottom: 4px;
}
.notif-icon {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-soft);
}
.notif-text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.notif-text b {
  font-weight: 600;
  line-height: 1.3;
}
.notif-text small {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.notif-when {
  font-size: 0.78rem;
}
.notif-dot {
  flex: none;
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--brand);
}
.notif-chev {
  color: var(--muted);
  font-size: 1.3rem;
}
.notif-empty {
  padding: 8px 10px 12px;
}
button.notif-row {
  width: 100%;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  align-items: center;
}
button.notif-row:hover {
  background: var(--brand-soft);
}
.notif-dot-inline {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--brand);
  vertical-align: middle;
}
.notif-empty p {
  margin: 0 0 6px;
}
.notif-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}
.notif-tools .link-btn::after {
  content: none;
}
.notif-li {
  position: relative;
  display: flex;
  align-items: flex-start;
}
.notif-li .notif-item {
  padding-right: 34px;
}
.notif-li .notif-dot {
  position: absolute;
  top: 16px;
  right: 34px;
  margin: 0;
}
.notif-x {
  position: absolute;
  top: 6px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
}
.notif-li:hover .notif-x,
.notif-x:focus-visible {
  opacity: 1;
}
.notif-x:hover {
  background: var(--paper-2);
}
@media (hover: none) {
  .notif-x {
    opacity: 0.8;
  }
}
.notif-target {
  border-radius: var(--radius);
  animation: notif-flash 2.4s ease-out;
}
@keyframes notif-flash {
  0%,
  35% {
    box-shadow: 0 0 0 3px var(--brand);
  }
  100% {
    box-shadow: 0 0 0 3px transparent;
  }
}
.notif-foot {
  border-top: 1px solid var(--line);
  padding: 8px 8px 4px;
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .notif-panel {
    right: var(--gutter);
    left: var(--gutter);
    width: auto;
  }
}

/* ---------- Drawer ---------------------------------------------------- */
.shade {
  position: fixed;
  inset: 0;
  background: rgba(17, 32, 27, 0.5);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.shade.open {
  opacity: 1;
  pointer-events: auto;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 90vw);
  background: var(--paper);
  z-index: 90;
  transform: translateX(105%);
  transition: transform 0.3s var(--ease);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}
.drawer.open {
  transform: none;
}
.drawer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.drawer nav {
  padding: 12px 10px;
  overflow-y: auto;
  flex: 1;
}
.drawer nav small {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 16px 10px 6px;
}
.drawer nav a,
.drawer nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 550;
  text-decoration: none;
  text-align: left;
}
.drawer nav a:hover,
.drawer nav button:hover,
.drawer nav .active {
  background: var(--paper-2);
}
.drawer nav .icon {
  width: 24px;
  text-align: center;
}
.drawer-account {
  margin: 12px;
  padding: 16px;
  background: var(--brand-700);
  color: #e6efe9;
  border-radius: var(--radius);
}
.drawer-account p {
  font-size: 0.9rem;
  color: #cfdcd5;
}
.drawer-account-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.drawer-account-row b {
  display: block;
  color: #fff;
}
.drawer-account-row small {
  color: #cfdcd5;
}

/* ---------- Bottom navigation (mobile) --------------------------------- */
.bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  /* As many equal columns as there are tabs, so none is ever left empty. */
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
}
.bottom-nav a,
.bottom-nav button {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-height: 50px;
  padding: 6px 2px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.bottom-nav svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bottom-nav .active {
  color: var(--brand);
}

/* ---------- Page structure -------------------------------------------- */
main {
  min-height: 60vh;
}
.page {
  display: none;
}
.page.active {
  display: block;
  animation: fade 0.25s var(--ease);
}
/* Home is visible in the shell; any other address hides it until the app
   shows the page asked for (night.js sets this, P.show clears it). */
html[data-deep] #page-home {
  display: none;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.page-hero {
  padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 44px);
}
.page-hero h1 {
  max-width: 18ch;
}
.page-hero .lead {
  margin-top: 4px;
}
.page-hero .btn-row {
  margin-top: 22px;
}
.page-hero.tinted {
  background: linear-gradient(180deg, var(--brand-tint), var(--paper));
}
.page-hero.warm {
  background: linear-gradient(180deg, #fbf1ec, var(--paper));
}
.page-hero.gold {
  background: linear-gradient(180deg, #faf3e3, var(--paper));
}
.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.hero-split .media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
  box-shadow: var(--shadow);
}
.hero-split .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper-2);
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Home ------------------------------------------------------ */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(40px, 6vw, 84px) 0 clamp(36px, 5vw, 64px);
}
.hero h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  max-width: 14ch;
  margin-bottom: 18px;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-600);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.hero .lead {
  max-width: 50ch;
}
.hero .btn-row {
  margin-top: 26px;
}
.hero-media {
  position: relative;
}
.hero-media .photo {
  aspect-ratio: 5 / 4;
  box-shadow: var(--shadow);
}
.hero-note {
  position: absolute;
  left: -18px;
  bottom: 22px;
  max-width: 250px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px 16px;
  font-size: 0.875rem;
  line-height: 1.45;
  border: 1px solid var(--line);
}
.hero-note b {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  margin-bottom: 2px;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 26px;
  font-size: 0.85rem;
  color: var(--muted);
}
.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.trust-row span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}
.welcome-strip {
  background: var(--brand-700);
  color: #e6efe9;
}
.welcome-strip .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
  padding: 26px 0;
}
.welcome-strip h2 {
  color: #fff;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  margin-bottom: 4px;
}
.welcome-strip p {
  color: #cfdcd5;
  margin: 0;
}
.welcome-strip .quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.welcome-strip .quick button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: #fff;
  text-align: left;
  min-height: 64px;
  display: grid;
  gap: 2px;
  transition: background 0.15s;
}
.welcome-strip .quick button:hover {
  background: rgba(255, 255, 255, 0.16);
}
.welcome-strip .quick small {
  color: #cfdcd5;
  font-size: 0.78rem;
}
.problem {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.problem h2 {
  max-width: 16ch;
}
.problem-points {
  display: grid;
  gap: 18px;
}
.problem-points > div {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.problem-points .num {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-600);
  display: grid;
  place-items: center;
  font: 500 1.05rem var(--font-display);
}
.problem-points b {
  display: block;
  margin-bottom: 2px;
}
.problem-points p {
  color: var(--ink-2);
  margin: 0;
}
.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.entry {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 210px;
  padding: 22px;
  border-radius: var(--radius);
  text-align: left;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform 0.18s var(--ease), box-shadow 0.18s;
}
.entry:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.entry .icon-badge {
  margin-bottom: 6px;
}
.entry h3 {
  margin: 0;
}
.entry p {
  color: var(--ink-2);
  margin: 0;
  font-size: 0.95rem;
}
.entry .link-btn {
  margin-top: auto;
  padding-top: 8px;
}
.entry.feature {
  grid-row: span 2;
  background: var(--brand-700);
  color: #fff;
  border-color: transparent;
  min-height: 100%;
}
.entry.feature h3,
.entry.feature p {
  color: #fff;
}
.entry.feature p {
  color: #d3dfd8;
}
.entry.feature .link-btn {
  color: #fff;
}
.entry.feature .icon-badge {
  background: rgba(255, 255, 255, 0.14);
}
.areas {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.area {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  text-align: left;
  min-height: 60px;
  transition: border-color 0.15s, transform 0.15s var(--ease);
}
.area:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.area .icon {
  font-size: 1.3rem;
  width: 32px;
  text-align: center;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.split.reverse > :first-child {
  order: 2;
}
.split .photo {
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow);
}
.split h2 {
  max-width: 18ch;
}
.levels-mini {
  display: grid;
  gap: 8px;
  margin: 20px 0;
}
.levels-mini div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.levels-mini b {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
}
.levels-mini span {
  color: var(--ink-2);
}
.preview-list {
  display: grid;
  gap: 12px;
}
.mission {
  background: var(--brand-800);
  color: #dfe9e3;
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 64px);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}
.mission h2 {
  color: #fff;
  max-width: 20ch;
}
.mission p {
  color: #c9d7d0;
  max-width: 56ch;
}
.mission .principles {
  display: grid;
  gap: 10px;
}
.mission .principles div {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.95rem;
}
.mission .principles b {
  color: #fff;
  display: block;
  margin-bottom: 2px;
}
.final-cta {
  text-align: center;
  padding: clamp(44px, 7vw, 88px) 0;
}
.final-cta h2 {
  max-width: 22ch;
  margin-inline: auto;
}
.profile-form .form-section {
  font-size: 1.1rem;
  margin: 14px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.profile-form .form-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.account-head .account-edit {
  margin-left: auto;
  align-self: center;
}
.event-card.hosted {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand) inset;
}
.hosted-tag {
  font-weight: 700;
}
.write-invite {
  margin-top: 28px;
}
.feedback-invite {
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.95rem;
}
.feedback-invite a {
  font-weight: 600;
}
fieldset.field {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
fieldset.field > legend {
  padding: 0;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}
.final-cta .btn-row {
  justify-content: center;
  margin-top: 24px;
}

/* ---------- Community ------------------------------------------------- */
.community-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
}
.community-layout > *,
.account-layout > * {
  min-width: 0;
  max-width: 100%;
}
.community-side {
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.topic-list {
  display: grid;
  gap: 2px;
}
.topic-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-align: left;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.95rem;
}
.topic-list button:hover {
  background: var(--paper-2);
  color: var(--ink);
}
.topic-list button.active {
  background: var(--brand-soft);
  color: var(--brand-800);
  font-weight: 650;
}
.topic-list .icon {
  width: 22px;
  text-align: center;
}
.feed-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.feed-toolbar select {
  min-height: 40px;
  width: auto;
  padding-block: 6px;
  font-size: 0.9rem;
  border-radius: 999px;
}
.composer-prompt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.composer-prompt button.prompt {
  flex: 1;
  text-align: left;
  color: var(--muted);
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--paper-2);
}
.composer-prompt button.prompt:hover {
  background: var(--paper-3);
}
.post-list {
  display: grid;
  gap: 12px;
}
.post {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.post:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.vote {
  display: grid;
  justify-items: center;
  gap: 2px;
  align-content: start;
}
.vote button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.vote button:hover {
  background: var(--paper-2);
  color: var(--ink);
}
.vote button.on {
  background: var(--brand-soft);
  color: var(--brand-700);
}
.vote b {
  font-size: 0.9rem;
  font-weight: 650;
}
.vote svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.post-meta b {
  color: var(--ink);
  font-weight: 600;
}
.post-meta .avatar {
  margin-right: 2px;
}
.post h3 {
  font-size: 1.22rem;
  margin: 0 0 4px;
}
.post h3 button {
  text-align: left;
  color: inherit;
  font: inherit;
}
.post h3 button:hover {
  color: var(--brand);
}
.post .excerpt {
  color: var(--ink-2);
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* A long post rolled up, with See more to read it in place (P.moreText). */
.moretext {
  margin: 0 0 10px;
}
.more-body {
  max-height: calc(var(--more-lines, 4) * 1.6em);
  overflow: hidden;
  line-height: 1.6;
}
.post .more-body {
  color: var(--ink-2);
}
.more-body > p {
  margin: 0 0 0.6em;
}
.more-body > p:last-child {
  margin-bottom: 0;
}
.moretext.clamped .more-body {
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}
.moretext.open .more-body {
  max-height: none;
  -webkit-mask-image: none;
  mask-image: none;
}
.more-toggle {
  margin-top: 4px;
}
.more-toggle::after {
  content: none;
}
/* Replies opened under a post in the Discussions list. */
.post-replies {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.post-replies .comment-list {
  margin-bottom: 12px;
}
.post-replies .inline-reply textarea {
  min-height: 72px;
}
.post-replies .replying-to {
  margin-bottom: 8px;
}
.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.post-actions button,
.post-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.post-actions button:hover,
.post-actions a:hover {
  background: var(--paper-2);
  color: var(--ink);
}
.post-actions .saved {
  color: var(--brand);
}
.thread-head {
  display: grid;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.thread-body {
  font-size: 1.05rem;
  color: var(--ink);
}
.comment-list {
  display: grid;
  gap: 14px;
}
.comment {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
}
.comment-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.comment-body p {
  margin-bottom: 6px;
}
.comment-children {
  margin-left: 22px;
  padding-left: 14px;
  border-left: 2px solid var(--paper-3);
  margin-top: 10px;
  display: grid;
  gap: 12px;
}
.comment-form {
  position: sticky;
  bottom: 0;
  background: var(--paper);
  padding: 14px 0;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}
.replying-to {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--ink-2);
  background: var(--brand-tint);
  padding: 8px 12px;
  border-radius: var(--radius-xs);
}
.rules {
  font-size: 0.9rem;
}
.rules ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--ink-2);
}
.rules li + li {
  margin-top: 6px;
}
.moment-grid {
  display: grid;
  gap: 14px;
}
.moment {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.moment-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.moment-head .who b {
  display: block;
  font-size: 0.95rem;
}
.moment-head .who small {
  color: var(--muted);
}
.moment-media {
  display: grid;
  gap: 4px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 10px 0;
}
.moment-media.multi {
  grid-template-columns: 1fr 1fr;
}
.moment-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--paper-2);
}
.moment-media.multi img {
  aspect-ratio: 1;
}
.moment-photo-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 96px;
  margin: 10px 0;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.reaction-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.reaction-bar button {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--paper-2);
}
.reaction-bar button:hover,
.reaction-bar button.on {
  background: var(--brand-soft);
  color: var(--brand-700);
}
.poll {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}
.poll-option {
  position: relative;
  display: flex;
  justify-content: space-between;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  background: var(--paper-2);
  overflow: hidden;
  font-size: 0.92rem;
}
.poll-option .bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--brand-soft);
  z-index: 0;
}
.poll-option span,
.poll-option b {
  position: relative;
  z-index: 1;
}
.circle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 14px;
}
.circle {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 200px;
}
.circle .icon-badge {
  margin-bottom: 4px;
}
.circle.joined {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.circle .btn-row {
  margin-top: auto;
  padding-top: 10px;
}
.circle-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.circle h3 a {
  color: inherit;
  text-decoration: none;
}
.circle h3 a:hover,
.circle h3 a:focus-visible {
  text-decoration: underline;
}
.circle-group {
  font-size: 1.05rem;
  margin: 18px 0 10px;
}
.circle-group:first-child {
  margin-top: 0;
}
.circle-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 10px;
  list-style: none;
  counter-reset: step;
  margin: 0 0 20px;
  padding: 0;
}
.circle-steps li {
  counter-increment: step;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 14px;
  background: var(--brand-soft);
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.circle-steps li::before {
  content: counter(step);
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  font-weight: 700;
  font-size: 0.85rem;
}
.circle-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  align-items: start;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 18px;
}
.circle-head.joined {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.circle-head h2 {
  font-size: 1.6rem;
  margin: 2px 0 4px;
}
.circle-head p {
  margin: 0;
}
.circle-head .btn-row {
  grid-column: 1 / -1;
  align-items: center;
}
.circle-feed {
  max-width: 720px;
}
#communityArea {
  scroll-margin-top: 72px;
}
.circle-requests .saved-row {
  align-items: center;
}

.about-vision {
  background: var(--brand-soft);
  border-color: transparent;
}
.about-vision p {
  max-width: 68ch;
}
.about-closing {
  font-family: var(--font-display, inherit);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.35;
  margin: 12px 0 16px;
}
.about-founders {
  margin: 0;
}
.about-founders img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  background: var(--paper-2);
  box-shadow: var(--shadow);
}
.about-founders figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}
.about-built-note {
  max-width: 72ch;
  margin: 20px 0 0;
  color: var(--ink-2);
}
.about-signoff {
  font-family: var(--font-display, inherit);
  font-style: italic;
  font-size: 1.25rem;
  margin: 18px 0 0;
}

.registry-copy {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  margin-top: 12px;
}
.registry-copy > div {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.registry-copy b {
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ---------- People ---------------------------------------------------- */
.people-search {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.people-search input {
  flex: 1 1 220px;
  min-width: 0;
}
.people-hidden {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.people-requests {
  margin-bottom: 16px;
}
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 14px;
}
.person-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.person-card p {
  margin: 0;
}
.person-card .btn-row {
  margin-top: auto;
}
.person-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.person-card-top b {
  display: block;
  font-size: 1.05rem;
}
.person-card-top small {
  color: var(--muted);
}
.person-card-top:hover b,
.person-card-top:focus-visible b {
  text-decoration: underline;
}
.person-link {
  color: inherit;
}
.profile-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.profile-head-text {
  flex: 1 1 240px;
  min-width: 0;
}
.profile-head h2 {
  font-size: 1.7rem;
  margin: 0 0 4px;
}
.profile-head p {
  margin: 0 0 10px;
}
/* ---------- Daily check-in -------------------------------------------- */
.scale {
  border: 0;
  padding: 0;
  margin: 0 0 14px;
}
.scale legend {
  font-weight: 600;
  margin-bottom: 8px;
  padding: 0;
}
.scale-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.scale-options label {
  position: relative;
}
.scale-options input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.scale-options span {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 6px 4px;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.2;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.scale-options input:checked + span {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}
.scale-options input:focus-visible + span {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.checkin-prompt {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  width: min(380px, calc(100vw - 32px));
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(27, 42, 38, 0.16);
}
.checkin-prompt > div:not(.btn-row) {
  flex: 1 1 180px;
  min-width: 0;
}
.checkin-prompt b,
.checkin-prompt small {
  display: block;
}
.checkin-prompt small {
  color: var(--muted);
}
.checkin-prompt .btn-row {
  width: 100%;
  align-items: center;
}
.checkin-prompt .checkin-stop {
  margin-left: auto;
  font-size: 0.8125rem;
  color: var(--muted);
}
.ck-grid-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 14px;
}
.ck-card h3 {
  margin-bottom: 2px;
}
.ck-chart {
  position: relative;
  margin-top: 8px;
  border-radius: 8px;
}
.ck-chart:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}
.ck-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.ck-grid,
.ck-cross {
  stroke: rgba(27, 42, 38, 0.14);
  stroke-width: 1;
}
.ck-cross {
  stroke: rgba(27, 42, 38, 0.45);
}
.ck-line {
  fill: none;
  stroke: var(--brand);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.ck-dot {
  fill: var(--brand);
  stroke: var(--surface);
  stroke-width: 2;
}
.ck-label {
  fill: var(--muted);
  font-size: 11px;
}
.ck-hit {
  fill: transparent;
  cursor: crosshair;
}
.ck-tip {
  position: absolute;
  top: -6px;
  transform: translate(-50%, -100%);
  padding: 6px 10px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  font-size: 0.85rem;
  white-space: nowrap;
  pointer-events: none;
}
.ck-tip b,
.ck-tip small {
  display: block;
}
.ck-tip small {
  opacity: 0.8;
}
.ck-table {
  margin-top: 16px;
}
.ck-table summary {
  cursor: pointer;
  font-weight: 600;
}
.ck-table .table-wrap {
  overflow-x: auto;
  margin-top: 10px;
}
.ck-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.ck-table th,
.ck-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
@media (max-width: 700px) {
  .checkin-prompt {
    right: 16px;
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
}
.linklike {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}
.side-card + .side-card {
  margin-top: 14px;
}

/* ---------- Find care ------------------------------------------------- */
.care-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 10px;
}
.care-cat {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 14px;
  min-height: 108px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1.5px solid var(--line);
  text-align: left;
  color: var(--ink);
  transition: border-color 0.15s, transform 0.15s var(--ease), background 0.15s;
}
.care-cat:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.care-cat.active {
  border-color: var(--brand);
  background: var(--brand-tint);
  box-shadow: 0 0 0 3px rgba(31, 77, 64, 0.1);
}
.care-cat .icon {
  font-size: 1.4rem;
}
.care-cat b {
  font-size: 0.95rem;
}
.care-cat small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}
.search-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}
.search-row .field {
  gap: 4px;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.filter-row .label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-right: 4px;
}
.search-status {
  font-size: 0.9rem;
  color: var(--ink-2);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--paper-2);
}
.search-status.loading {
  background: var(--brand-tint);
  color: var(--brand-800);
}
.search-status.error {
  background: var(--danger-soft);
  color: var(--danger);
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.provider {
  display: grid;
  gap: 8px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.provider-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.provider h3 {
  font-size: 1.12rem;
  margin: 2px 0 0;
}
.provider .kind {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}
.provider .specialty {
  font-size: 0.85rem;
  color: var(--muted);
}
.provider .address {
  color: var(--ink-2);
  font-size: 0.93rem;
  margin: 0;
}
.provider-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.provider-actions .btn {
  min-height: 38px;
  padding: 6px 14px;
  font-size: 0.85rem;
}
.provider .source {
  font-size: 0.78rem;
  color: var(--muted);
}
.level-list {
  display: grid;
  gap: 14px;
}
.level {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.level .num {
  font: 500 1.6rem var(--font-display);
  color: var(--accent-600);
}
.level h3 {
  font-size: 1.35rem;
}
.level .plain {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.level details {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.level summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.level summary::-webkit-details-marker {
  display: none;
}
.level summary::before {
  content: "+";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-soft);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  color: var(--brand-700);
}
.level details[open] summary::before {
  content: "–";
}
.level ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--ink-2);
}
.level li + li {
  margin-top: 4px;
}
.level-scale {
  display: grid;
  gap: 6px;
}
.level-scale div {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.level-scale div:nth-child(2) {
  margin-left: 6%;
}
.level-scale div:nth-child(3) {
  margin-left: 12%;
  background: var(--brand-soft);
}
.level-scale div:nth-child(4) {
  margin-left: 18%;
}
.level-scale div:nth-child(5) {
  margin-left: 24%;
  background: var(--accent-soft);
}
.level-scale span {
  font-weight: 400;
  color: var(--ink-2);
  font-size: 0.85rem;
}
.urgent {
  background: var(--brand-800);
  color: #e6efe9;
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
}
.urgent h2 {
  color: #fff;
}
.urgent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.urgent-grid article {
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  padding: 18px;
}
.urgent-grid article.now {
  border: 3px solid var(--accent);
}
.urgent-grid h3 {
  font-size: 1.1rem;
}
.urgent-grid p {
  font-size: 0.93rem;
  color: var(--ink-2);
}
.urgent .fine {
  color: #b9c9c1;
  margin-top: 16px;
}
.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 14px;
}
.compare-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.compare-card dl {
  margin: 0;
  display: grid;
  gap: 8px;
}
.compare-card dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--muted);
}
.compare-card dd {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.93rem;
}
.compare-card.form-card {
  background: var(--brand-tint);
  border-color: transparent;
}

/* ---------- Events ---------------------------------------------------- */
.event-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.event-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.event-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
/* Tags here carry words someone typed (a sponsor's name, a cost note): a
   long one wraps inside its pill instead of pushing the page sideways on a
   phone, as "Sponsored · Advertisement · Example Local Partner" did. */
.event-card .tag,
.event-detail .tag,
.sponsored-item .tag {
  white-space: normal;
  overflow-wrap: break-word;
}
.event-card.sponsored {
  border-color: rgba(195, 102, 76, 0.5);
}
.event-date {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0;
  height: 74px;
  border-radius: var(--radius-sm);
  background: var(--gold-soft);
  color: #5a4515;
  font-weight: 700;
  line-height: 1.1;
}
.event-date small {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.event-date b {
  font: 500 1.7rem var(--font-display);
}
.event-card h3 {
  font-size: 1.2rem;
  margin: 4px 0;
}
.event-card h3 button {
  text-align: left;
  color: inherit;
  font: inherit;
}
.event-card h3 button:hover {
  color: var(--brand);
}
.event-card .when {
  font-size: 0.88rem;
  color: var(--ink-2);
  font-weight: 600;
}
.event-card .where {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}
.event-card .desc {
  color: var(--ink-2);
  font-size: 0.95rem;
  margin: 6px 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.event-card .counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.event-actions .btn {
  min-height: 38px;
  padding: 6px 14px;
  font-size: 0.85rem;
}
.event-detail .photo {
  aspect-ratio: 16 / 9;
  margin-bottom: 18px;
}
.event-detail dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 12px;
  margin: 16px 0;
  font-size: 0.95rem;
}
.event-detail dt {
  font-weight: 600;
  color: var(--muted);
}
.event-detail dd {
  margin: 0;
}
.event-types {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

/* ---------- Guides / prose ------------------------------------------- */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 14px;
}
.guide-card {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 22px;
  min-height: 190px;
}
.guide-card .meta {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  gap: 10px;
}
.guide-card h3 {
  margin: 0;
}
.guide-card p {
  margin: 0;
  font-size: 0.95rem;
}
.guide-card .link-btn {
  margin-top: auto;
  padding-top: 8px;
}
.article {
  width: min(720px, 100%);
  margin-inline: auto;
}
.article-head {
  padding: clamp(36px, 5vw, 64px) 0 24px;
}
.article-head .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 12px;
}
.prose {
  font-size: 1.06rem;
  line-height: 1.72;
  color: var(--ink);
}
.prose h2 {
  font-size: 1.55rem;
  margin: 1.6em 0 0.5em;
}
.prose p {
  margin-bottom: 1.1em;
}
.prose ul {
  padding-left: 22px;
  margin: 0 0 1.2em;
}
.prose li + li {
  margin-top: 8px;
}
.callout {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.4em 0;
  font-size: 0.98rem;
}
.callout.calm {
  background: var(--brand-tint);
  border-left-color: var(--brand);
}
.article-foot {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.article-foot .sources {
  font-size: 0.85rem;
  color: var(--muted);
}
.resource-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 12px;
}
.resource {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 18px 20px;
}
.resource h3 {
  font-size: 1.1rem;
  margin: 0;
}
.resource p {
  font-size: 0.93rem;
  margin: 0;
}
.resource a {
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---------- Account --------------------------------------------------- */
.account-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.account-nav {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  display: grid;
  gap: 2px;
}
.account-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-align: left;
  font-weight: 550;
  color: var(--ink-2);
}
.account-nav button:hover {
  background: var(--paper-2);
  color: var(--ink);
}
.account-nav button.active {
  background: var(--brand-soft);
  color: var(--brand-800);
  font-weight: 650;
}
.account-nav .icon {
  width: 22px;
  text-align: center;
}
.account-nav .danger {
  color: var(--danger);
  margin-top: 8px;
}
.account-head {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}
.account-head h2 {
  margin: 0;
}
.account-head .meta {
  color: var(--muted);
  font-size: 0.93rem;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.stat {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.stat b {
  display: block;
  font: 500 1.6rem var(--font-display);
}
.stat small {
  color: var(--muted);
}
.checkin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.checkin-grid button {
  display: grid;
  gap: 4px;
  padding: 16px;
  min-height: 92px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1.5px solid var(--line);
  text-align: left;
  font-weight: 600;
  transition: border-color 0.15s, transform 0.15s var(--ease);
}
.checkin-grid button:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}
.checkin-grid .icon {
  font-size: 1.4rem;
}
.checkin-grid small {
  color: var(--muted);
  font-weight: 500;
}
.agenda {
  display: grid;
  gap: 10px;
}
.agenda-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.agenda-item:last-child {
  border-bottom: 0;
}
.agenda-date {
  text-align: center;
  background: var(--brand-soft);
  border-radius: 10px;
  padding: 6px 0;
  line-height: 1.1;
}
.agenda-date small {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-700);
  font-weight: 700;
}
.agenda-date b {
  font: 500 1.25rem var(--font-display);
}
.agenda-item .title {
  font-weight: 600;
}
.agenda-item .meta {
  font-size: 0.85rem;
  color: var(--muted);
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.month-grid .dow {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  padding: 4px 0;
}
.day {
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  background: var(--surface);
  font-size: 0.8rem;
}
.day.pad {
  background: transparent;
  border-color: transparent;
}
.day.today {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.day .n {
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}
.day .dot {
  display: block;
  font-size: 0.72rem;
  background: var(--brand-soft);
  border-radius: 6px;
  padding: 2px 6px;
  margin-top: 3px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.person {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.person:last-child {
  border-bottom: 0;
}
.person .who {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  flex: 1 1 220px;
}
.person > .cluster {
  flex: none;
}
.person .who b {
  display: block;
}
.person .who small {
  color: var(--muted);
  display: block;
}
.person .who p {
  font-size: 0.9rem;
  color: var(--ink-2);
  margin: 2px 0 0;
}
.chat {
  display: grid;
  gap: 8px;
  max-height: 50vh;
  overflow-y: auto;
  padding: 4px 2px;
}
.bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--paper-2);
  font-size: 0.95rem;
}
.bubble small {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
}
.bubble.mine {
  margin-left: auto;
  background: var(--brand);
  color: #fff;
}
.bubble.mine small {
  color: #cfe0d6;
}

/* Messages: an inbox that reads like a phone's, and a chat that fills the sheet. */
.inbox-card {
  padding: 4px 0;
  overflow: hidden;
}
.inbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px 6px;
}
.inbox-head h3 {
  margin: 0;
}
.inbox-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.inbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 18px;
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.inbox-list li:first-child .inbox-row {
  border-top: 0;
}
.inbox-row:hover {
  background: var(--paper-2);
}
.inbox-row:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}
.inbox-text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.inbox-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.inbox-top b {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inbox-top time {
  flex: none;
  font-size: 0.8rem;
  color: var(--muted);
}
.inbox-last {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  color: var(--muted);
}
.inbox-row.unread .inbox-top b,
.inbox-row.unread .inbox-last {
  color: var(--ink);
  font-weight: 650;
}
.inbox-row.unread time {
  color: var(--brand);
  font-weight: 650;
}
.inbox-count,
.tab-count {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}
.tab-count {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  font-size: 0.72rem;
}
.inbox-empty {
  padding: 6px 18px 18px;
}
.chat-modal:not([hidden]) {
  display: flex;
  flex-direction: column;
  height: min(720px, 88vh);
  overflow: hidden;
}
.chat-modal #messagesContent {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.chat-modal .chat {
  flex: 1;
  min-height: 0;
  max-height: none;
  align-content: start;
  gap: 2px;
  padding: 6px 2px 12px;
}
.chat .bubble {
  justify-self: start;
  width: fit-content;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.chat .bubble.mine {
  justify-self: end;
  margin-left: 0;
}
.chat .bubble.end {
  margin-bottom: 8px;
}
.chat .bubble.end:not(.mine) {
  border-bottom-left-radius: 6px;
}
.chat .bubble.mine.end {
  border-bottom-right-radius: 6px;
}
.chat .bubble.failed {
  background: var(--danger-soft);
  color: var(--danger);
}
.chat-retry {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--danger);
}
.chat-day {
  margin: 12px 0 8px;
  text-align: center;
}
.chat-day span {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--paper-2);
  font-size: 0.75rem;
  color: var(--muted);
}
.chat-empty {
  margin: auto 0;
  text-align: center;
}
.chat-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.chat-compose textarea {
  flex: 1;
  min-height: 44px;
  max-height: 160px;
  padding: 11px 16px;
  border-radius: 22px;
  line-height: 1.35;
  resize: none;
}
.chat-send {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  font-size: 1rem;
}
.chat-foot {
  margin: 8px 0 0;
  text-align: center;
}
.shared-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.shared-item.done {
  opacity: 0.6;
}
.shared-item.done .title {
  text-decoration: line-through;
}
.shared-item .title {
  font-weight: 600;
}
.shared-item small {
  color: var(--muted);
  display: block;
}
.saved-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.saved-row:last-child {
  border-bottom: 0;
}
.saved-row .t {
  font-weight: 600;
}
.saved-row small {
  color: var(--muted);
  display: block;
}
.fund-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.step {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step .num {
  font: 500 1.5rem var(--font-display);
  color: var(--accent-600);
}
.step h3 {
  font-size: 1.1rem;
  margin: 8px 0 4px;
}
.step p {
  font-size: 0.93rem;
  margin: 0;
}
.policy-list {
  display: grid;
  gap: 0;
}
.policy-list article {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.policy-list .num {
  font: 500 1.4rem var(--font-display);
  color: var(--accent-600);
}
.policy-list h2 {
  font-size: 1.32rem;
  margin-bottom: 4px;
}
.policy-list p {
  color: var(--ink-2);
  margin: 0;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 14px;
}
.team-card {
  padding: 16px;
}
.team-card .photo {
  aspect-ratio: 4 / 5;
  margin-bottom: 12px;
  display: grid;
  place-items: center;
  font: 500 2.5rem var(--font-display);
  color: rgba(27, 42, 38, 0.3);
  background: linear-gradient(145deg, var(--brand-soft), var(--gold-soft));
}
.team-card h3 {
  font-size: 1.1rem;
  margin: 0;
}
.team-card p {
  font-size: 0.9rem;
}

/* ---------- Modals ---------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 32, 27, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  position: fixed;
  z-index: 110;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%);
  width: min(560px, calc(100% - 24px));
  max-height: min(88vh, 100% - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.22s var(--ease);
}
.modal.wide {
  width: min(760px, calc(100% - 24px));
}
.modal.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.modal-head h2 {
  font-size: 1.6rem;
  margin: 0;
}
.modal-head .eyebrow {
  margin-bottom: 4px;
}
.modal .x {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  background: var(--paper-2);
}
.modal .x:hover {
  background: var(--paper-3);
  color: var(--ink);
}
.modal .form {
  margin-top: 6px;
}
.modal .actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

/* ---------- Toast ----------------------------------------------------- */
.toast {
  position: fixed;
  z-index: 130;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 24px);
  opacity: 0;
  max-width: min(440px, calc(100% - 32px));
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  font-size: 0.93rem;
  font-weight: 500;
  text-align: center;
  transition: opacity 0.2s, transform 0.25s var(--ease);
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast-success {
  background: var(--brand-700);
}
.toast-error {
  background: var(--danger);
}

/* ---------- Footer ---------------------------------------------------- */
.site-footer {
  background: var(--brand-800);
  color: #c9d7d0;
  padding: clamp(40px, 6vw, 64px) 0 40px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}
.site-footer .brand .mark {
  background: #fff;
  color: var(--brand-800);
}
.site-footer .brand .wordmark {
  color: #fff;
}
.site-footer h2 {
  font-family: var(--font-body);
  font-weight: 650;
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.site-footer a,
.site-footer button {
  color: #c9d7d0;
  text-decoration: none;
  font-size: 0.95rem;
  text-align: left;
}
.site-footer a:hover,
.site-footer button:hover {
  color: #fff;
}
/* The newsletter button is a real button on the dark footer: keep the
   light-button colours despite the footer link rule above. */
.site-footer .newsletter .btn-light {
  color: var(--brand-700);
  text-align: center;
}
.site-footer .newsletter .btn-light:hover {
  color: var(--brand-800);
}
.footer-note {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  color: #97aba1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}
.footer-note p {
  margin: 0;
  max-width: 70ch;
}
.disclaimer-strip {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--paper-2);
}

/* ---------- Whole family: role strip, family grid, plan builder ------- */
.role-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.role-strip .role-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-right: 2px;
}
.family-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.family-card ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.family-card li a {
  font-weight: 600;
  text-decoration: none;
}
.family-card li a:hover {
  text-decoration: underline;
}
.family-card li::before {
  content: "→ ";
  color: var(--accent-600);
}
.plan-cta {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.plan-cta h3 {
  color: #fff;
  font-size: 1.5rem;
}
.plan-cta p {
  max-width: 60ch;
  margin: 0;
}
.plan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: start;
}
.plan-side {
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.plan-section-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.plan-section-head .num {
  flex: none;
  font: 500 1.3rem var(--font-display);
  color: var(--accent-600);
  width: 34px;
}
.plan-section-head .plan-section-title {
  font-size: 1.32rem;
  font-variation-settings: "opsz" 48;
  margin-bottom: 2px;
}
.plan-section .field + .field {
  margin-top: 12px;
}
.plan-checks {
  display: grid;
  gap: 0;
  margin-bottom: 8px;
}
.plan-checks .check {
  min-height: 40px;
  padding: 4px 0;
}
.plan-fixed {
  margin: 12px 0 0;
  padding: 12px 14px 12px 30px;
  background: var(--brand-tint);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: 0.9rem;
}
.plan-fixed li + li {
  margin-top: 4px;
}
.plan-summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 26px);
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
}
.plan-summary-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.plan-summary-head h2 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.plan-summary-section {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.plan-summary-section:last-of-type {
  border-bottom: 0;
}
.plan-summary-section h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.plan-summary-section p {
  font-size: 0.92rem;
  color: var(--ink-2);
  margin: 0 0 4px;
  white-space: pre-line;
}
.plan-summary-section p b {
  color: var(--ink);
}
.plan-print-only {
  display: none;
}
@media (max-width: 960px) {
  .family-grid,
  .plan-layout {
    grid-template-columns: 1fr;
  }
  .plan-side {
    position: static;
  }
  .plan-summary {
    max-height: none;
  }
}
@media print {
  .plan-print-hide,
  .page-hero,
  .demo-banner {
    display: none !important;
  }
  .plan-layout {
    display: block;
  }
  .plan-summary {
    border: 0;
    padding: 0;
    max-height: none;
    overflow: visible;
  }
  .plan-print-only {
    display: block;
    margin-top: 24px;
  }
}

/* ---------- Plus, sponsored listings, newsletter, rota, print kits ----- */
.pricing {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.price-card {
  position: relative;
  display: grid;
  gap: 12px;
  align-content: start;
}
.price-card.featured {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 77, 64, 0.12);
}
.price-card .amount {
  font: 500 2.4rem/1 var(--font-display);
  letter-spacing: -0.02em;
}
.price-card .amount small {
  font: 500 1rem var(--font-body);
  color: var(--muted);
}
.price-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--ink-2);
  font-size: 0.95rem;
}
.price-card li::before {
  content: "✓ ";
  color: var(--brand);
  font-weight: 700;
}
.plus-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 14px;
}
.plus-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-800);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.plus-lock {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--gold-soft);
  border: 1px dashed rgba(27, 42, 38, 0.24);
}
.faq details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 32px;
}
.faq p {
  color: var(--ink-2);
  margin: 8px 0 0;
}
.sponsored-block {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--gold-soft);
  border: 1px solid rgba(195, 102, 76, 0.35);
}
.sponsored-block .sponsored-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 10px;
}
.sponsored-block .sponsored-head b {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
}
.sponsored-block .sponsored-head small {
  color: var(--muted);
}
.sponsored-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.sponsored-item + .sponsored-item {
  margin-top: 8px;
}
.sponsored-item h3 {
  font-size: 1.05rem;
  margin: 0;
}
.sponsored-item p {
  color: var(--ink-2);
  font-size: 0.92rem;
  margin: 0;
}
.packages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.package {
  display: grid;
  gap: 8px;
  align-content: start;
}
.package .price {
  font: 500 1.5rem var(--font-display);
}
.package .who {
  font-size: 0.85rem;
  color: var(--muted);
}
.newsletter {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}
.newsletter label b {
  display: block;
  color: #fff;
  font-size: 0.95rem;
}
.newsletter label span {
  display: block;
  font-size: 0.8rem;
  color: #97aba1;
  max-width: 34ch;
}
.newsletter-row {
  display: flex;
  gap: 8px;
  max-width: 380px;
}
.newsletter-row input[type="email"] {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  flex: 1 1 auto;
  min-width: 0;
}
.newsletter-row input[type="email"]::placeholder {
  color: #97aba1;
}
.newsletter .hp,
.form .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.newsletter-inline {
  display: grid;
  gap: 10px;
}
.newsletter-inline .newsletter-row {
  max-width: none;
}
.newsletter-inline input[type="email"] {
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}
.rota {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.rota-day {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px;
  min-height: 96px;
  font-size: 0.8rem;
}
.rota-day.today {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.rota-day .d {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}
.rota-day .slot {
  display: block;
  background: var(--brand-soft);
  border-radius: 6px;
  padding: 3px 6px;
  margin-top: 3px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.rota-day .slot.done {
  opacity: 0.55;
  text-decoration: line-through;
}
.kit {
  max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
}
.kit h1 {
  font-size: 2rem;
}
.kit .kit-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 8px 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.kit .kit-row b {
  color: var(--ink);
}
.kit .kit-row span {
  color: var(--ink-2);
  white-space: pre-line;
}
.kit ul {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-2);
}
.kit .fine {
  margin-top: 18px;
}
.kit-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}
.plan-view-banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 960px) {
  .rota {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .pricing,
  .packages {
    grid-template-columns: 1fr;
  }
  .rota {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kit .kit-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .newsletter-row {
    flex-direction: column;
  }
}
@media print {
  .kit {
    border: 0;
    padding: 0;
    max-width: none;
  }
  .kit-actions {
    display: none !important;
  }
}

/* ---------- Responsive ------------------------------------------------ */
@media (max-width: 1100px) {
  .community-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .community-layout > aside:last-child {
    display: none;
  }
}
@media (max-width: 960px) {
  .primary-nav {
    display: none;
  }
  .menu-btn {
    display: inline-flex;
  }
  .hero,
  .problem,
  .split,
  .split.reverse,
  .mission,
  .welcome-strip .container,
  .hero-split,
  .account-layout {
    grid-template-columns: 1fr;
  }
  .split.reverse > :first-child {
    order: 0;
  }
  .hero {
    gap: 28px;
  }
  .hero-media .photo {
    aspect-ratio: 4 / 3;
  }
  .hero-note {
    left: 12px;
    bottom: 12px;
  }
  .entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .entry.feature {
    grid-row: auto;
    grid-column: 1 / -1;
    min-height: 0;
  }
  .areas,
  .card-grid.cols-4,
  .fund-stats,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card-grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .community-layout {
    grid-template-columns: 1fr;
  }
  .community-side {
    position: static;
  }
  .topic-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .topic-list::-webkit-scrollbar {
    display: none;
  }
  .topic-list button {
    width: auto;
    white-space: nowrap;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    min-height: 38px;
  }
  .topic-list button.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
  }
  .account-nav {
    position: static;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 6px;
  }
  .account-nav::-webkit-scrollbar {
    display: none;
  }
  .account-nav button {
    width: auto;
    white-space: nowrap;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    min-height: 40px;
  }
  .account-nav button.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
  }
  .account-nav .danger {
    margin-top: 0;
  }
  .urgent-grid,
  .event-types {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .welcome-strip .quick {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 700px) {
  :root {
    --header-h: 62px;
  }
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
  .bottom-nav {
    display: grid;
  }
  .site-header .container {
    gap: 10px;
  }
  .brand .wordmark {
    font-size: 1.2rem;
  }
  .account-btn .account-text small {
    display: none;
  }
  body.signed-in .account-btn {
    padding: 3px;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    justify-content: center;
  }
  body.signed-in .account-btn .account-text,
  body.signed-in .account-btn .chev {
    display: none;
  }
  .account-menu {
    right: var(--gutter);
    width: min(300px, calc(100vw - var(--gutter) * 2));
  }
  .crisis-bar .container {
    font-size: 0.78rem;
    gap: 8px;
  }
  .crisis-bar .lbl {
    display: none;
  }
  .hero {
    padding-top: 28px;
  }
  .hero h1 {
    font-size: clamp(2.2rem, 9vw, 2.9rem);
  }
  .hero .btn-row .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
  .hero-note {
    position: static;
    max-width: none;
    margin-top: 12px;
    box-shadow: var(--shadow-sm);
  }
  .section {
    padding: 40px 0;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .entry-grid,
  .areas,
  .card-grid.cols-2,
  .card-grid.cols-3,
  .card-grid.cols-4,
  .card-grid.wide-left,
  .card-grid.wide-right,
  .result-grid,
  .event-grid,
  .steps {
    grid-template-columns: 1fr;
  }
  .fund-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* Find Care: a compact two-column category picker so the search box is
     reachable without scrolling past nine tall cards. */
  .care-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .care-cat {
    min-height: 0;
    padding: 12px;
    gap: 4px;
  }
  .care-cat small {
    display: none;
  }
  /* Events: the explanatory type cards are desktop-only. */
  .event-types {
    display: none;
  }
  /* The sticky reply box would sit under the bottom navigation. */
  .comment-form {
    position: static;
  }
  .person {
    flex-wrap: wrap;
  }
  .person > .cluster {
    margin-left: 52px;
  }
  .entry {
    min-height: 0;
  }
  .welcome-strip .quick {
    grid-template-columns: 1fr 1fr;
  }
  .search-row {
    grid-template-columns: 1fr;
  }
  .search-row .btn {
    width: 100%;
  }
  .level {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 18px;
  }
  .level .num {
    font-size: 1.1rem;
  }
  .level-scale div:nth-child(n) {
    margin-left: 0;
  }
  .post {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .post .vote {
    grid-row: 2;
    grid-auto-flow: column;
    justify-content: start;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
  }
  .post-actions {
    gap: 0;
  }
  .event-card {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }
  .event-date {
    height: 60px;
  }
  .event-date b {
    font-size: 1.4rem;
  }
  .event-detail dl {
    grid-template-columns: 1fr;
    gap: 2px 0;
  }
  .event-detail dt {
    margin-top: 10px;
  }
  .modal {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    max-height: 92vh;
    transform: translateY(20px);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  }
  .modal.show {
    transform: none;
  }
  .modal .actions {
    flex-direction: column-reverse;
  }
  .modal .actions .btn {
    width: 100%;
  }
  .toast {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .site-footer {
    padding-bottom: 28px;
  }
  .avatar-picker {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
  .avatar-picker label {
    min-height: 54px;
    font-size: 1.2rem;
  }
  .day {
    min-height: 54px;
    padding: 4px;
  }
  .day .dot {
    font-size: 0;
    height: 6px;
    width: 6px;
    padding: 0;
    border-radius: 50%;
  }
  .mission {
    padding: 28px 22px;
    border-radius: var(--radius);
  }
  .urgent {
    padding: 22px 18px;
  }
  .compare-grid {
    grid-template-columns: 1fr;
  }
  .team-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stat-row {
    grid-template-columns: 1fr 1fr;
  }
  .comment-children {
    margin-left: 8px;
    padding-left: 10px;
  }
}
@media (max-width: 400px) {
  .welcome-strip .quick {
    grid-template-columns: 1fr;
  }
  .checkin-grid {
    grid-template-columns: 1fr;
  }
  .team-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .crisis-bar,
  .site-header,
  .bottom-nav,
  .site-footer,
  .drawer,
  .modal,
  .toast {
    display: none !important;
  }
  /* Only the page on screen goes to paper; the others stay hidden. */
  .page:not(.active) {
    display: none !important;
  }
  .page.active {
    display: block !important;
    animation: none;
  }
}

/* Invite links (family plan, shared space, family page) */
.invite-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.invite-card h3 {
  margin: 4px 0 10px;
}
.invite-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.invite-row > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}
@media print {
  .invite-card {
    display: none !important;
  }
}

/* ------------------------------------------------------------------ */
/* The Village Registry and the Village Score                          */
/* ------------------------------------------------------------------ */
.progress {
  height: 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.3s;
}
.slot.taken .t {
  color: var(--ink-2);
}
.slot .claimed {
  color: var(--accent-600);
  margin-top: 2px;
}
.claim-form {
  margin: 4px 0 14px;
  padding: 14px;
  background: var(--accent-soft);
  border-radius: 14px;
}
.share-preview img {
  display: block;
  max-width: 260px;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-top: 12px;
  box-shadow: 0 10px 30px rgba(27, 42, 38, 0.12);
}
.score-card {
  text-align: center;
  border-color: var(--accent);
}
.score-big {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  margin-top: 6px;
}
.score-big b {
  font-size: clamp(3.4rem, 10vw, 5rem);
  line-height: 1;
  color: var(--accent);
  font-weight: 700;
}
.score-big span {
  font-size: 1.1rem;
  color: var(--ink-2);
}
.quiz-q {
  border: 0;
  padding: 12px 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.quiz-q:last-of-type {
  border-bottom: 0;
}
.quiz-q legend {
  font-weight: 600;
  margin-bottom: 8px;
  padding: 0;
}
.village-head {
  border-color: var(--accent);
}

/* ------------------------------------------------------------------ */
/* Selling surfaces: comparison table, trust strip, examples, capture   */
/* ------------------------------------------------------------------ */
.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  color: var(--ink-2);
  font-size: 0.9rem;
}
.trust-list li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
  margin-right: 6px;
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.compare-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.compare-table th,
.compare-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.compare-table thead th {
  background: var(--accent-soft);
  font-weight: 700;
}
.compare-table thead th:last-child {
  background: var(--ink);
  color: #fff;
}
.compare-table tbody th {
  font-weight: 600;
  width: 44%;
}
.compare-table td.yes {
  font-weight: 600;
  color: var(--ink);
}
.compare-table tr:last-child th,
.compare-table tr:last-child td {
  border-bottom: 0;
}
/* Admin: sign-ups by channel */
.sources-table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  font-size: 0.93rem;
  font-variant-numeric: tabular-nums;
}
.sources-table th,
.sources-table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.sources-table thead th {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.sources-table tbody th {
  font-weight: 400;
  width: 40%;
}
.sources-table tr:last-child th,
.sources-table tr:last-child td {
  border-bottom: 0;
}
.sponsored-example {
  border-color: var(--line-strong);
  background: #fff;
}
.guide-newsletter {
  margin-top: 28px;
  padding: 18px;
  border-radius: 16px;
  background: var(--accent-soft);
}
.guide-newsletter label b {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}
.guide-newsletter label span {
  display: block;
  font-size: 0.9rem;
  color: var(--ink-2);
  margin-bottom: 10px;
}
.guide-newsletter input[type="email"] {
  color: var(--ink);
  background: var(--surface);
}
.guide-newsletter .newsletter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.guide-newsletter input[type="email"] {
  flex: 1 1 220px;
}

.steps.stack {
  grid-template-columns: 1fr;
}
/* Search on the events list. */
.event-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.event-search input {
  flex: 1 1 260px;
  min-width: 0;
  max-width: 480px;
}
/* Search on Discussions and inside a circle. */
.feed-search {
  margin: 0 0 12px;
}
.feed-search input {
  width: 100%;
  max-width: 520px;
}

/* Guide search (guide-search.js) */
.guide-search {
  margin: 28px 0 8px;
}
.guide-search .gs-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}
.guide-search .gs-row {
  display: flex;
  gap: 8px;
}
.guide-search .gs-row input {
  flex: 1;
  min-width: 0;
}
.guide-search .gs-try {
  margin: 8px 0 0;
}
.guide-search .gs-pop {
  background: none;
  border: 0;
  padding: 2px 0;
  font: inherit;
  font-weight: 600;
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.gs-results {
  margin-top: 20px;
  display: grid;
  gap: 16px;
}
.gs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.gs-hit {
  padding: 18px 20px;
  display: grid;
  gap: 6px;
}
.gs-hit .meta {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  gap: 10px;
}
.gs-hit h3 {
  margin: 0;
  font-size: 1.15rem;
}
.gs-hit p {
  margin: 0;
}
.gs-hit .gs-where {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.gs-hit .gs-snippet {
  color: var(--ink-2);
  font-size: 0.95rem;
}
.gs-results mark {
  background: var(--gold-soft);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
  box-shadow: inset 0 -2px 0 rgba(171, 85, 64, 0.45);
}
.gs-extras h3 {
  font-size: 1.05rem;
  margin: 8px 0 6px;
}
.gs-none .chip-group {
  margin-top: 8px;
}
@media (max-width: 520px) {
  .guide-search .gs-row .btn {
    padding-inline: 14px;
  }
}
.guide-search-mini {
  margin: 32px 0 0;
}
.site-footer .footer-sub {
  margin-top: 24px;
}
