/* MammoLoop design system. Confident clinical: white, pale blush, rose anchor.
   Light surfaces only. Contrast comes from type scale, rules and photography. */

:root {
  --bg: #FBF8F9;
  --surface: #FFFFFF;
  --ink: #1B1A1F;
  --primary: #B03A6B;
  --accent: #F4C2CE;
  --muted: #615C66;

  --primary-deep: #8E2C55;
  --primary-05: #FCF3F7;
  --primary-10: #F8E7EE;
  --primary-18: #F2D6E2;
  --accent-soft: #FDF0F3;
  --line: #EADFE4;
  --line-strong: #D9C6CE;
  --ink-soft: #3B3842;

  --ff-display: "Red Hat Display", "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  --ff-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", Helvetica, Arial, sans-serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 88px; --s10: 120px;

  --r-sm: 6px; --r-md: 12px; --r-lg: 20px; --r-pill: 999px;

  --sh-1: 0 1px 2px rgba(27, 26, 31, .05);
  --sh-2: 0 10px 28px rgba(142, 44, 85, .08);
  --sh-3: 0 20px 60px rgba(142, 44, 85, .12);

  --t-xs: .78rem; --t-sm: .92rem; --t-base: 1.03rem; --t-lg: 1.2rem;
  --t-xl: 1.5rem; --t-2xl: 2rem; --t-3xl: 2.6rem; --t-4xl: 3.4rem;

  --wrap: 1180px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

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

/* The ribbon grid: a faint blush rule field derived from the loop motif. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(176, 58, 107, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(176, 58, 107, .035) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.15) 55%, rgba(0,0,0,0));
}

h1, h2, h3, h4, .display {
  font-family: var(--ff-display);
  font-weight: 800;
  letter-spacing: -.022em;
  line-height: 1.1;
  margin: 0 0 var(--s4);
  color: var(--ink);
}

h1 { font-size: clamp(2.1rem, 5.2vw, var(--t-4xl)); }
h2 { font-size: clamp(1.7rem, 3.6vw, var(--t-3xl)); }
h3 { font-size: var(--t-xl); font-weight: 700; }
h4 { font-size: var(--t-lg); font-weight: 700; }
p { margin: 0 0 var(--s4); }
a { color: var(--primary-deep); }
img { max-width: 100%; height: auto; display: block; }

.wrap { width: min(100% - 2 * var(--s5), var(--wrap)); margin-inline: auto; position: relative; z-index: 1; }
.section { padding-block: clamp(var(--s8), 8vw, var(--s10)); }
.section--tint { background-color: var(--primary-05); border-block: 1px solid var(--line); }
.section--surface { background-color: var(--surface); border-block: 1px solid var(--line); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--s4); top: -60px; z-index: 100;
  background-color: var(--primary); color: #FFFFFF; padding: 10px var(--s4);
  border-radius: 0 0 var(--r-sm) var(--r-sm); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 0; }

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

/* ---------- eyebrow, rules, ribbon motif ---------- */
.eyebrow {
  font-family: var(--ff-display);
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--primary-deep);
  display: inline-flex; align-items: center; gap: var(--s2); margin-bottom: var(--s3);
}
.eyebrow::before {
  content: ""; width: 26px; height: 10px; flex: none;
  border: 2px solid var(--primary); border-right: 0; border-bottom: 0;
  border-radius: 10px 0 0 0; transform: skewX(-18deg);
}
.rule { height: 1px; background-color: var(--line); border: 0; margin: 0; }
.section-head { max-width: 62ch; margin-bottom: var(--s7); }
.section-head p { color: var(--muted); font-size: var(--t-lg); }
.lede { font-size: var(--t-lg); color: var(--ink-soft); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  font-family: var(--ff-display); font-weight: 700; font-size: var(--t-base);
  padding: 13px 22px; border-radius: var(--r-pill); text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease);
}
.btn--primary { background-color: var(--primary); color: #FFFFFF; box-shadow: var(--sh-2); }
.btn--primary:hover { background-color: var(--primary-deep); transform: translateY(-2px); }
.btn--ghost { background-color: var(--surface); color: var(--primary-deep); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--primary); transform: translateY(-2px); }
.btn--block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background-color: rgba(255, 255, 255, .92);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.site-header.is-stuck { box-shadow: var(--sh-1); background-color: rgba(255, 255, 255, .98); }
.header-in { display: flex; align-items: center; gap: var(--s5); min-height: 72px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.wordmark svg { width: 32px; height: 32px; flex: none; }
.wordmark b { font-family: var(--ff-display); font-size: 1.22rem; font-weight: 800; letter-spacing: -.02em; }
.wordmark span { color: var(--primary); }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: var(--s5); list-style: none; margin: 0; padding: 0; }
.nav a {
  text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: var(--t-sm);
  padding-bottom: 3px; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--primary-deep); border-bottom-color: var(--accent); }
.header-cta { flex: none; }
.nav-toggle {
  display: none; background-color: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); width: 44px; height: 40px; margin-left: auto; cursor: pointer;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background-color: var(--ink); margin: 4px auto; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(var(--s7), 7vw, var(--s9)); position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -160px; top: -120px; width: 520px; height: 520px;
  border: 44px solid var(--primary-10); border-radius: 50%;
  clip-path: polygon(0 0, 100% 0, 100% 62%, 38% 100%, 0 100%);
  z-index: 0;
}
.hero-grid { display: grid; grid-template-columns: 1.06fr .94fr; gap: clamp(var(--s6), 5vw, var(--s8)); align-items: center; }
.hero h1 { max-width: 15ch; }
.hero .lede { max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-block: var(--s6) var(--s6); }
.trust {
  list-style: none; margin: 0; padding: var(--s4) 0 0; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4);
}
.trust li { font-size: var(--t-sm); color: var(--muted); line-height: 1.4; }
.trust b { display: block; font-family: var(--ff-display); font-size: var(--t-lg); color: var(--ink); }
.hero-figure { position: relative; }
.hero-figure img { border-radius: var(--r-lg); box-shadow: var(--sh-3); }
.hero-figure::before {
  content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: var(--r-lg);
  border: 2px solid var(--accent); z-index: -1;
}
.hero-chip {
  position: absolute; left: -18px; bottom: 26px; background-color: var(--surface);
  border: 1px solid var(--line); border-left: 4px solid var(--primary);
  border-radius: var(--r-md); padding: var(--s3) var(--s4); box-shadow: var(--sh-2); max-width: 250px;
}
.hero-chip strong { font-family: var(--ff-display); display: block; font-size: var(--t-lg); }
.hero-chip span { font-size: var(--t-xs); color: var(--muted); }

/* ---------- cards ---------- */
.grid { display: grid; gap: var(--s5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background-color: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--s5); box-shadow: var(--sh-1);
}
.card h3 { margin-bottom: var(--s2); }
.card p { color: var(--muted); margin-bottom: 0; }
.card--pain { border-top: 3px solid var(--accent); }
.cost {
  display: inline-block; margin-top: var(--s3); font-family: var(--ff-display);
  font-weight: 800; color: var(--primary-deep); background-color: var(--primary-10);
  padding: 3px 12px; border-radius: var(--r-pill); font-size: var(--t-sm);
}

.icon { width: 42px; height: 42px; margin-bottom: var(--s3); color: var(--primary); }
.icon svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 2; fill: none;
  stroke-linecap: round; stroke-linejoin: round; }

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; gap: var(--s5); }
.step { position: relative; padding-left: 74px; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  position: absolute; left: 0; top: 0; width: 52px; height: 52px; border-radius: 50%;
  border: 2px solid var(--primary); color: var(--primary-deep);
  background-color: var(--primary-05);
  font-family: var(--ff-display); font-weight: 800; font-size: 1.05rem;
  display: grid; place-items: center;
}
.step::after {
  content: ""; position: absolute; left: 26px; top: 58px; bottom: -22px; width: 2px;
  background-color: var(--line-strong);
}
.step:last-child::after { display: none; }
.step h3 { margin-bottom: var(--s1); }
.step p { color: var(--muted); margin-bottom: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(var(--s6), 5vw, var(--s8)); align-items: center; }
.split img { border-radius: var(--r-lg); box-shadow: var(--sh-2); }

/* ---------- recall queue motif ---------- */
.queue { list-style: none; margin: var(--s5) 0 0; padding: 0; border: 1px solid var(--line);
  border-radius: var(--r-md); background-color: var(--surface); overflow: hidden; }
.queue li {
  display: flex; align-items: center; gap: var(--s3); padding: 12px var(--s4);
  border-bottom: 1px solid var(--line); font-size: var(--t-sm);
  animation: clearRow .7s var(--ease) both;
}
.queue li:last-child { border-bottom: 0; }
.queue li:nth-child(1) { animation-delay: .05s; }
.queue li:nth-child(2) { animation-delay: .22s; }
.queue li:nth-child(3) { animation-delay: .39s; }
.queue li:nth-child(4) { animation-delay: .56s; }
.queue li:nth-child(5) { animation-delay: .73s; }
.queue .dot { width: 10px; height: 10px; flex: none; border-radius: 50%; border: 2px solid var(--primary); }
.queue .done .dot { background-color: var(--accent); }
.queue .tag { margin-left: auto; font-size: var(--t-xs); color: var(--muted); }
@keyframes clearRow {
  from { opacity: 0; transform: translateX(-14px); background-color: var(--primary-10); }
  to { opacity: 1; transform: none; }
}

/* ---------- outcomes ---------- */
.outcome { background-color: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s6) var(--s5); }
.outcome .num {
  font-family: var(--ff-display); font-weight: 800; font-size: clamp(2.2rem, 4vw, 3rem);
  color: var(--primary); line-height: 1; display: block; margin-bottom: var(--s2);
}
.outcome p { color: var(--muted); margin-bottom: 0; }

/* ---------- testimonials ---------- */
.testimonial {
  background-color: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s6) var(--s5) var(--s5); position: relative; margin: 0;
}
.testimonial::before {
  content: ""; position: absolute; top: -1px; left: 24px; width: 46px; height: 6px;
  background-color: var(--primary); border-radius: 0 0 var(--r-pill) var(--r-pill);
}
.testimonial p { font-size: var(--t-lg); line-height: 1.55; }
.testimonial footer { font-size: var(--t-sm); color: var(--muted); border-top: 1px solid var(--line); padding-top: var(--s3); }
.testimonial cite { font-style: normal; font-weight: 700; color: var(--ink); display: block; font-family: var(--ff-display); }
.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); margin-top: var(--s6);
  border: 1px solid var(--line-strong); border-radius: var(--r-md); background-color: var(--primary-05); padding: var(--s5); }
.results div { text-align: center; }
.results b { display: block; font-family: var(--ff-display); font-size: 2rem; color: var(--primary-deep); }
.results span { font-size: var(--t-sm); color: var(--muted); }

/* ---------- pricing ---------- */
.tier { background-color: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s6) var(--s5); display: flex; flex-direction: column; }
.tier--best { border: 2px solid var(--primary); box-shadow: var(--sh-3); position: relative; }
.tier--best::before {
  content: "Most chosen"; position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background-color: var(--primary); color: #FFFFFF; font-family: var(--ff-display); font-weight: 700;
  font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 14px; border-radius: var(--r-pill); white-space: nowrap;
}
.tier .price { font-family: var(--ff-display); font-size: 2.7rem; font-weight: 800; line-height: 1; }
.tier .per { color: var(--muted); font-size: var(--t-sm); }
.tier ul { list-style: none; margin: var(--s5) 0; padding: 0; display: grid; gap: 10px; }
.tier li { padding-left: 28px; position: relative; font-size: var(--t-sm); color: var(--ink-soft); }
.tier li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 14px;
  border: 2px solid var(--primary); border-radius: 50%;
}
.tier .btn { margin-top: auto; }
.billing-note { margin-top: var(--s5); font-size: var(--t-sm); color: var(--muted); text-align: center; }

/* ---------- faq ---------- */
.faq { border-top: 1px solid var(--line-strong); max-width: 860px; }
.faq-item { border-bottom: 1px solid var(--line-strong); }
.faq-q {
  width: 100%; text-align: left; background-color: transparent; border: 0; cursor: pointer;
  font-family: var(--ff-display); font-weight: 700; font-size: var(--t-lg); color: var(--ink);
  padding: var(--s5) 44px var(--s5) 0; position: relative;
}
.faq-q::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 13px; height: 13px;
  border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
  transform: translateY(-70%) rotate(45deg); transition: transform .22s var(--ease);
}
.faq-q[aria-expanded="true"]::after { transform: translateY(-30%) rotate(-135deg); }
.faq-a { padding: 0 0 var(--s5); color: var(--muted); max-width: 70ch; }
.faq-a[hidden] { display: none; }

/* ---------- form ---------- */
.form-shell { background-color: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(var(--s5), 4vw, var(--s7)); box-shadow: var(--sh-2); }
.field { margin-bottom: var(--s4); }
.field label { display: block; font-weight: 700; font-size: var(--t-sm); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: var(--t-sm); color: var(--ink);
  background-color: var(--bg); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: 11px var(--s3);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); }
.field [aria-invalid="true"] { border-color: var(--primary-deep); background-color: var(--primary-05); }
.err { display: block; color: var(--primary-deep); font-size: var(--t-xs); font-weight: 700; margin-top: 5px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: var(--t-sm); }
.consent input { width: auto; margin-top: 5px; }
.form-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s4); }
.form-note { font-size: var(--t-sm); color: var(--muted); margin-top: var(--s4); }

/* ---------- byline ---------- */
.byline { display: flex; gap: var(--s4); align-items: center; border: 1px solid var(--line);
  border-left: 4px solid var(--primary); background-color: var(--surface);
  border-radius: var(--r-md); padding: var(--s5); margin-top: var(--s7); }
.byline p { margin: 0; font-size: var(--t-sm); color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { background-color: var(--primary-05); border-top: 1px solid var(--line-strong); padding-block: var(--s8) var(--s5); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: var(--s6); }
.site-footer h2 { font-size: var(--t-sm); text-transform: uppercase; letter-spacing: .12em; color: var(--primary-deep); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer a { color: var(--ink-soft); text-decoration: none; font-size: var(--t-sm); }
.site-footer a:hover { color: var(--primary-deep); text-decoration: underline; }
.social { display: flex; gap: 10px; margin-top: var(--s4); }
.social a { width: 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: 50%;
  display: grid; place-items: center; background-color: var(--surface); color: var(--primary-deep); }
.social svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 2; fill: none; }
.footer-base { margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid var(--line-strong);
  display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: space-between;
  font-size: var(--t-xs); color: var(--muted); }

/* ---------- prose pages ---------- */
.prose { max-width: 74ch; }
.prose h2 { margin-top: var(--s7); font-size: var(--t-2xl); }
.prose h3 { margin-top: var(--s5); }
.prose ul, .prose ol { padding-left: var(--s5); color: var(--ink-soft); }
.prose li { margin-bottom: 7px; }
.page-hero { padding-block: var(--s8) var(--s6); border-bottom: 1px solid var(--line); background-color: var(--surface); }
.author-grid { display: grid; grid-template-columns: 300px 1fr; gap: var(--s7); align-items: start; }
.author-grid img { border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--sh-2); }
.map-group { border: 1px solid var(--line); border-radius: var(--r-md); background-color: var(--surface); padding: var(--s5); }
.map-group ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.map-group a { font-weight: 700; }
.map-group span { display: block; font-size: var(--t-sm); color: var(--muted); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .split, .author-grid { grid-template-columns: 1fr; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%;
    background-color: var(--surface); border-bottom: 1px solid var(--line); padding: var(--s4) var(--s5); }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: var(--s4); }
  .nav-toggle { display: block; }
  .header-cta { display: none; }
  .hero-figure::before { display: none; }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4, .trust, .results, .form-cols { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-chip { position: static; margin-top: var(--s4); max-width: none; }
  .hero::after { display: none; }
  .step { padding-left: 58px; }
  .step::before { width: 42px; height: 42px; font-size: .9rem; }
  .step::after { left: 21px; top: 48px; }
}

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

/* ================================================================
   Recall Room, the magazine. Extends the tokens above, nothing new.
   Light surfaces only: white cards on blush, rose rules, ribbon corner.
   ================================================================ */

.mag-crumb { padding-block: var(--s5) 0; }
.mag-crumb ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2);
  font-size: var(--t-sm); color: var(--muted);
}
.mag-crumb li { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.mag-crumb li + li::before { content: ""; width: 12px; height: 1px; background-color: var(--line-strong); flex: none; }
.mag-crumb a { color: var(--primary-deep); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.mag-crumb a:hover { border-bottom-color: var(--primary); }
.mag-crumb [aria-current="page"] {
  color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch;
}

/* ---------- masthead of the magazine index ---------- */
.mag-masthead { padding-block: var(--s7) var(--s6); }
.mag-masthead h1 { max-width: 16ch; }
.mag-masthead-meta {
  color: var(--muted); font-size: var(--t-sm); max-width: 62ch;
  border-top: 1px solid var(--line); padding-top: var(--s4); margin-top: var(--s5);
}
.mag-standfirst {
  font-size: var(--t-lg); line-height: 1.55; color: var(--ink-soft);
  max-width: 66ch; margin-bottom: var(--s5);
}

/* ---------- index grid and lead card ---------- */
.mag-index { padding-block: 0 clamp(var(--s8), 8vw, var(--s10)); }
.mag-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6) var(--s5); }
.mag-card {
  grid-column: span 1;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.mag-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-strong); }
.mag-card-media { display: block; background-color: var(--primary-05); }
.mag-card-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mag-card-body { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); flex: 1; }
.mag-kicker {
  font-family: var(--ff-display); font-size: var(--t-xs); font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--primary-deep);
  margin: 0;
}
.mag-card-title { font-size: var(--t-lg); line-height: 1.24; margin: 0; }
.mag-card-title a { color: var(--ink); text-decoration: none; }
.mag-card-title a:hover { color: var(--primary-deep); }
.mag-card-dek { color: var(--muted); font-size: var(--t-sm); margin: 0; }
.mag-card-meta {
  margin: auto 0 0; padding-top: var(--s3); border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center;
  font-size: var(--t-xs); color: var(--muted);
}
.mag-card-meta span::before { content: ""; }

.mag-card.lead { grid-column: 1 / -1; flex-direction: row; align-items: stretch; }
.mag-card.lead .mag-card-media { flex: 1 1 56%; }
.mag-card.lead .mag-card-media img { height: 100%; aspect-ratio: auto; min-height: 320px; }
.mag-card.lead .mag-card-body { flex: 1 1 44%; padding: clamp(var(--s5), 3vw, var(--s7)); justify-content: center; }
.mag-card.lead .mag-card-title { font-family: var(--ff-display); font-size: clamp(1.5rem, 2.6vw, var(--t-2xl)); }
.mag-card.lead .mag-card-dek { font-size: var(--t-base); }
.mag-card.lead .mag-card-body::before {
  content: "Latest"; align-self: flex-start;
  font-family: var(--ff-display); font-size: var(--t-xs); font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--primary-deep);
  background-color: var(--primary-10); border-radius: var(--r-pill);
  padding: 5px 12px; margin-bottom: var(--s2);
}
.mag-index-foot {
  margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line);
  color: var(--muted); font-size: var(--t-base);
}

/* ---------- article header ---------- */
.mag-article { padding-block: var(--s6) clamp(var(--s8), 8vw, var(--s10)); }
.mag-head { max-width: 72ch; margin-bottom: var(--s6); }
.mag-head h1 { font-size: clamp(1.9rem, 4.2vw, var(--t-3xl)); max-width: 22ch; max-width: 26ch; }
.mag-byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4);
  font-size: var(--t-sm); color: var(--muted);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding-block: var(--s3); margin: 0;
}
.mag-byline span { display: inline-flex; align-items: center; gap: var(--s2); }
.mag-byline span + span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background-color: var(--line-strong); }
.mag-byline a { color: var(--primary-deep); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.mag-byline a:hover { border-bottom-color: var(--primary); }

.mag-figure { margin: 0 0 var(--s7); }
.mag-figure img {
  width: 100%; border-radius: var(--r-lg); border: 1px solid var(--line);
  aspect-ratio: 3 / 2; object-fit: cover; background-color: var(--primary-05);
}
.mag-figure figcaption {
  margin-top: var(--s3); font-size: var(--t-xs); color: var(--muted);
  max-width: 68ch; padding-left: var(--s4); border-left: 2px solid var(--accent);
}

/* ---------- article body typography ---------- */
.mag-body { max-width: 68ch; font-size: 1.08rem; line-height: 1.72; color: var(--ink-soft); }
.mag-body > p { margin: 0 0 var(--s5); }
.mag-body h2 {
  font-size: clamp(1.45rem, 2.8vw, 1.85rem); line-height: 1.2; color: var(--ink);
  margin: var(--s8) 0 var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line);
}
.mag-body h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.mag-body h3 { font-size: var(--t-lg); color: var(--ink); margin: var(--s6) 0 var(--s3); }
.mag-body strong { color: var(--ink); font-weight: 700; }
.mag-body a { color: var(--primary-deep); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.mag-body a:hover { text-decoration-thickness: 2px; }
.mag-body ul, .mag-body ol { margin: 0 0 var(--s5); padding-left: var(--s5); }
.mag-body li { margin-bottom: var(--s3); }
.mag-body ul { list-style: none; padding-left: 0; }
.mag-body ul > li { position: relative; padding-left: var(--s5); }
.mag-body ul > li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--primary); background-color: var(--surface);
}
.mag-body blockquote {
  margin: var(--s6) 0; padding: var(--s5) var(--s5) var(--s5) var(--s6);
  background-color: var(--primary-05); border-left: 3px solid var(--primary);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-family: var(--ff-display); font-weight: 500; font-size: var(--t-lg);
  line-height: 1.5; color: var(--ink);
}
.mag-body blockquote p:last-child { margin-bottom: 0; }
.mag-body table {
  width: 100%; border-collapse: collapse; margin: 0 0 var(--s6);
  font-size: var(--t-sm); background-color: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
}
.mag-body thead th {
  background-color: var(--primary-10); color: var(--ink);
  font-family: var(--ff-display); font-size: var(--t-xs);
  letter-spacing: .08em; text-transform: uppercase; text-align: left;
}
.mag-body th, .mag-body td { padding: 10px var(--s4); border-bottom: 1px solid var(--line); vertical-align: top; }
.mag-body tbody tr:last-child td { border-bottom: 0; }
.mag-body tbody tr:nth-child(even) { background-color: var(--accent-soft); }

.inline-read {
  margin: var(--s6) 0; padding: var(--s4) var(--s5);
  background-color: var(--accent-soft); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 0 var(--r-md) var(--r-md) 0;
  font-family: var(--ff-display); font-weight: 500; font-size: var(--t-base);
  line-height: 1.45; color: var(--ink);
}
.inline-read a { color: var(--primary-deep); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--primary-18); }
.inline-read a:hover { border-bottom-color: var(--primary); }

/* ---------- call to action after the body ---------- */
.mag-cta {
  max-width: 72ch; margin-top: var(--s8);
  background-color: var(--primary-05);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: clamp(var(--s5), 4vw, var(--s7));
  position: relative; overflow: hidden;
}
.mag-cta::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 140px; height: 140px; border-radius: 50%;
  border: 2px solid var(--primary-18); pointer-events: none;
}
.mag-cta h2 { font-size: clamp(1.4rem, 2.6vw, var(--t-2xl)); max-width: 20ch; }
.mag-cta p { color: var(--ink-soft); max-width: 58ch; }
.mag-cta .btn { margin-top: var(--s2); }

/* ---------- author box ---------- */
.mag-author {
  max-width: 72ch; margin-top: var(--s7);
  display: grid; grid-template-columns: 160px 1fr; gap: var(--s5);
  background-color: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--s5); box-shadow: var(--sh-1);
}
.mag-author img { border-radius: var(--r-md); width: 160px; height: 160px; object-fit: cover; background-color: var(--primary-05); }
.mag-author h2 { font-size: var(--t-xl); margin-bottom: var(--s3); }
.mag-author p { color: var(--muted); font-size: var(--t-sm); }
.mag-author .eyebrow { margin-bottom: var(--s2); }
.mag-author-link { color: var(--primary-deep); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--primary-18); }
.mag-author-link:hover { border-bottom-color: var(--primary); }

/* ---------- read also ---------- */
.mag-related { margin-top: var(--s9); border-top: 1px solid var(--line); padding-top: var(--s6); }
.mag-related > h2 { font-size: var(--t-2xl); margin-bottom: var(--s5); }
.mag-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
.mag-rel {
  background-color: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.mag-rel:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.mag-rel-media { display: block; background-color: var(--primary-05); }
.mag-rel-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mag-rel-body { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s2); flex: 1; }
.mag-rel h3 { font-size: var(--t-base); line-height: 1.3; margin: 0; }
.mag-rel h3 a { color: var(--ink); text-decoration: none; }
.mag-rel h3 a:hover { color: var(--primary-deep); }
.mag-rel p { color: var(--muted); font-size: var(--t-xs); margin: 0; }

/* ---------- home page magazine teaser ---------- */
.mag-teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
.mag-teaser-foot { margin-top: var(--s6); }

/* ---------- author page and site map listings ---------- */
.mag-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); }
.mag-list li {
  border-left: 2px solid var(--primary-18); padding-left: var(--s4);
}
.mag-list a { font-family: var(--ff-display); font-weight: 700; color: var(--primary-deep); text-decoration: none; }
.mag-list a:hover { text-decoration: underline; }
.mag-list time, .mag-list span { display: block; font-size: var(--t-sm); color: var(--muted); }

@media (max-width: 900px) {
  .mag-grid, .mag-related-grid, .mag-teaser-grid { grid-template-columns: repeat(2, 1fr); }
  .mag-card.lead { flex-direction: column; }
  .mag-card.lead .mag-card-media img { min-height: 0; aspect-ratio: 3 / 2; }
}
@media (max-width: 640px) {
  .mag-grid, .mag-related-grid, .mag-teaser-grid { grid-template-columns: 1fr; }
  .mag-author { grid-template-columns: 1fr; }
  .mag-author img { width: 120px; height: 120px; }
  .mag-crumb [aria-current="page"] { max-width: 24ch; }
  .mag-body { font-size: 1.04rem; }
  .mag-body table { display: block; overflow-x: auto; }
  .mag-figure img { border-radius: var(--r-md); }
}


/* 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; }
