/* ==========================================================================
   WhiskerRefill design system
   Kind clinical: warm cream, soft periwinkle, one coral pulse.
   Quicksand for display, Open Sans for running text.
   Motifs: paw pads and capsule pills. Nothing sharp, nothing loud.
   ========================================================================== */

:root {
  /* ---- brief palette ---- */
  --bg: #F8F7FD;
  --surface: #FFFFFF;
  --ink: #1E2138;
  --primary: #5566C4;
  --accent: #FF8E72;
  --muted: #666B85;

  /* ---- derived periwinkle scale ---- */
  --peri-050: #F3F4FD;
  --peri-100: #E7EAFA;
  --peri-200: #D3D8F4;
  --peri-300: #B4BCEB;
  --peri-400: #8B96DA;
  --peri-600: #4655A8;
  --peri-700: #38448A;
  --peri-900: #232B5C;

  /* ---- derived coral scale ---- */
  --coral-050: #FFF4F0;
  --coral-100: #FFE5DC;
  --coral-200: #FFCDBD;
  --coral-400: #FF9F86;
  --coral-600: #EE6E4C;
  --coral-700: #C9542F;

  /* ---- warm cream, the counterweight to the periwinkle ---- */
  --cream: #FDF7F0;
  --cream-deep: #F8EEE2;
  --cream-line: #EFE3D5;

  /* ---- supporting ---- */
  --line: #E4E6F3;
  --line-soft: #EFF0F9;
  --ink-soft: #3A3F5E;
  --white: #FFFFFF;
  --leaf: #3F9A7E;
  --leaf-100: #DFF2EC;

  /* ---- type ---- */
  --font-display: "Quicksand", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --font-body: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --fs-xs: 0.78rem;
  --fs-sm: 0.9rem;
  --fs-base: 1.02rem;
  --fs-md: 1.12rem;
  --fs-lg: 1.32rem;
  --fs-xl: 1.68rem;
  --fs-2xl: 2.1rem;
  --fs-3xl: 2.75rem;
  --fs-4xl: 3.4rem;
  --lh-tight: 1.16;
  --lh-snug: 1.35;
  --lh-body: 1.72;

  /* ---- spacing scale, airy on purpose ---- */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 2.75rem;
  --s-8: 3.5rem;
  --s-9: 4.75rem;
  --s-10: 6.5rem;
  --s-11: 8.5rem;

  /* ---- radii, everything rounded and soft ---- */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --r-2xl: 44px;
  --r-pill: 999px;

  /* ---- shadows, low and diffuse like clinic daylight ---- */
  --sh-1: 0 1px 2px rgba(30, 33, 56, 0.04), 0 4px 12px rgba(85, 102, 196, 0.06);
  --sh-2: 0 2px 6px rgba(30, 33, 56, 0.05), 0 14px 34px rgba(85, 102, 196, 0.09);
  --sh-3: 0 6px 14px rgba(30, 33, 56, 0.06), 0 26px 60px rgba(85, 102, 196, 0.14);
  --sh-coral: 0 12px 30px rgba(255, 142, 114, 0.28);

  --wrap: 1180px;
  --ease: cubic-bezier(0.22, 0.71, 0.34, 1);
}

/* ==========================================================================
   Reset and base
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The paw pad field: one large pad and four toes, tiled very faintly.
   This is the wallpaper of the whole site. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 30% 62%, rgba(85, 102, 196, 0.055) 0 11px, transparent 12px),
    radial-gradient(circle at 15% 38%, rgba(85, 102, 196, 0.05) 0 5px, transparent 6px),
    radial-gradient(circle at 27% 26%, rgba(85, 102, 196, 0.05) 0 5px, transparent 6px),
    radial-gradient(circle at 40% 27%, rgba(85, 102, 196, 0.05) 0 5px, transparent 6px),
    radial-gradient(circle at 50% 39%, rgba(85, 102, 196, 0.05) 0 5px, transparent 6px);
  background-size: 260px 260px;
  background-position: 0 0;
}

/* A wash of warm cream from the top so the page never reads cold. */
body::after {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 70vh;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(253, 247, 240, 0.92) 0%, rgba(253, 247, 240, 0) 100%);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--ink);
  margin: 0 0 var(--s-4);
  letter-spacing: -0.012em;
}

h1 { font-size: clamp(2.1rem, 5.2vw, var(--fs-4xl)); }
h2 { font-size: clamp(1.75rem, 3.7vw, var(--fs-3xl)); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

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); }

a { color: var(--peri-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--coral-700); }

strong { font-weight: 700; color: var(--ink); }

hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: var(--s-7) 0;
}

::selection { background: var(--coral-200); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--coral-600);
  outline-offset: 3px;
  border-radius: 6px;
}

.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;
  top: -100px;
  left: var(--s-4);
  z-index: 999;
  background: var(--primary);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  padding: 0.75rem 1.4rem;
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: var(--s-4); color: var(--white); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--s-5);
}

.narrow { max-width: 780px; margin-inline: auto; }

/* ==========================================================================
   Shared components
   ========================================================================== */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--peri-600);
  background: var(--peri-100);
  border-radius: var(--r-pill);
  padding: 0.4rem 1rem 0.4rem 0.55rem;
  margin-bottom: var(--s-4);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 10px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent) 0 50%, var(--peri-300) 50% 100%);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.7);
}

.lede {
  font-size: var(--fs-md);
  color: var(--ink-soft);
  line-height: 1.78;
}

.section {
  position: relative;
  padding-block: var(--s-10);
}
.section--cream {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
  border-block: 1px solid var(--cream-line);
}
.section--peri {
  background:
    radial-gradient(1100px 420px at 82% 0%, rgba(255, 142, 114, 0.1), transparent 62%),
    linear-gradient(180deg, var(--peri-050) 0%, #ECEEFB 100%);
  border-block: 1px solid var(--peri-100);
}

.section-head { max-width: 730px; margin-bottom: var(--s-8); }
.section-head p { color: var(--muted); font-size: var(--fs-md); margin-bottom: 0; }
.section-head--center { margin-inline: auto; text-align: center; }

/* Capsule divider: literally a two tone pill lying on the page. */
.pill-rule {
  width: 84px;
  height: 16px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent) 0 50%, var(--peri-200) 50% 100%);
  position: relative;
  margin: 0 0 var(--s-5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.pill-rule::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 2px;
  bottom: 2px;
  width: 2px;
  transform: translateX(-1px);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 2px;
}
.section-head--center .pill-rule { margin-inline: auto; }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-base);
  line-height: 1;
  padding: 0.95rem 1.7rem;
  border-radius: var(--r-pill);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), background-color 0.22s var(--ease), color 0.22s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(85, 102, 196, 0.28);
}
.btn--primary:hover { background: var(--peri-600); color: var(--white); box-shadow: 0 16px 34px rgba(85, 102, 196, 0.34); }

.btn--coral {
  background: var(--accent);
  color: var(--ink);
  box-shadow: var(--sh-coral);
}
.btn--coral:hover { background: var(--coral-400); color: var(--ink); }

.btn--ghost {
  background: var(--surface);
  color: var(--peri-700);
  border-color: var(--peri-200);
  box-shadow: var(--sh-1);
}
.btn--ghost:hover { border-color: var(--peri-400); color: var(--peri-700); }

.btn--wide { width: 100%; }
.btn--sm { padding: 0.7rem 1.25rem; font-size: var(--fs-sm); }

/* ---- cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--s-6);
  box-shadow: var(--sh-1);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-2);
  border-color: var(--peri-200);
}
.card h3 { margin-bottom: var(--s-3); }
.card p { color: var(--muted); margin-bottom: 0; }

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

/* ---- two tone rounded icon tiles ---- */
.icon-tile {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  margin-bottom: var(--s-4);
  background: var(--peri-100);
  border: 1px solid var(--peri-200);
}
.icon-tile svg { width: 30px; height: 30px; display: block; }
.icon-tile .tone-fill { fill: var(--peri-300); opacity: 0.55; }
.icon-tile .tone-line { fill: none; stroke: var(--peri-700); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-tile--coral { background: var(--coral-100); border-color: var(--coral-200); }
.icon-tile--coral .tone-fill { fill: var(--coral-400); opacity: 0.5; }
.icon-tile--coral .tone-line { stroke: var(--coral-700); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(248, 247, 253, 0.78);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.site-header.is-stuck {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px rgba(85, 102, 196, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  min-height: 78px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.24rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--peri-700); }
.wordmark svg { width: 38px; height: 38px; flex: none; }
.wordmark b { color: var(--primary); font-weight: 700; }

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: var(--r-md);
  border: 1px solid var(--peri-200);
  background: var(--surface);
  color: var(--peri-700);
  cursor: pointer;
  place-items: center;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .bar-close { display: none; }
.nav-toggle[aria-expanded="true"] .bar-open { display: none; }
.nav-toggle[aria-expanded="true"] .bar-close { display: block; }

.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.55rem 0.85rem;
  border-radius: var(--r-pill);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.site-nav a:hover { background: var(--peri-100); color: var(--peri-700); }

.header-cta { display: flex; align-items: center; gap: var(--s-3); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding-block: var(--s-9) var(--s-10);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -160px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 142, 114, 0.22) 0%, rgba(255, 142, 114, 0) 68%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: var(--s-8);
  align-items: center;
}

.hero h1 { margin-bottom: var(--s-5); }
.hero h1 .hl {
  position: relative;
  z-index: 0;
  white-space: nowrap;
}
.hero h1 .hl::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0.06em;
  height: 0.34em;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, rgba(255, 142, 114, 0.42), rgba(255, 142, 114, 0.18));
  z-index: -1;
}

.hero p.lede { max-width: 56ch; margin-bottom: var(--s-6); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-bottom: var(--s-7);
}

.trust-strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
}
.trust-strip li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0;
}
.trust-strip svg { width: 20px; height: 20px; flex: none; }
.trust-strip .tone-fill { fill: var(--leaf-100); }
.trust-strip .tone-line { fill: none; stroke: var(--leaf); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* photo frame with a soft cream mat, like a clinic wall print */
.photo-frame {
  position: relative;
  border-radius: var(--r-2xl);
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-3);
}
.photo-frame img {
  border-radius: 36px;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.photo-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 36px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(85, 102, 196, 0.1);
}

/* The reminder badge, the one thing on the page that pulses. */
.reminder-badge {
  position: absolute;
  left: -18px;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--surface);
  border: 1px solid var(--coral-200);
  border-radius: var(--r-lg);
  padding: 0.85rem 1.15rem;
  box-shadow: var(--sh-2);
  max-width: 268px;
}
.reminder-badge .dot {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.reminder-badge .dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: soft-pulse 2.6s var(--ease) infinite;
}
@keyframes soft-pulse {
  0%   { transform: scale(0.6); opacity: 0.75; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}
.reminder-badge b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  line-height: 1.3;
}
.reminder-badge span {
  display: block;
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.4;
}

/* ==========================================================================
   Problem cards
   ========================================================================== */

.problem-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--cream-line);
  border-radius: var(--r-xl);
  padding: var(--s-6) var(--s-6) var(--s-6);
  box-shadow: var(--sh-1);
  overflow: hidden;
}
.problem-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--s-6);
  width: 46px;
  height: 8px;
  border-radius: 0 0 var(--r-pill) var(--r-pill);
  background: var(--accent);
}
.problem-card h3 { margin-top: var(--s-2); }
.problem-card p { color: var(--muted); margin-bottom: var(--s-4); }
.cost-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--coral-700);
  background: var(--coral-050);
  border: 1px solid var(--coral-200);
  border-radius: var(--r-pill);
  padding: 0.35rem 0.9rem;
}

/* ==========================================================================
   Steps
   ========================================================================== */

.steps-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--s-8);
  align-items: start;
}

.step-list { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step-list li {
  position: relative;
  padding-left: 82px;
  padding-bottom: var(--s-6);
  margin: 0;
}
.step-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 56px;
  height: 40px;
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--white);
  background: linear-gradient(100deg, var(--primary) 0 52%, var(--peri-400) 52% 100%);
  box-shadow: 0 8px 18px rgba(85, 102, 196, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.step-list li::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 48px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: repeating-linear-gradient(180deg, var(--peri-200) 0 6px, transparent 6px 12px);
}
.step-list li:last-child { padding-bottom: 0; }
.step-list li:last-child::after { display: none; }
.step-list h3 { margin-bottom: var(--s-2); }
.step-list p { color: var(--muted); margin-bottom: 0; }

.section-photo {
  border-radius: var(--r-2xl);
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
  position: relative;
}
.section-photo img { border-radius: 36px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.photo-note {
  margin: var(--s-4) var(--s-2) var(--s-2);
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* ==========================================================================
   Features
   ========================================================================== */

.feature-card { position: relative; }
.feature-card::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 22px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 66%, rgba(85, 102, 196, 0.09) 0 8px, transparent 9px),
    radial-gradient(circle at 24% 34%, rgba(85, 102, 196, 0.09) 0 3.4px, transparent 4px),
    radial-gradient(circle at 44% 24%, rgba(85, 102, 196, 0.09) 0 3.4px, transparent 4px),
    radial-gradient(circle at 66% 30%, rgba(85, 102, 196, 0.09) 0 3.4px, transparent 4px),
    radial-gradient(circle at 80% 48%, rgba(85, 102, 196, 0.09) 0 3.4px, transparent 4px);
  opacity: 0.9;
  pointer-events: none;
}

/* ==========================================================================
   Outcomes
   ========================================================================== */

.outcome {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--s-6);
  box-shadow: var(--sh-1);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.outcome .figure {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.3rem, 4.6vw, 3.15rem);
  line-height: 1;
  color: var(--primary);
  letter-spacing: -0.03em;
}
.outcome .figure sup {
  font-size: 0.45em;
  color: var(--accent);
  top: -0.9em;
}
.outcome h3 { margin: 0; font-size: var(--fs-md); }
.outcome p { color: var(--muted); margin: 0; font-size: var(--fs-sm); line-height: 1.7; }

/* ==========================================================================
   Testimonials
   ========================================================================== */

.testimonial {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--s-6);
  margin: 0;
  box-shadow: var(--sh-1);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  position: relative;
}
.testimonial::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 32px;
  right: 32px;
  height: 4px;
  border-radius: 0 0 var(--r-pill) var(--r-pill);
  background: linear-gradient(90deg, var(--accent), var(--peri-300));
}
.testimonial p {
  margin: 0;
  font-size: var(--fs-md);
  line-height: 1.72;
  color: var(--ink-soft);
}
.testimonial footer {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-top: 1px dashed var(--line);
  padding-top: var(--s-4);
  margin-top: auto;
}
.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--peri-700);
  background: var(--peri-100);
  border: 1px solid var(--peri-200);
}
.testimonial cite {
  font-style: normal;
  font-family: var(--font-display);
  font-weight: 700;
  display: block;
  font-size: var(--fs-sm);
}
.testimonial .who { font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }

.results-strip {
  margin-top: var(--s-7);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--peri-200);
  border-radius: var(--r-2xl);
  padding: var(--s-6);
  box-shadow: var(--sh-1);
}
.results-strip div { text-align: center; }
.results-strip b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  color: var(--peri-700);
  line-height: 1.1;
}
.results-strip span { font-size: var(--fs-sm); color: var(--muted); }

/* ==========================================================================
   Pricing
   ========================================================================== */

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-5);
  align-items: stretch;
}

.tier {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: var(--s-7) var(--s-6) var(--s-6);
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-1);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.tier:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }

.tier--featured {
  border: 2px solid var(--primary);
  box-shadow: var(--sh-3);
  background:
    linear-gradient(180deg, var(--peri-050) 0%, var(--surface) 26%);
}
.tier__flag {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 1.1rem;
  border-radius: var(--r-pill);
  white-space: nowrap;
  box-shadow: var(--sh-coral);
}
.tier h3 { font-size: var(--fs-lg); margin-bottom: var(--s-2); }
.tier .tier-for { font-size: var(--fs-sm); color: var(--muted); min-height: 3.1em; }
.tier .amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3rem;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.03em;
}
.tier .per { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.tier .price-row {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: var(--s-4) 0 var(--s-5);
  border-bottom: 1px dashed var(--line);
  margin-bottom: var(--s-5);
}
.tier ul { list-style: none; padding: 0; margin: 0 0 var(--s-6); }
.tier li {
  position: relative;
  padding-left: 32px;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  margin-bottom: 0.7rem;
  line-height: 1.62;
}
.tier li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--leaf-100);
  box-shadow: inset 0 0 0 1px rgba(63, 154, 126, 0.3);
}
.tier li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 9px;
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--leaf);
  border-bottom: 2px solid var(--leaf);
  transform: rotate(-45deg);
  border-radius: 1px;
}
.tier .btn { margin-top: auto; }

.billing-note {
  margin-top: var(--s-6);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.billing-note strong { color: var(--ink-soft); }

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-list {
  max-width: 860px;
  margin-inline: auto;
  display: grid;
  gap: var(--s-3);
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.faq-item:hover { border-color: var(--peri-200); }
.faq-item.is-open { border-color: var(--peri-300); box-shadow: var(--sh-1); }
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--ink);
  padding: 1.35rem 3.6rem 1.35rem 1.5rem;
  position: relative;
  line-height: 1.4;
}
.faq-q:hover { color: var(--peri-700); }
.faq-q::after,
.faq-q::before {
  content: "";
  position: absolute;
  right: 1.5rem;
  top: 50%;
  background: var(--peri-600);
  border-radius: 2px;
  transition: transform 0.28s var(--ease), opacity 0.28s var(--ease);
}
.faq-q::before { width: 15px; height: 3px; transform: translateY(-1.5px); }
.faq-q::after { width: 3px; height: 15px; right: calc(1.5rem + 6px); transform: translateY(-7.5px); }
.faq-q[aria-expanded="true"]::after { opacity: 0; transform: translateY(-7.5px) rotate(90deg); }
.faq-item h3 { margin: 0; }
.faq-a {
  padding: 0 1.5rem 1.5rem;
  color: var(--muted);
  font-size: var(--fs-base);
}
.faq-a p:last-child { margin-bottom: 0; }
.faq-a[hidden] { display: none; }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-shell {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--s-8);
  align-items: start;
}

.contact-aside .checklist { list-style: none; padding: 0; margin: var(--s-5) 0 0; }
.contact-aside .checklist li {
  position: relative;
  padding-left: 34px;
  margin-bottom: var(--s-4);
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  line-height: 1.65;
}
.contact-aside .checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 12px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent) 0 50%, var(--peri-300) 50% 100%);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.7);
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: var(--s-7);
  box-shadow: var(--sh-3);
}

.field { margin-bottom: var(--s-5); }
.field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  margin-bottom: 0.45rem;
  color: var(--ink);
}
.field .hint { font-weight: 400; color: var(--muted); font-size: var(--fs-xs); }

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--ink);
  background: var(--peri-050);
  border: 1.5px solid var(--peri-200);
  border-radius: var(--r-md);
  padding: 0.85rem 1rem;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field textarea { min-height: 132px; resize: vertical; line-height: 1.6; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--peri-600) 50%), linear-gradient(135deg, var(--peri-600) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 14px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.6rem;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--peri-300); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(85, 102, 196, 0.16);
}
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--coral-600);
  background: var(--coral-050);
}
.err {
  display: block;
  color: var(--coral-700);
  font-size: var(--fs-xs);
  font-weight: 600;
  margin-top: 0.4rem;
  min-height: 1em;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  background: var(--cream);
  border: 1px solid var(--cream-line);
  border-radius: var(--r-md);
  padding: var(--s-4);
  margin-bottom: var(--s-5);
}
.consent input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; margin-top: 2px; }
.consent label { font-size: var(--fs-sm); font-family: var(--font-body); font-weight: 400; margin: 0; color: var(--ink-soft); line-height: 1.6; }

.form-reassure {
  margin-top: var(--s-5);
  font-size: var(--fs-sm);
  color: var(--muted);
  text-align: center;
}

/* ==========================================================================
   Author byline block
   ========================================================================== */

.byline {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  max-width: 820px;
  margin: var(--s-8) auto 0;
  box-shadow: var(--sh-1);
}
.byline .mark {
  width: 46px; height: 46px; flex: none;
  border-radius: 50%;
  background: var(--peri-100);
  display: grid; place-items: center;
}
.byline .mark svg { width: 26px; height: 26px; }
.byline p { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.byline b { font-family: var(--font-display); color: var(--ink); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: linear-gradient(180deg, #232B5C 0%, #1B2149 100%);
  color: #D8DBF0;
  padding-block: var(--s-9) var(--s-5);
  margin-top: var(--s-10);
}
.site-footer a { color: #D8DBF0; text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.25fr;
  gap: var(--s-7) var(--s-6);
}
.footer-brand .wordmark { color: var(--white); font-size: 1.2rem; }
.footer-brand .wordmark:hover { color: var(--accent); }
.footer-brand .wordmark b { color: var(--coral-400); }
.footer-brand p { margin: var(--s-4) 0 var(--s-5); color: #B6BBDD; font-size: var(--fs-sm); max-width: 34ch; }
.social {
  display: flex;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.social li { margin: 0; }
.social a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: background-color 0.22s var(--ease), transform 0.22s var(--ease);
}
.social a:hover { background: var(--accent); transform: translateY(-2px); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.social a:hover svg { fill: var(--ink); }

.site-footer h2 {
  color: var(--white);
  font-size: var(--fs-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--s-4);
}
.site-footer ul.links { list-style: none; padding: 0; margin: 0; }
.site-footer ul.links li { margin-bottom: 0.65rem; font-size: var(--fs-sm); }
.publisher-line { margin-top: var(--s-4); font-size: var(--fs-xs); color: #9AA0C9; }

.footer-base {
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
  font-size: var(--fs-xs);
  color: #9AA0C9;
}

/* ==========================================================================
   Prose pages
   ========================================================================== */

.page-head {
  padding-block: var(--s-9) var(--s-7);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--cream) 0%, rgba(253, 247, 240, 0) 100%);
}
.page-head p { color: var(--muted); max-width: 68ch; margin-bottom: 0; }

.prose { max-width: 820px; margin-inline: auto; padding-block: var(--s-8); }
.prose h2 {
  font-size: var(--fs-xl);
  margin-top: var(--s-8);
  padding-top: var(--s-2);
}
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { margin-top: var(--s-6); font-size: var(--fs-md); }
.prose p, .prose li { color: var(--ink-soft); }
.prose li { margin-bottom: 0.5rem; }

.fact-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--s-6);
  font-size: var(--fs-sm);
}
.fact-table th, .fact-table td {
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.fact-table th { width: 38%; font-family: var(--font-display); color: var(--ink); background: var(--peri-050); }
.fact-table tr:last-child th, .fact-table tr:last-child td { border-bottom: 0; }

.note-card {
  background: var(--cream);
  border: 1px solid var(--cream-line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  margin-bottom: var(--s-6);
}
.note-card p:last-child { margin-bottom: 0; }

/* author page */
.author-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--s-7);
  align-items: center;
}
.author-portrait {
  border-radius: var(--r-2xl);
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
}
.author-portrait img { border-radius: 34px; width: 100%; }
.profile-links { list-style: none; padding: 0; margin: var(--s-5) 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.profile-links li { margin: 0; }
.profile-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  text-decoration: none;
  color: var(--peri-700);
  background: var(--surface);
  border: 1px solid var(--peri-200);
  border-radius: var(--r-pill);
  padding: 0.5rem 1.05rem;
}
.profile-links a:hover { background: var(--peri-100); color: var(--peri-700); }

/* site map */
.map-group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--s-6);
  box-shadow: var(--sh-1);
}
.map-group h2 { margin-top: 0; font-size: var(--fs-lg); }
.map-group ul { list-style: none; padding: 0; margin: 0; }
.map-group li { margin-bottom: var(--s-4); }
.map-group a { font-family: var(--font-display); font-weight: 700; text-decoration: none; }
.map-group a:hover { text-decoration: underline; }
.map-group span { display: block; font-size: var(--fs-sm); color: var(--muted); line-height: 1.6; }

/* thanks and 404 */
.centered-panel {
  max-width: 700px;
  margin: var(--s-9) auto var(--s-8);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: var(--s-8) var(--s-7);
  box-shadow: var(--sh-2);
  text-align: center;
}
.centered-panel .big-mark { width: 88px; height: 88px; margin: 0 auto var(--s-5); }
.centered-panel .actions { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: center; margin-top: var(--s-6); }
.code-404 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 4.4rem;
  line-height: 1;
  color: var(--peri-300);
  letter-spacing: 0.04em;
  margin-bottom: var(--s-3);
}

/* ==========================================================================
   Reveal animation
   ========================================================================== */

.reveal { opacity: 0; transform: translateY(22px); }
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-grid, .steps-layout, .contact-shell, .author-hero { grid-template-columns: 1fr; }
  .author-hero { max-width: 620px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .price-grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .tier--featured { order: -1; }
}

@media (max-width: 860px) {
  :root { --s-10: 4.5rem; --s-9: 3.5rem; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .results-strip { grid-template-columns: 1fr; }
  .nav-toggle { display: grid; }
  .site-nav {
    position: absolute;
    left: var(--s-4);
    right: var(--s-4);
    top: 78px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-3);
    padding: var(--s-4);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0.15rem; }
  .site-nav a { padding: 0.8rem 1rem; font-size: var(--fs-base); }
  .header-cta .btn--primary { display: none; }
  .header-inner { min-height: 72px; }
  .reminder-badge { left: 8px; bottom: 12px; }
}

@media (max-width: 620px) {
  .field-row { grid-template-columns: 1fr; }
  .form-card { padding: var(--s-5); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-block: var(--s-7) var(--s-8); }
  .hero h1 .hl { white-space: normal; }
  .btn { width: 100%; }
  .header-cta .btn { width: auto; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .step-list li { padding-left: 68px; }
  .centered-panel { padding: var(--s-6) var(--s-4); }
}

@media (max-width: 380px) {
  .wrap { padding-inline: var(--s-4); }
  .wordmark { font-size: 1.08rem; }
  .tier .amount { font-size: 2.5rem; }
}

/* ==========================================================================
   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; transform: none; }
  .reminder-badge .dot::after { animation: none; opacity: 0; }
  .btn:hover, .card:hover, .tier:hover, .social a:hover { transform: none; }
}

@media print {
  .site-header, .site-footer, .hero-actions, .form-card { display: none; }
  body::before, body::after { display: none; }
}

/* small resets used by the photo frames and quote blocks */
figure { margin: 0; }
blockquote { margin: 0; }

/* ==========================================================================
   The Dispensary: the magazine
   Same tokens, same two typefaces, same rounded soft cards as the product
   pages. Nothing new is invented here, the pill rule and the paw wallpaper
   simply carry on into long form reading.
   ========================================================================== */

/* ---- breadcrumb, shared by the index and the articles ---- */
.mag-crumbs { margin-bottom: var(--s-5); }
.mag-crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  margin: 0;
  padding: 0;
  font-size: var(--fs-xs);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.mag-crumbs li { margin: 0; display: flex; align-items: center; gap: 0.6rem; }
.mag-crumbs li + li::before {
  content: "";
  width: 12px;
  height: 6px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent) 0 50%, var(--peri-200) 50% 100%);
  flex: none;
}
.mag-crumbs a { color: var(--peri-600); text-decoration: none; }
.mag-crumbs a:hover { color: var(--coral-700); text-decoration: underline; }
.mag-crumbs span { color: var(--muted); }

/* ---- the standfirst under every magazine h1 ---- */
.mag-standfirst {
  font-size: var(--fs-md);
  line-height: 1.78;
  color: var(--ink-soft);
  max-width: 60ch;
  margin-bottom: var(--s-5);
}

/* dot separator between byline and meta fields */
.mag-sep {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--peri-300);
  margin: 0 0.55rem;
  vertical-align: 0.16em;
}

/* ==========================================================================
   Magazine index
   ========================================================================== */

.mag-index-head {
  padding-block: var(--s-9) var(--s-8);
  border-bottom: 1px solid var(--cream-line);
  background:
    radial-gradient(880px 340px at 88% 0%, rgba(255, 142, 114, 0.12), transparent 64%),
    linear-gradient(180deg, var(--cream) 0%, rgba(253, 247, 240, 0) 100%);
}
.mag-index-head h1 { max-width: 16ch; }
.mag-index-head__note {
  color: var(--muted);
  max-width: 68ch;
  font-size: var(--fs-base);
  margin-bottom: var(--s-6);
}
.mag-index-head__facts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}
.mag-index-head__facts li {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 0.5rem 1.1rem;
  box-shadow: var(--sh-1);
}
.mag-index-head__facts b {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  color: var(--primary);
}
.mag-index-head__facts span { font-size: var(--fs-xs); color: var(--muted); }

.mag-index-body { padding-block: var(--s-9) var(--s-10); }

.mag-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-6);
  align-items: stretch;
}

.mag-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-1);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.mag-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-2);
  border-color: var(--peri-200);
}
.mag-card:focus-within { border-color: var(--peri-300); box-shadow: var(--sh-2); }

.mag-card__media { display: block; background: var(--peri-050); }
.mag-card__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.mag-card:hover .mag-card__media img { transform: scale(1.03); }

.mag-card__body {
  padding: var(--s-5) var(--s-5) var(--s-6);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.mag-card__angle {
  align-self: flex-start;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--peri-600);
  background: var(--peri-100);
  border-radius: var(--r-pill);
  padding: 0.3rem 0.85rem;
  margin-bottom: var(--s-4);
}
.mag-card__title { font-size: var(--fs-md); margin-bottom: var(--s-3); }
.mag-card__title a { color: var(--ink); text-decoration: none; }
.mag-card__title a:hover { color: var(--peri-700); text-decoration: underline; }
.mag-card__title a::after { content: ""; position: absolute; inset: 0; }
.mag-card__dek {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.7;
  margin-bottom: var(--s-4);
}
.mag-card__meta {
  font-size: var(--fs-xs);
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 600;
  margin: auto 0 0;
  padding-top: var(--s-3);
  border-top: 1px dashed var(--line);
}
.mag-card__go {
  margin-top: var(--s-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.mag-card__go::after {
  content: "";
  width: 22px;
  height: 9px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent) 0 50%, var(--peri-200) 50% 100%);
  transition: transform 0.35s var(--ease);
}
.mag-card:hover .mag-card__go::after { transform: translateX(5px); }

/* the lead card: article one, given the width of the whole grid */
.mag-card.lead {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: stretch;
  border-radius: var(--r-2xl);
  border-color: var(--peri-200);
  box-shadow: var(--sh-2);
  background: linear-gradient(180deg, var(--surface) 0%, var(--peri-050) 100%);
}
.mag-card.lead .mag-card__media { flex: 1 1 54%; min-width: 0; }
.mag-card.lead .mag-card__media img { height: 100%; aspect-ratio: auto; min-height: 340px; }
.mag-card.lead .mag-card__body {
  flex: 1 1 46%;
  justify-content: center;
  padding: var(--s-7) var(--s-7) var(--s-7) var(--s-6);
}
.mag-card.lead .mag-card__body::before {
  content: "Lead report";
  align-self: flex-start;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--coral-700);
  background: var(--coral-100);
  border: 1px solid var(--coral-200);
  border-radius: var(--r-pill);
  padding: 0.3rem 0.85rem;
  margin-bottom: var(--s-3);
}
.mag-card.lead .mag-card__title { font-size: var(--fs-xl); }
.mag-card.lead .mag-card__dek { font-size: var(--fs-base); color: var(--ink-soft); }
.mag-card.lead .mag-card__meta { border-top-color: var(--peri-200); }

/* ==========================================================================
   Article page
   ========================================================================== */

.mag-article-head {
  padding-block: var(--s-8) var(--s-7);
  background:
    radial-gradient(760px 300px at 12% 0%, rgba(85, 102, 196, 0.08), transparent 62%),
    linear-gradient(180deg, var(--cream) 0%, rgba(253, 247, 240, 0) 100%);
  border-bottom: 1px solid var(--cream-line);
}
.mag-article-head h1 { max-width: 21ch; margin-bottom: var(--s-5); }
.mag-article-head .mag-standfirst { max-width: 62ch; font-size: var(--fs-lg); line-height: 1.6; }

.mag-byline {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 0.55rem 1.25rem 0.55rem 0.6rem;
  box-shadow: var(--sh-1);
  max-width: max-content;
}
.mag-byline__mark {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--peri-050);
  border-radius: var(--r-pill);
}
.mag-byline__mark svg { width: 28px; height: 28px; }
.mag-byline__text {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.55;
}
.mag-byline__text a { color: var(--peri-600); font-weight: 600; text-decoration: none; }
.mag-byline__text a:hover { color: var(--coral-700); text-decoration: underline; }
.mag-byline time { color: var(--ink-soft); font-weight: 600; }

.mag-figure { margin: var(--s-8) 0 0; }
.mag-figure img {
  width: 100%;
  border-radius: var(--r-2xl);
  aspect-ratio: 3 / 2;
  object-fit: cover;
  box-shadow: var(--sh-2);
}
.mag-figure figcaption {
  margin-top: var(--s-3);
  font-size: var(--fs-xs);
  color: var(--muted);
  text-align: center;
}

.mag-shell { padding-block: var(--s-8) var(--s-9); }

/* ---- body typography. Measure held between 64 and 75 characters. ---- */
.mag-body {
  max-width: 68ch;
  margin-inline: auto;
  font-size: var(--fs-md);
  line-height: 1.78;
  color: var(--ink-soft);
}
.mag-body > h2 {
  font-size: var(--fs-xl);
  margin: var(--s-8) 0 var(--s-4);
  padding-top: var(--s-4);
  position: relative;
}
.mag-body > h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 56px;
  height: 10px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent) 0 50%, var(--peri-200) 50% 100%);
}
.mag-body > h2:first-child { margin-top: 0; }
.mag-body > h3 {
  font-size: var(--fs-md);
  margin: var(--s-6) 0 var(--s-3);
  color: var(--ink);
}
.mag-body p { margin: 0 0 var(--s-5); }
.mag-body ul, .mag-body ol { margin: 0 0 var(--s-5); padding-left: 1.35rem; }
.mag-body li { margin-bottom: var(--s-3); }
.mag-body li::marker { color: var(--primary); }
.mag-body a { color: var(--peri-600); text-underline-offset: 3px; }
.mag-body a:hover { color: var(--coral-700); }
.mag-body strong { color: var(--ink); }
.mag-body blockquote {
  margin: var(--s-6) 0;
  padding: var(--s-5) var(--s-6);
  background: var(--peri-050);
  border-left: 5px solid var(--peri-300);
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.6;
}
.mag-body blockquote p:last-child { margin-bottom: 0; }
.mag-body table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--s-6) 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  font-size: var(--fs-sm);
}
.mag-body th, .mag-body td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line-soft);
}
.mag-body th { font-family: var(--font-display); color: var(--ink); background: var(--peri-050); }
.mag-body tr:last-child td { border-bottom: 0; }

/* the contextual link the assembler drops between sections */
.inline-read {
  margin: var(--s-6) 0;
  padding: var(--s-4) var(--s-5);
  background: var(--cream);
  border: 1px solid var(--cream-line);
  border-left: 5px solid var(--accent);
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.6;
}
.mag-body p.inline-read { margin-bottom: var(--s-6); }
.inline-read a { color: var(--peri-700); text-decoration: underline; text-underline-offset: 3px; }
.inline-read a:hover { color: var(--coral-700); }

/* ---- the call to action after the conclusion ---- */
.mag-cta {
  max-width: 720px;
  margin: var(--s-9) auto 0;
  padding: var(--s-7);
  border-radius: var(--r-2xl);
  border: 1px solid var(--peri-100);
  background:
    radial-gradient(620px 260px at 88% 0%, rgba(255, 142, 114, 0.14), transparent 66%),
    linear-gradient(180deg, var(--peri-050) 0%, #ECEEFB 100%);
  box-shadow: var(--sh-1);
}
.mag-cta h2 { font-size: var(--fs-xl); }
.mag-cta p { color: var(--ink-soft); margin-bottom: var(--s-5); }
.mag-cta__action { margin-bottom: var(--s-4); }
.mag-cta__note { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 0; }
.mag-cta--index { max-width: none; margin-top: var(--s-9); }

/* ---- author box ---- */
.mag-authorbox {
  max-width: 720px;
  margin: var(--s-7) auto 0;
  display: flex;
  gap: var(--s-6);
  align-items: flex-start;
  padding: var(--s-6);
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
  border: 1px solid var(--cream-line);
  border-radius: var(--r-xl);
}
.mag-authorbox img {
  width: 116px;
  height: 116px;
  flex: none;
  border-radius: var(--r-pill);
  object-fit: cover;
  border: 4px solid var(--surface);
  box-shadow: var(--sh-1);
}
.mag-authorbox__kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--peri-600);
  margin-bottom: var(--s-1);
}
.mag-authorbox h2 { font-size: var(--fs-lg); margin-bottom: var(--s-3); }
.mag-authorbox p { color: var(--ink-soft); font-size: var(--fs-sm); line-height: 1.75; margin-bottom: var(--s-3); }
.mag-authorbox__link { margin-bottom: 0; }
.mag-authorbox__link a { font-family: var(--font-display); font-weight: 700; }

/* ---- Read also ---- */
.mag-also { padding-block: var(--s-9); }
.mag-related {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-5);
}
.mag-rel {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-1);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.mag-rel:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--peri-200); }
.mag-rel:focus-within { border-color: var(--peri-300); }
.mag-rel__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.mag-rel__body { padding: var(--s-5); display: flex; flex-direction: column; flex: 1; }
.mag-rel__title { font-size: var(--fs-base); margin-bottom: var(--s-2); line-height: 1.35; }
.mag-rel__title a { color: var(--ink); text-decoration: none; }
.mag-rel__title a:hover { color: var(--peri-700); text-decoration: underline; }
.mag-rel__title a::after { content: ""; position: absolute; inset: 0; }
.mag-rel__dek { font-size: var(--fs-sm); color: var(--muted); line-height: 1.65; margin-bottom: var(--s-4); }
.mag-rel__meta {
  margin: auto 0 0;
  padding-top: var(--s-3);
  border-top: 1px dashed var(--line);
  font-size: var(--fs-xs);
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 600;
}
.mag-also__more { margin: var(--s-7) 0 0; }

/* ---- home page magazine teaser ---- */
.mag-teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-5);
}
.mag-more-line { margin: var(--s-7) 0 0; display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; }
.mag-more-line p { margin: 0; color: var(--muted); font-size: var(--fs-sm); max-width: 46ch; }

/* ---- author page article list ---- */
.mag-pubs { list-style: none; padding: 0; margin: 0; }
.mag-pubs li {
  margin: 0;
  padding: var(--s-4) 0;
  border-bottom: 1px dashed var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem var(--s-4);
  align-items: baseline;
  justify-content: space-between;
}
.mag-pubs li:last-child { border-bottom: 0; }
.mag-pubs a { font-family: var(--font-display); font-weight: 700; text-decoration: none; }
.mag-pubs a:hover { text-decoration: underline; }
.mag-pubs time { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; white-space: nowrap; }

/* ==========================================================================
   Magazine responsive, down to a 360 pixel viewport
   ========================================================================== */

@media (max-width: 1024px) {
  .mag-grid, .mag-related, .mag-teaser-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mag-card.lead .mag-card__body { padding: var(--s-6); }
  .mag-card.lead .mag-card__media img { min-height: 280px; }
}

@media (max-width: 860px) {
  .mag-grid, .mag-related, .mag-teaser-grid { grid-template-columns: 1fr; }
  .mag-card.lead { flex-direction: column; }
  .mag-card.lead .mag-card__media img { min-height: 0; aspect-ratio: 3 / 2; }
  .mag-card.lead .mag-card__title { font-size: var(--fs-lg); }
  .mag-article-head .mag-standfirst { font-size: var(--fs-md); }
  .mag-body { font-size: var(--fs-base); }
}

@media (max-width: 620px) {
  .mag-index-head, .mag-article-head { padding-block: var(--s-7) var(--s-6); }
  .mag-byline {
    border-radius: var(--r-lg);
    align-items: flex-start;
    padding: var(--s-4);
    max-width: none;
  }
  .mag-byline__text { font-size: var(--fs-xs); }
  .mag-figure { margin-top: var(--s-6); }
  .mag-figure img { border-radius: var(--r-xl); }
  .mag-cta { padding: var(--s-5); border-radius: var(--r-xl); }
  .mag-cta h2 { font-size: var(--fs-lg); }
  .mag-authorbox { flex-direction: column; gap: var(--s-4); padding: var(--s-5); }
  .mag-authorbox img { width: 92px; height: 92px; }
  .mag-more-line .btn { width: auto; }
}

@media (max-width: 400px) {
  .mag-index-head__facts li { padding: 0.45rem 0.85rem; }
  .mag-card__body { padding: var(--s-4) var(--s-4) var(--s-5); }
  .mag-card.lead .mag-card__body { padding: var(--s-4) var(--s-4) var(--s-5); }
  .mag-body > h2 { font-size: var(--fs-lg); }
  .mag-sep { margin: 0 0.35rem; }
  .mag-pubs li { flex-direction: column; align-items: flex-start; }
}

/* ---- site map: the magazine group runs the full width of the two columns ---- */
.map-group--mag { grid-column: 1 / -1; }
.map-group--mag > ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--s-7);
}
@media (max-width: 860px) {
  .map-group--mag > ul { grid-template-columns: 1fr; }
}



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