/* ==========================================================================
   PillRoute design system
   Apothecary white, pharmacy green, script blue.
   Motifs: mortar and pestle, capsule shapes, clinical dispensing grid.
   ========================================================================== */

:root {
  /* brief palette */
  --bg: #F5F9F6;
  --surface: #FFFFFF;
  --ink: #12211A;
  --primary: #17694A;
  --accent: #2E7BC4;
  --muted: #5C6E66;

  /* derived greens */
  --primary-950: #071c13;
  --primary-900: #0b3626;
  --primary-800: #114f37;
  --primary-600: #1e8059;
  --primary-400: #57a687;
  --primary-200: #a8ceba;
  --primary-100: #d6e9de;
  --primary-050: #eaf4ee;

  /* derived blues */
  --accent-800: #1b4f7f;
  --accent-600: #2668a6;
  --accent-200: #b9d5ef;
  --accent-050: #e7f1fa;

  /* neutrals and lines */
  --ink-soft: #24382d;
  --line: rgba(18, 33, 26, 0.12);
  --line-strong: rgba(18, 33, 26, 0.22);
  --grid-line: rgba(23, 105, 74, 0.07);
  --amber: #B4761C;

  /* spacing scale */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 44px;
  --s8: 64px;
  --s9: 88px;
  --s10: 120px;

  /* radii */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 34px;
  --r-cap: 999px;

  /* shadows */
  --sh-1: 0 1px 2px rgba(11, 54, 38, 0.06), 0 2px 6px rgba(11, 54, 38, 0.05);
  --sh-2: 0 2px 4px rgba(11, 54, 38, 0.06), 0 10px 24px rgba(11, 54, 38, 0.08);
  --sh-3: 0 18px 48px rgba(11, 54, 38, 0.14);
  --sh-inset: inset 0 1px 0 rgba(255, 255, 255, 0.7);

  /* type */
  --font-display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --font-body: "Schibsted Grotesk", "Helvetica Neue", Arial, system-ui, sans-serif;
  --t-xs: 0.78rem;
  --t-sm: 0.88rem;
  --t-base: 1rem;
  --t-md: clamp(1.05rem, 0.98rem + 0.3vw, 1.18rem);
  --t-lg: clamp(1.28rem, 1.15rem + 0.6vw, 1.55rem);
  --t-xl: clamp(1.62rem, 1.4rem + 1.1vw, 2.15rem);
  --t-2xl: clamp(2.05rem, 1.6rem + 2vw, 3.1rem);
  --t-3xl: clamp(2.5rem, 1.85rem + 3.1vw, 4.15rem);

  --wrap: 1200px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  /* clinical dispensing grid plus a faint apothecary wash */
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    radial-gradient(circle at 12% -8%, rgba(46, 123, 196, 0.09), transparent 46%),
    radial-gradient(circle at 92% 4%, rgba(23, 105, 74, 0.08), transparent 40%);
  background-size: 26px 26px, 26px 26px, 100% 100%, 100% 100%;
  background-attachment: scroll, scroll, fixed, fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s4);
  color: var(--ink);
  font-variation-settings: "wdth" 100, "opsz" 14;
}
p { margin: 0 0 var(--s4); }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-800); }
ul, ol { margin: 0 0 var(--s4); padding-left: 1.15rem; }
li { margin-bottom: var(--s2); }
strong { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s7) 0; }

/* --------------------------------------------------------------- helpers */
.wrap { width: min(100% - 2 * var(--s5), var(--wrap)); margin-inline: auto; }
.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: -100px; z-index: 999;
  background: var(--primary); color: #fff; padding: var(--s3) var(--s5);
  border-radius: 0 0 var(--r-md) var(--r-md); font-weight: 600;
}
.skip-link:focus { top: 0; color: #fff; }

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

/* eyebrow label styled like a dispensing label chip */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-family: var(--font-display); font-size: var(--t-xs); font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--primary-800);
  background: var(--primary-050); border: 1px solid var(--primary-200);
  padding: 6px 14px 6px 10px; border-radius: var(--r-cap); margin-bottom: var(--s4);
}
.eyebrow::before {
  content: ""; width: 18px; height: 9px; border-radius: var(--r-cap);
  background: linear-gradient(90deg, var(--primary) 0 50%, var(--accent) 50% 100%);
  box-shadow: var(--sh-inset);
}
.lede { font-size: var(--t-md); color: var(--ink-soft); max-width: 62ch; }
.muted { color: var(--muted); }
.section { padding: var(--s9) 0; position: relative; }
.section-head { max-width: 74ch; margin-bottom: var(--s7); }
.section-head h2 { font-size: var(--t-2xl); }

/* hairline cross motif used at panel corners */
.crossmark { position: relative; }
.crossmark::after {
  content: ""; position: absolute; top: 14px; right: 14px; width: 14px; height: 14px;
  background:
    linear-gradient(var(--primary-200), var(--primary-200)) center / 100% 2px no-repeat,
    linear-gradient(var(--primary-200), var(--primary-200)) center / 2px 100% no-repeat;
  opacity: 0.9;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  font-family: var(--font-display); font-weight: 700; font-size: var(--t-sm);
  letter-spacing: 0.01em; padding: 14px 26px; border-radius: var(--r-cap);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), background-color 0.22s var(--ease);
}
.btn-primary {
  background: linear-gradient(180deg, var(--primary-600), var(--primary));
  color: #fff; box-shadow: var(--sh-2), var(--sh-inset);
}
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--sh-3); }
.btn-ghost {
  background: var(--surface); color: var(--primary-900);
  border-color: var(--primary-200); box-shadow: var(--sh-1);
}
.btn-ghost:hover { background: var(--primary-050); color: var(--primary-900); transform: translateY(-2px); }
.btn-blue { background: var(--accent); color: #fff; box-shadow: var(--sh-2); }
.btn-blue:hover { background: var(--accent-800); color: #fff; transform: translateY(-2px); }
.btn-wide { width: 100%; }

/* ----------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(245, 249, 246, 0.86);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.site-header.is-stuck {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(11, 54, 38, 0.07);
}
/* the route rail: a dashed line with stops, running under the header */
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background:
    repeating-linear-gradient(90deg, var(--primary-200) 0 14px, transparent 14px 26px);
  opacity: 0.75;
}
.header-inner { display: flex; align-items: center; gap: var(--s5); padding: var(--s4) 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name {
  font-family: var(--font-display); font-weight: 800; font-size: 1.24rem;
  letter-spacing: -0.03em; color: var(--primary-900);
}
.brand-name span { color: var(--accent); }
.nav { margin-left: auto; }
.nav ul { display: flex; align-items: center; gap: var(--s5); list-style: none; margin: 0; padding: 0; }
.nav a {
  font-size: var(--t-sm); font-weight: 600; color: var(--ink-soft); text-decoration: none;
  padding: 6px 2px; position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--accent); border-radius: var(--r-cap); transition: right 0.25s var(--ease);
}
.nav a:hover { color: var(--primary-900); }
.nav a:hover::after { right: 0; }
.header-cta { margin-left: var(--s5); }
.nav-toggle {
  display: none; margin-left: auto; width: 46px; height: 46px; border-radius: var(--r-md);
  border: 1px solid var(--primary-200); background: var(--surface); cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: var(--primary-900);
  border-radius: var(--r-cap); position: relative; margin-inline: auto; content: "";
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* -------------------------------------------------------------------- hero */
.hero { padding: var(--s9) 0 var(--s8); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: auto auto -140px -160px; width: 420px; height: 420px;
  border-radius: 50%; background: radial-gradient(circle, rgba(46, 123, 196, 0.13), transparent 68%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.06fr 0.94fr; gap: var(--s8); align-items: center; }
.hero h1 { font-size: var(--t-3xl); margin-bottom: var(--s5); }
.hero h1 em { font-style: normal; color: var(--primary); position: relative; white-space: nowrap; }
.hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.08em; height: 0.28em;
  background: linear-gradient(90deg, rgba(46, 123, 196, 0.22), rgba(23, 105, 74, 0.18));
  border-radius: var(--r-cap); z-index: -1;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s6) 0 var(--s6); }

/* trust strip as capsule chips with a seam */
.trust { display: flex; flex-wrap: wrap; gap: var(--s3); list-style: none; margin: 0; padding: 0; }
.trust li {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-cap); padding: 8px 16px 8px 10px;
  font-size: var(--t-sm); font-weight: 600; color: var(--ink-soft); box-shadow: var(--sh-1);
}
.trust li::before {
  content: ""; width: 26px; height: 13px; flex: none; border-radius: var(--r-cap);
  background: linear-gradient(90deg, var(--primary) 0 50%, var(--primary-100) 50% 100%);
  border: 1px solid var(--primary-400);
}

/* hero photograph inside a capsule mask sitting on a mortar plinth */
.hero-media { position: relative; }
.hero-frame {
  position: relative; border-radius: var(--r-cap) var(--r-cap) var(--r-xl) var(--r-xl);
  overflow: hidden; box-shadow: var(--sh-3); border: 8px solid var(--surface);
  background: var(--surface);
}
.hero-frame img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3.1; }
.hero-frame::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(190deg, rgba(23, 105, 74, 0.06), transparent 42%, rgba(11, 54, 38, 0.24));
}
.hero-tag {
  position: absolute; left: -18px; bottom: 34px; z-index: 3;
  background: var(--surface); border: 1px solid var(--primary-200); border-left: 5px solid var(--accent);
  border-radius: var(--r-md); padding: var(--s4) var(--s5); box-shadow: var(--sh-2); max-width: 260px;
}
.hero-tag b { font-family: var(--font-display); font-size: 1.5rem; color: var(--primary-900); display: block; }
.hero-tag span { font-size: var(--t-xs); color: var(--muted); line-height: 1.4; display: block; }

/* --------------------------------------------------------------- problem */
.problem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s5); }
.pain {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s6) var(--s5) var(--s5); box-shadow: var(--sh-1); position: relative;
  border-top: 4px solid var(--primary-200);
}
.pain:nth-child(2n) { border-top-color: var(--accent-200); }
.pain h3 { font-size: var(--t-lg); margin-bottom: var(--s3); }
.pain p { font-size: var(--t-sm); color: var(--ink-soft); margin-bottom: var(--s4); }
.cost {
  display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: var(--t-sm);
  color: var(--primary-900); background: var(--primary-050); border: 1px dashed var(--primary-400);
  border-radius: var(--r-cap); padding: 5px 14px;
}

/* ---------------------------------------------------------- how it works */
.how-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: var(--s8); align-items: start; }
.route { position: relative; padding-left: 62px; }
.route-line { position: absolute; left: 21px; top: 6px; bottom: 6px; width: 22px; }
.route-line svg { width: 22px; height: 100%; overflow: visible; }
.route-line path {
  fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 4 8; opacity: 0.55;
}
.route-line .draw {
  stroke: var(--primary); stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 1; stroke-width: 3;
}
.is-visible .route-line .draw { animation: drawRoute 1.9s var(--ease) forwards; }
@keyframes drawRoute { to { stroke-dashoffset: 0; } }

.step { position: relative; padding: 0 0 var(--s7); }
.step:last-child { padding-bottom: 0; }
.step-dot {
  position: absolute; left: -62px; top: 0; width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--primary); color: var(--primary-900);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 800;
  box-shadow: 0 0 0 6px var(--bg); z-index: 2;
}
.step:last-child .step-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.step h3 { font-size: var(--t-lg); margin-bottom: var(--s2); }
.step p { color: var(--ink-soft); margin-bottom: 0; }
.how-media { position: sticky; top: 110px; }
.how-frame {
  border-radius: var(--r-xl) var(--r-xl) var(--r-cap) var(--r-cap); overflow: hidden;
  border: 8px solid var(--surface); box-shadow: var(--sh-3);
}
.how-frame img { width: 100%; aspect-ratio: 4 / 4.2; object-fit: cover; }
.mortar-note {
  margin-top: var(--s5); background: var(--primary-900); color: #dff0e6; border-radius: var(--r-lg);
  padding: var(--s5); font-size: var(--t-sm); box-shadow: var(--sh-2); position: relative; overflow: hidden;
}
.mortar-note::before {
  content: ""; position: absolute; right: -26px; bottom: -34px; width: 118px; height: 90px;
  border-radius: 0 0 58% 58%; background: rgba(255, 255, 255, 0.07);
}
.mortar-note::after {
  content: ""; position: absolute; right: 6px; bottom: 42px; width: 8px; height: 74px;
  border-radius: var(--r-cap); background: rgba(46, 123, 196, 0.45); transform: rotate(24deg);
}
.mortar-note b { color: #fff; font-family: var(--font-display); }

/* -------------------------------------------------------------- features */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s6); box-shadow: var(--sh-1);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--primary-200); }
.f-icon {
  width: 54px; height: 54px; border-radius: var(--r-md); display: grid; place-items: center;
  background: var(--primary-050); border: 1px solid var(--primary-200); margin-bottom: var(--s4);
}
.feature:nth-child(3n+2) .f-icon { background: var(--accent-050); border-color: var(--accent-200); }
.f-icon svg { width: 26px; height: 26px; stroke: var(--primary); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feature:nth-child(3n+2) .f-icon svg { stroke: var(--accent-800); }
.feature h3 { font-size: var(--t-md); margin-bottom: var(--s2); }
.feature p { font-size: var(--t-sm); color: var(--ink-soft); margin-bottom: 0; }

/* -------------------------------------------------------------- outcomes */
.outcome-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s5); }
.outcome {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s6) var(--s5); box-shadow: var(--sh-1);
}
.outcome .big {
  font-family: var(--font-display); font-size: clamp(2.1rem, 1.5rem + 2.4vw, 2.9rem);
  font-weight: 800; letter-spacing: -0.035em; color: var(--primary-900); line-height: 1; display: block;
  margin-bottom: var(--s3);
}
.outcome h3 { font-size: var(--t-base); margin-bottom: var(--s2); }
.outcome p { font-size: var(--t-sm); color: var(--ink-soft); margin-bottom: var(--s4); }
/* capsule shaped progress fill */
.cap-meter {
  height: 14px; border-radius: var(--r-cap); background: var(--primary-050);
  border: 1px solid var(--primary-200); overflow: hidden; position: relative;
}
.cap-meter i {
  display: block; height: 100%; width: 0; border-radius: var(--r-cap);
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transition: width 1.5s var(--ease) 0.15s;
}
.is-visible .cap-meter i { width: var(--val, 60%); }
.cap-meter::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 17px, rgba(18, 33, 26, 0.12) 17px 18px);
  pointer-events: none;
}

/* ------------------------------------------------------------ testimonials */
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
/* each testimonial is dressed as a dispensing label */
.testimonial {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s6) var(--s5) var(--s5); margin: 0; position: relative; box-shadow: var(--sh-1);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px);
  background-size: 100% 30px; background-position: 0 60px;
}
.testimonial::before {
  content: "Rx"; position: absolute; top: 0; left: 0;
  font-family: var(--font-display); font-weight: 800; font-size: 0.9rem; color: #fff;
  background: var(--primary); padding: 4px 14px 5px; border-radius: var(--r-md) 0 var(--r-md) 0;
  letter-spacing: 0.04em;
}
.testimonial::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 6px;
  background: repeating-linear-gradient(180deg, var(--accent) 0 8px, transparent 8px 16px);
  border-radius: 0 var(--r-md) var(--r-md) 0; opacity: 0.5;
}
.testimonial p { font-size: var(--t-sm); color: var(--ink-soft); margin: var(--s5) 0 var(--s5); }
.testimonial footer { display: flex; align-items: center; gap: var(--s3); border-top: 1px dashed var(--line-strong); padding-top: var(--s4); }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 0.95rem; color: #fff;
  background: linear-gradient(150deg, var(--primary-600), var(--primary-900));
}
.testimonial cite { font-style: normal; font-weight: 700; font-size: var(--t-sm); display: block; }
.testimonial .who { font-size: var(--t-xs); color: var(--muted); line-height: 1.45; }

.results {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); margin-top: var(--s7);
  background: var(--primary-900); border-radius: var(--r-xl); padding: var(--s7) var(--s6);
  color: #d8ece0; position: relative; overflow: hidden;
}
.results::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 30px 30px; pointer-events: none;
}
.results div { position: relative; text-align: center; }
.results b { display: block; font-family: var(--font-display); font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.7rem); color: #fff; letter-spacing: -0.03em; }
.results span { font-size: var(--t-sm); }

/* --------------------------------------------------------------- pricing */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); align-items: start; }
.tier {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s6); box-shadow: var(--sh-1); position: relative; display: flex; flex-direction: column;
}
.tier-cap {
  height: 10px; width: 76px; border-radius: var(--r-cap); margin-bottom: var(--s5);
  background: linear-gradient(90deg, var(--primary) 0 50%, var(--primary-100) 50% 100%);
  border: 1px solid var(--primary-400);
}
.tier--best {
  border-color: var(--primary); box-shadow: var(--sh-3); transform: translateY(-10px);
  background: linear-gradient(180deg, var(--primary-050), var(--surface) 22%);
}
.tier--best .tier-cap { background: linear-gradient(90deg, var(--accent) 0 50%, var(--accent-200) 50% 100%); border-color: var(--accent); }
.badge-best {
  position: absolute; top: -14px; right: var(--s5);
  background: var(--accent); color: #fff; font-family: var(--font-display); font-weight: 700;
  font-size: var(--t-xs); letter-spacing: 0.09em; text-transform: uppercase;
  padding: 6px 14px; border-radius: var(--r-cap); box-shadow: var(--sh-2);
}
.tier h3 { font-size: var(--t-lg); margin-bottom: var(--s1); }
.tier .who { font-size: var(--t-sm); color: var(--muted); margin-bottom: var(--s4); }
.tier .amount { display: flex; align-items: baseline; gap: 6px; margin-bottom: var(--s5); }
.tier .amount b { font-family: var(--font-display); font-size: 2.65rem; letter-spacing: -0.04em; color: var(--primary-900); line-height: 1; }
.tier .amount span { font-size: var(--t-sm); color: var(--muted); }
.tier ul { list-style: none; padding: 0; margin: 0 0 var(--s6); }
.tier li { position: relative; padding-left: 30px; font-size: var(--t-sm); color: var(--ink-soft); }
.tier li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary-050); border: 1px solid var(--primary-200);
}
.tier li::after {
  content: ""; position: absolute; left: 5px; top: 12px; width: 8px; height: 4px;
  border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}
.tier .btn { margin-top: auto; }
.billing-note {
  margin-top: var(--s6); text-align: center; font-size: var(--t-sm); color: var(--muted);
  background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-cap);
  padding: var(--s3) var(--s5); display: inline-block;
}
.center { text-align: center; }

/* ------------------------------------------------------------------- FAQ */
.faq-list { max-width: 900px; margin-inline: auto; display: grid; gap: var(--s3); }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.faq-item h3 { margin: 0; font-size: var(--t-base); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  background: none; border: 0; cursor: pointer; text-align: left; padding: var(--s5);
  font-family: var(--font-display); font-weight: 700; font-size: var(--t-md); color: var(--ink);
}
.faq-q:hover { background: var(--primary-050); }
.faq-q .sign { position: relative; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--primary-050); border: 1px solid var(--primary-200); }
.faq-q .sign::before, .faq-q .sign::after {
  content: ""; position: absolute; left: 50%; top: 50%; background: var(--primary);
  transform: translate(-50%, -50%); border-radius: var(--r-cap);
}
.faq-q .sign::before { width: 12px; height: 2px; }
.faq-q .sign::after { width: 2px; height: 12px; transition: transform 0.25s var(--ease); }
.faq-q[aria-expanded="true"] .sign::after { transform: translate(-50%, -50%) scaleY(0); }
.faq-a { padding: 0 var(--s5) var(--s5); color: var(--ink-soft); font-size: var(--t-sm); }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a[hidden] { display: none; }

/* ---------------------------------------------------------------- contact */
.contact-panel {
  display: grid; grid-template-columns: 0.86fr 1.14fr; gap: var(--s8);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: var(--s8); box-shadow: var(--sh-2); position: relative; overflow: hidden;
}
.contact-panel::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}
.contact-aside h2 { font-size: var(--t-xl); }
.contact-aside ul { list-style: none; padding: 0; }
.contact-aside li { position: relative; padding-left: 26px; font-size: var(--t-sm); color: var(--ink-soft); }
.contact-aside li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 14px; height: 7px; border-radius: var(--r-cap);
  background: linear-gradient(90deg, var(--accent) 0 50%, var(--primary) 50% 100%);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: var(--t-sm); font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: var(--t-sm); color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 12px 14px; width: 100%;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}
.field textarea { min-height: 132px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--primary-400); }
.field input:focus, .field select:focus, .field textarea:focus {
  background: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46, 123, 196, 0.2);
  outline: none;
}
.field [aria-invalid="true"] { border-color: #A3231E; background: #fdf3f2; }
.err { font-size: var(--t-xs); color: #8E1F1B; font-weight: 600; min-height: 1em; }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: var(--t-sm); color: var(--ink-soft); }
.consent input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--primary); }
.form-foot { margin-top: var(--s5); font-size: var(--t-xs); color: var(--muted); }

/* ----------------------------------------------------------------- author */
.byline {
  display: flex; align-items: center; gap: var(--s4); margin-top: var(--s8);
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--primary);
  border-radius: var(--r-md); padding: var(--s5); box-shadow: var(--sh-1);
}
.byline img { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; flex: none; }
.byline p { margin: 0; font-size: var(--t-sm); color: var(--ink-soft); }
.byline b { font-family: var(--font-display); color: var(--primary-900); }

/* ----------------------------------------------------------------- footer */
.site-footer {
  margin-top: var(--s10); background: var(--primary-950); color: #c4d9cd;
  border-top: 6px solid var(--primary); position: relative;
}
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 16px, transparent 16px 30px);
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: var(--s7); padding: var(--s9) 0 var(--s7); }
.site-footer h3 {
  color: #fff; font-size: var(--t-sm); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: var(--s4);
}
.site-footer a { color: #c4d9cd; text-decoration: none; font-size: var(--t-sm); }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-name span { color: var(--accent-200); }
.footer-brand p { font-size: var(--t-sm); max-width: 34ch; margin-top: var(--s4); }
.socials { display: flex; gap: 10px; margin-top: var(--s5); }
.socials a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.05);
  transition: background-color 0.22s var(--ease), transform 0.22s var(--ease);
}
.socials a:hover { background: var(--primary); transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; fill: #dbeee3; }
.publisher { font-size: var(--t-xs); color: #92ab9d; margin-top: var(--s4); }
.footer-base {
  border-top: 1px solid rgba(255, 255, 255, 0.12); padding: var(--s5) 0;
  display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: space-between;
  font-size: var(--t-xs); color: #92ab9d;
}

/* ------------------------------------------------------------ prose pages */
.prose { max-width: 78ch; }
.prose h2 { font-size: var(--t-xl); margin-top: var(--s8); }
.prose h3 { font-size: var(--t-md); margin-top: var(--s6); }
.prose p, .prose li { color: var(--ink-soft); }
.page-head {
  background: linear-gradient(180deg, var(--primary-050), transparent);
  border-bottom: 1px solid var(--line); padding: var(--s9) 0 var(--s7);
}
.page-head h1 { font-size: var(--t-2xl); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s6); box-shadow: var(--sh-1); margin-bottom: var(--s5);
}
.map-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
.map-grid ul { list-style: none; padding: 0; }
.map-grid li { margin-bottom: var(--s4); font-size: var(--t-sm); }
.map-grid a { font-weight: 700; }
.map-grid span { display: block; color: var(--muted); }
.author-hero { display: grid; grid-template-columns: 260px 1fr; gap: var(--s7); align-items: start; }
.author-hero img {
  width: 100%; border-radius: var(--r-lg) var(--r-lg) var(--r-cap) var(--r-cap);
  border: 8px solid var(--surface); box-shadow: var(--sh-2); object-fit: cover;
}
.pill-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.pill-list li {
  font-size: var(--t-xs); font-weight: 600; background: var(--primary-050);
  border: 1px solid var(--primary-200); border-radius: var(--r-cap); padding: 5px 14px; color: var(--primary-900);
}
.mini-nav { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }

/* ---------------------------------------------------------------- reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: 0.07s; }
.reveal:nth-child(3) { transition-delay: 0.14s; }
.reveal:nth-child(4) { transition-delay: 0.21s; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .hero-grid, .how-grid { grid-template-columns: 1fr; }
  .how-media { position: static; }
  .problem-grid, .feature-grid, .outcome-grid, .proof-grid, .price-grid, .map-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-panel { grid-template-columns: 1fr; padding: var(--s6); }
  .tier--best { transform: none; }
  .hero-tag { left: auto; right: 16px; bottom: 16px; }
}
@media (max-width: 760px) {
  .nav {
    position: absolute; left: 0; right: 0; top: 100%; background: var(--surface);
    border-bottom: 1px solid var(--line); box-shadow: var(--sh-2); padding: var(--s5);
    display: none;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: flex-start; gap: var(--s4); }
  .nav-toggle { display: block; }
  .header-cta { display: none; }
  .section { padding: var(--s8) 0; }
  .problem-grid, .feature-grid, .outcome-grid, .proof-grid, .price-grid, .map-grid,
  .results, .footer-grid, .form-grid, .author-hero { grid-template-columns: 1fr; }
  .author-hero img { max-width: 220px; }
  .hero { padding-top: var(--s7); }
  .results { padding: var(--s6) var(--s5); }
}
@media (max-width: 400px) {
  .wrap { width: calc(100% - 2 * var(--s4)); }
  .btn { padding: 13px 20px; }
}

/* -------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .cap-meter i { width: var(--val, 60%); }
  .route-line .draw { stroke-dashoffset: 0; animation: none; }
}

/* --------------------------------------------------------------- printing */
@media print {
  .site-header, .site-footer, .hero-media, .btn { display: none; }
  body { background: #fff; color: #000; }
}

/* ==========================================================================
   MAGAZINE: Counter to Curb
   Built from the same tokens as the rest of the site. Dispensing label chips,
   capsule dividers, the dashed route rail and the clinical grid, reused for
   editorial pages. No new colors, no second stylesheet.
   ========================================================================== */

/* the primary nav carries a seventh item now, so tighten it just above the
   point where it becomes the mobile menu */
@media (min-width: 761px) and (max-width: 1120px) {
  .header-inner { gap: var(--s4); }
  .nav ul { gap: var(--s4); }
  .nav a { font-size: var(--t-xs); }
  .header-cta { margin-left: var(--s3); padding: 12px 18px; }
}

/* ------------------------------------------------------------ breadcrumb */
.crumbs ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2);
  list-style: none; margin: 0 0 var(--s5); padding: 0;
  font-size: var(--t-xs); color: var(--muted);
}
.crumbs li { margin: 0; display: flex; align-items: center; gap: var(--s2); }
.crumbs li + li::before {
  content: ""; width: 16px; height: 8px; flex: none; border-radius: var(--r-cap);
  background: linear-gradient(90deg, var(--primary-200) 0 50%, var(--accent-200) 50% 100%);
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--primary-900); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--ink-soft); font-weight: 600; }

/* ------------------------------------------------------- magazine masthead */
.mag-masthead {
  position: relative; padding: var(--s8) 0 var(--s7);
  background: linear-gradient(180deg, var(--primary-050), transparent);
  border-bottom: 1px solid var(--line);
}
.mag-masthead::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--primary-200) 0 14px, transparent 14px 26px);
  opacity: 0.8;
}
.mag-masthead h1 { font-size: var(--t-3xl); margin-bottom: var(--s4); }
.standfirst {
  font-size: var(--t-md); line-height: 1.6; color: var(--ink-soft);
  max-width: 66ch; margin-bottom: var(--s5);
}
.mag-facts { display: flex; flex-wrap: wrap; gap: var(--s3); list-style: none; margin: 0; padding: 0; }
.mag-facts li {
  margin: 0; font-size: var(--t-xs); color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-cap); padding: 6px 15px; box-shadow: var(--sh-1);
}
.mag-facts a { font-weight: 600; }
.mag-section { padding-top: var(--s8); }

/* ------------------------------------------------------------ index cards */
.mag-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6) var(--s5); }
.mag-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-1);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
}
.mag-card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--primary-200); }
.mag-card-media { position: relative; background: var(--primary-050); }
.mag-card-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mag-angle {
  position: absolute; left: var(--s4); bottom: var(--s4);
  font-family: var(--font-display); font-size: var(--t-xs); font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary-900);
  background: rgba(255, 255, 255, 0.93); border: 1px solid var(--primary-200);
  border-radius: var(--r-cap); padding: 5px 13px; box-shadow: var(--sh-1);
}
.mag-card-body {
  display: flex; flex-direction: column; gap: var(--s3); flex: 1;
  padding: var(--s5) var(--s5) var(--s6);
}
.mag-card-title { font-size: var(--t-lg); line-height: 1.14; margin: 0; }
.mag-card-title a { color: var(--ink); text-decoration: none; }
.mag-card-title a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
.mag-card-dek { font-size: var(--t-sm); color: var(--ink-soft); margin: 0; }
.mag-card-meta {
  display: flex; align-items: center; gap: var(--s3);
  margin: auto 0 0; padding-top: var(--s4);
  border-top: 1px dashed var(--line-strong);
  font-size: var(--t-xs); color: var(--muted);
}
.mag-cap {
  width: 20px; height: 10px; flex: none; border-radius: var(--r-cap);
  background: linear-gradient(90deg, var(--primary) 0 50%, var(--accent) 50% 100%);
  box-shadow: var(--sh-inset);
}

/* the lead report runs full width, image beside the headline */
.mag-card.lead {
  grid-column: 1 / -1; flex-direction: row; align-items: stretch;
  border-color: var(--primary-200); box-shadow: var(--sh-2);
}
.mag-card.lead .mag-card-media { flex: 0 0 55%; min-height: 340px; }
.mag-card.lead .mag-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
.mag-card.lead .mag-card-body { padding: var(--s7); justify-content: center; gap: var(--s4); }
.mag-card.lead .mag-card-body::before {
  content: "Lead report"; align-self: flex-start;
  font-family: var(--font-display); font-size: var(--t-xs); font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-800);
  background: var(--accent-050); border: 1px solid var(--accent-200);
  border-radius: var(--r-cap); padding: 6px 14px;
}
.mag-card.lead .mag-card-title { font-size: var(--t-2xl); }
.mag-card.lead .mag-card-dek { font-size: var(--t-md); }

/* ---------------------------------------------------- magazine index outro */
.mag-outro-panel {
  display: grid; grid-template-columns: 1.4fr 0.9fr; gap: var(--s7);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: var(--s7); box-shadow: var(--sh-1);
}
.mag-outro-panel h2 { font-size: var(--t-xl); }
.mag-outro-panel p { color: var(--ink-soft); }
.mag-outro-cta { display: flex; flex-direction: column; justify-content: center; gap: var(--s3); }
.mag-outro-cta .btn { width: 100%; }
.mag-outro-cta p { font-size: var(--t-xs); margin: var(--s2) 0 0; }

/* -------------------------------------------------------- article masthead */
.art-top {
  padding: var(--s7) 0;
  background: linear-gradient(180deg, var(--primary-050), transparent);
  border-bottom: 1px solid var(--line);
}
.art-head { max-width: 74ch; }
.art-head h1 { font-size: var(--t-2xl); margin-bottom: var(--s4); }
.art-byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5);
  margin-top: var(--s5); padding-top: var(--s4);
  border-top: 1px dashed var(--line-strong);
}
.art-by { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: var(--t-sm); color: var(--primary-900); }
.art-by a { color: inherit; }
.art-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4);
  list-style: none; margin: 0; padding: 0; font-size: var(--t-xs); color: var(--muted);
}
.art-meta li { margin: 0; display: flex; align-items: center; gap: var(--s4); }
.art-meta li + li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary-200); flex: none; }
.art-meta time { font-weight: 600; color: var(--ink-soft); }

/* ------------------------------------------------------- featured photograph */
.art-figure { margin: 0; padding: var(--s7) 0 0; }
.art-frame {
  position: relative; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--sh-2);
}
.art-frame img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.art-frame::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
  background: linear-gradient(90deg, var(--primary) 0 38%, var(--accent) 38% 100%);
}
.art-figure figcaption { margin-top: var(--s3); font-size: var(--t-xs); color: var(--muted); max-width: 70ch; }

/* ------------------------------------------------------------ article body */
.art-shell { padding: var(--s8) 0 var(--s9); }
.art-body {
  max-width: 66ch; margin-inline: auto;
  font-size: var(--t-md); line-height: 1.75; color: var(--ink-soft);
}
.art-body > *:first-child { margin-top: 0; }
.art-body p { margin: 0 0 var(--s5); }
.art-body h2 {
  position: relative; font-size: var(--t-xl); color: var(--ink);
  margin: var(--s8) 0 var(--s4); padding-top: var(--s4);
}
.art-body h2::before {
  content: ""; position: absolute; top: 0; left: 0; width: 54px; height: 4px;
  border-radius: var(--r-cap);
  background: linear-gradient(90deg, var(--primary) 0 50%, var(--accent) 50% 100%);
}
.art-body h3 { font-size: var(--t-md); color: var(--primary-900); margin: var(--s6) 0 var(--s3); }
.art-body a { color: var(--primary); font-weight: 600; }
.art-body a:hover { color: var(--accent-800); }
.art-body strong { color: var(--ink); }
.art-body ul, .art-body ol { list-style: none; padding: 0; margin: 0 0 var(--s5); }
.art-body li { position: relative; padding-left: 32px; margin-bottom: var(--s3); }
.art-body ul > li::before {
  content: ""; position: absolute; left: 0; top: 0.62em; width: 18px; height: 9px;
  border-radius: var(--r-cap);
  background: linear-gradient(90deg, var(--primary) 0 50%, var(--primary-200) 50% 100%);
}
.art-body ol { counter-reset: artstep; }
.art-body ol > li { padding-left: 40px; }
.art-body ol > li::before {
  counter-increment: artstep; content: counter(artstep);
  position: absolute; left: 0; top: 0.15em;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary-050); border: 1px solid var(--primary-200);
  color: var(--primary-900); font-family: var(--font-display); font-weight: 700;
  font-size: var(--t-xs); display: flex; align-items: center; justify-content: center;
}
.art-body blockquote {
  margin: var(--s6) 0; padding: var(--s5) var(--s6);
  background: var(--primary-050); border: 1px solid var(--primary-200);
  border-left: 5px solid var(--primary); border-radius: 0 var(--r-md) var(--r-md) 0;
  font-family: var(--font-display); font-size: var(--t-lg); line-height: 1.4;
  color: var(--primary-900); letter-spacing: -0.01em;
}
.art-body blockquote p:last-child { margin-bottom: 0; }
.art-table-scroll, .art-body table { display: block; overflow-x: auto; }
.art-body table {
  width: 100%; border-collapse: collapse; margin: 0 0 var(--s6);
  font-size: var(--t-sm); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
.art-body th, .art-body td { text-align: left; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.art-body th { font-family: var(--font-display); color: var(--primary-900); background: var(--primary-050); }
.art-body tr:last-child td { border-bottom: 0; }

/* contextual link the assembler drops between sections */
.inline-read {
  position: relative; margin: var(--s6) 0; padding: var(--s4) var(--s5) var(--s4) 46px;
  background: var(--accent-050); border: 1px solid var(--accent-200);
  border-radius: var(--r-md); font-size: var(--t-sm); font-weight: 600;
  color: var(--accent-800);
}
.inline-read::before {
  content: ""; position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 11px; height: 24px; border-radius: var(--r-cap);
  background: linear-gradient(180deg, var(--primary) 0 50%, var(--accent) 50% 100%);
}
.inline-read a { color: var(--primary-900); font-weight: 700; }
.inline-read a:hover { color: var(--accent-800); }

/* --------------------------------------------------- call to action block */
.mag-cta {
  position: relative; overflow: hidden; max-width: 66ch;
  margin: var(--s8) auto 0; padding: var(--s7);
  background: linear-gradient(155deg, var(--primary-950), var(--primary-800) 58%, var(--primary));
  border-radius: var(--r-xl); box-shadow: var(--sh-3); color: #dbeee3;
}
.mag-cta::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: repeating-linear-gradient(90deg, var(--primary-400) 0 16px, transparent 16px 30px);
}
.mag-cta .eyebrow { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.28); color: #eaf4ee; }
.mag-cta h2 { color: #fff; font-size: var(--t-xl); margin-bottom: var(--s4); }
.mag-cta p { color: #c4d9cd; font-size: var(--t-sm); margin-bottom: var(--s6); }
.mag-cta .btn { text-align: center; }
.mag-cta .btn-primary { background: #fff; color: var(--primary-900); box-shadow: var(--sh-2); }
.mag-cta .btn-primary:hover { background: var(--primary-050); color: var(--primary-950); }
.mag-cta.crossmark::after { background:
  linear-gradient(var(--primary-400), var(--primary-400)) center / 100% 2px no-repeat,
  linear-gradient(var(--primary-400), var(--primary-400)) center / 2px 100% no-repeat; }

/* ---------------------------------------------------------------- author box */
.author-box {
  display: grid; grid-template-columns: 148px 1fr; gap: var(--s6);
  max-width: 66ch; margin: var(--s7) auto 0; padding: var(--s6);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-1);
}
.author-box img {
  width: 100%; object-fit: cover; border: 6px solid var(--surface);
  border-radius: var(--r-md) var(--r-md) var(--r-cap) var(--r-cap);
  box-shadow: var(--sh-1); background: var(--primary-050);
}
.author-box h2 { font-size: var(--t-lg); margin-bottom: var(--s3); }
.author-box p { font-size: var(--t-sm); color: var(--ink-soft); }
.author-box-link { font-size: var(--t-sm); font-weight: 700; }

/* ------------------------------------------------------------- read also */
.related-section {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, var(--primary-050));
}
.related-head { max-width: 70ch; margin-bottom: var(--s6); }
.related-head h2 { font-size: var(--t-xl); margin-bottom: var(--s3); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
.related-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-1);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
}
.related-card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--primary-200); }
.related-media { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.related-body { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s5); }
.related-date { font-size: var(--t-xs); color: var(--muted); margin: 0; }
.related-card h3 { font-size: var(--t-md); line-height: 1.2; margin: 0; }
.related-card h3 a { color: var(--ink); text-decoration: none; }
.related-card h3 a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
.related-dek { font-size: var(--t-sm); color: var(--ink-soft); margin: 0; }
.related-all { margin: var(--s6) 0 0; }

/* ------------------------------------------------- magazine block at home */
.mag-home-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s5); margin-bottom: var(--s7); }
.mag-home-head .section-head { margin-bottom: 0; }
.mag-home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }

/* --------------------------------------------- published articles listing */
.article-list { list-style: none; padding: 0; margin: var(--s5) 0 0; }
.article-list li {
  margin: 0; padding: var(--s4) 0; border-bottom: 1px dashed var(--line-strong);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s4);
}
.article-list li:last-child { border-bottom: 0; }
.article-list a { font-weight: 700; }
.article-list time { font-size: var(--t-xs); color: var(--muted); white-space: nowrap; }

/* ----------------------------------------------------- magazine responsive */
@media (max-width: 1080px) {
  .mag-grid, .related-grid, .mag-home-grid { grid-template-columns: repeat(2, 1fr); }
  .mag-card.lead { flex-direction: column; }
  .mag-card.lead .mag-card-media { flex: none; min-height: 0; }
  .mag-card.lead .mag-card-media img { position: static; aspect-ratio: 3 / 2; height: auto; }
  .mag-card.lead .mag-card-body { padding: var(--s6); }
  .mag-outro-panel { grid-template-columns: 1fr; gap: var(--s6); }
}
@media (max-width: 760px) {
  .mag-grid, .related-grid, .mag-home-grid { grid-template-columns: 1fr; }
  .mag-masthead { padding: var(--s7) 0 var(--s6); }
  .art-shell { padding: var(--s7) 0 var(--s8); }
  .art-body { font-size: var(--t-base); line-height: 1.72; }
  .art-body h2 { margin-top: var(--s7); }
  .mag-cta { padding: var(--s6); }
  .mag-cta .btn { width: 100%; }
  .author-box { grid-template-columns: 1fr; gap: var(--s5); }
  .author-box img { max-width: 136px; }
  .mag-card.lead .mag-card-title { font-size: var(--t-xl); }
  .mag-outro-panel { padding: var(--s6); }
}
@media (max-width: 400px) {
  .mag-card-body, .related-body { padding: var(--s4); }
  .mag-card.lead .mag-card-body { padding: var(--s5); }
  .mag-cta, .mag-outro-panel { padding: var(--s5); border-radius: var(--r-lg); }
  .author-box { padding: var(--s5); }
  .art-frame { border-radius: var(--r-lg); }
  .art-figure { padding-top: var(--s6); }
  .mag-facts li { font-size: 0.72rem; padding: 5px 12px; }
  .art-body li { padding-left: 26px; }
  .art-body ol > li { padding-left: 36px; }
  .inline-read { padding: var(--s4) var(--s4) var(--s4) 40px; }
}



/* Network strip: five sibling products, rotated so every site is linked the same
   number of times. Spans the full footer grid rather than adding a fifth column,
   because each footer declares a fixed column count and a fifth item would wrap. */
.site-network { grid-column: 1 / -1; flex-basis: 100%; width: 100%;
  margin-top: 1.6rem; padding-top: 1.2rem;
  border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent); }
.site-network h2 { font: inherit; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase; margin: 0 0 0.7rem; opacity: 0.72; }
.site-network ul { list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-network li + li { margin-top: 0; }
.site-network a { font-size: 0.86rem; text-decoration: none; opacity: 0.9;
  border-bottom: 1px solid transparent; }
.site-network a:hover, .site-network a:focus-visible { opacity: 1; border-bottom-color: currentColor; }
@media (max-width: 620px) { .site-network ul { gap: 0.45rem 1.1rem; } }


/* Decorative bleed guard. Several sections intentionally hang a rotated or offset
   pseudo element past the viewport edge. overflow-x: clip contains them without
   creating a scroll container, so position: sticky keeps working, unlike overflow
   hidden. Genuine content overflow is still reported by the element level check in
   the browser pass. */
html { overflow-x: clip; }
body { overflow-x: clip; }


/* Wide content on phones. Class names for the prose wrapper differ from site to site,
   so this targets tables and pre blocks directly: they scroll inside their own box
   rather than pushing cells past the right edge, per the build contract. */
@media (max-width: 700px) {
  table { display: block; width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th, td { overflow-wrap: anywhere; }
  pre { overflow-x: auto; max-width: 100%; }
}
