:root {
  color-scheme: light;
  --bg: #f5f5f3;
  --bg-soft: #ececea;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --text-primary: #101010;
  --text-secondary: #5f5f5b;
  --text-muted: #8a8a84;
  --border: rgba(16, 16, 16, 0.1);
  --border-strong: rgba(16, 16, 16, 0.22);
  --border-focus: rgba(16, 16, 16, 0.42);
  --shadow: 0 24px 60px rgba(15, 15, 15, 0.08);
  --shadow-soft: 0 12px 30px rgba(15, 15, 15, 0.05);
  --button-bg: #111111;
  --button-hover: #000000;
  --button-shadow: 0 14px 30px rgba(17, 17, 17, 0.16);
  --radius-card: 32px;
  --radius-control: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", sans-serif;
  color: var(--text-primary);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 34%),
    radial-gradient(circle at top right, rgba(17, 17, 17, 0.05), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  overflow-anchor: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(16, 16, 16, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 16, 16, 0.025) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 78%);
}

.page-shell {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 32px 48px;
}

.landing-shell {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 32px 48px;
}

.card {
  position: relative;
  width: min(100%, 1320px);
  padding: 44px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.landing-card {
  position: relative;
  width: min(100%, 1320px);
  padding: 44px;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(17, 17, 17, 0.08));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.site-nav {
  position: relative;
  z-index: 20;
  width: 100%;
  margin-bottom: 32px;
}

.site-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
  min-height: 116px;
  padding: 0 0 24px;
  border-bottom: 1px solid rgba(16, 16, 16, 0.08);
}

.site-nav-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: #111;
  text-decoration: none;
}

.site-nav-logo {
  display: block;
  width: clamp(150px, 15vw, 220px);
  height: auto;
}

.site-nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-left: auto;
}

.site-nav-item {
  position: relative;
}

.site-nav-dropdown {
  padding-bottom: 6px;
  margin-bottom: -6px;
}

.site-nav-links a,
.site-nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-secondary);
  background: transparent;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  font: inherit;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.site-nav-dropdown-toggle {
  gap: 8px;
}

.site-nav-links a:hover,
.site-nav-dropdown-toggle:hover {
  color: var(--text-primary);
  background: rgba(17, 17, 17, 0.04);
  transform: translateY(-1px);
}

.site-nav-links a.is-active,
.site-nav-dropdown-toggle.is-active {
  border-color: rgba(17, 17, 17, 0.12);
  background: #111;
  color: #fff;
}

.site-nav-dropdown-caret {
  width: 8px;
  height: 8px;
  margin-top: -2px;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  opacity: 0.72;
  transform: rotate(45deg);
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}

.site-nav-dropdown[data-open="true"] .site-nav-dropdown-caret {
  opacity: 1;
  transform: rotate(-135deg);
}

.site-nav-dropdown-menu {
  position: absolute;
  top: calc(100% - 2px);
  right: 0;
  display: grid;
  gap: 6px;
  min-width: 220px;
  padding: 8px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
  z-index: 40;
}

.site-nav-dropdown[data-open="true"] .site-nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.site-nav-dropdown-menu a {
  justify-content: flex-start;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 18px;
}

.site-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.site-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #111;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}

.site-nav[data-open="true"] .site-nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-nav[data-open="true"] .site-nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-nav[data-open="true"] .site-nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.landing-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  gap: 16px;
  padding-top: 8px;
  align-items: stretch;
}

.landing-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: auto;
  padding: 8px 6px 0 0;
}

.landing-copy h1 {
  max-width: 9ch;
  margin: 10px 0 0;
  font-size: clamp(2.6rem, 4.8vw, 4.3rem);
  line-height: 0.94;
  letter-spacing: -0.068em;
}

.landing-subheadline {
  max-width: 30rem;
  margin: 14px 0 0;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.7;
}

.landing-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  margin-top: 14px;
  grid-auto-rows: 1fr;
}

.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: 20px;
  border: 1px solid rgba(16, 16, 16, 0.1);
  border-radius: 24px;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
}

.feature-card:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.feature-card-featured {
  min-height: 332px;
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0.98), rgba(32, 32, 32, 0.94)),
    rgba(17, 17, 17, 0.96);
  color: #ffffff;
  box-shadow: 0 30px 54px rgba(17, 17, 17, 0.2);
}

.feature-card-featured::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%);
}

.feature-card-featured:hover {
  box-shadow: 0 36px 66px rgba(17, 17, 17, 0.26);
  border-color: rgba(255, 255, 255, 0.22);
}

.feature-card-secondary {
  min-height: 200px;
}

.feature-card:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 5px rgba(17, 17, 17, 0.1),
    0 30px 56px rgba(17, 17, 17, 0.24);
}

.feature-card-top,
.feature-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.feature-badge,
.feature-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.feature-arrow {
  font-size: 1.05rem;
  line-height: 1;
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}

.feature-card h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.1vw, 1.82rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

.feature-card-featured .feature-arrow,
.feature-card-featured p {
  color: rgba(255, 255, 255, 0.72);
}

.feature-card-featured h2 {
  margin-top: 4px;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
}

.landing-feature-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.landing-feature-stat {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.landing-feature-stat-label {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-feature-stat-value {
  display: block;
  margin-top: 10px;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.feature-card-light {
  border-color: rgba(16, 16, 16, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 244, 242, 0.9)),
    rgba(255, 255, 255, 0.92);
  color: var(--text-primary);
  box-shadow: var(--shadow-soft);
}

.feature-card-light::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 54%),
    linear-gradient(180deg, rgba(17, 17, 17, 0.03), transparent 80%);
}

.feature-card-light:hover {
  box-shadow: 0 22px 40px rgba(17, 17, 17, 0.1);
  border-color: rgba(16, 16, 16, 0.18);
}

.feature-card-light .feature-badge,
.feature-card-light .feature-meta span {
  border-color: rgba(16, 16, 16, 0.1);
  background: rgba(17, 17, 17, 0.045);
  color: rgba(16, 16, 16, 0.78);
}

.feature-card-light .feature-arrow,
.feature-card-light p {
  color: var(--text-secondary);
}

.feature-card:hover .feature-arrow {
  transform: translate(2px, -2px);
}

.feature-card-featured:hover .feature-arrow {
  color: rgba(255, 255, 255, 0.92);
}

.feature-card-light:hover .feature-arrow {
  color: rgba(16, 16, 16, 0.76);
}

.feature-meta {
  margin-top: auto;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.workout-category-kicker,
.workout-plan-label,
.workout-panel-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(16, 16, 16, 0.1);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.045);
  color: rgba(16, 16, 16, 0.72);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cooking-page-shell {
  align-items: center;
}

.cooking-card {
  width: min(100%, 1320px);
  padding-top: 20px;
}

.cooking-card > .detail-section {
  margin-top: 26px;
}

.cooking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(16, 16, 16, 0.08);
}

.cooking-logo-crop {
  margin-bottom: 0;
}

.cooking-logo {
  margin-bottom: -16px;
}

.cooking-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(290px, 0.94fr);
  gap: 16px;
  padding-top: 24px;
  align-items: stretch;
}

.cooking-hero-copy h1 {
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 4.7rem);
  line-height: 0.94;
  letter-spacing: -0.065em;
}

.cooking-hero-copy p {
  max-width: 34rem;
  margin: 14px 0 0;
  color: var(--text-secondary);
  line-height: 1.8;
}

.cooking-hero-panel,
.cooking-featured-section,
.cooking-filter-section,
.recipe-card {
  border: 1px solid rgba(16, 16, 16, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
}

.cooking-hero-panel {
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0.98), rgba(32, 32, 32, 0.94)),
    rgba(17, 17, 17, 0.96);
  color: #ffffff;
}

.cooking-panel-label,
.recipe-label {
  margin: 0;
  color: rgba(16, 16, 16, 0.64);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cooking-hero-panel .cooking-panel-label {
  color: rgba(255, 255, 255, 0.62);
}

.cooking-hero-panel h2 {
  margin: 12px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.cooking-panel-copy {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.75;
}

.cooking-featured-section,
.cooking-filter-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 246, 244, 0.88)),
    rgba(255, 255, 255, 0.9);
}

.cooking-featured-section {
  padding: 20px 22px 22px;
}

.cooking-filter-section {
  padding: 16px 18px 18px;
  border-color: rgba(16, 16, 16, 0.08);
  box-shadow: none;
}

.cooking-featured-card {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  gap: 16px;
  align-items: stretch;
}

.cooking-featured-section .section-heading {
  margin-bottom: 14px;
}

.cooking-featured-visual {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 292px;
  padding: 22px;
  border-radius: 24px;
  color: #ffffff;
  overflow: hidden;
}

.recipe-visual-featured {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 34%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.12), transparent 28%),
    linear-gradient(135deg, #171717, #444441);
}

.cooking-featured-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cooking-featured-visual-copy {
  max-width: 28rem;
}

.cooking-featured-overline {
  margin: 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cooking-featured-visual h3,
.cooking-featured-body h3 {
  margin: 12px 0 0;
  letter-spacing: -0.05em;
}

.cooking-featured-visual h3 {
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  line-height: 0.96;
}

.cooking-featured-visual p {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.72;
}

.cooking-featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4px 2px 4px 0;
}

.cooking-featured-body h3 {
  font-size: clamp(1.75rem, 3vw, 2.3rem);
  line-height: 0.98;
}

.cooking-featured-body > p:not(.recipe-label) {
  margin: 12px 0 0;
  color: var(--text-secondary);
  line-height: 1.68;
}

.cooking-featured-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cooking-featured-meta {
  margin-top: 16px;
}

.cooking-featured-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(16, 16, 16, 0.1);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.045);
  color: rgba(16, 16, 16, 0.74);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cooking-featured-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.cooking-featured-filter {
  font: inherit;
  cursor: pointer;
  appearance: none;
}

.cooking-filter-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.cooking-chip-heading {
  margin-bottom: 0;
}

.cooking-chip-heading p {
  margin-top: 8px;
}

.cooking-filter-summary {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  text-align: right;
  white-space: nowrap;
}

.cooking-filter-status-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.cooking-plan-summary {
  margin: 0;
  color: rgba(16, 16, 16, 0.72);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: right;
  white-space: nowrap;
}

.cooking-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.cooking-stat {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.cooking-stat-label {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cooking-stat-value {
  display: block;
  margin-top: 10px;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.workout-page-shell {
  align-items: center;
}

.workout-card {
  width: min(100%, 1320px);
  padding-top: 20px;
}

.workout-card > .detail-section {
  margin-top: 34px;
}

.workout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(16, 16, 16, 0.08);
}

.workout-logo-crop {
  margin-bottom: 0;
}

.workout-logo {
  margin-bottom: -16px;
}

.workout-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(290px, 0.96fr);
  gap: 18px;
  padding-top: 28px;
  align-items: stretch;
}

.workout-hero-copy h1 {
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 4.7rem);
  line-height: 0.94;
  letter-spacing: -0.065em;
}

.workout-hero-copy p {
  max-width: 35rem;
  margin: 14px 0 0;
  color: var(--text-secondary);
  line-height: 1.8;
}

.workout-hero-panel,
.workout-category-card,
.workout-plan-card {
  border: 1px solid rgba(16, 16, 16, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
}

.workout-hero-panel {
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0.98), rgba(32, 32, 32, 0.94)),
    rgba(17, 17, 17, 0.96);
  color: #ffffff;
}

.workout-hero-panel .workout-panel-label,
.workout-plan-card-dark .workout-plan-label,
.workout-plan-card-dark .workout-plan-chip {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.84);
}

.workout-hero-panel h2 {
  margin: 12px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.workout-panel-copy {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.75;
}

.workout-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.workout-stat {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.workout-stat-label {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workout-stat-value {
  display: block;
  margin-top: 10px;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.workout-category-section {
  padding: 22px 24px 24px;
  border: 1px solid rgba(16, 16, 16, 0.1);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 246, 244, 0.88)),
    rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.workout-category-grid,
.workout-plan-grid {
  display: grid;
  gap: 14px;
}

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

.workout-category-card {
  padding: 20px;
}

.workout-category-card h3 {
  margin: 12px 0 8px;
  font-size: 1.18rem;
  letter-spacing: -0.04em;
}

.workout-category-card p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

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

.workout-plan-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 264px;
  padding: 22px;
}

.workout-plan-card-dark {
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0.98), rgba(32, 32, 32, 0.94)),
    rgba(17, 17, 17, 0.96);
  color: #ffffff;
}

.workout-plan-top,
.workout-plan-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.workout-plan-chip,
.workout-plan-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(16, 16, 16, 0.1);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.045);
  color: rgba(16, 16, 16, 0.72);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.workout-plan-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: 18px;
}

.workout-plan-body h3 {
  margin: 14px 0 10px;
  font-size: 1.38rem;
  letter-spacing: -0.04em;
}

.workout-plan-body p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.72;
}

.workout-plan-card-dark .workout-plan-body p,
.workout-plan-card-dark .workout-plan-meta span {
  color: rgba(255, 255, 255, 0.76);
}

.workout-plan-card-dark .workout-plan-meta span {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.workout-plan-meta {
  margin-top: auto;
  padding-top: 18px;
}

.workout-builder-section {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
}

.workout-step-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.workout-step-heading .section-heading {
  margin: 0;
}

.workout-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #111111;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.workout-option-grid,
.workout-choice-grid {
  display: grid;
  gap: 14px;
}

.workout-path-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

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

.workout-select-card,
.workout-choice-card {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  font: inherit;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  box-shadow: none;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.workout-select-card {
  min-height: 126px;
  padding: 18px;
}

.workout-select-card:hover,
.workout-choice-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(80, 148, 255, 0.22);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.workout-select-card:focus-visible,
.workout-choice-card:focus-visible {
  outline: 3px solid rgba(80, 148, 255, 0.45);
  outline-offset: 4px;
}

.workout-select-card.is-selected,
.workout-choice-card-dark {
  background: rgba(55, 120, 255, 0.12);
  border-color: rgba(80, 148, 255, 0.35);
  color: #ffffff;
  box-shadow: 0 0 30px rgba(55, 120, 255, 0.15);
}

.workout-option-label {
  display: block;
  color: var(--text-primary);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.workout-option-copy {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.9rem;
  line-height: 1.55;
}

.workout-select-card.is-selected .workout-option-label {
  color: #ffffff;
}

.workout-select-card.is-selected .workout-option-copy,
.workout-choice-card-dark .workout-choice-body p,
.workout-choice-card-dark .workout-choice-meta span {
  color: rgba(255, 255, 255, 0.84);
}

.workout-choice-card {
  display: flex;
  flex-direction: column;
  min-height: 318px;
  padding: 26px;
  color: inherit;
  text-decoration: none;
}

.workout-choice-open {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.workout-choice-open:focus-visible {
  outline: 3px solid rgba(80, 148, 255, 0.45);
  outline-offset: 6px;
  border-radius: 16px;
}

.workout-dashboard-set-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 38px;
  margin-top: 24px;
  padding: 0 16px;
  border: 1px solid rgba(80, 148, 255, 0.3);
  border-radius: 999px;
  background: rgba(55, 120, 255, 0.1);
  color: rgba(140, 190, 255, 0.92);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.workout-dashboard-set-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(80, 148, 255, 0.5);
  background: rgba(55, 120, 255, 0.18);
  color: rgba(190, 220, 255, 0.96);
}

.workout-dashboard-set-btn:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
}

.workout-dashboard-set-btn.is-saved {
  border-color: rgba(100, 240, 160, 0.28);
  background: rgba(40, 200, 120, 0.12);
  color: rgba(140, 245, 185, 0.92);
}

.workout-choice-card[hidden] {
  display: none;
}

.workout-empty-state {
  padding: 30px;
  border: 1px dashed rgba(16, 16, 16, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(17, 17, 17, 0.035), transparent 34%),
    rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(15, 15, 15, 0.035);
}

.workout-empty-state[hidden] {
  display: none;
}

.workout-empty-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 0 12px;
  border: 1px solid rgba(16, 16, 16, 0.1);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.045);
  color: rgba(16, 16, 16, 0.68);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workout-empty-state h3 {
  margin: 16px 0 0;
  font-size: clamp(1.45rem, 2.2vw, 2.2rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.workout-empty-state p {
  max-width: 34rem;
  margin: 12px 0 0;
  color: var(--text-secondary);
  line-height: 1.65;
}

.workout-choice-top,
.workout-card-tag-row,
.workout-choice-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.workout-card-tag,
.workout-choice-time,
.workout-difficulty,
.workout-choice-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 0 12px;
  border: 1px solid rgba(16, 16, 16, 0.1);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.045);
  color: rgba(16, 16, 16, 0.72);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.workout-choice-card-dark .workout-card-tag,
.workout-choice-card-dark .workout-choice-time,
.workout-choice-card-dark .workout-difficulty,
.workout-choice-card-dark .workout-choice-meta span {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
}

.workout-choice-body {
  margin-top: 28px;
}

.workout-choice-body h3 {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.workout-choice-card-dark .workout-choice-body h3 {
  color: #ffffff;
}

.workout-choice-body p {
  margin: 14px 0 0;
  color: var(--text-secondary);
  line-height: 1.65;
}

.workout-card-tag-row {
  justify-content: flex-start;
  margin-top: 18px;
}

.workout-choice-meta {
  justify-content: flex-start;
  margin-top: 18px;
}

.workout-choice-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.workout-choice-action::after {
  content: "↗";
  font-size: 0.8rem;
}

.workout-choice-card-dark .workout-choice-action {
  color: #ffffff;
}

.workout-choice-card-dark .workout-choice-action::after {
  color: rgba(255, 255, 255, 0.9);
}

body.workout-detail-open {
  overflow: hidden;
}

.workout-detail-modal[hidden] {
  display: none;
}

.workout-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.workout-detail-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(12, 12, 12, 0.48);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.workout-detail-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 1040px);
  max-height: 88vh;
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(80, 148, 255, 0.18);
  border-radius: 30px;
  background: rgba(6, 12, 28, 0.97);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}

.workout-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.workout-detail-actions {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.workout-dashboard-set-btn-modal {
  min-height: 46px;
  margin-top: 0;
  padding: 0 18px;
}

.workout-detail-intro {
  max-width: 690px;
}

.workout-detail-kicker {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.workout-detail-header h2 {
  margin: 0;
  font-size: clamp(2.7rem, 5vw, 5rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
}

.workout-detail-header p:not(.workout-detail-kicker) {
  margin: 16px 0 0;
  color: var(--text-secondary);
  line-height: 1.75;
}

.workout-detail-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.workout-detail-close:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: none;
}

.workout-detail-tags,
.workout-rest-grid,
.workout-detail-meta-grid {
  display: grid;
  gap: 10px;
}

.workout-detail-tags {
  grid-template-columns: repeat(3, max-content);
  margin-top: 22px;
}

.workout-detail-tags span,
.workout-detail-meta-card span,
.workout-rest-grid span {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 31px;
  padding: 0 12px;
  border: 1px solid rgba(80, 148, 255, 0.18);
  border-radius: 999px;
  background: rgba(55, 120, 255, 0.08);
  color: rgba(120, 172, 255, 0.85);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workout-detail-meta-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 18px;
}

.workout-detail-meta-card,
.workout-detail-section,
.workout-exercise-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.workout-detail-meta-card {
  padding: 16px;
}

.workout-detail-meta-card strong {
  display: block;
  margin-top: 12px;
  font-size: 0.98rem;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.workout-detail-section {
  margin-top: 16px;
  padding: 20px;
}

.workout-detail-section h3,
.workout-exercise-heading h3 {
  margin: 0;
  letter-spacing: -0.045em;
}

.workout-detail-coach-note {
  background: rgba(55, 120, 255, 0.08);
  border: 1px solid rgba(80, 148, 255, 0.18);
  color: rgba(255, 255, 255, 0.88);
}

.workout-detail-coach-note p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.65;
}

.workout-detail-list {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--text-secondary);
  line-height: 1.75;
}

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

.workout-exercise-card {
  padding: 20px;
}

.workout-exercise-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.workout-exercise-heading span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(55, 120, 255, 0.15);
  border: 1px solid rgba(80, 148, 255, 0.25);
  color: rgba(120, 172, 255, 0.9);
  font-size: 0.72rem;
  font-weight: 900;
}

.workout-exercise-heading h3 {
  padding-top: 3px;
  font-size: 1.22rem;
}

.workout-exercise-notes {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.workout-exercise-notes p {
  margin: 0 0 8px;
  color: rgba(100, 172, 255, 0.65);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workout-exercise-notes ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.workout-superset-label {
  margin: 14px 0 0;
  color: rgba(100, 172, 255, 0.65);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workout-rest-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

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

.workout-rest-grid div {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.workout-rest-grid strong {
  display: block;
  margin-top: 12px;
  font-size: 1.35rem;
  letter-spacing: -0.045em;
}

.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.filter-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(16, 16, 16, 0.12);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 246, 244, 0.84)),
    rgba(255, 255, 255, 0.84);
  color: rgba(16, 16, 16, 0.76);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(15, 15, 15, 0.04);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.filter-chip::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent 52%);
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.filter-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 16, 16, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(242, 242, 240, 0.92)),
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 22px rgba(15, 15, 15, 0.07);
}

.filter-chip:hover::after,
.filter-chip:focus-visible::after,
.filter-chip-active::after {
  opacity: 1;
}

.filter-chip:focus-visible {
  outline: none;
  border-color: rgba(16, 16, 16, 0.26);
  box-shadow:
    0 0 0 5px rgba(17, 17, 17, 0.08),
    0 14px 22px rgba(15, 15, 15, 0.07);
}

.filter-chip-active {
  border-color: rgba(16, 16, 16, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 45%),
    var(--button-bg);
  color: #ffffff;
  box-shadow: var(--button-shadow);
}

.filter-chip-active:hover {
  border-color: rgba(16, 16, 16, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 45%),
    #0d0d0d;
}

.recipe-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 332px;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease,
    border-color 0.24s ease,
    background-color 0.24s ease;
}

.recipe-card[hidden] {
  display: none !important;
}

.recipe-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 16, 16, 0.18);
  box-shadow: 0 28px 46px rgba(15, 15, 15, 0.12);
}

.recipe-card:hover .recipe-card-visual {
  transform: scale(1.018);
}

.recipe-card:focus-within {
  border-color: rgba(16, 16, 16, 0.18);
  box-shadow:
    0 0 0 5px rgba(17, 17, 17, 0.06),
    0 24px 42px rgba(15, 15, 15, 0.11);
}

.recipe-card:focus-visible {
  outline: none;
  border-color: rgba(16, 16, 16, 0.22);
  box-shadow:
    0 0 0 5px rgba(17, 17, 17, 0.08),
    0 28px 46px rgba(15, 15, 15, 0.12);
}

.recipe-card-visual {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 156px;
  padding: 18px 18px 16px;
  overflow: hidden;
  transition: transform 0.24s ease;
}

.recipe-card-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent 46%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.08), transparent 42%);
  pointer-events: none;
}

.recipe-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.recipe-visual-one {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 36%),
    linear-gradient(135deg, #1f1f1f, #464646);
}

.recipe-visual-two {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.3), transparent 34%),
    linear-gradient(135deg, #deded8, #bcbcb5);
}

.recipe-visual-three {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(135deg, #52524d, #21211f);
}

.recipe-visual-four {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.26), transparent 34%),
    linear-gradient(135deg, #cfcfca, #8c8c87);
}

.recipe-visual-five {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(135deg, #2d2d29, #61615c);
}

.recipe-visual-six {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.28), transparent 34%),
    linear-gradient(135deg, #dfdfda, #a4a49f);
}

.recipe-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recipe-visual-two .recipe-chip,
.recipe-visual-four .recipe-chip {
  border-color: rgba(16, 16, 16, 0.12);
  background: rgba(255, 255, 255, 0.52);
  color: rgba(16, 16, 16, 0.76);
}

.recipe-card-visual .recipe-chip {
  position: relative;
  z-index: 2;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(17, 17, 17, 0.52);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.recipe-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.recipe-card-body h3 {
  margin: 10px 0;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.recipe-card-body p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.72;
}

.recipe-card-body > p:not(.recipe-label) {
  flex: 1;
}

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 2px;
}

.recipe-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(16, 16, 16, 0.1);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.04);
  color: rgba(16, 16, 16, 0.74);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.recipe-card-actions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(16, 16, 16, 0.08);
}

.recipe-plan-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(16, 16, 16, 0.14);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 246, 244, 0.84)),
    rgba(255, 255, 255, 0.9);
  color: rgba(16, 16, 16, 0.78);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.recipe-plan-button:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 16, 16, 0.24);
  box-shadow: 0 12px 24px rgba(15, 15, 15, 0.08);
}

.recipe-plan-button:focus-visible {
  outline: none;
  border-color: rgba(16, 16, 16, 0.28);
  box-shadow:
    0 0 0 5px rgba(17, 17, 17, 0.08),
    0 12px 24px rgba(15, 15, 15, 0.08);
}

.recipe-plan-button-added {
  border-color: rgba(16, 16, 16, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 45%),
    var(--button-bg);
  color: #ffffff;
  box-shadow: var(--button-shadow);
}

.recipe-plan-button-added:hover {
  border-color: rgba(16, 16, 16, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 45%),
    #0d0d0d;
}

body.recipe-detail-open {
  overflow: hidden;
}

.recipe-detail-modal[hidden] {
  display: none;
}

.recipe-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 28px;
}

.recipe-detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 30%),
    rgba(12, 12, 12, 0.62);
  box-shadow: none;
  cursor: zoom-out;
  backdrop-filter: blur(18px);
}

.recipe-detail-backdrop:hover,
.recipe-detail-backdrop:active,
.recipe-detail-backdrop:focus-visible {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 30%),
    rgba(12, 12, 12, 0.62);
  transform: none;
  box-shadow: none;
  outline: none;
}

.recipe-detail-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 920px);
  max-height: min(86vh, 820px);
  overflow: auto;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(17, 17, 17, 0.07), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 246, 244, 0.92));
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.26);
}

.recipe-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(16, 16, 16, 0.08);
}

.recipe-detail-intro {
  min-width: 0;
}

.recipe-detail-kicker {
  margin: 0 0 12px;
  color: rgba(16, 16, 16, 0.58);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.recipe-detail-header h2 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 0.94;
  letter-spacing: -0.065em;
}

.recipe-detail-header p:not(.recipe-detail-kicker) {
  max-width: 38rem;
  margin: 14px 0 0;
  color: var(--text-secondary);
  line-height: 1.72;
}

.recipe-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

.recipe-detail-add-button,
.recipe-detail-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 42px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid rgba(16, 16, 16, 0.14);
  border-radius: 999px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.recipe-detail-add-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 45%),
    var(--button-bg);
  color: #ffffff;
  box-shadow: var(--button-shadow);
}

.recipe-detail-close {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 246, 244, 0.84)),
    rgba(255, 255, 255, 0.9);
  color: rgba(16, 16, 16, 0.74);
  box-shadow: none;
}

.recipe-detail-add-button:hover,
.recipe-detail-close:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 16, 16, 0.22);
  box-shadow: 0 14px 26px rgba(15, 15, 15, 0.1);
}

.recipe-detail-add-button:focus-visible,
.recipe-detail-close:focus-visible {
  outline: none;
  border-color: rgba(16, 16, 16, 0.3);
  box-shadow:
    0 0 0 5px rgba(17, 17, 17, 0.08),
    0 14px 26px rgba(15, 15, 15, 0.1);
}

.recipe-detail-add-button.recipe-plan-button-added {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 45%),
    #0d0d0d;
}

.recipe-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.recipe-detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(16, 16, 16, 0.1);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.045);
  color: rgba(16, 16, 16, 0.72);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.recipe-detail-visual {
  height: clamp(220px, 38vw, 360px);
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(16, 16, 16, 0.1);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.24), transparent 34%),
    rgba(17, 17, 17, 0.06);
  box-shadow: var(--shadow-soft);
}

.recipe-detail-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.recipe-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  margin-top: 18px;
}

.recipe-detail-section {
  padding: 20px;
  border: 1px solid rgba(16, 16, 16, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-soft);
}

.recipe-detail-section h3 {
  margin: 0 0 14px;
  font-size: 1.16rem;
  letter-spacing: -0.04em;
}

.recipe-detail-section ul,
.recipe-detail-section ol {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  line-height: 1.72;
}

.recipe-detail-section li + li {
  margin-top: 8px;
}

.recipe-detail-protein-time {
  margin-top: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 246, 244, 0.76)),
    rgba(255, 255, 255, 0.82);
}

.recipe-detail-protein-time p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.68;
}

.hero-copy {
  margin-bottom: 42px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(16, 16, 16, 0.08);
}

.hero-copy-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.header-logo-crop {
  width: 430px;
  max-width: 100%;
  overflow: hidden;
  margin: -11px 0 7px;
}

.hero-back-link {
  min-height: 46px;
  padding: 0 18px;
  flex-shrink: 0;
}

.header-logo {
  display: block;
  width: 470px;
  max-width: none;
  height: auto;
  margin: -30px 0 -20px -86px;
}

.brand-refresh-link {
  display: block;
  width: max-content;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 180ms ease, transform 180ms ease;
}

.brand-refresh-link:hover {
  opacity: 0.88;
  transform: scale(1.006);
}

.brand-refresh-link:focus-visible {
  outline: 2px solid rgba(16, 16, 16, 0.18);
  outline-offset: 4px;
  border-radius: 18px;
}

.hero-copy p {
  max-width: 36rem;
  margin: 16px 0 0;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.hero-copy .meal-prep-hero-title {
  max-width: 42rem;
  margin-top: 18px;
  color: var(--text-primary);
  font-size: clamp(2.5rem, 5vw, 4.35rem);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.068em;
}

.flow-note {
  display: inline-block;
  margin-top: 10px;
  color: rgba(16, 16, 16, 0.56);
  font-size: 0.84rem;
  line-height: 1.5;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.field-hint {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.field-password-wrap {
  position: relative;
}

.field-password-wrap input {
  padding-right: 52px;
}

.field-password-toggle {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  min-height: unset;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0 calc(var(--radius-control) - 2px) calc(var(--radius-control) - 2px) 0;
  color: var(--text-secondary);
  font-size: 0;
  font-weight: normal;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.field-password-toggle:hover {
  background: transparent;
  color: var(--text-primary);
  transform: none;
  box-shadow: none;
}

.field-password-toggle:active {
  transform: none;
}

.field-password-toggle:focus-visible {
  outline: 2px solid rgba(17, 17, 17, 0.35);
  outline-offset: -2px;
  box-shadow: none;
}

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

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(16, 16, 16, 0.12);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.045);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
}

.tag-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(16, 16, 16, 0.56);
  font-size: 1rem;
  line-height: 1;
  box-shadow: none;
}

.tag-chip-remove:hover {
  color: rgba(16, 16, 16, 0.86);
  transform: none;
  box-shadow: none;
}

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

label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(16, 16, 16, 0.9);
}

input,
select,
button {
  width: 100%;
  border-radius: var(--radius-control);
  font: inherit;
}

input,
select {
  min-height: 56px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-primary);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
  appearance: none;
}

input::placeholder {
  color: var(--text-muted);
}

input:hover,
select:hover {
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

input:focus,
select:focus {
  border-color: var(--border-focus);
  box-shadow:
    0 0 0 5px rgba(17, 17, 17, 0.08),
    var(--shadow-soft);
  background: var(--surface-strong);
  transform: translateY(-1px);
}

select {
  padding-right: 46px;
  background-image:
    linear-gradient(45deg, transparent 50%, #111111 50%),
    linear-gradient(135deg, #111111 50%, transparent 50%);
  background-position:
    calc(100% - 24px) calc(50% - 2px),
    calc(100% - 18px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.form-grid > .field.field-full > label:not([for]) {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 10px;
  margin-bottom: 4px;
  padding: 10px 14px;
  border: 1px solid rgba(16, 16, 16, 0.12);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.045);
  color: rgba(16, 16, 16, 0.72);
}

.checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    background-color 0.2s ease;
}

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

.checkbox-card input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 13px;
  height: 13px;
  margin: 4px 0 0;
  border: 1px solid rgba(16, 16, 16, 0.18);
  border-radius: 999px;
  background: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 1px 2px rgba(17, 17, 17, 0.025);
  flex-shrink: 0;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.checkbox-card input[type="checkbox"]::after {
  content: "";
  position: absolute;
  inset: 2.25px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.86);
  transform: scale(0.55);
  opacity: 0;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.checkbox-card input[type="checkbox"]:checked {
  border-color: rgba(17, 17, 17, 0.26);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.78), transparent 48%),
    rgba(17, 17, 17, 0.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 3px 8px rgba(17, 17, 17, 0.035);
}

.checkbox-card input[type="checkbox"]:checked::after {
  opacity: 1;
  transform: scale(1);
}

.checkbox-card input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(17, 17, 17, 0.055),
    0 3px 8px rgba(17, 17, 17, 0.035);
}

.checkbox-card:has(input[type="checkbox"]:checked) {
  border-color: rgba(17, 17, 17, 0.16);
  background: rgba(17, 17, 17, 0.025);
}

.checkbox-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.checkbox-title {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--text-primary);
}

.checkbox-subtext {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.checkbox-card:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 5px rgba(17, 17, 17, 0.08), var(--shadow-soft);
}

button {
  margin-top: 10px;
  min-height: 58px;
  padding: 16px 22px;
  border: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 45%),
    var(--button-bg);
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: var(--button-shadow);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

button:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), transparent 45%),
    var(--button-hover);
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(17, 17, 17, 0.24);
}

button:active {
  transform: translateY(1px);
}

button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 5px rgba(17, 17, 17, 0.1),
    0 22px 42px rgba(17, 17, 17, 0.24);
}

.selected-meals-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.selected-meals-browse-link,
.selected-meals-clear-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 34px;
  margin-top: 0;
  padding: 0 12px;
  border: 1px solid rgba(16, 16, 16, 0.12);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.045);
  color: rgba(16, 16, 16, 0.76);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.selected-meals-clear-button[hidden] {
  display: none;
}

.selected-meals-browse-link:hover,
.selected-meals-clear-button:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 16, 16, 0.2);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.selected-meals-list {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.selected-meal-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.selected-meal-content {
  flex: 1;
  min-width: 0;
}

.selected-meal-label {
  margin: 0 0 8px;
  color: rgba(120, 172, 255, 0.65);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.selected-meal-card h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.selected-meal-description {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
}

.selected-meal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.selected-meal-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.selected-meal-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.selected-meal-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.selected-meal-control-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.selected-meal-day-pills,
.selected-meal-times-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.selected-meal-day-pill,
.selected-meal-times-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 34px;
  margin-top: 0;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: none;
}

.selected-meal-day-pill:hover,
.selected-meal-times-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

.selected-meal-day-pill:focus-visible,
.selected-meal-times-button:focus-visible {
  box-shadow: 0 0 0 3px rgba(80, 148, 255, 0.3);
}

.selected-meal-day-pill-active,
.selected-meal-times-button-active {
  background: rgba(55, 120, 255, 0.18);
  border-color: rgba(80, 148, 255, 0.4);
  color: #fff;
  box-shadow: none;
}

.selected-meal-day-pill-active:hover,
.selected-meal-times-button-active:hover {
  background: rgba(55, 120, 255, 0.28);
  border-color: rgba(80, 148, 255, 0.55);
  color: #fff;
}

.selected-meal-remove {
  grid-column: auto;
  width: auto;
  min-height: 36px;
  margin-top: 0;
  padding: 0 12px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: none;
}

.selected-meal-remove:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: none;
}

.selected-meal-remove:focus-visible {
  box-shadow: 0 0 0 3px rgba(80, 148, 255, 0.3);
}

.selected-meals-empty {
  margin: 6px 0 0;
  padding: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ── Per-day L / D slot selectors ────────────────────────── */

.day-slot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.day-slot-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.day-slot-label {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.day-slot-btns {
  display: flex;
  gap: 3px;
}

.day-slot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.68rem;
  font-weight: 900;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.day-slot-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.88);
}

.day-slot-btn-active {
  background: rgba(55, 120, 255, 0.22);
  border-color: rgba(80, 148, 255, 0.45);
  color: #fff;
}

.day-slot-btn-active:hover {
  background: rgba(55, 120, 255, 0.32);
  border-color: rgba(80, 148, 255, 0.6);
}

.loading-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid rgba(16, 16, 16, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.loading-panel p {
  margin: 0;
  font-weight: 600;
  color: var(--text-primary);
}

.loading-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.loading-copy span {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(16, 16, 16, 0.14);
  border-top-color: rgba(16, 16, 16, 0.9);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-panel-error {
  border-color: rgba(16, 16, 16, 0.16);
  background: rgba(17, 17, 17, 0.03);
}

.results-page-shell {
  align-items: center;
}

.results-card {
  width: min(100%, 1320px);
  padding-top: 16px;
}

.results-hero {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(16, 16, 16, 0.08);
}

.results-hero-top {
  margin-bottom: 6px;
}

.results-logo-crop {
  margin-bottom: 2px;
}

.results-logo {
  margin-bottom: -16px;
}

.results-hero-copy {
  max-width: 38rem;
}

.results-hero h1 {
  margin: 0;
  font-size: clamp(2.35rem, 4vw, 3.85rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.results-hero p {
  max-width: 34rem;
  margin: 12px 0 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.macro-summary,
.day-plan,
.detail-section {
  margin-top: 32px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.section-heading p {
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.72;
}

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

.macro-card,
.day-card,
.detail-card,
.empty-state-card {
  border: 1px solid rgba(16, 16, 16, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
}

.macro-card {
  padding: 20px 18px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.78)),
    rgba(255, 255, 255, 0.84);
}

.meal-title {
  margin: 2px 0 8px;
  font-size: 0.96rem;
  font-weight: 600;
  color: rgba(16, 16, 16, 0.88);
}

.macro-label,
.detail-label,
.meal-section-label {
  margin: 0 0 10px;
  color: rgba(16, 16, 16, 0.64);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.macro-value {
  margin: 0;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

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

.day-card {
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78)),
    rgba(255, 255, 255, 0.84);
}

.day-title {
  margin: 0 0 16px;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.meal-section + .meal-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(16, 16, 16, 0.08);
}

.meal-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

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

.meal-section-loading .meal-list {
  opacity: 0.5;
}

.meal-regenerate-error {
  margin: 8px 0 0;
  color: rgba(16, 16, 16, 0.62);
  font-size: 0.82rem;
  line-height: 1.4;
}

.meal-regenerate-button,
.meal-manual-button {
  width: auto;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(16, 16, 16, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: rgba(16, 16, 16, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
}

.meal-manual-button {
  padding: 0 12px;
}

.meal-regenerate-button:disabled,
.meal-manual-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.meal-regenerate-button:hover,
.meal-manual-button:hover {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(16, 16, 16, 0.2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.meal-regenerate-button:focus-visible,
.meal-manual-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.08);
}

.meal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meal-source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border: 1px solid rgba(16, 16, 16, 0.1);
  border-radius: 999px;
  background: rgba(16, 16, 16, 0.05);
  color: rgba(16, 16, 16, 0.58);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meal-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.7;
  color: rgba(16, 16, 16, 0.88);
}

.meal-list li + li {
  margin-top: 6px;
}

.meal-macro-line,
.day-total-line {
  margin: 10px 0 0;
  color: rgba(16, 16, 16, 0.58);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.day-total-line {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(16, 16, 16, 0.1);
  color: rgba(16, 16, 16, 0.76);
}

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

.detail-card {
  padding: 20px 22px;
}

.grocery-list {
  margin: 0;
}

.grocery-list .grocery-list-summary,
.grocery-list .grocery-list-section {
  list-style: none;
  margin-left: -18px;
}

.grocery-list .grocery-list-summary {
  color: rgba(16, 16, 16, 0.68);
  font-size: 0.88rem;
  font-weight: 700;
}

.grocery-list .grocery-list-section {
  margin-top: 18px;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.manual-meal-modal[hidden] {
  display: none;
}

body.manual-meal-modal-open {
  overflow: hidden;
}

.manual-meal-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.manual-meal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 18, 0.72);
  backdrop-filter: blur(12px);
}

.manual-meal-dialog {
  position: relative;
  z-index: 1;
  width: min(620px, calc(100vw - 32px));
  max-height: min(86vh, 760px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(20, 25, 37, 0.98), rgba(10, 14, 24, 0.98)),
    rgba(12, 16, 26, 0.98);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
  padding: 24px;
}

.manual-meal-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.manual-meal-dialog-header h2 {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.45rem;
  letter-spacing: 0;
}

.manual-meal-close {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.76);
  box-shadow: none;
}

.manual-meal-form {
  display: grid;
  gap: 16px;
}

.manual-meal-macro-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.manual-meal-form textarea {
  resize: vertical;
  min-height: 130px;
}

.manual-meal-error {
  margin: 0;
}

.manual-meal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.manual-meal-actions .secondary-link,
.manual-meal-actions .primary-link {
  width: auto;
}

.detail-value {
  margin: 0;
  color: var(--text-primary);
  line-height: 1.7;
  white-space: pre-wrap;
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(16, 16, 16, 0.08);
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 22px;
  border: 1px solid rgba(16, 16, 16, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.secondary-link:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 16, 16, 0.22);
  box-shadow: var(--shadow-soft);
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 45%),
    var(--button-bg);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: var(--button-shadow);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.primary-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(17, 17, 17, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), transparent 45%),
    var(--button-hover);
}

.empty-state-card {
  padding: 24px;
}

.empty-state-card h2 {
  margin: 0 0 10px;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.empty-state-card p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.results-panel {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid rgba(16, 16, 16, 0.08);
}

.results-header {
  margin-bottom: 22px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(16, 16, 16, 0.12);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.04);
  color: rgba(16, 16, 16, 0.72);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.results-header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.results-header p {
  max-width: 40rem;
  margin: 12px 0 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.results-body {
  display: grid;
  gap: 14px;
}

.result-card {
  padding: 20px 22px;
  border: 1px solid rgba(16, 16, 16, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.result-label {
  margin: 0 0 10px;
  color: rgba(16, 16, 16, 0.68);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-value,
.result-list {
  margin: 0;
  color: var(--text-primary);
}

.result-value {
  line-height: 1.75;
  white-space: pre-wrap;
}

.result-list {
  padding-left: 18px;
  line-height: 1.8;
}

.result-list li + li {
  margin-top: 6px;
}

.results-empty {
  padding: 18px 20px;
  border: 1px dashed rgba(16, 16, 16, 0.16);
  border-radius: 20px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.6);
}

.results-error {
  border-color: rgba(17, 17, 17, 0.18);
  background: rgba(17, 17, 17, 0.03);
}

@media (max-width: 960px) {
  .landing-hero {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .landing-copy h1 {
    max-width: 10ch;
  }

  .landing-support-grid {
    grid-template-columns: 1fr;
  }

  .feature-card-featured,
  .feature-card-secondary,
  .feature-card-tertiary {
    min-height: auto;
  }

  .cooking-hero {
    grid-template-columns: 1fr;
  }

  .cooking-featured-card {
    grid-template-columns: 1fr;
  }

  .cooking-filter-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .cooking-filter-summary {
    white-space: normal;
    text-align: left;
  }

  .cooking-filter-status-group {
    align-items: flex-start;
  }

  .cooking-plan-summary {
    text-align: left;
    white-space: normal;
  }

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

  .recipe-detail-grid {
    grid-template-columns: 1fr;
  }

  .workout-hero {
    grid-template-columns: 1fr;
  }

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

  .workout-path-grid,
  .workout-sport-grid,
  .workout-focus-grid,
  .workout-split-grid,
  .workout-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .workout-exercise-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 860px) {
  .site-nav-inner {
    position: relative;
    min-height: 88px;
    padding: 0 0 18px;
  }

  .site-nav-logo {
    width: min(44vw, 170px);
  }

  .site-nav-links {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(17, 17, 17, 0.08);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
  }

  .site-nav[data-open="true"] .site-nav-links {
    display: flex;
  }

  .site-nav-links a,
  .site-nav-dropdown-toggle {
    justify-content: flex-start;
    min-height: 44px;
    padding: 0 14px;
  }

  .site-nav-item,
  .site-nav-dropdown {
    width: 100%;
  }

  .site-nav-dropdown {
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .site-nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .site-nav-dropdown-menu {
    position: static;
    display: none;
    min-width: 0;
    margin-top: 6px;
    padding: 6px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .site-nav-dropdown[data-open="true"] .site-nav-dropdown-menu {
    display: grid;
  }

  .site-nav-toggle {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .landing-shell {
    padding: 0 14px 16px;
  }

  .page-shell {
    padding: 0 14px 16px;
  }

  .landing-card {
    padding: 0;
  }

  .card {
    padding: 12px 16px 18px;
    border-radius: 24px;
  }

  .landing-copy {
    min-height: auto;
    padding: 0;
  }

  .landing-copy h1 {
    max-width: none;
    margin-top: 8px;
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .cooking-header,
  .workout-header {
    flex-direction: column;
    align-items: stretch;
  }

  .feature-card,
  .recipe-card-body,
  .cooking-hero-panel,
  .cooking-featured-section,
  .cooking-filter-section,
  .workout-hero-panel,
  .workout-category-section,
  .workout-plan-card {
    padding: 18px;
  }

  .feature-card-top,
  .feature-meta {
    flex-wrap: wrap;
  }

  .landing-feature-stat-grid,
  .landing-support-grid,
  .workout-category-grid,
  .workout-plan-grid,
  .workout-path-grid,
  .workout-sport-grid,
  .workout-focus-grid,
  .workout-split-grid,
  .workout-choice-grid,
  .recipe-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .workout-step-heading {
    flex-direction: column;
  }

  .workout-detail-modal {
    padding: 12px;
  }

  .workout-detail-panel {
    max-height: 90vh;
    padding: 18px;
    border-radius: 24px;
  }

  .workout-detail-header {
    flex-direction: column;
  }

  .workout-detail-actions,
  .workout-dashboard-set-btn-modal {
    width: 100%;
  }

  .workout-detail-close {
    width: 100%;
  }

  .workout-detail-tags,
  .workout-detail-meta-grid,
  .workout-rest-grid {
    grid-template-columns: 1fr;
  }

  .workout-detail-tags span {
    width: 100%;
    justify-content: center;
  }

  .cooking-filter-header {
    gap: 8px;
  }

  .selected-meals-heading,
  .selected-meal-card {
    align-items: stretch;
    flex-direction: column;
  }

  .selected-meals-actions {
    justify-content: stretch;
  }

  .selected-meal-controls {
    grid-template-columns: 1fr;
  }

  .selected-meals-browse-link,
  .selected-meals-clear-button,
  .selected-meal-remove {
    justify-content: center;
    width: 100%;
  }

  .cooking-featured-visual {
    min-height: 260px;
    padding: 20px;
  }

  .cooking-featured-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .recipe-card-body {
    padding: 18px;
  }

  .recipe-detail-modal {
    padding: 12px;
  }

  .recipe-detail-panel {
    max-height: 90vh;
    padding: 18px;
    border-radius: 24px;
  }

  .recipe-detail-header {
    flex-direction: column;
    gap: 16px;
  }

  .recipe-detail-header h2 {
    max-width: none;
    font-size: clamp(2rem, 10vw, 3.15rem);
  }

  .recipe-detail-actions,
  .recipe-detail-add-button,
  .recipe-detail-close {
    width: 100%;
  }

  .recipe-detail-section {
    padding: 18px;
  }

  .cooking-card,
  .workout-card {
    padding-top: 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-copy {
    margin-bottom: 28px;
    padding-bottom: 22px;
  }

  .hero-copy-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .header-logo-crop {
    width: 340px;
    margin: -9px 0 6px;
  }

  .header-logo {
    width: 380px;
    margin: -22px 0 -14px -68px;
  }

  .hero-copy p {
    font-size: 0.96rem;
    line-height: 1.65;
  }

  .hero-copy .meal-prep-hero-title {
    font-size: clamp(2.1rem, 10vw, 3.15rem);
    line-height: 0.96;
  }

  .checkbox-card {
    padding: 16px;
  }

  .loading-panel {
    margin-top: 18px;
    padding: 14px 16px;
  }

  .results-card {
    padding-top: 14px;
  }

  .results-hero {
    margin-bottom: 22px;
    padding-bottom: 18px;
  }

  .macro-grid,
  .day-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .day-card,
  .detail-card,
  .empty-state-card,
  .macro-card {
    padding: 18px;
    border-radius: 20px;
  }

  .results-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 22px;
    padding-top: 18px;
  }

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

  .meal-section-actions,
  .meal-regenerate-button,
  .meal-manual-button {
    width: 100%;
  }

  .meal-section-actions {
    align-items: stretch;
  }

  .manual-meal-modal {
    padding: 12px;
  }

  .manual-meal-dialog {
    width: 100%;
    max-height: 90vh;
    padding: 18px;
    border-radius: 20px;
  }

  .manual-meal-dialog-header {
    align-items: stretch;
  }

  .manual-meal-macro-grid {
    grid-template-columns: 1fr 1fr;
  }

  .results-panel {
    margin-top: 28px;
    padding-top: 24px;
  }

  .result-card {
    padding: 18px;
    border-radius: 20px;
  }
}

/* ============================================================
   HOMEPAGE: CTA Buttons
   ============================================================ */

.landing-cta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.landing-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 24px;
  border: none;
  border-radius: 999px;
  background: var(--button-bg);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: var(--button-shadow);
  transition:
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.landing-btn-primary:hover {
  background: var(--button-hover);
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(17, 17, 17, 0.22);
}

.landing-btn-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid rgba(16, 16, 16, 0.14);
  border-radius: 999px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.landing-btn-ghost:hover {
  color: var(--text-primary);
  border-color: rgba(16, 16, 16, 0.28);
  background: rgba(17, 17, 17, 0.04);
}

/* ============================================================
   HOMEPAGE: Hero Card (expanded)
   ============================================================ */

.landing-hero-card {
  min-height: 420px;
}

.landing-hero-card h2 {
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  line-height: 0.96;
}

.landing-hero-stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
}

/* ============================================================
   HOMEPAGE: Impact Strip
   ============================================================ */

.home-impact-strip {
  display: flex;
  align-items: center;
  margin-top: 20px;
  padding: 18px 28px;
  border: 1px solid rgba(16, 16, 16, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.55);
}

.home-impact-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  padding: 0 28px;
}

.home-impact-item:first-child {
  padding-left: 0;
}

.home-impact-label {
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-impact-value {
  font-size: 0.91rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.home-impact-divider {
  width: 1px;
  height: 34px;
  background: rgba(16, 16, 16, 0.1);
  flex-shrink: 0;
}

/* ============================================================
   HOMEPAGE: Process Section
   ============================================================ */

.home-process {
  margin-top: 44px;
  padding-top: 38px;
  border-top: 1px solid rgba(16, 16, 16, 0.07);
}

.home-process-header {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 28px;
}

.home-process-header h2 {
  margin: 6px 0 0;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.065em;
}

.home-process-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.home-process-step {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px 24px;
  border: 1px solid rgba(16, 16, 16, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.5);
}

.home-step-num {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  color: rgba(16, 16, 16, 0.09);
  line-height: 1;
}

.home-step-body h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.home-step-body p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.72;
  color: var(--text-secondary);
}

/* ============================================================
   HOMEPAGE: Bottom CTA Band
   ============================================================ */

.home-cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 80px;
  padding: 36px 40px;
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(22, 22, 22, 0.98), rgba(10, 10, 10, 0.97));
  color: #ffffff;
  flex-wrap: wrap;
}

.home-cta-band-copy h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.3vw, 2rem);
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.home-cta-band-copy p {
  margin: 7px 0 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
}

.home-cta-band-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.home-cta-band-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.34);
  transform: translateY(-2px);
}

/* ============================================================
   HOMEPAGE: Responsive overrides
   ============================================================ */

@media (max-width: 960px) {
  .home-process-steps {
    grid-template-columns: 1fr;
  }

  .home-impact-strip {
    flex-wrap: wrap;
    gap: 16px;
    padding: 18px 20px;
  }

  .home-impact-divider {
    display: none;
  }

  .home-impact-item {
    flex: 1 1 calc(50% - 8px);
    padding: 0;
  }

  .landing-hero-card {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .landing-cta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .landing-btn-primary,
  .landing-btn-ghost {
    width: 100%;
    justify-content: center;
  }

  .home-cta-band {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 26px 22px;
  }

  .home-cta-band-btn {
    width: 100%;
    justify-content: center;
  }

  .home-impact-item {
    flex: 1 1 100%;
  }
}

/* ============================================================
   HOMEPAGE v2 — Premium Visual System
   Scoped to .is-home-page where they'd affect other pages.
   ============================================================ */

/* ── Entry keyframes ─────────────────────────────────────── */

@keyframes home-fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes home-logo-slide {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes home-nav-drop {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes orb-drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-52px, 38px) scale(1.07); }
  66%       { transform: translate(28px, -28px) scale(0.94); }
}

@keyframes orb-drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(38px, -46px) scale(1.05); }
}

/* ── Hero page-load animations ───────────────────────────── */

.home-hero-in {
  animation: home-fade-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.home-in-d1 { animation-delay: 0.06s; }
.home-in-d2 { animation-delay: 0.16s; }
.home-in-d3 { animation-delay: 0.28s; }
.home-in-d4 { animation-delay: 0.42s; }
.home-in-d5 { animation-delay: 0.56s; }

/* ── Logo + nav reveal (homepage only) ───────────────────── */

.is-home-page .site-nav-brand {
  animation: home-logo-slide 1s cubic-bezier(0.16, 1, 0.3, 1) 0.04s both;
}

.is-home-page .site-nav-links > * {
  animation: home-nav-drop 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.is-home-page .site-nav-links > :nth-child(1) { animation-delay: 0.10s; }
.is-home-page .site-nav-links > :nth-child(2) { animation-delay: 0.17s; }
.is-home-page .site-nav-links > :nth-child(3) { animation-delay: 0.24s; }
.is-home-page .site-nav-links > :nth-child(4) { animation-delay: 0.31s; }
.is-home-page .site-nav-links > :nth-child(5) { animation-delay: 0.38s; }

/* ── @property: animatable gradient positions ────────────── */

@property --hl-x  { syntax: '<percentage>'; initial-value: 18%;  inherits: false; }
@property --hl-y  { syntax: '<percentage>'; initial-value: 12%;  inherits: false; }
@property --pg-x1 { syntax: '<percentage>'; initial-value: 75%;  inherits: false; }
@property --pg-y1 { syntax: '<percentage>'; initial-value: 8%;   inherits: false; }
@property --pg-x2 { syntax: '<percentage>'; initial-value: 15%;  inherits: false; }
@property --pg-y2 { syntax: '<percentage>'; initial-value: 82%;  inherits: false; }

@keyframes card-hl-drift {
  0%   { --hl-x: 18%; --hl-y: 12%; }
  25%  { --hl-x: 80%; --hl-y: 20%; }
  50%  { --hl-x: 68%; --hl-y: 76%; }
  75%  { --hl-x: 16%; --hl-y: 62%; }
  100% { --hl-x: 18%; --hl-y: 12%; }
}

@keyframes page-bg-drift {
  0%, 100% { --pg-x1: 75%; --pg-y1:  8%; --pg-x2: 15%; --pg-y2: 82%; }
  33%       { --pg-x1: 22%; --pg-y1: 65%; --pg-x2: 78%; --pg-y2: 28%; }
  66%       { --pg-x1: 88%; --pg-y1: 56%; --pg-x2: 10%; --pg-y2: 18%; }
}

@keyframes sheen-sweep {
  0%        { transform: skewX(-14deg) translateX(-110%); opacity: 0; }
  6%        { opacity: 1; }
  38%       { opacity: 1;  transform: skewX(-14deg) translateX(380%); }
  44%, 100% { opacity: 0;  transform: skewX(-14deg) translateX(380%); }
}

/* ── Page-background animated orbs (outside the card) ───── */
/* Gray ellipses sit in the beige body background. The card's
   backdrop-filter blurs them, and 12% card transparency lets
   them add subtle depth through the frosted glass. */

body.is-home-page {
  background:
    radial-gradient(ellipse 70% 60% at var(--pg-x1) var(--pg-y1), rgba(100, 170, 240, 1) 0%, transparent 100%),
    radial-gradient(ellipse 60% 55% at var(--pg-x2) var(--pg-y2), rgba(80,  150, 225, 1) 0%, transparent 100%),
    linear-gradient(180deg, #ddeeff 0%, #cce4f8 100%);
  animation: page-bg-drift 26s ease-in-out infinite;
}

/* ── Card: strong blue gradient on its own surface ─────────── */

.is-home-page .landing-card {
  overflow: hidden;
  background:
    radial-gradient(
      ellipse 75% 65% at var(--hl-x) var(--hl-y),
      rgba(180, 220, 255, 0.95) 0%,
      rgba(140, 195, 250, 0.6)  50%,
      rgba(100, 170, 240, 0)   100%
    ),
    radial-gradient(
      ellipse 60% 55% at calc(100% - var(--hl-x)) calc(100% - var(--hl-y)),
      rgba(100, 160, 230, 0.55) 0%,
      rgba(100, 160, 230, 0)   100%
    ),
    rgba(220, 238, 255, 0.92);
  animation: card-hl-drift 22s ease-in-out infinite;
}

/* ── Card sheen: diagonal light sweep (periodic) ─────────── */

.home-card-sheen {
  position: absolute;
  top: 0;
  left: 0;
  width: 45%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent                0%,
    rgba(255, 255, 255, 0.38) 38%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0.38) 62%,
    transparent               100%
  );
  transform: skewX(-14deg) translateX(-120%);
  pointer-events: none;
  z-index: 0;
  animation: sheen-sweep 14s ease-in-out infinite;
  animation-delay: 1.5s;
}

/* ── Content sits above sheen ────────────────────────────── */

.is-home-page .site-nav,
.is-home-page .landing-hero,
.is-home-page .home-impact-strip,
.is-home-page .home-features,
.is-home-page .home-why,
.is-home-page .home-process,
.is-home-page .home-cta-band {
  position: relative;
  z-index: 1;
}

/* ── Hero section enhancements ───────────────────────────── */

.is-home-page .landing-hero {
  position: relative;
  z-index: 1;
  gap: 20px;
  padding-top: 14px;
  min-height: 460px;
}

.is-home-page .landing-copy {
  justify-content: center;
}

.is-home-page .landing-copy h1 {
  max-width: none;
  font-size: clamp(4rem, 7.5vw, 7.2rem);
  line-height: 0.89;
  letter-spacing: -0.076em;
  margin-top: 14px;
}

.is-home-page .landing-subheadline {
  font-size: 1rem;
  max-width: 34rem;
}

/* ── Hero card interior ──────────────────────────────────── */

.home-hcard-h2 {
  margin: 14px 0 0;
  font-size: clamp(1.9rem, 3.1vw, 2.8rem);
  line-height: 0.96;
  letter-spacing: -0.062em;
}

.home-hcard-p {
  margin: 14px 0 0;
  font-size: 0.9rem;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.64);
}

.home-hcard-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 30px;
}

.home-hcard-stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.052);
  text-align: center;
}

.home-hcard-stat strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
}

.home-hcard-stat span {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

/* ── Scroll-reveal system ────────────────────────────────── */

.js-reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.78s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.78s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-reveal-ready [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-delay="100"] { transition-delay: 100ms; }
[data-reveal-delay="200"] { transition-delay: 200ms; }

/* ── Feature rows ────────────────────────────────────────── */

.home-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  position: relative;
  z-index: 1;
}

.home-feat {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 44px;
  padding: 36px 40px;
  border-radius: 24px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.home-feat-dark {
  background: linear-gradient(148deg, rgba(13, 13, 13, 0.99) 0%, rgba(22, 22, 22, 0.97) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 18px 48px rgba(17, 17, 17, 0.2);
  color: #fff;
}

.home-feat-dark:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 68px rgba(17, 17, 17, 0.3);
  border-color: rgba(255, 255, 255, 0.12);
}

.home-feat-light {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(16, 16, 16, 0.08);
  box-shadow: 0 6px 24px rgba(16, 16, 16, 0.05);
}

.home-feat-light:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(17, 17, 17, 0.1);
  border-color: rgba(16, 16, 16, 0.15);
}

.home-feat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.home-feat-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.home-feat-tag-light {
  color: var(--text-muted);
}

.home-feat-arrow {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.28);
  transition: transform 0.22s ease, color 0.22s ease;
}

.home-feat-arrow-light {
  color: var(--text-muted);
}

.home-feat-dark:hover .home-feat-arrow {
  transform: translate(4px, -4px);
  color: rgba(255, 255, 255, 0.8);
}

.home-feat-light:hover .home-feat-arrow-light {
  transform: translate(4px, -4px);
  color: var(--text-primary);
}

.home-feat-title {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 2.5vw, 2.3rem);
  line-height: 1.02;
  letter-spacing: -0.058em;
  font-weight: 800;
  color: #fff;
}

.home-feat-title-light {
  color: var(--text-primary);
}

.home-feat-desc {
  margin: 0;
  font-size: 0.89rem;
  line-height: 1.74;
  color: rgba(255, 255, 255, 0.58);
  max-width: 38ch;
}

.home-feat-desc-light {
  color: var(--text-secondary);
}

.home-feat-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  min-width: 256px;
}

.home-feat-stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.042);
  text-align: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.home-feat-dark:hover .home-feat-stat {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
}

.home-feat-stat strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
}

.home-feat-stat span {
  display: block;
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.36);
}

.home-feat-stat-light {
  border-color: rgba(16, 16, 16, 0.09);
  background: rgba(17, 17, 17, 0.03);
}

.home-feat-stat-light strong {
  color: var(--text-primary);
}

.home-feat-stat-light span {
  color: var(--text-muted);
}

.home-feat-light:hover .home-feat-stat-light {
  background: rgba(17, 17, 17, 0.05);
  border-color: rgba(16, 16, 16, 0.14);
}

/* ── Process section — ensure z-index above orbs ─────────── */

.home-process {
  position: relative;
  z-index: 1;
}

/* ── CTA band — ensure z-index above orbs ────────────────── */

.home-cta-band {
  position: relative;
  z-index: 1;
}

/* ── Responsive (additive — not duplicating earlier breaks) ── */

@media (max-width: 960px) {
  .is-home-page .landing-copy h1 {
    font-size: clamp(3.2rem, 9vw, 5rem);
  }

  .home-feat {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .home-feat-stats {
    min-width: unset;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .home-feat {
    padding: 26px 22px;
  }

  .home-feat-title {
    font-size: clamp(1.5rem, 6vw, 1.9rem);
  }

  .home-hcard-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================
   HOMEPAGE v3 — Dark Atmospheric System
   Overrides v2. All non-scoped rules target homepage-only
   classes that cannot appear on other pages.
   ============================================================ */

/* ── @property: 4 animated orb positions ─────────────────── */

@property --o1x { syntax: '<percentage>'; initial-value: 72%; inherits: false; }
@property --o1y { syntax: '<percentage>'; initial-value: 12%; inherits: false; }
@property --o2x { syntax: '<percentage>'; initial-value: 18%; inherits: false; }
@property --o2y { syntax: '<percentage>'; initial-value: 70%; inherits: false; }
@property --o3x { syntax: '<percentage>'; initial-value: 85%; inherits: false; }
@property --o3y { syntax: '<percentage>'; initial-value: 58%; inherits: false; }
@property --o4x { syntax: '<percentage>'; initial-value: 32%; inherits: false; }
@property --o4y { syntax: '<percentage>'; initial-value: 22%; inherits: false; }

/* ── Keyframes ───────────────────────────────────────────── */

@keyframes home-orb-drift {
  0%, 100% { --o1x: 72%; --o1y: 12%; --o2x: 18%; --o2y: 70%; --o3x: 85%; --o3y: 58%; --o4x: 32%; --o4y: 22%; }
  25%       { --o1x: 20%; --o1y: 38%; --o2x: 82%; --o2y: 18%; --o3x: 12%; --o3y: 80%; --o4x: 68%; --o4y: 54%; }
  50%       { --o1x: 58%; --o1y: 78%; --o2x: 42%; --o2y: 12%; --o3x: 78%; --o3y: 32%; --o4x: 10%; --o4y: 68%; }
  75%       { --o1x: 88%; --o1y: 48%; --o2x: 62%; --o2y: 82%; --o3x: 24%; --o3y: 14%; --o4x: 52%; --o4y: 42%; }
}

@keyframes home-fade-up {
  from { opacity: 0; transform: translateY(60px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

@keyframes home-logo-slide {
  from { opacity: 0; transform: translateX(-36px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes home-nav-drop {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes sheen-sweep {
  0%        { transform: skewX(-14deg) translateX(-120%); opacity: 0; }
  5%        { opacity: 1; }
  40%       { opacity: 1;  transform: skewX(-14deg) translateX(390%); }
  46%, 100% { opacity: 0;  transform: skewX(-14deg) translateX(390%); }
}

@keyframes hero-card-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.55; }
  50%       { opacity: 1;    }
}

@keyframes spotlight-drift {
  0%, 100% { transform: translate(-50%, -50%) scale(1);    opacity: 0.7;  }
  33%       { transform: translate(-35%, -60%) scale(1.15); opacity: 1;    }
  66%       { transform: translate(-65%, -42%) scale(0.9);  opacity: 0.65; }
}

/* ── Dark atmospheric body ───────────────────────────────── */

body.is-home-page {
  background:
    radial-gradient(ellipse 62% 52% at var(--o1x) var(--o1y), rgba(38, 108, 255, 0.55)  0%, transparent 70%),
    radial-gradient(ellipse 52% 44% at var(--o2x) var(--o2y), rgba(0,  188, 212, 0.34)  0%, transparent 70%),
    radial-gradient(ellipse 56% 46% at var(--o3x) var(--o3y), rgba(108, 40, 240, 0.28)  0%, transparent 70%),
    radial-gradient(ellipse 42% 36% at var(--o4x) var(--o4y), rgba(255,  88, 40, 0.11)  0%, transparent 70%),
    linear-gradient(158deg, #03050d 0%, #05091a 52%, #03050c 100%);
  animation: home-orb-drift 38s ease-in-out infinite;
}

/* ── Grid texture (white lines on dark) ──────────────────── */

body.is-home-page::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.034) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.034) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent 80%);
}

/* ── Grain overlay ───────────────────────────────────────── */

body.is-home-page::after {
  content: "";
  position: fixed;
  inset: 0;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 192px 192px;
  pointer-events: none;
  z-index: 0;
}

/* ── Card: dark glass ────────────────────────────────────── */

.is-home-page .landing-card {
  overflow: hidden;
  background: rgba(5, 10, 24, 0.84);
  backdrop-filter: blur(44px) saturate(160%);
  -webkit-backdrop-filter: blur(44px) saturate(160%);
  border-color: rgba(80, 148, 255, 0.16);
  box-shadow:
    0 0 0 1px rgba(40, 100, 255, 0.07),
    0 60px 130px rgba(0, 0, 0, 0.78),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: none;
}

/* ── Card top glow ───────────────────────────────────────── */

.is-home-page .landing-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 75%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(80, 148, 255, 0.55) 35%, rgba(120, 200, 255, 0.8) 50%, rgba(80, 148, 255, 0.55) 65%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

/* ── Card sheen: blue-tinted light sweep ─────────────────── */

.home-card-sheen {
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent                   0%,
    rgba(80,  160, 255, 0.055)   38%,
    rgba(140, 200, 255, 0.10)    50%,
    rgba(80,  160, 255, 0.055)   62%,
    transparent                  100%
  );
  transform: skewX(-14deg) translateX(-130%);
  pointer-events: none;
  z-index: 0;
  animation: sheen-sweep 20s ease-in-out infinite;
  animation-delay: 2.5s;
}

/* ── Hero spotlight (CSS-driven slow drift) ──────────────── */

.home-hero-spotlight {
  position: absolute;
  top: 50%;
  left: 40%;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(55, 125, 255, 0.13) 0%, transparent 65%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  animation: spotlight-drift 12s ease-in-out infinite;
}

/* ── Nav: light on dark ──────────────────────────────────── */

.is-home-page .site-nav-brand         { color: #fff; }
.is-home-page .site-nav-logo          { color: #fff; }
.is-home-page .site-nav-inner         { border-bottom-color: rgba(255, 255, 255, 0.07); }
.is-home-page .site-nav-links a       { color: rgba(255, 255, 255, 0.5); }
.is-home-page .site-nav-links a:hover {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
}
.is-home-page .site-nav-links a.is-active {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.is-home-page .site-nav-toggle {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}
.is-home-page .site-nav-toggle span { background: #fff; }

/* ── Content z-index above orbs/sheen ───────────────────── */

.is-home-page .site-nav,
.is-home-page .landing-hero,
.is-home-page .home-impact-strip,
.is-home-page .home-features,
.is-home-page .home-why,
.is-home-page .home-process,
.is-home-page .home-cta-band {
  position: relative;
  z-index: 1;
}

/* ── Hero section ────────────────────────────────────────── */

.is-home-page .landing-hero {
  gap: 28px;
  padding-top: 16px;
  min-height: 520px;
  align-items: center;
}

.is-home-page .landing-copy {
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* ── Section kicker ─────────────────────────────────────── */

.is-home-page .section-kicker {
  color: rgba(100, 172, 255, 0.88);
  letter-spacing: 0.1em;
}

/* ── Hero H1 ─────────────────────────────────────────────── */

.is-home-page .landing-copy h1 {
  max-width: none;
  font-size: clamp(4.4rem, 8.5vw, 8rem);
  line-height: 0.87;
  letter-spacing: -0.076em;
  margin-top: 14px;
  color: #ffffff;
  text-shadow: 0 0 100px rgba(70, 140, 255, 0.22);
}

.is-home-page .landing-subheadline {
  font-size: 1rem;
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ── CTA buttons (inverted for dark background) ──────────── */

.is-home-page .landing-btn-primary {
  background: #fff;
  color: #080808;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 16px 42px rgba(55, 125, 255, 0.28);
}
.is-home-page .landing-btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.3),
    0 28px 60px rgba(55, 125, 255, 0.4);
}
.is-home-page .landing-btn-ghost {
  color: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.14);
}
.is-home-page .landing-btn-ghost:hover {
  color: rgba(255, 255, 255, 0.94);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.07);
}

/* ── Entry animations (more dramatic than v2) ────────────── */

.home-hero-in {
  animation: home-fade-up 1.05s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.home-in-d1 { animation-delay: 0.06s; }
.home-in-d2 { animation-delay: 0.20s; }
.home-in-d3 { animation-delay: 0.36s; }
.home-in-d4 { animation-delay: 0.52s; }
.home-in-d5 { animation-delay: 0.68s; }

/* ── Logo + nav reveal ───────────────────────────────────── */

.is-home-page .site-nav-brand {
  animation: home-logo-slide 1s cubic-bezier(0.16, 1, 0.3, 1) 0.04s both;
}
.is-home-page .site-nav-links > * {
  animation: home-nav-drop 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.is-home-page .site-nav-links > :nth-child(1) { animation-delay: 0.10s; }
.is-home-page .site-nav-links > :nth-child(2) { animation-delay: 0.18s; }
.is-home-page .site-nav-links > :nth-child(3) { animation-delay: 0.26s; }
.is-home-page .site-nav-links > :nth-child(4) { animation-delay: 0.34s; }
.is-home-page .site-nav-links > :nth-child(5) { animation-delay: 0.42s; }

/* ── Hero right card: floating dark glass ────────────────── */

.is-home-page .landing-hero-card {
  min-height: 460px;
  background:
    linear-gradient(148deg, rgba(14, 22, 52, 0.98) 0%, rgba(8, 14, 36, 0.96) 100%);
  border-color: rgba(80, 148, 255, 0.2);
  box-shadow:
    0 0 0 1px rgba(40, 100, 255, 0.1),
    0 48px 90px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(100, 170, 255, 0.1);
  animation: hero-card-float 8s ease-in-out infinite;
}

.home-hcard-h2 {
  margin: 14px 0 0;
  font-size: clamp(1.9rem, 3.1vw, 2.8rem);
  line-height: 0.96;
  letter-spacing: -0.062em;
  color: #fff;
}

.home-hcard-p {
  margin: 14px 0 0;
  font-size: 0.9rem;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.46);
}

.home-hcard-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 30px;
}

.home-hcard-stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 12px;
  border: 1px solid rgba(80, 148, 255, 0.12);
  border-radius: 16px;
  background: rgba(55, 120, 255, 0.06);
  text-align: center;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.is-home-page .landing-hero-card:hover .home-hcard-stat {
  background: rgba(55, 120, 255, 0.12);
  border-color: rgba(80, 148, 255, 0.24);
}

.home-hcard-stat strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
}

.home-hcard-stat span {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(120, 180, 255, 0.52);
}

/* ── Impact strip ────────────────────────────────────────── */

.is-home-page .home-impact-strip {
  background: rgba(255, 255, 255, 0.034);
  border-color: rgba(255, 255, 255, 0.07);
}

.is-home-page .home-impact-label { color: rgba(120, 180, 255, 0.6); }
.is-home-page .home-impact-value { color: rgba(255, 255, 255, 0.88); }
.is-home-page .home-impact-divider { background: rgba(255, 255, 255, 0.08); }

/* ── Scroll-reveal (deeper travel + scale) ───────────────── */

.js-reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(54px) scale(0.97);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-reveal-ready [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

[data-reveal-delay="100"] { transition-delay: 100ms; }
[data-reveal-delay="200"] { transition-delay: 200ms; }

/* ── Feature rows ────────────────────────────────────────── */

.home-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  position: relative;
  z-index: 1;
}

.home-feat {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 44px;
  padding: 36px 40px;
  border-radius: 24px;
  text-decoration: none;
  overflow: hidden;
  position: relative;
  color: #fff;
  transition:
    transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.32s ease,
    border-color 0.32s ease;
}

/* Ambient inner glow that brightens on hover */
.home-feat::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
  opacity: 0.6;
}

/* Meal Generation — electric blue */
.home-feat-dark {
  background: linear-gradient(148deg, rgba(8, 14, 38, 0.99) 0%, rgba(5, 10, 26, 0.97) 100%);
  border: 1px solid rgba(72, 140, 255, 0.18);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(100, 165, 255, 0.08);
}
.home-feat-dark::before {
  background: radial-gradient(ellipse 65% 90% at 0% 50%, rgba(38, 108, 255, 0.12) 0%, transparent 70%);
}
.home-feat-dark:hover {
  transform: translateY(-10px) scale(1.012);
  box-shadow: 0 40px 90px rgba(0,0,0,0.55), 0 0 70px rgba(55,120,255,0.18), inset 0 1px 0 rgba(100,165,255,0.14);
  border-color: rgba(80, 150, 255, 0.36);
}
.home-feat-dark:hover::before { opacity: 1; }

/* Cooking Clean — deep teal */
.home-feat-light {
  background: linear-gradient(148deg, rgba(5, 20, 28, 0.99) 0%, rgba(4, 14, 20, 0.97) 100%);
  border: 1px solid rgba(0, 172, 196, 0.16);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(0, 200, 220, 0.06);
}
.home-feat-light::before {
  background: radial-gradient(ellipse 65% 90% at 0% 50%, rgba(0, 172, 196, 0.1) 0%, transparent 70%);
}
.home-feat-light:hover {
  transform: translateY(-10px) scale(1.012);
  box-shadow: 0 40px 90px rgba(0,0,0,0.55), 0 0 70px rgba(0,172,196,0.15), inset 0 1px 0 rgba(0,200,220,0.1);
  border-color: rgba(0, 200, 220, 0.32);
}
.home-feat-light:hover::before { opacity: 1; }

/* Workout Plans — deep purple (3rd card) */
.home-features > a:nth-child(3) {
  background: linear-gradient(148deg, rgba(14, 8, 32, 0.99) 0%, rgba(10, 5, 22, 0.97) 100%);
  border-color: rgba(128, 52, 240, 0.16);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(140, 80, 255, 0.06);
}
.home-features > a:nth-child(3)::before {
  background: radial-gradient(ellipse 65% 90% at 0% 50%, rgba(108, 40, 220, 0.1) 0%, transparent 70%);
}
.home-features > a:nth-child(3):hover {
  box-shadow: 0 40px 90px rgba(0,0,0,0.55), 0 0 70px rgba(108,40,220,0.15), inset 0 1px 0 rgba(140,80,255,0.1);
  border-color: rgba(128, 52, 240, 0.32);
}

/* Shared tag/arrow/title/desc overrides */
.home-feat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.home-feat-tag        { color: rgba(110, 170, 255, 0.55); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; }
.home-feat-tag-light  { color: rgba(0,  200, 220, 0.6); }
.home-features > a:nth-child(3) .home-feat-tag-light { color: rgba(160, 100, 255, 0.6); }

.home-feat-arrow,
.home-feat-arrow-light { font-size: 1.1rem; color: rgba(255,255,255,0.18); transition: transform 0.24s ease, color 0.24s ease; }
.home-feat:hover .home-feat-arrow,
.home-feat:hover .home-feat-arrow-light { transform: translate(5px, -5px); color: rgba(255,255,255,0.72); }

.home-feat-title,
.home-feat-title-light { margin: 0 0 12px; font-size: clamp(1.7rem, 2.5vw, 2.3rem); line-height: 1.02; letter-spacing: -0.058em; font-weight: 800; color: #fff; }

.home-feat-desc,
.home-feat-desc-light  { margin: 0; font-size: 0.89rem; line-height: 1.74; color: rgba(255,255,255,0.42); max-width: 38ch; }

.home-feat-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; min-width: 256px; }

.home-feat-stat,
.home-feat-stat-light {
  display: flex; flex-direction: column; gap: 5px;
  padding: 16px 12px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  background: rgba(255,255,255,0.028);
  text-align: center;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.home-feat:hover .home-feat-stat,
.home-feat:hover .home-feat-stat-light { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }

.home-feat-stat strong,
.home-feat-stat-light strong { display: block; font-size: 0.98rem; font-weight: 800; letter-spacing: -0.04em; color: #fff; }

.home-feat-stat span,
.home-feat-stat-light span { display: block; font-size: 0.67rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: rgba(255,255,255,0.28); }

/* ── Process section ─────────────────────────────────────── */

.is-home-page .home-process    { border-top-color: rgba(255, 255, 255, 0.07); }
.is-home-page .home-process-header h2 { color: #fff; }

.is-home-page .home-process-step {
  background: rgba(255, 255, 255, 0.028);
  border-color: rgba(255, 255, 255, 0.07);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
.is-home-page .home-process-step:hover {
  background: rgba(55, 120, 255, 0.07);
  border-color: rgba(80, 148, 255, 0.2);
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 40px rgba(55,120,255,0.1);
}

.is-home-page .home-step-num      { color: rgba(55, 120, 255, 0.32); font-size: 2.5rem; }
.is-home-page .home-step-body h3  { color: rgba(255, 255, 255, 0.9); }
.is-home-page .home-step-body p   { color: rgba(255, 255, 255, 0.44); }

/* ── Bottom CTA band ─────────────────────────────────────── */

.is-home-page .home-cta-band {
  background:
    radial-gradient(ellipse 90% 130% at 50% 110%, rgba(38, 108, 255, 0.22) 0%, transparent 68%),
    linear-gradient(158deg, rgba(10, 20, 52, 0.99) 0%, rgba(6, 12, 34, 0.99) 100%);
  border: 1px solid rgba(80, 148, 255, 0.2);
  box-shadow:
    0 0 80px rgba(38, 100, 255, 0.14),
    0 28px 70px rgba(0, 0, 0, 0.45);
}
.is-home-page .home-cta-band-copy h2 { color: #fff; }
.is-home-page .home-cta-band-copy p  { color: rgba(255,255,255,0.48); }
.is-home-page .home-cta-band-btn {
  background: rgba(55, 118, 255, 0.16);
  border-color: rgba(80, 148, 255, 0.32);
  color: #fff;
  box-shadow: 0 0 44px rgba(55,118,255,0.22);
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}
.is-home-page .home-cta-band-btn:hover {
  background: rgba(55, 118, 255, 0.3);
  border-color: rgba(80, 148, 255, 0.52);
  box-shadow: 0 0 70px rgba(55,118,255,0.38);
  transform: translateY(-2px);
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 960px) {
  .is-home-page .landing-copy h1 { font-size: clamp(3.4rem, 10vw, 5.5rem); }
  .home-feat { grid-template-columns: 1fr; gap: 24px; }
  .home-feat-stats { min-width: unset; grid-template-columns: repeat(3, 1fr); }
  .home-process-steps { grid-template-columns: 1fr; }
  .home-impact-strip { flex-wrap: wrap; gap: 16px; padding: 18px 20px; }
  .home-impact-divider { display: none; }
  .home-impact-item { flex: 1 1 calc(50% - 8px); padding: 0; }
  .landing-hero-card { min-height: auto; }
}

@media (max-width: 640px) {
  .landing-cta-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .landing-btn-primary, .landing-btn-ghost { width: 100%; justify-content: center; }
  .home-cta-band { flex-direction: column; align-items: flex-start; gap: 20px; padding: 26px 22px; }
  .home-cta-band-btn { width: 100%; justify-content: center; }
  .home-impact-item { flex: 1 1 100%; }
  .home-feat { padding: 26px 22px; }
  .home-feat-title, .home-feat-title-light { font-size: clamp(1.5rem, 6vw, 1.9rem); }
  .home-hcard-stats { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   HOMEPAGE v3 ADDENDUM — New sections + 4th feature card
   ============================================================ */

/* ── Mission section ───────────────────────────────────────── */

.home-mission {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.35fr);
  gap: 34px;
  align-items: start;
  margin-top: 80px;
  padding: 34px 36px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 24px;
  background:
    linear-gradient(148deg, rgba(255, 255, 255, 0.042) 0%, rgba(255, 255, 255, 0.024) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.home-mission-header h2 {
  margin: 7px 0 0;
  max-width: 12ch;
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
  color: #fff;
}

.home-mission-copy {
  display: grid;
  gap: 14px;
  max-width: 78ch;
}

.home-mission-copy p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.78;
  color: rgba(255, 255, 255, 0.52);
}

/* ── 4th feature card — warm amber (Supplements) ────────────── */

.home-features > a:nth-child(4) {
  background: linear-gradient(148deg, rgba(26, 18, 6, 0.99) 0%, rgba(18, 12, 4, 0.97) 100%);
  border-color: rgba(255, 160, 40, 0.15);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 180, 60, 0.05);
}
.home-features > a:nth-child(4)::before {
  background: radial-gradient(ellipse 65% 90% at 0% 50%, rgba(255, 140, 20, 0.09) 0%, transparent 70%);
}
.home-features > a:nth-child(4):hover {
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), 0 0 70px rgba(255, 140, 20, 0.13), inset 0 1px 0 rgba(255, 180, 60, 0.09);
  border-color: rgba(255, 160, 40, 0.3);
}

.home-feat-tag-amber {
  color: rgba(255, 175, 70, 0.62);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* ── Contact section ───────────────────────────────────────── */

.home-contact {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  padding: 24px 28px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.028);
}

.home-contact-copy h2 {
  margin: 6px 0 0;
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  line-height: 1.05;
  letter-spacing: -0.052em;
  color: rgba(255, 255, 255, 0.9);
}

.home-contact-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(80, 148, 255, 0.22);
  border-radius: 999px;
  background: rgba(55, 118, 255, 0.09);
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease;
}

.home-contact-email:hover {
  background: rgba(55, 118, 255, 0.18);
  border-color: rgba(80, 148, 255, 0.42);
  color: #fff;
  transform: translateY(-1px);
}

/* ── z-index above orbs for new sections ────────────────────── */

.is-home-page .home-why {
  position: relative;
  z-index: 1;
}

/* ── Why Balance section ─────────────────────────────────────── */

.home-why {
  margin-top: 44px;
  padding-top: 38px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.home-why-header {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 28px;
}

.home-why-header h2 {
  margin: 6px 0 0;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.065em;
  color: #fff;
}

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

.home-why-item {
  padding: 24px 22px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.026);
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s ease;
}

.home-why-item:hover {
  background: rgba(55, 120, 255, 0.065);
  border-color: rgba(80, 148, 255, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28), 0 0 32px rgba(55, 120, 255, 0.09);
}

.home-why-item-title {
  margin: 0 0 9px;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: rgba(255, 255, 255, 0.88);
}

.home-why-item-desc {
  margin: 0;
  font-size: 0.845rem;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.4);
}

/* ── Process section — 2×2 grid for 4 steps ─────────────────── */

.is-home-page .home-process-steps {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ── Responsive additions ─────────────────────────────────────── */

@media (max-width: 960px) {
  .home-mission {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .home-mission-header h2 {
    max-width: 18ch;
  }

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

  .is-home-page .home-process-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .home-mission {
    margin-top: 52px;
    padding: 26px 22px;
  }

  .home-contact {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px;
  }

  .home-contact-email {
    width: 100%;
  }

  .home-why-grid {
    grid-template-columns: 1fr;
  }

  .home-why {
    margin-top: 32px;
    padding-top: 28px;
  }
}

/* ============================================================
   GLOBAL DARK THEME — All pages
   Variables first, then component overrides.
   Homepage-specific overrides in the v3 block take precedence
   for .is-home-page elements.
   ============================================================ */

:root {
  --bg:            #03050d;
  --bg-soft:       #05091a;
  --surface:       rgba(5, 10, 24, 0.82);
  --surface-strong: rgba(8, 14, 30, 0.95);
  --text-primary:  rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.52);
  --text-muted:    rgba(255, 255, 255, 0.32);
  --border:        rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-focus:  rgba(80, 148, 255, 0.55);
  --shadow:        0 24px 60px rgba(0, 0, 0, 0.72);
  --shadow-soft:   0 12px 30px rgba(0, 0, 0, 0.5);
  --button-bg:     #3b7bff;
  --button-hover:  #2d6ef0;
  --button-shadow: 0 14px 30px rgba(55, 120, 255, 0.38);
}

/* ── Dark atmospheric body (non-homepage — no animation) ─── */

body {
  background:
    radial-gradient(ellipse 58% 50% at 80% 10%, rgba(38, 108, 255, 0.42) 0%, transparent 70%),
    radial-gradient(ellipse 50% 44% at 15% 80%, rgba(108, 40, 240, 0.26) 0%, transparent 70%),
    radial-gradient(ellipse 40% 36% at 55% 50%, rgba(0, 172, 196, 0.14) 0%, transparent 70%),
    linear-gradient(158deg, #03050d 0%, #05091a 52%, #03050c 100%);
}

/* ── Grid: white lines on dark ───────────────────────────── */

body::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 75%);
}

/* ── Grain overlay (all pages) ───────────────────────────── */

body::after {
  content: "";
  position: fixed;
  inset: 0;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 192px 192px;
  pointer-events: none;
  z-index: 0;
}

/* ── Card: dark glass ────────────────────────────────────── */

.card {
  background: rgba(5, 10, 24, 0.82);
  backdrop-filter: blur(40px) saturate(160%);
  -webkit-backdrop-filter: blur(40px) saturate(160%);
  border-color: rgba(80, 148, 255, 0.14);
  box-shadow:
    0 0 0 1px rgba(40, 100, 255, 0.06),
    0 50px 120px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
}

/* ── Nav: white on dark (all pages) ─────────────────────── */

.site-nav-brand         { color: #fff; }
.site-nav-logo          { color: #fff; }
.site-nav-inner         { border-bottom-color: rgba(255, 255, 255, 0.07); }
.site-nav-links a,
.site-nav-dropdown-toggle {
  color: rgba(255, 255, 255, 0.5);
}
.site-nav-links a:hover,
.site-nav-dropdown-toggle:hover {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
}
.site-nav-links a.is-active,
.site-nav-dropdown-toggle.is-active {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.site-nav-dropdown-menu {
  background: rgba(5, 10, 24, 0.98);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.site-nav-dropdown-menu a {
  color: rgba(255, 255, 255, 0.68);
}
.site-nav-dropdown-menu a:hover {
  color: rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.07);
}
.site-nav-dropdown-menu a.is-active {
  background: rgba(55, 120, 255, 0.16);
  border-color: rgba(80, 148, 255, 0.3);
  color: #fff;
}
.site-nav-toggle        { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.12); }
.site-nav-toggle span   { background: #fff; }

/* Mobile nav overlay */
.site-nav[data-open="true"] .site-nav-links {
  background: rgba(5, 10, 24, 0.97);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ── Mobile nav panel: visibility & polish ───────────────────── */
@media (max-width: 1080px) {
  /* Float panel well above page content */
  .site-nav {
    z-index: 50;
  }

  /* Open panel: solid, clearly layered, no blending into page */
  .site-nav[data-open="true"] .site-nav-links {
    padding: 14px;
    border-radius: 22px;
    border-color: rgba(255, 255, 255, 0.10);
    box-shadow:
      0 32px 72px rgba(0, 0, 0, 0.72),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  /* Main nav links: bright enough to read in the dark panel.
     Specificity matches both the global dark-theme rule and the
     .is-home-page variant so all pages get the mobile fix. */
  .site-nav-links a,
  .is-home-page .site-nav-links a,
  .site-nav-dropdown-toggle {
    color: rgba(255, 255, 255, 0.82);
    min-height: 50px;
    font-size: 0.9rem;
    border-radius: 14px;
  }

  .site-nav-links a:hover,
  .is-home-page .site-nav-links a:hover,
  .site-nav-dropdown-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
    transform: none;
  }

  .site-nav-links a.is-active,
  .is-home-page .site-nav-links a.is-active,
  .site-nav-dropdown-toggle.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.14);
  }

  /* Sub-dropdown tray: visually inset from the panel, not identical to it */
  .site-nav-dropdown-menu {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 6px;
    box-shadow: none;
  }

  .site-nav-dropdown-menu a {
    color: rgba(255, 255, 255, 0.75);
    min-height: 46px;
    border-radius: 10px;
  }

  .site-nav-dropdown-menu a:hover {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.08);
  }

  .site-nav-dropdown-menu a.is-active {
    color: #fff;
  }

  /* Auth row at bottom of panel: generous spacing, centered buttons */
  .site-nav-auth {
    border-top-color: rgba(255, 255, 255, 0.10);
    padding-top: 12px;
    margin-top: 4px;
    gap: 8px;
  }

  .site-nav-auth a {
    color: rgba(255, 255, 255, 0.82);
    justify-content: center;
  }

  .site-nav-auth .site-nav-auth-primary {
    color: #fff;
  }

  .site-nav-auth-loading {
    color: rgba(255, 255, 255, 0.55);
  }
}

/* ── Section kicker (all pages) ─────────────────────────── */

.section-kicker {
  color: rgba(100, 172, 255, 0.85);
  border-color: rgba(100, 172, 255, 0.18);
  background: rgba(55, 120, 255, 0.07);
}

/* ── Section headings ────────────────────────────────────── */

.section-heading h1,
.section-heading h2 { color: rgba(255, 255, 255, 0.92); }
.section-heading p   { color: rgba(255, 255, 255, 0.5); }

/* ── Hero copy (meal-prep, workout, results pages) ───────── */

.hero-copy,
.workout-hero-copy,
.cooking-hero-copy,
.results-hero-copy { color: rgba(255, 255, 255, 0.92); }

.hero-copy p,
.workout-hero-copy p,
.cooking-hero-copy p { color: rgba(255, 255, 255, 0.52); }

.meal-prep-hero-title { color: rgba(255, 255, 255, 0.92); }

.flow-note { color: rgba(255, 255, 255, 0.4); }

.hero-copy {
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

/* ── Forms ───────────────────────────────────────────────── */

.field label {
  color: rgba(255, 255, 255, 0.72);
}

.field-hint { color: rgba(255, 255, 255, 0.36); }

.connected-page-panel .field-password-toggle {
  color: rgba(255, 255, 255, 0.38);
}

.connected-page-panel .field-password-toggle:hover {
  color: rgba(255, 255, 255, 0.88);
  background: transparent;
}

.connected-page-panel .field-password-toggle:focus-visible {
  outline-color: rgba(255, 255, 255, 0.4);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

input[type="text"]:hover,
input[type="number"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
select:hover,
textarea:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

input::placeholder,
textarea::placeholder { color: rgba(255, 255, 255, 0.28); }

input:focus,
select:focus,
textarea:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(80, 148, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(80, 148, 255, 0.14);
  outline: none;
  transform: none;
}

select option {
  background: #0d1428;
  color: rgba(255, 255, 255, 0.9);
}

/* ── Submit button ───────────────────────────────────────── */

button[type="submit"] {
  background: var(--button-bg);
  color: #fff;
  border-color: rgba(80, 148, 255, 0.3);
  box-shadow: var(--button-shadow);
}

button[type="submit"]:hover {
  background: var(--button-hover);
  box-shadow: 0 20px 50px rgba(55, 120, 255, 0.45);
}

/* ── Checkbox cards ──────────────────────────────────────── */

.checkbox-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.75);
}

.checkbox-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(80, 148, 255, 0.25);
}

.checkbox-card:has(input:checked) {
  background: rgba(55, 120, 255, 0.12);
  border-color: rgba(80, 148, 255, 0.38);
  color: #fff;
}

.checkbox-title { color: inherit; }

/* ── Loading panel ───────────────────────────────────────── */

.loading-panel {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.loading-panel p { color: rgba(255, 255, 255, 0.88); }
.loading-panel .loading-copy span { color: rgba(255, 255, 255, 0.4); }

.loading-spinner {
  border-color: rgba(255, 255, 255, 0.1);
  border-top-color: rgba(255, 255, 255, 0.75);
}

/* ── Selected meals ──────────────────────────────────────── */

.selected-meals-heading label { color: rgba(255, 255, 255, 0.72); }

.selected-meals-browse-link,
.selected-meals-clear-button {
  color: rgba(100, 172, 255, 0.85);
  border-color: rgba(80, 148, 255, 0.25);
  background: rgba(55, 120, 255, 0.08);
}

.selected-meals-clear-button {
  color: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.selected-meals-browse-link:hover,
.selected-meals-clear-button:hover {
  background: rgba(55, 120, 255, 0.16);
  border-color: rgba(80, 148, 255, 0.4);
  color: rgba(140, 190, 255, 0.95);
}

.selected-meals-empty {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
}

.selected-meal-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.selected-meal-label { color: rgba(120, 172, 255, 0.65); }
.selected-meal-content h3 { color: rgba(255, 255, 255, 0.9); }
.selected-meal-description { color: rgba(255, 255, 255, 0.5); }

.selected-meal-meta span,
.selected-meal-day-pill,
.selected-meal-times-button {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.65);
}

.selected-meal-day-pill-active,
.selected-meal-times-button-active {
  background: rgba(55, 120, 255, 0.18);
  border-color: rgba(80, 148, 255, 0.4);
  color: #fff;
}

.selected-meal-remove {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.55);
}

.selected-meal-controls { border-top-color: rgba(255, 255, 255, 0.07); }

/* ── Filter chips ────────────────────────────────────────── */

.filter-chip {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.65);
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
  color: rgba(255, 255, 255, 0.9);
}

.filter-chip-active {
  background: rgba(55, 120, 255, 0.18);
  border-color: rgba(80, 148, 255, 0.4);
  color: #fff;
  box-shadow: 0 0 30px rgba(55, 120, 255, 0.2);
}

.filter-chip-active:hover {
  background: rgba(55, 120, 255, 0.28);
  border-color: rgba(80, 148, 255, 0.55);
  color: #fff;
}

/* ── Cooking filter / recipe section ─────────────────────── */

.cooking-hero-panel,
.cooking-featured-section,
.cooking-filter-section,
.recipe-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.cooking-filter-section { box-shadow: none; }

.cooking-hero-panel {
  background: linear-gradient(148deg, rgba(10, 18, 46, 0.99) 0%, rgba(6, 12, 32, 0.97) 100%);
  border-color: rgba(80, 148, 255, 0.18);
}

.cooking-featured-section,
.cooking-filter-section {
  background: rgba(255, 255, 255, 0.035);
}

.cooking-filter-summary { color: rgba(255, 255, 255, 0.35); }
.cooking-plan-summary   { color: rgba(255, 255, 255, 0.6); }

/* ── Recipe cards ────────────────────────────────────────── */

.recipe-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.recipe-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(80, 148, 255, 0.22);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45), 0 0 40px rgba(55, 120, 255, 0.1);
}

.recipe-card:focus-within,
.recipe-card:focus-visible {
  border-color: rgba(80, 148, 255, 0.35);
  box-shadow: 0 0 0 3px rgba(80, 148, 255, 0.15), 0 28px 60px rgba(0, 0, 0, 0.45);
}

.recipe-label { color: rgba(100, 172, 255, 0.7); }

.recipe-card-body h3 { color: rgba(255, 255, 255, 0.9); }

.recipe-meta span {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.6);
}

.recipe-card-actions { border-top-color: rgba(255, 255, 255, 0.07); }

.recipe-plan-button {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
}

.recipe-plan-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(80, 148, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 20px rgba(55, 120, 255, 0.12);
}

.recipe-plan-button-added {
  background: rgba(55, 120, 255, 0.18);
  border-color: rgba(80, 148, 255, 0.4);
  color: #fff;
}

/* Recipe detail modal */
.recipe-detail-modal { background: rgba(0, 0, 0, 0.7); }

.recipe-detail-panel {
  background: rgba(6, 12, 28, 0.97);
  border-color: rgba(80, 148, 255, 0.18);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}

.recipe-detail-kicker { color: rgba(100, 172, 255, 0.7); }
.recipe-detail-header h2 { color: rgba(255, 255, 255, 0.92); }
.recipe-detail-header p { color: rgba(255, 255, 255, 0.52); }
.recipe-detail-header { border-bottom-color: rgba(255, 255, 255, 0.08); }

.recipe-detail-section {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.recipe-detail-section h3 { color: rgba(255, 255, 255, 0.8); }
.recipe-detail-section li,
.recipe-detail-section p { color: rgba(255, 255, 255, 0.58); }

.recipe-detail-protein-time {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.07);
}

.recipe-detail-tags span {
  background: rgba(55, 120, 255, 0.1);
  border-color: rgba(80, 148, 255, 0.2);
  color: rgba(120, 172, 255, 0.85);
}

.recipe-detail-add-button {
  background: rgba(55, 120, 255, 0.16);
  border-color: rgba(80, 148, 255, 0.3);
  color: #fff;
}

.recipe-detail-add-button:hover {
  background: rgba(55, 120, 255, 0.28);
  border-color: rgba(80, 148, 255, 0.5);
}

.recipe-detail-close {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

.recipe-detail-close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
}

/* ── Workout page ────────────────────────────────────────── */

.workout-hero-panel {
  background: linear-gradient(148deg, rgba(10, 18, 46, 0.99) 0%, rgba(6, 12, 32, 0.97) 100%);
  border-color: rgba(80, 148, 255, 0.18);
}

.workout-hero-copy h1 { color: rgba(255, 255, 255, 0.92); }
.workout-hero-copy p  { color: rgba(255, 255, 255, 0.52); }

.workout-category-card,
.workout-plan-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.workout-select-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

.workout-select-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(80, 148, 255, 0.2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  outline: none;
}

.workout-select-card.is-selected,
.workout-choice-card-dark {
  background: rgba(55, 120, 255, 0.12);
  border-color: rgba(80, 148, 255, 0.35);
  color: #fff;
  box-shadow: 0 0 30px rgba(55, 120, 255, 0.15);
}

.workout-option-label { color: rgba(255, 255, 255, 0.88); }
.workout-option-copy  { color: rgba(255, 255, 255, 0.48); }

.workout-select-card.is-selected .workout-option-label { color: #fff; }
.workout-select-card.is-selected .workout-option-copy  { color: rgba(255, 255, 255, 0.72); }

.workout-step-index { color: rgba(55, 120, 255, 0.35); }

.workout-card-tag,
.workout-choice-time,
.workout-difficulty,
.workout-choice-meta span {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.6);
}

.workout-empty-state {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.workout-empty-kicker {
  background: rgba(55, 120, 255, 0.1);
  border-color: rgba(80, 148, 255, 0.2);
  color: rgba(120, 172, 255, 0.8);
}

.workout-empty-state h3 { color: rgba(255, 255, 255, 0.88); }

/* Workout detail modal */
.workout-detail-backdrop { background: rgba(0, 0, 0, 0.72); }

.workout-detail-panel {
  background: rgba(6, 12, 28, 0.97);
  border-color: rgba(80, 148, 255, 0.18);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}

.workout-detail-kicker { color: rgba(100, 172, 255, 0.7); }
.workout-detail-header h2 { color: rgba(255, 255, 255, 0.92); }

.workout-detail-tags span,
.workout-detail-meta-card span,
.workout-rest-grid span {
  background: rgba(55, 120, 255, 0.08);
  border-color: rgba(80, 148, 255, 0.18);
  color: rgba(120, 172, 255, 0.85);
}

.workout-detail-close {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

.workout-detail-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
}

.workout-stat-grid .workout-stat,
.cooking-stat-grid .cooking-stat {
  background: rgba(55, 120, 255, 0.07);
  border-color: rgba(80, 148, 255, 0.15);
}

/* ── Workout builder sections ────────────────────────────── */

.workout-builder-section {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: none;
}

.workout-choice-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

.workout-choice-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(80, 148, 255, 0.22);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.workout-choice-card:focus-visible {
  outline: 3px solid rgba(80, 148, 255, 0.45);
  outline-offset: 4px;
}

.workout-choice-body h3 { color: rgba(255, 255, 255, 0.88); }
.workout-choice-body p  { color: rgba(255, 255, 255, 0.48); }

.workout-choice-action { color: rgba(255, 255, 255, 0.6); }

/* ── Results page ────────────────────────────────────────── */

.results-hero { border-bottom-color: rgba(255, 255, 255, 0.07); }
.results-hero-copy h1 { color: rgba(255, 255, 255, 0.92); }
.results-hero-copy p  { color: rgba(255, 255, 255, 0.52); }

.macro-card,
.day-card,
.detail-card,
.result-card,
.empty-state-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.macro-card:hover,
.day-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(80, 148, 255, 0.2);
}

.day-title { color: rgba(255, 255, 255, 0.88); }

.macro-label,
.detail-label,
.result-label,
.meal-section-label { color: rgba(100, 172, 255, 0.65); }

.macro-value,
.detail-value,
.result-value { color: rgba(255, 255, 255, 0.9); }

/* Meal title: visible white, bold via <strong> */
.meal-title { color: rgba(255, 255, 255, 0.88); }

/* Meal + day dividers */
.meal-section + .meal-section { border-top-color: rgba(255, 255, 255, 0.07); }
.day-total-line { border-top-color: rgba(255, 255, 255, 0.07); }

/* Per-meal and daily macro summary lines */
.meal-macro-line,
.day-total-line { color: rgba(255, 255, 255, 0.5); }

/* Meal action buttons */
.meal-regenerate-button,
.meal-manual-button {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
}

.meal-regenerate-button:hover,
.meal-manual-button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(80, 148, 255, 0.3);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: none;
}

.meal-source-badge {
  border-color: rgba(100, 172, 255, 0.22);
  background: rgba(100, 172, 255, 0.1);
  color: rgba(142, 194, 255, 0.8);
}

/* Regenerate error */
.meal-regenerate-error { color: rgba(255, 120, 100, 0.85); }

.meal-list li,
.grocery-list li { color: rgba(255, 255, 255, 0.72); }
.meal-list li + li,
.grocery-list li + li { border-top-color: rgba(255, 255, 255, 0.06); }

/* Grocery list section headers and summary */
.grocery-list .grocery-list-summary { color: rgba(255, 255, 255, 0.45); }
.grocery-list .grocery-list-section { color: rgba(100, 172, 255, 0.65); }

/* Edit Inputs / Regenerate buttons */
.secondary-link {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
}

.secondary-link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.results-panel { border-top-color: rgba(255, 255, 255, 0.07); }
.results-actions { border-top-color: rgba(255, 255, 255, 0.07); }

/* ── Detail section borders ──────────────────────────────── */

.detail-section + .detail-section { border-top-color: rgba(255, 255, 255, 0.07); }

/* ── Workout step heading index ──────────────────────────── */

.workout-step-index { color: rgba(55, 120, 255, 0.35); }

/* ── Cooking Clean — typography scale ────────────────────── */

/* Page hero heading — matches other pages' hero h1 scale */
.cooking-chip-heading h1 {
  font-size: clamp(2.8rem, 5vw, 4.7rem);
  line-height: 0.95;
  letter-spacing: -0.065em;
  font-weight: 800;
}

/* Description below the hero h1 */
.cooking-chip-heading p {
  font-size: 1.02rem;
  line-height: 1.75;
  max-width: 36rem;
  margin-top: 14px;
}

/* "Recipes" section heading — bigger than default section-heading h2 */
.cooking-card .section-heading h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

/* Recipe card titles — more presence */
.recipe-card-body h3 {
  font-size: clamp(1.4rem, 1.8vw, 1.65rem);
  letter-spacing: -0.045em;
  line-height: 1.15;
}

/* Recipe description — slightly more comfortable */
.recipe-card-body > p:not(.recipe-label) {
  font-size: 0.94rem;
  line-height: 1.7;
}

/* ── Cooking Clean meal titles in results ─────────────────── */

.meal-title.is-cooking-clean strong {
  color: rgba(255, 185, 55, 0.95);
}

/* ── Balance design system: connected app pages ─────────── */

.connected-page-shell {
  align-items: center;
}

.connected-page-card {
  width: min(100%, 1320px);
  padding-top: 20px;
}

.connected-page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(290px, 0.96fr);
  gap: 18px;
  padding-top: 34px;
  align-items: stretch;
}

.connected-page-hero-copy {
  color: rgba(255, 255, 255, 0.92);
}

.connected-page-hero-copy h1 {
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 4.7rem);
  line-height: 0.94;
  letter-spacing: -0.065em;
}

.connected-page-hero-copy p {
  max-width: 35rem;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.52);
  line-height: 1.8;
}

.connected-page-panel {
  padding: 24px;
  border: 1px solid rgba(80, 148, 255, 0.18);
  border-radius: 24px;
  background: linear-gradient(148deg, rgba(10, 18, 46, 0.99) 0%, rgba(6, 12, 32, 0.97) 100%);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.connected-page-panel-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.connected-page-panel h2 {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.connected-page-panel-copy {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.75;
}

.connected-page-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.connected-page-stat {
  padding: 14px 16px;
  border: 1px solid rgba(80, 148, 255, 0.15);
  border-radius: 18px;
  background: rgba(55, 120, 255, 0.07);
}

.connected-page-stat-label {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.connected-page-stat-value {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

/* ── Authentication ─────────────────────────────────────── */

.site-nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.site-nav-auth-loading {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.88rem;
  font-weight: 800;
}

.site-nav-auth .site-nav-auth-primary {
  border-color: rgba(80, 148, 255, 0.34);
  background: rgba(55, 120, 255, 0.18);
  color: #ffffff;
}

.site-nav-auth .site-nav-auth-primary:hover {
  background: rgba(55, 120, 255, 0.26);
  color: #ffffff;
}

.site-nav-auth .site-nav-auth-user {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav .site-nav-auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 42px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  box-shadow: none;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: none;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.site-nav .site-nav-auth-button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: none;
  transform: translateY(-1px);
}

.site-nav .site-nav-auth-button:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
}

/* ─── Auth gate — hide content until session is confirmed ──────────────────── */

[data-auth-required] {
  visibility: hidden;
}

/* The nav is injected inside the page shell — keep it always visible */
[data-auth-required] [data-site-nav] {
  visibility: visible;
}

/* Once auth-page.js sets data-auth-ready, fade the content in */
[data-auth-required][data-auth-ready] {
  visibility: visible;
  animation: auth-gate-reveal 0.18s ease both;
}

@keyframes auth-gate-reveal {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.auth-page-card {
  min-height: min(760px, calc(100vh - 32px));
}

.auth-page-hero {
  align-items: center;
  padding-bottom: 52px;
}

.auth-page-copy p {
  max-width: 37rem;
}

.auth-panel {
  width: min(100%, 520px);
  justify-self: end;
}

.auth-form {
  margin-top: 22px;
}

.auth-form button[type="submit"] {
  margin-top: 4px;
}

.auth-form button:disabled,
.auth-panel button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.auth-message {
  grid-column: 1 / -1;
  min-height: 1.5em;
  margin: -4px 0 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.92rem;
  line-height: 1.5;
}

.auth-message-error {
  color: #ffb4a8;
}

.auth-message-success {
  color: #9ee7ba;
}

.auth-switch {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.52);
  line-height: 1.65;
}

.auth-switch a {
  color: rgba(135, 188, 255, 0.95);
  font-weight: 800;
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-switch a:hover {
  color: #ffffff;
}

.auth-context-notice {
  font-size: 0.82rem;
  color: rgba(135, 188, 255, 0.65);
  margin: -4px 0 10px;
  line-height: 1.55;
}

.auth-context-notice:empty {
  display: none;
}

.auth-dev-hint {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 196, 0, 0.28);
  border-radius: 14px;
  background: rgba(255, 196, 0, 0.06);
}

.auth-dev-hint-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 196, 0, 0.7);
}

.auth-dev-hint-link {
  font-size: 0.82rem;
  color: rgba(135, 188, 255, 0.9);
  word-break: break-all;
  text-decoration: none;
}

.auth-dev-hint-link:hover {
  color: #ffffff;
}

.auth-account-summary {
  display: grid;
  gap: 12px;
  margin: 24px 0 18px;
}

.auth-account-summary > div {
  padding: 16px 18px;
  border: 1px solid rgba(80, 148, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.auth-account-summary span {
  display: block;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-account-summary strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  line-height: 1.4;
}

/* ── Supplements page ───────────────────────────────────── */

.supplements-card > .detail-section {
  margin-top: 32px;
}

.supplements-filter-section,
.supplement-card,
.supplement-detail-panel,
.supplement-detail-meta-card,
.supplement-detail-block,
.supplement-basics-card,
.supplement-empty-state {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow-soft);
}

.supplements-filter-section {
  padding: 18px 20px 20px;
  box-shadow: none;
}

.supplement-search-control {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.supplement-search-control label {
  color: rgba(100, 172, 255, 0.72);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.supplement-search-control input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  font: inherit;
  font-size: 0.96rem;
  outline: none;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.supplement-search-control input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.supplement-search-control input:focus {
  border-color: rgba(80, 148, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(55, 120, 255, 0.16);
}

.supplement-filter-status {
  margin: 14px 2px 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.9rem;
  line-height: 1.6;
}

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

.supplement-list-section {
  display: grid;
  grid-column: 1 / -1;
  gap: 14px;
}

.supplement-list-section + .supplement-list-section {
  margin-top: 10px;
}

.supplement-list-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.supplement-list-heading h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.supplement-list-heading p {
  margin: 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.86rem;
  line-height: 1.5;
  text-align: right;
}

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

.supplement-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  color: rgba(255, 255, 255, 0.82);
  text-align: left;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.supplement-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(80, 148, 255, 0.22);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45), 0 0 40px rgba(55, 120, 255, 0.1);
}

.supplement-card:focus-visible {
  outline: 3px solid rgba(80, 148, 255, 0.45);
  outline-offset: 4px;
}

.supplement-card.is-active {
  background: rgba(55, 120, 255, 0.12);
  border-color: rgba(80, 148, 255, 0.35);
  color: #ffffff;
  box-shadow: 0 0 30px rgba(55, 120, 255, 0.15);
}

.supplement-card-open {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}

.supplement-card-open:hover,
.supplement-card-open:focus-visible {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.supplement-card-open:focus-visible {
  outline: 2px solid rgba(80, 148, 255, 0.45);
  outline-offset: 5px;
}

.supplement-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.supplement-card-kicker {
  margin: 0;
  color: rgba(100, 172, 255, 0.7);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.supplement-card h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.48rem;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.supplement-card-description {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.72;
}

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

.supplement-card-meta-item {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.supplement-card-meta-item span,
.supplement-detail-meta-card span {
  display: block;
  color: rgba(100, 172, 255, 0.72);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.supplement-card-meta-item strong,
.supplement-detail-meta-card strong {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.98rem;
  line-height: 1.55;
  font-weight: 600;
}

.supplement-stack-control {
  display: grid;
  gap: 9px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.supplement-stack-label {
  color: rgba(100, 172, 255, 0.72);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.supplement-stack-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.supplement-stack-select {
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(5, 10, 24, 0.66);
  color: rgba(255, 255, 255, 0.86);
  font: inherit;
  font-size: 0.8rem;
}

.supplement-stack-add-btn,
.supplement-stack-remove-btn,
.dash-supplement-remove {
  min-height: 38px;
  margin: 0;
  padding: 0 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.supplement-stack-add-btn {
  border: 1px solid rgba(80, 148, 255, 0.34);
  background: rgba(55, 120, 255, 0.14);
  color: rgba(185, 216, 255, 0.94);
}

.supplement-stack-add-btn:hover {
  background: rgba(55, 120, 255, 0.22);
  border-color: rgba(80, 148, 255, 0.52);
}

.supplement-stack-remove-btn {
  justify-self: start;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: rgba(255, 255, 255, 0.44);
}

.supplement-stack-remove-btn:hover {
  border-color: rgba(255, 100, 100, 0.3);
  background: rgba(255, 80, 80, 0.1);
  color: rgba(255, 150, 150, 0.9);
}

.supplement-stack-add-btn:disabled,
.supplement-stack-remove-btn:disabled,
.dash-supplement-remove:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.supplement-stack-status {
  margin: 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.76rem;
  line-height: 1.45;
}

.supplement-stack-detail-section .supplement-stack-control {
  margin-top: 12px;
}

.supplement-evidence {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.supplement-evidence-strong {
  border-color: rgba(80, 148, 255, 0.28);
  background: rgba(55, 120, 255, 0.16);
  color: rgba(185, 216, 255, 0.96);
}

.supplement-evidence-solid {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.82);
}

.supplement-evidence-situational {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.68);
}

.supplement-detail-panel {
  padding: 24px;
}

.supplement-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.supplement-detail-kicker {
  margin: 0;
  color: rgba(100, 172, 255, 0.72);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.supplement-detail-intro h3 {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.supplement-detail-intro > p:last-child {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.56);
  line-height: 1.75;
}

.supplement-detail-evidence-wrap {
  display: flex;
  justify-content: flex-end;
}

.supplement-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.supplement-detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(80, 148, 255, 0.2);
  border-radius: 999px;
  background: rgba(55, 120, 255, 0.08);
  color: rgba(120, 172, 255, 0.85);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.supplement-detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.supplement-detail-meta-card {
  padding: 16px 18px;
  box-shadow: none;
}

.supplement-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.supplement-detail-block {
  padding: 18px 20px;
  box-shadow: none;
}

.supplement-detail-block-wide {
  grid-column: 1 / -1;
}

.supplement-detail-block h4 {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.supplement-detail-block p,
.supplement-detail-block ul {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.72;
}

.supplement-detail-block ul {
  padding-left: 18px;
}

.supplement-detail-block li + li {
  margin-top: 8px;
}

.supplement-detail-block li strong {
  color: rgba(255, 255, 255, 0.82);
}

.supplement-stack-tags {
  margin-top: 12px;
}

.supplement-detail-modal-panel .workout-detail-meta-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.supplement-detail-modal-panel .workout-detail-section p {
  margin: 14px 0 0;
  color: var(--text-secondary);
  line-height: 1.75;
}

.supplement-modal-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.supplement-basics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.supplement-basics-card {
  padding: 18px 20px;
  box-shadow: none;
}

.supplement-basics-card h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.supplement-basics-card p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.56);
  line-height: 1.68;
}

.supplement-basics-note {
  margin: 18px 2px 0;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.62;
}

.supplement-empty-state {
  padding: 22px;
  box-shadow: none;
}

.supplement-empty-state h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.supplement-empty-state p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
}

@media (max-width: 1080px) {
  .supplement-detail-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 980px) {
  .connected-page-hero {
    grid-template-columns: 1fr;
  }

  .supplement-grid,
  .supplement-section-grid,
  .supplement-modal-detail-grid,
  .supplement-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .connected-page-stat-grid,
  .supplement-card-meta,
  .supplement-detail-modal-panel .workout-detail-meta-grid,
  .supplement-detail-meta-grid,
  .supplement-basics-grid {
    grid-template-columns: 1fr;
  }

  .supplement-detail-head {
    flex-direction: column;
  }

  .supplement-detail-evidence-wrap {
    justify-content: flex-start;
  }

  .supplement-list-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .supplement-list-heading p {
    text-align: left;
  }

  .supplement-stack-row {
    grid-template-columns: 1fr;
  }

  .supplement-stack-add-btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .supplements-card > .detail-section {
    margin-top: 24px;
  }

  .supplements-filter-section,
  .supplement-detail-panel,
  .supplement-card,
  .supplement-detail-meta-card,
  .supplement-detail-block,
  .supplement-basics-card,
  .supplement-empty-state {
    border-radius: 20px;
  }

  .supplements-filter-section,
  .supplement-detail-panel {
    padding: 18px;
  }
}

@media (max-width: 980px) {
  .auth-panel {
    width: 100%;
    justify-self: start;
  }
}

@media (max-width: 860px) {
  .site-nav-auth {
    width: 100%;
    margin: 6px 0 0;
    padding: 10px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 0;
  }

  .site-nav-auth a,
  .site-nav .site-nav-auth-button {
    flex: 1 1 0;
    min-width: 0;
  }

  .site-nav-auth .site-nav-auth-user {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .auth-page-card {
    min-height: auto;
  }

  .auth-page-hero {
    padding-top: 18px;
    padding-bottom: 30px;
  }

  .auth-account-summary > div {
    padding: 14px 15px;
  }
}

/* ─── Avatar ─────────────────────────────────────────────────────────────── */

.balance-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--avatar-bg, hsl(220, 62%, 52%));
  background-size: cover;
  background-position: center;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  user-select: none;
  overflow: hidden;
}

.balance-avatar[data-has-image="true"] {
  font-size: 0;
}

.balance-avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.68rem;
}

.balance-avatar-md {
  width: 48px;
  height: 48px;
  font-size: 0.85rem;
}

.balance-avatar-lg {
  width: 80px;
  height: 80px;
  font-size: 1.4rem;
}

/* ─── Nav profile trigger ─────────────────────────────────────────────────── */

.site-nav-profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  transition: background 0.15s, color 0.15s;
}

.site-nav-profile:hover,
.site-nav-profile.is-active {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.site-nav-profile-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Shared nav refinement ───────────────────────────────────────────────── */

.site-nav-inner {
  gap: 20px;
}

.site-nav-links {
  flex: 1 1 auto;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.site-nav-item,
.site-nav-dropdown {
  flex: 0 0 auto;
}

.site-nav-links a,
.site-nav-dropdown-toggle {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  text-transform: none;
}

.site-nav-links a[hidden] {
  display: none !important;
}

.site-nav-dropdown-toggle {
  width: auto;
  margin: 0;
  gap: 7px;
  box-shadow: none;
}

.site-nav-dropdown-toggle:hover {
  box-shadow: none;
}

.site-nav-dropdown-menu {
  min-width: 216px;
  border-radius: 20px;
}

.site-nav-dropdown-menu a {
  min-height: 40px;
  font-size: 0.84rem;
}

.site-nav-auth {
  flex: 0 0 auto;
  gap: 6px;
  margin-left: 10px;
  padding-left: 10px;
}

.site-nav-auth a,
.site-nav-auth-loading,
.site-nav .site-nav-auth-button {
  min-height: 38px;
  padding: 0 13px;
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
}

.site-nav-profile-menu {
  position: relative;
  flex: 0 0 auto;
}

.site-nav .site-nav-profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-height: 38px;
  margin: 0;
  padding: 3px 10px 3px 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.site-nav .site-nav-profile:hover,
.site-nav .site-nav-profile.is-active,
.site-nav-profile-menu[data-open="true"] .site-nav-profile {
  border-color: rgba(80, 148, 255, 0.26);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.95);
  box-shadow: none;
  transform: translateY(-1px);
}

.site-nav-profile .site-nav-dropdown-caret {
  width: 7px;
  height: 7px;
  margin: -3px 0 0 1px;
}

.site-nav-profile-menu[data-open="true"] .site-nav-profile .site-nav-dropdown-caret {
  opacity: 1;
  transform: rotate(-135deg);
}

.site-nav-profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 6px;
  width: 230px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(5, 10, 24, 0.98);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
  z-index: 45;
}

.site-nav-profile-menu[data-open="true"] .site-nav-profile-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.site-nav-profile-identity {
  display: grid;
  gap: 4px;
  padding: 10px 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-nav-profile-identity strong,
.site-nav-profile-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav-profile-identity strong {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.88rem;
  line-height: 1.2;
}

.site-nav-profile-identity span {
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.78rem;
}

.site-nav-profile-menu-link,
.site-nav .site-nav-profile-menu-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  box-shadow: none;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: 0;
  text-align: left;
  text-decoration: none;
  text-transform: none;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.site-nav-profile-menu-link:hover,
.site-nav .site-nav-profile-menu-button:hover {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.94);
  box-shadow: none;
  transform: none;
}

.site-nav .site-nav-profile-menu-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

@media (max-width: 1080px) {
  .site-nav-inner {
    position: relative;
    min-height: 88px;
    padding: 0 0 18px;
  }

  .site-nav-logo {
    width: min(44vw, 170px);
  }

  .site-nav-links {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background: rgba(5, 10, 24, 0.97);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
  }

  .site-nav[data-open="true"] .site-nav-links {
    display: flex;
  }

  .site-nav-links a,
  .site-nav-dropdown-toggle {
    width: 100%;
    justify-content: flex-start;
    min-height: 44px;
    padding: 0 14px;
  }

  .site-nav-item,
  .site-nav-dropdown {
    width: 100%;
  }

  .site-nav-dropdown {
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .site-nav-dropdown-toggle {
    justify-content: space-between;
  }

  .site-nav-dropdown-menu,
  .site-nav-profile-dropdown-menu {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    margin-top: 6px;
    padding: 6px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .site-nav-dropdown[data-open="true"] .site-nav-dropdown-menu,
  .site-nav-profile-menu[data-open="true"] .site-nav-profile-dropdown-menu {
    display: grid;
  }

  .site-nav-auth {
    width: 100%;
    margin: 6px 0 0;
    padding: 10px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 0;
  }

  .site-nav-auth > a,
  .site-nav-profile-menu,
  .site-nav .site-nav-profile,
  .site-nav .site-nav-auth-button {
    width: 100%;
  }

  .site-nav .site-nav-profile {
    justify-content: flex-start;
  }

  .site-nav-toggle {
    display: inline-flex;
  }
}

@media (max-width: 1080px) {
  body.is-home-page .site-nav[data-open="true"] {
    z-index: 90;
  }

  body.is-home-page .site-nav[data-open="true"] .site-nav-links {
    isolation: isolate;
    border-color: rgba(120, 180, 255, 0.18);
    background:
      linear-gradient(180deg, rgba(8, 14, 34, 0.995) 0%, rgba(4, 8, 22, 0.995) 100%);
    box-shadow:
      0 34px 82px rgba(0, 0, 0, 0.82),
      0 0 0 1px rgba(80, 148, 255, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.is-home-page .site-nav[data-open="true"] .site-nav-links > * {
    animation: none;
    opacity: 1;
    transform: none;
  }

  body.is-home-page .site-nav[data-open="true"] .site-nav-links a,
  body.is-home-page .site-nav[data-open="true"] .site-nav-dropdown-toggle,
  body.is-home-page .site-nav[data-open="true"] .site-nav-auth-loading,
  body.is-home-page .site-nav[data-open="true"] .site-nav-auth-button,
  body.is-home-page .site-nav[data-open="true"] .site-nav-profile,
  body.is-home-page .site-nav[data-open="true"] .site-nav-profile-menu-link,
  body.is-home-page .site-nav[data-open="true"] .site-nav-profile-menu-button {
    color: rgba(255, 255, 255, 0.86);
  }

  body.is-home-page .site-nav[data-open="true"] .site-nav-auth .site-nav-auth-primary {
    color: #fff;
  }

  body.is-home-page .site-nav[data-open="true"] .site-nav-links a:hover,
  body.is-home-page .site-nav[data-open="true"] .site-nav-dropdown-toggle:hover,
  body.is-home-page .site-nav[data-open="true"] .site-nav-profile:hover,
  body.is-home-page .site-nav[data-open="true"] .site-nav-profile-menu-link:hover,
  body.is-home-page .site-nav[data-open="true"] .site-nav-profile-menu-button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
  }

  body.is-home-page .site-nav[data-open="true"] .site-nav-links a.is-active,
  body.is-home-page .site-nav[data-open="true"] .site-nav-dropdown-toggle.is-active,
  body.is-home-page .site-nav[data-open="true"] .site-nav-profile.is-active,
  body.is-home-page .site-nav[data-open="true"] .site-nav-profile-menu[data-open="true"] .site-nav-profile {
    color: #fff;
    background: rgba(55, 120, 255, 0.2);
    border-color: rgba(100, 170, 255, 0.3);
  }

  body.is-home-page .site-nav[data-open="true"] .site-nav-dropdown-menu,
  body.is-home-page .site-nav[data-open="true"] .site-nav-profile-dropdown-menu {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.09);
  }
}

/* ─── Profile page layout ─────────────────────────────────────────────────── */

.profile-page-shell {
  padding-bottom: 60px;
}

.profile-page-hero {
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-top: 32px;
}

.profile-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 28px 20px 24px;
  border: 1px solid rgba(80, 148, 255, 0.15);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(12, 22, 55, 0.95) 0%, rgba(6, 12, 32, 0.92) 100%);
  text-align: center;
}

.profile-avatar-wrap {
  position: relative;
  display: inline-block;
}

.profile-avatar-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-label {
  position: absolute;
  bottom: -4px;
  right: -4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(24, 48, 110, 0.98);
  border: 1.5px solid rgba(80, 148, 255, 0.35);
  color: rgba(135, 188, 255, 0.9);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  padding: 0;
}

.profile-avatar-label:hover {
  background: rgba(40, 80, 160, 0.98);
  color: #ffffff;
  border-color: rgba(80, 148, 255, 0.65);
}

.profile-summary-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.profile-summary-name {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  min-height: 1.4em;
  word-break: break-word;
}

.profile-summary-email {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  word-break: break-all;
}

.profile-summary-joined {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 2px;
}

.profile-logout-button {
  width: 100%;
  margin-top: 4px;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.profile-logout-button:hover {
  background: rgba(255, 80, 80, 0.12);
  border-color: rgba(255, 80, 80, 0.25);
  color: rgba(255, 140, 140, 0.9);
}

/* ─── Profile panel (right side) ─────────────────────────────────────────── */

.profile-panel {
  padding: 28px 30px 32px;
}

.profile-section {
  padding: 20px 0 4px;
}

.profile-section-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(135, 188, 255, 0.6);
  margin: 0 0 18px;
}

.profile-form {
  gap: 14px;
}

.profile-divider {
  border: none;
  border-top: 1px solid rgba(80, 148, 255, 0.12);
  margin: 8px 0 0;
}

/* ─── Avatar upload in form ──────────────────────────────────────────────── */

.profile-upload-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-upload-preview {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(80, 148, 255, 0.18);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-upload-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-upload-trigger {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(80, 148, 255, 0.22);
  color: rgba(135, 188, 255, 0.85);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.profile-upload-trigger:hover {
  background: rgba(80, 148, 255, 0.12);
  color: #ffffff;
}

.profile-upload-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  opacity: 0;
}

/* ─── Profile responsive ─────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .profile-page-hero {
    grid-template-columns: 1fr;
  }

  .profile-summary {
    flex-direction: row;
    flex-wrap: wrap;
    text-align: left;
    padding: 20px;
    gap: 16px;
  }

  .profile-avatar-wrap {
    flex-shrink: 0;
  }

  .profile-summary-info {
    flex: 1;
    min-width: 120px;
  }

  .profile-logout-button {
    width: auto;
    margin-top: 0;
    align-self: flex-start;
    margin-left: auto;
  }

  .profile-panel {
    padding: 24px 22px 28px;
  }
}

@media (max-width: 640px) {
  .profile-summary {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-logout-button {
    width: 100%;
    margin-left: 0;
  }
}

/* ── Progress Tracker ────────────────────────────────────────────────────── */

.progress-card > .detail-section {
  margin-top: 32px;
}

/* Summary panel extras */

.progress-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-top: 16px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.progress-status-on-track {
  background: rgba(40, 200, 120, 0.18);
  border: 1px solid rgba(40, 200, 120, 0.35);
  color: rgba(100, 240, 160, 0.92);
}

.progress-status-plateau {
  background: rgba(255, 160, 40, 0.14);
  border: 1px solid rgba(255, 160, 40, 0.3);
  color: rgba(255, 190, 80, 0.92);
}

.progress-data-counts {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.78rem;
  line-height: 1.5;
}

.progress-stat-empty {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.92rem;
  letter-spacing: 0;
}

.optional-section-tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.8;
  position: relative;
  top: -2px;
}

/* How it works list */

.progress-how-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  overflow: hidden;
}

.progress-how-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.progress-how-item:last-child {
  border-bottom: none;
}

.progress-how-key {
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: -0.01em;
}

.progress-how-val {
  font-size: 0.835rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.46);
}

/* Two-column grid inside each section (form + history) */

.progress-section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  margin-top: 20px;
  align-items: start;
}

/* Form card */

.progress-form-card {
  padding: 22px 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
}

.progress-form-card-label {
  margin: 0 0 14px;
  color: rgba(100, 172, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress-log-form {
  gap: 12px;
}

.progress-form-error {
  margin: 0;
  font-size: 0.82rem;
}

.progress-page-shell input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  color-scheme: dark;
  min-height: 52px;
  border-color: rgba(255, 255, 255, 0.11);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(5, 10, 24, 0.68);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.progress-page-shell input[type="date"]:hover {
  border-color: rgba(80, 148, 255, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(8, 15, 36, 0.78);
}

.progress-page-shell input[type="date"]:focus {
  border-color: rgba(100, 172, 255, 0.55);
  box-shadow:
    0 0 0 4px rgba(80, 148, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.progress-page-shell input[type="date"]::-webkit-datetime-edit,
.progress-page-shell input[type="date"]::-webkit-date-and-time-value {
  color: rgba(255, 255, 255, 0.9);
}

.progress-page-shell input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.35) saturate(0.8);
  opacity: 0.72;
  cursor: pointer;
}

.progress-page-shell textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border-color: rgba(255, 255, 255, 0.11);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(5, 10, 24, 0.68);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.progress-page-shell textarea:hover {
  border-color: rgba(80, 148, 255, 0.3);
}

.progress-page-shell textarea:focus {
  border-color: rgba(100, 172, 255, 0.55);
  box-shadow:
    0 0 0 4px rgba(80, 148, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* History card */

.progress-history-card {
  padding: 18px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.02);
}

.progress-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.progress-panel-heading h3,
.progress-panel-heading h4 {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.progress-panel-label {
  margin: 0;
  color: rgba(100, 172, 255, 0.72);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress-panel-heading > span {
  max-width: 14rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: right;
}

.progress-panel-heading-secondary {
  margin-top: 18px;
}

/* 7-day average display */

.progress-avg-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.progress-avg-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1;
}

.progress-avg-label {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

/* Weight / measurement entry list */

.progress-entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-entry-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  transition: background 150ms ease;
}

.progress-entry-row:hover {
  background: rgba(255, 255, 255, 0.055);
}

.progress-entry-date {
  flex: 1;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.84rem;
}

.progress-entry-value {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.progress-entry-delete {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.7rem;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  padding: 0;
}

.progress-entry-delete:hover {
  background: rgba(255, 80, 80, 0.14);
  border-color: rgba(255, 80, 80, 0.35);
  color: rgba(255, 120, 120, 0.9);
}

.progress-entry-delete:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.progress-entry-loading,
.progress-empty-note,
.progress-entry-more {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.85rem;
  padding: 8px 0;
  list-style: none;
}

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

.progress-pr-best-grid,
.progress-consistency-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.progress-pr-best-card,
.progress-consistency-stat {
  min-width: 0;
  padding: 14px 12px;
  border: 1px solid rgba(80, 148, 255, 0.14);
  border-radius: 16px;
  background: rgba(55, 120, 255, 0.06);
}

.progress-pr-best-card {
  display: grid;
  gap: 7px;
}

.progress-pr-best-card span,
.progress-consistency-stat span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.progress-pr-best-card .progress-pr-exercise {
  color: rgba(100, 172, 255, 0.74);
}

.progress-pr-best-card strong,
.progress-consistency-stat strong {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.progress-pr-best-card span:last-child {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.45;
  text-transform: none;
}

.progress-rich-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  transition: background 150ms ease;
}

.progress-rich-row:hover {
  background: rgba(255, 255, 255, 0.055);
}

.progress-rich-row-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.progress-rich-row-main strong {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.92rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-row-note {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.78rem;
  line-height: 1.45;
}

.progress-rich-row-value {
  display: grid;
  justify-items: end;
  gap: 3px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.progress-rich-row-value small {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.72rem;
  font-weight: 600;
}

.progress-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.progress-status-chip-completed {
  border: 1px solid rgba(40, 200, 120, 0.3);
  background: rgba(40, 200, 120, 0.14);
  color: rgba(120, 240, 170, 0.9);
}

.progress-status-chip-missed {
  border: 1px solid rgba(255, 160, 40, 0.28);
  background: rgba(255, 160, 40, 0.12);
  color: rgba(255, 200, 110, 0.92);
}

/* Measurement change overview grid */

.progress-measurement-change-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.progress-measurement-stat {
  padding: 14px 12px;
  border: 1px solid rgba(80, 148, 255, 0.14);
  border-radius: 16px;
  background: rgba(55, 120, 255, 0.06);
}

.progress-measurement-label {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.progress-measurement-value {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Measurement history rows */

.progress-measurement-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 4px;
}

.progress-measurement-values {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.progress-measurement-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.75rem;
  line-height: 1;
}

.progress-measurement-chip strong {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.82rem;
  font-weight: 700;
}

/* Progress photos */

.progress-photo-upload-card {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 24px;
}

.progress-photo-upload-fields {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 14px;
  align-items: end;
}

.progress-file-field {
  min-width: 0;
}

.progress-file-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 8px 10px 8px 14px;
  border: 1px dashed rgba(80, 148, 255, 0.35);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(55, 120, 255, 0.06);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  overflow: hidden;
  gap: 10px;
}

.progress-file-label:hover,
.progress-file-label:focus-within {
  background: rgba(55, 120, 255, 0.12);
  border-color: rgba(80, 148, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(80, 148, 255, 0.1);
}

.progress-file-label-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.progress-file-label-text {
  color: rgba(100, 172, 255, 0.72);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-file-label-hint {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.72rem;
  line-height: 1.2;
}

.progress-file-label-action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(80, 148, 255, 0.24);
  border-radius: 999px;
  background: rgba(55, 120, 255, 0.12);
  color: rgba(180, 215, 255, 0.92);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.progress-photo-preview {
  display: block;
  width: 86px;
  height: 108px;
  max-width: 100%;
  border-radius: 12px;
  margin-top: 14px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
}

.progress-photo-preview[hidden] {
  display: none;
}

.progress-photo-upload-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.progress-upload-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border: none;
  border-radius: 14px;
  background: var(--button-bg);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.progress-upload-btn:hover {
  background: var(--button-hover);
  box-shadow: var(--button-shadow);
}

.progress-upload-btn:disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* Photo grid */

.progress-photo-gallery-card {
  padding: 18px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.02);
}

.progress-photo-grid {
  display: grid;
  gap: 18px;
}

.progress-photo-date-group {
  display: grid;
  gap: 10px;
}

.progress-photo-date-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-photo-date-heading h4 {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}

.progress-photo-date-heading span {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.progress-photo-date-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 140px));
  justify-content: start;
  gap: 12px;
}

.progress-photo-card {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.progress-photo-img-wrap {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

.progress-photo-view-button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}

.progress-photo-view-button:focus-visible {
  outline: 2px solid rgba(100, 172, 255, 0.72);
  outline-offset: -2px;
}

.progress-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 220ms ease;
}

.progress-photo-card:hover .progress-photo-img {
  transform: scale(1.02);
}

.progress-photo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
}

.progress-photo-category {
  color: rgba(100, 172, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress-photo-date {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.74rem;
}

.progress-photo-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(5, 10, 24, 0.7);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.7rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 160ms ease, background 160ms ease;
  padding: 0;
}

.progress-photo-card:hover .progress-photo-delete {
  opacity: 1;
}

.progress-photo-delete:hover {
  background: rgba(255, 60, 60, 0.7);
  color: #fff;
  border-color: rgba(255, 80, 80, 0.4);
}

body.progress-photo-lightbox-open {
  overflow: hidden;
}

.progress-photo-lightbox[hidden] {
  display: none;
}

.progress-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding: 24px;
  overflow: hidden;
}

.progress-photo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at top left, rgba(80, 148, 255, 0.14), transparent 34%),
    rgba(4, 8, 18, 0.76);
  backdrop-filter: blur(16px);
  cursor: zoom-out;
}

.progress-photo-lightbox-panel {
  position: relative;
  z-index: 1;
  width: fit-content;
  max-width: 92vw;
  max-height: 92vh;
  max-height: 92dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px;
  box-sizing: border-box;
  border: 1px solid rgba(80, 148, 255, 0.2);
  border-radius: 24px;
  background: rgba(6, 12, 28, 0.97);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.72);
  overflow: visible;
}

.progress-photo-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-width: min(320px, 85vw);
}

.progress-photo-lightbox-header figcaption {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress-photo-lightbox-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.progress-photo-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.94);
}

.progress-photo-lightbox-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 85vw;
  max-height: min(85vh, calc(100vh - 120px));
  max-height: min(85dvh, calc(100dvh - 120px));
  object-fit: contain;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.36);
}

/* Responsive */

@media (max-width: 960px) {
  .progress-section-grid {
    grid-template-columns: 1fr;
  }

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

  .progress-photo-upload-fields {
    grid-template-columns: 1fr 1fr;
  }

  .progress-file-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .progress-panel-heading {
    flex-direction: column;
    gap: 8px;
  }

  .progress-panel-heading > span {
    max-width: none;
    text-align: left;
  }

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

  .progress-pr-best-grid,
  .progress-consistency-stat-grid {
    grid-template-columns: 1fr;
  }

  .progress-rich-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .progress-rich-row-value {
    grid-column: 1 / -1;
    justify-items: start;
    white-space: normal;
  }

  .progress-photo-date-grid {
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  }

  .progress-photo-upload-fields {
    grid-template-columns: 1fr;
  }

  .progress-photo-lightbox {
    padding: 14px;
  }

  .progress-photo-lightbox-panel {
    padding: 12px;
    border-radius: 20px;
  }

  .progress-photo-lightbox-header {
    align-items: flex-start;
  }
}

/* ── Daily Dashboard ─────────────────────────────────────────────────────── */

:where(.dashboard-card, .dash-supplement-detail-modal) button,
.dashboard-card a {
  -webkit-tap-highlight-color: transparent;
}

:where(.dashboard-card, .dash-supplement-detail-modal) button {
  appearance: none;
  -webkit-appearance: none;
  width: auto;
  min-height: auto;
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
  filter: none;
  transition: none;
}

:where(.dashboard-card, .dash-supplement-detail-modal) button:hover,
:where(.dashboard-card, .dash-supplement-detail-modal) button:focus-visible {
  background: transparent;
  box-shadow: none;
  filter: none;
  transition: none;
  transform: none;
}

:where(.dashboard-card, .dash-supplement-detail-modal) button:focus-visible {
  outline: 2px solid rgba(80, 148, 255, 0.36);
  outline-offset: 3px;
}

:where(.dashboard-card, .dash-supplement-detail-modal) button:active {
  box-shadow: none;
  filter: none;
  transition: none;
  transform: none;
}

/* Hero date line */

.dashboard-hero-date {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.95rem;
}

.dashboard-page-shell {
  overflow-anchor: none;
}

.dashboard-page-shell[data-auth-required][data-auth-ready] {
  animation: none;
}

/* Two-column module grid: meals + workout */

.dash-modules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

/* Individual module card */

.dash-module {
  padding: 22px 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.025);
  min-height: 260px;
}

.dash-module-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.dash-module-kicker {
  margin: 0 0 2px;
  color: rgba(100, 172, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dash-module-title {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dash-module-action {
  flex-shrink: 0;
  margin-top: 4px;
  color: rgba(100, 172, 255, 0.75);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.dash-module-action:hover {
  color: rgba(160, 210, 255, 0.95);
}

/* Macro strip */

.dash-macro-strip {
  display: flex;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(55, 120, 255, 0.07);
  border: 1px solid rgba(55, 120, 255, 0.12);
  margin-bottom: 12px;
}

.dash-macro-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 1px;
}

.dash-macro-value {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
}

.dash-macro-label {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.67rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Meal rows */

.dash-day-label {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.32);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dash-meal-card-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-meal-card {
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dash-meal-detail-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.22s ease;
  overflow: hidden;
}

.dash-meal-detail-wrapper[data-expanded] {
  grid-template-rows: 1fr;
}

.dash-meal-detail-wrapper > div {
  min-height: 0;
  overflow: hidden;
}

.dash-meal-card:hover,
.dash-meal-card.is-expanded {
  border-color: rgba(80, 148, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.dash-meal-card.is-complete {
  border-color: rgba(80, 220, 150, 0.18);
  background: rgba(40, 200, 120, 0.045);
}

.dash-meal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
}

.dash-meal-expand-btn {
  display: grid;
  grid-template-columns: minmax(72px, auto) 1fr;
  align-items: baseline;
  gap: 10px;
  flex: 1;
  min-width: 0;
  min-height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}

.dash-meal-expand-btn:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.dash-meal-expand-btn:focus-visible {
  outline: 2px solid rgba(80, 148, 255, 0.42);
  outline-offset: 4px;
  border-radius: 12px;
}

.dash-meal-slot {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dash-meal-name {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.875rem;
  line-height: 1.4;
  min-width: 0;
}

.dash-meal-complete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  width: auto;
  min-height: 30px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.46);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
}

.dash-meal-complete-btn:hover {
  border-color: rgba(80, 148, 255, 0.24);
  background: rgba(55, 120, 255, 0.08);
  color: rgba(170, 210, 255, 0.88);
  box-shadow: none;
  transform: none;
}

.dash-meal-complete-btn[aria-pressed="true"] {
  border-color: rgba(80, 220, 150, 0.28);
  background: rgba(40, 200, 120, 0.1);
  color: rgba(135, 245, 185, 0.9);
}

.dash-meal-complete-btn span:first-child {
  width: 12px;
  text-align: center;
}

.dash-meal-detail {
  margin: 0 10px 10px;
  padding: 14px;
  border: 1px solid rgba(80, 148, 255, 0.12);
  border-radius: 14px;
  background: rgba(4, 8, 18, 0.28);
}

.dash-meal-detail-macros {
  margin: 0 0 12px;
  color: rgba(140, 190, 255, 0.84);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
}

.dash-meal-detail-block + .dash-meal-detail-block {
  margin-top: 12px;
}

.dash-meal-detail-label {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dash-meal-detail-list {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.8rem;
  line-height: 1.55;
}

.dash-meal-detail-list li + li {
  margin-top: 4px;
}

/* Workout module */

.dash-workout-state {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-selected-workout {
  padding: 16px;
  border: 1px solid rgba(80, 148, 255, 0.16);
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(55, 120, 255, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.035);
}

.dash-selected-workout-source {
  margin: 0 0 8px;
  color: rgba(100, 172, 255, 0.78);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dash-selected-workout-title {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.1rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.dash-selected-workout-summary {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
  line-height: 1.55;
}

.dash-selected-workout-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.dash-selected-workout-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.7rem;
  font-weight: 700;
}

.dash-selected-workout-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.dash-workout-open-btn,
.dash-workout-clear-btn,
.dash-workout-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.dash-workout-open-btn {
  border: 1px solid rgba(55, 120, 255, 0.35);
  background: rgba(55, 120, 255, 0.12);
  color: rgba(140, 190, 255, 0.92);
}

.dash-workout-secondary-link,
.dash-workout-clear-btn {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: transparent;
  color: rgba(255, 255, 255, 0.46);
}

.dash-workout-clear-btn {
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.dash-workout-open-btn:hover {
  background: rgba(55, 120, 255, 0.2);
}

.dash-workout-secondary-link:hover,
.dash-workout-clear-btn:hover {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.72);
  transform: none;
}

.dash-workout-clear-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.dash-workout-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}

.dash-workout-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(40, 200, 120, 0.2);
  color: rgba(100, 240, 160, 0.9);
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.dash-workout-status-text {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
}

.dash-workout-done .dash-workout-status-text {
  color: rgba(100, 240, 160, 0.82);
}

.dash-workout-log-btn {
  align-self: flex-start;
  min-width: 154px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(55, 120, 255, 0.35);
  background: rgba(55, 120, 255, 0.12);
  color: rgba(140, 190, 255, 0.9);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.dash-workout-log-btn:hover {
  background: rgba(55, 120, 255, 0.2);
  border-color: rgba(55, 120, 255, 0.55);
}

.dash-workout-log-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.dash-workout-undo-btn {
  align-self: flex-start;
  min-width: 154px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.76rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.dash-workout-undo-btn:hover {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.2);
  transform: none;
}

.dash-workout-hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.78rem;
  line-height: 1.5;
}

/* Supplement timing grid */

.dashboard-supplement-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-supplement-heading-copy {
  min-width: 0;
}

.dash-timing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.dash-timing-card {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.dash-timing-label {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  font-weight: 700;
}

.dash-timing-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-timing-list li {
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.8rem;
  line-height: 1.5;
}

.dash-supplement-stack-list {
  gap: 8px;
}

.dash-supplement-stack-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 0 12px;
}

.dash-stack-edit-btn {
  width: auto;
  flex-shrink: 0;
  align-self: flex-start;
  min-height: 34px;
  margin: 4px 0 0;
  padding: 0 14px;
  border: 1px solid rgba(55, 120, 255, 0.28);
  border-radius: 999px;
  background: rgba(55, 120, 255, 0.1);
  color: rgba(140, 190, 255, 0.9);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}

.dash-stack-edit-btn:hover,
.dash-stack-edit-btn[aria-pressed="true"] {
  border-color: rgba(80, 148, 255, 0.48);
  background: rgba(55, 120, 255, 0.18);
  color: rgba(190, 220, 255, 0.96);
  box-shadow: none;
  transform: translateY(-1px);
}

.dash-supplement-stack-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  transition: opacity 0.15s, box-shadow 0.15s, background 0.15s;
}

.dash-supplement-stack-item:last-child {
  border-bottom: 0;
}

.dash-supplement-stack-item.is-editable {
  cursor: grab;
  user-select: none;
}

.dash-supplement-stack-item.is-editable.is-dragging {
  opacity: 0.35;
  cursor: grabbing;
}

.dash-supplement-stack-link {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  width: auto;
  min-width: 0;
  min-height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: none;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}

.dash-supplement-stack-link:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.dash-supplement-stack-link:hover .dash-supplement-stack-copy strong {
  color: rgba(190, 220, 255, 0.94);
}

.dash-supplement-stack-link:focus-visible {
  outline: 2px solid rgba(80, 148, 255, 0.42);
  outline-offset: 4px;
}

.dash-drag-handle {
  flex-shrink: 0;
  width: 14px;
  height: 20px;
  background-image: radial-gradient(circle, rgba(255,255,255,0.3) 1.5px, transparent 1.5px);
  background-size: 4px 6px;
  background-repeat: repeat;
  background-position: center;
  opacity: 0.45;
  pointer-events: none;
}

.dash-supplement-stack-copy {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dash-supplement-stack-copy strong {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.dash-supplement-stack-dosage,
.dash-timing-empty {
  color: rgba(255, 255, 255, 0.34);
  font-size: 0.74rem;
  line-height: 1.35;
}

.dash-timing-empty[hidden] {
  display: none;
}

.dash-supplement-remove {
  width: auto;
  flex-shrink: 0;
  min-height: 28px;
  margin: 0;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.44);
  font-size: 0.64rem;
  box-shadow: none;
  cursor: pointer;
}

.dash-supplement-remove:hover {
  border-color: rgba(255, 100, 100, 0.3);
  background: rgba(255, 80, 80, 0.1);
  color: rgba(255, 150, 150, 0.9);
  box-shadow: none;
  transform: none;
}

.dash-timing-drop-zone {
  transition: border-color 0.15s, background 0.15s;
}

.dash-supplement-stack-grid.is-editing .dash-timing-drop-zone {
  border-color: rgba(80, 148, 255, 0.2);
  background: rgba(55, 120, 255, 0.045);
}

.dash-timing-drop-zone.is-drag-over {
  border-color: rgba(80, 148, 255, 0.55);
  background: rgba(80, 148, 255, 0.08);
}

.dash-timing-note {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.28);
  font-size: 0.76rem;
  line-height: 1.5;
}

.dash-drag-hint {
  margin: 0;
}

body.dash-supplement-detail-open {
  overflow: hidden;
}

.dash-supplement-detail-modal[hidden] {
  display: none;
}

.dash-supplement-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: grid;
  place-items: center;
  padding: 24px;
}

.dash-supplement-detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(4, 8, 18, 0.72);
  box-shadow: none;
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.dash-supplement-detail-backdrop:hover {
  background: rgba(4, 8, 18, 0.76);
  box-shadow: none;
  transform: none;
}

.dash-supplement-detail-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  max-height: min(86vh, 820px);
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(80, 148, 255, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(55, 120, 255, 0.12), transparent 42%),
    rgba(6, 12, 28, 0.98);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.72);
}

.dash-supplement-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.dash-supplement-detail-kicker {
  margin: 0 0 8px;
  color: rgba(100, 172, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dash-supplement-detail-header h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.dash-supplement-detail-copy {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  line-height: 1.65;
}

.dash-supplement-detail-tags,
.dash-supplement-detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dash-supplement-detail-tags {
  margin-top: 18px;
}

.dash-supplement-detail-tags span,
.dash-supplement-detail-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 0 10px;
  border: 1px solid rgba(80, 148, 255, 0.18);
  border-radius: 999px;
  background: rgba(55, 120, 255, 0.08);
  color: rgba(150, 198, 255, 0.86);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dash-supplement-detail-close {
  width: auto;
  flex-shrink: 0;
  min-height: 36px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.68);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: none;
  cursor: pointer;
}

.dash-supplement-detail-close:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: none;
  transform: translateY(-1px);
}

.dash-supplement-detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.dash-supplement-detail-meta div,
.dash-supplement-detail-section {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.dash-supplement-detail-meta span {
  display: block;
  color: rgba(100, 172, 255, 0.72);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dash-supplement-detail-meta strong {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.82rem;
  line-height: 1.35;
}

.dash-supplement-detail-note {
  padding: 12px 14px;
  border: 1px solid rgba(80, 148, 255, 0.14);
  border-radius: 16px;
  background: rgba(55, 120, 255, 0.06);
}

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

.dash-supplement-detail-section {
  margin-top: 12px;
}

.dash-supplement-detail-grid .dash-supplement-detail-section {
  margin-top: 0;
}

.dash-supplement-detail-section-wide {
  grid-column: 1 / -1;
}

.dash-supplement-detail-section h4 {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
}

.dash-supplement-detail-list {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.86rem;
  line-height: 1.65;
}

.dash-supplement-detail-list strong {
  color: rgba(255, 255, 255, 0.78);
}

.dash-supplement-detail-link {
  display: inline-flex;
  margin-top: 14px;
  color: rgba(140, 190, 255, 0.86);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.dash-supplement-detail-link:hover {
  color: rgba(190, 220, 255, 0.96);
  text-decoration: underline;
}

/* Tracking grid: 3 columns */

.dash-tracking-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.dash-tracking-card {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-tracking-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Water */

.dash-water-display {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.dash-water-count {
  color: rgba(255, 255, 255, 0.92);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.dash-water-unit {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.82rem;
}

.dash-water-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dash-water-status,
.dash-water-percent {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.74rem;
  font-weight: 700;
}

.dash-water-status.is-complete {
  color: rgba(100, 240, 160, 0.86);
}

.dash-water-progress {
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.dash-water-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(55, 120, 255, 0.74), rgba(100, 240, 160, 0.78));
  transition: width 0.2s ease;
}

.dash-water-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.dash-water-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.18s, border-color 0.18s;
}

.dash-water-dot.is-filled {
  background: rgba(55, 120, 255, 0.55);
  border-color: rgba(80, 148, 255, 0.65);
}

.dash-water-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}

.dash-water-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.dash-water-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.dash-water-actions,
.dash-water-goal-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.dash-water-actions .dash-water-btn {
  width: auto;
  flex: 1;
  min-width: 96px;
}

.dash-water-btn-primary {
  border-color: rgba(55, 120, 255, 0.35);
  background: rgba(55, 120, 255, 0.12);
  color: rgba(140, 190, 255, 0.92);
}

.dash-water-btn-primary:hover:not(:disabled) {
  background: rgba(55, 120, 255, 0.2);
}

.dash-water-goal-editor {
  display: grid;
  gap: 7px;
  padding-top: 4px;
}

.dash-water-goal-editor label {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.dash-water-goal-controls input,
.dash-water-goal-controls select {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 0.82rem;
}

.dash-water-goal-controls input {
  width: 76px;
}

.dash-water-goal-save {
  width: auto;
  min-height: 34px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid rgba(80, 148, 255, 0.24);
  border-radius: 999px;
  background: rgba(55, 120, 255, 0.08);
  color: rgba(140, 190, 255, 0.88);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  box-shadow: none;
  cursor: pointer;
}

.dash-water-goal-save:hover {
  background: rgba(55, 120, 255, 0.16);
  box-shadow: none;
  transform: none;
}

.dash-water-goal-saved {
  margin: 0;
  color: rgba(100, 240, 160, 0.75);
  font-size: 0.74rem;
  font-weight: 600;
  min-height: 1em;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.16s ease, visibility 0.16s ease;
}

.dash-water-goal-saved.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Activity inputs */

.dash-activity-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-activity-label {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.dash-activity-input {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.875rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.dash-activity-input:focus {
  outline: none;
  border-color: rgba(80, 148, 255, 0.55);
}

.dash-activity-input::placeholder {
  color: rgba(255, 255, 255, 0.22);
}

.dash-activity-summary {
  display: grid;
  gap: 8px;
  min-height: 76px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.dash-activity-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dash-activity-summary-item span,
.dash-activity-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.76rem;
}

.dash-activity-summary.is-empty .dash-activity-summary-item strong {
  color: rgba(255, 255, 255, 0.32);
  font-weight: 600;
}

.dash-activity-summary-item strong {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.86rem;
}

.dash-activity-save-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.dash-activity-save-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}

.dash-activity-save-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.dash-activity-saved {
  margin: 0;
  color: rgba(100, 240, 160, 0.75);
  font-size: 0.78rem;
  font-weight: 600;
  min-height: 1em;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.16s ease, visibility 0.16s ease;
}

.dash-activity-saved.is-visible {
  opacity: 1;
  visibility: visible;
}

.dash-activity-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-activity-edit-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.dash-activity-edit-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Activity mode: inputs visible, summary + edit btn hidden */
#dashActivityCard:not(.is-saved) .dash-activity-summary { display: none; }
#dashActivityCard:not(.is-saved) .dash-activity-edit-btn { display: none; }

/* Activity mode: saved display — inputs + save btn hidden */
#dashActivityCard.is-saved .dash-activity-inputs { display: none; }
#dashActivityCard.is-saved .dash-activity-save-btn { display: none; }

/* Checklist */

.dash-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-check-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.dash-check-btn:hover,
.dash-check-btn:active,
.dash-check-btn:focus-visible {
  background: none;
  box-shadow: none;
  transform: none;
}

.dash-check-btn:focus-visible {
  outline: 2px solid rgba(80, 148, 255, 0.36);
  outline-offset: 3px;
}

.dash-check-box {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  font-size: 10px;
  color: rgba(100, 240, 160, 0.92);
  font-weight: 700;
}

.dash-check-btn[aria-pressed="true"] .dash-check-box {
  background: rgba(40, 200, 120, 0.22);
  border-color: rgba(40, 200, 120, 0.55);
}

.dash-check-btn[aria-pressed="true"] .dash-check-box::after {
  content: "✓";
}

.dash-check-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  line-height: 1.4;
  transition: color 0.15s;
}

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

.dash-check-note {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.7rem;
  line-height: 1.35;
}

.dash-check-btn[aria-pressed="true"] .dash-check-label {
  color: rgba(255, 255, 255, 0.35);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.2);
}

.dash-check-btn[aria-disabled="true"] {
  cursor: default;
}

/* Empty states */

.dash-empty-state {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0 4px;
}

.dash-empty-heading {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 600;
}

.dash-empty-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.82rem;
  line-height: 1.55;
}

.dash-cta-btn {
  align-self: flex-start;
  margin-top: 4px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(55, 120, 255, 0.35);
  background: rgba(55, 120, 255, 0.1);
  color: rgba(140, 190, 255, 0.9);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.dash-cta-btn:hover {
  background: rgba(55, 120, 255, 0.18);
}

.dash-inline-link {
  color: rgba(100, 172, 255, 0.8);
  text-decoration: none;
}

.dash-inline-link:hover {
  color: rgba(140, 200, 255, 0.95);
  text-decoration: underline;
}

.dash-loading {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.84rem;
  padding: 8px 0;
}

.dashboard-page-shell button,
.dash-supplement-detail-modal button,
.dashboard-page-shell button:hover,
.dashboard-page-shell button:active,
.dashboard-page-shell button:focus-visible,
.dash-supplement-detail-modal button:hover,
.dash-supplement-detail-modal button:active,
.dash-supplement-detail-modal button:focus-visible {
  box-shadow: none;
  filter: none;
  transition: none;
  transform: none;
}

/* Responsive */

@media (max-width: 960px) {
  .dash-modules-grid {
    grid-template-columns: 1fr;
  }

  .dash-supplement-detail-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-supplement-detail-grid {
    grid-template-columns: 1fr;
  }

  .dash-timing-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dash-tracking-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .dashboard-supplement-heading {
    flex-direction: column;
    gap: 10px;
  }

  .dashboard-supplement-heading .dash-stack-edit-btn {
    align-self: flex-start;
    max-width: 100%;
  }

  .dash-supplement-detail-modal {
    padding: 14px;
  }

  .dash-supplement-detail-panel {
    padding: 18px;
    border-radius: 20px;
  }

  .dash-supplement-detail-header {
    flex-direction: column;
  }

  .dash-supplement-detail-close {
    align-self: flex-start;
  }

  .dash-supplement-detail-meta {
    grid-template-columns: 1fr;
  }

  .dash-meal-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .dash-meal-expand-btn {
    grid-template-columns: 1fr;
    gap: 3px;
    width: 100%;
  }

  .dash-meal-complete-btn {
    align-self: flex-start;
  }

  .dash-timing-grid {
    grid-template-columns: 1fr;
  }

  .dash-tracking-grid {
    grid-template-columns: 1fr;
  }

  .dash-module {
    min-height: unset;
  }
}
