/* ==========================================================================
   BoothInventory design system
   Handmade craft: linen oat ground, indigo dye ink, terracotta stamp accent.
   Woven texture grounds, stitched borders, hand stamped hanging tags.
   ========================================================================== */

:root {
  /* --- brief palette --- */
  --bg: #FAF6F0;
  --surface: #FFFFFF;
  --ink: #231F2B;
  --primary: #37486E;
  --accent: #C4622D;
  --muted: #6E6878;

  /* --- derived dyes and tints --- */
  --indigo-950: #171E33;
  --indigo-900: #1F2942;
  --indigo-700: #2C3A5A;
  --indigo-400: #6B7B9E;
  --indigo-200: #B9C2D5;
  --indigo-100: #DFE4EE;
  --indigo-050: #EDF0F6;

  --terra-700: #8F421B;
  --terra-600: #A85224;
  --terra-200: #EFCDB8;
  --terra-100: #F8E7DB;

  --oat-100: #F5EFE5;
  --oat-200: #EDE4D6;
  --oat-300: #E1D5C1;
  --thread: #C6B79E;
  --thread-dark: #A8977B;

  --ink-80: rgba(35, 31, 43, 0.80);
  --ink-64: rgba(35, 31, 43, 0.64);
  --ink-12: rgba(35, 31, 43, 0.12);
  --ink-06: rgba(35, 31, 43, 0.06);

  /* --- type --- */
  --font-display: "DM Serif Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Mukta", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-base: 1.0625rem;
  --t-md: 1.1875rem;
  --t-lg: 1.375rem;
  --t-xl: clamp(1.5rem, 1.1rem + 1.6vw, 2rem);
  --t-2xl: clamp(1.9rem, 1.3rem + 2.6vw, 2.75rem);
  --t-3xl: clamp(2.3rem, 1.4rem + 4vw, 3.9rem);
  --t-num: clamp(2.6rem, 1.8rem + 3.4vw, 4.1rem);

  /* --- spacing scale (thread count) --- */
  --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;

  /* --- radii, seams, shadows --- */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-tag: 6px;
  --seam: 1px solid var(--oat-300);
  --shadow-low: 0 1px 0 rgba(35, 31, 43, 0.05), 0 2px 10px rgba(35, 31, 43, 0.04);
  --shadow-mid: 0 2px 0 rgba(35, 31, 43, 0.04), 0 14px 34px rgba(35, 31, 43, 0.09);
  --shadow-high: 0 26px 60px rgba(23, 30, 51, 0.18);

  --wrap: 1180px;
  --wrap-narrow: 760px;

  /* --- woven grounds --- */
  --weave-fine:
    repeating-linear-gradient(90deg, rgba(35, 31, 43, 0.042) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(0deg, rgba(35, 31, 43, 0.032) 0 1px, transparent 1px 5px);
  --weave-slub:
    repeating-linear-gradient(90deg, rgba(168, 151, 123, 0.13) 0 2px, transparent 2px 11px),
    repeating-linear-gradient(0deg, rgba(168, 151, 123, 0.10) 0 2px, transparent 2px 11px);
  --weave-indigo:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.10) 0 1px, transparent 1px 6px);
}

/* ==========================================================================
   1. Reset and base
   ========================================================================== */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: 1.68;
  color: var(--ink);
  background-color: var(--bg);
  background-image: var(--weave-fine), var(--weave-slub);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1 { font-size: var(--t-3xl); }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-lg); }
h4 { font-size: var(--t-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(--primary);
  text-decoration-color: var(--terra-200);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}
a:hover { color: var(--terra-600); text-decoration-color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }
strong { font-weight: 700; }
small { font-size: var(--t-xs); }

::selection { background: var(--terra-100); color: var(--indigo-950); }

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

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

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 999;
  background: var(--indigo-900);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 var(--r-md) var(--r-md);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 0; color: #fff; }

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

/* ==========================================================================
   2. Craft primitives: stitched panels, stamps, hanging tags
   ========================================================================== */

/* A stitched card: solid seam outside, running dashed stitch inside. */
.stitched {
  position: relative;
  background: var(--surface);
  border: var(--seam);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-low);
}
.stitched::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1.5px dashed var(--thread);
  border-radius: calc(var(--r-lg) - 5px);
  pointer-events: none;
  opacity: 0.85;
}
.stitched > * { position: relative; z-index: 1; }

/* Selvedge: a torn linen edge used to close a band. */
.selvedge {
  position: relative;
}
.selvedge::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 12px;
  background:
    repeating-linear-gradient(90deg,
      var(--thread) 0 9px, transparent 9px 18px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0 2px, transparent 2px);
  mask-image: linear-gradient(to bottom, #000 0 2px, transparent 2px);
  opacity: 0.55;
}

/* A running stitch rule used between sections. */
.stitch-rule {
  height: 2px;
  border: 0;
  margin: 0;
  background: repeating-linear-gradient(90deg,
    var(--thread-dark) 0 10px, transparent 10px 20px);
  opacity: 0.6;
}

/* Hand stamped ink block: slightly rotated, inked terracotta. */
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terra-700);
  background: var(--terra-100);
  border: 1.5px solid var(--terra-200);
  border-radius: 3px;
  padding: 0.3rem 0.65rem;
  transform: rotate(-1.1deg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}
.stamp--indigo {
  color: var(--indigo-700);
  background: var(--indigo-050);
  border-color: var(--indigo-100);
  transform: rotate(0.9deg);
}
.stamp--light {
  color: var(--oat-100);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
}

/* Hanging tag: punched corner, eyelet, string, swings on hover. */
.tag {
  position: relative;
  background: var(--oat-100);
  border: 1.5px solid var(--oat-300);
  border-radius: var(--r-tag);
  clip-path: polygon(0 20px, 20px 0, 100% 0, 100% 100%, 0 100%);
  padding: var(--s-5) var(--s-5) var(--s-5);
  transform-origin: 26px 12px;
  transition: transform 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97),
              box-shadow 0.3s ease;
}
.tag::before {
  content: "";
  position: absolute;
  top: 13px; left: 15px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 1.5px var(--thread-dark);
}
.tag:hover, .tag:focus-within {
  transform: rotate(-1.6deg);
  box-shadow: var(--shadow-mid);
}

/* Icon stamp holder for the hand cut SVG icons. */
.icon-stamp {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--oat-100);
  border: 1.5px solid var(--oat-300);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85);
  transform: rotate(-2deg);
  flex: none;
}
.icon-stamp svg { width: 26px; height: 26px; display: block; }
.icon-stamp svg [stroke] { stroke: var(--terra-600); }

/* ==========================================================================
   3. Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: var(--t-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 0.95rem 1.5rem;
  border-radius: var(--r-md);
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease,
              box-shadow 0.18s ease, color 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  /* Label is white in every state. A white label on --accent measures only
     4.1:1, so the fill sits one step deeper on the same terracotta ramp:
     white on --terra-600 is 5.4:1, and on --terra-700 it is 7.1:1. */
  background: var(--terra-600);
  color: var(--surface);
  border-color: var(--terra-700);
  box-shadow: 0 2px 0 var(--terra-700), 0 10px 22px rgba(196, 98, 45, 0.25);
}
.btn--primary:hover,
.btn--primary:focus,
.btn--primary:focus-visible,
.btn--primary:active {
  background: var(--terra-700);
  color: var(--surface);
}

.btn--ink {
  background: var(--indigo-900);
  color: #F3F1EC;
  border-color: var(--indigo-950);
  box-shadow: 0 2px 0 var(--indigo-950);
}
.btn--ink:hover { background: var(--indigo-700); color: #F3F1EC; }

.btn--quiet {
  background: transparent;
  color: var(--indigo-900);
  border: 1.5px dashed var(--thread-dark);
}
.btn--quiet:hover { background: var(--oat-100); color: var(--indigo-900); border-style: solid; }

.btn--onink {
  background: var(--oat-100);
  color: var(--indigo-950);
  border-color: var(--oat-300);
}
.btn--onink:hover { background: #fff; color: var(--indigo-950); }

.btn--wide { width: 100%; }

/* ==========================================================================
   4. Header and navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 246, 240, 0.9);
  backdrop-filter: saturate(140%) blur(9px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-stuck {
  background: rgba(250, 246, 240, 0.97);
  border-bottom-color: var(--oat-300);
  box-shadow: 0 8px 24px rgba(35, 31, 43, 0.07);
}
.site-header::after {
  content: "";
  display: block;
  height: 2px;
  background: repeating-linear-gradient(90deg,
    var(--thread) 0 8px, transparent 8px 16px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.site-header.is-stuck::after { opacity: 0.8; }

.header-bar {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  min-height: 74px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--indigo-950);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark svg { width: 32px; height: 32px; flex: none; }
.wordmark:hover { color: var(--indigo-950); }
.wordmark b { font-weight: 400; }
.wordmark i { font-style: normal; color: var(--accent); }

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--s-5);
}
/* Scoped with :not(.btn) so the nav link rules stop repainting the header
   CTA label (they outrank .btn--primary on specificity); the .btn rules own
   the button in every state. */
.nav a:not(.btn) {
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink-80);
  text-decoration: none;
  position: relative;
  padding: 0.3rem 0;
}
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: repeating-linear-gradient(90deg,
    var(--accent) 0 5px, transparent 5px 10px);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}
.nav a:not(.btn):hover { color: var(--indigo-900); }
.nav a:not(.btn):hover::after,
.nav a:not(.btn)[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 46px; height: 46px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--oat-300);
  background: var(--surface);
  cursor: pointer;
  place-items: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px; height: 2px;
  background: var(--indigo-900);
  border-radius: 2px;
  content: "";
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after { transform: translateY(4px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-2px) rotate(-45deg); }

@media (max-width: 940px) {
  .nav-toggle { display: grid; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    background-image: var(--weave-slub);
    border-bottom: 2px solid var(--oat-300);
    padding: var(--s-3) var(--s-5) var(--s-5);
    box-shadow: var(--shadow-mid);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 0.85rem 0; border-bottom: 1.5px dashed var(--thread); }
  .nav .btn { margin-top: var(--s-4); }
}

/* ==========================================================================
   5. Section furniture
   ========================================================================== */

.section { padding-block: var(--s-9); position: relative; }
.section--tight { padding-block: var(--s-8); }

.section--linen {
  background-color: var(--oat-100);
  background-image: var(--weave-slub);
  border-top: 1.5px solid var(--oat-300);
  border-bottom: 1.5px solid var(--oat-300);
}

.section--dye {
  background-color: var(--indigo-900);
  background-image: var(--weave-indigo),
    radial-gradient(120% 80% at 12% 0%, rgba(107, 123, 158, 0.4) 0%, transparent 60%);
  color: var(--oat-100);
}
.section--dye h2, .section--dye h3 { color: #FBF7F1; }
.section--dye p { color: rgba(245, 239, 229, 0.86); }
.section--dye a { color: #F2E3D6; }

.section-head { max-width: 720px; margin-bottom: var(--s-7); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p {
  font-size: var(--t-md);
  color: var(--muted);
  margin-bottom: 0;
}
.section--dye .section-head p { color: rgba(245, 239, 229, 0.82); }

.eyebrow {
  display: inline-block;
  margin-bottom: var(--s-4);
}

/* Hand drawn stitch underline for headings. */
.stitch-under {
  display: block;
  width: 132px;
  height: 10px;
  margin-top: var(--s-3);
}
.stitch-under path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 9 8;
  stroke-dashoffset: 260;
}
.reveal.is-visible .stitch-under path,
.is-visible .stitch-under path { animation: draw-stitch 1.5s ease forwards; }
.section-head--center .stitch-under { margin-inline: auto; }

@keyframes draw-stitch {
  from { stroke-dashoffset: 260; }
  to { stroke-dashoffset: 0; }
}

/* ==========================================================================
   6. Hero
   ========================================================================== */

.hero {
  position: relative;
  padding-top: var(--s-8);
  padding-bottom: var(--s-9);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 55% at 88% 8%, rgba(196, 98, 45, 0.10) 0%, transparent 62%),
    radial-gradient(60% 50% at 4% 92%, rgba(55, 72, 110, 0.10) 0%, transparent 60%);
  pointer-events: none;
}
.hero > * { position: relative; }

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

/* Home hero headline only. Same typeface and weight, ramp scaled down about
   a quarter at desktop (3.9rem cap becomes 3rem) and kept fluid. .hero exists
   on the home page alone, so no other heading changes. */
.hero h1 {
  font-size: clamp(2rem, 1.2rem + 3.2vw, 3rem);
  margin-bottom: var(--s-5);
  max-width: 15ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}
.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.06em;
  height: 3px;
  background: repeating-linear-gradient(90deg,
    var(--terra-200) 0 7px, transparent 7px 13px);
}

.hero-lede {
  font-size: var(--t-md);
  color: var(--ink-80);
  max-width: 54ch;
  margin-bottom: var(--s-6);
}

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

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1.5px solid var(--oat-300);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}
.trust-strip li {
  list-style: none;
  margin: 0;
  padding: var(--s-4) var(--s-4);
  font-size: var(--t-xs);
  line-height: 1.45;
  color: var(--ink-80);
  border-right: 1.5px dashed var(--thread);
}
.trust-strip li:last-child { border-right: 0; }
.trust-strip b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 400;
  color: var(--indigo-900);
  line-height: 1.1;
  margin-bottom: 2px;
}

/* Photo mounted like a fabric swatch pinned to a board. */
.photo-mount {
  position: relative;
  padding: 12px;
  background: var(--surface);
  border: 1.5px solid var(--oat-300);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-mid);
  transform: rotate(0.9deg);
}
.photo-mount::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px dashed var(--thread);
  border-radius: var(--r-md);
  z-index: 2;
  pointer-events: none;
}
.photo-mount img {
  border-radius: var(--r-md);
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.photo-mount--left { transform: rotate(-1deg); }

/* A price tag hanging off the photo. */
.hang-tag {
  position: absolute;
  right: -14px;
  bottom: 26px;
  z-index: 3;
  background: var(--terra-100);
  border: 1.5px solid var(--terra-200);
  border-radius: var(--r-tag);
  clip-path: polygon(0 18px, 18px 0, 100% 0, 100% 100%, 0 100%);
  padding: 0.85rem 1.1rem 0.85rem 1.35rem;
  min-width: 172px;
  box-shadow: var(--shadow-mid);
  transform-origin: 24px 10px;
  animation: tag-settle 5.5s ease-in-out infinite;
}
.hang-tag::before {
  content: "";
  position: absolute;
  top: 12px; left: 13px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 1.5px var(--thread-dark);
}
.hang-tag span {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--terra-700);
}
.hang-tag b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--indigo-950);
  line-height: 1.2;
}
.hang-tag small { display: block; color: var(--ink-64); font-size: 0.78rem; }

@keyframes tag-settle {
  0%, 100% { transform: rotate(-2.2deg); }
  50% { transform: rotate(1.4deg); }
}

/* ==========================================================================
   7. Problem cards
   ========================================================================== */

.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: var(--s-5);
}
.pain-card { padding: var(--s-6) var(--s-5); }
.pain-card:nth-child(2n) { transform: rotate(-0.5deg); }
.pain-card:nth-child(3n) { transform: rotate(0.6deg); }
.pain-card h3 { font-size: 1.28rem; margin-bottom: var(--s-3); }
.pain-card p { font-size: var(--t-sm); color: var(--ink-80); margin-bottom: var(--s-4); }
.pain-cost {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--terra-700);
  border-top: 2px dashed var(--terra-200);
  padding-top: var(--s-3);
  margin-bottom: 0;
}

/* ==========================================================================
   8. How it works: stitched vertical seam
   ========================================================================== */

.how-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: var(--s-8);
  align-items: start;
}

.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.steps::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 22px;
  bottom: 34px;
  width: 2px;
  background: repeating-linear-gradient(180deg,
    var(--thread-dark) 0 8px, transparent 8px 16px);
}
.step {
  position: relative;
  padding-left: 66px;
  margin-bottom: var(--s-6);
}
.step:last-child { margin-bottom: 0; }
.step-num {
  position: absolute;
  left: 0; top: 0;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--indigo-700);
  color: var(--indigo-900);
  font-family: var(--font-display);
  font-size: 1.2rem;
  box-shadow: 0 0 0 5px var(--bg);
}
.step h3 { margin-bottom: var(--s-2); font-size: 1.3rem; }
.step p { color: var(--ink-80); margin-bottom: 0; font-size: var(--t-sm); }

/* ==========================================================================
   9. Features
   ========================================================================== */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: var(--s-5);
}
.feature {
  padding: var(--s-6) var(--s-5);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.feature:hover { transform: translateY(-4px) rotate(-0.35deg); box-shadow: var(--shadow-mid); }
.feature-top {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-bottom: var(--s-4);
}
.feature-top h3 { margin: 0; font-size: 1.25rem; }
.feature p { font-size: var(--t-sm); color: var(--ink-80); margin-bottom: 0; }

/* ==========================================================================
   10. Outcomes
   ========================================================================== */

.outcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--s-5);
}
.outcome {
  padding: var(--s-6) var(--s-5);
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-lg);
  position: relative;
}
.outcome::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1.5px dashed rgba(245, 239, 229, 0.28);
  border-radius: calc(var(--r-lg) - 5px);
  pointer-events: none;
}
.outcome b {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-num);
  line-height: 1;
  color: #F6D9C4;
  margin-bottom: var(--s-3);
}
.outcome h3 { font-size: 1.18rem; margin-bottom: var(--s-2); }
.outcome p { font-size: var(--t-sm); margin-bottom: 0; }

/* ==========================================================================
   11. Testimonials and results
   ========================================================================== */

.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: var(--s-5);
  margin-bottom: var(--s-7);
}
.testimonial {
  margin: 0;
  padding: var(--s-6) var(--s-5) var(--s-5);
  position: relative;
}
.testimonial::before {
  content: "";
  position: absolute;
  top: -1px; left: var(--s-5); right: var(--s-5);
  height: 3px;
  background: repeating-linear-gradient(90deg,
    var(--accent) 0 7px, transparent 7px 14px);
  border-radius: 2px;
}
.testimonial p {
  font-family: var(--font-display);
  font-size: 1.16rem;
  line-height: 1.45;
  color: var(--indigo-950);
  margin-bottom: var(--s-5);
}
.testimonial footer {
  border-top: 1.5px dashed var(--thread);
  padding-top: var(--s-4);
  font-size: var(--t-xs);
  color: var(--muted);
  line-height: 1.5;
}
.testimonial footer b {
  display: block;
  font-size: var(--t-sm);
  color: var(--ink);
  font-weight: 700;
}

.results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--s-5);
  padding: var(--s-6) var(--s-5);
  background: var(--surface);
  border: 1.5px solid var(--oat-300);
  border-radius: var(--r-lg);
  text-align: center;
}
.results div { padding: 0 var(--s-3); }
.results b {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.35rem;
  line-height: 1.05;
  color: var(--accent);
}
.results span { font-size: var(--t-xs); color: var(--muted); }

/* ==========================================================================
   12. Pricing: three tags on a rail
   ========================================================================== */

.rail {
  position: relative;
  height: 26px;
  margin-bottom: -13px;
}
.rail::before {
  content: "";
  position: absolute;
  left: 4%; right: 4%; top: 12px;
  height: 2px;
  background: repeating-linear-gradient(90deg,
    var(--thread-dark) 0 12px, transparent 12px 22px);
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
  gap: var(--s-5);
  align-items: start;
}
.plan {
  background: var(--surface);
  border: 1.5px solid var(--oat-300);
  border-radius: var(--r-lg);
  clip-path: polygon(0 24px, 24px 0, 100% 0, 100% 100%, 0 100%);
  padding: var(--s-6) var(--s-5) var(--s-5);
  position: relative;
  transform-origin: 30px 14px;
  transition: transform 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97), box-shadow 0.3s ease;
}
.plan::before {
  content: "";
  position: absolute;
  top: 16px; left: 17px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 2px var(--thread-dark);
}
.plan:hover, .plan:focus-within {
  transform: rotate(-1.3deg);
  box-shadow: var(--shadow-mid);
}
.plan--pick {
  background: var(--oat-100);
  border-color: var(--indigo-700);
  border-width: 2px;
  box-shadow: var(--shadow-mid);
}
.plan-badge {
  position: absolute;
  top: -13px;
  right: var(--s-5);
  background: var(--indigo-900);
  color: #F7F2EA;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 3px;
  transform: rotate(1.6deg);
}
.plan h3 { margin: 0 0 var(--s-2); font-size: 1.45rem; padding-left: 22px; }
.plan-for {
  font-size: var(--t-xs);
  color: var(--muted);
  margin-bottom: var(--s-4);
  padding-left: 22px;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  border-top: 2px dashed var(--thread);
  border-bottom: 2px dashed var(--thread);
  padding: var(--s-4) 0;
  margin-bottom: var(--s-4);
}
.plan-price b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.7rem;
  line-height: 1;
  color: var(--indigo-950);
}
.plan-price span { font-size: var(--t-xs); color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 0 0 var(--s-5); }
.plan li {
  position: relative;
  padding-left: 1.6rem;
  font-size: var(--t-sm);
  color: var(--ink-80);
  margin-bottom: var(--s-3);
}
.plan li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 12px; height: 2px;
  background: var(--accent);
  box-shadow: 4px -4px 0 -0.5px var(--accent), 4px 4px 0 -0.5px var(--accent);
  transform: rotate(-45deg);
  border-radius: 1px;
}
.price-note {
  margin: var(--s-6) auto 0;
  max-width: 660px;
  text-align: center;
  font-size: var(--t-sm);
  color: var(--muted);
}

/* ==========================================================================
   13. FAQ
   ========================================================================== */

.faq-list {
  max-width: 840px;
  margin-inline: auto;
  border-top: 2px dashed var(--thread);
}
.faq-item { border-bottom: 2px dashed var(--thread); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: var(--s-4);
  background: none;
  border: 0;
  padding: var(--s-5) 0;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.22rem;
  line-height: 1.3;
  color: var(--indigo-950);
  cursor: pointer;
}
.faq-q:hover { color: var(--terra-700); }
.faq-mark {
  flex: none;
  width: 30px; height: 30px;
  margin-top: 2px;
  border-radius: 4px;
  border: 1.5px solid var(--oat-300);
  background: var(--oat-100);
  display: grid;
  place-items: center;
  position: relative;
  transition: transform 0.3s ease, background-color 0.3s ease;
}
.faq-mark::before, .faq-mark::after {
  content: "";
  position: absolute;
  background: var(--terra-600);
  border-radius: 1px;
}
.faq-mark::before { width: 13px; height: 2px; }
.faq-mark::after { width: 2px; height: 13px; transition: transform 0.3s ease, opacity 0.3s ease; }
.faq-q[aria-expanded="true"] .faq-mark { background: var(--terra-100); transform: rotate(-8deg); }
.faq-q[aria-expanded="true"] .faq-mark::after { transform: scaleY(0); opacity: 0; }
.faq-a {
  padding: 0 0 var(--s-5) calc(30px + var(--s-4));
  max-width: 68ch;
}
.faq-a p { font-size: var(--t-sm); color: var(--ink-80); margin-bottom: var(--s-3); }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a[hidden] { display: none; }

/* ==========================================================================
   14. Contact form
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: var(--s-8);
  align-items: start;
}
.contact-aside p { font-size: var(--t-sm); }
.contact-aside ul { list-style: none; padding: 0; margin-top: var(--s-5); }
.contact-aside li {
  position: relative;
  padding-left: 1.7rem;
  font-size: var(--t-sm);
  margin-bottom: var(--s-3);
}
.contact-aside li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 11px; height: 11px;
  border: 2px solid var(--terra-200);
  border-radius: 2px;
  transform: rotate(45deg);
}

.form-card {
  background: var(--surface);
  border: 1.5px solid var(--oat-300);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-high);
  position: relative;
}
.form-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1.5px dashed var(--thread);
  border-radius: var(--r-md);
  pointer-events: none;
}
.form-card > * { position: relative; }

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
}
.field { margin-bottom: var(--s-4); }
.field label {
  display: block;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--indigo-900);
  margin-bottom: 0.4rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--t-sm);
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--oat-300);
  border-radius: var(--r-md);
  padding: 0.75rem 0.85rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.field textarea { min-height: 132px; resize: vertical; line-height: 1.6; }
.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--indigo-700) 50%),
    linear-gradient(135deg, var(--indigo-700) 50%, transparent 50%);
  background-position: calc(100% - 19px) 1.28rem, calc(100% - 13px) 1.28rem;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--thread-dark); }
.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(55, 72, 110, 0.16);
}
.field [aria-invalid="true"] {
  border-color: var(--terra-600);
  background: #FDF4EF;
}
.field-error {
  display: block;
  font-size: var(--t-xs);
  color: var(--terra-700);
  font-weight: 600;
  margin-top: 0.35rem;
  min-height: 1px;
}
.field-hint { font-size: var(--t-xs); color: var(--muted); margin-top: 0.3rem; display: block; }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  background: var(--oat-100);
  border: 1.5px dashed var(--thread);
  border-radius: var(--r-md);
  padding: var(--s-4);
  margin-bottom: var(--s-5);
}
.consent input {
  width: 20px; height: 20px;
  margin-top: 3px;
  accent-color: var(--primary);
  flex: none;
}
.consent label {
  font-size: var(--t-xs);
  color: var(--ink-80);
  line-height: 1.55;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  margin: 0;
}

.form-foot {
  margin-top: var(--s-4);
  font-size: var(--t-xs);
  color: var(--muted);
  text-align: center;
  margin-bottom: 0;
}

/* ==========================================================================
   15. Footer
   ========================================================================== */

.site-footer {
  background-color: var(--indigo-950);
  background-image: var(--weave-indigo);
  color: rgba(243, 238, 230, 0.78);
  padding-top: var(--s-9);
  font-size: var(--t-sm);
}
.site-footer a { color: rgba(243, 238, 230, 0.82); text-decoration: none; }
.site-footer a:hover { color: #F2C7A9; text-decoration: underline; text-decoration-color: var(--accent); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.25fr;
  gap: var(--s-7);
  padding-bottom: var(--s-8);
}
.footer-brand .wordmark { color: #FBF7F1; font-size: 1.35rem; }
.footer-brand .wordmark:hover { color: #FBF7F1; }
.footer-brand p {
  margin-top: var(--s-4);
  max-width: 34ch;
  color: rgba(243, 238, 230, 0.7);
  font-size: var(--t-xs);
  line-height: 1.65;
}
.footer-col h2 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #E7B694;
  margin-bottom: var(--s-4);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.6rem; font-size: var(--t-xs); }
.footer-pub {
  margin-top: var(--s-4);
  color: rgba(243, 238, 230, 0.55);
  font-size: var(--t-xs);
}

.social {
  display: flex;
  gap: 0.6rem;
  margin-top: var(--s-5);
  flex-wrap: wrap;
}
.social a {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  border: 1.5px solid rgba(243, 238, 230, 0.24);
  background: rgba(255, 255, 255, 0.05);
  transition: transform 0.22s ease, background-color 0.22s ease, border-color 0.22s ease;
}
.social a:hover {
  background: var(--accent);
  border-color: var(--terra-700);
  transform: translateY(-3px) rotate(-4deg);
}
.social svg { width: 19px; height: 19px; fill: #F3EEE6; }

.footer-base {
  border-top: 2px dashed rgba(243, 238, 230, 0.18);
  padding-block: var(--s-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  justify-content: space-between;
  align-items: center;
  font-size: var(--t-xs);
  color: rgba(243, 238, 230, 0.62);
}

.byline {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  max-width: var(--wrap-narrow);
  margin: var(--s-8) auto 0;
  padding: var(--s-5);
  background: var(--oat-100);
  border: 1.5px solid var(--oat-300);
  border-radius: var(--r-lg);
  font-size: var(--t-xs);
  color: var(--ink-80);
}
.byline .icon-stamp { width: 44px; height: 44px; }
.byline p { margin: 0; }

/* ==========================================================================
   16. Prose pages (legal, privacy, terms, site map, author, thanks, 404)
   ========================================================================== */

.page-head {
  padding-block: var(--s-8) var(--s-7);
  background-color: var(--oat-100);
  background-image: var(--weave-slub);
  border-bottom: 2px dashed var(--thread);
}
.page-head p {
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: 0;
  font-size: var(--t-md);
}
.crumbs {
  font-size: var(--t-xs);
  color: var(--muted);
  margin-bottom: var(--s-4);
}
.crumbs a { text-decoration: none; }
.crumbs span { padding: 0 0.45rem; color: var(--thread-dark); }

.prose { padding-block: var(--s-8); }
.prose h2 {
  font-size: 1.72rem;
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 2px dashed var(--thread);
}
.prose h2:first-of-type { margin-top: 0; border-top: 0; padding-top: 0; }
.prose h3 { font-size: 1.25rem; margin-top: var(--s-5); }
.prose p, .prose li { color: var(--ink-80); }
.prose ul { padding-left: 1.2rem; }
.dl-facts {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr;
  gap: 0;
  border: 1.5px solid var(--oat-300);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
}
.dl-facts dt {
  padding: 0.75rem var(--s-4);
  font-weight: 700;
  font-size: var(--t-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--indigo-900);
  background: var(--oat-100);
  border-bottom: 1.5px dashed var(--thread);
}
.dl-facts dd {
  margin: 0;
  padding: 0.75rem var(--s-4);
  font-size: var(--t-sm);
  border-bottom: 1.5px dashed var(--thread);
}
.dl-facts dt:last-of-type, .dl-facts dd:last-of-type { border-bottom: 0; }

.map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: var(--s-5);
}
.map-card { padding: var(--s-5); }
.map-card h2 {
  font-size: 1.25rem;
  border: 0;
  margin: 0 0 var(--s-4);
  padding: 0;
}
.map-card ul { list-style: none; padding: 0; margin: 0; }
.map-card li { margin-bottom: var(--s-4); font-size: var(--t-sm); }
.map-card a { font-weight: 700; text-decoration: none; }
.map-card span { display: block; color: var(--muted); font-size: var(--t-xs); }

.author-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: var(--s-8);
  align-items: start;
}
.author-card { padding: var(--s-5); position: sticky; top: 100px; }
.author-card img {
  border-radius: var(--r-md);
  border: 1.5px solid var(--oat-300);
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin-bottom: var(--s-4);
}
.author-card h2 { font-size: 1.2rem; margin-bottom: var(--s-2); }
.author-card p { font-size: var(--t-xs); color: var(--muted); }
.author-links { list-style: none; padding: 0; margin: var(--s-4) 0 0; }
.author-links li { margin-bottom: 0.5rem; font-size: var(--t-xs); }

.mini-cta {
  text-align: center;
  padding-block: var(--s-8);
}
.mini-cta .btn { margin: 0.35rem; }

.notice-box {
  max-width: 620px;
  margin: var(--s-9) auto;
  text-align: center;
  padding: var(--s-8) var(--s-6);
}
.notice-box .stamp { margin-bottom: var(--s-5); }
.notice-box p { color: var(--ink-80); }

/* ==========================================================================
   17. Reveal motion and reduced motion
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.09s; }
.reveal[data-delay="2"] { transition-delay: 0.18s; }
.reveal[data-delay="3"] { transition-delay: 0.27s; }
.reveal[data-delay="4"] { transition-delay: 0.36s; }
.reveal[data-delay="5"] { transition-delay: 0.45s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .stitch-under path { stroke-dashoffset: 0; }
  .hang-tag { animation: none; transform: rotate(-2deg); }
}

/* ==========================================================================
   18. Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-grid,
  .how-grid,
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .author-grid { grid-template-columns: minmax(0, 1fr); }
  .author-card { position: static; max-width: 420px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-6); }
  .hero { padding-bottom: var(--s-8); }
}

@media (max-width: 720px) {
  :root { --s-9: 3.5rem; --s-10: 4.5rem; }
  .wrap { padding-inline: var(--s-4); }
  .trust-strip { grid-template-columns: minmax(0, 1fr); }
  .trust-strip li { border-right: 0; border-bottom: 1.5px dashed var(--thread); }
  .trust-strip li:last-child { border-bottom: 0; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .dl-facts { grid-template-columns: minmax(0, 1fr); }
  .dl-facts dt { border-bottom: 0; padding-bottom: 0; background: var(--surface); }
  .hang-tag { right: 8px; bottom: 14px; }
  .form-card { padding: var(--s-5) var(--s-4); }
  .btn { width: 100%; }
  .hero-cta .btn { width: 100%; }
  .plan h3, .plan-for { padding-left: 26px; }
}

@media (max-width: 380px) {
  .wordmark { font-size: 1.18rem; }
  .results b { font-size: 2rem; }
}

@media (min-width: 1500px) {
  :root { --wrap: 1260px; }
}

@media print {
  .site-header, .site-footer, .hero-cta, .form-card { display: none; }
  body { background: #fff; }
}

/* ==========================================================================
   19. Booth and Bench: the magazine
   Built from the same linen ground, indigo dye and terracotta stamp as the
   rest of the site. No new colors: every value below comes from the tokens
   declared at the top of this file.
   ========================================================================== */

/* --- 19.1 Shared magazine furniture ------------------------------------ */

.mag-angle {
  margin-bottom: var(--s-4);
}

.mag-standfirst {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.02rem + 0.95vw, 1.6rem);
  line-height: 1.38;
  color: var(--indigo-700);
  max-width: 34ch;
  margin-bottom: 0;
}

.mag-head,
.mag-masthead {
  padding-block: var(--s-8) var(--s-7);
  background-color: var(--oat-100);
  background-image: var(--weave-slub);
  border-bottom: 2px dashed var(--thread);
}

.mag-head-inner { max-width: 46rem; }
.mag-head h1 {
  font-size: clamp(2rem, 1.35rem + 2.7vw, 3.05rem);
  margin-bottom: var(--s-4);
}
.mag-head .mag-standfirst { max-width: 42ch; }

/* --- 19.2 Byline row --------------------------------------------------- */

.mag-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem var(--s-4);
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1.5px dashed var(--thread);
  font-size: var(--t-xs);
  color: var(--muted);
}
.mag-byline-by {
  font-weight: 700;
  color: var(--ink);
  font-size: var(--t-sm);
}
.mag-byline-by a { text-decoration: none; }
.mag-byline-by a:hover { text-decoration: underline; }
.mag-byline-item {
  position: relative;
  padding-left: var(--s-4);
}
.mag-byline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 9px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--thread-dark) 0 3px, transparent 3px 6px);
}
.mag-byline time { font-variant-numeric: tabular-nums; color: var(--ink-80); }

/* --- 19.3 Featured photograph ------------------------------------------ */

.mag-figure {
  margin: 0;
  padding-block: var(--s-7) 0;
}
.mag-figure .photo-mount {
  transform: rotate(-0.5deg);
  max-width: 62rem;
  margin-inline: auto;
}
.mag-figure .photo-mount img { aspect-ratio: 3 / 2; }
.mag-figure figcaption {
  max-width: 62rem;
  margin: var(--s-5) auto 0;
  font-size: var(--t-xs);
  color: var(--muted);
  padding-left: var(--s-4);
  border-left: 2px solid var(--terra-200);
}

/* --- 19.4 Article body ------------------------------------------------- */

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

.mag-body {
  max-width: 70ch;          /* about 68 characters of Mukta at this size */
  margin-inline: auto;
  font-size: var(--t-md);
  line-height: 1.72;
  color: var(--ink-80);
}
.mag-body > p { margin-bottom: var(--s-5); }
.mag-body > p:first-of-type::first-letter {
  font-family: var(--font-display);
  float: left;
  font-size: 3.4rem;
  line-height: 0.82;
  padding: 0.16em 0.14em 0 0;
  color: var(--terra-700);
}
.mag-body h2 {
  font-size: clamp(1.55rem, 1.2rem + 1.3vw, 2.05rem);
  margin-top: var(--s-8);
  margin-bottom: var(--s-4);
  padding-top: var(--s-5);
  color: var(--ink);
  border-top: 2px solid var(--oat-300);
  position: relative;
}
.mag-body h2::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 84px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 7px, transparent 7px 13px);
}
.mag-body h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.mag-body h2:first-child::before { display: none; }
.mag-body h3 {
  font-size: 1.32rem;
  margin-top: var(--s-6);
  margin-bottom: var(--s-3);
  color: var(--indigo-900);
}
.mag-body ul,
.mag-body ol {
  margin-bottom: var(--s-5);
  padding-left: 1.3rem;
}
.mag-body li { margin-bottom: var(--s-3); }
.mag-body ul { list-style: none; padding-left: 0; }
.mag-body ul > li {
  position: relative;
  padding-left: 1.6rem;
}
.mag-body ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 11px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--terra-600) 0 4px, transparent 4px 7px);
}
.mag-body ol { padding-left: 1.45rem; }
.mag-body ol > li::marker {
  font-family: var(--font-display);
  color: var(--terra-700);
}
.mag-body strong { color: var(--ink); }
.mag-body a { font-weight: 600; }
.mag-body blockquote {
  margin: var(--s-6) 0;
  padding: var(--s-5) var(--s-5) var(--s-5) var(--s-6);
  background: var(--oat-100);
  border: 1.5px solid var(--oat-300);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-size: 1.24rem;
  line-height: 1.44;
  color: var(--indigo-900);
}
.mag-body blockquote p:last-child { margin-bottom: 0; }
.mag-table-wrap,
.mag-body table {
  width: 100%;
  margin: var(--s-6) 0;
}
.mag-body table {
  border-collapse: collapse;
  font-size: var(--t-sm);
  display: block;
  overflow-x: auto;
}
.mag-body th,
.mag-body td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1.5px dashed var(--thread);
}
.mag-body th {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--indigo-900);
  background: var(--oat-100);
  border-bottom: 2px solid var(--oat-300);
}

/* --- 19.5 Contextual read on link -------------------------------------- */

.inline-read {
  margin: var(--s-6) 0;
  padding: var(--s-4) var(--s-5);
  background: var(--indigo-050);
  border: 1.5px solid var(--indigo-100);
  border-left: 4px solid var(--primary);
  border-radius: var(--r-md);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--indigo-700);
  line-height: 1.5;
}
.inline-read a {
  color: var(--indigo-900);
  text-decoration-color: var(--terra-200);
}
.inline-read a:hover { color: var(--terra-700); }

/* --- 19.6 Call to action after the body -------------------------------- */

.mag-cta,
.mag-index-cta-inner {
  max-width: 70ch;
  margin: var(--s-8) auto 0;
  padding: var(--s-7) var(--s-6);
  background-color: var(--indigo-900);
  background-image: var(--weave-indigo);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-high);
  position: relative;
}
.mag-cta::after,
.mag-index-cta-inner::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1.5px dashed rgba(255, 255, 255, 0.28);
  border-radius: calc(var(--r-lg) - 5px);
  pointer-events: none;
}
.mag-cta > *,
.mag-index-cta-inner > * { position: relative; z-index: 1; }
.mag-cta h2,
.mag-index-cta-inner h2 {
  color: #FBF7F1;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  margin-bottom: var(--s-4);
}
.mag-cta p,
.mag-index-cta-inner p {
  color: rgba(245, 239, 229, 0.86);
  font-size: var(--t-sm);
  margin-bottom: var(--s-5);
}
.mag-cta-stamp {
  color: var(--oat-100);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
  margin-bottom: var(--s-5);
}

.mag-index-cta { padding-block: var(--s-9); }
.mag-index-cta-inner {
  max-width: 52rem;
  margin-top: 0;
  text-align: center;
}
.mag-index-cta-inner .mag-cta-stamp { margin-inline: auto; }

/* --- 19.7 Author box --------------------------------------------------- */

.mag-author {
  max-width: 70ch;
  margin: var(--s-8) auto 0;
  padding: var(--s-6);
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: var(--s-5);
  align-items: start;
  background: var(--surface);
  border: var(--seam);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-low);
  position: relative;
}
.mag-author::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1.5px dashed var(--thread);
  border-radius: calc(var(--r-lg) - 5px);
  pointer-events: none;
  opacity: 0.85;
}
.mag-author > * { position: relative; z-index: 1; }
.mag-author img {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--oat-300);
  box-shadow: var(--shadow-low);
}
.mag-author h2 {
  font-size: 1.35rem;
  margin-bottom: var(--s-3);
}
.mag-author p {
  font-size: var(--t-sm);
  color: var(--ink-80);
}
.mag-author .stamp { margin-bottom: var(--s-3); }
.mag-author-link { margin-bottom: 0; font-weight: 600; }

/* --- 19.8 Read also ---------------------------------------------------- */

.mag-related-band {
  margin-top: var(--s-9);
  padding-block: var(--s-9);
  background-color: var(--oat-100);
  background-image: var(--weave-slub);
  border-top: 2px dashed var(--thread);
}
.mag-related-stamp { margin-bottom: var(--s-4); }
.mag-related-band h2 { margin-bottom: var(--s-2); }
.mag-related-band .stitch-under { margin-bottom: var(--s-6); }
.mag-related {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: var(--s-5);
}
.mag-related-more {
  margin: var(--s-6) 0 0;
  font-weight: 600;
  font-size: var(--t-sm);
}

.mag-rel,
.mag-card {
  background: var(--surface);
  border: var(--seam);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-low);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.mag-rel:hover,
.mag-card:hover,
.mag-rel:focus-within,
.mag-card:focus-within {
  transform: translateY(-4px) rotate(-0.3deg);
  box-shadow: var(--shadow-mid);
}
.mag-rel-media,
.mag-card-media {
  display: block;
  border-bottom: 2px dashed var(--thread);
}
.mag-rel-media img,
.mag-card-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.mag-rel-body { padding: var(--s-5); }
.mag-rel-title {
  font-size: 1.16rem;
  line-height: 1.22;
  margin-bottom: var(--s-3);
}
.mag-rel-title a { text-decoration: none; color: var(--indigo-900); }
.mag-rel-title a:hover { color: var(--terra-700); text-decoration: underline; }
.mag-rel-dek {
  font-size: var(--t-xs);
  color: var(--ink-80);
  margin-bottom: var(--s-3);
}
.mag-rel-meta {
  margin: 0;
  font-size: var(--t-xs);
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* --- 19.9 Magazine index grid ------------------------------------------ */

.mag-masthead h1 { max-width: 18ch; }
.mag-masthead-stamp { margin-bottom: var(--s-4); }
.mag-masthead .mag-standfirst { max-width: 48ch; margin-bottom: var(--s-5); }
.mag-masthead-note {
  max-width: 62ch;
  font-size: var(--t-sm);
  color: var(--muted);
  margin-bottom: 0;
}

.mag-index { padding-block: var(--s-8); }
.mag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--s-6);
  align-items: start;
}
.mag-card-body { padding: var(--s-5); }
.mag-card .stamp { margin-bottom: var(--s-3); }
.mag-card-title {
  font-size: 1.28rem;
  line-height: 1.2;
  margin-bottom: var(--s-3);
}
.mag-card-title a { text-decoration: none; color: var(--indigo-900); }
.mag-card-title a:hover { color: var(--terra-700); text-decoration: underline; }
.mag-card-dek {
  font-size: var(--t-sm);
  color: var(--ink-80);
  margin-bottom: var(--s-4);
}
.mag-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem var(--s-4);
  margin: 0;
  padding-top: var(--s-3);
  border-top: 1.5px dashed var(--thread);
  font-size: var(--t-xs);
  color: var(--muted);
}
.mag-card-read {
  position: relative;
  padding-left: var(--s-4);
}
.mag-card-read::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 9px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--thread-dark) 0 3px, transparent 3px 6px);
}

.mag-card.lead {
  grid-column: 1 / -1;
  border-width: 2px;
  border-color: var(--thread);
  box-shadow: var(--shadow-mid);
}
.mag-card.lead .mag-card-body { padding: var(--s-6); }
.mag-card.lead .mag-card-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.15rem + 1.9vw, 2.5rem);
  line-height: 1.12;
}
.mag-card.lead .mag-card-dek {
  font-size: var(--t-md);
  max-width: 54ch;
}
.mag-card.lead .mag-card-media { border-bottom: 2px dashed var(--thread); }

@media (min-width: 880px) {
  .mag-card.lead {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: stretch;
  }
  .mag-card.lead .mag-card-media {
    border-bottom: 0;
    border-right: 2px dashed var(--thread);
    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);
    align-self: center;
  }
}

/* --- 19.10 Magazine cards on the home page ----------------------------- */

.mag-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: var(--s-5);
}
.mag-home-more {
  margin: var(--s-7) 0 0;
  font-size: var(--t-sm);
  font-weight: 600;
}

/* --- 19.11 Magazine lists on the author and site map pages ------------- */

.mag-list { list-style: none; padding: 0; margin: 0; }
.mag-list li {
  margin-bottom: var(--s-4);
  padding-left: var(--s-5);
  position: relative;
  font-size: var(--t-sm);
}
.mag-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 12px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--terra-600) 0 4px, transparent 4px 7px);
}
.mag-list a { font-weight: 700; text-decoration: none; }
.mag-list a:hover { text-decoration: underline; }
.mag-list span { display: block; color: var(--muted); font-size: var(--t-xs); }

/* --- 19.12 Magazine at small widths ------------------------------------ */

@media (max-width: 720px) {
  .mag-figure .photo-mount { transform: none; }
  .mag-body { font-size: var(--t-base); }
  .mag-body > p:first-of-type::first-letter { font-size: 2.8rem; }
  .mag-cta,
  .mag-index-cta-inner { padding: var(--s-6) var(--s-5); }
  .mag-cta .btn,
  .mag-index-cta-inner .btn { width: 100%; }
  .mag-author {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    padding: var(--s-5);
  }
  .mag-related { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .mag-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
  .mag-home-grid { grid-template-columns: minmax(0, 1fr); }
  .mag-head, .mag-masthead { padding-block: var(--s-7) var(--s-6); }
  .mag-body h2 { margin-top: var(--s-7); }
  .mag-card-body,
  .mag-card.lead .mag-card-body { padding: var(--s-5) var(--s-4); }
  .mag-byline { gap: 0.35rem var(--s-3); }
  .mag-byline-item { padding-left: var(--s-3); }
  .mag-author img { width: 88px; height: 88px; }
  .mag-figure figcaption { padding-left: var(--s-3); }
}

.map-card--wide { grid-column: 1 / -1; }
.map-card--wide .mag-list { columns: 2; column-gap: var(--s-7); }
.map-card--wide .mag-list li { break-inside: avoid; }
.mag-articles { margin-top: var(--s-7); }
.mag-articles > p { font-size: var(--t-sm); color: var(--ink-80); max-width: 68ch; }

@media (max-width: 720px) {
  .map-card--wide .mag-list { 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%; }
}
