/* Parent Care at Home Guide
   Warm editorial stylesheet. Mobile first (320px up), no web fonts, no images needed.
   Palette: linen, moss green, terracotta call to action, honey highlights. All text pairs meet WCAG AA. */

:root {
  color-scheme: light;
  --bg: #FBF7F1;          /* linen page */
  --surface: #FFFFFF;     /* cards */
  --ink: #2A2420;         /* body text, 14.3:1 on linen */
  --muted: #5B524B;       /* secondary text, 7.1:1 on linen */
  --line: #E4D9CB;        /* soft dividers */
  --line-strong: #8A7F74; /* form and checkbox borders, 3.9:1 */
  --brand: #3D5A45;       /* moss green: links, headings accents, 7.2:1 */
  --brand-dark: #2C4433;
  --sage: #E9EFE6;        /* soft green panels */
  --honey: #FBEFD6;       /* soft warm panels */
  --honey-edge: #D9A441;
  --cta: #A8461F;         /* terracotta, the one call to action color, 5.9:1 with white */
  --cta-dark: #8C3816;
  --walnut: #2E2925;      /* footer */
  --focus: #1F56C2;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, Cambria, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(46, 41, 37, .06), 0 6px 20px rgba(46, 41, 37, .06);
  --shadow-lift: 0 2px 4px rgba(46, 41, 37, .08), 0 14px 32px rgba(46, 41, 37, .10);
  --gutter: 1.25rem;
  --read: 44rem;          /* reading column */
  --wide: 72rem;          /* grids and header */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;      /* 18px on phones */
  line-height: 1.65;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 48em) {
  body { font-size: 1.1875rem; } /* 19px from tablets up */
}

img, svg { max-width: 100%; height: auto; }

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 40em) { :root { --gutter: 2rem; } }

/* ---------- Type ---------- */
h1, h2, h3 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); margin: 2.75rem 0 .75rem; }
h3 { font-size: clamp(1.2rem, 1.1rem + .6vw, 1.4rem); margin: 2rem 0 .5rem; }

p { margin: 0 0 1.15em; }

.lede {
  font-size: 1.15em;
  color: var(--muted);
  line-height: 1.6;
}

ul, ol { margin: 0 0 1.25em; padding-left: 1.4em; }
li { margin-bottom: .45em; }
li::marker { color: var(--brand); }

strong { font-weight: 700; color: inherit; }

a {
  color: var(--brand);
  text-decoration-line: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}
a:hover { color: var(--brand-dark); text-decoration-thickness: .14em; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

blockquote {
  margin: 2rem 0;
  padding: .25rem 0 .25rem 1.25rem;
  border-left: 4px solid var(--honey-edge);
  font-family: var(--serif);
  font-size: 1.15em;
  font-style: italic;
  color: var(--muted);
}
blockquote p:last-child { margin-bottom: 0; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* ---------- Preview bar ---------- */
.preview-bar {
  background: var(--walnut);
  color: #F6EFE4;
  font-size: .9375rem;
  text-align: center;
  padding: .5rem var(--gutter);
  line-height: 1.4;
}

/* ---------- Header and nav ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding-block: .9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
}
.brand::before {               /* small house mark, drawn in CSS */
  content: "";
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  background: var(--cta);
  clip-path: polygon(50% 4%, 96% 42%, 86% 42%, 86% 96%, 14% 96%, 14% 42%, 4% 42%);
  border-radius: 2px;
}
.brand:hover { color: var(--ink); text-decoration: none; }

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .35rem;
  margin-inline: -.6rem;       /* line link text up with the brand on phones */
}
.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .35rem .6rem;
  border-radius: 999px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}
.site-header nav a:hover { background: var(--sage); color: var(--brand-dark); }
.site-header nav a[aria-current="page"] { background: var(--sage); color: var(--brand-dark); }
.site-header nav a[href="/home-safety-checklist/"] {   /* the lead magnet stands out */
  border: 2px solid var(--cta);
  color: var(--cta-dark);
}
.site-header nav a[href="/home-safety-checklist/"]:hover { background: var(--cta); color: #fff; }

@media (min-width: 56em) {
  .site-header .wrap { flex-wrap: nowrap; padding-block: 1rem; }
  .site-header nav { margin-inline: 0; }
}

/* ---------- Main layout ---------- */
main {
  display: block;
  padding-block: 2rem 4rem;
}
@media (min-width: 48em) { main { padding-block: 3rem 5rem; } }

/* Reading column for prose; grids and boxes run wider */
main > :where(h1, h2, h3, p, ul, ol, blockquote, .answer, .note, .checklist, .aff-note, .soon, hr, table) {
  max-width: var(--read);
  margin-inline: auto;
}
main > :where(.card-list, .hub-grid, .trust-row, .hero, .signup-box) {
  margin-inline: auto;
}
main > h1:first-child, main > .aff-note + h1 { margin-top: 0; }

/* ---------- Affiliate note ---------- */
.aff-note {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .65rem .9rem;
  margin-bottom: 1.75rem;
}

/* ---------- Answer box ---------- */
.answer {
  background: var(--honey);
  border-left: 6px solid var(--honey-edge);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  margin-block: 1.25rem 2rem;
  font-size: 1.05em;
}
.answer > :last-child { margin-bottom: 0; }
.answer strong:first-child { color: var(--brand-dark); }

/* ---------- Note ---------- */
.note {
  background: var(--sage);
  border-left: 5px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  margin-block: 1.5rem;
}
div.note > :last-child { margin-bottom: 0; }

/* ---------- Checklist ---------- */
.checklist {
  list-style: none;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.checklist li {
  position: relative;
  margin: 0;
  padding: .85rem 1rem .85rem 3.1rem;
  border-bottom: 1px solid var(--line);
  break-inside: avoid;
}
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 1.05rem;
  width: 1.3rem;
  height: 1.3rem;
  border: 2px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
}
.checklist li:nth-child(odd) { background: #FFFCF7; }
.checklist li:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.checklist li:last-child { border-radius: 0 0 var(--radius) var(--radius); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(160deg, var(--honey) 0%, #F7E7D3 55%, #F2DCC9 100%);
  border-radius: calc(var(--radius) + 6px);
  padding: 2.25rem 1.35rem 2.5rem;
  margin-bottom: 3rem;
}
.hero::after {                  /* soft "window light" shape, decoration only */
  content: "";
  position: absolute;
  z-index: -1;
  right: -6rem;
  top: -6rem;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .75) 0%, rgba(255, 255, 255, 0) 70%);
}
.hero-kicker {
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-dark);
  background: rgba(255, 255, 255, .7);
  border-radius: 999px;
  padding: .3rem .85rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}
.hero h1 {
  font-size: clamp(2.1rem, 1.3rem + 4vw, 3.6rem);
  line-height: 1.1;
  max-width: 18ch;
  margin-bottom: 1rem;
}
.hero-sub {
  font-size: 1.15em;
  line-height: 1.6;
  color: #3F3832;
  max-width: 38rem;
  margin-bottom: 1.75rem;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
@media (min-width: 30em) {
  .hero-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
}
@media (min-width: 48em) {
  .hero { padding: 4rem 3.5rem 4.25rem; }
  .hero::after { width: 28rem; height: 28rem; right: -8rem; top: -10rem; }
}

/* ---------- Buttons ---------- */
.btn, .btn-ghost,
.signup-box button, .signup-box [type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 52px;
  padding: .75rem 1.5rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn, .signup-box button, .signup-box [type="submit"] {
  background: var(--cta);
  color: #fff;
  border: 2px solid var(--cta);
  box-shadow: 0 2px 0 var(--cta-dark);
}
.btn:hover, .signup-box button:hover {
  background: var(--cta-dark);
  border-color: var(--cta-dark);
  color: #fff;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn::after { content: "\2192"; font-weight: 400; }  /* arrow */
.btn-ghost {
  background: transparent;
  color: var(--brand-dark);
  border: 2px solid var(--brand);
}
.btn-ghost:hover { background: var(--brand); color: #fff; text-decoration: none; }
.btn:focus-visible, .btn-ghost:focus-visible { outline-offset: 4px; border-radius: 999px; }

/* ---------- Hub grid ---------- */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
  gap: 1rem;
  margin-block: 1.5rem 3rem;
  padding: 0;
  list-style: none;
}
.hub-grid > li { margin: 0; display: flex; }
.hub-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.4rem;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.hub-card:hover {
  color: var(--ink);
  text-decoration: none;
  border-color: var(--brand);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}
.hub-icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 12px;
  background: var(--sage);
  color: var(--brand);
  margin-bottom: .6rem;
}
.hub-icon svg { width: 1.8rem; height: 1.8rem; }
.hub-card strong {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.25;
  color: var(--ink);
}
.hub-card strong::after { content: " \2192"; color: var(--cta); font-family: var(--sans); }
.hub-card span:not(.hub-icon) { color: var(--muted); font-size: 1rem; line-height: 1.55; }
.hub-card:nth-child(3n+2) .hub-icon,
.hub-grid > li:nth-child(3n+2) .hub-icon { background: var(--honey); color: #7A4E0B; }
.hub-card:nth-child(3n+3) .hub-icon,
.hub-grid > li:nth-child(3n+3) .hub-icon { background: #F6E3DA; color: var(--cta-dark); }

/* ---------- Card list (article lists and "start here") ---------- */
.card-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1rem;
  margin-block: 1.25rem 2.5rem;
}
.card-list li { margin: 0; display: flex; }
.card-list a {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  width: 100%;
  padding: 1.25rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 5px solid var(--brand);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card-list li:nth-child(3n+2) a { border-top-color: var(--honey-edge); }
.card-list li:nth-child(3n+3) a { border-top-color: var(--cta); }
.card-list a:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); color: var(--ink); }
.card-list strong {
  font-family: var(--serif);
  font-size: 1.22rem;
  line-height: 1.3;
  color: var(--ink);
}
.card-list a:hover strong { color: var(--brand-dark); text-decoration: underline; text-underline-offset: .18em; }
.card-list span { color: var(--muted); font-size: 1rem; line-height: 1.55; }

/* ---------- Coming soon ---------- */
.soon {
  color: var(--muted);
  font-style: italic;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, .5);
}

/* ---------- Trust row ---------- */
.trust-row {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-block: 2.5rem;
}
@media (min-width: 44em) { .trust-row { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
.trust-row > * {
  margin: 0;
  position: relative;
  padding: .25rem 0 .25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.trust-row > *::before {          /* check seal */
  content: "";
  position: absolute;
  left: 0;
  top: .3rem;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--sage);
}
.trust-row > *::after {
  content: "";
  position: absolute;
  left: .66rem;
  top: .92rem;
  width: .78rem;
  height: .42rem;
  border-left: 3px solid var(--brand);
  border-bottom: 3px solid var(--brand);
  transform: rotate(-45deg);
}
.trust-row strong { font-size: 1.05rem; color: var(--ink); }
.trust-row span, .trust-row p { color: var(--muted); font-size: 1rem; line-height: 1.55; margin: 0; }

/* ---------- Signup box ---------- */
.signup-box {
  position: relative;
  background: var(--brand-dark);
  color: #F4F1EA;
  border-radius: calc(var(--radius) + 6px);
  padding: 2rem 1.35rem;
  margin-block: 3rem 1rem;
  overflow: hidden;
}
.signup-box::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--honey-edge), var(--cta));
}
.signup-box h2, .signup-box h3 { color: #fff; margin-top: 0; }
.signup-box p { color: #E6EDE4; max-width: 40rem; }
.signup-box a:not(.btn):not(.btn-ghost) { color: #F7DFA9; }
.signup-box .btn-ghost { color: #fff; border-color: #fff; }
.signup-box .btn-ghost:hover { background: #fff; color: var(--brand-dark); }
.signup-box :focus-visible { outline-color: #F7DFA9; }
.signup-box .badge, .signup-box small {
  display: inline-block;
  font-size: .9375rem;
  color: #F7DFA9;
}
.signup-box .badge {
  font-weight: 700;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(247, 223, 169, .5);
  border-radius: 999px;
  padding: .2rem .8rem;
  margin-bottom: .9rem;
}
.signup-box form { display: flex; flex-direction: column; gap: .75rem; max-width: 34rem; }
.signup-box input[type="email"], .signup-box input[type="text"] {
  font: inherit;
  min-height: 52px;
  padding: .7rem 1rem;
  border-radius: 999px;
  border: 2px solid #fff;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.signup-box > :last-child { margin-bottom: 0; }
@media (min-width: 36em) { .signup-box form { flex-direction: row; } }
@media (min-width: 48em) { .signup-box { padding: 2.75rem 3rem; } }

/* ---------- Tables ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-block: 1.5rem 2rem;
  font-size: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: .75rem .9rem;
  border-bottom: 1px solid var(--line);
}
th { background: var(--sage); color: var(--brand-dark); font-weight: 700; }
tbody tr:nth-child(even) td { background: #FFFCF7; }
@media (max-width: 40em) {      /* phones: table scrolls inside itself, never the page */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: normal; }
  th, td { min-width: 9rem; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--walnut);
  color: #F6EFE4;
  padding-block: 2.5rem;
  font-size: 1rem;
  line-height: 1.6;
}
.site-footer p { max-width: 46rem; }
.site-footer a { color: #F2D9A6; }
.site-footer a:hover { color: #fff; }
.site-footer :focus-visible { outline-color: #F2D9A6; }
.site-footer small { font-size: .9375rem; color: #DCD2C4; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .hub-card:hover, .card-list a:hover { transform: none; }
}

/* ---------- Print: the checklist prints clean on plain paper ---------- */
@media print {
  @page { margin: 1.6cm; }
  body { background: #fff; color: #000; font-size: 12pt; line-height: 1.45; }
  .preview-bar, .site-header, .site-footer, .aff-note, .hero-actions, .signup-box, .btn, .btn-ghost { display: none !important; }
  main { padding: 0; }
  .wrap { max-width: none; padding: 0; }
  main > * { max-width: none !important; }
  h1 { font-size: 20pt; margin-bottom: 8pt; }
  h2 { font-size: 14pt; margin: 14pt 0 6pt; break-after: avoid; page-break-after: avoid; }
  .lede { color: #000; font-size: 11pt; }
  a { color: #000; text-decoration: none; }
  .note, .answer { background: none; border: 1px solid #000; border-left-width: 4px; padding: 6pt 8pt; }
  .checklist { box-shadow: none; border: 0; border-radius: 0; background: none; break-inside: auto; }
  .checklist li { background: none !important; border-bottom: 1px solid #999; padding: 5pt 0 5pt 24pt; border-radius: 0 !important; break-inside: avoid; page-break-inside: avoid; }
  .checklist li::before { left: 2pt; top: 6pt; width: 11pt; height: 11pt; border: 1.5pt solid #000; border-radius: 2pt; }
  .hero { background: none; padding: 0; margin-bottom: 12pt; }
  .hero::after { display: none; }
  .card-list a, .hub-card { box-shadow: none; border: 1px solid #999; }
  table, th, td { border: 1px solid #999; }
  th { background: #eee; color: #000; }
}
