/* The Little Months — site styles. Tokens mirror The Little Months design system (tokens.json v2). */
:root {
  color-scheme: light dark;
  --surface: #fffaf6;
  --surface-raised: #ffffff;
  --surface-sunken: #f5efea;
  --ink: #2b2b33;
  --ink-muted: #5e5e6b;
  --hairline: #ece3dc;
  --brand: #3f6e9e;
  --brand-strong: #2f5680;
  --on-brand: #ffffff;
  --blush: #f7d6d6;
  --sky: #cfe3f4;
  --butter: #fbebb2;
  --mint: #d2ebdd;
  --blush-deep: #a6475e;
  --butter-deep: #7c5e0a;
  --mint-deep: #2a6a50;
  --success: var(--mint-deep);
  --danger: #b03a3a;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-6: 48px;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --font-display: "Young Serif", Georgia, "Times New Roman", serif;
  --font-sans: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;

  /* Stage tint for the page; set by .stage-* on <body>. */
  --stage: var(--blush);
  --stage-deep: var(--blush-deep);
}
/* Night theme: follows the reader's dark setting, for 3 a.m. feeds. */
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #17181f;
    --surface-raised: #20212a;
    --surface-sunken: #111218;
    --ink: #f1ece8;
    --ink-muted: #a9a8b4;
    --hairline: #31323d;
    --brand: #8fb8e3;
    --brand-strong: #b9d3ef;
    --on-brand: #17181f;
    --blush: #4a3338;
    --sky: #2a3a4f;
    --butter: #4a4128;
    --mint: #2a4237;
    --blush-deep: #f0a9b8;
    --butter-deep: #ebcb6e;
    --mint-deep: #8fd1b1;
    --danger: #f0948c;
  }
  .photo, .page-previews img { filter: brightness(0.92); }
}
.stage-blush { --stage: var(--blush); --stage-deep: var(--blush-deep); }
.stage-sky { --stage: var(--sky); --stage-deep: var(--brand-strong); }
.stage-butter { --stage: var(--butter); --stage-deep: var(--butter-deep); }
.stage-mint { --stage: var(--mint); --stage-deep: var(--mint-deep); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 28px;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface-raised); padding: 8px 16px; border-radius: var(--radius-md); z-index: 10; }

/* Layout */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.wrap-mid { max-width: 1000px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap, .wrap-narrow, .wrap-mid { padding: 0 16px; } }
.section { padding: 64px 0; }
.band { background: var(--surface-raised); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.split > * { flex: 1 1 420px; min-width: 0; }
.split-top { align-items: flex-start; }
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.center { text-align: center; }
.center .stack, .center.stack, .center .stack-lg, .center.stack-lg { align-items: center; }

/* Type */
.eyebrow { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-strong); }
.eyebrow-muted { color: var(--ink-muted); }
.eyebrow-stage { color: var(--stage-deep); }
.h-xl { font-family: var(--font-display); font-size: 56px; line-height: 62px; letter-spacing: -0.01em; text-wrap: balance; }
.h-md { font-family: var(--font-display); font-size: 36px; line-height: 44px; letter-spacing: -0.005em; text-wrap: balance; }
.h-card { font-family: var(--font-display); font-size: 24px; line-height: 32px; }
.h-title { font-size: 18px; line-height: 26px; font-weight: 700; }
.lead { max-width: 34em; }
.muted { color: var(--ink-muted); }
.small { font-size: 15px; line-height: 24px; }
.tiny { font-size: 13px; line-height: 20px; }
.price { font-family: var(--font-display); font-size: 36px; line-height: 44px; }
.section-head { margin-bottom: 32px; }
.section-head p { margin-top: 8px; color: var(--ink-muted); }
@media (max-width: 640px) {
  .h-xl { font-size: 40px; line-height: 46px; }
  .h-md { font-size: 30px; line-height: 38px; }
  .section { padding: 48px 0; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: var(--radius-md);
  font-family: inherit; font-weight: 700; font-size: 17px; line-height: 1.2;
  text-decoration: none; cursor: pointer; border: 1px solid transparent; text-align: center;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-strong); color: var(--on-brand); }
.btn-secondary { background: var(--surface-raised); color: var(--brand-strong); border-color: var(--hairline); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand-strong); }
.btn-light { background: var(--surface-raised); color: var(--brand-strong); }
.btn-light:hover { background: var(--sky); color: var(--brand-strong); }
.btn-lg { min-height: 52px; font-size: 18px; }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 16px; }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.link-strong { font-weight: 700; }

/* Badges */
.badge { display: inline-block; align-self: flex-start; padding: 4px 12px; border-radius: var(--radius-pill); font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.badge-free { background: var(--butter); }
.badge-live { background: var(--mint); }
.badge-soon { background: var(--surface-sunken); color: var(--ink-muted); }
.badge-stage { background: var(--stage); }

/* Header */
.site-header { border-bottom: 1px solid var(--hairline); background: var(--surface); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 18px; padding-bottom: 18px; }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.wordmark .logo { display: block; width: 236px; height: auto; }
.logo-footer { display: block; width: 210px; height: auto; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; font-size: 16px; font-weight: 700; }
.nav a { color: var(--ink); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--brand); }
@media (max-width: 640px) { .wordmark .logo { width: 200px; } .nav { gap: 0 18px; font-size: 15px; } }
.preview-bar { background: var(--brand-strong); color: var(--on-brand); text-align: center; font-size: 15px; line-height: 22px; padding: 8px 16px; }

/* Cards */
.card { background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: var(--radius-md); }
.card-pad { padding: 24px; }
.card-lg { border-radius: var(--radius-lg); padding: 40px; }
@media (max-width: 640px) { .card-lg { padding: 24px; } .card-pad { padding: 16px; } }
.product-card { display: flex; flex-direction: column; overflow: hidden; }
.product-card .body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
@media (max-width: 640px) { .product-card .body { padding: 20px 16px; } }
.product-card .desc { flex-grow: 1; }
.product-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.product-card .amount { font-size: 18px; line-height: 26px; font-weight: 700; }
.stage-card { border-top: 10px solid var(--stage); }
.linkcard { color: var(--ink); text-decoration: none; display: flex; gap: 16px; align-items: center; }
.linkcard:hover { border-color: var(--brand); color: var(--ink); }

/* Media */
.photo { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: center 30%; border-radius: var(--radius-lg); background: var(--surface-sunken); }
.photo-flat { border-radius: 0; }
.photo-ph { width: 100%; aspect-ratio: 3 / 2; background: var(--stage); display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; font-size: 14px; line-height: 20px; color: var(--ink); }
.photo-ph-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tile-blocks { display: grid; grid-template-columns: repeat(4, 28px); gap: 6px; }
.tile-blocks span { height: 28px; border-radius: 8px; background: var(--surface-raised); opacity: 0.85; }
figure { margin: 0; }
figcaption { margin-top: 10px; }

/* Lists */
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist svg { flex: none; margin-top: 4px; }
.inline-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; line-height: 24px; color: var(--ink-muted); }
.inline-checks li { display: flex; align-items: center; gap: 6px; }
.iconlist { list-style: none; margin: 0; padding: 20px 0 0; border-top: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 24px; }
.iconlist li { display: flex; gap: 10px; align-items: flex-start; }
.iconlist svg { flex: none; margin-top: 2px; }
.icon-dot { width: 44px; height: 44px; border-radius: var(--radius-pill); background: var(--sky); color: var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex: none; }
.icon-dot.blush { background: var(--blush); }
.icon-dot.butter { background: var(--butter); }
.icon-dot.mint { background: var(--mint); }
.icon-dot.stage { background: var(--stage); }

/* Panels */
.panel-optin { background: var(--butter); border-radius: var(--radius-lg); padding: 48px; }
.panel-stage { background: var(--stage); border-radius: var(--radius-lg); padding: 48px; }
.panel-sky { background: var(--sky); border-radius: var(--radius-lg); padding: 40px; }
.panel-mint { background: var(--mint); border-radius: var(--radius-lg); padding: 40px; }
@media (max-width: 640px) { .panel-optin, .panel-stage, .panel-sky, .panel-mint { padding: 24px 16px; } }
.band-dark { background: var(--brand-strong); color: var(--on-brand); padding: 48px 0; }
.band-dark .wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.hero-tint { background: linear-gradient(to bottom, var(--stage) 0, var(--stage) 100%); }

/* Sample day page */
.dp { background: var(--surface); }
.dp .box { border-radius: var(--radius-md); padding: 16px; font-size: 15px; line-height: 24px; }
.dp .box-sky { background: var(--sky); }
.dp .box-sunken { background: var(--surface-sunken); }
.dp .box-mint { background: var(--mint); }
.dp .try { background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: var(--radius-md); padding: 16px; }
.dp .try ol { margin: 8px 0 0; padding-left: 20px; font-size: 15px; line-height: 24px; display: flex; flex-direction: column; gap: 4px; }
.dp .box ul { margin: 6px 0 0; padding-left: 20px; }
.danger-line { color: var(--danger); font-weight: 700; display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; }
.danger-line svg { flex: none; margin-top: 3px; }

/* Safe sleep strip */
.safe-sleep { background: var(--sky); border-radius: var(--radius-lg); padding: 32px; display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: center; }
.safe-sleep .rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px 24px; flex: 1 1 520px; }
.safe-sleep .rules div { font-size: 15px; line-height: 24px; }
@media (max-width: 640px) { .safe-sleep { padding: 24px 16px; } }

/* Forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
label, legend { font-size: 17px; line-height: 24px; font-weight: 700; }
.optional { font-weight: 400; color: var(--ink-muted); }
input[type="email"], input[type="text"] {
  min-height: 48px; padding: 0 16px; border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  background: var(--surface-raised); font: inherit; color: var(--ink); width: 100%;
}
input::placeholder { color: var(--ink-muted); }
input[type="email"]:focus, input[type="text"]:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.inline-field { display: flex; flex-wrap: wrap; gap: 12px; }
.inline-field input { flex: 1 1 220px; width: auto; min-width: 0; }
.form-error { color: var(--danger); font-weight: 700; }
.form-panel { background: var(--butter); border-radius: var(--radius-lg); padding: 32px; }
@media (max-width: 640px) { .form-panel { padding: 24px 16px; } }

/* Tabs */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 44px; padding: 0 20px; border-radius: var(--radius-pill); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; background: var(--surface-raised); color: var(--ink); border: 1px solid var(--hairline); display: inline-flex; align-items: center; text-decoration: none; }
.pill:hover { border-color: var(--brand); color: var(--ink); }
.pill[aria-pressed="true"], .pill[aria-selected="true"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.week-panel { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-md); padding: 32px; }
@media (max-width: 640px) { .week-panel { padding: 16px; } }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: var(--radius-md); padding: 16px 24px; }
@media (max-width: 640px) { .faq details { padding: 14px 16px; } }
.faq summary { font-size: 18px; line-height: 26px; font-weight: 700; cursor: pointer; }
.faq details p { margin: 12px 0 4px; }

/* Breadcrumb */
.crumbs { font-size: 15px; line-height: 22px; color: var(--ink-muted); padding-top: 20px; }
.crumbs a { color: var(--ink-muted); }

/* Footer */
.site-footer { background: var(--surface-sunken); border-top: 1px solid var(--hairline); }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 32px 40px; justify-content: space-between; padding-top: 48px; padding-bottom: 32px; }
.site-footer nav { display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 22px; }
.site-footer nav a { color: var(--ink); }
.site-footer .legal, .footer-min .legal-line { font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.site-footer .legal { border-top: 1px solid var(--hairline); padding-top: 16px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 6px; }
.footer-min { background: var(--surface-sunken); }
.footer-min .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; padding-top: 24px; padding-bottom: 24px; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.footer-min a { color: var(--ink-muted); }
.sibling a { color: var(--ink-muted); }

/* Prose pages */
.prose { max-width: 680px; }
.prose h2 { font-family: var(--font-display); font-size: 24px; line-height: 32px; margin: 32px 0 8px; }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 16px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }

.success-line { display: flex; align-items: center; gap: 8px; font-size: 15px; line-height: 22px; font-weight: 700; color: var(--success); }

/* Page previews of printables */
.page-previews { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.page-previews img { width: 100%; height: auto; display: block; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: #fffaf6; }
.page-previews figcaption { margin-top: 8px; text-align: center; }
