:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #07090b;
  --surface: #0b0e11;
  --surface-raised: #111519;
  --surface-strong: #171c21;
  --text: #f5f6f7;
  --muted: #9ca4ae;
  --dim: #69727d;
  --line: #293038;
  --line-soft: #1d2329;
  --red: #f1272e;
  --red-hover: #ff3d43;
  --green: #7bdc42;
  --danger: #ff4b52;
  --radius: 8px;
  --topbar-height: 80px;
  --sidebar-width: 214px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
}

body,
button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

img,
video {
  display: block;
  max-width: 100%;
}

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

svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.product-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  grid-template-rows: var(--topbar-height) minmax(0, 1fr);
  background: var(--bg);
}

.desktop-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  grid-column: 1 / -1;
  grid-row: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) auto;
  align-items: center;
  min-height: var(--topbar-height);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 11, 0.96);
  backdrop-filter: blur(16px);
}

.brand {
  min-width: 0;
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.brand-emblem {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  color: var(--red);
  transition: color 140ms ease, transform 140ms ease;
}

.brand-emblem svg {
  width: 100%;
  height: 100%;
}

.brand:hover .brand-emblem {
  color: var(--red-hover);
  transform: translateY(-1px);
}

.brand strong {
  display: block;
  font-size: 17px;
  font-weight: 850;
  white-space: nowrap;
}

.brand-name-accent {
  color: var(--red);
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.desktop-topbar > .primary-nav {
  padding-left: 24px;
}

.primary-nav button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #d3d7dc;
  font-weight: 750;
  transition: 150ms ease;
}

.primary-nav button:hover {
  color: var(--text);
  background: var(--surface-raised);
}

.primary-nav button.active {
  border-color: var(--line);
  color: var(--red);
  background: var(--surface);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 330px;
  padding-right: 20px;
}

.primary-button,
.secondary-button,
.draft-button,
.text-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: var(--radius);
  font-weight: 800;
  transition: 150ms ease;
}

.primary-button {
  padding: 0 22px;
  background: var(--red);
  color: #fff;
}

.primary-button:hover {
  background: var(--red-hover);
}

.primary-button.compact,
.secondary-button {
  min-height: 42px;
  padding: 0 16px;
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.secondary-button:hover {
  border-color: #4b555f;
  background: var(--surface-raised);
}

.draft-button {
  min-height: 42px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
}

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

.text-button {
  min-height: 42px;
  padding: 0;
  background: transparent;
  color: var(--muted);
}

.icon-button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
}

.icon-button:hover {
  border-color: var(--line);
  color: var(--text);
  background: var(--surface-raised);
}

.desktop-sidebar {
  position: sticky;
  top: var(--topbar-height);
  grid-column: 1;
  grid-row: 2;
  min-height: calc(100vh - var(--topbar-height));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 12px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.primary-nav.vertical {
  flex-direction: column;
  align-items: stretch;
}

.primary-nav.vertical button {
  min-height: 54px;
  justify-content: flex-start;
  padding: 0 14px;
  border-color: transparent;
  border-radius: 0;
}

.primary-nav.vertical button.active {
  position: relative;
  background: #101419;
}

.primary-nav.vertical button.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--red);
}

.trainer-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 8px;
}

.trainer-profile > span,
.client-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 800;
}

.trainer-profile strong,
.trainer-profile small {
  display: block;
}

.trainer-profile strong {
  font-size: 14px;
}

.trainer-profile small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.mobile-topbar,
.mobile-nav,
.mobile-publish-bar {
  display: none;
}

.app-main {
  min-width: 0;
  grid-column: 2;
  grid-row: 2;
}

.schedule-layout {
  min-height: calc(100vh - var(--topbar-height));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 378px;
}

.schedule-workspace {
  min-width: 0;
  padding: 24px 26px 72px;
}

.schedule-tools {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.client-select,
.mobile-client-select {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 188px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.client-select > svg,
.mobile-client-select > svg:first-child {
  position: absolute;
  left: 14px;
  z-index: 1;
  color: var(--muted);
  pointer-events: none;
}

.client-select select,
.mobile-client-select select {
  width: 100%;
  min-height: 44px;
  padding: 0 40px 0 44px;
  appearance: none;
  border: 0;
  border-radius: inherit;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-weight: 800;
}

.copy-day-button svg {
  width: 17px;
  height: 17px;
}

.week-section {
  min-width: 0;
}

.week-heading {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.week-heading strong {
  min-width: 210px;
  text-align: center;
  font-size: 16px;
}

.week-heading-arrow {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}

.week-rail-wrap {
  position: relative;
}

.week-rail {
  display: grid;
  grid-template-columns: repeat(7, minmax(96px, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  touch-action: pan-y;
}

.day-button {
  min-width: 0;
  min-height: 90px;
  display: grid;
  place-content: center;
  gap: 5px;
  padding: 10px 6px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

.day-button:last-child {
  border-right: 0;
}

.day-button:hover {
  background: var(--surface-raised);
  color: var(--text);
}

.day-button.selected {
  position: relative;
  box-shadow: inset 0 0 0 2px var(--red);
  background: #101316;
  color: var(--text);
}

.day-date,
.day-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-date {
  font-size: 15px;
  font-weight: 750;
}

.day-title {
  font-size: 13px;
}

.today-label,
.today-spacer {
  min-height: 13px;
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.week-edge-arrow {
  display: none;
}

.date-context {
  display: none;
}

.workout-heading {
  padding: 28px 4px 18px;
}

.workout-title-line {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 900;
  white-space: nowrap;
}

.workout-title-input {
  width: min(100%, 620px);
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: inherit;
  font-weight: 900;
}

.workout-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
  color: var(--muted);
}

.workout-meta svg {
  width: 18px;
  height: 18px;
}

.workout-meta label {
  display: inline-flex;
  align-items: center;
}

.workout-meta input {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.duration-field input {
  width: 34px;
  appearance: textfield;
  text-align: right;
}

.duration-field input::-webkit-inner-spin-button,
.duration-field input::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}

.duration-field span {
  margin-left: 4px;
}

.workout-editor {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: visible;
  background: var(--surface);
}

.exercise-sequence {
  border-radius: inherit;
}

.exercise-row {
  position: relative;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.exercise-row:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}

.exercise-row.expanded {
  z-index: 2;
  box-shadow: inset 0 0 0 1px var(--red);
  background: #0d1114;
}

.exercise-row.dragging {
  z-index: 10;
  opacity: 0.82;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.exercise-row-summary {
  min-height: 104px;
  display: grid;
  grid-template-columns: 36px 26px 128px minmax(150px, 1fr) minmax(230px, 290px) 44px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
}

.drag-handle {
  width: 36px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  color: var(--muted);
  touch-action: none;
}

.drag-handle svg {
  width: 20px;
  height: 20px;
}

.exercise-number {
  font-size: 17px;
  font-weight: 850;
}

.exercise-row-summary > img {
  width: 128px;
  height: 84px;
  object-fit: cover;
  border-radius: 4px;
  background: #050607;
}

.exercise-name-block {
  min-width: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.exercise-name-block strong,
.exercise-name-block span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exercise-name-block strong {
  font-size: 17px;
}

.exercise-name-block span {
  display: none;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.summary-values {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  color: var(--muted);
  font-size: 15px;
}

.summary-values span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-menu-wrap {
  position: relative;
}

.row-menu-button {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
}

.row-menu {
  position: absolute;
  right: 0;
  top: 46px;
  z-index: 30;
  width: 170px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55);
}

.row-menu button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.row-menu button:hover {
  background: #22282e;
}

.row-menu button.danger {
  color: var(--danger);
}

.row-menu svg {
  width: 17px;
  height: 17px;
}

.exercise-row-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 18px 28px;
  margin: 0 50px 0 62px;
  padding: 26px 0 24px;
  border-top: 1px solid var(--line);
}

.exercise-row-fields label,
.account-form label {
  display: grid;
  gap: 9px;
}

.exercise-row-fields label > span,
.account-form label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.exercise-row-fields input,
.exercise-row-fields textarea,
.account-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  background: #0a0d10;
  color: var(--text);
}

.exercise-row-fields textarea {
  min-height: 54px;
  padding-block: 12px;
  resize: vertical;
}

.input-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.input-suffix > span {
  color: var(--muted);
}

.coach-note-field {
  grid-column: 1 / -1;
}

.empty-workout {
  min-height: 190px;
  display: grid;
  place-content: center;
  gap: 7px;
  color: var(--muted);
  text-align: center;
}

.empty-workout strong {
  color: var(--text);
  font-size: 18px;
}

.add-exercise-row {
  width: 100%;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
}

.add-exercise-row:hover {
  color: var(--text);
  background: var(--surface-raised);
}

.exercise-dock {
  min-width: 0;
  border-left: 1px solid var(--line);
  background: #090c0f;
}

.exercise-picker {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 24px;
}

.picker-heading,
.detail-header,
.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.picker-heading h2,
.dialog-heading h2 {
  font-size: 23px;
}

.picker-heading p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.picker-search,
.library-search,
.client-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 20px;
}

.picker-search svg,
.library-search svg,
.client-search svg {
  position: absolute;
  left: 14px;
  color: var(--muted);
  pointer-events: none;
}

.picker-search input,
.library-search input,
.client-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px 0 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  background: var(--surface-raised);
  color: var(--text);
}

.group-tabs,
.dialog-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.group-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow-x: auto;
}

.group-tabs button,
.dialog-mode-tabs button {
  min-height: 38px;
  padding: 0 9px;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.group-tabs button.active,
.dialog-mode-tabs button.active {
  background: var(--surface-strong);
  color: var(--text);
}

.picker-results {
  min-height: 0;
  margin-top: 20px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.picker-row {
  min-height: 94px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 14px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}

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

.picker-row img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 4px;
  background: #050607;
}

.picker-row strong,
.picker-row span {
  display: block;
}

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

.picker-row span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.add-picker-button {
  color: var(--muted);
}

.picker-empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.open-library-button {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: auto;
  padding-top: 20px;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
}

.open-library-button:hover {
  color: var(--text);
}

.page-view {
  width: min(100%, 1260px);
  margin: 0 auto;
  padding: 38px 36px 80px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.section-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.section-kicker.danger {
  color: var(--danger);
}

.page-heading h1,
.client-today-heading h1 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.06;
}

.page-heading p,
.client-today-heading p {
  max-width: 620px;
  margin-top: 9px;
  color: var(--muted);
  line-height: 1.5;
}

.result-count {
  color: var(--muted);
  font-weight: 750;
}

.library-controls {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 22px 0;
}

.library-search,
.client-search {
  margin: 0;
}

.library-groups {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.library-groups button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 750;
  white-space: nowrap;
}

.library-groups button.active {
  border-color: var(--red);
  color: var(--text);
}

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

.library-card {
  min-width: 0;
  min-height: 126px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.library-card:hover {
  border-color: #47515b;
  background: var(--surface-raised);
}

.library-card img {
  width: 112px;
  height: 104px;
  object-fit: cover;
  border-radius: 4px;
}

.library-card div {
  min-width: 0;
}

.library-card div > * {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-card span,
.library-card small {
  color: var(--muted);
  font-size: 12px;
}

.library-card strong {
  margin: 6px 0;
  font-size: 17px;
}

.client-search {
  width: min(100%, 460px);
  margin: 22px 0 14px;
}

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

.client-row {
  position: relative;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.client-row.selected {
  box-shadow: inset 3px 0 var(--red);
  background: #0b0f12;
}

.client-row-main {
  min-width: 0;
  flex: 1;
  min-height: 90px;
  display: grid;
  grid-template-columns: 48px minmax(180px, 1fr) 90px minmax(150px, 220px) 110px 24px;
  align-items: center;
  gap: 16px;
  padding: 12px 70px 12px 14px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

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

.client-name-block,
.client-next,
.client-completion {
  min-width: 0;
}

.client-name-block strong,
.client-name-block small,
.client-next strong,
.client-next small,
.client-completion strong,
.client-completion small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-name-block small,
.client-next small,
.client-completion small {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.client-status {
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.client-status.active {
  border-color: rgba(123, 220, 66, 0.55);
  color: var(--green);
}

.client-email {
  position: absolute;
  right: 16px;
}

.settings-list {
  max-width: 860px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.settings-row {
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.settings-row > svg {
  color: var(--muted);
}

.settings-row div strong,
.settings-row div span {
  display: block;
}

.settings-row div span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.settings-state {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.settings-state.connected,
.state-icon {
  color: var(--green);
}

.settings-button:hover {
  background: var(--surface);
}

.client-today {
  max-width: 900px;
}

.client-today-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.today-meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 750;
}

.today-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.today-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 0;
}

.start-workout-button {
  min-width: 220px;
}

.start-workout-button.complete {
  background: #2a7620;
}

.today-exercises {
  border-top: 1px solid var(--line);
}

.today-exercise {
  position: relative;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.today-exercise.complete {
  opacity: 0.62;
}

.today-exercise-main {
  min-width: 0;
  flex: 1;
  min-height: 126px;
  display: grid;
  grid-template-columns: 32px 132px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 12px 72px 12px 4px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.today-index {
  font-size: 18px;
  font-weight: 850;
}

.today-exercise-main img {
  width: 132px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
}

.today-exercise-copy strong,
.today-exercise-copy small,
.today-exercise-copy span {
  display: block;
}

.today-exercise-copy strong {
  font-size: 18px;
}

.today-exercise-copy small {
  margin-top: 7px;
  color: var(--muted);
}

.today-exercise-copy span {
  margin-top: 10px;
  line-height: 1.45;
}

.complete-set-button {
  position: absolute;
  right: 14px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
}

.complete-set-button[aria-pressed="true"] {
  border-color: var(--green);
  background: #1f4e1a;
  color: var(--green);
}

.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.72);
  animation: fade-in 150ms ease-out;
}

.exercise-sheet,
.exercise-detail-dialog,
.account-dialog {
  position: fixed;
  z-index: 90;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  background: #0b0e11;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.66);
}

.exercise-sheet {
  top: 50%;
  left: 50%;
  width: min(680px, calc(100vw - 40px));
  height: min(760px, calc(100vh - 60px));
  transform: translate(-50%, -50%);
  animation: dialog-in 170ms ease-out;
}

.exercise-detail-dialog {
  top: 50%;
  left: 50%;
  width: min(1040px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  padding: 24px;
  overflow-y: auto;
  transform: translate(-50%, -50%);
  animation: dialog-in 170ms ease-out;
}

.detail-header span {
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-header h2 {
  margin-top: 6px;
  font-size: 32px;
}

.detail-header p {
  margin-top: 7px;
  color: var(--muted);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 24px;
  margin-top: 22px;
}

.detail-media {
  min-width: 0;
}

.detail-video-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #000;
}

.detail-video-player video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-video-toggle {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: linear-gradient(180deg, rgba(7, 9, 11, 0.02) 45%, rgba(7, 9, 11, 0.28));
}

.detail-video-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -4px;
}

.detail-video-toggle-icon {
  position: relative;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.07) 44%, rgba(241, 39, 46, 0.08)),
    rgba(7, 9, 11, 0.44);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -16px 28px rgba(0, 0, 0, 0.12),
    0 16px 44px rgba(0, 0, 0, 0.4),
    0 0 0 7px rgba(255, 255, 255, 0.055);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  backdrop-filter: blur(16px) saturate(135%);
}

.detail-video-toggle-icon::before {
  position: absolute;
  top: 6px;
  right: 11px;
  left: 11px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent);
  content: "";
  pointer-events: none;
}

.detail-video-toggle-icon svg {
  position: relative;
  z-index: 1;
  width: 31px;
  height: 31px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.34));
}

.detail-video-player:not([data-playing="true"]) .detail-video-toggle-icon svg.lucide-play {
  margin-left: 4px;
  fill: currentColor;
}

.detail-video-player[data-playing="true"] .detail-video-toggle {
  background: transparent;
}

.detail-video-controls {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 2;
  min-height: 42px;
  display: grid;
  grid-template-columns: 32px auto minmax(60px, 1fr) auto 32px;
  align-items: center;
  gap: 8px;
  padding: 4px 5px 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 13px;
  background: rgba(7, 9, 11, 0.7);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
  backdrop-filter: blur(14px) saturate(125%);
}

.detail-video-control {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #fff;
}

.detail-video-control:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 1px;
}

.detail-video-control svg {
  width: 17px;
  height: 17px;
}

.detail-video-fullscreen-idle {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(7, 9, 11, 0.62);
  opacity: 0.82;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.detail-video-playback svg.lucide-play {
  margin-left: 2px;
  fill: currentColor;
}

.detail-video-time {
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.detail-video-scrubber {
  position: relative;
  height: 30px;
  display: flex;
  align-items: center;
  border-radius: 5px;
}

.detail-video-scrubber:focus-within {
  outline: 2px solid rgba(255, 255, 255, 0.92);
  outline-offset: 2px;
}

.detail-video-scrubber-track {
  position: absolute;
  right: 0;
  left: 0;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  pointer-events: none;
}

.detail-video-scrubber-track > span {
  position: relative;
  height: 100%;
  display: block;
  background: var(--red);
}

.detail-video-scrubber input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.detail-video-scrubber input:disabled {
  cursor: default;
}

.detail-video-scrubber input::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
}

.detail-video-scrubber input::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -4px;
  -webkit-appearance: none;
  appearance: none;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.36);
}

.detail-video-scrubber input::-moz-range-track {
  height: 4px;
  background: transparent;
}

.detail-video-scrubber input::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.36);
}

.detail-video-player:fullscreen {
  border: 0;
  border-radius: 0;
}

.detail-video-player:fullscreen video {
  object-fit: contain;
}

.media-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.media-mode-tabs button {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
}

.media-mode-tabs button[aria-selected="true"] {
  border-color: var(--red);
  color: var(--text);
}

.detail-media.correct .media-mode-tabs button:last-child[aria-selected="true"] {
  border-color: var(--green);
}

.detail-coaching {
  display: grid;
  align-content: start;
  gap: 24px;
}

.detail-coaching section + section {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.detail-coaching h3 {
  font-size: 20px;
}

.cue-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.cue-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  line-height: 1.4;
}

.cue-list svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin-top: 2px;
  color: var(--danger);
}

.cue-list.good svg {
  color: var(--green);
}

.account-dialog {
  top: 50%;
  left: 50%;
  width: min(480px, calc(100vw - 36px));
  padding: 24px;
  transform: translate(-50%, -50%);
  animation: dialog-in 170ms ease-out;
}

.dialog-heading > div {
  display: flex;
  align-items: center;
  gap: 11px;
}

.dialog-heading > div > svg {
  color: var(--red);
}

.dialog-mode-tabs {
  grid-template-columns: 1fr 1fr;
}

.account-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.form-message {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  min-width: 260px;
  max-width: min(420px, calc(100vw - 36px));
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #151a1f;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.54);
  font-weight: 700;
  animation: toast-in 180ms ease-out;
}

.toast button {
  min-height: 32px;
  padding: 0 7px;
  background: transparent;
  color: var(--red);
  font-weight: 850;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dialog-in {
  from { opacity: 0; transform: translate(-50%, -48%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1280px) {
  .schedule-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

  .exercise-row-summary {
    grid-template-columns: 32px 24px 110px minmax(130px, 1fr) minmax(200px, 250px) 40px;
    gap: 9px;
  }

  .exercise-row-summary > img {
    width: 110px;
    height: 76px;
  }

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

@media (max-width: 1040px) {
  :root {
    --sidebar-width: 190px;
  }

  .schedule-layout {
    display: block;
  }

  .exercise-dock {
    display: none;
  }

  .desktop-topbar .primary-nav button {
    padding-inline: 12px;
  }

  .client-row-main {
    grid-template-columns: 48px minmax(160px, 1fr) 80px minmax(140px, 180px) 24px;
  }

  .client-completion {
    display: none;
  }
}

@media (max-width: 767px) {
  :root {
    --mobile-topbar-height: 56px;
    --mobile-nav-height: 66px;
  }

  body {
    min-height: 100dvh;
  }

  .product-shell {
    min-height: 100dvh;
    display: block;
  }

  .desktop-topbar,
  .desktop-sidebar {
    display: none;
  }

  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: var(--mobile-topbar-height);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 44px;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 9, 11, 0.96);
    backdrop-filter: blur(16px);
  }

  .mobile-topbar .brand {
    width: auto;
    height: 46px;
    gap: 8px;
    padding: 0;
  }

  .mobile-topbar .brand-emblem {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .mobile-topbar .brand strong {
    max-width: 58px;
    white-space: normal;
    font-size: 12px;
    line-height: 1.05;
  }

  .mobile-client-select {
    width: 100%;
    min-width: 0;
    max-width: 190px;
    justify-self: center;
  }

  .mobile-client-select,
  .mobile-client-select select {
    min-height: 44px;
  }

  .mobile-client-select > svg:last-child {
    position: absolute;
    right: 12px;
    color: var(--muted);
    pointer-events: none;
  }

  .mobile-client-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
  }

  .app-main {
    min-height: calc(100dvh - var(--mobile-topbar-height));
  }

  .coach-persona .app-main {
    padding-bottom: calc(var(--mobile-nav-height) + 78px);
  }

  .client-persona .app-main,
  .coach-persona .app-main:has(.clients-view),
  .coach-persona .app-main:has(.library-view),
  .coach-persona .app-main:has(.more-view) {
    padding-bottom: var(--mobile-nav-height);
  }

  .schedule-workspace {
    padding: 0;
  }

  .schedule-tools,
  .week-heading {
    display: none;
  }

  .week-section {
    padding: 4px 0 0;
    border-bottom: 1px solid var(--line);
  }

  .week-rail-wrap {
    padding: 0 34px 4px;
  }

  .week-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 76px;
    grid-template-columns: none;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    border: 0;
    border-radius: 0;
    scroll-snap-type: x proximity;
  }

  .week-rail::-webkit-scrollbar {
    display: none;
  }

  .day-button {
    min-height: 72px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    scroll-snap-align: center;
  }

  .day-button:first-child {
    border-left: 1px solid var(--line);
  }

  .day-button:last-child {
    border-right: 1px solid var(--line);
  }

  .day-button.selected {
    border-radius: 6px;
  }

  .day-date {
    font-size: 13px;
  }

  .day-title {
    font-size: 12px;
  }

  .week-edge-arrow {
    position: absolute;
    top: 19px;
    z-index: 3;
    width: 38px;
    height: 38px;
    display: grid;
    border-radius: 50%;
    border-color: var(--line);
    background: var(--surface-strong);
    color: var(--text);
  }

  .week-edge-arrow.previous {
    left: 4px;
  }

  .week-edge-arrow.next {
    right: 4px;
  }

  .date-context {
    display: none;
  }

  .workout-heading {
    padding: 11px 18px 9px;
  }

  .workout-title-line {
    gap: 7px;
    font-size: 23px;
    line-height: 1.08;
  }

  .workout-meta {
    margin-top: 7px;
  }

  .workout-meta input {
    font-size: 16px;
  }

  .workout-editor {
    margin: 0 8px;
    border-color: var(--line);
  }

  .exercise-row-summary {
    min-height: 82px;
    grid-template-columns: 26px 18px 68px minmax(0, 1fr) 36px;
    grid-template-rows: auto auto;
    gap: 5px 8px;
    padding: 7px 6px;
  }

  .drag-handle {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 26px;
  }

  .exercise-number {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .exercise-row-summary > img {
    grid-column: 3;
    grid-row: 1 / 3;
    width: 68px;
    height: 68px;
  }

  .exercise-name-block {
    grid-column: 4;
    grid-row: 1;
    align-self: end;
  }

  .exercise-name-block strong {
    font-size: 15px;
  }

  .summary-values {
    grid-column: 4;
    grid-row: 2;
    align-self: start;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 9px;
    font-size: 12px;
  }

  .row-menu-wrap {
    grid-column: 5;
    grid-row: 1 / 3;
  }

  .exercise-row.expanded .exercise-row-summary {
    min-height: 88px;
  }

  .exercise-row-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 0 10px;
    padding: 8px 0 10px;
  }

  .exercise-row-fields input {
    min-width: 0;
    min-height: 44px;
    padding: 0 10px;
  }

  .input-suffix {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .input-suffix > span {
    font-size: 11px;
  }

  .coach-note-field {
    grid-column: 1 / -1;
  }

  .exercise-row-fields textarea {
    height: 48px;
    min-height: 48px;
    resize: none;
  }

  .add-exercise-row {
    min-height: 50px;
  }

  .mobile-publish-bar {
    position: fixed;
    right: 0;
    bottom: var(--mobile-nav-height);
    left: 0;
    z-index: 45;
    min-height: 76px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(170px, 1.45fr);
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-top: 1px solid var(--line);
    background: rgba(7, 9, 11, 0.97);
    backdrop-filter: blur(16px);
  }

  .mobile-publish-bar .draft-button {
    min-width: 0;
    justify-content: flex-start;
    padding-left: 4px;
    overflow: hidden;
    white-space: nowrap;
  }

  .mobile-publish-bar .primary-button {
    min-width: 0;
    min-height: 52px;
    padding: 0 12px;
    font-size: 16px;
  }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    height: var(--mobile-nav-height);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgba(7, 9, 11, 0.98);
    backdrop-filter: blur(16px);
  }

  .mobile-nav button {
    min-width: 0;
    display: grid;
    place-content: center;
    gap: 5px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
  }

  .mobile-nav button svg {
    width: 22px;
    height: 22px;
    margin: auto;
  }

  .mobile-nav button.active {
    color: var(--red);
  }

  .page-view {
    padding: 24px 18px 40px;
  }

  .page-heading,
  .client-today-heading {
    display: block;
    padding-bottom: 20px;
  }

  .page-heading h1,
  .client-today-heading h1 {
    font-size: 30px;
  }

  .page-heading .primary-button,
  .page-heading .result-count {
    margin-top: 18px;
  }

  .library-controls {
    display: block;
    padding: 18px 0;
  }

  .library-groups {
    margin-top: 12px;
  }

  .library-grid {
    grid-template-columns: 1fr;
  }

  .library-card {
    grid-template-columns: 90px minmax(0, 1fr) 22px;
    min-height: 108px;
  }

  .library-card img {
    width: 90px;
    height: 86px;
  }

  .client-search {
    width: 100%;
  }

  .client-row-main {
    min-height: 86px;
    grid-template-columns: 44px minmax(0, 1fr) 24px;
    gap: 12px;
    padding: 10px 58px 10px 8px;
  }

  .client-avatar {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .client-status,
  .client-next,
  .client-completion {
    display: none;
  }

  .client-row-main > svg {
    grid-column: 3;
  }

  .client-email {
    right: 4px;
  }

  .client-today-heading {
    padding-top: 4px;
  }

  .today-meta {
    grid-template-columns: auto auto;
    justify-content: start;
    margin-top: 16px;
  }

  .today-actions {
    display: grid;
  }

  .start-workout-button {
    width: 100%;
    min-height: 56px;
  }

  .today-exercise-main {
    min-height: 126px;
    grid-template-columns: 24px 86px minmax(0, 1fr);
    gap: 10px;
    padding-right: 50px;
  }

  .today-exercise-main img {
    width: 86px;
    height: 96px;
  }

  .today-exercise-copy strong {
    font-size: 16px;
  }

  .today-exercise-copy small,
  .today-exercise-copy span {
    font-size: 12px;
  }

  .complete-set-button {
    right: 2px;
    width: 42px;
    height: 42px;
  }

  .exercise-sheet {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: min(84dvh, 760px);
    border-radius: 8px 8px 0 0;
    transform: none;
    animation: sheet-in 190ms ease-out;
  }

  .exercise-picker {
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  }

  .group-tabs {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    grid-template-columns: none;
    justify-content: start;
  }

  .picker-row {
    min-height: 82px;
    grid-template-columns: 64px minmax(0, 1fr) 44px;
  }

  .picker-row img {
    width: 64px;
    height: 64px;
  }

  .exercise-detail-dialog {
    inset: 0;
    width: 100%;
    max-height: 100dvh;
    padding: 18px;
    border: 0;
    border-radius: 0;
    transform: none;
    animation: fade-in 150ms ease-out;
  }

  .detail-header h2 {
    font-size: 28px;
  }

  .detail-layout {
    display: block;
    margin-top: 18px;
  }

  .detail-video-toggle-icon {
    width: 68px;
    height: 68px;
  }

  .detail-coaching {
    margin-top: 24px;
  }

  .account-dialog {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 18px calc(22px + env(safe-area-inset-bottom));
    border-radius: 8px 8px 0 0;
    transform: none;
    animation: sheet-in 190ms ease-out;
  }

  .toast {
    right: 12px;
    bottom: calc(var(--mobile-nav-height) + 88px);
    left: 12px;
    min-width: 0;
  }

  @keyframes sheet-in {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 390px) {
  .mobile-topbar {
    grid-template-columns: 102px minmax(0, 1fr) 38px;
    padding-inline: 10px;
  }

  .mobile-client-select select {
    padding-left: 38px;
    font-size: 13px;
  }

  .week-rail-wrap {
    padding-inline: 32px;
  }

  .week-rail {
    grid-auto-columns: 74px;
  }

  .exercise-row-summary {
    grid-template-columns: 24px 17px 66px minmax(0, 1fr) 34px;
    gap: 5px;
  }

  .exercise-row-summary > img {
    width: 66px;
    height: 66px;
  }

  .exercise-name-block strong {
    font-size: 15px;
  }

  .summary-values {
    gap: 4px 9px;
    font-size: 12px;
  }

  .mobile-publish-bar {
    grid-template-columns: minmax(0, 0.9fr) minmax(154px, 1.25fr);
  }
}

/* Progressive onboarding and client access */

.app-loading {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background: var(--bg);
  color: var(--muted);
}

.onboarding-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 76px minmax(0, 1fr);
  background:
    linear-gradient(180deg, rgba(241, 39, 46, 0.05), transparent 280px),
    var(--bg);
}

.onboarding-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  padding: 0 24px;
}

.onboarding-brand strong,
.onboarding-brand small {
  display: block;
}

.onboarding-brand strong {
  font-size: 16px;
  font-weight: 900;
}

.onboarding-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.onboarding-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--red);
}

.onboarding-mark svg {
  width: 100%;
  height: 100%;
}

.onboarding-panel {
  width: min(100% - 36px, 760px);
  margin: auto;
  padding: 38px 0 72px;
}

.onboarding-heading {
  margin-bottom: 26px;
}

.onboarding-heading > span {
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.onboarding-heading h1 {
  margin-top: 8px;
  font-size: 42px;
  line-height: 1.05;
}

.onboarding-heading p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
}

.onboarding-choices {
  display: grid;
  gap: 10px;
}

.onboarding-choice {
  min-width: 0;
  min-height: 132px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 18px;
  padding: 10px 18px 10px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.onboarding-choice:hover {
  border-color: #505a65;
  background: var(--surface-raised);
  transform: translateY(-1px);
}

.onboarding-choice > img {
  width: 112px;
  height: 112px;
  object-fit: contain;
}

.onboarding-choice > svg {
  width: 24px;
  height: 24px;
  color: var(--dim);
}

.onboarding-choice-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 4px 9px;
}

.onboarding-choice-icon {
  grid-row: 1 / 3;
  padding-top: 1px;
  color: var(--red);
}

.onboarding-choice-copy strong {
  font-size: 18px;
}

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

.onboarding-status {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.dialog-intro {
  margin: -4px 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.find-trainer-dialog {
  width: min(94vw, 760px);
  max-height: min(90dvh, 760px);
  overflow-y: auto;
}

.coach-picker-intro {
  margin: -2px 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

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

.coach-picker-card {
  min-width: 0;
  position: relative;
  display: grid;
  gap: 11px;
  padding: 8px 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.coach-picker-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-raised);
  transform: translateY(-1px);
}

.coach-picker-card.selected {
  border-color: var(--red);
  box-shadow: inset 0 0 0 1px var(--red);
}

.coach-picker-card > img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  object-fit: cover;
}

.coach-picker-card > span:not(.coach-picker-check) {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 0 4px;
}

.coach-picker-card strong {
  font-size: 17px;
}

.coach-picker-card small {
  min-height: 36px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.coach-picker-card em {
  color: var(--red);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.coach-picker-check {
  width: 24px;
  height: 24px;
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(8, 10, 12, 0.78);
  color: transparent;
}

.coach-picker-check svg {
  width: 14px;
  height: 14px;
}

.coach-picker-card.selected .coach-picker-check {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.find-trainer-dialog > .primary-button {
  width: 100%;
  margin-top: 22px;
}

.client-access-view {
  width: min(100%, 1040px);
  margin: 0 auto;
}

.client-access-heading {
  display: grid;
  grid-template-columns: 44px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.client-access-heading .client-avatar {
  width: 54px;
  height: 54px;
  flex-basis: 54px;
}

.client-access-heading h1 {
  margin-top: 4px;
  font-size: 32px;
  line-height: 1.1;
}

.client-access-heading p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.client-access-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.access-explainer {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  margin: 24px 0 14px;
  padding: 15px 16px;
  border-left: 3px solid var(--red);
  background: var(--surface);
  color: var(--muted);
  line-height: 1.5;
}

.access-explainer > svg {
  color: var(--red);
}

.access-explainer strong {
  color: var(--text);
}

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

.client-module-row {
  min-height: 154px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 16px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.client-module-row.enabled {
  border-color: rgba(241, 39, 46, 0.34);
  background: rgba(241, 39, 46, 0.035);
}

.client-module-row:hover {
  transform: translateY(-1px);
}

.client-module-art {
  width: 96px;
  height: 118px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e8e8ea;
  border-radius: 14px;
  background: #f7f7f6;
}

.client-module-art img {
  width: 92%;
  height: 92%;
  object-fit: contain;
}

.client-module-copy strong,
.client-module-copy span {
  display: block;
}

.client-module-copy strong {
  font-size: 16px;
}

.client-module-copy span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.client-module-state {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.client-module-copy .client-module-state {
  display: inline-flex;
}

.client-module-row.enabled .client-module-state {
  color: var(--green);
}

.client-module-state svg {
  width: 16px;
  height: 16px;
}

.access-switch {
  position: relative;
  width: 50px;
  height: 30px;
  padding: 0;
  border: 1px solid #454e57;
  border-radius: 16px;
  background: var(--surface-strong);
}

.access-switch > span {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #a5adb6;
  transition: transform 150ms ease, background-color 150ms ease;
}

.access-switch[aria-checked="true"] {
  border-color: var(--green);
  background: rgba(123, 220, 66, 0.16);
}

.access-switch[aria-checked="true"] > span {
  background: var(--green);
  transform: translateX(20px);
}

.access-fixed-check {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  justify-self: center;
  border: 1px solid rgba(123, 220, 66, 0.4);
  border-radius: 50%;
  color: var(--green);
}

.client-row-main {
  padding-right: 64px;
}

@media (max-width: 760px) {
  body:has(.nutrition-onboarding) .mobile-nav {
    display: none;
  }

  .client-persona .app-main:has(.nutrition-onboarding) {
    padding-bottom: 0;
  }
}

.client-list-empty {
  padding: 32px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 760px) {
  .onboarding-shell {
    grid-template-rows: 64px minmax(0, 1fr);
  }

  .onboarding-brand {
    padding: 0 16px;
  }

  .onboarding-brand small {
    display: none;
  }

  .onboarding-panel {
    width: min(100% - 24px, 560px);
    align-self: start;
    margin: 42px auto 0;
    padding: 24px 0 calc(34px + env(safe-area-inset-bottom));
  }

  .onboarding-heading {
    margin-bottom: 20px;
  }

  .onboarding-heading h1 {
    font-size: 32px;
  }

  .onboarding-heading p {
    font-size: 14px;
  }

  .onboarding-choice {
    min-height: 106px;
    grid-template-columns: 86px minmax(0, 1fr) 28px;
    gap: 10px;
    padding: 8px 12px 8px 6px;
  }

  .onboarding-choice > img {
    width: 86px;
    height: 86px;
  }

  .onboarding-choice-copy {
    display: block;
  }

  .onboarding-choice-icon {
    display: none;
  }

  .onboarding-choice-copy strong,
  .onboarding-choice-copy small {
    display: block;
  }

  .onboarding-choice-copy strong {
    font-size: 16px;
  }

  .onboarding-choice-copy small {
    margin-top: 4px;
    font-size: 12px;
  }

  .single-client-module .app-main {
    padding-bottom: 0;
  }

  .client-access-view {
    padding-right: 14px;
    padding-left: 14px;
  }

  .client-access-heading {
    grid-template-columns: 42px 46px minmax(0, 1fr);
    gap: 9px;
  }

  .client-access-heading .client-avatar {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .client-access-heading h1 {
    font-size: 24px;
  }

  .client-access-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 8px;
  }

  .client-access-actions > button {
    min-width: 0;
    padding-right: 10px;
    padding-left: 10px;
  }

  .client-module-row {
    min-height: 134px;
    grid-template-columns: 82px minmax(0, 1fr) 52px;
    gap: 12px;
    padding: 10px;
  }

  .client-module-list {
    grid-template-columns: 1fr;
  }

  .client-module-art {
    width: 82px;
    height: 108px;
  }

  .client-module-copy span {
    font-size: 12px;
  }

  .client-module-state {
    justify-content: flex-start;
  }

  .access-switch,
  .access-fixed-check {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 390px) {
  .onboarding-choice {
    grid-template-columns: 76px minmax(0, 1fr) 24px;
  }

  .onboarding-choice > img {
    width: 76px;
    height: 76px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Nutrition feature */

.client-row-main {
  padding-right: 116px;
}

.client-nutrition-toggle {
  position: absolute;
  right: 62px;
}

.client-nutrition-toggle.enabled {
  border-color: rgba(87, 173, 255, 0.56);
  background: rgba(30, 112, 223, 0.14);
  color: #57adff;
}

.spinning {
  animation: nutrition-spin 900ms linear infinite;
}

.nutrition-view,
.nutrition-onboarding,
.nutrition-dialog {
  --nutrition-blue: #f1272e;
  --nutrition-blue-dark: #cb1d24;
  --nutrition-ink: #17181c;
  --nutrition-muted: #686b72;
  --nutrition-line: #e5e5e8;
  --nutrition-soft: #f4f4f3;
  --nutrition-card: #ffffff;
  --nutrition-carbs: #23a6a1;
  --nutrition-fat: #8d5fba;
  --nutrition-protein: #ed8b2d;
  color: var(--nutrition-ink);
  color-scheme: light;
}

.nutrition-view {
  min-height: calc(100vh - var(--topbar-height));
  padding-bottom: 90px;
  background: #f6f6f5;
}

.nutrition-view button,
.nutrition-view input,
.nutrition-view select,
.nutrition-dialog button,
.nutrition-dialog input,
.nutrition-dialog select {
  color: inherit;
}

.nutrition-view button:focus-visible,
.nutrition-view input:focus-visible,
.nutrition-view select:focus-visible,
.nutrition-dialog button:focus-visible,
.nutrition-dialog input:focus-visible,
.nutrition-dialog select:focus-visible {
  outline-color: var(--nutrition-blue);
}

.nutrition-hero {
  min-height: 174px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 34px max(36px, calc((100% - 1180px) / 2)) 30px;
  border-bottom: 1px solid var(--nutrition-line);
  background: #fff;
}

.nutrition-hero h1 {
  margin-top: 6px;
  color: var(--nutrition-ink);
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.nutrition-hero p {
  max-width: 520px;
  margin-top: 11px;
  color: var(--nutrition-muted);
  font-size: 16px;
  line-height: 1.5;
}

.nutrition-hero-tools {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
}

.nutrition-scan-cta {
  width: 282px;
  min-height: 82px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  overflow: hidden;
  border: 1px solid var(--nutrition-line);
  border-radius: 16px;
  background: #f8f8f7;
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.nutrition-scan-cta:hover {
  border-color: rgba(241, 39, 46, 0.48);
  background: #fff;
  transform: translateY(-1px);
}

.nutrition-scan-cta > img {
  width: 74px;
  height: 68px;
  object-fit: contain;
}

.nutrition-scan-cta > span,
.nutrition-scan-cta small,
.nutrition-scan-cta strong,
.nutrition-scan-cta em {
  display: block;
}

.nutrition-scan-cta small {
  color: var(--nutrition-blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nutrition-scan-cta strong {
  margin-top: 3px;
  color: var(--nutrition-ink);
  font-size: 15px;
}

.nutrition-scan-cta em {
  margin-top: 3px;
  color: var(--nutrition-muted);
  font-size: 10px;
  font-style: normal;
}

.nutrition-scan-cta > svg {
  width: 18px;
  color: var(--nutrition-muted);
}

.nutrition-eyebrow {
  display: block;
  color: var(--nutrition-blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nutrition-date-control {
  min-width: 220px;
  display: grid;
  grid-template-columns: 44px minmax(96px, 1fr) 44px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--nutrition-line);
  border-radius: 12px;
  background: var(--nutrition-card);
}

.nutrition-date-control > button {
  width: 44px;
  height: 50px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--nutrition-muted);
}

.nutrition-date-control > button:hover {
  background: var(--nutrition-soft);
  color: var(--nutrition-blue);
}

.nutrition-date-control > div {
  min-width: 0;
  text-align: center;
}

.nutrition-date-control span,
.nutrition-date-control strong {
  display: block;
}

.nutrition-date-control span {
  color: var(--nutrition-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.nutrition-date-control strong {
  margin-top: 3px;
  font-size: 15px;
}

.nutrition-date-control.compact {
  min-width: 210px;
}

.nutrition-tabs {
  position: sticky;
  top: var(--topbar-height);
  z-index: 20;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 9px 20px;
  border-bottom: 1px solid var(--nutrition-line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

.nutrition-tabs button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 8px;
  background: transparent;
  color: var(--nutrition-muted);
  font-size: 14px;
  font-weight: 800;
}

.nutrition-tabs button svg {
  width: 18px;
  height: 18px;
}

.nutrition-tabs button:hover {
  background: var(--nutrition-soft);
  color: var(--nutrition-ink);
}

.nutrition-tabs button.active {
  background: #fff0f0;
  color: var(--nutrition-blue);
}

.nutrition-content {
  width: min(100% - 48px, 1180px);
  margin: 0 auto;
  padding-top: 28px;
}

.nutrition-day-heading,
.nutrition-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 18px;
}

.nutrition-day-heading h2,
.nutrition-section-heading h2 {
  margin-top: 5px;
  color: var(--nutrition-ink);
  font-size: 29px;
  letter-spacing: -0.025em;
}

.nutrition-section-heading {
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--nutrition-line);
}

.nutrition-section-heading h2 {
  font-size: clamp(30px, 3vw, 40px);
}

.nutrition-section-heading p {
  max-width: 620px;
  margin-top: 8px;
  color: var(--nutrition-muted);
  line-height: 1.5;
}

.nutrition-link-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  background: transparent;
  color: var(--nutrition-blue);
  font-size: 13px;
  font-weight: 850;
}

.nutrition-link-button svg {
  width: 17px;
  height: 17px;
}

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

.nutrition-card {
  min-width: 0;
  border: 1px solid var(--nutrition-line);
  border-radius: 18px;
  background: var(--nutrition-card);
  box-shadow: 0 8px 26px rgba(20, 20, 24, 0.045);
}

.nutrition-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.nutrition-card > header > svg {
  color: var(--nutrition-blue);
}

.nutrition-card > header span {
  display: block;
  color: var(--nutrition-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.nutrition-card > header h2 {
  margin-top: 4px;
  color: var(--nutrition-ink);
  font-size: 21px;
}

.calorie-card,
.macro-card {
  min-height: 314px;
  padding: 24px;
}

.calorie-number {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 30px;
}

.calorie-number strong {
  color: var(--nutrition-ink);
  font-size: 50px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.calorie-number span {
  color: var(--nutrition-muted);
  font-weight: 700;
}

.nutrition-card progress,
.nutrition-onboarding progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #e6eaf0;
}

.nutrition-card progress::-webkit-progress-bar,
.nutrition-onboarding progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #e6eaf0;
}

.nutrition-card progress::-webkit-progress-value,
.nutrition-onboarding progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--nutrition-blue);
}

.nutrition-card progress::-moz-progress-bar,
.nutrition-onboarding progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--nutrition-blue);
}

.calorie-card > progress {
  margin-top: 18px;
}

.calorie-equation {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 0;
}

.calorie-equation > div {
  min-width: 0;
  padding: 12px;
  border-radius: 9px;
  background: var(--nutrition-soft);
}

.calorie-equation dt {
  color: var(--nutrition-muted);
  font-size: 11px;
  font-weight: 700;
}

.calorie-equation dd {
  margin: 5px 0 0;
  color: var(--nutrition-ink);
  font-size: 17px;
  font-weight: 850;
}

.macro-card {
  display: grid;
  align-content: start;
  gap: 20px;
}

.macro-row {
  display: grid;
  gap: 8px;
}

.macro-row > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.macro-row > div > span {
  color: var(--nutrition-muted);
  font-size: 13px;
  font-weight: 750;
}

.macro-row > div > strong {
  color: var(--nutrition-ink);
  font-size: 14px;
}

.macro-row > div small {
  color: var(--nutrition-muted);
  font-size: 12px;
  font-weight: 600;
}

.macro-row.carbs progress::-webkit-progress-value {
  background: var(--nutrition-carbs);
}

.macro-row.carbs progress::-moz-progress-bar {
  background: var(--nutrition-carbs);
}

.macro-row.fat progress::-webkit-progress-value {
  background: var(--nutrition-fat);
}

.macro-row.fat progress::-moz-progress-bar {
  background: var(--nutrition-fat);
}

.macro-row.protein progress::-webkit-progress-value {
  background: var(--nutrition-protein);
}

.macro-row.protein progress::-moz-progress-bar {
  background: var(--nutrition-protein);
}

.nutrition-quick-section {
  margin-top: 22px;
  padding: 26px;
  border: 1px solid var(--nutrition-line);
  border-radius: 18px;
  background: var(--nutrition-card);
  box-shadow: 0 8px 26px rgba(20, 20, 24, 0.04);
}

.nutrition-quick-section > header h2 {
  margin-top: 5px;
  font-size: 22px;
}

.nutrition-quick-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.nutrition-quick-actions button {
  min-height: 174px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  padding: 14px 15px 16px;
  border: 1px solid var(--nutrition-line);
  border-radius: 15px;
  background: #fafaf9;
  color: var(--nutrition-ink);
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.nutrition-quick-actions button:hover {
  border-color: rgba(241, 39, 46, 0.45);
  background: #fff;
  box-shadow: 0 10px 24px rgba(28, 28, 32, 0.07);
  transform: translateY(-2px);
}

.nutrition-quick-actions button img {
  width: 100%;
  height: 88px;
  margin-bottom: 5px;
  object-fit: contain;
  object-position: center;
}

.nutrition-quick-actions button strong {
  font-size: 15px;
}

.nutrition-quick-actions button span {
  color: var(--nutrition-muted);
  font-size: 12px;
  line-height: 1.35;
}

.nutrition-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.72fr);
  gap: 16px;
  margin-top: 16px;
}

.meal-overview-card,
.hydration-card,
.insight-card {
  padding: 22px;
}

.nutrition-card-total {
  color: var(--nutrition-ink) !important;
  font-size: 14px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.meal-overview-list {
  margin-top: 14px;
}

.meal-overview-row {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 38px;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--nutrition-line);
}

.meal-overview-row > div strong,
.meal-overview-row > div span {
  display: block;
}

.meal-overview-row > div strong {
  font-size: 14px;
}

.meal-overview-row > div span {
  margin-top: 4px;
  color: var(--nutrition-muted);
  font-size: 12px;
}

.meal-overview-row > strong {
  color: var(--nutrition-muted);
  font-size: 13px;
}

.meal-overview-row > button,
.water-controls button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--nutrition-line);
  border-radius: 50%;
  background: #fff;
  color: var(--nutrition-blue);
}

.meal-overview-row > button svg,
.water-controls button svg {
  width: 17px;
  height: 17px;
}

.nutrition-side-stack {
  display: grid;
  gap: 16px;
}

.water-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 22px 0 12px;
}

.water-count strong {
  font-size: 40px;
}

.water-count span {
  color: var(--nutrition-muted);
  font-size: 13px;
}

.hydration-card progress::-webkit-progress-value {
  background: #2e9fe6;
}

.hydration-card progress::-moz-progress-bar {
  background: #2e9fe6;
}

.water-controls {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.water-controls > span {
  color: var(--nutrition-muted);
  font-size: 12px;
  text-align: center;
}

.insight-card > strong {
  display: block;
  margin-top: 18px;
  color: var(--nutrition-blue);
  font-size: 36px;
}

.insight-card p {
  margin-top: 8px;
  color: var(--nutrition-muted);
  font-size: 13px;
  line-height: 1.5;
}

.nutrition-diary,
.nutrition-progress,
.nutrition-goals {
  padding-bottom: 30px;
}

.diary-meals {
  display: grid;
  gap: 12px;
}

.diary-meal-card {
  overflow: hidden;
}

.diary-meal-card > header {
  min-height: 76px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--nutrition-line);
}

.diary-meal-card > header h3 {
  font-size: 18px;
}

.diary-meal-card > header > div span {
  margin-top: 4px;
  color: var(--nutrition-muted);
  font-size: 12px;
}

.diary-entry {
  min-height: 78px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto 38px;
  align-items: center;
  gap: 13px;
  padding: 10px 16px 10px 20px;
  border-bottom: 1px solid var(--nutrition-line);
}

.diary-entry:last-child {
  border-bottom: 0;
}

.food-initial,
.food-result-check {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fff0f0;
  color: var(--nutrition-blue);
  font-size: 14px;
  font-weight: 900;
}

.diary-entry > div {
  min-width: 0;
}

.diary-entry > div strong,
.diary-entry > div span {
  display: block;
}

.diary-entry > div > strong {
  overflow: hidden;
  color: var(--nutrition-ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diary-entry > div > span {
  margin-top: 4px;
  overflow: hidden;
  color: var(--nutrition-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diary-entry-macros {
  text-align: right;
}

.diary-entry > button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  color: #9aa4b3;
}

.diary-entry > button:hover {
  background: #fff0f0;
  color: #d23b3b;
}

.diary-entry > button svg {
  width: 17px;
  height: 17px;
}

.empty-meal-button {
  width: 100%;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fff;
  color: var(--nutrition-muted);
}

.empty-meal-button svg {
  color: var(--nutrition-blue);
}

.empty-meal-button span,
.empty-meal-button strong,
.empty-meal-button small {
  display: block;
  text-align: left;
}

.empty-meal-button strong {
  color: var(--nutrition-ink);
  font-size: 14px;
}

.empty-meal-button small {
  margin-top: 4px;
  color: var(--nutrition-muted);
}

.diary-total-card {
  margin-top: 16px;
  padding: 22px;
}

.diary-total-card > header {
  align-items: center;
}

.diary-total-card > header > strong {
  color: var(--nutrition-blue);
  font-size: 16px;
}

.diary-total-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.diary-total-grid > div {
  padding: 14px;
  border-radius: 9px;
  background: var(--nutrition-soft);
}

.diary-total-grid span,
.diary-total-grid strong {
  display: block;
}

.diary-total-grid span {
  color: var(--nutrition-muted);
  font-size: 11px;
}

.diary-total-grid strong {
  margin-top: 5px;
  font-size: 16px;
}

.diary-total-card > .nutrition-button {
  width: 100%;
  margin-top: 18px;
}

.nutrition-progress-grid,
.nutrition-goals-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 16px;
}

.weekly-calories-card,
.weight-card,
.goal-editor-card,
.profile-summary-card {
  padding: 24px;
}

.weekly-calorie-rows {
  display: grid;
  gap: 15px;
  margin-top: 25px;
}

.weekly-calorie-rows > div {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 13px;
}

.weekly-calorie-rows span {
  color: var(--nutrition-muted);
  font-size: 12px;
  font-weight: 750;
}

.weekly-calorie-rows strong {
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.weekly-calories-card > p {
  margin-top: 22px;
  color: var(--nutrition-muted);
  font-size: 12px;
}

.weight-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

.weight-summary > div {
  padding: 16px;
  border-radius: 9px;
  background: var(--nutrition-soft);
}

.weight-summary span,
.weight-summary strong {
  display: block;
}

.weight-summary span {
  color: var(--nutrition-muted);
  font-size: 11px;
}

.weight-summary strong {
  margin-top: 6px;
  font-size: 19px;
}

.weight-card form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.weight-card form label,
.goal-calorie-input,
.goal-editor-card fieldset > label,
.custom-food-form label,
.scanned-product-controls label,
.nutrition-meal-select {
  display: grid;
  gap: 7px;
}

.weight-card form label > span,
.goal-calorie-input > span,
.goal-editor-card fieldset > label > span,
.custom-food-form label > span,
.scanned-product-controls label > span,
.nutrition-meal-select > span {
  color: var(--nutrition-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.weight-card form label > div,
.goal-editor-card fieldset > label > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--nutrition-line);
  border-radius: 8px;
  background: #fff;
}

.weight-card form input,
.goal-editor-card input,
.custom-food-form input,
.scanned-product-controls input,
.scanned-product-controls select,
.nutrition-meal-select select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--nutrition-line);
  border-radius: 8px;
  outline: 0;
  background: #fff;
  color: var(--nutrition-ink);
}

.weight-card form label > div input,
.goal-editor-card fieldset > label > div input {
  border: 0;
}

.weight-card form label > div > span,
.goal-editor-card fieldset > label > div > span {
  padding-right: 12px;
  color: var(--nutrition-muted);
  font-size: 12px;
}

.goal-calorie-input {
  margin-top: 24px;
}

.goal-editor-card fieldset {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 22px 0 0;
  margin: 22px 0 0;
  border: 0;
  border-top: 1px solid var(--nutrition-line);
}

.goal-editor-card legend {
  padding: 0;
  color: var(--nutrition-ink);
  font-size: 13px;
  font-weight: 850;
}

.goal-editor-card fieldset small {
  color: var(--nutrition-muted);
  font-size: 11px;
}

.goal-ratio-note {
  margin-top: 18px;
  color: #c94747;
  font-size: 12px;
  font-weight: 750;
}

.goal-ratio-note.valid {
  color: #278451;
}

.profile-summary-card dl {
  margin: 22px 0 0;
}

.profile-summary-card dl > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--nutrition-line);
}

.profile-summary-card dt {
  color: var(--nutrition-muted);
}

.profile-summary-card dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.profile-summary-card .nutrition-button {
  width: 100%;
  margin-top: 22px;
}

.profile-summary-card > p {
  margin-top: 14px;
  color: var(--nutrition-muted);
  font-size: 11px;
  line-height: 1.5;
}

.nutrition-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 850;
  transition: 150ms ease;
}

.nutrition-button.primary {
  background: var(--nutrition-blue);
  color: #fff;
}

.nutrition-button.primary:hover {
  background: var(--nutrition-blue-dark);
}

.nutrition-button.secondary {
  border-color: var(--nutrition-blue);
  background: #fff;
  color: var(--nutrition-blue);
}

.nutrition-button.secondary:hover {
  background: #fff5f5;
}

.nutrition-button svg {
  width: 18px;
  height: 18px;
}

.nutrition-onboarding {
  min-height: calc(100vh - var(--topbar-height));
  padding: 26px 24px 60px;
  background: #f7f8fb;
}

.nutrition-onboarding-brand {
  width: min(100%, 720px);
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 auto 18px;
}

.nutrition-brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--nutrition-blue);
  color: #fff;
}

.nutrition-onboarding-brand strong,
.nutrition-onboarding-brand small {
  display: block;
}

.nutrition-onboarding-brand strong {
  color: var(--nutrition-ink);
  font-size: 13px;
  letter-spacing: 0.05em;
}

.nutrition-onboarding-brand small {
  margin-top: 1px;
  color: var(--nutrition-muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.nutrition-onboarding-card {
  width: min(100%, 720px);
  overflow: hidden;
  margin: 0 auto;
  border: 1px solid var(--nutrition-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(31, 47, 78, 0.1);
}

.nutrition-onboarding-card > progress {
  display: block;
  height: 7px;
  border-radius: 0;
}

.nutrition-onboarding-card > progress::-webkit-progress-bar {
  border-radius: 0;
}

.nutrition-onboarding-card > progress::-webkit-progress-value {
  border-radius: 0;
}

.nutrition-onboarding .onboarding-panel {
  min-height: 540px;
  padding: 42px 54px 28px;
}

.nutrition-onboarding .onboarding-panel > h1 {
  max-width: 600px;
  margin-top: 8px;
  color: var(--nutrition-ink);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.nutrition-onboarding .onboarding-panel > p:not(.nutrition-eyebrow):not(.nutrition-form-note) {
  max-width: 590px;
  margin-top: 12px;
  color: var(--nutrition-muted);
  line-height: 1.5;
}

.nutrition-onboarding .onboarding-panel.welcome {
  text-align: center;
}

.nutrition-onboarding .onboarding-panel.welcome > h1,
.nutrition-onboarding .onboarding-panel.welcome > p {
  margin-right: auto;
  margin-left: auto;
}

.onboarding-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 16px;
  background: #fff0f0;
  color: var(--nutrition-blue);
}

.onboarding-icon svg {
  width: 28px;
  height: 28px;
}

.onboarding-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 34px;
  text-align: left;
}

.onboarding-benefits article {
  min-height: 218px;
  padding: 14px 18px 18px;
  border: 1px solid var(--nutrition-line);
  border-radius: 15px;
  background: #fafaf9;
}

.onboarding-benefits article img {
  width: 100%;
  height: 104px;
  object-fit: contain;
}

.onboarding-benefits strong,
.onboarding-benefits span {
  display: block;
}

.onboarding-benefits strong {
  margin-top: 5px;
  font-size: 14px;
}

.onboarding-benefits span {
  margin-top: 7px;
  color: var(--nutrition-muted);
  font-size: 12px;
  line-height: 1.45;
}

.onboarding-options {
  display: grid;
  gap: 8px;
  margin-top: 26px;
}

.onboarding-options button {
  min-height: 74px;
  display: grid;
  gap: 5px;
  padding: 13px 16px;
  border: 1px solid #bcc4d0;
  border-radius: 7px;
  background: #fff;
  color: var(--nutrition-ink);
  text-align: left;
}

.onboarding-options button:hover {
  border-color: #ef777b;
}

.onboarding-options button.selected {
  box-shadow: inset 0 0 0 1px var(--nutrition-blue);
  border-color: var(--nutrition-blue);
  background: #fff8f8;
}

.onboarding-options button strong {
  font-size: 15px;
}

.onboarding-options button span {
  color: var(--nutrition-muted);
  font-size: 12px;
}

.onboarding-options button.selected strong {
  color: var(--nutrition-blue);
}

.onboarding-goal-fieldset {
  padding: 0;
  margin: 24px 0 0;
  border: 0;
}

.onboarding-goal-fieldset legend {
  color: var(--nutrition-ink);
  font-size: 13px;
  font-weight: 850;
}

.onboarding-goal-fieldset > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.onboarding-goal-fieldset button {
  min-height: 44px;
  border: 1px solid var(--nutrition-line);
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  font-weight: 750;
}

.onboarding-goal-fieldset button.selected {
  border-color: var(--nutrition-blue);
  background: #fff0f0;
  color: var(--nutrition-blue);
}

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

.nutrition-form-grid label {
  display: grid;
  gap: 7px;
}

.nutrition-form-grid label > span {
  color: var(--nutrition-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.nutrition-form-grid input,
.nutrition-form-grid select {
  width: 100%;
  min-height: 50px;
  padding: 0 13px;
  border: 1px solid var(--nutrition-line);
  border-radius: 7px;
  outline: 0;
  background: #fff;
  color: var(--nutrition-ink);
}

.nutrition-form-grid input:focus,
.nutrition-form-grid select:focus,
.nutrition-dialog input:focus,
.nutrition-dialog select:focus,
.goal-editor-card input:focus,
.weight-card input:focus {
  border-color: var(--nutrition-blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.12);
}

.nutrition-form-note {
  margin-top: 18px;
  color: var(--nutrition-muted);
  font-size: 11px;
  line-height: 1.5;
}

.nutrition-onboarding .onboarding-panel.summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.calorie-goal-result {
  min-width: 270px;
  margin: 30px auto 12px;
  padding: 23px 28px;
  border-radius: 12px;
  background: var(--nutrition-soft);
}

.calorie-goal-result span,
.calorie-goal-result strong,
.calorie-goal-result small {
  display: block;
}

.calorie-goal-result span {
  color: var(--nutrition-muted);
  font-size: 12px;
  font-weight: 750;
}

.calorie-goal-result strong {
  margin-top: 8px;
  color: var(--nutrition-ink);
  font-size: 48px;
}

.calorie-goal-result small {
  margin-top: 2px;
  color: var(--nutrition-blue);
  font-weight: 800;
}

.onboarding-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
  padding: 18px 54px 32px;
}

.nutrition-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(11, 19, 32, 0.66);
  animation: fade-in 150ms ease-out;
}

.nutrition-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 210;
  width: min(960px, calc(100vw - 40px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  border: 1px solid var(--nutrition-line);
  border-radius: 15px;
  outline: 0;
  background: #fff;
  box-shadow: 0 28px 90px rgba(6, 16, 34, 0.34);
  transform: translate(-50%, -50%);
  animation: dialog-in 170ms ease-out;
}

.nutrition-dialog-heading {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--nutrition-line);
}

.nutrition-dialog-heading > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.nutrition-dialog-heading h2 {
  color: var(--nutrition-ink);
  font-size: 21px;
}

.nutrition-dialog-heading p {
  margin-top: 4px;
  color: var(--nutrition-muted);
  font-size: 12px;
}

.nutrition-dialog-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  border-radius: 11px;
  background: #fff0f0;
  color: var(--nutrition-blue);
}

.nutrition-icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  border-radius: 9px;
  background: transparent;
  color: var(--nutrition-muted);
}

.nutrition-icon-button:hover {
  background: var(--nutrition-soft);
  color: var(--nutrition-ink);
}

.nutrition-mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--nutrition-line);
  background: #fbfcfe;
}

.nutrition-mode-tabs button {
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 7px;
  background: transparent;
  color: var(--nutrition-muted);
  font-size: 12px;
  font-weight: 800;
}

.nutrition-mode-tabs button.active {
  background: #fff0f0;
  color: var(--nutrition-blue);
}

.nutrition-mode-tabs svg {
  width: 17px;
  height: 17px;
}

.nutrition-meal-select {
  grid-template-columns: auto minmax(150px, 210px);
  align-items: center;
  padding: 13px 20px;
  border-bottom: 1px solid var(--nutrition-line);
}

.nutrition-meal-select select {
  min-height: 42px;
}

.food-search-panel {
  padding: 18px 20px 22px;
}

.nutrition-search-input {
  position: relative;
  display: flex;
  align-items: center;
}

.nutrition-search-input > svg {
  position: absolute;
  left: 14px;
  z-index: 1;
  color: var(--nutrition-muted);
  pointer-events: none;
}

.nutrition-search-input input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px 0 44px;
  border: 1px solid var(--nutrition-line);
  border-radius: 9px;
  outline: 0;
  background: #fff;
  color: var(--nutrition-ink);
}

.food-search-toolbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 2px 0;
}

.food-search-toolbar > span {
  color: var(--nutrition-muted);
  font-size: 10px;
  line-height: 1.35;
}

.food-search-toolbar > button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 0 11px;
  border: 1px solid var(--nutrition-line);
  border-radius: 8px;
  background: #fff;
  color: var(--nutrition-ink);
  font-size: 10px;
  font-weight: 850;
}

.food-search-toolbar > button:hover:not(:disabled) {
  border-color: #f5a4a8;
  color: var(--nutrition-blue);
}

.food-search-toolbar > button:disabled {
  opacity: 0.52;
}

.food-search-toolbar svg {
  width: 15px;
  height: 15px;
}

.food-search-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(270px, 0.75fr);
  gap: 15px;
  margin-top: 15px;
}

.food-result-list {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--nutrition-line);
  border-radius: 10px;
}

.food-result-section {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 12px 7px;
  border-bottom: 1px solid var(--nutrition-line);
  background: #f7f8fa;
  color: var(--nutrition-muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.food-result-list > button {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--nutrition-line);
  background: #fff;
  text-align: left;
}

.food-result-list > button:last-child {
  border-bottom: 0;
}

.food-result-list > button:hover,
.food-result-list > button.selected {
  background: #f6faff;
}

.food-result-list > button.selected {
  box-shadow: inset 3px 0 var(--nutrition-blue);
}

.food-result-list > button > span:nth-child(2) {
  min-width: 0;
}

.food-result-list > button > span strong,
.food-result-list > button > span small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.food-result-list > button > span strong {
  font-size: 13px;
}

.food-result-list > button > span small {
  margin-top: 4px;
  color: var(--nutrition-muted);
  font-size: 11px;
}

.food-result-list > button > strong {
  color: var(--nutrition-muted);
  font-size: 12px;
}

.food-result-list > button > svg {
  width: 17px;
  height: 17px;
  color: #9a9ea8;
}

.food-result-list > button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.food-result-message {
  padding: 18px 15px;
  color: var(--nutrition-muted);
  font-size: 11px;
  line-height: 1.5;
}

.food-result-message.error {
  color: #a12b31;
}

.food-result-thumb {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #edf0f4;
  border-radius: 10px;
  background: #f4f7fb;
  color: var(--nutrition-blue);
}

.food-result-thumb > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.food-result-thumb > svg {
  width: 18px;
  height: 18px;
}

.food-result-thumb > i {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--nutrition-blue);
  color: #fff;
}

.food-result-thumb > i svg {
  width: 9px;
  height: 9px;
}

.food-initial svg,
.food-result-check svg {
  width: 17px;
  height: 17px;
}

.food-selection {
  min-height: 350px;
  align-self: start;
  padding: 20px;
  border: 1px solid var(--nutrition-line);
  border-radius: 10px;
  background: #fbfcfe;
}

.food-selection.empty {
  display: grid;
  place-content: center;
  gap: 8px;
  color: var(--nutrition-muted);
  text-align: center;
}

.food-selection.empty > svg {
  width: 26px;
  height: 26px;
  margin: 0 auto 4px;
}

.food-selection.empty strong {
  color: var(--nutrition-ink);
}

.food-selection.empty span {
  max-width: 210px;
  font-size: 12px;
  line-height: 1.45;
}

.food-selection-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--nutrition-blue);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.food-selection-label svg {
  width: 14px;
  height: 14px;
}

.food-selection-image {
  width: 74px;
  height: 74px;
  display: block;
  margin-bottom: 15px;
  object-fit: cover;
  border: 1px solid #edf0f4;
  border-radius: 14px;
  background: #fff;
}

.food-selection h3 {
  margin-top: 8px;
  font-size: 21px;
}

.food-selection > p {
  margin-top: 5px;
  color: var(--nutrition-muted);
  font-size: 12px;
}

.food-selection dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 20px 0;
}

.food-selection dl > div {
  padding: 11px;
  border-radius: 8px;
  background: #fff;
}

.food-selection dt {
  color: var(--nutrition-muted);
  font-size: 10px;
}

.food-selection dd {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 850;
}

.food-selection > label {
  display: grid;
  gap: 6px;
}

.food-selection > label span {
  color: var(--nutrition-muted);
  font-size: 11px;
  font-weight: 800;
}

.food-selection > label input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--nutrition-line);
  border-radius: 7px;
  outline: 0;
  background: #fff;
}

.food-selection > .nutrition-button {
  width: 100%;
  margin-top: 12px;
}

.catalog-selection {
  min-height: 420px;
}

.catalog-provider-note {
  display: grid;
  gap: 5px;
  margin: 18px 0 14px;
  padding: 12px;
  border: 1px solid #dce7f5;
  border-radius: 9px;
  background: #f5f9ff;
}

.catalog-provider-note strong {
  font-size: 11px;
}

.catalog-provider-note span {
  color: var(--nutrition-muted);
  font-size: 10px;
  line-height: 1.45;
}

.catalog-selection > .nutrition-button {
  width: 100%;
}

.catalog-provider-status {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--nutrition-muted);
  font-size: 11px;
}

.catalog-provider-status svg {
  width: 17px;
  height: 17px;
}

.catalog-provider-error {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #f2d1d3;
  border-radius: 9px;
  background: #fff7f7;
}

.catalog-provider-error p {
  color: #8b3034;
  font-size: 10px;
  line-height: 1.45;
}

.catalog-provider-results {
  max-height: 210px;
  overflow-y: auto;
  border: 1px solid var(--nutrition-line);
  border-radius: 9px;
  background: #fff;
}

.catalog-provider-results > span {
  display: block;
  padding: 8px 10px;
  border-bottom: 1px solid var(--nutrition-line);
  color: var(--nutrition-muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.catalog-provider-results > button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--nutrition-line);
  background: #fff;
  text-align: left;
}

.catalog-provider-results > button:last-child {
  border-bottom: 0;
}

.catalog-provider-results > button:hover:not(:disabled) {
  background: #f6faff;
}

.catalog-provider-results > button > span {
  min-width: 0;
}

.catalog-provider-results strong,
.catalog-provider-results small {
  display: block;
}

.catalog-provider-results > button > span strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-provider-results small {
  margin-top: 3px;
  color: var(--nutrition-muted);
  font-size: 9px;
}

.catalog-provider-results > button > strong {
  flex: 0 0 auto;
  color: var(--nutrition-muted);
  font-size: 10px;
}

.catalog-source-note,
.catalog-source-link {
  display: block;
  margin-top: 12px;
  color: var(--nutrition-muted);
  font-size: 9px;
  line-height: 1.4;
}

.catalog-source-link:hover {
  color: var(--nutrition-blue);
}

.custom-food-form,
.meal-scan-panel,
.voice-log-panel {
  padding: 22px;
}

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

.custom-food-grid .span-two {
  grid-column: 1 / -1;
}

.custom-food-form > .nutrition-button {
  width: 100%;
  margin-top: 18px;
}

.meal-photo-drop {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  border: 1px dashed #9bb8df;
  border-radius: 12px;
  background: #fff8f8;
  color: var(--nutrition-muted);
  text-align: center;
  cursor: pointer;
}

.meal-photo-drop > svg {
  width: 34px;
  height: 34px;
  color: var(--nutrition-blue);
}

.meal-photo-drop strong {
  margin-top: 14px;
  color: var(--nutrition-ink);
  font-size: 17px;
}

.meal-photo-drop span {
  margin-top: 6px;
  font-size: 12px;
}

.meal-photo-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.meal-scan-result {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
  gap: 22px;
}

.meal-scan-result > img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 11px;
  background: var(--nutrition-soft);
}

.meal-scan-result h3 {
  margin-top: 9px;
  font-size: 22px;
}

.scan-estimate-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--nutrition-blue);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.scan-estimate-label svg {
  width: 16px;
  height: 16px;
}

.meal-scan-result ul {
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.meal-scan-result li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--nutrition-line);
  font-size: 13px;
}

.meal-scan-result p {
  margin-top: 15px;
  color: var(--nutrition-muted);
  font-size: 11px;
  line-height: 1.5;
}

.meal-scan-result > .nutrition-button {
  grid-column: 1 / -1;
}

.voice-log-panel {
  max-width: 620px;
  margin: 0 auto;
}

.voice-listen-button {
  width: 100%;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--nutrition-line);
  border-radius: 12px;
  background: #fff8f8;
}

.voice-listen-button > span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--nutrition-blue);
  color: #fff;
}

.voice-listen-button strong {
  margin-top: 13px;
  font-size: 17px;
}

.voice-listen-button small {
  margin-top: 5px;
  color: var(--nutrition-muted);
}

.voice-status {
  margin: 12px 0;
  color: var(--nutrition-muted);
  font-size: 12px;
  text-align: center;
}

.voice-log-panel > .nutrition-search-input {
  margin-top: 15px;
}

.voice-match-list {
  margin-top: 12px;
  border-top: 1px solid var(--nutrition-line);
}

.voice-match-list button {
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--nutrition-line);
  background: transparent;
  text-align: left;
}

.voice-match-list button span strong,
.voice-match-list button span small {
  display: block;
}

.voice-match-list button span small,
.voice-match-list > p {
  margin-top: 3px;
  color: var(--nutrition-muted);
  font-size: 11px;
}

.barcode-dialog {
  width: min(740px, calc(100vw - 40px));
}

.barcode-camera {
  position: relative;
  height: 300px;
  overflow: hidden;
  background: #101826;
}

.barcode-camera video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-status,
.camera-guidance {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(11, 19, 32, 0.74);
  color: #fff;
}

.camera-status > svg,
.camera-guidance > svg {
  width: 42px;
  height: 42px;
}

.camera-guidance {
  inset: auto 50% 22px auto;
  min-width: 250px;
  flex-direction: row;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 9px;
  background: rgba(9, 17, 30, 0.78);
  font-size: 12px;
  transform: translateX(50%);
}

.camera-guidance > svg {
  width: 20px;
  height: 20px;
}

.barcode-manual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 18px 20px 8px;
}

.barcode-manual label {
  display: grid;
  gap: 7px;
}

.barcode-manual label > span {
  color: var(--nutrition-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.barcode-manual input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--nutrition-line);
  border-radius: 8px;
  outline: 0;
}

.barcode-demo-button {
  min-height: 34px;
  margin: 0 20px;
  padding: 0;
  background: transparent;
  color: var(--nutrition-blue) !important;
  font-size: 11px;
  font-weight: 800;
}

.barcode-message {
  margin: 8px 20px 0;
  padding: 11px 13px;
  border-radius: 8px;
  background: var(--nutrition-soft);
  color: var(--nutrition-muted);
  font-size: 12px;
}

.barcode-message.error {
  background: #fff1f1;
  color: #a63f3f;
}

.scanned-product-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 15px;
  margin: 12px 20px 22px;
  padding: 16px;
  border: 1px solid var(--nutrition-line);
  border-radius: 11px;
  background: #fbfcfe;
}

.scanned-product-card > img,
.scanned-product-icon {
  width: 92px;
  height: 112px;
  object-fit: contain;
  border-radius: 9px;
  background: #fff;
}

.scanned-product-icon {
  display: grid;
  place-items: center;
  color: var(--nutrition-blue);
}

.scanned-product-icon svg {
  width: 30px;
  height: 30px;
}

.scanned-product-copy {
  min-width: 0;
}

.scanned-product-copy > span {
  color: var(--nutrition-muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.scanned-product-copy h3 {
  margin-top: 5px;
  font-size: 21px;
}

.scanned-product-copy > p {
  margin-top: 6px;
  color: var(--nutrition-muted);
  font-size: 12px;
}

.scanned-product-copy > div {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-top: 13px;
  color: var(--nutrition-muted);
  font-size: 11px;
}

.scanned-product-copy > div strong {
  color: var(--nutrition-ink);
}

.scanned-product-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.scanned-product-card > .nutrition-button,
.scanned-product-card > small {
  grid-column: 1 / -1;
}

.scanned-product-card > small {
  color: var(--nutrition-muted);
  font-size: 10px;
  line-height: 1.45;
}

.scanned-product-warnings {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 10px 12px 10px 28px;
  border-radius: 8px;
  background: #fff8e8;
  color: #795814;
  font-size: 10px;
  line-height: 1.45;
}

@keyframes nutrition-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1040px) {
  .nutrition-hero-tools {
    width: 282px;
    flex-direction: column;
    align-items: stretch;
  }

  .nutrition-hero-tools .nutrition-date-control {
    width: 100%;
  }

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

  .nutrition-lower-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(270px, 0.7fr);
  }
}

@media (max-width: 767px) {
  .client-row-main {
    padding-right: 96px;
  }

  .client-nutrition-toggle {
    right: 50px;
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .client-email {
    right: 4px;
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .nutrition-view {
    min-height: calc(100dvh - var(--mobile-topbar-height));
    padding-bottom: calc(var(--mobile-nav-height) + 28px);
  }

  .nutrition-hero {
    min-height: 0;
    display: block;
    padding: 24px 18px 18px;
  }

  .nutrition-hero h1 {
    font-size: 34px;
  }

  .nutrition-hero p {
    font-size: 13px;
  }

  .nutrition-hero-tools {
    width: 100%;
    margin-top: 18px;
  }

  .nutrition-scan-cta {
    width: 100%;
  }

  .nutrition-hero .nutrition-date-control {
    width: 100%;
    margin-top: 0;
  }

  .nutrition-tabs {
    top: var(--mobile-topbar-height);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 6px 8px;
  }

  .nutrition-tabs button {
    min-height: 46px;
    display: grid;
    place-content: center;
    gap: 3px;
    padding: 0 4px;
    font-size: 10px;
  }

  .nutrition-tabs button svg {
    margin: 0 auto;
  }

  .nutrition-content {
    width: min(100% - 24px, 1180px);
    padding-top: 18px;
  }

  .nutrition-day-heading {
    align-items: center;
  }

  .nutrition-day-heading h2 {
    font-size: 24px;
  }

  .nutrition-day-heading .nutrition-link-button {
    font-size: 11px;
  }

  .nutrition-summary-grid,
  .nutrition-lower-grid,
  .nutrition-progress-grid,
  .nutrition-goals-grid {
    grid-template-columns: 1fr;
  }

  .calorie-card,
  .macro-card {
    min-height: 0;
    padding: 20px;
  }

  .calorie-number {
    margin-top: 20px;
  }

  .calorie-number strong {
    font-size: 42px;
  }

  .nutrition-quick-section {
    padding: 18px;
  }

  .nutrition-quick-actions {
    grid-template-columns: 1fr 1fr;
  }

  .nutrition-quick-actions button {
    min-height: 158px;
    padding: 13px;
  }

  .nutrition-quick-actions button:last-child {
    grid-column: 1 / -1;
    min-height: 124px;
  }

  .nutrition-quick-actions button img {
    height: 76px;
  }

  .nutrition-quick-actions button:last-child img {
    width: 104px;
    height: 68px;
  }

  .nutrition-section-heading {
    display: block;
    padding-bottom: 18px;
  }

  .nutrition-section-heading h2 {
    font-size: 30px;
  }

  .nutrition-section-heading .nutrition-date-control {
    width: 100%;
    margin-top: 18px;
  }

  .diary-meal-card > header {
    padding-inline: 16px;
  }

  .diary-entry {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 10px;
    padding-inline: 12px;
  }

  .diary-entry-macros {
    grid-column: 2;
    text-align: left;
  }

  .diary-entry > button {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .food-initial {
    width: 34px;
    height: 34px;
    grid-row: 1 / 3;
  }

  .diary-total-grid {
    grid-template-columns: 1fr 1fr;
  }

  .goal-editor-card fieldset {
    grid-template-columns: 1fr;
  }

  .nutrition-onboarding {
    min-height: calc(100dvh - var(--mobile-topbar-height));
    padding: 16px 12px calc(var(--mobile-nav-height) + 30px);
  }

  .nutrition-onboarding-card {
    border-radius: 10px;
  }

  .nutrition-onboarding .onboarding-panel {
    min-height: 0;
    padding: 30px 22px 20px;
  }

  .nutrition-onboarding .onboarding-panel.welcome > h1 {
    font-size: 30px;
  }

  .onboarding-benefits {
    grid-template-columns: 1fr;
    margin-top: 24px;
  }

  .onboarding-benefits article {
    min-height: 110px;
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    align-items: center;
    gap: 2px 12px;
    padding: 10px 14px 10px 8px;
  }

  .onboarding-benefits article img {
    width: 84px;
    height: 78px;
    grid-row: 1 / 3;
  }

  .onboarding-benefits strong {
    margin: 0;
  }

  .onboarding-benefits span {
    margin-top: 3px;
  }

  .nutrition-form-grid {
    grid-template-columns: 1fr;
  }

  .onboarding-goal-fieldset > div {
    grid-template-columns: 1fr;
  }

  .onboarding-actions {
    padding: 14px 22px 24px;
  }

  .nutrition-dialog {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: calc(100dvh - 10px);
    border-radius: 14px 14px 0 0;
    transform: none;
    animation: sheet-in 190ms ease-out;
  }

  .nutrition-dialog-heading {
    min-height: 76px;
    padding: 13px 14px;
  }

  .nutrition-dialog-heading p {
    display: none;
  }

  .nutrition-mode-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 7px 9px;
  }

  .nutrition-mode-tabs button {
    display: grid;
    place-content: center;
    gap: 3px;
    padding: 4px;
    font-size: 10px;
  }

  .nutrition-mode-tabs button svg {
    margin: 0 auto;
  }

  .nutrition-meal-select {
    grid-template-columns: auto minmax(130px, 1fr);
    padding: 10px 14px;
  }

  .food-search-panel {
    padding: 13px 12px 20px;
  }

  .food-search-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    padding-top: 8px;
  }

  .food-search-toolbar > button {
    width: 100%;
  }

  .food-search-layout {
    grid-template-columns: 1fr;
  }

  .food-result-list {
    max-height: 290px;
  }

  .food-selection {
    min-height: 0;
  }

  .catalog-selection {
    min-height: 0;
  }

  .custom-food-grid {
    grid-template-columns: 1fr;
  }

  .custom-food-grid .span-two {
    grid-column: auto;
  }

  .custom-food-form,
  .meal-scan-panel,
  .voice-log-panel {
    padding: 16px 14px calc(22px + env(safe-area-inset-bottom));
  }

  .meal-scan-result {
    grid-template-columns: 1fr;
  }

  .meal-scan-result > img {
    height: 210px;
  }

  .meal-scan-result > .nutrition-button {
    grid-column: auto;
  }

  .barcode-camera {
    height: 240px;
  }

  .barcode-manual {
    grid-template-columns: 1fr;
    padding-inline: 14px;
  }

  .barcode-demo-button,
  .barcode-message {
    margin-right: 14px;
    margin-left: 14px;
  }

  .scanned-product-card {
    grid-template-columns: 72px minmax(0, 1fr);
    margin: 10px 14px calc(20px + env(safe-area-inset-bottom));
    padding: 12px;
  }

  .scanned-product-card > img,
  .scanned-product-icon {
    width: 72px;
    height: 90px;
  }
}

@media (max-width: 390px) {
  .nutrition-content {
    width: min(100% - 18px, 1180px);
  }

  .calorie-equation {
    gap: 7px;
  }

  .calorie-equation > div {
    padding: 10px 8px;
  }

  .nutrition-quick-section {
    padding: 14px;
  }

  .nutrition-quick-actions {
    gap: 7px;
  }

  .nutrition-quick-actions button {
    min-height: 148px;
  }

  .onboarding-actions {
    grid-template-columns: 0.9fr 1.25fr;
    gap: 8px;
    padding-inline: 16px;
  }
}

.client-row-main {
  padding-right: 64px;
}

/* Coach and trainee acquisition */

@media (min-width: 761px) {
  .onboarding-panel {
    width: min(100% - 40px, 920px);
  }

  .onboarding-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .onboarding-choice {
    min-height: 126px;
    grid-template-columns: 96px minmax(0, 1fr) 28px;
    gap: 13px;
  }

  .onboarding-choice > img {
    width: 96px;
    height: 96px;
  }
}

.demo-trial-dialog {
  width: min(92vw, 520px);
}

.demo-trial-dialog > img {
  width: 136px;
  height: 136px;
  margin: 0 auto 2px;
  object-fit: contain;
}

.demo-trial-dialog > div:not(.dialog-heading) {
  text-align: center;
}

.demo-trial-dialog > div:not(.dialog-heading) p {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.5;
}

.demo-trial-dialog > ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.demo-trial-dialog > ul li {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.demo-trial-dialog > ul svg {
  width: 18px;
  height: 18px;
  color: var(--red);
}

.demo-billing-note,
.code-demo-note,
.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.demo-billing-note {
  margin-top: 16px;
  text-align: center;
}

.demo-trial-dialog > .primary-button {
  width: 100%;
  margin-top: 18px;
}

.field-hint {
  display: block;
  margin-top: 6px;
}

.code-demo-note {
  padding: 11px 12px;
  border-left: 3px solid var(--red);
  background: var(--surface-raised);
}

.coach-discovery-view {
  width: min(100%, 920px);
  margin: 0 auto;
}

.coach-match-list {
  border-top: 1px solid var(--line);
}

.coach-match-row {
  border-bottom: 1px solid var(--line);
}

.coach-match-row.recommended {
  border-left: 3px solid var(--red);
}

.coach-match-row.selected {
  border-left: 3px solid var(--red);
  background: rgba(241, 39, 46, 0.035);
}

.coach-match-summary {
  width: 100%;
  min-height: 96px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.coach-match-summary:hover {
  background: var(--surface);
}

.coach-match-summary > svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: transform 150ms ease;
}

.coach-match-summary[aria-expanded="true"] > svg {
  transform: rotate(180deg);
}

.coach-match-avatar {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  object-fit: cover;
}

.coach-match-copy,
.coach-match-copy > span:first-child {
  min-width: 0;
}

.coach-match-copy > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coach-match-copy > span:first-child {
  flex-wrap: wrap;
}

.coach-match-copy strong {
  font-size: 17px;
}

.coach-match-copy small {
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.coach-match-copy > span:nth-child(2) {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.coach-match-location {
  margin-top: 7px;
  color: var(--dim);
  font-size: 12px;
}

.coach-match-location svg {
  width: 14px;
  height: 14px;
}

.coach-program-preview {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(150px, auto) auto;
  align-items: center;
  gap: 18px;
  padding: 4px 16px 20px 84px;
}

.coach-program-preview > div:first-child span,
.coach-program-preview > div:first-child strong {
  display: block;
}

.coach-program-preview > div:first-child span {
  color: var(--dim);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.coach-program-preview > div:first-child strong {
  margin-top: 4px;
}

.coach-program-preview > div:nth-child(2) {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.coach-program-preview > div:nth-child(2) svg {
  width: 17px;
  height: 17px;
  color: var(--red);
}

.coach-program-preview ul {
  grid-column: 1 / 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  list-style: none;
}

.coach-instagram-link {
  width: fit-content;
  display: inline-flex;
  grid-column: 1 / 3;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.coach-instagram-link:hover {
  color: var(--red);
}

.coach-instagram-link:focus-visible {
  border-radius: 6px;
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.coach-instagram-mark {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: radial-gradient(circle at 32% 106%, #ffd600 0 22%, #ff7a00 37%, #ff0169 62%, #d300c5 78%, #7638fa 100%);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.coach-instagram-mark svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.3;
}

.coach-program-preview li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.coach-program-preview li svg {
  width: 14px;
  height: 14px;
  color: var(--green);
}

.coach-program-preview .secondary-button {
  grid-column: 3;
  grid-row: 1 / 4;
}

.client-module-row {
  grid-template-columns: 96px minmax(0, 1fr) 54px;
}

.client-module-art {
  width: 96px;
  height: 118px;
  display: grid;
  place-items: center;
  border: 1px solid #e8e8ea;
  border-radius: 14px;
  background: #f7f7f6;
  overflow: hidden;
}

.client-module-art img {
  width: 92%;
  height: 92%;
  object-fit: contain;
}

.client-module-row.enabled .client-module-art {
  border-color: rgba(241, 39, 46, 0.34);
}

@media (max-width: 760px) {
  .onboarding-panel {
    margin-top: 18px;
  }

  .demo-trial-dialog > ul {
    grid-template-columns: 1fr;
  }

  .coach-discovery-view {
    padding-right: 14px;
    padding-left: 14px;
  }

  .find-trainer-dialog {
    max-height: calc(100dvh - 12px);
  }

  .coach-picker-grid {
    grid-template-columns: 1fr;
  }

  .coach-picker-card {
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 8px 42px 8px 8px;
  }

  .coach-picker-card > img {
    width: 78px;
    height: 78px;
  }

  .coach-picker-card small {
    min-height: 0;
  }

  .coach-match-summary {
    grid-template-columns: 48px minmax(0, 1fr) 22px;
    gap: 10px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .coach-match-avatar {
    width: 44px;
    height: 44px;
  }

  .coach-program-preview {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 8px 18px 66px;
  }

  .coach-program-preview ul,
  .coach-instagram-link,
  .coach-program-preview .secondary-button {
    grid-column: auto;
    grid-row: auto;
  }

  .coach-program-preview ul {
    display: grid;
    gap: 7px;
  }

  .coach-program-preview .secondary-button {
    width: 100%;
  }

  .client-module-row {
    grid-template-columns: 82px minmax(0, 1fr) 52px;
  }

  .client-module-art {
    width: 82px;
    height: 108px;
  }

  .client-module-art img {
    width: 92%;
    height: 92%;
  }
}

/* Admin presentation controls */

.admin-shell {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 84% 0%, rgba(241, 39, 46, 0.11), transparent 34rem),
    var(--bg);
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 11, 0.94);
  backdrop-filter: blur(16px);
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.admin-brand > span:last-child,
.admin-brand strong,
.admin-brand small {
  display: block;
}

.admin-brand strong {
  font-size: 16px;
  font-weight: 900;
}

.admin-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-content {
  width: min(calc(100% - 48px), 1080px);
  margin: 0 auto;
  padding: 54px 0 72px;
}

.admin-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.admin-heading > div {
  max-width: 760px;
}

.admin-heading h1 {
  margin-top: 8px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.admin-heading p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.delivery-tracker {
  margin-top: 42px;
}

.delivery-tracker-heading,
.admin-runtime-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.delivery-tracker-heading > div,
.admin-runtime-heading > div {
  max-width: 740px;
}

.delivery-tracker-heading h2,
.admin-runtime-heading h2 {
  margin-top: 7px;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.delivery-tracker-heading p,
.admin-runtime-heading p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.admin-runtime-heading code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
  background: var(--surface-raised);
  font-size: 0.85em;
}

.delivery-updated {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(17, 21, 25, 0.72);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.delivery-updated svg {
  width: 14px;
  height: 14px;
  color: var(--red);
}

.delivery-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.delivery-metrics article {
  min-width: 0;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(11, 14, 17, 0.92);
}

.delivery-metrics article > svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  color: var(--red);
}

.delivery-metrics article.warning {
  border-color: rgba(245, 176, 65, 0.32);
}

.delivery-metrics article.warning > svg {
  color: #f5b041;
}

.delivery-metrics span,
.delivery-metrics strong,
.delivery-metrics small {
  display: block;
}

.delivery-metrics strong {
  font-size: 18px;
  line-height: 1;
}

.delivery-metrics small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.delivery-groups {
  display: grid;
  gap: 32px;
  margin-top: 32px;
}

.delivery-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.delivery-group-heading span,
.delivery-group-heading h3,
.delivery-group-heading small {
  display: block;
}

.delivery-group-heading h3 {
  margin: 0;
  font-size: 15px;
}

.delivery-group-heading small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.delivery-group-heading b {
  min-width: 28px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  background: var(--surface);
  font-size: 10px;
  text-align: center;
}

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

.delivery-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 17px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(150deg, rgba(17, 21, 25, 0.96), rgba(9, 12, 15, 0.98));
}

.delivery-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--line);
}

.delivery-card.status-active::before {
  background: var(--red);
}

.delivery-card.status-review::before,
.delivery-card.status-held::before {
  background: #f5b041;
}

.delivery-card.status-deployed::before {
  background: var(--green);
}

.delivery-card.status-planned {
  background: rgba(11, 14, 17, 0.78);
}

.delivery-card-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.delivery-card-eyebrow code {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.07em;
}

.delivery-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  background: rgba(7, 9, 11, 0.6);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.delivery-status-badge svg {
  width: 11px;
  height: 11px;
}

.delivery-status-badge.status-active {
  border-color: rgba(241, 39, 46, 0.36);
  color: #ff6b70;
}

.delivery-status-badge.status-review,
.delivery-status-badge.status-held {
  border-color: rgba(245, 176, 65, 0.38);
  color: #f5b041;
}

.delivery-status-badge.status-deployed {
  border-color: rgba(123, 220, 66, 0.34);
  color: var(--green);
}

.delivery-card h4 {
  margin: 11px 0 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.012em;
}

.delivery-card header > p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.52;
}

.delivery-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
}

.delivery-card-meta div {
  min-width: 0;
}

.delivery-card-meta .delivery-meta-wide {
  grid-column: 1 / -1;
}

.delivery-card-meta dt {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--dim);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
}

.delivery-card-meta dt svg {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
}

.delivery-card-meta dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: #d7dbe0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.delivery-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.delivery-tag-list span {
  padding: 4px 6px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  color: var(--muted);
  background: rgba(7, 9, 11, 0.54);
  font-size: 9px;
  font-weight: 800;
}

.delivery-next-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.delivery-next-step strong {
  color: var(--text);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-runtime-section {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.admin-summary article {
  min-width: 0;
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.admin-summary article > svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: var(--red);
}

.admin-summary span,
.admin-summary strong,
.admin-summary small {
  display: block;
}

.admin-summary strong {
  font-size: 16px;
}

.admin-summary small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.admin-safety-note {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  margin: 18px 0;
  padding: 15px 16px;
  border-left: 3px solid var(--green);
  background: rgba(123, 220, 66, 0.045);
  color: var(--muted);
  line-height: 1.5;
}

.admin-safety-note svg {
  color: var(--green);
}

.admin-safety-note strong {
  color: var(--text);
}

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

.admin-module-row {
  min-height: 154px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 16px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.admin-module-row:hover {
  transform: translateY(-1px);
}

.admin-module-row.enabled {
  border-color: rgba(123, 220, 66, 0.27);
  background: rgba(123, 220, 66, 0.025);
}

.admin-module-row.admin-hidden .client-module-art {
  opacity: 0.58;
  filter: saturate(0.45);
}

.admin-module-copy {
  min-width: 0;
}

.admin-module-copy > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-module-copy strong {
  font-size: 16px;
}

.admin-module-copy p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}

.admin-core-badge {
  padding: 3px 7px;
  border: 1px solid rgba(123, 220, 66, 0.32);
  border-radius: 99px;
  color: var(--green);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-module-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
}

.admin-module-state svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.admin-module-state.visible {
  color: var(--green);
}

.admin-dependency-note {
  margin-top: 18px;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.55;
}

.admin-login-dialog .form-message.error {
  color: var(--danger);
}

@media (min-width: 761px) {
  .onboarding-panel {
    width: min(calc(100% - 48px), 980px);
  }

  .onboarding-choices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .onboarding-choice {
    min-height: 300px;
    grid-template-columns: minmax(0, 1fr) 24px;
    grid-template-rows: 152px minmax(0, 1fr);
    align-items: start;
    gap: 16px 10px;
    padding: 18px;
  }

  .onboarding-choice > img {
    grid-column: 1 / -1;
    width: 100%;
    height: 152px;
  }

  .onboarding-choice-copy {
    align-self: start;
  }

  .onboarding-choice > svg {
    align-self: center;
  }
}

@media (max-width: 760px) {
  .admin-topbar {
    min-height: 68px;
    padding: 0 14px;
  }

  .admin-brand .onboarding-mark {
    width: 38px;
    height: 38px;
  }

  .admin-topbar .secondary-button {
    min-height: 40px;
    padding-right: 12px;
    padding-left: 12px;
    font-size: 12px;
  }

  .admin-content {
    width: min(calc(100% - 24px), 560px);
    padding: 34px 0 calc(42px + env(safe-area-inset-bottom));
  }

  .admin-heading {
    display: grid;
    gap: 18px;
  }

  .admin-heading h1 {
    font-size: 34px;
  }

  .admin-heading .secondary-button {
    width: 100%;
  }

  .delivery-tracker {
    margin-top: 34px;
  }

  .delivery-tracker-heading,
  .admin-runtime-heading {
    display: grid;
    align-items: start;
    gap: 14px;
  }

  .delivery-updated {
    justify-self: start;
  }

  .delivery-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .delivery-metrics article {
    min-height: 70px;
    padding: 11px;
  }

  .delivery-card-grid {
    grid-template-columns: 1fr;
  }

  .delivery-card {
    padding: 16px;
  }

  .delivery-card-meta {
    grid-template-columns: 1fr;
  }

  .delivery-group-heading {
    align-items: flex-start;
  }

  .admin-runtime-section {
    margin-top: 48px;
    padding-top: 38px;
  }

  .admin-runtime-heading .secondary-button {
    width: 100%;
  }

  .admin-summary {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 26px;
  }

  .admin-summary article {
    min-height: 72px;
  }

  .admin-module-list {
    grid-template-columns: 1fr;
  }

  .admin-module-row {
    min-height: 138px;
    grid-template-columns: 82px minmax(0, 1fr) 52px;
    gap: 12px;
    padding: 10px;
  }

  .admin-module-row .client-module-art {
    width: 82px;
    height: 108px;
  }
}

/* DEXA upload and trend workflow */

.dexa-view {
  --dexa-red: #f1272e;
  --dexa-red-dark: #c91d24;
  --dexa-ink: #17181c;
  --dexa-muted: #686b72;
  --dexa-line: #e1e2e5;
  --dexa-soft: #f5f5f4;
  min-height: calc(100vh - var(--topbar-height));
  padding-bottom: 86px;
  background: #f6f6f5;
  color: var(--dexa-ink);
  color-scheme: light;
}

.dexa-view button,
.dexa-view input {
  color: inherit;
}

.dexa-view button:focus-visible,
.dexa-view input:focus-visible {
  outline-color: var(--dexa-red);
}

.dexa-hero {
  min-height: 292px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  align-items: center;
  gap: 44px;
  padding: 34px max(36px, calc((100% - 1100px) / 2));
  overflow: hidden;
  border-bottom: 1px solid var(--dexa-line);
  background:
    radial-gradient(circle at 86% 18%, rgba(241, 39, 46, 0.08), transparent 270px),
    #fff;
}

.dexa-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dexa-red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dexa-eyebrow svg {
  width: 17px;
  height: 17px;
}

.dexa-hero h1 {
  max-width: 700px;
  margin-top: 10px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.dexa-hero p {
  max-width: 680px;
  margin-top: 14px;
  color: var(--dexa-muted);
  font-size: 16px;
  line-height: 1.55;
}

.dexa-hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 22px;
}

.dexa-hero-points span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #3c4249;
  font-size: 12px;
  font-weight: 800;
}

.dexa-hero-points svg {
  width: 16px;
  height: 16px;
  color: var(--dexa-red);
}

.dexa-hero figure {
  height: 230px;
  display: grid;
  place-items: center;
  margin: 0;
}

.dexa-hero figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dexa-workflow {
  width: min(calc(100% - 48px), 1080px);
  margin: 0 auto;
  padding-top: 28px;
}

.dexa-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--dexa-line);
  border-radius: 12px;
  background: #fff;
}

.dexa-steps > span {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-right: 1px solid var(--dexa-line);
  color: #94979d;
  font-size: 12px;
}

.dexa-steps > span:last-child {
  border-right: 0;
}

.dexa-steps i {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid #c9cbd0;
  border-radius: 50%;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.dexa-steps i svg {
  width: 15px;
  height: 15px;
}

.dexa-steps .active,
.dexa-steps .complete {
  color: var(--dexa-ink);
}

.dexa-steps .active i {
  border-color: var(--dexa-red);
  background: var(--dexa-red);
  color: #fff;
}

.dexa-steps .complete i {
  border-color: #4a9d55;
  color: #338240;
}

.dexa-card {
  border: 1px solid var(--dexa-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(36, 38, 43, 0.055);
}

.dexa-upload-layout,
.dexa-details-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(310px, 0.8fr);
  gap: 16px;
}

.dexa-details-layout {
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
}

.dexa-upload-card,
.dexa-history-card,
.dexa-metrics-card,
.dexa-file-card {
  padding: 24px;
}

.dexa-card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dexa-card-heading > span {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff0f0;
  color: var(--dexa-red);
}

.dexa-card-heading > span svg {
  width: 21px;
  height: 21px;
}

.dexa-card-heading small,
.dexa-card-heading h2 {
  display: block;
}

.dexa-card-heading small {
  color: var(--dexa-red);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dexa-card-heading h2 {
  margin-top: 3px;
  font-size: 20px;
  line-height: 1.1;
}

.dexa-drop-zone {
  min-height: 290px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  padding: 28px;
  border: 1px dashed #c9a0a3;
  border-radius: 14px;
  background: #fffafa;
  text-align: center;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.dexa-drop-zone:hover {
  border-color: var(--dexa-red);
  background: #fff5f5;
  transform: translateY(-1px);
}

.dexa-drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.dexa-drop-zone > span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #fff;
  color: var(--dexa-red);
  box-shadow: 0 10px 30px rgba(241, 39, 46, 0.11);
}

.dexa-drop-zone > span svg {
  width: 27px;
  height: 27px;
}

.dexa-drop-zone strong {
  margin-top: 16px;
  font-size: 18px;
}

.dexa-drop-zone small {
  margin-top: 7px;
  color: var(--dexa-muted);
  font-size: 12px;
}

.dexa-sample-button {
  width: 100%;
  margin-top: 10px;
  padding: 9px 0;
  background: transparent;
  color: var(--dexa-red);
  font-size: 11px;
  font-weight: 850;
}

.dexa-sample-button:hover {
  color: var(--dexa-red-dark);
  text-decoration: underline;
}

.dexa-privacy-note,
.dexa-form-note {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  margin-top: 16px;
  color: var(--dexa-muted);
  font-size: 11px;
  line-height: 1.5;
}

.dexa-privacy-note svg {
  width: 17px;
  height: 17px;
  color: #338240;
}

.dexa-history-list {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.dexa-history-list button {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--dexa-line);
  border-radius: 10px;
  background: #fafaf9;
  text-align: left;
}

.dexa-history-list button:hover {
  border-color: #c9a0a3;
  background: #fff;
}

.dexa-history-list span,
.dexa-history-list strong,
.dexa-history-list small {
  display: block;
}

.dexa-history-list strong {
  font-size: 13px;
}

.dexa-history-list small {
  max-width: 190px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--dexa-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dexa-history-list button > span:last-child {
  text-align: right;
}

.dexa-history-empty {
  min-height: 245px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--dexa-muted);
  text-align: center;
}

.dexa-history-empty > svg {
  width: 30px;
  height: 30px;
  color: #b3b5ba;
}

.dexa-history-empty strong {
  margin-top: 13px;
  color: var(--dexa-ink);
  font-size: 14px;
}

.dexa-history-empty span {
  max-width: 260px;
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.5;
}

.dexa-back-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  background: transparent;
  color: var(--dexa-muted);
  font-size: 11px;
  font-weight: 800;
}

.dexa-back-button:hover {
  color: var(--dexa-red);
}

.dexa-back-button svg {
  width: 15px;
  height: 15px;
}

.dexa-file-preview {
  height: 320px;
  display: grid;
  place-items: center;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--dexa-line);
  border-radius: 13px;
  background: #f6f6f5;
}

.dexa-file-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dexa-file-preview > span {
  width: 78px;
  height: 94px;
  display: grid;
  place-items: center;
  border: 1px solid #d7d8dc;
  border-radius: 10px;
  background: #fff;
  color: var(--dexa-red);
  box-shadow: 0 12px 32px rgba(30, 31, 34, 0.08);
}

.dexa-file-preview > span svg {
  width: 34px;
  height: 34px;
}

.dexa-file-meta {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.dexa-file-meta > svg:first-child {
  color: var(--dexa-red);
}

.dexa-file-meta > svg:last-child {
  color: #338240;
}

.dexa-file-meta span,
.dexa-file-meta strong,
.dexa-file-meta small {
  display: block;
}

.dexa-file-meta strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dexa-file-meta small {
  margin-top: 3px;
  color: var(--dexa-muted);
  font-size: 10px;
}

.dexa-metrics-card > p:not(.dexa-form-note):not(.dexa-error) {
  margin: 18px 0 0;
  color: var(--dexa-muted);
  font-size: 13px;
  line-height: 1.5;
}

.dexa-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.dexa-metric-field > span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 850;
}

.dexa-metric-field > span small {
  color: var(--dexa-muted);
  font-size: 9px;
  font-weight: 700;
}

.dexa-metric-field > div {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--dexa-line);
  border-radius: 9px;
  background: #fff;
}

.dexa-metric-field input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 0;
  outline: 0;
  background: transparent;
}

.dexa-metric-field em {
  padding-right: 12px;
  color: var(--dexa-muted);
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}

.dexa-form-note {
  display: block;
  padding: 12px 13px;
  border-left: 3px solid #b8bbc1;
  background: #f7f7f7;
}

.dexa-error {
  margin-top: 14px;
  color: #b61f26;
  font-size: 12px;
  font-weight: 750;
}

.dexa-primary-button,
.dexa-secondary-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 850;
}

.dexa-primary-button {
  width: 100%;
  margin-top: 20px;
  background: var(--dexa-red);
  color: #fff;
}

.dexa-primary-button:hover {
  background: var(--dexa-red-dark);
}

.dexa-primary-button svg,
.dexa-secondary-button svg {
  width: 17px;
  height: 17px;
}

.dexa-secondary-button {
  border-color: var(--dexa-line);
  background: #fff;
  color: var(--dexa-ink);
}

.dexa-secondary-button:hover {
  border-color: #c4c6ca;
  background: #fafaf9;
}

.dexa-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 50%;
  animation: nutrition-spin 700ms linear infinite;
}

.dexa-summary {
  padding: 26px;
  border: 1px solid var(--dexa-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(36, 38, 43, 0.055);
}

.dexa-summary-heading {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.dexa-summary-heading > span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #ecf7ec;
  color: #338240;
}

.dexa-summary-heading > span svg {
  width: 27px;
  height: 27px;
}

.dexa-summary-heading small {
  color: var(--dexa-red);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dexa-summary-heading h2 {
  margin-top: 4px;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.08;
}

.dexa-summary-heading p {
  margin-top: 6px;
  color: var(--dexa-muted);
  font-size: 12px;
}

.dexa-result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
}

.dexa-result-card {
  min-height: 138px;
  padding: 18px;
  border: 1px solid var(--dexa-line);
  border-radius: 13px;
  background: #fafaf9;
}

.dexa-result-card > span,
.dexa-result-card > strong,
.dexa-result-card > small {
  display: block;
}

.dexa-result-card > span {
  color: var(--dexa-muted);
  font-size: 11px;
  font-weight: 800;
}

.dexa-result-card > strong {
  margin-top: 14px;
  font-size: clamp(23px, 3vw, 30px);
  letter-spacing: -0.03em;
}

.dexa-result-card > small {
  margin-top: 11px;
  color: var(--dexa-muted);
  font-size: 10px;
  line-height: 1.4;
}

.dexa-result-card > small.has-delta {
  color: var(--dexa-red);
  font-weight: 800;
}

.dexa-summary-note {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border-left: 3px solid var(--dexa-red);
  background: #fff8f8;
  color: var(--dexa-muted);
  font-size: 12px;
  line-height: 1.55;
}

.dexa-summary-note svg {
  color: var(--dexa-red);
}

.dexa-summary-note strong {
  color: var(--dexa-ink);
}

@media (max-width: 980px) {
  .dexa-hero {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .dexa-upload-layout,
  .dexa-details-layout {
    grid-template-columns: 1fr;
  }

  .dexa-file-card {
    display: grid;
    grid-template-columns: minmax(200px, 0.72fr) minmax(0, 1.28fr);
    align-items: center;
    gap: 18px;
  }

  .dexa-file-card .dexa-back-button {
    grid-column: 1 / -1;
  }

  .dexa-file-preview {
    height: 240px;
    margin-top: 0;
  }

  .dexa-file-meta {
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .client-persona .app-main:has(.dexa-view) {
    padding-bottom: 0;
  }

  .dexa-view {
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .dexa-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px 18px 24px;
  }

  .dexa-hero h1 {
    font-size: 38px;
  }

  .dexa-hero p {
    font-size: 14px;
  }

  .dexa-hero figure {
    height: 190px;
  }

  .dexa-workflow {
    width: min(calc(100% - 24px), 560px);
    padding-top: 14px;
  }

  .dexa-steps > span {
    min-height: 52px;
  }

  .dexa-upload-card,
  .dexa-history-card,
  .dexa-metrics-card,
  .dexa-file-card,
  .dexa-summary {
    padding: 18px;
  }

  .dexa-drop-zone {
    min-height: 230px;
  }

  .dexa-file-card {
    display: block;
  }

  .dexa-file-preview {
    height: 220px;
    margin-top: 16px;
  }

  .dexa-file-meta {
    margin-top: 12px;
  }

  .dexa-metrics-grid {
    grid-template-columns: 1fr;
  }

  .dexa-summary-heading {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 11px;
  }

  .dexa-summary-heading > span {
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }

  .dexa-summary-heading .dexa-secondary-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .dexa-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 390px) {
  .dexa-steps strong {
    display: none;
  }

  .dexa-result-grid {
    grid-template-columns: 1fr;
  }
}

/* Nutrition date, macro identity, and unit preferences */

.nutrition-date-control {
  min-width: 244px;
  grid-template-columns: 42px minmax(148px, 1fr) 42px;
  border-radius: 14px;
}

.nutrition-date-control > button {
  width: 42px;
  height: 56px;
}

.nutrition-date-control > .nutrition-date-current {
  width: auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 10px;
  border-right: 1px solid var(--nutrition-line);
  border-left: 1px solid var(--nutrition-line);
  border-radius: 0;
  color: var(--nutrition-ink);
}

.nutrition-date-current > svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  color: var(--nutrition-blue);
}

.nutrition-date-current > span {
  min-width: 0;
  text-align: left;
}

.nutrition-date-control .nutrition-date-current small,
.nutrition-date-control .nutrition-date-current strong {
  display: block;
}

.nutrition-date-control .nutrition-date-current small {
  color: var(--nutrition-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.nutrition-date-control .nutrition-date-current strong {
  margin-top: 4px;
  color: var(--nutrition-ink);
  font-size: 15px;
  line-height: 1;
}

.nutrition-macro-icon {
  width: 30px;
  height: 30px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
}

.nutrition-macro-icon svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nutrition-macro-icon.protein {
  background: color-mix(in srgb, var(--nutrition-protein) 13%, white);
  color: #c96f1d;
}

.nutrition-macro-icon.carbs {
  background: color-mix(in srgb, var(--nutrition-carbs) 13%, white);
  color: #178d88;
}

.nutrition-macro-icon.fat {
  background: color-mix(in srgb, var(--nutrition-fat) 13%, white);
  color: #7a4fa8;
}

.nutrition-macro-icon.fiber {
  background: #edf7ef;
  color: #39854d;
}

.macro-row {
  gap: 9px;
}

.macro-row > div {
  align-items: center;
}

.macro-row > div > .macro-row-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--nutrition-ink);
  font-size: 13px;
  font-weight: 800;
}

.macro-row > div > strong {
  font-variant-numeric: tabular-nums;
}

.diary-entry-macros > strong {
  display: block;
  color: var(--nutrition-ink);
  font-size: 13px;
}

.diary-entry-macro-list {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 5px;
}

.macro-metric {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--nutrition-muted);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.macro-metric .nutrition-macro-icon {
  width: 19px;
  height: 19px;
  border-radius: 6px;
}

.macro-metric .nutrition-macro-icon svg {
  width: 13px;
  height: 13px;
  stroke-width: 2;
}

.diary-total-grid > .macro-summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  column-gap: 9px;
}

.diary-total-grid .macro-summary .nutrition-macro-icon {
  grid-row: 1 / 3;
}

.diary-total-grid .macro-summary span,
.diary-total-grid .macro-summary strong {
  margin: 0;
}

.goal-macro-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.goal-macro-label .nutrition-macro-icon {
  width: 25px;
  height: 25px;
  border-radius: 7px;
}

.goal-macro-label .nutrition-macro-icon svg {
  width: 16px;
  height: 16px;
}

.nutrition-form-grid .span-two {
  grid-column: 1 / -1;
}

.units-card {
  grid-column: 1 / -1;
  padding: 24px;
}

.unit-preset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  padding: 16px;
  border-radius: 12px;
  background: var(--nutrition-soft);
}

.unit-preset-row > div:first-child strong,
.unit-preset-row > div:first-child span {
  display: block;
}

.unit-preset-row > div:first-child strong {
  font-size: 13px;
}

.unit-preset-row > div:first-child span {
  margin-top: 4px;
  color: var(--nutrition-muted);
  font-size: 11px;
}

.unit-preset-row > div:last-child {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--nutrition-line);
  border-radius: 10px;
  background: #fff;
}

.unit-preset-row button {
  min-width: 72px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 7px;
  background: transparent;
  color: var(--nutrition-muted);
  font-size: 12px;
  font-weight: 850;
}

.unit-preset-row button.active {
  background: var(--nutrition-blue);
  color: #fff;
}

.unit-preset-row > div:last-child > span {
  padding: 0 10px;
  color: var(--nutrition-blue);
  font-size: 11px;
  font-weight: 850;
}

.unit-settings-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.unit-settings-grid label {
  display: grid;
  gap: 7px;
}

.unit-settings-grid label > span {
  color: var(--nutrition-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.unit-settings-grid select {
  width: 100%;
  min-height: 46px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--nutrition-line);
  border-radius: 8px;
  outline: 0;
  background-color: #fff;
  color: var(--nutrition-ink);
  font-size: 12px;
  font-weight: 700;
}

.unit-settings-grid select:focus {
  border-color: var(--nutrition-blue);
  box-shadow: 0 0 0 3px rgba(241, 39, 46, 0.12);
}

.unit-conversion-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  color: var(--nutrition-muted);
  font-size: 11px;
  line-height: 1.5;
}

.unit-conversion-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: #278451;
}

.dialog-macro-value {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dialog-macro-value .nutrition-macro-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.dialog-macro-value .nutrition-macro-icon svg {
  width: 14px;
  height: 14px;
}

.food-selection dl > .dialog-macro-definition {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.dialog-macro-definition dt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dialog-macro-definition .nutrition-macro-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.dialog-macro-definition .nutrition-macro-icon svg {
  width: 14px;
  height: 14px;
}

.dialog-macro-definition dd {
  margin: 0;
}

@media (max-width: 1040px) {
  .unit-settings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .nutrition-date-control {
    min-width: 0;
  }

  .diary-entry-macro-list {
    justify-content: flex-start;
  }

  .unit-preset-row {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .unit-preset-row > div:last-child {
    align-self: stretch;
    justify-content: center;
  }

  .unit-settings-grid {
    grid-template-columns: 1fr;
  }

  .diary-total-grid > .macro-summary {
    grid-template-columns: 30px minmax(0, 1fr);
  }
}

/* Nutrition dashboard radial visualizations */

.nutrition-summary-grid > .nutrition-card {
  animation: nutrition-card-rise 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.nutrition-summary-grid > .nutrition-card:nth-child(2) {
  animation-delay: 80ms;
}

.calorie-card,
.macro-card {
  position: relative;
  min-height: 338px;
  overflow: hidden;
}

.calorie-card::after,
.macro-card::after {
  position: absolute;
  right: -70px;
  bottom: -90px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 39, 46, 0.035), transparent 68%);
  content: "";
  pointer-events: none;
}

.calorie-card > header,
.macro-card > header,
.calorie-radial-body,
.macro-radial-body {
  position: relative;
  z-index: 1;
}

.calorie-radial-body {
  display: grid;
  grid-template-columns: 174px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  margin-top: 18px;
}

.nutrition-radial-chart {
  position: relative;
  width: 174px;
  aspect-ratio: 1;
  flex: 0 0 auto;
}

.nutrition-radial-chart > svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.nutrition-radial-track,
.nutrition-radial-progress {
  transform: rotate(-90deg);
  transform-origin: 90px 90px;
}

.nutrition-radial-track {
  stroke: #e8ebf0;
}

.nutrition-radial-progress {
  stroke-linecap: round;
  filter: drop-shadow(0 2px 3px rgba(20, 24, 31, 0.1));
  transition: stroke-dashoffset 520ms cubic-bezier(0.22, 1, 0.36, 1);
  animation: nutrition-ring-draw 900ms cubic-bezier(0.22, 1, 0.36, 1) var(--ring-delay, 0ms) both;
}

.nutrition-radial-center {
  position: absolute;
  inset: 30px;
  display: grid;
  place-content: center;
  text-align: center;
}

.nutrition-radial-center span,
.nutrition-radial-center strong,
.nutrition-radial-center small {
  display: block;
}

.nutrition-radial-center span {
  color: var(--nutrition-muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nutrition-radial-center strong {
  margin-top: 5px;
  color: var(--nutrition-ink);
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
  line-height: 1;
}

.nutrition-radial-center small {
  margin-top: 4px;
  color: var(--nutrition-muted);
  font-size: 10px;
  font-weight: 750;
}

.calorie-radial.over .nutrition-radial-center strong {
  color: var(--nutrition-blue);
}

.calorie-radial-details {
  min-width: 0;
  padding-left: 20px;
  border-left: 1px solid var(--nutrition-line);
}

.calorie-progress-summary span,
.calorie-progress-summary strong {
  display: block;
}

.calorie-progress-summary span {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff0f0;
  color: var(--nutrition-blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.calorie-progress-summary strong {
  margin-top: 9px;
  color: var(--nutrition-ink);
  font-size: 13px;
  line-height: 1.35;
}

.calorie-radial-details .calorie-equation {
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 14px;
}

.calorie-radial-details .calorie-equation > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 11px;
}

.calorie-radial-details .calorie-equation dd {
  margin: 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.macro-card {
  gap: 14px;
}

.macro-radial-body {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
}

.macro-radial {
  width: 180px;
}

.nutrition-radial-center.macro-center {
  inset: 59px;
}

.nutrition-radial-center.macro-center span {
  font-size: 7px;
  letter-spacing: 0.04em;
}

.nutrition-radial-center.macro-center strong {
  margin-top: 3px;
  font-size: 20px;
}

.nutrition-radial-center.macro-center small {
  margin-top: 2px;
  font-size: 8px;
}

.macro-radial-legend {
  display: grid;
  gap: 8px;
}

.macro-radial-legend-row {
  min-width: 0;
  min-height: 52px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--nutrition-soft);
  transition: border-color 160ms ease, transform 160ms ease;
}

.macro-radial-legend-row:hover {
  border-color: var(--nutrition-line);
  transform: translateX(2px);
}

.macro-radial-legend-row .nutrition-macro-icon {
  width: 32px;
  height: 32px;
}

.macro-radial-legend-row > div {
  min-width: 0;
}

.macro-radial-legend-row > div strong,
.macro-radial-legend-row > div span {
  display: block;
}

.macro-radial-legend-row > div strong {
  overflow: hidden;
  color: var(--nutrition-ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.macro-radial-legend-row > div span {
  margin-top: 3px;
  color: var(--nutrition-muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.macro-radial-legend-row > em {
  min-width: 38px;
  padding: 5px 6px;
  border-radius: 999px;
  background: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.macro-radial-legend-row.carbs > em {
  color: #178d88;
}

.macro-radial-legend-row.fat > em {
  color: #7a4fa8;
}

.macro-radial-legend-row.protein > em {
  color: #c96f1d;
}

@keyframes nutrition-ring-draw {
  from {
    stroke-dashoffset: 100;
  }
}

@keyframes nutrition-card-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) and (min-width: 768px) {
  .nutrition-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .calorie-radial-body,
  .macro-radial-body {
    grid-template-columns: 1fr;
  }

  .nutrition-radial-chart {
    margin: 0 auto;
  }

  .calorie-radial-details {
    padding: 16px 0 0;
    border-top: 1px solid var(--nutrition-line);
    border-left: 0;
  }

  .calorie-radial-details .calorie-equation {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .calorie-radial-details .calorie-equation > div {
    display: block;
  }

  .calorie-radial-details .calorie-equation dd {
    margin-top: 5px;
    text-align: left;
  }

  .macro-radial-legend {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nutrition-radial-progress,
  .nutrition-summary-grid > .nutrition-card {
    animation-delay: 0ms !important;
  }
}
