/* FamilyHQ website — shared styles. Brand: Evergreen, Lime, Warm white, Charcoal. */
:root {
  /* Inverted from the first concept: the charcoal that was the text is now the ground,
     and the warm white that was the ground is now the text. Evergreen stays the brand;
     on a dark ground lime carries links, buttons and marks. */
  --bg: #17211D;
  --paper: #1F2B25;
  --paper-2: #26332C;
  --ink: #F7F8F2;
  --ink-2: #C5CEC7;
  --mute: #8A968E;
  --rule: #33413A;
  --green: #DAF59B;
  --green-2: #C7E884;
  --lime: #DAF59B;
  --lime-ink: #123E32;
  --ochre: #D9A85A;
  --coral: #E28C7A;
  --on-green: #123E32;
  --radius: 14px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}
/* The original light palette, opt-in via data-theme="light". */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F7F8F2; --paper: #FFFFFF; --paper-2: #EFF1EA;
  --ink: #17211D; --ink-2: #4A5A52; --mute: #7A877F; --rule: #DDE2D8;
  --green: #123E32; --green-2: #1B5A48; --lime: #DAF59B; --lime-ink: #123E32;
  --ochre: #B88738; --coral: #CC7865; --on-green: #F7F8F2;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  font-feature-settings: "cv11", "ss01"; font-variant-numeric: tabular-nums;
}
a { color: var(--green); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; text-wrap: balance; margin: 0; line-height: 1.1; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-variation-settings: "opsz" 144, "SOFT" 60; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-variation-settings: "opsz" 72; }
h3 { font-size: 1.25rem; font-variation-settings: "opsz" 36; }
p { margin: 0; }
.wrap { width: min(1120px, 100%); margin-inline: auto; padding-inline: 20px; }
.narrow { width: min(720px, 100%); margin-inline: auto; padding-inline: 20px; }
.eyebrow { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); font-weight: 600; }
.mark { background: linear-gradient(transparent 55%, rgba(218,245,155,.28) 55%); color: inherit; padding-inline: 0.05em; }
:root[data-theme="light"] .mark { background: linear-gradient(transparent 55%, var(--lime) 55%); }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
.logo { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 0 0 1px var(--rule); display: block; object-fit: cover; flex-shrink: 0; }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { text-decoration: none; color: var(--ink-2); font-size: 0.95rem; }
.nav a:hover { color: var(--ink); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 0.95rem; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--green); color: var(--on-green); }
.btn-primary:hover { background: var(--green-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { background: var(--paper-2); }
@media (max-width: 700px) { .nav .hide-sm { display: none; } }

/* Cards & lists */
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Footer */
.foot { border-top: 1px solid var(--rule); margin-top: 80px; padding-block: 36px 40px; color: var(--mute); font-size: 0.9rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* Long-form (legal, support) */
.doc { padding-block: 48px 20px; }
.doc header { margin-bottom: 36px; }
.doc header p { color: var(--ink-2); margin-top: 12px; max-width: 60ch; }
.doc .meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: 0.85rem; color: var(--mute); }
.doc h2 { font-size: 1.45rem; margin-top: 44px; margin-bottom: 12px; padding-top: 18px; border-top: 1px solid var(--rule); }
.doc h3 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 600; margin-top: 22px; margin-bottom: 6px; }
.doc p, .doc li { color: var(--ink-2); max-width: 66ch; }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 22px; margin: 10px 0 0; }
.doc li + li { margin-top: 6px; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc table { border-collapse: collapse; width: 100%; font-size: 0.92rem; margin-top: 12px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.doc th { color: var(--ink); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
.table-scroll { overflow-x: auto; }
.toc { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 20px; margin-top: 24px; }
.toc ol { columns: 2; column-gap: 28px; margin: 6px 0 0; padding-left: 20px; font-size: 0.92rem; }
.toc li { break-inside: avoid; margin-top: 4px; }
.toc a { text-decoration: none; }
@media (max-width: 560px) { .toc ol { columns: 1; } }
.note { border-left: 3px solid var(--lime); background: var(--paper); padding: 12px 16px; border-radius: 0 10px 10px 0; margin-top: 14px; font-size: 0.95rem; }
.fill { background: var(--lime); color: var(--lime-ink); padding: 0 6px; border-radius: 4px; font-weight: 600; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: var(--paper-2); padding: 1px 6px; border-radius: 5px; }
