/* ReformerRoster design system: chalk white, cool grey, clear cobalt.
   Studio precise. Spring line motifs, exact grid, disciplined spacing. */

:root {
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --ink: #171A21;
  --primary: #2A4FA2;
  --accent: #9FB6E8;
  --muted: #5C616C;

  --primary-05: #F3F6FC;
  --primary-10: #E7EDF8;
  --primary-18: #D6E0F3;
  --primary-30: #B9CAEA;
  --primary-deep: #21407F;
  --chalk: #FCFDFE;
  --rule: #E2E5EB;
  --rule-strong: #CBD1DA;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  --r-sm: 3px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px rgba(23, 26, 33, 0.05);
  --shadow-2: 0 2px 6px rgba(23, 26, 33, 0.06), 0 12px 28px rgba(23, 26, 33, 0.05);
  --shadow-3: 0 18px 46px rgba(42, 79, 162, 0.12);

  --font-display: "Familjen Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Heebo", "Segoe UI", Roboto, Arial, sans-serif;

  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-base: 1rem;
  --t-md: 1.0625rem;
  --t-lg: 1.25rem;
  --t-xl: 1.5rem;
  --t-2xl: 1.9rem;
  --t-3xl: 2.4rem;
  --t-4xl: 3.1rem;
  --t-5xl: 3.9rem;

  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --rail: cubic-bezier(0.2, 0.7, 0.2, 1);
  --maxw: 1180px;
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-md);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.018em;
  margin: 0 0 var(--space-4);
  font-weight: 700;
  color: var(--ink);
}

h1 { font-size: clamp(2.25rem, 5.2vw, var(--t-5xl)); }
h2 { font-size: clamp(1.75rem, 3.6vw, var(--t-3xl)); }
h3 { font-size: var(--t-lg); letter-spacing: -0.01em; }
p { margin: 0 0 var(--space-4); }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-deep); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0 0 var(--space-4); padding-left: 1.15rem; }
li { margin-bottom: var(--space-2); }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--rule); margin: var(--space-7) 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--space-5); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: var(--space-4); top: -60px; z-index: 100;
  background-color: var(--primary); color: var(--surface);
  padding: var(--space-3) var(--space-5); border-radius: var(--r-md);
  font-weight: 600; text-decoration: none; transition: top 160ms var(--rail);
}
.skip-link:focus { top: var(--space-4); color: var(--surface); }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ---------- spring rail motif ---------- */
.rail {
  height: 14px;
  background-image: repeating-linear-gradient(90deg,
    var(--primary-30) 0 2px, rgba(0,0,0,0) 2px 11px);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  opacity: 0.85;
}
.coil {
  height: 22px;
  background-image:
    repeating-linear-gradient(78deg, var(--accent) 0 2px, rgba(0,0,0,0) 2px 9px);
  mask-image: linear-gradient(90deg, rgba(0,0,0,0), #000 12%, #000 88%, rgba(0,0,0,0));
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0), #000 12%, #000 88%, rgba(0,0,0,0));
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background-color: var(--chalk);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 200ms var(--rail), background-color 200ms var(--rail);
}
.site-header.is-stuck { box-shadow: var(--shadow-1); background-color: var(--surface); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-5); min-height: 72px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: var(--space-3);
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  letter-spacing: -0.02em; color: var(--ink); text-decoration: none;
}
.wordmark svg { flex: none; }
.wordmark span i { font-style: normal; color: var(--primary); }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; background-color: var(--surface);
  border: 1px solid var(--rule-strong); border-radius: var(--r-md); cursor: pointer;
}
.nav-toggle svg { stroke: var(--ink); }

.site-nav ul {
  display: flex; align-items: center; gap: var(--space-5);
  list-style: none; margin: 0; padding: 0;
}
.site-nav a {
  color: var(--muted); text-decoration: none; font-size: var(--t-sm);
  font-weight: 500; letter-spacing: 0.01em; padding: var(--space-2) 0;
  border-bottom: 2px solid rgba(0,0,0,0);
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-body); font-weight: 600; font-size: var(--t-sm);
  padding: 13px var(--space-5); border-radius: var(--r-md); text-decoration: none;
  border: 1px solid rgba(0,0,0,0); cursor: pointer; line-height: 1.2;
  transition: transform 220ms var(--spring), background-color 160ms var(--rail), box-shadow 220ms var(--rail);
}
.btn-primary { background-color: var(--primary); color: #FFFFFF; box-shadow: var(--shadow-1); }
.btn-primary:hover { background-color: var(--primary-deep); color: #FFFFFF; transform: translateY(-2px); box-shadow: var(--shadow-3); }
.btn-ghost { background-color: var(--surface); color: var(--primary); border-color: var(--primary-30); }
.btn-ghost:hover { background-color: var(--primary-05); transform: translateY(-2px); }
.btn-lg { font-size: var(--t-base); padding: 16px var(--space-6); }
.btn-block { width: 100%; }

/* ---------- sections ---------- */
.section { padding: var(--space-9) 0; border-top: 1px solid var(--rule); }
.section-tint { background-color: var(--primary-05); }
.section-chalk { background-color: var(--surface); }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--primary); margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background-color: var(--primary); display: block;
}
.lede { font-size: var(--t-lg); color: var(--muted); max-width: 62ch; }
.section-head { max-width: 70ch; margin-bottom: var(--space-8); }

/* ---------- hero ---------- */
.hero { padding: var(--space-9) 0 var(--space-8); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, var(--rule) 1px, rgba(0,0,0,0) 1px),
    linear-gradient(180deg, var(--rule) 1px, rgba(0,0,0,0) 1px);
  background-size: 96px 96px;
  opacity: 0.55; pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-8); align-items: center; }
.hero h1 { max-width: 15ch; }
.hero-sub { font-size: var(--t-lg); color: var(--muted); max-width: 52ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-6) 0 var(--space-7); }
.trust {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4); border-top: 1px solid var(--rule-strong); padding-top: var(--space-5);
}
.trust li { list-style: none; margin: 0; font-size: var(--t-sm); color: var(--muted); }
.trust b { display: block; font-family: var(--font-display); font-size: var(--t-lg); color: var(--ink); }
.hero-figure { position: relative; }
.hero-figure img { border-radius: var(--r-lg); box-shadow: var(--shadow-2); border: 1px solid var(--rule); }
.hero-figure figcaption {
  position: absolute; left: var(--space-4); bottom: var(--space-4);
  background-color: var(--surface); border: 1px solid var(--rule);
  border-left: 3px solid var(--primary); border-radius: var(--r-md);
  padding: var(--space-3) var(--space-4); font-size: var(--t-xs);
  color: var(--muted); box-shadow: var(--shadow-1); max-width: 78%;
}
.hero-figure figcaption strong { color: var(--ink); }

/* ---------- capacity bar ---------- */
.capacity { margin-top: var(--space-4); }
.capacity-label {
  display: flex; justify-content: space-between; font-size: var(--t-xs);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.capacity-track {
  height: 10px; background-color: var(--primary-10); border-radius: var(--r-pill);
  overflow: hidden; border: 1px solid var(--primary-18);
}
.capacity-fill {
  height: 100%; width: 0; background-color: var(--primary);
  border-radius: var(--r-pill);
  transition: width 700ms var(--spring);
}
.is-revealed .capacity-fill { width: var(--fill, 70%); }

/* ---------- cards ---------- */
.grid { display: grid; gap: var(--space-5); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background-color: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-lg); padding: var(--space-6);
  transition: transform 320ms var(--spring), box-shadow 320ms var(--rail), border-color 200ms var(--rail);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--primary-30); }
.card h3 { margin-bottom: var(--space-2); }
.card p { color: var(--muted); font-size: var(--t-base); margin-bottom: 0; }

.cost {
  display: inline-block; margin-top: var(--space-4); font-family: var(--font-display);
  font-weight: 700; font-size: var(--t-sm); color: var(--primary);
  background-color: var(--primary-10); border-radius: var(--r-pill);
  padding: 4px var(--space-3);
}

.icon-box {
  width: 44px; height: 44px; border-radius: var(--r-md);
  background-color: var(--primary-05); border: 1px solid var(--primary-18);
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-4);
}
.icon-box svg { stroke: var(--primary); }

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; gap: var(--space-5); }
.step {
  position: relative; padding-left: 64px; padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--rule);
}
.step:last-child { border-bottom: 0; padding-bottom: 0; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0; width: 44px; height: 44px;
  border: 2px solid var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; color: var(--primary);
  background-color: var(--surface);
}
.step h3 { margin-bottom: var(--space-2); }
.step p { color: var(--muted); margin-bottom: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: center; }
.split img { border-radius: var(--r-lg); border: 1px solid var(--rule); box-shadow: var(--shadow-2); }

/* ---------- outcomes ---------- */
.outcome {
  background-color: var(--surface); border: 1px solid var(--rule);
  border-top: 3px solid var(--primary); border-radius: var(--r-md);
  padding: var(--space-6);
}
.outcome .figure-num {
  font-family: var(--font-display); font-size: var(--t-4xl); font-weight: 700;
  color: var(--primary); line-height: 1; display: block; margin-bottom: var(--space-3);
  letter-spacing: -0.03em;
}
.outcome p { color: var(--muted); margin-bottom: 0; font-size: var(--t-base); }

/* ---------- testimonials ---------- */
.testimonial {
  background-color: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-lg); padding: var(--space-6); margin: 0;
  position: relative;
}
.testimonial::before {
  content: ""; position: absolute; left: var(--space-6); top: 0; width: 44px; height: 3px;
  background-color: var(--accent);
}
.testimonial p { font-size: var(--t-base); }
.testimonial footer { font-size: var(--t-sm); color: var(--muted); border-top: 1px solid var(--rule); padding-top: var(--space-3); }
.testimonial footer b { display: block; color: var(--ink); font-family: var(--font-display); }
.results {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5); margin-top: var(--space-6);
  border: 1px solid var(--primary-18); background-color: var(--primary-05);
  border-radius: var(--r-lg); padding: var(--space-6);
}
.results div { text-align: center; }
.results b { display: block; font-family: var(--font-display); font-size: var(--t-2xl); color: var(--primary); }
.results span { font-size: var(--t-sm); color: var(--muted); }

/* ---------- pricing ---------- */
.tier {
  background-color: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-lg); padding: var(--space-6); display: flex; flex-direction: column;
  transition: transform 320ms var(--spring), box-shadow 320ms var(--rail);
}
.tier:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.tier.is-recommended { border: 2px solid var(--primary); box-shadow: var(--shadow-3); position: relative; }
.tier-flag {
  position: absolute; top: -14px; left: var(--space-6);
  background-color: var(--primary); color: #FFFFFF; font-size: var(--t-xs);
  font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px var(--space-3); border-radius: var(--r-pill);
}
.price { font-family: var(--font-display); font-size: var(--t-4xl); font-weight: 700; letter-spacing: -0.03em; }
.price small { font-size: var(--t-sm); font-weight: 400; color: var(--muted); font-family: var(--font-body); }
.tier ul { list-style: none; padding: 0; margin: var(--space-5) 0; flex: 1; }
.tier li { position: relative; padding-left: 26px; font-size: var(--t-base); color: var(--muted); }
.tier li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 12px; height: 2px;
  background-color: var(--primary);
}
.billing-note {
  margin-top: var(--space-6); font-size: var(--t-sm); color: var(--muted);
  border-left: 3px solid var(--accent); padding-left: var(--space-4);
}

/* ---------- faq ---------- */
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-q {
  width: 100%; text-align: left; background-color: rgba(0,0,0,0); border: 0;
  font-family: var(--font-display); font-size: var(--t-lg); font-weight: 700; color: var(--ink);
  padding: var(--space-5) 44px var(--space-5) 0; cursor: pointer; position: relative;
}
.faq-q::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 14px; height: 2px;
  background-color: var(--primary); transform: translateY(-50%);
}
.faq-q::before {
  content: ""; position: absolute; right: 14px; top: 50%; width: 2px; height: 14px;
  background-color: var(--primary); transform: translateY(-50%);
  transition: transform 260ms var(--spring), opacity 200ms var(--rail);
}
.faq-q[aria-expanded="true"]::before { transform: translateY(-50%) scaleY(0); opacity: 0; }
.faq-a { padding: 0 0 var(--space-5); color: var(--muted); max-width: 78ch; }
.faq-a p:last-child { margin-bottom: 0; }

/* ---------- form ---------- */
.form-shell {
  background-color: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-lg); padding: var(--space-7); box-shadow: var(--shadow-1);
}
.field { margin-bottom: var(--space-5); }
.field label { display: block; font-weight: 600; font-size: var(--t-sm); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: var(--t-base); color: var(--ink);
  background-color: var(--chalk); border: 1px solid var(--rule-strong);
  border-radius: var(--r-md); padding: 12px var(--space-4);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); }
.field [aria-invalid="true"] { border-color: #A32A2A; background-color: #FDF4F4; }
.err { display: none; color: #8C2020; font-size: var(--t-sm); margin-top: 6px; }
.err.is-shown { display: block; }
.consent { display: flex; gap: var(--space-3); align-items: flex-start; }
.consent input { width: 20px; height: 20px; flex: none; margin-top: 3px; }
.consent label { font-weight: 400; font-size: var(--t-sm); color: var(--muted); }
.form-alt { font-size: var(--t-sm); color: var(--muted); margin-top: var(--space-4); }

/* ---------- footer ---------- */
.site-footer {
  background-color: var(--primary-05); border-top: 1px solid var(--primary-18);
  padding: var(--space-8) 0 var(--space-5); color: var(--muted);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--space-7); }
.site-footer h2 { font-size: var(--t-sm); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); margin-bottom: var(--space-4); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: var(--muted); text-decoration: none; font-size: var(--t-sm); }
.site-footer a:hover { color: var(--primary); text-decoration: underline; }
.socials { display: flex; gap: var(--space-3); margin-top: var(--space-4); }
.socials a {
  width: 38px; height: 38px; border-radius: var(--r-md); background-color: var(--surface);
  border: 1px solid var(--primary-18); display: flex; align-items: center; justify-content: center;
  transition: transform 240ms var(--spring);
}
.socials a:hover { transform: translateY(-3px); }
.socials svg { stroke: var(--primary); }
.footer-base {
  margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--primary-18);
  display: flex; justify-content: space-between; gap: var(--space-4); font-size: var(--t-sm);
  flex-wrap: wrap;
}

/* ---------- prose pages ---------- */
.prose { max-width: 76ch; }
.prose h2 { font-size: var(--t-xl); margin-top: var(--space-7); }
.prose h3 { margin-top: var(--space-5); }
.page-head { padding: var(--space-8) 0 var(--space-6); }
.byline {
  margin-top: var(--space-8); border-top: 1px solid var(--rule); padding-top: var(--space-5);
  font-size: var(--t-sm); color: var(--muted); display: flex; gap: var(--space-4); align-items: center;
}
.portrait { border-radius: var(--r-lg); border: 1px solid var(--rule); box-shadow: var(--shadow-2); }
.author-grid { display: grid; grid-template-columns: 280px 1fr; gap: var(--space-7); align-items: start; }
.map-group { background-color: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: var(--space-6); }
.map-group ul { list-style: none; padding: 0; }
.map-group li { border-bottom: 1px solid var(--rule); padding-bottom: var(--space-2); }
.map-group li:last-child { border-bottom: 0; }
.map-group span { display: block; font-size: var(--t-sm); color: var(--muted); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 520ms var(--rail), transform 620ms var(--spring); }
.reveal.is-revealed { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .split, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .author-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 72px;
    background-color: var(--surface); border-bottom: 1px solid var(--rule);
    padding: var(--space-5); box-shadow: var(--shadow-2);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: var(--space-4); }
  .header-inner { position: relative; }
  .header-cta { display: none; }
  .grid-2, .trust, .results { grid-template-columns: 1fr; }
  .section { padding: var(--space-8) 0; }
  .form-shell { padding: var(--space-5); }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (min-width: 1400px) { :root { --maxw: 1280px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ================= magazine: Spring Line ================= */

/* breadcrumb */
.mag-crumb { padding: var(--space-5) 0 0; }
.mag-crumb ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
  list-style: none; margin: 0; padding: 0;
  font-size: var(--t-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.mag-crumb li { margin: 0; display: flex; align-items: center; gap: var(--space-2); }
.mag-crumb li + li::before {
  content: ""; width: 14px; height: 2px; background-color: var(--primary-30); display: block;
}
.mag-crumb a { color: var(--muted); text-decoration: none; }
.mag-crumb a:hover { color: var(--primary); text-decoration: underline; }
.mag-crumb li[aria-current] {
  color: var(--ink); font-weight: 600; text-transform: none; letter-spacing: 0;
  font-size: var(--t-sm); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* masthead on the index */
.mag-masthead { padding: var(--space-8) 0 var(--space-7); }
.mag-masthead h1 { max-width: 18ch; }
.mag-masthead-note {
  max-width: 62ch; font-size: var(--t-sm); color: var(--muted);
  border-left: 3px solid var(--accent); padding-left: var(--space-4); margin-top: var(--space-5);
}
.mag-standfirst {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.15rem, 2.2vw, var(--t-xl)); line-height: 1.35;
  color: var(--muted); max-width: 60ch; letter-spacing: -0.01em;
}

/* index grid */
.mag-index { border-top: 0; padding-top: var(--space-8); }
.mag-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6) var(--space-5);
}
.mag-card {
  background-color: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column;
  transition: transform 320ms var(--spring), box-shadow 320ms var(--rail), border-color 200ms var(--rail);
}
.mag-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--primary-30); }
.mag-card-media { display: block; border-bottom: 1px solid var(--rule); background-color: var(--primary-05); }
.mag-card-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mag-card-body { padding: var(--space-5); display: flex; flex-direction: column; flex: 1; }
.mag-tag {
  font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--primary); background-color: var(--primary-10);
  border-radius: var(--r-pill); padding: 4px var(--space-3);
  align-self: flex-start; margin-bottom: var(--space-3);
}
.mag-card-title {
  font-size: var(--t-lg); line-height: 1.22; letter-spacing: -0.015em; margin-bottom: var(--space-3);
}
.mag-card-title a { color: var(--ink); text-decoration: none; }
.mag-card-title a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
.mag-card-dek { color: var(--muted); font-size: var(--t-base); flex: 1; }
.mag-card-meta {
  display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
  margin: 0; padding-top: var(--space-4); border-top: 1px solid var(--rule);
  font-size: var(--t-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}

/* the lead card runs the full width of the grid */
.mag-card.lead { grid-column: 1 / -1; flex-direction: row; border-top: 3px solid var(--primary); }
.mag-card.lead .mag-card-media { flex: 0 0 54%; border-bottom: 0; border-right: 1px solid var(--rule); }
.mag-card.lead .mag-card-media img { height: 100%; aspect-ratio: auto; min-height: 320px; }
.mag-card.lead .mag-card-body { padding: var(--space-7); justify-content: center; }
.mag-card.lead .mag-card-title { font-size: clamp(1.6rem, 3vw, var(--t-3xl)); }
.mag-card.lead .mag-card-dek { font-size: var(--t-md); flex: 0 1 auto; }

.mag-index-foot {
  margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--rule);
  font-size: var(--t-sm); color: var(--muted);
}

/* article header */
.mag-article { padding: var(--space-6) 0 var(--space-9); }
.mag-head { max-width: 72ch; padding-bottom: var(--space-6); }
.mag-head h1 { font-size: clamp(1.9rem, 4.3vw, var(--t-4xl)); max-width: 22ch; }
.mag-byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
  margin-top: var(--space-5); padding-top: var(--space-4);
  border-top: 1px solid var(--rule); font-size: var(--t-sm); color: var(--muted);
}
.mag-byline-who { font-weight: 600; color: var(--ink); }
.mag-byline-dot { width: 4px; height: 4px; border-radius: 50%; background-color: var(--primary-30); display: block; }

.mag-figure { margin: 0 0 var(--space-7); }
.mag-figure img {
  width: 100%; border-radius: var(--r-lg); border: 1px solid var(--rule); box-shadow: var(--shadow-2);
}
.mag-figure figcaption {
  margin-top: var(--space-3); font-size: var(--t-xs); color: var(--muted);
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* article body typography, measure held between 64 and 75 characters */
.mag-body { max-width: 68ch; font-size: var(--t-md); line-height: 1.72; }
.mag-body p { margin-bottom: var(--space-5); }
.mag-body h2 {
  font-size: clamp(1.4rem, 2.8vw, var(--t-2xl)); line-height: 1.18;
  margin-top: var(--space-8); margin-bottom: var(--space-4); padding-top: var(--space-4);
  border-top: 1px solid var(--rule);
}
.mag-body h3 { font-size: var(--t-lg); margin-top: var(--space-6); margin-bottom: var(--space-3); }
.mag-body ul, .mag-body ol { margin-bottom: var(--space-5); padding-left: 1.25rem; }
.mag-body li { margin-bottom: var(--space-3); }
.mag-body blockquote {
  margin: var(--space-6) 0; padding: var(--space-5) var(--space-6);
  background-color: var(--primary-05); border-left: 3px solid var(--primary);
  border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--ink);
}
.mag-body blockquote p:last-child { margin-bottom: 0; }
.mag-body table {
  width: 100%; border-collapse: collapse; margin: var(--space-6) 0; font-size: var(--t-sm);
  border: 1px solid var(--rule);
}
.mag-body th, .mag-body td { text-align: left; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--rule); }
.mag-body th { background-color: var(--primary-05); font-family: var(--font-display); color: var(--ink); }
.mag-body tbody tr:last-child td { border-bottom: 0; }

/* contextual link inside the body */
.inline-read {
  margin: var(--space-6) 0; padding: var(--space-4) var(--space-5);
  background-color: var(--chalk); border: 1px solid var(--rule);
  border-left: 3px solid var(--accent); border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: var(--t-sm); color: var(--muted); font-weight: 500;
}
.inline-read a { font-weight: 600; }

/* call to action */
.mag-cta {
  position: relative; margin: var(--space-8) 0 var(--space-7);
  background-color: var(--primary-05); border: 1px solid var(--primary-18);
  border-radius: var(--r-lg); padding: var(--space-7) var(--space-6) var(--space-6);
}
.mag-cta-rail {
  height: 10px; margin-bottom: var(--space-5);
  background-image: repeating-linear-gradient(90deg, var(--primary-30) 0 2px, rgba(0,0,0,0) 2px 11px);
}
.mag-cta h2 { font-size: var(--t-xl); margin-bottom: var(--space-3); border: 0; padding: 0; margin-top: 0; }
.mag-cta p { color: var(--muted); font-size: var(--t-base); margin-bottom: var(--space-5); }

/* author box */
.mag-author {
  display: grid; grid-template-columns: 120px 1fr; gap: var(--space-5);
  background-color: var(--surface); border: 1px solid var(--rule);
  border-top: 3px solid var(--accent); border-radius: var(--r-lg);
  padding: var(--space-6); margin-bottom: var(--space-7);
}
.mag-author-photo { border-radius: var(--r-lg); border: 1px solid var(--rule); width: 120px; height: 120px; object-fit: cover; }
.mag-author-name { font-family: var(--font-display); font-weight: 700; font-size: var(--t-lg); margin-bottom: var(--space-2); }
.mag-author p { font-size: var(--t-sm); color: var(--muted); margin-bottom: var(--space-3); }
.mag-author-link { margin-bottom: 0; }

/* read also */
.mag-related { margin-top: var(--space-8); border-top: 1px solid var(--rule-strong); padding-top: var(--space-6); }
.mag-related h2 { font-size: var(--t-xl); margin-bottom: var(--space-5); }
.mag-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.mag-rel {
  background-color: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg);
  overflow: hidden; padding-bottom: var(--space-5);
  transition: transform 320ms var(--spring), box-shadow 320ms var(--rail), border-color 200ms var(--rail);
}
.mag-rel:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--primary-30); }
.mag-rel-media { display: block; border-bottom: 1px solid var(--rule); background-color: var(--primary-05); }
.mag-rel-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mag-rel-title { font-size: var(--t-base); line-height: 1.3; margin: var(--space-5) var(--space-5) var(--space-2); }
.mag-rel-title a { color: var(--ink); text-decoration: none; }
.mag-rel-title a:hover { color: var(--primary); text-decoration: underline; }
.mag-rel-dek {
  margin: 0 var(--space-5) var(--space-3); font-size: var(--t-sm); color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.mag-rel-meta {
  margin: 0 var(--space-5); font-size: var(--t-xs); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
}
.mag-related-all { margin: var(--space-6) 0 0; font-size: var(--t-sm); font-weight: 600; }

/* home page magazine strip */
.mag-home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.mag-home-more { margin-top: var(--space-6); font-weight: 600; }

@media (max-width: 980px) {
  .mag-grid, .mag-related-grid, .mag-home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mag-card.lead { flex-direction: column; }
  .mag-card.lead .mag-card-media { flex: none; border-right: 0; border-bottom: 1px solid var(--rule); }
  .mag-card.lead .mag-card-media img { min-height: 0; aspect-ratio: 3 / 2; }
  .mag-card.lead .mag-card-body { padding: var(--space-6); }
}
@media (max-width: 760px) {
  .mag-grid, .mag-related-grid, .mag-home-grid { grid-template-columns: 1fr; }
  .mag-article { padding-bottom: var(--space-8); }
  .mag-body { font-size: var(--t-base); }
  .mag-author { grid-template-columns: 1fr; }
  .mag-author-photo { width: 96px; height: 96px; }
  .mag-cta { padding: var(--space-6) var(--space-5) var(--space-5); }
  .mag-cta .btn { width: 100%; }
  .mag-crumb li[aria-current] { max-width: 100%; white-space: normal; }
  .mag-masthead { padding: var(--space-7) 0 var(--space-6); }
}


/* Network column: five sibling products, rotated so every site is linked the same
   number of times. Sits in the footer link grid and inherits its type and colour. */
.site-network ul { list-style: none; margin: 0; padding: 0; }
.site-network li + li { margin-top: 0.4rem; }
.site-network a { text-decoration: none; border-bottom: 1px solid transparent; }
.site-network a:hover, .site-network a:focus-visible { border-bottom-color: currentColor; }
