/* ============================================================
   Stronger. Fitter. In Less Time. — site styles
   Mobile-first. Styled in line with the PDF cover.
   ============================================================ */

:root {
  --cf-blue: #1F4E79;      /* document accent blue */
  --cf-blue-600: #1a4269;
  --cf-blue-700: #123049;
  --ink: #141618;
  --text: #2b2f33;
  --muted: #5b6470;
  --muted-2: #98a2af;
  --line: #e3e7ec;
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --maxw: 1080px;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 10px 26px rgba(16,24,40,.06);
  --font-display: "Arial Black", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cf-blue); }

h1, h2, h3 { line-height: 1.15; color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(18px, 5vw, 40px); }

/* Anchor offset so the sticky header doesn't cover section tops */
section[id], span#top { scroll-margin-top: 76px; }

/* ---- Skip link ---- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--cf-blue); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-logo { width: 34px; height: 34px; }
.brand-name { font-weight: 800; letter-spacing: .01em; font-size: 1.02rem; }
.site-nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); }
.site-nav > a:not(.btn) {
  text-decoration: none; color: var(--text); font-weight: 600; font-size: .95rem;
  padding: 6px 2px; border-bottom: 2px solid transparent;
}
.site-nav > a:not(.btn):hover { color: var(--cf-blue); border-bottom-color: var(--cf-blue); }

/* On phones, drop the in-page anchors and keep the CTA only */
@media (max-width: 620px) {
  .site-nav > a:not(.btn) { display: none; }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  text-decoration: none; cursor: pointer;
  padding: .78em 1.4em; border-radius: 9px; border: 1.5px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .12s ease;
}
.btn-primary { background: var(--cf-blue); color: #fff; }
.btn-primary:hover { background: var(--cf-blue-600); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--cf-blue); border-color: var(--cf-blue); }
.btn-ghost:hover { background: rgba(31,78,121,.07); }
.btn-small { padding: .5em .9em; font-size: .9rem; border-radius: 8px; background: var(--cf-blue); color: #fff; }
.btn-small:hover { background: var(--cf-blue-600); }
.btn-lg { font-size: 1.1rem; padding: .9em 1.7em; }

:where(a, button):focus-visible {
  outline: 3px solid rgba(31,78,121,.45); outline-offset: 2px; border-radius: 6px;
}

/* ============================================================
   Hero
   ============================================================ */
.hero { padding-block: clamp(52px, 10vw, 104px); text-align: center; }
.hero-title {
  margin: 0; font-family: var(--font-display); font-weight: 900;
  text-transform: uppercase; color: var(--ink);
  letter-spacing: -0.02em; line-height: .96;
  font-size: clamp(2.5rem, 9.5vw, 5.4rem);
}
.hero-title span { display: block; }
.hero-sub-wrap {
  margin: clamp(26px, 5vw, 40px) auto 0;
  max-width: 640px;
  border-top: 1.5px solid #111; border-bottom: 1.5px solid #111;
  padding-block: clamp(16px, 3.4vw, 24px);
}
.hero-sub { margin: 0; color: var(--cf-blue); font-weight: 500; font-size: clamp(1.08rem, 3vw, 1.5rem); line-height: 1.35; }
.hero-meta { margin: 20px 0 0; color: var(--muted); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: clamp(26px, 5vw, 38px); }
.hero-fineprint { margin: 16px 0 0; color: var(--muted); font-size: .9rem; }

/* ============================================================
   Sections
   ============================================================ */
.section { padding-block: clamp(52px, 9vw, 96px); }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-title {
  margin: 0 0 .2em; color: var(--cf-blue); font-weight: 800;
  font-size: clamp(1.7rem, 4.4vw, 2.4rem); letter-spacing: -0.01em;
}
.section-title::after {
  content: ""; display: block; width: 54px; height: 4px; margin-top: .5rem;
  background: var(--cf-blue); border-radius: 2px;
}
.lead { font-size: clamp(1.05rem, 2.4vw, 1.2rem); color: var(--text); max-width: 64ch; margin: 1rem 0 1.6rem; }
.minor-title { margin: 1.8rem 0 .8rem; font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.note { color: var(--muted); max-width: 68ch; }
.closer { text-align: center; font-weight: 800; font-size: clamp(1.15rem, 3vw, 1.5rem); color: var(--ink); margin-top: 2rem; }

/* Chips */
.chips { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 10px 12px; }
.chips li {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: .5em 1em; font-size: .95rem; box-shadow: var(--shadow);
}
.section-alt .chips li { background: #fff; }
.chips strong { color: var(--cf-blue); }

/* Weekly grid */
.week-grid {
  list-style: none; padding: 0; margin: .5rem 0 1.2rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(102px, 1fr)); gap: 10px;
}
.day {
  display: flex; flex-direction: column; gap: 4px; text-align: center;
  padding: 14px 8px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
}
.day .dow { font-weight: 800; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.day .what { font-size: .92rem; font-weight: 600; color: var(--ink); }
.day.is-train { border-top: 3px solid var(--cf-blue); }
.day.is-train .what { color: var(--cf-blue); }
.day.is-rest { background: var(--bg-alt); }
.day.is-rest .what { color: var(--muted-2); font-weight: 500; }
@media (min-width: 780px) {
  .week-grid { grid-template-columns: repeat(7, 1fr); }
}

/* Two columns */
.two-col { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 1rem; }
@media (min-width: 760px) { .two-col { grid-template-columns: 1fr 1fr; gap: 24px; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 26px); box-shadow: var(--shadow); }
.panel .minor-title:first-child { margin-top: 0; }

/* Tick / cross lists */
.ticks, .crosses { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.ticks li, .crosses li { position: relative; padding-left: 1.9rem; }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: var(--cf-blue); font-weight: 900;
}
.crosses li::before {
  content: "✕"; position: absolute; left: 0; top: 0; color: var(--muted-2); font-weight: 900;
}
.ticks.compact li, .crosses.compact li { padding-left: 1.7rem; }

/* Pull quote */
.pull {
  margin: 2rem 0 0; padding: clamp(18px, 3vw, 24px) clamp(20px, 3.5vw, 30px);
  border-left: 5px solid var(--cf-blue); background: var(--bg-alt); border-radius: 0 10px 10px 0;
  font-size: clamp(1.1rem, 2.6vw, 1.35rem); color: var(--ink); font-weight: 500;
}
.section-alt .pull { background: #fff; }
.pull em { color: var(--cf-blue); font-style: italic; }

/* ============================================================
   Table of contents
   ============================================================ */
.legend { display: inline-block; color: var(--muted); font-size: .95rem; }
.legend-key {
  color: var(--cf-blue); font-weight: 700; border: 1px solid var(--cf-blue);
  border-radius: 999px; padding: .02em .5em; font-size: .82rem; white-space: nowrap;
}
.toc { counter-reset: toc; list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 12px; }
.toc-item {
  counter-increment: toc;
  display: grid; grid-template-columns: 2.1rem 1fr; column-gap: 14px; row-gap: .4rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 18px; box-shadow: var(--shadow);
}
.toc-item::before {
  content: counter(toc); grid-column: 1; grid-row: 1 / span 2;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-alt); color: var(--muted); font-weight: 800; font-size: .9rem;
}
.toc-item.is-open::before { background: var(--cf-blue); color: #fff; }
.toc-head { grid-column: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .7rem; }
.toc-title { font-weight: 800; color: var(--ink); font-size: 1.06rem; text-decoration: none; }
a.toc-title { color: var(--cf-blue); }
a.toc-title:hover { text-decoration: underline; }
.toc-pages { margin-left: auto; color: var(--muted); font-size: .84rem; white-space: nowrap; }
.toc-flag {
  color: var(--cf-blue); font-weight: 700; font-size: .78rem; text-decoration: none;
  border: 1px solid var(--cf-blue); border-radius: 999px; padding: .05rem .55rem; white-space: nowrap;
}
.toc-flag:hover { background: var(--cf-blue); color: #fff; }
.toc-sub { grid-column: 2; list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: .93rem; }
.toc-sub li { display: inline; }
.toc-sub li:not(:last-child)::after { content: " · "; color: var(--muted-2); }
@media (max-width: 520px) {
  .toc-pages { margin-left: 0; width: 100%; order: 3; }
}

/* ============================================================
   Preview
   ============================================================ */
.preview-group { margin-top: 1.6rem; }
.preview-group .minor-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem .8rem; }
.pg { font-weight: 600; color: var(--muted); font-size: .85rem; }
.thumb-row { display: flex; flex-wrap: wrap; gap: 16px; }
.thumb {
  display: block; width: clamp(132px, 40vw, 190px); border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow);
  cursor: zoom-in; transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.thumb img { width: 100%; height: auto; }
.thumb:hover { transform: translateY(-3px); border-color: var(--cf-blue); box-shadow: 0 10px 30px rgba(16,24,40,.14); }

/* ============================================================
   Buy
   ============================================================ */
.buy-inner { display: grid; grid-template-columns: 1fr; gap: clamp(24px, 5vw, 44px); align-items: center; }
.buy-cover { justify-self: center; }
.buy-cover img { width: min(300px, 72vw); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.buy-copy .btn { margin-top: 1rem; }
@media (min-width: 760px) {
  .buy-inner { grid-template-columns: 300px 1fr; align-items: center; }
  .buy-cover { justify-self: start; }
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: #0f1b28; color: #c7d0da; padding-block: clamp(36px, 6vw, 56px); }
.footer-inner { display: grid; gap: .7rem; }
.footer-brand { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; letter-spacing: .02em; color: #fff; margin: 0; font-size: 1.15rem; }
.footer-disclaimer { margin: 0; font-size: .9rem; max-width: 72ch; color: #9fb0c0; }
.footer-disclaimer strong { color: #d7e0e8; }
.footer-links { margin: .3rem 0 0; }
.footer-links a { color: #eaf0f6; text-decoration: none; font-weight: 600; }
.footer-links a:hover { text-decoration: underline; }
.footer-copy { margin: .2rem 0 0; font-size: .82rem; color: #7d8b99; }

/* ============================================================
   Lightbox
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12,18,26,.93); padding: clamp(10px, 3vw, 34px);
}
.lightbox[hidden] { display: none; }
.lb-figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lb-img {
  max-width: 100%; max-height: calc(100vh - 104px); width: auto; height: auto;
  object-fit: contain; background: #fff; border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lb-caption { margin: .7rem 0 0; color: #e7edf3; font-size: .92rem; text-align: center; padding-inline: 12px; }
.lb-btn {
  position: absolute; display: grid; place-items: center;
  width: 48px; height: 48px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff; font-size: 1.9rem; line-height: 1;
  cursor: pointer; transition: background-color .15s ease;
}
.lb-btn:hover { background: rgba(255,255,255,.28); }
.lb-close { top: 14px; right: 14px; font-size: 2rem; }
.lb-prev { left: clamp(8px, 2vw, 22px); top: 50%; transform: translateY(-50%); }
.lb-next { right: clamp(8px, 2vw, 22px); top: 50%; transform: translateY(-50%); }
.lb-counter { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: #cdd7e1; font-size: .85rem; letter-spacing: .04em; }
.lb-btn[disabled] { opacity: .3; cursor: default; }
