/* Routine landing pages. Tokens, topbar and footer copied from
   landing/index.html so these read as the same site. Saffron is the accent,
   as on the homepage; terracotta is not used here. */
:root {
  --bg: #0E0C0A;
  --bg2: #14110E;
  --bg3: #1C1813;
  --surface: rgba(255, 247, 230, 0.04);
  --hairline: rgba(249, 244, 232, 0.10);
  --hairline-strong: rgba(249, 244, 232, 0.18);
  --cream: #F9F4E8;
  --cream-dim: rgba(249, 244, 232, 0.78);
  --cream-mute: rgba(249, 244, 232, 0.55);
  --cream-faint: rgba(249, 244, 232, 0.40);
  --saffron: #F4A93D;
  --font-display: 'Fraunces', Georgia, serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-num: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--saffron); outline-offset: 2px; border-radius: 6px;
}
.mute { color: var(--cream-mute); }
.small { font-size: 13.5px; }
.num { font-family: var(--font-num); font-weight: 500; }
.dot-sep {
  display: inline-block; width: 3px; height: 3px; border-radius: 999px;
  background: var(--cream-faint); margin: 0 9px; vertical-align: middle;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* ---------- topbar (homepage) ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 4px 6px;
}
.wordmark {
  font-family: var(--font-display); font-weight: 800; font-size: 16px;
  letter-spacing: 0.16em; color: var(--cream); text-decoration: none;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 11px 7px 9px; border-radius: 999px; text-decoration: none;
  background: rgba(244, 169, 61, 0.16); color: var(--saffron);
  border: 1px solid rgba(244, 169, 61, 0.40);
  font-weight: 800; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; line-height: 1;
}
.status-pill .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--saffron); }
.topbar-nav { display: flex; align-items: center; gap: 36px; }
.topbar-link { color: var(--cream); text-decoration: none; font-weight: 600; font-size: 14px; }
.topbar-link:hover { color: var(--saffron); }
@media (max-width: 420px) { .topbar-nav .status-pill { display: none; } }

.crumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; font-size: 13px; color: var(--cream-mute); }
.crumbs a { color: var(--cream-mute); }

/* ---------- hero ---------- */
.hero { padding: 18px 0 0; }
.kicker {
  margin: 0 0 10px; font-weight: 700; font-size: 11px;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--saffron);
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
h1 { font-size: clamp(34px, 5.5vw, 52px); margin: 0; letter-spacing: -0.03em; text-wrap: balance; }
h2 { font-size: 24px; margin: 0 0 16px; }
h3 { font-size: 17px; margin: 0; }
h4 { font-size: 14px; margin: 0; font-weight: 600; }
.attrs { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--cream-dim); font-size: 15px; }
.attrs li { display: inline-flex; align-items: center; gap: 8px; }
.attrs svg { color: var(--saffron); flex: 0 0 auto; }
.updated { margin: 12px 0 0; font-size: 13px; color: var(--cream-mute); }
.lead { margin: 14px 0 0; color: var(--cream-dim); font-size: 17px; max-width: 40em; }

/* hero photo (AI-generated from a text prompt; never a GymVisual frame) */
/* Shown at the photo's own 16:9 so nothing is cropped: the subjects run
   edge to edge (hands at the top, feet at the bottom), so any tighter ratio
   cuts something off on some page. */
.hero-img { margin: 24px 0 0; border-radius: 18px; overflow: hidden; background: var(--bg3); aspect-ratio: 16 / 9; }
.hero-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 720px) { .hero-img { border-radius: 14px; } }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.text-link { color: var(--cream); text-underline-offset: 3px; }
.text-link:hover { color: var(--saffron); }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
@media (min-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 72px; }
  .side { padding-top: 32px; }
  .side-card { position: sticky; top: 24px; }
}
main { min-width: 0; }

.block { padding: 32px 0; border-top: 1px solid var(--hairline); }
.block.first { margin-top: 24px; }
.block p { margin: 0 0 10px; color: var(--cream-dim); max-width: 42em; }
.block p:last-child { margin-bottom: 0; }
.lead-sm { margin-bottom: 18px !important; }
.sub { font-family: var(--font-ui); font-size: 15px; font-weight: 600; letter-spacing: 0; margin: 18px 0 8px; }
.sub:first-of-type { margin-top: 0; }

/* week */
.sched + .sched { margin-top: 18px; }
.sched-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.sched-head p { margin: 0; font-size: 13.5px; }
.sched-head h3 { font-family: var(--font-ui); font-size: 14px; font-weight: 600; letter-spacing: 0; }
.week { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 560px; }
.week li { border-radius: 10px; padding: 7px 2px; text-align: center; min-width: 0; }
.week .train { background: rgba(244, 169, 61, 0.14); border: 1px solid rgba(244, 169, 61, 0.38); }
.week .rest { border: 1px solid var(--hairline); color: var(--cream-faint); }
.week .wd { display: block; font-size: 10px; letter-spacing: 0.1em; color: var(--cream-mute); }
.week .wl { display: block; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.week .rest .wl { font-weight: 500; }

/* health note */
.health {
  border: 1px solid var(--hairline-strong); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 22px; background: var(--surface);
}
.health p { font-size: 14px; margin: 0 0 4px; }
.health .health-kicker {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--cream-mute); margin-bottom: 6px;
}

/* day tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--hairline); margin-bottom: 6px; }
.tabs button {
  border: 0; background: none; cursor: pointer; padding: 10px 14px 12px;
  font-weight: 600; font-size: 15px; color: var(--cream-mute);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--cream); border-bottom-color: var(--saffron); }
.js-tabs .day[hidden] { display: none; }
.day + .day { margin-top: 28px; }
.js-tabs .day + .day { margin-top: 0; }
.day-meta { font-size: 13.5px; color: var(--cream-mute) !important; margin: 12px 0 4px !important; }

.aside-line { padding: 8px 0; font-size: 14px; color: var(--cream-mute); }
.aside-line summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.aside-line summary::-webkit-details-marker { display: none; }
.aside-line .show { color: var(--cream-dim); text-decoration: underline; text-underline-offset: 3px; }
.aside-line[open] .show { visibility: hidden; }
.dose-list { list-style: none; margin: 8px 0 2px; padding: 0; }
.dose-list li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; color: var(--cream-dim); }
.dose-list .num { font-size: 12px; color: var(--cream-mute); text-align: right; white-space: nowrap; }

/* exercise rows */
.ex-list { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 18px; }
.ex { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; }
.ex-media {
  position: relative; display: block; padding: 0; border: 0; cursor: zoom-in;
  aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #fff; align-self: start;
}
.ex-media video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.expand {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 999px;
  display: grid; place-items: center; background: rgba(14, 12, 10, 0.72); color: var(--cream);
  transition: transform 140ms ease;
}
.ex-media:hover .expand { transform: scale(1.08); }
.ex-top { display: flex; align-items: baseline; gap: 8px; }
.ex-name { font-family: var(--font-ui); font-size: 15.5px; font-weight: 600; letter-spacing: 0; margin: 0; line-height: 1.3; }
.ex-num { font-family: var(--font-num); font-size: 12px; color: var(--saffron); }
.ex-dose { margin: 4px 0 0 !important; font-size: 14px; color: var(--cream-mute) !important; }
.ex-dose strong { color: var(--cream); font-weight: 600; }
.ex-how { margin-top: 6px; font-size: 14px; }
.ex-how summary { cursor: pointer; color: var(--cream-dim); }
.ex-how ol { margin: 6px 0 0; padding-left: 18px; color: var(--cream-dim); font-size: 14px; }
.ex-how li + li { margin-top: 3px; }

.plain { margin: 0; padding-left: 20px; color: var(--cream-dim); max-width: 42em; }
.plain li + li { margin-top: 6px; }

.swaps { margin: 0; }
.swaps div { display: grid; grid-template-columns: 34% 1fr; gap: 16px; padding: 7px 0; }
.swaps dt { font-weight: 600; font-size: 14.5px; }
.swaps dd { margin: 0; color: var(--cream-dim); font-size: 14.5px; }

.compact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 12px; }
.compact-day { border: 1px solid var(--hairline); border-radius: 14px; padding: 14px 16px; }
.compact-day h3 { font-family: var(--font-ui); font-size: 14px; font-weight: 600; letter-spacing: 0; margin-bottom: 6px; }
.compact { width: 100%; border-collapse: collapse; }
.compact td { padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--hairline); color: var(--cream-dim); }
.compact td.num { text-align: right; white-space: nowrap; padding-left: 10px; font-size: 12px; color: var(--cream-mute); }
.compact tr:last-child td { border-bottom: 0; }

.faq details { border-bottom: 1px solid var(--hairline); padding: 12px 0; }
.faq details:first-child { padding-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.faq p { margin: 8px 0 0; }

.built { font-size: 14px; }
.sources { margin: 14px 0 0; padding-left: 20px; }
.sources li { font-size: 14px; color: var(--cream-dim); }
.sources li + li { margin-top: 12px; }
.sources li::marker { font-family: var(--font-num); color: var(--cream-mute); font-size: 12px; }
.sources p { margin: 0; font-size: 14px; }
.sources .cite { margin-top: 3px; font-size: 12.5px; }
.sources .cite a { color: var(--cream-mute); text-underline-offset: 3px; }
.sources .cite a:hover { color: var(--cream); }

/* routine cards (More routines, hubs) */
.cards { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 22px 18px; }
.cards-3 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.cards-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-top: 22px; }
.card[hidden] { display: none; }
.card a { display: block; text-decoration: none; color: inherit; }
.card-img { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--bg3); }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 300ms ease; }
.card a:hover .card-img img { transform: scale(1.03); }
.card-title { font-family: var(--font-ui); font-size: 15.5px; font-weight: 600; letter-spacing: 0; line-height: 1.3; margin: 10px 0 0; }
.card a:hover .card-title { color: var(--saffron); }
.card-meta { margin: 3px 0 0 !important; font-size: 13px; color: var(--cream-mute) !important; }

/* hubs */
.hub-hero { padding-bottom: 6px; }
.hub-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.hub-nav a, .chip, .select select {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--hairline-strong); background: transparent; color: var(--cream-dim);
  font-size: 13.5px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.hub-nav a:hover, .chip:hover { color: var(--cream); border-color: var(--cream-faint); }
.hub-nav a[aria-current="page"], .chip[aria-pressed="true"] { border-color: var(--saffron); color: var(--saffron); background: rgba(244, 169, 61, 0.10); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--hairline); }
.select select { appearance: none; -webkit-appearance: none; padding-right: 32px; font-family: inherit;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23F9F4E8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
.select select option { background: var(--bg2); color: var(--cream); }
.filter-count { margin: 0 0 0 auto; }
.filter-empty { margin: 22px 0 0; }
.hub-app { margin-top: 40px; }
.hub-app p { color: var(--cream-dim); max-width: 40em; }

/* comparison table */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.compare { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 520px; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 11px 12px; border-bottom: 1px solid var(--hairline); }
.compare thead th { font-family: var(--font-ui); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cream-mute); }
.compare thead th:nth-child(2) { color: var(--saffron); }
.compare tbody th { font-weight: 600; width: 26%; }
.compare td { color: var(--cream-dim); }

/* side card (homepage Pro card styling) */
.side { padding-bottom: 40px; }
.side-card {
  border-radius: 22px; padding: 26px 24px;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(244, 169, 61, 0.10) 0%, transparent 60%), rgba(255, 247, 230, 0.05);
  border: 1px solid rgba(244, 169, 61, 0.34);
}
.side-card h2 { font-size: 24px; margin-bottom: 10px; }
.side-card p { color: var(--cream-dim); font-size: 14.5px; margin: 0 0 10px; }
.side-card .where { color: var(--cream-mute); font-size: 13.5px; }
.side-card .where strong { color: var(--cream-dim); }
.badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.store-badge { display: inline-block; transition: transform 140ms ease, opacity 140ms ease; }
.store-badge:hover { transform: translateY(-1px); opacity: 0.88; }
.store-badge img { display: block; height: 44px; width: auto; }

/* ---------- footer (homepage) ---------- */
.footer { padding: 28px 22px 32px; border-top: 1px solid var(--hairline); background: var(--bg); }
.footer-inner {
  max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center;
  gap: 18px; color: var(--cream-mute); font-size: 12.5px; letter-spacing: 0.04em;
}
.footer-inner a { color: var(--cream-dim); text-decoration: none; font-weight: 500; }
.footer-inner a:hover { color: var(--cream); }
.ig-link { display: inline-flex; align-items: center; gap: 6px; }
.footer .dot-sep { margin: 0 8px; }

/* ---------- lightbox ---------- */
.lightbox {
  border: 0; padding: 0; background: transparent; color: var(--cream);
  width: min(960px, calc(100vw - 32px)); max-width: none;
}
.lightbox::backdrop { background: rgba(8, 7, 6, 0.86); }
.lightbox-inner { background: var(--bg2); border: 1px solid var(--hairline-strong); border-radius: 16px; overflow: hidden; }
.lightbox-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 18px; }
.lightbox-title { margin: 0; font-weight: 600; font-size: 15px; }
.lightbox-close {
  border: 0; background: rgba(249, 244, 232, 0.08); width: 36px; height: 36px; border-radius: 999px;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.lightbox video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #fff; }

@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .topbar { padding-top: 18px; }
  .ex { grid-template-columns: 116px minmax(0, 1fr); gap: 12px; }
  .swaps div { grid-template-columns: 1fr; gap: 2px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .tabs button { padding: 10px 10px 12px; }
}
