/* ============================================================
   CONFUSE THE MACHINE — site styles
   Single dark theme: near-black + violet (brand) + electric
   yellow (structural accent). Tokens live in :root.
   ============================================================ */

/* ---------- Fonts ---------- */
:root {
  --font-display: "Archivo", "Arial Narrow", sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;

  /* Dark lab: near-black + violet + electric yellow */
  --bg:        #0b0b10;
  --bg-2:      #15151f;
  --bg-inset:  #1d1d2a;
  --ink:       #eceaf4;
  --ink-2:     #9b98ad;
  --line:      #3a3848;
  --line-soft: rgba(236,234,244,.14);
  --purple:    #a78bfa;
  --purple-ink:#0b0b10;
  --accent:    #ffd21f;
  --accent-ink:#0b0b10;
  --grain:     .05;

  --maxw: 1240px;
  --cta-bg: #18132b;
  --cta-fg: #eceaf4;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 4px;
  --section-pad: clamp(72px, 11vw, 150px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-size: clamp(16px, 1.15vw, 18px);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
  transition: background .4s ease, color .4s ease;
}

/* Grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }

/* ---------- Shared layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-pad); position: relative; }
.section + .section { border-top: 1.5px solid var(--line); }
.section + .section::before { content: ""; position: absolute; top: -3px; height: 6px; width: 52px;
  left: max(var(--gutter), calc((100% - var(--maxw)) / 2)); background: var(--accent); }

/* Eyebrow / section label */
.eyebrow {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: .6em;
}
.eyebrow::before { content: ""; width: 9px; height: 9px; background: var(--accent); flex: none; border-radius: 1px; }
.eyebrow b { color: var(--purple); font-weight: 700; }
.eyebrow .dash { width: 2.4em; height: 1.5px; background: var(--line-soft); }

/* Display type */
.display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: .96;
  letter-spacing: -.025em;
  font-stretch: 125%;
  text-wrap: balance;
}
.h-xl { font-size: clamp(44px, 8.5vw, 124px); }
.h-lg { font-size: clamp(34px, 5.2vw, 72px); }
.h-md { font-size: clamp(26px, 3.2vw, 44px); }
.lead { font-size: clamp(18px, 1.7vw, 23px); color: var(--ink-2); max-width: 56ch; text-wrap: pretty; }

.purple { color: var(--purple); }
.mark {
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0 .12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(13px, 1vw, 15px); letter-spacing: .02em;
  padding: .95em 1.5em; border: 1.5px solid var(--line);
  border-radius: var(--radius); background: var(--ink); color: var(--bg);
  transition: transform .15s ease, background .2s, color .2s, box-shadow .2s;
  position: relative;
}
.btn .arr { transition: transform .2s ease; }
.btn:hover { transform: translate(-2px,-2px); box-shadow: 4px 4px 0 var(--purple); }
.btn:hover .arr { transform: translateX(3px); }
.btn--accent { background: var(--accent); color: var(--accent-ink); border-color: var(--line); }
.btn--accent:hover { box-shadow: 4px 4px 0 var(--line); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--purple); color: var(--purple-ink); border-color: var(--purple); box-shadow: 4px 4px 0 var(--accent); }

/* ---------- Header / nav ---------- */
.site-head {
  position: sticky; top: 0; z-index: 9000;
  background: rgba(5, 5, 8, 0.84);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--line);
}
.site-head::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); }
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; height: 34px; flex-shrink: 0; }
.logo img { height: 34px; width: auto; }
.ctm-logo { height: 26px; width: auto; display: block; color: var(--ink); }
.site-foot .ctm-logo { height: 30px; }
.ctm-logo .cls-1 { fill: currentColor; }
.ctm-logo .cls-2, .ctm-logo .cls-3 { fill: var(--purple); }
.logo-fallback {
  font-family: var(--font-display); font-weight: 800;
  font-size: 18px; letter-spacing: -.015em; text-transform: lowercase;
  line-height: 1; white-space: nowrap;
}
.logo-fallback .q { color: var(--purple); font-weight: 800; }
@media (max-width: 380px){ .logo-fallback { font-size: 15px; } }

.nav { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 30px); }
.nav a { font-family: var(--font-mono); font-size: 13.5px; font-weight: 400; letter-spacing: .01em; color: var(--ink-2); transition: color .15s; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: -4px; height: 1.5px; width: 0; background: var(--purple); transition: width .2s ease; }
.nav a:hover { color: var(--ink); }
.nav a:hover::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.head-cta { padding: .6em 1.1em; }

.menu-btn { display: none; width: 42px; height: 42px; border: 1.5px solid var(--line); border-radius: var(--radius); align-items: center; justify-content: center; }
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; transition: .2s; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); transition: .2s; }
.menu-btn span::before { top: -6px; } .menu-btn span::after { top: 6px; }
body.menu-open .menu-btn span { background: transparent; }
body.menu-open .menu-btn span::before { top: 0; transform: rotate(45deg); }
body.menu-open .menu-btn span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(40px, 6vw, 70px); padding-bottom: clamp(40px, 6vw, 70px); }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-grad { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 80% 0%, transparent 40%, var(--bg) 100%); }
.hero .wrap { position: relative; z-index: 2; }

.hero-kicker { margin-bottom: clamp(20px, 3vw, 34px); }
.hero h1 { margin-bottom: clamp(22px, 3vw, 34px); }
.hero h1 .line { display: block; }
.hero-sub { display: flex; flex-wrap: wrap; gap: clamp(20px, 3vw, 40px); align-items: flex-start; justify-content: space-between; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(28px, 4vw, 46px); }

/* capability strip */
.caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: clamp(48px, 7vw, 90px);
  border: 1.5px solid var(--line); border-top: 5px solid var(--accent); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.cap { padding: clamp(22px, 2.6vw, 34px); position: relative; }
.cap + .cap { border-left: 1.5px solid var(--line); }
.cap .num { font-family: var(--font-mono); font-size: 12px; color: var(--purple); font-weight: 700; }
.cap h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(19px, 1.7vw, 24px); margin: 12px 0 6px; letter-spacing: -.01em; }
.cap p { font-size: 14.5px; color: var(--ink-2); }
.cap::before { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: var(--accent); transition: width .3s ease; }
.cap:hover::before { width: 100%; }

/* ---------- Section header block ---------- */
.sec-head { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: clamp(40px, 5vw, 64px); }
.sec-head .titles { display: flex; flex-direction: column; gap: 18px; }
.sec-head.split { grid-template-columns: 1.2fr .8fr; align-items: end; }
.sec-head .blurb { color: var(--ink-2); max-width: 42ch; text-wrap: pretty; padding-bottom: 6px; }
@media (max-width: 820px){ .sec-head.split { grid-template-columns: 1fr; } }

/* ---------- Services grid ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.svc {
  padding: clamp(28px, 3vw, 40px); position: relative; background: var(--bg-2);
  border-right: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line);
  transition: background .25s ease, color .25s ease; min-height: 240px; display: flex; flex-direction: column;
}
.svc-grid .svc:nth-child(3n) { border-right: none; }
.svc-grid .svc:nth-last-child(-n+3) { border-bottom: none; }
.svc .idx { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); font-weight: 700; letter-spacing: .08em; }
.svc h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(21px, 1.9vw, 27px); margin: auto 0 12px; letter-spacing: -.015em; }
.svc p { font-size: 14.5px; color: var(--ink-2); text-wrap: pretty; }
.svc .glyph { position: absolute; top: clamp(24px,3vw,36px); right: clamp(24px,3vw,36px); font-family: var(--font-mono); font-size: 18px; color: var(--purple); transition: transform .3s ease; }
.svc:hover { background: var(--purple); color: var(--purple-ink); }
.svc:hover p, .svc:hover .idx, .svc:hover .glyph { color: var(--purple-ink); }
.svc:hover .glyph { transform: rotate(90deg); }
.svc-card-link { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.svc-card-link:hover ~ .glyph { transform: rotate(90deg); }

/* ---------- Why us ---------- */
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px,3.5vw,56px) clamp(40px,5vw,80px); }
.why { display: grid; grid-template-columns: auto 1fr; gap: 20px; }
.why .big { font-family: var(--font-display); font-weight: 800; font-stretch:125%; font-size: clamp(40px,5vw,64px); color: var(--purple); line-height: .8; }
.why h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(20px,1.7vw,25px); margin-bottom: 8px; letter-spacing:-.01em; }
.why p { color: var(--ink-2); font-size: 15px; text-wrap: pretty; }
@media (max-width: 720px){ .why-grid { grid-template-columns: 1fr; } }

/* ---------- Process ---------- */
.steps { display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 120px 1fr auto; gap: clamp(20px,3vw,48px); align-items: start;
  padding-block: clamp(28px, 3.4vw, 46px); border-top: 1.5px solid var(--line); position: relative; }
.step:last-child { border-bottom: 1.5px solid var(--line); }
.step .step-n { font-family: var(--font-display); font-weight: 800; font-stretch:125%; font-size: clamp(40px,5.5vw,82px); color: var(--line-soft); line-height: .8; transition: color .3s; }
.step:hover .step-n { color: var(--purple); }
.step h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(23px,2.4vw,34px); margin-bottom: 12px; letter-spacing:-.015em; }
.step p { color: var(--ink-2); max-width: 60ch; text-wrap: pretty; }
.step .tag { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing:.08em; color: var(--accent-ink); background: var(--accent); text-transform: uppercase; white-space: nowrap; padding: 5px 10px; border-radius: 3px; align-self: start; margin-top: 6px; }
@media (max-width: 760px){ .step { grid-template-columns: 64px 1fr; } .step .tag { display: none; } }

/* ---------- Founder ---------- */
.founder { display: grid; grid-template-columns: 320px 1fr; gap: clamp(36px,5vw,80px); align-items: center; }
@media (max-width: 880px){ .founder { grid-template-columns: 1fr; } }
.founder-photo { position: relative; max-width: 340px; }
.founder-photo img, .founder-photo .ph {
  width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; border: 1.5px solid var(--line); border-radius: var(--radius);
  display: block; background: var(--bg-inset);
}
.founder-photo .badge { position: absolute; left: -14px; bottom: 24px; background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-mono); font-weight: 700; font-size: 13px; padding: 10px 16px; border: 1.5px solid var(--line); border-radius: var(--radius);
  transform: rotate(-2deg); letter-spacing: .02em; }
.founder-photo .q-mark { position: absolute; top: -22px; right: -16px; width: 58px; height: 58px; z-index: 3; filter: drop-shadow(0 4px 14px rgba(0,0,0,.35)); }
.founder-photo .q-mark path { fill: var(--purple); }
.founder-body h2 { margin: 14px 0 8px; }
.founder-name { font-family: var(--font-mono); font-size: 13px; font-weight:700; letter-spacing:.1em; text-transform: uppercase; color: var(--purple); }
.founder-body > p { margin: 18px 0 6px; color: var(--ink-2); text-wrap: pretty; }
.founder-points { list-style: none; margin: 24px 0; display: grid; gap: 2px; border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.founder-points li { padding: 16px 18px; background: var(--bg-2); }
.founder-points li + li { border-top: 1.5px solid var(--line); }
.founder-points b { font-family: var(--font-display); font-weight: 800; font-size: 17px; display: block; margin-bottom: 3px; }
.founder-points span { font-size: 14px; color: var(--ink-2); }
.founder-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(3,1fr); gap: clamp(20px,2.4vw,28px); }
@media (max-width: 880px){ .quotes { grid-template-columns: 1fr; max-width: 560px; } }
.quote { border: 1.5px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius); padding: clamp(24px,2.6vw,32px); background: var(--bg-2);
  display: flex; flex-direction: column; gap: 18px; transition: transform .2s, box-shadow .2s; }
.quote:hover { transform: translateY(-4px); box-shadow: 6px 6px 0 var(--purple); }
.quote .mk { font-family: var(--font-display); font-weight: 800; font-size: 54px; line-height: .6; color: var(--purple); height: 28px; }
.quote p { font-size: 15.5px; text-wrap: pretty; flex: 1; }
.quote .who { display: flex; align-items: center; gap: 14px; border-top: 1.5px solid var(--line-soft); padding-top: 18px; }
.quote .who img, .quote .who .ph { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--line); flex-shrink: 0; background: var(--bg-inset); }
.quote .who b { font-family: var(--font-display); font-weight: 800; font-size: 16px; display: block; }
.quote .who span { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }

/* ---------- Final CTA + contact ---------- */
.cta-band { background: var(--cta-bg); color: var(--cta-fg); border-top: 1.5px solid var(--line); position: relative; overflow: hidden; }
.cta-band .eyebrow { color: color-mix(in srgb, var(--cta-fg) 60%, transparent); }
.cta-band .eyebrow b { color: var(--accent); }
.cta-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(36px,5vw,72px); align-items: start; position: relative; z-index: 1; }
@media (max-width: 880px){ .cta-grid { grid-template-columns: 1fr; } }
.cta-band h2 { color: var(--cta-fg); }
.cta-band .lead { color: color-mix(in srgb, var(--cta-fg) 72%, transparent); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.cta-band .btn { border-color: var(--cta-fg); }
.cta-band .btn--accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cta-band .btn--accent:hover { box-shadow: 4px 4px 0 var(--cta-fg); }
.cta-band .btn--ghost { color: var(--cta-fg); }
.cta-band .btn--ghost:hover { background: var(--cta-fg); color: var(--cta-bg); box-shadow: 4px 4px 0 var(--accent); }

/* oversized brand mark watermark */
.cta-watermark { position: absolute; right: -2%; bottom: -26%; width: clamp(220px, 32vw, 440px); height: auto; color: var(--purple); opacity: .12; z-index: 0; pointer-events: none; }
.cta-watermark path { fill: currentColor; }

.contact-card { border: 1.5px solid color-mix(in srgb, var(--cta-fg) 24%, transparent); border-top: 4px solid var(--accent);
  border-radius: var(--radius); padding: clamp(24px,3vw,34px); background: color-mix(in srgb, var(--cta-fg) 4%, transparent); }
.contact-card .lbl { font-family: var(--font-mono); font-size: 12px; font-weight:700; letter-spacing:.1em; text-transform: uppercase; color: color-mix(in srgb, var(--cta-fg) 60%, transparent); display:block; margin-bottom: 18px; }
.field { display: block; margin-bottom: 14px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 15px; padding: 13px 14px; color: var(--cta-fg);
  background: color-mix(in srgb, var(--cta-fg) 8%, transparent); border: 1.5px solid color-mix(in srgb, var(--cta-fg) 30%, transparent);
  border-radius: var(--radius); transition: border-color .2s;
}
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--cta-fg) 45%, transparent); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 96px; }
.contact-card .btn { width: 100%; justify-content: center; }
.form-note { font-family: var(--font-mono); font-size: 11.5px; color: color-mix(in srgb, var(--cta-fg) 50%, transparent); margin-top: 12px; text-align: center; }

/* ---------- Footer ---------- */
.site-foot { border-top: 1.5px solid var(--line); padding-block: clamp(54px, 7vw, 84px) 34px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: clamp(28px,3vw,48px); }
@media (max-width: 880px){ .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px){ .foot-grid { grid-template-columns: 1fr; } }
.foot-brand p { color: var(--ink-2); max-width: 34ch; margin-top: 16px; font-size: 14.5px; }
.foot-col h4 { font-family: var(--font-mono); font-size: 12px; font-weight:700; letter-spacing:.1em; text-transform: uppercase; color: var(--ink); margin-bottom: 16px; }
.foot-col ul { list-style: none; display: grid; gap: 10px; }
.foot-col a { color: var(--ink-2); font-size: 14.5px; transition: color .15s; }
.foot-col a:hover { color: var(--purple); }
.foot-bottom { margin-top: clamp(40px,5vw,64px); padding-top: 24px; border-top: 1.5px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.foot-bottom a { color: var(--ink-2); } .foot-bottom a:hover { color: var(--purple); }
.foot-legal { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-reg { width: 100%; color: var(--ink-2); opacity: .8; line-height: 1.6; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce){ .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Mobile nav ---------- */
@media (max-width: 920px){
  .menu-btn { display: flex; }
  .nav {
    position: fixed; inset: 70px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1.5px solid var(--line);
    transform: translateY(-120%); transition: transform .3s ease; padding: 8px var(--gutter) 20px; z-index: 8999;
  }
  body.menu-open .nav { transform: none; }
  .nav a { padding: 16px 0; border-bottom: 1.5px solid var(--line-soft); font-size: 17px; }
  .nav a::after { display: none; }
  .nav-cta .head-cta { display: none; }
}
@media (max-width: 760px){
  .caps { grid-template-columns: 1fr; }
  .cap + .cap { border-left: none; border-top: 1.5px solid var(--line); }
  .svc-grid { grid-template-columns: 1fr; }
  .svc { border-right: none !important; border-bottom: 1.5px solid var(--line) !important; }
  .svc-grid .svc:last-child { border-bottom: none !important; }
  .hero-sub { flex-direction: column; }
}

/* ============================================================
   CONTENT / ARTICLE PAGES
   Typography & layout for markdown-generated pages and
   standalone HTML content pages (apocalypse, etc.)
   ============================================================ */

/* --- Article hero (smaller than homepage) --- */
.article-hero {
  padding: clamp(80px, 10vw, 130px) 0 clamp(40px, 5vw, 64px);
  position: relative;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1.5px solid var(--line);
  text-align: center;
}
.article-hero h1 {
  max-width: 18ch;
  margin: 0 auto;
  line-height: 1.05;
}
.article-hero .meta {
  font-family: var(--font-mono);
  font-size: clamp(12px, 1vw, 14px);
  color: var(--ink-2);
  opacity: .7;
}
.article-hero .meta time { color: var(--ink); font-weight: 700; opacity: 1; }

/* Article hero with background image */
.article-hero.has-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: clamp(320px, 40vw, 500px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-bottom: none;
}
.article-hero.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 11, 16, 0.65);
  z-index: 1;
}
.article-hero.has-image .wrap {
  position: relative;
  z-index: 3;
  padding-block: clamp(80px, 10vw, 130px);
}

/* --- Article body wrapper --- */
.article-body {
  padding: clamp(48px, 6vw, 80px) 0 clamp(72px, 9vw, 120px);
}
.article-body .inner {
  max-width: 960px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* --- Article typography --- */
.article-body .inner > * + * { margin-top: 1.25em; }

.article-body .inner h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 2.7vw, 34px);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin-top: 2.2em;
  margin-bottom: .6em;
  color: var(--ink);
}

.article-body .inner h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.2;
  margin-top: 1.8em;
  margin-bottom: .5em;
  color: var(--ink);
}

.article-body .inner p {
  color: var(--ink-2);
  line-height: 1.75;
  font-size: clamp(16px, 1.15vw, 18px);
  text-wrap: pretty;
}

.article-body .inner strong {
  color: var(--ink);
  font-weight: 700;
}

.article-body .inner a:not(.btn) {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: color-mix(in srgb, var(--purple) 40%, transparent);
  transition: text-decoration-color .2s;
}
.article-body .inner a:not(.btn):hover {
  text-decoration-color: var(--purple);
}

.article-body .inner ul,
.article-body .inner ol {
  color: var(--ink-2);
  padding-left: 1.6em;
  line-height: 1.75;
}
.article-body .inner li { margin-bottom: .4em; }
.article-body .inner ul { list-style: disc; }

.article-body .inner img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  margin: 2em auto;
  display: block;
}

.article-body .inner blockquote {
  border-left: 4px solid var(--accent);
  padding: .8em 1.2em;
  margin: 2em 0;
  background: var(--bg-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-2);
  font-style: italic;
}

.article-body .inner hr {
  border: none;
  height: 1.5px;
  background: var(--line);
  margin: 2.5em 0;
}

.article-body .inner code {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--bg-inset);
  padding: .15em .45em;
  border-radius: 3px;
  border: 1.5px solid var(--line);
}

.article-body .inner pre {
  background: var(--bg-2);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2em 1.4em;
  overflow-x: auto;
  margin: 1.8em 0;
}
.article-body .inner pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: .85em;
  line-height: 1.6;
}

/* --- Featured image strip --- */
.article-fig {
  padding: 0 0 clamp(32px, 4vw, 56px);
}
.article-fig .inner {
  max-width: 960px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.article-fig img {
  width: 100%;
  height: clamp(260px, 30vw, 440px);
  object-fit: cover;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  display: block;
}

/* --- Inline CTA card (from [contact] in markdown) --- */
.article-cta {
  background: color-mix(in srgb, var(--cta-fg) 4%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--cta-fg) 24%, transparent);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: clamp(28px, 3.5vw, 44px);
  margin: 2.5em 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.article-cta .logo-mark {
  height: 44px;
  width: auto;
  margin-bottom: .8em;
  opacity: .7;
  filter: brightness(0) invert(1);
}
.article-cta h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 2.4vw, 30px);
  margin-bottom: .4em;
  color: var(--cta-fg);
}
.article-cta h3 .hl {
  color: var(--accent);
}
.article-cta p {
  color: color-mix(in srgb, var(--cta-fg) 65%, transparent);
  font-size: 15px;
  max-width: 500px;
  margin: 0 auto 1.6em;
}
.article-cta .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.article-cta .cta-row .btn { font-size: 13.5px; }

/* --- Contact block generated by [contact] in markdown --- */
.article-contact {
  margin: 2.5em 0;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(24px, 3vw, 40px);
  border: 1.5px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: clamp(22px, 3vw, 34px);
}
.article-contact-copy .eyebrow { margin-bottom: 14px; }
.article-contact-copy h3 {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 36px);
  line-height: 1.05;
  margin-bottom: 12px;
}
.article-contact-copy p { color: var(--ink-2); max-width: 45ch; }
.article-contact-copy .cta-row { margin-top: 22px; }
.article-contact .contact-card {
  border: 1.5px solid var(--line-soft);
  background: color-mix(in srgb, var(--bg) 82%, var(--bg-2));
}
.article-contact .field input,
.article-contact .field textarea {
  background: color-mix(in srgb, var(--bg) 78%, var(--bg-2));
  border-color: var(--line);
}
.article-contact .field input:focus,
.article-contact .field textarea:focus { border-color: var(--accent); }
.article-contact .btn { width: 100%; justify-content: center; }
@media (max-width: 860px) {
  .article-contact { grid-template-columns: 1fr; }
}

/* --- Contact form inline (from [contact] in markdown) --- */
.article-form-wrap {
  max-width: 520px;
  margin: 1.6em auto 0;
  text-align: left;
}
.article-form-wrap .field {
  display: block;
  margin-bottom: 14px;
}
.article-form-wrap .field input,
.article-form-wrap .field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 13px 14px;
  color: var(--cta-fg);
  background: color-mix(in srgb, var(--cta-fg) 8%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--cta-fg) 30%, transparent);
  border-radius: var(--radius);
  transition: border-color .2s;
}
.article-form-wrap .field input::placeholder,
.article-form-wrap .field textarea::placeholder {
  color: color-mix(in srgb, var(--cta-fg) 45%, transparent);
}
.article-form-wrap .field input:focus,
.article-form-wrap .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.article-form-wrap .field textarea {
  resize: vertical;
  min-height: 96px;
}
.article-form-wrap .btn {
  width: 100%;
  justify-content: center;
}
.article-form-wrap .form-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: color-mix(in srgb, var(--cta-fg) 50%, transparent);
  margin-top: 12px;
  text-align: center;
}

/* --- Table styles (apocalypse page, data tables) --- */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(12px, .9vw, 14px);
  margin: 2em 0;
}
.article-body thead th {
  background: var(--bg-inset);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 10px 8px;
  border-bottom: 2px solid var(--accent);
  text-align: left;
  white-space: nowrap;
}
.article-body tbody td {
  padding: 8px;
  border-bottom: 1.5px solid var(--line-soft);
  color: var(--ink-2);
}
.article-body tbody tr:hover td {
  background: color-mix(in srgb, var(--purple) 6%, transparent);
}
.article-body tbody td:first-child,
.article-body thead th:first-child { padding-left: 4px; }
.article-body .score-high { color: #22c55e; font-weight: 700; }
.article-body .score-medium { color: var(--accent); font-weight: 700; }
.article-body .score-low { color: var(--ink-2); font-weight: 600; }
.article-body .score-danger { color: #ef4444; font-weight: 700; }

/* --- Table scroll wrapper --- */
.table-scroll {
  overflow-x: auto;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  margin: 2em 0;
}
.table-scroll table { margin: 0; border: none; }
.table-scroll thead th { position: sticky; top: 0; z-index: 1; }

/* --- Methodology / explanation cards --- */
.methodology-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 2em 0;
}
.method-card {
  background: var(--bg-2);
  padding: clamp(18px, 2vw, 26px);
}
.method-card h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.method-card p {
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.65;
}

/* --- Disclaimer box --- */
.disclaimer {
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-2));
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1em 1.4em;
  margin: 1.8em 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
}

/* --- No-wrap cell for state names in tables --- */
.nowrap { white-space: nowrap; }

/* ============================================================
   ARTICLES GRID (our-articles page)
   ============================================================ */

.articles-grid {
  max-width: 1100px;
  margin: 0 auto;
}

.articles-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
  margin-bottom: clamp(16px, 2vw, 24px);
}

.article-card {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0 var(--purple);
}

.article-card-img {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-bottom: 1.5px solid var(--line);
  background: var(--bg-inset);
}
.article-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-card-body {
  padding: clamp(16px, 2vw, 22px);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.article-card-body h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(16px, 1.3vw, 20px);
  line-height: 1.15;
  color: var(--ink);
}
.article-card-body p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  flex: 1;
}
.article-card-link {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--purple);
  transition: color .15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.article-card-link:hover {
  color: var(--accent);
}

@media (max-width: 820px) {
  .articles-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .articles-row { grid-template-columns: 1fr; }
}
