@import url("tokens.css");

/*
 * SeeDingRun — component styles (FIT-64).
 *
 * Extracted verbatim from the inline <style>/style="" of the landing (index.php)
 * and dashboard (dashboard.php). Render-preserving: colours reference tokens.css
 * (never a raw hex); only px dimensions are literal. One class per former inline
 * style. Landing-only rules are scoped where a class name is shared with the
 * dashboard (see .landing .card:hover).
 */

/* — Reset / base ——————————————————————————————————————— */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; scroll-behavior: smooth; }
body {
  background: var(--color-bg);
  font-family: var(--font-body);
  color: var(--color-ink);
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
.bg { font-family: var(--font-display); }
.mono { font-family: var(--font-mono); }

/* — Shared hover states ————————————————————————————————— */
.lnk:hover { color: var(--color-green); }
.btn-green:hover { background: var(--color-green-hover); }
.btn-orange:hover { background: var(--color-orange-hover); }
.btn-outline:hover { border-color: var(--color-green); }
.landing .card:hover { border-color: var(--color-tint-green-border); }
.foot a:hover { color: var(--color-on-green-3); }

/* — details / summary (FAQ) ————————————————————————————— */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] .faq-sign { transform: rotate(45deg); }

/* — Animations —————————————————————————————————————————— */
@keyframes sfr-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes sfr-slide { from { transform: translateY(16px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes sfr-spin { to { transform: rotate(360deg); } }

/* — Shared wordmark ink spans ——————————————————————————— */
.wm-ink { color: var(--color-green-ink); }
.wm-accent { color: var(--color-orange); }
.wm-cream { color: var(--color-cream); }
.text-orange { color: var(--color-orange); }

/* — Reusable icon tints (feature cards, float badges) ———— */
.tint-peach { background: var(--color-tint-peach); }
.tint-blue { background: var(--color-tint-blue); }
.tint-green { background: var(--color-tint-green); }
.tint-sand { background: var(--color-tint-sand); }

/* ==========================================================================
   LANDING (index.php)
   ========================================================================== */
.landing { width: 100%; overflow-x: hidden; }

/* — Nav —————————————————————————————————————————————————— */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: var(--scrim-nav);
  border-bottom: 1px solid var(--color-hairline);
}
.nav-inner {
  max-width: var(--container); margin: 0 auto; padding: 15px 28px;
  display: flex; align-items: center; gap: 14px;
}
.nav-logo { display: flex; align-items: center; gap: 11px; }
.wordmark { font-weight: 700; font-size: 23px; letter-spacing: -.02em; }
.nav-links { margin-left: 28px; display: flex; gap: 26px; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--color-ink-soft); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-signin { font-size: 14px; font-weight: 600; color: var(--color-ink); padding: 9px 6px; }
.nav-cta {
  font-size: 14px; font-weight: 600; color: var(--color-surface);
  background: var(--color-green); padding: 10px 18px; border-radius: var(--radius-sm);
}

/* — Hero ————————————————————————————————————————————————— */
.hero { position: relative; overflow: hidden; }
.hero-glow {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 88% 8%, var(--glow-orange), transparent 38%),
    radial-gradient(circle at 6% 92%, var(--glow-blue), transparent 42%);
}
.hero-grid {
  position: relative; max-width: var(--container); margin: 0 auto;
  padding: 74px 28px 90px; display: grid;
  grid-template-columns: 1.03fr .97fr; gap: 52px; align-items: center;
}
.hero-copy { animation: sfr-slide .6s ease both; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px;
  border-radius: var(--radius-pill); background: var(--color-tint-green);
  border: 1px solid var(--color-tint-green-border); margin-bottom: 22px;
}
.hero-badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-green-dot); }
.hero-badge-text { font-size: 12px; font-weight: 600; color: var(--color-green); }
.hero-title { font-weight: 700; font-size: 60px; line-height: 1; letter-spacing: -.03em; margin: 0 0 22px; }
.hero-sub {
  font-size: 19px; line-height: 1.6; color: var(--color-ink-soft);
  margin: 0 0 30px; max-width: 480px;
}
.hero-actions { display: flex; gap: 13px; align-items: center; margin-bottom: 26px; flex-wrap: wrap; }
.hero-cta {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--color-green); color: var(--color-surface);
  font-size: 16px; font-weight: 600; padding: 15px 26px; border-radius: var(--radius-md);
}
.hero-outline {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; color: var(--color-ink);
  padding: 15px 18px; border-radius: var(--radius-md); border: 1px solid var(--color-outline);
}

/* — Hero product peek ——————————————————————————————————— */
.peek { position: relative; animation: sfr-slide .6s ease .1s both; }
.peek-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: 22px; padding: 18px; box-shadow: var(--shadow-card);
}
.peek-head {
  background: linear-gradient(150deg, var(--color-green-deep), var(--color-green));
  border-radius: 16px; padding: 18px; color: var(--color-surface);
}
.peek-head-row { display: flex; align-items: center; gap: 12px; }
.peek-avatar {
  width: 46px; height: 46px; border-radius: var(--radius-md);
  background: var(--color-avatar-gold); display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 22px; color: var(--color-green-deep);
}
.peek-name { font-weight: 700; font-size: 19px; }
.peek-breed { font-size: 12px; color: var(--color-on-green); }
.peek-streak { margin-left: auto; text-align: right; }
.peek-streak-num { font-weight: 600; font-size: 20px; color: var(--color-orange-soft); }
.peek-streak-label { font-size: 11px; color: var(--color-on-green); }
.peek-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.peek-tile { border: 1px solid var(--color-border-inner); border-radius: var(--radius-lg); padding: 15px; }
.peek-tile-goal { display: flex; align-items: center; gap: 14px; }
.peek-ring { position: relative; width: 66px; height: 66px; flex-shrink: 0; }
/* The ring is rendered by sdr_chart_ring() (partials/charts.php); it emits an
 * <svg class="chart-ring"> with a 66×66 viewBox — size it to fill the frame. */
.peek-ring .chart-ring { display: block; width: 100%; height: 100%; }
.peek-ring-label {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 16px;
}
.peek-goal-k { font-size: 12px; color: var(--color-muted); }
.peek-goal-v { font-weight: 600; font-size: 15px; }
.peek-week-k { font-size: 12px; color: var(--color-muted); margin-bottom: 8px; }
.peek-week-svg { width: 100%; height: auto; }
.peek-float {
  position: absolute; background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 12px 15px; box-shadow: var(--shadow-float);
  display: flex; align-items: center; gap: 11px;
}
.peek-float-bl { bottom: -22px; left: -26px; animation: sfr-float 5s ease-in-out infinite; }
.peek-float-tr { top: -20px; right: -18px; animation: sfr-float 5s ease-in-out .8s infinite; }
.peek-float-icon {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.peek-float-title { font-size: 12px; font-weight: 700; }
.peek-float-sub { font-size: 11px; color: var(--color-muted); }

/* — Trust strip ————————————————————————————————————————— */
.trust { border-top: 1px solid var(--color-hairline); background: var(--scrim-trust); }
.trust-inner {
  max-width: var(--container); margin: 0 auto; padding: 20px 28px;
  display: flex; align-items: center; gap: 34px; flex-wrap: wrap; justify-content: center;
}
.trust-label {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--color-faint);
}
.trust-brand { font-weight: 700; font-size: 18px; color: var(--color-muted); }
.trust-soon { font-weight: 700; font-size: 18px; color: var(--color-faint-2); }

/* — Eyebrow / section titles ————————————————————————————— */
.eyebrow {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--color-orange); margin-bottom: 14px;
}
.eyebrow--16 { margin-bottom: 16px; }

/* — Problem —————————————————————————————————————————————— */
.section-narrow { max-width: 900px; margin: 0 auto; padding: 84px 28px; text-align: center; }
.problem-title {
  font-weight: 700; font-size: 40px; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 18px;
}
.problem-lead { font-size: 18px; line-height: 1.65; color: var(--color-ink-soft); margin: 0; }

/* — Section bands ——————————————————————————————————————— */
.section-band {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border-strong);
  border-bottom: 1px solid var(--color-border-strong);
}
.section-band-top {
  background: var(--color-bg-alt); border-top: 1px solid var(--color-border-strong);
}

/* — Features ————————————————————————————————————————————— */
.features-inner { max-width: var(--container); margin: 0 auto; padding: 84px 28px; }
.features-head { text-align: center; margin-bottom: 50px; }
.section-title-40 { font-weight: 700; font-size: 40px; letter-spacing: -.02em; margin: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-gap-22 { gap: 22px; }
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}
.feature-card { padding: 26px; }
.icon-tint {
  width: 46px; height: 46px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 16px;
}
.feature-title { font-weight: 700; font-size: 18px; margin-bottom: 8px; }
.feature-body { font-size: 14px; line-height: 1.6; color: var(--color-muted); }

/* — How it works ———————————————————————————————————————— */
.how-inner { max-width: var(--container); margin: 0 auto; padding: 90px 28px; }
.how-head { text-align: center; margin-bottom: 54px; }
.step-num { font-weight: 800; font-size: 60px; color: var(--color-border); line-height: 1; }
.step-title { font-weight: 700; font-size: 21px; margin: 6px 0 10px; }
.step-body { font-size: 15px; line-height: 1.6; color: var(--color-muted); }

/* — Pricing —————————————————————————————————————————————— */
.pricing-inner { max-width: 980px; margin: 0 auto; padding: 84px 28px; }
.pricing-head { text-align: center; margin-bottom: 36px; }
.pricing-title { font-weight: 700; font-size: 40px; letter-spacing: -.02em; margin: 0 0 22px; }
.toggle {
  display: inline-flex; align-items: center; gap: 4px; background: var(--color-surface);
  border: 1px solid var(--color-border-pill); border-radius: var(--radius-pill); padding: 4px;
}
.toggle-btn {
  padding: 9px 18px; border-radius: var(--radius-pill); border: none; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 600;
  background: transparent; color: var(--color-muted);
}
.toggle-btn.is-active { background: var(--color-green); color: var(--color-surface); }
.toggle-save { font-size: 11px; opacity: .8; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
.plan-free {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl); padding: 30px;
}
.plan-name { font-weight: 700; font-size: 20px; }
.plan-name-pro { color: var(--color-footer-strong); }
.plan-free-desc { font-size: 14px; color: var(--color-muted); margin-bottom: 18px; }
.plan-desc-pro { font-size: 14px; color: var(--color-on-green); margin-bottom: 18px; }
.plan-price { font-weight: 700; font-size: 44px; letter-spacing: -.02em; }
.plan-price-pro { color: var(--color-footer-strong); }
.plan-period { font-size: 13px; color: var(--color-muted); margin-bottom: 22px; }
.plan-btn-free {
  display: block; text-align: center; padding: 13px; border-radius: 12px;
  border: 1px solid var(--color-outline); font-size: 15px; font-weight: 600; margin-bottom: 22px;
}
.plan-btn-pro {
  display: block; text-align: center; padding: 13px; border-radius: 12px;
  background: var(--color-orange); color: var(--color-orange-ink);
  font-size: 15px; font-weight: 700; margin-bottom: 22px;
}
.plan-feat { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 11px; }
/* Check marks are stroke="currentColor" SVGs — colour comes from the plan context
 * (green on the free card, soft-orange on the dark pro card), never a raw hex. */
.plan-check { flex-shrink: 0; margin-top: 1px; }
.plan-free .plan-check { color: var(--color-green); }
.plan-pro .plan-check { color: var(--color-orange-soft); }
.plan-feat-text { font-size: 14px; color: var(--color-ink-soft); }
.plan-feat-text-pro { font-size: 14px; color: var(--color-on-green-3); }
.plan-pro {
  position: relative;
  background: linear-gradient(155deg, var(--color-green-deep), var(--color-green));
  border-radius: var(--radius-2xl); padding: 30px; color: var(--color-surface); overflow: hidden;
}
.plan-badge {
  position: absolute; top: 18px; right: 18px; background: var(--color-orange);
  color: var(--color-orange-ink); font-size: 11px; font-weight: 700;
  padding: 5px 11px; border-radius: var(--radius-pill);
}
.plan-price-row { display: flex; align-items: baseline; gap: 4px; }
.plan-suffix { font-size: 15px; color: var(--color-on-green); }
.plan-note { font-size: 13px; color: var(--color-on-green); margin-bottom: 22px; }

/* — Testimonial ————————————————————————————————————————— */
.stars { font-size: 30px; margin-bottom: 20px; }
.quote { font-weight: 600; font-size: 28px; line-height: 1.35; letter-spacing: -.01em; margin: 0 0 24px; }
.author { display: flex; align-items: center; justify-content: center; gap: 12px; }
.author-avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--color-green);
  color: var(--color-surface); display: flex; align-items: center;
  justify-content: center; font-weight: 700;
}
.author-meta { text-align: left; }
.author-name { font-weight: 600; font-size: 14px; }
.author-sub { font-size: 13px; color: var(--color-muted); }

/* — FAQ —————————————————————————————————————————————————— */
.faq-inner { max-width: 780px; margin: 0 auto; padding: 84px 28px; }
.faq-title {
  font-weight: 700; font-size: 36px; letter-spacing: -.02em; margin: 0 0 34px; text-align: center;
}
.faq {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 20px 22px; margin-bottom: 12px;
}
.faq-summary { display: flex; align-items: center; gap: 14px; }
.faq-q { font-weight: 600; font-size: 16px; flex: 1; }
.faq-sign { font-size: 22px; color: var(--color-orange); font-weight: 400; transition: transform .2s; }
.faq-a { font-size: 15px; line-height: 1.6; color: var(--color-muted); margin-top: 12px; }

/* — Final CTA ———————————————————————————————————————————— */
.final {
  background: linear-gradient(160deg, var(--color-green-deep), var(--color-green));
  color: var(--color-surface); position: relative; overflow: hidden;
}
.final-glow {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 82% 20%, var(--glow-orange-strong), transparent 40%),
    radial-gradient(circle at 10% 90%, var(--glow-blue-strong), transparent 44%);
}
.final-inner { position: relative; max-width: 760px; margin: 0 auto; padding: 96px 28px; text-align: center; }
.final-title { font-weight: 700; font-size: 48px; line-height: 1.05; letter-spacing: -.02em; margin: 0 0 18px; }
.final-sub { font-size: 18px; color: var(--color-on-green-2); margin: 0 0 32px; }
.final-cta {
  display: inline-flex; align-items: center; gap: 10px; background: var(--color-orange);
  color: var(--color-orange-ink); font-size: 17px; font-weight: 700;
  padding: 17px 32px; border-radius: var(--radius-lg);
}

/* — Footer ——————————————————————————————————————————————— */
.foot { background: var(--color-footer-bg); color: var(--color-footer-text); padding: 48px 28px 40px; }
.foot-inner { max-width: var(--container); margin: 0 auto; }
.foot-logo { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.foot-wordmark { font-weight: 700; font-size: 18px; color: var(--color-footer-strong); }
.foot-text {
  font-size: 13px; line-height: 1.6; max-width: 640px; margin: 0 0 22px; color: var(--color-footer-muted);
}
.foot-links {
  display: flex; gap: 22px; flex-wrap: wrap; padding-top: 20px;
  border-top: 1px solid var(--color-footer-hairline); font-size: 13px;
}
.foot-right { margin-left: auto; }

/* — Landing responsive —————————————————————————————————— */
@media (max-width: 820px) {
  .hero-grid, .two-col { grid-template-columns: 1fr !important; }
  .grid-3 { grid-template-columns: 1fr !important; }
  .hide-sm { display: none !important; }
}

/* ==========================================================================
   DASHBOARD (dashboard.php)
   ========================================================================== */
.error-page {
  font-family: system-ui, sans-serif; margin: 0; min-height: 100vh;
  display: grid; place-items: center; background: var(--color-bg); color: var(--color-ink);
}
.error-msg { font-size: 16px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 26px 28px 64px; }
.top { display: flex; align-items: center; gap: 13px; margin-bottom: 26px; }
.brand { font-weight: 700; font-size: 21px; letter-spacing: -.02em; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px;
  border-radius: var(--radius-pill); background: var(--color-tint-green);
  border: 1px solid var(--color-tint-green-border); font-size: 12px; font-weight: 600; color: var(--color-green);
}
.pill--right { margin-left: auto; }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-green-dot); display: inline-block; }

.dash-title { font-weight: 700; font-size: 42px; letter-spacing: -.03em; line-height: 1.05; margin-bottom: 8px; }
.dash-breed { color: var(--color-muted); font-size: 22px; font-weight: 600; }
.dash-intro { font-size: 17px; color: var(--color-ink-soft); margin: 0; max-width: 680px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 22px 0; }
.stat { padding: 20px 22px; }
.stat .k { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--color-faint); margin-bottom: 9px; }
.stat .v { font-weight: 700; font-size: 32px; letter-spacing: -.02em; line-height: 1; }
.stat .s { font-size: 13px; color: var(--color-muted); margin-top: 7px; }

.panel { padding: 26px 26px 20px; }
.panel h2 { font-weight: 700; font-size: 24px; letter-spacing: -.02em; margin: 0 0 4px; }
.panel .sub { font-size: 14px; color: var(--color-muted); margin: 0 0 18px; }
.dash-chart { width: 100%; height: auto; display: block; }
.dash-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--color-faint); margin-top: 6px; }

.dash-ranks-wrap { margin-top: 34px; }
.dash-ranks-head { font-weight: 700; font-size: 24px; letter-spacing: -.02em; }
.dash-ranks-sub { font-size: 14px; font-weight: 600; color: var(--color-muted); }
.ranks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.rank { padding: 22px; }
.rank .pack { font-size: 13px; font-weight: 600; color: var(--color-green); margin-bottom: 6px; }
.rank .band { display: inline-block; font-size: 11px; font-weight: 600; color: var(--color-muted);
  background: var(--color-tint-sand); border: 1px solid var(--color-border); border-radius: 999px;
  padding: 2px 8px; margin-bottom: 10px; }
.rank .num { font-weight: 700; font-size: 34px; letter-spacing: -.02em; }
.rank .steps { font-size: 13px; color: var(--color-muted); margin-top: 8px; }

.dash-note { font-size: 12px; color: var(--color-faint); margin-top: 38px; }

@media (max-width: 820px) { .stat-grid, .ranks { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .stat-grid, .ranks { grid-template-columns: 1fr; } }

/* ==========================================================================
   LOGIN / REGISTER — centred card shell (register.php + shared auth surfaces)
   ========================================================================== */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background-image:
    radial-gradient(circle at 88% 8%, var(--glow-orange), transparent 38%),
    radial-gradient(circle at 6% 92%, var(--glow-blue), transparent 42%);
}
.login-card {
  width: 100%; max-width: 400px; background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-2xl);
  padding: 40px 34px; box-shadow: var(--shadow-card); text-align: center;
}
.login-logo { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.login-wordmark { font-weight: 700; font-size: 20px; letter-spacing: -.02em; }

/* ==========================================================================
   LOGIN — split-screen brand layout (login.php, FIT-101)
   Brand-green gradient panel (mark + value copy + orange glow) beside the cream
   sign-in surface. Below --bp-login the brand panel collapses; sign-in stays.
   ========================================================================== */
.login-split { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 0.95fr; }
.login-brand {
  position: relative; overflow: hidden; background: var(--gradient-brand);
  padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  color: var(--color-footer-strong);
}
/* Subtle orange (top-right) + dusty-blue (bottom-left) radial glow over the gradient. */
.login-brand::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 80% 15%, var(--glow-orange-strong), transparent 42%),
    radial-gradient(circle at 12% 88%, var(--glow-blue-strong), transparent 45%);
}
.login-brand > * { position: relative; z-index: 1; }
.login-brand-logo { display: inline-flex; align-items: center; }
.login-brand-logo .logo-mark { filter: drop-shadow(var(--shadow-logo)); }
.login-brand-copy { max-width: 460px; }
.login-eyebrow {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--color-orange-soft); margin: 0 0 20px;
}
.login-headline {
  font-weight: 700; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.02;
  letter-spacing: -.03em; color: var(--color-footer-strong); margin: 0 0 20px;
}
.login-tagline { font-size: 17px; line-height: 1.6; color: var(--color-on-green-2); margin: 0; }
.login-brand-spacer { display: block; }
.login-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 48px; background: var(--color-bg-alt);
}
.login-panel-inner { width: 100%; max-width: 380px; }
@media (max-width: 860px) {
  .login-split { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { padding: 40px 24px; }
}

.login-title { font-weight: 700; font-size: 26px; letter-spacing: -.02em; margin: 0 0 8px; }
.login-sub { font-size: 15px; color: var(--color-muted); margin: 0 0 26px; }
.login-error {
  background: var(--color-error-bg); border: 1px solid var(--color-error-border);
  color: var(--color-error); font-size: 14px; padding: 11px 14px;
  border-radius: var(--radius-md); margin-bottom: 20px; text-align: left;
}
.login-google {
  display: flex; align-items: center; justify-content: center; gap: 11px;
  width: 100%; padding: 13px 18px; border-radius: var(--radius-md);
  background: var(--color-surface); border: 1px solid var(--color-outline);
  font-size: 15px; font-weight: 600; color: var(--color-ink); transition: border-color .15s;
}
.login-google:hover { border-color: var(--color-green); }
.login-google svg { width: 18px; height: 18px; flex-shrink: 0; }
.login-fineprint { font-size: 12px; color: var(--color-faint); margin: 18px 0 0; }
.login-back { display: inline-block; margin-top: 18px; font-size: 13px; font-weight: 600; color: var(--color-muted); }

/* ==========================================================================
   LEGAL PAGES (legal/terms.php, legal/privacy.php — shared partial)
   ========================================================================== */
.legal { width: 100%; overflow-x: hidden; }

.legal-bar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: var(--scrim-nav);
  border-bottom: 1px solid var(--color-hairline);
}
.legal-bar-inner {
  max-width: 820px; margin: 0 auto; padding: 15px 28px;
  display: flex; align-items: center; gap: 14px;
}
.legal-logo { display: flex; align-items: center; gap: 10px; }
.legal-wordmark { font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.legal-back { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--color-muted); }

.legal-doc { max-width: 820px; margin: 0 auto; padding: 56px 28px 72px; }
.legal-title { font-weight: 700; font-size: 40px; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 10px; }
.legal-updated { font-size: 13px; color: var(--color-faint); margin: 0 0 28px; }
.legal-intro { font-size: 18px; line-height: 1.65; color: var(--color-ink-soft); margin: 0 0 20px; }
.legal-section { margin-top: 34px; }
.legal-h { font-weight: 700; font-size: 22px; letter-spacing: -.02em; margin: 0 0 12px; }
.legal-p { font-size: 16px; line-height: 1.7; color: var(--color-ink-soft); margin: 0 0 14px; }

.legal-foot-links a[aria-current="page"] { color: var(--color-footer-strong); }

@media (max-width: 520px) {
  .legal-title { font-size: 32px; }
}

/* ==========================================================================
   AUTH FORMS (register.php, account/index.php) — FIT-69
   ========================================================================== */
.auth-alert[hidden] { display: none; }
.auth-success {
  background: var(--color-tint-green); border: 1px solid var(--color-tint-green-border);
  color: var(--color-green); font-size: 14px; padding: 11px 14px;
  border-radius: var(--radius-md); margin-bottom: 20px; text-align: left;
}
.auth-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-label {
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  text-transform: uppercase; color: var(--color-faint);
}
.auth-input {
  width: 100%; padding: 12px 14px; font-size: 15px; font-family: var(--font-body);
  color: var(--color-ink); background: var(--color-surface);
  border: 1px solid var(--color-outline); border-radius: var(--radius-md);
  transition: border-color .15s;
}
.auth-input:focus { outline: none; border-color: var(--color-green); }
.auth-hint { font-size: 12px; color: var(--color-faint); }
.auth-submit {
  width: 100%; padding: 13px 18px; margin-top: 4px; font-size: 15px; font-weight: 600;
  color: var(--color-surface); background: var(--color-green);
  border: 1px solid var(--color-green); border-radius: var(--radius-md); cursor: pointer;
}
.auth-submit:disabled { opacity: .6; cursor: default; }
.auth-submit--outline {
  color: var(--color-ink); background: var(--color-surface);
  border-color: var(--color-outline);
}
.auth-divider {
  display: flex; align-items: center; gap: 12px; margin: 22px 0;
  font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--color-faint);
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--color-border);
}

/* ==========================================================================
   ACCOUNT (account/index.php) — FIT-69
   ========================================================================== */
.account-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background-image:
    radial-gradient(circle at 88% 8%, var(--glow-orange), transparent 38%),
    radial-gradient(circle at 6% 92%, var(--glow-blue), transparent 42%);
}
.account-card {
  width: 100%; max-width: 460px; background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-2xl);
  padding: 40px 34px; box-shadow: var(--shadow-card); text-align: center;
}
.account-section {
  margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--color-border);
  text-align: left;
}
.account-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 8px 0;
}
.account-value { font-size: 15px; font-weight: 600; color: var(--color-ink); word-break: break-word; }
.account-heading { font-size: 15px; font-weight: 700; color: var(--color-ink); margin: 0 0 6px; }
.account-help { font-size: 13px; color: var(--color-muted); margin: 0 0 14px; }

/* — Dashboard account / sign-out control (dashboard.php) —————— */
.dash-account { display: flex; align-items: center; gap: 14px; margin-left: 16px; }
.dash-account-link { font-size: 14px; font-weight: 600; color: var(--color-muted); }
.dash-logout { margin: 0; }
.dash-logout-btn {
  font-size: 13px; font-weight: 600; color: var(--color-ink);
  background: var(--color-surface); border: 1px solid var(--color-outline);
  border-radius: var(--radius-md); padding: 8px 14px; cursor: pointer;
}
.dash-logout-btn:disabled { opacity: .6; cursor: default; }

/* ==========================================================================
   PET EDIT (pets/edit.php)
   ========================================================================== */
.pet-panel { max-width: 560px; padding: 30px 30px 26px; }
.pet-heading { font-weight: 700; font-size: 32px; letter-spacing: -.02em; margin: 0 0 6px; }
.pet-intro { font-size: 15px; color: var(--color-muted); margin: 0 0 22px; }

.pet-status {
  font-size: 14px; padding: 11px 14px; border-radius: var(--radius-md);
  margin-bottom: 20px; border: 1px solid transparent;
}
.pet-status--ok {
  background: var(--color-tint-green); border-color: var(--color-tint-green-border);
  color: var(--color-green);
}
.pet-status--error {
  background: var(--color-error-bg); border-color: var(--color-error-border);
  color: var(--color-error);
}

.pet-form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--color-ink-soft); }
.field-input {
  font-family: inherit; font-size: 15px; color: var(--color-ink);
  padding: 12px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--color-outline); background: var(--color-surface);
  transition: border-color .15s;
}
.field-input:focus { outline: none; border-color: var(--color-green); }

.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 6px; }
.pet-cancel {
  display: inline-block; padding: 12px 20px; border-radius: var(--radius-sm);
  border: 1px solid var(--color-outline); font-size: 15px; font-weight: 600; color: var(--color-ink);
}
.pet-save {
  padding: 12px 24px; border-radius: var(--radius-sm); border: none; cursor: pointer;
  background: var(--color-green); color: var(--color-surface);
  font-family: inherit; font-size: 15px; font-weight: 600;
}
.pet-save:disabled { opacity: .6; cursor: default; }

/* ==========================================================================
   APP (fi-style screens) — the reusable shell + component kit (FIT-97)
   --------------------------------------------------------------------------
   Card-based mobile app surface reproducing Fi's LAYOUT (stat row → ring/gauge
   → chart → Day/Week/Month/Year toggle → compare-vs-previous) on SeeDingRun's
   OWN warm palette. Every colour resolves to a token (tokens.css); chart marks
   are coloured via the .fill-* / .stroke-* classes below so the skin swaps
   centrally. Wave-1 screens should add little-to-no CSS — compose these.
   ========================================================================== */

/* — Chart mark colours (SVG fill/stroke driven by tokens, never inline hex) —— */
.fill-activity            { fill: var(--color-activity); }
.fill-rest                { fill: var(--color-rest); }
.fill-rank                { fill: var(--color-rank-accent); }
.fill-accent              { fill: var(--color-orange); }
.fill-track               { fill: var(--color-track); }
.fill-muted               { fill: var(--color-faint); }
.fill-barking             { fill: var(--color-behavior-barking); }
.fill-eating              { fill: var(--color-behavior-eating); }
.fill-drinking            { fill: var(--color-behavior-drinking); }
.fill-licking             { fill: var(--color-behavior-licking); }
.fill-scratching          { fill: var(--color-behavior-scratching); }

.stroke-activity          { stroke: var(--color-activity); }
.stroke-rest              { stroke: var(--color-rest); }
.stroke-rank              { stroke: var(--color-rank-accent); }
.stroke-accent            { stroke: var(--color-orange); }
.stroke-muted             { stroke: var(--color-faint); }

.chart                    { display: block; }
.chart-stroke             { fill: none; stroke-width: var(--chart-stroke-width); stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-avg                { stroke-width: var(--chart-stroke-width-thin); }
.chart-axis               { stroke: var(--color-track); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.chart-dot                { fill: var(--color-cream); stroke-width: var(--chart-stroke-width); vector-effect: non-scaling-stroke; }
.chart-area               { /* fill supplied by a per-instance gradient (url(#…)) */ }
.chart-bars               { width: 100%; height: 132px; }         /* stretched to fill (rects only) */
.chart-line, .chart-compare { width: 100%; height: auto; }        /* aspect kept so dots stay round */
.chart-line--stretch      { height: 300px; }                      /* wide full-bleed trend (preserveAspectRatio=none) */
.chart-timeline           { width: 100%; height: auto; }
.chart-gauge              { width: 100%; height: auto; }
/* Gradient stops for the area fills — coloured by token so the skin re-points centrally. */
.grad-activity-0          { stop-color: var(--color-orange); stop-opacity: .32; }
.grad-activity-1          { stop-color: var(--color-orange); stop-opacity: 0; }
.grad-rest-0              { stop-color: var(--color-rest); stop-opacity: .32; }
.grad-rest-1              { stop-color: var(--color-rest); stop-opacity: 0; }
/* Annual-report metric tones (FIT-109) — dist/nap/goal; steps→activity, sleep→rest reuse. */
.fill-dist                { fill: var(--color-metric-dist); }
.stroke-dist              { stroke: var(--color-metric-dist); }
.grad-dist-0              { stop-color: var(--color-metric-dist); stop-opacity: .30; }
.grad-dist-1              { stop-color: var(--color-metric-dist); stop-opacity: 0; }
.fill-nap                 { fill: var(--color-metric-nap); }
.stroke-nap               { stroke: var(--color-metric-nap); }
.grad-nap-0               { stop-color: var(--color-metric-nap); stop-opacity: .30; }
.grad-nap-1               { stop-color: var(--color-metric-nap); stop-opacity: 0; }
.fill-goal                { fill: var(--color-metric-goal); }
.stroke-goal              { stroke: var(--color-metric-goal); }
.grad-goal-0              { stop-color: var(--color-metric-goal); stop-opacity: .28; }
.grad-goal-1              { stop-color: var(--color-metric-goal); stop-opacity: 0; }
/* Last-point emphasis halo (sdr_chart_line 'halo') — a translucent tone ring under the dot. */
.chart-halo               { opacity: .20; }
.ring-track               { stroke: var(--color-track); }
.ring-value               { transition: stroke-dashoffset .4s ease; }
.ring-text                { fill: var(--color-ink); font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.gauge-thumb              { fill: var(--color-surface); stroke: var(--color-orange); stroke-width: 2; }

/* — Segmented control (Day/Week/Month/Year) ——————————————— */
.seg {
  display: flex; gap: 2px; background: var(--color-surface);
  border: 1px solid var(--color-border-pill); border-radius: var(--radius-pill); padding: 4px;
}
.seg-btn {
  flex: 1; text-align: center; padding: 8px 10px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; color: var(--color-muted);
}
.seg-btn.is-active { background: var(--color-green-ink); color: var(--color-surface); }

/* — Stat tile (generalises .stat) + big-number row ————————— */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.stat-tile {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-4) var(--space-3);
}
.stat-tile-k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--color-faint); margin-bottom: 6px; }
/* The number is the mark → JetBrains Mono; it wears an ink text token, never a series colour. */
.stat-tile-v { font-family: var(--font-mono); font-weight: 600; font-size: 26px; letter-spacing: -.01em; line-height: 1; color: var(--color-ink); }
.stat-tile-s { font-size: 12px; color: var(--color-muted); margin-top: 5px; }
/* Hero tile (e.g. Rank — the product's hero metric): the emphasis lives in the CONTAINER
 * (accent border + tint), never on the number's ink — text wears text tokens. */
.stat-tile--hero { border-color: var(--color-rank-accent); background: var(--color-tint-peach); }
.stat-tile--hero .stat-tile-v { font-size: 30px; }

/* — Metric card (generic section container) ——————————————— */
.metric-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); padding: var(--space-5) var(--space-4);
}
.metric-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.metric-card-title { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.metric-card-sub { font-size: 13px; color: var(--color-muted); }
.metric-card-value { font-family: var(--font-mono); font-weight: 600; font-size: 22px; letter-spacing: -.01em; color: var(--color-orange-text); }

/* — Ring (SVG progress ring) ————————————————————————————— */
.ring { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 128px; height: 128px; }
.ring--sm { width: 96px; height: 96px; }
.ring .chart-ring { width: 100%; height: 100%; }
.ring-label {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.ring-label-v { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; line-height: 1; }
.ring-label-k { font-size: 11px; color: var(--color-muted); margin-top: 3px; }

/* — Gauge (strain slider) ————————————————————————————————— */
.gauge { display: flex; flex-direction: column; gap: 8px; }
.gauge-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--color-faint); }
.gauge-value { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }

/* — Leaderboard rows (rank is the hero) ———————————————————— */
.leader-row {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 11px var(--space-3); border-radius: var(--radius-md);
  border: 1px solid var(--color-border); background: var(--color-surface);
}
.leader-row + .leader-row { margin-top: 8px; }
.leader-rank { font-family: var(--font-mono); font-weight: 600; font-size: 15px; color: var(--color-muted); min-width: 34px; }
.leader-avatar {
  width: 34px; height: 34px; border-radius: var(--radius-pill); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
  background: var(--color-tint-sand); color: var(--color-green-deep);
}
.leader-name { font-weight: 600; font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader-value { font-family: var(--font-mono); font-weight: 600; font-size: 14px; color: var(--color-ink-soft); }
.leader-row--self { border-color: var(--color-rank-accent); background: var(--color-tint-peach); }
.leader-row--self .leader-rank { color: var(--color-rank-accent); }

/* — Pack rail (horizontal-scroll community chips) —————————— */
.pack-rail { display: flex; gap: var(--space-3); overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.pack-rail::-webkit-scrollbar { display: none; }
.pack-chip {
  flex: 0 0 auto; min-width: 132px; padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg); border: 1px solid var(--color-border); background: var(--color-surface);
}
.pack-chip-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.pack-chip-meta { font-size: 12px; color: var(--color-muted); }
.pack-chip--self { border-color: var(--color-rank-accent); background: var(--color-tint-peach); }
a.pack-chip, a.pack-chip:hover, a.pack-chip:focus { text-decoration: none; color: inherit; }
.pack-chip-rank { font-family: var(--font-mono); font-weight: 700; font-size: 20px; letter-spacing: -.02em; color: var(--color-rank-accent); margin-bottom: 2px; }

/* — Rank screen (FIT-9): the hero. Rank-change chip, neighbour age, over-time axis —— */
.rank-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-weight: 600; font-size: 12px;
  padding: 2px 8px; border-radius: var(--radius-pill);
  border: 1px solid var(--color-border); background: var(--color-tint-sand); color: var(--color-muted);
}
.rank-chip--up { color: var(--color-success); background: var(--color-success-bg); border-color: var(--color-success-border); }
.rank-chip--down { color: var(--color-error); background: var(--color-error-bg); border-color: var(--color-error-border); }
.rank-chip--flat { color: var(--color-muted); background: var(--color-tint-sand); border-color: var(--color-border); }

.leader-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.leader-main .leader-name { flex: none; }
.leader-you {
  font-family: var(--font-mono); font-weight: 600; font-size: 11px; letter-spacing: .04em;
  color: var(--color-rank-accent); text-transform: uppercase; margin-left: 6px;
}
.leader-age { font-family: var(--font-mono); font-size: 12px; color: var(--color-muted); }
.leader-right { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }

.rank-axis {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: var(--space-3); font-family: var(--font-mono); font-size: 12px; color: var(--color-muted);
}
.rank-axis-v { color: var(--color-ink); font-weight: 600; }
.rank-caption { font-size: 12px; color: var(--color-muted); margin: var(--space-2) 0 0; }

.rank-empty {
  text-align: center; padding: var(--space-8) var(--space-4);
  border: 1px dashed var(--color-border-strong); border-radius: var(--radius-lg); background: var(--color-surface);
}
.rank-empty-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin: 0 0 6px; }
.rank-empty-body { font-size: 13px; color: var(--color-muted); margin: 0 auto; max-width: 34ch; }

/* — Record card (personal records) ——————————————————————— */
.record-card {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4); border-radius: var(--radius-lg);
  border: 1px solid var(--color-border); background: var(--color-surface);
}
.record-medal {
  width: 40px; height: 40px; border-radius: var(--radius-pill); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-tint-peach); color: var(--color-rank-accent);
}
.record-body { flex: 1; min-width: 0; }
.record-value { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; line-height: 1.1; }
.record-label { font-size: 13px; color: var(--color-muted); }
.record-date { font-family: var(--font-mono); font-size: 12px; color: var(--color-faint); }

/* — Behaviour rows (barking/eating/…) ————————————————————— */
.behavior-row { display: flex; align-items: center; gap: var(--space-3); }
.behavior-row + .behavior-row { margin-top: 11px; }
.behavior-label { font-size: 13px; font-weight: 600; color: var(--color-ink-soft); min-width: 84px; }
.behavior-bar { flex: 1; display: block; }
.behavior-bar .chart-gauge { display: block; width: 100%; }
.behavior-bar .gauge-thumb { display: none; } /* category bar, not an interactive slider */
.behavior-value { font-family: var(--font-mono); font-size: 12px; color: var(--color-muted); min-width: 40px; text-align: right; }

/* — Compare (vs previous period) ————————————————————————— */
.compare { display: flex; flex-direction: column; gap: var(--space-3); }
.compare-legend { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.compare-legend-item { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--color-muted); }
.compare-dot { width: 10px; height: 10px; border-radius: var(--radius-pill); flex-shrink: 0; }
.compare-dot--current { background: var(--color-activity); }
.compare-dot--previous { background: var(--color-rest); }
.compare-delta { font-family: var(--font-mono); font-weight: 600; font-size: 13px; }
.compare-delta--up { color: var(--color-green-dot); }
.compare-delta--down { color: var(--color-error); }

/* — Resting card shadow (design: white card, 1px border, soft shadow) —————— */
.stat-tile, .metric-card, .leader-row, .pack-chip, .record-card { box-shadow: var(--shadow-card-soft); }

/* — Brand logo (reusable mark + wordmark, see partials/logo.php) ——————————— */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { display: block; flex-shrink: 0; }
.logo-wordmark { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -.02em; }
.logo-wordmark .wm-ink { color: var(--color-green-ink); }
.logo-wordmark .wm-accent { color: var(--color-orange); }
.logo--on-dark .wm-ink { color: var(--color-cream); }

/* — Alert / anomaly banner (warm peach) ——————————————————————————————————— */
.alert { display: flex; align-items: center; gap: var(--space-3); padding: 15px 18px; border-radius: var(--radius-lg); }
.alert--warn { background: var(--color-warn-bg); border: 1px solid var(--color-warn-border); }
.alert-icon {
  width: 38px; height: 38px; border-radius: var(--radius-md); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-orange); color: var(--color-surface);
}
.alert-body { flex: 1; min-width: 0; }
.alert-title { font-weight: 600; font-size: 14px; color: var(--color-warn-title); }
.alert-text { font-size: 13px; color: var(--color-warn-ink); }

/* — Streak flame (mono number + orange spark) ————————————————————————————— */
.streak { display: inline-flex; align-items: center; gap: 5px; }
.streak-num { font-family: var(--font-mono); font-weight: 600; font-size: 15px; color: var(--color-ink); }
.streak-flame { color: var(--color-orange); display: inline-flex; }

/* — Filter chip (segmented off / on=orange) ——————————————————————————————— */
.chip {
  padding: 8px 14px; border-radius: var(--radius-pill); cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600;
  background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-ink-soft);
}
.chip.is-on { background: var(--color-orange); border-color: var(--color-orange); color: var(--color-orange-ink); }

/* — Kit harness scaffolding ————————————————————————————— */
.kit-block { display: flex; flex-direction: column; gap: var(--space-3); }
.kit-block-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--color-faint); }
.kit-row { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }

/* — Pet profile screen (FIT-102) ————————————————————————————————————————————
   The stat trio / record cards / pack rows reuse the kit primitives above; only
   the pet hero and the tier-progress chrome are screen-specific. */
.profile-hero {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-5) var(--space-4); border-radius: var(--radius-xl);
  border: 1px solid var(--color-border); background: var(--color-surface);
  box-shadow: var(--shadow-card-soft);
}
.profile-monogram {
  width: 64px; height: 64px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--color-tint-peach); color: var(--color-green-deep);
  font-family: var(--font-display); font-weight: 700; font-size: 30px;
}
.profile-identity { min-width: 0; }
.profile-name {
  font-family: var(--font-display); font-weight: 700; font-size: 26px;
  letter-spacing: -.02em; line-height: 1.05; margin: 0;
}
.profile-meta { font-size: 14px; color: var(--color-muted); margin: 4px 0 3px; }
.profile-handle { font-family: var(--font-mono); font-size: 12px; color: var(--color-faint); }

.profile-records { display: flex; flex-direction: column; gap: var(--space-3); }
.profile-empty { font-size: 14px; color: var(--color-muted); margin: 0; }

.tier-progress { display: flex; flex-direction: column; gap: var(--space-4); }
.tier-progress-head { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.tier-badge {
  display: inline-flex; align-items: center; padding: 6px 14px;
  border-radius: var(--radius-pill); border: 1px solid var(--color-border);
  font-weight: 700; font-size: 14px;
}
.tier-badge--current { background: var(--color-tint-green); color: var(--color-green); border-color: var(--color-tint-green-border); }
.tier-badge--next { background: var(--color-surface); color: var(--color-muted); }
.tier-arrow { color: var(--color-faint); flex-shrink: 0; }
.tier-progress-bar { display: block; }
.tier-progress-bar .gauge-thumb { display: none; } /* progress fill, not an interactive slider */
.tier-progress-caption {
  display: flex; justify-content: space-between; gap: var(--space-3);
  font-family: var(--font-mono); font-size: 12px; color: var(--color-muted);
}
.tier-maxed-note { font-size: 14px; font-weight: 600; color: var(--color-green); margin: 0; }

/* — Live / home screen (FIT-14) ——————————————————————————————————————————— */
.live-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3); }
.live-hero .ring { width: 176px; height: 176px; }
.live-hero .ring-label-v { font-size: 34px; }
.live-hero-goal { font-family: var(--font-mono); font-size: 13px; color: var(--color-muted); margin-top: 3px; }
.live-togo {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: var(--radius-sm); font-size: 12px; font-weight: 600;
  background: var(--color-tint-green); color: var(--color-green);
}
.live-togo--done { background: var(--color-tint-peach); color: var(--color-orange-text); }

/* — No-goal hero (FIT-107): a clean steps figure instead of a garbled empty ring —— */
.live-hero--nogoal { gap: var(--space-2); }
.live-nogoal-figure { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.live-nogoal-num { font-family: var(--font-display); font-weight: 700; font-size: 46px; letter-spacing: -.03em; line-height: 1; color: var(--color-ink); }
.live-nogoal-unit { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--color-faint); }
.live-nogoal-side { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.live-setgoal {
  display: inline-flex; align-items: center; padding: 7px 14px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; color: var(--color-green);
  background: var(--color-tint-green); border: 1px solid var(--color-tint-green-border);
}
.live-setgoal:hover { border-color: var(--color-green); }
.app-dashboard-link { align-self: center; margin-top: var(--space-2); }
/* "As of <date>" caption when the hero anchors to the latest day rather than today. */
.live-asof {
  align-self: center; margin: calc(-1 * var(--space-2)) 0 0;
  font-family: var(--font-mono); font-size: 12px; color: var(--color-muted);
}

.live-mini { display: flex; align-items: center; gap: var(--space-4); }
.live-mini-main { flex: 1; min-width: 0; }
.live-mini-aside { flex-shrink: 0; display: flex; align-items: center; }

.live-rank-num { font-family: var(--font-display); font-weight: 700; font-size: 32px; letter-spacing: -.02em; line-height: 1; color: var(--color-rank-accent); margin-top: 6px; }
.live-rank-pack { font-size: 13px; color: var(--color-muted); margin-top: 4px; }
.live-podium { display: block; }

.live-walk-meta { font-family: var(--font-mono); font-size: 15px; color: var(--color-ink-soft); margin-top: 6px; }
.live-walk-sub { font-size: 12px; color: var(--color-faint); margin-top: 4px; }
.live-route { display: block; }

.live-streak-flame { color: var(--color-orange); display: inline-flex; }
.live-streak-num { font-family: var(--font-display); font-weight: 700; font-size: 28px; letter-spacing: -.02em; line-height: 1; color: var(--color-ink); }
.live-spark { margin-top: var(--space-3); }

.live-empty { text-align: center; padding: var(--space-8) var(--space-4); display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.live-empty-title { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.live-empty-body { color: var(--color-muted); font-size: 14px; max-width: 320px; margin: 0; }

/* — Health detail screens · Activity + Rest (FIT-103) ————————————————————— */
.metric-hero { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; }
.metric-hero-body { display: flex; flex-direction: column; gap: 4px; }
.metric-hero-num {
  font-family: var(--font-display); font-weight: 700; font-size: 46px; line-height: 1;
  letter-spacing: -.02em; color: var(--color-ink);
}
.metric-hero-unit { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--color-muted); margin-left: 6px; }
.metric-hero-label { font-size: 13px; color: var(--color-muted); }
.metric-value-rest { color: var(--color-rest); }

/* "Sample, not from the collar" tag on the strain gauge (EAV lead, unvalidated). */
.sample-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--color-faint); background: var(--color-tint-sand);
  border: 1px solid var(--color-border-inner); border-radius: var(--radius-pill); padding: 3px 9px;
}

/* Graceful empty window (no data captured for the selected period). */
.empty-state {
  text-align: center; color: var(--color-muted); font-size: 14px;
  padding: var(--space-6) var(--space-4);
  border: 1px dashed var(--color-border); border-radius: var(--radius-lg);
}

/* Rest-screen comparison legend re-tints to the blue rest tokens. */
.compare--rest .compare-dot--current { background: var(--color-rest); }
.compare--rest .compare-dot--previous { background: var(--color-rest-soft); }

@media (max-width: 380px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   WEB APP — the left-sidebar DESKTOP shell + Dashboard (FIT-108)
   --------------------------------------------------------------------------
   The authoritative desktop layout (docs/design/reference/SeeDingRun-app.dc.html):
   a fixed 250px deep-green rail (logo → household/pet-switcher → nav → Settings +
   plan promo) beside a main column (sticky topbar + a capped, scrolling content
   slot). Built as ONE shared shell (partials/web_shell.php + web_sidebar/web_topbar)
   consumed by every section; sections compose the kit primitives above — the
   Dashboard reuses .metric-card / .stat-tile / .ring / sdr_chart_* verbatim, adding
   only the wide grid + the green hero card here. Colours resolve to tokens, never hex.
   ========================================================================== */

.web-shell { display: flex; min-height: 100vh; background: var(--color-bg); }

/* — Sidebar (fixed rail) ————————————————————————————————— */
.web-sidebar {
  width: var(--sidebar-width); flex-shrink: 0;
  background: var(--color-green-deep); color: var(--color-on-green-2);
  padding: var(--space-5) var(--space-4);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.web-sidebar-brand { display: flex; align-items: center; padding: 4px 8px var(--space-5); }
.web-sidebar-brand .logo-wordmark { font-size: 21px; }
.web-side-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--color-footer-muted); padding: 8px;
}
.web-side-label--menu { margin-top: var(--space-4); }
.web-side-label--household { margin-top: 6px; }

/* Pet switcher (zero-JS <details>) */
.web-pet { position: relative; margin-bottom: var(--space-1); }
.web-pet-summary {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px; border-radius: var(--radius-md); cursor: pointer;
  background: var(--color-sidebar-surface); border: 1px solid var(--color-footer-hairline);
  list-style: none;
}
.web-pet-summary::-webkit-details-marker { display: none; }
.web-pet-avatar {
  width: 34px; height: 34px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-tint-peach); color: var(--color-green-deep);
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
}
.web-pet-id { text-align: left; flex: 1; min-width: 0; }
.web-pet-name { color: var(--color-footer-strong); font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.web-pet-breed { color: var(--color-footer-text); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.web-pet-caret { color: var(--color-footer-text); flex-shrink: 0; transition: transform .2s; }
.web-pet[open] .web-pet-caret { transform: rotate(180deg); }
.web-pet-menu { background: var(--color-sidebar-menu-bg); border-radius: var(--radius-md); padding: 6px; margin: 6px 0; }
.web-pet-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px; border-radius: var(--radius-sm); color: var(--color-on-green-3); font-size: 13px; font-weight: 500;
}
.web-pet-item:hover { background: var(--color-sidebar-hover); }
.web-pet-item-avatar {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-tint-peach); color: var(--color-green-deep);
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
}
.web-pet-add { color: var(--color-orange-soft); font-weight: 600; }
.web-pet-add:hover { background: var(--color-sidebar-hover); }

/* Nav */
.web-nav { display: flex; flex-direction: column; gap: 3px; }
.web-nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--radius-md);
  color: var(--color-on-green-2); font-size: 14px; font-weight: 600;
}
.web-nav-item:hover { background: var(--color-sidebar-hover); }
.web-nav-item.is-active { background: var(--color-nav-active-bg); color: var(--color-nav-active-ink); }
.web-nav-icon { flex-shrink: 0; }

.web-sidebar-foot { margin-top: auto; }
.web-promo { margin-top: 10px; padding: var(--space-3); border-radius: var(--radius-lg); background: var(--color-orange); }
.web-promo-title { font-family: var(--font-display); font-weight: 700; color: var(--color-orange-ink); font-size: 14px; }
.web-promo-sub { color: var(--color-orange-ink); opacity: .78; font-size: 12px; margin: 2px 0 10px; }
.web-promo-btn {
  display: block; width: 100%; padding: 8px; border-radius: var(--radius-sm); border: none;
  background: var(--color-orange-ink); color: var(--color-cream);
  font-size: 12px; font-weight: 600; text-align: center; cursor: pointer;
}

/* — Main column ——————————————————————————————————————————— */
.web-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.web-topbar {
  height: 68px; flex-shrink: 0;
  border-bottom: 1px solid var(--color-border-pill); background: var(--scrim-nav);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; gap: var(--space-4); padding: 0 30px;
  position: sticky; top: 0; z-index: 20;
}
.web-topbar-title { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
.web-synced {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--radius-pill);
  background: var(--color-success-bg); border: 1px solid var(--color-success-border);
  font-size: 12px; font-weight: 600; color: var(--color-green);
}
.web-synced-dot { width: 7px; height: 7px; border-radius: var(--radius-pill); background: var(--color-success); }
.web-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: var(--space-3); }
.web-battery { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--color-muted); }
.web-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: var(--radius-sm);
  border: 1px solid var(--color-outline); background: var(--color-surface);
  font-size: 14px; font-weight: 600; color: var(--color-ink); cursor: pointer;
}
.web-btn:hover { border-color: var(--color-green); }
.web-iconbtn {
  width: 38px; height: 38px; border-radius: var(--radius-md);
  border: 1px solid var(--color-outline); background: var(--color-surface);
  display: inline-flex; align-items: center; justify-content: center; color: var(--color-ink); cursor: pointer;
}
.web-iconbtn:hover { border-color: var(--color-green); }
.web-signout { display: inline-flex; }
.web-content { flex: 1; overflow-y: auto; padding: 30px; max-width: var(--app-content-width); width: 100%; }

/* — Dashboard section ————————————————————————————————————— */
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.dash-grid + .dash-grid { margin-top: 18px; }
.dash-section { margin-top: 18px; }

.dash-hero {
  background: var(--gradient-hero); border-radius: var(--radius-2xl); padding: 26px;
  color: var(--color-footer-strong); position: relative; overflow: hidden;
}
.dash-hero-glow {
  position: absolute; right: -30px; top: -30px; width: 180px; height: 180px; border-radius: var(--radius-pill);
  background: radial-gradient(circle, var(--glow-orange-strong), transparent 70%);
}
.dash-hero-head { display: flex; align-items: center; gap: 15px; position: relative; }
.dash-hero-mono {
  width: 62px; height: 62px; border-radius: var(--radius-xl); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-tint-peach); color: var(--color-green-deep);
  font-family: var(--font-display); font-weight: 700; font-size: 30px;
}
.dash-hero-name { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -.02em; }
.dash-hero-meta { color: var(--color-on-green); font-size: 14px; }
.dash-hero-stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 26px; position: relative; }
.dash-hero-v { font-family: var(--font-mono); font-weight: 600; font-size: 24px; line-height: 1; }
.dash-hero-v--streak { color: var(--color-orange-soft); }
.dash-hero-k { font-size: 12px; color: var(--color-on-green); margin-top: 4px; }

.dash-goal { display: flex; align-items: center; gap: 20px; }
.dash-goal-body { min-width: 0; }
.dash-goal-title { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.dash-goal-progress { font-family: var(--font-mono); font-size: 13px; color: var(--color-muted); margin-bottom: 12px; }

.dash-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-bottom: 18px; }
.dash-card-title { font-weight: 600; font-size: 16px; }
.dash-card-sub { font-size: 13px; color: var(--color-muted); }
.dash-week-axis { display: flex; justify-content: space-between; margin-top: 8px; }
.dash-week-axis span { font-family: var(--font-mono); font-size: 11px; color: var(--color-faint); }

.dash-rank-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
/* The "as of <date>" caption sits between the two dashboard rows — a clean gap, not the
 * Live screen's negative pull-up (which would overlap the hero card here). */
.dash-asof { align-self: flex-start; margin: 14px 0 0; }
.dash-asof + .dash-grid { margin-top: 18px; }

@media (max-width: 1080px) {
  .dash-grid { grid-template-columns: 1fr; }
}

/* — Pets & Household section (FIT-109) —————————————————————————
   Reuses .metric-card (surface + border + radius) for the pet + people cards and
   .tier-badge--current for the role pill; only the wide pet grid, the divided stat
   row, and the roster chrome are section-specific. Colours resolve to tokens. */
.pets-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.pets-title { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: -.02em; }
.pets-sub { color: var(--color-muted); font-size: 14px; margin-top: 2px; }
.pets-add-btn {
  flex-shrink: 0; display: inline-flex; align-items: center; padding: 11px 17px;
  border-radius: var(--radius-md); background: var(--color-green); color: var(--color-surface);
  font-size: 14px; font-weight: 600;
}
.pets-add-btn:hover { background: var(--color-green-hover); }

.pets-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: var(--space-6); }
.pet-card { padding: var(--space-4); }
.pet-card-head { display: flex; align-items: center; gap: 14px; }
.pet-mono {
  width: 52px; height: 52px; border-radius: var(--radius-lg); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--color-green-deep);
  background: var(--color-tint-peach);
}
.pet-mono--a { background: var(--color-avatar-gold); }
.pet-mono--b { background: var(--color-avatar-tan); }
.pet-mono--c { background: var(--color-avatar-blue); }
.pet-card-id { flex: 1; min-width: 0; }
.pet-card-name { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.pet-card-meta { font-size: 13px; color: var(--color-muted); margin-top: 1px; }
.pet-brand {
  flex-shrink: 0; font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  padding: 4px 9px; border-radius: var(--radius-sm);
  background: var(--color-tint-sand); color: var(--color-faint);
}

.pet-card-stats {
  display: flex; align-items: center; gap: 20px; margin: 18px 0 16px; padding: 14px 0;
  border-top: 1px solid var(--color-border-inner); border-bottom: 1px solid var(--color-border-inner);
}
.pet-stat-v { font-family: var(--font-mono); font-weight: 600; font-size: 17px; color: var(--color-ink); }
.pet-stat-k { font-size: 11px; color: var(--color-muted); margin-top: 2px; }
.pet-base { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--color-green-dot); }
.pet-base-dot { width: 7px; height: 7px; border-radius: var(--radius-pill); background: var(--color-green-dot); }
.pet-open {
  display: block; width: 100%; padding: 10px; text-align: center;
  border-radius: var(--radius-md); border: 1px solid var(--color-border);
  background: var(--color-surface); font-size: 13px; font-weight: 600; color: var(--color-ink);
}
.pet-open:hover { border-color: var(--color-green); }

.pets-people-title { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin-bottom: 14px; }
.pets-people { padding: 0; overflow: hidden; }
.pet-member { display: flex; align-items: center; gap: 13px; padding: 15px 20px; border-bottom: 1px solid var(--color-border-inner); }
.pet-member--empty { color: var(--color-muted); font-size: 14px; }
.member-avatar {
  width: 38px; height: 38px; border-radius: var(--radius-md); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; color: var(--color-surface);
}
.member-avatar--a { background: var(--color-avatar-gold); }
.member-avatar--b { background: var(--color-avatar-tan); }
.member-avatar--c { background: var(--color-avatar-blue); }
.member-id { flex: 1; min-width: 0; }
.member-name { font-weight: 600; font-size: 14px; }
.member-email { font-size: 12px; color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-role { flex-shrink: 0; padding: 5px 11px; font-size: 12px; }
.pet-member-invite { padding: 15px 20px; font-size: 14px; font-weight: 600; color: var(--color-green); }

/* — Annual / Custom report section (FIT-109) —————————————————————————————
   The richest section: a capped ~1000px column of composable pieces. It reuses
   .metric-card (every card surface), .seg (range), .chip (metric toggles) and the
   sdr_chart_* kit; only the report-specific header, the 5-up stat/chip strips and the
   dark-green standout cards are added here. Each metric carries its colour through a
   per-metric --m/--mv custom prop, so the strip stays DRY (one rule set, five ids).
   All colours resolve to tokens. */
.annual { max-width: 1000px; }
.annual-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.annual-title { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -.02em; }
.annual-sub { color: var(--color-muted); font-size: 14px; margin-top: 2px; }
.annual-export {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius-md); border: none;
  background: var(--color-green); color: var(--color-surface);
  font-family: inherit; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.annual-export:disabled { opacity: .55; cursor: not-allowed; }
.annual-export-soon {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 6px; border-radius: var(--radius-sm); background: var(--scrim-trust); color: var(--color-surface);
}

/* Controls card */
.annual-controls { margin-bottom: 18px; }
.annual-control-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.annual-control-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--color-faint);
}
.annual-controls .seg { flex: 0 0 auto; width: auto; }
.annual-controls .seg-btn { flex: 0 0 auto; padding: 8px 15px; }
.annual-custom { display: flex; align-items: center; gap: 8px; }
.annual-date {
  padding: 8px 10px; border-radius: var(--radius-sm); font-family: inherit; font-size: 13px;
  border: 1px solid var(--color-outline); background: var(--color-surface); color: var(--color-ink);
}
.annual-custom-arrow { color: var(--color-faint); }
.annual-custom-go {
  padding: 8px 14px; border-radius: var(--radius-sm); border: none; cursor: pointer;
  background: var(--color-green); color: var(--color-surface); font-family: inherit; font-size: 13px; font-weight: 600;
}
.annual-note { color: var(--color-error); font-size: 12px; margin-top: 10px; }
.annual-divider { height: 1px; background: var(--color-border-inner); margin: 14px 0; }
.annual-chips { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Per-metric chip "on" colours (reuse .chip; only the on-state re-points to the metric). */
.chip--steps.is-on { background: var(--color-tint-peach); border-color: var(--color-orange); color: var(--color-orange-text); }
.chip--dist.is-on  { background: var(--color-tint-green); border-color: var(--color-metric-dist); color: var(--color-metric-dist-text); }
.chip--sleep.is-on { background: var(--color-tint-blue); border-color: var(--color-rest); color: var(--color-metric-sleep-text); }
.chip--nap.is-on   { background: var(--color-tint-gold); border-color: var(--color-metric-nap); color: var(--color-metric-nap-text); }
.chip--goal.is-on  { background: var(--color-tint-green); border-color: var(--color-metric-goal); color: var(--color-metric-goal); }

/* Stat strip — one card per enabled metric; click charts it. */
.annual-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.annual-stat {
  display: block; background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); padding: var(--space-4);
}
.annual-stat:hover { border-color: var(--color-tint-green-border); }
.annual-stat.is-charting { border-color: var(--mv); box-shadow: var(--shadow-card-soft); }
.annual-stat-v { font-family: var(--font-mono); font-weight: 600; font-size: 22px; letter-spacing: -.01em; color: var(--m); }
.annual-stat-k { font-size: 12px; color: var(--color-muted); margin-top: 4px; }
.annual-stat-chart {
  margin-top: 6px; font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--mv);
}
.annual-stat--steps, .chip--steps { --m: var(--color-orange-text); --mv: var(--color-activity); }
.annual-stat--dist,  .chip--dist  { --m: var(--color-metric-dist-text); --mv: var(--color-metric-dist); }
.annual-stat--sleep, .chip--sleep { --m: var(--color-metric-sleep-text); --mv: var(--color-rest); }
.annual-stat--nap,   .chip--nap   { --m: var(--color-metric-nap-text); --mv: var(--color-metric-nap); }
.annual-stat--goal,  .chip--goal  { --m: var(--color-metric-goal); --mv: var(--color-metric-goal); }

/* Cards + charts */
.annual-card { margin-bottom: 18px; }
.annual-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.annual-card-title { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.annual-card-sub { font-size: 13px; color: var(--color-muted); margin-top: 2px; }
.annual-mean-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--color-muted); }
.annual-mean-dash { width: 16px; height: 0; border-top: 2px dashed var(--color-rest); }
.annual-legend { display: flex; gap: 18px; margin-top: 10px; flex-wrap: wrap; }
.annual-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--color-muted); }
.annual-legend-line { width: 16px; height: 3px; border-radius: 2px; }
.annual-legend-line--sleep { background: var(--color-rest); }
.annual-legend-line--nap { background: var(--color-metric-nap); }
.annual-legend-line--typical { background: var(--color-green); }
.annual-legend-line--dip { background: var(--color-rest); }
.annual-legend-swatch { width: 10px; height: 10px; border-radius: 3px; }

/* Monthly bars axis (labels under the reused sdr_chart_bars) */
.annual-month-axis { display: flex; margin-top: 8px; }
.annual-month-axis span { flex: 1; text-align: center; font-family: var(--font-mono); font-size: 9px; color: var(--color-faint); }

/* Standout strip — dark-green cards */
.annual-standouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.standout-card { background: var(--color-green-deep); border-radius: var(--radius-xl); padding: var(--space-5); color: var(--color-footer-strong); }
.standout-v { font-family: var(--font-mono); font-weight: 600; font-size: 24px; }
.standout-v--max { color: var(--color-orange-soft); }
.standout-v--min { color: var(--color-avatar-blue); }
.standout-k { font-size: 12px; color: var(--color-on-green); margin-top: 4px; }

@media (max-width: 1080px) {
  .pets-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .annual-stats { grid-template-columns: repeat(2, 1fr); }
}

/* — Settings section (FIT-109) —————————————————————————————————
   Reuses .metric-card (surface + border + radius) for the account/preference lists
   and --gradient-hero for the Pro banner; only the capped column, the divided list
   rows, the brand badges, and the (non-functional, stub) toggle are section-specific.
   Every colour resolves to a token — no raw hex, no inline styles. */
.settings-wrap { max-width: 780px; }

.settings-eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--color-faint); margin-bottom: var(--space-2);
}
.settings-account { margin-bottom: var(--space-5); }
.settings-account-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; }
.settings-account-email { color: var(--color-muted); font-size: 14px; margin-top: 2px; }

/* Pro upgrade banner — STUB (billing not wired). Brand-green gradient per the design. */
.settings-pro {
  display: flex; align-items: center; gap: var(--space-5);
  background: var(--gradient-hero); border-radius: var(--radius-2xl);
  padding: var(--space-5); color: var(--color-surface); margin-bottom: var(--space-5);
}
.settings-pro-body { flex: 1; min-width: 0; }
.settings-pro-eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--color-orange-soft); margin-bottom: var(--space-2);
}
.settings-pro-title { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -.02em; }
.settings-pro-desc { color: var(--color-on-green-2); font-size: 14px; margin-top: var(--space-2); }
.settings-pro-feats { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-4); }
.settings-pro-feat { font-size: 13px; color: var(--color-on-green-2); }
.settings-pro-price { text-align: center; flex-shrink: 0; }
.settings-pro-amount { font-family: var(--font-display); font-weight: 700; font-size: 40px; line-height: 1; }
.settings-pro-period { font-size: 16px; color: var(--color-on-green); }
.settings-pro-unit { font-size: 12px; color: var(--color-on-green); margin: var(--space-1) 0 var(--space-3); }
.settings-pro-cta {
  padding: 12px 22px; border-radius: var(--radius-md); border: none;
  background: var(--color-orange); color: var(--color-orange-ink);
  font-family: inherit; font-size: 14px; font-weight: 700; cursor: not-allowed;
}
.settings-stub-tag { font-size: 11px; color: var(--color-on-green); margin-top: var(--space-2); }

.settings-section-title { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin-bottom: var(--space-3); }

/* Shared list card (connected accounts + preferences) */
.settings-list { padding: 0; overflow: hidden; margin-bottom: var(--space-5); }
.settings-row {
  display: flex; align-items: center; gap: 13px; padding: var(--space-4) 20px;
  border-bottom: 1px solid var(--color-border-inner);
}
.settings-row:last-child { border-bottom: none; }
.settings-acc-badge {
  width: 38px; height: 38px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-tint-green);
}
.settings-acc-badge--fi { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--color-green); }
.settings-g-blue   { fill: var(--color-google-blue); }
.settings-g-green  { fill: var(--color-google-green); }
.settings-g-yellow { fill: var(--color-google-yellow); }
.settings-g-red    { fill: var(--color-google-red); }
.settings-row-id { flex: 1; min-width: 0; }
.settings-row-name { font-weight: 600; font-size: 14px; }
.settings-row-sub { font-size: 12px; color: var(--color-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-status {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
}
.settings-status--active { color: var(--color-green-dot); }
.settings-status--off { color: var(--color-faint); }
.settings-status-dot { width: 7px; height: 7px; border-radius: var(--radius-pill); background: var(--color-green-dot); }
.settings-disconnect {
  flex-shrink: 0; padding: 6px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--color-border); background: var(--color-surface);
  font-family: inherit; font-size: 12px; font-weight: 600; color: var(--color-muted); cursor: not-allowed;
}

/* Preference row — stub toggle (decorative, never persists) + "coming soon" tag. */
.settings-soon {
  flex-shrink: 0; font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px;
  border-radius: var(--radius-sm); background: var(--color-tint-sand); color: var(--color-faint);
}
.settings-toggle {
  flex-shrink: 0; width: 44px; height: 26px; border-radius: var(--radius-pill);
  background: var(--color-outline); padding: 3px; display: flex; justify-content: flex-start;
  cursor: not-allowed; opacity: .7;
}
.settings-toggle-knob { width: 20px; height: 20px; border-radius: var(--radius-pill); background: var(--color-surface); box-shadow: var(--shadow-card-soft); }

@media (max-width: 760px) {
  .web-sidebar { display: none; }
  .web-content { padding: var(--space-4); }
  .settings-pro { flex-direction: column; align-items: flex-start; }
}

/* — Reports section (FIT-109) ————————————————————————————————
   Reuses .metric-card / .seg / sdr_chart_line (with its dashed avg overlay) /
   .compare-legend verbatim; adds only the tab-bar layout, the trend-card header,
   and the horizontal pet-comparison bars. Colours resolve to tokens, never hex. */
.reports-bar { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-bottom: 18px; }
.reports-tabs { flex: 0 1 auto; }
.reports-tabs .seg-btn { flex: 0 0 auto; padding: 8px 15px; }
.reports-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.web-btn.is-stub { color: var(--color-muted); border-style: dashed; cursor: default; opacity: .85; }
.reports-soon {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--color-faint); padding: 2px 6px; border-radius: var(--radius-pill); background: var(--color-track);
}

.reports-trend { margin-bottom: 18px; }
.reports-trend-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-bottom: 18px; }
.reports-big-wrap { text-align: right; }
.reports-big { font-family: var(--font-mono); font-weight: 600; font-size: 26px; letter-spacing: -.01em; line-height: 1; color: var(--color-orange-text); }
.reports-legend { margin-top: 14px; }
.reports-stub-title { font-weight: 600; font-size: 15px; color: var(--color-ink); margin-bottom: 6px; }

.reports-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.reports-sub-gap { margin-bottom: 20px; }
.reports-cmp { margin-bottom: 16px; }
.reports-cmp:last-child { margin-bottom: 0; }
.reports-cmp-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.reports-cmp-name { font-weight: 600; font-size: 14px; color: var(--color-ink); }
.reports-cmp-val { font-family: var(--font-mono); font-size: 13px; color: var(--color-muted); }

@media (max-width: 1080px) {
  .reports-row { grid-template-columns: 1fr; }
}

/* Daylight overlay (FIT-116): a short daylight-hours baseline card under the step trend
 * (same card padding + chart geometry, so day N lines up with the trend's day N) and a
 * night/day strip for the latest day. Colours via the daylight/night tokens only. */
.fill-daylight            { fill: var(--color-daylight); }
.fill-night               { fill: var(--color-night); }
.stroke-daylight          { stroke: var(--color-daylight); }
.grad-daylight-0          { stop-color: var(--color-daylight); stop-opacity: .30; }
.grad-daylight-1          { stop-color: var(--color-daylight); stop-opacity: 0; }
.compare-dot--daylight    { background: var(--color-daylight); }
.compare-dot--night       { background: var(--color-night); }
.reports-daylight { margin-bottom: 18px; }
.reports-daylight .chart-line--stretch { height: 80px; }
.reports-daylight-strip { margin-top: 14px; }
.reports-daylight-hint { margin: -6px 0 18px; }

/* — Architecture section (FIT-109) ————————————————————————————
   A STATIC top-to-bottom flow diagram: stacked stage cards joined by 2px
   connectors. Reuses .metric-card for the white stage surfaces; the dark
   "ingest" stage and the node tiles are the only additions here. Every colour
   resolves to a token (tints, borders, on-dark ink) — never a raw hex. */
.arch-head { margin-bottom: var(--space-2); }
.arch-title { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: -.02em; }
.arch-lede { color: var(--color-muted); font-size: 14px; margin-top: 4px; }

.arch-flow { display: flex; flex-direction: column; gap: 0; margin-top: var(--space-5); }
.arch-stage--dark { background: var(--color-green-deep); border: 0; color: var(--color-on-green); }

.arch-eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--color-faint); margin-bottom: 14px;
}
.arch-eyebrow--dark { color: var(--color-footer-muted); }

.arch-grid { display: grid; gap: var(--space-3); }
.arch-grid--3 { grid-template-columns: repeat(3, 1fr); }
.arch-grid--4 { grid-template-columns: repeat(4, 1fr); }

.arch-node { padding: 14px; border-radius: var(--radius-md); }
.arch-node-title { font-weight: 700; color: var(--color-ink); }
.arch-node-sub { font-size: 12px; color: var(--color-muted); margin-top: 2px; }

/* Node variants — present (green), future (dashed amber), analytics (blue), on-dark. */
.arch-node--present { background: var(--color-tint-green); border: 1px solid var(--color-tint-green-border); }
.arch-node--present .arch-node-title { color: var(--color-green); }
.arch-node--tint { background: var(--color-tint-green); border: 1px solid var(--color-tint-green-border); }
.arch-node--future { background: var(--color-tint-peach); border: 1px dashed var(--color-outline); }
.arch-node--future .arch-node-title { color: var(--color-amber-text); }
.arch-node--analytics { background: var(--color-tint-blue); border: 1px solid var(--color-tint-blue-border); }
.arch-node--analytics .arch-node-title { color: var(--color-metric-sleep-text); }
.arch-node--paper { background: var(--color-tint-peach); border: 1px solid var(--color-border); }
.arch-node--dark { background: var(--color-panel-on-dark); }
.arch-node--dark .arch-node-title { color: var(--color-orange-soft); }
.arch-node--dark .arch-node-sub { color: var(--color-on-green); }

/* 2px vertical connector between stages. */
.arch-link { height: 22px; width: 2px; background: var(--color-outline); margin: 0 auto; }

/* Stage 4/5 side-by-side, each a card holding its own stacked nodes. */
.arch-duo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.arch-stack > * + * { margin-top: 10px; }

@media (max-width: 1080px) {
  .arch-grid--3, .arch-grid--4 { grid-template-columns: 1fr 1fr; }
  .arch-duo { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .arch-grid--3, .arch-grid--4 { grid-template-columns: 1fr; }
}

/* — Connect-a-collar section (FIT-109) ————————————————————————————
   The centred ~620px connect wizard (Collar → Sign in → Sync → Done). Reuses the
   .auth-form / .auth-field / .auth-input / .auth-submit chrome for the sign-in step and
   .metric-card-like surfaces for the card; only the stepper, brand grid, disclaimer,
   spinner and connected-pet rows are section-specific. Every colour resolves to a token
   — no raw hex, no inline styles. */
.connect-wrap { max-width: 620px; margin: 0 auto; }

.connect-stepper {
  display: flex; align-items: center; justify-content: center;
  gap: var(--space-2); margin-bottom: var(--space-6); flex-wrap: wrap;
}
.connect-step { display: flex; align-items: center; gap: var(--space-2); }
.connect-step-sep { width: 16px; height: 1px; background: var(--color-border-strong); }
.connect-step-num {
  width: 28px; height: 28px; border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 13px;
  background: var(--color-track); color: var(--color-muted);
}
.connect-step-label { font-size: 13px; font-weight: 600; color: var(--color-muted); }
.connect-step--current .connect-step-num { background: var(--color-green); color: var(--color-surface); }
.connect-step--current .connect-step-label { color: var(--color-ink); }
.connect-step--done .connect-step-num { background: var(--color-success); color: var(--color-surface); }
.connect-step--done .connect-step-label { color: var(--color-ink-soft); }

.connect-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl); padding: var(--space-6);
}
.connect-head { text-align: center; margin-bottom: var(--space-5); }
.connect-title { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: -.02em; }
.connect-sub { color: var(--color-muted); font-size: 14px; margin-top: 4px; }

/* Brand grid — Fi (available), Halo (soon), Other (disabled). */
.connect-brands { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.connect-brand {
  display: block; text-align: left; text-decoration: none; padding: 20px;
  border-radius: var(--radius-lg); border: 1px solid var(--color-border);
  background: var(--color-bg-alt); font-family: inherit;
}
.connect-brand--fi { border: 2px solid var(--color-green); background: var(--color-tint-green); }
.connect-brand--fi:hover { background: var(--color-tint-green); border-color: var(--color-green-hover); }
.connect-brand--other { background: transparent; border-style: dashed; }
.connect-brand--disabled { cursor: not-allowed; opacity: .9; }
.connect-brand-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--color-ink); }
.connect-brand--fi .connect-brand-name { color: var(--color-green); }
.connect-brand-sub { font-size: 12px; color: var(--color-muted); margin-top: 2px; }
.connect-brand-tag { display: block; margin-top: var(--space-2); font-size: 11px; font-weight: 600; }
.connect-brand-tag--ok { color: var(--color-success); }
.connect-brand-tag--soon { color: var(--color-amber-text); }

/* Unofficial-tool disclaimer — the warm peach warning band (never the brick error one). */
.connect-disclaimer {
  display: flex; gap: 10px; padding: 12px 14px; margin-bottom: var(--space-5);
  border-radius: var(--radius-md); background: var(--color-warn-bg);
  border: 1px solid var(--color-warn-border); font-size: 12px; color: var(--color-warn-ink);
}
.connect-alert {
  background: var(--color-error-bg); border: 1px solid var(--color-error-border);
  color: var(--color-error); font-size: 14px; padding: 11px 14px;
  border-radius: var(--radius-md); text-align: left;
}

/* Sync (step 3) — the deferred-backfill in-progress state. */
.connect-sync { text-align: center; padding: var(--space-6) 0; }
.connect-spinner {
  width: 64px; height: 64px; margin: 0 auto var(--space-5); border-radius: var(--radius-pill);
  border: 5px solid var(--color-track); border-top-color: var(--color-orange);
  animation: sfr-spin 1s linear infinite;
}

/* Done (step 4). */
.connect-done { text-align: center; }
.connect-check {
  width: 60px; height: 60px; margin: 0 auto var(--space-4); border-radius: var(--radius-pill);
  background: var(--color-tint-green); display: flex; align-items: center; justify-content: center;
  color: var(--color-success);
}
.connect-pets { display: flex; flex-direction: column; gap: 10px; text-align: left; margin: var(--space-5) 0; }
.connect-pet {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border-radius: var(--radius-md); background: var(--color-bg-alt); border: 1px solid var(--color-border);
}
.connect-pet-avatar {
  width: 40px; height: 40px; border-radius: var(--radius-md); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; color: var(--color-green-deep);
  background: var(--color-avatar-gold);
}
.connect-pet-id { flex: 1; min-width: 0; }
.connect-pet-name { font-weight: 600; }
.connect-pet-breed { font-size: 12px; color: var(--color-muted); margin-top: 2px; }
.connect-pet-status { margin-left: auto; flex-shrink: 0; font-size: 12px; font-weight: 600; color: var(--color-success); }
.connect-empty { color: var(--color-muted); font-size: 14px; margin: var(--space-5) 0; }

.connect-cta {
  display: inline-block; width: 100%; box-sizing: border-box; text-align: center;
  margin-top: var(--space-4); padding: 14px; border: none; border-radius: var(--radius-md);
  background: var(--color-green); color: var(--color-surface);
  font-family: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.connect-cta:hover { background: var(--color-green-hover); }

@media (max-width: 620px) {
  .connect-brands { grid-template-columns: 1fr; }
}
