:root {
  color-scheme: light;
  --paper: #f7f8f3; --white: #fff; --ink: #1d3126; --muted: #4a5d51;
  --green: #24543b; --line: #dce4da; --sage: #e8efe2; --deep: #193d2d;
  font: 100%/1.5 system-ui, -apple-system, sans-serif;
  color: var(--ink); background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1,h2,h3,p { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: var(--green); }
:focus-visible { outline: 3px solid #8a4c13; outline-offset: 4px; }
.skip { position: fixed; top: .5rem; left: .5rem; z-index: 3; background: white; padding: .65rem; transform: translateY(-160%); }
.skip:focus { transform: none; }
.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.top-inner, main, footer { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
.top-inner { min-height: 74px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .75rem; }
.brand { display: inline-flex; gap: .65rem; align-items: center; width: fit-content; color: var(--ink); text-decoration: none; font-size: 1.15rem; font-weight: 750; white-space: nowrap; }
.brand svg { width: 32px; height: 32px; }
nav { display: flex; padding: .2rem; background: #eaf0e8; border-radius: 100px; }
nav a { min-width: 90px; min-height: 44px; display: grid; place-items: center; border-radius: inherit; text-decoration: none; color: var(--muted); font-weight: 700; }
nav a[aria-current] { background: var(--green); color: white; }
.install { justify-self: end; min-height: 44px; border: 1px solid #acbbae; border-radius: 100px; padding: .45rem .85rem; background: transparent; color: var(--green); font-weight: 700; white-space: nowrap; }
.install:hover, .day:hover { background: #e0eadf; }
main { margin-block: 1.65rem 3rem; }
.hero { display: grid; grid-template-columns: 48% 52%; min-height: 360px; overflow: hidden; border-radius: 26px; background: var(--deep); color: #fff; }
.hero-copy { padding: clamp(1.65rem, 4vw, 3.2rem); align-self: center; }
h1 { font-family: Georgia, serif; font-weight: 400; letter-spacing: -.045em; font-size: clamp(3rem, 5.7vw, 5rem); line-height: .96; }
.hero-copy > p { margin-top: 1.1rem; color: #e8f0e5; max-width: 29ch; font-size: 1.075rem; }
.hero img { display: block; width: 100%; height: 100%; max-height: 470px; object-fit: cover; object-position: 54% center; }
.primary { display: inline-flex; align-items: center; margin-top: 1.3rem; min-height: 46px; padding: .55rem 1rem; border-radius: 9px; color: var(--deep); background: #e0edc9; font-weight: 750; text-decoration: none; }
.primary:hover { background: #f1f8e1; }
.layout { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(260px, 1fr); gap: 1.5rem; margin-top: 2rem; }
.section-head { margin: 0 0 1rem; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); line-height: 1.18; letter-spacing: -.03em; }
.section-head p, .day-plan > p, dd { color: var(--muted); }
.section-head p { margin-top: .33rem; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; margin-bottom: .8rem; }
.day { border: 1px solid #cad7cc; border-radius: 12px; background: #fff; color: var(--ink); padding: .5rem .1rem; min-height: 58px; line-height: 1.2; font-weight: 750; }
.day small { display: block; color: var(--muted); margin-top: .25rem; font-size: .78rem; font-weight: 550; }
.day[aria-pressed=true] { border-color: var(--green); background: var(--green); color: white; }
.day[aria-pressed=true] small { color: #e4efdf; }
.day-plan { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 1.15rem; }
.day-plan > p { margin-top: .45rem; }
.day-plan > .tip { margin-top: 1rem; padding: .75rem; background: var(--sage); border-radius: 9px; }
.exercise-list { display: grid; gap: .75rem; margin-top: 1rem; }
.exercise { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.exercise summary { min-height: 77px; display: grid; grid-template-columns: 88px 1fr auto; align-items: center; gap: .7rem; list-style: none; cursor: pointer; padding: .5rem .7rem; }
.exercise summary::-webkit-details-marker { display: none; }
.exercise summary::after { content: '+'; color: var(--green); font-size: 1.35rem; }
.exercise[open] summary::after { content: '−'; }
.exercise summary strong { display: block; line-height: 1.25; }
.exercise summary small { display: block; font-size: .875rem; color: var(--muted); margin-top: .19rem; }
.exercise-content { border-top: 1px solid var(--line); padding: .75rem 1rem; }
.exercise-content ol { padding-left: 1.35rem; margin: .25rem 0 .45rem; }
.exercise-content a, .side a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.side { display: grid; align-content: start; gap: 1rem; }
.note { padding: 1.2rem; border-radius: 18px; border: 1px solid var(--line); background: var(--sage); }
.side h2 { font-size: 1.23rem; }
.side p { margin-top: .65rem; }
.side details { margin-top: .65rem; border-top: 1px solid #c5d4c3; }
.side summary { cursor: pointer; font-weight: 750; padding: .65rem 0; min-height: 44px; }
.diet-hero { background: #243f31; }
.plate-wrap { display: grid; padding: 1.5rem; place-content: center; justify-items: center; gap: .8rem; background: #e5eddc; color: var(--ink); font-weight: 650; }
.plate { width: clamp(190px, 26vw, 265px); aspect-ratio: 1; border-radius: 50%; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; overflow: hidden; border: 9px solid #fff; gap: 3px; background: #fff; }
.plate span { display: grid; place-content: center; text-align: center; }
.veg { grid-row: span 2; background: #bcd6ac; }
.protein { background: #e5c4a2; }
.carbs { background: #efd994; }
.meal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.meal-grid article { background: #fff; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; }
.meal-grid p { margin-top: .35rem; color: var(--muted); }
footer { border-top: 1px solid var(--line); padding: .85rem 0 max(1.1rem,env(safe-area-inset-bottom)); display: flex; gap: .4rem 1.1rem; flex-wrap: wrap; color: var(--muted); }
footer span:first-child { font-weight: 750; }
dialog { width: min(430px, calc(100% - 2rem)); border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem; color: var(--ink); }
dialog::backdrop { background: #14281cb0; }
dialog form { display: flex; justify-content: flex-end; }
.close { border: 0; border-radius: 50%; background: var(--sage); width: 44px; height: 44px; color: var(--ink); font-size: 1.35rem; }
dialog ol { padding-left: 1.4rem; }
dialog li { margin-bottom: .45rem; }
#weekly-plan, #meal-ideas { scroll-margin-top: 1rem; }
@media (max-width: 760px) {
  .top-inner,main,footer { width: calc(100% - 1.5rem); }
  .layout { grid-template-columns: 1fr; gap: 1rem; margin-top: 1.4rem; }
  .hero { border-radius: 18px; }
  .hero-copy { padding: 1.25rem; }
  .hero img { object-position: 58% center; }
}
@media (max-width: 525px) {
  .top-inner { grid-template-columns: 1fr auto; padding-block: .55rem; }
  .install { grid-column: 2; grid-row: 1; }
  nav { grid-row: 2; grid-column: 1 / -1; }
  nav a { width: 50%; }
  main { margin-top: .75rem; }
  .hero { display: flex; flex-direction: column; min-height: auto; }
  .hero-copy { align-self: stretch; }
  .hero img { height: 198px; }
  .hero-copy > p { max-width: 34ch; }
  .days { gap: .22rem; }
  .day small { font-size: .68rem; }
  .day-plan { padding: .8rem; }
  .meal-grid { grid-template-columns: 1fr; }
}
@media all and (display-mode: standalone) { .install { display: none; } }
.start { margin-top: 1.1rem; padding: 0 1.1rem; background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.start summary { cursor: pointer; min-height: 48px; display: list-item; padding: .8rem 0; font-weight: 750; }
.start ol { margin: 0 0 .85rem; padding-left: 1.4rem; }
.start li + li { margin-top: .35rem; }
.library { margin-top: 1.65rem; }
#muscle-areas { display: grid; gap: .6rem; }
.area { border-radius: 13px; background: #fff; border: 1px solid var(--line); }
.area > summary, .exercise > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: .7rem; }
.area > summary::-webkit-details-marker { display:none; }
.area > summary { min-height: 64px; padding: .65rem 1rem; }
.area > summary::after { content: '+'; color: var(--green); font-size: 1.35rem; }
.area[open] > summary::after { content: '−'; }
.area > summary strong, .area > summary small { display: block; }
.area > summary small { color: var(--muted); font-size: .88rem; }
.area > .exercise-list { margin: 0; padding: 0 .65rem .65rem; }
.exercise summary { min-height: 58px; }
.exercise { scroll-margin-top: .7rem; }
.phases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.phases figure { margin: 0; }
.phases img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: #f0f2ed; border-radius: 8px; }
.phases figcaption { margin-top: .25rem; font-size: .875rem; color: var(--muted); }
.exercise-content .video { background: var(--green); color: white; border-radius: 8px; padding: 0 .75rem; margin-top: .65rem; text-decoration: none; }
.video-source { margin: .25rem 0 .65rem; font-size: .875rem; color: var(--muted); }
.move-links { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: .6rem 0 0; }
.move-links a { display: grid; place-items: center; min-height: 44px; padding: .25rem .55rem; background: var(--sage); border-radius: 8px; }
@media (max-width: 370px) { .days { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
