/* HealthTrac AI: warm paper, forest ink, mint, lavender and peach; outlined shapes, pill buttons, tight heavy headings.
   Bricolage Grotesque (headings) and DM Sans (text) are bundled in /fonts (SIL Open Font License); nothing loads from a CDN. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("../fonts/dm-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* the palette: these five never change between themes, so a pastel panel looks the same in light and dark */
  --ink: #0f2a21;
  --ink-soft: #2c493c;
  --mint: #b5dec0;
  --lav: #d6ccff;
  --peach: #ffd1b7;
  --sky: #bfe6f5;
  --paper: #f7f6f1;
  --forest: #13664a;
  /* themeable roles */
  --bg: #f7f6f1;
  --surface: #ffffff;
  --surface-2: #efede5;
  --text: #0f2a21;
  --muted: #485d53;
  --border: #dcdacf;
  --line: #1e3b30;
  --track: #e4e2d7;
  --primary: #13664a;
  --primary-hover: #0e5139;
  --on-primary: #ffffff;
  --btn-bg: #b5dec0;
  --btn-bg-hover: #a2d3b1;
  --btn-fg: #0f2a21;
  --pop: #0f2a21;
  --inverse-bg: #0f2a21;
  --inverse-fg: #f7f6f1;
  --panel-dark: #0f2a21;
  --panel-green: #13664a;
  --focus: #0b57d0;
  --danger: #b42318;
  --danger-bg: #fdebe6;
  --warn-text: #6b3200;
  --warn-bg: #ffe9da;
  --info-bg: #e2f1e6;
  --shadow: 0 0 #0000;
  --c-calories: #13664a;
  --c-protein: #2a62b0;
  --c-carbs: #a8600a;
  --c-fat: #99449a;
  --c-water: #14759b;
  --c-activity: #2f8a2c;
  --c-routine: #6556b3;
  --c-weight: #13664a;
  --radius: 20px;
  --nav-h: 68px;
  --gutter: 16px;
  --font-display: "Bricolage Grotesque", "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1a14;
    --surface: #12271e;
    --surface-2: #1a3328;
    --text: #eef3ec;
    --muted: #a9bcb1;
    --border: #274136;
    --line: #6a9684;
    --track: #25392f;
    --primary: #63d0a1;
    --primary-hover: #86dfb8;
    --on-primary: #062218;
    --btn-bg: #b5dec0;
    --btn-bg-hover: #c6e8d0;
    --btn-fg: #0f2a21;
    --pop: #03100a;
    --inverse-bg: #eef3ec;
    --inverse-fg: #0b1a14;
    --panel-dark: #143226;
    --panel-green: #13664a;
    --focus: #8ab4f8;
    --danger: #ff9187;
    --danger-bg: #3a1b18;
    --warn-text: #ffd9bd;
    --warn-bg: #3a2517;
    --info-bg: #17352a;
    --c-calories: #63d0a1;
    --c-protein: #7ab0ff;
    --c-carbs: #f0b441;
    --c-fat: #de92e2;
    --c-water: #5cc3ea;
    --c-activity: #86d577;
    --c-routine: #aea3f4;
    --c-weight: #63d0a1;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1a14;
  --surface: #12271e;
  --surface-2: #1a3328;
  --text: #eef3ec;
  --muted: #a9bcb1;
  --border: #274136;
  --line: #6a9684;
  --track: #25392f;
  --primary: #63d0a1;
  --primary-hover: #86dfb8;
  --on-primary: #062218;
  --btn-bg: #b5dec0;
  --btn-bg-hover: #c6e8d0;
  --btn-fg: #0f2a21;
  --pop: #03100a;
  --inverse-bg: #eef3ec;
  --inverse-fg: #0b1a14;
  --panel-dark: #143226;
  --panel-green: #13664a;
  --focus: #8ab4f8;
  --danger: #ff9187;
  --danger-bg: #3a1b18;
  --warn-text: #ffd9bd;
  --warn-bg: #3a2517;
  --info-bg: #17352a;
  --c-calories: #63d0a1;
  --c-protein: #7ab0ff;
  --c-carbs: #f0b441;
  --c-fat: #de92e2;
  --c-water: #5cc3ea;
  --c-activity: #86d577;
  --c-routine: #aea3f4;
  --c-weight: #63d0a1;
  color-scheme: dark;
}

/* Pro themes (extraThemes). Tokens only; the same components and the same contrast rules as the built-in themes. */
:root[data-theme="ocean"] {
  --bg: #eef6fa; --surface: #ffffff; --surface-2: #e1eef5; --text: #0e2230; --muted: #425d6e; --border: #cadbe5; --line: #1b4156; --track: #d7e6ee;
  --primary: #12668f; --primary-hover: #0d5275; --on-primary: #ffffff; --focus: #0b57d0;
  --btn-bg: #bfe6f5; --btn-bg-hover: #a8dbee; --btn-fg: #0e2230; --pop: #0e2230; --inverse-bg: #0e2230; --inverse-fg: #eef6fa;
  --panel-dark: #0e2230; --panel-green: #12668f;
  --danger: #b42318; --danger-bg: #fdecea; --warn-text: #6b3200; --warn-bg: #ffe9da; --info-bg: #dcecf4;
  --c-calories: #12668f; --c-protein: #6b4bb5; --c-carbs: #9c5a0b; --c-fat: #b03a76; --c-water: #0d7080; --c-activity: #2a7535; --c-routine: #4f5bb0; --c-weight: #12668f;
  color-scheme: light;
}
:root[data-theme="midnight"] {
  --bg: #0b1220; --surface: #131c2e; --surface-2: #1a2540; --text: #e6edf7; --muted: #a3b1c6; --border: #26344f; --line: #6b82ad; --track: #26324f;
  --primary: #6aa7ff; --primary-hover: #8dbbff; --on-primary: #07142b; --focus: #ffd166;
  --btn-bg: #9fc3ff; --btn-bg-hover: #b8d3ff; --btn-fg: #07142b; --pop: #040a16; --inverse-bg: #e6edf7; --inverse-fg: #0b1220;
  --panel-dark: #16223b; --panel-green: #1f4f9a;
  --danger: #ff9187; --danger-bg: #3a1b18; --warn-text: #ffd9bd; --warn-bg: #3a2517; --info-bg: #14284a;
  --c-calories: #6aa7ff; --c-protein: #b49cff; --c-carbs: #f0b441; --c-fat: #f08ac6; --c-water: #5cc3ea; --c-activity: #86d577; --c-routine: #aea3f4; --c-weight: #6aa7ff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font-body);
  overflow-wrap: anywhere;
}
h1, h2, h3, p, ul, ol, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--font-display); }
h1 { font-size: 1.875rem; line-height: 1.08; font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: 1.25rem; line-height: 1.2; font-weight: 750; letter-spacing: -0.025em; }
h3 { font-size: 1.0625rem; line-height: 1.25; font-weight: 750; letter-spacing: -0.02em; }
a { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--inverse-bg); color: var(--inverse-fg); padding: 10px 16px; border-radius: 999px; font-weight: 700; }
.skip-link:focus { top: 8px; }
.boot-message { padding: 24px; color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.app { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(8px + env(safe-area-inset-top)) var(--gutter) 8px; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
a.brand { color: inherit; text-decoration: none; }
a.brand:hover .brand-name { text-decoration: underline; }
.nav-link.nav-home { display: none; } /* desktop sidebar only: on a phone the bottom bar keeps its five places */
.brand-mark { border-radius: 9px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.04em; font-size: 1.0625rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-end { display: flex; align-items: center; gap: 8px; flex: none; }
.save-status { display: inline-flex; align-items: center; gap: 4px; font-size: 0.8125rem; color: var(--muted); }
.save-status.is-bad { color: var(--danger); font-weight: 600; }
.banners { padding: 0 var(--gutter); display: grid; gap: 8px; }
.banners:not(:empty) { padding-top: 12px; }
.banner { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding: 12px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--info-bg); align-items: start; }
.banner-warn { background: var(--warn-bg); color: var(--warn-text); }
.banner-error { background: var(--danger-bg); color: var(--danger); }
.banner-actions { grid-column: 2; display: flex; gap: 8px; flex-wrap: wrap; }
.banner .btn-secondary { color: var(--text); }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); gap: 2px;
}
.nav-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 6px 0; min-width: 0;
  text-decoration: none; color: var(--muted); font-size: 0.71875rem; font-weight: 700; letter-spacing: -0.01em; border-radius: 18px;
}
.nav-link[aria-current="page"] { color: var(--ink); background: var(--mint); box-shadow: inset 0 0 0 1px var(--ink); }
.nav-long { display: none; }
.main { padding: 16px var(--gutter) calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); min-width: 0; width: 100%; max-width: 1040px; margin: 0 auto; display: grid; gap: 16px; align-content: start; }
.main:focus { outline: none; }

@media (min-width: 900px) {
  .app { grid-template-columns: 236px minmax(0, 1fr); grid-template-rows: auto auto 1fr; }
  .topbar { grid-column: 1 / -1; padding-left: 24px; padding-right: 24px; }
  .banners { grid-column: 2; padding: 0 28px; }
  .nav { position: sticky; top: 64px; bottom: auto; grid-column: 1; grid-row: 2 / span 2; align-self: start; display: flex; flex-direction: column; gap: 4px; padding: 20px 12px; border: 0; background: transparent; height: calc(100dvh - 64px); }
  .nav-link { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; font-size: 0.9375rem; min-height: 48px; }
  .nav-link:hover { background: var(--surface-2); }
  .nav-link.nav-home { display: flex; margin-top: auto; border: 1px solid var(--border); }
  .nav-link[aria-current="page"]:hover { background: var(--mint); }
  .nav-short { display: none; }
  .nav-long { display: inline; }
  .main { grid-column: 2; padding: 24px 28px 48px; }
}

/* ---------- page + cards ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.page-sub { color: var(--muted); font-size: 0.9375rem; flex-basis: 100%; }
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .card-wide { grid-column: 1 / -1; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: grid; gap: 12px; align-content: start; min-width: 0; }
@media (min-width: 700px) { .card { padding: 22px; } }
.card-quiet { box-shadow: none; background: transparent; border-color: var(--border); }
.card-danger { border-color: var(--danger); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card-title { font-size: 1.1875rem; }
.card-sub { color: var(--muted); font-size: 0.875rem; }
.card-meta { color: var(--muted); font-weight: 600; font-size: 0.9375rem; }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { flex-wrap: wrap; }
.row-between { justify-content: space-between; }
.row-end { justify-content: flex-end; }
.row-center { justify-content: center; }
.row-end-align { align-items: flex-end; }
.tab-body { display: grid; gap: 16px; }
.is-over { color: var(--danger); }
.bullets { display: grid; gap: 8px; padding-left: 20px; list-style: disc; }
.plain-list { display: grid; gap: 4px; color: var(--muted); font-size: 0.9375rem; }
.prose { display: grid; gap: 10px; font-size: 0.9375rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 20px; border-radius: 999px;
  border: 1.5px solid var(--line); font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.2; text-align: center;
  transition: background-color 0.15s, border-color 0.15s, translate 0.12s, box-shadow 0.12s; -webkit-tap-highlight-color: transparent;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
/* the main action: a mint pill with an ink outline and a hard offset shadow that presses in */
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--ink); box-shadow: 3px 3px 0 var(--pop); }
.btn-primary:hover:not(:disabled) { background: var(--btn-bg-hover); translate: 1px 1px; box-shadow: 2px 2px 0 var(--pop); }
.btn-primary:active:not(:disabled) { translate: 3px 3px; box-shadow: 0 0 0 var(--pop); }
.btn-primary:disabled { box-shadow: none; }
.btn-secondary { background: var(--surface); color: var(--text); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-ink { background: var(--inverse-bg); color: var(--inverse-fg); border-color: var(--inverse-bg); }
.btn-ink:hover:not(:disabled) { opacity: 0.88; }
.btn-ghost { background: transparent; color: var(--primary); border-color: transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--info-bg); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
:root[data-theme="dark"] .btn-danger, :root[data-theme="midnight"] .btn-danger { color: #2a0a07; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-theme="ocean"]) .btn-danger { color: #2a0a07; } } /* Ocean is a light theme even on a dark device */
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger-ghost:hover:not(:disabled) { background: var(--danger-bg); }
.btn-sm { min-height: 40px; padding: 6px 16px; font-size: 0.9375rem; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 1px solid transparent; background: transparent;
  color: var(--muted); cursor: pointer; flex: none; -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.icon-btn-outline { border-color: var(--line); background: var(--surface); }
.icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.icon { flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; }
.chip:hover { background: var(--surface-2); }
.chip-add { color: var(--c-water); }
.mic-btn.is-listening { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick .btn { flex: 1 1 auto; }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .field-wide, .form-grid .field-check { grid-column: 1 / -1; } }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field > label, .fieldset legend { font-weight: 700; font-size: 0.9375rem; }
.optional { color: var(--muted); font-weight: 400; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea, .row-select, .row-search, .row-qty, .row-unit, .search-input, dialog select, dialog textarea, .preview-row input, .date-input {
  width: 100%; min-height: 46px; padding: 8px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--text);
}
textarea { resize: vertical; min-height: 88px; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap input { padding-right: 56px !important; }
.unit { position: absolute; right: 12px; color: var(--muted); font-size: 0.875rem; pointer-events: none; }
.field-hint { color: var(--muted); font-size: 0.875rem; }
.field-error { color: var(--danger); font-size: 0.875rem; font-weight: 600; }
.field-error::before { content: "⚠ "; }
.form-error { color: var(--danger); font-weight: 600; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center; }
.field-check .check-label, .check-label { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--primary); }
.fieldset { border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; display: grid; gap: 10px; min-width: 0; }
.radio { display: flex; gap: 10px; align-items: flex-start; }
.radio label { font-weight: 400; }
.estimate-row { display: grid; gap: 8px; justify-items: start; grid-column: 1 / -1; }
.live-macros { color: var(--muted); font-size: 0.875rem; display: grid; gap: 2px; }
input[type="file"] { padding: 8px !important; }

/* ---------- small components ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.badge-accent { background: var(--mint); color: var(--ink); border-color: var(--ink); }
.badge-warn { background: var(--peach); color: var(--ink); border-color: var(--ink); }
.badge-estimate { background: transparent; border-style: dashed; color: var(--muted); }
.empty { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 18px 10px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); }
.empty-title { color: var(--text); font-weight: 650; }
.empty-text { font-size: 0.9375rem; max-width: 46ch; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--info-bg); font-size: 0.9375rem; }
.notice > .icon { margin-top: 2px; }
.notice-warn { background: var(--warn-bg); color: var(--warn-text); }
.notice-error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.notice .btn { margin-left: 4px; }
.date-nav { display: grid; gap: 8px; }
.date-nav-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.date-input { width: auto !important; flex: 1 1 120px; max-width: 220px; }
.date-label { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-weight: 650; }

.progress { height: 12px; border-radius: 999px; background: var(--track); overflow: hidden; --tone: var(--primary); box-shadow: inset 0 0 0 1px var(--border); }
.progress-fill { height: 100%; width: var(--pct, 0%); background: var(--tone); border-radius: inherit; transition: width 0.3s ease; }
.progress-calories { --tone: var(--c-calories); }
.progress-protein { --tone: var(--c-protein); }
.progress-carbs { --tone: var(--c-carbs); }
.progress-fat { --tone: var(--c-fat); }
.progress-water { --tone: var(--c-water); }
.progress.is-over .progress-fill { background: repeating-linear-gradient(135deg, var(--danger) 0 6px, color-mix(in srgb, var(--danger) 55%, var(--surface)) 6px 12px); }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 44px; padding: 8px 14px; background: transparent; border: 0; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 700; cursor: pointer; border-radius: 12px 12px 0 0; }
.tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.tab:hover { color: var(--text); }
.segmented { display: inline-flex; background: var(--surface-2); border-radius: 22px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg { min-height: 40px; padding: 6px 16px; border: 1px solid transparent; background: transparent; border-radius: 999px; font-weight: 700; color: var(--muted); cursor: pointer; }
.seg.is-active { background: var(--surface); color: var(--text); border-color: var(--line); box-shadow: var(--shadow); }
.seg.is-active::before { content: "✓ "; color: var(--primary); }

.rating-block { display: grid; gap: 8px; }
.rating-label { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.rating-value { color: var(--muted); font-weight: 500; margin-left: auto; }
.rating { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.rate { min-height: 44px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; }
.rate.is-active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; }
.stat-label { color: var(--muted); font-size: 0.8125rem; }
.stat-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.stat-sub { color: var(--muted); font-size: 0.8125rem; }
.big-number { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.big-value { font-family: var(--font-display); font-size: 2.5rem; line-height: 1.05; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.big-unit { color: var(--muted); font-weight: 600; }
.status-line { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.status-line.is-ok { color: var(--primary); }
.status-line.is-over { color: var(--danger); }
.macro-row { display: grid; gap: 6px; }
.macro-head { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.macro-name { display: inline-flex; align-items: center; gap: 8px; }
.macro-val { font-variant-numeric: tabular-nums; color: var(--muted); }
.swatch { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.swatch-protein { background: var(--c-protein); } .swatch-carbs { background: var(--c-carbs); } .swatch-fat { background: var(--c-fat); }

/* ---------- lists ---------- */
.entry-list { display: grid; gap: 4px; }
.entry { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); }
.entry-list > .entry:first-child { border-top: 0; }
.entry-main { min-width: 0; display: grid; gap: 2px; }
.entry-name { font-weight: 650; }
.entry-sub { color: var(--muted); font-size: 0.875rem; }
.entry-badges { margin-top: 2px; }
.entry-side { display: grid; justify-items: end; gap: 2px; flex: none; }
.entry-kcal { white-space: nowrap; }
.entry-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.meal-empty { color: var(--muted); font-size: 0.9375rem; }
.summary-line { display: grid; gap: 4px; }
.summary-macros { color: var(--muted); }
.check-list { display: grid; gap: 2px; }
.check-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.check-btn { flex: 1; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 4px; background: transparent; border: 0; text-align: left; cursor: pointer; border-radius: 10px; }
.check-box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--muted); display: grid; place-items: center; flex: none; color: var(--on-primary); }
.check-row.is-done .check-box { background: var(--primary); border-color: var(--primary); }
.check-row.is-done .check-name { text-decoration: line-through; color: var(--muted); }
.check-text { display: grid; }
.check-name { font-weight: 650; }
.check-sub { color: var(--muted); font-size: 0.8125rem; }

.steps { display: grid; gap: 12px; }
.calc-steps { display: grid; gap: 12px; }
.apply-box { display: grid; gap: 10px; padding: 14px; background: var(--surface-2); border-radius: 16px; }
.table-wrap { overflow-x: auto; max-width: 100%; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table th, .table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.table thead th { color: var(--muted); font-weight: 650; font-size: 0.8125rem; }
.total-row th, .total-row td { font-weight: 700; border-bottom: 0; }
.data-details { font-size: 0.9375rem; }
.data-details summary { cursor: pointer; font-weight: 600; color: var(--primary); min-height: 32px; padding: 4px 0; }
.backup-option { display: grid; gap: 4px; justify-items: start; }
.import-preview { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }

/* ---------- charts ---------- */
.chart { width: 100%; max-width: 680px; height: auto; display: block; }
.chart .axis { stroke: var(--muted); stroke-width: 1; }
.chart .gridline { stroke: var(--border); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 19px; }
.chart .bar { fill: var(--series, var(--primary)); }
.chart .bar.over { stroke: var(--danger); stroke-width: 2; }
.chart .hatch-bg { fill: var(--series, var(--primary)); }
.chart .hatch-line { stroke: var(--surface); stroke-width: 2.5; }
.chart .nodata { stroke: var(--muted); stroke-width: 2.5; stroke-dasharray: 3 3; fill: none; stroke-linecap: round; }
.chart .target-line { stroke: var(--text); stroke-width: 2; stroke-dasharray: 7 5; fill: none; opacity: 0.8; }
.chart .line { fill: none; stroke: var(--series, var(--primary)); stroke-width: 3; stroke-linejoin: round; }
.chart .dot { fill: var(--surface); stroke: var(--series, var(--primary)); stroke-width: 3; }
.tone-primary { --series: var(--primary); } .tone-calories { --series: var(--c-calories); } .tone-protein { --series: var(--c-protein); }
.tone-carbs { --series: var(--c-carbs); } .tone-fat { --series: var(--c-fat); } .tone-water { --series: var(--c-water); }
.tone-activity { --series: var(--c-activity); } .tone-routine { --series: var(--c-routine); } .tone-weight { --series: var(--c-weight); }
.chart-summary { font-size: 0.9375rem; }

/* ---------- dialogs, toasts ---------- */
dialog.sheet {
  border: 1.5px solid var(--line); border-radius: 26px; padding: 0; background: var(--surface); color: var(--text); width: min(560px, calc(100% - 24px));
  max-height: min(92dvh, 900px); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); overflow: hidden;
}
dialog.sheet-wide { width: min(720px, calc(100% - 24px)); }
dialog.sheet[open] { display: flex; flex-direction: column; }
dialog.sheet::backdrop { background: rgba(8, 16, 12, 0.55); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 12px 22px; border-bottom: 1px solid var(--border); }
.sheet-title { font-size: 1.25rem; }
.sheet-body { padding: 16px 20px 20px; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 14px; align-content: start; }
@media (max-width: 600px) {
  dialog.sheet, dialog.sheet-wide { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 26px 26px 0 0; max-height: 94dvh; }
  .sheet-body { padding: 14px 16px calc(20px + env(safe-area-inset-bottom)); }
}
.toasts { position: fixed; z-index: 200; left: 0; right: 0; bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom)); display: grid; gap: 8px; justify-items: center; padding: 0 12px; pointer-events: none; }
@media (min-width: 900px) { .toasts { bottom: 20px; } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 560px; width: 100%; padding: 10px 8px 10px 18px; background: var(--inverse-bg); color: var(--inverse-fg); border-radius: 999px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3); }
.toast-error { background: var(--danger); color: #fff; }
:root[data-theme="dark"] .toast-error, :root[data-theme="midnight"] .toast-error { color: #2a0a07; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-theme="ocean"]) .toast-error { color: #2a0a07; } }
.toast-text { flex: 1; font-size: 0.9375rem; }
.toast .btn-ghost { color: inherit; text-decoration: underline; }
.toast .icon-btn { color: inherit; width: 36px; height: 36px; }
dialog ~ .toasts { z-index: 1000; }

/* food dialog + previews */
.dialog-date { color: var(--muted); font-weight: 600; }
.panel { display: grid; gap: 14px; min-width: 0; }
.detail { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2); }
.detail-title { font-size: 1.1875rem; }
.result-list { display: grid; gap: 6px; max-height: 340px; overflow-y: auto; }
.result { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; padding: 10px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); cursor: pointer; min-height: 52px; }
button.result:hover { background: var(--surface-2); }
.result.recent { cursor: default; }
.result-main { display: grid; gap: 2px; min-width: 0; }
.result-name { font-weight: 650; }
.result-sub { color: var(--muted); font-size: 0.8125rem; }
.result-heading { color: var(--muted); font-weight: 700; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.04em; }
.result-empty { color: var(--muted); padding: 8px 2px; }
.preview-list { display: grid; gap: 12px; }
.preview-row, .preview-group { padding: 12px; border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 10px; background: var(--surface); }
.preview-row .preview-row { border: 0; padding: 0; }
.preview-row-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.preview-raw { font-weight: 650; }
.row-db { display: grid; gap: 8px; }
.row-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.row-line:first-child { grid-template-columns: minmax(0, 1fr); }
.row-readout { font-size: 0.9375rem; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.row-readout.is-problem { color: var(--danger); font-weight: 600; }
.row-note { color: var(--muted); font-size: 0.8125rem; }
.row-note:empty { display: none; }
.voice { display: grid; gap: 8px; }
.voice-status { color: var(--muted); font-size: 0.9375rem; flex: 1 1 200px; }
.voice-denied, .voice-error { color: var(--danger); font-weight: 600; }
.voice-listening { color: var(--primary); font-weight: 600; }
.voice-note { font-size: 0.875rem; color: var(--muted); }
.voice-note summary { cursor: pointer; }

/* photos */
.photo-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.photo-item { display: grid; gap: 6px; align-content: start; }
.photo-btn { padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface-2); cursor: pointer; aspect-ratio: 3 / 4; }
.photo-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-meta { display: grid; }
.photo-full { width: 100%; max-height: 70dvh; object-fit: contain; border-radius: 10px; background: var(--surface-2); }
.compare { display: grid; gap: 8px; }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare-fig img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.compare-fig figcaption { font-size: 0.875rem; padding-top: 4px; display: grid; }
.fig-note { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print { .nav, .topbar, .toasts { display: none; } }
@media (max-width: 520px) { .save-extra { display: none; } }
.result .btn { white-space: nowrap; flex: none; }
@media (max-width: 520px) { .tab { padding: 8px 9px; font-size: 0.9375rem; } dialog .tabs { gap: 0; } }

/* ---------- app lock ---------- */
.lock { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 20px; background: var(--bg); overflow-y: auto; }
.lock-card { width: min(380px, 100%); display: grid; gap: 18px; justify-items: center; text-align: center; background: var(--surface); border: 1.5px solid var(--line); border-radius: 28px; padding: 30px 24px; box-shadow: 6px 6px 0 var(--pop); }
.lock-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--mint); color: var(--ink); border: 1px solid var(--ink); }
.lock-form { display: grid; gap: 14px; width: 100%; text-align: left; }
.lock-input { text-align: center; letter-spacing: 0.4em; font-size: 1.5rem; }
.lock-card .voice-note { text-align: left; }
body.is-locked { overflow: hidden; }

/* ---------- repeat meals, completeness, trends ---------- */
.day-status { display: grid; gap: 6px; justify-items: start; }
.copy-list { display: grid; gap: 4px; }
.copy-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--border); }
.copy-list > .copy-item:first-child { border-top: 0; }
.copy-text { display: grid; gap: 2px; }
.chart .bar.partial { fill-opacity: 0.4; stroke: var(--series, var(--primary)); stroke-width: 2; stroke-dasharray: 5 3; }
.chart .line-faint { stroke-opacity: 0.4; stroke-width: 2; }
.chart .trend { fill: none; stroke: var(--series, var(--primary)); stroke-width: 5; stroke-linejoin: round; stroke-linecap: round; }
.progress-weight { --tone: var(--c-weight); }
.snap-list { display: grid; gap: 8px; }
.snap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.snap-main { display: grid; gap: 2px; min-width: 0; }
.stat-value-sm { font-size: 1rem; line-height: 1.3; }
.brand-version { font-size: 0.6875rem; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; white-space: nowrap; flex: none; }

/* ---------- public pages (privacy, terms, support) ---------- */
.doc-top { padding: calc(12px + env(safe-area-inset-top)) var(--gutter) 12px; border-bottom: 1px solid var(--border); background: var(--bg); }
.doc-back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: none; }
.doc-back:hover { text-decoration: underline; }
.doc { max-width: 760px; margin: 0 auto; padding: 24px var(--gutter) 72px; display: grid; gap: 24px; }
.doc h1 { font-size: clamp(2.125rem, 1.6rem + 2vw, 3rem); }
.doc h2 { margin-bottom: 8px; }
.doc h3 { margin: 14px 0 4px; }
.doc section > * + * { margin-top: 10px; }
.doc ul, .doc ol { padding-left: 22px; list-style: disc; display: grid; gap: 6px; }
.doc ol { list-style: decimal; }
.doc-meta { color: var(--muted); }
.doc-callout { background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.doc-callout a { color: inherit; }
.doc-links { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.doc-links a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }

/* ---------- help + welcome ---------- */
.faq { display: grid; gap: 4px; }
.faq-item { border-top: 1px solid var(--border); padding: 6px 0; }
.faq-item:first-child { border-top: 0; }
.faq-item summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.faq-item p { color: var(--muted); padding: 0 0 8px; }
.steps-list { padding-left: 22px; list-style: decimal; display: grid; gap: 8px; }
.welcome-step { color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.welcome-title { font-size: 1.5rem; }
.welcome-dots { display: flex; gap: 6px; justify-content: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--track); }
.dot.is-active { background: var(--primary); width: 22px; border-radius: 999px; }

/* ---------- v1.4 look: hero ring, icon chips, quick-add button ---------- */
.card-head-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chip-icon { --tile: var(--mint); flex: none; width: 36px; height: 36px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--ink); background: var(--tile); border: 1px solid var(--ink); }
.chip-icon-lg { width: 54px; height: 54px; border-radius: 17px; }
.chip-icon--calories, .chip-icon--activity { --tile: var(--mint); }
.chip-icon--water, .chip-icon--protein { --tile: var(--sky); }
.chip-icon--weight, .chip-icon--routine { --tile: var(--lav); }
.chip-icon--carbs, .chip-icon--fat { --tile: var(--peach); }
.chip-icon--paper { --tile: #fff; }

.hero { background: var(--surface); }
.hero-grid { display: grid; gap: 20px; align-items: center; }
@media (min-width: 700px) { .hero-grid { grid-template-columns: auto minmax(0, 1fr); gap: 36px; } }
.hero-ring { display: grid; justify-items: center; gap: 10px; }
.hero-side { display: grid; gap: 14px; min-width: 0; }
.ring { --tone: var(--c-calories); position: relative; width: var(--ring-size, 188px); max-width: 100%; aspect-ratio: 1; }
.ring-protein { --tone: var(--c-protein); } .ring-water { --tone: var(--c-water); } .ring-carbs { --tone: var(--c-carbs); } .ring-fat { --tone: var(--c-fat); }
.ring.is-over { --tone: var(--danger); }
.ring-svg { width: 100%; height: 100%; display: block; }
.ring-track { stroke: var(--track); }
.ring-arc { stroke: var(--tone); transition: stroke-dasharray 0.6s ease; }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 0; line-height: 1.15; }
.ring-top { color: var(--muted); font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.ring-big { font-family: var(--font-display); font-size: 2.75rem; font-weight: 800; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.ring-bottom { color: var(--muted); font-size: 0.875rem; font-weight: 600; }

.fab {
  position: fixed; right: 16px; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); z-index: 25; width: 58px; height: 58px; border-radius: 50%;
  border: 1.5px solid var(--ink); background: var(--btn-bg); color: var(--btn-fg); display: grid; place-items: center; cursor: pointer;
  box-shadow: 3px 3px 0 var(--pop); -webkit-tap-highlight-color: transparent; transition: translate 0.12s, box-shadow 0.12s;
}
.fab:hover { background: var(--btn-bg-hover); }
.fab:active { translate: 3px 3px; box-shadow: 0 0 0 var(--pop); }
@media (min-width: 900px) { .fab { display: none; } }
@media (max-width: 899px) { .main { padding-bottom: calc(var(--nav-h) + 96px + env(safe-area-inset-bottom)); } .quick { display: none; } }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.quick-tile { display: grid; justify-items: center; gap: 8px; padding: 14px 6px; min-height: 96px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; }
.quick-tile:hover { background: var(--surface-2); }
.quick-label { font-size: 0.9375rem; }

/* splash while the app loads */
.boot { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; }
.boot-logo { border-radius: 20px; box-shadow: 4px 4px 0 var(--pop); animation: boot-pop 0.5s ease both; }
.boot-name { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.04em; }
.boot .boot-message { padding: 0; }
@keyframes boot-pop { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }

/* training / rest day */
.hero-ring .day-type { justify-items: center; text-align: center; }
.hero-ring .day-type-row { justify-content: center; }
.day-type { display: grid; gap: 6px; justify-items: start; }
.day-type-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.weekday-fieldset { grid-column: 1 / -1; }
.weekday-row { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 4px 0 6px; }
.weekday-row .field-check { min-width: 0; }

/* longer reports (Pro) */
.custom-range .field { min-width: 150px; }
.compare-table { font-size: 0.8125rem; }
.compare-table th, .compare-table td { overflow-wrap: normal; word-break: normal; padding: 8px 4px; } /* never split a word across lines */
@media (min-width: 560px) { .compare-table { font-size: 0.9375rem; } .compare-table th, .compare-table td { padding: 8px 10px; } }
.cons-scroll { overflow-x: auto; max-width: 100%; padding: 4px 2px 8px; }
.cons-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 14px); grid-auto-columns: 14px; gap: 3px; width: max-content; }
.cons-grid.is-dense { grid-template-rows: repeat(7, 9px); grid-auto-columns: 9px; gap: 2px; }
.cons-cell { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid var(--primary); box-sizing: border-box; }
.cons-grid .cons-cell { width: 100%; height: 100%; }
.cons-cell.is-spacer { border-color: transparent; }
.cons-cell.is-complete { background: var(--primary); }
.cons-cell.is-partial { background: repeating-linear-gradient(45deg, var(--primary) 0 2px, transparent 2px 5px); }
.cons-cell.is-empty { border-color: var(--border); background: transparent; }
.cons-legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 0.875rem; color: var(--muted); }
.cons-legend li { display: inline-flex; align-items: center; gap: 6px; }

/* meal planner and grocery list (Pro) */
.week-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.week-label { font-weight: 650; margin: 0 4px; }
.plan-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.card.is-today { border-color: var(--ink); box-shadow: 4px 4px 0 var(--pop); }
.plan-meal-title { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-top: 6px; }
.plan-entry.is-logged .entry-name { color: var(--muted); }
.plan-entry .entry-actions { flex-wrap: wrap; justify-content: flex-end; }
.ingredients-block { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.ingredients-title { font-weight: 650; }
.grocery-list { list-style: none; padding: 0; display: grid; gap: 2px; }
.grocery-item { display: flex; align-items: center; gap: 10px; min-height: 44px; border-bottom: 1px solid var(--border); }
.grocery-item:last-child { border-bottom: 0; }
.grocery-item input[type="checkbox"] { width: 22px; height: 22px; flex: none; accent-color: var(--primary); }
.grocery-item label { flex: 1; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 8px 0; cursor: pointer; }
.grocery-amount { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; flex: none; }
.grocery-name { min-width: 0; }
.grocery-item.is-checked .grocery-name { text-decoration: line-through; color: var(--muted); }

/* plans, upgrade and teasers */
.plan-current { font-size: 1.0625rem; }
.plan-compare { display: grid; gap: 18px; }
@media (min-width: 900px) { .plan-compare { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; } }
.plan-col h3 { margin-bottom: 4px; }
.plan-offer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--border); }
.plan-offer:last-child { border-bottom: 0; }
.plan-offer-name { font-weight: 650; }
.plan-fine-print { display: grid; gap: 6px; margin-top: 8px; }
.pro-teaser { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 12px 16px; border: 1px dashed var(--line); border-radius: 18px; background: var(--surface-2); }
.pro-teaser p { margin: 0; color: var(--muted); font-size: 0.9375rem; }
