/* BarnBooked design system. Stable classic: oat white, saddle tan, hunter green.
   Light surfaces only. Contrast comes from type, ledger rules and strap borders. */

:root {
  --bg: #FBF8F1;
  --surface: #FFFFFF;
  --ink: #22201A;
  --primary: #3C5A3E;
  --accent: #B98A56;
  --muted: #6A6455;

  --oat-100: #FEFCF7;
  --oat-200: #F5F0E4;
  --oat-300: #EDE5D3;
  --tan-100: #F7EFE3;
  --tan-200: #EFE0CB;
  --tan-300: #E2CBAB;
  --green-050: #F1F5F0;
  --green-100: #E3EBE2;
  --green-200: #C6D5C5;
  --green-600: #355137;
  --green-700: #2E4630;

  --rule: #DED4BF;
  --rule-strong: #C9BB9E;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 18px;
  --space-5: 28px;
  --space-6: 40px;
  --space-7: 60px;
  --space-8: 88px;
  --space-9: 120px;

  --radius-sm: 3px;
  --radius: 6px;
  --radius-lg: 10px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(34, 32, 26, 0.06);
  --shadow: 0 8px 24px rgba(34, 32, 26, 0.08);
  --shadow-lift: 0 16px 44px rgba(34, 32, 26, 0.12);

  --font-display: "Old Standard TT", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "PT Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.16vw, 1.09rem);
  --step-1: clamp(1.18rem, 1.1rem + 0.35vw, 1.35rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.6vw, 1.8rem);
  --step-3: clamp(1.8rem, 1.55rem + 1.1vw, 2.5rem);
  --step-4: clamp(2.2rem, 1.7rem + 2.1vw, 3.5rem);
  --step-5: clamp(2.6rem, 1.8rem + 3.4vw, 4.4rem);

  --maxw: 1180px;
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(180deg, rgba(201, 187, 158, 0.16) 0 1px, rgba(255, 255, 255, 0) 1px 34px),
    radial-gradient(circle at 12% 4%, rgba(185, 138, 86, 0.09), rgba(255, 255, 255, 0) 46%);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.62;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: 0.005em;
  margin: 0 0 var(--space-4);
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { margin: 0 0 var(--space-4); }
a { color: var(--green-700); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
ul { margin: 0 0 var(--space-4); padding-left: 1.15rem; }
li { margin-bottom: var(--space-2); }
strong { font-weight: 700; }

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

.wrap { width: min(100% - 2.4rem, var(--maxw)); margin-inline: auto; }
.narrow { width: min(100% - 2.4rem, 780px); margin-inline: auto; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--surface); color: var(--green-700);
  padding: 10px 18px; border: 2px solid var(--primary); border-radius: var(--radius);
  font-weight: 700; transition: top 0.18s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- strap and ledger motifs ---------- */
.strap {
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  position: relative;
}
.strap::before {
  content: "";
  position: absolute; inset: 5px;
  border: 1px dashed rgba(185, 138, 86, 0.55);
  border-radius: calc(var(--radius-lg) - 3px);
  pointer-events: none;
}
.ledger-rule {
  height: 3px;
  background:
    linear-gradient(to right, var(--rule-strong), var(--rule-strong)) 0 0 / 100% 1px no-repeat,
    linear-gradient(to right, var(--rule), var(--rule)) 0 2px / 100% 1px no-repeat;
  border: 0;
  margin: var(--space-6) 0;
}
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--step--1);
  letter-spacing: 0.19em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--green-700);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 var(--space-3);
}
.eyebrow::before {
  content: "";
  width: 34px; height: 1px; background: var(--accent);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-body); font-weight: 700; font-size: var(--step-0);
  padding: 13px 26px; border-radius: var(--radius-pill);
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn-primary { background: var(--primary); color: #FFFFFF; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-700); color: #FFFFFF; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: var(--oat-100); color: var(--green-700); border-color: var(--rule-strong); }
.btn-ghost:hover { background: var(--tan-100); color: var(--green-700); border-color: var(--accent); }
.btn-sm { padding: 9px 18px; font-size: var(--step--1); }
.btn-wide { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(251, 248, 241, 0.94);
  backdrop-filter: blur(7px);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}
.site-header.is-stuck { box-shadow: 0 2px 14px rgba(34, 32, 26, 0.09); background: rgba(255, 255, 255, 0.97); }
.header-inner { display: flex; align-items: center; gap: var(--space-5); padding: 14px 0; }
.wordmark { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.wordmark span {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: 0.01em;
}
.wordmark svg { flex: none; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: var(--space-5); list-style: none; margin: 0; padding: 0; }
.site-nav a {
  text-decoration: none; color: var(--ink); font-weight: 700; font-size: 0.95rem;
  padding-bottom: 3px; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--green-700); border-bottom-color: var(--accent); }
.nav-toggle {
  display: none; background: var(--surface); border: 1px solid var(--rule-strong);
  border-radius: var(--radius); padding: 8px 10px; cursor: pointer;
}
.nav-toggle svg { display: block; }
.header-cta { flex: none; }

/* ---------- hero ---------- */
.hero { padding: var(--space-8) 0 var(--space-7); position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -90px; top: 40px; width: 300px; height: 300px;
  border: 26px solid rgba(185, 138, 86, 0.13);
  border-bottom-color: transparent; border-radius: 50%;
  transform: rotate(28deg); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.04fr 0.96fr; gap: var(--space-7); align-items: center; }
.hero h1 { margin-bottom: var(--space-4); max-width: 15ch; }
.hero h1 em { font-style: italic; color: var(--green-700); }
.hero-lede { font-size: var(--step-1); color: var(--muted); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-5); }
.trust-strip {
  display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-5);
  padding-top: var(--space-4); border-top: 1px solid var(--rule);
  list-style: none; margin: 0; padding-left: 0;
}
.trust-strip li {
  display: flex; align-items: center; gap: 9px; margin: 0;
  font-size: var(--step--1); font-weight: 700; color: var(--muted); letter-spacing: 0.02em;
}
.trust-strip svg { flex: none; }
.hero-figure { position: relative; }
.hero-figure img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lift); border: 1px solid var(--rule-strong); }
.hero-figure figcaption {
  position: absolute; left: 18px; bottom: 18px;
  background: var(--oat-100); border: 1px solid var(--rule-strong); border-left: 4px solid var(--primary);
  padding: 10px 15px; border-radius: var(--radius); font-size: var(--step--1);
  font-weight: 700; color: var(--ink); box-shadow: var(--shadow);
  max-width: 78%;
}

/* ---------- generic section ---------- */
.section { padding: var(--space-8) 0; }
.section-tint { background: linear-gradient(180deg, var(--oat-200), var(--bg)); border-block: 1px solid var(--rule); }
.section-head { max-width: 62ch; margin-bottom: var(--space-6); }
.section-head p { color: var(--muted); font-size: var(--step-1); margin-bottom: 0; }

/* ---------- cards ---------- */
.grid { display: grid; gap: var(--space-5); }
.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: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--rule-strong); }
.card h3 { margin-bottom: var(--space-2); }
.card p:last-child { margin-bottom: 0; }

.cost-card { border-top: 4px solid var(--accent); }
.cost-tag {
  display: inline-block; font-family: var(--font-display); font-size: var(--step-2);
  color: var(--green-700); font-weight: 700; margin-bottom: var(--space-2);
}

.feature-card .icon-plate {
  width: 52px; height: 52px; display: grid; place-items: center;
  border: 1px solid var(--green-200); border-radius: 50%;
  background: var(--green-050); margin-bottom: var(--space-4);
}

/* ---------- steps ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li {
  position: relative; padding-left: 74px; margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--rule); padding-bottom: var(--space-5);
}
.steps li:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.steps li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  width: 52px; height: 52px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--green-700);
  background: var(--tan-100); border: 1px solid var(--tan-300); border-radius: 50%;
}
.steps h3 { margin-bottom: var(--space-2); }
.steps p { margin-bottom: 0; color: var(--muted); }

.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-7); align-items: start; }
.split img { border-radius: var(--radius-lg); border: 1px solid var(--rule-strong); box-shadow: var(--shadow); }
.split figcaption { font-size: var(--step--1); color: var(--muted); margin-top: var(--space-3); }

/* ---------- outcomes with feed measure bars ---------- */
.outcome {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  padding: var(--space-5); border-left: 5px solid var(--primary);
}
.outcome .figure {
  font-family: var(--font-display); font-size: var(--step-4); line-height: 1;
  color: var(--green-700); display: block; margin-bottom: var(--space-2);
}
.measure {
  height: 14px; border: 1px solid var(--tan-300); border-radius: var(--radius-pill);
  background: var(--tan-100); overflow: hidden; margin: var(--space-3) 0 var(--space-3);
  position: relative;
}
.measure::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, rgba(185, 138, 86, 0.5) 0 1px, rgba(255, 255, 255, 0) 1px 25%);
}
.measure i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--green-200), var(--primary));
  transition: width 1.5s cubic-bezier(0.22, 0.68, 0.3, 1);
}
.is-revealed .measure i { width: var(--fill, 70%); }
.outcome p { margin-bottom: 0; color: var(--muted); }

/* ---------- testimonials ---------- */
.testimonial {
  background: var(--oat-100); border: 1px solid var(--rule-strong); border-radius: var(--radius-lg);
  padding: var(--space-5); margin: 0; position: relative;
}
.testimonial::before {
  content: ""; position: absolute; top: 0; left: var(--space-5); right: var(--space-5); height: 3px;
  background: linear-gradient(90deg, var(--accent), rgba(185, 138, 86, 0));
}
.testimonial p { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.5; }
.testimonial .tfoot { font-size: var(--step--1); color: var(--muted); border-top: 1px solid var(--rule); padding-top: var(--space-3); }
.testimonial .tfoot b { display: block; color: var(--ink); font-size: var(--step-0); }

.results {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5);
  margin-top: var(--space-6); padding: var(--space-5) 0;
  border-top: 2px solid var(--rule-strong); border-bottom: 2px solid var(--rule-strong);
  text-align: center;
}
.results b { display: block; font-family: var(--font-display); font-size: var(--step-3); color: var(--green-700); }
.results span { font-size: var(--step--1); color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 700; }

/* ---------- pricing ---------- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); align-items: start; }
.tier {
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5); display: flex; flex-direction: column; height: 100%;
}
.tier-featured {
  border: 2px solid var(--primary); box-shadow: var(--shadow);
  background: linear-gradient(180deg, var(--green-050), var(--surface) 42%);
}
.tier .flag {
  display: inline-block; align-self: flex-start; margin-bottom: var(--space-3);
  background: var(--green-100); color: var(--green-700); border: 1px solid var(--green-200);
  border-radius: var(--radius-pill); padding: 4px 14px;
  font-size: 0.76rem; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 700;
}
.tier h3 { margin-bottom: var(--space-2); }
.price { font-family: var(--font-display); font-size: var(--step-4); color: var(--ink); line-height: 1; }
.price small { font-family: var(--font-body); font-size: var(--step--1); color: var(--muted); font-weight: 700; }
.tier ul { list-style: none; padding: 0; margin: var(--space-4) 0 var(--space-5); }
.tier li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.96rem; }
.tier li svg { flex: none; margin-top: 4px; }
.tier .btn { margin-top: auto; }
.billing-note {
  margin-top: var(--space-5); text-align: center; color: var(--muted); font-size: var(--step--1);
}

/* ---------- faq ---------- */
.faq-list { border-top: 1px solid var(--rule-strong); }
.faq-item { border-bottom: 1px solid var(--rule-strong); }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  background: none; border: 0; cursor: pointer; text-align: left;
  font-family: var(--font-display); font-size: var(--step-1); font-weight: 700; color: var(--ink);
  padding: var(--space-4) 0;
}
.faq-q:hover { color: var(--green-700); }
.faq-q .chev { flex: none; transition: transform 0.3s ease; }
.faq-q[aria-expanded="true"] .chev { transform: rotate(90deg); }
.faq-a { display: none; padding: 0 0 var(--space-5); max-width: 74ch; color: var(--muted); }
.faq-a.is-open { display: block; }

/* ---------- contact ---------- */
.contact-panel {
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius-lg);
  padding: var(--space-6); box-shadow: var(--shadow);
}
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
label { font-weight: 700; font-size: 0.93rem; }
input[type="text"], input[type="email"], select, textarea {
  font-family: var(--font-body); font-size: var(--step-0); color: var(--ink);
  background: var(--oat-100); border: 1px solid var(--rule-strong); border-radius: var(--radius);
  padding: 11px 13px; width: 100%;
}
textarea { min-height: 132px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); background: var(--surface); }
[aria-invalid="true"] { border-color: #A2402C; background: #FDF3F0; }
.err { color: #8C3623; font-size: 0.85rem; min-height: 1.1em; font-weight: 700; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 0.93rem; }
.consent input { margin-top: 5px; }
.form-note { font-size: var(--step--1); color: var(--muted); margin-top: var(--space-4); }
.contact-aside ul { list-style: none; padding: 0; }
.contact-aside li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }

/* ---------- author byline ---------- */
.byline {
  display: flex; gap: var(--space-4); align-items: center;
  background: var(--tan-100); border: 1px solid var(--tan-300); border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5); margin-top: var(--space-7);
}
.byline img { width: 66px; height: 66px; border-radius: 50%; border: 2px solid var(--surface); flex: none; }
.byline p { margin: 0; font-size: 0.95rem; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer {
  background: linear-gradient(180deg, var(--oat-200), var(--tan-100));
  border-top: 3px solid var(--primary);
  padding: var(--space-8) 0 var(--space-5);
  margin-top: var(--space-8);
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: var(--space-6); }
.site-footer h2 { font-size: var(--step-0); text-transform: uppercase; letter-spacing: 0.15em; font-family: var(--font-body); margin-bottom: var(--space-4); }
.site-footer ul { list-style: none; padding: 0; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--green-700); text-decoration: underline; }
.social { display: flex; gap: 10px; margin-top: var(--space-4); padding: 0; list-style: none; }
.social a {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--rule-strong); border-radius: 50%; background: var(--surface);
}
.social a:hover { border-color: var(--primary); background: var(--green-050); }
.footer-base {
  margin-top: var(--space-7); padding-top: var(--space-4); border-top: 1px solid var(--rule-strong);
  display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: space-between;
  font-size: var(--step--1); color: var(--muted);
}

/* ---------- long form pages ---------- */
.page-head { padding: var(--space-8) 0 var(--space-6); border-bottom: 1px solid var(--rule); }
.page-head p { color: var(--muted); font-size: var(--step-1); max-width: 62ch; }
.prose { padding: var(--space-7) 0; }
.prose h2 { font-size: var(--step-2); margin-top: var(--space-6); }
.prose h3 { font-size: var(--step-1); margin-top: var(--space-5); }
.prose p, .prose li { color: #34302A; }
.map-group { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: var(--space-5); }
.map-group li { margin-bottom: var(--space-3); }
.map-group span { color: var(--muted); display: block; font-size: 0.92rem; }
.author-portrait { border-radius: var(--radius-lg); border: 1px solid var(--rule-strong); box-shadow: var(--shadow); }
.fact-table { width: 100%; border-collapse: collapse; margin-bottom: var(--space-5); }
.fact-table th, .fact-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.fact-table th { width: 34%; color: var(--green-700); }

/* ---------- reveal motion ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.is-revealed { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .grid-3, .grid-4, .tiers { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; order: 3; margin-left: auto; }
  .site-nav { order: 4; flex-basis: 100%; margin-left: 0; display: none; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: var(--space-3); padding: var(--space-4) 0; }
  .header-inner { flex-wrap: wrap; gap: var(--space-3); }
  .header-cta { display: none; }
  .hero { padding-top: var(--space-6); }
  .grid-2, .grid-3, .grid-4, .tiers, .form-grid, .results { grid-template-columns: 1fr; }
  .section { padding: var(--space-7) 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .contact-panel { padding: var(--space-5) var(--space-4); }
  .byline { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
  .steps li { padding-left: 0; padding-top: 62px; }
}

@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; }
  .measure i { width: var(--fill, 70%); }
}

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

/* ================= The Lesson Barn magazine =================
   Same oat white ground, ledger rules and strap borders as the rest of the site.
   Light surfaces only: contrast comes from the tan rules and the hunter green type. */

.mag-crumb { padding: var(--space-5) 0 0; }
.mag-crumb ol {
  display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0;
  font-size: var(--step--1); color: var(--muted);
}
.mag-crumb li { margin: 0; display: flex; align-items: center; gap: 8px; }
.mag-crumb li + li::before { content: "/"; color: var(--rule-strong); }
.mag-crumb a { color: var(--green-700); text-decoration: none; font-weight: 700; }
.mag-crumb a:hover { color: var(--accent); text-decoration: underline; }
.mag-crumb span[aria-current] {
  max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- magazine masthead ---------- */
.mag-masthead {
  padding: var(--space-6) 0 var(--space-7);
  border-bottom: 3px double var(--rule-strong);
  background: linear-gradient(180deg, var(--oat-200), var(--bg));
}
.mag-masthead h1 { font-size: var(--step-5); max-width: 16ch; margin-bottom: var(--space-4); }
.mag-masthead-note { max-width: 66ch; color: var(--muted); font-size: var(--step-0); margin-bottom: 0; }
.mag-standfirst {
  font-family: var(--font-display); font-style: italic;
  font-size: var(--step-1); line-height: 1.5; color: var(--green-700);
  max-width: 60ch; margin-bottom: var(--space-4);
}

/* ---------- index grid and lead card ---------- */
.mag-index { padding-top: var(--space-7); }
.mag-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.mag-card {
  grid-column: span 1;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.mag-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--rule-strong); }
.mag-card-media { display: block; border-bottom: 1px solid var(--rule); }
.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: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700;
  color: var(--green-700); margin-bottom: var(--space-3);
}
.mag-card-title { font-size: var(--step-1); line-height: 1.22; margin-bottom: var(--space-3); }
.mag-card-title a { color: var(--ink); text-decoration: none; }
.mag-card-title a:hover { color: var(--green-700); text-decoration: underline; }
.mag-card-dek { color: var(--muted); font-size: 0.97rem; margin-bottom: var(--space-4); }
.mag-card-foot {
  margin: auto 0 0; padding-top: var(--space-3); border-top: 1px solid var(--rule);
  display: flex; align-items: center; gap: 10px;
  font-size: var(--step--1); color: var(--muted); font-weight: 700;
}
.mag-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); display: inline-block; }

.mag-card.lead {
  grid-column: span 3;
  flex-direction: row;
  border-top-width: 6px;
  background: linear-gradient(180deg, var(--oat-100), var(--surface) 55%);
}
.mag-card.lead .mag-card-media { flex: 1 1 55%; border-bottom: 0; border-right: 1px solid var(--rule); }
.mag-card.lead .mag-card-media img { height: 100%; aspect-ratio: auto; min-height: 340px; }
.mag-card.lead .mag-card-body { flex: 1 1 45%; padding: var(--space-6); justify-content: center; }
.mag-card.lead .mag-card-title { font-size: var(--step-3); }
.mag-card.lead .mag-card-dek { font-size: var(--step-1); color: var(--ink); }
.mag-index-cta { margin-top: var(--space-7); text-align: center; }

/* ---------- article header ---------- */
.mag-article { padding: var(--space-5) 0 var(--space-7); }
.mag-head { max-width: 40rem; margin: 0 auto var(--space-6); }
.mag-head h1 { font-size: var(--step-4); line-height: 1.16; margin-bottom: var(--space-4); }
.mag-byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4);
  padding: var(--space-3) 0; font-size: var(--step--1); color: var(--muted);
  border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule);
}
.mag-by { font-weight: 700; color: var(--ink); }
.mag-by a { color: var(--green-700); }
.mag-meta { display: inline-flex; align-items: center; gap: 7px; }
.mag-meta + .mag-meta::before,
.mag-by + .mag-meta::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }

.mag-figure { margin: 0 0 var(--space-6); }
.mag-figure img {
  width: 100%; border-radius: var(--radius-lg);
  border: 1px solid var(--rule-strong); box-shadow: var(--shadow);
}
.mag-figure figcaption {
  font-size: var(--step--1); color: var(--muted); margin-top: var(--space-3);
  padding-left: var(--space-3); border-left: 3px solid var(--accent);
}

/* ---------- article body typography ---------- */
.mag-body { max-width: 40rem; margin-inline: auto; }
.mag-body p, .mag-body li { font-size: 1.06rem; line-height: 1.7; color: #34302A; }
.mag-body > p { margin-bottom: var(--space-4); }
.mag-body h2 {
  font-size: var(--step-2); line-height: 1.2; margin: var(--space-7) 0 var(--space-4);
  padding-bottom: var(--space-3); border-bottom: 1px solid var(--rule);
}
.mag-body h3 { font-size: var(--step-1); margin: var(--space-6) 0 var(--space-3); color: var(--green-700); }
.mag-body ul, .mag-body ol { margin: 0 0 var(--space-5); padding-left: 1.3rem; }
.mag-body li { margin-bottom: var(--space-3); }
.mag-body blockquote {
  margin: var(--space-5) 0; padding: var(--space-4) var(--space-5);
  background: var(--oat-100); border: 1px solid var(--rule-strong); border-left: 5px solid var(--primary);
  border-radius: var(--radius);
}
.mag-body blockquote p { font-family: var(--font-display); font-size: var(--step-1); margin-bottom: 0; }
.mag-body table { width: 100%; border-collapse: collapse; margin: 0 0 var(--space-5); font-size: 0.97rem; }
.mag-body th, .mag-body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.mag-body thead th { background: var(--green-050); color: var(--green-700); border-bottom: 2px solid var(--rule-strong); }
.mag-body a { color: var(--green-700); }

.inline-read {
  margin: var(--space-5) 0; padding: var(--space-3) var(--space-4);
  background: var(--tan-100); border: 1px solid var(--tan-300);
  border-radius: var(--radius); font-size: 0.97rem; font-weight: 700;
}
.inline-read a { color: var(--green-700); }

/* ---------- call to action ---------- */
.mag-cta {
  margin: var(--space-7) 0 var(--space-6);
  padding: var(--space-6) var(--space-5);
  background: linear-gradient(180deg, var(--green-050), var(--surface) 60%);
  border: 1px solid var(--green-200); border-left: 6px solid var(--primary);
  border-radius: var(--radius-lg);
}
.mag-cta h2 { font-size: var(--step-2); border: 0; padding: 0; margin: 0 0 var(--space-3); }
.mag-cta p { color: var(--ink); }
.mag-cta-actions { margin-bottom: 0; }

/* ---------- author box ---------- */
.mag-author {
  display: flex; gap: var(--space-5); align-items: flex-start;
  padding: var(--space-5);
  background: var(--oat-100);
  border: 1px solid var(--rule-strong); border-radius: var(--radius-lg);
}
.mag-author img {
  width: 120px; height: 120px; flex: none;
  border-radius: 50%; border: 3px solid var(--surface); box-shadow: var(--shadow-sm);
  object-fit: cover;
}
.mag-author-name {
  font-family: var(--font-display); font-size: var(--step-1); font-weight: 700;
  color: var(--ink); margin-bottom: var(--space-2);
}
.mag-author p { font-size: 0.97rem; }
.mag-author p:last-child { margin-bottom: 0; }

/* ---------- read also ---------- */
.mag-related-band { background: linear-gradient(180deg, var(--oat-200), var(--bg)); border-top: 1px solid var(--rule); }
.mag-related { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.mag-rel {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.mag-rel:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.mag-rel-media { display: block; }
.mag-rel-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-bottom: 1px solid var(--rule); }
.mag-rel-body { padding: var(--space-4) var(--space-5) var(--space-5); display: flex; flex-direction: column; flex: 1; }
.mag-rel-title { font-size: var(--step-0); line-height: 1.3; margin-bottom: var(--space-2); }
.mag-rel-title a { color: var(--ink); text-decoration: none; }
.mag-rel-title a:hover { color: var(--green-700); text-decoration: underline; }
.mag-rel-dek { font-size: 0.92rem; color: var(--muted); margin-bottom: var(--space-3); }
.mag-rel-foot {
  margin: auto 0 0; padding-top: var(--space-3); border-top: 1px solid var(--rule);
  font-size: var(--step--1); color: var(--muted); font-weight: 700;
}
.mag-related-all { margin: var(--space-6) 0 0; text-align: center; }

/* ---------- home page magazine teaser ---------- */
.mag-teasers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.mag-more { margin: var(--space-6) 0 0; }
.mag-list { list-style: none; padding: 0; margin: 0; }
.mag-list li {
  padding: var(--space-3) 0; border-bottom: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); justify-content: space-between;
}
.mag-list a { font-weight: 700; }
.mag-list time { color: var(--muted); font-size: var(--step--1); white-space: nowrap; }

@media (max-width: 980px) {
  .mag-grid, .mag-related, .mag-teasers { grid-template-columns: repeat(2, 1fr); }
  .mag-card.lead { grid-column: span 2; flex-direction: column; }
  .mag-card.lead .mag-card-media { border-right: 0; border-bottom: 1px solid var(--rule); }
  .mag-card.lead .mag-card-media img { aspect-ratio: 3 / 2; min-height: 0; }
  .mag-card.lead .mag-card-body { padding: var(--space-5); }
}
@media (max-width: 760px) {
  .mag-grid, .mag-related, .mag-teasers { grid-template-columns: 1fr; }
  .mag-card.lead { grid-column: span 1; }
  .mag-article { padding-top: var(--space-4); }
  .mag-head h1 { font-size: var(--step-3); }
  .mag-author { flex-direction: column; align-items: flex-start; gap: var(--space-4); }
  .mag-author img { width: 92px; height: 92px; }
  .mag-cta { padding: var(--space-5) var(--space-4); }
}
@media (max-width: 420px) {
  .mag-crumb span[aria-current] { max-width: 18ch; }
  .mag-body p, .mag-body li { font-size: 1rem; }
  .mag-card-body { padding: var(--space-4); }
  .mag-byline { gap: var(--space-2); }
  .mag-meta + .mag-meta::before, .mag-by + .mag-meta::before { display: none; }
}


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