/*
   SuperbillDesk design system
   Therapeutic calm: warm greige paper, sage structure, a quiet clay accent.
   Motifs: ruled statement paper, tear off perforation, arched consulting room window.
   Newsreader for display, Figtree for body. Wide leading. Nothing hurries.
*/

:root {
  /* brief palette */
  --bg: #F8F7F4;
  --surface: #FFFFFF;
  --ink: #22251F;
  --primary: #5A7060;
  --accent: #C4795A;
  --muted: #6C6F67;
  --text-soft: #5F6359;

  /* sage shades and tints */
  --sage-900: #2B362E;
  --sage-800: #37453A;
  --sage-700: #445446;
  --sage-600: #4E6253;
  --sage-400: #8FA394;
  --sage-300: #AFBEB3;
  --sage-200: #D2DBD3;
  --sage-100: #E6ECE5;
  --sage-050: #F1F4EF;

  /* clay shades and tints */
  --clay-800: #7E452F;
  --clay-700: #96543A;
  --clay-600: #AC6449;
  --clay-300: #E0B49E;
  --clay-200: #EED8CB;
  --clay-100: #F6E9E0;

  /* warm greige neutrals */
  --greige-500: #9A968B;
  --greige-400: #B8B4A8;
  --greige-300: #D6D2C6;
  --greige-200: #E5E2D9;
  --greige-100: #F1EFE9;
  --paper: #FCFBF8;
  --line: #E2DFD5;
  --line-soft: #EDEBE3;

  /* type */
  --font-display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-body: "Figtree", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;

  --step--1: clamp(0.84rem, 0.81rem + 0.14vw, 0.92rem);
  --step-0: clamp(1rem, 0.96rem + 0.20vw, 1.10rem);
  --step-1: clamp(1.16rem, 1.09rem + 0.34vw, 1.34rem);
  --step-2: clamp(1.38rem, 1.25rem + 0.62vw, 1.72rem);
  --step-3: clamp(1.66rem, 1.42rem + 1.10vw, 2.30rem);
  --step-4: clamp(2.00rem, 1.58rem + 1.90vw, 3.05rem);
  --step-5: clamp(2.40rem, 1.72rem + 3.05vw, 4.05rem);

  --leading-loose: 1.86;
  --leading-body: 1.74;
  --leading-tight: 1.18;

  /* spacing scale, generous by design */
  --s-1: 0.35rem;
  --s-2: 0.6rem;
  --s-3: 0.95rem;
  --s-4: 1.35rem;
  --s-5: 1.9rem;
  --s-6: 2.6rem;
  --s-7: 3.6rem;
  --s-8: 5rem;
  --s-9: 6.8rem;
  --s-10: 9rem;

  /* radii, soft everywhere */
  --r-xs: 6px;
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 30px;
  --r-xl: 44px;
  --r-pill: 999px;
  --r-arch: 47% 47% 26px 26px / 38% 38% 4% 4%;

  /* shadows, greige tinted and very soft */
  --sh-1: 0 1px 2px rgba(34, 37, 31, 0.04), 0 6px 18px rgba(34, 37, 31, 0.045);
  --sh-2: 0 2px 4px rgba(34, 37, 31, 0.045), 0 14px 40px rgba(34, 37, 31, 0.065);
  --sh-3: 0 4px 8px rgba(34, 37, 31, 0.05), 0 28px 70px rgba(34, 37, 31, 0.09);
  --sh-inset: inset 0 1px 0 rgba(255, 255, 255, 0.85);

  --wrap: 1180px;
  --wrap-narrow: 760px;
  --ease-calm: cubic-bezier(0.22, 0.61, 0.24, 1);
  --dur-slow: 1100ms;
  --dur-mid: 620ms;
}

/* ---------- 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(--step-0);
  line-height: var(--leading-body);
  color: var(--ink);
  background-color: var(--bg);
  /* warm paper grain: three drifting washes over a ruled statement grid */
  background-image:
    radial-gradient(circle at 14% 8%, rgba(90, 112, 96, 0.055), rgba(90, 112, 96, 0) 46%),
    radial-gradient(circle at 88% 22%, rgba(196, 121, 90, 0.05), rgba(196, 121, 90, 0) 40%),
    radial-gradient(circle at 52% 96%, rgba(154, 150, 139, 0.07), rgba(154, 150, 139, 0) 52%),
    repeating-linear-gradient(180deg, rgba(34, 37, 31, 0.022) 0 1px, rgba(34, 37, 31, 0) 1px 34px);
  background-attachment: fixed, fixed, fixed, scroll;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
svg { display: block; }
a { color: var(--sage-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--clay-700); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: -0.012em;
  color: var(--sage-900);
  margin: 0 0 var(--s-3);
}
h1 { font-size: var(--step-5); letter-spacing: -0.021em; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { margin: 0 0 var(--s-4); }
ul, ol { margin: 0 0 var(--s-4); padding-left: 1.15rem; }
li { margin-bottom: var(--s-2); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-7) 0; }

/* ---------- utilities ---------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.wrap { width: min(100% - 2.4rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.4rem, var(--wrap-narrow)); margin-inline: auto; }
.section { padding-block: var(--s-9); position: relative; }
.section--tight { padding-block: var(--s-8); }
.lede { font-size: var(--step-1); line-height: var(--leading-loose); color: var(--text-soft); max-width: 62ch; }
.center { text-align: center; margin-inline: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-body); font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.19em; text-transform: uppercase; color: var(--clay-700);
  margin-bottom: var(--s-3);
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--clay-300); display: block;
}
.eyebrow--center { justify-content: center; }
.eyebrow--center::after {
  content: ""; width: 26px; height: 1px; background: var(--clay-300); display: block;
}
.section-head { max-width: 68ch; margin-bottom: var(--s-7); }
.section-head.center { text-align: center; }

/* skip link */
.skip {
  position: absolute; left: var(--s-3); top: -100px; z-index: 200;
  background: var(--sage-800); color: #fff; padding: 0.75rem 1.25rem;
  border-radius: var(--r-sm); font-weight: 600; text-decoration: none;
  transition: top var(--dur-mid) var(--ease-calm);
}
.skip:focus { top: var(--s-3); color: #fff; }

/* focus ring, present on every interactive element */
:focus-visible {
  outline: 3px solid var(--clay-600);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* ---------- paper card, the base surface object ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-5);
  box-shadow: var(--sh-1), var(--sh-inset);
  position: relative;
}
/* tear off perforation along the top edge of statement cards */
.card--perf { padding-top: calc(var(--s-5) + 10px); }
.card--perf::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: 13px; height: 6px;
  background-image: radial-gradient(circle, var(--greige-300) 0 1.6px, rgba(0, 0, 0, 0) 1.9px);
  background-size: 11px 6px; background-repeat: repeat-x; opacity: 0.9;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  font-family: var(--font-body); font-weight: 600; font-size: var(--step-0);
  line-height: 1.1; text-decoration: none; cursor: pointer;
  padding: 0.95rem 1.6rem; border-radius: var(--r-pill);
  border: 1px solid transparent;
  transition: background-color var(--dur-mid) var(--ease-calm),
              color var(--dur-mid) var(--ease-calm),
              border-color var(--dur-mid) var(--ease-calm),
              box-shadow var(--dur-mid) var(--ease-calm),
              transform var(--dur-mid) var(--ease-calm);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary {
  background: var(--primary); color: #FBFCFA; border-color: var(--sage-700);
  box-shadow: 0 10px 26px rgba(90, 112, 96, 0.24);
}
.btn--primary:hover { background: var(--sage-700); color: #fff; transform: translateY(-1px); }
.btn--ghost {
  background: rgba(255, 255, 255, 0.7); color: var(--sage-800); border-color: var(--greige-300);
}
.btn--ghost:hover { background: var(--surface); border-color: var(--sage-300); color: var(--sage-800); }
.btn--clay { background: var(--accent); color: #FFF8F4; border-color: var(--clay-700); }
.btn--clay:hover { background: var(--clay-700); color: #fff; }
.btn--wide { width: 100%; }
.btn--sm { padding: 0.68rem 1.15rem; font-size: var(--step--1); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(11px) saturate(112%);
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur-mid) var(--ease-calm),
              border-color var(--dur-mid) var(--ease-calm),
              box-shadow var(--dur-mid) var(--ease-calm);
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px rgba(34, 37, 31, 0.05);
}
.header-inner {
  display: flex; align-items: center; gap: var(--s-4);
  min-height: 76px; padding-block: 0.7rem;
}
.brandmark { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.brandmark svg { width: 34px; height: 34px; }
.brandmark-name {
  font-family: var(--font-display); font-size: 1.32rem; font-weight: 600;
  letter-spacing: -0.015em; color: var(--sage-900);
}
.brandmark-name b { font-weight: 600; color: var(--clay-700); }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 0.6rem 0.85rem; border-radius: var(--r-pill);
  font-size: var(--step--1); font-weight: 600; letter-spacing: 0.005em;
  color: var(--sage-800); text-decoration: none;
  transition: background-color var(--dur-mid) var(--ease-calm), color var(--dur-mid) var(--ease-calm);
}
.site-nav a:hover { background: var(--sage-100); color: var(--sage-900); }
.header-cta { display: inline-flex; }
.nav-toggle {
  display: none; align-items: center; justify-content: center; gap: 0.5rem;
  margin-left: auto; padding: 0.6rem 0.9rem; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--greige-300); cursor: pointer;
  font-size: var(--step--1); font-weight: 600;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .bar-close { display: none; }
.nav-toggle[aria-expanded="true"] .bar-open { display: none; }
.nav-toggle[aria-expanded="true"] .bar-close { display: block; }

/* ---------- hero ---------- */
.hero { padding-block: var(--s-9) var(--s-8); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(70% 52% at 78% 24%, rgba(90, 112, 96, 0.10), rgba(90, 112, 96, 0) 70%),
    radial-gradient(46% 40% at 12% 78%, rgba(196, 121, 90, 0.09), rgba(196, 121, 90, 0) 72%);
}
.hero-grid {
  display: grid; gap: var(--s-8); align-items: center;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.86fr);
  position: relative;
}
.hero h1 { max-width: 16ch; }
.hero-sub { font-size: var(--step-1); line-height: var(--leading-loose); color: var(--text-soft); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }

/* trust strip: three proof points on a ruled slip of statement paper */
.trust {
  margin-top: var(--s-7); display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--s-3) var(--s-5); padding: var(--s-4) var(--s-5);
  background: linear-gradient(180deg, var(--paper), var(--surface));
  border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-1);
}
.trust li { list-style: none; margin: 0; display: flex; align-items: center; gap: 0.6rem;
  font-size: var(--step--1); font-weight: 600; color: var(--sage-800); }
.trust ul { display: contents; }
.trust svg { width: 19px; height: 19px; color: var(--accent); flex: none; }

/* arched window frame for photography */
.arch {
  position: relative; border-radius: var(--r-arch); overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--sh-3);
  background: var(--sage-050);
}
.arch img { width: 100%; height: 100%; object-fit: cover; }
.arch::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.55), inset 0 -70px 90px rgba(90, 112, 96, 0.13);
}
.hero-figure { position: relative; }
.hero-figure::before {
  content: ""; position: absolute; inset: -28px -26px -14px -30px; z-index: -1;
  border-radius: var(--r-arch);
  background: radial-gradient(75% 65% at 50% 40%, rgba(90, 112, 96, 0.16), rgba(90, 112, 96, 0) 72%);
}
/* the floating superbill chip that names the mechanic */
.chip-bill {
  position: absolute; left: -18px; bottom: 34px; z-index: 3;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 0.8rem 1rem; box-shadow: var(--sh-2); max-width: 250px;
}
.chip-bill::before {
  content: ""; position: absolute; left: 10px; right: 10px; top: 7px; height: 5px;
  background-image: radial-gradient(circle, var(--greige-300) 0 1.5px, rgba(0, 0, 0, 0) 1.8px);
  background-size: 10px 5px; background-repeat: repeat-x;
}
.chip-bill dl { margin: 0.45rem 0 0; display: grid; grid-template-columns: auto 1fr; gap: 0.28rem 0.8rem; }
.chip-bill dt { font-size: 0.7rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-soft); }
.chip-bill dd { margin: 0; font-size: 0.86rem; font-weight: 700; color: var(--sage-800); font-variant-numeric: tabular-nums; }
.chip-bill .chip-total { color: var(--clay-700); }

/* ---------- band backgrounds ---------- */
.band-paper {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.62)),
    repeating-linear-gradient(180deg, rgba(34, 37, 31, 0.03) 0 1px, rgba(34, 37, 31, 0) 1px 34px);
  border-block: 1px solid var(--line-soft);
}
.band-sage {
  background:
    radial-gradient(60% 70% at 20% 0%, rgba(90, 112, 96, 0.12), rgba(90, 112, 96, 0) 68%),
    linear-gradient(180deg, var(--sage-050), var(--sage-100));
  border-block: 1px solid var(--sage-200);
}
.band-deep {
  background:
    radial-gradient(70% 80% at 85% 10%, rgba(196, 121, 90, 0.20), rgba(196, 121, 90, 0) 66%),
    linear-gradient(170deg, var(--sage-800), var(--sage-900));
  color: var(--sage-100);
}
.band-deep h2, .band-deep h3 { color: #FBFCF9; }
.band-deep .lede { color: rgba(240, 244, 238, 0.86); }
.band-deep .eyebrow { color: var(--clay-300); }
.band-deep .eyebrow::before, .band-deep .eyebrow--center::after { background: rgba(224, 180, 158, 0.6); }

/* ---------- problem cards ---------- */
.pain-grid {
  display: grid; gap: var(--s-4);
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
}
.pain {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: calc(var(--s-5) + 8px) var(--s-5) var(--s-5);
  box-shadow: var(--sh-1); position: relative;
}
.pain::before {
  content: ""; position: absolute; left: 16px; right: 16px; top: 14px; height: 6px;
  background-image: radial-gradient(circle, var(--greige-300) 0 1.6px, rgba(0, 0, 0, 0) 1.9px);
  background-size: 11px 6px; background-repeat: repeat-x;
}
.pain h3 { font-size: var(--step-1); margin-bottom: var(--s-2); }
.pain p { font-size: 0.98rem; color: var(--text-soft); margin-bottom: var(--s-3); }
.pain .cost {
  display: inline-block; font-family: var(--font-display); font-size: 1.28rem; font-weight: 600;
  color: var(--clay-700); border-top: 1px dashed var(--clay-300); padding-top: 0.6rem; width: 100%;
  font-variant-numeric: tabular-nums;
}

/* ---------- steps ---------- */
.steps-layout { display: grid; gap: var(--s-8); grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr); align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.steps::before {
  content: ""; position: absolute; left: 27px; top: 26px; bottom: 30px; width: 2px;
  background: linear-gradient(180deg, var(--sage-200), var(--clay-200));
  border-radius: 2px;
}
.step { display: grid; grid-template-columns: 56px 1fr; gap: var(--s-4); margin-bottom: var(--s-6); position: relative; }
.step:last-child { margin-bottom: 0; }
.step-num {
  width: 56px; height: 56px; border-radius: var(--r-pill);
  display: grid; place-items: center; background: var(--surface);
  border: 1px solid var(--sage-200); box-shadow: var(--sh-1);
  font-family: var(--font-display); font-size: 1.32rem; font-weight: 600; color: var(--sage-700);
  position: relative; z-index: 1;
}
.step:nth-child(2) .step-num { border-color: var(--sage-300); }
.step:nth-child(3) .step-num { border-color: var(--clay-300); color: var(--clay-700); }
.step:nth-child(4) .step-num { border-color: var(--clay-300); color: var(--clay-700); }
.step h3 { margin-bottom: 0.45rem; font-size: var(--step-2); }
.step p { color: var(--text-soft); margin-bottom: 0; }
.step-note {
  display: inline-block; margin-top: var(--s-3); font-size: 0.84rem; font-weight: 600;
  color: var(--sage-700); background: var(--sage-100); border-radius: var(--r-pill);
  padding: 0.35rem 0.8rem;
}
.steps-figure { position: sticky; top: 108px; }

/* ---------- features ---------- */
.feature-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(288px, 1fr)); }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-5); box-shadow: var(--sh-1);
  transition: box-shadow var(--dur-slow) var(--ease-calm), transform var(--dur-slow) var(--ease-calm),
              border-color var(--dur-slow) var(--ease-calm);
}
.feature:hover { box-shadow: var(--sh-2); transform: translateY(-3px); border-color: var(--sage-200); }
.feature-icon {
  width: 54px; height: 54px; border-radius: var(--r-pill); display: grid; place-items: center;
  background: radial-gradient(circle at 34% 30%, var(--sage-100), var(--sage-050));
  border: 1px solid var(--sage-200); margin-bottom: var(--s-4);
}
.feature-icon svg { width: 26px; height: 26px; color: var(--sage-700); }
.feature:nth-child(3n+2) .feature-icon {
  background: radial-gradient(circle at 34% 30%, var(--clay-100), #FBF3EE);
  border-color: var(--clay-200);
}
.feature:nth-child(3n+2) .feature-icon svg { color: var(--clay-700); }
.feature h3 { font-size: var(--step-1); margin-bottom: var(--s-2); }
.feature p { color: var(--text-soft); margin-bottom: 0; font-size: 0.98rem; }

/* ---------- outcomes ---------- */
.outcome-grid { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); }
.outcome {
  padding: var(--s-5) var(--s-5) var(--s-5) var(--s-5);
  border-left: 3px solid rgba(224, 180, 158, 0.55);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.outcome .figure {
  font-family: var(--font-display); font-size: clamp(2.5rem, 1.9rem + 2.4vw, 3.5rem);
  line-height: 1; font-weight: 500; color: #FCFBF7; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; display: block; margin-bottom: 0.5rem;
}
.outcome h3 { font-size: var(--step-1); margin-bottom: var(--s-2); }
.outcome p { color: rgba(238, 243, 236, 0.82); font-size: 0.97rem; margin-bottom: 0; }

/* ---------- testimonials ---------- */
.quote-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.testimonial {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-6) var(--s-5) var(--s-5); margin: 0; box-shadow: var(--sh-1); position: relative;
}
.testimonial::before {
  content: "\201C"; position: absolute; top: 10px; left: 22px;
  font-family: var(--font-display); font-size: 4.4rem; line-height: 1; color: var(--clay-200);
}
.testimonial p {
  font-family: var(--font-display); font-size: 1.09rem; line-height: 1.78;
  color: var(--sage-900); margin-bottom: var(--s-4); position: relative;
}
.testimonial figcaption, .testimonial .who { display: flex; align-items: center; gap: 0.85rem; }
.who-mark {
  width: 42px; height: 42px; border-radius: var(--r-pill); flex: none;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 600;
  background: var(--sage-100); color: var(--sage-700); border: 1px solid var(--sage-200);
}
.who-name { font-weight: 700; font-size: 0.96rem; color: var(--sage-900); display: block; }
.who-meta { font-size: 0.85rem; color: var(--text-soft); display: block; }
.results {
  margin-top: var(--s-6); display: grid; gap: var(--s-4);
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  background: linear-gradient(180deg, var(--paper), var(--surface));
  border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5);
  box-shadow: var(--sh-1);
}
.result { text-align: center; padding: var(--s-2) var(--s-3); }
.result + .result { border-left: 1px dashed var(--line); }
.result b {
  display: block; font-family: var(--font-display); font-size: 2.1rem; font-weight: 500;
  color: var(--clay-700); letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.result span { font-size: 0.9rem; color: var(--text-soft); }

/* ---------- pricing ---------- */
.price-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
.tier {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-6) var(--s-5) var(--s-5); box-shadow: var(--sh-1);
  display: flex; flex-direction: column; position: relative;
}
.tier--featured {
  border-color: var(--sage-300);
  box-shadow: var(--sh-3);
  background:
    linear-gradient(180deg, var(--sage-050) 0 96px, var(--surface) 96px);
}
.ribbon {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--clay-700); color: #FFF7F3; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; padding: 0.42rem 1rem;
  border-radius: var(--r-pill); box-shadow: 0 8px 20px rgba(196, 121, 90, 0.3);
  white-space: nowrap;
}
.tier h3 { font-size: var(--step-2); margin-bottom: 0.25rem; }
.tier-for { font-size: 0.9rem; color: var(--text-soft); margin-bottom: var(--s-4); }
.tier-price { display: flex; align-items: baseline; gap: 0.4rem; margin-bottom: var(--s-2); }
.tier-price b {
  font-family: var(--font-display); font-size: 3rem; font-weight: 500; line-height: 1;
  color: var(--sage-900); letter-spacing: -0.03em;
}
.tier-price span { font-size: 0.95rem; color: var(--text-soft); }
.tier-note { font-size: 0.86rem; color: var(--text-soft); margin-bottom: var(--s-4); }
.tier ul { list-style: none; padding: 0; margin: 0 0 var(--s-5); }
.tier li {
  position: relative; padding-left: 1.75rem; font-size: 0.95rem; color: var(--ink);
  margin-bottom: 0.7rem; line-height: 1.62;
}
.tier li::before {
  content: ""; position: absolute; left: 0; top: 0.42em; width: 15px; height: 9px;
  border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
  border-radius: 1px; transform: rotate(-45deg);
}
.tier--featured li::before { border-color: var(--accent); }
.tier .btn { margin-top: auto; }
.billing-note {
  margin-top: var(--s-5); text-align: center; font-size: 0.95rem; color: var(--text-soft);
  max-width: 66ch; margin-inline: auto;
}

/* ---------- faq ---------- */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: var(--s-4) 3rem var(--s-4) 0; position: relative;
  font-family: var(--font-display); font-size: var(--step-1); font-weight: 500;
  color: var(--sage-900); line-height: 1.4;
}
.faq-q:hover { color: var(--clay-700); }
.faq-q::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 13px; height: 13px;
  border-right: 2px solid var(--sage-400); border-bottom: 2px solid var(--sage-400);
  border-radius: 2px; transform: translateY(-70%) rotate(45deg);
  transition: transform var(--dur-mid) var(--ease-calm), border-color var(--dur-mid) var(--ease-calm);
}
.faq-q[aria-expanded="true"]::after { transform: translateY(-30%) rotate(-135deg); border-color: var(--clay-600); }
.faq-a { padding: 0 3rem var(--s-5) 0; color: var(--text-soft); max-width: 78ch; }
.faq-a p { margin-bottom: 0; line-height: var(--leading-loose); }
.faq-a[hidden] { display: none; }

/* ---------- contact form ---------- */
.contact-layout { display: grid; gap: var(--s-7); grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr); align-items: start; }
.contact-aside p { color: var(--text-soft); }
.contact-aside .lede { margin-bottom: var(--s-5); }
.aside-list { list-style: none; padding: 0; margin: 0; }
.aside-list li { display: flex; gap: 0.75rem; align-items: flex-start; margin-bottom: var(--s-3); font-size: 0.96rem; }
.aside-list svg { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 2px; }
.form-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-6); box-shadow: var(--sh-2);
  background-image:
    repeating-linear-gradient(180deg, rgba(34, 37, 31, 0.018) 0 1px, rgba(34, 37, 31, 0) 1px 34px);
}
.field { margin-bottom: var(--s-4); }
.field label { display: block; font-size: 0.88rem; font-weight: 700; color: var(--sage-800); margin-bottom: 0.45rem; }
.field .hint { display: block; font-weight: 400; color: var(--text-soft); font-size: 0.82rem; margin-top: 0.2rem; }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
  width: 100%; font: inherit; font-size: 0.98rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--greige-300); border-radius: var(--r-sm);
  padding: 0.8rem 0.95rem; line-height: 1.5;
  transition: border-color var(--dur-mid) var(--ease-calm), box-shadow var(--dur-mid) var(--ease-calm),
              background-color var(--dur-mid) var(--ease-calm);
}
.field textarea { min-height: 138px; resize: vertical; }
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, rgba(0,0,0,0) 50%, var(--sage-600) 50%),
                    linear-gradient(135deg, var(--sage-600) 50%, rgba(0,0,0,0) 50%);
  background-position: calc(100% - 20px) 1.28rem, calc(100% - 14px) 1.28rem;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
  padding-right: 2.6rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background: var(--surface);
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(90, 112, 96, 0.16);
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--clay-600); outline-offset: 2px;
}
.field-row { display: grid; gap: var(--s-4); grid-template-columns: 1fr 1fr; }
.field [aria-invalid="true"] { border-color: var(--clay-700); background: #FDF6F2; }
.err { display: block; color: var(--clay-800); font-size: 0.84rem; font-weight: 600; margin-top: 0.35rem; }
.err[hidden] { display: none; }
.consent { display: flex; gap: 0.75rem; align-items: flex-start; margin-bottom: var(--s-4); }
.consent input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--primary); flex: none; }
.consent label { font-size: 0.9rem; font-weight: 400; color: var(--text-soft); line-height: 1.6; margin: 0; }
.form-foot { margin-top: var(--s-4); font-size: 0.9rem; color: var(--text-soft); }
.form-foot a { font-weight: 600; }

/* ---------- author byline ---------- */
.byline {
  display: flex; gap: var(--s-4); align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-5); box-shadow: var(--sh-1);
}
.byline img { width: 64px; height: 64px; border-radius: var(--r-pill); object-fit: cover; border: 1px solid var(--sage-200); }
.byline p { margin: 0; color: var(--text-soft); font-size: 0.95rem; max-width: 62ch; }
.byline strong { color: var(--sage-900); }

/* ---------- footer ---------- */
.site-footer {
  margin-top: var(--s-9);
  background:
    radial-gradient(60% 90% at 12% 0%, rgba(196, 121, 90, 0.14), rgba(196, 121, 90, 0) 62%),
    linear-gradient(170deg, var(--sage-800), var(--sage-900) 70%);
  color: rgba(238, 243, 236, 0.86);
  padding-top: var(--s-8);
}
.site-footer h2, .site-footer h3 { color: #FBFCF9; }
.footer-grid { display: grid; gap: var(--s-6); grid-template-columns: 1.4fr 1fr 1fr 1.25fr; padding-bottom: var(--s-7); }
.footer-brand .brandmark-name { color: #FBFCF9; }
.footer-brand .brandmark-name b { color: var(--clay-300); }
.footer-tag { margin: var(--s-3) 0 var(--s-4); font-size: 0.95rem; color: rgba(238, 243, 236, 0.78); max-width: 34ch; }
.social { display: flex; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.social a {
  width: 40px; height: 40px; border-radius: var(--r-pill); display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14);
  color: #EDF2EB; transition: background-color var(--dur-mid) var(--ease-calm), color var(--dur-mid) var(--ease-calm);
}
.social a:hover { background: var(--clay-700); color: #fff; border-color: var(--clay-600); }
.social svg { width: 19px; height: 19px; }
.footer-col h3 { font-family: var(--font-body); font-size: 0.76rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--clay-300); margin-bottom: var(--s-3); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { color: rgba(238, 243, 236, 0.85); text-decoration: none; font-size: 0.94rem; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.publisher-line { margin-top: var(--s-4); font-size: 0.86rem; color: rgba(238, 243, 236, 0.6); }
.footer-base {
  border-top: 1px solid rgba(255, 255, 255, 0.13); padding-block: var(--s-4);
  display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between;
  font-size: 0.86rem; color: rgba(238, 243, 236, 0.66);
}
.footer-base a { color: rgba(238, 243, 236, 0.8); }

/* ---------- long form prose pages ---------- */
.page-head { padding-block: var(--s-8) var(--s-6); }
.page-head h1 { max-width: 22ch; }
.page-head .lede { margin-bottom: 0; }
.crumbs { font-size: 0.85rem; color: var(--text-soft); margin-bottom: var(--s-4); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--greige-400); }
.prose { max-width: 74ch; }
.prose h2 { font-size: var(--step-3); margin-top: var(--s-7); }
.prose h3 { font-size: var(--step-1); margin-top: var(--s-5); }
.prose p, .prose li { line-height: var(--leading-loose); color: #35392F; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose strong { color: var(--sage-900); }
.fact-table {
  width: 100%; border-collapse: collapse; margin: var(--s-4) 0 var(--s-6);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
}
.fact-table th, .fact-table td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line-soft); font-size: 0.95rem; vertical-align: top; }
.fact-table th { width: 40%; color: var(--sage-800); font-weight: 700; background: var(--greige-100); }
.fact-table tr:last-child th, .fact-table tr:last-child td { border-bottom: 0; }
.note-card {
  background: var(--sage-050); border: 1px solid var(--sage-200); border-left: 3px solid var(--primary);
  border-radius: 0 var(--r-md) var(--r-md) 0; padding: var(--s-4) var(--s-5); margin: var(--s-5) 0;
}
.note-card p:last-child { margin-bottom: 0; }
.map-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.map-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); box-shadow: var(--sh-1); }
.map-col h2 { font-size: var(--step-1); margin-top: 0; }
.map-col ul { list-style: none; padding: 0; margin: 0; }
.map-col li { margin-bottom: var(--s-3); }
.map-col a { font-weight: 700; text-decoration: none; }
.map-col a:hover { text-decoration: underline; }
.map-col span { display: block; font-size: 0.9rem; color: var(--text-soft); line-height: 1.6; }

/* author page */
.author-grid { display: grid; gap: var(--s-7); grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
.author-portrait {
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--sh-2); background: var(--sage-050);
}
.author-side .card { margin-top: var(--s-4); }
.profile-links { list-style: none; padding: 0; margin: 0; }
.profile-links li { margin-bottom: 0.55rem; }
.profile-links a { font-weight: 600; font-size: 0.94rem; text-decoration: none; display: inline-flex; gap: 0.5rem; align-items: center; }
.profile-links a:hover { text-decoration: underline; }
.profile-links svg { width: 17px; height: 17px; color: var(--accent); flex: none; }

/* thanks + 404 */
.status-page { min-height: 56vh; display: grid; place-items: center; text-align: center; padding-block: var(--s-9); }
.status-inner { max-width: 62ch; }
.status-mark { width: 92px; height: 92px; margin: 0 auto var(--s-5); }
.status-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: center; margin-top: var(--s-5); }

/* ---------- reveal motion: very slow fades, generous stagger ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease-calm), transform var(--dur-slow) var(--ease-calm);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal, .reveal.is-static { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .steps-layout { grid-template-columns: 1fr; }
  .steps-figure { position: static; }
  .author-grid { grid-template-columns: 240px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-7); }
  .hero h1 { max-width: 20ch; }
  .hero-figure { order: -1; }
  .chip-bill { left: auto; right: 10px; bottom: 14px; }
}
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; margin: 0;
    background: var(--surface); border-block: 1px solid var(--line);
    box-shadow: var(--sh-2); padding: var(--s-4) 1.2rem var(--s-5);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0.15rem; }
  .site-nav a { padding: 0.8rem 0.9rem; font-size: var(--step-0); }
  .header-cta { display: none; }
  .site-nav .nav-cta { display: block; margin-top: var(--s-3); }
  .site-nav .nav-cta a { background: var(--primary); color: #FBFCFA; text-align: center; }
  .site-nav .nav-cta a:hover { background: var(--sage-700); color: #fff; }
  .header-inner { position: relative; }
}
@media (max-width: 700px) {
  :root { --s-9: 5rem; --s-8: 3.6rem; }
  .author-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .result + .result { border-left: 0; border-top: 1px dashed var(--line); padding-top: var(--s-4); }
  .form-card { padding: var(--s-5) var(--s-4); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .faq-q { font-size: var(--step-0); padding-right: 2.4rem; }
  .faq-a { padding-right: 0; }
}
@media (max-width: 400px) {
  .wrap, .wrap-narrow { width: min(100% - 1.6rem, var(--wrap)); }
  .brandmark-name { font-size: 1.14rem; }
  .trust { padding: var(--s-4); }
  .tier { padding: var(--s-6) var(--s-4) var(--s-4); }
}

/* ---------- 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;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .feature:hover, .btn--primary:hover { transform: none; }
}

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

/* ==================================================================
   The Reimbursement Desk: the SuperbillDesk magazine
   Same paper, same sage rules, same clay accent. The article page is a
   single ruled column; the index is a statement board of paper cards.
   ================================================================== */

/* the reading column, a measure of roughly 68 characters */
.mag-measure { width: min(100% - 2.4rem, 69ch); margin-inline: auto; }

/* the nav gained one more item, so let it fold instead of crushing */
.site-nav ul { flex-wrap: wrap; justify-content: flex-end; }
.site-nav a[aria-current="page"] {
  background: var(--sage-100); color: var(--sage-900);
  box-shadow: inset 0 0 0 1px var(--sage-200);
}

/* ---------- magazine masthead ---------- */
.mag-masthead {
  padding-block: var(--s-7) var(--s-6); position: relative;
  background: linear-gradient(180deg, var(--sage-050), rgba(241, 244, 239, 0));
  border-bottom: 1px solid var(--line-soft);
}
.mag-masthead .crumbs { margin-bottom: var(--s-5); }
.mag-masthead-grid {
  display: grid; gap: var(--s-6);
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.85fr);
  align-items: end;
}
.mag-masthead h1 { font-size: var(--step-5); max-width: 15ch; margin-bottom: var(--s-4); }
.mag-standfirst {
  font-family: var(--font-display); font-size: var(--step-2); font-weight: 400;
  line-height: 1.5; color: var(--text-soft); max-width: 44ch; margin-bottom: 0;
}
.mag-masthead-side {
  border-left: 2px solid var(--clay-200); padding-left: var(--s-5);
}
.mag-masthead-note { font-size: 0.95rem; color: var(--text-soft); margin-bottom: var(--s-3); }
.mag-masthead-list { list-style: none; margin: 0; padding: 0; }
.mag-masthead-list li {
  position: relative; padding-left: 1.5rem; margin-bottom: 0.5rem;
  font-size: 0.92rem; font-weight: 600; color: var(--sage-800);
}
.mag-masthead-list li::before {
  content: ""; position: absolute; left: 0; top: 0.52em;
  width: 9px; height: 9px; border-radius: 2px;
  border: 1.5px solid var(--sage-300); background: var(--surface);
}

/* ---------- index grid and cards ---------- */
.mag-grid {
  display: grid; gap: var(--s-5);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.mag-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--sh-1), var(--sh-inset);
  transition: box-shadow var(--dur-mid) var(--ease-calm),
              transform var(--dur-mid) var(--ease-calm),
              border-color var(--dur-mid) var(--ease-calm);
}
.mag-card:hover { box-shadow: var(--sh-2); transform: translateY(-3px); border-color: var(--sage-200); }
.mag-card-media { display: block; overflow: hidden; background: var(--greige-100); }
.mag-card-media img {
  width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-calm);
}
.mag-card:hover .mag-card-media img { transform: scale(1.028); }
.mag-card-body { display: flex; flex-direction: column; flex: 1; padding: var(--s-5); }
.mag-card-kicker {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--clay-700); margin-bottom: var(--s-2);
}
.mag-card-title { font-size: var(--step-2); margin-bottom: var(--s-2); }
.mag-card-title a { color: var(--sage-900); text-decoration: none; }
.mag-card-title a:hover { color: var(--clay-700); text-decoration: underline; }
.mag-card-dek { font-size: 0.96rem; line-height: 1.66; color: var(--text-soft); margin-bottom: var(--s-4); }
.mag-card-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem;
  margin: auto 0 0; padding-top: var(--s-3); border-top: 1px dashed var(--line);
  font-size: 0.83rem; color: var(--muted);
}
.mag-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--clay-300); display: block; }

/* the lead story runs the full width of the board */
.mag-card.lead { grid-column: 1 / -1; }
.mag-card.lead .mag-card-kicker { color: var(--clay-700); }
@media (min-width: 880px) {
  .mag-card.lead { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
  .mag-card.lead .mag-card-media { height: 100%; }
  .mag-card.lead .mag-card-media img { height: 100%; aspect-ratio: auto; min-height: 340px; }
  .mag-card.lead .mag-card-body { padding: var(--s-7) var(--s-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); line-height: var(--leading-loose); }
}

/* ---------- article page ---------- */
.mag-article { padding-block: var(--s-7) var(--s-8); }
.mag-article .crumbs { margin-bottom: var(--s-5); }
.mag-kicker { margin-bottom: var(--s-3); }
.mag-article h1 { font-size: var(--step-4); max-width: 20ch; margin-bottom: var(--s-4); }
.mag-article .mag-standfirst { max-width: 54ch; }
.mag-byline {
  display: flex; align-items: center; gap: var(--s-3);
  margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--line);
}
.mag-byline-face {
  width: 52px; height: 52px; flex: none; border-radius: var(--r-pill);
  object-fit: cover; border: 1px solid var(--sage-200);
}
.mag-byline-text { min-width: 0; }
.mag-byline-who { margin: 0 0 0.2rem; font-weight: 700; color: var(--sage-900); font-size: 0.98rem; }
.mag-byline-who a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--clay-300); }
.mag-byline-who a:hover { color: var(--clay-700); border-bottom-color: var(--clay-600); }
.mag-byline-meta {
  margin: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 1rem;
  font-size: 0.85rem; color: var(--muted);
}
.mag-byline-meta span { white-space: nowrap; }

.mag-figure { margin-block: var(--s-6) var(--s-7); }
.mag-figure-frame {
  overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line);
  background: var(--greige-100); box-shadow: var(--sh-2);
}
.mag-figure img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.mag-figure figcaption {
  margin-top: var(--s-3); font-size: 0.85rem; color: var(--muted);
  text-align: center; max-width: 62ch; margin-inline: auto;
}

/* ---------- article body typography ---------- */
.mag-body { font-size: 1.06rem; line-height: 1.78; color: #35392F; overflow-wrap: break-word; }
.mag-body > p { margin: 0 0 var(--s-4); }
.mag-body h2 {
  font-size: var(--step-3); margin: var(--s-7) 0 var(--s-3);
  scroll-margin-top: 96px;
}
.mag-body h2::before {
  content: ""; display: block; width: 34px; height: 2px;
  background: var(--clay-300); border-radius: 2px; margin-bottom: var(--s-3);
}
.mag-body h3 { font-size: var(--step-1); margin: var(--s-5) 0 var(--s-2); color: var(--sage-800); }
.mag-body ul, .mag-body ol { margin: 0 0 var(--s-4); padding-left: 1.4rem; }
.mag-body li { margin-bottom: var(--s-2); line-height: 1.72; }
.mag-body li::marker { color: var(--sage-400); }
.mag-body strong { color: var(--sage-900); }
.mag-body a { color: var(--sage-700); font-weight: 600; text-underline-offset: 3px; }
.mag-body a:hover { color: var(--clay-700); }
.mag-body blockquote {
  margin: var(--s-6) 0; padding: var(--s-4) var(--s-5);
  background: var(--clay-100); border-left: 3px solid var(--clay-300);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-family: var(--font-display); font-size: var(--step-1); font-style: italic;
  line-height: 1.6; color: var(--sage-900);
}
.mag-body blockquote p:last-child { margin-bottom: 0; }
.mag-body table {
  width: 100%; border-collapse: collapse; margin: var(--s-5) 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); overflow: hidden; font-size: 0.94rem;
}
.mag-body th, .mag-body td {
  text-align: left; padding: 0.8rem 0.95rem; vertical-align: top;
  border-bottom: 1px solid var(--line-soft); line-height: 1.6;
}
.mag-body thead th { background: var(--sage-050); color: var(--sage-800); font-weight: 700; }
.mag-body tbody tr:last-child td, .mag-body tbody tr:last-child th { border-bottom: 0; }

/* the contextual read on links the assembler drops between sections */
.mag-body .inline-read {
  position: relative; margin: var(--s-5) 0;
  padding: var(--s-3) var(--s-4) var(--s-3) 2.6rem;
  background: var(--sage-050); border: 1px solid var(--sage-200);
  border-radius: var(--r-sm); font-size: 0.95rem; font-weight: 600;
  color: var(--sage-800); line-height: 1.6;
}
.mag-body .inline-read::before {
  content: ""; position: absolute; left: 1.15rem; top: 1.35rem;
  width: 7px; height: 7px; transform: rotate(-45deg);
  border-right: 2px solid var(--clay-600); border-bottom: 2px solid var(--clay-600);
}
.mag-body .inline-read a { color: var(--sage-800); }
.mag-body .inline-read a:hover { color: var(--clay-700); }

/* ---------- call to action after the body ---------- */
.mag-cta {
  position: relative; overflow: hidden; margin-block: var(--s-7);
  padding: var(--s-6); border-radius: var(--r-lg);
  background: var(--sage-800); color: #F1F4EF; box-shadow: var(--sh-2);
}
.mag-cta::after {
  content: ""; position: absolute; right: -70px; top: -70px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 121, 90, 0.30), rgba(196, 121, 90, 0) 68%);
  pointer-events: none;
}
.mag-cta > * { position: relative; z-index: 1; }
.mag-cta .eyebrow { color: var(--clay-300); }
.mag-cta .eyebrow::before { background: rgba(224, 180, 158, 0.65); }
.mag-cta h2 { color: #FBFCF9; font-size: var(--step-3); margin-bottom: var(--s-3); }
.mag-cta p { color: rgba(240, 244, 238, 0.86); max-width: 56ch; margin-bottom: var(--s-5); }
.mag-cta .btn--primary {
  background: var(--clay-700); border-color: var(--clay-800); color: #FFF8F4;
  box-shadow: 0 10px 26px rgba(126, 69, 47, 0.28);
}
.mag-cta .btn--primary:hover { background: var(--clay-800); color: #fff; }
.mag-cta--wide { max-width: none; }

/* ---------- author box ---------- */
.mag-author {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--s-5);
  align-items: start; margin-block: var(--s-7);
  padding: var(--s-5); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-1);
}
.mag-author img {
  width: 112px; height: 112px; border-radius: var(--r-pill);
  object-fit: cover; border: 1px solid var(--sage-200);
}
.mag-author-kicker {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--clay-700); margin-bottom: 0.35rem;
}
.mag-author h2 { font-size: var(--step-2); margin-bottom: var(--s-3); }
.mag-author p { font-size: 0.97rem; color: var(--text-soft); margin-bottom: var(--s-3); }
.mag-author p:last-child { margin-bottom: 0; font-weight: 600; }

/* ---------- read also ---------- */
.mag-readalso { background: var(--sage-050); border-top: 1px solid var(--line); }
.mag-readalso-head { margin-bottom: var(--s-5); }
.mag-readalso-head h2 { font-size: var(--step-2); margin-bottom: 0; }
.mag-related {
  display: grid; gap: var(--s-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 258px), 1fr));
}
.mag-rel {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--sh-1), var(--sh-inset);
  transition: box-shadow var(--dur-mid) var(--ease-calm), transform var(--dur-mid) var(--ease-calm);
}
.mag-rel:hover { box-shadow: var(--sh-2); transform: translateY(-3px); }
.mag-rel-media { display: block; overflow: hidden; background: var(--greige-100); }
.mag-rel-media img { width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.mag-rel-body { display: flex; flex-direction: column; flex: 1; padding: var(--s-4); }
.mag-rel-title { font-size: var(--step-1); margin-bottom: var(--s-2); }
.mag-rel-title a { color: var(--sage-900); text-decoration: none; }
.mag-rel-title a:hover { color: var(--clay-700); text-decoration: underline; }
.mag-rel-dek {
  font-size: 0.9rem; line-height: 1.62; color: var(--text-soft); margin-bottom: var(--s-3);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.mag-rel-meta { margin: auto 0 0; font-size: 0.81rem; color: var(--muted); }
.mag-readalso-foot { margin: var(--s-5) 0 0; font-weight: 600; }
.mag-readalso-foot a { text-decoration: none; border-bottom: 1px solid var(--clay-300); }
.mag-readalso-foot a:hover { border-bottom-color: var(--clay-600); }

/* ---------- magazine promo on the home page ---------- */
.mag-home-head { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s-4); margin-bottom: var(--s-6); }
.mag-home-head .section-head { margin-bottom: 0; flex: 1 1 420px; }
.mag-home-more { margin: 0 0 0 auto; }

/* ---------- magazine responsive ---------- */
@media (min-width: 821px) and (max-width: 1160px) {
  .site-nav a { padding-inline: 0.6rem; }
}
@media (max-width: 900px) {
  .mag-masthead-grid { grid-template-columns: 1fr; gap: var(--s-5); align-items: start; }
  .mag-masthead-side { border-left: 0; border-top: 2px solid var(--clay-200); padding-left: 0; padding-top: var(--s-4); }
  .mag-masthead h1 { max-width: 100%; }
  .mag-standfirst { max-width: 100%; }
}
@media (max-width: 700px) {
  .mag-article { padding-block: var(--s-6) var(--s-7); }
  .mag-body { font-size: 1.02rem; line-height: 1.74; }
  .mag-cta { padding: var(--s-5) var(--s-4); }
  .mag-cta h2 { font-size: var(--step-2); }
  .mag-author { grid-template-columns: 1fr; gap: var(--s-4); }
  .mag-author img { width: 84px; height: 84px; }
  .mag-card-body { padding: var(--s-4); }
  .mag-home-more { margin-left: 0; }
}
@media (max-width: 620px) {
  .mag-body table { display: block; overflow-x: auto; }
}
@media (max-width: 480px) {
  .mag-byline { flex-wrap: wrap; }
  .mag-byline-meta { gap: 0.15rem 0.75rem; font-size: 0.8rem; }
  .mag-article h1 { font-size: var(--step-3); }
}
@media (max-width: 400px) {
  .mag-measure { width: min(100% - 1.6rem, 69ch); }
  .mag-card-body { padding: var(--s-4) var(--s-3); }
  .mag-rel-body { padding: var(--s-3); }
  .mag-cta { padding: var(--s-4) var(--s-3); border-radius: var(--r-md); }
  .mag-author { padding: var(--s-4) var(--s-3); }
  .mag-body .inline-read { padding-left: 2.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .mag-card:hover, .mag-rel:hover { transform: none; }
  .mag-card:hover .mag-card-media img { transform: none; }
}

/* ---------- magazine listings on the author page and the site map ---------- */
.mag-bib { list-style: none; margin: 0 0 var(--s-5); padding: 0; counter-reset: bib; }
.mag-bib li {
  position: relative; counter-increment: bib;
  padding: 0 0 var(--s-4) 2.4rem; margin-bottom: var(--s-4);
  border-bottom: 1px solid var(--line-soft);
}
.mag-bib li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.mag-bib li::before {
  content: counter(bib, decimal-leading-zero);
  position: absolute; left: 0; top: 0.1rem;
  font-family: var(--font-body); font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.08em; color: var(--clay-700);
}
.mag-bib a { font-weight: 700; text-decoration: none; color: var(--sage-800); }
.mag-bib a:hover { color: var(--clay-700); text-decoration: underline; }
.mag-bib span { display: block; margin-top: 0.25rem; font-size: 0.88rem; color: var(--text-soft); }
.map-col--wide { margin-top: var(--s-4); }
.map-col--wide ul { columns: 2; column-gap: var(--s-6); }
.map-col--wide li { break-inside: avoid; }
@media (max-width: 760px) { .map-col--wide ul { columns: 1; } }



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