/* yqr theme — yourqarocks.com — "Architectural Grid"
 * Mobile-first. Light default (Blueprint). Dark (Midnight Grid) via
 * prefers-color-scheme or the manual toggle.
 * Primary accent: #0055FF blueprint blue. Emerald success reserved, not yet used.
 * 0px radius everywhere. Space Mono (headings/labels/buttons) + IBM Plex Sans (body).
 * Background: static CSS dot-grid + an animated blue constellation canvas
 * layered over it (NeuralBackground engine; slate dots, --accent lines).
 */

/* ---- Fonts (self-hosted, latin subset from Google Fonts — no runtime CDN) ---- */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/SpaceMono-Regular-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/SpaceMono-Bold-latin.woff2') format('woff2');
}
@font-face {
  /* Variable font — the single latin file covers the whole weight axis. */
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('../fonts/IBMPlexSans-latin.woff2') format('woff2');
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, label, select, textarea { font: inherit; }

/* ---- Theme variables ----
 * Default is light ("Blueprint"). Dark ("Midnight Grid") lives behind the
 * prefers-color-scheme: dark query plus the :has(#theme-toggle:checked)
 * manual override (checked = the opposite of the system default).
 */
:root {
  color-scheme: light;
  --bg: #F8F9FA;          /* paper white */
  --fg: #0F172A;          /* deep slate text */
  --muted: #475569;       /* muted text (slate-600) */
  --rule: #CBD5E1;        /* grid lines, borders, dots (slate-300) */
  --rule-strong: var(--fg);
  --code-bg: #FFFFFF;     /* surface — cards, code, inputs */
  --accent: #0055FF;      /* blueprint blue — CTAs, links, interactive */
  --accent-fg: #FFFFFF;   /* text on accent */
  --glitch-a: #E5484D;    /* chromatic split, warm side */
  --glitch-b: #00B4D8;    /* chromatic split, cool side */

  --font-heading: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --container: 80%;   /* percentage, not a fixed measure — content tracks the viewport */
  --leading: 1.6;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4rem;
}

/* System dark preference */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0B0F19;        /* deep obsidian */
    --fg: #F1F5F9;        /* crisp off-white */
    --muted: #94A3B8;     /* muted text (slate-400) */
    --rule: #334155;      /* structural lines, dots (slate-700) */
    --code-bg: #111827;   /* elevated surface */
    --accent: #3B82F6;    /* neon blue */
    --accent-fg: #0B0F19; /* dark text on accent (AA on #3B82F6) */
    --glitch-a: #FF4D6D;  /* brighter split — dark ground eats saturation */
    --glitch-b: #22D3EE;
  }
}

/* Manual toggle: invert whatever the current default is */
html:has(#theme-toggle:checked) {
  color-scheme: dark;
  --bg: #0B0F19;
  --fg: #F1F5F9;
  --muted: #94A3B8;
  --rule: #334155;
  --code-bg: #111827;
  --accent: #3B82F6;
  --accent-fg: #0B0F19;
  --glitch-a: #FF4D6D;
  --glitch-b: #22D3EE;
}
@media (prefers-color-scheme: dark) {
  html:has(#theme-toggle:checked) {
    color-scheme: light;
    --bg: #F8F9FA;
    --fg: #0F172A;
    --muted: #475569;
    --rule: #CBD5E1;
    --code-bg: #FFFFFF;
    --accent: #0055FF;
    --accent-fg: #FFFFFF;
    --glitch-a: #E5484D;
    --glitch-b: #00B4D8;
  }
}

/* ---- Body / typography ---- */
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: var(--leading);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Blueprint dot-grid background (static, pure CSS, both themes) ---- */
/* Two stacked background layers, both behind content (z-index: -1):
 * body::before paints the static grid first; the .neural-bg canvas paints
 * over it (same z-index → later in tree order wins), so the animated blue
 * constellation reads on top of the grid. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(var(--rule) 1px, transparent 1.6px);
  background-size: 32px 32px;
}

/* ---- Animated constellation (canvas), layered over the dot-grid ---- */
.neural-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.8;
}

::selection { background: var(--accent); color: var(--accent-fg); }

/* ---- Structure: zero radius, everywhere, no exceptions ---- */
* { border-radius: 0 !important; }

/* ---- A11y helpers ---- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  padding: var(--space-2) var(--space-3);
  background: var(--accent);
  color: var(--accent-fg);
  text-decoration: none;
  z-index: 100;
  font-family: var(--font-mono);
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Theme toggle ---- */
.theme-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  margin: -1px;
}
.theme-toggle-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--rule);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 1.125rem;
  user-select: none;
  transition: border-color 0.15s ease, color 0.15s ease;
  flex: 0 0 auto;
  order: 3;
}
.theme-toggle-label:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle:focus-visible + * .theme-toggle-label,
.theme-toggle:focus-visible ~ * .theme-toggle-label,
.theme-toggle-label:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* ---- Header ---- */
.site-header {
  border-bottom: 1px solid var(--rule);
  padding: var(--space-3) 0;
}
.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: inherit;
  font-family: var(--font-heading);
  line-height: 1.2;
  flex: 0 0 100%;
}
.brand-mark {
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1rem;
  text-transform: uppercase;
}
.brand-name::before { content: "› "; color: var(--accent); }
.brand-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.site-nav {
  flex: 1 1 auto;
  order: 2;
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.site-nav a {
  text-decoration: none;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  color: var(--muted);
}
.site-nav a:hover, .site-nav a:focus-visible {
  border-bottom-color: var(--accent);
  color: var(--accent);
}
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

/* ---- Main ---- */
.site-main { padding: var(--space-5) 0 var(--space-7); }

/* ---- Headings ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: var(--space-5) 0 var(--space-3);
  font-weight: 700;
}
h1 { font-size: 2rem; margin-top: 0; letter-spacing: -2px; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

/* ---- Links ---- */
.entry-content a,
.lede a,
p a {
  color: var(--accent);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.entry-content a:hover,
.entry-content a:focus-visible,
.lede a:hover,
p a:hover { color: var(--fg); text-decoration-color: var(--fg); }

/* ---- Hero ---- */
/* Page titles are centred; body copy underneath stays left-aligned. */
.hero,
.entry > header,
.entry-content > .lede:first-child {
  text-align: center;
}

.hero {
  padding: var(--space-5) 0 var(--space-4);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--rule);
}
.hero h1 {
  font-size: clamp(2rem, 4vw + 1rem, 2.75rem);
  margin: 0 0 var(--space-2);
}
.hero .lede {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0;
}

.section-heading {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: var(--space-5) 0 var(--space-3);
}

/* ---- Entry list ---- */
.entry-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-4);
}
.entry-list .entry {
  border-bottom: 1px solid var(--rule);
  padding-bottom: var(--space-4);
}
.entry-list .entry:last-child { border-bottom: 0; }
.entry-title {
  margin: 0 0 var(--space-2);
  font-size: 1.25rem;
}
.entry-title a {
  text-decoration: none;
  color: var(--fg);
}
.entry-title a:hover { color: var(--accent); }
.entry-summary { color: var(--muted); }
.entry-summary p { margin: var(--space-2) 0 0; }

/* ---- Entry meta ---- */
.entry-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: var(--space-1);
}
.entry-meta a {
  color: var(--muted);
  text-decoration: none;
}
.entry-meta a:hover { color: var(--accent); }

/* ---- Article body ---- */
.entry-content > * + * { margin-top: var(--space-3); }
.entry-content h2, .entry-content h3 { margin-top: var(--space-6); }
.entry-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0 var(--space-3);
  margin: var(--space-4) 0;
  color: var(--muted);
  font-style: italic;
}
.entry-content code {
  font-family: var(--font-mono);
  background: var(--code-bg);
  border: 1px solid var(--rule);
  padding: 0.1em 0.35em;
  font-size: 0.9em;
}
.entry-content pre {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  padding: var(--space-3);
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.5;
}
.entry-content pre code { background: transparent; border: 0; padding: 0; font-size: 1em; }
.entry-content hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: var(--space-5) 0;
}
.entry-content ul, .entry-content ol { padding-left: var(--space-4); }
.entry-content li + li { margin-top: var(--space-2); }
.entry-content table {
  border-collapse: collapse;
  width: 100%;
  margin: var(--space-4) 0;
  font-size: 0.95rem;
  border: 3px solid var(--rule-strong);
  background: var(--code-bg);
}
.entry-content th, .entry-content td {
  border: 1px solid var(--rule);
  padding: var(--space-2) var(--space-3);
  text-align: left;
}
.entry-content th {
  background: var(--accent);
  color: var(--accent-fg);
  font-family: var(--font-heading);
  text-transform: uppercase;
}

/* ---- Why grid (homepage) ---- */
.why-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
  list-style: none;
  padding: 0;
  margin: var(--space-5) 0 0;
}
.why-card {
  position: relative;
  padding: var(--space-4);
  border: 2px solid var(--rule-strong);
  background: var(--code-bg);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.why-card:has(a:hover),
.why-card:has(a:focus-visible) {
  border-color: var(--accent);
}
.why-card:has(a:hover) .why-num,
.why-card:has(a:focus-visible) .why-num {
  color: var(--accent);
}
.why-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  margin-bottom: var(--space-3);
  transition: color 0.15s ease;
}
.why-title {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 1.15rem;
  margin: 0 0 var(--space-2);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.why-teaser {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Wide card (spans full grid width — used for card 09) */
@media (min-width: 640px) {
  .why-card--wide {
    grid-column: span 2;
  }
}

/* Punchline below the grid — hidden until selected */
.why-punchline {
  margin: var(--space-6) 0 var(--space-5);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--bg); /* matches page background — invisible in both themes */
  border-top: 1px solid var(--rule);
  padding-top: var(--space-5);
  font-style: italic;
  max-width: 60ch;
  cursor: text;
  user-select: text;
}

.home-cta {
  margin-top: var(--space-6);
  padding: var(--space-4);
  border-left: 3px solid var(--accent);
  font-family: var(--font-mono);
  font-size: 0.95rem;
}
.home-cta p { margin: 0; }
.home-cta a {
  color: var(--accent);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.home-cta a:hover { color: var(--fg); text-decoration-color: var(--fg); }

/* ---- Home hero + pitch ---- */
.hero-home {
  border-bottom: 0;
  padding: var(--space-7) 0 var(--space-3);
  margin-bottom: 0;
}
.hero-home h1 {
  font-size: clamp(2.5rem, 8vw + 1rem, 4.5rem);
  line-height: 0.95;
  letter-spacing: -2px;
  margin: 0 0 var(--space-2);
}
.hero-home .lede {
  font-size: 1.15rem;
}

/* ---- Headline glitch word ---- */
/*
 * "can" is absent most of the cycle and cuts in with a chromatic split for
 * roughly a quarter of it. Width is not reserved: the span collapses via
 * font-size: 0, so the headline reflows around it instead of holding a gap.
 * steps(1) keeps every transition a hard cut — no fades, no width wipe.
 */
.glitch-word {
  display: inline-block;
  font-size: 0;
  padding-left: 0.55em;   /* the word's leading space; em-scaled, so it
                             collapses to 0 with the font-size */
  animation: glitch-word 9s steps(1) infinite;
}
/* The "s" runs on the exact inverse phase, so the headline is always a
   grammatical sentence: "Your QA rocks." or "Your QA can rock." — never
   "Your QA rock." */
.glitch-s {
  display: inline-block;
  font-size: 1em;
  animation: glitch-s 9s steps(1) infinite;
}

@keyframes glitch-word {
  0%,   68%   { font-size: 0; }
  68.5%       { font-size: 1em; transform: translate(-0.04em, 0.02em);
                text-shadow: 0.05em 0 var(--glitch-a), -0.05em 0 var(--glitch-b); }
  69%         { font-size: 0; }
  70%         { font-size: 1em; transform: translate(0.03em, -0.02em);
                text-shadow: -0.06em 0 var(--glitch-a), 0.04em 0 var(--glitch-b); }
  70.6%       { font-size: 1em; transform: none; text-shadow: none; }
  92%         { font-size: 1em; transform: none; text-shadow: none; }
  92.4%       { font-size: 1em; transform: translate(0.05em, 0);
                text-shadow: 0.06em 0 var(--glitch-a), -0.06em 0 var(--glitch-b); }
  93%         { font-size: 0; }
  94%         { font-size: 1em; transform: translate(-0.03em, 0.01em);
                text-shadow: -0.05em 0 var(--glitch-b), 0.05em 0 var(--glitch-a); }
  94.6%, 100% { font-size: 0; }
}

@keyframes glitch-s {
  0%,   68%   { font-size: 1em; transform: none; text-shadow: none; }
  68.5%       { font-size: 0; }
  69%         { font-size: 1em; transform: translate(0.03em, -0.02em);
                text-shadow: 0.05em 0 var(--glitch-b), -0.05em 0 var(--glitch-a); }
  70%, 92.4%  { font-size: 0; }
  93%         { font-size: 1em; transform: translate(-0.04em, 0.01em);
                text-shadow: -0.06em 0 var(--glitch-b), 0.04em 0 var(--glitch-a); }
  94%         { font-size: 0; }
  94.6%       { font-size: 1em; transform: translate(0.04em, 0);
                text-shadow: 0.05em 0 var(--glitch-a), -0.05em 0 var(--glitch-b); }
  95.2%, 100% { font-size: 1em; transform: none; text-shadow: none; }
}

.home-pitch {
  margin-top: var(--space-4);
}
.home-pitch p {
  margin: var(--space-4) 0;
  font-size: 1.05rem;
}

.cta-primary {
  display: inline-block;
  margin: var(--space-3) 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  background: var(--accent);
  color: var(--accent-fg);
  border: 1px solid var(--accent);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cta-primary:hover,
.cta-primary:focus-visible {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
  text-decoration: none;
}
.cta-secondary {
  display: inline-block;
  margin: var(--space-3) 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cta-secondary:hover,
.cta-secondary:focus-visible {
  background: var(--accent);
  color: var(--accent-fg);
  text-decoration: none;
}
.cta-group .cta-secondary {
  flex: 0 1 auto;
  margin: 0;
  text-align: center;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-3) 0 var(--space-4);
}
.cta-group .cta-primary {
  flex: 0 1 auto;
  margin: 0;
  text-align: center;
}

/* ---- Page table of contents ---- */
.page-toc {
  margin: 0 0 var(--space-6);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--rule);
  background: var(--code-bg);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}
.page-toc-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 var(--space-2);
  font-weight: 700;
}
.page-toc ol {
  margin: 0;
  padding-left: var(--space-4);
}
.page-toc > ol { padding-left: var(--space-3); }
.page-toc li { margin: 0.2rem 0; }
.page-toc a {
  color: var(--muted);
  text-decoration: none;
}
.page-toc a:hover { color: var(--accent); }

/* ---- Structured task lists (1., 1.1, 1.2 numbering) ---- */
.sqe-tasks-list {
  list-style: decimal;
  padding-left: var(--space-4);
  margin: var(--space-3) 0;
}
.sqe-tasks-list > li {
  margin-bottom: var(--space-3);
  padding-left: var(--space-1);
}
.sqe-tasks-list > li > p { margin: 0 0 var(--space-2); }
.sqe-subtasks {
  list-style: none;
  padding-left: var(--space-4);
  margin: var(--space-2) 0 0;
}
.sqe-subtasks li {
  margin: var(--space-1) 0;
  display: flex;
  gap: var(--space-2);
  align-items: baseline;
}
.task-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  flex: 0 0 2.5rem;
}

/* Section sub-headings (h4 used for Autonomy, Influence etc.) */
.entry-content h4 {
  margin-top: var(--space-4);
  margin-bottom: var(--space-1);
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

/* ---- Agree CTA (senior-qa, contact prompts) ---- */
.agree-cta {
  margin: var(--space-5) 0;
  padding: var(--space-4);
  border-left: 3px solid var(--accent);
  font-family: var(--font-mono);
  font-size: 0.95rem;
}
.agree-cta p { margin: 0; }
.agree-cta a {
  color: var(--accent);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.agree-cta a:hover { color: var(--fg); text-decoration-color: var(--fg); }

/* ---- Expand sections (details/summary) ---- */
.expand-section {
  border: 1px solid var(--rule);
  background: var(--code-bg);
  margin: var(--space-3) 0;
}
.expand-section + .expand-section { margin-top: 0; border-top: 0; }
.expand-section summary {
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  user-select: none;
}
.expand-section summary::-webkit-details-marker { display: none; }
.expand-section summary::before {
  content: '›';
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.15s ease;
  flex: 0 0 auto;
}
.expand-section[open] > summary::before { transform: rotate(90deg); }
.expand-section summary:hover { color: var(--accent); }
.expand-body {
  padding: 0 var(--space-4) var(--space-4);
  border-top: 1px solid var(--rule);
}
.expand-body > p:first-child { margin-top: var(--space-3); }

/* Nested expand sections */
.expand-section--nested {
  margin: var(--space-2) 0;
  background: var(--bg);
}
.expand-section--nested summary {
  font-size: 0.95rem;
  font-weight: 600;
  padding: var(--space-2) var(--space-3);
}
.expand-section--nested .expand-body {
  padding: 0 var(--space-3) var(--space-3);
}

/* ---- Senior QA section nav (sub-pages) ---- */
.sqe-nav {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--rule);
}
.sqe-breadcrumb {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: var(--space-2);
}
.sqe-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.sqe-breadcrumb a:hover { color: var(--accent); }
.sqe-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.sqe-nav-list a {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--rule);
  text-decoration: none;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.sqe-nav-list a:hover,
.sqe-nav-list a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}
.sqe-nav-list li.active a {
  border-color: var(--accent);
  color: var(--accent);
}
.sqe-nav-list .sqe-nav-child {
  font-size: 0.75rem;
  opacity: 0.85;
}
.sqe-nav-list .sqe-nav-child a {
  padding: 0.15rem 0.45rem;
}

/* ---- Senior QA index tree ---- */
.sqe-tree {
  margin: var(--space-5) 0;
}
.sqe-tree > ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
}
.sqe-tree-item {
  border: 1px solid var(--rule);
  border-top: 0;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  background: var(--code-bg);
}
.sqe-tree-item:first-child { border-top: 1px solid var(--rule); }
.sqe-tree-item a {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--fg);
  white-space: nowrap;
  flex: 0 0 auto;
}
.sqe-tree-item a:hover { color: var(--accent); }
.sqe-tree-item p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.45;
}
.sqe-tree-children {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}
.sqe-tree-children li {
  border-top: 1px solid var(--rule);
  padding: var(--space-2) var(--space-4) var(--space-2) calc(var(--space-4) + 1rem);
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  font-size: 0.875rem;
}
.sqe-tree-children li:first-child { border-top: 0; }
.sqe-tree-children a {
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  white-space: nowrap;
  flex: 0 0 auto;
}
.sqe-tree-children a:hover { color: var(--accent); }
.sqe-tree-children p {
  margin: 0;
  font-size: 0.825rem;
  color: var(--muted);
}

/* ---- Senior QA roadmap diagram (/senior-qa/roadmap/) ---- */
.sqe-diagram-wrap {
  overflow-x: auto;
  margin: var(--space-5) 0;
}
.sqe-diagram {
  position: relative;
  width: var(--diagram-w);
  height: var(--diagram-h);
  min-width: 100%;
}
.sqe-diagram-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.sqe-diagram-edge {
  fill: none;
  stroke: var(--rule-strong);
  stroke-width: 2;
  transition: stroke 0.15s ease;
}
.sqe-diagram-edge--branch {
  stroke: var(--rule);
  stroke-width: 2;
  stroke-dasharray: 5 4;
}
.sqe-diagram-edge.active { stroke: var(--accent); }
.sqe-diagram-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-3);
  border: 1px solid var(--rule);
  background: var(--code-bg);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.sqe-diagram-node:hover,
.sqe-diagram-node:focus-visible {
  border-color: var(--accent);
}
.sqe-diagram-node--child { background: var(--bg); }
.sqe-diagram-node-title {
  display: block;
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--fg);
}
.sqe-diagram-node--child .sqe-diagram-node-title { font-size: 0.8rem; }
.sqe-diagram-node:hover .sqe-diagram-node-title,
.sqe-diagram-node:focus-visible .sqe-diagram-node-title {
  color: var(--accent);
}
.sqe-diagram-node-teaser {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}

/* Table pages — full-width table override */
.entry-content .sqe-table {
  font-size: 0.875rem;
  margin: var(--space-4) 0;
}
.entry-content .sqe-table th {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ---- Tag list ---- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
}
.tag-list a {
  text-decoration: none;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--rule);
  color: var(--muted);
}
.tag-list a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- Archive ---- */
.archive-year {
  margin: var(--space-5) 0 var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.1em;
}
.archive-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.archive-list li {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.archive-list time {
  flex: 0 0 4rem;
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.archive-list a {
  text-decoration: none;
  color: var(--fg);
}
.archive-list a:hover { color: var(--accent); }

/* ---- Pagination ---- */
.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-6);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.pagination a {
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--rule);
  color: var(--muted);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }

/* ---- Contact icons ---- */
/* ---- Proof cases (/proof/) ---- */
.proof-case,
.proof-published {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 2px solid var(--rule-strong);
}
.proof-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin: 0 0 var(--space-2);
}
.proof-eyebrow-sub {
  display: block;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: none;
  margin-top: var(--space-1);
}
.entry-content .proof-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-4);
}
.proof-block { margin: 0 0 var(--space-3); }
.proof-block-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: var(--space-1);
}

/* Metric tiles — the numbers do the selling */
.entry-content .proof-metrics,
.home-pitch .proof-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0;
}
.entry-content .proof-metrics li + li,
.home-pitch .proof-metrics li + li { margin-top: 0; }
.proof-metric {
  background: var(--code-bg);
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.proof-figure {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.proof-metric-label {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--muted);
}
.proof-note {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
  border-left: 3px solid var(--rule);
  padding-left: var(--space-3);
  margin: var(--space-4) 0 0;
}
@media (min-width: 560px) {
  .entry-content .proof-metrics,
  .home-pitch .proof-metrics { grid-template-columns: repeat(2, 1fr); }
  .proof-figure { font-size: 2rem; }
}
@media (min-width: 860px) {
  .entry-content .proof-metrics,
  .home-pitch .proof-metrics { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Testimonials (/who/) ---- */
.entry-content .testimonial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  list-style: none;
  padding: 0;
  margin: var(--space-5) 0;
}
.entry-content .testimonial-grid li + li { margin-top: 0; }
.testimonial {
  border: 2px solid var(--rule);
  background: var(--code-bg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease;
}
.testimonial:hover { border-color: var(--accent); }
.entry-content .testimonial blockquote {
  margin: 0 0 var(--space-3);
  padding: 0;
  border: 0;
  flex: 1;
}
.entry-content .testimonial blockquote p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}
.entry-content .testimonial blockquote p::before { content: "\201C"; }
.entry-content .testimonial blockquote p::after { content: "\201D"; }
.testimonial-by {
  margin: 0;
  padding-top: var(--space-3);
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.testimonial-role {
  display: block;
  margin-top: var(--space-1);
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.78rem;
}
.who-caveat {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
  border-left: 3px solid var(--rule);
  padding-left: var(--space-3);
}
@media (min-width: 720px) {
  .entry-content .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
}

.contact-links {
  display: flex;
  gap: var(--space-3);
  margin: var(--space-5) 0;
}
.contact-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  color: var(--muted);
  border: 1px solid var(--rule);
  background: var(--code-bg);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.contact-link:hover,
.contact-link:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}
.contact-link svg {
  width: 1.4rem;
  height: 1.4rem;
  display: block;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: var(--space-4) 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}
.site-footer a:hover { color: var(--accent); }
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
}
.footer-row p { margin: 0; }
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav a { text-transform: uppercase; }

/* ---- Mobile spacing overrides ---- */
@media (max-width: 639px) {
  .site-main { padding-top: var(--space-3); }
  .container { max-width: 90%; }   /* phones: 5% gutters, header/main/footer aligned */
  .hero { padding-top: var(--space-3); }
  .hero-home { padding-top: var(--space-4); }
  .why-punchline { display: none; }
  .home-cta { margin-top: var(--space-3); }
}

/* ---- Tablet ---- */
@media (min-width: 640px) {
  .brand { flex: 1 1 auto; }
  .site-nav { flex: 0 0 auto; order: 0; margin-left: auto; }
  .theme-toggle-label { order: 0; }
  .header-row { flex-wrap: nowrap; }
  .hero { padding: var(--space-7) 0 var(--space-5); }
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.3rem; }
  .entry-title { font-size: 1.4rem; }
  .why-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
  .why-title { font-size: 1.25rem; }
}

/* ---- Desktop ---- */
@media (min-width: 1024px) {
  .site-nav ul { gap: var(--space-5); }
  h1 { font-size: 3rem; }
  .hero h1 { font-size: clamp(2.5rem, 4vw + 1rem, 3.25rem); }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .glitch-word { animation: none; font-size: 1em; }
  .glitch-s { animation: none; font-size: 0; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .neural-bg { display: none !important; }
}

/* ---- Print ---- */
@media print {
  body::before, .neural-bg { display: none; }
  .site-header, .site-footer, .pagination, .skip-link, .theme-toggle-label { display: none; }
  body { color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
  .entry-content pre, .entry-content code { background: #f4f4f4; color: #000; }
}
