:root {
  --text: #182e31;
  --green: #0c624f;
  --dark: #154f42;
  --soft: #e9f3ec;
  --line: #dbe4dd;
  --muted: #536561;
  --sand: #f6e5bf;
  --sand-line: #d5b77c;
  --sand-ink: #61451f;
  color: var(--text);
  background: #f8faf7;
  font: 16px/1.45 system-ui, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; }
button,select,input { font: inherit; color: inherit; }
button,summary,select,input[type=checkbox] { cursor: pointer; }
a { color: inherit; }
button:focus-visible,a:focus-visible,summary:focus-visible,select:focus-visible,input:focus-visible,[tabindex]:focus-visible { outline: 3px solid #158271; outline-offset: 3px; }
[hidden] { display: none !important; }
.course-shell { max-width: 1240px; margin: auto; padding: 0 30px 26px; }
.course-toolbar { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; column-gap: 12px; margin-bottom: 8px; background: #fff; }
.course-shell :is([role=tabpanel],#builder,#features,#progress,button,summary,input,select,a) { scroll-margin-top: 84px; }
.training-back { display: inline-flex; align-items: center; justify-self: start; min-height: 44px; padding-inline-end: 6px; color: var(--green); font-size: 17px; font-weight: 650; line-height: 1.15; text-underline-offset: 3px; }
.training-back:hover { color: var(--dark); text-decoration-thickness: 2px; }
.site-header .masthead-account .account-entry { width: auto; padding: 7px 12px; border: 1px solid var(--sand-line); border-radius: 8px; background: var(--sand); color: var(--sand-ink); text-align: center; }
.course-shell h1,.course-shell h2,.course-shell h3,.course-shell p { margin: 0; }
.cover { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: space-between; min-height: 118px; padding: 16px 28px; border-radius: 14px; background: linear-gradient(104deg,#eff4e9 0%,#e3f0e7 62%,#dbe8e1 100%); }
.cover > div { position: relative; z-index: 1; }
.cover h1 { font-size: clamp(31px,3.5vw,48px); line-height: 1.05; letter-spacing: -.055em; }
.cover h1 span { color: var(--green); }
.cover p { margin-top: 9px; color: #38594f; font-size: 14px; }
.cover i { font-style: normal; padding: 0 4px; }
.cover img { position: absolute; right: 7%; bottom: 0; height: 100%; width: 118px; object-fit: contain; mix-blend-mode: multiply; mask-image: linear-gradient(90deg, transparent,#000 20%,#000 85%,transparent); }
.tabs { display: flex; grid-column: 2; justify-self: center; gap: clamp(12px,2.4vw,30px); }
.tabs button { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 2px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: #344c3e; font: 700 clamp(16px,1.5vw,18px)/1.3 Arial,Helvetica,sans-serif; white-space: nowrap; }
.tabs button:hover { color: #075d38; }
.tabs button[aria-selected=true] { color: #087b3e; border-bottom-color: currentColor; }
.tabs button:focus-visible { outline-color: #b57e13; }
.layout { display: grid; grid-template-columns: minmax(0,2.15fr) minmax(255px,.95fr); grid-template-areas: "panels extras"; gap: 16px 22px; align-items: start; margin-top: 16px; }
.panels { grid-area: panels; min-width: 0; }
.profile-card { padding: 12px 14px; }
.extras { grid-area: extras; display: grid; gap: 7px; padding: 9px; border: 2px solid #819e8e; border-radius: 16px; background: #edf2ec; }
.card,.fold,.profile-card { background: white; border: 1px solid var(--line); border-radius: 12px; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.profile-card summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.profile-card strong,.progress-mini span { display: block; font-size: 16px; }
.profile-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.edit-label,.subtle { color: var(--green); font-size: 13px; font-weight: 650; }
.profile-card[open] .edit-label { display: none; }
.profile-card[open] summary::after { content: "−"; color: var(--green); }
#profile-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 10px; margin-top: 12px; }
#profile-form label { color: var(--muted); font-size: 12px; }
#profile-form select { display: block; min-width: 0; width: 100%; margin-top: 3px; border: 1px solid #cbd8d0; border-radius: 6px; background: #fff; color: var(--text); padding: 7px 4px; font-size: 14px; }
.wide { grid-column: 1/-1; }
.check,.complete { display: inline-flex; align-items: center; gap: 7px; }
input[type=checkbox] { width: 17px; height: 17px; margin: 0; flex-shrink: 0; accent-color: var(--green); }
.primary,.complete { border: 1px solid var(--green); border-radius: 8px; padding: 9px 14px; background: var(--green); color: white; font-size: 14px; font-weight: 650; }
.complete { cursor: pointer; }
.subtle { border: 0; padding: 7px 0; background: transparent; text-underline-offset: 3px; }
.subtle:hover,.edit-label:hover { text-decoration: underline; }
.session-controls,.session-end,.week-switch,.day-picker { display: flex; align-items: center; }
.session-controls,.session-end { justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.session-controls { margin-bottom: 10px; }
.week-switch,.day-picker { gap: 4px; }
.week-switch span { font-size: 14px; font-weight: 700; padding: 0 5px; }
.week-switch button,.day-picker button,.calendar-day { min-height: 34px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.week-switch button { width: 32px; color: var(--green); font-size: 23px; line-height: 1; }
.week-switch button:disabled { color: #a4b6ab; cursor: default; }
.day-picker button { padding: 5px 10px; font-size: 13px; }
.day-picker button[aria-pressed=true],.calendar-day.current { background: var(--dark); border-color: var(--dark); color: #fff; }
.session { padding: 16px 20px 12px; }
.session-head { padding-bottom: 12px; }
.session-head h2,.panel-title h2 { font-size: clamp(23px,2vw,31px); line-height: 1.15; letter-spacing: -.04em; }
.session-head p,.panel-title p { margin-top: 5px; color: var(--muted); font-size: 14px; }
.warmup { padding: 8px 11px; margin-bottom: 6px; border-radius: 7px; background: #f1f5ed; font-size: 13px; color: #395544; }
.warmup strong { margin-right: 8px; }
.notice { padding: 8px 12px; margin-bottom: 9px !important; border-left: 3px solid #b38139; background: #fff6e6; font-size: 14px; }
.move { border-bottom: 1px solid var(--line); }
.move summary { display: grid; grid-template-columns: 46px minmax(0,1fr) auto 14px; gap: 12px; align-items: center; padding: 7px 2px; }
.move summary:hover,.fold > summary:hover { color: var(--green); }
.move summary img { width: 46px; height: 46px; border-radius: 7px; object-fit: cover; }
.move summary strong { font-size: 16px; font-weight: 650; }
.dose { font-size: 14px; color: var(--green); font-weight: 650; }
.move summary::after,.fold > summary::after { content: ""; display: block; width: 8px; height: 8px; border-right: 1.7px solid currentColor; border-bottom: 1.7px solid currentColor; transform: rotate(45deg); justify-self: end; margin: 0 4px 3px 0; }
.move[open] > summary::after,.fold[open] > summary::after { transform: rotate(225deg); margin-bottom: -4px; }
.move[open] > summary { color: var(--green); }
.move-content { display: grid; grid-template-columns: minmax(120px,.65fr) minmax(0,1.6fr); gap: 14px; padding: 8px 2px 16px; color: #314841; font-size: 14px; }
.move-content img { width: 100%; max-width: 230px; height: auto; border-radius: 9px; }
.move-content ol,.fold-body ul { margin: 8px 0; padding-left: 21px; }
.move-content li+li,.fold-body li+li { margin-top: 4px; }
.move-content p+p { margin-top: 7px; }
.session-end { margin-top: 13px; }
.cooldown { margin-top: 8px !important; font-size: 12px; color: var(--muted); }
.progress-mini { padding: 13px 14px; text-decoration: none; }
.progress-mini.card,.progress-card { background: var(--sand); border: 1px solid var(--sand-line); color: var(--sand-ink); }
.progress-mini:hover { border-color: #a78042; }
.progress-mini span { display: flex; justify-content: space-between; font-weight: 700; }
.progress-mini b { color: var(--green); }
.progress-mini strong { display: block; margin: 4px 0; font-size: 14px; font-weight: 500; }
progress { display: block; width: 100%; height: 7px; border: 0; border-radius: 9px; background: #ddc99f; overflow: hidden; accent-color: var(--green); }
progress::-webkit-progress-bar { background: #ddc99f; }
progress::-webkit-progress-value { background: var(--green); border-radius: 8px; }
.fold > summary { display: flex; align-items: center; gap: 8px; min-height: 43px; padding: 10px 15px; font-size: 14px; font-weight: 650; }
.fold > summary::after { margin-left: auto; flex-shrink: 0; }
.fold summary span { color: var(--muted); font-weight: 450; }
.fold-body { margin: 0; padding: 0 15px 14px; color: #425750; font-size: 14px; }
.fold-body p+p,.fold-body h3 { margin-top: 10px; }
.fold-body a { color: var(--green); }
.materials { margin-top: 16px; }
.panel-title { margin-bottom: 13px; }
.progress-card { border-radius: 10px; padding: 12px 16px; margin-bottom: 12px; }
.progress-card > div { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 8px; }
.progress-card h3 { font-size: 17px; }
.progress-card strong { font-size: 14px; color: var(--green); }
.progress-card button { padding-bottom: 0; }
.weeks { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 10px; }
.week-card { padding: 11px 14px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.week-card.selected { border-color: #85afa0; }
.week-card h3 { font-size: 15px; }
.week-card p { margin-top: 2px; font-size: 13px; color: var(--muted); }
.week-days { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.calendar-day { min-width: 45px; font-size: 13px; }
.calendar-day.done:not(.current) { background: var(--soft); color: var(--green); }
.phases dt { font-weight: 650; margin-top: 7px; }
.phases dd { margin: 2px 0; }
.library { padding: 0 14px; }
.library .move:last-child { border-bottom: none; }
.library .dose { color: var(--muted); font-weight: 450; font-size: 13px; }
@media (max-width:800px) {
  .course-shell { padding: 0 18px 20px; }
  .cover { padding: 14px 17px; min-height: 94px; }
  .cover img { width: 108px; right: 10px; }
  .cover > div { max-width: calc(100% - 108px); }
  .cover h1 { font-size: 32px; }
  .layout { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
  .layout > * { width: 100%; }
  .profile-card { padding: 9px 13px; }
  .profile-card small { margin-top: 1px; }
  .extras { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
  .extras .profile-card[open] { grid-column: 1/-1; }
  .course-shell[data-view=workout] .extras { order: -1; }
}
@media (max-width:560px) {
  .course-toolbar { grid-template-columns: 1fr 1fr; margin-bottom: 5px; }
  .training-back { font-size: 16px; }
  .tabs { grid-column: 1/-1; grid-row: 2; gap: clamp(10px,4vw,20px); }
  .tabs button { padding: 4px 1px; font-size: clamp(15px,4.1vw,17px); }
  .course-shell :is([role=tabpanel],#builder,#features,#progress,button,summary,input,select,a) { scroll-margin-top: 98px; }
}
@media (max-width:520px) {
  .site-header .masthead { gap: 4px 8px; }
  .site-header .masthead-account .account-entry { padding-inline: 9px; }
  .course-shell { padding-inline: 12px; }
  .cover { min-height: 88px; padding: 12px 14px; }
  .cover > div { max-width: calc(100% - 78px); }
  .cover h1 { font-size: clamp(25px,7.1vw,32px); }
  .cover p { font-size: 12px; margin-top: 5px; }
  .cover i { padding: 0 1px; }
  .cover img { width: 80px; right: 2px; }
  .session { padding: 12px; }
  .session-controls { row-gap: 4px; }
  .week-switch,.day-picker { gap: 3px; }
  .week-switch span { font-size: 12px; padding: 0 2px; }
  .week-switch button,.day-picker button { min-height: 40px; }
  .day-picker button { font-size: 12px; padding: 4px 7px; }
  .move summary { grid-template-columns: 40px minmax(0,1fr) 13px; grid-template-rows: auto auto; gap: 0 9px; padding: 7px 0; }
  .move summary img { grid-row: span 2; width: 40px; height: 40px; }
  .move summary strong { font-size: 15px; align-self: end; }
  .move .dose { grid-column: 2; font-size: 12px; align-self: start; }
  .move summary::after { grid-column: 3; grid-row: 1/3; }
  .move-content { grid-template-columns: 1fr; gap: 8px; }
  .move-content img { max-width: 180px; }
  .weeks,.extras { grid-template-columns: 1fr; }
  .extras { padding: 6px; gap: 4px; }
  .extras .progress-mini { padding: 9px 13px; }
  .materials { margin-top: 12px; }
}
@media print {
  body { background: white; }
  .cover,.course-toolbar,.extras,.materials,.session-controls,.session-end,.skip-link { display: none; }
  .course-shell,.session,.layout { padding: 0; display: block; }
  .session { border: 0; }
  .move { break-inside: avoid; }
  .move-content img { max-width: 100px; }
}
