:root {
  --ink: #2b2118;
  --muted: #5c4a3a;
  --paper: #fffaf3;
  --card: #ffffff;
  --line: #3d2b1f;
  --rose: #e11d48;
  --sun: #f59e0b;
  --leaf: #0f766e;
  --sky: #1d4ed8;
  --grape: #6d28d9;
  --honey: #c2410c;
  --shadow: 0 14px 40px rgba(61, 43, 31, 0.12);
  --radius: 1.4rem;
}

html {
  font-size: 22px;
  scroll-behavior: smooth;
}

html[data-text-size="comfort"] { font-size: 18px; }
html[data-text-size="large"] { font-size: 22px; }
html[data-text-size="extra"] { font-size: 28px; }

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: #fff3e4;
  font-family: Verdana, "Segoe UI", Candara, sans-serif;
  line-height: 1.5;
}

body::before {
  content: "";
  display: block;
  height: 0.45rem;
  background: linear-gradient(90deg, #ff6b6b, #ffd166, #06d6a0, #4d96ff, #9b5de5, #f15bb5);
  position: sticky;
  top: 0;
  z-index: 40;
}

h1, h2, h3 {
  font-family: Georgia, "Palatino Linotype", Palatino, serif;
  line-height: 1.2;
  margin: 0 0 0.6rem;
}

h1 { font-size: 2.3rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.2rem; }

p { margin: 0 0 0.8rem; }

a { color: #9a3412; }
a:hover { color: #7c2d12; }

img { max-width: 100%; height: auto; display: block; }

.skip {
  position: absolute;
  left: 1rem;
  top: -5rem;
  background: #fff;
  color: #000;
  padding: 0.7rem 1rem;
  z-index: 80;
  border: 3px solid #000;
  border-radius: 0.8rem;
}
.skip:focus { top: 0.6rem; }

:focus-visible {
  outline: 4px solid #1d4ed8;
  outline-offset: 3px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.55;
}
.blob-a { width: 22rem; height: 22rem; background: #fecdd3; top: -4rem; left: -4rem; }
.blob-b { width: 18rem; height: 18rem; background: #fde68a; top: 8rem; right: -3rem; }
.blob-c { width: 16rem; height: 16rem; background: #99f6e4; bottom: 10%; left: 8%; }
.blob-d { width: 20rem; height: 20rem; background: #ddd6fe; bottom: -6rem; right: 10%; }

.floater {
  position: absolute;
  font-size: 2rem;
  opacity: 0.35;
}
.floater-a { top: 18%; left: 12%; }
.floater-b { top: 42%; right: 8%; }
.floater-c { bottom: 18%; left: 22%; }

.top, main, .site-foot, .dock { position: relative; z-index: 1; }

.top {
  padding: 1rem 1rem 0.4rem;
}

.top-inner, .main-nav, .wrap, .site-foot, .comfort {
  width: min(1120px, calc(100% - 1.5rem));
  margin-left: auto;
  margin-right: auto;
}

.top-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  background: #3d2b1f;
  color: #fff8f0;
  border-radius: 1.6rem;
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  color: #fff8f0;
  text-decoration: none;
}
.brand small { display: block; color: #ffe7c2; font-size: 0.85rem; }
.logo {
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  background: #ffd166;
  color: #3d2b1f;
  border-radius: 1rem;
  font-size: 1.7rem;
}
.wordmark { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.03em; }
.wordmark span:nth-child(1) { color: #ffd166; }
.wordmark span:nth-child(2) { color: #fda4af; }
.wordmark span:nth-child(3) { color: #99f6e4; }

.top-actions, .main-nav, .pair-buttons, .filters, .emergency-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.me {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #fff8f0;
  text-decoration: none;
  font-weight: 700;
}

.main-nav {
  padding: 0.8rem 0 0.2rem;
}
.main-nav a {
  text-decoration: none;
  background: #fff;
  color: var(--ink);
  border: 3px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-weight: 700;
}
.main-nav a[aria-current="page"] {
  background: #ffd166;
}

.wrap { padding: 0.4rem 0 1rem; }

.hero, .page-head { margin: 0.4rem 0 1rem; }
.eyebrow {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--honey);
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
}
.lede { font-size: 1.15rem; max-width: 40rem; }

.quote {
  margin: 1rem 0 0;
  padding: 1rem 1.1rem;
  background: #fff7d6;
  border-left: 0.45rem solid #f59e0b;
  border-radius: 1rem;
}
.quote p { font-family: Georgia, serif; font-size: 1.35rem; }

.card, .note, .memory-card, .recipe-card, .tile, .stat {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: 1.2rem;
  margin: 0 0 1rem;
  border: 3px solid transparent;
  border-top: 0.55rem solid #ff8a5b;
}
.card-sun { border-top-color: #f59e0b; }
.card-leaf { border-top-color: #0f766e; }
.card-rose { border-top-color: #e11d48; }
.card-sky { border-top-color: #2563eb; }
.card-grape { border-top-color: #7c3aed; }
.card-honey { border-top-color: #ea580c; }
.card-quiet { border-top-color: #3d2b1f; background: #fffaf3; }

.split, .recipe-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1rem;
  align-items: start;
}

.stats, .tile-grid, .memory-grid, .recipe-grid, .family-grid, .mood-grid {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.stats { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.tile-grid { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.memory-grid, .family-grid { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.recipe-grid { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.mood-grid { grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }

.stat, .tile, .recipe-card {
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  border: 3px solid var(--line);
}
.stat strong, .tile strong { display: block; font-size: 1.8rem; font-family: Georgia, serif; }
.stat span, .tile small, .recipe-card small { display: block; color: var(--muted); }
.stat-rose { background: #ffe4e6; }
.stat-leaf { background: #ccfbf1; }
.stat-sun { background: #fef3c7; }
.stat-sky { background: #dbeafe; }
.tile-leaf { background: #ecfdf5; }
.tile-rose { background: #fff1f2; }
.tile-sun { background: #fffbeb; }
.tile-sky { background: #eff6ff; }
.tile span, .recipe-card > span { font-size: 2rem; display: block; }

.btn, button, .filters a, .person-pick {
  font: inherit;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 3px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}
.btn-primary { background: #c2410c; color: #fff; border-color: #7c2d12; }
.btn-quiet { background: #fffaf3; }
.btn-danger { background: #fff1f2; color: #9f1239; border-color: #9f1239; }
.btn-emergency { background: #9f1239; color: #fff; border-color: #4c0519; }
.btn-xl { min-height: 3.8rem; font-size: 1.15rem; width: 100%; margin-top: 0.4rem; }
.top-actions .btn { color: var(--ink); }
.top-actions .btn-primary,
.top-actions .btn-emergency { color: #fff; }

label, legend {
  display: block;
  font-weight: 700;
  margin: 0.8rem 0 0.35rem;
}
legend { padding: 0; }

input, textarea, select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 1rem;
  padding: 0.75rem 0.9rem;
}
textarea { resize: vertical; }

.hint, .meta, .muted { color: var(--muted); }
.hint { font-size: 0.95rem; }

.flash, .errors, .banner {
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border: 3px solid var(--line);
}
.flash-success { background: #d1fae5; }
.flash-warning, .errors { background: #ffe4e6; }
.errors p, .errors li { overflow-wrap: anywhere; white-space: normal; }
.password-banner h2 { font-size: 2rem; }
#fill-starter { margin-top: 0.7rem; }
.show-password { margin-top: 0.7rem; }
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear { display: none; }
.price { font-size: 2.4rem; font-weight: 700; margin: 0.2rem 0 0.6rem; }
.grace-banner { background: #fff7d6; }
.trial-banner { background: #d1fae5; }
.membership-card .btn { margin-top: 0.6rem; }
.banner { background: #fff7d6; }
.banner-care { background: #ffe4e6; border-color: #9f1239; }
.errors ul, .care-list, .plan-list, .kind-list, .roster, .contact-list, .plain-list { margin: 0; padding-left: 0; list-style: none; }
.care-list li, .plan-list li, .roster li, .contact-list li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.7rem 0;
  border-bottom: 2px dashed #eadfce;
}
.kind-list li { padding: 0.55rem 0; border-bottom: 2px dashed #eadfce; }

.avatar {
  width: 3.4rem;
  height: 3.4rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 3px solid var(--line);
  font-size: 1.6rem;
}
.person-head, .note-top { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 0.7rem; }
.badge {
  display: inline-block;
  background: #ffd166;
  border: 3px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-weight: 700;
}
.big-phone .phone, .big-phone a {
  font-size: 1.45rem;
  font-weight: 700;
}

.note { padding: 1rem; margin-bottom: 0.8rem; border: 3px solid #fbcfe8; }
.note-kindness { background: #fff1f2; border-color: #fb7185; }
.note-body { font-size: 1.15rem; max-width: 65ch; }
.inline-form { margin-top: 0.6rem; }

.choice-grid { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.choice, .mood {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 3.4rem;
  min-height: 3.4rem;
  padding: 0.4rem;
  border: 3px solid var(--line);
  border-radius: 1rem;
  background: #fff;
}
.choice.wide, .swatch { min-width: 7rem; padding: 0.6rem 0.8rem; }
.choice input, .mood input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.choice:has(input:checked), .mood:has(input:checked) {
  background: #fef3c7;
  box-shadow: inset 0 0 0 3px #0f766e;
}
.color-choice span {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 3px solid #3d2b1f;
  display: block;
}
.mood { justify-items: center; text-align: center; padding: 0.8rem; }
.mood-face { font-size: 2rem; }
.mood small { color: var(--muted); }

.people-picks { display: grid; gap: 0.55rem; }
.person-pick {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  text-align: left;
  width: 100%;
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 1rem;
  padding: 0.45rem;
}
.person-pick small { display: block; color: var(--muted); font-weight: 400; }

.filters a {
  text-decoration: none;
  border: 3px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}
.filters a[aria-current="page"] { background: #ffd166; }

.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}
.cal-label, .cal-day {
  border-radius: 0.8rem;
  padding: 0.35rem;
  min-height: 3.2rem;
}
.cal-label { font-weight: 700; text-align: center; background: #3d2b1f; color: #fff8f0; }
.cal-day { background: #fff; border: 2px solid #eadfce; }
.cal-day span { font-weight: 700; }
.cal-day small { display: block; font-size: 0.8rem; }
.cal-day.is-out { opacity: 0.45; }
.cal-day.is-today { border: 3px solid #c2410c; background: #fff7ed; }
.cal-day.has-plan { background: #fef3c7; }

.story-art {
  min-height: 11rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  font-size: 4rem;
  margin-bottom: 0.7rem;
  border: 3px solid rgba(61, 43, 31, 0.25);
}
.memory-card {
  padding: 0.8rem;
  border: 3px solid var(--line);
  background: #fff;
}
.memory-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0.8rem;
  margin-bottom: 0.6rem;
}
.memory-card h2 { font-size: 1.25rem; }
.swatch { color: #2b2118; text-shadow: 0 1px 0 #fff; }

.recipe-card { display: block; background: #fff7ed; }
.recipe-sheet h1 span { font-size: 0.9em; }
.ingredients li, .steps li { margin: 0.45rem 0; }
.steps { padding-left: 1.4rem; }
.steps li { padding-left: 0.3rem; }
.ingredients li {
  list-style: none;
  padding: 0.45rem 0.7rem;
  background: #fff7ed;
  border-radius: 0.8rem;
}

.activity h2 { font-size: 1.8rem; }
.fact p { font-size: 1.15rem; }
.help-steps { padding-left: 1.3rem; }
.help-steps li { margin: 0.7rem 0; }
.plain-list li { margin: 0.55rem 0; padding-left: 0.2rem; }
.editor { margin-top: 0.8rem; }
.editor summary {
  font-weight: 700;
  cursor: pointer;
  min-height: 3rem;
  display: flex;
  align-items: center;
}
.remove-form, .check { margin-top: 0.8rem; }
.pick-list { display: grid; gap: 0.45rem; margin-top: 0.6rem; }
.pick-list .check, .choice-set .check { background: #fff; border: 3px solid var(--line); border-radius: 1rem; padding: 0.7rem; margin-top: 0; }
.check { display: flex; gap: 0.6rem; align-items: center; font-weight: 700; }
.check input { width: 1.4rem; height: 1.4rem; }

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin: 1rem 0 2rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: space-between;
  align-items: center;
}

.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.8rem; }

.dock {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 0.6rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.35rem;
  width: min(40rem, calc(100% - 1rem));
  justify-content: space-between;
  background: rgba(255, 248, 240, 0.96);
  border: 3px solid var(--line);
  border-radius: 1.4rem;
  padding: 0.35rem;
  box-shadow: var(--shadow);
}
.dock a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  border-radius: 1rem;
  padding: 0.35rem 0.2rem;
  min-height: 3.4rem;
}
.dock a span { display: block; }
.dock a span:first-child { font-size: 1.3rem; }
.dock a[aria-current="page"] { background: #ffd166; }

.site-foot { padding: 0.5rem 0 7.5rem; }
.comfort {
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 1.2rem;
  padding: 0.8rem;
  display: grid;
  gap: 0.45rem;
}
.comfort div { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.comfort button, .comfort button[aria-pressed="true"] {
  font: inherit;
  font-weight: 700;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0.45rem 0.75rem;
  min-height: 2.8rem;
}
.comfort button[aria-pressed="true"] { background: #ffd166; }
.build-note, .copyright, .colophon, .speech-status, .noscript {
  width: min(1120px, calc(100% - 1.5rem));
  margin: 0.35rem auto;
}
.build-note { margin-top: 1rem; color: var(--ink); font-weight: 700; }
.copyright { color: var(--ink); }
.colophon, .speech-status, .noscript { color: var(--muted); }
.noscript {
  background: #fff7d6;
  color: var(--ink);
  padding: 0.7rem;
  border-radius: 0.8rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .floater, .blob { display: none; }
}

html[data-contrast="high"] {
  --ink: #000;
  --muted: #000;
  --paper: #fff;
  --card: #fff;
  --line: #000;
  --shadow: none;
}
html[data-contrast="high"] body { background: #fff; }
html[data-contrast="high"] body::before,
html[data-contrast="high"] .sky { display: none; }
html[data-contrast="high"] .card,
html[data-contrast="high"] .note,
html[data-contrast="high"] .tile,
html[data-contrast="high"] .stat,
html[data-contrast="high"] .btn,
html[data-contrast="high"] .top-inner,
html[data-contrast="high"] .memory-card,
html[data-contrast="high"] .recipe-card {
  background: #fff;
  color: #000;
  border-color: #000;
  box-shadow: none;
}
html[data-contrast="high"] .btn-primary,
html[data-contrast="high"] .btn-emergency,
html[data-contrast="high"] .top-inner,
html[data-contrast="high"] .cal-label {
  background: #000;
  color: #fff;
}
html[data-contrast="high"] .wordmark span,
html[data-contrast="high"] .brand,
html[data-contrast="high"] .brand small,
html[data-contrast="high"] .me { color: #fff; }
html[data-contrast="high"] a { color: #000; text-decoration: underline; }

@media print {
  .sky, .top, .dock, .site-foot, .noscript, .no-print, body::before { display: none !important; }
  body { background: #fff; }
  .card, .recipe-sheet { box-shadow: none; border: 1px solid #000; }
}
