:root {
  color-scheme: light;
  --page: #f4f5f1;
  --surface: #ffffff;
  --surface-muted: #eef1ed;
  --surface-hover: #f8f9f6;
  --ink: #151915;
  --muted: #687069;
  --muted-strong: #4d574f;
  --line: #dce2db;
  --line-soft: #e9ede8;
  --shadow: 0 1px 2px rgba(19, 25, 20, 0.025), 0 8px 26px rgba(31, 45, 34, 0.035);
  --red: #d84b55;
  --green: #13805d;
  --blue: #347dc6;
  --violet: #6044a8;
  --orange: #e66b32;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #101410;
  --surface: #191e1a;
  --surface-muted: #232923;
  --surface-hover: #202620;
  --ink: #f3f4ef;
  --muted: #969c95;
  --muted-strong: #b9beb7;
  --line: #343b35;
  --line-soft: #29302a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  --red: #ef6570;
  --green: #39ad83;
  --blue: #65a5e6;
  --violet: #9880dd;
  --orange: #f18855;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease, color .2s ease;
}
button, a { -webkit-tap-highlight-color: transparent; }
.shell { width: min(1440px, calc(100% - 64px)); margin-inline: auto; }

.app-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--page) 90%, transparent);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.global-header-inner { height: 80px; display: flex; align-items: center; gap: 30px; }
.global-brand { display: inline-flex; align-items: center; flex: 0 0 auto; color: var(--ink); text-decoration: none; font-size: 22px; font-weight: 900; letter-spacing: .14em; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 5px; }
.site-nav a { padding: 10px 15px; border: 1px solid transparent; border-radius: 999px; color: var(--muted-strong); text-decoration: none; font-size: 13px; font-weight: 700; white-space: nowrap; transition: .18s ease; }
.site-nav a:hover { color: var(--ink); background: var(--surface-hover); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .14em;
  white-space: nowrap;
}
.brand i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.site-menu { position: relative; display: none; }
.site-menu summary { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; list-style: none; }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu summary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.site-menu summary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.site-menu[open] summary { background: var(--surface-muted); }
.site-menu-panel { position: absolute; top: calc(100% + 12px); right: 0; width: 230px; display: grid; padding: 7px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 16px 40px rgba(0,0,0,.12); }
.site-menu-panel a { padding: 11px 13px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 700; }
.site-menu-panel a:hover, .site-menu-panel a:focus-visible, .site-menu-panel a[aria-current="page"] { background: var(--surface-muted); }
.site-menu summary:focus-visible, .site-menu-panel a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.language-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.language-switch button {
  min-width: 38px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}
.language-switch button[aria-pressed="true"] { color: var(--ink); background: var(--surface-muted); }
.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow);
}
.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.moon-icon { display: none; }
:root[data-theme="dark"] .sun-icon { display: none; }
:root[data-theme="dark"] .moon-icon { display: block; }

.dashboard { padding-top: 28px; padding-bottom: 54px; }
.date-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.hero { position: relative; display: grid; grid-template-columns: minmax(300px, .72fr) minmax(440px, 1.65fr); gap: 68px; align-items: end; padding: 0 0 34px; }
.hero .date-kicker { position: absolute; top: 0; right: 0; }
.metric-label { margin: 0 0 8px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.hero-label-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.hero-label-line .metric-label { margin-bottom: 0; }
.hero h1 { margin: 0; font-size: clamp(72px, 8.5vw, 126px); font-weight: 850; line-height: .88; letter-spacing: -.075em; }
.hero h1 small { margin-left: 9px; color: var(--muted); font-size: .22em; font-weight: 750; letter-spacing: -.02em; }
.hero-subtitle { margin: 14px 0 16px; display: flex; align-items: baseline; gap: 7px; color: var(--muted); font-size: 13px; }
.hero-subtitle strong { color: var(--green); font-size: 15px; }
.journey-summary { padding: 0 0 6px; }
.journey-summary > p { margin: 0 0 18px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.journey-facts { display: grid; grid-template-columns: repeat(3, 1fr); }
.journey-facts > div { display: grid; gap: 5px; min-width: 0; padding: 0 24px; border-left: 1px solid var(--line); }
.journey-facts > div:first-child { padding-left: 0; border-left: 0; }
.journey-facts small { color: var(--muted); font-size: 11px; font-weight: 700; }
.journey-facts strong { font-size: 21px; letter-spacing: -.035em; }
.journey-facts span { color: var(--muted); font-size: 11px; line-height: 1.35; }

.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 42px; }
.metric-card, .panel { border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.metric-card { min-height: 178px; padding: 22px; border-radius: 17px; position: relative; overflow: hidden; }
.metric-card-head { display: flex; align-items: center; gap: 9px; color: var(--muted-strong); font-size: 12px; font-weight: 650; }
.metric-card-head .metric-dot { flex: 0 0 8px; }
.metric-record-date { margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.metric-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.metric-card > strong { display: block; margin-top: 19px; font-size: 31px; line-height: 1; letter-spacing: -.045em; }
.metric-card > p { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.metric-card > p.positive { color: var(--green); }
.metric-card > p.negative { color: var(--red); }
.metric-heart .metric-card-head { color: var(--red); }
.metric-sleep .metric-card-head { color: var(--green); }
.metric-steps .metric-card-head { color: var(--orange); }
.sparkline { position: absolute; left: 22px; right: 22px; bottom: 16px; height: 38px; }
.sparkline svg { display: block; width: 100%; height: 100%; overflow: visible; }

.composition-panel { margin-bottom: 16px; padding: 26px 28px; overflow: hidden; }
.composition-heading { align-items: center; }
.composition-estimate-note { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.source-pill {
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--violet) 26%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--violet) 8%, var(--surface));
  color: var(--violet);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.composition-highlights { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 24px; padding: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--line-soft); }
.composition-metric-card { min-width: 0; min-height: 230px; padding: 18px 18px 58px; position: relative; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 13px; background: linear-gradient(145deg, var(--surface) 0%, color-mix(in srgb, var(--metric-color) 3%, var(--surface)) 100%); }
.composition-highlights .composition-metric-card { min-height: 245px; border: 0; border-radius: 0; background: linear-gradient(145deg, var(--surface) 0%, color-mix(in srgb, var(--metric-color) 4%, var(--surface)) 100%); }
.composition-metric-head { display: flex; align-items: center; gap: 8px; color: var(--muted-strong); font-size: 11px; font-weight: 700; }
.composition-metric-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--metric-color); }
.composition-metric-card > strong { display: block; margin-top: 14px; font-size: 25px; line-height: 1.05; letter-spacing: -.04em; }
.composition-metric-card.is-featured > strong { font-size: 29px; }
.composition-group-secondary { min-height: 35px; margin-top: 10px; display: flex; align-items: start; gap: 13px; position: relative; z-index: 1; }
.composition-group-stat { min-width: 0; display: grid; gap: 3px; }
.composition-group-stat span { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .015em; line-height: 1.25; }
.composition-group-stat strong { font-size: 12px; line-height: 1.15; white-space: nowrap; }
.composition-metric-card > p { max-width: calc(100% - 8px); margin: 8px 0 0; position: relative; z-index: 1; color: var(--muted); font-size: 11px; line-height: 1.35; }
.composition-card-sparkline { height: 42px; position: absolute; right: 18px; bottom: 12px; left: 18px; }
.composition-card-sparkline svg { width: 100%; height: 100%; display: block; overflow: visible; }
.composition-body-maps { margin-top: 16px; }
.body-map-card { padding: 0; }
.body-map-card h3 { margin: 0 0 16px; font-size: 14px; letter-spacing: -.015em; }
.body-map-layout { max-width: 970px; margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) 220px minmax(0, 1fr); grid-template-rows: repeat(3, 122px); align-items: center; gap: 8px 24px; }
.body-map-figure { grid-column: 2; grid-row: 1 / 4; display: grid; place-items: center; }
.body-silhouette { width: 214px; height: 390px; object-fit: contain; filter: drop-shadow(0 12px 16px rgba(57, 88, 106, .12)); pointer-events: none; user-select: none; }
:root[data-theme="dark"] .body-silhouette { opacity: .88; filter: saturate(.72) brightness(.84) drop-shadow(0 12px 18px rgba(0, 0, 0, .28)); }
.body-map-region { min-width: 0; padding: 12px 14px; position: relative; border: 1px solid var(--line-soft); border-radius: 11px; background: var(--surface); box-shadow: 0 4px 14px rgba(21, 35, 30, .035); }
.body-map-region::after { content: ""; width: 24px; position: absolute; top: 50%; border-top: 1px solid var(--line); }
.point-left-arm, .point-left-leg { grid-column: 1; }
.point-right-arm, .point-trunk, .point-right-leg { grid-column: 3; }
.point-left-arm, .point-right-arm { grid-row: 1; }
.point-trunk { grid-row: 2; }
.point-left-leg, .point-right-leg { grid-row: 3; }
.point-left-arm::after, .point-left-leg::after { right: -25px; }
.point-right-arm::after, .point-trunk::after, .point-right-leg::after { left: -25px; }
.body-map-region h4 { margin: 0 0 10px; font-size: 11px; font-weight: 800; line-height: 1.2; letter-spacing: .055em; text-transform: uppercase; }
.body-map-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.body-map-measure { min-width: 0; display: grid; justify-items: start; align-content: start; gap: 3px; }
.body-map-measure + .body-map-measure { padding-left: 10px; border-left: 1px solid var(--line-soft); }
.body-map-measure-label { color: var(--muted); font-size: 10px; font-weight: 700; }
.body-map-measure strong { font-size: 15px; line-height: 1.2; white-space: nowrap; }
.body-map-measure em { font-size: 9px; font-style: normal; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.composition-details { margin: 24px 0 42px; }
.composition-details-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.segmental-analysis { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 0 28px 28px; }
.segment-group { padding: 20px; border: 1px solid var(--line-soft); border-radius: 13px; background: var(--surface-hover); }
.segment-group h3 { margin: 0 0 12px; font-size: 13px; }
.segment-row { min-height: 38px; display: grid; grid-template-columns: minmax(110px, 1fr) 62px 62px 68px; align-items: center; gap: 10px; border-top: 1px solid var(--line-soft); }
.segment-row > span, .segment-row small { color: var(--muted); font-size: 10px; }
.segment-row strong { font-size: 11px; }
.segment-row em { font-size: 9px; font-style: normal; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.segment-status::before { content: ""; width: 6px; height: 6px; display: inline-block; margin-right: 5px; border-radius: 50%; background: var(--muted); }
.status-high { color: var(--red); }
.status-high::before { background: var(--red); }
.status-healthy { color: var(--green); }
.status-healthy::before { background: var(--green); }
.status-low { color: var(--blue); }
.status-low::before { background: var(--blue); }

.section-anchor { scroll-margin-top: 100px; }
.panel-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: 16px; margin-bottom: 16px; }
.panel { border-radius: 17px; }
.chart-panel, .week-panel, .activities-panel { padding: 26px 28px; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 24px; }
.panel-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.panel-heading p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.weight-chart { min-height: 290px; margin-top: 17px; position: relative; }
.weight-chart svg { width: 100%; height: 290px; display: block; overflow: visible; }
.weight-point { transition: r 70ms ease, stroke-width 70ms ease, fill 70ms ease; }
.weight-point.is-active { r: 5.5px; stroke-width: 3px; fill: color-mix(in srgb, var(--green) 14%, var(--surface)); }
.weight-point-target {
  width: 30px;
  height: 30px;
  padding: 0;
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: crosshair;
}
.weight-point-target:focus-visible { outline: 2px solid color-mix(in srgb, var(--green) 72%, white); outline-offset: -7px; }
.weight-tooltip {
  min-width: 138px;
  padding: 10px 13px;
  position: absolute;
  left: 50%;
  z-index: 4;
  transform: translate(-50%, calc(-100% - 13px)) scale(.98);
  border: 1px solid color-mix(in srgb, white 12%, transparent);
  border-radius: 9px;
  background: rgba(27, 34, 29, .96);
  box-shadow: 0 9px 24px rgba(15, 23, 20, .2);
  color: #ffffff;
  display: grid;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 45ms ease, transform 65ms ease, visibility 0s linear 65ms;
  white-space: nowrap;
}
.weight-tooltip::after {
  content: "";
  width: 9px;
  height: 9px;
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%) rotate(45deg);
  background: inherit;
}
.weight-tooltip strong { font-size: 14px; line-height: 1.25; letter-spacing: -.01em; }
.weight-tooltip span { color: rgba(255, 255, 255, .72); font-size: 11px; line-height: 1.35; }
.weight-tooltip.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, calc(-100% - 13px)) scale(1); transition-delay: 0s; }
.chart-note { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.loading-line { min-height: 290px; border-radius: 12px; background: linear-gradient(90deg, transparent, var(--surface-muted), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.week-average { display: grid; gap: 3px; text-align: right; }
.week-average small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.week-average strong { font-size: 18px; }
.steps-week-chart { min-height: 290px; padding: 28px 6px 2px; display: flex; align-items: stretch; gap: 12px; }
.bar-column { flex: 1; min-width: 0; display: grid; grid-template-rows: 1fr auto; gap: 12px; text-align: center; }
.bar-track { min-height: 225px; border-bottom: 1px solid var(--line); display: flex; align-items: end; justify-content: center; position: relative; }
.bar { width: min(32px, 72%); min-height: 2px; border-radius: 5px 5px 0 0; background: color-mix(in srgb, var(--blue) 52%, var(--surface-muted)); position: relative; transition: height .25s ease; }
.bar-column.is-today .bar { background: var(--orange); }
.bar-column.is-missing .bar { background: var(--line); }
.bar-column.is-missing .bar-value { color: var(--muted); }
.bar-column.is-today > span { color: var(--orange); }
.bar-value { position: absolute; left: 50%; top: -24px; transform: translateX(-50%); color: var(--muted-strong); font-size: 11px; font-weight: 700; white-space: nowrap; }
.bar-column > span { color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; }

.activities-heading { padding-bottom: 14px; }
.activity-overview { display: flex; align-items: stretch; }
.activity-overview > div { min-width: 132px; padding: 0 18px; border-left: 1px solid var(--line); display: grid; gap: 4px; }
.activity-overview strong { font-size: 17px; letter-spacing: -.025em; }
.activity-overview span { color: var(--muted); font-size: 11px; line-height: 1.25; letter-spacing: .04em; text-transform: uppercase; }
.activities-list { border-top: 1px solid var(--line-soft); }
.activity-row { min-height: 92px; display: grid; grid-template-columns: minmax(0, 1fr) 306px auto; align-items: center; gap: 24px; border-bottom: 1px solid var(--line-soft); }
.activity-row:last-child { border-bottom: 0; }
.activity-main { display: flex; align-items: center; min-width: 0; gap: 15px; }
.activity-icon { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--orange) 12%, var(--surface)); color: var(--orange); }
.activity-icon-glyph { width: 27px; height: 27px; background: currentColor; -webkit-mask: var(--icon-mask) center / contain no-repeat; mask: var(--icon-mask) center / contain no-repeat; }
.activity-icon-directions-run { --icon-mask: url("./assets/icons/material/directions-run.svg"); }
.activity-icon-directions-walk { --icon-mask: url("./assets/icons/material/directions-walk.svg"); }
.activity-icon-hiking { --icon-mask: url("./assets/icons/material/hiking.svg"); }
.activity-icon-directions-bike { --icon-mask: url("./assets/icons/material/directions-bike.svg"); }
.activity-icon-fitness-center { --icon-mask: url("./assets/icons/material/fitness-center.svg"); }
.activity-icon-pool { --icon-mask: url("./assets/icons/material/pool.svg"); }
.activity-icon-sports { --icon-mask: url("./assets/icons/material/sports.svg"); }
.activity-copy { min-width: 0; }
.activity-copy h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.activity-copy p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.activity-stats { width: 306px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.activity-stat { display: grid; align-content: start; gap: 4px; min-width: 0; }
.activity-stat strong { font-size: 13px; white-space: nowrap; }
.activity-stat span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.activity-link { min-width: 132px; height: 36px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid color-mix(in srgb, var(--orange) 78%, #d74700); border-radius: 999px; background: #fc4c02; color: #fff; text-decoration: none; box-shadow: 0 5px 14px rgba(252, 76, 2, .16); transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease; }
.activity-link span { font-size: 10px; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; }
.activity-link b { font-size: 15px; font-weight: 500; line-height: 1; }
.activity-link:hover { background: #e84700; color: #fff; box-shadow: 0 7px 18px rgba(252, 76, 2, .24); transform: translateY(-1px); }
.activity-link.disabled { visibility: hidden; }

.site-footer { min-height: 78px; padding: 23px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; text-align: center; }
.site-footer p { margin: 0; }
.site-footer button { padding: 0; border: 0; background: none; color: inherit; cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.site-footer button:hover { color: var(--ink); }
.site-footer button:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 2px; }
.error-state { padding: 22px; border: 1px solid color-mix(in srgb, var(--red) 35%, var(--line)); border-radius: 11px; background: color-mix(in srgb, var(--red) 7%, var(--surface)); color: var(--muted-strong); font-size: 11px; }

.legal-modal { width: min(640px, calc(100% - 32px)); max-height: min(760px, calc(100dvh - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 80px rgba(9, 18, 12, .24); overflow: hidden; }
.legal-modal::backdrop { background: rgba(9, 18, 12, .58); backdrop-filter: blur(4px); }
.legal-modal-shell { max-height: inherit; display: flex; flex-direction: column; }
.legal-modal-header { padding: 25px 30px 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line-soft); }
.legal-modal-header h2 { margin: 7px 0 0; font-size: 26px; line-height: 1.15; letter-spacing: -.04em; }
.legal-modal-close { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-hover); color: var(--muted-strong); cursor: pointer; font: inherit; font-size: 23px; line-height: 1; }
.legal-modal-close:hover { color: var(--ink); background: var(--surface-muted); }
.legal-modal-close:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.legal-modal-content { padding: 24px 30px 30px; overflow-y: auto; }
.legal-modal-content h3 { margin: 24px 0 6px; font-size: 15px; }
.legal-modal-content p { margin: 0 0 14px; color: var(--muted-strong); font-size: 13px; line-height: 1.65; }
.legal-modal-content .legal-updated { margin: 26px 0 0; }

.legal-page { padding: 54px 0 90px; }
.legal-page > .brand { margin-bottom: 36px; }
.legal-card { max-width: 760px; padding: 42px; }
.legal-card h1 { margin: 12px 0 28px; font-size: clamp(34px, 6vw, 58px); letter-spacing: -.055em; }
.legal-card h2 { margin: 30px 0 8px; font-size: 17px; }
.legal-card p { color: var(--muted-strong); font-size: 14px; line-height: 1.7; }
.legal-card a { color: var(--green); }
.legal-updated { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line-soft); font-size: 11px !important; }
.connect-card form { display: grid; gap: 10px; margin-top: 28px; }
.connect-card label { color: var(--muted); font-size: 11px; font-weight: 750; }
.connect-card input { height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-hover); color: var(--ink); font: inherit; }
.connect-card button { height: 48px; margin-top: 4px; border: 0; border-radius: 10px; background: var(--ink); color: var(--surface); cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; }

@media (max-width: 1040px) {
  .shell { width: min(100% - 40px, 1440px); }
  .hero { gap: 36px; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .panel-grid { grid-template-columns: minmax(0, 1fr); }
  .composition-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .composition-details-grid { grid-template-columns: repeat(2, 1fr); }
  .activity-row { grid-template-columns: minmax(220px, 1fr) 270px auto; gap: 16px; }
  .activity-stats { width: 270px; gap: 12px; }
}

@media (max-width: 1120px) and (min-width: 901px) {
  .global-header-inner { gap: 14px; }
  .global-brand { font-size: 17px; }
  .site-nav a { padding-inline: 10px; }
}

@media (min-width: 761px) and (max-width: 1040px) {
  .metric-card { min-height: 228px; }
}

@media (max-width: 900px) {
  .global-header-inner { height: 72px; gap: 14px; }
  .global-brand { font-size: 17px; }
  .site-nav { display: none; }
  .site-menu { display: block; }
  .section-anchor { scroll-margin-top: 88px; }
  .hero { grid-template-columns: 1fr; gap: 26px; align-items: start; }
  .hero .date-kicker { position: static; flex: 0 0 auto; letter-spacing: .1em; }
  .hero h1 { font-size: clamp(76px, 22vw, 112px); }
  .composition-details-grid { grid-template-columns: repeat(2, 1fr); }
  .segmental-analysis { grid-template-columns: 1fr; }
  .activities-heading { align-items: start; flex-direction: column; }
  .activity-overview { width: 100%; padding-top: 14px; border-top: 1px solid var(--line-soft); }
  .activity-overview > div { flex: 1; min-width: 0; padding: 0 12px; }
  .activity-overview > div:first-child { padding-left: 0; border-left: 0; }
  .activity-row { grid-template-columns: 1fr auto; padding: 16px 0; }
  .activity-stats { grid-column: 1 / -1; grid-row: 2; width: min(100%, 306px); }
  .activity-link { grid-column: 2; grid-row: 1; }
}

@media (max-width: 760px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card:last-child { grid-column: 1 / -1; }
  .body-map-layout { grid-template-columns: minmax(0, 1fr) 185px minmax(0, 1fr); grid-template-rows: repeat(3, 105px); gap: 6px 12px; }
  .body-map-figure { grid-column: 2; grid-row: 1 / 4; padding: 0; }
  .body-silhouette { width: 185px; height: 310px; }
  .body-map-region { height: auto; padding: 9px; }
  .body-map-region::after { display: none; }
  .point-left-arm, .point-left-leg { grid-column: 1; }
  .point-right-arm, .point-trunk, .point-right-leg { grid-column: 3; }
  .point-left-arm, .point-right-arm { grid-row: 1; }
  .point-trunk { display: none; }
  .point-left-leg, .point-right-leg { grid-row: 3; }
  .body-map-region h4 { font-size: 9px; }
  .body-map-measure strong { font-size: 12px; }
}

@media (max-width: 540px) {
  .shell { width: min(100% - 32px, 1440px); }
  .global-header-inner { height: 66px; gap: 8px; }
  .global-brand { font-size: clamp(12px, 3.9vw, 16px); letter-spacing: .095em; }
  .section-anchor { scroll-margin-top: 82px; }
  .header-actions { gap: 7px; }
  .language-switch button { min-width: 32px; height: 29px; }
  .icon-button { width: 37px; height: 37px; }
  .site-menu summary { width: 37px; height: 37px; }
  .site-menu-panel { position: fixed; top: 66px; right: 16px; left: 16px; width: auto; }
  .dashboard { padding-top: 22px; padding-bottom: 38px; }
  .hero { padding-bottom: 24px; }
  .hero h1 { font-size: clamp(66px, 20vw, 100px); text-align: center; }
  .hero-subtitle { justify-content: center; flex-wrap: wrap; text-align: center; }
  .journey-summary { display: none; }
  .metric-grid { grid-template-columns: 1fr; gap: 10px; margin-bottom: 34px; }
  .metric-card:last-child { grid-column: auto; }
  .metric-card { min-height: 190px; padding: 16px 16px 66px; }
  .metric-card > strong { font-size: 25px; }
  .sparkline { left: 16px; right: 16px; bottom: 12px; height: 32px; }
  .composition-panel { padding: 20px 16px; }
  .composition-highlights { grid-template-columns: 1fr; gap: 1px; margin-top: 18px; }
  .composition-details-grid { grid-template-columns: 1fr; gap: 10px; }
  .composition-metric-card { min-height: 205px; padding-inline: 16px; }
  .composition-highlights .composition-metric-card { min-height: 215px; padding: 16px 16px 54px; }
  .composition-metric-card.is-featured > strong { font-size: 26px; }
  .composition-highlights .composition-metric-card > strong { margin-top: 9px; }
  .composition-group-secondary { min-height: 0; margin-top: 8px; flex-wrap: wrap; gap: 10px 18px; }
  .composition-group-stat { flex: 0 1 auto; max-width: 125px; }
  .composition-group-stat span { font-size: 10px; }
  .composition-highlights .composition-metric-card > p { margin-top: 9px; }
  .composition-highlights .composition-card-sparkline { height: 28px; bottom: 8px; }
  .composition-card-sparkline { right: 16px; left: 16px; }
  .composition-details-grid .composition-metric-card { padding-bottom: 78px; }
  .body-map-card h3 { margin-bottom: 10px; font-size: 15px; }
  .body-map-layout { grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr); grid-template-rows: 110px 62px 140px; gap: 0 2px; }
  .body-map-figure { align-self: stretch; position: relative; }
  .body-map-figure::before { content: ""; position: absolute; width: 100%; height: 82%; border-radius: 50%; background: radial-gradient(ellipse, color-mix(in srgb, var(--blue) 9%, transparent), transparent 70%); }
  .body-silhouette { position: relative; width: 150px; height: 312px; }
  .body-map-region { padding: 2px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .point-left-arm, .point-left-leg { text-align: right; }
  .body-map-region h4 { margin-bottom: 7px; font-size: 9px; line-height: 1.2; letter-spacing: .015em; }
  .body-map-metrics { grid-template-columns: 1fr; gap: 4px; }
  .body-map-measure { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
  .point-left-arm .body-map-measure, .point-left-leg .body-map-measure { align-items: flex-end; }
  .body-map-measure + .body-map-measure { padding: 0; border: 0; }
  .body-map-measure-label { font-size: 9px; }
  .body-map-measure strong { font-size: 13px; }
  .body-map-measure em { font-size: 8px; letter-spacing: 0; white-space: nowrap; }
  .body-map-measure em::before { display: none; }
  .composition-details { margin: 22px 0 34px; }
  .segmental-analysis { padding-inline: 16px; gap: 12px; }
  .segment-group { padding: 14px; }
  .segment-row { grid-template-columns: minmax(90px, 1fr) 54px 54px; }
  .segment-row em { grid-column: 1 / -1; padding-bottom: 8px; }
  .chart-panel, .week-panel, .activities-panel { padding: 20px 16px; }
  .panel-heading h2 { font-size: 18px; }
  .panel-heading p { line-height: 1.45; }
  .chart-key { display: none; }
  .weight-chart, .loading-line { min-height: 240px; }
  .weight-chart svg { height: 240px; }
  .week-panel .panel-heading { flex-wrap: wrap; gap: 12px; }
  .week-average { width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); text-align: left; }
  .steps-week-chart { min-height: 210px; padding: 26px 0 2px; gap: 5px; }
  .bar-track { min-height: 160px; }
  .bar-value, .bar-column > span { font-size: 10px; }
  .activities-heading { align-items: center; text-align: center; }
  .activities-heading > div:first-child { width: 100%; }
  .activities-heading > div:first-child p { max-width: 26ch; margin-inline: auto; }
  .activity-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding-top: 12px; }
  .activity-overview > div, .activity-overview > div:first-child { min-width: 0; min-height: 62px; padding: 2px 6px 0; border-top: 0; border-left: 1px solid var(--line-soft); display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
  .activity-overview > div:first-child { border-left: 0; }
  .activity-overview span { font-size: 9px; letter-spacing: .02em; }
  .activity-row { grid-template-columns: 1fr; gap: 12px; }
  .activity-copy h3 { white-space: normal; overflow: visible; }
  .activity-copy p { line-height: 1.4; }
  .activity-stats { grid-column: 1; grid-row: 2; width: 100%; gap: 8px; }
  .activity-link { grid-column: 1; grid-row: 3; justify-self: end; }
  .legal-modal-header { padding: 20px 20px 18px; }
  .legal-modal-header h2 { font-size: 23px; }
  .legal-modal-content { padding: 20px; }
  .legal-page { padding-top: 34px; }
  .legal-card { padding: 28px 20px; }
}

@media (max-width: 380px) {
  .shell { width: calc(100% - 24px); }
  .brand { font-size: 12px; letter-spacing: .07em; }
  .header-actions { gap: 5px; }
  .language-switch button { min-width: 29px; }
  .icon-button { width: 34px; height: 34px; }
  .body-map-layout { grid-template-columns: minmax(0, 1fr) 132px minmax(0, 1fr); }
  .body-silhouette { width: 132px; }
  .steps-week-chart { gap: 3px; }
  .bar-column.is-today > span { font-size: 9px; letter-spacing: -.03em; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 190px; }
}

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