/* Retained functional styles. C11 tokens and composition are separate. */



* {
  box-sizing:border-box
}
body {
  margin:0;background:var(--bg);color:var(--ink);
  -webkit-tap-highlight-color:transparent
}
button,input,select,textarea {
  font:inherit
}
button,a,input,select,textarea {
  touch-action:manipulation
}
button {
  cursor:pointer;
  color:inherit
}
button {
  border:0;
  background:none
}
button:disabled {
  opacity:.55;
  cursor:wait
}
a {
  color:inherit;
  text-underline-offset:3px
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible {
  outline:3px solid var(--focus);
  outline-offset:4px
}
button:active:not(:disabled) {
  transform:scale(.98)
}
button {
  transition:transform .11s,background .16s
}
h1,h2,h3,p {
  margin:0
}
h1,h2 {
  font-family:Golos,Golos,sans-serif;
  font-weight:600;
  line-height:1.13
}
h1 {
  font-size:2.65rem;
  letter-spacing:-.045em
}
h2 {
  font-size:1.7rem;
  letter-spacing:-.02em
}
h3 {
  font-size:1.08rem;
  line-height:1.3
}
small,.small {
  font-size:.8rem
}
img {
  max-width:100%;
  display:block
}
svg {
  display:block;
  flex-shrink:0
}
input,select,textarea {
  max-width:100%
}
::selection {
  background:var(--hairline-str)
}
.skip {
  position:fixed;top:-80px;left:15px;z-index:90;background:var(--btn);color:var(--btn-text);
  padding:12px
}
.skip:focus {
  top:10px
}
.boot {
  padding:20vh 10vw
}
.wordmark {
  font-family:Golos,sans-serif;
  font-size:2rem;
  font-weight:600;
  letter-spacing:-.05em;
  white-space:nowrap
}
.wordmark i {
  font-style:normal;color:var(--accent)
}
.muted {
  color:var(--muted)
}
.eyebrow {
  font-size:.75rem;letter-spacing:.01em;text-transform:none;font-weight:600;color:var(--muted)
}
.row {
  display:flex;
  align-items:center;
  gap:12px
}
.between {
  justify-content:space-between
}
.wrap {
  flex-wrap:wrap
}
.stack {
  display:grid;
  gap:16px
}
.gap8 {
  gap:8px
}
.icon-btn {
  width:46px;height:46px;border:1px solid var(--line);border-radius:var(--r-pill);display:inline-grid;place-items:center;background:var(--card);
  flex-shrink:0
}
.icon-btn:hover {
  background:var(--layer)
}
.btn {
  min-height:48px;border-radius:var(--r-md);padding:12px 20px;display:inline-flex;justify-content:center;align-items:center;gap:9px;background:var(--btn);color:var(--btn-text);
  font-weight:600;
  border:1px solid transparent;
  text-decoration:none;
  line-height:1.25
}
.btn.secondary {
  background:var(--layer);color:var(--ink)
}
.btn.outline {
  background:transparent;border-color:var(--line);color:var(--ink)
}
.btn.coral {
  background:var(--accent);color:var(--text)
}
.btn.wide {
  width:100%
}
.btn.small {
  min-height:42px;padding:10px 14px;border-radius:var(--r-md)
}
.text-btn {
  display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;font-size:.87rem;font-weight:500;color:var(--ink);
  text-decoration:none
}
.pill {
  display:inline-flex;align-items:center;gap:6px;border-radius:var(--r-pill);padding:7px 12px;background:var(--layer);
  font-size:.75rem;
  font-weight:500;
  line-height:1.25
}
.pill.mint {
  background:var(--surface-2);color:var(--text)
}
.pill.coral {
  background:var(--surface-2);color:var(--text)
}
.pill.lilac {
  background:var(--surface-2);color:var(--text)
}
.sep {
  height:1px;background:var(--line);
  margin:8px 0
}
.card {
  background:var(--card);border-radius:var(--r-lg);padding:24px;box-shadow:var(--shadow)
}
.section-head {
  display:flex;
  gap:15px;
  align-items:center;
  justify-content:space-between;
  margin-bottom:17px
}
.section-head h2 {
  font-size:1.6rem
}

.side {
  position:fixed;left:0;top:0;bottom:0;width:218px;background:var(--card);border-right:1px solid var(--line);
  padding:36px 22px;
  display:flex;
  flex-direction:column;
  gap:38px;
  z-index:20
}
.side .wordmark {
  padding-left:10px
}
.desktop-nav {
  display:grid;
  gap:8px
}
.desktop-nav button {
  display:flex;align-items:center;gap:13px;text-align:left;padding:14px;border-radius:var(--r-md);
  font-weight:500
}
.desktop-nav button.active {
  background:var(--ink);color:var(--bg)
}
.desktop-nav button:not(.active):hover {
  background:var(--layer)
}
.side-bottom {
  margin-top:auto;padding:16px;background:var(--layer);border-radius:var(--r-md);
  display:grid;
  gap:8px;
  font-size:.8rem
}
.profile-dot {
  width:38px;height:38px;display:grid;place-items:center;border-radius:var(--r-pill);background:var(--surface-2);color:var(--text);
  font-weight:600
}
.shell {
  margin-left:218px;
  padding:34px 38px 50px;
  max-width:1580px
}
.topbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:34px
}
.topbar .mobile-logo {
  display:none
}
.status-label {
  font-size:.8rem;display:flex;align-items:center;gap:7px;color:var(--muted)
}
.page-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:25px
}
.page-head p {
  color:var(--muted);
  margin-top:10px
}
.page-head .head-actions {
  display:flex;
  align-items:center;
  gap:10px
}
.layout {
  display:grid;grid-template-columns:minmax(0,1fr) 295px;
  gap:24px;
  align-items:start
}
.content-main,.aside {
  display:grid;
  gap:24px;
  min-width:0
}
.week {
  display:grid;grid-template-columns:repeat(7,minmax(0,1fr));
  gap:9px
}
.day-chip {
  display:flex;align-items:center;flex-direction:column;gap:6px;border:1px solid var(--line);border-radius:var(--r-lg);padding:12px 4px;min-height:82px;background:var(--card)
}
.day-chip .dow {
  font-size:.74rem;text-transform:lowercase;color:var(--muted)
}
.day-chip .num {
  font-size:1.15rem;
  font-weight:600
}
.day-chip .day-mark {
  height:3px;width:16px;border-radius:var(--r-sm);
  background:transparent
}
.day-chip.gym .day-mark {
  background:var(--mint)
}
.day-chip.active {
  background:var(--ink);color:var(--bg);border-color:var(--ink)
}
.day-chip.active .dow {
  color:var(--bg);
  opacity:.7
}
.day-chip.today:not(.active) {
  border-color:var(--ink)
}
.week-wrap {
  display:grid;
  gap:15px
}
.date-caption {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px
}
.date-caption strong {
  font-size:.9rem
}
.hero {
  padding:0;overflow:hidden;border-radius:var(--r-lg);position:relative;background:var(--card);box-shadow:var(--shadow)
}
.hero-top {
  display:grid;
  grid-template-columns:1fr 45%;
  min-height:285px
}
.hero-copy {
  padding:27px 0 26px 28px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:14px;
  position:relative;
  z-index:1
}
.hero-copy h2 {
  font-size:2.2rem;
  line-height:1.12;
  max-width:330px
}
.hero-copy .muted {
  font-size:.82rem
}
.hero-actions {
  display:flex;
  gap:8px;
  margin-top:auto;
  flex-wrap:wrap
}
.hero-photo {
  position:relative;overflow:hidden;background:var(--surface-2)
}
.hero-photo img {
  width:100%;
  height:100%;
  object-fit:cover
}
.hero-photo:before {
  content:'';position:absolute;z-index:1;inset:0;background:linear-gradient(90deg,var(--card),transparent 25%);
  pointer-events:none
}
.photo-note {
  position:absolute;right:10px;bottom:10px;background:var(--surface-1);color:var(--text);border-radius:var(--r-sm);
  font-size:10px;
  padding:3px 7px;
  z-index:2
}
.hero.no-photo .hero-top {
  grid-template-columns:1fr
}
.hero.no-photo .hero-copy {
  padding:28px
}
.hero.no-photo h2 {
  max-width:650px
}
.hero-stats {
  border-top:1px solid var(--line);display:grid;grid-template-columns:1fr 1fr;gap:20px;padding:22px 28px;background:var(--layer)
}
.stat-label {
  display:block;color:var(--muted);
  font-size:.73rem;
  margin-bottom:4px
}
.stat-line {
  font-size:1.5rem;
  font-weight:600;
  font-variant-numeric:tabular-nums;
  line-height:1.25
}
.stat-line small {
  font-size:.75rem;color:var(--muted);
  font-weight:400
}
.progress-track {
  height:5px;background:var(--line);border-radius:var(--r-sm);
  margin-top:11px;
  overflow:hidden
}
.progress-track i {
  display:block;height:100%;background:var(--mint);border-radius:var(--r-sm)
}
.hero-stats .stat-block+.stat-block {
  border-left:1px solid var(--line);
  padding-left:22px
}
.meal-list {
  display:grid;
  gap:10px
}
.meal-row {
  display:grid;grid-template-columns:52px 1fr auto;gap:13px;align-items:center;padding:16px;background:var(--card);border-radius:var(--r-lg)
}
.meal-art {
  width:52px;height:56px;border-radius:var(--r-md);object-fit:cover;background:var(--layer);display:grid;place-items:center;color:var(--muted)
}
.meal-title {
  display:block;
  text-align:left;
  font-weight:500;
  font-size:.94rem;
  padding:0;
  line-height:1.3
}
.meal-row .muted {
  font-size:.75rem;
  margin-top:5px
}
.meal-end {
  display:flex;
  align-items:center;
  gap:6px
}
.check-btn {
  width:44px;height:44px;display:grid;place-items:center;border-radius:var(--r-pill);border:1px solid var(--line);background:var(--card)
}
.check-btn.done {
  background:var(--surface-2);color:var(--text);border-color:var(--surface-2)
}
.meal-row.eaten {
  opacity:.8
}
.module-label {
  font-size:.8rem;color:var(--muted);
  padding:10px 2px 0
}
.add-meal {
  border:1px dashed var(--line);padding:15px;min-height:54px;border-radius:var(--r-md);
  display:flex;
  justify-content:center;
  gap:8px;
  align-items:center;
  font-weight:500
}
.mini-icon {
  width:44px;height:44px;border-radius:var(--r-md);display:grid;place-items:center;background:var(--layer);color:var(--ink)
}
.mini-icon.mint {
  background:var(--surface-2);color:var(--text)
}
.mini-icon.lilac {
  background:var(--surface-2);color:var(--text)
}
.aside .card {
  padding:22px
}
.water-number {
  font-family:Golos,sans-serif;
  font-size:3rem;
  font-weight:500;
  line-height:1;
  margin:18px 0 10px;
  font-variant-numeric:tabular-nums
}
.water-number small {
  font:400 .85rem Golos,sans-serif;color:var(--muted)
}
.water-actions {
  display:grid;grid-template-columns:repeat(3,1fr);
  gap:7px;
  margin-top:20px
}
.water-actions button {
  background:var(--layer);padding:10px 0;border-radius:var(--r-md);
  min-height:44px;
  font-size:.85rem;
  font-weight:500
}
.water-note {
  font-size:.74rem;color:var(--muted);
  margin-top:15px
}
.sleep-card {
  background:var(--surface-2);color:var(--text)
}
.sleep-card .muted {
  color:var(--text-2)
}
.sleep-card .eyebrow {
  color:var(--text-2)
}
.sleep-time {
  font-family:Golos,sans-serif;
  font-size:2.15rem;
  margin:14px 0 7px
}
.sleep-card .text-btn {
  color:var(--text);
  justify-content:flex-start
}
.activity-card {
  display:grid;
  gap:15px
}
.daily-foot {
  padding:15px 0;color:var(--muted);
  font-size:.8rem
}
.bottom-nav {
  display:none
}
.overview {
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px
}
.metric {
  padding:18px;border:1px solid var(--line);border-radius:var(--r-md)
}
.metric strong {
  font-family:Golos,sans-serif;
  font-size:2rem;
  font-weight:500;
  display:block
}
.metric span {
  font-size:.78rem;color:var(--muted)
}
.month-controls {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:20px
}
.month-grid {
  display:grid;grid-template-columns:repeat(7,minmax(0,1fr));
  gap:8px
}
.month-dow {
  text-align:center;font-size:.75rem;color:var(--muted);
  padding:8px
}
.month-day {
  min-height:92px;padding:12px;border:1px solid var(--line);border-radius:var(--r-md);text-align:left;display:flex;flex-direction:column;gap:7px;background:var(--card)
}
.month-day strong {
  font-size:1.15rem
}
.month-day small {
  font-size:.7rem
}
.month-day.selected {
  background:var(--ink);color:var(--bg)
}
.month-day.out {
  opacity:.4
}
.month-day .record-mark {
  width:6px;height:6px;border-radius:var(--r-pill);background:var(--accent)
}
.toolbar {
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  margin-bottom:22px
}
.search {
  position:relative;
  flex:1;
  min-width:190px
}
.search svg {
  position:absolute;left:16px;top:17px;color:var(--muted)
}
.search input {
  padding-left:46px;
  width:100%
}
.filters {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:15px 0 24px
}
.filter {
  padding:10px 16px;min-height:44px;border:1px solid var(--line);background:var(--card);border-radius:var(--r-pill);
  font-size:.85rem
}
.filter.active {
  background:var(--ink);color:var(--bg);border-color:var(--ink)
}
.recipe-grid {
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px
}
.recipe-card {
  background:var(--card);border-radius:var(--r-lg);
  overflow:hidden;
  position:relative;
  display:flex;
  flex-direction:column
}
.recipe-card>button:first-child {
  padding:0;
  text-align:left;
  flex:1;
  display:flex;
  flex-direction:column;
  width:100%
}
.recipe-image {
  height:150px;
  width:100%;
  object-fit:cover
}
.recipe-placeholder {
  height:112px;background:var(--layer);display:flex;align-items:center;justify-content:space-between;padding:25px;width:100%;color:var(--muted)
}
.recipe-placeholder strong {
  font-family:Golos,sans-serif;font-size:1.7rem;color:var(--ink)
}
.recipe-body {
  padding:18px;
  display:grid;
  gap:12px;
  width:100%
}
.recipe-body h3 {
  padding-right:10px;
  min-height:2.6em
}
.recipe-card .fav {
  position:absolute;right:10px;top:10px;background:var(--card);width:38px;height:38px;border-radius:var(--r-pill);
  display:grid;
  place-items:center
}
.recipe-card .fav[aria-pressed=true] {
  color:var(--accent)
}
.recipe-meta {
  display:flex;flex-wrap:wrap;gap:8px;color:var(--muted);
  font-size:.74rem
}
.macro-strip {
  display:flex;
  flex-wrap:wrap;
  gap:8px
}
.macro-strip span {
  padding:7px 10px;background:var(--layer);border-radius:var(--r-sm);
  font-size:.8rem
}
.macro-strip b {
  font-variant-numeric:tabular-nums
}
.empty {
  padding:38px 24px;text-align:center;border:1px dashed var(--line);border-radius:var(--r-lg);
  display:grid;
  justify-items:center;
  gap:16px
}
.empty p {
  max-width:400px;color:var(--muted)
}
.list-button {
  width:100%;display:flex;align-items:center;gap:14px;text-align:left;min-height:72px;padding:16px 4px;border-bottom:1px solid var(--line)
}
.list-button:last-child {
  border-bottom:0
}
.list-button .grow {
  flex:1
}
.list-button strong {
  font-size:.95rem
}
.list-button small {
  display:block;margin-top:3px;color:var(--muted)
}
.guide-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}
.guide-tile {
  background:var(--card);border-radius:var(--r-lg);
  padding:22px;
  text-align:left;
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  min-height:104px
}
.guide-tile strong {
  font-size:.94rem
}
.guide-tile .eyebrow {
  font-size:.66rem;
  margin-bottom:8px
}
.chart-box {
  overflow:hidden
}
.chart {
  width:100%;
  height:auto;
  min-height:140px
}
.chart text {
  fill:var(--muted);
  font:12px Golos,sans-serif
}
.chart .gridline {
  stroke:var(--line)
}
.chart .curve {
  fill:none;stroke:var(--mint);
  stroke-width:3
}
.chart circle {
  fill:var(--ink);stroke:var(--card);
  stroke-width:2
}
.chart-caption {
  display:flex;gap:15px;justify-content:space-between;color:var(--muted);
  font-size:.75rem;
  margin-top:10px
}
.advice {
  padding:20px;border:1px solid var(--line);border-radius:var(--r-lg);
  display:grid;
  gap:12px
}
.advice ul {
  padding-left:20px;margin:0;color:var(--muted);
  font-size:.9rem
}
.photo-grid {
  display:grid;grid-template-columns:repeat(2,1fr);
  gap:16px
}
.photo-grid img {
  aspect-ratio:3/4;object-fit:cover;border-radius:var(--r-md)
}
.journal-row {
  display:flex;gap:14px;align-items:center;justify-content:space-between;padding:14px 0;border-bottom:1px solid var(--line)
}
.journal-row:last-child {
  border:0
}
.journal-row p {
  font-size:.9rem
}
.journal-row small {
  color:var(--muted)
}

dialog {
  padding:0;border:0;background:var(--card);color:var(--ink);border-radius:var(--r-lg);width:min(600px,calc(100% - 36px));
  max-height:88dvh;
  box-shadow:0 30px 120px #0005;
  overflow:hidden
}
dialog::backdrop {
  background:var(--overlay);backdrop-filter:blur(5px)
}
dialog[open] {
  animation:sheet-in .22s ease-out
}
.sheet-head {
  padding:24px 24px 15px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px
}
.sheet-head h2 {
  font-size:1.85rem
}
.sheet-body {
  padding:6px 24px 26px;max-height:calc(88dvh - 95px);
  overflow:auto;
  overscroll-behavior:contain;
  display:grid;
  gap:20px
}
.sheet-body form {
  display:grid;
  gap:18px
}
label {
  display:grid;
  gap:7px;
  font-size:.85rem;
  font-weight:500
}
input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea {
  width:100%;padding:13px 14px;border:1px solid var(--line);border-radius:var(--r-md);background:var(--bg);color:var(--ink);
  font-size:1rem;
  min-height:48px
}
input[type=checkbox] {
  accent-color:var(--btn);
  width:20px;
  height:20px;
  margin:0
}
input[type=range] {
  width:100%;accent-color:var(--btn);
  min-height:35px
}
.check-label {
  display:flex;
  align-items:flex-start;
  gap:12px;
  font-weight:400;
  font-size:.9rem
}
.form-row {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}
.form-row.three {
  grid-template-columns:repeat(3,1fr)
}
.help {
  font-size:.8rem;color:var(--muted);
  font-weight:400
}
.hint {
  padding:14px 16px;border-radius:var(--r-md);background:var(--layer);font-size:.82rem;color:var(--muted)
}
.form-error {
  color:var(--error);
  font-size:.85rem
}
:root[data-theme=dark] .form-error {
  color:var(--error)
}
.ingredients {
  display:grid;
  gap:0
}
.ingredient {
  display:flex;align-items:center;gap:15px;justify-content:space-between;padding:11px 0;border-bottom:1px solid var(--line)
}
.ingredient span {
  font-size:.85rem
}
.ingredient small {
  display:block;color:var(--muted);
  font-size:.7rem
}
.ingredient input {
  max-width:105px
}
.recipe-detail-image {
  width:100%;max-height:280px;object-fit:cover;border-radius:var(--r-md)
}
.prose {
  line-height:1.65;
  font-size:.94rem
}
.prose p {
  margin:0 0 15px
}
.prose h2 {
  font-size:1.5rem;
  margin:24px 0 12px
}
.prose h3 {
  margin:20px 0 10px
}
.prose ul {
  padding-left:22px;
  margin:10px 0 18px
}
.prose li {
  margin:8px 0
}
.prose a {
  font-size:.82rem
}
.prose table {
  border-collapse:collapse;
  width:100%;
  font-size:.8rem
}
.prose td,.prose th {
  border:1px solid var(--line);
  padding:9px;
  text-align:left;
  vertical-align:top
}
.table-scroll {
  max-width:100%;
  overflow:auto
}
.prose code {
  background:var(--layer);border-radius:var(--r-sm);
  padding:2px 4px
}
.range-summary {
  background:var(--layer);padding:18px;border-radius:var(--r-md)
}
.form-footer {
  display:flex;
  gap:10px;
  flex-wrap:wrap
}
.form-footer .btn {
  flex:1
}
.shopping-row {
  display:grid;grid-template-columns:1fr auto;gap:10px;border-bottom:1px solid var(--line);
  padding:15px 0
}
.shopping-row .name {
  font-size:.93rem;
  font-weight:500
}
.shopping-row small {
  color:var(--muted)
}
#toast {
  position:fixed;bottom:30px;left:calc(50% + 109px);transform:translate(-50%,20px);background:var(--ink);color:var(--bg);border-radius:var(--r-md);padding:14px 22px;font-size:.9rem;box-shadow:0 10px 30px #0002;max-width:min(90vw,540px);
  z-index:100;
  opacity:0;
  pointer-events:none;
  transition:opacity .15s,transform .15s
}
#toast.show {
  opacity:1;transform:translate(-50%,0)
}
.onboarding-banner {
  padding:20px 24px;border:1px solid var(--line);border-radius:var(--r-lg);background:var(--card);
  display:flex;
  gap:18px;
  align-items:center;
  justify-content:space-between;
  margin-bottom:22px
}
.onboarding-banner p {
  font-size:.86rem;color:var(--muted);
  margin-top:4px
}
.danger-btn {
  color:var(--error)
}
details summary {
  cursor:pointer;
  padding:12px 0;
  font-size:.85rem;
  font-weight:500
}
.notice {
  padding:13px 20px;background:var(--surface-2);color:var(--text);border-radius:var(--r-md);
  font-size:.85rem;
  margin-bottom:20px
}
.sr-only {
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);
  border:0
}
@keyframes sheet-in {
  from {
  opacity:0;transform:translateY(15px)
}
to {
  opacity:1;transform:translateY(0)
}

}

@media(min-width:1600px) {
  .shell {
  margin:0 auto;
  padding-left:260px
}

}

@media(max-width:1200px) {
  .side {
  width:185px;
  padding:30px 14px
}
.shell {
  margin-left:185px;
  padding:28px 26px
}
.layout {
  grid-template-columns:minmax(0,1fr) 260px;
  gap:18px
}
.hero-copy {
  padding-left:22px
}
.hero-copy h2 {
  font-size:1.9rem
}
.hero-stats {
  padding:20px 22px
}
.recipe-grid {
  grid-template-columns:repeat(2,minmax(0,1fr))
}
#toast {
  left:calc(50% + 92px)
}

}

@media(max-width:1000px) {
  .layout {
  grid-template-columns:1fr
}
.aside {
  grid-template-columns:1fr 1fr
}
.aside .activity-card {
  grid-column:1/-1
}
.overview {
  grid-template-columns:repeat(4,minmax(0,1fr))
}
.hero-top {
  min-height:290px
}
.month-day {
  min-height:77px
}
.hero-copy h2 {
  font-size:2.15rem
}

}

@media(max-width:700px) {
  .side {
  display:none
}
.shell {
  margin:0;padding:20px 18px calc(100px + env(safe-area-inset-bottom));
  
}
.topbar {
  margin-bottom:26px;padding-top:env(safe-area-inset-top)
}
.topbar .mobile-logo {
  display:block
}
.topbar .status-label {
  display:none
}
.wordmark {
  font-size:1.8rem
}
.topbar .profile-dot {
  display:none
}
.page-head {
  margin-bottom:23px;
  align-items:flex-start
}
.page-head h1 {
  font-size:2.15rem
}
.page-head p {
  font-size:.82rem;
  margin-top:8px
}
.page-head .head-actions .btn {
  font-size:0;width:46px;height:46px;padding:0;border-radius:var(--r-pill)
}
.page-head .head-actions .btn svg {
  width:20px;
  height:20px
}
.layout {
  gap:22px
}
.content-main,.aside {
  gap:20px
}
.week {
  gap:6px
}
.day-chip {
  border-radius:var(--r-lg);
  min-height:76px;
  padding:10px 3px;
  gap:5px
}
.day-chip .num {
  font-size:1.07rem
}
.day-chip .dow {
  font-size:.7rem
}
.hero-top {
  min-height:275px;
  grid-template-columns:54% 46%
}
.hero-copy {
  padding:21px 0 22px 21px;
  gap:13px
}
.hero-copy h2 {
  font-size:1.85rem;
  max-width:230px
}
.hero-copy .pill {
  font-size:.65rem;
  padding:6px 10px
}
.hero-copy .muted {
  font-size:.72rem
}
.hero-actions {
  flex-direction:column;
  gap:5px;
  width:100%;
  align-items:flex-start
}
.hero-actions .btn {
  padding:10px 18px;min-height:44px;font-size:.85rem;border-radius:var(--r-md)
}
.hero-actions .text-btn {
  min-height:35px;
  font-size:.78rem
}
.hero-stats {
  padding:18px 21px;
  gap:14px
}
.stat-line {
  font-size:1.35rem
}
.stat-line small {
  font-size:.66rem
}
.stat-label {
  font-size:.67rem
}
.hero-stats .stat-block+.stat-block {
  padding-left:14px
}
.card {
  padding:21px;border-radius:var(--r-lg)
}
.section-head {
  margin-bottom:14px
}
.section-head h2 {
  font-size:1.48rem
}
.section-head .text-btn {
  font-size:.78rem
}
.meal-row {
  padding:13px 12px;gap:11px;grid-template-columns:48px 1fr auto;border-radius:var(--r-md)
}
.meal-art {
  width:48px;height:52px;border-radius:var(--r-md)
}
.meal-title {
  font-size:.86rem
}
.meal-row .muted {
  font-size:.68rem
}
.meal-end .icon-btn {
  display:none
}
.check-btn {
  width:42px;
  height:42px
}
.aside {
  grid-template-columns:1fr 1fr;
  gap:13px
}
.aside .card {
  padding:18px
}
.aside .section-head h3 {
  font-size:.9rem
}
.aside .mini-icon {
  width:35px;height:35px;border-radius:var(--r-md)
}
.aside .mini-icon svg {
  width:18px;
  height:18px
}
.water-number {
  font-size:2.35rem;
  margin-top:18px
}
.water-number small {
  font-size:.67rem
}
.water-actions {
  gap:4px;
  margin-top:15px
}
.water-actions button {
  font-size:.7rem;
  min-height:40px
}
.water-note {
  font-size:.69rem;
  margin-top:10px
}
.sleep-time {
  font-size:1.6rem;
  margin:21px 0 9px
}
.sleep-card p {
  font-size:.78rem
}
.sleep-card .text-btn {
  font-size:.7rem;
  justify-content:flex-start
}
.sleep-card .eyebrow {
  font-size:.6rem
}
.activity-card .row {
  flex-wrap:wrap
}
.bottom-nav {
  display:flex;justify-content:space-around;position:fixed;bottom:0;left:0;right:0;background:var(--card);border-top:1px solid var(--line);padding:9px 7px calc(8px + env(safe-area-inset-bottom));
  z-index:20
}
.bottom-nav button {
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:48px;min-width:55px;padding:3px 5px;color:var(--muted);
  font-size:.64rem
}
.bottom-nav button.active {
  color:var(--ink);
  font-weight:600
}
.bottom-nav button.active svg {
  background:var(--layer);box-sizing:content-box;padding:5px 18px;border-radius:var(--r-lg);
  margin-top:-5px;
  margin-bottom:-5px
}
.bottom-nav svg {
  width:21px;
  height:21px
}
#toast {
  bottom:calc(85px + env(safe-area-inset-bottom));
  left:50%;
  font-size:.82rem;
  min-width:220px
}
.overview {
  grid-template-columns:1fr 1fr
}
.metric {
  padding:16px
}
.month-grid {
  gap:5px
}
.month-day {
  min-height:66px;border-radius:var(--r-md);
  padding:8px 4px;
  align-items:center;
  gap:4px
}
.month-day strong {
  font-size:.94rem
}
.month-day small {
  font-size:.59rem
}
.recipe-grid {
  gap:12px
}
.recipe-image {
  height:135px
}
.recipe-body {
  padding:14px;
  gap:9px
}
.recipe-body h3 {
  font-size:.87rem
}
.recipe-meta {
  font-size:.68rem;
  gap:4px
}
.recipe-placeholder {
  height:107px;
  padding:18px
}
.recipe-placeholder strong {
  font-size:1.4rem
}
.filters {
  gap:6px
}
.filter {
  font-size:.76rem;
  padding:9px 12px;
  min-height:40px
}
.toolbar {
  gap:10px
}
.toolbar .btn {
  font-size:.8rem
}
.guide-grid {
  grid-template-columns:1fr
}
.guide-tile {
  min-height:85px
}
.onboarding-banner {
  padding:17px;
  gap:12px;
  align-items:flex-start
}
.onboarding-banner strong {
  font-size:.87rem
}
.onboarding-banner p {
  font-size:.75rem
}
.onboarding-banner .btn {
  padding:10px 13px;
  font-size:.75rem;
  min-height:42px
}
.month-controls h2 {
  font-size:1.5rem
}
dialog {
  width:100%;max-width:100%;margin:auto 0 0;border-radius:var(--r-lg) var(--r-lg) 0 0;
  max-height:92dvh
}
.sheet-head {
  padding:24px 21px 13px
}
.sheet-body {
  padding:5px 21px calc(26px + env(safe-area-inset-bottom));max-height:calc(92dvh - 90px)
}
.sheet-head h2 {
  font-size:1.7rem
}
.form-row.three {
  grid-template-columns:1fr 1fr
}
.prose {
  font-size:.9rem
}
.form-footer {
  position:sticky;bottom:-10px;background:var(--card);
  padding:10px 0 0
}
.photo-note {
  font-size:8px;
  right:6px;
  bottom:6px
}
.photo-grid {
  gap:10px
}

}

@media(max-width:360px) {
  .shell {
  padding-left:12px;
  padding-right:12px
}
.hero-copy {
  padding-left:17px
}
.hero-copy h2 {
  font-size:1.6rem
}
.hero-stats {
  padding:17px
}
.aside {
  grid-template-columns:1fr
}
.aside .activity-card {
  grid-column:auto
}
.recipe-grid {
  grid-template-columns:1fr
}
.recipe-image {
  height:190px
}
.day-chip {
  min-height:73px
}
.page-head h1 {
  font-size:2rem
}
.bottom-nav button {
  min-width:48px;
  font-size:.6rem
}
.bottom-nav button.active svg {
  padding:5px 13px
}
.form-row.three {
  grid-template-columns:1fr
}
.stat-line {
  font-size:1.2rem
}

}

@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
  animation:none!important;
  transition:none!important;
  scroll-behavior:auto!important
}
button:active:not(:disabled) {
  transform:none
}

}

@media print {
  .side,.bottom-nav,.topbar,.head-actions,button {
  display:none!important
}
.shell {
  margin:0;
  padding:0
}
.card {
  box-shadow:none;
  border:1px solid #ddd
}
.layout {
  display:block
}
body {
  background:white;
  color:black
}

}


/* C8 integration: forms, readable captions and explicit update controls. */
.local-preview-note {
  position:relative;z-index:30;padding:8px 18px;text-align:center;background:var(--layer);color:var(--muted);
  font-size:.75rem;
  line-height:1.4
}

.skip {
  position:fixed;top:8px;left:8px;z-index:150;transform:translateY(-200%)
}
.skip:focus {
  transform:translateY(0)
}

.ingredient-list {
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:8px
}

.meal-art {
  overflow:hidden;
  padding:0
}
.meal-art img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover
}
.meal-art .no-photo {
  display:grid;
  place-items:center;
  width:100%;
  height:100%
}

.meal-title {
  min-width:0;
  overflow-wrap:break-word
}
.meal-title small,.meal-title b,.meal-title span {
  display:block
}
.meal-title small {
  font-size:.75rem;color:var(--muted);
  font-weight:400;
  margin-bottom:5px
}
.meal-title b {
  font-weight:600;
  line-height:1.4
}
.meal-title span {
  font-size:.75rem;color:var(--muted);
  font-weight:400;
  margin-top:5px
}

.brand {
  display:flex;align-items:center;gap:13px;text-decoration:none;color:var(--ink);
  font:600 1.6rem/1 Golos,Arial,sans-serif
}
.brand img {
  flex-shrink:0
}
.side-bottom {
  display:flex;
  align-items:center;
  gap:12px
}
.side-bottom>div {
  min-width:0
}
.side-bottom b,.side-bottom small {
  display:block;
  overflow-wrap:anywhere
}
.side-bottom small {
  font-size:.75rem;color:var(--muted);
  margin-top:4px
}

.meal-row {
  grid-template-columns:52px minmax(0,1fr) 44px
}
.recipe-image {
  overflow:hidden
}
.recipe-image img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover
}

.recipe-image {
  position:relative
}
.recipe-image .no-photo {
  display:grid;place-items:center;width:100%;height:100%;color:var(--muted)
}
.list-button .grow {
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0
}
.list-button .grow small {
  color:var(--muted);
  font-size:.8rem
}

.search {
  position:relative;
  display:block;
  flex:1;
  min-width:0
}
.search>svg {
  position:absolute;left:16px;top:50%;transform:translateY(-50%);
  pointer-events:none
}
.search input {
  width:100%;
  padding-left:48px
}

.ingredient-list li {
  display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:9px 0;border-bottom:1px solid var(--line)
}

.ingredient-list li>:first-child {
  min-width:0;
  overflow-wrap:anywhere
}
.ingredient-list li>:last-child {
  flex-shrink:0
}

.private-photo {
  display:block;width:auto;max-width:100%;max-height:65vh;object-fit:contain;margin:0 auto;border-radius:var(--r-md)
}

.compare-grid {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px
}
.compare-grid img {
  width:100%;max-height:65vh;object-fit:contain;border-radius:var(--r-md)
}

.compare-grid figure {
  margin:0;
  min-width:0
}
.compare-grid figcaption {
  margin-top:8px;color:var(--muted);
  font-size:.875rem
}

.recipe-body h2 {
  font-family:Golos,Arial,sans-serif;
  font-size:1rem;
  line-height:1.35;
  margin:0;
  font-weight:600
}
.recipe-body h2 button {
  text-align:left;
  font:inherit;
  color:inherit;
  padding:0;
  min-height:44px
}

.pwa-update {
  position:fixed;z-index:100;bottom:calc(90px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(620px,calc(100% - 28px));padding:16px;background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:var(--r-lg);
  box-shadow:0 10px 40px #0003;
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  font-size:.875rem
}
.pwa-update[hidden] {
  display:none
}
.pwa-update span {
  flex:1 1 240px
}

.help,.muted,.chart-caption,.water-note {
  overflow-wrap:break-word
}
.form-error {
  color:var(--error);
  font-size:.9rem;
  white-space:pre-line
}
:root[data-theme=dark] .form-error {
  color:var(--error)
}

.photo-note {
  font-size:.75rem;line-height:1.25;max-width:calc(100% - 12px);color:var(--text);background:var(--surface-1)
}

input,select,textarea {
  max-width:100%;
  min-width:0
}
.form-row>* {
  min-width:0
}
.row.wrap {
  row-gap:10px
}
.table-scroll {
  max-width:100%;
  overflow:auto
}

@media(max-width:700px) {
  
 .bottom-nav button {
  font-size:.75rem;
  min-width:0;
  flex:1
}
.bottom-nav {
  gap:2px
}

 .day-chip .dow,.stat-label,.meal-row .muted,.water-note,.sleep-card .eyebrow,.month-day small,.recipe-meta {
  font-size:.75rem
}

 .photo-note {
  font-size:.75rem
}
.water-actions button,.filter,.check-btn {
  min-height:44px
}
.check-btn {
  min-width:44px
}

 .hero-copy {
  min-width:0
}
.hero-copy h2 {
  overflow-wrap:break-word
}
.hero-actions .text-btn {
  min-height:44px
}

 .onboarding-banner {
  flex-wrap:wrap
}
.onboarding-banner .btn {
  min-height:44px
}

 .form-row.three {
  grid-template-columns:repeat(2,minmax(0,1fr))
}
.month-controls {
  flex-wrap:wrap
}


}

:root[data-large-text=true] .hero-top {
  grid-template-columns:1fr
}
:root[data-large-text=true] .hero-photo {
  max-height:260px
}

:root[data-large-text=true] .recipe-grid {
  grid-template-columns:1fr
}
:root[data-large-text=true] .aside {
  grid-template-columns:1fr
}

:root[data-large-text=true] .hero-stats {
  grid-template-columns:1fr
}
:root[data-large-text=true] .hero-stats .stat-block+.stat-block {
  border-left:0;
  padding-left:0;
  padding-top:12px
}

:root[data-large-text=true] .form-row {
  grid-template-columns:1fr
}
:root[data-large-text=true] .overview {
  grid-template-columns:1fr
}

:root[data-large-text=true] .day-chip {
  border-radius:var(--r-md);
  min-width:0
}
:root[data-large-text=true] .week {
  gap:3px
}

@media(max-width:380px) {
  .form-row.three {
  grid-template-columns:1fr
}
.bottom-nav button {
  font-size:.75rem;
  padding-left:1px;
  padding-right:1px
}
.bottom-nav button.active svg {
  padding-left:10px;
  padding-right:10px
}

}

@media(max-width:500px) {
  .aside {
  grid-template-columns:1fr
}
.meal-row {
  grid-template-columns:44px minmax(0,1fr) 44px;
  padding:12px 0;
  gap:10px
}
.meal-art {
  width:44px;
  height:50px
}
.hero-photo {
  min-width:0
}
.bottom-nav button {
  flex:1 1 0;
  width:0
}
.bottom-nav span {
  max-width:100%
}

}

@media(max-width:700px) {
  .bottom-nav button {
  font-size:clamp(12px,3.2vw,14px)
}
.bottom-nav span {
  white-space:nowrap
}
.recipe-image {
  height:160px
}

}

