:root {
  color-scheme: dark;
  --ink: #0a0a0a;
  --card: #141414;
  --surface: #202020;
  --line: #353535;
  --chalk: #fff;
  --muted: #b3b3b7;
  --blue: #2340ff;
  --blue-soft: #9faeff;
  font: 100%/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
* {box-sizing:border-box}
body {margin:0;background:var(--ink);color:var(--chalk)}
button,input,select {font:inherit}
button {cursor:pointer;border:0;color:inherit;background:transparent}
button:disabled {opacity:.36;cursor:default}
button:not(:disabled):active {filter:brightness(.82)}
:focus-visible {outline:3px solid #9aaaff;outline-offset:3px}
[hidden] {display:none!important}
header {position:sticky;top:0;z-index:3;background:rgba(10,10,10,.9);border-bottom:1px solid var(--line);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}
.toolbar,main {max-width:1440px;margin:auto;padding-inline:clamp(16px,5vw,76px)}
.toolbar,.row,.flex,.actions,.facts,.meta,.btn,.detailhead,.user {display:flex;align-items:center}
.toolbar {height:74px;gap:36px}
.brand {width:75px;height:48px;object-fit:contain}
nav {display:flex;gap:3px;background:#1c1c1e;border:1px solid #303033;border-radius:28px;padding:2px}
nav button,.btn {min-height:44px;font-size:.9rem;font-weight:600}
nav button {border-radius:24px;color:var(--muted);padding:0 17px}
nav .active {background:#363638;color:white}
.user {margin-left:auto;color:#c1c1c5;font-size:.88rem}
main {padding-top:25px;padding-bottom:max(48px,env(safe-area-inset-bottom))}
.hero {position:relative;isolation:isolate;overflow:hidden;background:var(--blue);border-radius:22px;min-height:225px;padding:clamp(22px,3vw,44px);display:flex;flex-direction:column;justify-content:center}
.hero-photo {position:absolute;z-index:-1;inset:0 0 0 49%;background:linear-gradient(90deg,rgba(0,0,0,.18),transparent 30%),url(deadlift.avif) 50% 48%/cover;clip-path:polygon(12% 0,100% 0,100% 100%,0 100%)}
.hero h1 {max-width:50%;margin:.14em 0 .32em;font-size:clamp(2.7rem,4.9vw,5.2rem);letter-spacing:-.066em;line-height:.98;font-weight:760;overflow-wrap:anywhere}
.eyebrow,th {font-size:.75rem;letter-spacing:.09em;font-weight:650;text-transform:uppercase;color:var(--muted)}
.hero .eyebrow {color:#e3e6ff}
.facts,.meta {gap:6px 16px;flex-wrap:wrap}
.facts {max-width:49%;font-size:.875rem}
.facts span,.meta span {display:inline-flex;gap:6px;align-items:center}
.ico {width:17px;height:17px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
h2,h3,p {margin:0}
h2 {font-size:clamp(1.65rem,2.35vw,2.3rem);letter-spacing:-.045em;line-height:1.15}
h3 {letter-spacing:-.035em}
.row {justify-content:space-between;gap:14px}
.section {margin:29px 0 15px}
.actions,.flex,.btn {gap:8px}
.actions {flex-wrap:wrap}
.btn,.arrow {border:1px solid var(--line);background:var(--surface);border-radius:24px}
.btn {gap:7px;padding:8px 15px;justify-content:center}
.primary {background:var(--blue);border-color:var(--blue)}
.arrow {width:44px;height:44px;display:grid;place-items:center;flex-shrink:0}
.weekbar {margin-bottom:12px}
.weekbar .arrow {background:none;border-color:transparent}
.weekbar .flex {margin-left:-10px;gap:1px}
.quiet,.meta,.day small,.planrow small {color:var(--muted);font-size:.875rem}
.days {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.day {position:relative;min-width:0;min-height:133px;padding:14px;text-align:left;background:var(--card);border:1px solid var(--line);border-radius:15px;display:flex;flex-direction:column;align-items:flex-start}
.day.selected {background:#1b2142;border:2px solid #7186ff;padding:13px}
.day.selected:after {content:"✓";color:white;background:var(--blue);position:absolute;right:10px;top:12px;width:17px;height:17px;border-radius:50%;font-size:12px;line-height:17px;text-align:center}
.daynum {font-size:1.9rem;line-height:1.1;letter-spacing:-.05em;margin:3px 0 15px}
.dayname {font-size:.93rem;font-weight:650;overflow-wrap:anywhere}
.day small {font-size:.78rem;margin-top:2px}
.rest {background:#101010}.rest .dayname {color:#aaa;font-weight:450}
.detail,.planrow {background:var(--card);border:1px solid var(--line);border-radius:18px;overflow:hidden}
.detail {margin-top:20px}
.detailhead {padding:21px 24px;gap:14px}
.tile {width:46px;height:46px;border-radius:14px;color:var(--blue-soft);background:#212745;display:grid;place-items:center}
.tile .ico {width:24px;height:24px}
.detail h3 {font-size:1.55rem;margin:.04em 0}
.detailhead .actions {margin-left:auto}
.tablewrap {overflow-x:auto}
table {width:100%;border-collapse:collapse;text-align:left;font-size:.94rem;font-variant-numeric:tabular-nums}
td,th {padding:12px 15px;border-top:1px solid #292929}
th {background:#191919}
td:first-child,th:first-child {padding-left:24px}
td:first-child {font-weight:600}
.gain {color:var(--blue-soft);white-space:nowrap}
.empty,.planrow {padding:20px}.planrow {margin:12px 0}.planrow small {display:block}
dialog {width:min(760px,95vw);max-height:88dvh;background:#191919;border:1px solid #474747;color:white;border-radius:24px;padding:25px}
dialog::backdrop {background:#000a}
form,label {display:grid}
form {gap:16px;margin-top:20px}
label {font-size:.9rem;font-weight:550;gap:5px}
input,select {width:100%;min-width:0;min-height:44px;padding:8px 10px;border-radius:10px;border:1px solid #56565a;color:white;background:#242424;font-size:1rem}
.grid,.exercise {display:grid;gap:10px}.grid {grid-template-columns:1fr 1fr}
.exercise {grid-template-columns:2fr repeat(4,1fr) auto;align-items:end;border-top:1px solid var(--line);padding:12px 0}
.exercise label {font-size:.8rem}
#notice {display:none;position:fixed;z-index:6;bottom:24px;left:50%;transform:translateX(-50%);background:white;color:black;padding:12px 18px;border-radius:14px}
@media(hover:hover){button:not(:disabled):hover {filter:brightness(1.16)}}
@media(prefers-reduced-transparency:reduce){header {background:var(--ink);backdrop-filter:none}}
@media(max-width:780px){
  .toolbar {gap:14px}.user {font-size:.76rem;white-space:nowrap}
  .day {padding:10px 7px}.day.selected {padding:9px 6px}
  .dayname {font-size:.81rem}.facts {gap:5px 10px}
}
@media(max-width:620px){
  .toolbar {height:65px;justify-content:space-between;padding-inline:14px}
  .brand {width:59px;height:39px}nav button {padding:0 11px;font-size:.81rem}
  main {padding-top:15px}.hero {min-height:208px;padding:20px;border-radius:18px}
  .hero-photo {inset:0 0 0 54%}.hero h1 {font-size:clamp(2rem,8.8vw,3.3rem);max-width:59%}
  .hero .facts {max-width:55%;font-size:.8rem;gap:4px 9px}
  .section {align-items:flex-start;flex-wrap:wrap;gap:12px;margin-top:23px}
  .section .actions {width:100%}.section .actions .btn {flex:auto}
  .days {display:flex;overflow-x:auto;scroll-snap-type:x proximity;padding:3px 2px 7px}
  .day {flex:0 0 102px;scroll-snap-align:center;min-height:125px}
  .weekbar {gap:3px}.weekbar strong,.quiet {font-size:.83rem}
  .detailhead {padding:16px;gap:9px;flex-wrap:wrap}.detailhead .tile {display:none}.detail h3 {font-size:1.3rem}
  .detailhead .meta {font-size:.8rem;gap:8px}
  th,td {padding:10px 6px;font-size:.8rem}th {font-size:.65rem;letter-spacing:0}
  td:first-child,th:first-child {padding-left:12px}
  .btn {padding:8px 12px}
  dialog {width:100%;max-width:none;max-height:93dvh;margin:auto 0 0;border-radius:20px 20px 0 0;padding:18px 16px max(22px,env(safe-area-inset-bottom))}
  dialog h2 {font-size:1.4rem}
  .exercise {grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:5px}
  .exercise label:first-child {grid-column:1/-1}
}

.burger {font-size:1.25rem;margin-left:-18px}
.access-card {max-width:500px;margin:8vh auto;padding:28px;border:1px solid var(--line);border-radius:20px;background:var(--card)}
.access-card h1 {margin:.4em 0;font-size:2rem;letter-spacing:-.05em}
.access-card p, form small, .profile dt, .account-line small {color:var(--muted)}
.menu-items {display:grid;gap:9px}.account-line {display:flex;align-items:center;justify-content:space-between;padding:16px 0;gap:12px;border-bottom:1px solid var(--line)}
.account-line small {display:block}.account-list,.account-line,.profile {margin-bottom:16px}.profile dd {margin:3px 0 16px}
.review-group {padding:12px 0;border-bottom:1px solid var(--line)}.review-group div,.review-group small {font-size:.9rem;color:var(--muted)}.review-group small {margin-left:10px}
#review p,details p {margin:10px 0}a {color:var(--blue-soft)}summary {cursor:pointer}.error {color:#ffadb2}.error:empty {display:none}.check {display:flex;align-items:center}.check input {width:20px}
@media(max-width:780px){.burger {margin-left:auto}}
@media(max-width:440px){.toolbar {gap:5px;padding-inline:8px}.toolbar nav button {padding:0 8px}.toolbar .brand {width:46px}.burger {margin-left:0}}
.original td {white-space:pre-line;vertical-align:top}
.original th,.original td {min-width:4rem}
#original-editor fieldset {border:1px solid var(--line);border-radius:12px}
#original-editor textarea {background:var(--surface);color:var(--chalk);font:inherit;min-height:46px;border:1px solid var(--line);border-radius:8px;padding:8px;resize:vertical}

.athlete-phone {--gutter:clamp(12px,4vw,22px)}
.athlete-phone header {padding-top:env(safe-area-inset-top);background:var(--ink)}
.athlete-phone .toolbar {height:58px;padding-inline:max(var(--gutter),env(safe-area-inset-left)) max(var(--gutter),env(safe-area-inset-right))}
.athlete-phone .brand {width:54px;height:35px}
.athlete-phone nav {display:none}
.athlete-phone .burger {margin-left:0;width:44px;height:44px;font-size:0;background:var(--card)}
.athlete-phone .burger::before {content:"";width:17px;height:8px;border-block:2px solid #fff}
.athlete-phone main {padding:18px max(var(--gutter),env(safe-area-inset-right)) max(36px,env(safe-area-inset-bottom)) max(var(--gutter),env(safe-area-inset-left))}
.athlete-phone.has-complete main {padding-bottom:calc(105px + env(safe-area-inset-bottom))}
.phone-heading {margin:0;font-size:2.2rem;line-height:1.12;letter-spacing:-.06em}
.phone-week .row {margin:4px 0 3px}
.phone-week .row>strong {font-size:1rem;font-weight:590;color:#d3d3d8}
.phone-week .actions {gap:0;margin-right:-8px}
.phone-week .arrow {border:0;background:transparent}
.date-strip {display:grid;grid-template-columns:repeat(7,minmax(44px,1fr));gap:3px;overflow:auto;padding:3px 0}
.date-key {display:grid;justify-items:center;align-content:center;min-height:70px;border:1px solid transparent;border-radius:16px;background:var(--card);line-height:1.1;color:#c6c6ca}
.date-key span {font-size:.8rem}
.date-key strong {font-size:1.28rem;color:white;margin-top:3px;font-variant-numeric:tabular-nums}
.date-key i {font:normal .86rem/9px system-ui;height:9px;margin-top:2px;color:#a4b0ff}
.date-key[aria-pressed=true] {background:var(--blue);border-color:#7485ff;color:white}
.date-key[aria-pressed=true] i {color:white}
.session-cover {isolation:isolate;position:relative;overflow:hidden;border-radius:18px;background:#151841;display:flex;align-items:flex-end;min-height:155px;margin:15px 0 0}
.session-cover:before {content:"";position:absolute;z-index:-1;inset:0;background:linear-gradient(90deg,#1525a8 0%,rgba(24,36,147,.88) 34%,rgba(0,0,0,.14) 78%),linear-gradient(0deg,rgba(0,0,0,.55),transparent 80%),url(deadlift.avif) center 44%/cover}
.cover-copy {padding:18px;max-width:94%;text-shadow:0 1px 8px #0005}
.cover-copy .eyebrow {color:#eef0ff;font-size:.77rem}
.cover-copy h2 {font-size:clamp(1.9rem,8.3vw,2.85rem);line-height:1.05;letter-spacing:-.055em;margin:.22em 0;overflow-wrap:anywhere}
.cover-copy p {display:flex;align-items:center;gap:6px;font-size:.87rem;color:#eceeff}
.routine-title {font-size:1.4rem;margin:21px 0 10px}
.move-list {padding:0;margin:0;border-radius:17px;background:var(--card);border:1px solid #303033;list-style:none}
.move-list li {padding:15px 16px}.move-list li+li {border-top:1px solid #2b2b2d}
.move-title {display:flex;gap:10px;align-items:baseline}
.move-title span {font-size:.8rem;font-weight:680;border-radius:7px;background:#252d55;color:#c8d0ff;padding:3px 7px;flex:none}
.move-title h3 {font-size:1.1rem;line-height:1.35;overflow-wrap:anywhere;white-space:pre-line}
.move-list dl {display:flex;flex-wrap:wrap;gap:4px 22px;margin:8px 0 0}
.move-list dl div {display:flex;flex-direction:column-reverse}
.move-list dt {color:var(--muted);font-size:.8rem}
.move-list dd {font-size:1rem;font-weight:610;margin:0;white-space:pre-line}
.move-list p,.phone-notes p {white-space:pre-line;overflow-wrap:anywhere;color:#c5c5ca;margin-top:9px}
.phone-complete {position:fixed;z-index:2;bottom:0;left:0;right:0;padding:9px max(var(--gutter),env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(var(--gutter),env(safe-area-inset-left));border-top:1px solid #363638;background:rgba(15,15,17,.96);backdrop-filter:blur(14px)}
.phone-complete .btn,.inline-complete .btn {width:100%;min-height:48px;font-size:1rem}
.inline-complete,.phone-notes {margin-top:16px}.phone-notes summary {padding:12px 0;min-height:44px;font-weight:600}
.athlete-phone #notice {bottom:calc(78px + env(safe-area-inset-bottom))}
@media(prefers-reduced-transparency:reduce){.phone-complete {background:#101010;backdrop-filter:none}}

.plan-summary {margin:0 0 18px;color:var(--muted);line-height:1.6}
@media(max-width:500px){.toolbar {gap:6px}.toolbar nav button {padding-inline:5px;font-size:.73rem}.toolbar .brand {width:48px}}
