:root {
  --cream: #faf6f1;
  --sand: #e5d8c8;
  --taupe: #c3b6a5;
  --taupe-soft: #a89d93;
  --gold: #d1b37a;
  --charcoal: #2d2a26;
  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.12);
  --radius-xl: 24px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body.canvas {
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 20% 20%, #fefdf9, var(--cream) 40%, #e7d9c9 95%);
  color: var(--charcoal);
  padding: 16px 24px 48px;
}

.section {
  scroll-margin-top: 96px;
}

.section-heading {
  margin: 6px 0 14px;
}

.section-heading h2 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}

.section-heading p {
  color: var(--taupe-soft);
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 4px;
}

.nav-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--sand);
  text-decoration: none;
  color: var(--charcoal);
  box-shadow: var(--shadow-soft);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.nav-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
  border-color: var(--gold);
}

.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.nav-brand {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--charcoal);
}

.nav-link {
  color: var(--charcoal);
  text-decoration: none;
  padding: 8px 12px;
  border: 1px solid var(--sand);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.nav-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.insight-card {
  margin-top: 10px;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-soft);
}

.insight-tabs {
  display: inline-flex;
  gap: 10px;
  margin-bottom: 14px;
  background: rgba(229, 216, 200, 0.35);
  padding: 6px;
  border-radius: 14px;
}

.insight-tab {
  border: none;
  background: transparent;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  color: var(--taupe-soft);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.insight-tab:hover {
  transform: translateY(-1px);
}

.insight-tab.active {
  background: linear-gradient(120deg, rgba(225, 207, 183, 0.7), rgba(209, 179, 122, 0.9));
  color: var(--charcoal);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.insight-panel {
  display: block;
}

.insight-panel.hidden {
  display: none;
}

.insight-panel ul {
  display: grid;
  gap: 10px;
  list-style: none;
}

.insight-panel ul li {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--sand);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.06);
  line-height: 1.5;
}

.loader-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 10px;
  min-width: 320px;
  z-index: 11;
}

.loader-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--taupe-soft);
}

.loader-row {
  display: flex;
  gap: 10px;
}

.loader-row input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--sand);
  font-size: 0.95rem;
  background: #fff;
}

.loader-row button {
  border: none;
  border-radius: 12px;
  background: linear-gradient(120deg, #e2cda8, #d1b37a);
  color: #2d271e;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 16px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.status {
  font-size: 0.9rem;
  color: var(--taupe-soft);
}

.surface {
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.9);
}

.hidden {
  display: none !important;
}

.layout {
  max-width: 1200px;
  margin: 20px auto 0;
  display: grid;
  gap: 18px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.layout.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.fade-in {
  animation: fadeIn 0.4s ease both;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: 18px;
  align-items: center;
  padding: 24px 26px;
  border-radius: var(--radius-xl);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.95), rgba(225, 207, 183, 0.9));
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.hero-text .eyebrow {
  font-family: "Playfair Display", serif;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.hero-text h1 {
  font-family: "Playfair Display", serif;
  font-size: 2.8rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--taupe-soft);
  max-width: 620px;
  line-height: 1.6;
}

.welcome-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  font-size: 0.9rem;
  color: var(--taupe-soft);
  backdrop-filter: blur(10px);
  margin-top: 14px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.welcome-pill-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 7px rgba(209, 179, 122, 0.25);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.hero-summary {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--charcoal);
  line-height: 1.5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.pill,
.welcome-pill,
.collapse-toggle,
.weight-chip,
.traffic-card,
.delta-chip,
.biomarker-card,
.priority-list .priority-item {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.pill:hover,
.welcome-pill:hover,
.weight-chip:hover,
.traffic-card:hover,
.delta-chip:hover,
.biomarker-card:hover,
.priority-list .priority-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--taupe-soft);
  font-size: 0.9rem;
}

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

@media (max-width: 960px) {
  .hero-card {
    grid-template-columns: 1fr;
  }
  .orbit-compact {
    justify-self: start;
  }
  .traffic-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  .grid {
    grid-template-columns: 1fr;
  }
}

.priority-card {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.95), rgba(225, 207, 183, 0.92));
  border: 1px solid rgba(209, 179, 122, 0.35);
  box-shadow: var(--shadow-soft);
}

.priority-list ol {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  padding-left: 0;
  margin: 0;
}

.priority-list .priority-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.035);
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.bio-number {
  font-size: 40px;
  font-weight: 800;
  color: var(--charcoal);
}

.bio-sub {
  display: grid;
  gap: 4px;
  color: var(--taupe-soft);
  font-weight: 600;
  text-align: center;
  margin-top: 6px;
}

.bio-chrono {
  font-size: 0.9rem;
}

.bio-orbit-shell {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 6px 0 4px;
}

.bio-orbit {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.95), rgba(250, 246, 241, 0.2));
  box-shadow: var(--shadow-soft);
}

.bio-orbit-inner {
  width: 75%;
  height: 75%;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.bio-orbit-ring {
  position: absolute;
  width: 118%;
  height: 118%;
  border-radius: 999px;
  border: 1px dashed rgba(209, 179, 122, 0.6);
  animation: slowSpin 32s linear infinite;
}

.bio-orbit-metric {
  text-align: center;
}

.bio-orbit-label {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--taupe-soft);
  margin-bottom: 0.25rem;
}

.bio-orbit-score {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 0.15rem;
}

.bio-orbit-sub {
  font-size: 0.82rem;
  color: var(--taupe-soft);
}

.bio-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.03);
  background: #d1b37a;
  transition: transform 0.25s ease;
  cursor: pointer;
}

.bio-dot::after {
  content: attr(data-tooltip);
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translate(-50%, -100%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.bio-dot:hover::after {
  opacity: 1;
  transform: translate(-50%, -130%);
}
.bio-dot:focus-visible {
  outline: 2px solid #d1b37a;
}

.has-tooltip {
  position: relative;
}
.has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: -6px;
  transform: translate(-50%, -110%);
  background: rgba(45, 42, 38, 0.9);
  color: #fff;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 5;
}
.has-tooltip:hover::after,
.has-tooltip:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, -130%);
}

.bio-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.bio-bar .label {
  font-weight: 600;
  color: var(--charcoal);
}

.bio-bar .track {
  position: relative;
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  overflow: hidden;
}

.bio-bar .fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 12px;
  background: linear-gradient(120deg, #d1b37a, #b89b60);
  transition: width 0.4s ease;
}

.bio-bar .value {
  font-weight: 700;
  color: var(--charcoal);
}

.priority-num {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #e2cda8, #d1b37a);
  color: #2d271e;
  font-weight: 700;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.12);
}

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

.priority-title {
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: 0.01em;
}

.priority-message {
  color: var(--taupe-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

.biomarker-panel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.biomarker-title {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--taupe-soft);
  margin-bottom: 10px;
}

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

.biomarker-card {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.06);
  display: grid;
  gap: 4px;
}

.biomarker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-weight: 700;
  color: var(--charcoal);
}

.biomarker-value {
  display: none;
}

.biomarker-range {
  font-size: 0.85rem;
  color: var(--taupe-soft);
}

.biomarker-why {
  font-size: 0.9rem;
  color: var(--taupe-soft);
  margin-bottom: 6px;
}

.biomarker-interpretation {
  font-size: 0.9rem;
  color: var(--charcoal);
  margin-bottom: 6px;
  line-height: 1.35;
}

.bm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--charcoal);
  background: linear-gradient(140deg, #f5ede2, #e6d6c1);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.bm-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.05);
}

.bm-ok {
  background: linear-gradient(140deg, #f5ede2, #e6d6c1);
  color: #1f3620;
}
.bm-ok .bm-dot {
  background: #4caf50;
  box-shadow: 0 0 0 6px rgba(76, 175, 80, 0.18);
}

.bm-warn {
  background: linear-gradient(140deg, #f5ede2, #e6d6c1);
  color: #4a3a10;
}
.bm-warn .bm-dot {
  background: #e5bf58;
  box-shadow: 0 0 0 6px rgba(229, 191, 88, 0.22);
}

.bm-high {
  background: linear-gradient(140deg, #f5ede2, #e6d6c1);
  color: #4a1f1f;
}
.bm-high .bm-dot {
  background: #ce4c4c;
  box-shadow: 0 0 0 6px rgba(206, 76, 76, 0.2);
}

.hidden {
  display: none !important;
}

.traffic-card {
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.03);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 6px;
}

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

.traffic-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--charcoal);
}

.traffic-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--charcoal);
  background: rgba(0, 0, 0, 0.04);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.traffic-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  box-shadow: 0 0 0 7px rgba(0, 0, 0, 0.06);
}

.traffic-green .traffic-dot {
  background: #4caf50;
  box-shadow: 0 0 0 7px rgba(76, 175, 80, 0.18);
}

.traffic-amber .traffic-dot {
  background: #e5bf58;
  box-shadow: 0 0 0 7px rgba(229, 191, 88, 0.22);
}

.traffic-red .traffic-dot {
  background: #ce4c4c;
  box-shadow: 0 0 0 7px rgba(206, 76, 76, 0.2);
}

.traffic-body {
  color: var(--taupe-soft);
  font-size: 0.95rem;
  line-height: 1.45;
}

.orbit-compact {
  position: relative;
  width: 240px;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.95), rgba(250, 246, 241, 0.2));
  box-shadow: var(--shadow-soft);
  justify-self: end;
}

.welcome-orbit-inner {
  width: 75%;
  height: 75%;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.welcome-orbit-ring {
  position: absolute;
  width: 118%;
  height: 118%;
  border-radius: 999px;
  border: 1px dashed rgba(209, 179, 122, 0.6);
  animation: slowSpin 26s linear infinite;
}

.welcome-orbit-metric {
  text-align: center;
}

.welcome-orbit-label {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--taupe-soft);
  margin-bottom: 0.25rem;
}

.welcome-orbit-score {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.15rem;
}

.welcome-orbit-sub {
  font-size: 0.82rem;
  color: var(--taupe-soft);
}

@keyframes slowSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

.card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
  line-height: 1.5;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.card-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--taupe-soft);
  margin-bottom: 0.6rem;
}
.title-icon {
  margin-right: 0.35rem;
  color: #b39176;
}

.card-title.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.collapse-toggle {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.04);
  color: var(--charcoal);
  border-radius: 999px;
  width: 28px;
  height: 28px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 200ms ease, background 200ms ease, box-shadow 200ms ease;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.06);
}

.collapse-toggle.open {
  transform: rotate(45deg);
  background: linear-gradient(140deg, #e2cda8, #d1b37a);
  color: #2d271e;
}

.collapsible {
  transition: max-height 220ms ease, opacity 220ms ease;
  overflow: hidden;
}

.collapsed {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.collapsible:not(.collapsed) {
  max-height: 900px;
  opacity: 1;
}

.highlight p {
  font-size: 1.05rem;
  color: var(--charcoal);
}

.signals ul,
.focus ul {
  list-style: none;
  display: grid;
  gap: 10px;
  padding-left: 0;
  font-size: 0.9rem;
}

.signals li,
.focus li {
  display: grid;
  grid-template-columns: 10px 1fr;
  align-items: start;
  column-gap: 8px;
  line-height: 1.5;
  word-break: normal;
}

.signals li > *,
.focus li > * {
  grid-column: 2;
}

.signals li::before,
.focus li::before {
  content: "•";
  color: var(--gold);
  margin-top: 2px;
}

.signals {
  grid-column: span 1;
}

.focus {
  grid-column: span 1;
}

.data-card {
  grid-column: 1 / -1;
}

.delta-card {
  background: #0d0b09;
  color: #f7f1e3;
  border: 1px solid rgba(209, 179, 122, 0.25);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.delta-card .card-title {
  color: #f7f1e3;
}

.delta-card .pill.faint {
  background: rgba(255, 255, 255, 0.12);
  color: #f7f1e3;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.delta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.delta-chip {
  background: linear-gradient(160deg, rgba(209, 179, 122, 0.08), rgba(247, 241, 227, 0.04));
  border: 1px solid rgba(209, 179, 122, 0.25);
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.delta-head {
  font-size: 0.9rem;
  color: #e2cda8;
  letter-spacing: 0.02em;
}

.delta-current {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.delta-deltas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.delta-pill {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f7f1e3;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.delta-up {
  border-color: rgba(123, 209, 123, 0.8);
  color: #b3f0b3;
}

.delta-down {
  border-color: rgba(195, 66, 63, 0.75);
  color: #f4b0a8;
}

.data-card .progress {
  background: rgba(0, 0, 0, 0.05);
  height: 12px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.data-card .progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(120deg, #e2cda8, #d1b37a);
  transition: width 0.3s ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--taupe-soft);
  font-size: 0.9rem;
}

.weight-card {
  display: grid;
  gap: 10px;
}

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

.weight-content {
  display: grid;
  gap: 12px;
}

.scroll-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--sand);
  background: linear-gradient(135deg, #f8f3eb, #e7d8c7);
  color: var(--charcoal);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
}

.scroll-top.show {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
}

.skeleton-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 6px;
}

.skeleton-pill {
  height: 46px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(230, 220, 210, 0.65), rgba(245, 238, 230, 0.9), rgba(230, 220, 210, 0.65));
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
}

.skeleton-pill.long {
  grid-column: span 2;
}

.skeleton-block,
.skeleton-line {
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(230, 220, 210, 0.65), rgba(245, 238, 230, 0.9), rgba(230, 220, 210, 0.65));
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
}

.skeleton-block {
  height: 120px;
}

.skeleton-line {
  height: 14px;
  margin: 6px 0;
}

.skeleton-line.short {
  width: 60%;
}

.weight-card {
  background: linear-gradient(140deg, #fdf8ef, #f7f1e3),
    radial-gradient(circle at 18% 18%, rgba(209, 179, 122, 0.18), transparent 32%),
    radial-gradient(circle at 82% 12%, rgba(226, 199, 107, 0.14), transparent 28%),
    radial-gradient(circle at 14% 82%, rgba(195, 66, 63, 0.08), transparent 26%);
  border: 1px solid rgba(209, 179, 122, 0.16);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.weight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.weight-chip {
  position: relative;
  background: linear-gradient(180deg, #ffffff, #f8f1e6);
  border-radius: 16px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(209, 179, 122, 0.18);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.weight-chip::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: radial-gradient(circle at 12% 20%, rgba(209, 179, 122, 0.25), transparent 32%),
    radial-gradient(circle at 85% 80%, rgba(195, 66, 63, 0.12), transparent 28%);
  opacity: 0.65;
  pointer-events: none;
}

.weight-chip .label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--taupe-soft);
}

.weight-chip .value {
  font-weight: 700;
  color: var(--charcoal);
}

.meal-chip .value {
  font-weight: 500;
}

.meal-chip summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  gap: 4px;
}

.meal-chip summary::-webkit-details-marker {
  display: none;
}

.meal-chip .meal-body {
  margin-top: 6px;
  display: grid;
  gap: 4px;
}

.meal-chip .meal-macros {
  color: var(--charcoal);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.plan-wrapper {
  display: grid;
  gap: 14px;
}

.plan-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-tab-btn {
  border: 1px solid rgba(209, 179, 122, 0.4);
  background: #fff7ea;
  color: var(--charcoal);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.plan-tab-btn.active {
  background: var(--charcoal);
  color: #fff;
  border-color: var(--charcoal);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.plan-panels {
  display: grid;
}

.plan-tab-panel {
  display: none;
}

.plan-tab-panel.active {
  display: block;
}

.plan-card {
  background: linear-gradient(180deg, #ffffff, #f7f0e5);
  border: 1px solid rgba(209, 179, 122, 0.18);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
  display: grid;
  gap: 10px;
}

.plan-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.plan-card-title {
  font-weight: 700;
  color: var(--charcoal);
}

.plan-card-sub {
  color: var(--taupe-soft);
  font-size: 0.9rem;
}

.plan-card-body {
  display: grid;
  gap: 8px;
}

.plan-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.plan-pill {
  background: linear-gradient(135deg, #fff9f1 0%, #f3e7d6 100%);
  border: 1px solid rgba(209, 179, 122, 0.5);
  border-radius: 14px;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--charcoal);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  min-height: 42px;
}

.plan-pill-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--taupe-soft);
}

.plan-pill-value {
  font-weight: 800;
  color: var(--charcoal);
}

.plan-note {
  color: var(--charcoal);
  font-size: 0.95rem;
  line-height: 1.4;
}

.plan-session {
  background: rgba(0, 0, 0, 0.025);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 6px;
}

.plan-block {
  background: #fff;
  border: 1px dashed rgba(209, 179, 122, 0.5);
  border-radius: 12px;
  padding: 8px 10px;
  margin-top: 6px;
}

.plan-block-label {
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.plan-block-list {
  margin: 0;
  padding-left: 16px;
  color: var(--charcoal);
  line-height: 1.4;
}

.pill.small {
  font-size: 0.8rem;
  padding: 6px 10px;
}

.pill.faint {
  background: rgba(0, 0, 0, 0.04);
  color: var(--charcoal);
}

.weight-notes {
  font-size: 0.95rem;
  color: var(--charcoal);
  line-height: 1.45;
}

@media (max-width: 900px) {
  .hero-card {
    grid-template-columns: 1fr;
  }
  .orbit-compact {
    margin: 0 auto;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .signals,
  .focus,
  .data-card {
    grid-column: span 1;
  }
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
