:root {
    color-scheme: light;
    --page: #ffffff;
    --surface: #f5f5f7;
    --text: #1d1d1f;
    --muted: #6e6e73;
    --line: #d2d2d7;
    --accent: #b6fc4c;
}

@media (prefers-color-scheme: dark) {
    html:not(.light) {
        color-scheme: dark;
        --page: #000000;
        --surface: #1c1c1e;
        --text: #f5f5f7;
        --muted: #a1a1a6;
        --line: #424245;
        --accent: #b6fc4c;
    }
}

html.dark {
    color-scheme: dark;
    --page: #000000;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --line: #424245;
    --accent: #b6fc4c;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    padding: 0 24px 64px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--page);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
.container { max-width: 980px; margin: 0 auto; }
.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}
.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.7px;
    color: var(--text);
    text-decoration: none;
}
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
}
.icon-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-toggle:hover { color: var(--text); background: var(--surface); }
.icon-toggle.is-active { color: #1d1d1f; background: var(--accent); }
.theme-toggle { width: 44px; border-color: var(--line); }
.theme-toggle .dark-icon { display: none; }
@media (prefers-color-scheme: dark) {
    html:not(.light) .theme-toggle .light-icon { display: none; }
    html:not(.light) .theme-toggle .dark-icon { display: inline; }
}
html.dark .theme-toggle .light-icon { display: none; }
html.dark .theme-toggle .dark-icon { display: inline; }
html.light .theme-toggle .light-icon { display: inline; }
html.light .theme-toggle .dark-icon { display: none; }
.experimental-notice { margin-top: 24px; padding: 12px 16px; border-radius: 999px; background: var(--surface); color: var(--text); font-size: 14px; }
.day-header { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 56px 0 40px; text-align: center; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 19px; font-weight: 600; }
h1 { margin: 0; font-size: 64px; line-height: 1.06; letter-spacing: -2.5px; font-weight: 700; }
.navigation { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.nav-btn, .date-picker {
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
}
.nav-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; text-decoration: none; cursor: pointer; font-size: 18px; }
.nav-btn:hover { background: var(--accent); border-color: var(--accent); color: #1d1d1f; }
.nav-btn:disabled { opacity: 0.35; cursor: default; }
.date-picker { padding: 0 10px; font-size: 13px; min-width: 0; }
:focus-visible { outline: 3px solid var(--muted); outline-offset: 4px; }
.date-picker:focus { outline: none; }
.today-link { width: auto; padding: 0 16px; font-size: 14px; }
.workout-section { margin-bottom: 16px; }
.workout-section > details { background: var(--surface); border: 0; border-radius: 24px; overflow: hidden; }
.workout-section > details[open] { padding-bottom: 32px; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.section-title { display: flex; align-items: center; gap: 16px; padding: 30px 32px; margin: 0; font-size: 28px; font-weight: 650; letter-spacing: -0.4px; }
.section-title::after, .subsection-title::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); flex-shrink: 0; margin-left: 8px; }
details[open] > summary::after { transform: rotate(225deg); }
.section-title::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background-color: var(--text);
    background-image: linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor);
    background-position: center;
    background-size: 12px 2px, 2px 12px;
    background-repeat: no-repeat;
    color: var(--surface);
    transform: none;
}
.section-title:hover::after { background-color: var(--accent); color: #1d1d1f; }
details[open] > .section-title::after { background-size: 12px 2px, 0 0; transform: none; background-color: var(--accent); color: #1d1d1f; }
.summary-title { flex: 1; }
.duration { color: var(--muted); font-size: 15px; font-weight: 500; letter-spacing: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.section-title .duration { padding: 0 4px; }
.subsection { margin: 0 32px; border-top: 1px solid var(--line); }
.subsection-title { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: 0; }
.subsection-title:hover { color: var(--text); }
.subsection[open] { padding-bottom: 16px; }
.workout-separator { display: none; }
.loading { text-align: center; color: var(--muted); }
.error { color: #bf4c3b; text-align: center; }
@media (max-width: 640px) {
    body { padding: 0 16px 40px; }
    .header-row { padding: 18px 0; }
    .day-header { gap: 24px; padding: 36px 0 28px; }
    h1 { font-size: 44px; letter-spacing: -1.6px; }
    .navigation { max-width: 100%; }
    .date-picker { text-align: center; }
    .section-title { padding: 24px 20px; gap: 10px; font-size: 22px; }
    .subsection { margin-left: 20px; margin-right: 20px; }
}

.workout-body { margin: 0 32px 24px; }
.workout-body, .coaching-body { max-width: 70ch; font-size: 17px; line-height: 1.65; overflow-wrap: anywhere; }
.workout-body p, .coaching-body p { margin: 0 0 18px; }
.workout-body ul, .workout-body ol, .coaching-body ul, .coaching-body ol { margin: 0 0 18px; padding-left: 1.3em; }
.workout-body li, .coaching-body li { padding-left: 0.2em; margin-bottom: 8px; }
.workout-body ul, .coaching-body ul { padding-left: 0; list-style-position: inside; }
.workout-body ul > li, .coaching-body ul > li { padding-left: 0; }
.workout-body ul > li::marker, .coaching-body ul > li::marker { content: "•\00a0"; }
.workout-body strong, .coaching-body strong { font-weight: 600; }
.workout-body > :last-child, .coaching-body > :last-child { margin-bottom: 0; }
@media (max-width: 640px) {
    .workout-body { margin-left: 20px; margin-right: 20px; }
}
