/* Core Athletics — the personal performance workspace. */
:root {
  --bg: #0f1110;
  --panel: #191c1a;
  --panel2: #222622;
  --line: #30342f;
  --muted: #a9b0a7;
  --text: #f4f3eb;
  --orange: #ff6a1a;
  --orange2: #ff995a;
  --green: #b8cf9b;
  --radius: 16px;
  --core-sidebar-width: 238px;
  color-scheme: dark;
}

html { min-width: 320px; scroll-padding-top: 96px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -.015em;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
img, svg { max-width: 100%; }
svg { flex-shrink: 0; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible { outline: 2px solid #ff9a5e; outline-offset: 4px; }
::selection { background: #ff6a1a; color: #0f1110; }
.app-shell { min-width: 0; max-width: none; margin: 0; padding: 0 0 98px; }
.core-sidebar { display: none; }
.topbar {
  height: 76px;
  padding: 0 clamp(20px, 3.4vw, 52px);
  gap: 20px;
  background: #0f1110;
  border-bottom: 1px solid #30342f;
  backdrop-filter: none;
}
.core-context { display: grid; align-content: center; gap: 2px; min-width: 0; }
.core-context-eyebrow { color: #9a9c9b; font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.core-context-title { color: #e6e8e7; font-size: 13px; font-weight: 600; }
.core-context > span { display: block; }
.core-context > strong { color: #e6e8e7; font-size: 13px; font-weight: 600; }
.topright { flex-shrink: 0; gap: 16px; }
.topright .shop-link {
  min-height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 8px 0;
  color: #d0d2d1;
  font-size: 10px;
  letter-spacing: .09em;
  gap: 14px;
}
.topright .shop-link:hover { color: #ff995a; }
.topright .shop-link svg { width: 16px; height: 16px; }
.avatar { width: 39px; height: 39px; border-radius: 50%; border: 1px solid #515352; background: #272928; color: #dfe1e0; font-size: 12px; }
.main { width: 100%; min-width: 0; max-width: 1480px; margin: 0 auto; padding: 36px clamp(20px, 3.4vw, 52px) 28px; }
.welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 0;
  padding: 0;
  margin: 0 0 29px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.welcome::before, .welcome::after { display: none; }
.welcome h1 {
  max-width: none;
  margin: 8px 0 7px;
  font-family: 'Barlow Condensed', Impact, sans-serif;
  font-size: clamp(38px, 3.9vw, 56px);
  font-weight: 700;
  line-height: .98;
  letter-spacing: .005em;
}
.welcome p { max-width: 660px; color: #adafae; font-size: 13px; line-height: 1.6; }
.welcome .eyebrow, .core-kicker { color: #aaacab; font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.welcome .pill { flex-shrink: 0; align-self: center; margin: 0; padding: 7px 11px; color: #dddccd; border: 1px solid #3c3e3d; border-radius: 5px; background: #252726; font-size: 9px; letter-spacing: .08em; }
.footer-note { margin-top: 36px; padding-top: 20px; border-top: 1px solid #2c2e2d; color: #959796; font-size: 10px; text-align: left; }

/* Quiet surfaces, comfortable controls and a consistent icon language. */
.card, .core-panel {
  min-width: 0;
  border: 1px solid #30362f;
  border-radius: var(--radius);
  background: #191c1a;
  padding: 24px;
  box-shadow: none;
}
.grid { gap: 18px; }
.grid.stats { gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { gap: 16px; }
.section-space { margin-top: 18px; }
.section-head { gap: 16px; align-items: center; margin-bottom: 21px; }
.section-head h2, .section-head h3, .core-panel-head h2, .core-panel-head h3 {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.025em;
  text-transform: none;
}
.section-head p { font-size: 12px; color: #b0b2b1; }
.btn, .tabs button, .food-filter button {
  min-height: 44px;
  border: 1px solid #464847;
  border-radius: 7px;
  padding: 11px 15px;
  background: #292b2a;
  color: #eff1f0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.005em;
  box-shadow: none;
}
.btn:hover, .tabs button:hover { border-color: #777978; background: #323433; }
.btn.primary, .tabs button.active { border: 1px solid #ff6a1a; background: #ff6a1a; color: #151716; box-shadow: none; }
.btn.primary:hover, .tabs button.active:hover { border-color: #ff8543; background: #ff8543; }
.btn.ghost { background: transparent; border-color: #434544; }
.btn.small { min-height: 44px; padding: 10px 13px; font-size: 11px; }
.btn svg { width: 17px; height: 17px; }
.btn.danger { background: #32221c; color: #ffc0a0; border-color: #6a4230; }
.pill, .tag, .library-badge { border-radius: 5px; }
.tag { border-color: #434544; background: #272928; color: #cdcfce; font-size: 10px; }
.field label { font-size: 10px; font-weight: 600; letter-spacing: .025em; color: #c5c7c6; text-transform: none; }
.field input, .field select, .field textarea, input.control, select.control, textarea.control {
  min-height: 46px;
  padding: 12px 13px;
  border: 1px solid #484a49;
  border-radius: 7px;
  background: #141615;
  color: #f1f3f2;
  font-size: 13px;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: #ff9856; box-shadow: 0 0 0 3px #ff6a1a17; }
input::placeholder, textarea::placeholder { opacity: 1; color: #929493; }
.formgrid { gap: 16px; }
.form-actions, .builder-actions { gap: 10px; }
.metric { padding: 21px; }
.metric strong { margin: 15px 0 6px; color: #f4f4eb; font: 500 clamp(28px, 3vw, 38px)/1.05 'Barlow Condensed', sans-serif; letter-spacing: .005em; }
.metric-top { color: #b3b5b4; font-size: 11px; }
.metric-icon { width: 32px; height: 32px; border-radius: 7px; color: #e1e3e2; background: #323433; }
.metric small { color: #aeb0af; font-size: 10px; }
.metric-icon svg, .foodicon svg, .preset-icon svg, .checkmark svg { width: 19px; height: 19px; }
.progress, .core-progress-track { height: 6px; overflow: hidden; border-radius: 5px; background: #363837; }
.progress > span, .core-progress-fill { display: block; height: 100%; border-radius: inherit; background: #ff6a1a; }
.hero { gap: 18px; margin-bottom: 18px; }
.hero-main { min-height: 245px; background: #242625; }
.hero-main::after { opacity: .45; }
.hero-main h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.05; }
.hero-main p { color: #bdbfbe; font-size: 13px; line-height: 1.65; }
.exercise { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; padding: 17px 0; border-color: #373938; }
.exnum { width: 34px; height: 34px; border-radius: 7px; background: #333534; color: #dadcdb; font-size: 12px; font-weight: 600; }
.exname { font-size: 13px; font-weight: 600; }
.exdetail { font-size: 11px; color: #b0b2b1; line-height: 1.6; }
.exercise-tools { flex-wrap: wrap; }
.exercise-tools .btn { min-height: 44px; padding: 9px 10px; }
.check { width: 22px; height: 22px; margin: 11px; }
.choice { min-height: 48px; border-radius: 7px; border-color: #3d3f3e; background: #191b1a; padding: 12px; font-size: 12px; }
.food-result { padding: 17px; border-color: #3e403f; border-radius: 10px; background: #1a1c1b; }
.food-add input { min-height: 44px; border-radius: 7px; border-color: #494b4a; background: #121413; }
.foodicon { border-radius: 8px; background: #333534; color: #dcdedd; }
.foodrow { border-color: #393b3a; }
.food-macro-grid > div, .macrobar > div { background: #1a1c1b; border-color: #3a3c3b; border-radius: 8px; }
.preset-card { min-height: 154px; border-radius: 10px; background: #232524; border-color: #454746; padding: 18px; }
.preset-card:hover { border-color: #ff9254; }
.preset-card small { color: #bfc1c0; line-height: 1.6; }
.preset-icon { display: inline-flex; align-items: center; color: #f5ab77; }
.day { border-color: #464847; background: #262827; border-radius: 8px; color: #babcbb; }
.day span { color: #e8eae9; }
.day.today { border-color: #fa8a49; }
.day.done span { background: #ff6a1a; }
.banner, .message { border-radius: 9px; border-color: #725036; background: #30291d; color: #e7d2b3; }
.empty, .core-empty-state { padding: 21px; border: 1px dashed #505251; border-radius: 9px; background: #1d1f1e; color: #babcbb; font-size: 12px; line-height: 1.7; }
.modalback { z-index: 60; background: #0a0c0bcf; backdrop-filter: blur(7px); }
.modal { padding: 26px; border: 1px solid #515352; border-radius: 15px; background: #1c1e1d; box-shadow: 0 24px 80px #0007; }
.modal h3 { font-size: 21px; line-height: 1.2; }
.toast { z-index: 80; bottom: 100px; border-radius: 8px; padding: 13px 18px; background: #e8eae9; color: #1d1f1e; font-size: 12px; }

/* Overview: one useful next action, followed by the athlete's own data. */
.core-overview { display: grid; gap: 22px; min-width: 0; }
.core-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 370px;
  border: 1px solid #4a4c4b;
  border-radius: 15px;
  overflow: hidden;
  background: #2a2c2b;
}
.core-hero > img {
  position: absolute;
  z-index: -3;
  inset: 0 0 0 auto;
  width: 66%;
  height: 100%;
  object-fit: cover;
  object-position: 56% 40%;
  filter: saturate(.68) brightness(.85);
}
.core-hero::before {
  content: '';
  position: absolute;
  z-index: -2;
  inset: 0;
  background: linear-gradient(90deg, #1b201b 0%, #1b201bf0 28%, #202221a6 52%, #13151410 77%), linear-gradient(0deg, #151716ea, transparent 42%);
}
.core-hero-copy { padding: 34px 36px 32px; max-width: 560px; }
.core-hero-label { display: inline-flex; align-items: center; gap: 9px; color: #d7d9d8; font-size: 9px; font-weight: 600; letter-spacing: .17em; text-transform: uppercase; }
.core-hero-label::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #ff7830; box-shadow: 0 0 0 4px #ff6a1a19; }
.core-hero-title {
  max-width: 500px;
  margin: 20px 0 14px;
  color: #f8f6e9;
  font: 700 clamp(57px, 4.8vw, 72px)/.94 'Barlow Condensed', Impact, sans-serif;
  letter-spacing: -.005em;
  text-transform: uppercase;
}
.core-hero-title span { color: #ff8743; }
.core-hero-copy > p { max-width: 360px; margin: 0; color: #c1c3c2; font-size: 12px; line-height: 1.75; }
.core-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 25px; }
.core-hero-actions .btn { min-height: 46px; padding: 12px 17px; font-size: 11px; }
.core-hero-actions .btn.ghost { border-color: #6a6c6b; background: #1d1f1e77; color: #e8eae9; }
.core-hero-footer { display: flex; align-items: center; gap: 24px; padding: 17px 36px; border-top: 1px solid #75777633; background: #1a1c1b70; color: #c6c8c7; font-size: 10px; }
.core-hero-footer > span { display: flex; align-items: center; gap: 7px; }
.core-hero-footer svg { width: 14px; height: 14px; color: #d4d6d5; }
.core-hero-wordmark { position: absolute; right: 24px; bottom: 64px; z-index: -1; color: #f4f0db1f; font: 800 clamp(100px, 12vw, 190px)/.7 'Barlow Condensed', sans-serif; letter-spacing: -.015em; pointer-events: none; }
.core-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.core-stat-card { position: relative; min-width: 0; border: 1px solid #333c32; border-radius: 12px; padding: 19px 20px 17px; background: #1c221c; }
.core-stat-icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-bottom: 14px; border: 1px solid #4c4e4d; border-radius: 8px; color: #d8dad9; background: #2e302f; }
.core-stat-icon svg { width: 17px; height: 17px; }
.core-stat-value { display: block; color: #f4f4ec; font: 500 clamp(31px, 3vw, 41px)/1 'Barlow Condensed', sans-serif; letter-spacing: -.005em; }
.core-stat-value small { color: #bbbdbc; font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 400; }
.core-stat-label { display: block; margin-top: 7px; color: #dee0df; font-size: 11px; font-weight: 600; }
.core-stat-detail { display: block; margin-top: 5px; color: #a7a9a8; font-size: 10px; line-height: 1.6; }
.core-overview-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 18px; align-items: stretch; }
.core-panel { border-color: #3e403f; padding: 23px; background: #191f19; }
.core-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.core-panel-head > span, .core-panel-head > small { color: #b4b6b5; font-size: 10px; }
.core-panel-head svg { width: 17px; height: 17px; color: #bfc1c0; }
.core-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 0 0 20px; }
.core-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px; min-width: 0; min-height: 76px; padding: 10px 4px; border: 1px solid #454746; border-radius: 8px; background: #292b2a; color: #b0b2b1; font-size: 10px; }
.core-day > span { color: #d0d2d1; font-size: 11px; }
.core-day > b, .core-day > strong { display: grid; place-items: center; width: 24px; height: 24px; color: #edf0e7; font-size: 12px; font-weight: 500; }
.core-day svg { width: 15px; height: 15px; }
.core-day.is-today { border-color: #fb8b49; background: #4a3620; color: #ffaf78; }
.core-day.is-today > b, .core-day.is-today > strong { color: #ffb57f; }
.core-day.is-done > b, .core-day.is-done > strong { border-radius: 50%; background: #bacfa0; color: #282a29; }
.core-pillar-grid { display: grid; gap: 17px; }
.core-pillar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px 14px; color: #cdcfce; font-size: 11px; }
.core-pillar > span:first-child, .core-pillar > div:first-child { color: #e1e3e2; font-weight: 500; }
.core-pillar b, .core-pillar strong { font-size: 11px; color: #bbbdbc; font-weight: 500; }
.core-pillar .core-progress-track { grid-column: 1 / -1; height: 5px; background: #424443; }
.core-pillar:nth-child(2) .core-progress-fill { background: #afc588; }
.core-pillar:nth-child(3) .core-progress-fill { background: #93ac97; }
.core-empty-state { margin-top: 16px; padding: 13px 15px; border-style: solid; border-color: #494b4a; border-radius: 7px; background: #2b2d2c; text-align: left; font-size: 11px; }
.core-empty-state strong { color: #edf0e7; font-weight: 600; }

/* Authentication retains the brand, with the same comfortable controls. */
.auth-gate { gap: 40px; max-width: 1360px; }
.authbox { border-radius: 16px; border-color: #444645; background: #212322; box-shadow: none; }
.authbox h2 { font-size: 36px; }
.authbox > p { color: #bbbdbc; }
.authbox .pill { color: #e1c4a0; background: #3c3020; }
.auth-tabs { padding: 4px; border-color: #4b4d4c; border-radius: 8px; background: #181a19; }
.auth-tabs button { min-height: 44px; border-radius: 5px; background: transparent; font-size: 11px; color: #b4b6b5; }
.auth-tabs button.active { color: #191b1a; background: #ff6a1a; border-color: #ff6a1a; }
.auth-links .linkbutton { min-height: 44px; padding: 8px 0; color: #bec0bf; text-underline-offset: 4px; }
.copyright { color: #a3a5a4; line-height: 1.7; font-size: 10px; }
.auth-hero { border-radius: 18px; border-color: #414342; background: #232524; }
.auth-hero p { color: #bfc1c0; }
.auth-benefits small { color: #b0b2b1; }
.auth-benefits b { color: #dddfde; }
.checkmark { border-color: #575958; border-radius: 8px; background: #383a39; color: #e3ddbc; }

@media (min-width: 1000px) {
  .app-shell { padding-left: var(--core-sidebar-width); padding-bottom: 0; }
  .core-sidebar {
    position: fixed;
    z-index: 20;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    width: var(--core-sidebar-width);
    padding: 35px 21px 22px;
    border-right: 1px solid #343635;
    background: #141714;
    overflow-y: auto;
  }
  .core-sidebar-brand { display: block; min-height: 44px; padding: 0 9px; margin-bottom: 43px; text-decoration: none; }
  .core-sidebar-brand img { display: block; width: 175px; max-width: 100%; height: 56px; object-fit: contain; object-position: left center; }
  .core-sidebar-caption { padding: 0 13px; margin-bottom: 14px; color: #8c8e8d; font-size: 9px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; }
  .core-sidebar .nav { display: flex; align-items: stretch; flex-direction: column; gap: 7px; margin-bottom: 30px; }
  .core-sidebar .nav button { position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 13px; min-height: 48px; width: 100%; padding: 12px 13px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #b9bbba; font-size: 12px; font-weight: 500; letter-spacing: 0; text-align: left; box-shadow: none; }
  .core-sidebar .nav button:hover { border-color: #4c4e4d; background: #2b2d2c; color: #eff1f0; }
  .core-sidebar .nav button.active { border-color: #565857; background: #343635; color: #f0f2f1; }
  .core-sidebar .nav button.active::before { content: ''; position: absolute; left: -22px; top: 13px; bottom: 13px; width: 3px; border-radius: 0 2px 2px 0; background: #ff6a1a; }
  .core-sidebar .nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 21px; height: 21px; margin: 0; color: #9d9f9e; font-size: 17px; }
  .core-sidebar .nav button.active .nav-icon { color: #ff9b60; }
  .core-sidebar .nav-icon svg { width: 19px; height: 19px; }
  .core-sidebar-footer { display: grid; gap: 10px; margin-top: auto; padding-top: 26px; border-top: 1px solid #393b3a; }
  .core-sidebar-footer button, .core-sidebar-footer a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 13px; border: 0; border-radius: 6px; background: transparent; color: #bbbdbc; font-size: 11px; font-weight: 500; text-decoration: none; text-align: left; }
  .core-sidebar-footer button:hover, .core-sidebar-footer a:hover { background: #2f3130; color: #f1f3f2; }
  .core-sidebar-footer svg { width: 18px; height: 18px; color: #a7a9a8; }
  .core-sidebar-footer > p, .core-sidebar-footer > small { margin: 8px 13px 0; color: #979998; font-size: 9px; line-height: 1.7; }
  .mobile-nav { display: none !important; }
  .toast { bottom: 26px; left: calc(50% + var(--core-sidebar-width) / 2); }
}

@media (min-width: 1400px) {
  :root { --core-sidebar-width: 248px; }
  .core-sidebar { padding-right: 25px; padding-left: 25px; }
  .core-sidebar .nav button.active::before { left: -26px; }
  .main { padding-top: 42px; }
  .core-hero { min-height: 382px; }
  .core-hero-title { font-size: clamp(68px, 5.2vw, 82px); }
  .core-hero-copy { padding-top: 39px; padding-bottom: 36px; }
}

@media (max-width: 1199px) and (min-width: 1000px) {
  .main { padding-right: 27px; padding-left: 27px; }
  .topbar { padding-right: 27px; padding-left: 27px; }
  .core-hero-copy { max-width: 450px; padding-left: 27px; }
  .core-hero-title { font-size: 49px; }
  .core-hero-footer { padding-right: 27px; padding-left: 27px; gap: 15px; }
  .core-stat-grid { gap: 10px; }
  .core-stat-card { padding: 17px 14px; }
  .core-overview-grid { gap: 14px; }
  .core-panel { padding: 19px; }
  .core-week { gap: 5px; }
  .grid.two { grid-template-columns: 1fr; }
  .preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 999px) {
  .mobile-nav {
    position: fixed;
    z-index: 40;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 7px 12px max(9px, env(safe-area-inset-bottom));
    border-top: 1px solid #4b4d4c;
    border-radius: 0;
    background: #1a1c1b;
    backdrop-filter: none;
  }
  .mobile-nav button { display: grid; place-items: center; gap: 4px; min-height: 57px; padding: 7px 3px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #abadac; font-size: 10px; font-weight: 500; line-height: 1.2; }
  .mobile-nav button > span { display: flex; align-items: center; justify-content: center; height: 22px; font-size: 18px; line-height: 1; color: #acaead; }
  .mobile-nav button svg { width: 20px; height: 20px; }
  .mobile-nav button.active { color: #f0f2f1; background: #353736; border-color: #525453; }
  .mobile-nav button.active > span { color: #ff9b60; }
  .grid.two, .builder-layout { grid-template-columns: 1fr; }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main { padding-top: 28px; }
  .welcome h1 { font-size: 46px; }
}

@media (max-width: 700px) {
  .topbar { height: 66px; padding: 0 18px; gap: 12px; }
  .core-context-eyebrow { font-size: 8px; letter-spacing: .12em; }
  .core-context-title { font-size: 12px; }
  .topright { gap: 12px; }
  .topright .shop-link { padding: 8px 0; min-height: 44px; gap: 7px; font-size: 9px; letter-spacing: .04em; }
  #cloudStatus { display: none; }
  .main { padding: 27px 18px 24px; }
  .welcome { align-items: flex-start; gap: 16px; margin-bottom: 23px; }
  .welcome h1 { max-width: none; margin-top: 9px; font-size: 41px; }
  .welcome p { max-width: 100%; font-size: 11px; }
  .welcome .eyebrow { font-size: 8px; letter-spacing: .14em; }
  .welcome .pill { display: none; }
  .card, .core-panel { padding: 19px; border-radius: 12px; }
  .core-overview { gap: 18px; }
  .core-hero { min-height: 405px; border-radius: 12px; }
  .core-hero > img { width: 100%; object-position: 60% 35%; filter: saturate(.6) brightness(.6); }
  .core-hero::before { background: linear-gradient(90deg, #212322eb, #212322a8 58%, #1e201f56), linear-gradient(0deg, #141615ed, transparent 85%); }
  .core-hero-copy { max-width: 390px; padding: 29px 24px 27px; }
  .core-hero-label { font-size: 8px; letter-spacing: .13em; }
  .core-hero-title { max-width: 320px; margin: 22px 0 13px; font-size: clamp(43px, 10vw, 61px); line-height: .95; }
  .core-hero-copy > p { max-width: 270px; font-size: 11px; line-height: 1.75; }
  .core-hero-actions { gap: 10px; margin-top: 23px; }
  .core-hero-actions .btn { min-height: 46px; padding: 12px 13px; font-size: 10px; }
  .core-hero-footer { flex-wrap: wrap; gap: 8px 17px; padding: 15px 24px; font-size: 9px; }
  .core-hero-wordmark { right: 15px; bottom: 64px; font-size: 112px; color: #f4f0db10; }
  .core-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .core-stat-card { border-radius: 10px; padding: 17px; }
  .core-stat-icon { width: 29px; height: 29px; margin-bottom: 14px; }
  .core-stat-value { font-size: 35px; }
  .core-stat-label { font-size: 10px; margin-top: 8px; }
  .core-stat-detail { font-size: 9px; }
  .core-overview-grid { grid-template-columns: 1fr; gap: 17px; }
  .core-panel-head { margin-bottom: 20px; }
  .core-panel-head h2, .core-panel-head h3 { font-size: 15px; }
  .core-panel-head > span, .core-panel-head > small { font-size: 9px; }
  .core-week { gap: 6px; }
  .core-day { min-height: 73px; padding: 10px 2px; gap: 10px; font-size: 9px; }
  .core-day > b, .core-day > strong { width: 22px; height: 22px; font-size: 11px; }
  .core-pillar-grid { gap: 20px; }
  .core-empty-state { font-size: 10px; }
  .section-head { flex-wrap: wrap; margin-bottom: 18px; gap: 12px; }
  .section-head h2, .section-head h3 { font-size: 16px; }
  .grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .metric { padding: 16px; }
  .metric-top { font-size: 10px; gap: 6px; }
  .metric strong { font-size: 30px; }
  .metric small { font-size: 9px; }
  .hero { grid-template-columns: 1fr; }
  .hero-main h2 { font-size: 33px; }
  .hero-main p { font-size: 12px; }
  .exercise { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
  .exercise-tools { grid-column: 2; justify-content: flex-start; gap: 7px; }
  .exnum { width: 30px; height: 30px; font-size: 11px; }
  .exname { font-size: 12px; }
  .exdetail { font-size: 10px; }
  .formgrid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs { gap: 7px; }
  .tabs button { padding: 10px 12px; font-size: 11px; }
  .preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preset-card { padding: 15px; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice { padding: 10px; font-size: 11px; }
  .community-grid { grid-template-columns: 1fr; }
  .food-result { grid-template-columns: minmax(0, 1fr); }
  .food-add { justify-content: flex-start; gap: 8px; }
  .barline { grid-template-columns: 78px minmax(0, 1fr) 42px; gap: 8px; font-size: 10px; }
  .footer-note { margin-top: 26px; font-size: 9px; }
  .auth-gate { padding: 16px; gap: 16px; }
  .auth-hero { padding: 26px; border-radius: 15px; }
  .auth-hero h1 { font-size: 62px; }
  .authbox { padding: 25px; margin: 0; border-radius: 15px; }
  .authbox h2 { font-size: 34px; }
  .auth-benefits { gap: 12px; }
  .auth-benefits small { font-size: 9px; }
}

@media (max-width: 390px) {
  .main { padding-right: 15px; padding-left: 15px; }
  .topbar { padding-right: 15px; padding-left: 15px; }
  .core-context-eyebrow { letter-spacing: .08em; }
  .welcome h1 { font-size: 38px; }
  .core-hero-copy { padding: 26px 21px; }
  .core-hero-title { font-size: 45px; }
  .core-hero-actions { gap: 9px; }
  .core-hero-actions .btn { font-size: 10px; padding-right: 11px; padding-left: 11px; gap: 7px; }
  .core-hero-actions .btn svg { width: 14px; height: 14px; }
  .core-hero-footer { padding-right: 21px; padding-left: 21px; gap: 7px 13px; font-size: 8px; }
  .core-stat-card { padding: 16px 14px; }
  .core-panel { padding: 17px; }
  .core-panel-head { gap: 7px; }
  .core-panel-head h2, .core-panel-head h3 { font-size: 14px; }
  .core-week { gap: 4px; }
  .core-day { border-radius: 6px; }
  .formgrid, .formgrid.three { grid-template-columns: 1fr; }
  .food-search { grid-template-columns: 1fr; }
  .food-add { flex-wrap: wrap; }
  .choice-grid { grid-template-columns: 1fr; }
  .auth-hero h1 { font-size: 56px; }
  .auth-benefits { grid-template-columns: 1fr; }
  .auth-benefits > div { flex-direction: row; }
  .mobile-nav { padding-right: 6px; padding-left: 6px; }
  .mobile-nav button { font-size: 9px; }
}

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

/* Final integration layer: icons, overview content, history and brand motion. */
.core-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  filter: invert(93%) sepia(6%) saturate(130%) hue-rotate(75deg) brightness(105%);
  opacity: .9;
}
.nav button.active .core-icon,
.mobile-nav button.active .core-icon { filter: invert(62%) sepia(89%) saturate(2540%) hue-rotate(340deg) brightness(105%); opacity: 1; }
.core-sidebar .nav-icon .core-icon { width: 19px; height: 19px; }
.core-sidebar-footer .core-icon { width: 18px; height: 18px; }
.core-stat-icon .core-icon,
.core-panel-head > .core-icon,
.core-day .core-icon { width: 17px; height: 17px; }
.linkbutton .core-icon,
.btn .core-icon { display: inline-block; width: 15px; height: 15px; vertical-align: -3px; }
.core-today { color: #aeb1af; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.core-on-overview .welcome { display: none; }

.core-hero > .core-hero-image {
  position: absolute;
  z-index: -3;
  inset: 0 0 0 auto;
  width: 68%;
  height: 100%;
  object-fit: cover;
  object-position: 56% 40%;
  filter: saturate(.7) brightness(.84);
}
.core-hero > .core-hero-wordmark {
  position: absolute;
  z-index: -1;
  inset: auto 24px 70px auto;
  width: min(235px, 28%);
  height: auto;
  object-fit: contain;
  object-position: center;
  filter: none;
  opacity: .18;
  pointer-events: none;
}
.core-live-dot { display: none; }
.core-progress-track { height: 5px; overflow: hidden; border-radius: 99px; background: #3c403b; }
.core-progress-fill { display: block; height: 100%; border-radius: inherit; background: #ff7430; }
.core-stat-card .core-progress-track { margin-top: 15px; }
.core-panel-head h2,
.core-panel-head h3 { margin: 5px 0 0; color: #f1f2ed; font-size: 18px; line-height: 1.2; }
.core-week-badge { padding: 6px 8px; border: 1px solid #464b45; border-radius: 6px; background: #282c28; }
.core-panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 18px; border-top: 1px solid #343a33; color: #9fa49e; font-size: 10px; }
.core-panel-foot .linkbutton { display: inline-flex; align-items: center; gap: 8px; }
.core-next-session { display: flex; flex-direction: column; }
.core-next-plan { display: grid; gap: 5px; padding: 15px 16px; border: 1px solid #3e443d; border-radius: 9px; background: #222722; }
.core-next-plan strong { color: #f1f2ed; font-size: 14px; }
.core-next-plan span { color: #9ea49d; font-size: 10px; }
.core-exercise-preview { margin: 12px 0 18px; }
.core-exercise-preview > div { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 10px; align-items: center; min-height: 38px; border-bottom: 1px solid #303630; color: #d8dad6; font-size: 11px; }
.core-exercise-preview small { color: #969c95; font-size: 9px; }
.core-exercise-number { color: #ff8c50; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.core-next-session > .btn { margin-top: auto; }
.core-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-top: 7px; }
.core-section-heading h3 { margin: 5px 0 0; color: #f1f2ed; font: 600 clamp(25px,3vw,36px)/1.05 'Barlow Condensed', sans-serif; }
.core-section-heading > span { color: #999e98; font-size: 10px; }
.core-pillar-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.core-pillar {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 220px;
  gap: 0;
  padding: 21px;
  border: 1px solid #384038;
  border-radius: 12px;
  background: #192019;
  overflow: hidden;
}
.core-pillar::after { content: ''; position: absolute; inset: auto -25px -45px auto; width: 120px; height: 120px; border-radius: 50%; background: #ff6a1a0a; }
.core-pillar-top { display: flex; align-items: center; gap: 9px; color: #aeb5ad; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.core-pillar-top .core-icon { width: 17px; height: 17px; }
.core-pillar-count { margin-left: auto; color: #70776f; }
.core-pillar h3 { margin: 22px 0 8px; color: #f2f3ee; font: 600 32px/1.04 'Barlow Condensed', sans-serif; }
.core-pillar h3 small { color: #929991; font: 400 12px/1 'DM Sans',sans-serif; }
.core-pillar h3 span { color: #ff8847; }
.core-pillar p { margin: 0 0 18px; color: #a4aaa3; font-size: 10px; line-height: 1.65; }
.core-pillar > .linkbutton { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; align-self: flex-start; }
.core-pillar .core-progress-track { width: 100%; margin: auto 0 15px; }
.core-water-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.core-water-controls .btn { min-height: 39px; padding: 8px 9px; font-size: 9px; }
.core-history-grid { align-items: stretch; }
.core-history-list { display: grid; }
.core-history-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 62px; border-top: 1px solid #323832; }
.core-history-row:first-child { border-top: 0; }
.core-history-row > div { min-width: 0; }
.core-history-row strong { display: block; overflow: hidden; color: #e5e7e1; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.core-history-row small { display: block; margin-top: 4px; color: #929891; font-size: 9px; }
.core-history-row > span:last-child { color: #accb90; font-size: 9px; }
.core-history-icon { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #53654b; border-radius: 50%; background: #293526; }
.core-history-icon .core-icon { width: 14px; height: 14px; filter: invert(81%) sepia(26%) saturate(459%) hue-rotate(43deg) brightness(97%); }
.core-empty-state { display: grid; justify-items: start; gap: 7px; }
.core-empty-state > .core-icon { width: 21px; height: 21px; margin-bottom: 4px; }
.core-empty-state p { margin: 0; color: #9fa49e; }
.core-empty-state .btn { margin-top: 5px; }
.core-lift-highlight { display: grid; gap: 7px; padding: 20px; margin-bottom: 16px; border: 1px solid #3f463e; border-radius: 10px; background: #232923; }
.core-lift-highlight p { margin: 0; color: #aab0a9; font-size: 10px; }
.core-lift-highlight strong { color: #f3f4ef; font: 600 38px/1 'Barlow Condensed',sans-serif; }
.core-lift-highlight strong small { color: #b2b7b0; font: 400 11px/1 'DM Sans',sans-serif; }
.core-lift-highlight span { color: #888f87; font-size: 9px; }

.core-brand-banner { position: relative; min-width: 0; height: 92px; border-block: 1px solid #343934; overflow: hidden; background: #151a15; }
.core-brand-banner-track { position: absolute; inset: 0 auto 0 0; display: flex; align-items: center; width: max-content; animation: core-brand-marquee 30s linear infinite !important; }
.core-brand-banner-track span { padding: 0 30px; color: #777d76; font: 650 28px/1 'Barlow Condensed',sans-serif; letter-spacing: .03em; white-space: nowrap; }
.core-brand-banner-track img { width: 160px; height: 54px; object-fit: contain; opacity: .55; }
.core-brand-banner.is-paused .core-brand-banner-track { animation-play-state: paused !important; }
.core-motion-toggle { position: absolute; right: 10px; bottom: 8px; min-height: 34px; padding: 7px 9px; border: 1px solid #414741; border-radius: 6px; background: #171c17e8; color: #9fa59e; font-size: 8px; }
@keyframes core-brand-marquee { to { transform: translateX(-50%); } }
.core-install-steps { display: grid; gap: 12px; padding-left: 22px; color: #bec2bc; font-size: 12px; line-height: 1.65; }
.core-technique-modal { width: min(960px,calc(100vw - 28px)); max-height: calc(100dvh - 28px); overflow: auto; }
.core-sleep-duration { padding: 12px 14px; border: 1px solid #3b4639; border-radius: 8px; background: #1d251d; color: #aeb5ad; font-size: 11px; }
.core-sleep-duration strong { color: #f0f2eb; }
.core-sleep-manual { border: 1px solid #343a34; border-radius: 9px; background: #171b18; }
.core-sleep-manual summary { min-height: 44px; padding: 12px 14px; color: #b8bdb7; font-size: 11px; font-weight: 650; cursor: pointer; }
.core-sleep-manual[open] summary { border-bottom: 1px solid #303630; }
.core-sleep-manual > .formgrid { padding: 14px 14px 0; }
.core-sleep-manual > .tiny { margin: 9px 14px 14px; }
.core-sleep-window { display: grid; gap: 4px; margin-bottom: 14px; padding: 13px 15px; border-left: 2px solid #ff7430; background: #ff6a1a0b; }
.core-sleep-window span { color: #969c95; font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.core-sleep-window strong { color: #f0f2ec; font: 600 22px/1.2 'Barlow Condensed',sans-serif; }
.core-sleep-row small { line-height: 1.5; }
.core-system-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.core-system-card { position: relative; display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 16px; min-height: 185px; padding: 23px; overflow: hidden; border: 1px solid #394039; border-radius: 12px; background: linear-gradient(135deg,#1b201b,#151815); }
.core-system-card::after { content: ''; position: absolute; right: -50px; bottom: -70px; width: 180px; height: 180px; border-radius: 50%; background: #ff6a1a0b; pointer-events: none; }
.core-system-card-icon { display: grid; place-items: center; align-self: start; width: 48px; height: 48px; border: 1px solid #535a52; border-radius: 10px; background: #242a24; }
.core-system-card-icon .core-icon { width: 22px; height: 22px; filter: invert(62%) sepia(89%) saturate(2540%) hue-rotate(340deg) brightness(105%); }
.core-system-card h3 { margin: 8px 0 7px; color: #f1f3ed; font: 650 27px/1.05 'Barlow Condensed',sans-serif; }
.core-system-card p { max-width: 470px; margin: 0; color: #9da39c; font-size: 10px; line-height: 1.65; }
.core-system-card > .linkbutton { z-index: 1; grid-column: 2; display: inline-flex; align-items: center; align-self: end; justify-self: start; gap: 8px; margin-top: 12px; }
.core-system-playlists { background: radial-gradient(circle at 100% 0,#7357ff18,transparent 45%),linear-gradient(135deg,#1c1f20,#151718); }
.core-more-grid { display: grid; gap: 8px; }
.core-more-grid > button { display: grid; grid-template-columns: 38px minmax(0,1fr) 18px; align-items: center; gap: 12px; width: 100%; min-height: 68px; padding: 12px 14px; border: 1px solid #393e39; border-radius: 9px; background: #1b1f1b; color: #ebeee9; text-align: left; }
.core-more-grid > button:hover { border-color: #ff7a36; background: #202520; }
.core-more-grid > button > .core-icon:first-child { width: 21px; height: 21px; filter: invert(62%) sepia(89%) saturate(2540%) hue-rotate(340deg) brightness(105%); }
.core-more-grid span { display: grid; gap: 4px; }
.core-more-grid strong { font-size: 12px; }
.core-more-grid small { color: #959b94; font-size: 9px; }

@media (max-width: 1080px) {
  .core-pillar-grid { grid-template-columns: 1fr; }
  .core-pillar { min-height: 185px; }
}
@media (max-width: 999px) {
  .mobile-nav { grid-template-columns: repeat(5,minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .core-today { display: none; }
  .core-hero > .core-hero-image { width: 100%; object-position: 61% 35%; filter: saturate(.64) brightness(.58); }
  .core-hero > .core-hero-wordmark { inset: auto 15px 66px auto; width: 165px; opacity: .12; filter: none; }
  .core-section-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .core-pillar-grid { gap: 11px; }
  .core-pillar { min-height: 0; padding: 19px; }
  .core-pillar h3 { font-size: 29px; }
  .core-history-row { grid-template-columns: 32px minmax(0,1fr); }
  .core-history-row > span:last-child { grid-column: 2; margin-top: -8px; }
  .core-brand-banner { height: 78px; }
  .core-brand-banner-track span { padding: 0 20px; font-size: 22px; }
  .core-brand-banner-track img { width: 130px; }
  .mobile-nav .core-icon { width: 19px; height: 19px; }
  .mobile-nav { gap: 2px; padding-right: 4px; padding-left: 4px; }
  .mobile-nav button { min-width: 0; padding-right: 1px; padding-left: 1px; font-size: 8px; }
  .core-system-grid { grid-template-columns: 1fr; gap: 11px; }
  .core-system-card { grid-template-columns: 42px minmax(0,1fr); min-height: 165px; padding: 19px; }
  .core-system-card-icon { width: 42px; height: 42px; }
  .core-system-card h3 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .core-brand-banner-track { animation: none !important; }
  .core-motion-toggle { display: none; }
}
