@font-face {
  font-family: "IBM Plex Sans Thai";
  src: url("/fonts/IBMPlexSansThai-Regular.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "IBM Plex Sans Thai";
  src: url("/fonts/IBMPlexSansThai-SemiBold.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 600;
}

@font-face {
  font-family: "IBM Plex Sans Thai";
  src: url("/fonts/IBMPlexSansThai-Bold.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

:root {
  color-scheme: dark;
  --bg: oklch(0.105 0.006 78);
  --surface: oklch(0.145 0.007 78);
  --surface-2: oklch(0.18 0.008 78);
  --surface-3: oklch(0.22 0.009 78);
  --line: oklch(0.255 0.007 78);
  --line-strong: oklch(0.35 0.009 78);
  --text: oklch(0.965 0.006 88);
  --muted: oklch(0.72 0.01 82);
  --soft: oklch(0.59 0.009 82);
  --red: oklch(0.67 0.12 34);
  --green: oklch(0.7 0.09 146);
  --amber: oklch(0.75 0.09 82);
  --blue: oklch(0.69 0.075 244);
  --danger: oklch(0.67 0.15 28);
  --quiet-accent: oklch(0.73 0.075 143);
  --quiet-accent-soft: oklch(0.3 0.03 143);
  --quiet-warm: oklch(0.77 0.075 78);
  --quiet-surface: oklch(0.14 0.006 78);
  --quiet-surface-2: oklch(0.175 0.007 78);
  --quiet-line: oklch(0.27 0.007 78);
  --radius: 10px;
  --font: "IBM Plex Sans Thai", "Avenir Next", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
  overflow-x: hidden;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid color-mix(in oklch, var(--red), white 12%);
  outline-offset: 1px;
}

.app-header,
main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 20px;
}

.brand-lockup {
  display: grid;
  gap: 3px;
}

.brand-lockup span {
  color: var(--soft);
  font-size: 12px;
  font-weight: 600;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 22px;
  font-weight: 750;
  line-height: 1.1;
}

h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.tab {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
}

.tab.is-active {
  color: var(--text);
  background: var(--surface-3);
}

main {
  padding-bottom: 40px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.58fr);
  align-items: start;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.surface {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.section-pad {
  padding: 24px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-head h3 {
  margin-bottom: 0;
}

.checkin-section-head {
  align-items: start;
}

.checkin-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.checkin-date-panel {
  margin: -2px 0 14px;
}

.checkin-date-strip {
  display: grid;
  grid-auto-columns: minmax(104px, 1fr);
  grid-auto-flow: column;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scroll-snap-type: x proximity;
}

.checkin-date-button {
  display: grid;
  min-height: 74px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface-2);
  text-align: left;
  scroll-snap-align: start;
}

.checkin-date-button span,
.checkin-date-button small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.checkin-date-button strong {
  font-size: 16px;
  line-height: 1.2;
}

.checkin-date-button.is-complete {
  border-color: color-mix(in oklch, var(--green), black 10%);
  background: color-mix(in oklch, var(--surface-2), var(--green) 12%);
}

.checkin-date-button.is-complete small {
  color: var(--green);
}

.checkin-date-button.is-partial {
  border-color: color-mix(in oklch, var(--amber), black 12%);
  background: color-mix(in oklch, var(--surface-2), var(--amber) 10%);
}

.checkin-date-button.is-partial small {
  color: var(--amber);
}

.checkin-date-button.is-missing {
  border-color: color-mix(in oklch, var(--danger), black 8%);
  background: color-mix(in oklch, var(--surface-2), var(--danger) 10%);
}

.checkin-date-button.is-missing small {
  color: color-mix(in oklch, var(--danger), white 18%);
}

.checkin-date-button.is-selected {
  box-shadow: inset 0 0 0 2px var(--text);
}

.section-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-toolbar h3 {
  margin-bottom: 0;
}

.section-meta {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.add-client-panel {
  margin-bottom: 14px;
  border-color: color-mix(in oklch, var(--line), var(--blue) 28%);
  background: color-mix(in oklch, var(--surface), var(--blue) 4%);
}

.add-client-panel h3 {
  margin-bottom: 0;
}

.add-client-form {
  margin-top: 16px;
}

.add-client-form-actions,
.add-client-success-actions {
  justify-content: flex-end;
}

.add-client-form-actions .primary {
  width: min(100%, 240px);
}

.add-client-success {
  border-color: color-mix(in oklch, var(--line), var(--green) 32%);
  background: color-mix(in oklch, var(--surface), var(--green) 5%);
}

.private-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}

.private-link-row input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface-2);
  font-size: 13px;
}

.quickview-private-link {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.quickview-private-link .private-link-row {
  margin-top: 0;
}

.quickview-private-link .private-link-row input {
  font-size: 11px;
}

.remote-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.coach-meta-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.coach-meta-pill {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.coach-meta-pill span {
  color: var(--muted);
  font-size: 12px;
}

.coach-meta-pill strong {
  font-size: 14px;
  line-height: 1.35;
}

.client-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.client-switch select,
.field input:not([type="checkbox"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface-2);
  transition: border-color 160ms cubic-bezier(0.22, 1, 0.36, 1), background-color 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.field input:not([type="checkbox"]):hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--line-strong);
}

.field input:not([type="checkbox"]):focus,
.field select:focus,
.field textarea:focus {
  border-color: color-mix(in oklch, var(--red), white 8%);
}

.client-switch select {
  min-width: 170px;
  padding: 0 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.target-history {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.target-history-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.target-history-list {
  display: grid;
  gap: 8px;
}

.target-history-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.target-history-time {
  color: var(--muted);
  font-size: 12px;
}

.target-history-values {
  font-size: 13px;
  line-height: 1.4;
}

.target-history-cardio {
  color: var(--blue);
  font-size: 12px;
  line-height: 1.4;
}

.decision-input {
  min-height: 74px;
}

.decision-history-note {
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.decision-history-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.decision-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid color-mix(in oklch, var(--line), var(--red) 16%);
  border-radius: 999px;
  color: var(--text);
  background: color-mix(in oklch, var(--surface-3), var(--red) 8%);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.field span,
.field-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.field-hint {
  color: color-mix(in oklch, var(--muted), var(--text) 12%);
  font-size: 12px;
  line-height: 1.35;
}

.nutrition-bank-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 0;
  margin-top: 2px;
  padding: 20px 0 2px;
  border-top: 1px solid var(--line);
}

.weekly-summary-head {
  display: flex;
  align-items: center;
  min-height: 26px;
  padding-bottom: 14px;
}

.weekly-summary-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
}

.weekly-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.weekly-metric {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 0 20px;
  border-left: 1px solid var(--line);
}

.weekly-metric:first-child {
  padding-left: 0;
  border-left: 0;
}

.weekly-metric:last-child {
  padding-right: 0;
}

.weekly-metric-top {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.weekly-metric-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.weekly-metric-label::before {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--metric-color);
  content: "";
}

.weekly-metric-top strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.25;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-metric-top strong span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.weekly-metric-state,
.progress-habit-state {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.weekly-metric-state[data-state="ok"],
.progress-habit-state[data-state="ok"] {
  color: var(--green);
}

.weekly-metric-state[data-state="under"],
.progress-habit-state[data-state="under"] {
  color: var(--amber);
}

.weekly-metric-state[data-state="over"],
.progress-habit-state[data-state="over"] {
  color: var(--danger);
}

.weekly-metric-bar {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in oklch, var(--surface-3), black 10%);
}

.weekly-metric-bar span {
  display: block;
  width: var(--metric-fill, 0%);
  height: 100%;
  border-radius: inherit;
}

.weekly-metric-red { --metric-color: color-mix(in oklch, var(--red), white 12%); }
.weekly-metric-green { --metric-color: var(--green); }
.weekly-metric-blue { --metric-color: var(--blue); }
.weekly-metric-bar span { background: var(--metric-color); }

@media (prefers-reduced-motion: reduce) {
  .weekly-metric-bar span,
  .progress-habit-fill { transition: none; }
}

.field input:not([type="checkbox"]),
.field select,
.field textarea {
  padding: 10px 11px;
}

.field input[type="number"] {
  appearance: textfield;
}

.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.field .number-control {
  position: relative;
  display: block;
  color: var(--text);
  font-size: inherit;
}

.field .number-control input {
  padding-right: 44px;
}

.field .number-control.has-uncertain-toggle input {
  padding-right: 116px;
}

.number-control.is-uncertain input {
  color: var(--muted);
  background: color-mix(in oklch, var(--surface-2), black 10%);
}

.number-uncertain-toggle {
  position: absolute;
  top: 50%;
  right: 40px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in oklch, var(--surface-3), black 8%);
  transform: translateY(-50%);
  cursor: pointer;
}

.number-uncertain-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.number-uncertain-toggle span {
  color: inherit;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.number-uncertain-toggle:has(input:checked) {
  border-color: color-mix(in oklch, var(--amber), black 15%);
  color: oklch(0.2 0 0);
  background: var(--amber);
}

.number-stepper {
  position: absolute;
  right: 8px;
  top: 50%;
  display: grid;
  width: 26px;
  overflow: hidden;
  border-radius: 6px;
  transform: translateY(-50%);
}

.number-stepper-button {
  height: 16px;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: var(--text);
  background: color-mix(in oklch, var(--line), transparent 35%);
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
}

.number-stepper-button:hover {
  background: color-mix(in oklch, var(--line), var(--text) 10%);
}

.weight-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  align-items: end;
  padding: 12px;
  background: color-mix(in oklch, black, transparent 28%);
}

.weight-picker-sheet {
  display: grid;
  gap: 14px;
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: color-mix(in oklch, var(--surface), black 3%);
  box-shadow: 0 8px 24px color-mix(in oklch, black, transparent 55%);
}

.weight-picker-head,
.weight-picker-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.weight-picker-head strong {
  font-size: 18px;
}

.weight-picker-wheel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 0.8fr;
  align-items: center;
  gap: 10px;
  min-height: 260px;
  overflow: hidden;
}

.weight-picker-highlight {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 58px;
  border-radius: var(--radius);
  background: var(--surface-2);
  transform: translateY(-50%);
}

.weight-picker-column {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
  max-height: 238px;
  overflow-y: auto;
  padding: 96px 0;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.weight-picker-column::-webkit-scrollbar {
  display: none;
}

.weight-picker-option {
  display: grid;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.58;
  scroll-snap-align: center;
  transition: color 160ms ease, font-size 160ms ease, opacity 160ms ease;
}

.weight-picker-option.is-selected {
  color: var(--text);
  font-size: 40px;
  opacity: 1;
}

.weight-picker-unit {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: 34px;
  font-weight: 700;
}

.weight-picker-preview {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.weight-picker-actions .secondary,
.weight-picker-actions .primary {
  min-width: 0;
  flex: 1;
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.check-card {
  align-items: center;
  min-height: 52px;
  padding: 0 14px;
  transition: border-color 160ms cubic-bezier(0.22, 1, 0.36, 1), background-color 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.check input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  margin-top: 0;
  accent-color: var(--red);
}

.check-card:has(input:checked) {
  border-color: color-mix(in oklch, var(--red), var(--line) 35%);
  background: color-mix(in oklch, var(--surface-2), var(--red) 7%);
}

.check-copy {
  display: grid;
  gap: 4px;
}

.check-copy strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.check-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.cardio-week-status {
  color: color-mix(in oklch, var(--red), white 16%) !important;
  font-weight: 700;
}

.cardio-week-status.is-complete {
  color: var(--green) !important;
}

.detail-panel {
  padding: 0;
  border: 0;
  background: transparent;
}

.cardio-zones {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.cardio-plan-editor {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cardio-plan-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.cardio-plan-toggle input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 2px 0 0;
}

.cardio-plan-toggle > span {
  display: grid;
  gap: 2px;
}

.cardio-plan-toggle small {
  color: var(--muted);
  font-size: 12px;
}

.cardio-plan-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.choice-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  transition: background-color 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.choice-card + .choice-card {
  border-top: 1px solid var(--line);
}

.choice-card-main {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 14px 16px;
  cursor: pointer;
}

.choice-card-main input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  margin-top: 2px;
  justify-self: start;
  accent-color: var(--red);
}

.choice-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.choice-copy strong {
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
}

.choice-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.choice-card:has(input:checked) {
  background: color-mix(in oklch, var(--surface-2), var(--red) 6%);
}

.cardio-zone-duration {
  margin: 0 16px 14px 45px;
}

.cardio-zone-duration select {
  min-height: 46px;
  background: var(--surface-3);
}

.cardio-zone-duration[hidden] {
  display: none;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.primary {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius);
  color: white;
  background: var(--red);
  font-weight: 750;
  transition: background-color 160ms cubic-bezier(0.22, 1, 0.36, 1), transform 120ms cubic-bezier(0.22, 1, 0.36, 1);
}

.primary:hover:not(:disabled) {
  background: color-mix(in oklch, var(--red), white 7%);
}

.primary:active:not(:disabled) {
  transform: translateY(1px);
}

.primary[data-daily-submit] {
  grid-column: 1 / -1;
  justify-self: end;
  width: min(100%, 220px);
}

.primary:disabled {
  color: color-mix(in oklch, var(--text), black 22%);
  background: color-mix(in oklch, var(--green), black 28%);
  cursor: default;
}

.secondary {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface-2);
}

.progress-weight-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.progress-weight-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.progress-data-note {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.progress-weight-value {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.progress-weight-value strong {
  font-size: 40px;
  line-height: 1;
}

.progress-weight-value span {
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.progress-weight-statuses {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.progress-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-3);
  font-size: 12px;
  font-weight: 700;
}

.progress-status strong {
  color: var(--text);
  font-size: 14px;
}

.progress-status.good {
  border-color: color-mix(in oklch, var(--green), var(--line) 68%);
  color: var(--green);
}

.progress-status.warn {
  border-color: color-mix(in oklch, var(--amber), var(--line) 68%);
  color: var(--amber);
}

.progress-status.danger {
  border-color: color-mix(in oklch, var(--danger), var(--line) 68%);
  color: color-mix(in oklch, var(--danger), white 14%);
}

.progress-habits {
  margin-top: 14px;
  padding: 22px 24px 24px;
  border-color: oklch(0.255 0.01 35);
  background: oklch(0.13 0.006 35);
}

.progress-habits h3 {
  margin-bottom: 20px;
}

.progress-habit-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.progress-habit-row {
  --habit-color: oklch(0.72 0.08 55);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: end;
  gap: 16px 12px;
  min-width: 0;
  padding: 0 22px 2px;
  border-left: 1px solid oklch(0.255 0.01 35);
}

.progress-habit-red {
  --habit-color: oklch(0.72 0.105 55);
}

.progress-habit-row:first-child {
  padding-left: 0;
  border-left: 0;
}

.progress-habit-green {
  --habit-color: oklch(0.72 0.07 150);
}

.progress-habit-blue,
.progress-habit-amber {
  --habit-color: oklch(0.7 0.075 245);
}

.progress-habit-cardio {
  --habit-color: oklch(0.72 0.08 320);
}

.progress-habit-cardio-activity {
  align-items: center;
}

.progress-habit-activity-note {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.progress-habit-name {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.progress-habit-name::before {
  width: 3px;
  height: 30px;
  flex: 0 0 3px;
  border-radius: 999px;
  background: var(--habit-color);
  content: "";
}

.progress-habit-name > span {
  display: grid;
  gap: 1px;
}

.progress-habit-name strong {
  font-size: 14px;
}

.progress-habit-name small,
.progress-habit-value span {
  color: var(--muted);
  font-size: 11px;
}

.progress-habit-value {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}

.progress-habit-value strong {
  font-size: 19px;
}

.progress-habit-track {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 2;
  height: 10px;
  overflow: visible;
  border-radius: 999px;
  background: oklch(0.185 0.008 35);
  box-shadow: inset 0 0 0 1px oklch(0.235 0.01 35);
}

.progress-habit-track::after {
  position: absolute;
  top: -4px;
  right: 0;
  bottom: -4px;
  width: 1px;
  background: oklch(0.52 0.018 35);
  content: "";
}

.progress-habit-fill {
  position: relative;
  display: block;
  height: 6px;
  top: 2px;
  border-radius: inherit;
  background: var(--habit-color);
}

.progress-habit-fill::after {
  position: absolute;
  top: 50%;
  right: -5px;
  width: 10px;
  height: 10px;
  border: 2px solid oklch(0.13 0.006 35);
  border-radius: 50%;
  background: var(--habit-color);
  content: "";
  transform: translateY(-50%);
}

.weight-quality-note {
  position: relative;
  width: fit-content;
  margin-top: 6px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
}

.weight-quality-note summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
}

.weight-quality-note summary::-webkit-details-marker {
  display: none;
}

.weight-quality-note strong {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 50%;
  color: oklch(0.16 0 0);
  background: var(--amber);
  font-size: 11px;
  line-height: 1;
}

.weight-quality-popover {
  position: absolute;
  z-index: 4;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  gap: 4px;
  width: max-content;
  max-width: min(300px, 80vw);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: color-mix(in oklch, var(--surface), black 8%);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.28);
  font-weight: 500;
}

.weight-quality-popover span + span {
  color: var(--text);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.metric-stack {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.metric-stack .metric-grid {
  margin-top: 0;
}

.metric {
  min-height: 92px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.metric-button {
  width: 100%;
  color: inherit;
  background: var(--surface-2);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.metric-button:hover:not(:disabled) {
  background: color-mix(in oklch, var(--surface-2), white 4%);
}

.metric-button.is-active {
  border-color: color-mix(in oklch, var(--line), var(--blue) 22%);
  background: color-mix(in oklch, var(--surface-3), var(--blue) 12%);
}

.metric-button:disabled {
  cursor: default;
}

.metric-context {
  min-height: 84px;
  display: grid;
  align-content: center;
  gap: 4px;
  background: var(--surface);
}

.metric-context .metric-value {
  font-size: 22px;
}

.metric-detail {
  color: var(--soft);
  font-size: 12px;
}

.metric-label,
.metric-note {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric-value {
  display: block;
  margin: 6px 0 4px;
  font-size: 24px;
  line-height: 1;
}

.dashboard-decision-strip {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dashboard-decision-strip-lean {
  align-items: center;
}

.dashboard-decision-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dashboard-decision-label {
  display: block;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.dashboard-decision-title {
  display: block;
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.2;
}

.dashboard-decision-copy .small {
  margin-bottom: 0;
  max-width: 48ch;
  line-height: 1.45;
}

.dashboard-decision-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  align-items: center;
  gap: 8px;
}

.dashboard-decision-tags-primary {
  min-width: min(100%, 440px);
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-2);
  font-size: 12px;
  white-space: nowrap;
}

.summary-pill:disabled {
  cursor: default;
}

.summary-pill strong {
  font-size: 13px;
}

.summary-pill.is-leading {
  border-color: color-mix(in oklch, var(--line), var(--red) 20%);
  background: color-mix(in oklch, var(--surface-3), var(--red) 8%);
}

.summary-pill.is-active {
  border-color: color-mix(in oklch, var(--line), var(--blue) 22%);
  background: color-mix(in oklch, var(--surface-3), var(--blue) 12%);
}

.summary-pill.is-empty {
  color: var(--soft);
}

.client-list {
  display: grid;
  gap: 6px;
}

.client-list-head {
  display: grid;
  grid-template-columns: 220px minmax(420px, 1fr) 300px;
  align-items: center;
  gap: 14px;
  padding: 0 12px 2px;
  color: var(--soft);
  font-size: 11px;
  line-height: 1.2;
}

.client-list-head-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 10px;
}

.coach-detail-layout {
  display: grid;
  gap: 14px;
}

.coach-detail-layout.has-panel {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  align-items: start;
}

.coach-list-section {
  scroll-margin-top: 14px;
  transition: border-color 180ms ease, background 180ms ease;
}

.coach-list-section.is-jump-focus {
  border-color: color-mix(in oklch, var(--line), var(--blue) 28%);
  background: color-mix(in oklch, var(--surface), var(--blue) 6%);
}

.client-row {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.client-row.is-active {
  border-color: color-mix(in oklch, var(--line), var(--blue) 22%);
  background: color-mix(in oklch, var(--surface), var(--blue) 6%);
}

.client-row-main {
  display: grid;
  grid-template-columns: 220px minmax(420px, 1fr) 300px;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  padding: 9px 12px;
  border: 0;
  border-radius: 5px;
  color: inherit;
  background: transparent;
  text-align: left;
}

.client-row-main:hover {
  background: color-mix(in oklch, var(--surface), white 4%);
}

.coach-quickview {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.coach-quickview-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.coach-quickview-head h3,
.coach-quickview-head p {
  margin-bottom: 0;
}

.coach-quickview-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

.quickview-snapshot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.quickview-snapshot-item {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 10px;
  background: var(--surface-2);
}

.quickview-snapshot-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.quickview-snapshot-item span,
.quickview-snapshot-item small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.quickview-snapshot-item strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
}

.priority-reasons {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.priority-reasons-head {
  margin-bottom: 0;
}

.priority-reason-block {
  display: grid;
  gap: 8px;
}

.priority-reason-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.priority-reason-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.priority-reason-row {
  display: grid;
  grid-template-columns: minmax(76px, 0.8fr) minmax(76px, 0.7fr) minmax(0, 1.5fr);
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 10px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}

.priority-reason-row:first-child {
  border-top: 0;
}

.priority-reason-row.is-active {
  background: color-mix(in oklch, var(--amber), var(--surface-2) 88%);
}

.priority-reason-row span,
.priority-reason-row small {
  color: var(--muted);
}

.priority-reason-row strong {
  color: var(--text);
  font-size: 15px;
}

.priority-reason-row small {
  font-size: 12px;
  line-height: 1.35;
}

.quickview-message {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.quickview-disclosure {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.quickview-disclosure summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer;
  list-style: none;
}

.quickview-disclosure summary::-webkit-details-marker {
  display: none;
}

.quickview-disclosure summary::after {
  content: "เปิด";
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.quickview-disclosure[open] summary::after {
  content: "ปิด";
}

.quickview-disclosure summary span {
  grid-column: 1;
  font-weight: 700;
}

.quickview-disclosure summary small {
  grid-column: 1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.quickview-disclosure-body {
  padding-top: 10px;
}

.coach-quickview-form {
  grid-template-columns: minmax(0, 1fr);
}

.coach-quickview-form .cardio-plan-fields {
  grid-template-columns: minmax(0, 1fr);
}

.coach-quickview-form .inline-actions .secondary {
  width: 100%;
}

.coach-quickview-actions {
  justify-content: flex-end;
}

.coach-notice {
  display: grid;
  gap: 3px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid color-mix(in oklch, var(--green), var(--line) 64%);
  background: color-mix(in oklch, var(--surface), var(--green) 7%);
}

.coach-notice strong {
  color: var(--text);
  font-size: 13px;
}

.coach-notice span {
  color: var(--muted);
  font-size: 12px;
}

.quickview-danger-zone summary {
  border-color: color-mix(in oklch, var(--danger), var(--line) 64%);
}

.quickview-danger-zone summary span,
.quickview-danger-zone summary::after {
  color: color-mix(in oklch, var(--danger), white 18%);
}

.archive-confirmation {
  display: grid;
  gap: 8px;
}

.archive-confirmation p {
  margin: 0;
}

.archive-confirmation .danger-action {
  width: 100%;
  margin-top: 2px;
}

.no-client-state {
  max-width: 560px;
  margin: 24px auto 0;
}

.no-client-state h2 {
  margin: 6px 0 8px;
  font-size: 26px;
}

.client-row-identity {
  min-width: 0;
}

.client-row-identity strong {
  display: block;
  margin-bottom: 2px;
  font-size: 16px;
  line-height: 1.25;
}

.row-decision-brief {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-decision-brief .decision-tag {
  flex-shrink: 0;
}

.client-row-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 10px;
  min-width: 0;
}

.row-stat {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.row-stat span {
  display: none;
}

.row-stat strong {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

.row-stat.good strong {
  color: var(--green);
}

.row-stat.warn strong {
  color: var(--amber);
}

.row-stat.danger strong {
  color: color-mix(in oklch, var(--danger), white 14%);
}

.client-row-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: start;
  gap: 6px;
  min-width: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in oklch, var(--surface-2), black 8%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.status-pill.good {
  border-color: color-mix(in oklch, var(--line), var(--green) 32%);
  color: var(--green);
}

.status-pill.info {
  border-color: color-mix(in oklch, var(--line), var(--blue) 34%);
  color: var(--blue);
}

.status-pill.warn {
  border-color: color-mix(in oklch, var(--line), var(--amber) 34%);
  color: var(--amber);
}

.status-pill.danger {
  border-color: color-mix(in oklch, var(--line), var(--danger) 36%);
  color: color-mix(in oklch, var(--danger), white 16%);
}

.row-followup {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
}

.row-followup-copytext {
  min-width: 0;
}

.row-followup-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.row-followup-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.row-followup-manual {
  width: 100%;
  min-height: 82px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface-2);
  line-height: 1.5;
  resize: vertical;
}

.row-followup-copy {
  flex-shrink: 0;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 600;
}

.coach-quickview-followup {
  padding: 0;
  border-top: 0;
}

.coach-quickview-followup .row-followup-copy {
  min-width: 74px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 6px;
  align-content: start;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-3);
  font-size: 12px;
  white-space: nowrap;
}

.badge.good {
  color: oklch(0.13 0 0);
  background: var(--green);
}

.badge.warn {
  color: oklch(0.13 0 0);
  background: var(--amber);
}

.badge.danger {
  background: color-mix(in oklch, var(--danger), black 20%);
}

.chart-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 10px;
}

.progress-chart-section {
  margin-top: 14px;
  padding: 22px 24px 20px;
  border-color: oklch(0.245 0.006 25);
  background: oklch(0.118 0.004 25);
}

.progress-chart-section .segmented-control {
  border-color: transparent;
  background: oklch(0.175 0.006 25);
}

.progress-chart-section .segment.is-active {
  background: oklch(0.235 0.008 25);
}

.chart-title-group {
  position: relative;
}

.chart-head h3,
.chart-head p {
  margin-bottom: 0;
}

.chart-date-range {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.chart-range-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2px;
}

.segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.segment {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  white-space: nowrap;
}

.segment.is-active {
  color: var(--text);
  background: var(--surface-3);
}

.chart-stat {
  display: grid;
  justify-items: end;
  gap: 3px;
  min-width: 160px;
}

.chart-stat > span {
  color: var(--soft);
  font-size: 11px;
  font-weight: 700;
}

.chart-stat strong {
  font-size: 24px;
  line-height: 1;
}

.chart-stat small {
  color: var(--muted);
  font-size: 12px;
}

.chart-frame {
  position: relative;
  padding-top: 4px;
}

.weight-chart-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
}

.chart-grid-line {
  stroke: oklch(0.275 0.006 25);
  stroke-width: 0.65;
  vector-effect: non-scaling-stroke;
}

.chart-y-label,
.chart-x-label {
  fill: var(--soft);
  font-size: 9px;
  font-weight: 600;
}

.chart-line {
  fill: none;
  stroke: oklch(0.82 0.018 55);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: miter;
  vector-effect: non-scaling-stroke;
}

.chart-point {
  --point-opacity: 0.3;
  fill: oklch(0.78 0.01 25);
  stroke: oklch(0.78 0.01 25);
  stroke-width: 0.75;
  opacity: var(--point-opacity);
  transform-box: fill-box;
  transform-origin: center;
  transition: fill 160ms ease-out, stroke 160ms ease-out;
  vector-effect: non-scaling-stroke;
}

#view-client.is-active .chart-line {
  animation: weight-line-draw 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

#view-client.is-active .chart-point.is-checkpoint {
  animation: weight-checkpoint-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--point-delay, 90ms);
}

.chart-point.is-checkpoint {
  --point-opacity: 0.68;
}

.chart-point-hit {
  fill: transparent;
}

.chart-node {
  cursor: pointer;
}

.chart-node:focus-visible {
  outline: none;
}

.chart-node:focus-visible .chart-point-hit,
.chart-node:hover .chart-point-hit {
  fill: oklch(0.82 0.018 55 / 0.035);
}

.chart-node:focus-visible .chart-point,
.chart-node:hover .chart-point {
  fill: oklch(0.82 0.012 25);
  stroke: oklch(0.82 0.012 25);
  opacity: 1;
  transform: scale(1.7);
}

.chart-point.is-latest {
  --point-opacity: 1;
  fill: oklch(0.78 0.085 62);
  stroke: oklch(0.78 0.085 62);
}

@keyframes weight-line-draw {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0); }
}

@keyframes weight-checkpoint-in {
  from {
    opacity: 0;
    transform: scale(0.35);
  }
  to {
    opacity: var(--point-opacity);
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  #view-client.is-active .chart-line,
  #view-client.is-active .chart-point.is-checkpoint {
    animation: none;
  }

  .chart-point { transition: none; }
}

.chart-tooltip {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 2px;
  min-width: 148px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: color-mix(in oklch, var(--surface), black 8%);
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 10px));
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.24);
}

.chart-tooltip strong {
  font-size: 13px;
  line-height: 1.2;
}

.chart-tooltip span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.chart-tooltip[data-placement="below"] {
  transform: translate(-50%, 10px);
}

.chart-empty {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.status-line {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.status-line[data-tone="success"] {
  color: var(--green);
}

.status-line[data-tone="error"] {
  color: var(--danger);
}

.status-line[data-tone="loading"] {
  color: var(--muted);
}

.daily-saved-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  min-height: 40px;
  padding: 6px 8px;
  border: 1px solid color-mix(in oklch, var(--green), black 16%);
  border-radius: var(--radius);
  color: var(--text);
  background: color-mix(in oklch, var(--surface-2), var(--green) 12%);
}

.daily-saved-icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  color: oklch(0.15 0 0);
  background: var(--green);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.daily-saved-card strong,
.daily-saved-card span {
  display: block;
}

.daily-saved-card strong {
  font-size: 13px;
  line-height: 1.25;
}

.daily-saved-card span {
  color: color-mix(in oklch, var(--text), var(--green) 12%);
  font-size: 11px;
  line-height: 1.25;
}

.daily-saved-card.is-partial {
  border-color: color-mix(in oklch, var(--amber), black 16%);
  background: color-mix(in oklch, var(--surface-2), var(--amber) 10%);
}

.daily-saved-card.is-partial .daily-saved-icon {
  color: oklch(0.15 0 0);
  background: var(--amber);
}

.daily-saved-card.is-partial span {
  color: color-mix(in oklch, var(--text), var(--amber) 14%);
}

.daily-edit-button {
  min-height: 32px;
  padding: 0 9px;
  white-space: nowrap;
}

.invalid-state {
  display: grid;
  gap: 8px;
  place-items: start;
  max-width: 560px;
  margin: 40px auto 0;
}

.link-recovery-form {
  display: flex;
  gap: 8px;
  width: min(100%, 460px);
  margin-top: 4px;
}

.link-recovery-form input {
  min-width: 0;
  flex: 1;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface-2);
}

.link-recovery-form .primary {
  flex: 0 0 auto;
}

.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;
}

@media (max-width: 860px) {
  .app-header {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  .tabs {
    display: flex;
    width: 100%;
  }

  .tab {
    min-width: 0;
    flex: 1;
  }

  .toolbar-actions {
    width: 100%;
  }

  .private-link-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .add-client-form-actions .primary {
    width: 100%;
  }

  .grid.two,
  .grid.three,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-decision-strip {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }

  .dashboard-decision-tags {
    width: 100%;
    justify-content: start;
  }

  .client-list-head {
    display: none;
  }

  .client-row-main {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 9px;
  }

  .client-row-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
  }

  .row-stat span {
    display: block;
    color: var(--soft);
    font-size: 11px;
    line-height: 1.2;
  }

  .client-row-status,
  .badges {
    justify-content: start;
  }

  .row-followup {
    flex-direction: column;
  }

  .row-followup-copy {
    width: fit-content;
  }

  .coach-detail-layout.has-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .coach-quickview {
    position: static;
  }

  .coach-quickview-head,
  .coach-quickview-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .coach-quickview-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .quickview-snapshot {
    grid-template-columns: minmax(0, 1fr);
  }

  .quickview-snapshot-item:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .priority-reason-row {
    grid-template-columns: minmax(68px, 0.75fr) minmax(68px, 0.75fr);
  }

  .priority-reason-row small {
    grid-column: 1 / -1;
  }

  .chart-head {
    align-items: start;
    flex-direction: column;
  }

  .chart-stat {
    justify-items: start;
  }

  .progress-weight-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .progress-weight-statuses {
    justify-content: flex-start;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .checkin-head-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .link-recovery-form {
    flex-direction: column;
  }

  .link-recovery-form .primary {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .app-header,
  main {
    width: min(100% - 20px, 1120px);
  }

  .form-grid,
  .checks,
  .detail-grid,
  .cardio-plan-fields {
    grid-template-columns: 1fr;
  }

  .section-pad {
    padding: 16px;
  }

  .progress-chart-section {
    padding: 16px 14px 14px;
  }

  .chart-head {
    gap: 12px;
  }

  .chart-stat {
    min-width: 0;
  }

  .chart-range-row {
    justify-content: flex-start;
    margin-top: 4px;
  }

  .progress-chart-section .segmented-control {
    width: 100%;
  }

  .progress-chart-section .segment {
    flex: 1;
  }

  .weight-chart-svg.is-compact .chart-y-label,
  .weight-chart-svg.is-compact .chart-x-label {
    font-size: 10px;
  }

  .checkin-section-head {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 12px;
  }

  .checkin-head-actions {
    width: auto;
    flex: 0 0 auto;
  }

  .weekly-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .weekly-metric,
  .weekly-metric:first-child,
  .weekly-metric:last-child {
    padding: 14px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .weekly-metric:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .weekly-metric:last-child {
    padding-bottom: 0;
  }

  .weekly-metric-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }

  .choice-card-main {
    padding: 14px;
  }

  .choice-copy strong,
  .choice-copy small {
    font-size: 14px;
  }

  .cardio-zone-duration {
    margin-right: 14px;
    margin-left: 43px;
  }

  .primary[data-daily-submit] {
    width: 100%;
    justify-self: stretch;
  }

  .progress-weight-summary,
  .progress-habits {
    padding-right: 14px;
    padding-left: 14px;
  }

  .progress-weight-value strong {
    font-size: 34px;
  }

  .progress-weight-statuses {
    width: 100%;
  }

  .progress-status {
    flex: 1 1 auto;
    justify-content: center;
  }

  .progress-habit-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 14px 0;
    border-top: 1px solid oklch(0.255 0.01 35);
    border-left: 0;
  }

  .progress-habit-row:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .progress-habit-name {
    grid-column: 1;
    grid-row: 1;
  }

  .progress-habit-value {
    grid-column: 2;
    grid-row: 1;
  }

  .progress-habit-track {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 4px;
  }

  .dashboard-decision-strip {
    gap: 8px;
  }

  .dashboard-decision-title {
    font-size: 16px;
    line-height: 1.25;
  }

  .dashboard-decision-copy .small {
    font-size: 12px;
  }

  .summary-pill {
    min-height: 44px;
    padding: 0 10px;
  }

  .tab {
    min-height: 44px;
    padding: 0 10px;
    font-size: 13px;
  }

  .secondary {
    min-height: 44px;
  }

  .field .number-control input {
    padding-right: 56px;
  }

  .field .number-control.has-uncertain-toggle input {
    padding-right: 132px;
  }

  .number-uncertain-toggle {
    right: 48px;
  }

  .number-stepper {
    right: 4px;
    width: 40px;
  }

  .number-stepper-button {
    height: 22px;
    min-height: 22px;
    font-size: 10px;
  }

  h1 {
    font-size: 24px;
  }
}

/* Quiet premium client check-in direction. Keep the delight contained here so
   the coach dashboard can stay dense and decision-focused. */
.checkin-page {
  width: min(100%, 900px);
  margin: 0 auto;
}

.checkin-page .checkin-toolbar {
  margin-bottom: 16px;
}

.checkin-page .checkin-toolbar h2 {
  margin-bottom: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
}

.checkin-surface {
  border-color: var(--quiet-line);
  border-radius: 16px;
  background: var(--quiet-surface);
}

.checkin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--quiet-line);
}

.checkin-date-block {
  display: grid;
  gap: 4px;
}

.checkin-kicker,
.checkin-intro-label,
.consistency-label {
  color: var(--soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.checkin-date-block strong {
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.checkin-page .checkin-head-actions {
  width: auto;
  margin: 0;
}

.checkin-page .checkin-head-actions .secondary {
  border-color: var(--quiet-line);
  background: transparent;
}

.checkin-page .checkin-head-actions .secondary:hover {
  border-color: var(--line-strong);
  background: var(--quiet-surface-2);
}

.checkin-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0 20px;
}

.checkin-intro > div:first-child {
  display: grid;
  gap: 5px;
}

.checkin-intro p {
  max-width: 38ch;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.checkin-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 2px 0;
}

.checkin-page .field-label {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.checkin-page .field input:not([type="checkbox"]),
.checkin-page .field select,
.checkin-page .field textarea {
  border-color: var(--quiet-line);
  background: var(--quiet-surface-2);
}

.checkin-page .field input:not([type="checkbox"]):hover,
.checkin-page .field select:hover,
.checkin-page .field textarea:hover,
.checkin-page .field input:not([type="checkbox"]):focus,
.checkin-page .field select:focus,
.checkin-page .field textarea:focus {
  border-color: var(--quiet-accent);
}

.checkin-page .number-stepper-button {
  color: var(--muted);
  background: color-mix(in oklch, var(--quiet-line), transparent 28%);
}

.checkin-page .number-stepper-button:hover {
  color: var(--text);
  background: color-mix(in oklch, var(--quiet-accent), var(--quiet-surface-2) 72%);
}

.checkin-page .number-uncertain-toggle:has(input:checked) {
  border-color: var(--quiet-warm);
  color: oklch(0.18 0.01 78);
  background: var(--quiet-warm);
}

.checkin-section-divider {
  height: 1px;
  margin: 4px 0 0;
  background: var(--quiet-line);
}

.checkin-page .checkin-activities {
  padding-top: 2px;
}

.checkin-page .check-card {
  min-height: 56px;
  border-color: var(--quiet-line);
  border-radius: 12px;
  background: transparent;
}

.checkin-page .check-card:hover {
  border-color: var(--line-strong);
  background: var(--quiet-surface-2);
}

.checkin-page .check-card:has(input:checked) {
  border-color: color-mix(in oklch, var(--quiet-accent), var(--quiet-line) 35%);
  background: color-mix(in oklch, var(--quiet-accent-soft), var(--quiet-surface) 72%);
}

.checkin-page .check input[type="checkbox"] {
  accent-color: var(--quiet-accent);
}

.checkin-page .check-copy strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
}

.checkin-page .cardio-zones {
  border-color: var(--quiet-line);
  border-radius: 12px;
  background: transparent;
}

.checkin-page .choice-card + .choice-card {
  border-color: var(--quiet-line);
}

.checkin-page .choice-card:has(input:checked) {
  background: color-mix(in oklch, var(--quiet-accent-soft), var(--quiet-surface) 68%);
}

.checkin-page .choice-card-main input[type="radio"] {
  accent-color: var(--quiet-accent);
}

.checkin-page .cardio-zone-duration select {
  background: var(--quiet-surface-2);
}

.checkin-page .nutrition-bank-card {
  margin-top: 4px;
  padding: 18px 0 2px;
  border-top-color: var(--quiet-line);
}

.checkin-page .weekly-summary-head strong {
  font-size: 13px;
  letter-spacing: 0.02em;
}

.checkin-page .weekly-metric-bar {
  height: 6px;
  background: color-mix(in oklch, var(--quiet-line), black 18%);
}

.checkin-page .weekly-metric-red { --metric-color: oklch(0.72 0.07 78); }
.checkin-page .weekly-metric-green { --metric-color: var(--quiet-accent); }
.checkin-page .weekly-metric-blue { --metric-color: oklch(0.72 0.06 220); }

.checkin-page .primary[data-daily-submit] {
  width: 100%;
  min-height: 52px;
  margin-top: 2px;
  border: 1px solid var(--text);
  border-radius: 12px;
  color: oklch(0.16 0.006 78);
  background: var(--text);
  letter-spacing: 0.01em;
}

.checkin-page .primary[data-daily-submit]:hover:not(:disabled) {
  color: oklch(0.16 0.006 78);
  background: color-mix(in oklch, var(--text), var(--quiet-accent) 12%);
}

.checkin-page .primary[data-daily-submit]:disabled {
  border-color: var(--quiet-line);
  color: var(--soft);
  background: var(--quiet-surface-2);
}

.checkin-page .status-line {
  margin-top: 8px;
}

.growth-status {
  --growth-tone: var(--soft);
  --growth-line: var(--line);
  --growth-badge-bg: var(--surface-2);
  --growth-badge-fg: var(--text);
  --growth-badge-muted: var(--muted);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 244px;
  contain: paint;
}

.growth-status.rank-2 {
  --growth-tone: color-mix(in oklch, var(--red), white 12%);
  --growth-line: color-mix(in oklch, var(--red), var(--line) 58%);
  --growth-badge-bg: color-mix(in oklch, var(--surface-2), var(--red) 8%);
}

.growth-status.rank-3 {
  --growth-tone: color-mix(in oklch, var(--red), white 6%);
  --growth-line: color-mix(in oklch, var(--red), var(--line) 35%);
  --growth-badge-bg: color-mix(in oklch, var(--surface-2), var(--red) 16%);
}

.growth-status.rank-4 {
  --growth-tone: var(--red);
  --growth-line: color-mix(in oklch, var(--red), white 10%);
  --growth-badge-bg: color-mix(in oklch, var(--surface-2), var(--red) 30%);
}

.growth-status.rank-5 {
  --growth-tone: var(--red);
  --growth-line: var(--red);
  --growth-badge-bg: var(--red);
  --growth-badge-fg: white;
  --growth-badge-muted: color-mix(in oklch, white, var(--red) 20%);
}

.growth-plant {
  --stem-from: 0.08;
  --stem-scale: 0.08;
  position: relative;
  width: 74px;
  height: 68px;
  flex: 0 0 74px;
}

.growth-plant::after {
  position: absolute;
  right: -14px;
  bottom: 17px;
  width: 18px;
  height: 1px;
  background: var(--growth-line);
  content: "";
}

.growth-plant.stage-1 { --stem-from: 0.08; --stem-scale: 0.34; }
.growth-plant.stage-2 { --stem-from: 0.34; --stem-scale: 0.46; }
.growth-plant.stage-3 { --stem-from: 0.46; --stem-scale: 0.58; }
.growth-plant.stage-4 { --stem-from: 0.58; --stem-scale: 0.7; }
.growth-plant.stage-5 { --stem-from: 0.7; --stem-scale: 0.8; }
.growth-plant.stage-6 { --stem-from: 0.8; --stem-scale: 0.9; }
.growth-plant.stage-7 { --stem-from: 0.9; --stem-scale: 1; }

.growth-stem {
  position: absolute;
  bottom: 19px;
  left: 35px;
  width: 3px;
  height: 44px;
  background: var(--growth-tone);
  transform: scaleY(var(--stem-scale));
  transform-origin: bottom;
}

.growth-leaf {
  --leaf-transform: rotate(-35deg);
  position: absolute;
  bottom: 31px;
  left: 35px;
  width: 17px;
  height: 9px;
  border-radius: 100% 0 100% 0;
  background: var(--growth-tone);
  opacity: 0;
  transform: var(--leaf-transform) scale(0.35);
  transform-origin: 0 100%;
}

.growth-leaf:nth-of-type(even) {
  --leaf-transform: rotate(35deg) scaleX(-1);
  left: 19px;
  transform-origin: 100% 100%;
}

.growth-leaf-2 { bottom: 36px; }
.growth-leaf-3 { bottom: 42px; }
.growth-leaf-4 { bottom: 47px; }
.growth-leaf-5 { bottom: 52px; }
.growth-leaf-6 { bottom: 56px; }

.stage-1 .growth-leaf-1,
.stage-2 .growth-leaf-1,
.stage-2 .growth-leaf-2,
.stage-3 .growth-leaf-1,
.stage-3 .growth-leaf-2,
.stage-3 .growth-leaf-3,
.stage-4 .growth-leaf-1,
.stage-4 .growth-leaf-2,
.stage-4 .growth-leaf-3,
.stage-4 .growth-leaf-4,
.stage-5 .growth-leaf-1,
.stage-5 .growth-leaf-2,
.stage-5 .growth-leaf-3,
.stage-5 .growth-leaf-4,
.stage-5 .growth-leaf-5,
.stage-6 .growth-leaf,
.stage-7 .growth-leaf {
  opacity: 1;
  transform: var(--leaf-transform) scale(1);
}

.growth-bloom {
  position: absolute;
  top: 5px;
  left: 28px;
  width: 18px;
  height: 17px;
  border-radius: 52% 48% 44% 56%;
  background: var(--growth-tone);
  box-shadow:
    -7px 5px 0 -1px var(--growth-tone),
    7px 5px 0 -1px var(--growth-tone);
  opacity: 0;
  transform: scale(0.4);
}

.stage-7 .growth-bloom {
  opacity: 1;
  transform: scale(1);
}

.growth-pot {
  position: absolute;
  bottom: 3px;
  left: 21px;
  width: 31px;
  height: 18px;
  background: color-mix(in oklch, var(--growth-tone), var(--surface-3) 48%);
  clip-path: polygon(4% 0, 96% 0, 82% 100%, 18% 100%);
}

.growth-pot i {
  position: absolute;
  top: 0;
  right: 3px;
  left: 3px;
  height: 3px;
  background: var(--growth-tone);
}

.watering-can {
  position: absolute;
  top: 2px;
  left: 47px;
  width: 22px;
  height: 15px;
  opacity: 0;
  transform: translateY(-4px) rotate(0deg);
  transform-origin: 4px 13px;
}

.watering-can i {
  position: absolute;
  inset: 2px 1px 1px 4px;
  background: var(--text);
}

.watering-can b {
  position: absolute;
  top: 0;
  right: -4px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--text);
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.watering-can em {
  position: absolute;
  top: 9px;
  left: -11px;
  width: 17px;
  height: 3px;
  background: var(--text);
  transform: rotate(-28deg);
  transform-origin: right center;
}

.water-drop {
  position: absolute;
  top: 18px;
  left: 37px;
  width: 5px;
  height: 8px;
  border-radius: 65% 35% 65% 35%;
  background: white;
  opacity: 0;
  transform: rotate(35deg) scale(0.45);
}

.water-drop-2 {
  top: 14px;
  left: 45px;
  width: 4px;
  height: 6px;
}

.growth-badge {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  min-width: 158px;
  padding: 9px 10px;
  overflow: hidden;
  border: 1px solid var(--growth-line);
  border-radius: 2px;
  color: var(--growth-badge-fg);
  background: var(--growth-badge-bg);
}

.growth-rank {
  display: flex;
  align-items: center;
  align-self: end;
  gap: 6px;
  min-width: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
}

.growth-rank i {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  background: var(--growth-tone);
  transform: rotate(45deg);
}

.growth-status.rank-5 .growth-rank i {
  background: white;
}

.growth-count {
  display: flex;
  grid-row: 1 / 3;
  grid-column: 2;
  align-items: baseline;
  align-self: center;
  gap: 2px;
}

.growth-count strong {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.growth-count span,
.growth-badge small {
  color: var(--growth-badge-muted);
  font-size: 9px;
}

.growth-badge small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes watering-can-pour {
  0% { opacity: 0; transform: translateY(-4px) rotate(0deg); }
  18% { opacity: 1; }
  48% { opacity: 1; transform: translateY(0) rotate(-17deg); }
  78% { opacity: 1; transform: translateY(0) rotate(-17deg); }
  100% { opacity: 0; transform: translateY(-2px) rotate(-10deg); }
}

@keyframes water-drop-fall {
  0% { opacity: 0; transform: translate(5px, -5px) rotate(35deg) scale(0.45); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(-3px, 25px) rotate(35deg) scale(0.9); }
}

@keyframes growth-stem-rise {
  from { transform: scaleY(var(--stem-from)); }
  to { transform: scaleY(var(--stem-scale)); }
}

@keyframes growth-leaf-open {
  from { opacity: 0.3; transform: var(--leaf-transform) scale(0.58); }
  to { opacity: 1; transform: var(--leaf-transform) scale(1); }
}

@keyframes growth-bloom-open {
  from { opacity: 0.25; transform: scale(0.45); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes growth-rank-up {
  0% { border-color: var(--growth-line); transform: scale(0.97); }
  55% { border-color: white; transform: scale(1.02); }
  100% { border-color: var(--growth-line); transform: scale(1); }
}

.growth-status.is-celebrating .watering-can {
  animation: watering-can-pour 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.growth-status.is-celebrating .water-drop {
  animation: water-drop-fall 360ms 170ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.growth-status.is-celebrating .water-drop-2 {
  animation-delay: 260ms;
}

.growth-status.is-celebrating .growth-stem {
  animation: growth-stem-rise 420ms 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.growth-status.is-celebrating .growth-leaf {
  animation: growth-leaf-open 360ms 330ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.growth-status.is-celebrating .growth-bloom {
  animation: growth-bloom-open 360ms 390ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.growth-status.is-ranking-up .growth-badge {
  animation: growth-rank-up 460ms 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .growth-status.is-celebrating .watering-can,
  .growth-status.is-celebrating .water-drop,
  .growth-status.is-celebrating .growth-stem,
  .growth-status.is-celebrating .growth-leaf,
  .growth-status.is-celebrating .growth-bloom,
  .growth-status.is-ranking-up .growth-badge {
    animation: none;
  }
}

@media (max-width: 560px) {
  .checkin-page {
    width: 100%;
  }

  .checkin-surface {
    padding: 18px;
  }

  .checkin-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .checkin-page .checkin-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .checkin-intro {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .checkin-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Weekly quota: one material track, one clear comparison, no metric rainbow. */
.checkin-page {
  --weekly-fill: oklch(0.82 0.018 84);
  --weekly-fill-hi: oklch(0.93 0.012 86);
  --weekly-track: oklch(0.205 0.006 78);
  --weekly-track-line: oklch(0.31 0.008 78);
  --weekly-copy: oklch(0.91 0.006 84);
  --weekly-secondary: oklch(0.67 0.008 82);
}

.checkin-page .nutrition-bank-card {
  margin-top: 14px;
  padding: 24px 0 8px;
  border-top-color: color-mix(in oklch, var(--quiet-line), white 9%);
}

.checkin-page .weekly-summary-head {
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-height: auto;
  padding-bottom: 16px;
}

.checkin-page .weekly-summary-heading {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.checkin-page .weekly-summary-head strong {
  color: var(--weekly-copy);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
}

.checkin-page .weekly-summary-context {
  color: var(--weekly-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.checkin-page .weekly-summary-history {
  flex: 0 0 auto;
  margin-top: 1px;
  padding: 5px 9px;
  border: 1px solid color-mix(in oklch, var(--weekly-fill), transparent 65%);
  border-radius: 999px;
  color: var(--weekly-fill-hi);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.checkin-page .weekly-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.checkin-page .weekly-metric,
.checkin-page .weekly-metric:first-child,
.checkin-page .weekly-metric:last-child {
  display: grid;
  grid-template-columns: minmax(98px, 0.2fr) minmax(160px, 1fr) max-content;
  grid-template-areas: "label bar value";
  align-items: center;
  column-gap: 22px;
  padding: 18px 0;
  border: 0;
  border-top: 1px solid color-mix(in oklch, var(--quiet-line), black 12%);
}

.checkin-page .weekly-metric:first-child {
  padding-top: 8px;
  border-top: 0;
}

.checkin-page .weekly-metric:last-child {
  padding-bottom: 2px;
}

.checkin-page .weekly-metric-top {
  display: contents;
}

.checkin-page .weekly-metric-label {
  grid-area: label;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--weekly-copy);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.checkin-page .weekly-metric-label::before {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--weekly-fill);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--weekly-fill), transparent 86%);
}

.checkin-page .weekly-metric-top strong {
  grid-area: value;
  color: var(--weekly-copy);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.checkin-page .weekly-metric-top strong span {
  color: var(--weekly-secondary);
  font-size: 13px;
  font-weight: 400;
}

.checkin-page .weekly-metric-bar {
  position: relative;
  grid-area: bar;
  height: 16px;
  min-width: 0;
  padding: 2px;
  overflow: hidden;
  border: 1px solid var(--weekly-track-line);
  border-radius: 999px;
  background: var(--weekly-track);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06);
}

.checkin-page .weekly-metric-bar span {
  position: relative;
  display: block;
  width: var(--metric-fill, 0%);
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--weekly-fill-hi), var(--weekly-fill));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.42), 0 0 0 1px rgb(255 255 255 / 0.04);
  animation: weekly-bar-fill 820ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.checkin-page .weekly-metric-bar span::after {
  position: absolute;
  top: 1px;
  right: 4px;
  width: 3px;
  height: calc(100% - 2px);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.52);
  content: "";
}

.checkin-page .weekly-metric[data-state="over"] .weekly-metric-top strong {
  color: var(--weekly-copy);
}

@keyframes weekly-bar-fill {
  from { width: 0; }
  to { width: var(--metric-fill, 0%); }
}

@media (max-width: 560px) {
  .checkin-page .weekly-summary-head {
    align-items: flex-start;
  }

  .checkin-page .weekly-summary-context {
    font-size: 11px;
  }

  .checkin-page .weekly-metric,
  .checkin-page .weekly-metric:first-child,
  .checkin-page .weekly-metric:last-child {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-areas:
      "label value"
      "bar bar";
    row-gap: 11px;
    column-gap: 12px;
    padding: 16px 0;
  }

  .checkin-page .weekly-metric:first-child {
    padding-top: 8px;
  }

  .checkin-page .weekly-metric:last-child {
    padding-bottom: 2px;
  }

  .checkin-page .weekly-metric-label {
    font-size: 15px;
  }

  .checkin-page .weekly-metric-top strong {
    font-size: 17px;
  }

  .checkin-page .weekly-metric-top strong span {
    font-size: 12px;
  }

  .checkin-page .weekly-metric-bar {
    height: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .checkin-page .weekly-metric-bar span {
    animation: none;
  }
}

/* Focus Split · production direction selected 10 Aug 2026. */
:root {
  --bg: oklch(0.075 0 0);
  --surface: oklch(0.105 0 0);
  --surface-2: oklch(0.14 0 0);
  --surface-3: oklch(0.18 0 0);
  --line: oklch(0.245 0 0);
  --line-strong: oklch(0.38 0 0);
  --text: oklch(0.98 0 0);
  --muted: oklch(0.68 0 0);
  --soft: oklch(0.54 0 0);
  --red: oklch(0.58 0.22 25);
  --green: oklch(0.76 0.13 150);
  --amber: oklch(0.78 0.14 78);
  --blue: oklch(0.75 0.06 245);
  --danger: oklch(0.65 0.2 25);
  --radius: 2px;
}

body {
  background: var(--bg);
}

.app-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  width: 100%;
  min-height: 72px;
  margin: 0;
  padding: 0 clamp(22px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  justify-self: start;
}

.brand-lockup .brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: white;
  background: var(--red);
  font-size: 16px;
  font-weight: 900;
}

.brand-lockup .brand-copy {
  display: grid;
  gap: 2px;
  color: var(--text);
}

.brand-copy h1 {
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand-copy small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.header-context {
  justify-self: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tabs {
  align-self: stretch;
  justify-self: end;
  gap: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.tab {
  position: relative;
  align-self: stretch;
  min-height: 70px;
  padding: 0;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.tab:hover:not(:disabled) {
  color: var(--text);
}

.tab.is-active {
  color: var(--text);
  background: transparent;
}

.tab.is-active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--red);
  content: "";
}

main {
  width: min(1240px, calc(100% - 40px));
  padding: 0 0 56px;
}

.view.is-active {
  padding-top: 26px;
}

.surface,
.section-pad,
.secondary,
.primary,
.field input:not([type="checkbox"]),
.field select,
.field textarea,
.segmented-control,
.segment,
.summary-pill,
.badge,
.target-history-item,
.quickview-disclosure summary {
  border-radius: 2px;
}

.surface {
  background: var(--surface);
}

.section-pad {
  padding: 24px;
}

.toolbar {
  margin-bottom: 22px;
}

.toolbar h2 {
  margin-bottom: 5px;
  color: var(--text);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.secondary {
  min-height: 40px;
  border-color: var(--line);
  color: var(--text);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.secondary:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.danger-action {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid color-mix(in oklch, var(--danger), var(--line) 36%);
  border-radius: 2px;
  color: color-mix(in oklch, var(--danger), white 18%);
  background: color-mix(in oklch, var(--surface-2), var(--danger) 8%);
  font-size: 12px;
  font-weight: 700;
}

.danger-action:hover:not(:disabled) {
  border-color: var(--danger);
  background: color-mix(in oklch, var(--surface-2), var(--danger) 14%);
}

.danger-action:disabled {
  opacity: 0.58;
  cursor: wait;
}

.primary {
  border: 1px solid var(--red);
  color: white;
  background: var(--red);
}

.field input:not([type="checkbox"]),
.field select,
.field textarea {
  border-color: var(--line);
  background: var(--surface-2);
}

/* Client check-in split */
.checkin-page {
  width: 100%;
  margin: 0;
}

.checkin-page .checkin-toolbar {
  margin-bottom: 20px;
}

.focus-client-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg);
}

.checkin-surface {
  min-width: 0;
  padding: clamp(32px, 4.5vw, 64px);
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: var(--bg);
}

.checkin-topbar {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.checkin-kicker,
.checkin-intro-label,
.coach-kicker,
.progress-kicker {
  color: color-mix(in oklch, var(--red), white 18%);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.checkin-date-block strong {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 600;
}

.checkin-intro {
  align-items: flex-end;
  padding: 26px 0 20px;
}

.checkin-intro h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.checkin-intro p {
  font-size: 12px;
}

.checkin-page .checkin-head-actions {
  flex: 0 0 auto;
}

.checkin-date-panel {
  margin: -12px 0 28px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.checkin-page .form-grid {
  gap: 24px 0;
}

.checkin-page .checkin-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.checkin-page .checkin-metrics.full,
.checkin-page .checkin-section-divider.full {
  grid-column: 1 / -1;
}

.checkin-page .checkin-metrics > .field {
  gap: 12px;
  min-height: 118px;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.checkin-page .checkin-metrics .field-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.checkin-page .checkin-metrics input:not([type="checkbox"]) {
  min-height: 52px;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.checkin-page .number-stepper {
  border-left: 1px solid var(--line);
}

.checkin-page .number-stepper-button {
  border-radius: 0;
  background: transparent;
}

.checkin-page .number-uncertain-toggle {
  border-radius: 2px;
  background: var(--surface-2);
}

.checkin-section-divider {
  margin-top: 3px;
  background: var(--line);
}

.checkin-page .checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.checkin-page .check-card {
  min-height: 70px;
  border-color: var(--line);
  border-radius: 2px;
  background: var(--surface);
}

.checkin-page .check-card:has(input:checked) {
  border-color: color-mix(in oklch, var(--red), var(--line) 32%);
  background: color-mix(in oklch, var(--surface), var(--red) 7%);
}

.checkin-page .check input[type="checkbox"],
.checkin-page .choice-card-main input[type="radio"] {
  accent-color: var(--red);
}

.checkin-page .cardio-zones {
  border-color: var(--line);
  border-radius: 2px;
}

.checkin-page .primary[data-daily-submit] {
  justify-self: end;
  width: min(100%, 210px);
  min-height: 50px;
  margin-top: 0;
  border-color: var(--red);
  border-radius: 2px;
  color: white;
  background: var(--red);
}

.checkin-page .primary[data-daily-submit]:hover:not(:disabled) {
  color: white;
  background: color-mix(in oklch, var(--red), white 7%);
}

.checkin-page .primary[data-daily-submit]:disabled {
  border-color: var(--line);
  color: var(--muted);
  background: var(--surface-2);
}

.focus-signal-rail {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(36px, 4.5vw, 56px) clamp(28px, 3.8vw, 48px);
  background: var(--surface);
}

.focus-signal-rail > * {
  width: min(100%, 620px);
}

.checkin-weekly-overview {
  display: grid;
  align-content: start;
}

.checkin-weekly-head {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.checkin-weekly-head h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.025em;
}

.focus-signal-rail .growth-status {
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.focus-signal-rail .growth-badge {
  min-width: 0;
  flex: 1;
  padding: 13px 14px;
}

.focus-signal-rail .growth-rank {
  font-size: 11px;
}

.focus-signal-rail .growth-count strong {
  font-size: 34px;
}

.focus-signal-rail .growth-count span,
.focus-signal-rail .growth-badge small {
  font-size: 10px;
}

.weekly-action-plan {
  padding: 24px 0 0;
}

.weekly-action-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
}

.weekly-action-head h4 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.weekly-action-head > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.weekly-action-list {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.weekly-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.weekly-action-row:last-child {
  border-bottom: 0;
}

.weekly-action-row > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.weekly-action-row > span > strong {
  font-size: 14px;
}

.weekly-action-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.weekly-action-row > b {
  max-width: 19ch;
  font-size: 16px;
  text-align: right;
}

.weekly-action-row[data-state="good"] > b { color: var(--green); }
.weekly-action-row[data-state="warn"] > b { color: var(--amber); }
.weekly-action-row[data-state="danger"] > b { color: var(--danger); }

.checkin-weekly-status-list {
  display: grid;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.checkin-weekly-status-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.checkin-weekly-status-row:last-child {
  border-bottom: 0;
}

.checkin-weekly-status-row > span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.checkin-weekly-status-row > strong {
  font-size: 20px;
  text-align: right;
}

.checkin-weekly-status-row > strong.good { color: var(--green); }
.checkin-weekly-status-row > strong.warn { color: var(--amber); }
.checkin-weekly-status-row > strong.danger { color: var(--danger); }

.focus-sparkline {
  display: block;
  width: 100%;
  height: clamp(104px, 14vw, 132px);
  margin: 18px 0 16px;
  overflow: visible;
}

.focus-sparkline line {
  stroke: var(--line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.focus-sparkline path {
  fill: none;
  stroke: var(--red);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.focus-sparkline circle {
  fill: var(--red);
}

.focus-sparkline-empty {
  margin: 20px 0;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.focus-progress-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  margin-top: 30px;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.focus-progress-link:hover {
  color: color-mix(in oklch, var(--red), white 25%);
}

/* Coach queue and inspector */
.coach-toolbar {
  align-items: flex-end;
}

.coach-toolbar h2 {
  margin-top: 7px;
  font-size: 38px;
}

.focus-coach-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-bottom: 0;
}

.focus-coach-summary-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 14px;
  min-height: 106px;
  padding: 22px clamp(16px, 2.3vw, 30px);
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.focus-coach-summary-item:last-child {
  border-right: 0;
}

.focus-coach-summary-item span {
  align-self: end;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.focus-coach-summary-item strong {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  font-size: 32px;
  letter-spacing: -0.035em;
}

.focus-coach-summary-item small {
  color: var(--muted);
  font-size: 10px;
}

.focus-coach-summary-item.attention {
  background: var(--red);
}

.focus-coach-summary-item.attention span,
.focus-coach-summary-item.attention small {
  color: color-mix(in oklch, white, var(--red) 14%);
}

.coach-command-bar {
  border-radius: 0;
}

.dashboard-decision-title {
  font-size: 21px;
}

.summary-pill {
  border-radius: 2px;
  background: var(--surface-2);
}

.summary-pill.is-leading,
.summary-pill.is-active {
  border-color: color-mix(in oklch, var(--red), var(--line) 45%);
  background: color-mix(in oklch, var(--surface-2), var(--red) 8%);
}

.coach-list-section {
  margin-top: 0;
  padding: 0;
  border-top: 0;
  border-radius: 0;
}

.coach-list-section > .section-toolbar {
  min-height: 82px;
  margin: 0;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.coach-list-section .section-toolbar h3 {
  margin: 4px 0 0;
  font-size: 24px;
}

.queue-count {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.weekly-empty-state {
  display: grid;
  gap: 4px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.weekly-empty-state strong {
  color: var(--text);
  font-size: 15px;
}

.weekly-empty-state span {
  color: var(--muted);
  font-size: 14px;
}

.coach-detail-layout.has-panel {
  grid-template-columns: minmax(0, 1.55fr) minmax(350px, 0.72fr);
  gap: 0;
  align-items: stretch;
}

.client-list {
  gap: 0;
  align-content: start;
  min-width: 0;
  border-right: 1px solid var(--line);
}

.client-list-head,
.client-row-main {
  grid-template-columns: minmax(200px, 1.35fr) minmax(360px, 1fr) minmax(190px, 0.8fr);
}

.client-list-head {
  min-height: 34px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.client-row {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.client-row.is-active {
  border-color: var(--line);
  border-left: 1px solid var(--red);
  background: var(--surface-2);
}

.client-row-main {
  min-height: 78px;
  padding: 12px 20px;
  border-radius: 0;
}

.client-row-main:hover {
  background: var(--surface-2);
}

.client-row-identity strong {
  font-size: 15px;
}

.row-decision-brief,
.row-stat-label,
.row-stat-note {
  font-size: 10px;
}

.coach-quickview {
  position: sticky;
  top: 14px;
  align-self: start;
  max-height: calc(100vh - 28px);
  gap: 16px;
  padding: 26px 28px;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: var(--surface);
}

.coach-quickview-head h3 {
  margin-top: 4px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.quickview-snapshot {
  border-radius: 0;
  background: var(--line);
}

.quickview-snapshot-item {
  padding: 11px 12px;
  background: var(--surface-2);
}

.coach-quickview-chart {
  padding: 14px 0 2px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.coach-quickview-chart .focus-sparkline {
  margin: 8px 0 4px;
}

.quickview-private-link,
.priority-reasons,
.quickview-message,
.quickview-disclosure {
  border-color: var(--line);
}

.quickview-disclosure summary,
.priority-reason-list,
.priority-reason-row,
.private-link-row input,
.row-followup,
.decision-tag {
  border-radius: 2px;
}

/* Progress hierarchy */
.progress-page {
  display: flex;
  flex-direction: column;
}

.progress-toolbar { order: 1; }
.progress-page > .surface:not(.progress-habits):not(.progress-chart-section) { order: 2; }
.progress-weight-summary { order: 3; }
.progress-chart-section { order: 4; }
.progress-habits { order: 5; }

.progress-toolbar {
  align-items: flex-end;
  padding: 18px 0 8px;
}

.progress-toolbar h2 {
  max-width: 900px;
  margin: 8px 0 8px;
  font-size: clamp(34px, 4.2vw, 56px);
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.progress-weight-summary {
  margin-top: 0;
  padding: 30px 0;
  border-width: 1px 0;
  border-radius: 0;
  background: transparent;
}

.progress-weight-value strong {
  font-size: clamp(46px, 5vw, 64px);
  letter-spacing: -0.04em;
}

.progress-status {
  border-radius: 2px;
  background: var(--surface);
}

.progress-chart-section {
  margin-top: 0;
  padding: 34px 36px 28px;
  border-radius: 0;
  background: var(--surface);
}

.progress-chart-section .segmented-control,
.progress-chart-section .segment.is-active {
  border-radius: 2px;
}

.chart-line {
  stroke: var(--red);
  stroke-width: 2.1;
}

.chart-point.is-latest {
  fill: var(--red);
  stroke: var(--red);
}

.progress-habits {
  margin-top: 0;
  padding: 28px 30px 30px;
  border-top: 0;
  border-radius: 0;
  background: var(--bg);
}

.progress-habit-list {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.progress-habit-row {
  --habit-color: var(--text);
  padding: 20px;
  border-left-color: var(--line);
}

.progress-habit-red,
.progress-habit-cardio {
  --habit-color: var(--red);
}

.progress-habit-green,
.progress-habit-blue,
.progress-habit-amber {
  --habit-color: var(--text);
}

.progress-habit-name::before {
  width: 5px;
  height: 5px;
  flex-basis: 5px;
  border-radius: 50%;
}

.progress-habit-track {
  height: 4px;
  border-radius: 0;
  background: var(--line);
  box-shadow: none;
}

.progress-habit-track::after {
  display: none;
}

.progress-habit-fill {
  border-radius: 0;
}

@media (max-width: 1120px) {
  .focus-client-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  }

  .checkin-surface {
    padding: 36px;
  }

  .coach-detail-layout.has-panel {
    grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.75fr);
  }

  .client-list-head,
  .client-row-main {
    grid-template-columns: minmax(180px, 1.25fr) minmax(300px, 1fr) minmax(160px, 0.75fr);
  }

  .client-row-status .badge:nth-child(n + 3) {
    display: none;
  }
}

@media (max-width: 900px) {
  .focus-client-grid,
  .coach-detail-layout.has-panel {
    grid-template-columns: 1fr;
  }

  .checkin-surface,
  .client-list {
    border-right: 0;
  }

  .focus-signal-rail,
  .coach-quickview {
    border-top: 1px solid var(--line);
  }

  .coach-quickview {
    position: static;
    max-height: none;
  }

  .client-list-head,
  .client-row-main {
    grid-template-columns: 210px minmax(340px, 1fr) minmax(180px, 0.8fr);
  }

  .client-list {
    overflow-x: auto;
  }

  .client-list-head,
  .client-row-main {
    min-width: 790px;
  }
}

@media (max-width: 760px) {
  .app-header {
    grid-template-columns: auto 1fr;
    gap: 0;
    min-height: auto;
    padding: 0 16px;
  }

  .brand-lockup {
    min-height: 60px;
  }

  .header-context {
    display: none;
  }

  .tabs {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
    gap: 0;
    border-top: 1px solid var(--line);
  }

  .tab {
    flex: 1;
    min-height: 48px;
    padding: 0 8px;
  }

  main {
    width: 100%;
    padding: 0 16px 44px;
  }

  .view.is-active {
    padding-top: 18px;
  }

  .toolbar,
  .coach-toolbar,
  .progress-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions .secondary {
    flex: 1;
  }

  .focus-client-grid {
    border-right: 0;
    border-left: 0;
  }

  .checkin-surface {
    padding: 28px 20px;
  }

  .checkin-topbar {
    align-items: center;
    flex-direction: row;
  }

  .checkin-intro {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 22px 0 20px;
  }

  .checkin-intro h2 {
    font-size: 38px;
  }

  .checkin-page .checkin-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .checkin-page .checkin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checkin-page .checkin-metrics > .field {
    min-height: 108px;
    padding: 13px;
  }

  .checkin-page .checkin-metrics input:not([type="checkbox"]) {
    font-size: 25px;
  }

  .checkin-page .number-stepper {
    display: none;
  }

  .checkin-page .field .number-control.has-uncertain-toggle input {
    padding-right: 66px;
  }

  .checkin-page .number-uncertain-toggle {
    right: 4px;
    padding: 0 5px;
  }

  .checkin-page .checks {
    grid-template-columns: 1fr;
  }

  .checkin-page .primary[data-daily-submit] {
    width: 100%;
  }

  .focus-signal-rail {
    min-height: 0;
    justify-content: flex-start;
    padding: 30px 20px;
  }

  .focus-progress-link {
    margin-top: 24px;
  }

  .focus-coach-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .focus-coach-summary-item:nth-child(2) {
    border-right: 0;
  }

  .focus-coach-summary-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .coach-command-bar {
    padding: 20px;
  }

  .dashboard-decision-strip {
    flex-direction: column;
  }

  .dashboard-decision-tags-primary {
    min-width: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .client-list {
    overflow: visible;
  }

  .client-list-head {
    display: none;
  }

  .client-row-main {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 14px;
    min-width: 0;
    min-height: 94px;
    padding: 14px 18px;
  }

  .client-row-stats {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .client-row-status {
    grid-column: 2;
    grid-row: 1;
  }

  .row-decision-brief {
    max-width: 36ch;
  }

  .coach-quickview {
    padding: 26px 20px;
  }

  .progress-toolbar {
    padding-top: 8px;
  }

  .progress-toolbar h2 {
    font-size: 36px;
  }

  .progress-weight-summary {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 0;
  }

  .progress-weight-statuses {
    justify-content: flex-start;
  }

  .progress-chart-section {
    padding: 24px 16px 18px;
  }

  .chart-head {
    flex-direction: column;
    gap: 12px;
  }

  .chart-stat {
    justify-items: start;
  }

  .chart-range-row {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .progress-habits {
    padding: 24px 0 0;
  }

  .progress-habit-list {
    grid-template-columns: 1fr;
  }

  .progress-habit-row,
  .progress-habit-row:first-child {
    padding: 18px 0;
    border: 0;
    border-top: 1px solid var(--line);
  }

  .progress-habit-row:first-child {
    border-top: 0;
  }
}

@media (max-width: 400px) {
  .brand-copy small {
    display: none;
  }

  .tab {
    font-size: 11px;
  }

  .focus-coach-summary-item {
    min-height: 88px;
    padding: 16px;
  }

  .focus-coach-summary-item strong {
    font-size: 27px;
  }

  .client-row-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-row-status {
    max-width: 120px;
  }

  .quickview-snapshot {
    grid-template-columns: 1fr;
  }

  .quickview-snapshot-item:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

@media (max-width: 340px) {
  .checkin-page .checkin-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .checkin-topbar {
    align-items: center;
    flex-direction: row;
    gap: 0;
  }

  .growth-status {
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
  }

  .growth-badge {
    min-width: 0;
    flex: 1;
  }

  .weekly-action-row {
    align-items: start;
    gap: 10px;
  }

  .weekly-action-row > b {
    max-width: 15ch;
    font-size: 15px;
  }
}
