/*
 * Athlevo Method lessons (method.athlevo.org). Hand-written; the pages are generated by
 * scripts/build-method-pages.mjs from content/method.mjs.
 *
 * Follows the Athlevo Brand DNA: Barlow Condensed (bold) for headlines, numbers and buttons;
 * Inter for text. No other font. Black, white and one red (#CC0010), with the red kept to the
 * one word or button that matters. Readability comes before brand identity.
 */
:root {
  --paper: #ffffff;
  --ink: #0a0a0b;
  --card-black: #1c1c1c;
  --muted: #595959;
  --soft: #f4f4f4;
  --line: #e2e2e2;
  --red: #cc0010;
  --red-deep: #8f000b;
  --red-on-dark: #ff4650;
  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1120px;
  --measure: 720px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, .table-wrap:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.site-header a:focus-visible, .site-footer a:focus-visible, .hero a:focus-visible { outline-color: #fff; }

.skip {
  position: absolute; left: 12px; top: 8px; z-index: 80; padding: 8px 12px;
  background: #fff; color: var(--ink); transform: translateY(-120%);
}
.skip:focus { transform: none; }

.wrap { width: min(var(--max), 100%); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--ink); color: #fff; }
.nav {
  width: min(var(--max), 100%); margin: 0 auto; min-height: var(--nav-h);
  padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.wordmark {
  font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: 0.16em;
  text-transform: uppercase; text-decoration: none; display: inline-flex; align-items: baseline; gap: 0;
}
.wordmark i { color: var(--red-on-dark); font-style: normal; }
.wordmark-tag { margin-left: 12px; font-size: 13px; letter-spacing: 0.2em; color: #b5b5b5; }
.nav-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; text-decoration: none;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--red-on-dark); }

/* ---------- hero (hub) ---------- */
.hero { background: var(--ink); color: #fff; padding: clamp(48px, 9vw, 112px) 0 clamp(44px, 8vw, 96px); }
.hero .eyebrow { color: #b5b5b5; }
.hero h1 { color: #fff; font-size: clamp(56px, 11vw, 132px); line-height: 0.92; margin: 0 0 20px; }
.hero h1 em { font-style: normal; color: var(--red-on-dark); }
.hero-sub { margin: 0; max-width: 28ch; font-size: clamp(19px, 2.4vw, 26px); line-height: 1.35; color: #e6e6e6; }

/* ---------- type ---------- */
.eyebrow {
  margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(36px, 5.4vw, 56px); line-height: 1.04; letter-spacing: -0.005em; margin: 0 0 18px; }
h2 { font-size: clamp(27px, 3.4vw, 36px); line-height: 1.1; margin: 0 0 16px; }
h3 { font-size: 22px; line-height: 1.2; margin: 28px 0 8px; }
p { margin: 0 0 1.1em; }
strong { font-weight: 650; }

.section { padding: clamp(40px, 6vw, 72px) 0; }
.section.alt { background: var(--soft); }
.section-lead { max-width: var(--measure); color: var(--muted); margin: 0 0 24px; }
.prose { max-width: var(--measure); }

/* ---------- lesson page ---------- */
.article-wrap { padding-top: 20px; padding-bottom: 72px; }
.article-wrap > * { max-width: var(--measure); }
.article-wrap > .related, .article-wrap > .pager { max-width: none; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; margin: 0 0 28px; padding: 0; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: #8a8a8a; }
.crumbs a { color: inherit; }
.lesson-head { margin-bottom: 8px; }
.byline { font-size: 14px; color: var(--muted); margin: 0 0 22px; }
.lead { font-size: 20px; line-height: 1.55; margin: 0 0 28px; }

.short {
  background: var(--soft); border-left: 4px solid var(--ink); padding: 20px 24px 8px; margin: 0 0 28px;
}
.short h2 { font-size: 22px; margin: 0 0 8px; }
.short ul { margin: 0 0 12px; padding-left: 20px; }
.short li { margin-bottom: 6px; }

.toc { margin: 0 0 36px; }
.toc h2 { font-size: 18px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 22px; }
.toc li { margin-bottom: 4px; }

.prose h2 { margin-top: 44px; }
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 1.2em; }
.prose li { margin-bottom: 8px; }
.note { padding: 14px 18px; background: var(--soft); border-left: 4px solid var(--ink); }

.table-wrap { overflow-x: auto; margin: 8px 0 26px; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; line-height: 1.45; }
caption { text-align: left; padding: 12px 14px; font-weight: 600; background: var(--soft); border-bottom: 1px solid var(--line); }
th, td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
thead th { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; white-space: nowrap; }
tbody th { font-weight: 650; white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

.sources { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.sources h2 { font-size: 22px; }
.sources ol { padding-left: 22px; font-size: 15px; color: var(--muted); }
.sources li { margin-bottom: 8px; }
.design-note { font-size: 14px; color: var(--muted); margin: 14px 0 0; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 48px 0 0; }
.pager a {
  display: block; padding: 16px 18px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; line-height: 1.3;
}
.pager a span { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.pager a:hover { border-color: var(--ink); }
.pager-next { text-align: right; }

.related { margin-top: 56px; }

/* ---------- lesson lists and cards ---------- */
.lesson-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.lesson-card {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; height: 100%; padding: 18px 20px;
  border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink);
}
.lesson-card:hover { border-color: var(--ink); }
.lesson-num { grid-row: 1 / span 2; font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1; color: #9a9a9a; }
.lesson-title { font-weight: 650; line-height: 1.3; }
.lesson-sum { font-size: 14px; line-height: 1.45; color: var(--muted); }

.idea-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.idea-grid li { background: #fff; border: 1px solid var(--line); padding: 20px 22px; }
.idea-grid h3 { margin-top: 0; }
.idea-grid p { color: var(--muted); font-size: 15px; }
.idea-grid a { font-weight: 600; }

/* ---------- call to action ---------- */
.cta-box { margin: 56px 0 0; padding: 28px 28px 32px; background: var(--ink); color: #fff; max-width: none; }
.cta-box h2 { color: #fff; margin: 0 0 10px; }
.cta-box p { color: #d6d6d6; max-width: 52ch; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px;
  background: var(--red); color: #fff; border: 1px solid var(--red); text-decoration: none;
  font: 700 16px/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase;
}
.btn:hover { background: var(--red-deep); border-color: var(--red-deep); }
.cta-box .btn:focus-visible { outline-color: #fff; }
.section > .wrap > .cta-box { margin-top: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #b5b5b5; padding: 48px 0 36px; font-size: 14px; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px 40px; }
.footer-h { font-family: var(--sans); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #fff; margin: 0 0 12px; font-weight: 600; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.copyright { margin: 32px 0 0; color: #8a8a8a; font-size: 13px; }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .wordmark-tag { display: none; }
  .nav-links { gap: 16px; }
  .footer-cols { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { text-align: left; }
  .lead { font-size: 18.5px; }
  .cta-box { padding: 24px 20px 28px; }
}

@media print {
  .site-header, .site-footer, .cta-box, .pager, .related, .skip { display: none; }
  body { font-size: 12pt; }
}
