/* Baby Henry: "nursery blanket" theme.
   Headings: Fraunces (soft storybook serif). Body: Atkinson Hyperlegible
   (made by the Braille Institute for low-vision readers).
   Every text color here meets WCAG AA (4.5:1) on the surface it sits on,
   and clickable edges and focus rings meet 3:1. Check before changing colors. */
:root {
  color-scheme: light dark;
  --bg: #fbf7ef;           /* warm cream paper */
  --card: #ffffff;
  --ink: #1f2e45;          /* deep navy, 13.7:1 on card */
  --muted: #4a5870;        /* 7.2:1 on card, 5.2:1 on darkest gingham square */
  --line: #dbe6f1;         /* decorative only */
  --edge: #6f93ba;         /* clickable card edges, 3.2:1 */
  --stitch: #b7cfe7;
  --accent: #2f5f8a;       /* denim blue */
  --accent-hover: #264f74;
  --accent-ink: #ffffff;
  --accent-sub: #e6eef7;
  --accent-soft: #e3eef8;  /* baby blue */
  --butter: #f2c94c;
  --butter-soft: #fdf3d3;
  --sage-soft: #e1efe3;
  --peach-soft: #fbe6dc;
  --lilac-soft: #ebe6f6;
  --good: #22603f; --good-soft: #dff0e3;
  --warn: #7a4e0e; --warn-soft: #fbefd5;
  --check: rgba(108, 156, 204, .16);   /* gingham stripe */
  --focus: #1f2e45;
  --radius: 22px;
  --shadow: 0 1px 0 rgba(31, 46, 69, .05), 0 6px 18px rgba(31, 46, 69, .08);
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Atkinson Hyperlegible", Verdana, system-ui, sans-serif;
}
/* "Nursery at night" */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #132035; --card: #1b2a41; --ink: #f4f1ea; --muted: #bcc7d6;
    --line: #2b3f5c; --edge: #5a7aa3; --stitch: #3c5577;
    --accent: #a7cbec; --accent-hover: #c0dbf3; --accent-ink: #12223a; --accent-sub: #1d3150;
    --accent-soft: #24395a; --butter: #f2d27a; --butter-soft: #3a3626;
    --sage-soft: #213a33; --peach-soft: #3d2c2c; --lilac-soft: #2e2a45;
    --good: #8fd6ab; --good-soft: #1d3a2c; --warn: #f0c27a; --warn-soft: #3d311d;
    --check: rgba(167, 203, 236, .08);
    --focus: #f2d27a;
    --shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 8px 22px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; position: relative; min-height: 100vh;
  background: var(--bg); color: var(--ink);
  font: 18px/1.6 var(--font-body);
  padding: 0 16px max(40px, env(safe-area-inset-bottom));
}
/* Gingham blanket band across the top, with a scalloped hem. */
body::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 96px; pointer-events: none;
  background:
    linear-gradient(90deg, var(--check) 50%, transparent 0) 50% 0 / 32px 32px,
    linear-gradient(var(--check) 50%, transparent 0) 50% 0 / 32px 32px;
  -webkit-mask:
    linear-gradient(#000 0 0) 50% 0 / 100% calc(100% - 16px) no-repeat,
    radial-gradient(circle at 50% 0, #000 15.5px, transparent 16px) 50% 100% / 32px 16px repeat-x;
          mask:
    linear-gradient(#000 0 0) 50% 0 / 100% calc(100% - 16px) no-repeat,
    radial-gradient(circle at 50% 0, #000 15.5px, transparent 16px) 50% 100% / 32px 16px repeat-x;
}
body:has(.hero)::before { height: 176px; }  /* taller band behind the hub page's badge */
main { position: relative; max-width: 560px; margin: 0 auto; padding-top: max(20px, env(safe-area-inset-top)); }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  font-family: var(--font-head); font-weight: 600; line-height: 1.15;
  margin: 0 0 10px; letter-spacing: -.005em; text-wrap: balance;
}
h1 { font-size: 40px; }
h2 { font-size: 26px; }
p { margin: 0 0 14px; text-wrap: pretty; }
.muted { color: var(--muted); }
.small { font-size: 16px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Hub page ---------- */
.hero { text-align: center; padding: 18px 0 6px; }
.mono { position: relative; width: 148px; height: 148px; margin: 0 auto 10px; display: grid; place-items: center; }
.mono svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mono .scallop { fill: var(--card); filter: drop-shadow(0 4px 10px rgba(31, 46, 69, .14)); }
.mono .stitch { fill: none; stroke: var(--stitch); stroke-width: 2; stroke-dasharray: 5 5; }
.mono .star { fill: var(--butter); }
.mono .letter { position: relative; font-family: var(--font-head); font-weight: 600; font-size: 60px; line-height: 1; color: var(--accent); margin-top: -4px; }
.eyebrow {
  display: inline-block; margin: 0 0 10px; padding: 4px 14px; border-radius: 999px;
  background: var(--butter-soft); color: var(--ink);
  font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.hero h1 { font-size: 46px; margin-bottom: 4px; }
.hero p { font-size: 19px; }

.note {
  position: relative; background: var(--card); border-radius: var(--radius);
  padding: 26px 26px 22px; box-shadow: var(--shadow); margin: 20px 0 28px;
}
/* quilt stitching */
.note::before {
  content: ""; position: absolute; inset: 8px; pointer-events: none;
  border: 2px dashed var(--stitch); border-radius: calc(var(--radius) - 7px);
}
.note p:last-child { margin: 0; }
.sig { font-family: var(--font-head); font-style: italic; font-size: 19px; color: var(--muted); }

.links { display: grid; gap: 14px; margin: 0 0 32px; }
.link {
  display: flex; align-items: center; gap: 16px; min-height: 80px; padding: 14px 18px;
  text-decoration: none; color: var(--ink); background: var(--card);
  border: 2px solid var(--edge); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.link:hover { transform: translateY(-2px); box-shadow: 0 2px 0 rgba(31, 46, 69, .05), 0 12px 24px rgba(31, 46, 69, .12); }
.link:active { transform: translateY(0); }
.link:focus-visible { border-radius: var(--radius); outline-offset: 4px; }
.link .icon {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--ink);
}
.link .icon svg { width: 28px; height: 28px; }
.icon.butter { background: var(--butter-soft); }
.icon.sage { background: var(--sage-soft); }
.icon.peach { background: var(--peach-soft); }
.icon.lilac { background: var(--lilac-soft); }
.link .text { flex: 1; min-width: 0; }
.link .title { display: block; font-family: var(--font-head); font-weight: 600; font-size: 22px; line-height: 1.25; }
.link .sub { display: block; color: var(--muted); font-size: 16px; line-height: 1.4; margin-top: 2px; }
.link .chev { color: var(--accent); font-size: 26px; line-height: 1; flex: none; }

.link.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.link.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.link.primary .icon { background: rgba(255, 255, 255, .18); color: inherit; }
.link.primary .sub, .link.primary .chev { color: var(--accent-sub); }
@media (prefers-color-scheme: dark) {
  .link.primary .icon { background: rgba(18, 34, 58, .14); }
  .link.primary .sub, .link.primary .chev { color: var(--accent-ink); }
}

/* "Coming soon" card: stays readable, but clearly not a button yet. */
.link.disabled {
  pointer-events: none; background: transparent; box-shadow: none;
  border: 2px dashed var(--edge);
}
.link.disabled .chev {
  font: 700 13px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); background: var(--butter-soft); border-radius: 999px; padding: 7px 12px;
}

/* ---------- Inner pages ---------- */
.back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 8px 18px 8px 14px;
  margin: 4px 0 20px; border-radius: 999px; background: var(--card); border: 2px solid var(--edge);
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; box-shadow: var(--shadow);
}
.back:hover { border-color: var(--accent); }
main > h1 { font-size: 40px; }
main > h1 + .muted { font-size: 19px; margin-bottom: 26px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin-bottom: 22px;
}
.card .body { padding: 22px 22px 22px; }
.card .photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--accent-soft); }
.card .photo.hidden { display: none; }
.card h2 { margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.chip { background: var(--butter-soft); color: var(--ink); border-radius: 999px; padding: 4px 12px; font-size: 15px; font-weight: 700; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 700;
  border-radius: 999px; padding: 14px 22px; border: 0; font-size: 19px; font-family: inherit; cursor: pointer;
  box-shadow: 0 3px 0 rgba(31, 46, 69, .18);
}
.btn:hover { background: var(--accent-hover); }
.btn:focus-visible { border-radius: 999px; outline-offset: 4px; }
.btn.secondary { background: var(--accent-soft); color: var(--ink); }

table.prices { width: 100%; border-collapse: collapse; margin: 8px 0 6px; font-size: 17px; }
table.prices th {
  text-align: left; font-weight: 700; color: var(--muted); font-size: 14px; text-transform: uppercase;
  letter-spacing: .05em; padding: 8px 0; border-bottom: 2px solid var(--line);
}
table.prices td { padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.prices tr:last-child td { border-bottom: 0; }
table.prices tr.has-note td { border-bottom: 0; padding-bottom: 2px; }
table.prices tr.note-row td { padding-top: 0; }
table.prices td.r, table.prices th.r { text-align: right; white-space: nowrap; padding-left: 14px; }
table.prices a.store { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--edge); text-underline-offset: 4px; }
table.prices a.store:hover { text-decoration-color: currentColor; }
table.prices a.store::after { content: " ↗"; color: var(--accent); font-weight: 400; }
.badge {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
table.prices .badge { display: table; margin: 6px 0 0; }   /* own line under the store name */
table.prices th.r { white-space: normal; }
.badge.best { background: var(--good-soft); color: var(--good); }
.badge.stale { background: var(--warn-soft); color: var(--warn); }
.per { color: var(--muted); font-size: 15px; line-height: 1.4; }
.check { color: var(--accent); font-size: 16px; font-weight: 700; }
.updated { color: var(--muted); font-size: 15px; margin-top: 8px; }

.callout { background: var(--butter-soft); border-radius: 16px; padding: 16px 18px; margin: 18px 0; }
.callout p:last-child { margin: 0; }

footer { text-align: center; color: var(--muted); font-family: var(--font-head); font-style: italic; font-size: 18px; margin-top: 32px; }
footer::before { content: ""; display: block; width: 72px; height: 10px; margin: 0 auto 14px;
  background: radial-gradient(circle, var(--butter) 3px, transparent 3.5px) 0 50% / 18px 10px repeat-x; }
footer a { color: inherit; }
footer .link { text-align: left; font-family: var(--font-body); font-style: normal; margin-bottom: 20px; }
footer p { margin: 0; }

@media (max-width: 380px) {
  .hero h1 { font-size: 40px; }
  .link { gap: 12px; padding: 12px 14px; }
  .link .icon { width: 48px; height: 48px; }
  table.prices { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .link:hover { transform: none; }
}
