/* Your Body Almanac — tokens mirror the Your Body Almanac design system (claude.ai Design System artifact).
   Layout concept: a printed almanac. Newsprint, black ink, almanac-yellow cover blocks, printer's-blue
   links; each factor is an almanac table of what it takes and what to do. */

:root {
  --paper: #f5f4ef;
  --paper-raised: #fcfcf8;
  --rule: #d9d6cb;
  --rule-strong: #8a8578;
  --ink: #1a1a17;
  --ink-muted: #55524a;
  --action: #24427f;
  --action-strong: #172e5c;
  --on-action: #fcfcf8;
  --almanac: #f2c230;
  --almanac-wash: #fbefc4;
  --cal-0: #fcfcf8; --cal-1: #dfe6f3; --cal-2: #b4c4e3; --cal-3: #7590c6; --cal-4: #24427f;
  --cal-ink-low: #1a1a17; --cal-ink-high: #fcfcf8;
  --take: #9b2c1f;
  --take-wash: #f6e2dc;
  --focus: #8a6200;

  --font-display: "IM Fell English", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-caps: "IM Fell English SC", "IM Fell English", Georgia, serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --radius-sheet: 2px;
  --radius-control: 4px;
  --radius-pill: 999px;
  --measure: 66ch;
  --page: 1120px;
  --shadow-sheet: 0 1px 0 var(--rule), 0 10px 28px -20px rgba(26, 26, 23, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --paper: #15140f;
  --paper-raised: #1d1c17;
  --rule: #34322a;
  --rule-strong: #7d786b;
  --ink: #ece9df;
  --ink-muted: #b3ae9f;
  --action: #9db8f0;
  --action-strong: #c3d3f6;
  --on-action: #15140f;
  --almanac: #e8b923;
  --almanac-wash: #352c10;
  --cal-0: #1d1c17; --cal-1: #28324f; --cal-2: #34497a; --cal-3: #6f8fd0; --cal-4: #a9c2f2;
  --cal-ink-low: #ece9df; --cal-ink-high: #15140f;
  --take: #f0907f;
  --take-wash: #3a1f19;
  --focus: #e8b923;
  --shadow-sheet: 0 1px 0 var(--rule), 0 10px 28px -20px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
--paper: #15140f;
--paper-raised: #1d1c17;
--rule: #34322a;
--rule-strong: #7d786b;
--ink: #ece9df;
--ink-muted: #b3ae9f;
--action: #9db8f0;
--action-strong: #c3d3f6;
--on-action: #15140f;
--almanac: #e8b923;
--almanac-wash: #352c10;
--cal-0: #1d1c17; --cal-1: #28324f; --cal-2: #34497a; --cal-3: #6f8fd0; --cal-4: #a9c2f2;
--cal-ink-low: #ece9df; --cal-ink-high: #15140f;
--take: #f0907f;
--take-wash: #3a1f19;
--focus: #e8b923;
--shadow-sheet: 0 1px 0 var(--rule), 0 10px 28px -20px rgba(0, 0, 0, 0.7);
color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--action); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--action-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(40px, 6vw, 64px); }
h2 { font-size: clamp(28px, 3.4vw, 36px); }
h3 { font-size: 22px; line-height: 1.25; }
p { margin: 0; }
.prose { max-width: var(--measure); display: grid; gap: var(--space-4); }
.prose h2 { margin-top: var(--space-5); }
.prose ul, .prose ol { margin: 0; padding-left: 1.2em; display: grid; gap: var(--space-2); }
.muted { color: var(--ink-muted); }
.lede { font-size: 20px; line-height: 1.55; color: var(--ink-muted); max-width: var(--measure); }
.label {
  font: 400 15px/18px var(--font-caps);
  letter-spacing: 0.03em;
  color: var(--ink-muted);
}
.figure { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--paper-raised); padding: var(--space-2) var(--space-3); z-index: 20; }
.skip-link:focus { left: 16px; }

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
main { padding-block: var(--space-7) var(--space-8); }
.stack { display: grid; gap: var(--space-5); }
.stack-lg { display: grid; gap: var(--space-7); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }

/* ---------- masthead ---------- */
.masthead {
  border-bottom: 3px double var(--ink);
  background: var(--paper);
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
.masthead .wrap { display: flex; align-items: center; gap: var(--space-5); min-height: 64px; flex-wrap: wrap; padding-block: var(--space-2); }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--ink); text-decoration: none; font: 400 24px/1 var(--font-caps); letter-spacing: 0.01em; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 26px; height: 26px; flex: none; }
.nav { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin-left: auto; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-size: 15px; padding-block: var(--space-2); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--action); text-decoration: underline; text-decoration-thickness: 2px; }
.nav form { margin: 0; }

/* ---------- buttons, tags, inputs ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: 0 var(--space-5);
  border: 1px solid var(--action); border-radius: var(--radius-control);
  background: var(--action); color: var(--on-action);
  font: 700 16px/1 var(--font-body); text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--action-strong); border-color: var(--action-strong); color: var(--on-action); text-decoration: none; }
.button.secondary { background: transparent; color: var(--action); }
.button.secondary:hover { background: var(--almanac-wash); color: var(--action-strong); }
.button.quiet { background: transparent; border-color: transparent; color: var(--ink-muted); padding-inline: var(--space-2); font-weight: 400; }
.button.quiet:hover { color: var(--take); background: transparent; }
.button.danger { background: transparent; border-color: var(--take); color: var(--take); }
.button.danger:hover { background: var(--take-wash); color: var(--take); }
.button-link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); cursor: pointer; font-size: 15px; }
.button-link:hover { color: var(--action); text-decoration: underline; }

.tag {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: 2px var(--space-2);
  border: 1px solid var(--rule-strong); border-radius: var(--radius-pill);
  font: 400 14px/18px var(--font-caps); letter-spacing: 0.02em;
  color: var(--ink-muted); text-decoration: none; white-space: nowrap;
}
a.tag:hover { color: var(--action); border-color: var(--action); }
.tag--take { color: var(--take); border-color: var(--take); }
.tag--do { color: var(--action); border-color: var(--action); }

.field { display: grid; gap: var(--space-2); }
.field label, .field .label-text { font-weight: 700; font-size: 15px; }
.input, select.input {
  width: 100%; min-height: 48px; padding: 0 var(--space-4);
  background: var(--paper-raised); color: var(--ink);
  border: 1px solid var(--rule-strong); border-radius: var(--radius-control);
  font: 400 17px/1.4 var(--font-body);
}
.input::placeholder { color: var(--ink-muted); }
.check-field { display: flex; gap: var(--space-3); align-items: flex-start; font-size: 15px; line-height: 1.5; }
.check-field input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--action); flex: none; }
.errors { border: 1px solid var(--take); background: var(--take-wash); color: var(--ink); padding: var(--space-4); border-radius: var(--radius-control); }
.errors ul { margin: var(--space-2) 0 0; padding-left: 1.2em; }

.search { display: flex; flex-wrap: wrap; gap: var(--space-2); max-width: 560px; }
.search .input { flex: 1 1 240px; min-width: 0; }

/* ---------- the sheet ---------- */
.sheet {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-top: 3px double var(--ink);
  border-radius: var(--radius-sheet);
  box-shadow: var(--shadow-sheet);
  padding: var(--space-6) var(--space-5);
}

/* ---------- flash + disclaimer ---------- */
.flash { margin-top: var(--space-5); padding: var(--space-3) var(--space-4); border-radius: var(--radius-control); background: var(--almanac-wash); border: 1px solid var(--action); }
.flash.alert { background: var(--take-wash); border-color: var(--take); }
.disclaimer {
  display: grid; grid-template-columns: auto 1fr; gap: var(--space-3);
  padding: var(--space-4);
  border: 1px dashed var(--rule-strong); border-radius: var(--radius-control);
  font-size: 15px; line-height: 1.5; color: var(--ink-muted); max-width: var(--measure);
}
.disclaimer strong { color: var(--ink); }
.disclaimer svg { width: 20px; height: 20px; color: var(--ink-muted); margin-top: 2px; }

/* ---------- hero ---------- */
.hero { display: grid; gap: var(--space-5); padding: var(--space-7) clamp(var(--space-5), 5vw, var(--space-8)) var(--space-7); background: var(--almanac); color: #1a1a17; border-top: 3px double #1a1a17; border-bottom: 3px double #1a1a17; }
.hero .label, .hero .lede, .hero h1 em { color: #1a1a17; }
.hero .lede { opacity: 0.85; }
.hero .input { background: #fcfcf8; color: #1a1a17; border-color: #1a1a17; }
.hero .button { background: #1a1a17; border-color: #1a1a17; color: #fcfcf8; }
.hero .button:hover { background: #24427f; border-color: #24427f; color: #fcfcf8; }
.hero h1 { font-size: clamp(48px, 8vw, 96px); line-height: 0.95; max-width: 12ch; }
.hero h1 em { font-style: italic; }
.hero .lede { font-size: 21px; }

/* ---------- category tiles ---------- */
.tiles { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); border-top: 2px solid var(--ink); }
.tile {
  display: grid; gap: var(--space-2); align-content: start;
  padding: var(--space-5) var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule);
  color: var(--ink); text-decoration: none;
}
.tile:hover { background: var(--paper-raised); color: var(--ink); }
.tile:hover h3 { color: var(--action); }
.tile .figure { font-size: 40px; line-height: 1; color: var(--action); }
.tile p { color: var(--ink-muted); font-size: 15px; }

/* ---------- steps (how it works) ---------- */
.steps { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { display: grid; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--rule-strong); counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); font: 500 13px/1 var(--font-mono); color: var(--action); }
.steps h3 { font-size: 20px; }
.steps p { color: var(--ink-muted); font-size: 15px; }

/* ---------- factor cards / index ---------- */
.factor-card {
  display: grid; gap: var(--space-2); align-content: start;
  padding: var(--space-4) var(--space-4) var(--space-5);
  background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-sheet);
  color: var(--ink); text-decoration: none; min-width: 0;
}
.factor-card:hover { border-color: var(--rule-strong); color: var(--ink); }
.factor-card:hover h3 { color: var(--action); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.factor-card h3 { font-size: 22px; }
.factor-card p { color: var(--ink-muted); font-size: 15px; line-height: 1.5; }
.factor-card .meta { margin-top: auto; padding-top: var(--space-2); }
.index-list { list-style: none; margin: 0; padding: 0; columns: 3 240px; column-gap: var(--space-6); }
.index-list li { break-inside: avoid; padding: var(--space-2) 0; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: var(--space-3); }
.index-list a { color: var(--ink); text-decoration: none; }
.index-list a:hover { color: var(--action); text-decoration: underline; }
.letter { font: 400 28px/1 var(--font-display); color: var(--action); padding-top: var(--space-4); border-bottom: 2px solid var(--ink) !important; }

/* ---------- factor page ---------- */
.factor-head { display: grid; gap: var(--space-4); }
.factor-head .tagline { font: 400 22px/1.4 var(--font-display); color: var(--ink-muted); max-width: 40ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; font-size: 15px; color: var(--ink-muted); }
.crumbs a { color: var(--ink-muted); }

.entries { border-top: 2px solid var(--ink); }
.entries-head, .entry { display: grid; grid-template-columns: 56px minmax(0, 1.25fr) minmax(0, 1fr); column-gap: var(--space-5); }
.entries-head { padding: var(--space-3) 0; border-bottom: 1px solid var(--ink); }
.entries-head .label:nth-child(2) { color: var(--take); }
.entries-head .label:nth-child(3) { color: var(--action); }
.entry { padding: var(--space-5) 0; border-bottom: 1px solid var(--rule); }
.entry-no { font: 500 13px/32px var(--font-mono); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.entry-takes { display: grid; gap: var(--space-3); align-content: start; min-width: 0; }
.entry-takes h3 { color: var(--ink); }
.entry-takes p { color: var(--ink); }
.entry-dos { display: grid; gap: var(--space-2); align-content: start; min-width: 0; }
.sources { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); font-size: 13px; line-height: 1.5; }
.sources a { color: var(--ink-muted); }
.sources a:hover { color: var(--action); }
.sources .label { flex-basis: 100%; }

.practice-card {
  display: grid; grid-template-columns: 1fr auto; gap: var(--space-1) var(--space-3); align-items: baseline;
  padding: var(--space-3) var(--space-4);
  background: var(--almanac-wash); border-radius: var(--radius-control);
  color: var(--ink); text-decoration: none;
}
.practice-card:hover { color: var(--ink); outline: 1px solid var(--action); }
.practice-card:hover strong { color: var(--action-strong); text-decoration: underline; }
.practice-card strong { font-weight: 700; }
.practice-card .freq { font: 400 14px/18px var(--font-caps); color: var(--action); }
.practice-card span:last-child { grid-column: 1 / -1; font-size: 14px; line-height: 1.45; color: var(--ink-muted); }

.callout { border-left: 0; padding: var(--space-5); border: 1px solid var(--take); border-radius: var(--radius-control); background: var(--take-wash); display: grid; gap: var(--space-2); max-width: var(--measure); }
.callout h2 { font-size: 22px; }

/* ---------- practice page ---------- */
.practice-facts { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); padding: var(--space-3) 0; border-block: 1px solid var(--rule); }
.practice-facts div { display: grid; gap: 2px; }
.practice-facts dd { margin: 0; font-weight: 700; }
.practice-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; max-width: var(--measure); }
.practice-steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--rule); }
.practice-steps li::before { content: counter(s); font: 500 15px/1.6 var(--font-mono); color: var(--action); }

/* ---------- checklist ---------- */
.today-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-4); }
.tally { display: flex; gap: var(--space-6); }
.tally div { display: grid; gap: var(--space-1); }
.tally .figure { font-size: 40px; line-height: 1; color: var(--action); }
.checklist { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.check-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--space-4); padding: var(--space-4) 0; border-bottom: 1px solid var(--rule); align-items: start; }
.check-row form { margin: 0; }
.tick {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1.5px solid var(--rule-strong); border-radius: var(--radius-control);
  background: var(--paper-raised); color: var(--on-action); cursor: pointer; padding: 0;
}
.tick svg { width: 24px; height: 24px; opacity: 0; }
.tick:hover { border-color: var(--action); }
.check-row.done .tick { background: var(--action); border-color: var(--action); }
.check-row.done .tick svg { opacity: 1; }
.check-row.done .check-title { text-decoration: line-through; text-decoration-color: var(--action); text-decoration-thickness: 2px; color: var(--ink-muted); }
.check-body { display: grid; gap: var(--space-1); min-width: 0; }
.check-title { font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; }
a.check-title:hover { color: var(--action); text-decoration: underline; }
.check-why { font-size: 14px; color: var(--ink-muted); }
.progress { height: 8px; background: var(--rule); border-radius: var(--radius-pill); overflow: hidden; max-width: 320px; }
.progress span { display: block; height: 100%; background: var(--action); }

/* ---------- empty state ---------- */
.empty { display: grid; gap: var(--space-3); justify-items: start; padding: var(--space-6) var(--space-5); border: 1px dashed var(--rule-strong); border-radius: var(--radius-sheet); max-width: var(--measure); }

/* ---------- auth ---------- */
.auth { max-width: 460px; margin-inline: auto; display: grid; gap: var(--space-5); }
.auth form { display: grid; gap: var(--space-4); }

/* ---------- footer ---------- */
.colophon { border-top: 3px double var(--ink); padding-block: var(--space-6) var(--space-7); font-size: 14px; color: var(--ink-muted); }
.colophon .wrap { display: grid; gap: var(--space-5); }
.colophon-imprint { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4) var(--space-6); }
.colophon-name { margin: 0; display: grid; gap: var(--space-1); }
.colophon-name strong { font: 400 20px/1.1 var(--font-caps); letter-spacing: 0.01em; color: var(--ink); }
.colophon nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.colophon a { color: var(--ink-muted); }
.colophon a:hover { color: var(--ink); }
.colophon-legal { margin: 0; padding-top: var(--space-4); border-top: 1px solid var(--rule); }
.colophon .disclaimer { max-width: none; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  main { padding-block: var(--space-5) var(--space-7); }
  .sheet { padding: var(--space-5) var(--space-4); }
  .entries-head { display: none; }
  .entry { grid-template-columns: 1fr; row-gap: var(--space-4); }
  .entry-no { line-height: 1; }
  .entry-dos::before { content: "What to do"; font: 400 15px/18px var(--font-caps); letter-spacing: 0.03em; color: var(--action); }
  .entry-takes::before { content: "What it takes"; font: 400 15px/18px var(--font-caps); letter-spacing: 0.03em; color: var(--take); }
  .nav { margin-left: 0; width: 100%; }
  .tally { gap: var(--space-5); }
}

@media (prefers-reduced-motion: no-preference) {
  .tick svg { transition: opacity 120ms ease; }
}

.factor-card .tag, .stack > .tag { justify-self: start; }
.nav a.button, .nav a.button:hover { color: var(--on-action); text-decoration: none; }
.no-practice { padding: var(--space-3) var(--space-4); border: 1px dashed var(--rule-strong); border-radius: var(--radius-control); font-size: 14px; line-height: 1.45; color: var(--ink-muted); }
main > .flash + * { margin-top: var(--space-5); }
.check-row, section[id], form[id] { scroll-margin-top: 140px; }
.entries-head.neutral .label { color: var(--ink-muted); }
.hero :focus-visible { outline-color: #1a1a17; }
.hero .input::placeholder { color: #55524a; }
.turbo-progress-bar { height: 3px; background-color: var(--action); }

/* ---------- exercise animations ---------- */
.exercise-figure { margin: 0; display: grid; gap: var(--space-3); max-width: 640px; padding: var(--space-4); background: var(--paper-raised); border: 1px solid var(--rule); border-top: 3px double var(--ink); border-radius: var(--radius-sheet); }
.exercise-stage { position: relative; min-width: 0; border-radius: var(--radius-sheet); background: radial-gradient(ellipse at 50% 85%, var(--almanac-wash), transparent 70%); }
.exercise-stage canvas { display: block; width: 100%; height: auto; }
.exercise-figure figcaption { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; justify-content: space-between; font-size: 15px; color: var(--ink-muted); }
.exercise-figure figcaption span { flex: 1 1 280px; min-width: 0; }

/* Habit tracker (designed in Claude Design: Today, My almanac, Progress, check-in) */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.section-head p { font-size: 15px; }
.check-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips form { margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--paper-raised); color: var(--ink); font: 400 17px/1 var(--font-caps); letter-spacing: .02em; cursor: pointer; }
.chip svg { width: 18px; height: 18px; flex: none; color: var(--ink-muted); }
.chip:hover { border-color: var(--action); color: var(--action); }
.chip[aria-pressed="true"] { background: var(--almanac-wash); border: 2px solid var(--action); padding: 0 15px; }
.chip[aria-pressed="true"] svg { color: var(--action); }

.streak { display: inline-flex; align-items: baseline; gap: 3px; padding: 1px 10px; border-radius: 999px; background: var(--almanac-wash); color: var(--ink); font: 400 14px/20px var(--font-caps); letter-spacing: .02em; white-space: nowrap; }
.streak .figure { font: 500 13px/20px var(--font-mono); }

.occasion { display: grid; gap: 16px; }
.occasion .checklist { border-top: 1px solid var(--ink); }
.occasion .check-row:last-child { border-bottom: 0; }

.row-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.row-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.row-item form { margin: 0; }
.track { min-width: 140px; }
.track svg { width: 18px; height: 18px; flex: none; }

.seg { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: 4px; overflow: hidden; background: var(--paper-raised); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label { display: flex; align-items: center; min-height: 46px; padding: 0 20px; font-weight: 400; font-size: 16px; cursor: pointer; }
.seg label + input + label { border-left: 1px solid var(--rule-strong); }
.seg input:checked + label { background: var(--action); color: var(--on-action); font-weight: 700; }
.seg input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: -3px; }
.add-habit { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; }
.add-habit .field { flex: 1 1 260px; }
.add-habit fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.add-habit legend { font-weight: 700; font-size: 15px; padding: 0; margin-bottom: 8px; }

.note { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; max-width: 66ch; padding: 12px 16px; border: 1px dashed var(--rule-strong); border-radius: 4px; font-size: 15px; line-height: 1.5; color: var(--ink-muted); }
.note svg { width: 20px; height: 20px; margin-top: 2px; }
.note strong { color: var(--ink); }

.keep-in-mind summary { cursor: pointer; font: 400 22px/1.2 var(--font-display); padding: 10px 0; }

.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 760px; }
.cal-nav a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; font-size: 16px; }
.cal-nav svg { width: 18px; height: 18px; }
.cal { width: 100%; max-width: 772px; table-layout: fixed; border-collapse: separate; border-spacing: 6px; margin: -6px; }
.cal th { font: 400 15px/18px var(--font-caps); letter-spacing: .03em; color: var(--ink-muted); padding: 0 0 2px 8px; text-align: left; }
.cal td { padding: 0; vertical-align: top; }
.day { position: relative; box-sizing: border-box; height: 72px; border-radius: 4px; padding: 8px; font: 500 15px/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.day-done { position: absolute; right: 8px; bottom: 8px; width: 18px; height: 18px; }
.day-tag { position: absolute; left: 8px; bottom: 8px; font: 400 13px/1 var(--font-caps); letter-spacing: .03em; }
.l0 { background: var(--cal-0); color: var(--cal-ink-low); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.l1 { background: var(--cal-1); color: var(--cal-ink-low); }
.l2 { background: var(--cal-2); color: var(--cal-ink-low); }
.l3 { background: var(--cal-3); color: var(--cal-ink-low); }
.l4 { background: var(--cal-4); color: var(--cal-ink-high); }
.future { color: var(--ink-muted); border: 1px dashed var(--rule-strong); }
.untracked { color: var(--ink-muted); }
.day.today { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--ink-muted); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.swatch { display: inline-block; box-sizing: border-box; width: 20px; height: 20px; border-radius: 3px; }
.swatch.today { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); background: transparent; width: 16px; height: 16px; margin: 2px; }
.streak-table { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); }
.streak-table thead th { font: 400 15px/18px var(--font-caps); letter-spacing: .03em; color: var(--ink-muted); text-align: left; padding: 12px 0; border-bottom: 1px solid var(--ink); }
.streak-table td { padding: 16px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.streak-table .num { width: 150px; text-align: right; font: 500 16px/1.3 var(--font-mono); font-variant-numeric: tabular-nums; }
.streak-table th.num { font: 400 15px/18px var(--font-caps); }
.streak-table .num small { display: block; font: 400 13px/1.3 var(--font-body); color: var(--ink-muted); }
.best { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; background: var(--almanac-wash); color: var(--ink); font: 400 13px/18px var(--font-caps); }
@media (max-width: 720px) {
  .cal { border-spacing: 3px; margin: -3px; }
  .cal th { padding-left: 4px; font-size: 13px; }
  .day { height: 48px; padding: 5px; font-size: 13px; }
  .day-done { width: 14px; height: 14px; right: 4px; bottom: 4px; }
  .day-tag { display: none; }
  .streak-table .num { width: 76px; }
}


/* API, MCP & CLI (designed in Claude Design: API & apps, Connect an app, Developers) */
:not(pre) > code { font: 500 .88em/1.5 var(--font-mono); padding: 1px 6px; background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 3px; color: var(--ink); overflow-wrap: anywhere; }

.code-table { margin: 0; min-width: 0; background: var(--paper-raised); border: 1px solid var(--rule); border-top: 3px double var(--ink); border-radius: 2px; }
.code-table figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 4px 0 16px; border-bottom: 1px solid var(--ink); }
.code-table pre { margin: 0; overflow-x: auto; }
.code-table code { display: block; width: max-content; min-width: 100%; font: 400 15px/1 var(--font-mono); color: var(--ink); }
.code-table .l { display: block; padding: 8px 16px; line-height: 20px; white-space: pre; border-bottom: 1px solid var(--rule); }
.code-table .l:last-child { border-bottom: 0; }
.code-table .p { color: var(--ink-muted); user-select: none; }
.code-table .c { color: var(--ink-muted); font-style: italic; }
.code-table .k { color: var(--action); }
.code-table.tight .l { padding-block: 4px; }
.copy { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; background: transparent; border: 0; border-radius: 4px; color: var(--action); font: 700 15px/1 var(--font-body); cursor: pointer; }
.copy:hover { background: var(--almanac-wash); color: var(--action-strong); }
.copy svg { width: 18px; height: 18px; }

.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; }
.inline-form .field { flex: 1 1 280px; min-width: 0; }
.inline-form .button { min-height: 48px; }
.token-once { display: grid; gap: 16px; padding: 24px; background: var(--paper-raised); border: 2px solid var(--action); border-radius: 2px; }
.token-once h3 { font-size: 22px; }
.copy-field { display: flex; flex-wrap: wrap; gap: 8px; }
.copy-field .input { flex: 1 1 320px; min-width: 0; font: 500 16px/1.4 var(--font-mono); letter-spacing: .01em; }
.copy-field .button svg { width: 18px; height: 18px; }
.note.warn { border: 1px solid var(--take); background: var(--take-wash); color: var(--ink); }
.note.warn svg { color: var(--take); }
.qs { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.qs > li { display: grid; grid-template-columns: 56px minmax(0, 300px) minmax(0, 1fr); column-gap: 24px; row-gap: 12px; padding: 24px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.qs-text { display: grid; gap: 8px; }
.qs-text p { color: var(--ink-muted); font-size: 15px; line-height: 1.5; }
.qs .entry-no { line-height: 28px; }

.consent { max-width: 520px; margin-inline: auto; display: grid; gap: 24px; }
.consent h1 { font-size: 34px; }
.consent :not(pre) > code { background: var(--paper); }
.link-marks { display: flex; align-items: center; gap: 12px; }
.app-mark { width: 56px; height: 56px; flex: none; display: grid; place-items: center; border: 1px solid var(--rule-strong); border-radius: 4px; background: var(--paper); font: 400 30px/1 var(--font-caps); color: var(--ink); }
.app-mark svg { width: 32px; height: 32px; color: var(--action); }
.link-marks .join { flex: 0 0 40px; border-top: 2px dashed var(--rule-strong); }
.signed-in { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 15px; color: var(--ink-muted); }
.signed-in strong { color: var(--ink); }
.signed-in form { margin: 0; }
.signed-in .button-link { color: var(--action); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }
.perm { display: grid; gap: 8px; }
.perm h2 { font-size: 22px; line-height: 1.25; }
.perm-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.perm-list li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 16px; line-height: 1.5; }
.perm-list svg { width: 22px; height: 22px; margin-top: 1px; }
.perm-can svg { color: var(--action); }
.perm-cannot li { color: var(--ink-muted); }
.perm-cannot svg { color: var(--ink-muted); }
.consent-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.consent-actions form { flex: 1 1 180px; margin: 0; }
.consent-actions .button { width: 100%; min-height: 48px; }
.consent-fine { display: grid; gap: 4px; font-size: 14px; line-height: 1.5; color: var(--ink-muted); }

.doc-layout { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 56px; align-items: start; }
.toc { position: sticky; top: 88px; display: grid; gap: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc > ol { border-top: 2px solid var(--ink); }
.toc a { display: flex; align-items: center; min-height: 44px; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-size: 16px; }
.toc a:hover { color: var(--action); text-decoration: underline; }
.toc ol ol a { padding-left: 16px; font-size: 15px; color: var(--ink-muted); }
.toc a[aria-current="true"] { color: var(--action); font-weight: 700; }
.doc { display: grid; gap: 72px; min-width: 0; }
.doc > section { display: grid; gap: 24px; min-width: 0; align-content: start; }
.doc h3 { font-size: 22px; }
.part { display: grid; gap: 8px; }
.part .label { color: var(--action); }
.prose-sm { display: grid; gap: 12px; max-width: 66ch; }
.table-box { min-width: 0; }
.api-table { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); }
.api-table thead th { font: 400 15px/18px var(--font-caps); letter-spacing: .03em; color: var(--ink-muted); text-align: left; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--ink); }
.api-table tbody th[scope="rowgroup"] { font: 400 22px/1.25 var(--font-display); text-align: left; padding: 28px 0 8px; border-bottom: 1px solid var(--rule-strong); }
.api-table tbody th[scope="rowgroup"] .tag { margin-left: 8px; vertical-align: 3px; }
.api-table tbody:first-of-type th[scope="rowgroup"] { padding-top: 16px; }
.api-table td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; font-size: 16px; line-height: 1.5; }
.api-table td:last-child { padding-right: 0; }
.api-table .m { width: 88px; }
.api-table .path { font: 500 15px/1.5 var(--font-mono); white-space: nowrap; color: var(--ink); }
.api-table .path .v { color: var(--ink-muted); }
.verb { display: inline-block; min-width: 64px; padding: 1px 8px; border: 1px solid currentColor; border-radius: 4px; font: 500 13px/20px var(--font-mono); letter-spacing: .04em; text-align: center; color: var(--ink-muted); }
.verb.write { color: var(--action); }
.verb.delete { color: var(--take); }
.facts { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 0; padding: 16px 0; border-block: 1px solid var(--rule); }
.facts div { display: grid; gap: 2px; min-width: 0; }
.facts dd { margin: 0; font: 500 15px/1.5 var(--font-mono); overflow-wrap: anywhere; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }

@media (min-width: 721px) {
  .consent h1 { font-size: 44px; }
}
@media (max-width: 720px) {
  .qs > li { grid-template-columns: 1fr; }
  .qs .entry-no { line-height: 1; }
  .api-page .row-item { grid-template-columns: 1fr; gap: 8px; }
  .api-page .row-item form { justify-self: start; }
  .copy-field .button { flex: 1 1 100%; }
  .token-once { padding: 16px; }
  .doc-layout { grid-template-columns: 1fr; gap: 40px; }
  .toc { position: static; }
  .doc { gap: 56px; }
  .pair { grid-template-columns: 1fr; }
  .api-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .api-table tbody tr { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .api-table tbody tr:has(th[scope="rowgroup"]) { display: block; padding: 0; border: 0; }
  .api-table tbody th[scope="rowgroup"] { display: block; }
  .api-table td { display: block; border: 0; padding: 0; }
  .api-table td:last-child { grid-column: 1 / -1; }
  .api-table .path { white-space: normal; overflow-wrap: anywhere; }
  .api-table.two td:first-child { grid-column: 1 / -1; }
}

/* Onboarding & retention (designed in Claude Design: PR 1, onboarding, the gentle cap, admin retention) */
.ce-caps { font: 400 15px/18px var(--font-caps); letter-spacing: .05em; color: var(--ink-muted); }
.ce-sm { font: 400 13px/16px var(--font-caps); letter-spacing: .05em; color: var(--ink-muted); }
details > summary.when-toggle, .ob-all > summary, .ob-swaps > summary, .all-suggestions > summary { list-style: none; }
.ob-all > summary::-webkit-details-marker, .ob-swaps > summary::-webkit-details-marker, .all-suggestions > summary::-webkit-details-marker { display: none; }
details:not([open]) > summary .when-open, details[open] > summary .when-closed { display: none; }

/* the walkthrough's frame: its own header, no site nav */
.ob { min-height: 100vh; display: flex; flex-direction: column; }
.ob-head .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; min-height: 44px; padding-top: 20px; }
.ob-brand { color: var(--ink); text-decoration: none; font: 400 20px/1 var(--font-caps); letter-spacing: .02em; }
.ob-brand:hover { color: var(--ink); }
.ob-back { min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; }
.ob-steps { display: flex; align-items: center; gap: 8px; }
.ob-steps .ce-caps { margin-left: 4px; }
.ob-moon { width: 20px; height: 20px; flex: none; }
.ob-moon.now { width: 28px; height: 28px; }
.ob-main { flex: 1; display: grid; gap: 18px; align-content: start; padding-block: 18px 24px; }
.ob-main .flash { margin-top: 0; }
.ob-form { display: flex; flex-direction: column; gap: 18px; }
.ob-title { display: grid; gap: 6px; border-top: 1px solid var(--ink); padding-top: 16px; }
.ob-title h1 { font: 400 36px/1.05 var(--font-display); letter-spacing: 0; }
.ob-title p { font-size: 16px; line-height: 1.5; color: var(--ink-muted); }
.ob-note { font-size: 15px; line-height: 1.5; color: var(--ink-muted); }
.ob-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border: 1px solid var(--action); border-radius: var(--radius-control); background: var(--action); color: var(--on-action); font: 400 21px/1 var(--font-caps); letter-spacing: .04em; text-decoration: none; cursor: pointer; }
.ob-btn:hover { background: var(--action-strong); border-color: var(--action-strong); color: var(--on-action); }
.ob-btn:disabled { background: var(--rule); border-color: var(--rule); color: var(--ink-muted); cursor: not-allowed; }
.ob-actions { margin-top: auto; display: grid; gap: 8px; }
.ob-actions .ob-btn { width: 100%; }
.ob-actions .ob-note { text-align: center; font-size: 14px; order: 2; }
.ob-skip { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; padding: 0 4px; color: var(--action); font: 700 17px/1.2 var(--font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ob-skip:hover { color: var(--action-strong); }

/* step 1: chips */
.ob-intro { display: flex; flex-wrap: wrap; gap: 18px 48px; align-items: end; justify-content: space-between; }
.ob-intro .ob-title { flex: 1 1 480px; }
.ob-search { flex: 0 1 400px; width: 100%; display: grid; gap: 6px; }
.ob-search label { font-weight: 700; font-size: 15px; }
.ob-search-box { position: relative; }
.ob-search-go { position: absolute; left: 0; top: 0; width: 44px; height: 48px; display: grid; place-items: center; padding: 0 0 0 4px; border: 0; background: none; color: var(--ink-muted); cursor: pointer; }
.ob-search-go svg { width: 20px; height: 20px; }
.ob-search-go:hover { color: var(--action); }
.ob-input { width: 100%; min-height: 48px; padding: 0 14px 0 42px; background: var(--paper-raised); color: var(--ink); border: 1px solid var(--rule-strong); border-radius: var(--radius-control); font: 400 17px/1.4 var(--font-body); }
.ob-input::placeholder { color: var(--ink-muted); }
.ob-none { display: grid; gap: 4px; padding: 14px 16px; border: 1px dashed var(--rule-strong); border-radius: var(--radius-sheet); }
.ob-none strong { font-size: 16px; }
.ob-none span { font-size: 15px; color: var(--ink-muted); }
.ob-grp { display: grid; gap: 10px; align-content: start; padding: 16px 0 18px; border-top: 1px solid var(--rule); }
.ob-grp-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; font: inherit; }
.ob-grp-name { font: 400 15px/18px var(--font-caps); letter-spacing: .05em; color: var(--ink); }
.ob-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ob-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius-control); background: var(--paper-raised); color: var(--ink); font: 400 16px/1.2 var(--font-body); cursor: pointer; }
.ob-chip:hover { border-color: var(--action); }
.ob-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ob-chip svg { display: none; width: 18px; height: 18px; flex: none; }
.ob-chip:has(input:checked) { background: var(--action); border-color: var(--action); color: var(--on-action); font-weight: 700; }
.ob-chip:has(input:checked) svg { display: block; }
.ob-chip:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.ob-chip.more { border-style: dashed; background: transparent; color: var(--action); font-weight: 700; }
.ob-all { display: contents; }
.ob-all[open] { display: flex; flex-direction: column; gap: 8px; flex-basis: 100%; align-items: start; }
.ob-foot { position: sticky; bottom: 0; z-index: 5; border-top: 1px solid var(--ink); background: var(--paper); }
.ob-foot .wrap { display: grid; gap: 6px; padding-top: 14px; padding-bottom: 22px; }
.ob-foot .ob-btn { width: 100%; order: 3; }
.ob-picked, .ob-why { font-size: 14px; line-height: 1.45; color: var(--ink-muted); }
.ob-why, .ob-picked { text-align: center; order: 4; }
.ob-picked strong { font-weight: 400; }
.ob-picked .muted { color: inherit; }

/* step 2: start small */
.ob-picks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.ob-pick { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.ob-pick-no { text-align: center; }
.ob-pick-body { display: grid; gap: 2px; min-width: 0; }
.ob-pick-title { font: 700 18px/1.3 var(--font-body); letter-spacing: 0; }
.ob-pick-why { font-size: 14px; line-height: 1.45; color: var(--ink-muted); }
.ob-keep, .ob-swap { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 14px; border: 1px solid var(--rule-strong); background: var(--paper-raised); border-radius: var(--radius-pill); font: 400 16px/1 var(--font-caps); letter-spacing: .04em; color: var(--action); cursor: pointer; }
.ob-keep input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ob-keep svg { display: none; width: 16px; height: 16px; }
.ob-keep:has(input:checked) { background: var(--action); border-color: var(--action); color: var(--on-action); }
.ob-keep:has(input:checked) svg { display: block; }
.ob-keep:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.ob-swaps { display: grid; gap: 8px; }
.ob-swaps > .ob-swap { justify-self: start; }
.ob-swaps[open] > .ob-swap { background: var(--action); border-color: var(--action); color: var(--on-action); }
.ob-swap-body { display: grid; gap: 8px; padding-top: 4px; }
.ob-sw-list { list-style: none; margin: 0; padding: 6px 0 8px; display: grid; gap: 6px; border-bottom: 1px solid var(--rule); }
.ob-sw-opt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; min-height: 56px; padding: 10px 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius-control); background: var(--paper-raised); color: var(--ink); cursor: pointer; }
.ob-sw-opt > span { display: grid; gap: 2px; }
.ob-sw-opt strong { font-size: 17px; line-height: 1.3; }
.ob-sw-opt input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--action); }
.ob-sw-opt:has(input:checked) { border-color: var(--action); box-shadow: inset 0 0 0 1px var(--action); background: var(--almanac-wash); }

/* step 3: two editions */
.ob-eds { display: grid; gap: 12px; }
.ob-ed { display: grid; gap: 8px; align-content: start; padding: 16px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sheet); }
.ob-ed .ce-caps { color: var(--ink); }
.ob-ed label { font-weight: 700; font-size: 16px; }
.ob-select { width: 100%; min-height: 48px; padding: 0 14px; background: var(--paper-raised); color: var(--ink); border: 1px solid var(--rule-strong); border-radius: var(--radius-control); font: 500 18px/1.4 var(--font-mono); }
.ob-ed--night { background: #15140f; border-color: #7d786b; color: #ece9df; color-scheme: dark; }
.ob-ed--night .ce-caps, .ob-ed--night label { color: #ece9df; }
.ob-ed--night .ob-select { background: #1d1c17; color: #ece9df; border-color: #7d786b; }
.ob-ed--night :focus-visible { outline-color: #e8b923; }
.ob-switch { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-block: 1px solid var(--rule); }
.ob-switch label { display: grid; gap: 2px; cursor: pointer; }
.ob-switch label strong { font-size: 16px; }
.ob-switch label span { font-size: 14px; color: var(--ink-muted); }
.ob-switch input { appearance: none; -webkit-appearance: none; margin: 0; width: 52px; height: 32px; border-radius: var(--radius-pill); background: var(--rule); border: 1px solid var(--rule-strong); position: relative; cursor: pointer; }
.ob-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper-raised); box-shadow: 0 0 0 1px var(--rule-strong); }
.ob-switch input:checked { background: var(--action); border-color: var(--action); }
.ob-switch input:checked::after { left: 23px; box-shadow: none; }
.ob-actions--end .ob-skip { justify-self: center; }

.ob-wide { display: none; }
@media (min-width: 721px) {
  .ob-wide { display: revert; }
  .ob-narrow { display: none; }
  .ob-head { border-bottom: 3px double var(--ink); }
  .ob-head .wrap { padding-block: 14px; }
  .ob-brand { font-size: 24px; }
  .ob-steps { gap: 10px; }
  .ob-moon { width: 22px; height: 22px; }
  .ob-moon.now { width: 30px; height: 30px; }
  .ob-main { gap: 32px; padding-block: 48px 32px; }
  .ob-form { gap: 32px; }
  .ob-title { border-top: 0; padding-top: 0; gap: 8px; }
  .ob-title h1 { font-size: 64px; }
  .ob-title p { font-size: 20px; max-width: 56ch; }
  .ob-btn { padding: 0 32px; }
  .ob-actions { flex-direction: row; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; border-top: 2px solid var(--ink); padding-top: 24px; }
  .ob-actions .ob-btn { width: auto; }
  .ob-actions .ob-note { order: 0; text-align: left; font-size: 16px; }
  .ob-actions--end { flex-direction: row-reverse; justify-content: flex-start; border-top: 0; padding-top: 0; }

  .ob-search-go { height: 52px; }
  .ob-input { min-height: 52px; padding-left: 44px; font-size: 18px; }
  .ob-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 48px; }
  .ob-grp { gap: 12px; padding: 18px 0 22px; border-top: 2px solid var(--ink); }
  .ob-grp-name { font: 400 26px/1.1 var(--font-display); letter-spacing: 0; }
  .ob-foot { border-top: 2px solid var(--ink); background: var(--paper-raised); }
  .ob-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding-block: 18px; }
  .ob-foot .ob-btn { width: auto; }
  .ob-picked, .ob-why { font-size: 16px; text-align: left; order: 0; }
  .ob-picked strong { font-weight: 700; color: var(--ink); }

  .ob-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; border-top: 0; }
  .ob-pick { grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; padding: 22px 20px 20px; background: var(--paper-raised); border: 1px solid var(--rule); border-top: 3px double var(--ink); border-radius: var(--radius-sheet); }
  .ob-pick-no { text-align: left; }
  .ob-pick-body { gap: 10px; }
  .ob-pick-title { font: 400 26px/1.15 var(--font-display); }
  .ob-pick-summary { font-size: 15px; line-height: 1.5; color: var(--ink-muted); }
  .ob-pick-body .ob-pick-why { color: var(--ink); }
  .ob-keep { justify-self: start; background: var(--paper); padding: 0 16px; }
  .ob-sw-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .ob-reminders { max-width: 860px; }
  .ob-eds { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .ob-ed { gap: 10px; padding: 24px 22px; }
  .ob-ed:not(.ob-ed--night) { background: var(--paper-raised); }
  .ob-select { min-height: 52px; }
  .ob-switch { gap: 16px; padding: 18px 0; }
  .ob-switch label span { font-size: 15px; }
  .ob-note { font-size: 15px; }
}
@media (min-width: 721px) and (max-width: 1000px) {
  .ob-picks { grid-template-columns: minmax(0, 1fr); }
}

/* step 4: your first page (Today) */
.first-page { background: var(--almanac-wash); border-bottom: 1px solid var(--rule-strong); }
.first-page .wrap { display: flex; align-items: center; gap: 10px; padding-block: 10px; }
.first-page svg { width: 22px; height: 22px; flex: none; }
.first-page p { font-size: 15px; line-height: 1.35; }
.first-page-more { display: none; }
.check-row.hint { background: var(--almanac-wash); margin: 0 -12px; padding: 16px 12px; border-radius: var(--radius-control); border-bottom-color: transparent; }
.check-row.hint .tick { border: 2px solid var(--action); }
.hint-cue { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; color: var(--ink); }
.hint-cue svg { width: 18px; height: 18px; color: var(--action); }
.hint-cue .click { display: none; }
@media (hover: hover) and (pointer: fine) {
  .hint-cue .tap { display: none; }
  .hint-cue .click { display: inline; }
}
@media (min-width: 721px) {
  .first-page .wrap { padding-block: 12px; }
  .first-page p { font-size: 16px; }
  .first-page-more { display: inline; }
  .check-row.hint { margin: 0 -14px; padding: 16px 14px; }
}

/* the gentle cap: one more habit after a week kept */
.one-more { display: grid; gap: 10px; max-width: 560px; padding: 18px 16px; background: var(--paper-raised); border: 1px solid var(--rule); border-top: 3px double var(--ink); border-radius: var(--radius-sheet); }
.one-more h2 { font: 400 26px/1.1 var(--font-display); }
.one-more > p.muted { font-size: 15px; }
.one-more-pick { display: grid; gap: 2px; padding: 12px 14px; background: var(--almanac-wash); border-radius: var(--radius-control); }
.one-more-pick span { font-size: 14px; color: var(--ink); }
.one-more .row { gap: 8px; }
.one-more .row form { margin: 0; }
.one-more .button { min-height: 48px; padding: 0 20px; }
.one-more-fine { font-size: 14px; }
.one-more-limit { margin: 0; font-size: 15px; color: var(--ink); }
.one-more-fine .one-more-not-now { color: var(--action); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
@media (min-width: 721px) {
  .one-more { padding: 22px 24px; }
}

/* My almanac: start small */
.start-note { max-width: var(--measure); padding: 12px 14px; background: var(--almanac-wash); border-radius: var(--radius-control); font-size: 15px; line-height: 1.45; }
.all-suggestions { display: grid; gap: 14px; }
.show-more { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; border: 1px dashed var(--rule-strong); border-radius: var(--radius-control); color: var(--action); font: 700 16px/1 var(--font-body); cursor: pointer; }
.show-more svg { width: 18px; height: 18px; }
.show-more:hover { border-color: var(--action); background: var(--almanac-wash); }
.track-all { display: grid; gap: 8px; justify-items: start; padding-top: 12px; border-top: 1px solid var(--rule); }
.track-all form { margin: 0; }
.track-all p { font-size: 14px; }

/* Admin › Retention */
.retention { display: grid; gap: 40px; }
.retention h1 { font-size: 56px; line-height: 1.05; }
.retention h2 { font-size: 30px; }
.retention .lede { font-size: 18px; max-width: 60ch; }
.retention .fine { font-size: 14px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { display: grid; gap: 6px; align-content: start; padding: 18px 18px 20px; background: var(--paper-raised); border: 1px solid var(--rule); border-top: 3px double var(--ink); border-radius: var(--radius-sheet); }
.kpi .fig { font: 400 40px/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--action); }
.kpi .fig.not-yet { font: 400 28px/40px var(--font-display); color: var(--ink-muted); }
.kpi p { font-size: 14px; line-height: 1.45; color: var(--ink-muted); }
.spark { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; padding: 16px 18px; background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-sheet); }
.spark svg { display: block; width: 100%; height: 120px; }
.spark-base { stroke: var(--rule); stroke-width: 1; fill: none; }
.spark-line { stroke: var(--action); stroke-width: 2; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.spark-y { display: grid; align-content: space-between; text-align: right; padding: 2px 0 16px; font: 400 13px/1 var(--font-mono); color: var(--ink-muted); }
.spark-x { display: flex; justify-content: space-between; font: 400 13px/1 var(--font-mono); color: var(--ink-muted); }
.retention summary { cursor: pointer; font-size: 14px; color: var(--action); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; display: flex; align-items: center; }
.retention .box { overflow-x: auto; border-top: 2px solid var(--ink); }
.retention table { width: 100%; border-collapse: collapse; font-size: 15px; }
.retention thead th { font: 400 15px/18px var(--font-caps); letter-spacing: .04em; color: var(--ink-muted); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.retention thead th.num { text-align: right; font: 400 15px/18px var(--font-caps); letter-spacing: .04em; }
.retention tbody th { text-align: left; font-weight: 700; padding: 11px 12px; border-bottom: 1px solid var(--rule); }
.retention td { padding: 11px 12px; border-bottom: 1px solid var(--rule); }
.retention .num { white-space: nowrap; text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.retention td.muted { font-family: var(--font-body); font-size: 14px; }
.retention .bar { display: inline-block; height: 8px; border-radius: 0 4px 4px 0; background: var(--action); vertical-align: middle; }
@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .retention { gap: 32px; }
  .retention h1 { font-size: 44px; }
  .retention h2 { font-size: 26px; }
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .kpi .fig { font-size: 36px; }
}

/* Installed app & push (designed in Claude Design: PR 2, installable app and push; design system "Installed app") */
/* phone bottom tab bar: only in the installed app, on phones */
.tabbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); background: var(--paper); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabbar a { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 60px; padding: 9px 0 10px; color: var(--ink-muted); text-decoration: none; font: 400 14px/1 var(--font-caps); letter-spacing: 0.05em; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a:hover { color: var(--ink); }
.tabbar a[aria-current="page"] { color: var(--ink); }
.tabbar a[aria-current="page"] svg { color: var(--action); }
[data-theme="dark"] .tabbar a[aria-current="page"] svg { color: var(--almanac); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabbar a[aria-current="page"] svg { color: var(--almanac); } }
.app-tabbar { display: none; }
@media (display-mode: standalone) and (max-width: 720px) {
  .app-tabbar { display: grid; position: fixed; inset: auto 0 0; z-index: 10; }
  body:has(.app-tabbar) { padding-bottom: calc(61px + env(safe-area-inset-bottom, 0px)); }
  body:has(.app-tabbar) .masthead .nav > a { display: none; }
}
@media (max-width: 720px) {
  html[data-standalone] .app-tabbar { display: grid; position: fixed; inset: auto 0 0; z-index: 10; }
  html[data-standalone] body:has(.app-tabbar) { padding-bottom: calc(61px + env(safe-area-inset-bottom, 0px)); }
  html[data-standalone] body:has(.app-tabbar) .masthead .nav > a { display: none; }
}

/* app icon: paper tile, almanac-yellow disc, the moon-phase mark in ink #1a1a17 */
.app-icon { display: block; flex: none; }
.app-icon.tile { border-radius: 22%; }

/* install prompt on Today */
.install-card { display: grid; gap: 12px; padding: 18px 16px; background: var(--paper-raised); border: 1px solid var(--rule); border-top: 3px double var(--ink); border-radius: var(--radius-sheet); }
.install-card[hidden] { display: none; }
.install-card h2 { margin: 0; font: 400 26px/1.1 var(--font-display); color: var(--ink); }
.install-card p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-muted); }
.install-head { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: center; }
.install-head .app-icon { width: 56px; height: 56px; border-radius: 13px; }
.install-steps { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--rule); }
.install-steps li { display: grid; grid-template-columns: 28px 44px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.install-steps .n { font: 500 16px/1 var(--font-mono); color: var(--ink-muted); }
.install-steps .key { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--rule-strong); border-radius: 10px; background: var(--paper); color: var(--action); }
.install-steps .key svg { width: 24px; height: 24px; }
.install-steps strong { display: block; font-size: 16px; line-height: 1.3; color: var(--ink); }
.install-steps .where { font-size: 14px; color: var(--ink-muted); }
.install-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.install-variant { display: grid; gap: 12px; }
.install-variant[hidden] { display: none; }
.text-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; padding: 0 4px; color: var(--action); font: 700 17px/1.2 var(--font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.text-button:hover { color: var(--action-strong); }

/* notification ask (before the browser prompt) and its blocked state */
.ask-card { display: grid; gap: 14px; padding: 18px 16px; background: var(--paper-raised); border: 1px solid var(--rule); border-top: 3px double var(--ink); border-radius: var(--radius-sheet); }
.ask-state { display: grid; gap: 14px; }
.ask-card[hidden], .ask-state[hidden] { display: none; }
.ask-card h2 { margin: 0; font: 400 28px/1.1 var(--font-display); color: var(--ink); }
.ask-card .ask-note { margin: 0; font-size: 15px; color: var(--ink-muted); }
.ask-card .ask-fine { margin: 0; font-size: 14px; color: var(--ink-muted); }
.ask-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.ask-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.ask-list .glyph { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--rule-strong); color: var(--ink); }
.ask-list .glyph svg { width: 24px; height: 24px; }
.ask-list .when { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ask-list strong { font-size: 18px; line-height: 1.3; }
.ask-list .time { font: 500 16px/1.2 var(--font-mono); color: var(--ink); }
.ask-list p { margin: 2px 0 0; font-size: 15px; line-height: 1.45; color: var(--ink-muted); }
.ask-off { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 16px; background: var(--take-wash); border-radius: var(--radius-control); color: var(--ink); }
.ask-off svg { width: 26px; height: 26px; color: var(--take); }
.ask-off span { font-size: 15px; line-height: 1.45; }
.ask-fix { display: grid; gap: 10px; }
.ask-fix h3 { margin: 0; font: 400 15px/18px var(--font-caps); letter-spacing: 0.05em; color: var(--ink-muted); }
.ask-fix strong { font-size: 16px; }
.ask-steps { margin: 0; padding: 0 0 0 22px; display: grid; gap: 6px; font-size: 15px; line-height: 1.45; }

/* the editions in settings: one time each, shared by email and notifications */
.edition-pref { border: 0; margin: 0; padding: 16px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 12px; }
.edition-pref legend { padding: 0; float: left; width: 100%; margin-bottom: 4px; }
.edition-pref legend strong { display: block; font-size: 17px; }
.edition-pref legend span { display: block; font-size: 15px; color: var(--ink-muted); font-weight: 400; }
.edition-grid { clear: both; display: flex; flex-wrap: wrap; align-items: end; gap: 12px 24px; }
.edition-grid .field { flex: 0 1 200px; }
.edition-grid .ways { flex: 1 1 260px; display: grid; gap: 8px; }
.edition-grid .check-field { min-height: 44px; align-items: flex-start; }

/* notification devices in settings */
.devices { gap: 12px; max-width: 760px; padding-top: 28px; }
.devices h4 { margin: 8px 0 0; font: 400 15px/18px var(--font-caps); letter-spacing: 0.05em; color: var(--ink-muted); }
.device { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px 14px; align-items: start; padding: 16px; background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-control); }
.device[hidden] { display: none; }
.device .glyph { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--rule-strong); color: var(--ink); }
.device .glyph svg, .device-list svg { width: 22px; height: 22px; }
.device-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.device-head strong { font-size: 17px; }
.device p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-muted); }
.device .acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.dev-tag { display: inline-flex; align-items: center; gap: 6px; padding: 1px 10px; border-radius: var(--radius-pill); border: 1px solid var(--rule-strong); font: 400 14px/22px var(--font-caps); letter-spacing: 0.04em; color: var(--ink); }
.dev-tag.on { border-color: var(--action); color: var(--action); }
.dev-tag.on::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--action); }
.dev-tag.blocked { border-color: var(--take); color: var(--take); background: var(--take-wash); }
.device-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.device-list li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.device-list li > span:first-child { color: var(--ink-muted); }
.device-list strong { display: block; font-size: 16px; }
.device-list .meta { font-size: 14px; color: var(--ink-muted); }
.device-list form { margin: 0; }
.device-list button { min-height: 44px; min-width: 44px; padding: 0 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius-control); background: transparent; color: var(--ink); font: 700 15px/1 var(--font-body); cursor: pointer; }
.device-list button:hover { border-color: var(--take); color: var(--take); }
.device-list li[hidden], .devices [data-other-devices][hidden] { display: none; }

/* offline Today */
.offline-banner { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius-control); background: var(--paper-raised); color: var(--ink); font-size: 15px; line-height: 1.45; }
.offline-banner[hidden] { display: none; }
.offline-banner svg { width: 22px; height: 22px; color: var(--ink-muted); margin-top: 1px; }
.offline-banner p { margin: 0; }
.offline-banner small { display: block; font-size: 14px; color: var(--ink-muted); }
.tick[aria-disabled="true"] { cursor: not-allowed; border-style: dotted; }
.tick[aria-disabled="true"]:hover { border-color: var(--rule-strong); }
.stamp[aria-disabled="true"] { cursor: not-allowed; }
.stamp[aria-disabled="true"]:hover .stamp-open { stroke: currentColor; }

/* Today v2 (designed in Claude Design: PR 3, Today's page; design system "Daily edition" and "Today v2") */
.today-page { display: grid; gap: 26px; }
.today-page .caps, .review-page .caps, .meals-page .caps { margin: 0; font: 400 15px/18px var(--font-caps); letter-spacing: 0.05em; color: var(--ink-muted); }
.today-page .caps-sm, .review-page .caps-sm, .meals-page .caps-sm { font: 400 13px/16px var(--font-caps); letter-spacing: 0.05em; color: var(--ink-muted); }
.today-page .h2, .review-page .h2, .meals-page .h2 { margin: 0; font: 400 26px/1.1 var(--font-display); color: var(--ink); }
.today-page .fig { font: 500 14px var(--font-mono); font-variant-numeric: tabular-nums; }
.today-page .sec-head, .review-page .sec-head, .meals-page .sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.today-page .list-h, .meals-page .list-h { margin: 0; font: 400 15px/18px var(--font-caps); letter-spacing: 0.05em; color: var(--ink); }
.today-page .muted-line { margin: 0; font-size: 15px; color: var(--ink-muted); }

/* edition label */
.edition-label { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.edition-label .edition-name { font: 400 15px/18px var(--font-caps); letter-spacing: 0.05em; color: var(--ink); }
.edition-label .edition-where { font: 400 15px/18px var(--font-caps); letter-spacing: 0.05em; color: var(--ink-muted); }

/* moon glyph: shade is ink by day, paper by night */
.moon { display: block; flex: none; }
.moon .moon-lit, .moon-lit { fill: var(--almanac); stroke: var(--ink); stroke-width: 1; }
.moon .moon-shade, .moon-shade { fill: var(--ink); }
[data-theme="dark"] .moon-shade { fill: var(--paper); }
.moon-open { fill: none; stroke: var(--ink-muted); stroke-width: 1.25; stroke-dasharray: 2 3; }
.moon-rest { fill: none; stroke: var(--ink); stroke-width: 1.25; }
.moon-rest-mark { fill: var(--ink); font: 400 13px var(--font-caps); }

/* sky-arc masthead */
.sky { display: grid; gap: 6px; }
.sky-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); border-top: 1px solid var(--ink); padding-top: var(--space-3); }
.sky-head.bare { border-bottom: 1px solid var(--ink); padding-bottom: var(--space-3); }
.sky-head h1 { margin: 0; font: 400 40px/1 var(--font-display); }
.sky-when { display: grid; gap: 2px; }
.sky-date { font: 400 19px/1.2 var(--font-display); }
.sky-phase { display: grid; justify-items: center; gap: var(--space-1); }
.sky-phase .moon { width: 56px; height: 56px; }
.sky-arc { display: block; width: 100%; height: auto; }
.sky-arc.wide { display: none; }
.sky-arc .arc-path { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 2 5; }
.sky-arc .arc-ground { stroke: var(--ink); stroke-width: 1; }
.sky-arc .arc-trail { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.sky-arc .sun { fill: var(--almanac); stroke: var(--ink); stroke-width: 1.25; }
.sky-arc .rays { stroke: var(--ink); stroke-width: 1.25; stroke-linecap: round; }
.sky-arc .star { fill: var(--ink); }
.sky-arc .arc-note { fill: var(--ink-muted); font: 400 12px var(--font-caps); letter-spacing: 1px; }
[data-theme="dark"] .sky-arc .arc-path { stroke: var(--rule-strong); }
.sky-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--ink); padding-bottom: 10px; }
.sky-times div { display: grid; }
.sky-times div:nth-child(2) { text-align: center; }
.sky-times div:nth-child(3) { text-align: right; }
.sky-times .t { font: 500 16px/1.2 var(--font-mono); font-variant-numeric: tabular-nums; }
.forecast-off { display: flex; gap: 8px; align-items: center; margin: 0; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 15px; line-height: 1.45; color: var(--ink-muted); }
.forecast-off svg { width: 18px; height: 18px; flex: none; }

/* readings grid: "Forecast for your body"; a reading with a tip is emphasized by weight and a double rule, never colour */
.today-forecast { display: grid; gap: 10px; }
.readings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.reading { display: grid; gap: 2px; padding: var(--space-3) 0; border-top: 1px solid var(--rule); align-content: start; }
.reading .n { font: 500 26px/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.reading .n small { font: 400 15px/1 var(--font-caps); letter-spacing: 0.04em; color: var(--ink-muted); margin-left: 6px; }
.reading p { margin: 0; font-size: 14px; line-height: 1.35; color: var(--ink-muted); }
.reading.is-tip { grid-column: 1 / -1; border-top: 3px double var(--ink); padding: var(--space-3) 0 14px; gap: 4px; }
.reading.is-tip .n { font-size: 30px; }
.reading.is-tip .do { display: flex; gap: 8px; align-items: baseline; margin-top: 4px; font-size: 17px; line-height: 1.35; font-weight: 700; color: var(--ink); }
.reading.is-tip .do svg { width: 16px; height: 16px; flex: none; color: var(--action); position: relative; top: 2px; }
.reading.is-quiet .n { font-size: 20px; color: var(--ink-muted); }
.wind-down { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--rule-strong); border-radius: var(--radius-control); background: var(--paper-raised); }
.wind-down p { margin: 0; font-size: 15px; line-height: 1.45; }

/* place ask (no ZIP/city yet) and place setting */
.place-ask { display: grid; gap: 12px; padding: 18px 16px; background: var(--paper-raised); border: 1px solid var(--rule); border-top: 3px double var(--ink); border-radius: var(--radius-sheet); }
.place-ask p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-muted); }
.place-ask form { display: grid; gap: 10px; }
.place-ask .input { background: var(--paper); }
.place-ask .button, .place-form .button { min-height: 48px; }
.place-ask p.place-fallback, .place-fallback { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; line-height: 1.45; color: var(--ink); }
.place-fallback svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--ink-muted); }
.place-now { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; align-items: center; max-width: 560px; padding: 16px; background: var(--paper-raised); border: 1px solid var(--rule); border-top: 3px double var(--ink); border-radius: var(--radius-sheet); }
.place-now .glyph { grid-row: 1 / span 2; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--rule-strong); color: var(--ink); }
.place-now .glyph svg { width: 22px; height: 22px; }
.place-now strong { font-size: 20px; line-height: 1.2; }
.place-now .meta { font-size: 15px; color: var(--ink-muted); }
.place-form { display: grid; gap: 16px; max-width: 560px; }
.place-choice { border: 0; margin: 0; padding: 0; display: grid; }
.place-choice legend { padding: 0 0 8px; font-weight: 700; font-size: 17px; }
.place-opt { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 4px 12px; padding: 14px 0; border-top: 1px solid var(--rule); }
.place-opt:last-of-type { border-bottom: 1px solid var(--rule); }
.place-opt input[type="radio"] { width: 22px; height: 22px; margin: 11px 0 0; accent-color: var(--action); }
.place-opt label.lead { display: flex; align-items: center; min-height: 44px; font-weight: 700; font-size: 17px; line-height: 1.3; }
.place-opt .hint, .place-opt .field, .place-opt .found { grid-column: 2; margin: 0; }
.place-opt .hint { font-size: 15px; line-height: 1.45; color: var(--ink-muted); }
.place-opt .field { margin-top: 8px; }
.found { display: flex; gap: 8px; align-items: center; font-size: 15px; }
.found svg { width: 18px; height: 18px; flex: none; color: var(--action); }

/* did you know */
.learn-card { display: grid; gap: 8px; padding: 18px 16px 8px; border: 1px solid var(--ink); border-radius: var(--radius-sheet); background: var(--paper-raised); }
.learn-card h2 { margin: 0; font: 400 23px/1.15 var(--font-display); }
.learn-card p { margin: 0; font-size: 15px; line-height: 1.45; }
.learn-card .more { font-weight: 700; justify-self: start; min-height: 44px; display: inline-flex; align-items: center; }

/* "Because you …" group */
.today-page .occasion { display: grid; gap: 10px; padding: 16px 16px 4px; background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-control); }
.today-page .occasion h2 { margin: 0; font: 400 22px/1.15 var(--font-display); }
.today-page .occasion .stamp-row:last-child { border-bottom: 0; }

/* passport-stamp tick */
.today-list { display: grid; gap: 34px; }
.kept-wrap { position: relative; display: grid; gap: 10px; }
.stamp-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.stamp-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.stamp-row form { margin: 0; }
.stamp { width: 64px; height: 64px; padding: 0; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--rule-strong); }
.stamp svg { width: 64px; height: 64px; overflow: visible; }
.stamp .stamp-open { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-dasharray: 3 4; }
.stamp .stamp-hint { fill: var(--ink-muted); font: italic 400 13px var(--font-display); }
.stamp .stamp-ink { transform-box: fill-box; transform-origin: center; transform: rotate(var(--stamp-turn, -8deg)); }
.stamp .stamp-ring { fill: none; stroke: currentColor; stroke-width: 2.75; stroke-dasharray: 40 2 22 3 60 2; }
.stamp .stamp-inner { fill: none; stroke: currentColor; stroke-width: 1.5; }
.stamp .stamp-text { fill: currentColor; font: 400 8.5px var(--font-caps); letter-spacing: 2px; }
.stamp .stamp-check { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.stamp[aria-pressed="true"], .stamp.is-pressing { color: var(--action); }
.stamp.is-pressing svg { transform: scale(0.92); }
.stamp.is-pressing .stamp-ink { opacity: 0.55; }
.stamp:hover .stamp-open { stroke: var(--action); }
.stamp-body { display: grid; gap: 2px; min-width: 0; }
.stamp-row .stamp-title { font-weight: 700; font-size: 18px; line-height: 1.3; color: var(--ink); text-decoration: none; }
.stamp-row.done .stamp-title { color: var(--ink-muted); }
.stamp-row .stamp-why { font-size: 14px; line-height: 1.4; color: var(--ink-muted); }
.stamp-row.is-hinted { background: var(--almanac-wash); margin-inline: -12px; padding-inline: 12px; border-radius: var(--radius-control); border-bottom-color: transparent; }
.day-kept { display: inline-block; transform: rotate(var(--stamp-turn, -6deg)); margin: 0; padding: 6px 14px; border: 2.5px solid var(--take); background: var(--paper-raised); color: var(--take); font: 400 18px/1.2 var(--font-caps); letter-spacing: 3px; white-space: nowrap; }
.day-kept.across { position: absolute; right: 0; top: 118px; padding: 10px 18px; font-size: 27px; letter-spacing: 4px; border-width: 3.5px; box-shadow: inset 0 0 0 3px var(--paper-raised), inset 0 0 0 4.5px var(--take); pointer-events: none; --stamp-turn: -8deg; }
@media (prefers-reduced-motion: no-preference) {
  .stamp svg { transition: transform 140ms ease-out; }
  .stamp .stamp-ink { transition: opacity 140ms ease-out; }
}

/* moon-row streak and rest days */
.moon-streak { display: grid; gap: 10px; }
.moon-streak .streak-line { margin: 0; font: 400 22px/1.2 var(--font-display); }
.moon-streak .streak-line .fig { font-size: 20px; }
.moon-row { display: flex; flex-wrap: wrap; gap: 5px; }
.moon-row .moon { width: 18px; height: 18px; }
.moon-row .moon.is-new { width: 22px; height: 22px; margin-top: -2px; }
.streak-note { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; margin: 0; font-size: 15px; color: var(--ink-muted); }
.rest-help { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--action); font: 700 15px/1.2 var(--font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rest-help svg { width: 14px; height: 14px; }
.rest-help[aria-expanded="false"] svg { display: none; }
.rest-note { display: grid; gap: 10px; padding: 14px 16px; background: var(--paper-raised); border: 1px solid var(--rule-strong); border-radius: var(--radius-control); font-size: 15px; line-height: 1.45; }
.rest-note p { margin: 0; }
.rest-key { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--ink-muted); }
.rest-key span { display: inline-flex; align-items: center; gap: 6px; }
.rest-key svg { width: 18px; height: 18px; }

/* milestone card (7, 30, 100 days) */
.milestone { display: grid; gap: 12px; padding: 16px; background: var(--paper-raised); border: 1.5px solid var(--ink); box-shadow: 0 0 0 4px var(--paper-raised), 0 0 0 5.5px var(--ink); border-radius: 1px; margin: 6px; }
.milestone[hidden] { display: none; }
.milestone .ms-top { display: flex; justify-content: space-between; align-items: center; border-bottom: 3px double var(--ink); padding-bottom: 8px; }
.milestone h2 { margin: 0; font: 400 34px/1.05 var(--font-display); }
.milestone p { margin: 0; font-size: 15px; line-height: 1.45; }
.ms-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 10px 0 8px; }
.ms-day { display: grid; justify-items: center; gap: 4px; }
.ms-day svg { width: 30px; height: 30px; }
.ms-day .d { font: 400 13px/1 var(--font-caps); letter-spacing: 0.04em; }
.ms-day .n { font: 500 12px/1 var(--font-mono); color: var(--ink-muted); }
.ms-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ms-actions .button { min-height: 48px; padding: 0 18px; }
.ms-actions .button svg { width: 18px; height: 18px; }
.ms-actions .button.quiet { margin-left: auto; }

/* the page: one column on phones in reading order, two columns on wide screens */
.today-cols { display: flex; flex-direction: column; gap: 34px; }
.today-cols .col-side, .today-cols .col-main { display: contents; }
.today-forecast, .place-ask { order: 1; }
.today-chips { order: 2; }
.today-list { order: 3; }
.learn-card { order: 4; }
.moon-streak { order: 5; }
.today-more { order: 6; display: grid; gap: 34px; }
.today-fine { margin: 0; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 15px; color: var(--ink-muted); }
@media (min-width: 960px) {
  .today-page { gap: 36px; }
  .today-page .h2 { font-size: 28px; }
  .sky { gap: 8px; }
  .sky-head { border-top: 3px double var(--ink); padding-top: 14px; }
  .sky-head h1 { font-size: 56px; }
  .sky-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; }
  .sky-date { font-size: 22px; }
  .sky-phase { display: flex; align-items: center; gap: 12px; }
  .sky-arc.phone { display: none; }
  .sky-arc.wide { display: block; }
  .sky-arc .arc-note { font-size: 13px; }
  .sky-times .t { font-size: 18px; }
  .learn-card { padding: 18px 18px 8px; }
  .learn-card h2 { font-size: 24px; }
  .learn-card p { line-height: 1.5; }
  .today-page .occasion { padding: 16px 18px 4px; }
  .today-cols { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 40px 64px; }
  .today-cols .col-side { display: grid; flex: 1 1 340px; min-width: 0; gap: 32px; }
  .today-cols .col-main { display: grid; flex: 999 1 560px; min-width: 0; gap: 32px; }
}

/* weekly review (designed in Claude Design: PR 4, "Weekly review & pricing"; design system WeekLedger) */
.review-page, .meals-page { display: grid; gap: 30px; }
.wk-head { display: grid; gap: 14px; }
.wk-intro { display: grid; gap: 8px; border-top: 1px solid var(--ink); padding-top: 14px; }
.wk-titles { display: grid; gap: 8px; }
.wk-crumbs { font-size: 15px; }
.wk-crumbs a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.wk-crumbs svg { width: 18px; height: 18px; }
.wk-crumb-here { display: none; }
.wk-title { margin: 0; font: 400 40px/1.02 var(--font-display); color: var(--ink); }
.wk-sub { margin: 0; font-size: 16px; color: var(--ink-muted); }
.wk-days { list-style: none; margin: 0; padding: 10px 0 8px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 3px double var(--ink); border-bottom: 1px solid var(--ink); }
.wk-day { display: grid; justify-items: center; gap: 5px; }
.wk-day .d { font: 400 13px/1 var(--font-caps); letter-spacing: 0.04em; color: var(--ink); }
.wk-day .n { font: 500 12px/1 var(--font-mono); color: var(--ink-muted); }
.wk-day svg { width: 32px; height: 32px; display: block; }
.wk-cols { display: flex; flex-direction: column; gap: 36px; }
.wk-cols .col-main, .wk-cols .col-side { display: grid; gap: 36px; min-width: 0; align-content: start; }
.wk-sec { display: grid; gap: 10px; }
.wk-caps-h { color: var(--ink); }
.wk-habits { list-style: none; margin: 0; padding: 0; }
.wk-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px 34px; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.wk-row.head { padding: 8px 0; border-bottom: 1px solid var(--ink); }
.wk-kept { text-align: right; }
.wk-habit { display: block; font-weight: 700; font-size: 16px; line-height: 1.3; color: var(--ink); text-decoration: none; }
a.wk-habit:hover { color: var(--action); text-decoration: underline; }
.wk-why { display: block; font-size: 13px; line-height: 1.35; color: var(--ink-muted); }
.dots { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); justify-items: center; align-items: center; }
.dots .l { font: 400 13px/1 var(--font-caps); color: var(--ink-muted); }
.dot { display: block; width: 14px; height: 14px; border-radius: 50%; box-sizing: border-box; border: 1.5px solid var(--rule-strong); }
.dot.on { background: var(--action); border-color: var(--action); }
.dot.na { width: 10px; height: 2px; border: 0; border-radius: 1px; background: var(--rule-strong); }
.wk-count { font: 500 15px/1 var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); }
.wk-key { margin: 0; font-size: 14px; color: var(--ink-muted); }
.verdicts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.verdict { display: grid; gap: 4px; align-content: start; padding: 12px 0 0; border-top: 3px double var(--ink); }
.verdict strong { font-size: 16px; line-height: 1.3; }
.verdict p { margin: 0; font-size: 14px; line-height: 1.4; color: var(--ink-muted); }
.occ { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.occ li { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius-pill); font-size: 15px; background: var(--paper-raised); }
.occ .x { font: 500 14px var(--font-mono); color: var(--ink-muted); }
.almanac-note { display: grid; gap: 8px; padding: 18px 16px; background: var(--paper-raised); border: 1px solid var(--ink); border-top: 3px double var(--ink); border-radius: var(--radius-sheet); }
.almanac-note .say { margin: 0; font: 400 24px/1.28 var(--font-display); color: var(--ink); }
.ahead { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.ahead li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 16px; line-height: 1.45; }
.ahead svg { width: 20px; height: 20px; margin-top: 2px; color: var(--action); }
.wk-weeks { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--rule); padding-top: 14px; font-size: 16px; }
.wk-weeks a { min-height: 44px; display: inline-flex; align-items: center; }
@media (min-width: 960px) {
  .review-page { gap: 36px; }
  .wk-intro { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 32px; }
  .wk-title { font-size: 52px; }
  .wk-sub { max-width: 420px; font-size: 17px; }
  .wk-crumb-here { display: inline; }
  .wk-cols { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 40px 48px; }
  .wk-cols .col-main { flex: 999 1 560px; }
  .wk-cols .col-side { flex: 1 1 340px; gap: 32px; }
}

/* sealed note: what Premium would add, shown to a free reader */
.sealed { display: grid; gap: 12px; padding: 20px 16px 18px; margin: 6px; background: var(--paper-raised); border: 1.5px solid var(--ink); box-shadow: 0 0 0 4px var(--paper-raised), 0 0 0 5.5px var(--ink); }
.sealed-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 3px double var(--ink); padding-bottom: 8px; }
.sealed-lock { display: inline-flex; align-items: center; gap: 6px; }
.sealed-lock svg { width: 20px; height: 20px; color: var(--ink); }
.sealed h2 { margin: 0; font: 400 28px/1.1 var(--font-display); color: var(--ink); }
.sealed-lines { display: grid; gap: 9px; padding: 4px 0 2px; }
.sealed-lines span { display: block; height: 10px; border-radius: 2px; background: var(--rule); }
.sealed ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.sealed li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; font-size: 15px; line-height: 1.4; }
.sealed li svg { width: 16px; height: 16px; margin-top: 3px; color: var(--action); }
.sealed p { margin: 0; font-size: 15px; line-height: 1.45; }
.sealed p.sealed-free { font-size: 14px; color: var(--ink-muted); }

/* habit limit: the free almanac's three, said calmly (never red) */
.limit { display: grid; gap: 10px; padding: 16px; background: var(--paper-raised); border: 1px solid var(--rule); border-top: 3px double var(--ink); border-radius: var(--radius-sheet); }
.limit h3 { margin: 0; font: 400 24px/1.15 var(--font-display); color: var(--ink); }
.limit p { margin: 0; font-size: 15px; line-height: 1.45; }
.limit .limit-fine { font-size: 14px; color: var(--ink-muted); }
.limit-three { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.limit-three li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.limit-three .fig { font: 500 13px var(--font-mono); color: var(--ink-muted); white-space: nowrap; }
.limit-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 4px; }
.limit-acts .button { min-height: 48px; }
.row-list > li.limit-slot { display: block; border-bottom: 1px solid var(--rule); padding-bottom: 14px; }
.plan-note { margin: 0; padding: 12px 14px; background: var(--almanac-wash); border-radius: var(--radius-control); font-size: 15px; line-height: 1.45; color: var(--ink); }

/* your data: download the almanac (free on every plan) */
.export { display: grid; gap: 14px; padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); max-width: 560px; }
.export-head { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px 14px; align-items: start; }
.export-head .glyph { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--rule-strong); color: var(--ink); }
.export-head .glyph svg { width: 22px; height: 22px; }
.export-head strong { display: block; font-size: 17px; line-height: 1.3; }
.export-head p { margin: 2px 0 0; font-size: 15px; line-height: 1.45; color: var(--ink-muted); }
.export-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.export-acts .button { min-height: 48px; gap: 8px; }
.export-acts svg { width: 18px; height: 18px; }
.export-what { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; line-height: 1.4; color: var(--ink-muted); }
.export-what li { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 8px; }
.export-what b { font: 500 13px/1.4 var(--font-mono); color: var(--ink); }

/* progress on the free almanac: days older than 30 faded, never deleted */
.day.faded, .cal-faded { opacity: 0.28; filter: grayscale(0.4); }
.swatch.faded { opacity: 0.28; }
.faded-wrap { position: relative; max-width: 760px; }
.keep-card { display: grid; gap: 8px; max-width: 360px; box-sizing: border-box; padding: 16px; background: var(--paper-raised); border: 1px solid var(--ink); border-top: 3px double var(--ink); border-radius: var(--radius-sheet); box-shadow: 0 10px 28px -18px rgba(26, 26, 23, 0.6); }
.faded-wrap .keep-card { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); width: calc(100% - 24px); }
.keep-card .keep-label { font: 400 14px/16px var(--font-caps); letter-spacing: 0.05em; color: var(--ink-muted); }
.keep-card h3 { margin: 0; font: 400 23px/1.15 var(--font-display); color: var(--ink); }
.keep-card p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink); }
.keep-card .button { justify-self: start; }

/* pricing (PlanCompare): Free first, then Premium; the plain terms below */
.pricing { display: grid; gap: 36px; padding-top: 8px; }
.plans { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
.plan { display: grid; gap: 16px; align-content: start; padding: 24px 22px; background: var(--paper-raised); border: 1px solid var(--ink); border-radius: var(--radius-sheet); }
.plan.premium { border-width: 1.5px; box-shadow: 0 0 0 4px var(--paper-raised), 0 0 0 5.5px var(--ink); margin: 6px; }
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 3px double var(--ink); padding-bottom: 10px; }
.plan-name { margin: 0; font: 400 24px/1 var(--font-caps); letter-spacing: 0.08em; color: var(--ink); }
.plan-for { font: italic 400 19px/1.2 var(--font-display); color: var(--ink-muted); }
.plan-price { margin: 0; font: 400 42px/1.05 var(--font-display); color: var(--ink); }
.plan.premium .plan-price { font-size: 34px; }
.plan-price-note { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-muted); }
.plan-plus { margin: 0; font: 400 15px/18px var(--font-caps); letter-spacing: 0.05em; color: var(--ink); }
.plan-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.plan-list li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 16px; line-height: 1.4; }
.plan-list svg { width: 18px; height: 18px; margin-top: 2px; color: var(--action); }
.plan-list .sub { display: block; font-size: 14px; color: var(--ink-muted); }
.plan .button { justify-self: start; min-height: 48px; }
.plan-current { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; font-size: 15px; color: var(--ink-muted); }
.plan-current::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-muted); }
.sunday { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px 36px; align-items: center; padding: 24px 0; border-top: 3px double var(--ink); border-bottom: 1px solid var(--ink); }
.sunday > div { display: grid; gap: 10px; }
.sunday h2 { margin: 0; font: 400 34px/1.1 var(--font-display); }
.sunday .say { margin: 0; font: 400 26px/1.28 var(--font-display); color: var(--ink); }
.sunday .caps-line { font: 400 15px/18px var(--font-caps); letter-spacing: 0.05em; color: var(--ink-muted); }
.plain { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 32px; border-top: 2px solid var(--ink); }
.plain div { display: grid; gap: 4px; align-content: start; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.plain h3 { margin: 0; font: 700 17px/1.3 var(--font-body); color: var(--ink); }
.plain p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-muted); }
@media (min-width: 721px) {
  .plans, .sunday { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing { gap: 44px; }
}
@media (min-width: 1080px) {
  .plain { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- meals: log what you ate, Claude estimates the calories ---------- */
.meal-total { margin: 0; font: 400 40px/1.05 var(--font-display); color: var(--ink); text-wrap: balance; }
.meal-total .figure { font-size: 0.86em; font-weight: 500; color: var(--action); letter-spacing: -0.02em; }
.meal-log { display: grid; gap: 14px; padding: 18px 16px 20px; background: var(--paper-raised); border: 1px solid var(--rule-strong); border-top: 3px double var(--ink); border-radius: 2px; }
.meal-log .meal-field { display: grid; gap: 6px; }
.meal-log label { font-weight: 700; font-size: 16px; line-height: 1.3; }
.meal-log .meal-hint { font-size: 14px; line-height: 1.45; color: var(--ink-muted); }
.meal-log textarea, .meal-kcal-input input { font: 400 17px/1.5 var(--font-body); color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 4px; padding: 10px 12px; }
.meal-log textarea { min-height: 96px; resize: vertical; width: 100%; box-sizing: border-box; }
.meal-kcal-input { display: flex; align-items: center; gap: 10px; }
.meal-kcal-input input { width: 128px; min-height: 48px; box-sizing: border-box; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.meal-kcal-input span { font: 400 15px/1 var(--font-caps); letter-spacing: 0.05em; color: var(--ink-muted); }
.meal-log .meal-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.meal-alert { display: grid; gap: 6px; padding: 14px 16px; background: var(--take-wash); color: var(--ink); border-top: 2px solid var(--take); border-radius: 2px; font-size: 16px; line-height: 1.45; }
.meal-alert strong { color: var(--take); font: 400 15px/18px var(--font-caps); letter-spacing: 0.05em; }
.meal-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.meal { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.meal time { font: 500 13px/24px var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-muted); }
.meal-what { margin: 0; font-weight: 700; font-size: 16px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.meal-cal { display: grid; justify-items: end; gap: 3px; text-align: right; }
.meal-cal b { font: 500 22px/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--action); }
.meal-cal span { font: 400 13px/16px var(--font-caps); letter-spacing: 0.05em; color: var(--ink-muted); white-space: nowrap; }
.meal-note { grid-column: 2 / 4; margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-muted); }
.meal-acts { grid-column: 2 / 4; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; font-size: 15px; }
.meal-acts summary, .meal-acts .link-button { display: inline-flex; align-items: center; min-height: 36px; color: var(--action); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 0; font: inherit; }
.meal-acts summary::-webkit-details-marker { display: none; }
.meal-acts summary { list-style: none; }
.meal-fix[open] { flex-basis: 100%; }
.meal-fix form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 0 4px; }
.meal-fix label { font-size: 15px; font-weight: 700; }
.meal-fix input { width: 110px; min-height: 44px; box-sizing: border-box; font: 400 17px/1 var(--font-mono); color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 4px; padding: 0 10px; }
.meal-fix .button, .meal-fix .btn { min-height: 44px; }
.meal-week { display: grid; gap: 8px; }
.meal-bars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; height: 132px; border-bottom: 1px solid var(--ink); }
.meal-bars li { display: grid; justify-items: center; align-content: end; gap: 5px; height: 100%; }
.meal-bars b { font: 500 11px/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink-muted); }
.meal-bars i { display: block; width: 100%; max-width: 30px; min-height: 2px; background: var(--action); border-radius: 2px 2px 0 0; }
.meal-bars .is-today i { background: transparent; border: 2px solid var(--action); border-bottom: 0; box-sizing: border-box; }
.meal-bars .is-empty i { background: var(--rule-strong); height: 2px !important; }
.meal-days-l { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; text-align: center; font: 400 13px/1 var(--font-caps); letter-spacing: 0.04em; color: var(--ink-muted); }
.meal-days { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.meal-days a { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px; gap: 12px; align-items: baseline; min-height: 48px; padding: 12px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.meal-days a:hover .meal-day { text-decoration: underline; text-underline-offset: 3px; }
.meal-day { font-weight: 700; font-size: 16px; }
.meal-days .n { font-size: 14px; color: var(--ink-muted); }
.meal-days .kcal { font: 500 16px/1 var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); }
.meal-empty { display: grid; gap: 8px; padding: 18px 0; border-top: 2px solid var(--ink); }
.meal-empty p { color: var(--ink-muted); font-size: 16px; line-height: 1.5; }
.meals-today { display: grid; gap: 10px; }
.meals-today .meals-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.meals-today .meals-sum .figure { font-size: 34px; line-height: 1; font-weight: 500; color: var(--action); }
.meals-today .meals-sum span { font-size: 15px; color: var(--ink-muted); }
.meal-fine { font-size: 13px; line-height: 1.5; color: var(--ink-muted); }
.meal-form { display: grid; gap: 14px; }
.meal-log .button { min-height: 48px; }
.meal-remove { display: inline; }
.meal-fine { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--rule); }
.meal-fine strong { color: var(--ink); }
.meals-today .button { justify-self: start; min-height: 48px; }
@media (min-width: 960px) {
  .meals-page { gap: 36px; }
  .meal-total { font-size: 52px; }
}
