/* StitchPattern design system: drafting table, paper white and graphite, saffron accent */

:root {
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --ink: #1D1E1C;
  --primary: #4A4A48;
  --accent: #E5A83C;
  --muted: #66665F;

  --paper: #F4F3EE;
  --paper-2: #EFEEE7;
  --tint: #ECECE8;
  --tint-2: #E2E2DC;
  --rule: #D9D8D0;
  --rule-soft: #E8E7E0;
  --accent-wash: #FBF1DE;
  --accent-line: #F0CE8C;
  --accent-deep: #A87415;
  --ink-soft: #3A3B37;

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;

  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px rgba(29, 30, 28, 0.06);
  --shadow-2: 0 2px 10px rgba(29, 30, 28, 0.07);
  --shadow-3: 0 12px 34px rgba(29, 30, 28, 0.10);

  --display: "Julius Sans One", "Optima", "Gill Sans", "Trebuchet MS", sans-serif;
  --body: "Noto Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --t-xs: 0.75rem;
  --t-sm: 0.8438rem;
  --t-base: 1rem;
  --t-md: 1.0625rem;
  --t-lg: 1.25rem;
  --t-xl: 1.5rem;
  --t-2xl: 1.95rem;
  --t-3xl: 2.5rem;
  --t-4xl: 3.25rem;

  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-md);
  line-height: 1.68;
  letter-spacing: 0.005em;
  /* drafting grid: faint graphite gridlines on paper, like a cutting mat */
  background-image:
    linear-gradient(to right, rgba(29, 30, 28, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(29, 30, 28, 0.035) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
  background-position: 0 0, 0 0;
}

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

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

h1 { font-size: clamp(2.15rem, 5.4vw, 3.4rem); letter-spacing: 0.012em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: var(--t-lg); letter-spacing: 0.03em; }

p { margin: 0 0 var(--sp-4); }

a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-deep); }

:focus-visible {
  outline: 2px solid var(--accent-deep);
  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);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: var(--sp-4); top: -80px;
  z-index: 200;
  background-color: var(--surface);
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 10px 18px;
  font-size: var(--t-sm);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: top 0.18s ease;
}
.skip-link:focus { top: var(--sp-4); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 820px; }

/* ---------- notch and seam vocabulary ---------- */

.eyebrow {
  font-family: var(--display);
  font-size: var(--t-sm);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 var(--sp-4);
}
.eyebrow::before {
  content: "";
  width: 34px; height: 9px;
  flex: none;
  /* two notch marks on a seam line */
  background-image:
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary));
  background-repeat: no-repeat;
  background-size: 34px 1px, 1px 9px, 1px 9px;
  background-position: 0 4px, 10px 0, 22px 0;
}

.seam {
  height: 1px;
  border: 0;
  margin: 0;
  background-image: repeating-linear-gradient(to right, var(--rule) 0 9px, transparent 9px 16px);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 26px;
  border-radius: var(--r-sm);
  border: 1px solid var(--primary);
  background-color: var(--primary);
  color: #FFFFFF;
  cursor: pointer;
  position: relative;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}
.btn:hover { color: #FFFFFF; transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn-ghost {
  background-color: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); background-color: var(--paper); }
.btn-accent {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #241A05;
}
.btn-accent:hover { color: #241A05; }
.btn-sm { padding: 11px 18px; font-size: 0.82rem; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule-soft);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.site-header.is-stuck { box-shadow: var(--shadow-2); border-color: var(--rule); }
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  min-height: 74px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.28rem;
  letter-spacing: 0.09em;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark svg { width: 30px; height: 30px; flex: none; }
.wordmark span b { font-weight: 400; color: var(--accent-deep); }

.nav { margin-left: auto; }
.nav ul { display: flex; align-items: center; gap: var(--sp-5); list-style: none; margin: 0; padding: 0; }
.nav a {
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  padding: 6px 0;
  position: relative;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }
.header-cta { margin-left: var(--sp-5); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background-color: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.nav-toggle span {
  display: block; width: 20px; height: 1px;
  background-color: var(--ink);
  position: relative;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 1px; background-color: var(--ink);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background-color: var(--surface);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow-2);
    padding: var(--sp-4) var(--gutter) var(--sp-6);
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: flex-start; gap: var(--sp-3); }
  .nav a { font-size: 1.05rem; }
}

/* ---------- section rhythm ---------- */

.section { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.section-paper { background-color: var(--paper); border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.section-surface { background-color: var(--surface); border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.section-head { max-width: 720px; margin-bottom: var(--sp-7); }
.section-head p { color: var(--muted); font-size: var(--t-lg); line-height: 1.6; }

/* ---------- hero ---------- */

.hero { padding: clamp(48px, 7vw, 92px) 0 clamp(40px, 6vw, 72px); position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  right: -120px; top: -80px;
  width: 460px; height: 460px;
  pointer-events: none;
  /* pattern piece line art: concentric grade lines drawn in graphite */
  background-image:
    radial-gradient(circle at 50% 50%, transparent 118px, var(--rule) 118px 119px, transparent 119px),
    radial-gradient(circle at 50% 50%, transparent 150px, var(--rule-soft) 150px 151px, transparent 151px),
    radial-gradient(circle at 50% 50%, transparent 182px, var(--accent-line) 182px 183px, transparent 183px);
  opacity: 0.9;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero h1 { margin-bottom: var(--sp-5); }
.hero-lede { font-size: var(--t-lg); color: var(--ink-soft); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin: var(--sp-6) 0 var(--sp-6); }

.trust {
  list-style: none;
  margin: 0; padding: var(--sp-4) 0 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
}
.trust li {
  font-size: var(--t-sm);
  color: var(--muted);
  line-height: 1.45;
  padding-left: 16px;
  position: relative;
}
.trust li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 1px; height: 12px;
  background-color: var(--accent);
}
.trust strong { display: block; font-family: var(--display); font-size: 1.35rem; color: var(--ink); letter-spacing: 0.02em; }

.hero-figure { position: relative; }
.hero-figure img {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-3);
}
.hero-figure figcaption {
  margin-top: var(--sp-3);
  font-size: var(--t-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-figure::after {
  content: "";
  position: absolute;
  left: -14px; top: -14px;
  width: 78px; height: 78px;
  border-left: 1px solid var(--primary);
  border-top: 1px solid var(--primary);
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero::before { display: none; }
}
@media (max-width: 520px) {
  .trust { grid-template-columns: 1fr; }
}

/* ---------- cards ---------- */

.grid { display: grid; gap: var(--sp-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)); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background-color: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--tint-2); }
.card h3 { margin-bottom: var(--sp-3); }
.card p { color: var(--muted); margin-bottom: 0; font-size: var(--t-base); }

/* pain cards carry a punched notch on the top edge */
.pain { padding-top: var(--sp-7); }
.pain::before {
  content: "";
  position: absolute;
  top: -1px; left: 28px;
  width: 22px; height: 9px;
  background-color: var(--bg);
  border: 1px solid var(--rule);
  border-top-color: transparent;
  border-radius: 0 0 3px 3px;
}
.pain .cost {
  display: inline-block;
  margin-top: var(--sp-4);
  font-family: var(--display);
  font-size: var(--t-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background-color: var(--accent-wash);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-pill);
  padding: 5px 13px;
}

.feature-icon {
  width: 40px; height: 40px;
  margin-bottom: var(--sp-4);
  color: var(--primary);
}
.feature-icon svg { width: 40px; height: 40px; display: block; }

/* ---------- steps ---------- */

.steps-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .steps-layout { grid-template-columns: 1fr; } }

.steps { list-style: none; margin: 0; padding: 0; }
.step {
  position: relative;
  padding: 0 0 var(--sp-6) 62px;
  border-left: 1px dashed var(--rule);
  margin-left: 18px;
}
.step:last-child { border-left-color: transparent; padding-bottom: 0; }
.step::before {
  counter-increment: none;
  content: attr(data-step);
  position: absolute;
  left: -18px; top: 0;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: 0.95rem;
  color: var(--ink);
  background-color: var(--surface);
  border: 1px solid var(--primary);
  border-radius: 50%;
}
.step::after {
  content: "";
  position: absolute;
  left: 26px; top: 17px;
  width: 26px; height: 1px;
  background-color: var(--accent);
}
.step h3 { margin-bottom: var(--sp-2); }
.step p { color: var(--muted); margin-bottom: 0; }

.section-figure img {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-2);
}
.section-figure figcaption { margin-top: var(--sp-3); font-size: var(--t-sm); color: var(--muted); }

/* ---------- outcomes ---------- */

.outcome {
  background-color: var(--surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  border-radius: var(--r-md);
  padding: var(--sp-6);
}
.outcome .figure {
  font-family: var(--display);
  font-size: clamp(2.4rem, 4.6vw, 3.1rem);
  line-height: 1;
  color: var(--ink);
  display: block;
  margin-bottom: var(--sp-3);
}
.outcome h3 { font-size: var(--t-base); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-deep); }
.outcome p { color: var(--muted); margin-bottom: 0; font-size: var(--t-base); }

/* ---------- testimonials ---------- */

.testimonial {
  background-color: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  margin: 0;
  position: relative;
}
.testimonial::before {
  content: "";
  position: absolute;
  left: var(--sp-6); top: -1px;
  width: 46px; height: 3px;
  background-color: var(--accent);
}
.testimonial p { font-size: var(--t-md); color: var(--ink-soft); }
.testimonial figcaption {
  border-top: 1px dashed var(--rule);
  padding-top: var(--sp-3);
  font-size: var(--t-sm);
  color: var(--muted);
}
.testimonial figcaption strong { display: block; font-family: var(--display); font-size: 1.05rem; color: var(--ink); letter-spacing: 0.04em; }

.results {
  margin-top: var(--sp-6);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background-color: var(--surface);
  overflow: hidden;
}
.results div { padding: var(--sp-5); border-right: 1px solid var(--rule-soft); }
.results div:last-child { border-right: 0; }
.results b { display: block; font-family: var(--display); font-size: 2rem; color: var(--ink); letter-spacing: 0.02em; }
.results span { font-size: var(--t-sm); color: var(--muted); }
@media (max-width: 720px) {
  .results { grid-template-columns: 1fr; }
  .results div { border-right: 0; border-bottom: 1px solid var(--rule-soft); }
}

/* ---------- pricing ---------- */

.tier {
  background-color: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
}
.tier.is-recommended {
  border-color: var(--accent);
  box-shadow: var(--shadow-3);
  background-color: var(--surface);
}
.tier-flag {
  display: inline-block;
  font-family: var(--display);
  font-size: var(--t-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background-color: var(--accent-wash);
  border: 1px solid var(--accent-line);
  padding: 4px 12px;
  border-radius: var(--r-pill);
  margin-bottom: var(--sp-4);
}
.tier h3 { font-size: var(--t-xl); margin-bottom: var(--sp-2); }
.price { font-family: var(--display); font-size: 3rem; line-height: 1; color: var(--ink); }
.price small { font-family: var(--body); font-size: 0.95rem; color: var(--muted); letter-spacing: 0; }
.tier .who { color: var(--muted); font-size: var(--t-base); }
.tier ul { list-style: none; margin: var(--sp-5) 0; padding: 0; flex: 1; }
.tier li {
  position: relative;
  padding-left: 26px;
  margin-bottom: var(--sp-3);
  font-size: var(--t-base);
  color: var(--ink-soft);
}
.tier li::before {
  content: "";
  position: absolute;
  left: 0; top: 10px;
  width: 13px; height: 7px;
  border-left: 1px solid var(--accent-deep);
  border-bottom: 1px solid var(--accent-deep);
  transform: rotate(-45deg);
}
.billing-note {
  margin-top: var(--sp-6);
  text-align: center;
  color: var(--muted);
  font-size: var(--t-base);
}

/* ---------- faq ---------- */

.faq-list { border-top: 1px solid var(--rule); max-width: 900px; }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  text-align: left;
  background-color: transparent;
  border: 0;
  padding: var(--sp-5) 0;
  font-family: var(--display);
  font-size: 1.16rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  cursor: pointer;
}
.faq-q .mark {
  flex: none;
  width: 18px; height: 18px;
  position: relative;
}
.faq-q .mark::before, .faq-q .mark::after {
  content: ""; position: absolute; background-color: var(--accent-deep);
  transition: transform 0.24s ease, opacity 0.24s ease;
}
.faq-q .mark::before { left: 0; top: 8px; width: 18px; height: 1px; }
.faq-q .mark::after { left: 8px; top: 0; width: 1px; height: 18px; }
.faq-q[aria-expanded="true"] .mark::after { transform: scaleY(0); opacity: 0; }
.faq-a { padding: 0 0 var(--sp-5); max-width: 74ch; color: var(--muted); }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a[hidden] { display: none; }

/* ---------- contact ---------- */

.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(28px, 5vw, 60px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.form-card {
  background-color: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: clamp(22px, 4vw, 40px);
  box-shadow: var(--shadow-2);
}
.field { margin-bottom: var(--sp-5); }
.field label {
  display: block;
  font-size: var(--t-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-2);
}
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--body);
  font-size: var(--t-base);
  color: var(--ink);
  background-color: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: 12px 14px;
}
.field textarea { min-height: 138px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent-deep); outline: none; box-shadow: 0 0 0 3px rgba(229, 168, 60, 0.28); }
.field [aria-invalid="true"] { border-color: #A32E19; }
.err { display: block; margin-top: 6px; font-size: var(--t-sm); color: #8E2916; }
.err:empty { display: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }
.consent { display: flex; gap: 10px; align-items: flex-start; }
.consent input { width: 18px; height: 18px; margin-top: 3px; flex: none; }
.consent label { text-transform: none; letter-spacing: 0; font-size: var(--t-sm); color: var(--muted); margin: 0; }
.form-note { margin-top: var(--sp-4); font-size: var(--t-sm); color: var(--muted); }
.contact-aside ul { list-style: none; margin: var(--sp-5) 0 0; padding: 0; }
.contact-aside li { padding: var(--sp-3) 0; border-bottom: 1px dashed var(--rule); color: var(--muted); font-size: var(--t-base); }

/* ---------- footer ---------- */

.site-footer {
  background-color: var(--paper-2);
  border-top: 1px solid var(--rule);
  padding: clamp(48px, 6vw, 80px) 0 var(--sp-6);
  color: var(--ink);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--sp-6); }
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 {
  font-family: var(--display);
  font-size: var(--t-sm);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-4);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: var(--sp-3); }
.site-footer a { color: var(--ink-soft); text-decoration: none; font-size: var(--t-base); }
.site-footer a:hover { color: var(--accent-deep); text-decoration: underline; }
.footer-brand p { color: var(--muted); font-size: var(--t-base); max-width: 32ch; }
.social { display: flex; gap: 10px; margin-top: var(--sp-4); }
.social a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background-color: var(--surface);
  color: var(--primary);
}
.social a:hover { border-color: var(--accent); color: var(--accent-deep); }
.social svg { width: 17px; height: 17px; }
.footer-base {
  margin-top: var(--sp-7);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5);
  justify-content: space-between;
  font-size: var(--t-sm);
  color: var(--muted);
}

/* ---------- legal and prose pages ---------- */

.page-head { padding: clamp(44px, 6vw, 82px) 0 var(--sp-6); border-bottom: 1px solid var(--rule-soft); }
.page-head p { color: var(--muted); font-size: var(--t-lg); max-width: 62ch; }
.prose { padding: var(--sp-8) 0 var(--sp-9); }
.prose h2 { font-size: var(--t-2xl); margin-top: var(--sp-7); }
.prose h3 { margin-top: var(--sp-5); }
.prose ul, .prose ol { padding-left: 22px; color: var(--ink-soft); }
.prose li { margin-bottom: var(--sp-2); }
.prose dl { margin: 0 0 var(--sp-5); }
.prose dt { font-family: var(--display); letter-spacing: 0.06em; margin-top: var(--sp-3); }
.prose dd { margin: 0 0 var(--sp-2); color: var(--muted); }
.author-byline {
  margin-top: var(--sp-7);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  background-color: var(--surface);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  font-size: var(--t-base);
  color: var(--muted);
}
.author-byline a { color: var(--ink); }

.author-hero { display: grid; grid-template-columns: 260px 1fr; gap: var(--sp-7); align-items: start; }
@media (max-width: 760px) { .author-hero { grid-template-columns: 1fr; } }
.author-hero img { border: 1px solid var(--rule); border-radius: var(--r-md); box-shadow: var(--shadow-2); }
.profile-links { list-style: none; padding: 0; margin: var(--sp-4) 0 0; display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.profile-links a {
  display: inline-block;
  border: 1px solid var(--rule);
  background-color: var(--surface);
  border-radius: var(--r-pill);
  padding: 7px 15px;
  font-size: var(--t-sm);
  text-decoration: none;
  color: var(--ink-soft);
}
.profile-links a:hover { border-color: var(--accent); }

.map-group { margin-bottom: var(--sp-7); }
.map-group ul { list-style: none; padding: 0; margin: 0; }
.map-group li { padding: var(--sp-3) 0; border-bottom: 1px dashed var(--rule); }
.map-group li a { font-family: var(--display); letter-spacing: 0.05em; font-size: 1.1rem; }
.map-group li span { display: block; color: var(--muted); font-size: var(--t-sm); }

.mini {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--sp-9) 0;
}
.mini .code {
  font-family: var(--display);
  font-size: clamp(3.4rem, 12vw, 6.5rem);
  color: var(--accent-deep);
  letter-spacing: 0.1em;
  line-height: 1;
}
.mini .actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; margin-top: var(--sp-5); }

/* ---------- motion: pattern lines that draw themselves ---------- */

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

.draw-rule {
  height: 1px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
  margin-bottom: var(--sp-6);
}
.draw-rule.is-visible { transform: scaleX(1); }

.notch-row { display: flex; gap: 6px; margin-bottom: var(--sp-4); }
.notch-row i {
  display: block;
  width: 1px; height: 14px;
  background-color: var(--primary);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.25s steps(2, end);
}
.notch-row.is-visible i { transform: scaleY(1); }
.notch-row.is-visible i:nth-child(2) { transition-delay: 0.08s; }
.notch-row.is-visible i:nth-child(3) { transition-delay: 0.16s; }
.notch-row.is-visible i:nth-child(4) { transition-delay: 0.24s; }

@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; }
  .draw-rule { transform: scaleX(1); }
  .notch-row i { transform: scaleY(1); }
}

/* ================================================================
   The Grading Table: the magazine
   Built from the same drafting table tokens as the rest of the site.
   ================================================================ */

.mag-crumb {
  border-bottom: 1px solid var(--rule-soft);
  background-color: var(--surface);
  padding: var(--sp-3) 0;
}
.mag-crumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) 10px;
  margin: 0;
  padding: 0;
  font-size: var(--t-sm);
  color: var(--muted);
}
.mag-crumb li { display: flex; align-items: center; gap: 10px; }
.mag-crumb li + li::before {
  content: "";
  width: 10px; height: 1px;
  background-color: var(--rule);
  flex: none;
}
.mag-crumb a { color: var(--ink-soft); text-decoration: none; }
.mag-crumb a:hover { color: var(--accent-deep); text-decoration: underline; }
.mag-crumb li[aria-current] {
  color: var(--muted);
  max-width: 46ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- magazine masthead and index ---------- */

.mag-masthead { padding: clamp(40px, 6vw, 78px) 0 var(--sp-6); }
.mag-masthead h1 { max-width: 18ch; }
.mag-masthead-meta { color: var(--muted); font-size: var(--t-base); max-width: 62ch; margin: 0; }
.mag-standfirst {
  font-size: var(--t-lg);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 var(--sp-5);
}

.mag-index { padding-top: var(--sp-7); }
.mag-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-6) var(--sp-5);
}

.mag-card {
  background-color: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.mag-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--tint-2); }
.mag-card-img { display: block; border-bottom: 1px solid var(--rule-soft); }
.mag-card-img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mag-card-body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; }
.mag-kicker {
  font-family: var(--display);
  font-size: var(--t-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin: 0;
}
.mag-card-title { font-size: var(--t-lg); line-height: 1.24; margin: 0; }
.mag-card-title a { text-decoration: none; }
.mag-card-title a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.mag-card-dek { color: var(--muted); font-size: var(--t-base); margin: 0; }
.mag-card-meta {
  margin: auto 0 0;
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--rule);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.mag-dot { width: 1px; height: 11px; background-color: var(--accent); display: inline-block; }

/* the lead card takes the full width of the grid and reads as the cover story */
.mag-card.lead { grid-column: 1 / -1; flex-direction: row; align-items: stretch; }
.mag-card.lead .mag-card-img { flex: 1 1 56%; border-bottom: 0; border-right: 1px solid var(--rule-soft); }
.mag-card.lead .mag-card-img img { height: 100%; aspect-ratio: 16 / 10; }
.mag-card.lead .mag-card-body { flex: 1 1 44%; padding: clamp(24px, 3.4vw, 44px); justify-content: center; }
.mag-card.lead .mag-card-title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.mag-card.lead .mag-card-dek { font-size: var(--t-md); }

@media (max-width: 980px) { .mag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .mag-card.lead { flex-direction: column; }
  .mag-card.lead .mag-card-img { border-right: 0; border-bottom: 1px solid var(--rule-soft); }
  .mag-card.lead .mag-card-img img { aspect-ratio: 3 / 2; }
}
@media (max-width: 640px) { .mag-grid { grid-template-columns: 1fr; } }

.mag-foot-cta { text-align: center; max-width: 62ch; }
.mag-foot-cta .notch-row { justify-content: center; }
.mag-foot-cta p { color: var(--muted); margin-bottom: var(--sp-5); }

/* ---------- article page ---------- */

.mag-article { padding: clamp(36px, 5vw, 68px) 0 var(--sp-8); }
.mag-head { max-width: 68ch; }
.mag-head h1 { font-size: clamp(1.95rem, 4.4vw, 3rem); margin-bottom: var(--sp-4); }
.mag-head .mag-standfirst { margin-bottom: var(--sp-5); }
.mag-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-4);
  font-size: var(--t-sm);
  color: var(--muted);
}
.mag-byline .mag-by { font-family: var(--display); letter-spacing: 0.06em; color: var(--ink); }
.mag-byline .mag-by a { color: var(--ink); }
.mag-meta { position: relative; padding-left: 14px; }
.mag-meta::before {
  content: "";
  position: absolute;
  left: 0; top: 4px;
  width: 1px; height: 12px;
  background-color: var(--rule);
}

.mag-figure { margin: var(--sp-6) 0 var(--sp-7); position: relative; }
.mag-figure img {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-2);
}
.mag-figure figcaption {
  margin-top: var(--sp-3);
  font-size: var(--t-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.mag-figure::after {
  content: "";
  position: absolute;
  left: -12px; top: -12px;
  width: 64px; height: 64px;
  border-left: 1px solid var(--primary);
  border-top: 1px solid var(--primary);
  pointer-events: none;
}

/* body typography: a measure of roughly 68 characters */
.mag-body { max-width: 68ch; font-size: 1.075rem; line-height: 1.72; }
.mag-body h2 {
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  margin: var(--sp-8) 0 var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--rule-soft);
}
.mag-body h3 { font-size: var(--t-lg); margin: var(--sp-6) 0 var(--sp-3); }
.mag-body p { margin: 0 0 var(--sp-5); }
.mag-body ul, .mag-body ol { padding-left: 22px; margin: 0 0 var(--sp-5); color: var(--ink-soft); }
.mag-body li { margin-bottom: var(--sp-2); }
.mag-body strong { font-weight: 600; }
.mag-body a { color: var(--ink); text-decoration-color: var(--accent-line); }
.mag-body a:hover { color: var(--accent-deep); }
.mag-body blockquote {
  margin: var(--sp-6) 0;
  padding: var(--sp-4) var(--sp-5);
  background-color: var(--paper);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: var(--t-md);
  color: var(--ink-soft);
}
.mag-body blockquote p:last-child { margin-bottom: 0; }
.mag-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 var(--sp-6);
  font-size: var(--t-base);
  display: block;
  overflow-x: auto;
}
.mag-body th, .mag-body td {
  border: 1px solid var(--rule);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.mag-body th { background-color: var(--paper-2); font-family: var(--display); font-weight: 400; letter-spacing: 0.05em; }

.mag-body .inline-read {
  margin: var(--sp-5) 0;
  padding: var(--sp-3) var(--sp-4);
  background-color: var(--accent-wash);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-md);
  font-size: var(--t-base);
  color: var(--ink-soft);
}
.mag-body .inline-read a { font-family: var(--display); letter-spacing: 0.04em; color: var(--ink); }

/* ---------- call to action after the body ---------- */

.mag-cta {
  margin: var(--sp-8) 0 var(--sp-7);
  padding: var(--sp-6);
  background-color: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  border-radius: var(--r-md);
}
.mag-cta h2 { border-top: 0; padding-top: 0; margin: 0 0 var(--sp-3); font-size: var(--t-xl); }
.mag-cta p { color: var(--ink-soft); margin-bottom: var(--sp-5); }
.mag-cta .btn { font-size: 0.82rem; }

/* ---------- author box ---------- */

.mag-author {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--sp-5);
  align-items: start;
  padding: var(--sp-6);
  background-color: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
}
.mag-author img { border-radius: var(--r-md); border: 1px solid var(--rule); width: 120px; height: auto; }
.mag-author p { font-size: var(--t-base); color: var(--muted); margin-bottom: var(--sp-3); }
.mag-author-name {
  font-family: var(--display);
  font-size: var(--t-lg);
  letter-spacing: 0.06em;
  color: var(--ink) !important;
}
.mag-author-link { margin-bottom: 0; }
.mag-author-link a { font-family: var(--display); letter-spacing: 0.04em; }
@media (max-width: 560px) {
  .mag-author { grid-template-columns: 1fr; }
}

/* ---------- read also ---------- */

.mag-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-5);
}
.mag-rel {
  background-color: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mag-rel:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.mag-rel-img { display: block; border-bottom: 1px solid var(--rule-soft); }
.mag-rel-img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mag-rel-title { font-size: var(--t-base); line-height: 1.32; margin: var(--sp-4) var(--sp-5) var(--sp-2); font-family: var(--display); letter-spacing: 0.03em; }
.mag-rel-title a { text-decoration: none; }
.mag-rel-title a:hover { text-decoration: underline; }
.mag-rel-dek { margin: 0 var(--sp-5) var(--sp-4); color: var(--muted); font-size: var(--t-sm); }
.mag-rel-meta {
  margin: auto var(--sp-5) var(--sp-5);
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--rule);
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.mag-related-all { margin: var(--sp-6) 0 0; font-family: var(--display); letter-spacing: 0.05em; }
@media (max-width: 860px) { .mag-related-grid { grid-template-columns: 1fr; } }

/* ---------- latest articles on the home page ---------- */

.mag-home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-5);
}
@media (max-width: 980px) { .mag-home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .mag-home-grid { grid-template-columns: 1fr; } }
.mag-home-all { margin-top: var(--sp-6); }

/* ---------- author page article list ---------- */

.mag-list { list-style: none; padding: 0; margin: 0; }
.mag-list li { padding: var(--sp-3) 0; border-bottom: 1px dashed var(--rule); }
.mag-list li a { font-family: var(--display); letter-spacing: 0.04em; font-size: 1.05rem; }
.mag-list li time { display: block; font-size: var(--t-sm); color: var(--muted); margin-top: 4px; }

@media (max-width: 400px) {
  .mag-card-body { padding: var(--sp-4); }
  .mag-body { font-size: 1.0125rem; }
  .mag-cta, .mag-author { padding: var(--sp-4); }
}


/* Network column: five sibling products, rotated so every site is linked the same
   number of times. Sits in the footer link grid and inherits its type and colour. */
.site-network ul { list-style: none; margin: 0; padding: 0; }
.site-network li + li { margin-top: 0.4rem; }
.site-network a { text-decoration: none; border-bottom: 1px solid transparent; }
.site-network a:hover, .site-network a:focus-visible { border-bottom-color: currentColor; }


/* Header nav: a label is a phrase, so it never breaks across two lines. The nav is a flex
   child and would otherwise be shrunk by the row rather than allowed to size itself. */
header nav ul { flex-wrap: nowrap; }
header nav li { flex: 0 0 auto; }
header nav a { white-space: nowrap; }
