/*
 * Macros shared visual system
 * Mobile-first, server-rendered, and dependency-free.
 */

:root {
  color-scheme: light;
  --ink: #1e2b24;
  --ink-soft: #485148;
  --ink-muted: #756d62;
  --cream: #f2e4d0;
  --cream-deep: #e7d2b7;
  --paper: #fffaf0;
  --white: #ffffff;
  --line: #d8c8b2;
  --line-strong: #baa88f;
  --protein: #2367cf;
  --protein-soft: #e8effc;
  --carbs: #e4a91f;
  --carbs-soft: #fff0c5;
  --fat: #d74a3e;
  --fat-soft: #fbe5e1;
  --success: #3f6a3b;
  --success-soft: #e7f5ed;
  --warning: #9a6410;
  --warning-soft: #fff3d4;
  --danger: #b42318;
  --danger-soft: #feecea;
  --brand-red: #9f382a;
  --brand-rust: #c15b32;
  --brand-green: #405d3b;
  --brand-charcoal: #1e2b24;
  --shadow-xs: 0 1px 2px rgba(47, 35, 23, 0.08);
  --shadow-sm: 0 8px 24px rgba(47, 35, 23, 0.1);
  --shadow-md: 0 20px 52px rgba(47, 35, 23, 0.16);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --content-width: 1200px;
  --header-height: 72px;
  --bottom-nav-height: 72px;
  --transition: 160ms ease;
  --font-display: Georgia, "Times New Roman", serif;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
  color: var(--ink);
  background: var(--cream);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
label,
select,
summary,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button,
[type="button"],
[type="submit"],
[type="reset"] {
  cursor: pointer;
}

a {
  color: var(--protein);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(2rem, 7vw, 3.75rem);
}

h2 {
  margin-bottom: 0.7rem;
  font-size: clamp(1.45rem, 4.5vw, 2.35rem);
}

h3 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.08rem, 3vw, 1.35rem);
}

p:last-child,
ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

hr {
  height: 1px;
  margin: 1.5rem 0;
  border: 0;
  background: var(--line);
}

::selection {
  color: var(--white);
  background: var(--protein);
}

:focus-visible {
  outline: 3px solid rgba(36, 88, 211, 0.34);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-180%);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--white);
  background: var(--ink);
  font-weight: 750;
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Layout */

.container,
.header-inner,
.footer-inner,
.app-shell,
.page-shell {
  width: min(100% - 2rem, var(--content-width));
  margin-inline: auto;
}

.app-shell,
.page-shell {
  padding-block: 1.35rem 2.75rem;
}

.page-shell--narrow,
.container--narrow {
  max-width: 720px;
}

.page-shell--compact {
  max-width: 560px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stack--sm {
  gap: 0.65rem;
}

.stack--lg {
  gap: 1.5rem;
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.cluster--between {
  justify-content: space-between;
}

.grid {
  display: grid;
  gap: 1rem;
}

.section {
  margin-top: 2rem;
}

.section:first-child {
  margin-top: 0;
}

.section-header,
.page-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.section-header h1,
.section-header h2,
.section-header h3,
.page-header h1,
.page-header h2 {
  margin-bottom: 0;
}

.page-header__actions,
.section-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.eyebrow {
  margin-bottom: 0.15rem;
  color: var(--protein);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.lede,
.page-intro {
  max-width: 68ch;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.muted,
.text-muted,
.helper-text {
  color: var(--ink-muted);
}

.helper-text {
  margin-top: 0.35rem;
  margin-bottom: 0;
  font-size: 0.82rem;
}

.text-small {
  font-size: 0.875rem;
}

.text-center {
  text-align: center;
}

.full-width {
  width: 100%;
}

/* Header and navigation */

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  min-height: var(--header-height);
  border-bottom: 1px solid rgba(199, 189, 173, 0.8);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.68rem;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  width: auto;
  height: clamp(34px, 8vw, 44px);
  max-width: min(62vw, 238px);
  object-fit: contain;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.menu-toggle {
  display: inline-grid;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  place-items: center;
}

.menu-toggle:hover {
  border-color: var(--line-strong);
  background: var(--cream);
}

.menu-toggle__icon,
.menu-toggle__icon::before,
.menu-toggle__icon::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle__icon {
  position: relative;
}

.menu-toggle__icon::before,
.menu-toggle__icon::after {
  position: absolute;
  left: 0;
  content: "";
}

.menu-toggle__icon::before {
  top: -6px;
}

.menu-toggle__icon::after {
  top: 6px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon::before {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon::after {
  transform: translateY(-6px) rotate(-45deg);
}

.site-nav[data-mobile-menu] {
  position: fixed;
  z-index: 90;
  inset: var(--header-height) 0 auto;
  display: grid;
  gap: 0.35rem;
  max-height: calc(100vh - var(--header-height));
  padding: 0.85rem 1rem 1rem;
  overflow-y: auto;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-md);
}

.nav-link {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 0.93rem;
  font-weight: 720;
  text-decoration: none;
}

.nav-link:hover,
.nav-link[aria-current="page"],
.nav-link.is-active {
  color: var(--ink);
  background: var(--cream);
  text-decoration: none;
}

.nav-link[aria-current="page"],
.nav-link.is-active {
  box-shadow: inset 3px 0 0 var(--protein);
}

.mobile-bottom-nav {
  position: fixed;
  z-index: 110;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(var(--nav-items, 5), minmax(0, 1fr));
  min-height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
  padding: 0.38rem 0.35rem calc(0.3rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 -8px 24px rgba(16, 26, 42, 0.08);
  backdrop-filter: blur(14px);
}

.bottom-nav__item {
  display: flex;
  min-width: 0;
  min-height: 56px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.16rem;
  padding: 0.3rem 0.15rem;
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font-size: 0.68rem;
  font-weight: 720;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}

.bottom-nav__icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  font-size: 1.15rem;
}

.bottom-nav__item:hover,
.bottom-nav__item[aria-current="page"],
.bottom-nav__item.is-active {
  color: var(--protein);
  background: var(--protein-soft);
  text-decoration: none;
}

/* Cards and surfaces */

.card,
.panel,
.surface {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: var(--shadow-xs);
}

.card,
.panel {
  padding: 1rem;
}

.card--flat,
.panel--flat {
  box-shadow: none;
}

.card--interactive {
  color: inherit;
  text-decoration: none;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.card--interactive:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
  text-decoration: none;
}

.card--dark {
  color: var(--white);
  border-color: var(--ink);
  background: var(--ink);
}

.card--dark h1,
.card--dark h2,
.card--dark h3,
.card--dark h4 {
  color: var(--white);
}

.card-header,
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-header {
  margin-bottom: 0.9rem;
}

.card-footer {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.card-title {
  margin-bottom: 0;
}

.metric-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.metric-card,
.stat-card {
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.metric-label,
.stat-label {
  display: block;
  margin-bottom: 0.18rem;
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 780;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.metric-value,
.stat-value {
  display: block;
  color: var(--ink);
  font-size: clamp(1.28rem, 5vw, 1.75rem);
  font-weight: 850;
  line-height: 1.1;
}

.metric-unit {
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 650;
}

/* Buttons */

.btn,
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  font-weight: 780;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn:hover,
.button:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active,
.button:active {
  transform: translateY(0);
}

.btn:disabled,
.button:disabled,
.btn[aria-disabled="true"],
.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.btn-primary,
.button--primary,
.button-primary {
  color: var(--white);
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: 3px 3px 0 rgba(36, 88, 211, 0.9);
}

.btn-primary:hover,
.button--primary:hover,
.button-primary:hover {
  color: var(--white);
  background: #1b2b43;
  box-shadow: 2px 2px 0 rgba(36, 88, 211, 0.9);
}

.btn-blue,
.button--blue {
  color: var(--white);
  border-color: var(--protein);
  background: var(--protein);
}

.btn-secondary,
.button--secondary,
.button-secondary {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--paper);
}

.btn-secondary:hover,
.button--secondary:hover,
.button-secondary:hover {
  border-color: var(--ink);
  background: var(--cream);
}

.btn-ghost,
.button--ghost,
.button-ghost {
  color: var(--ink-soft);
  border-color: transparent;
  background: transparent;
}

.btn-ghost:hover,
.button--ghost:hover,
.button-ghost:hover {
  color: var(--ink);
  background: var(--cream-deep);
}

.btn-danger,
.button--danger {
  color: var(--danger);
  border-color: #f4b8b3;
  background: var(--danger-soft);
}

.btn-small,
.button--small {
  min-height: 38px;
  padding: 0.48rem 0.72rem;
  font-size: 0.82rem;
}

.btn-icon,
.icon-button {
  width: 46px;
  min-width: 46px;
  padding: 0;
}

.button-row,
.form-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

/* Forms */

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-group,
.field {
  min-width: 0;
}

.form-label,
.field > label,
.field-label {
  display: block;
  margin-bottom: 0.38rem;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 760;
}

.required {
  color: var(--danger);
}

.form-control,
.field-input,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]),
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.72rem 0.82rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  background: var(--white);
  box-shadow: inset 0 1px 1px rgba(16, 26, 42, 0.03);
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

textarea {
  min-height: 112px;
  resize: vertical;
}

select {
  padding-right: 2.3rem;
}

.form-control:hover,
.field-input:hover,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):hover,
select:hover,
textarea:hover {
  border-color: #9b9184;
}

.form-control:focus,
.field-input:focus,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
select:focus,
textarea:focus {
  border-color: var(--protein);
  box-shadow: 0 0 0 4px rgba(36, 88, 211, 0.13);
}

input::placeholder,
textarea::placeholder {
  color: #98a0ad;
}

input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  color: var(--ink-muted);
  background: #efebe3;
}

.input-group {
  display: flex;
  align-items: stretch;
}

.input-group > :first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
}

.input-group > :last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
}

.input-addon {
  display: grid;
  min-width: 48px;
  padding: 0.65rem;
  border: 1px solid var(--line-strong);
  background: var(--cream);
  color: var(--ink-muted);
  place-items: center;
}

.field-error,
.invalid-feedback {
  margin-top: 0.35rem;
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 650;
}

[aria-invalid="true"],
.is-invalid {
  border-color: var(--danger) !important;
}

.check-row,
.radio-row,
.switch-row {
  display: flex;
  min-height: 44px;
  align-items: flex-start;
  gap: 0.65rem;
}

.check-row input,
.radio-row input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 0.12rem 0 0;
  accent-color: var(--protein);
}

.choice-grid {
  display: grid;
  gap: 0.75rem;
}

.choice-card {
  position: relative;
  display: block;
}

.choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-card__body {
  display: block;
  min-height: 100%;
  padding: 0.9rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  transition: border-color var(--transition), background-color var(--transition), box-shadow var(--transition);
}

.choice-card__title {
  display: block;
  margin-bottom: 0.18rem;
  color: var(--ink);
  font-weight: 800;
}

.choice-card__description {
  display: block;
  color: var(--ink-muted);
  font-size: 0.84rem;
}

.choice-card input:checked + .choice-card__body {
  border-color: var(--protein);
  background: var(--protein-soft);
  box-shadow: 0 0 0 2px rgba(36, 88, 211, 0.12);
}

.choice-card input:focus-visible + .choice-card__body {
  outline: 3px solid rgba(36, 88, 211, 0.34);
  outline-offset: 2px;
}

.segmented-control {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream-deep);
}

.segmented-control label,
.segmented-control a,
.segmented-control button {
  display: grid;
  min-height: 42px;
  padding: 0.5rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.84rem;
  font-weight: 760;
  place-items: center;
  text-align: center;
  text-decoration: none;
}

.segmented-control .is-active,
.segmented-control [aria-selected="true"],
.segmented-control input:checked + label {
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow-xs);
}

/* Alerts and status */

.alert {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 1rem;
  padding: 0.85rem 2.8rem 0.85rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 0.9rem;
}

.alert--success,
.alert-success {
  border-color: #9dcbb3;
  border-left-color: var(--success);
  background: var(--success-soft);
}

.alert--warning,
.alert-warning {
  border-color: #e6c578;
  border-left-color: var(--warning);
  background: var(--warning-soft);
}

.alert--error,
.alert-danger,
.alert-error {
  border-color: #efb1ac;
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

.alert--info,
.alert-info {
  border-color: #afc3ef;
  border-left-color: var(--protein);
  background: var(--protein-soft);
}

.alert__content {
  flex: 1;
}

.alert__title {
  display: block;
  margin-bottom: 0.1rem;
  font-weight: 800;
}

.alert__dismiss,
[data-dismiss-alert] {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: currentColor;
  font-size: 1.2rem;
  place-items: center;
}

.alert__dismiss:hover,
[data-dismiss-alert]:hover {
  background: rgba(16, 26, 42, 0.08);
}

.badge,
.status-badge,
.chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.58rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink-soft);
  font-size: 0.73rem;
  font-weight: 780;
  line-height: 1;
}

.badge--success,
.status-badge--complete {
  color: var(--success);
  border-color: #b4d7c4;
  background: var(--success-soft);
}

.badge--warning,
.status-badge--pending {
  color: #80500a;
  border-color: #e8cb88;
  background: var(--warning-soft);
}

.badge--blue,
.status-badge--active {
  color: var(--protein);
  border-color: #b4c5ef;
  background: var(--protein-soft);
}

/* Macro system */

.macro-summary {
  display: grid;
  gap: 1rem;
}

.macro-bar,
[data-macro-bar] {
  --protein-pct: 0%;
  --carbs-pct: 0%;
  --fat-pct: 0%;
  display: flex;
  width: 100%;
  height: 14px;
  overflow: hidden;
  border: 1px solid rgba(16, 26, 42, 0.16);
  border-radius: 999px;
  background: var(--cream-deep);
  box-shadow: inset 0 1px 2px rgba(16, 26, 42, 0.1);
}

.macro-bar--large,
[data-macro-bar].macro-bar--large {
  height: 22px;
  border-radius: 7px;
}

.macro-bar__segment,
[data-macro-segment] {
  display: block;
  min-width: 0;
  height: 100%;
  transition: width 300ms ease, flex-basis 300ms ease;
}

.macro-bar__protein,
.macro-bar__segment--protein,
[data-macro-segment="protein"] {
  width: var(--protein-pct);
  flex-basis: var(--protein-pct);
  background: var(--protein);
}

.macro-bar__carbs,
.macro-bar__segment--carbs,
[data-macro-segment="carbs"] {
  width: var(--carbs-pct);
  flex-basis: var(--carbs-pct);
  background: var(--carbs);
}

.macro-bar__fat,
.macro-bar__segment--fat,
[data-macro-segment="fat"] {
  width: var(--fat-pct);
  flex-basis: var(--fat-pct);
  background: var(--fat);
}

.macro-legend,
.macro-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.macro-legend {
  justify-content: space-between;
}

.macro-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 680;
}

.macro-legend__swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}

.macro-pill,
.macro-unit {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 0.32rem;
  padding: 0.38rem 0.62rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 780;
  line-height: 1;
}

.macro-pill strong,
.macro-unit strong {
  font-size: 0.92rem;
}

.macro-pill--protein,
.macro-unit--protein {
  color: #183e9c;
  border-color: #b8c8f0;
  background: var(--protein-soft);
}

.macro-pill--carbs,
.macro-unit--carbs {
  color: #684806;
  border-color: #e9ce80;
  background: var(--carbs-soft);
}

.macro-pill--fat,
.macro-unit--fat {
  color: #982c26;
  border-color: #efb6b2;
  background: var(--fat-soft);
}

.macro-pill--calories,
.macro-unit--calories {
  color: var(--ink-soft);
  border-color: var(--line);
  background: var(--cream);
}

.macro-target {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.macro-target__heading,
.macro-target__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.macro-target__value {
  font-weight: 850;
}

.macro-progress {
  height: 8px;
  margin-top: 0.55rem;
  overflow: hidden;
  border-radius: 99px;
  background: var(--cream-deep);
}

.macro-progress > span {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  max-width: 100%;
  border-radius: inherit;
  background: currentColor;
}

/* Meal discovery and building */

.meal-grid {
  display: grid;
  gap: 1rem;
}

.meal-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-xs);
}

.meal-card__image,
.meal-card__visual {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  background: var(--cream-deep);
}

.meal-card__image img,
.meal-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meal-card__badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
}

.meal-card__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.72rem;
  padding: 1rem;
}

.meal-card__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.meal-card__title {
  margin-bottom: 0.2rem;
}

.meal-card__description {
  margin-bottom: 0;
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.meal-card__price {
  flex: 0 0 auto;
  font-weight: 850;
}

.meal-card__actions {
  display: flex;
  gap: 0.55rem;
  margin-top: auto;
}

.builder-layout {
  display: grid;
  gap: 1rem;
}

.builder-stage {
  min-width: 0;
}

.builder-summary {
  align-self: start;
}

.builder-step,
.ingredient-group {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.builder-step__number,
.step-number {
  display: inline-grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  margin-right: 0.45rem;
  border-radius: 50%;
  color: var(--white);
  background: var(--ink);
  font-size: 0.78rem;
  font-weight: 820;
  place-items: center;
}

.ingredient-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ingredient-option {
  position: relative;
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 0.72rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  transition: border-color var(--transition), background-color var(--transition), box-shadow var(--transition);
}

.ingredient-option:hover,
.ingredient-option.is-selected,
.ingredient-option:has(input:checked) {
  border-color: var(--protein);
  background: var(--protein-soft);
}

.ingredient-option:has(input:focus-visible) {
  outline: 3px solid rgba(36, 88, 211, 0.3);
  outline-offset: 2px;
}

.ingredient-option__visual {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 10px;
  background: var(--cream-deep);
  place-items: center;
}

.ingredient-option__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ingredient-option__body {
  min-width: 0;
  flex: 1;
}

.ingredient-option__name {
  display: block;
  font-weight: 780;
}

.ingredient-option__meta {
  display: block;
  color: var(--ink-muted);
  font-size: 0.76rem;
}

.ingredient-option input[type="checkbox"],
.ingredient-option input[type="radio"] {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  accent-color: var(--protein);
}

.portion-stepper,
.quantity-control {
  display: inline-grid;
  grid-template-columns: 42px minmax(42px, auto) 42px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.stepper-button,
.quantity-control button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 1.2rem;
  font-weight: 800;
  place-items: center;
}

.stepper-button:hover,
.quantity-control button:hover {
  background: var(--cream);
}

.stepper-value,
.quantity-control__value,
.quantity-control input {
  min-width: 42px;
  min-height: 42px !important;
  padding: 0.3rem !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-weight: 780;
  text-align: center;
}

.recommendation-note {
  display: flex;
  gap: 0.65rem;
  padding: 0.8rem;
  border-left: 4px solid var(--protein);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--protein-soft);
  color: #173777;
  font-size: 0.84rem;
}

/* Cart, checkout, and orders */

.cart-layout,
.checkout-layout {
  display: grid;
  gap: 1rem;
}

.cart-list,
.order-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cart-item,
.order-card {
  display: grid;
  gap: 0.8rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.cart-item__main,
.order-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.cart-item__name,
.order-card__number {
  margin-bottom: 0.2rem;
  font-weight: 820;
}

.cart-item__details,
.order-card__meta {
  color: var(--ink-muted);
  font-size: 0.82rem;
}

.cart-item__price,
.order-total {
  flex: 0 0 auto;
  font-weight: 850;
}

.cart-item__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
}

.checkout-summary,
.order-summary {
  align-self: start;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: var(--shadow-xs);
}

.price-list,
.summary-list {
  margin: 0;
}

.price-row,
.summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.4rem;
  color: var(--ink-soft);
}

.price-row dt,
.price-row dd,
.summary-row dt,
.summary-row dd {
  margin: 0;
}

.price-row--total,
.summary-row--total {
  margin-top: 0.5rem;
  padding-top: 0.9rem;
  border-top: 2px solid var(--ink);
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 850;
}

.payment-frame,
.stripe-element {
  min-height: 50px;
  padding: 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  color: var(--ink-muted);
  font-size: 0.75rem;
}

.order-timeline {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.order-timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 0.65rem;
  min-height: 64px;
  color: var(--ink-muted);
}

.order-timeline__item::before {
  position: absolute;
  top: 28px;
  bottom: 0;
  left: 14px;
  width: 2px;
  content: "";
  background: var(--line);
}

.order-timeline__item:last-child::before {
  display: none;
}

.order-timeline__dot {
  display: grid;
  width: 30px;
  height: 30px;
  z-index: 1;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
  place-items: center;
}

.order-timeline__item.is-complete,
.order-timeline__item.is-current {
  color: var(--ink);
}

.order-timeline__item.is-complete .order-timeline__dot,
.order-timeline__item.is-current .order-timeline__dot {
  color: var(--white);
  border-color: var(--success);
  background: var(--success);
}

/* Onboarding and account */

.auth-shell {
  display: grid;
  min-height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
  padding-block: 1.5rem 3rem;
  place-items: center;
}

.auth-card {
  width: min(100%, 480px);
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.auth-card__header {
  margin-bottom: 1.2rem;
  text-align: center;
}

.auth-card__logo {
  width: auto;
  height: 58px;
  margin: 0 auto 1rem;
}

.stepper,
.progress-steps {
  display: flex;
  align-items: center;
  margin: 0 0 1.35rem;
  padding: 0;
  list-style: none;
}

.stepper__item,
.progress-step {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  color: var(--ink-muted);
}

.stepper__item:not(:last-child)::after,
.progress-step:not(:last-child)::after {
  height: 2px;
  flex: 1;
  margin-inline: 0.35rem;
  content: "";
  background: var(--line);
}

.stepper__dot,
.progress-step__dot {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
  font-size: 0.72rem;
  font-weight: 820;
  place-items: center;
}

.stepper__item.is-complete .stepper__dot,
.stepper__item.is-current .stepper__dot,
.progress-step.is-complete .progress-step__dot,
.progress-step.is-current .progress-step__dot {
  color: var(--white);
  border-color: var(--protein);
  background: var(--protein);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar {
  display: grid;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 2px solid var(--paper);
  border-radius: 50%;
  color: var(--white);
  background: var(--protein);
  box-shadow: 0 0 0 2px var(--protein);
  font-size: 1.2rem;
  font-weight: 850;
  place-items: center;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.settings-link {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 680;
  text-decoration: none;
}

.settings-list li:last-child .settings-link {
  border-bottom: 0;
}

/* Empty, success, and utility states */

.empty-state,
.success-state {
  max-width: 560px;
  margin-inline: auto;
  padding: 2.25rem 1rem;
  text-align: center;
}

.empty-state__icon,
.success-state__icon {
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--cream-deep);
  font-size: 1.75rem;
  place-items: center;
}

.success-state__icon {
  color: var(--white);
  background: var(--success);
}

.divider-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-block: 1rem;
  color: var(--ink-muted);
  font-size: 0.76rem;
  font-weight: 720;
  text-transform: uppercase;
}

.divider-label::before,
.divider-label::after {
  height: 1px;
  flex: 1;
  content: "";
  background: var(--line);
}

.skeleton {
  overflow: hidden;
  border-radius: 6px;
  background: var(--cream-deep);
}

.toast-region {
  position: fixed;
  z-index: 200;
  right: 1rem;
  bottom: calc(var(--bottom-nav-height) + 1rem + env(safe-area-inset-bottom));
  left: 1rem;
  display: grid;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  width: min(100%, 420px);
  margin-left: auto;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--white);
  background: var(--ink);
  box-shadow: var(--shadow-md);
  pointer-events: auto;
}

.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  background: var(--cream-deep);
  color: var(--ink-soft);
}

.footer-inner {
  display: grid;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}

.footer-links a {
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 680;
}

/* Larger screens */

@media (min-width: 560px) {
  .card,
  .panel,
  .auth-card,
  .checkout-summary,
  .order-summary {
    padding: 1.25rem;
  }

  .button-row,
  .form-actions {
    flex-direction: row;
    align-items: center;
  }

  .button-row--end,
  .form-actions--end {
    justify-content: flex-end;
  }

  .form-grid--two,
  .choice-grid--two,
  .meal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-grid,
  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .section-header,
  .page-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .section-header__copy,
  .page-header__copy {
    min-width: 0;
  }

  .cart-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .cart-item__footer {
    min-width: 180px;
    justify-content: flex-end;
    padding-top: 0;
    border-top: 0;
  }
}

@media (min-width: 800px) {
  body {
    padding-bottom: 0;
  }

  body.menu-open {
    overflow: auto;
  }

  .app-shell,
  .page-shell {
    padding-block: 2.25rem 4rem;
  }

  .menu-toggle,
  .mobile-bottom-nav {
    display: none;
  }

  .site-nav[data-mobile-menu],
  .site-nav[data-mobile-menu][hidden],
  .site-nav {
    position: static;
    display: flex !important;
    max-height: none;
    align-items: center;
    gap: 0.15rem;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .nav-link {
    min-height: 40px;
    padding: 0.48rem 0.65rem;
  }

  .nav-link[aria-current="page"],
  .nav-link.is-active {
    box-shadow: inset 0 -3px 0 var(--protein);
  }

  .grid--two,
  .cart-layout,
  .checkout-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  }

  .builder-layout {
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.7fr);
  }

  .builder-summary,
  .checkout-summary,
  .order-summary {
    position: sticky;
    top: calc(var(--header-height) + 1rem);
  }

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

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

  .auth-card {
    padding: 1.75rem;
  }

  .toast-region {
    bottom: 1rem;
    left: auto;
    width: min(420px, calc(100% - 2rem));
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

@media (min-width: 1040px) {
  .meal-grid,
  .meal-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  body {
    padding: 0;
    background: var(--white);
  }

  .site-header,
  .site-footer,
  .mobile-bottom-nav,
  .menu-toggle,
  .button-row,
  .form-actions,
  .btn,
  .button {
    display: none !important;
  }

  .card,
  .panel,
  .checkout-summary,
  .order-summary {
    box-shadow: none;
  }
}

/* Restaurant-forward refresh */

body {
  background:
    radial-gradient(circle at 15% -10%, rgba(255, 250, 240, 0.95), transparent 32rem),
    var(--cream);
}

a {
  color: var(--brand-red);
}

.eyebrow {
  color: var(--brand-red);
  font-size: 0.71rem;
  letter-spacing: 0.15em;
}

.site-header {
  border-bottom-color: var(--line);
  background: rgba(255, 250, 240, 0.98);
  box-shadow: none;
  backdrop-filter: none;
}

.site-header::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, var(--protein) 0 40%, var(--carbs) 40% 70%, var(--fat) 70%);
}

.brand {
  gap: 0;
}

.nav-link {
  border-radius: 4px;
  color: var(--ink-soft);
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  background: rgba(231, 210, 183, 0.55);
}

.nav-order {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.82rem;
  border: 1px solid var(--ink);
  border-radius: 4px;
  color: var(--white);
  background: var(--ink);
  font-size: 0.84rem;
  font-weight: 820;
  text-decoration: none;
}

.nav-order:hover,
.nav-order[aria-current="page"] {
  color: var(--white);
  background: var(--brand-green);
  text-decoration: none;
}

.cart-count {
  display: grid;
  min-width: 20px;
  height: 20px;
  padding-inline: 0.25rem;
  border-radius: 99px;
  color: var(--ink);
  background: var(--carbs);
  font-size: 0.7rem;
  place-items: center;
}

.mobile-bottom-nav {
  border-top-color: var(--line);
  background: rgba(255, 250, 240, 0.98);
  box-shadow: 0 -6px 22px rgba(47, 35, 23, 0.1);
}

.bottom-nav__item:hover,
.bottom-nav__item[aria-current="page"] {
  color: var(--brand-red);
  background: #f4e5d2;
}

.bottom-nav__icon {
  position: relative;
  border: 2px solid currentColor;
  border-radius: 6px;
}

.bottom-nav__icon::before,
.bottom-nav__icon::after {
  position: absolute;
  content: "";
}

.bottom-nav__icon--menu::before {
  top: 6px;
  right: 4px;
  left: 4px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
}

.bottom-nav__icon--build {
  border-radius: 50%;
}

.bottom-nav__icon--build::before,
.bottom-nav__icon--build::after {
  top: 11px;
  left: 5px;
  width: 12px;
  height: 2px;
  background: currentColor;
}

.bottom-nav__icon--build::after {
  transform: rotate(90deg);
}

.bottom-nav__icon--orders::before {
  top: 5px;
  right: 5px;
  left: 5px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
}

.bottom-nav__icon--bag {
  border-radius: 3px 3px 8px 8px;
}

.bottom-nav__icon--bag::before {
  top: -7px;
  left: 6px;
  width: 10px;
  height: 8px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.bottom-nav__icon--bag i {
  position: absolute;
  top: -6px;
  right: -8px;
  display: grid;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 99px;
  color: var(--white);
  background: var(--brand-red);
  font-size: 0.55rem;
  font-style: normal;
  place-items: center;
}

.bottom-nav__icon--account {
  border-radius: 50%;
}

.bottom-nav__icon--account::before {
  top: 4px;
  left: 7px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.bottom-nav__icon--account::after {
  right: 4px;
  bottom: 3px;
  left: 4px;
  height: 7px;
  border: 2px solid currentColor;
  border-radius: 8px 8px 3px 3px;
}

.card,
.panel,
.surface,
.checkout-summary,
.order-summary {
  box-shadow: none;
}

.card--interactive:hover,
.meal-card:hover,
.featured-meal-card:hover {
  box-shadow: var(--shadow-sm);
}

.btn-primary,
.button--primary,
.button-primary {
  border-color: var(--ink);
  border-radius: 4px;
  background: var(--ink);
  box-shadow: none;
}

.btn-primary:hover,
.button--primary:hover,
.button-primary:hover {
  background: var(--brand-green);
  box-shadow: none;
}

.btn--warm {
  border-color: var(--brand-rust);
  background: var(--brand-rust);
}

.btn--warm:hover {
  border-color: #a74626;
  background: #a74626;
}

.btn-light {
  color: var(--ink);
  border-color: var(--paper);
  border-radius: 4px;
  background: var(--paper);
}

.btn-light:hover {
  color: var(--ink);
  background: var(--cream-deep);
}

input,
select,
textarea {
  border-radius: 5px;
  background: #fffdf8;
}

.macro-bar,
[data-macro-bar] {
  height: 9px;
  border: 0;
  box-shadow: none;
}

.macro-bar--large,
[data-macro-bar].macro-bar--large {
  height: 14px;
  border-radius: 99px;
}

.landing-page .app-shell {
  width: 100%;
  max-width: none;
  padding: 0;
}

.restaurant-hero {
  position: relative;
  display: flex;
  min-height: clamp(610px, 78vh, 780px);
  align-items: center;
  overflow: hidden;
  color: var(--white);
  background: #171b17;
}

.restaurant-hero__image,
.restaurant-hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.restaurant-hero__image {
  object-fit: cover;
  object-position: 63% center;
}

.restaurant-hero__shade {
  background: linear-gradient(90deg, rgba(16, 18, 15, 0.96) 0%, rgba(16, 18, 15, 0.84) 38%, rgba(16, 18, 15, 0.24) 70%, rgba(16, 18, 15, 0.08) 100%);
}

.restaurant-hero__content {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--content-width));
  margin-inline: auto;
  padding-block: 4.5rem;
}

.restaurant-hero__content > * {
  max-width: 650px;
}

.restaurant-hero .eyebrow {
  color: #f4c44f;
}

.restaurant-hero h1 {
  max-width: 690px;
  margin-bottom: 1rem;
  color: var(--white);
  font-size: clamp(3.1rem, 8vw, 6.5rem);
  line-height: 0.94;
  letter-spacing: -0.055em;
}

.restaurant-hero .lede {
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.06rem, 2vw, 1.28rem);
}

.restaurant-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.25rem;
  margin: 2rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  list-style: none;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.82rem;
  font-weight: 760;
  letter-spacing: 0.03em;
}

.restaurant-proof li::before {
  color: #f4c44f;
  content: "●";
  margin-right: 0.45rem;
  font-size: 0.65rem;
}

.restaurant-section,
.restaurant-cta {
  width: min(100% - 2rem, var(--content-width));
  margin-inline: auto;
}

.restaurant-section {
  padding-block: clamp(3.6rem, 8vw, 6.5rem);
}

.featured-menu {
  padding-bottom: 2rem;
}

.featured-menu .section-header {
  align-items: flex-end;
  margin-bottom: 1.7rem;
}

.featured-menu h2,
.order-paths h2,
.how-it-fits h2,
.restaurant-cta h2 {
  font-size: clamp(2.35rem, 5vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--brand-red);
  font-weight: 820;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.featured-meal-grid {
  display: grid;
  gap: 1rem;
}

.featured-meal-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  transition: transform var(--transition), box-shadow var(--transition);
}

.featured-meal-card:hover {
  transform: translateY(-3px);
}

.featured-meal-card > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.featured-meal-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.1rem;
}

.featured-meal-card h3 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
}

.featured-meal-card p {
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.featured-meal-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.featured-meal-card__footer strong {
  font-size: 1.1rem;
}

.featured-meal-card__footer a {
  font-weight: 820;
}

.menu-kicker {
  color: var(--brand-red);
  font-size: 0.68rem;
  font-weight: 840;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.order-paths {
  display: grid;
  gap: 2rem;
}

.order-path-grid {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.order-path {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.15rem 0.75rem;
  padding: 1.25rem 0.25rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.order-path:last-child {
  border-bottom: 0;
}

.order-path > span {
  grid-row: 1 / 3;
  color: var(--brand-red);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
}

.order-path strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.order-path small {
  color: var(--ink-muted);
}

.order-path:hover {
  padding-inline: 0.65rem;
  background: rgba(255, 250, 240, 0.65);
  text-decoration: none;
}

.how-it-fits {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.macro-key-strip {
  padding: 1.4rem;
  border: 1px solid rgba(255, 250, 240, 0.25);
  border-radius: var(--radius-lg);
  color: rgba(255, 255, 255, 0.78);
  background: var(--ink);
}

.macro-key-strip__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.macro-key-strip__heading span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.macro-key-strip__heading strong {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.macro-key-strip__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-top: 0.85rem;
  font-size: 0.76rem;
  font-weight: 720;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 0.3rem;
  border-radius: 50%;
}

.dot--protein { background: var(--protein); }
.dot--carbs { background: var(--carbs); }
.dot--fat { background: var(--fat); }

.macro-key-strip p {
  margin-top: 1rem;
  font-size: 0.82rem;
}

.macro-key-strip .macro-legend__item strong {
  color: rgba(255, 255, 255, 0.9);
}

.macro-key-strip .macro-legend__item small {
  color: rgba(255, 255, 255, 0.62);
}

.restaurant-cta {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 4rem;
  padding: clamp(2rem, 6vw, 4.5rem);
  border-radius: var(--radius-lg);
  color: var(--white);
  background: var(--brand-red);
}

.restaurant-cta h2,
.restaurant-cta .eyebrow {
  color: var(--white);
}

.menu-intro {
  padding-top: 0.5rem;
}

.menu-board .meal-grid {
  align-items: stretch;
}

.meal-card {
  border-radius: var(--radius-lg);
  box-shadow: none;
  transition: transform var(--transition), box-shadow var(--transition);
}

.meal-card:hover {
  transform: translateY(-3px);
}

.meal-card__image,
.meal-card__visual {
  min-height: 210px;
  aspect-ratio: 4 / 3;
}

.meal-card__body {
  padding: 1.05rem;
}

.meal-card__title {
  margin-top: 0.12rem;
  font-size: 1.55rem;
}

.meal-card__description {
  color: var(--ink-soft);
  line-height: 1.45;
}

.food-meta {
  margin: -0.1rem 0 0;
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.nutrition-details,
.order-nutrition {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.nutrition-details > summary,
.order-nutrition > summary,
.ingredient-facts > summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 780;
  list-style-position: outside;
}

.nutrition-details > summary,
.order-nutrition > summary {
  padding-block: 0.75rem;
}

.nutrition-details__body {
  padding-bottom: 0.9rem;
}

.plan-drawer {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 250, 240, 0.72);
}

.plan-drawer > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  cursor: pointer;
  list-style: none;
}

.plan-drawer > summary::-webkit-details-marker {
  display: none;
}

.plan-drawer > summary span:first-child {
  display: grid;
}

.plan-drawer > summary small {
  color: var(--brand-red);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.plan-drawer > summary strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.plan-drawer[open] > summary span:last-child {
  transform: rotate(45deg);
}

.plan-drawer__body {
  padding: 0 1.15rem 1.15rem;
}

.ingredient-group {
  border-radius: var(--radius-md);
  background: rgba(255, 250, 240, 0.9);
}

.ingredient-option {
  align-items: flex-start;
  border-radius: 8px;
  background: #fffdf8;
}

.ingredient-option:hover,
.ingredient-option.is-selected,
.ingredient-option:has(input:checked) {
  border-color: var(--brand-green);
  background: #edf1e8;
  box-shadow: inset 4px 0 0 var(--brand-green);
}

.ingredient-option__visual {
  border-radius: 50%;
  color: var(--white);
  background: var(--brand-rust);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
}

.ingredient-option__description {
  display: block;
  margin-top: 0.12rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.35;
}

.ingredient-option__meta {
  margin-top: 0.22rem;
}

.ingredient-facts {
  margin-top: 0.2rem;
  color: var(--ink-muted);
  font-size: 0.72rem;
}

.ingredient-facts > summary {
  display: inline;
}

.ingredient-facts > span {
  display: block;
  padding-top: 0.18rem;
}

.builder-summary {
  overflow: hidden;
  padding-top: 0;
}

.builder-summary__food {
  margin: 0 -1rem;
}

.builder-summary__food img {
  width: 100%;
  max-height: 190px;
  object-fit: cover;
}

.builder-price-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-weight: 760;
}

.builder-price-line strong {
  font-family: var(--font-display);
  font-size: 1.65rem;
}

.builder-nutrition {
  border-bottom: 0;
}

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

.builder-nutrition .metric-card {
  background: var(--cream);
}

.cart-item,
.order-card,
.checkout-summary,
.order-summary,
.checkout-page .card {
  background: rgba(255, 250, 240, 0.92);
}

.checkout-summary,
.order-summary {
  border-top: 4px solid var(--brand-red);
}

.cart-item details,
.checkout-summary > details {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.cart-item details > summary,
.checkout-summary > details > summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-weight: 780;
}

.auth-page .app-shell {
  width: 100%;
  max-width: none;
  padding-inline: 1rem;
  background:
    linear-gradient(90deg, rgba(30, 43, 36, 0.94), rgba(30, 43, 36, 0.45)),
    url("../images/macros-bowl-hero.webp") center / cover fixed;
}

.auth-card {
  border: 0;
  border-top: 5px solid var(--brand-red);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.auth-card__header h1 {
  font-size: clamp(2.2rem, 7vw, 3.5rem);
}

.site-footer {
  border-top: 0;
  color: rgba(255, 255, 255, 0.78);
  background: #17211b;
}

.site-footer .helper-text {
  color: rgba(255, 255, 255, 0.58);
}

/* Plain-language meal guide */

.macro-legend__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 0.38rem;
  align-items: center;
}

.macro-legend__item .macro-legend__swatch {
  grid-row: 1 / 3;
}

.macro-legend__item strong,
.macro-legend__item small {
  display: block;
}

.macro-legend__item strong {
  color: var(--ink-soft);
  font-size: 0.74rem;
}

.macro-legend__item small {
  color: var(--ink-muted);
  font-size: 0.67rem;
  font-weight: 650;
}

.personal-guide-banner {
  display: grid;
  gap: 1.25rem;
  margin-block: 1rem 2.5rem;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border: 1px solid var(--line-strong);
  border-top: 5px solid var(--brand-green);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-xs);
}

.personal-guide-banner h2 {
  margin: 0.1rem 0 0.45rem;
  font-size: clamp(1.7rem, 4vw, 2.45rem);
}

.personal-guide-banner__intro > p:not(.eyebrow) {
  max-width: 660px;
  color: var(--ink-soft);
}

.personal-guide-banner__size {
  display: inline-block;
  margin-top: 0.85rem;
  padding: 0.42rem 0.62rem;
  border-radius: 4px;
  color: var(--white);
  background: var(--brand-green);
  font-size: 0.76rem;
  font-weight: 800;
}

.plain-color-key {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.plain-color-key > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: center;
  padding: 0.52rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--cream);
}

.plain-color-key .dot {
  width: 13px;
  height: 13px;
  margin: 0;
}

.plain-color-key span,
.plain-color-key strong,
.plain-color-key small {
  display: block;
}

.plain-color-key strong {
  font-size: 0.82rem;
}

.plain-color-key small,
.plain-color-key > p {
  color: var(--ink-muted);
  font-size: 0.72rem;
}

.plain-color-key > p {
  margin: 0.2rem 0 0;
}

.fit-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0.34rem 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 4px;
  color: var(--white);
  background: rgba(30, 43, 36, 0.92);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.fit-badge--on-track::before {
  content: "✓";
  margin-right: 0.32rem;
}

.fit-badge--close::before {
  content: "≈";
  margin-right: 0.32rem;
}

.fit-badge--different::before {
  content: "↔";
  margin-right: 0.32rem;
}

.meal-goal-fit {
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 5px solid var(--ink-muted);
  border-radius: 7px;
  background: #fffdf8;
}

.meal-goal-fit--on-track {
  border-left-color: #4c7857;
}

.meal-goal-fit--close {
  border-left-color: var(--carbs);
}

.meal-goal-fit--different {
  border-left-color: var(--brand-rust);
}

.meal-goal-fit--empty {
  border-left-color: var(--line-strong);
}

.meal-goal-fit__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--cream);
}

.meal-goal-fit__eyebrow,
.meal-goal-fit__status,
.meal-goal-fit__calories,
.meal-goal-fit__meaning strong,
.meal-goal-fit__meaning small,
.meal-goal-fit__result strong,
.meal-goal-fit__result small {
  display: block;
}

.meal-goal-fit__eyebrow {
  color: var(--ink-muted);
  font-size: 0.64rem;
  font-weight: 790;
  line-height: 1.3;
}

.meal-goal-fit__status {
  margin-top: 0.12rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.1;
}

.meal-goal-fit__calories {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.15;
  text-align: right;
}

.meal-goal-fit__calories small {
  color: var(--ink-muted);
  font-size: 0.65rem;
  font-weight: 650;
}

.meal-goal-fit__summary {
  margin: 0;
  padding: 0.7rem 0.75rem;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.42;
}

.meal-goal-fit__rows {
  margin: 0;
  padding: 0 0.75rem 0.35rem;
  list-style: none;
}

.meal-goal-fit__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
}

.meal-goal-fit__meaning {
  display: grid;
  min-width: 0;
  grid-template-columns: auto 1fr;
  gap: 0.42rem;
  align-items: center;
}

.meal-goal-fit__meaning .dot {
  width: 11px;
  height: 11px;
  margin: 0;
}

.meal-goal-fit__meaning strong,
.meal-goal-fit__result strong {
  color: var(--ink-soft);
  font-size: 0.69rem;
  line-height: 1.25;
}

.meal-goal-fit__meaning small,
.meal-goal-fit__result small {
  color: var(--ink-muted);
  font-size: 0.63rem;
  line-height: 1.3;
}

.meal-goal-fit__result {
  flex: 0 0 auto;
  text-align: right;
}

.meal-goal-fit__row--protein .meal-goal-fit__result strong {
  color: #183e9c;
}

.meal-goal-fit__row--carbs .meal-goal-fit__result strong {
  color: #684806;
}

.meal-goal-fit__row--fat .meal-goal-fit__result strong {
  color: #982c26;
}

.color-mix-label {
  display: grid;
  gap: 0.08rem;
  margin: 0;
}

.color-mix-label strong {
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.color-mix-label span {
  color: var(--ink-muted);
  font-size: 0.68rem;
}

.builder-goal-fit {
  margin-block: 0.1rem;
}

.metric-card--protein {
  border-top: 3px solid var(--protein);
}

.metric-card--carbs {
  border-top: 3px solid var(--carbs);
}

.metric-card--fat {
  border-top: 3px solid var(--fat);
}

@media (min-width: 760px) {
  .personal-guide-banner {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: center;
  }
}

@media (max-width: 460px) {
  .meal-goal-fit__row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .meal-goal-fit__result {
    padding-left: 1.42rem;
    text-align: left;
  }
}

@media (forced-colors: active) {
  .dot,
  .macro-legend__swatch,
  .macro-bar__segment {
    border: 1px solid CanvasText;
  }

  .meal-goal-fit,
  .personal-guide-banner {
    border-color: CanvasText;
  }
}

@media (min-width: 560px) {
  .featured-meal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .restaurant-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .restaurant-cta > div:first-child {
    max-width: 760px;
  }
}

@media (min-width: 800px) {
  .featured-meal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .order-paths {
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.4fr);
    align-items: start;
  }

  .how-it-fits {
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  }

  .nav-order {
    margin-left: 0.25rem;
  }

  .builder-summary__food {
    margin-inline: -1.25rem;
  }
}

@media (max-width: 799px) {
  .site-nav .nav-order {
    justify-content: space-between;
    min-height: 46px;
  }

  .restaurant-hero {
    min-height: 680px;
    align-items: flex-end;
  }

  .restaurant-hero__image {
    object-position: 66% center;
  }

  .restaurant-hero__shade {
    background: linear-gradient(0deg, rgba(16, 18, 15, 0.98) 0%, rgba(16, 18, 15, 0.82) 48%, rgba(16, 18, 15, 0.12) 90%);
  }

  .restaurant-hero__content {
    padding-block: 13rem 2.5rem;
  }

  .restaurant-hero h1 {
    font-size: clamp(3rem, 15vw, 4.8rem);
  }

  .restaurant-hero .button-row .btn {
    width: 100%;
  }

  .featured-menu .section-header {
    align-items: flex-start;
  }

  .builder-summary {
    margin-top: 0.5rem;
  }
}

@media print {
  body {
    background: var(--white);
  }

  .restaurant-hero__image,
  .auth-page .app-shell {
    background: none;
  }
}

/* Keep the unenhanced builder readable, including narrow tablet columns. */
.builder-page .ingredient-option {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
}

.builder-page .ingredient-option__visual {
  width: 40px;
  height: 40px;
}

.builder-page .ingredient-option > .field {
  grid-column: 1 / -1;
  width: 100%;
}

.builder-page .ingredient-list--two {
  grid-template-columns: minmax(0, 1fr);
}

/* One account, independent eating profiles. Keep names and actions comfortable on phones. */
.order-profile-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--line);
}
.order-profile-strip > span { display: grid; min-width: 0; gap: .1rem; }
.order-profile-strip small { color: var(--ink-muted); font-size: .72rem; }
.order-profile-strip strong { font-size: .95rem; overflow-wrap: anywhere; }
.order-profile-strip > a { display: flex; flex-shrink: 0; min-height: 44px; align-items: center; color: var(--brand-red); font-size: .8rem; }
.eating-profile-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.eating-profile-card { min-width: 0; padding: 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: #fffdf8; }
.eating-profile-card.is-current { border-color: var(--brand-green); box-shadow: inset 0 0 0 1px var(--brand-green); }
.eating-profile-card__top { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: .75rem; align-items: center; }
.eating-profile-avatar { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: #e9eee2; color: var(--brand-green); font-size: 1.1rem; font-weight: 750; }
.eating-profile-card h2 { margin: 0 0 .25rem; font-family: inherit; font-size: 1.15rem; line-height: 1.3; overflow-wrap: anywhere; }
.eating-profile-card__top p { margin: 0; color: var(--ink-muted); font-size: .75rem; }
.eating-profile-card__guide { margin: 1rem 0 .3rem; font-size: .95rem; font-weight: 700; }
.eating-profile-card .helper-text { margin: .3rem 0; }
.eating-profile-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .65rem; margin-top: 1rem; }
.eating-profile-card__actions form { flex-basis: 100%; }
.eating-profile-card__actions form .btn { width: 100%; }
.eating-profile-card__actions > .btn { min-height: 44px; padding-inline: .25rem; font-size: .85rem; }
.eating-profile-account { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.meal-goal-fit--no-guide { border-color: var(--line); }
@media (min-width: 700px) {
  .eating-profile-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
