/* PaperKeepsake design system. Album warm: aged ivory, dusty peach, deep sepia.
   Light surfaces only. Contrast comes from type, rules, tints and photographs. */

:root {
  --bg: #FBF7F3;
  --surface: #FFFFFF;
  --ink: #241F1B;
  --primary: #7C4B33;
  --accent: #E9C3A9;
  --muted: #6C6157;

  --primary-tint-05: #F6EFEA;
  --primary-tint-12: #EFE2DA;
  --primary-tint-22: #E4CFC3;
  --accent-soft: #F7E6DA;
  --accent-deep: #DFAE8E;
  --ivory: #F4EDE5;
  --rule: #E0D4C8;
  --rule-strong: #CDBAAA;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 18px;
  --space-5: 26px;
  --space-6: 38px;
  --space-7: 56px;
  --space-8: 80px;
  --space-9: 112px;

  --radius-sm: 3px;
  --radius: 6px;
  --radius-lg: 12px;

  --shadow-page: 0 1px 0 var(--rule), 0 14px 30px rgba(36, 31, 27, 0.07);
  --shadow-lift: 0 18px 44px rgba(36, 31, 27, 0.12);
  --shadow-photo: 0 10px 26px rgba(36, 31, 27, 0.16);

  --font-display: "Grenze", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-body: "Signika", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.86rem, 0.84rem + 0.1vw, 0.93rem);
  --step-0: clamp(1rem, 0.97rem + 0.16vw, 1.09rem);
  --step-1: clamp(1.16rem, 1.1rem + 0.3vw, 1.32rem);
  --step-2: clamp(1.42rem, 1.3rem + 0.6vw, 1.78rem);
  --step-3: clamp(1.78rem, 1.55rem + 1.1vw, 2.5rem);
  --step-4: clamp(2.3rem, 1.8rem + 2.3vw, 3.9rem);

  --wrap: 1180px;
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(to bottom, rgba(124, 75, 51, 0.05) 0 1px, rgba(255, 255, 255, 0) 1px 34px),
    radial-gradient(circle at 12% 8%, rgba(233, 195, 169, 0.32), rgba(251, 247, 243, 0) 46%),
    radial-gradient(circle at 88% 2%, rgba(233, 195, 169, 0.22), rgba(251, 247, 243, 0) 40%);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.005em;
  margin: 0 0 var(--space-4);
}
h1 { font-size: var(--step-4); font-weight: 500; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-family: var(--font-body); font-weight: 600; line-height: 1.35; }
p { margin: 0 0 var(--space-4); }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

.skip-link {
  position: absolute; left: var(--space-3); top: -60px; z-index: 200;
  background: var(--surface); color: var(--primary); font-weight: 600;
  padding: 10px 16px; border: 1px solid var(--primary); border-radius: var(--radius);
  transition: top 0.18s ease;
}
.skip-link:focus { top: var(--space-3); }

/* ---------- eyebrow, rules, photo corners ---------- */

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.76rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 var(--space-3);
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::after {
  content: ""; height: 1px; flex: 1; max-width: 130px;
  background-image: linear-gradient(to right, var(--rule-strong), rgba(224, 212, 200, 0));
}

.album-rule {
  height: 3px; border: 0; margin: 0;
  background-image: linear-gradient(to right, var(--accent-deep) 0 46px, var(--rule) 46px 100%);
}

.corners { position: relative; }
.corners::before, .corners::after {
  content: ""; position: absolute; width: 22px; height: 22px; pointer-events: none;
  background-color: var(--accent);
}
.corners::before {
  top: 0; left: 0;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.corners::after {
  bottom: 0; right: 0;
  clip-path: polygon(100% 100%, 100% 0, 0 100%);
}

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 90;
  background-color: rgba(251, 247, 243, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}
.site-header.is-stuck { box-shadow: 0 10px 24px rgba(36, 31, 27, 0.08); }
.header-inner { display: flex; align-items: center; gap: var(--space-5); padding: 14px 0; }

.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.wordmark svg { width: 34px; height: 34px; flex: none; }
.wordmark b {
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; letter-spacing: 0.01em;
}
.wordmark span { display: block; font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }

.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: var(--space-5); margin: 0; padding: 0; }
.nav a {
  text-decoration: none; color: var(--ink); font-size: 0.95rem; font-weight: 500;
  padding: 6px 0; position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background-color: var(--accent-deep); transition: right 0.25s ease;
}
.nav a:hover::after, .nav a:focus-visible::after { right: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.97rem;
  padding: 12px 22px; border-radius: var(--radius); text-decoration: none;
  border: 1px solid var(--primary); cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.btn-primary { background-color: var(--primary); color: #FFFFFF; }
.btn-primary:hover { color: #FFFFFF; transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-ghost { background-color: var(--surface); color: var(--primary); }
.btn-ghost:hover { background-color: var(--primary-tint-05); transform: translateY(-2px); }
.btn-lg { padding: 15px 28px; font-size: 1.03rem; }

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

/* ---------- hero ---------- */

.hero { padding: var(--space-8) 0 var(--space-7); }
.hero-grid { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: var(--space-7); align-items: center; }
.hero h1 { margin-bottom: var(--space-4); }
.hero h1 em { font-style: italic; color: var(--primary); }
.hero-lede { font-size: var(--step-1); color: var(--muted); max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-6); }

.trust {
  list-style: none; margin: 0; padding: var(--space-4) 0 0; display: grid; gap: var(--space-3);
  border-top: 1px solid var(--rule);
}
.trust li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.94rem; color: var(--muted); }
.trust svg { width: 18px; height: 18px; flex: none; margin-top: 3px; stroke: var(--primary); }
.trust b { color: var(--ink); }

.photo-frame {
  position: relative; padding: 14px; background-color: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-photo); transform: rotate(-1.1deg);
}
.photo-frame img { border-radius: 2px; }
.photo-frame figcaption {
  font-family: var(--font-display); font-size: 1.05rem; color: var(--muted);
  padding-top: 10px; text-align: center;
}
.photo-frame::before, .photo-frame::after {
  content: ""; position: absolute; width: 30px; height: 30px; background-color: var(--accent-deep);
}
.photo-frame::before { top: -1px; left: -1px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.photo-frame::after { bottom: -1px; right: -1px; clip-path: polygon(100% 100%, 100% 0, 0 100%); }

/* ---------- sections ---------- */

section { padding: var(--space-8) 0; }
.section-head { max-width: 62ch; margin-bottom: var(--space-6); }
.section-head p { color: var(--muted); font-size: var(--step-1); margin-bottom: 0; }

.band { background-color: var(--ivory); border-block: 1px solid var(--rule); }
.band-tint { background-color: var(--primary-tint-05); border-block: 1px solid var(--rule); }

.card {
  background-color: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: var(--space-5);
  box-shadow: var(--shadow-page);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; color: var(--muted); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }

.cost {
  display: inline-block; margin-top: var(--space-4); font-family: var(--font-display);
  font-size: 1.15rem; color: var(--primary); border-top: 1px dashed var(--rule-strong);
  padding-top: 10px;
}

/* steps */
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); align-items: start; }
.step-list { counter-reset: step; display: grid; gap: var(--space-5); }
.step {
  position: relative; padding-left: 74px;
}
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0; width: 54px; height: 54px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.4rem; color: var(--primary);
  background-color: var(--accent-soft); border: 1px solid var(--accent-deep);
  border-radius: 50%;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); margin-bottom: 0; }

/* features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.feature { padding-top: var(--space-5); border-top: 2px solid var(--rule); }
.feature .ico {
  width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: var(--space-3);
  border: 1px solid var(--accent-deep); background-color: var(--accent-soft); border-radius: var(--radius-sm);
}
.feature .ico svg { width: 24px; height: 24px; stroke: var(--primary); fill: none; stroke-width: 1.4; }
.feature p { color: var(--muted); margin-bottom: 0; }

/* outcomes */
.outcomes { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
.outcome { background-color: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--space-5); }
.outcome .num { font-family: var(--font-display); font-size: 2.7rem; color: var(--primary); line-height: 1; display: block; margin-bottom: 8px; }
.outcome p { color: var(--muted); margin-bottom: 0; font-size: 0.95rem; }

/* testimonials */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.testimonial {
  background-color: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: var(--space-6) var(--space-5) var(--space-5); margin: 0; position: relative;
  box-shadow: var(--shadow-page);
}
.testimonial::before {
  content: ""; position: absolute; top: 0; left: 0; width: 26px; height: 26px;
  background-color: var(--accent); clip-path: polygon(0 0, 100% 0, 0 100%);
}
.testimonial p { font-size: 1.03rem; }
.testimonial footer { border-top: 1px solid var(--rule); padding-top: var(--space-3); font-size: 0.9rem; color: var(--muted); }
.testimonial footer b { display: block; color: var(--ink); font-size: 1rem; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); margin-top: var(--space-6); border-top: 1px solid var(--rule); padding-top: var(--space-5); }
.metrics div { text-align: center; }
.metrics strong { display: block; font-family: var(--font-display); font-size: 2.2rem; color: var(--primary); line-height: 1.1; }
.metrics span { color: var(--muted); font-size: 0.92rem; }

/* pricing */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); align-items: start; }
.tier {
  background-color: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: var(--space-6) var(--space-5); position: relative;
}
.tier.is-featured { border: 2px solid var(--primary); box-shadow: var(--shadow-lift); }
.tier .flag {
  position: absolute; top: -14px; left: var(--space-5);
  background-color: var(--primary); color: #FFFFFF; font-size: 0.7rem; letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 600; padding: 5px 12px; border-radius: 999px;
}
.price { font-family: var(--font-display); font-size: 3rem; color: var(--ink); line-height: 1; }
.price small { font-family: var(--font-body); font-size: 0.92rem; color: var(--muted); }
.tier ul { list-style: none; margin: var(--space-4) 0 var(--space-5); padding: 0; display: grid; gap: 10px; }
.tier li { position: relative; padding-left: 26px; font-size: 0.95rem; color: var(--muted); }
.tier li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 12px; height: 12px;
  background-color: var(--accent); clip-path: polygon(0 0, 100% 0, 0 100%);
}
.tier .btn { width: 100%; }
.billing-note { margin-top: var(--space-5); color: var(--muted); font-size: 0.95rem; text-align: center; }

/* faq */
.faq { max-width: 860px; }
.qa { border-bottom: 1px solid var(--rule); }
.qa button {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: var(--font-body); font-size: 1.07rem; font-weight: 600; color: var(--ink);
  padding: var(--space-4) 40px var(--space-4) 0; position: relative;
}
.qa button::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px;
  border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.25s ease;
}
.qa button[aria-expanded="true"]::after { transform: translateY(-30%) rotate(225deg); }
.qa .answer { padding: 0 0 var(--space-4); color: var(--muted); max-width: 72ch; }
.qa .answer p:last-child { margin-bottom: 0; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--space-7); align-items: start; }
.form-card {
  background-color: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius);
  padding: var(--space-6); box-shadow: var(--shadow-page);
}
.field { margin-bottom: var(--space-4); }
.field label { display: block; font-weight: 600; font-size: 0.93rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background-color: var(--bg); border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm); padding: 11px 12px;
}
.field textarea { min-height: 130px; resize: vertical; }
.field [aria-invalid="true"] { border-color: #8C2F1B; background-color: #FCF2EE; }
.err { color: #8C2F1B; font-size: 0.86rem; margin-top: 5px; display: block; min-height: 1px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; }
.consent input { width: 18px; height: 18px; margin-top: 4px; flex: none; }
.form-note { color: var(--muted); font-size: 0.9rem; margin-top: var(--space-4); }
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.checklist li { padding-left: 24px; position: relative; color: var(--muted); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 11px; height: 11px;
  border: 1px solid var(--primary); background-color: var(--accent-soft);
}

/* author byline */
.byline {
  display: flex; gap: var(--space-4); align-items: center; padding: var(--space-5);
  background-color: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--accent-deep);
  border-radius: var(--radius); margin-top: var(--space-7);
}
.byline p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- footer ---------- */

.site-footer {
  background-color: var(--primary-tint-05);
  border-top: 3px solid var(--accent-deep);
  padding: var(--space-8) 0 var(--space-5);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--space-6); }
.footer-grid h2 { font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--primary); margin-bottom: var(--space-4); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.footer-grid a:hover { color: var(--primary); text-decoration: underline; }
.footer-pos { color: var(--muted); font-size: 0.95rem; max-width: 34ch; }
.socials { display: flex; gap: 10px; margin-top: var(--space-4); }
.socials a {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background-color: var(--surface);
}
.socials svg { width: 18px; height: 18px; stroke: var(--primary); fill: none; stroke-width: 1.5; }
.footer-base {
  margin-top: var(--space-7); padding-top: var(--space-4); border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: space-between;
  color: var(--muted); font-size: 0.88rem;
}

/* ---------- long form pages ---------- */

.prose { max-width: 78ch; }
.prose h2 { margin-top: var(--space-7); font-size: var(--step-2); }
.prose h3 { margin-top: var(--space-5); }
.prose ul, .prose ol { color: var(--muted); padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.page-head { padding: var(--space-7) 0 var(--space-5); border-bottom: 1px solid var(--rule); }
.page-head p { color: var(--muted); max-width: 66ch; margin-bottom: 0; }
.dl { display: grid; gap: var(--space-3); margin: 0 0 var(--space-5); }
.dl div { display: grid; grid-template-columns: 220px 1fr; gap: var(--space-4); padding-bottom: 10px; border-bottom: 1px dashed var(--rule); }
.dl dt { font-weight: 600; }
.dl dd { margin: 0; color: var(--muted); }
.portrait { max-width: 240px; border: 1px solid var(--rule); padding: 10px; background-color: var(--surface); box-shadow: var(--shadow-photo); }
.author-grid { display: grid; grid-template-columns: 260px 1fr; gap: var(--space-6); align-items: start; }
.map-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.map-grid ul { list-style: none; padding: 0; display: grid; gap: var(--space-3); }
.map-grid li { border-bottom: 1px dashed var(--rule); padding-bottom: 10px; }
.map-grid span { display: block; color: var(--muted); font-size: 0.9rem; }

/* ---------- motion: photographs settle onto the page ---------- */

.reveal { opacity: 0; transform: translateY(18px) rotate(-0.8deg); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.22, 0.9, 0.28, 1);
}

/* ---------- responsive ---------- */

@media (max-width: 1020px) {
  .hero-grid, .steps, .contact-grid { grid-template-columns: 1fr; }
  .features, .outcomes, .quotes, .tiers, .grid-3, .metrics { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .author-grid, .map-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background-color: var(--surface); border-bottom: 1px solid var(--rule);
    padding: var(--space-4) 0; display: none;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: var(--space-3); width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
  .header-inner { position: relative; }
  .header-cta { display: none; }
  .features, .outcomes, .quotes, .tiers, .grid-3, .grid-2, .metrics, .two-up { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .dl div { grid-template-columns: 1fr; }
  section { padding: var(--space-7) 0; }
  .photo-frame { transform: none; }
}

@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;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .nav-toggle { display: none; }
}

/* ================= The Archive Table: magazine ================= */

.mag-crumb { padding: var(--space-5) 0 0; }
.mag-crumb ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 0.86rem; color: var(--muted);
}
.mag-crumb li + li::before { content: "/"; color: var(--rule-strong); margin-right: 8px; }
.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); max-width: 46ch; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- magazine index ---------- */

.mag-index-head { padding: var(--space-6) 0 var(--space-5); }
.mag-index-head h1 { max-width: 18ch; }
.mag-standfirst {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.28;
  color: var(--primary);
  max-width: 44ch;
  margin-bottom: var(--space-4);
}
.mag-index-note { color: var(--muted); max-width: 66ch; }
.mag-index-head .album-rule { margin-top: var(--space-5); }

.mag-index { padding: var(--space-6) 0 var(--space-8); }
.mag-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6) var(--space-5); }

.mag-card {
  background-color: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-page);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.mag-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.mag-card-photo { display: block; background-color: var(--ivory); }
.mag-card-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mag-card-text { padding: var(--space-5); display: flex; flex-direction: column; flex: 1; }
.mag-card-text .eyebrow { font-size: 0.7rem; margin-bottom: var(--space-2); }
.mag-card h2 { font-size: var(--step-1); line-height: 1.24; margin-bottom: var(--space-3); }
.mag-card h2 a { color: var(--ink); text-decoration: none; }
.mag-card h2 a:hover { color: var(--primary); text-decoration: underline; }
.mag-card-dek { color: var(--muted); font-size: 0.95rem; }
.mag-card-meta {
  margin: auto 0 0; padding-top: var(--space-3);
  border-top: 1px dashed var(--rule);
  color: var(--muted); font-size: 0.85rem;
  display: flex; align-items: center; gap: 8px;
}
.mag-sep { color: var(--rule-strong); }

.mag-card.lead { grid-column: 1 / -1; flex-direction: row; align-items: stretch; }
.mag-card.lead .mag-card-photo { flex: 1 1 58%; }
.mag-card.lead .mag-card-photo img { height: 100%; aspect-ratio: auto; min-height: 340px; }
.mag-card.lead .mag-card-text { flex: 1 1 42%; justify-content: center; padding: var(--space-7) var(--space-6); }
.mag-card.lead h2 { font-size: var(--step-3); font-weight: 500; }
.mag-card.lead .mag-card-dek { font-size: var(--step-1); }

/* ---------- article page ---------- */

.mag-article { padding: var(--space-5) 0 var(--space-7); }
.mag-head { max-width: 72ch; margin-bottom: var(--space-6); }
.mag-head h1 { font-size: var(--step-3); max-width: 22ch; margin-bottom: var(--space-4); }
.mag-head .mag-standfirst { color: var(--muted); font-size: var(--step-1); max-width: 60ch; }
.mag-byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 0.9rem; color: var(--muted);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: var(--space-3) 0; margin-bottom: 0;
}
.mag-byline a { color: var(--primary); font-weight: 600; }

.mag-figure {
  margin: 0 0 var(--space-6);
  background-color: var(--surface);
  border: 1px solid var(--rule);
  padding: 10px;
  box-shadow: var(--shadow-photo);
}
.mag-figure img { border-radius: 2px; width: 100%; }
.mag-figure figcaption {
  font-size: 0.85rem; color: var(--muted);
  padding: var(--space-3) var(--space-2) var(--space-1);
}

/* ---------- article body typography ---------- */

.mag-body { max-width: 68ch; font-size: 1.05rem; line-height: 1.72; }
.mag-body h2 {
  font-size: var(--step-2); margin-top: var(--space-7); margin-bottom: var(--space-4);
  padding-top: var(--space-4); border-top: 2px solid var(--rule);
}
.mag-body h3 { margin-top: var(--space-5); margin-bottom: var(--space-3); }
.mag-body p { margin-bottom: var(--space-4); }
.mag-body ul, .mag-body ol { padding-left: 24px; margin-bottom: var(--space-5); }
.mag-body li { margin-bottom: 10px; }
.mag-body blockquote {
  margin: var(--space-5) 0; padding: var(--space-4) var(--space-5);
  background-color: var(--primary-tint-05);
  border-left: 3px solid var(--accent-deep);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-display); font-size: var(--step-1); line-height: 1.4;
}
.mag-body blockquote p:last-child { margin-bottom: 0; }
.mag-body table {
  width: 100%; border-collapse: collapse; margin: var(--space-5) 0;
  font-size: 0.95rem; background-color: var(--surface);
}
.mag-body th, .mag-body td { border: 1px solid var(--rule); padding: 10px 12px; text-align: left; vertical-align: top; }
.mag-body thead th { background-color: var(--ivory); font-family: var(--font-body); font-weight: 600; }

.inline-read {
  margin: var(--space-5) 0;
  padding: var(--space-3) var(--space-4);
  background-color: var(--accent-soft);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem; font-weight: 600; color: var(--muted);
}
.inline-read a { color: var(--primary); }

/* ---------- call to action ---------- */

.mag-cta {
  margin: var(--space-7) 0 var(--space-6);
  padding: var(--space-6);
  background-color: var(--primary-tint-05);
  border: 1px solid var(--primary-tint-22);
  border-radius: var(--radius-lg);
}
.mag-cta h2 { font-size: var(--step-2); margin-top: 0; border-top: 0; padding-top: 0; margin-bottom: var(--space-3); }
.mag-cta p { color: var(--muted); }
.mag-cta p:last-child { margin-bottom: 0; }

/* ---------- author box ---------- */

.mag-author {
  display: grid; grid-template-columns: 160px 1fr; gap: var(--space-5);
  align-items: start;
  padding: var(--space-5);
  background-color: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-page);
}
.mag-author img {
  width: 160px; height: 160px; object-fit: cover;
  border: 1px solid var(--rule); padding: 6px;
  background-color: var(--ivory); border-radius: var(--radius-sm);
}
.mag-author h2 { font-size: var(--step-1); margin-top: 0; border-top: 0; padding-top: 0; margin-bottom: var(--space-3); }
.mag-author p { color: var(--muted); font-size: 0.95rem; }
.mag-author p:last-child { margin-bottom: 0; }

/* ---------- read also ---------- */

.mag-related { padding: var(--space-7) 0; }
.mag-related h2 { font-size: var(--step-2); margin-bottom: var(--space-6); }
.mag-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.mag-rel {
  background-color: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.mag-rel:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.mag-rel-photo { display: block; background-color: var(--ivory); }
.mag-rel-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mag-rel h3 { margin: 0; padding: var(--space-4) var(--space-4) var(--space-2); }
.mag-rel h3 a { color: var(--ink); text-decoration: none; }
.mag-rel h3 a:hover { color: var(--primary); text-decoration: underline; }
.mag-rel-dek {
  color: var(--muted); font-size: 0.92rem;
  padding: 0 var(--space-4); margin-bottom: var(--space-3);
}
.mag-rel-meta {
  color: var(--muted); font-size: 0.83rem;
  padding: var(--space-3) var(--space-4);
  margin: 0; border-top: 1px dashed var(--rule);
}
.mag-related-all { margin: var(--space-6) 0 0; font-weight: 600; }

/* ---------- home page magazine teaser ---------- */

.mag-teaser { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.mag-teaser-all { margin: var(--space-6) 0 0; font-weight: 600; }
.author-articles { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); max-width: 74ch; }
.author-articles li { border-bottom: 1px dashed var(--rule); padding-bottom: var(--space-3); }
.author-articles a { font-weight: 600; }
.author-articles time { display: block; color: var(--muted); font-size: 0.86rem; margin-top: 4px; }

/* ---------- magazine responsive ---------- */

@media (max-width: 1020px) {
  .mag-grid, .mag-related-grid, .mag-teaser { grid-template-columns: repeat(2, 1fr); }
  .mag-card.lead .mag-card-text { padding: var(--space-6) var(--space-5); }
}

@media (max-width: 760px) {
  .mag-grid, .mag-related-grid, .mag-teaser { grid-template-columns: 1fr; }
  .mag-card.lead { flex-direction: column; }
  .mag-card.lead .mag-card-photo img { min-height: 0; aspect-ratio: 3 / 2; }
  .mag-card.lead .mag-card-text { padding: var(--space-5); }
  .mag-card.lead h2 { font-size: var(--step-2); }
  .mag-card.lead .mag-card-dek { font-size: 1rem; }
  .mag-author { grid-template-columns: 1fr; }
  .mag-author img { width: 128px; height: 128px; }
  .mag-body { font-size: 1rem; }
  .mag-cta { padding: var(--space-5); }
  .mag-crumb li[aria-current] { max-width: 22ch; }
}

@media (max-width: 400px) {
  .mag-body table { display: block; overflow-x: auto; }
  .mag-figure { padding: 6px; }
  .mag-byline { font-size: 0.85rem; gap: 6px; }
}

.mag-teaser .mag-card h3 { font-size: var(--step-1); line-height: 1.28; margin-bottom: var(--space-3); }
.mag-teaser .mag-card h3 a { color: var(--ink); text-decoration: none; }
.mag-teaser .mag-card h3 a:hover { color: var(--primary); text-decoration: underline; }


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