/* GanFIT blue fitness visual refresh: blue accents, bright surfaces, clear type. */
:root {
  color-scheme: light;
  --cobalt-background: #eaf3fa;
  --cobalt-surface: #f5faff;
  --cobalt-card: #ffffff;
  --cobalt-panel: #e6f2fb;
  --cobalt-text: #173650;
  --cobalt-muted: #5b7489;
  --cobalt-accent: #247db7;
  --cobalt-border: #a9c5d8;
  --cobalt-accent-text: #ffffff;
  --ganfit-blue-deep: #155b8c;
  --ganfit-blue-soft: #dbeefa;
  --ganfit-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-family: var(--ganfit-font);
  color: var(--cobalt-text);
  background: var(--cobalt-background);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--ganfit-font); background: var(--cobalt-background); color: var(--cobalt-text); }
button, input, select, textarea { font: inherit; }
button { letter-spacing: .005em; }
a { color: var(--cobalt-accent); text-underline-offset: .16em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #82c8f1; outline-offset: 2px; }

.app { background: var(--cobalt-surface); box-shadow: 0 16px 52px #17466718; }
.app:has(#auth:not([hidden])) { background: #247db7; color: #fff; box-shadow: none; }
.app-brandbar { background: #247db7; color: #fff; border-bottom: 1px solid #ffffff3d; }
.app-brandbar .small { color: #e8f5fe; background: #ffffff1c; }
.brand { font-family: var(--ganfit-font); font-weight: 800; letter-spacing: -.055em; }
.brand span { color: #d7efff; }
.app-coach { border-color: #dff2ff; background: #e9f5fc; }

.hero { color: #fff; background: linear-gradient(135deg, #2885bf, #17699f); border-radius: 0 0 28px 28px; }
.hero h1 { color: #fff; letter-spacing: -.04em; }
.hero p, .hero .small { color: #eaf6ff; }
#header-member-name { color: #e4f3ff; }

.card { background: var(--cobalt-card); color: var(--cobalt-text); border: 1px solid #d4e4ef; border-radius: 18px; box-shadow: 0 5px 18px #164d7110; }
.card h2, .card h3, h2, h3 { color: #174d73; letter-spacing: -.025em; font-weight: 760; }
.muted, .alert, .foot, .sets th, .calendar-exercises li span:last-child { color: var(--cobalt-muted); }
.pill, .tag, .num, .step b { background: var(--ganfit-blue-soft); color: var(--ganfit-blue-deep); }
.tag.done, .step.done b { background: #dcf2e8; color: #21734d; }
.tag.current, .step.active b, .calendar-day[aria-pressed=true] { background: var(--cobalt-accent); color: #fff; }
.step { color: #6d8497; }
.step.active { color: var(--ganfit-blue-deep); }
.progress { background: #d7e8f3; }
.progress > div { background: linear-gradient(90deg, #43a3d7, #247db7); }

.btn { color: #fff; background: #247db7; border-radius: 13px; box-shadow: 0 4px 11px #1e709f24; font-weight: 750; }
.btn.secondary { color: #175d8d; background: #e4f2fb; box-shadow: none; }
.btn.ghost { color: #17689f; background: #fff; border: 1px solid #b6d3e5; box-shadow: none; }
.btn:disabled { opacity: .48; }
.timer, .score, .summary b, .workout-duration strong { color: var(--cobalt-accent); }
.summary > div, .rest-timer, .notice { background: #e8f3fa; border-color: #c4dbe9; color: var(--cobalt-text); }
.notice { background: #fff7df; border-color: #f0d99b; color: #745714; }
.success, .tag.done { color: #21734d; }

.sets td, .listrow, .calendar-detail, .group-ranking li { border-color: #d8e6ef; }
.sets input, .sets input:focus, .workout-setup select, .workout-setup input,
.weekly-plan-picker select, .auth-form input, .auth-form select,
.set-controls input, .group-filters select, .settings-part textarea,
.calendar-date-picker input, .calendar-day {
  background: #f1f8fc;
  color: var(--cobalt-text);
  border-color: #a9c5d8;
}
.sets input:focus, .set-controls input:focus, .auth-form input:focus, .auth-form select:focus { background: #fff; border-color: #3289c0; }
.calendar-day[aria-current=date] { border-color: #247db7; }
.calendar-day { border-radius: 11px; }
.calendar-day[aria-pressed=true] { background: #247db7; color: #fff; }
.weekly-plan-picker select { color: var(--cobalt-text); }
.calendar-detail { border-top-color: #d8e6ef; }

#auth { background: #fff; border-color: #d6e7f2; color: var(--cobalt-text); box-shadow: 0 12px 34px #123e5b22; }
#auth .login-portrait { background: #fff; border-radius: 16px; }
#auth-content h2 { color: #174d73; font-size: clamp(1.65rem, 6vw, 2rem); font-weight: 760; line-height: 1.14; letter-spacing: -.035em; }
#auth .auth-form .btn { color: #fff; background: #247db7; }
#auth .auth-form label { color: #174d73; }
#auth .auth-links button, #auth .auth-links a { color: #17689f; }
.registration-safety { background: #eff7fc; border-color: #c1d9e8; }
.auth-form .safety-check input { accent-color: #247db7; }
.required-marker { color: #247db7; }
.auth-message[data-error=true] { color: #9e2943; }

.demo { background: linear-gradient(145deg, #d7effc, #80c3e7); color: #174d73; border: 1px solid #b5d6e8; }
.demo small { color: #315e7c; }
.demo .flag { background: #ffffffeb; color: #175d8d; }
.exercise-demo { background: #eaf5fb; }
.exercise-intro .exercise-demo { background: #eaf5fb; }
.exercise-intro .exercise-demo img { border-radius: 12px; }
.overview-exercise img, .exercise-option img, .routine-card img { background: #eaf5fb; }
.routine-0, .routine-3, .routine-1, .routine-4, .routine-2 { background: #e7f2fa; }
.routine-card[aria-pressed=true] { border-color: #247db7; }
.exercise-option:has(input:checked) { border-color: #247db7; }
.exercise-option input { accent-color: #247db7; }
.weekly-program-toggle, .last-weight-link { color: #247db7; }
.weekly-program-toggle:focus-visible { outline-color: #65b5e2; }
.group-chart { background: #f2f8fc; }
.group-note, .group-score-parts, .group-ranking small, .set-saved { color: #5b7489; }
.settings-part { border-color: #d4e4ef; }
.faq-question { border-color: #d4e4ef; }
.account-initials { background: #dbeefa; color: #155b8c; }
#account-initials { background: #dbeefa; color: #155b8c; }
.workout-start { background: #f5faff; }
.ganfit-sheet { background: #fff; color: #173650; }
.ganfit-sheet::backdrop { background: #163a557d; }
.sheet-routine { background: #eaf4fb; color: #173650; }
.danger { color: #a52f42 !important; border-color: #e3abb3 !important; background: #fff2f4 !important; }

/* Information pages share the same white canvas, GanFIT blue header and typography. */
body:has(> header) { background: #eaf3fa; }
body > header { background: #247db7 !important; color: #fff !important; }
body > header a { color: #fff !important; }
body:has(> header) > main { max-width: 900px; margin: 0 auto; padding: clamp(20px, 5vw, 42px); background: #fff; color: #173650; box-shadow: 0 10px 34px #17466712; }
body:has(> header) > main h1, body:has(> header) > main h2, body:has(> header) > main h3 { color: #174d73; font-family: var(--ganfit-font); letter-spacing: -.035em; }
body:has(> header) > main a { color: #247db7; }
body:has(> header) > main button, body:has(> header) > main .button, body:has(> header) > main summary { font-family: var(--ganfit-font); }
body:has(> header) > main table th { background: #e4f2fb; color: #174d73; }
body:has(> header) > main table td, body:has(> header) > main table th { border-color: #d4e4ef; }

@media (max-width: 520px) {
  body:has(> header) > main { border-radius: 0; box-shadow: none; }
  .card { border-radius: 16px; }
  .hero { border-radius: 0 0 22px 22px; }
}

/* Blend exercise GIFs into the white workout card instead of boxing them in. */
.exercise-demo,
.exercise-intro .exercise-demo {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
.exercise-demo img,
.exercise-intro .exercise-demo img {
  border-radius: 0 !important;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 58%, rgba(0,0,0,.9) 72%, transparent 100%);
  mask-image: radial-gradient(ellipse at center, #000 58%, rgba(0,0,0,.9) 72%, transparent 100%);
}
.ganfit-brand-logo { display:block; width:clamp(136px, 42vw, 173px); height:auto; max-height:43px; object-fit:contain; }
/* The selected #8 progress-path logo uses a light brand bar for its navy wordmark. */
.app-brandbar { background: #ffffff !important; color: #173650 !important; border-bottom: 1px solid #d4e4ef !important; }
