/* Coach workspace: "Blackout" look (owner's choice, 2026-11-18).
   Fitness Faction black, silver and lime; Michroma for headings, Inter for text. Phone first. */
:root {
  color-scheme: dark;
  --bg: #0a0c0b;
  --panel: #0f1211;
  --card: #121614;
  --card-2: #171c19;
  --raised: #1b211e;
  --line: #1f2622;
  --line-strong: #2b332f;
  --text: #e9ecea;
  --muted: #9aa49f;
  --faint: #7d8782;
  --lime: #8be33a;
  --lime-strong: #a4ef5f;
  --lime-ink: #0a0c0b;
  --lime-soft: #18221a;
  --amber: #f2b24c;
  --amber-bg: #251d10;
  --red: #ff8a7a;
  --red-bg: #2a1512;
  --blue: #9ccbf2;
  --blue-bg: #14202b;
  --green: var(--lime);
  --green-bg: var(--lime-soft);
  --soft: var(--card-2);
  --forest: var(--text);
  --ink: var(--text);
  --radius: 16px;
  --shadow: none;
  --display: Michroma, "Inter", ui-sans-serif, sans-serif;
  --text-2: #c1c8c4;
  --accent: var(--lime);
  --accent-hover: var(--lime-strong);
  --focus: var(--lime);
  --selection: #3d5c22;
  --btn-bg: var(--lime);
  --btn-hover: var(--lime-strong);
  --btn-text: var(--lime-ink);
  --line-hover: #3a4440;
  --amber-line: #5c4520;
  --amber-text: #f6cf8f;
  --red-line: #43201b;
  --blue-line: #24384a;
  --chip-on: #cff5a8;
  --toast-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  --side-bg: var(--panel);
  --side-line: var(--line);
  --side-text: #c1c8c4;
  --side-strong: #ffffff;
  --side-muted: var(--muted);
  --side-hover: var(--card-2);
  --side-active: var(--lime-soft);
  --side-accent: var(--lime);
}

/* Daylight: light pages, black sidebar (owner-requested personal choice). */
:root[data-theme="daylight"] {
  color-scheme: light;
  --bg: #f4f5f2;
  --panel: #ffffff;
  --card: #ffffff;
  --card-2: #f4f6f2;
  --raised: #ffffff;
  --line: #e3e7e0;
  --line-strong: #d0d6cd;
  --line-hover: #b9c1b5;
  --text: #121513;
  --text-2: #39413c;
  --muted: #5d6661;
  --faint: #6b746f;
  --lime-soft: #eef9e2;
  --green: #2f6b12;
  --green-bg: #eef9e2;
  --accent: #2f6b12;
  --accent-hover: #1f4a0b;
  --focus: #2f6b12;
  --selection: #cfeeb0;
  --btn-bg: #0b0d0c;
  --btn-hover: #2a302d;
  --btn-text: #ffffff;
  --amber: #8a5717;
  --amber-bg: #fff3dd;
  --amber-line: #f0d8a8;
  --amber-text: #6d4512;
  --red: #a5453a;
  --red-bg: #fbeceb;
  --red-line: #f0c9c4;
  --blue: #2f4f8f;
  --blue-bg: #edf1f7;
  --blue-line: #c9d6ec;
  --chip-on: #1f4a0b;
  --toast-shadow: 0 10px 30px rgba(16, 24, 16, .18);
  --side-bg: #0b0d0c;
  --side-line: #0b0d0c;
  --side-hover: #1a201d;
  --side-active: #8be33a;
  --side-strong: #ffffff;
}
:root[data-theme="daylight"] .side-nav a[aria-current="page"] { color: #0b0d0c; box-shadow: none; }
:root[data-theme="daylight"] .side-nav a[aria-current="page"] svg { color: #0b0d0c; }
:root[data-theme="daylight"] .card, :root[data-theme="daylight"] .stat { box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(16, 24, 16, .05); }
:root[data-theme="daylight"] .avatar.c1 { background: #e4f4d3; color: #2f6b12; }
:root[data-theme="daylight"] .avatar.c2 { background: #f7ead0; color: #7a4f10; }
:root[data-theme="daylight"] .avatar.c3 { background: #dceaf7; color: #24507a; }
:root[data-theme="daylight"] .avatar.c4 { background: #f1dff4; color: #6d2f78; }
:root[data-theme="daylight"] .avatar.c5 { background: #f8e3d6; color: #7a3e14; }
:root[data-theme="daylight"] h1 { font-family: var(--display); }
* { box-sizing: border-box; }
/* Anything marked hidden stays hidden, even where a layout rule sets display (for example sidebar links coaches do not have). */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: .02em; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.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: -999px; top: 8px; background: var(--card); color: var(--text); padding: 8px 12px; border-radius: 8px; z-index: 40; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--selection); }

/* App frame: sidebar on wide screens, top bar on phones */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.sidebar { background: var(--side-bg); color: var(--side-strong); border-bottom: 1px solid var(--side-line); padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--side-strong); }
.brand img { width: 36px; height: 36px; }
.brand-words { display: flex; flex-direction: column; line-height: 1.2; }
.brand-words strong { font-family: var(--display); font-weight: 400; font-size: 12px; letter-spacing: .1em; }
.brand-words small { font-size: 10px; letter-spacing: .16em; color: var(--side-muted); }
.side-nav { display: flex; gap: 4px; order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--side-text); text-decoration: none; font-size: 14px; white-space: nowrap; }
.side-nav a:hover { background: var(--side-hover); color: var(--side-strong); }
.side-nav a[aria-current="page"] { background: var(--side-active); color: var(--side-strong); font-weight: 600; box-shadow: inset 3px 0 0 var(--lime); }
.side-nav a[aria-current="page"] svg { color: var(--lime); }
.side-nav svg { width: 18px; height: 18px; flex: none; }
.count { margin-left: auto; background: var(--lime); color: var(--lime-ink); border-radius: 99px; padding: 1px 8px; font-size: 11px; font-weight: 700; }
.side-foot { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; background: #23332a; color: #b4f27a; }
.avatar.lime { background: var(--lime); color: var(--lime-ink); }
.avatar.has-photo { padding: 0; overflow: hidden; background: var(--card-2, #23332a); }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.c1 { background: #23332a; color: #b4f27a; } .avatar.c2 { background: #2c2a20; color: #f2cc7a; }
.avatar.c3 { background: #1f2a33; color: #9ccbf2; } .avatar.c4 { background: #2e2230; color: #e2a6ec; } .avatar.c5 { background: #2a2420; color: #f2a97a; }
.who { display: flex; flex-direction: column; line-height: 1.3; }
.who strong { font-size: 13px; }
.who span { font-size: 12px; color: var(--side-muted); }
.link-button { background: none; border: 0; padding: 0; color: var(--side-accent); text-decoration: underline; cursor: pointer; font-size: 12px; }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
@media (min-width: 900px) {
  .app { flex-direction: row; }
  .sidebar { position: sticky; top: 0; height: 100vh; width: 248px; flex: none; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 26px; padding: 24px 14px; border-bottom: 0; border-right: 1px solid var(--side-line); }
  .brand { padding: 0 8px; }
  .brand img { width: 40px; height: 40px; }
  .side-nav { order: 0; flex-direction: column; overflow: visible; }
  .side-foot { margin: auto 0 0; padding: 12px; border-radius: 12px; background: var(--side-hover); }
}

.sample-banner { background: var(--amber-bg); color: var(--amber); border-bottom: 1px solid var(--amber-line); padding: 10px 16px; font-size: 14px; }
.coach-main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px 16px 64px; }
@media (min-width: 900px) { .coach-main { padding: 30px 36px 64px; } }
.coach-main:focus { outline: none; }

/* Building blocks */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin-top: 4px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card + .card, .stack > * + * { margin-top: 14px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .grid.two { grid-template-columns: 1fr 1fr; } }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 16px;
  border-radius: 10px; border: 1px solid var(--btn-bg); background: var(--btn-bg); color: var(--btn-text); font-weight: 600; text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: var(--btn-text); }
.button.secondary { background: transparent; color: var(--text); border-color: var(--line-strong); }
.button.secondary:hover { background: var(--card-2); border-color: var(--line-hover); color: var(--text); }
.button.quiet { background: transparent; border-color: transparent; color: var(--accent); padding-left: 8px; padding-right: 8px; }
.button.quiet:hover { background: var(--lime-soft); }
.button:disabled { opacity: .55; cursor: not-allowed; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--text-2); vertical-align: middle; }
.badge.test { border-color: var(--blue-line); background: var(--blue-bg); color: var(--blue); }
.badge.attention { border-color: var(--amber-line); background: var(--amber-bg); color: var(--amber); }
.badge.quiet { color: var(--muted); }
.badge.good { border-color: var(--lime); background: var(--lime); color: var(--lime-ink); }
.badge.normal { color: var(--text-2); }
.notice { border-radius: 12px; padding: 12px 14px; font-size: 14px; background: var(--card-2); border: 1px solid var(--line); }
.notice.attention { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber-text); }
.notice.error { background: var(--red-bg); border-color: var(--red-line); color: var(--red); }
.blocked-meals { margin: 10px 0 0; padding-left: 18px; }
.blocked-meals li + li { margin-top: 12px; }
.blocked-meals .button-row.tight { margin-top: 6px; gap: 6px; flex-wrap: wrap; }
.notice.error .button.secondary { color: var(--text); }
.back { display: inline-block; margin-bottom: 10px; font-weight: 600; text-decoration: none; }

/* Client list */
.search { width: 100%; max-width: 360px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card); color: var(--text); }
.search::placeholder { color: var(--faint); }
.client-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.client-row a {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit;
}
.client-row a:hover { border-color: var(--line-strong); background: var(--card-2); }
.client-row .name { font-weight: 700; font-size: 16px; }
.client-row .meta { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
@media (min-width: 760px) {
  .client-row a { grid-template-columns: 1.4fr 1fr 1fr auto; }
  .client-row .meta { grid-column: auto; }
}

/* Client page */
.client-head { margin-bottom: 14px; }
.client-head h1 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.client-head .meta { margin-top: 4px; color: var(--muted); font-size: 14px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 0 -16px 18px; padding: 0 16px; scrollbar-width: none; }
.tabs a { white-space: nowrap; padding: 10px 12px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--lime); }
.tabs a:hover { color: var(--text); }

.macro-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: 10px; }
.macro { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.macro span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.macro strong { font-family: var(--display); font-weight: 400; font-size: 19px; }
.macro small { font-size: 12px; color: var(--muted); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.timeline li:first-child { border-top: 0; }
.timeline .when { font-size: 13px; color: var(--muted); }
.changes { margin: 6px 0 0; padding: 0; list-style: none; font-size: 14px; }
.changes li { padding: 3px 0; border: 0; display: block; }
.from { color: var(--muted); text-decoration: line-through; }
.to { font-weight: 600; }

.pref-section + .pref-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.pref-section h3 { margin-bottom: 8px; }
.pref-row { display: grid; gap: 2px 16px; padding: 6px 0; font-size: 14px; }
@media (min-width: 640px) { .pref-row { grid-template-columns: 260px 1fr; } }
.pref-row dt { color: var(--muted); }
.pref-row dd { margin: 0; font-weight: 500; }
.pref-row.problem dd { color: var(--amber); }

/* Forms */
.field { display: grid; gap: 6px; margin-top: 14px; }
.field > span, .field legend { font-weight: 600; font-size: 14px; }
.field .hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.field input[type="text"], .field input[type="number"], .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--text);
}
.field textarea { min-height: 88px; resize: vertical; }
fieldset.field { border: 0; padding: 0; margin: 14px 0 0; }
.checks { display: grid; gap: 6px; }
@media (min-width: 640px) { .checks { grid-template-columns: 1fr 1fr; } }
.checks label, .choice-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; font-size: 14px; }
.checks label:has(input:checked), .choice-card:has(input:checked) { border-color: var(--selection); background: var(--lime-soft); }
.checks input, .choice-card input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--lime); flex: none; }
.choice-card strong { display: block; }
.number-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .number-grid { grid-template-columns: repeat(3, 1fr); } .number-grid.four { grid-template-columns: repeat(4, 1fr); } }
.macro-check { margin-top: 12px; font-size: 14px; }

.steps { display: flex; gap: 8px; margin-bottom: 16px; font-size: 13px; color: var(--muted); }
.steps span[aria-current="step"] { color: var(--accent); font-weight: 700; }

.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.answers dt { font-size: 13px; color: var(--muted); margin-top: 10px; }
.answers dd { margin: 2px 0 0; font-weight: 500; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--lime); color: var(--lime-ink); font-weight: 600; padding: 12px 18px; border-radius: 12px; box-shadow: var(--toast-shadow); max-width: calc(100% - 32px); z-index: 30; }

/* Weekly plan meals */
details.week-meals > summary { list-style: none; display: inline-flex; }
details.week-meals > summary::-webkit-details-marker { display: none; }
details.week-meals[open] > summary { margin-bottom: 4px; }

/* Per-meal and daily nutrition on the Weekly plans tab */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 8px; }
.nutrition-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.nutrition-table th, .nutrition-table td { text-align: right; padding: 8px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.nutrition-table th[scope="row"], .nutrition-table thead th:first-child { text-align: left; }
.nutrition-table thead th { font-size: 12px; color: var(--muted); font-weight: 600; }
.nutrition-table th[scope="row"] { font-weight: 400; min-width: 200px; }
.nutrition-table .slot-name { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.nutrition-table .meal-title, .swap-options .meal-title { display: block; font-weight: 600; }
.nutrition-table th[scope="row"] .small { display: block; }
.nutrition-table .target { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; }
.nutrition-table tfoot th, .nutrition-table tfoot td { border-bottom: 0; background: var(--soft); }
.nutrition-table tfoot th { font-weight: 700; }
.nutrition-table td.pass strong, .nutrition-table td.pass span[aria-label] { color: var(--green); }
.nutrition-table td.fail strong, .nutrition-table td.fail span[aria-label] { color: var(--amber); }
.nutrition-table .swap-cell { text-align: right; width: 1%; }
.small-button { padding: 6px 12px; font-size: 13px; }
.swap-panel-row > td { text-align: left; background: var(--bg); }
.swap-panel { display: grid; gap: 10px; }
.swap-panel p { margin: 0; }
.swap-options { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.swap-options li { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; }
.button-row.tight { margin-top: 4px; gap: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nutrition-table .swap-button { margin-top: 6px; }
.swap-panel { position: sticky; left: 0; max-width: min(600px, calc(100vw - 96px)); }

/* Swap ideas and plate builder */
.rotate-line { margin-top: 2px; }
.build-plate > summary { list-style: none; display: inline-flex; }
.build-plate > summary::-webkit-details-marker { display: none; }
.plate-area { display: grid; gap: 8px; margin-top: 8px; }
.plate-area h4 { margin: 6px 0 0; font-size: 14px; }
.plate-form { display: grid; gap: 8px; }
.plate-roles { display: grid; gap: 8px; }
@media (min-width: 640px) { .plate-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field-inline { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.field-inline select { font: inherit; color: var(--text); min-height: 40px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg); }

/* Dashboard */
.eyebrow { font-size: 12px; letter-spacing: .14em; color: var(--accent); font-weight: 600; text-transform: uppercase; }
.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 20px; }
@media (min-width: 900px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 8px; text-decoration: none; color: var(--text); }
a.stat:hover { border-color: var(--line-strong); background: var(--card-2); color: var(--text); }
.stat span { font-size: 13px; color: var(--text-2); }
.stat strong { font-family: var(--display); font-weight: 400; font-size: 28px; }
.stat small { font-size: 12px; color: var(--muted); }
.stat small.go { color: var(--accent); }
.stat small.warn { color: var(--amber); }
.dash-cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.dash-cols > .card:first-child { flex: 2 1 560px; min-width: 0; }
.dash-cols > aside { flex: 1 1 280px; min-width: 0; display: grid; gap: 20px; }
.data-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--faint); padding: 8px 8px; }
.data-table td { padding: 12px 8px; border-top: 1px solid var(--line); color: var(--text-2); vertical-align: middle; }
.data-table tr.row-link { cursor: pointer; }
.data-table tr.row-link:hover td { background: var(--card-2); }
.person { display: flex; align-items: center; gap: 10px; }
.person a { color: var(--text); font-weight: 600; text-decoration: none; }
.person a:hover { color: var(--accent); }
.person small { display: block; font-size: 12px; color: var(--muted); }
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-strong); background: transparent; color: var(--text-2); font-size: 12px; font-weight: 500; cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--lime); background: var(--lime-soft); color: var(--chip-on); }
.coach-line { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.coach-line + .coach-line { border-top: 1px solid var(--line); }
.coach-line span:last-child { margin-left: auto; font-size: 13px; color: var(--muted); }

/* Recipe library */
.recipe-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.recipe-card { display: grid; gap: 8px; height: 100%; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; }
.recipe-card:hover { border-color: var(--line-strong); background: var(--card-2); color: var(--text); }
.recipe-card strong { font-size: 15px; line-height: 1.35; }
.recipe-meals { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.recipe-macros { font-size: 13px; color: var(--text-2); }
.recipe-macros b { color: var(--text); }
.plain-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.steps-list { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; }

/* Settings */
.theme-options { display: grid; gap: 10px; margin-top: 12px; }
@media (min-width: 640px) { .theme-options { grid-template-columns: 1fr 1fr; } }
.theme-option { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 14px; cursor: pointer; }
.theme-option:has(input:checked) { border-color: var(--accent); background: var(--lime-soft); }
.theme-option input { width: 18px; height: 18px; accent-color: var(--accent); }
.theme-option > span:last-child { display: grid; }
.theme-swatch { display: flex; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-strong); }
.theme-swatch span { width: 18px; height: 36px; }
.business-line { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.data-table.compact { min-width: 0; }
.link-button.inline { color: var(--accent); font-size: inherit; }
.profile-form { display: grid; gap: 6px; max-width: 420px; }
.invite-form .field input { max-width: 100%; }
.field select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--text); }
.coach-clients summary { cursor: pointer; color: var(--accent); } .coach-clients .plain-list { margin-top: 6px; }
.remove-panel-row > td { background: var(--bg); }
.remove-panel { display: grid; gap: 10px; max-width: 640px; }
.former-coaches { margin-top: 16px; }
.former-coaches > summary { cursor: pointer; font-weight: 600; color: var(--text-2); }
.move-list { display: grid; gap: 8px; }
.move-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; font-size: 14px; }
.move-row select { min-height: 40px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; }
.move-all { padding-top: 8px; border-top: 1px solid var(--line); }
.no-access { max-width: 520px; margin: 48px auto; text-align: center; display: grid; gap: 12px; justify-items: center; }
.no-access .button-row { justify-content: center; }
.no-access-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); color: var(--accent); }
.button.quiet.danger { color: var(--red); }
.button.quiet.danger:hover { background: var(--red-bg); }
.button.danger-fill { background: var(--red); border-color: var(--red); color: #1a0a08; }
:root[data-theme="daylight"] .button.danger-fill { color: #ffffff; }
.access-actions { margin-top: 0; justify-content: flex-start; }
.client-app-card .field { max-width: 420px; }
.add-client-form { margin-bottom: 16px; } .add-client-checks { margin-top: 12px; }
.check-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 99px; font-size: 10px; letter-spacing: .04em; text-transform: none; font-weight: 700; }
.check-tag.is-ate { background: var(--lime); color: var(--lime-ink); }
.check-tag.is-other { background: var(--blue-bg); color: var(--blue); }
.check-tag.is-skipped { background: var(--amber-bg); color: var(--amber); }

/* --- Week at a glance (Weekly plans tab) --- */
.week-grid-scroll { overflow-x: auto; margin: 0 -4px; padding: 4px 4px 12px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(138px, 1fr)); gap: 8px; min-width: 1020px; }
.day-col { display: grid; grid-template-rows: subgrid; grid-row: span var(--rows); gap: 8px; scroll-snap-align: start; }
.day-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; padding: 4px 2px; border-bottom: 2px solid var(--line); }
.day-head.is-today { border-bottom-color: var(--accent); }
.day-head .day-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-left: auto; }
.day-head .day-dot.is-off { background: var(--amber); }
.day-head .day-checks { width: 100%; font-size: 12px; color: var(--muted); }
.week-grid .meal-card { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--line-strong, var(--line)); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.week-grid .meal-card.is-ate { border-color: color-mix(in srgb, var(--lime) 55%, transparent); border-top-color: var(--lime); background: color-mix(in srgb, var(--lime) 10%, var(--card)); }
.week-grid .meal-card.is-other { border-color: color-mix(in srgb, var(--blue, #7fb2ff) 55%, transparent); border-top-color: var(--blue, #7fb2ff); background: color-mix(in srgb, var(--blue, #7fb2ff) 10%, var(--card)); }
.week-grid .meal-card.is-skipped { border-color: color-mix(in srgb, var(--amber) 55%, transparent); border-top-color: var(--amber); background: color-mix(in srgb, var(--amber) 9%, var(--card)); }
.week-grid .meal-card.is-out { background: var(--amber-bg); }
.mc-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mc-slot { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mc-check { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 8px 2px 3px; }
.mc-check svg { width: 16px; height: 16px; padding: 2px; border-radius: 50%; flex: none; }
.mc-check.is-ate { color: var(--lime); }
.mc-check.is-ate svg { background: var(--lime); color: var(--lime-ink, #10140c); }
.mc-check.is-other svg { background: var(--blue-bg, transparent); border: 1.5px solid currentColor; }
.mc-check.is-skipped svg { background: var(--amber-bg, transparent); border: 1.5px solid currentColor; }
.mc-check.is-other { color: var(--blue, #7fb2ff); }
.mc-check.is-skipped { color: var(--amber); }
.mc-title { all: unset; cursor: pointer; font-weight: 600; font-size: 14px; line-height: 1.3; color: var(--text); overflow-wrap: anywhere; }
.mc-title:hover, .mc-title:focus-visible { text-decoration: underline; }
.mc-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.mc-macros { font-size: 12px; color: var(--muted); margin: 0; }
.mc-tags { display: flex; gap: 4px; flex-wrap: wrap; margin: 0; min-height: 0; }
.mc-tags span { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.mc-out { font-size: 12px; margin: 0; color: var(--amber-text); }
.mc-out span { display: block; color: var(--muted); }
.mc-actions { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; }
.mc-portion { font-size: 12px; color: var(--muted); margin-right: auto; }
.icon-button { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); cursor: pointer; }
.icon-button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.icon-button:disabled { opacity: .4; cursor: not-allowed; }
.icon-button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg, #000); }
.icon-button svg, .mc-link svg, .mc-out-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mc-link, .mc-out-button { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 32px; border-radius: 8px; font: inherit; font-size: 12px; cursor: pointer; }
.mc-link { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.mc-link:hover { color: var(--accent); border-color: var(--accent); }
.mc-out-button { background: var(--card-2); border: 1px solid var(--line); color: var(--text); font-weight: 600; justify-content: flex-start; padding: 0 10px; }
.mc-out-button.is-set { color: var(--amber-text); border-color: var(--amber-line); }
.day-total { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; font-size: 12px; }
.day-total.is-off { border-color: var(--amber-line); }
.day-total p { margin: 0 0 4px; }
.dt-kcal strong { font-size: 18px; }
.dt-kcal span, .dt-line { color: var(--muted); }
.dt-macros { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.dt-macros .off { color: var(--amber); }
.week-panel { margin-top: 12px; }
.food-list { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.day-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 10px 0; }
.day-pick { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 8px; cursor: pointer; }
.day-pick span { display: flex; flex-direction: column; }
.out-list { border: 0; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.out-idea { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 8px; cursor: pointer; }
.out-idea > span { display: flex; flex-direction: column; gap: 2px; }

/* Phones: one day fills the screen; swipe sideways for the next. */
@media (max-width: 760px) {
  .week-grid { grid-template-columns: repeat(7, 84vw); min-width: 0; }
  .week-grid-scroll { scroll-snap-type: x mandatory; }
  .mc-title { font-size: 16px; }
  .icon-button { width: 40px; height: 40px; }
  .mc-link, .mc-out-button { min-height: 40px; font-size: 14px; }
}
@media (min-width: 761px) {
  .mc-portion { white-space: nowrap; font-size: 11px; }
  .mc-link { white-space: nowrap; font-size: 11px; gap: 4px; }
  .mc-actions { gap: 4px; }
  .icon-button { width: 28px; height: 28px; }
}
.week-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.week-toolbar .button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-right: 6px; vertical-align: -3px; }
[data-rotate-status] { margin-bottom: 10px; }
.reminder-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.reminder-form input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--lime); }
.coach-photos { display: grid; gap: 10px; margin-top: 10px; }
.coach-photo-row { display: grid; grid-template-columns: 52px repeat(2, minmax(0, 160px)); gap: 10px; align-items: center; }
.coach-photo-row img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.coach-chat .card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tabs .count { margin-left: 4px; }
/* Chats */
.chats-layout { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 16px; align-items: start; }
.chat-inbox { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); max-height: 640px; overflow-y: auto; }
.chat-inbox a { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; color: var(--text); text-decoration: none; }
.chat-inbox a:hover { background: var(--card-2); }
.chat-inbox a.is-open { background: var(--lime-soft); }
.chat-inbox a.is-unread strong { color: var(--accent); }
.inbox-text { display: grid; gap: 2px; min-width: 0; }
.inbox-top { display: flex; justify-content: space-between; gap: 8px; }
.inbox-preview { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-empty { padding: 12px; }
.chat-panel .card-head { margin-bottom: 10px; }
.chat-pick { padding: 40px 0; text-align: center; }
.chats-back { display: none; }
.coach-thread { min-height: 240px; }
@media (max-width: 760px) {
  .chats-layout { grid-template-columns: 1fr; }
  .chats-layout.has-open .chat-inbox { display: none; }
  .chats-layout:not(.has-open) .chat-panel { display: none; }
  .chats-back { display: inline-block; margin-bottom: 4px; }
}
@media (min-width: 1100px) { .stat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.chat-tools { display: flex; justify-content: flex-end; align-items: center; gap: 8px; min-height: 0; margin-bottom: 8px; }
.chat-tools:has(> :not([hidden])) { min-height: 32px; }
.inbox-seen { display: block; color: var(--muted, inherit); opacity: .8; }
.inbox-seen.is-seen { color: var(--accent); opacity: 1; }
/* Weekly plans: one week open, with a switcher for past, this and upcoming weeks. */
.week-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.week-pick { flex: 1 1 220px; min-width: 0; }
.week-pick select { width: 100%; }
.week-versions summary { cursor: pointer; color: var(--muted, inherit); }

/* Help lower food cost (coach) */
.cost-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.cost-notice p { flex: 1 1 320px; margin: 0; }
.cost-ideas { margin-bottom: 12px; display: grid; gap: 10px; }
.cost-ideas h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 4px; }
.cost-ideas .idea-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cost-ideas .idea-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); }
.cost-ideas .idea-list li > div { display: grid; gap: 2px; min-width: 0; }
.cost-ideas .good-text { color: var(--green); font-weight: 600; }

/* Loading (client app and coach workspace): the Faction mark spins one way, the ring the other (shows after one second). */
.ff-loader { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; color: var(--muted); }
.ff-loader-page { min-height: 46vh; padding: 24px 16px; }
.ff-loader-panel { padding: 22px 8px; }
.ff-loader-small { flex-direction: row; justify-content: flex-start; gap: 10px; text-align: left; color: inherit; }
.ff-spin { position: relative; display: grid; place-items: center; flex: none; width: 96px; height: 96px; }
.ff-spin-panel { width: 72px; height: 72px; }
.ff-spin-small { width: 26px; height: 26px; }
.ff-loader-page .ff-spin, .ff-loader-panel .ff-spin, .ff-loader-small .ff-spin { opacity: 0; animation: ff-in .35s ease 1s forwards; }
.ff-ring { position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 18%, var(--lime) 62%, transparent 63% 72%, color-mix(in srgb, var(--lime) 45%, transparent) 95%, transparent);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: ff-spin-back 1.3s linear infinite; }
.ff-ring-dots { position: absolute; inset: 9px; border-radius: 50%; border: 2px dotted color-mix(in srgb, var(--lime) 55%, transparent); animation: ff-spin 4s linear infinite; }
.ff-mark { position: relative; width: 52%; height: 52%; object-fit: contain; animation: ff-spin 2.2s cubic-bezier(.55, .1, .45, .9) infinite; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--lime) 45%, transparent)); }
.ff-spin-small .ff-ring { -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); }
.ff-spin-small .ff-ring-dots { display: none; }
.ff-spin-small .ff-mark { width: 62%; height: 62%; }
.ff-loader-text { font-size: 14px; }
.ff-loader-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: color-mix(in srgb, var(--bg, #000) 45%, transparent); backdrop-filter: blur(2px); animation: ff-in .25s ease forwards; }
.ff-loader-overlay { padding: 26px 30px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, .35); color: var(--text); min-width: 180px; }
@keyframes ff-spin { to { transform: rotate(360deg); } }
@keyframes ff-spin-back { to { transform: rotate(-360deg); } }
@keyframes ff-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .ff-ring, .ff-ring-dots { animation-duration: 6s; }
  .ff-mark { animation: none; }
}
.mc-note { font-size: 12px; color: var(--blue, inherit); overflow-wrap: anywhere; }

/* Check-offs and climb (a client's progress, as they see it on Home). */
.coach-climb { display: grid; gap: 12px; margin-top: 10px; }
.coach-today { display: flex; align-items: center; gap: 14px; }
.coach-today .day-ring { width: 84px; height: 84px; flex: none; }
.coach-today > div { display: grid; gap: 2px; }
.coach-week-rings { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.coach-week-rings li { display: grid; justify-items: center; gap: 1px; }
.day-ring.mini .ring-track, .day-ring.mini .ring-fill { stroke-width: 5; }
.coach-scene { display: grid; gap: 6px; max-width: 520px; }

/* New foods (client label photos) */
.food-review-grid { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 16px; align-items: start; }
.food-review-photos { display: grid; gap: 10px; }
.food-review-photo { display: grid; gap: 4px; text-decoration: none; }
.food-review-photo img { width: 100%; max-height: 280px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.food-review-form { display: grid; gap: 10px; }
.recipe-review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.recipe-review-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border-radius: 8px; background: var(--card-2, rgba(127,127,127,.08)); }
.food-review-numbers { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 700px) { .food-review-grid { grid-template-columns: 1fr; } .food-review-photo img { max-height: 260px; object-fit: contain; } }
/* Recipe review: the meals the weekly planner may use an approved client recipe for. */
.planner-slots { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; display: grid; gap: 8px; }
.planner-slots legend { padding: 0 4px; }
.check-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }

/* Dashboard (November 23, 2026): needs attention, client insights, activity feed, notifications. */
@media (min-width: 1100px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dash-main { flex: 2 1 560px; min-width: 0; display: grid; gap: 20px; }
.dash-side { flex: 1 1 300px; min-width: 0; display: grid; gap: 20px; }
.dash-sub { margin: 16px 0 8px; font-size: 13px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.attention-list, .adherence-list, .win-list, .feed, .notify-list { list-style: none; margin: 0; padding: 0; display: grid; }
.attention-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.attention-list li:first-child { border-top: 0; }
.attention-list .person { text-decoration: none; color: inherit; min-width: 0; }
.attention-list small { display: block; color: var(--text-2); font-size: 13px; }
.adherence-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(80px, 1fr) 44px; align-items: center; gap: 10px; padding: 6px 0; text-decoration: none; color: inherit; }
.adherence-row .person { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.adherence-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.adherence-bar span { display: block; height: 100%; background: var(--lime); border-radius: 99px; }
.adherence-bar span.mid { background: #e5b53a; }
.adherence-bar span.low { background: #e5624a; }
.adherence-row strong { text-align: right; font-size: 14px; }
.insight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.insight-grid > div { display: grid; gap: 2px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.insight-grid strong { font-size: 20px; }
.win-list li { padding: 4px 0; font-size: 14px; }
.feed li { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.feed li:first-child { border-top: 0; }
.feed small { display: block; color: var(--faint); font-size: 12px; margin-top: 2px; }
.feed-icon { width: 22px; flex: none; text-align: center; }
.dash-side .filter-row { margin-bottom: 8px; flex-wrap: wrap; }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.notify-bell { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--side-line); border-radius: 10px; background: none; color: var(--side-strong); cursor: pointer; }
.notify-bell .count { position: absolute; top: -6px; right: -8px; margin: 0; }
.notify-panel { position: fixed; z-index: 60; top: 64px; left: 16px; width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
@media (min-width: 900px) { .notify-panel { left: 260px; top: 20px; } }
.notify-list li a { display: grid; gap: 2px; padding: 10px 8px; border-top: 1px solid var(--line); text-decoration: none; color: var(--text-2); border-radius: 8px; }
.notify-list li.is-unread a { color: var(--text); font-weight: 600; background: var(--lime-soft, rgba(163, 230, 53, .08)); }
.notify-list small { color: var(--faint); font-weight: 400; font-size: 12px; }
.scope-menu { position: relative; }
.scope-options { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 180px; padding: 6px; display: grid; gap: 2px; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }
.scope-options button { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.scope-options button:hover, .scope-options button[aria-checked="true"] { background: var(--line); }
.notify-actions { display: flex; align-items: center; gap: 10px; margin: 0; }
.notify-actions .button { margin: 0; }
.notify-panel .card-head { align-items: center; }

/* The macro calculator on Change targets (November 23, 2026). */
.macro-calc .calc-notes { margin: 8px 0 0; padding-left: 18px; color: var(--text-2); font-size: 14px; display: grid; gap: 2px; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.calc-grid .calc-wide { grid-column: span 2; }
@media (max-width: 600px) { .calc-grid .calc-wide { grid-column: 1 / -1; } }
.calc-inline { display: flex; align-items: center; gap: 6px; }
.calc-inline input { min-width: 0; }
.calc-inline select { width: auto; }
.calc-numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin-top: 16px; }
.calc-numbers > div { display: grid; gap: 2px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.calc-numbers strong { font-size: 20px; }
.calc-numbers .calc-target { border-color: var(--lime); }
.calc-bar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; margin-top: 10px; font-size: 12px; font-weight: 700; }
.calc-bar span { display: grid; place-items: center; white-space: nowrap; overflow: hidden; color: #10130a; }
.calc-bar .c { background: #e5b53a; }
.calc-bar .p { background: var(--lime); }
.calc-bar .f { background: #7fb2e5; }
input.is-derived { background: var(--line) !important; color: var(--text); cursor: default; }
.macro-calc .segmented { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.macro-calc .segmented button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font: 600 13px Inter, sans-serif; cursor: pointer; }
.macro-calc .segmented button[aria-pressed="true"] { background: var(--lime); color: var(--lime-ink, #10130a); }

/* Import a recipe (coaches) and the library's imported recipes */
.coach-import-rows { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 6px; }
.coach-import-rows li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--card-2, rgba(127,127,127,.08)); }
.coach-import-pick { display: flex; gap: 6px; align-items: center; min-width: 0; }
.coach-import-pick select { flex: 1; min-width: 0; }
.coach-import-pick input { width: 80px; }
@media (max-width: 640px) { .coach-import-rows li { grid-template-columns: 1fr; } }
.imported-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.imported-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--card-2, rgba(127,127,127,.08)); }
.imported-list li > div { display: grid; gap: 2px; min-width: 0; }
.imported-meals { display: grid; gap: 6px; justify-items: end; }

/* Recipe photos (client and coach apps). A recipe without a photo shows its meal's icon on a soft tile. */
.recipe-photo { display: block; overflow: hidden; background: var(--card-2); border: 1px solid var(--line); color: var(--faint, var(--muted)); }
.recipe-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.recipe-photo.is-placeholder { display: grid; place-items: center; }
.recipe-photo-thumb { width: 64px; height: 64px; border-radius: 12px; flex: none; }
.recipe-photo-card { width: 100%; aspect-ratio: 4 / 3; border-radius: calc(var(--radius) - 6px); }
.recipe-photo-hero { width: 100%; aspect-ratio: 4 / 3; max-height: 320px; border-radius: 14px; margin-bottom: 12px; }
.recipe-hero { max-width: 560px; margin: 8px 0 4px; }

/* Meal sizes (Targets tab) */
.share-bars, .share-sliders { display: grid; gap: 12px; margin-top: 12px; }
.share-bar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 140px; align-items: center; gap: 12px; }
.share-track { height: 8px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.share-track span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.share-slider { display: grid; grid-template-columns: 110px minmax(0, 1fr) 140px; grid-template-areas: "name range value" ". rec ."; align-items: center; column-gap: 12px; }
.share-slider .share-name { grid-area: name; font-weight: 600; }
.share-slider input[type="range"] { grid-area: range; width: 100%; accent-color: var(--accent); }
.share-slider .share-value { grid-area: value; }
.share-slider .share-rec { grid-area: rec; }
.share-value { font-size: 14px; color: var(--text-2); white-space: nowrap; }
.share-value strong { color: var(--text); }
@media (max-width: 560px) {
  .share-bar, .share-slider { grid-template-columns: 1fr auto; grid-template-areas: "name value" "range range" "rec rec"; }
  .share-bar .share-track { grid-column: 1 / -1; grid-row: 2; }
}

/* Client favorites (Preferences tab and Weekly plans) */
.favorite-tiles { list-style: none; margin: 12px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.favorite-tile { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); text-decoration: none; }
.favorite-tile:hover { border-color: var(--line-strong); background: var(--card-2); color: var(--text); }
.favorite-tile .recipe-photo-thumb { width: 52px; height: 52px; }
.favorite-tile > span { display: grid; gap: 2px; min-width: 0; }
.favorite-tile strong { font-size: 14px; line-height: 1.3; }
.mc-fav { color: var(--accent); display: inline-flex; vertical-align: -1px; }

/* Planned extras (coach only, November 25, 2026). */
.day-extras { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.extra-chip { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--lime) 8%, var(--card)); border: 1px dashed var(--line-strong, var(--line)); font-size: 12px; }
.extra-chip span:last-child { display: grid; }
.extra-list { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.extra-list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.extra-list li > span:nth-child(2) { flex: 1; }
.extra-form { display: grid; gap: 10px; margin: 10px 0; }
.extra-sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.extra-size { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.extra-size span { display: grid; }
.extra-size:has(input:checked) { border-color: var(--lime); background: color-mix(in srgb, var(--lime) 10%, var(--card)); }
.extra-keep { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 10px 0; }
.extra-preview td .small { display: block; }
.extra-preview tr.is-kept td { opacity: .7; }
.extra-preview tr.is-total td { font-weight: 600; border-top: 2px solid var(--line); }
.extra-basis { flex-basis: 100%; margin: 0; }
.extra-sizes-head { font-weight: 600; margin-bottom: -4px; }

/* Day-by-day targets (November 25, 2026). */
.day-type { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 12px; display: grid; gap: 10px; }
.day-type-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.day-type-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.day-type-quick input, .day-type-quick select { font: inherit; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--card-2); color: inherit; }
.day-assign { margin-top: 14px; display: grid; gap: 8px; }
.day-assign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.day-pattern-summary { margin-top: 12px; display: grid; gap: 8px; }
/* Challenges (owner, November 27, 2026): group challenges with everyone's progress at once. */
.ch-group { font-size: 15px; margin: 20px 0 10px; color: var(--text-2); }
.ch-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.ch-card { display: grid; gap: 6px; text-decoration: none; color: var(--text); }
.ch-card:hover { border-color: var(--line-strong); }
.ch-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.ch-status { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--card-2); color: var(--muted); white-space: nowrap; }
.ch-status.is-active { background: var(--lime-soft); color: var(--text); }
.ch-prize { color: var(--text-2); }
.ch-stats { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0; }
.ch-stats .card { display: grid; gap: 4px; }
.ch-stats strong { font-size: 22px; }
.ch-board table { width: 100%; border-collapse: collapse; }
.ch-board th, .ch-board td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ch-board th { font-size: 12px; color: var(--muted); font-weight: 600; }
.ch-board tr.is-leader td:first-child strong::before { content: '🏆 '; }
.ch-dots { display: inline-flex; gap: 4px; }
.ch-dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.ch-dot.is-good { background: var(--lime); border-color: var(--lime); }
.ch-dot.is-some { background: linear-gradient(90deg, var(--lime) 50%, transparent 50%); border-color: var(--lime); }
.ch-dot.is-missed { border-color: var(--amber); }
.ch-dot.is-later, .ch-dot.is-none { opacity: .35; }
.ch-quiet { color: var(--amber); white-space: nowrap; }
.ch-form { display: grid; gap: 14px; max-width: 640px; }
.ch-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.ch-dates [data-length] { grid-column: 1 / -1; margin: 0; }
.ch-people { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 8px; }
.ch-people-list { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); max-height: 320px; overflow: auto; }
@media (max-width: 600px) { .ch-stats { grid-template-columns: 1fr 1fr 1fr; } .ch-stats strong { font-size: 18px; } }
.ch-winners { display: grid; gap: 8px; margin-bottom: 14px; }
.ch-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ch-photos { display: inline-flex; gap: 4px; }
.ch-photo { all: unset; cursor: pointer; width: 34px; height: 34px; border-radius: 6px; overflow: hidden; background: var(--card-2); border: 1px solid var(--line); }
.ch-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-photo-view { position: fixed; inset: 0; background: rgba(0, 0, 0, .8); display: grid; place-items: center; z-index: 100; cursor: zoom-out; color: #fff; text-align: center; }
.ch-photo-view img { max-width: 90vw; max-height: 80vh; border-radius: 12px; }
.ch-flag { color: var(--amber); }
.ch-ok { color: var(--lime); font-weight: 600; }
.ch-photo { width: 28px; height: 28px; }
.ch-can { display: grid; gap: 2px; min-width: 120px; }
.ch-board td.small { white-space: nowrap; }
.ch-compare { margin-top: 6px; }
.ch-compare-view { cursor: default; }
.ch-compare-box { background: var(--card); color: var(--text); border-radius: 14px; padding: 16px; width: min(760px, 94vw); max-height: 92vh; overflow: auto; }
.ch-compare-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ch-compare-grid { display: grid; grid-template-columns: 60px 1fr 1fr; gap: 10px; align-items: center; }
.ch-compare-grid figure { margin: 0; display: grid; gap: 4px; }
.ch-compare-grid img { width: 100%; max-height: 300px; object-fit: contain; border-radius: 8px; background: var(--card-2); }
.ch-compare-grid figcaption { font-size: 12px; color: var(--muted); }
.ch-compare-grid .is-empty { min-height: 120px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 13px; }
/* Fit something in: search the treat list (owner, November 27, 2026). */
.extra-search { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--muted); margin-bottom: 8px; }
.extra-search input { all: unset; flex: 1; color: var(--text); font-size: 14px; }
/* Eating out with estimates (owner, November 27, 2026): the restaurant picker shared by both apps, and the coach's meal out. */
.segmented { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.segmented button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font: 600 13px Inter, sans-serif; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--lime); color: var(--lime-ink); }
.segmented.wide { display: flex; }
.segmented.wide button { flex: 1; }
.extra-mode { margin: 4px 0 10px; }
.eo-picker { display: grid; gap: 10px; }
.eo-room { margin: 0; font-weight: 600; }
.eo-current { margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.eo-search { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); color: var(--muted); }
.eo-search input { all: unset; flex: 1; min-width: 0; color: var(--text); font-size: 15px; }
.eo-label { margin: 4px 0 0; color: var(--muted); font-weight: 600; }
.eo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.eo-chip { min-height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 99px; background: var(--card); color: var(--text); font: 500 13px Inter, sans-serif; cursor: pointer; }
.eo-chip:hover { border-color: var(--lime); }
.eo-place-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eo-tips summary, .eo-note summary { cursor: pointer; color: var(--text-2); font-weight: 600; padding: 4px 0; }
.eo-tips ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.eo-options { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.eo-option { border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.eo-option.is-open { border-color: var(--lime); }
.eo-pick { all: unset; box-sizing: border-box; width: 100%; display: grid; gap: 2px; padding: 10px 12px; cursor: pointer; }
.eo-pick:focus-visible { outline: 2px solid var(--lime); outline-offset: -2px; border-radius: 12px; }
.eo-option-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.eo-fit { flex: none; padding: 2px 8px; border-radius: 99px; font: 600 11px Inter, sans-serif; border: 1px solid var(--line); color: var(--text-2); }
.eo-fit.is-fits { background: var(--lime); color: var(--lime-ink); border-color: transparent; }
.eo-fit.is-near, .eo-fit.is-over { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }
.eo-confirm { display: grid; gap: 8px; padding: 0 12px 12px; }
.eo-confirm p { margin: 0; }
.eo-note textarea { width: 100%; box-sizing: border-box; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; }
.eo-preview { margin: 4px 0 8px; padding-left: 18px; display: grid; gap: 4px; }
.eo-preview .eo-fit { margin-left: 4px; }
/* Carb style per meal beside the meal-size sliders (owner, November 28, 2026). */
.share-row { display: grid; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.share-row:last-child { border-bottom: 0; }
.carb-style { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding-left: 122px; }
.carb-style-pick button { min-height: 30px; padding: 0 10px; font-size: 12px; }
@media (max-width: 640px) { .carb-style { padding-left: 0; } }
/* Targets page: one line each until opened (owner, November 28, 2026). */
.target-more { margin-top: 12px; }
.target-more > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; }
.target-more > summary::-webkit-details-marker { display: none; }
.target-more > summary .small { margin-left: 6px; }
.target-more-edit { color: var(--accent); font-weight: 600; flex: none; }
.target-more[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.target-more[open] > summary .target-more-edit { visibility: hidden; }
.target-more > .card, .target-more > div > .card { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }

/* Coach on a phone (owner, November 28, 2026): a short top bar, and every section in a bottom tab bar.
   Four sections show; "More" opens the rest. Wide screens keep the sidebar. */
.nav-more { display: none; }
.nav-extra { display: contents; }
@media (max-width: 899px) {
  .sidebar { padding: 8px 12px; gap: 8px; flex-wrap: nowrap; }
  .brand img { width: 30px; height: 30px; }
  .brand-words small { display: none; }
  .brand-row { flex: 1; min-width: 0; }
  .side-foot .who strong { display: none; }
  .side-foot .avatar { width: 30px; height: 30px; font-size: 11px; }
  .side-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; width: auto; order: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
    overflow: visible; background: var(--side-bg); border-top: 1px solid var(--side-line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .side-nav > a, .nav-more { flex-direction: column; justify-content: center; gap: 2px; padding: 6px 2px; min-height: 52px; font-size: 11px; border-radius: 10px; position: relative; }
  .side-nav > a[aria-current="page"], .nav-more.is-current { box-shadow: none; background: var(--side-active); }
  .side-nav > a .count { position: absolute; top: 2px; right: 14%; margin: 0; padding: 0 6px; font-size: 10px; }
  .nav-more { display: flex; align-items: center; background: none; border: 0; color: var(--side-text); cursor: pointer; font: inherit; font-size: 11px; }
  .nav-more svg { width: 18px; height: 18px; }
  .nav-more.is-current { color: var(--side-strong); font-weight: 600; }
  .nav-more.is-current svg { color: var(--lime); }
  .side-nav:has(.nav-extra .count:not([hidden])) .nav-more::after { content: ""; position: absolute; top: 6px; right: 28%; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
  .nav-extra { display: none; position: absolute; right: 8px; bottom: calc(100% + 8px); min-width: 220px; padding: 6px; border: 1px solid var(--side-line); border-radius: 14px;
    background: var(--side-bg); box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
  .side-nav.more-open .nav-extra { display: grid; gap: 2px; }
  .nav-extra a { min-height: 44px; }
  .coach-main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  body:has(.side-nav) .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .notify-panel { top: 56px; }
  /* Client tabs: a soft fade on the right shows there are more tabs to swipe to. */
  .tabs { padding-right: 40px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
  /* Week switch: arrows and the week list on one row. */
  .week-switch { flex-wrap: wrap; }
  .week-switch .button.week-back { flex: 1 1 100%; }
  .week-switch .wk-word { display: none; }
  .week-switch .button { padding-left: 14px; padding-right: 14px; flex: none; }
  .week-switch .week-pick { flex: 1 1 0; }
}
