*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.6 var(--font); overflow-x: hidden; }
[hidden] { display: none !important; }
img, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--accent); color: var(--accent-ink); padding: 0.6rem 1rem; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip-link:focus { top: 1rem; }
.container { width: min(100% - 2rem, 1120px); margin-inline: auto; }
.muted { color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; padding: 0.7rem 1.25rem; border-radius: 999px; border: 1.5px solid transparent; font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; text-align: center; transition: background-color 0.15s, border-color 0.15s, transform 0.15s; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { color: var(--accent); }
.btn-lg { min-height: 54px; padding-inline: 1.6rem; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11, 16, 18, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 1rem; }
.wordmark { font-weight: 800; font-size: 1.35rem; letter-spacing: 0.02em; color: var(--text); text-decoration: none; }
.wordmark span { color: var(--accent); }
.nav-toggle { display: none; width: 48px; height: 48px; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 20px; height: 2px; background: var(--text); content: ""; position: relative; transition: transform 0.2s; }
.nav-toggle .bars::before { position: absolute; top: -6px; }
.nav-toggle .bars::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav ul { display: flex; gap: 1.25rem; }
.site-nav ul a { color: var(--muted); text-decoration: none; font-weight: 500; padding: 0.5rem 0; }
.site-nav ul a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.nav-actions .btn { min-height: 44px; padding: 0.55rem 1rem; font-size: 0.95rem; }
@media (max-width: 899px) {
  .js .nav-toggle { display: inline-flex; }
  .site-nav { flex-direction: column; align-items: stretch; gap: 1rem; }
  .js .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 1rem; }
  .js .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 0.85rem 0.25rem; font-size: 1.05rem; border-bottom: 1px solid var(--border); }
  .nav-actions { flex-direction: column; align-items: stretch; }
  .nav-actions .btn { min-height: 50px; }
  .header-inner { flex-wrap: wrap; }
  html:not(.js) .header-inner { padding-block: 0.75rem; }
}

/* Sections */
section { padding-block: var(--space-12); }
.section-head { max-width: 46rem; margin-bottom: var(--space-8); }
h1 { font-size: clamp(2rem, 7.5vw, 3.6rem); line-height: 1.04; letter-spacing: -0.01em; font-weight: 800; text-transform: uppercase; overflow-wrap: break-word; }
h2 { font-size: clamp(1.6rem, 5vw, 2.5rem); line-height: 1.12; letter-spacing: -0.01em; font-weight: 750; margin-bottom: var(--space-4); }
h3 { font-size: 1.15rem; line-height: 1.3; font-weight: 700; }
.lead { font-size: clamp(1.05rem, 2.6vw, 1.3rem); color: var(--muted); max-width: 40rem; }
.prose p + p { margin-top: 1rem; }
.prose { max-width: 44rem; color: #dbe5e4; }
.alt-surface { background: var(--surface); border-block: 1px solid var(--border); }

.hero { padding-block: var(--space-12) var(--space-16); }
.hero-grid { display: grid; gap: var(--space-8); align-items: center; }
.hero-copy .lead { margin-top: var(--space-6); }
.hero-actions { display: flex; flex-direction: column; gap: 0.75rem; margin-top: var(--space-8); }
.hero-photo { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 4 / 5; background: var(--surface); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 600px) { .hero-actions { flex-direction: row; flex-wrap: wrap; } }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.3fr 1fr; gap: var(--space-12); } .hero { padding-block: 5rem 6rem; } section { padding-block: 5rem; } }

.preview-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-6); }
.card-label { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--space-4); font-weight: 600; }
.preview-card .big { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.preview-card .big span { color: var(--accent); }

/* Week */
.week { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
.wk { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 0.7rem 0.8rem; display: flex; flex-direction: column; gap: 0.15rem; min-height: 68px; }
.wk-day { font-size: 0.78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.wk-name { font-weight: 700; overflow-wrap: anywhere; }
.wk-push { border-color: var(--accent); }
.wk-pull { border-color: #7fb8ff; }
.wk-pull .wk-name { color: #b4d6ff; }
.wk-push .wk-name { color: var(--accent); }
.wk-rest { background: transparent; border-style: dashed; }
.wk-rest .wk-name { color: var(--muted); font-weight: 500; }
.week-mini { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.35rem; }
.week-mini .wk { padding: 0.5rem 0.2rem; min-height: 62px; text-align: center; align-items: center; }
.week-mini .wk-name { font-size: 0.7rem; }
@media (min-width: 640px) { .week { grid-template-columns: repeat(7, 1fr); } .wk { min-height: 96px; } }

/* Cards */
.cards { display: grid; gap: var(--space-4); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-6); }
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--muted); }
.card .num { color: var(--accent); font-weight: 800; font-size: 0.9rem; letter-spacing: 0.1em; margin-bottom: 0.75rem; display: block; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.note { margin-top: var(--space-6); color: var(--muted); border-left: 3px solid var(--accent); padding-left: 1rem; max-width: 46rem; }

.split { display: grid; gap: var(--space-8); }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; align-items: start; } }

/* Author */
.author-photo { aspect-ratio: 4 / 5; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; text-align: center; padding: 1.5rem; max-width: 420px; width: 100%; }
.author-photo img { width: 100%; height: 100%; object-fit: cover; }
.placeholder-mark { font-weight: 800; font-size: 3rem; letter-spacing: 0.04em; }
.placeholder-mark span { color: var(--accent); }
.placeholder-note { color: var(--muted); font-size: 0.95rem; margin-top: 0.75rem; }
.socials { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: var(--space-6); }
.socials a { display: inline-flex; min-height: 44px; align-items: center; padding: 0.4rem 1rem; border: 1px solid var(--border); border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; }
.socials a:hover { border-color: var(--accent); color: var(--accent); }
.video-wrap { margin-top: var(--space-6); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16 / 9; background: #000; }
.video-wrap video { width: 100%; height: 100%; }

/* Forms */
.form { display: grid; gap: var(--space-4); max-width: 34rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 600; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field textarea, .field select, .set-input { width: 100%; min-height: 48px; padding: 0.7rem 0.9rem; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--bg); color: var(--text); font: inherit; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .set-input:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
.field-error { color: var(--danger); font-size: 0.92rem; min-height: 0; }
.check { display: flex; gap: 0.75rem; align-items: flex-start; }
.check input { width: 22px; height: 22px; margin-top: 0.2rem; accent-color: var(--accent); flex: none; }
.status { padding: 0.8rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.status.ok { border-color: var(--accent); color: var(--accent); }
.status.err { border-color: var(--danger); color: var(--danger); }

/* FAQ */
.faq { display: grid; gap: 0.6rem; max-width: 48rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.faq summary { cursor: pointer; padding: 1rem 1.25rem; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 1rem; min-height: 56px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.5rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 1.25rem 1.25rem; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding-block: var(--space-12); background: var(--surface); }
.footer-grid { display: grid; gap: var(--space-8); }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.footer-grid h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.75rem; }
.footer-grid li a, .link-btn { color: var(--text); text-decoration: none; display: inline-block; padding: 0.35rem 0; }
.footer-grid li a:hover, .link-btn:hover { color: var(--accent); }
.link-btn { background: none; border: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.disclaimer { color: var(--muted); font-size: 0.9rem; margin-top: 1rem; max-width: 34rem; }
.copy { margin-top: var(--space-8); color: var(--muted); font-size: 0.85rem; }

/* Consent banner */
.consent { position: fixed; left: 0.75rem; right: 0.75rem; bottom: 0.75rem; z-index: 80; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); max-width: 640px; margin-inline: auto; display: grid; gap: 0.75rem; }
.consent p { font-size: 0.95rem; }
.consent-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.consent-actions .btn { min-height: 44px; flex: 1; }

/* Notices */
.notice { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 0.9rem 1.1rem; margin-top: var(--space-4); max-width: 48rem; }
.notice-warn { border-color: var(--warn); }
.notice-info { border-color: var(--accent); }
.notice strong { color: var(--text); }
.preview-banner { background: var(--warn); color: #231a00; text-align: center; padding: 0.6rem 1rem; font-weight: 700; }

/* Program page */
.page-hero { padding-block: var(--space-8) var(--space-4); }
.page-hero h1 { font-size: clamp(1.7rem, 6vw, 3rem); text-transform: none; }
.crumbs { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }
.day-tabs { display: flex; gap: 0.5rem; overflow-x: auto; padding-block: 0.5rem; position: sticky; top: 64px; z-index: 20; background: var(--bg); margin-inline: calc(50% - 50vw); padding-inline: max(1rem, calc(50vw - 560px)); scrollbar-width: thin; }
.day-tabs a { flex: none; padding: 0.55rem 1.1rem; border-radius: 999px; border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.day-tabs a:hover { border-color: var(--accent); color: var(--accent); }
.day { padding-block: var(--space-8); border-top: 1px solid var(--border); }
.day-head { display: flex; flex-direction: column; gap: 1rem; margin-bottom: var(--space-6); }
@media (min-width: 700px) { .day-head { flex-direction: row; justify-content: space-between; align-items: flex-end; } }
.day-head h2 { margin-bottom: 0.25rem; }
.exercise-list { display: grid; gap: 0.9rem; counter-reset: ex; }
.exercise { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; counter-increment: ex; }
.exercise h3::before { content: counter(ex) ". "; color: var(--accent); }
.target { color: var(--accent); font-weight: 650; margin-top: 0.25rem; }
.ex-note { color: var(--muted); margin-top: 0.5rem; }
.exercise details { margin-top: 0.75rem; border-top: 1px solid var(--border); padding-top: 0.5rem; }
.exercise summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.exercise details > * + * { margin-top: 0.75rem; }
.alt-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.alt-list li { border: 1px solid var(--border); border-radius: 999px; padding: 0.25rem 0.8rem; font-size: 0.92rem; }
.rules { display: grid; gap: 0.8rem; counter-reset: rule; }
.rules li { counter-increment: rule; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.rules h3::before { content: counter(rule) ". "; color: var(--accent); }
.rules p { color: var(--muted); margin-top: 0.3rem; }

/* Logger */
.logger { background: var(--surface); border: 1.5px solid var(--accent); border-radius: var(--radius); padding: var(--space-4); margin-block: var(--space-6); }
@media (min-width: 700px) { .logger { padding: var(--space-6); } }
.logger-meta { color: var(--muted); margin-bottom: var(--space-4); }
.log-ex { border-top: 1px solid var(--border); padding-block: 1rem; }
.log-ex:first-of-type { border-top: 0; }
.prev { color: var(--muted); font-size: 0.92rem; margin: 0.25rem 0 0.6rem; }
.set-row { display: grid; grid-template-columns: 2rem 1fr 1fr 52px; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; }
.set-row.head { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.25rem; }
.set-n { text-align: center; color: var(--muted); font-weight: 700; }
.set-input { min-height: 48px; text-align: center; font-size: 1.05rem; padding: 0.5rem; }
.set-done { width: 52px; height: 48px; border-radius: 12px; border: 1.5px solid var(--border); background: transparent; color: var(--muted); font-size: 1.3rem; cursor: pointer; }
.set-done[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 800; }
.logger-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.history-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.6rem; }
.history-item summary { padding: 0.9rem 1.1rem; cursor: pointer; font-weight: 600; min-height: 52px; display: flex; align-items: center; }
.history-body { padding: 0 1.1rem 1rem; color: var(--muted); font-size: 0.95rem; }
.history-body p { margin-top: 0.5rem; }
.history-body strong { color: var(--text); }
.toast { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); background: var(--surface-2); border: 1px solid var(--accent); padding: 0.75rem 1.2rem; border-radius: 999px; z-index: 90; max-width: 92vw; }
.toast.err { border-color: var(--danger); color: var(--danger); }
.empty { border: 1px dashed var(--border); border-radius: var(--radius); padding: 1.25rem; color: var(--muted); }

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