/* ==========================================================================
   StallDeck market canvas design system
   Awning stripe cream and market red over produce green.
   Hand painted market sign feel, woven canvas texture, stall map tiles.
   ========================================================================== */

:root {
  /* core palette from the brand book */
  --bg: #FBF7EF;
  --surface: #FFFFFF;
  --ink: #241E17;
  --primary: #B03A2E;
  --accent: #5E8C3A;
  --muted: #6F675C;

  /* derived tints and shades */
  --primary-dark: #8A2B21;
  --primary-deep: #6B2019;
  --primary-tint: #F3DCD8;
  --primary-wash: #FAECE8;
  --accent-dark: #46692A;
  --accent-tint: #DFEBD1;
  --accent-wash: #EFF5E7;
  --ink-soft: #4A4137;
  --ink-line: rgba(36, 30, 23, 0.16);
  --ink-line-strong: rgba(36, 30, 23, 0.34);
  --canvas: #F4EDE0;
  --canvas-deep: #EBE1CE;
  --gold: #C88A2C;

  /* typography */
  --font-display: "Alegreya", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Alegreya Sans", "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  --fs-xs: 0.78rem;
  --fs-sm: 0.9rem;
  --fs-base: 1.06rem;
  --fs-md: 1.18rem;
  --fs-lg: 1.42rem;
  --fs-xl: 1.85rem;
  --fs-2xl: 2.35rem;
  --fs-3xl: 3.1rem;
  --fs-4xl: 4rem;
  --lh-tight: 1.08;
  --lh-snug: 1.28;
  --lh-body: 1.62;

  /* spacing scale */
  --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.75rem;
  --s-9: 5rem;
  --s-10: 7rem;

  /* radii, borders, shadows */
  --r-sm: 3px;
  --r-md: 6px;
  --r-lg: 12px;
  --r-pill: 999px;
  --bd: 2px solid var(--ink);
  --bd-thin: 1px solid var(--ink-line);
  --sh-sign: 6px 6px 0 rgba(36, 30, 23, 0.9);
  --sh-sign-sm: 4px 4px 0 rgba(36, 30, 23, 0.85);
  --sh-soft: 0 14px 34px rgba(36, 30, 23, 0.11);
  --sh-lift: 0 22px 46px rgba(36, 30, 23, 0.17);

  --stripe: repeating-linear-gradient(
      90deg,
      var(--primary) 0 22px,
      #FBF7EF 22px 44px);
  --stripe-green: repeating-linear-gradient(
      90deg,
      var(--accent) 0 22px,
      #FBF7EF 22px 44px);
  --weave:
      repeating-linear-gradient(0deg, rgba(36, 30, 23, 0.045) 0 1px, transparent 1px 6px),
      repeating-linear-gradient(90deg, rgba(36, 30, 23, 0.045) 0 1px, transparent 1px 6px);

  --wrap: 1180px;
  --gutter: clamp(1.1rem, 4vw, 3rem);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: var(--weave);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-synthesis-weight: none;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: var(--lh-tight); margin: 0 0 var(--s-4); font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 5.6vw, var(--fs-4xl)); }
h2 { font-size: clamp(1.85rem, 3.9vw, var(--fs-3xl)); }
h3 { font-size: var(--fs-lg); }
p { margin: 0 0 var(--s-4); }
a { color: var(--primary-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-deep); }
ul, ol { margin: 0 0 var(--s-4); padding-left: 1.15rem; }
li { margin-bottom: var(--s-2); }
blockquote { margin: 0; }
hr { border: 0; height: 10px; background: var(--stripe); background-size: 44px 10px; margin: var(--s-8) 0; }
::selection { background: var(--primary); color: #FFF6EE; }

/* ---------- utility ---------- */
.wrap { width: min(100% - (2 * var(--gutter)), var(--wrap)); margin-inline: auto; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 200;
  background: var(--ink); color: var(--bg); padding: var(--s-3) var(--s-5);
  font-weight: 700; border-radius: 0 0 var(--r-md) var(--r-md); transition: top .18s ease;
}
.skip-link:focus { top: 0; color: var(--bg); }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
}
.eyebrow::before {
  content: "";
  width: 30px; height: 8px;
  background: var(--stripe);
  background-size: 12px 8px;
  border: 1px solid var(--ink);
  border-radius: 1px;
}
.lede { font-size: var(--fs-md); color: var(--ink-soft); max-width: 62ch; }
.center { text-align: center; }
.center .eyebrow, .center .lede { margin-inline: auto; }
.center .lede { text-align: center; }

/* ---------- painted sign underline ---------- */
.painted { position: relative; display: inline-block; }
.painted::after {
  content: "";
  position: absolute; left: -2px; right: -2px; bottom: 0.06em; height: 0.3em; z-index: -1;
  background: var(--accent-tint);
  transform: skewX(-11deg) rotate(-0.5deg);
  border-radius: 2px 8px 3px 10px;
}
.painted--red::after { background: var(--primary-tint); }

/* ---------- awning bands ---------- */
.awning-band {
  height: 14px;
  background: var(--stripe);
  background-size: 44px 14px;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.awning-band--green { background: var(--stripe-green); background-size: 44px 14px; }
.scallop {
  position: relative;
  height: 26px;
  background: var(--stripe);
  background-size: 44px 26px;
  border-top: 2px solid var(--ink);
  -webkit-mask-image: radial-gradient(circle 13px at 13px 0, transparent 0 12.4px, #000 12.6px);
  mask-image: radial-gradient(circle 13px at 13px 0, transparent 0 12.4px, #000 12.6px);
  -webkit-mask-size: 26px 26px;
  mask-size: 26px 26px;
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
  -webkit-mask-position: bottom;
  mask-position: bottom;
  transform: scaleY(-1);
}

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--primary);
  --btn-fg: #FFF7EE;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 0.82rem 1.55rem;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 700;
  letter-spacing: 0.015em;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sign-sm);
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.btn::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg,
      rgba(255, 247, 238, 0.22) 0 14px,
      rgba(255, 247, 238, 0) 14px 28px);
  transform: translateX(-115%);
  transition: transform .5s cubic-bezier(.22, .8, .3, 1);
  pointer-events: none;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(36, 30, 23, 0.9); }
.btn:hover::after { transform: translateX(0); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(36, 30, 23, 0.9); }
/* The label keeps its own --btn-fg in every state, so it always reads
   against the button fill instead of inheriting a link colour. */
.btn:link, .btn:visited, .btn:hover, .btn:focus, .btn:focus-visible, .btn:active { color: var(--btn-fg); }
.btn--ghost { --btn-bg: var(--surface); --btn-fg: var(--ink); }
.btn--green { --btn-bg: var(--accent-dark); --btn-fg: #FBFDF6; }
.btn--sm { padding: 0.55rem 1.05rem; font-size: var(--fs-sm); }
.btn--block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 2px solid var(--ink);
  transition: box-shadow .2s ease, background-color .2s ease;
}
.site-header.is-stuck { box-shadow: 0 10px 26px rgba(36, 30, 23, 0.14); background: #FEFBF5; }
.site-header .awning-band { border-top: 0; border-bottom: 0; height: 9px; background-size: 36px 9px; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding-block: var(--s-3);
}
.wordmark { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.wordmark svg { width: 38px; height: 38px; flex: none; }
.wordmark strong {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1;
}
.wordmark-text { display: block; }
.wordmark-text > span { display: block; font-size: 0.63rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 46px; height: 42px; background: var(--surface);
  border: 2px solid var(--ink); border-radius: var(--r-md); box-shadow: var(--sh-sign-sm); cursor: pointer;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); box-shadow: 0 -6px 0 var(--ink), 0 6px 0 var(--ink); }
.site-nav { display: flex; align-items: center; gap: var(--s-5); }
.site-nav ul { display: flex; gap: var(--s-5); list-style: none; margin: 0; padding: 0; }
/* Scoped to the nav list: the header CTA sits beside this list, not inside it,
   and must keep the button label colour rather than a nav link colour. */
.site-nav ul a {
  font-weight: 600; color: var(--ink); text-decoration: none; padding-block: 4px;
  border-bottom: 2px solid transparent;
}
.site-nav ul a:hover { border-bottom-color: var(--primary); color: var(--primary-dark); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  background:
      radial-gradient(120% 80% at 88% 6%, var(--primary-wash) 0%, transparent 58%),
      linear-gradient(180deg, var(--canvas) 0%, var(--bg) 74%);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: var(--weave);
  opacity: .9; pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid; gap: var(--s-8);
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  padding-block: clamp(2.75rem, 7vw, 5.25rem);
}
/* Home page hero heading only. Same face and weight as the global h1,
   stepped down from the 4rem cap to the --fs-3xl step (about a fifth
   smaller at desktop) with the same fluid crossover point. */
.hero h1 { max-width: 15ch; font-size: clamp(1.95rem, 4.4vw, var(--fs-3xl)); }
.hero .lede { font-size: clamp(1.1rem, 1.9vw, 1.32rem); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s-4); margin: var(--s-6) 0 var(--s-6); }
.trust-strip {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  padding: var(--s-4) var(--s-5);
  background: var(--surface);
  border: var(--bd); border-radius: var(--r-md);
  box-shadow: var(--sh-sign-sm);
  list-style: none; margin: 0;
}
.trust-strip li {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft); margin: 0;
}
.trust-strip svg { width: 18px; height: 18px; flex: none; color: var(--accent-dark); }
.hero-figure { position: relative; }
.hero-figure img {
  width: 100%; border: var(--bd); border-radius: var(--r-lg);
  box-shadow: var(--sh-sign);
  filter: saturate(1.04) contrast(1.02);
}
.hero-figure::before {
  content: "";
  position: absolute; left: -14px; right: 22px; top: -20px; height: 22px;
  background: var(--stripe); background-size: 44px 22px;
  border: 2px solid var(--ink); border-radius: 3px;
  transform: rotate(-1.4deg);
  z-index: 2;
}
.hero-tag {
  position: absolute; right: -10px; bottom: -22px; z-index: 3;
  background: var(--accent-dark); color: #FBFDF6;
  border: var(--bd); border-radius: var(--r-md);
  box-shadow: var(--sh-sign-sm);
  padding: var(--s-3) var(--s-4);
  transform: rotate(2deg);
  max-width: 15rem;
}
.hero-tag strong { font-family: var(--font-display); font-size: 1.5rem; display: block; line-height: 1; }
.hero-tag span { font-size: var(--fs-xs); letter-spacing: 0.09em; text-transform: uppercase; font-weight: 700; }

/* ---------- generic section ---------- */
.section { padding-block: clamp(3rem, 7vw, var(--s-10)); }
.section--canvas { background: var(--canvas); border-block: 2px solid var(--ink); }
.section--ink {
  background:
      radial-gradient(90% 120% at 12% 0%, #33291F 0%, transparent 60%),
      var(--ink);
  color: #F6EFE2;
  border-block: 2px solid var(--ink);
}
.section--ink h2, .section--ink h3 { color: #FFF7EA; }
.section--ink .lede, .section--ink p { color: #DCD1BF; }
.section--ink .eyebrow { color: #EDBFA8; }
.section-head { max-width: 66ch; margin-bottom: var(--s-7); }
.section-head.center { margin-inline: auto; }

/* ---------- card grids ---------- */
.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)); }

.card {
  position: relative;
  background: var(--surface);
  border: var(--bd);
  border-radius: var(--r-md);
  padding: var(--s-5);
  box-shadow: var(--sh-sign-sm);
}
.card h3 { margin-bottom: var(--s-2); }
.card p { margin-bottom: 0; color: var(--ink-soft); }
.card--tack::before {
  content: "";
  position: absolute; top: 10px; right: 12px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--ink);
}

/* problem cards, price of the pain */
.pain { display: flex; flex-direction: column; gap: var(--s-3); }
.pain .cost {
  align-self: flex-start;
  font-family: var(--font-display);
  font-weight: 800; font-size: var(--fs-md);
  background: var(--primary-wash);
  border: 2px solid var(--primary);
  border-radius: var(--r-sm);
  padding: 0.15rem 0.6rem;
  color: var(--primary-deep);
}

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; gap: var(--s-5); }
.step {
  position: relative;
  padding-left: 4.4rem;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 3.1rem; height: 3.1rem;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.65rem; font-weight: 800;
  color: #FFF7EE; background: var(--primary);
  border: var(--bd); border-radius: 50%;
  box-shadow: var(--sh-sign-sm);
}
.step h3 { margin-bottom: var(--s-2); }
.step p { color: var(--ink-soft); margin-bottom: 0; }
.solution-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr); gap: var(--s-8); align-items: start; }
.solution-figure img { border: var(--bd); border-radius: var(--r-lg); box-shadow: var(--sh-sign); }
.solution-figure figcaption {
  margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--muted); font-style: italic;
}

/* ---------- stall map motif ---------- */
.stallmap {
  --tile: 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
  padding: var(--s-4);
  background: var(--canvas-deep);
  border: var(--bd);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sign-sm);
}
.stallmap i {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--ink-line-strong);
  border-radius: 2px;
  background: #FFFDF7;
  position: relative;
  overflow: hidden;
}
.stallmap i::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .45s cubic-bezier(.2, .75, .3, 1);
  transition-delay: calc(var(--i) * 38ms);
}
.stallmap i.is-open::after { background: var(--primary-tint); }
.stallmap i.is-hold::after { background: var(--gold); }
.is-revealed .stallmap i::after { transform: scaleY(1); }
.stallmap-legend { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-4); list-style: none; padding: 0; font-size: var(--fs-sm); }
.stallmap-legend li { display: flex; align-items: center; gap: 0.45rem; margin: 0; }
.swatch { width: 15px; height: 15px; border: 1px solid var(--ink); border-radius: 2px; display: inline-block; }
.swatch--filled { background: var(--accent); }
.swatch--open { background: var(--primary-tint); }
.swatch--hold { background: var(--gold); }

/* ---------- features ---------- */
.feature {
  background: var(--surface);
  border: var(--bd);
  border-radius: var(--r-md);
  padding: var(--s-5);
  box-shadow: var(--sh-sign-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.feature:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 rgba(36, 30, 23, 0.88); }
.feature .icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  background: var(--accent-wash);
  border: 2px solid var(--ink);
  border-radius: var(--r-sm);
  margin-bottom: var(--s-4);
  box-shadow: 3px 3px 0 rgba(36, 30, 23, 0.85);
}
.feature .icon svg { width: 30px; height: 30px; color: var(--primary-dark); }
.feature h3 { margin-bottom: var(--s-2); font-size: var(--fs-md); }
.feature p { margin-bottom: 0; color: var(--ink-soft); font-size: var(--fs-sm); line-height: 1.58; }

/* ---------- outcomes ---------- */
.outcome {
  background: rgba(255, 247, 234, 0.06);
  border: 2px solid rgba(246, 239, 226, 0.5);
  border-radius: var(--r-md);
  padding: var(--s-5);
}
.outcome .figure {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 3.5rem);
  font-weight: 800; line-height: 1;
  color: #F2C57C;
  display: block; margin-bottom: var(--s-2);
}
.outcome h3 { font-size: var(--fs-md); margin-bottom: var(--s-2); }
.outcome p { margin-bottom: 0; font-size: var(--fs-sm); }

/* ---------- testimonials ---------- */
.testimonial {
  position: relative;
  background: var(--surface);
  border: var(--bd);
  border-radius: var(--r-md);
  padding: var(--s-6) var(--s-5) var(--s-5);
  box-shadow: var(--sh-sign-sm);
}
.testimonial::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 10px;
  background: var(--stripe); background-size: 30px 10px;
  border-bottom: 2px solid var(--ink);
  border-radius: 4px 4px 0 0;
}
.testimonial blockquote p { font-family: var(--font-display); font-size: var(--fs-md); line-height: 1.45; }
.testimonial figcaption { border-top: var(--bd-thin); padding-top: var(--s-3); font-size: var(--fs-sm); color: var(--muted); }
.testimonial figcaption strong { display: block; color: var(--ink); font-size: var(--fs-base); }
.results-strip {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0; margin-top: var(--s-7);
  background: var(--surface);
  border: var(--bd); border-radius: var(--r-md);
  box-shadow: var(--sh-sign-sm);
  overflow: hidden;
}
.results-strip div { padding: var(--s-5); text-align: center; border-right: var(--bd-thin); }
.results-strip div:last-child { border-right: 0; }
.results-strip b { display: block; font-family: var(--font-display); font-size: var(--fs-2xl); line-height: 1; color: var(--primary-dark); }
.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: start; }
.tier {
  position: relative;
  background: var(--surface);
  border: var(--bd);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sign-sm);
  padding: var(--s-6) var(--s-5) var(--s-5);
}
.tier::before {
  content: "";
  position: absolute; left: 12px; right: 12px; top: -1px; height: 12px;
  background: radial-gradient(circle 6px at 6px 0, transparent 0 5.4px, var(--ink) 5.6px 6px, transparent 6.1px);
  background-size: 12px 12px; background-repeat: repeat-x;
  opacity: .35;
}
.tier--featured {
  border-width: 3px;
  border-color: var(--primary);
  box-shadow: 8px 8px 0 rgba(176, 58, 46, 0.85);
  transform: translateY(-8px);
}
.tier .flag {
  position: absolute; top: -17px; left: 50%; transform: translateX(-50%) rotate(-1.5deg);
  background: var(--primary); color: #FFF7EE;
  border: 2px solid var(--ink); border-radius: var(--r-sm);
  padding: 0.2rem 0.8rem;
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  white-space: nowrap;
}
.tier h3 { font-size: var(--fs-xl); margin-bottom: var(--s-1); }
.tier .who { font-size: var(--fs-sm); color: var(--muted); margin-bottom: var(--s-4); }
.tier .amount { font-family: var(--font-display); font-size: 3.2rem; font-weight: 800; line-height: 1; color: var(--ink); }
.tier .per { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.tier ul { list-style: none; padding: 0; margin: var(--s-5) 0; }
.tier li { position: relative; padding-left: 1.7rem; font-size: var(--fs-sm); color: var(--ink-soft); }
.tier li::before {
  content: "";
  position: absolute; left: 0; top: 0.42em;
  width: 11px; height: 11px;
  background: var(--accent);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  transform: rotate(-8deg);
}
.billing-note {
  margin-top: var(--s-6);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--muted);
  border-top: var(--bd-thin);
  padding-top: var(--s-4);
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 860px; margin-inline: auto; border: var(--bd); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--sh-sign-sm); overflow: hidden; }
.faq-item { border-bottom: var(--bd-thin); }
.faq-item:last-child { border-bottom: 0; }
.faq-q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  background: transparent; border: 0;
  font-family: var(--font-display); font-size: var(--fs-md); font-weight: 700; text-align: left;
  color: var(--ink); cursor: pointer;
}
.faq-q:hover { background: var(--primary-wash); }
.faq-q .chev {
  position: relative;
  flex: none; width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 2px solid var(--ink); border-radius: var(--r-sm);
  background: var(--canvas);
  transition: transform .22s ease, background-color .22s ease;
}
.faq-q .chev::before { content: ""; width: 10px; height: 2px; background: var(--ink); position: absolute; }
.faq-q .chev::after { content: ""; width: 2px; height: 10px; background: var(--ink); transition: opacity .22s ease; }
.faq-q[aria-expanded="true"] .chev { background: var(--primary); transform: rotate(90deg); }
.faq-q[aria-expanded="true"] .chev::before, .faq-q[aria-expanded="true"] .chev::after { background: #FFF7EE; }
.faq-q[aria-expanded="true"] .chev::after { opacity: 0; }
.faq-a { padding: 0 var(--s-5) var(--s-5); color: var(--ink-soft); font-size: var(--fs-sm); line-height: 1.66; }
.faq-a[hidden] { display: none; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: var(--s-8); align-items: start; }
.form-shell {
  background: var(--surface);
  border: var(--bd); border-radius: var(--r-md);
  box-shadow: var(--sh-sign);
  padding: var(--s-6);
}
.field { margin-bottom: var(--s-4); }
.field label { display: block; font-weight: 700; font-size: var(--fs-sm); margin-bottom: 0.3rem; }
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--ink);
  background: #FFFDF8;
  border: 2px solid var(--ink-line-strong);
  border-radius: var(--r-sm);
  padding: 0.62rem 0.7rem;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-tint); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--primary); background: var(--primary-wash); }
.field .err { display: block; color: var(--primary-deep); font-size: var(--fs-xs); font-weight: 700; margin-top: 0.25rem; min-height: 1em; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.consent { display: flex; gap: 0.7rem; align-items: flex-start; font-size: var(--fs-sm); }
.consent input { width: 20px; height: 20px; flex: none; margin-top: 3px; accent-color: var(--primary); }
.form-note { font-size: var(--fs-sm); color: var(--muted); margin-top: var(--s-4); }
.contact-aside ul { list-style: none; padding: 0; }
.contact-aside li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: var(--fs-sm); color: var(--ink-soft); }
.contact-aside li svg { width: 18px; height: 18px; flex: none; margin-top: 4px; color: var(--accent-dark); }

/* ---------- byline ---------- */
.byline {
  display: flex; gap: var(--s-4); align-items: center;
  background: var(--canvas);
  border: var(--bd); border-radius: var(--r-md);
  padding: var(--s-4) var(--s-5);
  box-shadow: var(--sh-sign-sm);
  margin-top: var(--s-8);
  font-size: var(--fs-sm);
}
.byline .mark { width: 44px; height: 44px; flex: none; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #E7DDCC; border-top: 2px solid var(--ink); }
.site-footer a { color: #E7DDCC; text-decoration: none; }
.site-footer a:hover { color: #F2C57C; text-decoration: underline; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: var(--s-6);
  padding-block: var(--s-8);
}
.footer-grid h2 { font-size: var(--fs-sm); letter-spacing: 0.18em; text-transform: uppercase; color: #F2C57C; margin-bottom: var(--s-4); font-family: var(--font-body); font-weight: 800; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.55rem; font-size: var(--fs-sm); }
.footer-brand p { font-size: var(--fs-sm); color: #C6BBA8; max-width: 34ch; }
.footer-brand .wordmark strong { color: #FFF7EA; }
.footer-brand .wordmark-text > span { color: #A99C88; }
.social { display: flex; gap: 0.6rem; margin-top: var(--s-4); }
.social a {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 2px solid rgba(231, 221, 204, 0.45); border-radius: var(--r-sm);
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}
.social a:hover { background: var(--primary); border-color: #F2C57C; transform: translateY(-2px); }
.social svg { width: 18px; height: 18px; }
.footer-base {
  border-top: 1px solid rgba(231, 221, 204, 0.22);
  padding-block: var(--s-4);
  display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between;
  font-size: var(--fs-xs); color: #B4A894;
}

/* ---------- legal / long form pages ---------- */
.page-hero {
  background: linear-gradient(180deg, var(--canvas) 0%, var(--bg) 100%);
  border-bottom: 2px solid var(--ink);
  padding-block: clamp(2.4rem, 5vw, 4rem);
}
.page-hero .crumbs { font-size: var(--fs-sm); color: var(--muted); margin-bottom: var(--s-3); }
.page-hero .crumbs a { color: var(--muted); }
.prose { max-width: 74ch; }
.prose h2 { font-size: var(--fs-xl); margin-top: var(--s-7); }
.prose h3 { font-size: var(--fs-md); margin-top: var(--s-5); }
.prose ul { padding-left: 1.25rem; }
.prose li { color: var(--ink-soft); }
.prose p { color: var(--ink-soft); }
.factbox {
  background: var(--surface); border: var(--bd); border-radius: var(--r-md);
  box-shadow: var(--sh-sign-sm); padding: var(--s-5); margin: var(--s-5) 0;
}
.factbox dl { display: grid; grid-template-columns: minmax(9rem, 15rem) 1fr; gap: 0.55rem var(--s-4); margin: 0; font-size: var(--fs-sm); }
.factbox dt { font-weight: 700; }
.factbox dd { margin: 0; color: var(--ink-soft); }
.map-group { margin-bottom: var(--s-7); }
.map-group ul { list-style: none; padding: 0; }
.map-group li { padding: var(--s-3) 0; border-bottom: var(--bd-thin); }
.map-group li a { font-weight: 700; }
.map-group li span { display: block; color: var(--muted); font-size: var(--fs-sm); }
.author-layout { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.author-card {
  background: var(--surface); border: var(--bd); border-radius: var(--r-md);
  box-shadow: var(--sh-sign); padding: var(--s-4); position: sticky; top: 120px;
}
.author-card img { border: 2px solid var(--ink); border-radius: var(--r-sm); width: 100%; }
.author-card ul { list-style: none; padding: 0; margin: var(--s-4) 0 0; font-size: var(--fs-sm); }
.big-404 { font-family: var(--font-display); font-size: clamp(5rem, 18vw, 11rem); font-weight: 800; line-height: 0.85; color: var(--primary); }

/* ---------- reveal motion ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.22, .8, .3, 1); }
.reveal.is-revealed { opacity: 1; transform: none; }
.reveal--d1 { transition-delay: .08s; }
.reveal--d2 { transition-delay: .16s; }
.reveal--d3 { transition-delay: .24s; }

/* awning stripe wipe used on the section dividers */
.awning-band.wipe { background: var(--canvas-deep); }
.awning-band.wipe::before { background: var(--stripe); background-size: 44px 100%; }
.awning-band--green.wipe::before { background: var(--stripe-green); background-size: 44px 100%; }

/* awning stripe wipe primitive */
.wipe { position: relative; overflow: hidden; }
.wipe::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 100%;
  background: var(--stripe); background-size: 44px 100%;
  transform: scaleX(0); transform-origin: left;
  transition: transform .8s cubic-bezier(.22, .8, .3, 1);
}
.wipe.is-revealed::before { transform: scaleX(1); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid, .solution-grid, .contact-grid, .author-layout { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-grid { grid-template-columns: 1fr; }
  .tier--featured { transform: none; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .author-card { position: static; }
  .hero-figure::before { left: 0; right: 30%; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: var(--s-4);
    background: var(--bg);
    border-bottom: 2px solid var(--ink);
    padding: var(--s-5) var(--gutter);
    box-shadow: 0 18px 32px rgba(36, 30, 23, 0.2);
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: var(--s-3); }
  .header-inner { position: relative; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .results-strip { grid-template-columns: 1fr; }
  .results-strip div { border-right: 0; border-bottom: var(--bd-thin); }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stallmap { grid-template-columns: repeat(6, 1fr); }
  .factbox dl { grid-template-columns: 1fr; }
  .factbox dt { margin-top: var(--s-2); }
  .hero-tag { position: static; margin-top: var(--s-5); transform: none; max-width: none; }
}
@media (max-width: 380px) {
  .wordmark strong { font-size: 1.35rem; }
  .btn { width: 100%; }
  .hero-cta { flex-direction: column; align-items: stretch; }
}

@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; }
  .stallmap i::after { transform: scaleY(1); }
  .wipe::before { transform: scaleX(1); }
}

@media print {
  .site-header, .site-footer, .btn, .form-shell { display: none; }
  body { background: #FFFFFF; }
}

/* ==========================================================================
   MARKET BELL, the magazine
   Built from the tokens above: awning stripe, painted sign borders, hard
   sign shadows, Alegreya over Alegreya Sans. No new colors, no new fonts.
   ========================================================================== */

/* ---------- shared magazine chrome ---------- */
.mag-crumbs { margin-bottom: var(--s-4); }
.mag-crumbs ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.55rem;
  list-style: none; margin: 0; padding: 0;
  font-size: var(--fs-sm); color: var(--muted);
}
.mag-crumbs li { margin: 0; display: flex; align-items: center; gap: 0.55rem; }
.mag-crumbs li + li::before {
  content: "";
  width: 14px; height: 6px; flex: none;
  background: var(--stripe); background-size: 7px 6px;
  border: 1px solid var(--ink-line-strong); border-radius: 1px;
}
.mag-crumbs a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--ink-line); }
.mag-crumbs a:hover { color: var(--primary-dark); border-bottom-color: var(--primary); }
.mag-crumbs [aria-current="page"] { color: var(--ink); font-weight: 700; }

/* ---------- magazine masthead ---------- */
.mag-masthead {
  position: relative;
  background:
      radial-gradient(120% 90% at 85% 0%, var(--primary-wash) 0%, transparent 60%),
      linear-gradient(180deg, var(--canvas) 0%, var(--bg) 100%);
  border-bottom: 2px solid var(--ink);
  padding-block: clamp(2rem, 5vw, 4.25rem);
}
.mag-masthead::before {
  content: "";
  position: absolute; inset: 0;
  background-image: var(--weave);
  pointer-events: none;
}
.mag-masthead > .wrap { position: relative; }
.mag-masthead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: var(--s-7);
  align-items: end;
}
.mag-masthead h1 {
  font-size: clamp(3rem, 8vw, 5.4rem);
  letter-spacing: -0.03em;
  margin-bottom: var(--s-3);
}
.mag-standfirst {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, var(--fs-lg));
  line-height: 1.42;
  color: var(--ink-soft);
  max-width: 34ch;
  margin-bottom: 0;
}
.mag-masthead-note {
  background: var(--surface);
  border: var(--bd);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sign-sm);
  padding: var(--s-5);
  font-size: var(--fs-sm);
  color: var(--ink-soft);
}
.mag-masthead-note p { margin-bottom: 0; }
.mag-masthead-note strong { color: var(--ink); }

/* ---------- index grid and cards ---------- */
.mag-index { padding-block: clamp(2.5rem, 6vw, var(--s-9)); }
.mag-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-6);
  align-items: start;
}
.mag-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: var(--bd);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sign-sm);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.mag-card:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 rgba(36, 30, 23, 0.88); }
.mag-card-media { display: block; border-bottom: 2px solid var(--ink); background: var(--canvas-deep); }
.mag-card-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; filter: saturate(1.04) contrast(1.02); }
.mag-card-body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); flex: 1 1 auto; }
.mag-card-angle {
  align-self: flex-start;
  margin: 0;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-deep);
  background: var(--primary-wash);
  border: 2px solid var(--primary);
  border-radius: var(--r-sm);
  padding: 0.1rem 0.55rem;
}
.mag-card-title { font-size: var(--fs-lg); margin: 0; letter-spacing: -0.015em; overflow-wrap: break-word; }
.mag-card-title a { color: var(--ink); text-decoration: none; }
.mag-card-title a:hover { color: var(--primary-dark); text-decoration: underline; text-decoration-thickness: 2px; }
.mag-card-dek { margin: 0; color: var(--ink-soft); font-size: var(--fs-sm); line-height: 1.6; }
.mag-card-meta {
  margin: auto 0 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem;
  padding-top: var(--s-3);
  border-top: var(--bd-thin);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
.mag-card-meta span[aria-hidden="true"] { color: var(--accent-dark); }

/* the lead card runs the full width of the grid */
.mag-card.lead {
  grid-column: 1 / -1;
  flex-direction: row;
  border-width: 3px;
  box-shadow: var(--sh-sign);
}
.mag-card.lead .mag-card-media {
  flex: 1 1 56%;
  display: flex;
  border-bottom: 0;
  border-right: 2px solid var(--ink);
}
.mag-card.lead .mag-card-media img { height: 100%; aspect-ratio: auto; min-height: 320px; }
.mag-card.lead .mag-card-body { flex: 1 1 44%; padding: var(--s-6); gap: var(--s-4); justify-content: center; }
.mag-card.lead .mag-card-title { font-size: clamp(1.75rem, 3vw, var(--fs-2xl)); }
.mag-card.lead .mag-card-dek { font-size: var(--fs-base); }
.mag-card.lead .mag-card-angle { background: var(--accent-wash); border-color: var(--accent-dark); color: var(--accent-dark); }
.mag-card.lead:hover { box-shadow: 9px 9px 0 rgba(36, 30, 23, 0.9); }

/* ---------- article header ---------- */
.article-head {
  position: relative;
  background: linear-gradient(180deg, var(--canvas) 0%, var(--bg) 100%);
  border-bottom: 2px solid var(--ink);
  padding-block: clamp(1.75rem, 4.5vw, 3.5rem);
}
.article-head::before {
  content: "";
  position: absolute; inset: 0;
  background-image: var(--weave);
  pointer-events: none;
}
.article-head > .wrap { position: relative; }
.article-measure { width: min(100%, 62ch); margin-inline: auto; font-size: 1.09rem; }
.article-head h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
  letter-spacing: -0.025em;
  margin-bottom: var(--s-4);
}
.article-standfirst {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.1vw, var(--fs-lg));
  font-style: italic;
  line-height: 1.45;
  color: var(--ink-soft);
  margin-bottom: var(--s-5);
}
.article-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-4);
  background: var(--surface);
  border: var(--bd);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sign-sm);
  padding: var(--s-3) var(--s-4);
}
.article-byline-mark { width: 38px; height: 38px; flex: none; }
.article-byline-who { margin: 0; font-weight: 700; font-size: var(--fs-base); }
.article-byline-who a { color: var(--primary-dark); font-weight: 800; }
.article-byline-meta {
  display: flex; flex-wrap: wrap; gap: 0.35rem var(--s-4);
  list-style: none; margin: 0; padding: 0;
  margin-left: auto;
  font-size: var(--fs-xs);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
.article-byline-meta li { margin: 0; display: flex; align-items: center; gap: 0.4rem; }
.article-byline-meta li + li::before {
  content: "";
  width: 9px; height: 9px; flex: none;
  background: var(--accent);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  transform: rotate(-8deg);
}

/* ---------- featured photograph ---------- */
.article-figure { margin: 0; padding-block: var(--s-7) 0; }
.article-figure img {
  width: 100%;
  border: var(--bd);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sign);
  filter: saturate(1.04) contrast(1.02);
}
.article-figure figcaption {
  margin-top: var(--s-4);
  font-size: var(--fs-sm);
  font-style: italic;
  color: var(--muted);
  text-align: center;
}

/* ---------- article body typography ---------- */
.article-shell { padding-block: clamp(2rem, 5vw, var(--s-8)); }
.article-body {
  line-height: 1.72;
  color: var(--ink-soft);
  overflow-wrap: break-word;
}
.article-body > h2 {
  position: relative;
  font-size: clamp(1.6rem, 3.2vw, var(--fs-xl));
  color: var(--ink);
  margin-top: var(--s-8);
  margin-bottom: var(--s-4);
  padding-top: var(--s-4);
}
.article-body > h2::before {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 72px; height: 9px;
  background: var(--stripe); background-size: 18px 9px;
  border: 1px solid var(--ink);
  border-radius: 1px;
}
.article-body > h2:first-child { margin-top: 0; }
.article-body h3 {
  font-size: var(--fs-md);
  color: var(--ink);
  margin-top: var(--s-6);
  margin-bottom: var(--s-3);
}
.article-body p { margin-bottom: var(--s-5); }
.article-body strong { color: var(--ink); font-weight: 700; }
.article-body a { font-weight: 600; }
.article-body ul, .article-body ol { margin: 0 0 var(--s-5); padding-left: 1.3rem; }
.article-body li { margin-bottom: var(--s-3); }
.article-body ul { list-style: none; padding-left: 0; }
.article-body ul > li { position: relative; padding-left: 1.75rem; }
.article-body ul > li::before {
  content: "";
  position: absolute; left: 0; top: 0.55em;
  width: 11px; height: 11px;
  background: var(--accent);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  transform: rotate(-8deg);
}
.article-body blockquote {
  margin: var(--s-6) 0;
  padding: var(--s-4) var(--s-5);
  background: var(--canvas);
  border: 2px solid var(--ink);
  border-left-width: 9px;
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--ink);
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--s-6) 0;
  font-size: var(--fs-sm);
  background: var(--surface);
  border: var(--bd);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.article-body th, .article-body td { padding: var(--s-3) var(--s-4); text-align: left; border-bottom: var(--bd-thin); }
.article-body th { background: var(--canvas-deep); font-family: var(--font-body); font-weight: 800; color: var(--ink); }
.article-body tr:last-child td { border-bottom: 0; }

/* contextual link the assembler drops between sections */
.inline-read {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: var(--s-6) 0;
  padding: var(--s-3) var(--s-4);
  background: var(--accent-wash);
  border: 2px solid var(--ink);
  border-left-width: 9px;
  border-radius: var(--r-sm);
  box-shadow: var(--sh-sign-sm);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.01em;
}
.inline-read a { color: var(--primary-deep); font-weight: 800; }
.inline-read a:hover { color: var(--primary); }

/* ---------- call to action after the body ---------- */
.article-cta {
  position: relative;
  width: min(100%, 72ch);
  margin: var(--s-8) auto 0;
  background: var(--surface);
  border: 3px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sign);
  overflow: hidden;
}
.article-cta-band {
  height: 16px;
  background: var(--stripe);
  background-size: 44px 16px;
  border-bottom: 2px solid var(--ink);
}
.article-cta-inner { padding: var(--s-6) var(--s-5) var(--s-5); }
.article-cta h2 {
  font-size: clamp(1.5rem, 3vw, var(--fs-xl));
  margin-bottom: var(--s-3);
}
.article-cta p { color: var(--ink-soft); max-width: 58ch; }
.article-cta .btn { margin-top: var(--s-2); }
.mag-index-cta { width: 100%; margin-top: var(--s-8); }

/* ---------- author box ---------- */
.author-box {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: var(--s-5);
  align-items: start;
  width: min(100%, 72ch);
  margin: var(--s-7) auto 0;
  padding: var(--s-5);
  background: var(--canvas);
  border: var(--bd);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sign-sm);
}
.author-box img {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-sign-sm);
}
.author-box h2 { font-size: var(--fs-lg); margin-bottom: var(--s-2); }
.author-box p { color: var(--ink-soft); font-size: var(--fs-sm); line-height: 1.65; }
.author-box p:last-child { margin-bottom: 0; }
.author-box a { font-weight: 700; }

/* ---------- read also ---------- */
.read-also {
  margin-top: var(--s-9);
  padding-top: var(--s-7);
  border-top: 2px solid var(--ink);
}
.read-also > h2 {
  position: relative;
  font-size: var(--fs-xl);
  padding-top: var(--s-4);
  margin-bottom: var(--s-5);
}
.read-also > h2::before {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 96px; height: 9px;
  background: var(--stripe-green); background-size: 18px 9px;
  border: 1px solid var(--ink);
  border-radius: 1px;
}
.read-also-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.read-also-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: var(--bd);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sign-sm);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.read-also-card:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 rgba(36, 30, 23, 0.88); }
.read-also-media { display: block; border-bottom: 2px solid var(--ink); background: var(--canvas-deep); }
.read-also-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.read-also-body { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); flex: 1 1 auto; }
.read-also-body h3 { font-size: var(--fs-md); margin: 0; line-height: 1.22; }
.read-also-body h3 a { color: var(--ink); text-decoration: none; }
.read-also-body h3 a:hover { color: var(--primary-dark); text-decoration: underline; }
.read-also-body p { margin: 0; font-size: var(--fs-sm); line-height: 1.55; color: var(--ink-soft); }
.read-also-body .read-also-date {
  margin-top: auto;
  padding-top: var(--s-3);
  border-top: var(--bd-thin);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
.read-also-more { margin-top: var(--s-5); margin-bottom: 0; font-weight: 700; font-size: var(--fs-sm); }

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

/* ---------- author page article list ---------- */
.mag-list { list-style: none; padding: 0; margin: 0; }
.mag-list li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem var(--s-4);
  padding: var(--s-3) 0;
  border-bottom: var(--bd-thin);
}
.mag-list li:first-child { border-top: var(--bd-thin); }
.mag-list a { font-weight: 700; }
.mag-list time {
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin-left: auto;
  white-space: nowrap;
}

/* ---------- magazine responsive ---------- */
@media (max-width: 1024px) {
  .mag-masthead-grid { grid-template-columns: 1fr; align-items: start; }
  .mag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mag-card.lead { flex-direction: column; }
  .mag-card.lead .mag-card-media { border-right: 0; border-bottom: 2px solid var(--ink); }
  .mag-card.lead .mag-card-media img { aspect-ratio: 3 / 2; min-height: 0; }
  .read-also-grid, .mag-teaser-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .mag-grid, .read-also-grid, .mag-teaser-grid { grid-template-columns: 1fr; }
  .article-byline-meta { margin-left: 0; width: 100%; }
  .author-box { grid-template-columns: 1fr; }
  .author-box img { width: 148px; }
  .article-figure { padding-top: var(--s-6); }
}
@media (max-width: 420px) {
  .mag-masthead h1 { font-size: clamp(2.6rem, 13vw, 3.4rem); }
  .article-head h1 { font-size: clamp(1.85rem, 8vw, 2.4rem); }
  .mag-card-body, .article-cta-inner { padding: var(--s-4); }
  .mag-card.lead .mag-card-body { padding: var(--s-4); }
  .article-body { font-size: 1.04rem; }
  .article-cta .btn, .mag-teaser-foot .btn { width: 100%; }
  .mag-list time { margin-left: 0; }
  .article-byline { gap: var(--s-2) var(--s-3); }
  .article-byline-meta { gap: 0.3rem var(--s-3); }
}



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