:root { --ink:#20242b; --ink-soft:#535b66; --muted:#858b93; --paper:rgba(255,255,255,.72); --paper-strong:#fff; --line:rgba(46,53,62,.12); --orange:#ed8b45; --orange-deep:#c9622b; --green:#28785e; --green-bg:#e7f3ec; --red:#b9453c; --red-bg:#fff0ee; --blue:#466c9d; --steel:#e8ebee; --shadow:0 18px 55px rgba(48,54,62,.10); }
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; color:var(--ink); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; background:#f0ede8; line-height:1.6; }
button, input, select, textarea { font:inherit; }
button, a { -webkit-tap-highlight-color:transparent; }
a { color:inherit; }
.ambient { position:fixed; pointer-events:none; filter:blur(2px); border-radius:50%; z-index:-1; }
.ambient-one { width:42vw; height:42vw; left:-18vw; top:10vh; background:radial-gradient(circle,rgba(255,255,255,.8),transparent 68%); }
.ambient-two { width:46vw; height:46vw; right:-18vw; bottom:-12vw; background:radial-gradient(circle,rgba(239,155,98,.27),transparent 66%); }
.topbar { height:78px; padding:0 5vw; display:flex; align-items:center; justify-content:space-between; gap:28px; position:sticky; top:0; z-index:20; background:rgba(240,237,232,.82); backdrop-filter:blur(18px); border-bottom:1px solid rgba(60,66,74,.07); }
.brand { display:flex; align-items:center; gap:10px; text-decoration:none; min-width:220px; }
.brand-mark { display:grid; place-items:center; width:34px; height:34px; border-radius:10px; color:#fff; background:linear-gradient(135deg,#252b33,#67717a); box-shadow:0 7px 15px rgba(41,47,55,.22); }
.brand strong,.brand small { display:block; line-height:1.15; }.brand strong { font-size:14px; letter-spacing:.4px; }.brand small { color:var(--muted); font-size:10px; margin-top:4px; letter-spacing:1px; }
.topnav { display:flex; gap:24px; font-size:13px; color:var(--muted); }.topnav a { text-decoration:none; padding:28px 0 25px; border-bottom:3px solid transparent; }.topnav a.active { color:var(--ink); border-color:var(--orange); font-weight:700; }
.account-chip { display:flex; align-items:center; gap:9px; font-size:13px; color:var(--ink-soft); min-width:220px; justify-content:flex-end; }.avatar { display:grid; place-items:center; width:31px; height:31px; border-radius:50%; background:#d6b79c; color:#fff; font-weight:800; }.icon-button { border:0; background:transparent; color:var(--muted); cursor:pointer; font-size:18px; }
.shell { width:min(1160px, calc(100% - 40px)); margin:0 auto; padding:50px 0 80px; }.eyebrow { color:var(--orange-deep); font-size:11px; font-weight:800; letter-spacing:2.2px; text-transform:uppercase; }.page-title { font-size:clamp(28px,4vw,46px); line-height:1.13; letter-spacing:-1.5px; margin:10px 0 12px; }.lede { color:var(--ink-soft); max-width:650px; margin:0; font-size:16px; }.page-head { display:flex; justify-content:space-between; align-items:end; gap:24px; margin-bottom:30px; }.page-head-actions { display:flex; gap:10px; flex-wrap:wrap; }
.grid { display:grid; gap:18px; }.grid-3 { grid-template-columns:repeat(3,1fr); }.grid-2 { grid-template-columns:repeat(2,1fr); }.dashboard-grid { grid-template-columns:1.45fr 1fr; align-items:start; }.card { position:relative; background:var(--paper); backdrop-filter:blur(16px); border:1px solid rgba(255,255,255,.8); border-radius:20px; box-shadow:var(--shadow); padding:26px; }.card h2,.card h3 { margin:0 0 8px; }.card h2 { font-size:19px; }.card h3 { font-size:15px; }.card p { color:var(--ink-soft); }.card-head { display:flex; justify-content:space-between; gap:18px; align-items:start; margin-bottom:18px; }.card-head p { margin:4px 0 0; font-size:13px; }.metric-card { min-height:130px; }.metric-value { font-size:32px; font-weight:850; letter-spacing:-1px; margin:12px 0 0; }.metric-label { color:var(--muted); font-size:12px; }.metric-accent { border-top:4px solid var(--orange); }.metric-green { border-top:4px solid var(--green); }.metric-blue { border-top:4px solid var(--blue); }
.btn { cursor:pointer; border:0; border-radius:10px; padding:11px 16px; font-weight:750; font-size:13px; transition:.18s; }.btn:hover { transform:translateY(-1px); }.btn-primary { color:#fff; background:linear-gradient(135deg,var(--orange-deep),var(--orange)); box-shadow:0 8px 17px rgba(201,98,43,.22); }.btn-secondary { color:var(--ink); background:rgba(255,255,255,.75); border:1px solid var(--line); }.btn-danger { color:var(--red); background:var(--red-bg); }.btn-wide { width:100%; }
.progress { display:flex; gap:7px; margin:18px 0 28px; }.progress span { height:5px; border-radius:8px; flex:1; background:#d9d7d2; }.progress span.done { background:var(--orange); }.form-card { padding:28px; }.form-section { padding:22px 0; border-top:1px solid var(--line); }.form-section:first-of-type { border-top:0; padding-top:0; }.form-section h3 { margin:0 0 4px; font-size:16px; }.form-section > p { margin:0 0 17px; color:var(--muted); font-size:12px; }.form-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }.field { display:flex; flex-direction:column; gap:7px; }.field.full { grid-column:1/-1; }.field label { font-weight:700; font-size:12px; }.required { color:var(--orange-deep); }.hint { color:var(--muted); font-size:11px; font-weight:400; }.field input,.field select,.field textarea { width:100%; border:1px solid rgba(62,68,75,.16); border-radius:10px; background:rgba(255,255,255,.75); color:var(--ink); padding:11px 12px; outline:none; }.field textarea { min-height:84px; resize:vertical; }.field input:focus,.field select:focus,.field textarea:focus { border-color:var(--orange); box-shadow:0 0 0 3px rgba(237,139,69,.13); }.check-grid { display:flex; flex-wrap:wrap; gap:9px; }.check { position:relative; }.check input { position:absolute; opacity:0; }.check span { display:block; padding:8px 12px; border:1px solid var(--line); border-radius:999px; color:var(--ink-soft); font-size:12px; cursor:pointer; background:rgba(255,255,255,.5); }.check input:checked + span { background:#fff0e6; border-color:var(--orange); color:var(--orange-deep); font-weight:700; }.form-footer { display:flex; justify-content:space-between; align-items:center; gap:18px; margin-top:24px; }.privacy-note { color:var(--muted); font-size:11px; }
.status-line { display:flex; align-items:center; gap:10px; color:var(--ink-soft); font-size:13px; }.dot { width:9px; height:9px; border-radius:50%; background:var(--green); box-shadow:0 0 0 4px var(--green-bg); }.dot.warn { background:var(--orange); box-shadow:0 0 0 4px #fff0e6; }.dot.red { background:var(--red); box-shadow:0 0 0 4px var(--red-bg); }
.hero-card { min-height:250px; display:flex; flex-direction:column; justify-content:space-between; overflow:hidden; background:linear-gradient(125deg,rgba(255,255,255,.83),rgba(241,235,226,.66)); }.hero-card:after { content:""; position:absolute; width:330px; height:330px; right:-80px; bottom:-150px; border-radius:50%; border:1px solid rgba(237,139,69,.3); box-shadow:0 0 0 22px rgba(237,139,69,.05),0 0 0 44px rgba(237,139,69,.04); }.hero-card h1 { font-size:32px; line-height:1.15; max-width:600px; margin:10px 0; letter-spacing:-1.3px; }.hero-card p { max-width:570px; }.hero-bottom { display:flex; align-items:center; justify-content:space-between; gap:20px; position:relative; z-index:1; }.mini-tags { display:flex; flex-wrap:wrap; gap:7px; }.tag,.evidence { display:inline-flex; border-radius:999px; padding:5px 9px; font-size:11px; font-weight:700; }.tag { background:rgba(255,255,255,.75); color:var(--ink-soft); border:1px solid var(--line); }.evidence.public { color:var(--green); background:var(--green-bg); }.evidence.infer { color:#a76528; background:#fff1df; }.evidence.science { color:var(--red); background:var(--red-bg); }
.session-list { display:flex; flex-direction:column; gap:10px; }.session-row { display:flex; align-items:center; gap:12px; padding:12px; border-radius:12px; background:rgba(243,241,237,.7); }.session-badge { width:40px; height:40px; display:grid; place-items:center; border-radius:11px; color:#fff; font-weight:850; font-size:12px; }.session-badge.force { background:#3f474f; }.session-badge.speed { background:#af714e; }.session-badge.recovery { background:#9ba2aa; }.session-row strong { font-size:13px; }.session-row small { display:block; color:var(--muted); font-size:11px; }.row-end { margin-left:auto; color:var(--muted); font-size:12px; }.notice { padding:14px 16px; border-left:5px solid var(--orange); background:rgba(255,242,228,.8); border-radius:0 12px 12px 0; font-size:13px; }.notice strong { display:block; margin-bottom:3px; }.notice p { margin:0; font-size:12px; }.red-notice { border-left-color:var(--red); background:var(--red-bg); }.green-notice { border-left-color:var(--green); background:var(--green-bg); }
.plan-header { background:linear-gradient(135deg,#252b33,#626b74); color:#fff; border-radius:20px; padding:30px; box-shadow:var(--shadow); }.plan-header .eyebrow { color:#f7bb86; }.plan-header h1 { margin:8px 0; font-size:32px; }.plan-header p { margin:0; color:rgba(255,255,255,.78); }.plan-meta { display:flex; flex-wrap:wrap; gap:8px; margin-top:20px; }.plan-meta .tag { background:rgba(255,255,255,.12); border-color:rgba(255,255,255,.2); color:#fff; }.section-title { display:flex; align-items:center; gap:12px; margin:32px 0 14px; font-size:20px; }.section-title:after { content:""; height:1px; flex:1; background:linear-gradient(90deg,#b9bec4,transparent); }.day-card { overflow:hidden; padding:0; }.day-title { padding:14px 20px; color:#fff; font-size:14px; font-weight:800; }.day-title.force { background:linear-gradient(135deg,#2f3740,#5b646d); }.day-title.speed { background:linear-gradient(135deg,#865c48,#c08057); }.day-title.recovery { background:linear-gradient(135deg,#777f88,#abb1b7); }.day-title.rest { background:linear-gradient(135deg,#b49d88,#d0bca7); }.day-body { padding:17px 20px; }.exercise { display:grid; grid-template-columns:1.3fr 1.4fr .7fr .7fr; gap:15px; align-items:center; padding:12px 0; border-bottom:1px solid rgba(60,66,74,.08); font-size:12px; }.exercise:last-child { border-bottom:0; }.exercise strong { font-size:13px; }.exercise small { display:block; color:var(--muted); }.exercise .evidence { font-size:9px; padding:3px 7px; margin-left:4px; }.action-link { cursor:pointer; border:0; background:none; text-align:left; padding:0; color:var(--ink); }.action-link:hover { color:var(--orange-deep); }.detail-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; }.detail-card { border-left:4px solid var(--orange); padding:18px 20px; }.detail-card h3 { font-size:15px; }.detail-card p { font-size:13px; margin:8px 0; }.detail-card .source { color:var(--muted); font-size:11px; }.feedback-list { display:flex; flex-wrap:wrap; gap:10px; }.feedback-list label { cursor:pointer; }.feedback-list input { display:none; }.feedback-list span { display:block; border:1px solid var(--line); padding:9px 12px; border-radius:10px; font-size:12px; background:rgba(255,255,255,.65); }.feedback-list input:checked + span { border-color:var(--orange); background:#fff0e6; color:var(--orange-deep); font-weight:700; }
.history-row { display:flex; align-items:center; gap:16px; padding:17px 0; border-bottom:1px solid var(--line); }.history-row:last-child { border-bottom:0; }.history-icon { width:44px; height:44px; display:grid; place-items:center; border-radius:13px; background:#e8edf1; color:var(--blue); font-size:18px; }.history-row strong { font-size:14px; }.history-row small { display:block; color:var(--muted); }.history-row .btn { margin-left:auto; }.empty { text-align:center; padding:55px 20px; color:var(--muted); }.loader { display:flex; align-items:center; gap:10px; color:var(--muted); }.spinner { width:17px; height:17px; border:2px solid #ddd; border-top-color:var(--orange); border-radius:50%; animation:spin .7s linear infinite; }@keyframes spin { to { transform:rotate(360deg); } }
.toast { position:fixed; bottom:24px; left:50%; transform:translate(-50%,20px); opacity:0; pointer-events:none; background:#252b33; color:#fff; padding:11px 16px; border-radius:10px; font-size:13px; box-shadow:0 10px 24px rgba(0,0,0,.2); transition:.25s; z-index:50; }.toast.show { opacity:1; transform:translate(-50%,0); }
.plan-loading { overflow:hidden; }
.plan-loading-overlay { position:fixed; inset:0; z-index:1000; display:grid; place-items:center; padding:16px; overflow:hidden; background:rgba(13,19,25,.72); backdrop-filter:blur(9px) saturate(.72); -webkit-backdrop-filter:blur(9px) saturate(.72); }
.plan-loading-overlay[hidden] { display:none; }
.plan-loading-card { display:flex; flex-direction:column; align-items:center; width:min(100%,340px); padding:28px 24px 25px; border:1px solid rgba(255,255,255,.82); border-radius:18px; background:rgba(255,255,255,.88); box-shadow:0 24px 70px rgba(28,33,39,.22); text-align:center; }
.plan-loading-card[hidden] { display:none; }
.plan-loading-card strong { margin-top:16px; color:var(--ink); font-size:18px; }
.plan-loading-card > span:last-child { max-width:26ch; margin-top:7px; color:var(--ink-soft); font-size:13px; line-height:1.65; }
.plan-loading-spinner { width:42px; height:42px; border:4px solid rgba(201,98,43,.18); border-top-color:var(--orange-deep); border-radius:50%; animation:plan-spinner .8s linear infinite; }
.plan-loading-ready { display:grid; place-items:center; width:42px; height:42px; border-radius:50%; background:var(--green); color:#fff; font-size:22px; font-weight:900; }
.plan-loading-card .btn { margin-top:17px; }
.generation-failure { display:flex; flex-direction:column; align-items:flex-start; gap:10px; }
.generation-failure-actions { display:flex; flex-wrap:wrap; gap:8px; }
.generation-failure-actions .btn { min-height:44px; }
@keyframes plan-spinner { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .plan-loading-spinner { animation-duration:1.8s; } }
@media (max-width:800px) { .topbar { padding:0 18px; height:68px; }.topnav { display:none; }.account-chip { min-width:auto; }.account-chip > span:last-of-type { display:none; }.shell { width:min(100% - 24px, 680px); padding-top:30px; }.page-head { align-items:start; flex-direction:column; }.grid-3,.grid-2,.dashboard-grid { grid-template-columns:1fr; }.form-grid { grid-template-columns:repeat(2,1fr); }.form-footer { align-items:stretch; flex-direction:column; }.hero-card h1 { font-size:28px; }.exercise { grid-template-columns:1.5fr 1fr; gap:6px 12px; }.exercise > div:nth-child(3),.exercise > div:nth-child(4) { font-size:11px; }.detail-grid { grid-template-columns:1fr; } }
@media (max-width:480px) { .brand { min-width:auto; }.brand strong { font-size:12px; }.card,.form-card { padding:20px 16px; }.form-grid { grid-template-columns:1fr; }.field.full { grid-column:auto; }.hero-bottom { align-items:start; flex-direction:column; }.plan-header { padding:22px 18px; }.plan-header h1 { font-size:25px; }.exercise { grid-template-columns:1fr; padding:14px 0; }.exercise > div:nth-child(3),.exercise > div:nth-child(4) { display:inline-block; margin-right:12px; }.topbar .icon-button { font-size:16px; } }
@media print { .topbar,.page-head-actions,.feedback-card,.no-print { display:none!important; }.shell { width:100%; padding:0; }.card,.plan-header,.day-card { box-shadow:none; border:1px solid #ddd; break-inside:avoid; }.ambient { display:none; } body { background:#fff; }.plan-header { color:#000; background:#fff; }.plan-header p { color:#555; } }

/* Plan readability overrides: keep long generated text from collapsing columns. */
.day-title { display:flex; align-items:center; gap:12px; }
.day-title > span { margin-left:auto; min-width:0; color:rgba(255,255,255,.78); font-size:11px; font-weight:600; text-align:right; }
.exercise { grid-template-columns:minmax(140px,1.2fr) minmax(180px,1.6fr) minmax(82px,.8fr) minmax(82px,.8fr); }
.exercise > div { min-width:0; overflow-wrap:anywhere; }
.detail-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.detail-grid.collapsed .detail-card:nth-child(n+5) { display:none; }
.detail-card { min-width:0; overflow-wrap:anywhere; }
.detail-card[hidden] { display:none; }
.detail-toggle { display:block; width:100%; min-height:52px; margin:14px auto 0; border:0; border-top:1px solid var(--line); border-radius:0 0 16px 16px; background:linear-gradient(180deg,rgba(240,237,232,.2),rgba(232,228,222,.8)); box-shadow:none; text-align:center; color:var(--ink-soft); }
.detail-toggle:hover { transform:none; color:var(--orange-deep); background:#eee7de; }
.detail-toggle:focus-visible { outline:2px solid var(--orange); outline-offset:3px; }
.detail-toggle[hidden] { display:none; }
@media (max-width:800px) { .detail-grid { grid-template-columns:minmax(0,1fr); } }
@media print { .detail-grid.collapsed .detail-card:nth-child(n+5), .detail-card[hidden] { display:block!important; } .detail-toggle { display:none!important; } }
@media (max-width:800px) { .exercise { grid-template-columns:minmax(120px,1.2fr) minmax(150px,1.6fr) minmax(70px,.8fr) minmax(70px,.8fr); gap:8px; } .day-title > span { text-align:left; } }
@media (max-width:480px) { .exercise { grid-template-columns:1fr; } .day-title { align-items:flex-start; flex-direction:column; gap:3px; } .day-title > span { margin-left:0; text-align:left; } }

/* Generated sessions use stacked, bounded text instead of narrow four-column tables. */
.plan-days { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; }
.plan-days .day-card { padding:0; min-width:0; }
.plan-days .day-title { display:flex; flex-direction:column; align-items:stretch; gap:6px; overflow-wrap:anywhere; }
.plan-days .day-title span { margin:0; text-align:left; }
.plan-days .exercise { grid-template-columns:minmax(140px,1.2fr) minmax(180px,1.8fr) minmax(82px,.8fr) minmax(82px,.8fr); gap:8px 14px; align-items:center; }
.plan-days .exercise-name,.plan-days .exercise-goal { min-width:0; }
.plan-days .exercise-goal { color:var(--ink-soft); overflow-wrap:anywhere; }
.exercise-name { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.exercise-name .evidence { white-space:nowrap; }
.warmup-note { display:flex; gap:10px; align-items:baseline; padding:11px 0 14px; margin-bottom:2px; border-bottom:1px solid var(--line); color:var(--ink-soft); font-size:13px; }
.warmup-note strong { flex:0 0 auto; color:var(--orange-deep); }
.schedule-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; max-width:680px; }
.schedule-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 10px; border:1px solid var(--line); border-radius:10px; background:rgba(255,255,255,.5); }
.schedule-minutes { display:flex; align-items:center; gap:5px; color:var(--muted); font-size:12px; }
.schedule-minutes input { width:72px; padding:7px 8px; border:1px solid var(--line); border-radius:8px; background:#fff; }
@media (max-width:480px) { .schedule-grid { grid-template-columns:1fr; } }
.changes-card,.feedback-card { margin-top:24px; }
.changes-card { padding:18px 20px; }
.changes-card h2 { margin-bottom:10px; }
.replacement-summary { display:flex; flex-wrap:wrap; gap:8px; }
.replacement-summary strong { padding:7px 10px; border:1px solid var(--line); border-radius:8px; background:#f5f3ef; color:var(--ink-soft); font-size:13px; line-height:1.5; }
.replacement-picker { border:1px solid var(--line); border-radius:12px; margin:18px 0 10px; background:rgba(255,255,255,.6); }
.replacement-picker summary { padding:14px; cursor:pointer; font-weight:700; }
.picker-tools { padding:0 14px 12px; }
.replacement-options { max-height:280px; overflow-y:auto; padding:0 14px 12px; }
.replacement-option { display:flex; align-items:start; gap:10px; padding:10px; cursor:pointer; border-top:1px solid var(--line); overflow-wrap:anywhere; }
.replacement-option input { flex:none; width:18px; height:18px; accent-color:var(--orange-deep); }
.replacement-option small { display:block; color:var(--muted); }
.replacement-option[hidden] { display:none; }
.selected-replacements { display:flex; flex-wrap:wrap; gap:8px; }
.feedback-input { margin-top:18px; }
.field-error { min-height:1.4em; color:var(--red); font-size:12px; line-height:1.4; }
.field input[aria-invalid="true"] { border-color:var(--red); box-shadow:0 0 0 3px rgba(185,69,60,.12); }
.back-to-exercise { position:fixed; z-index:90; right:max(20px,env(safe-area-inset-right)); bottom:calc(24px + env(safe-area-inset-bottom)); display:flex; align-items:center; gap:8px; min-height:44px; border:2px solid #fff; box-shadow:0 6px 24px rgba(201,98,43,.28); }
.back-to-exercise:focus-visible { outline:3px solid var(--ink); outline-offset:3px; }
#generationStatus:not(:empty) { padding:14px; margin-top:18px; background:#fff1df; border-radius:10px; overflow-wrap:anywhere; }
.btn:disabled { cursor:wait; opacity:.6; transform:none; }
@media(max-width:800px) { .plan-days { grid-template-columns:minmax(0,1fr); } .plan-days .exercise { grid-template-columns:minmax(120px,1.1fr) minmax(150px,1.7fr) minmax(72px,.8fr) minmax(72px,.8fr); } }
@media(max-width:480px) { .plan-days .exercise { grid-template-columns:1fr; } }
@media print { .plan-days { display:block; } .day-card { margin-bottom:18px; } }

/* Plan reader: bounded columns, compact spacing, readable training numbers. */
.shell:has(.plan-reader-nav) { padding-top:24px; }
.shell:has(.plan-reader-nav) .page-head { margin-bottom:16px; }
.plan-header { padding:22px 26px; border-radius:16px; }
.plan-header h1 { font-size:clamp(23px,2.5vw,30px); line-height:1.35; margin:6px 0 10px; text-wrap:balance; }
.plan-header p { width:100%; max-width:none; font-size:14px; line-height:1.7; color:#edf0f3; }
.plan-meta { margin-top:12px; }
.plan-reader-nav { display:flex; gap:5px; overflow-x:auto; position:sticky; top:0; z-index:15; padding:8px 0; margin:8px 0 16px; background:#f1eee9f5; border-bottom:1px solid var(--line); }
.plan-reader-nav button { flex:none; min-height:44px; padding:8px 13px; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--ink-soft); font:inherit; font-size:13px; cursor:pointer; }
.plan-reader-nav button:hover,.plan-reader-nav button:focus-visible { background:white; border-color:#c6b8a8; color:var(--ink); }
.plan-reader-nav button:focus-visible,.action-link:focus-visible { outline:2px solid #a44c1c; outline-offset:2px; }
.plan-reader-nav { top:78px; }
.shell:has(.plan-reader-nav) [id],.detail-card { scroll-margin-top:154px; }
.shell:has(.plan-reader-nav) .section-title { margin:22px 0 12px; font-size:18px; flex-wrap:wrap; gap:8px; }
.section-title small { font-size:12px; font-weight:400; color:#626971; }
.plan-days { gap:14px; }
.plan-days .day-title { padding:13px 16px; gap:3px; }
.plan-days .day-title span { font-size:12px; color:#f3f4f5; line-height:1.5; }
.plan-days .day-title.recovery { background:#58636b; }
.plan-days .day-title.rest { background:#77614e; }
.plan-days .day-body { padding:4px 16px 8px; }
.plan-days .exercise { grid-template-columns:minmax(140px,1.2fr) minmax(180px,1.8fr) minmax(82px,.8fr) minmax(82px,.8fr); gap:8px 14px; padding:12px 0; align-items:center; font-size:13px; line-height:1.55; }
.plan-days .exercise-name { gap:4px 8px; }
.plan-days .exercise-name strong { font-size:15px; line-height:1.5; }
.plan-days .action-link { min-height:36px; }
.plan-days .exercise .evidence { font-size:11px; margin:0; }
.plan-days .exercise-goal { font-size:12px; color:#5f6870; }
.plan-days .exercise > div:nth-child(n+3) { font-size:13px; font-weight:650; font-variant-numeric:tabular-nums; }
.plan-days .exercise small { display:block; color:#626971; font-size:11px; font-weight:400; }
.plan-days .warmup-note { display:flex; align-items:center; gap:10px; padding:11px 0; line-height:1.6; font-size:12px; }
.warmup-note strong { display:inline; margin:0; }
.detail-grid { gap:12px; align-items:stretch; }
.detail-card { display:grid; gap:12px; overflow:hidden; padding:17px 19px 15px; border:1px solid rgba(83,94,104,.13); border-top:3px solid var(--orange); border-radius:12px; box-shadow:0 8px 24px rgba(43,48,54,.07); }
.detail-card-head { display:flex; align-items:center; justify-content:space-between; gap:10px; min-width:0; }
.detail-card h3 { min-width:0; margin:0; color:var(--ink); font-size:17px; line-height:1.4; text-wrap:balance; }
.detail-purpose { display:grid; grid-template-columns:64px minmax(0,1fr); align-items:start; gap:10px; }
.detail-purpose > span,.detail-actions dt { color:#737b82; font-size:11px; font-weight:750; line-height:1.5; letter-spacing:.04em; }
.detail-purpose p { margin:0; color:#414950; font-size:13px; line-height:1.62; }
.detail-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0; }
.detail-actions > div { min-width:0; padding:9px 11px 10px; border:1px solid rgba(83,94,104,.1); border-radius:8px; background:rgba(239,238,235,.56); }
.detail-actions > div:only-child { grid-column:1/-1; }
.detail-actions dt { margin:0; }
.detail-actions dd { margin:3px 0 0; color:#444c53; font-size:13px; line-height:1.55; overflow-wrap:anywhere; }
.detail-safety { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:start; gap:9px; padding:9px 11px; border-left:3px solid var(--orange); border-radius:0 8px 8px 0; background:#fff4e8; color:#4e565d; font-size:12px; line-height:1.6; }
.detail-safety strong { color:#9b4a20; white-space:nowrap; }
.detail-source { display:flex; align-items:baseline; gap:8px; min-width:0; padding-top:9px; border-top:1px solid rgba(83,94,104,.12); color:#757d84; font-size:11px; line-height:1.5; }
.detail-source strong { flex:none; color:#555e65; }
.detail-source span { min-width:0; overflow-wrap:anywhere; }
.plan-recovery { padding:18px 20px; gap:24px; }
.plan-recovery-title { display:flex; align-items:center; gap:10px; min-height:34px; }
.plan-recovery-icon { flex:none; width:34px; height:34px; display:grid; place-items:center; border:2px solid #fff; border-radius:10px; background:linear-gradient(145deg,var(--orange-deep),var(--orange)); color:#fff; box-shadow:0 5px 12px rgba(201,98,43,.2); }
.plan-recovery-icon svg { width:21px; height:21px; }
.plan-recovery p { font-size:14px; line-height:1.7; margin:8px 0; }
@media(max-width:800px) { .plan-days { grid-template-columns:1fr; }.plan-reader-nav { top:68px; }.plan-days .exercise { grid-template-columns:minmax(120px,1.1fr) minmax(150px,1.7fr) minmax(72px,.8fr) minmax(72px,.8fr); } }
@media(max-width:480px) { .plan-header { padding:18px; }.plan-reader-nav { margin-bottom:12px; }.plan-days .day-card { padding:0; }.plan-days .exercise { grid-template-columns:1fr; }.plan-recovery { padding:16px; }.detail-card { padding:15px; }.detail-actions { grid-template-columns:1fr; }.detail-actions > div:only-child { grid-column:auto; } }
@media(prefers-reduced-motion:reduce) { .plan-reader-nav *,.detail-card,.action-link { transition:none; animation:none; } }
@media print { .plan-reader-nav { display:none!important; }.plan-header p { color:#333; }.plan-days .exercise { break-inside:avoid; }.plan-meta .tag { color:#333; border-color:#aaa; } }

/* Public legal pages and explicit consent controls. */
.site-footer { width:min(1180px,calc(100% - 40px)); margin:36px auto 0; padding:22px 0 28px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; text-align:center; }
.site-footer nav { display:flex; flex-wrap:wrap; justify-content:center; gap:10px 22px; }
.site-footer a { color:var(--ink-soft); text-decoration:none; }
.site-footer a:hover,.site-footer a:focus-visible { color:var(--orange-deep); text-decoration:underline; text-underline-offset:3px; }
.site-footer p { margin:10px 0 0; line-height:1.65; }
.auth-card { max-width:460px; margin:30px auto; }
.auth-agreements { display:grid; gap:8px; margin:0; padding:15px 16px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.52); }
.auth-agreements legend { padding:0 5px; color:var(--ink); font-size:12px; font-weight:800; }
.auth-agreements label { display:flex; align-items:flex-start; gap:10px; color:var(--ink-soft); font-size:12px; line-height:1.6; cursor:pointer; }
.auth-agreements input { flex:none; width:17px; height:17px; margin-top:1px; accent-color:var(--orange-deep); }
.auth-agreements a { color:var(--orange-deep); font-weight:700; }
.field-error:not(:empty) { display:block; color:#a13d2d; font-size:11px; line-height:1.5; }
.legal-page { max-width:820px; margin:10px auto 30px; padding:34px 40px; border:1px solid rgba(62,68,75,.1); border-radius:18px; background:rgba(255,255,255,.82); box-shadow:0 16px 50px rgba(31,36,42,.07); }
.legal-page header { padding-bottom:22px; border-bottom:1px solid var(--line); }
.legal-page h1 { margin:8px 0 10px; font-size:36px; }
.legal-page header p,.legal-page section p { color:var(--ink-soft); line-height:1.85; }
.legal-page section { padding:18px 0 2px; }
.legal-page section h2 { margin:0 0 4px; font-size:18px; }
.legal-actions { margin-top:24px; }
.pf-health-consent { display:grid; gap:13px; margin-top:22px; padding:18px; border:1px solid rgba(190,93,39,.3); border-radius:12px; background:#fff7ee; }
.pf-health-consent strong { color:var(--ink); font-size:14px; }
.pf-health-consent p { margin:5px 0 0; color:var(--ink-soft); font-size:12px; line-height:1.7; }
.pf-health-consent label { display:flex; align-items:flex-start; gap:10px; font-size:13px; font-weight:750; line-height:1.55; cursor:pointer; }
.pf-health-consent input { flex:none; width:18px; height:18px; margin-top:1px; accent-color:var(--orange-deep); }
.pf-health-consent label small { display:block; margin-top:2px; color:var(--muted); font-size:11px; font-weight:500; }
.pf-health-consent.is-recorded { border-color:rgba(55,126,89,.25); background:#f1f8f3; }
.pf-consent-recorded { display:flex; align-items:center; gap:10px; color:#2f7352; }
.pf-consent-recorded > span { flex:none; width:28px; height:28px; display:grid; place-items:center; border-radius:50%; background:#dff0e5; }
.pf-consent-recorded svg { width:18px; height:18px; }
.pf-consent-recorded strong,.pf-consent-recorded small { display:block; }
.pf-consent-recorded small { margin-top:2px; color:var(--ink-soft); font-size:11px; font-weight:500; }
@media(max-width:600px) { .site-footer { width:calc(100% - 28px); }.legal-page { padding:24px 20px; }.legal-page h1 { font-size:30px; }.auth-card { margin-top:10px; } }
@media print { .site-footer { display:none; } }

/* Action explanations: scan labels first, then read each complete instruction. */
.detail-grid { grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:1fr; }
.detail-card { display:flex; flex-direction:column; height:100%; gap:0; padding:16px 18px; border-top:1px solid var(--line); background:rgba(255,255,255,.82); border-radius:16px; }
.detail-card h3 { font-size:17px; line-height:1.4; }
.detail-card-head { margin-bottom:10px; }
.detail-icon { width:18px; height:18px; flex:none; color:#73869a; }
.detail-purpose { grid-template-columns:96px minmax(0,1fr); gap:10px; padding:4px 0 10px; }
.detail-purpose > span,.detail-actions dt,.detail-source strong,.detail-safety strong { display:flex; align-items:center; gap:8px; font-size:13px; line-height:1.6; font-weight:650; letter-spacing:0; }
.detail-purpose > span,.detail-actions dt { color:var(--ink-soft); }
.detail-purpose p,.detail-actions dd { font-size:13px; line-height:1.65; color:var(--ink-soft); overflow-wrap:anywhere; }
.detail-actions { grid-template-columns:1fr; gap:8px; padding:10px 0; border-top:1px solid var(--line); }
.detail-actions > div { display:grid; grid-template-columns:96px minmax(0,1fr); align-items:start; gap:10px; padding:0; border:0; border-radius:0; background:transparent; }
.detail-actions > div + div { padding:0; border:0; }
.detail-actions > div:last-child { padding-bottom:0; }
.detail-actions dd { margin:0; }
.detail-safety { grid-template-columns:68px minmax(0,1fr); padding:8px 10px; gap:10px; margin-bottom:8px; font-size:13px; line-height:1.65; background:#fff5e9; }
.detail-safety strong,.detail-safety .detail-icon { color:#ad501f; }
.detail-source { margin-top:auto; padding-top:8px; align-items:flex-start; gap:10px; border-top:1px solid rgba(83,94,104,.12); font-size:12px; line-height:1.6; color:#626971; }
.detail-source strong { font-size:12px; }
@media(max-width:800px) {
  .detail-grid { grid-template-columns:1fr; grid-auto-rows:auto; }
  .detail-actions { grid-template-columns:1fr; gap:8px; }
  .detail-actions > div,.detail-actions > div + div { padding:0; border:0; }
}
@media(max-width:480px) {
  .detail-card { padding:15px 16px; }
  .detail-card h3 { font-size:17px; }
  .detail-purpose,.detail-actions > div { grid-template-columns:1fr; gap:6px; }
  .detail-safety { grid-template-columns:1fr; gap:5px; padding:8px 10px; }
  .detail-purpose p,.detail-actions dd,.detail-safety { font-size:13px; }
}
/* Training-plan palette: alternate the existing black/terracotta rhythm by session type. */
.plan-days .day-title.force,.plan-days .day-title.recovery { background:linear-gradient(135deg,#35414b,#626b74); }
.plan-days .day-title.speed,.plan-days .day-title.rest { background:linear-gradient(135deg,#865c48,#c08057); }

/* Keep secondary plan assumptions available without interrupting the main reading flow. */
.plan-caveats { padding:0; overflow:hidden; }
.plan-caveats summary { display:flex; align-items:center; gap:12px; min-height:64px; padding:16px 20px; cursor:pointer; list-style:none; }
.plan-caveats summary::-webkit-details-marker { display:none; }
.plan-caveats summary:focus-visible { outline:2px solid var(--orange); outline-offset:-4px; border-radius:16px; }
.plan-caveats-title { color:var(--ink); font-size:18px; font-weight:800; }
.plan-caveats-count { margin-left:auto; padding:3px 9px; border-radius:999px; background:#f2eee8; color:var(--muted); font-size:12px; font-weight:650; }
.plan-caveats summary::after { content:''; flex:none; width:9px; height:9px; margin:0 3px 4px 2px; border-right:2px solid #626971; border-bottom:2px solid #626971; transform:rotate(45deg); transition:transform .18s ease; }
.plan-caveats[open] summary::after { margin-bottom:-4px; transform:rotate(225deg); }
.plan-caveats-body { padding:2px 20px 18px; border-top:1px solid var(--line); }
.plan-caveats-body ul { display:grid; gap:10px; margin:14px 0 0; padding-left:20px; }
.plan-caveats-body li { padding-left:3px; color:var(--ink-soft); font-size:14px; line-height:1.75; }
@media(max-width:480px) {
  .plan-caveats summary { min-height:58px; padding:14px 16px; }
  .plan-caveats-title { font-size:17px; }
  .plan-caveats-body { padding:2px 16px 16px; }
}
@media(prefers-reduced-motion:reduce) { .plan-caveats summary::after { transition:none; } }
@media print { .plan-caveats:not([open]) > .plan-caveats-body { display:block; } }
.analytics-notice{position:fixed;z-index:1000;left:20px;right:20px;bottom:20px;max-width:1060px;margin:auto;padding:18px 20px;border:1px solid var(--line,#ddd);border-radius:16px;background:var(--surface,#fff);box-shadow:0 12px 45px #0002;display:flex;align-items:center;justify-content:space-between;gap:20px}.analytics-notice[hidden]{display:none}.analytics-notice p{margin:5px 0 0;color:var(--muted);font-size:13px;line-height:1.5}.analytics-notice-actions{display:flex;gap:10px;flex-shrink:0}@media(max-width:700px){.analytics-notice{left:12px;right:12px;bottom:12px;display:block}.analytics-notice-actions{margin-top:12px}.analytics-notice-actions .btn{flex:1}}
