:root {
  --page: #eef3f0;
  --card: #ffffff;
  --line: #dce5e0;
  --ink: #1d2a2e;
  --muted: #55666a;
  --accent: #2d5d4d;
  --accent-wash: #dceae4;
  --alert: #b2402b;
  --morning: #f2c14e;
  --midday: #84bfae;
  --evening: #9f92cc;
  --bedtime: #8b9bd0;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0e1412;
    --card: #1c1c1e;
    --line: #26302d;
    --ink: #eef3f0;
    --muted: #a7b5b0;
    --accent: #7cc2a9;
    --accent-wash: #1b2d27;
    --alert: #f0907a;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

header.site {
  padding: 22px 0;
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
nav.site a { margin-left: 18px; font-weight: 600; text-decoration: none; color: var(--muted); }
nav.site a:first-child { margin-left: 0; }
nav.site a[aria-current="page"] { color: var(--ink); }

main { padding-bottom: 64px; }

h1 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.15; margin: 24px 0 12px; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 36px 0 8px; }
h3 { font-size: 1.1rem; margin: 0 0 4px; }
p { margin: 0 0 14px; text-wrap: pretty; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 22px;
  margin: 14px 0;
}

/* The four-lid pill box, used once on the home page */
.lids { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 28px 0 8px; }
.lid { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.lid b { display: block; padding: 8px 14px; color: #1d2a2e; font-size: 0.95rem; }
.lid span { display: block; padding: 10px 14px 14px; color: var(--muted); font-size: 0.95rem; }
.lid.morning b { background: var(--morning); }
.lid.midday b { background: var(--midday); }
.lid.evening b { background: var(--evening); }
.lid.bedtime b { background: #45568a; color: #fff; }

.points { display: grid; gap: 12px; margin: 8px 0; }
.point { display: grid; grid-template-columns: 12px 1fr; gap: 14px; align-items: start; }
.point::before { content: ""; width: 12px; height: 12px; border-radius: 4px; margin-top: 8px; background: var(--accent); }
.point:nth-child(2)::before { background: var(--morning); }
.point:nth-child(3)::before { background: var(--evening); }
.point:nth-child(4)::before { background: var(--midday); }

.promise { background: var(--accent-wash); border-color: transparent; }
.notice { border-left: 5px solid var(--alert); }

details { border-top: 1px solid var(--line); padding: 14px 0; }
details:first-of-type { border-top: 0; }
summary { cursor: pointer; font-weight: 700; }
details p { margin-top: 10px; }

.email { font-size: 1.25rem; font-weight: 700; word-break: break-all; }

footer.site { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: 0.92rem; }
footer.site a { color: var(--muted); }

@media (max-width: 480px) {
  .lids { grid-template-columns: 1fr; }
  nav.site a { margin-left: 14px; }
}
