/* The Rep Theory site: the video look on the web.
   Layout concept: a manga chapter book. Pure black pages, white ink art in hand-drawn double-line frames,
   bold lowercase headings like the video cards, green set/rep labels, red only on the thing that matters. */
:root {
  --bg: #000;            /* the video background */
  --panel: #0c0c0d;      /* raised panels, barely lifted off black */
  --line: #d9d6cf;       /* sketch-frame ink */
  --line-dim: #3a3936;   /* quiet rules and borders */
  --fg: #f4f1ea;         /* ink white */
  --muted: #a6a29a;      /* secondary text */
  --orange: #d9772b;     /* Day 1's shorts: our brand accent */
  --red: #e8322b;        /* the muscle highlight: one key thing per view */
  --red-ghost: #3a0d0b;  /* the faint countdown numerals */
  --good: #6fe08a;       /* sets, reps, "do this" */
  --bad: #ff6b6b;        /* "don't" */
  --display: "Montserrat", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1180px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0; }
.lede { color: var(--muted); font-size: 1.08rem; max-width: 62ch; }
.kicker { font: 700 0.78rem/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); }
.hot { color: var(--red); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.num { font-variant-numeric: tabular-nums; }
section { padding-block: clamp(40px, 7vw, 84px); }
.stack { display: grid; gap: 14px; }
.stack-lg { display: grid; gap: 28px; }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(0, 0, 0, 0.88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-dim); }
.top .wrap { display: flex; align-items: center; gap: 18px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.02rem/1 var(--display); white-space: nowrap; }
.brand img { width: 34px; height: 34px; border-radius: 50%; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-left: auto; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font: 700 0.86rem/1 var(--display); color: var(--muted); white-space: nowrap; }
.nav a:hover { color: var(--fg); }
.nav a[aria-current="page"] { color: var(--bg); background: var(--fg); }
.nav a.tg { color: var(--orange); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px; border-radius: 999px; border: 1.5px solid var(--fg); font: 800 0.95rem/1 var(--display); text-decoration: none; cursor: pointer; background: transparent; color: var(--fg); }
.btn.primary { background: var(--fg); color: var(--bg); }
.btn.orange { border-color: var(--orange); color: var(--orange); }
.btn:hover { transform: translateY(-1px); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* The hand-drawn double-line frame from the videos */
.sketch { position: relative; border: 1.5px solid var(--line); background: var(--bg); }
.sketch::after { content: ""; position: absolute; inset: -5px 4px 3px -4px; border: 1px solid var(--line); opacity: 0.55; transform: rotate(-0.6deg); pointer-events: none; }
.sketch img { width: 100%; height: 100%; object-fit: contain; }

/* Hero */
.hero { padding-block: clamp(28px, 6vw, 70px) clamp(30px, 6vw, 60px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: center; }
.hero h1 .hot { display: inline-block; }
.hero .stack-lg > p.lede { font-size: 1.15rem; }
.duo { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 8px; }
.duo figure { margin: 0; }
.duo .sketch { aspect-ratio: 3 / 4; }
.duo figcaption { margin-top: 10px; text-align: center; font: 800 0.9rem/1.2 var(--display); }
.duo .arrow { font: 800 2.2rem/1 var(--display); color: var(--red); padding-bottom: 46%; }
.proof { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 0.92rem; }
.proof b { color: var(--fg); font-family: var(--display); }

/* Section heads */
.head { display: grid; gap: 10px; margin-bottom: 26px; }
.head .row { justify-content: space-between; }

/* Plan cards: Darebee-style program tiles, drawn in our ink */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.plan-card { display: grid; grid-template-rows: auto 1fr; text-decoration: none; background: var(--panel); border: 1px solid var(--line-dim); border-radius: 6px; overflow: hidden; transition: border-color 0.15s; }
.plan-card:hover { border-color: var(--line); }
.plan-card .art { aspect-ratio: 16 / 10; background: var(--bg); border-bottom: 1px solid var(--line-dim); }
.plan-card .art img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.plan-card .body { display: grid; gap: 8px; padding: 16px 16px 18px; align-content: start; }
.plan-card h3 { font-size: 1.3rem; }
.plan-card p { color: var(--muted); font-size: 0.95rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 700 0.72rem/1 var(--display); letter-spacing: 0.04em; padding: 6px 9px; border: 1px solid var(--line-dim); border-radius: 999px; color: var(--muted); white-space: nowrap; }
.chip.g { color: var(--good); border-color: rgba(111, 224, 138, 0.4); }
.chip.o { color: var(--orange); border-color: rgba(217, 119, 43, 0.5); }

/* Picker ("which body are you?") */
.picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.pick { display: grid; gap: 4px; padding: 14px; border: 1.5px solid var(--line-dim); border-radius: 6px; text-decoration: none; background: var(--panel); }
.pick:hover { border-color: var(--orange); }
.pick b { font: 800 1rem/1.15 var(--display); }
.pick span { color: var(--muted); font-size: 0.86rem; line-height: 1.35; }

/* Plan page */
.plan-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.plan-hero .sketch { aspect-ratio: 4 / 3; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line-dim); border: 1px solid var(--line-dim); border-radius: 6px; overflow: hidden; }
.facts div { background: var(--panel); padding: 14px 16px; display: grid; gap: 3px; }
.facts small { color: var(--muted); font: 700 0.72rem/1.2 var(--display); text-transform: uppercase; letter-spacing: 0.1em; }
.facts b { font: 800 1.05rem/1.25 var(--display); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { border: 1.5px solid var(--line-dim); border-radius: 4px; padding: 10px 6px; text-align: center; display: grid; gap: 4px; min-width: 0; }
.day small { color: var(--muted); font: 700 0.72rem/1 var(--display); }
.day b { font: 800 0.86rem/1.15 var(--display); overflow-wrap: anywhere; }
.day.on { border-color: var(--good); }
.day.on b { color: var(--good); }
.day.easy b { color: var(--orange); }

.workout { display: grid; gap: 16px; }
.ex { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: center; padding: 14px; background: var(--panel); border: 1px solid var(--line-dim); border-radius: 6px; overflow: hidden; }
.ex .n { position: absolute; right: 10px; top: -14px; font: 900 5.2rem/1 var(--display); color: var(--red-ghost); pointer-events: none; }
.ex .sketch { aspect-ratio: 4 / 3; }
.ex .info { display: grid; gap: 6px; position: relative; min-width: 0; }
.ex h4 { font-size: 1.12rem; }
.ex .dose { font: 800 0.92rem/1.3 var(--display); color: var(--good); }
.ex .cue { color: var(--muted); font-size: 0.94rem; }
.ex .alt { font-size: 0.86rem; color: var(--muted); }
.ex .alt b { color: var(--fg); font-weight: 600; }
.watch { white-space: nowrap; justify-self: start; font: 700 0.8rem/1 var(--display); color: var(--orange); text-decoration: none; border-bottom: 1px dashed var(--orange); padding-bottom: 2px; }
.watch.soon { color: var(--muted); border-color: var(--line-dim); }

.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.rule { padding: 16px; border-left: 3px solid var(--good); background: var(--panel); display: grid; gap: 6px; }
.rule.warn { border-color: var(--bad); }
.rule.o { border-color: var(--orange); }
.rule h4 { font-size: 1rem; }
.rule p { color: var(--muted); font-size: 0.94rem; }
.src { color: var(--muted); font-size: 0.84rem; }
.src li { margin-bottom: 4px; }
.note { padding: 14px 16px; border: 1.5px dashed var(--orange); border-radius: 6px; color: var(--fg); font-size: 0.95rem; }

/* Videos */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filters button { font: 700 0.84rem/1 var(--display); padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-dim); background: transparent; color: var(--muted); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.vid { display: grid; gap: 10px; align-content: start; text-decoration: none; }
.vid .thumb { position: relative; aspect-ratio: 16 / 9; background: var(--panel); border: 1px solid var(--line-dim); border-radius: 6px; overflow: hidden; }
.vid .thumb img { width: 100%; height: 100%; object-fit: cover; }
.vid .len { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, 0.8); padding: 3px 7px; border-radius: 4px; font: 700 0.75rem/1 var(--display); }
.vid h3 { font-size: 1.02rem; line-height: 1.25; }
.vid small { color: var(--muted); font-size: 0.82rem; }
.player { position: relative; aspect-ratio: 16 / 9; width: 100%; background: var(--panel); border: 1px solid var(--line-dim); border-radius: 8px; overflow: hidden; }
.player img { width: 100%; height: 100%; object-fit: cover; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.25); border: 0; cursor: pointer; color: var(--fg); }
.player .play span { width: 74px; height: 74px; border-radius: 50%; background: var(--red); display: grid; place-items: center; font-size: 1.6rem; box-shadow: 0 0 0 6px rgba(232, 50, 43, 0.25); }
.breakdown { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.chapters { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-dim); }
.chapters li { border-bottom: 1px solid var(--line-dim); }
.chapters button { width: 100%; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; text-align: left; padding: 11px 4px; background: transparent; border: 0; color: var(--fg); font: 600 0.95rem/1.35 var(--body); cursor: pointer; }
.chapters button:hover { color: var(--orange); }
.chapters time { color: var(--good); font: 800 0.86rem/1.35 var(--display); font-variant-numeric: tabular-nums; }
.learn { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
.learn li::marker { color: var(--red); }

/* Tests */
.tests { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.test .field label { min-width: 0; }
.result.is-example b, .result.is-example span { opacity: 0.6; }
.test { display: grid; grid-template-rows: auto auto 1fr; gap: 14px; padding: 18px; background: var(--panel); border: 1px solid var(--line-dim); border-radius: 8px; }
.test .sketch { aspect-ratio: 16 / 9; }
.test label { font: 700 0.86rem/1.3 var(--display); color: var(--muted); }
.field { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.field input { width: 120px; padding: 11px 12px; border-radius: 6px; border: 1.5px solid var(--line-dim); background: var(--bg); color: var(--fg); font: 800 1.05rem/1 var(--display); }
.field input:focus { border-color: var(--orange); outline: none; }
.result { min-height: 3.4em; padding: 12px 14px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line-dim); display: grid; gap: 4px; }
.result b { font: 800 1rem/1.25 var(--display); }
.result.t1 b { color: var(--bad); }
.result.t2 b { color: var(--orange); }
.result.t3 b { color: var(--good); }
.result.t4 b { color: var(--good); }

/* Diet */
.calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.calc .test { grid-template-rows: auto; }
.foods { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.foods ul { margin: 0; padding-left: 1.1em; color: var(--muted); }
.toggle { display: inline-flex; align-items: center; gap: 8px; font: 700 0.9rem/1.2 var(--display); }

/* Tips */
.tips { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.tip { display: grid; gap: 8px; padding: 18px; border: 1.5px solid var(--line-dim); border-radius: 6px; background: var(--panel); align-content: start; }
.tip .k { font: 900 2rem/1 var(--display); color: var(--red-ghost); }
.tip h3 { font-size: 1.08rem; }
.tip p { color: var(--muted); font-size: 0.94rem; }

/* Telegram band */
.band { border-top: 1px solid var(--line-dim); border-bottom: 1px solid var(--line-dim); background: var(--panel); }
.band .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 26px; align-items: center; padding-block: 40px; }

footer { padding-block: 40px 60px; color: var(--muted); font-size: 0.88rem; }
footer .wrap { display: grid; gap: 14px; }
footer .row a { color: var(--fg); }

.crumb { color: var(--muted); font: 700 0.84rem/1 var(--display); text-decoration: none; }
.crumb:hover { color: var(--fg); }
.empty { color: var(--muted); }

@media (max-width: 900px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero .wrap, .plan-hero, .breakdown, .band .wrap, .tests { grid-template-columns: minmax(0, 1fr); }
  .hero .duo { max-width: 460px; }
  .week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .plans { grid-template-columns: minmax(0, 1fr); }
  .ex { grid-template-columns: minmax(0, 1fr); }
  .ex .sketch { max-width: 260px; }
  .brand span { display: none; }
  .duo .arrow { font-size: 1.6rem; }
}
