/*
 * СИЛАЧ — програма тренувань (макет 10-program). Джерело — design/v2/assets/sylach.css.
 * Підключається разом із journal.css.
 */
/* ===== Програма тренувань (v2.1) ===== */
.prog-head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; padding: 20px 0 28px; }
.prog-head h1 { font-size: clamp(32px, 4vw, 52px); letter-spacing: -.035em; line-height: 1.06; }
.prog-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.ed-meta-line { margin-top: 18px; font-size: 14px; color: var(--muted); }
.prog-cover { margin: 0; }
.prog-cover img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); }
.prog-facts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 8px 0 48px; }
.prog-facts div { background: var(--surface); padding: 16px 18px; }
.prog-facts dt { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.prog-facts dd { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 17px; line-height: 1.3; }
.period { list-style: none; margin: 0 0 40px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.period li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.period .wk { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.period b { font-family: var(--font-head); font-size: 24px; letter-spacing: -.02em; }
.period .reps { display: inline-block; align-self: flex-start; background: var(--accent); padding: 3px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 700; }
.period p { color: var(--muted); font-size: 14.5px; line-height: 1.5; flex: 1; }
.intensity { display: flex; gap: 4px; margin-top: 4px; }
.intensity i { flex: 1; height: 6px; border-radius: 3px; background: var(--divider); }
.intensity i.on { background: var(--ink); }
.sched-h { font-size: 20px; margin-bottom: 12px; }
.sched { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.sched li > a, .sched li.rest { display: flex; flex-direction: column; gap: 4px; min-height: 96px; padding: 12px; border-radius: var(--radius); text-decoration: none; }
.sched li > a { background: var(--surface); border: 1px solid var(--ink); }
.sched li > a:hover { background: var(--accent-soft); }
.sched li.rest { background: var(--paper-2); color: var(--muted); border: 1px dashed var(--divider); }
.sched .dn { font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sched b { font-size: 14.5px; line-height: 1.35; font-weight: 600; }
.sched-note { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.sched-note svg { width: 18px; height: 18px; }
.prog-toolbar { position: sticky; top: 146px; z-index: 6; background: var(--paper); padding: 10px 0; margin-bottom: 12px; }
.week-tabs2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.week-tabs2 button { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: grid; gap: 2px; min-height: 60px; }
.week-tabs2 button b { font-size: 15.5px; }
.week-tabs2 button small { color: var(--muted); font-size: 13px; }
.week-tabs2 button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.week-tabs2 button[aria-selected="true"] small { color: #C9CCC2; }
.prog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.week-intro { background: var(--paper-2); border-radius: var(--radius); padding: 14px 16px; font-size: 15px; line-height: 1.5; margin-bottom: 16px; }
.dayc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; scroll-margin-top: 230px; overflow: hidden; }
.dayc > header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.dayc .daynum { display: inline-block; background: var(--accent); font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; margin-bottom: 6px; }
.dayc h3 { font-size: 21px; }
.dayc header small { color: var(--muted); font-size: 14px; }
.dayc [data-workout] svg { width: 18px; height: 18px; }
.wk-progress { display: none; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 20px; background: #FCFCF9; border-bottom: 1px solid var(--line); }
.wk-progress .bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.wk-progress .bar i { display: block; height: 100%; width: 0; background: var(--success); transition: width .2s; }
.wk-progress small { font-size: 13.5px; font-weight: 600; }
.dayc.is-active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.dayc.is-active .wk-progress { display: grid; }
.dayc.is-active [data-workout] { background: var(--paper-2); color: var(--ink); }
.exl { list-style: none; margin: 0; padding: 0; }
.exl .grp { padding: 8px 20px; background: var(--paper); font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.exl .ex { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.exl .ex:last-child { border-bottom: 0; }
.ex-img img, .ex-img .noimg { width: 72px; height: 52px; object-fit: cover; border-radius: 4px; background: var(--paper-2); display: grid; place-items: center; color: var(--muted); }
.ex-img .noimg svg { width: 24px; height: 24px; }
.ex-main b { display: block; font-size: 16px; line-height: 1.35; font-weight: 600; }
.ex-main .tech { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; color: var(--muted); text-decoration: none; margin-top: 2px; }
.ex-main .tech svg { width: 14px; height: 14px; }
.ex-main .tech:hover { color: var(--ink); text-decoration: underline; }
.sr { font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; background: var(--paper); border-radius: 999px; padding: 6px 12px; }
.sr b { font-size: 16px; }
.sets { display: none; grid-column: 2 / -1; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
.dayc.is-active .sets { display: flex; }
.set { position: relative; cursor: pointer; }
.set input { position: absolute; opacity: 0; width: 44px; height: 44px; margin: 0; cursor: pointer; }
.set span { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--control); display: grid; place-items: center; font-weight: 700; font-size: 15px; background: #fff; }
.set input:checked + span { background: var(--success); border-color: var(--success); color: #fff; }
.set input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
.ex.is-done .ex-main b { color: var(--muted); text-decoration: line-through; }
.prog-rail { position: sticky; top: 240px; display: grid; gap: 16px; }
.prog-rail .rail-card { margin: 0; }
.prog-rail .a-row { grid-template-columns: 88px 1fr; padding: 12px 0; }
.prog-rail .a-row img { width: 88px; }
.timer { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 20px; display: grid; gap: 12px; }
.timer > b { font-size: 15px; }
.timer-face { font-family: var(--font-head); font-size: 56px; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.timer-bar { height: 6px; background: #3A3D38; border-radius: 3px; overflow: hidden; }
.timer-bar i { display: block; height: 100%; width: 100%; background: var(--accent); }
.timer-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.timer-opts button { min-height: 40px; border-radius: var(--radius-s); border: 1px solid #4A4D47; background: transparent; color: #fff; font-weight: 600; font-size: 14px; }
.timer-opts button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.timer small { color: #B9BDB2; font-size: 12.5px; line-height: 1.45; }
.timer.is-running .timer-face { color: var(--accent); }
.timer-dock { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 55; background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 12px 10px 16px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-pop); }
.timer-dock b { font-family: var(--font-head); font-size: 26px; font-variant-numeric: tabular-nums; margin-left: auto; }
.timer-dock[hidden] { display: none; }
@media (min-width: 1100px) { .timer-dock { display: none !important; } }
@media (max-width: 1099px) {
  .prog-head { grid-template-columns: 1fr; gap: 24px; }
  .prog-cover img { aspect-ratio: 16/9; }
  .prog-facts { grid-template-columns: repeat(3, 1fr); }
  .period { grid-template-columns: 1fr 1fr; }
  .sched { grid-template-columns: repeat(7, minmax(120px, 1fr)); overflow-x: auto; padding-bottom: 6px; }
  .prog-toolbar { top: 112px; }
  .week-tabs2 { grid-template-columns: repeat(4, minmax(150px, 1fr)); overflow-x: auto; }
  .prog-layout { grid-template-columns: 1fr; }
  .prog-rail { position: static; }
  .prog-rail .timer { display: none; }
}
@media (max-width: 767px) {
  .prog-facts { grid-template-columns: 1fr 1fr; }
  .prog-facts div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .period { grid-template-columns: 1fr; }
  .prog-actions .btn { flex: 1 1 100%; }
  .dayc > header { flex-wrap: wrap; padding: 16px; }
  .dayc > header .btn { width: 100%; }
  .exl .ex { grid-template-columns: 56px minmax(0, 1fr); padding: 12px 16px; }
  .ex-img img, .ex-img .noimg { width: 56px; height: 44px; }
  .sr { grid-column: 2; justify-self: start; padding: 4px 10px; font-size: 14px; }
  .sets { grid-column: 1 / -1; }
  .wk-progress { padding: 10px 16px; }
  body.is-program.workout-on { padding-bottom: 84px; }
}
@media print {
  .site-header, .site-footer, .prog-rail, .prog-toolbar, .prog-actions, .timer-dock, .read-progress, .section.white:last-of-type, .skip { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  [role="tabpanel"][hidden] { display: block !important; }
  .prog-layout { grid-template-columns: 1fr; }
  .dayc { break-inside: avoid; box-shadow: none; }
  .sets { display: none !important; }
  .ex-img { display: none; }
  .exl .ex { grid-template-columns: 1fr auto; }
}

/* ===== Тема WordPress: доповнення для програми ===== */
.prog-facts { grid-template-columns: repeat(var(--facts, 5), minmax(0, 1fr)); }
.week-tabs2 { grid-template-columns: repeat(var(--tabs, 4), minmax(0, 1fr)); }
.week-tabs2 button b { line-height: 1.3; }
.prog-days > [role="tabpanel"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: var(--radius); }
.prog-about > :not(.sched):not(.period) { max-width: 760px; }
.prog-about > :last-child { margin-bottom: 0; }
.ed-body .sched, .ed-body .period { padding: 0; margin: 8px 0 32px; list-style: none; }
.ed-body .sched li, .ed-body .period li { margin: 0; }
.ed-body .sched a { text-decoration: none; }
.ed-body .sched li > a:focus-visible { outline-offset: 2px; }
.ed-body .period p { font-size: 15px; }
.rail-note { font-size: 14.5px; margin: 0 0 4px; }
.prog-rail .rail-card { gap: 12px; }
.week-intro.ed-body { font-size: 15.5px; line-height: 1.55; }
.week-intro.ed-body > * { margin: 0 0 10px; }
.week-intro.ed-body > :last-child { margin-bottom: 0; }
.week-intro.ed-body ul, .week-intro.ed-body ol { padding-left: 22px; }
.week-intro.ed-body li { margin-bottom: 4px; }
.week-intro.ed-body h2, .week-intro.ed-body h3 { font-size: 18px; margin: 4px 0 8px; }
.sr .rest { color: var(--muted); font-size: 13.5px; }
.ex-main .tech .visually-hidden { position: absolute !important; }
.dayc [data-workout][aria-pressed="true"] { background: var(--paper-2); color: var(--ink); }
.prog-head .ed-kicker { margin-bottom: 14px; }
@media (max-width: 1099px) { .prog-facts { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } .week-tabs2 { grid-template-columns: repeat(var(--tabs, 4), minmax(150px, 1fr)); } }
@media (max-width: 767px) { .prog-facts { grid-template-columns: 1fr 1fr; } }
