@import url("https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&display=swap");
/* The Fitness Linkup — shared styles */
:root {
  --bg: #f6f3ec;
  --surface: #ffffff;
  --surface-2: #eef3ee;
  --ink: #13211b;
  --muted: #56645d;
  --line: #e1ddd1;
  --brand: #0e7a5a;
  --brand-ink: #ffffff;
  --brand-soft: #d9efe6;
  --accent: #e0503a;
  --accent-soft: #fde4dd;
  --sun: #f2b632;
  --shadow: 0 1px 2px rgba(19, 33, 27, .06), 0 8px 24px rgba(19, 33, 27, .06);
  --radius: 18px;
  --head: "Archivo", system-ui, sans-serif;
  --body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1512; --surface: #15201b; --surface-2: #1b2a23; --ink: #ecf2ee; --muted: #9db0a7;
    --line: #26362f; --brand: #3cc394; --brand-ink: #062118; --brand-soft: #173a2e;
    --accent: #ff7a60; --accent-soft: #3a211b; --sun: #f5c451;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1512; --surface: #15201b; --surface-2: #1b2a23; --ink: #ecf2ee; --muted: #9db0a7;
  --line: #26362f; --brand: #3cc394; --brand-ink: #062118; --brand-soft: #173a2e;
  --accent: #ff7a60; --accent-soft: #3a211b; --sun: #f5c451;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: .35em; }
.small { font-size: .92rem; }
.muted { color: var(--muted); }
.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--brand-ink); padding: 8px 14px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font: 700 1.15rem var(--head); color: var(--ink); text-decoration: none; margin-right: auto; white-space: nowrap; }
.logo b { color: var(--brand); font-weight: 800; }
.logo-mark { width: 30px; height: 30px; border-radius: 50%; border: 5px solid var(--brand); border-right-color: var(--accent); flex: none; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: .98rem; }
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; font: 600 .95rem var(--body); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; min-width: 44px; height: 40px; padding: 0 12px; cursor: pointer; }
.menu-btn { display: none; }
@media (max-width: 880px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 1rem var(--head); background: var(--brand); color: var(--brand-ink); border: 2px solid var(--brand); border-radius: 999px; padding: 12px 22px; text-decoration: none; cursor: pointer; min-height: 48px; }
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* Sections */
section { padding: clamp(48px, 8vw, 88px) 0; }
.kicker { display: inline-block; font: 700 .8rem var(--head); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: 12px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }
.section-head { max-width: 680px; margin-bottom: 32px; }
.alt { background: var(--surface-2); }

/* Hero */
.hero { padding-top: clamp(40px, 7vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px; align-items: center; }
.hero h1 em { display: block; font-style: normal; color: var(--brand); }
.hero-art { justify-self: center; width: min(320px, 100%); }
.hero-art .r1 { stroke: var(--brand); }
.hero-art .r2 { stroke: var(--accent); }
.hero-art .r3 { stroke: var(--sun); }
.hero-art .track { stroke: var(--line); }
.hero-art text { fill: var(--ink); font-family: var(--head); }
@media (max-width: 760px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { width: 220px; order: -1; } }

/* Cards & grids */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .g2, .g4 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-top: 4px; }
.card p:last-child { margin-bottom: 0; }
.num { font: 800 1rem var(--head); color: var(--accent); }
.card .more { font-weight: 700; text-decoration: none; }
a.card { display: block; color: inherit; text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
a.card:hover { transform: translateY(-2px); border-color: var(--brand); }
a.card .ext { color: var(--brand); font-weight: 700; }
.list-good li::marker { content: "✓  "; color: var(--brand); font-weight: 800; }
.list-bad li::marker { content: "✕  "; color: var(--accent); font-weight: 800; }
.tag { display: inline-block; font: 700 .75rem var(--head); text-transform: uppercase; letter-spacing: .08em; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.tag.hot { background: var(--accent-soft); color: var(--accent); }

/* Ad slot */
.ad { border: 1px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; margin: 0 auto; }

/* Notice */
.notice { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 16px 18px; border-radius: 0 12px 12px 0; }
.notice.calm { border-left-color: var(--brand); background: var(--brand-soft); }

/* Page head */
.page-head { padding-bottom: 24px; }
.page-head .lead { margin-bottom: 0; }

/* Academy */
.levels-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.levels-nav a { text-decoration: none; font-weight: 700; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.level { padding: 40px 0 8px; }
.level-head { display: flex; align-items: baseline; gap: 14px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 24px; }
.level-head .num { font-size: 1.4rem; }
.level-head h2 { margin: 0; }
.lesson { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 36px); margin-bottom: 18px; scroll-margin-top: 84px; }
.lesson h3 { font-size: clamp(1.35rem, 3vw, 1.65rem); }
.lesson h4 { font: 700 1.02rem var(--head); margin: 1.3em 0 .4em; }
.lesson-meta { font: 700 .78rem var(--head); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; }
.lesson .keep { background: var(--surface-2); border-radius: 12px; padding: 14px 16px; margin-top: 18px; }
.lesson .keep strong { color: var(--accent); }
.moves { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 12px 0; }
.moves div { background: var(--surface-2); border-radius: 12px; padding: 14px; }
.moves b { display: block; font-family: var(--head); }
@media (max-width: 560px) { .moves { grid-template-columns: 1fr; } }
.toc { columns: 2; column-gap: 32px; }
.toc li { break-inside: avoid; }
@media (max-width: 640px) { .toc { columns: 1; } }

/* Tools */
.tool { margin-bottom: 22px; }
.tool-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.tool-head h2 { margin: 0; font-size: 1.6rem; }
.timer { position: relative; width: min(280px, 100%); margin: 20px auto; aspect-ratio: 1; }
.timer .ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 14; }
.ring-fg { fill: none; stroke: var(--brand); stroke-width: 14; stroke-linecap: round; stroke-dasharray: 565; stroke-dashoffset: 0; transition: stroke-dashoffset .9s linear, stroke .3s; }
.timer[data-phase="rest"] .ring-fg { stroke: var(--sun); }
.timer[data-phase="done"] .ring-fg { stroke: var(--accent); }
.timer-read { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.phase { font: 800 1.1rem var(--head); text-transform: uppercase; letter-spacing: .14em; color: var(--brand); }
.timer[data-phase="rest"] .phase { color: #b07d00; }
:root[data-theme="dark"] .timer[data-phase="rest"] .phase { color: var(--sun); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .timer[data-phase="rest"] .phase { color: var(--sun); } }
.timer[data-phase="done"] .phase { color: var(--accent); }
.time { font: 800 clamp(3rem, 14vw, 4.2rem)/1 var(--head); font-variant-numeric: tabular-nums; margin: 6px 0; }
.round { color: var(--muted); font-weight: 600; }
.presets, .quick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.pill { font: 700 .92rem var(--body); background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; cursor: pointer; min-height: 40px; }
.pill:hover { border-color: var(--brand); }
.fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.fields label { font-weight: 600; font-size: .9rem; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
input[type="number"] { font: 700 1.1rem var(--head); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; width: 100%; min-height: 44px; }
.center { text-align: center; }
.center .btn-row { justify-content: center; }
.progress { height: 14px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 12px 0; border: 1px solid var(--line); }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--sun)); border-radius: 999px; transition: width .4s ease; }
.plan-week { border-top: 1px solid var(--line); padding: 14px 0; }
.plan-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.plan-head span { color: var(--muted); font-weight: 600; }
.plan-week p { margin: 4px 0 10px; }
.plan-days { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-weight: 700; font-size: .92rem; min-height: 40px; }
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip input:checked + span::before { content: "✓ "; }
.chip input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
.big-stat { font: 800 3rem/1 var(--head); font-variant-numeric: tabular-nums; }
.big-stat small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 14px 0; }
.day { display: flex; flex-direction: column; gap: 4px; text-align: center; font-weight: 700; font-size: .85rem; color: var(--muted); }
.day input { text-align: center; padding: 8px 2px; font-size: 1rem; }
.day.today span { color: var(--brand); }
.day.today input { border-color: var(--brand); border-width: 2px; }
@media (max-width: 420px) { .week-grid { grid-template-columns: repeat(4, 1fr); } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; margin-top: 24px; }
.site-footer p { margin-bottom: .6em; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0; }
.foot-nav a { font-weight: 600; }

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