/* Tokens — change the look here. Dark, technical, AI-forward:
   graphite base, cyan + violet signal colours, monospace labels. */
:root {
  --bg: #0B0D12;
  --bg-alt: #0F1219;
  --surface: #151922;
  --raised: #1C2130;
  --text: #E8ECF2;
  --text-muted: #9AA3B2;
  --line: #262D3B;
  --accent: #22D3EE;
  --accent-2: #8B5CF6;
  --accent-3: #60A5FA;
  --on-accent: #06121A;
  --glow: rgba(34, 211, 238, .14);
  --glow-2: rgba(139, 92, 246, .16);
  --grid: rgba(255, 255, 255, .035);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-12: .75rem; --fs-14: .875rem; --fs-16: 1rem; --fs-18: 1.125rem;
  --fs-24: 1.5rem; --fs-32: 2rem; --fs-48: 3rem; --fs-64: 4rem;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-6: 24px;
  --s-8: 32px; --s-12: 48px; --s-16: 64px; --s-24: 96px;
  --wrap: 1120px;
  --prose: 64ch;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-16);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-weight: 600; line-height: 1.1; margin: 0 0 var(--s-4); letter-spacing: -.02em; }
p { margin: 0 0 var(--s-4); }

.wrap { width: min(var(--wrap), 100% - 2 * var(--s-4)); margin-inline: auto; }

/* Missing-content markers. Visible on purpose: nothing ships invented. */
.fill { background: #FFF2A8; color: #111; font-weight: 600; padding: 0 var(--s-1); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 13, 18, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav ul {
  list-style: none; margin: 0 auto; padding: var(--s-4);
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3) var(--s-12);
}
.nav a {
  text-decoration: none; text-transform: uppercase;
  font-family: var(--mono); font-size: var(--fs-12); letter-spacing: .12em; color: var(--text-muted);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }

/* Hero: faint grid with a cyan/violet glow behind the card */
.hero {
  padding: var(--s-16) 0 var(--s-12);
  background:
    radial-gradient(60% 50% at 20% 30%, var(--glow), transparent 70%),
    radial-gradient(50% 50% at 85% 20%, var(--glow-2), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--bg);
}
.hero-card {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--s-12); align-items: center;
  padding: var(--s-6) var(--s-6) var(--s-6) var(--s-12);
  background: rgba(21, 25, 34, .72);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.hero-card h1 { font-size: var(--fs-64); }
.hero-card p { font-size: var(--fs-18); color: var(--text-muted); max-width: var(--prose); }
.hero-card img {
  width: 100%; aspect-ratio: 4 / 5; max-height: 520px;
  object-fit: cover; object-position: top; border-radius: calc(var(--radius) - 4px);
}
.role {
  font-family: var(--mono); font-size: var(--fs-14); letter-spacing: .08em; text-transform: uppercase;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-card .role { color: transparent; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0; margin: 0 0 var(--s-6); }
.chips li {
  font-family: var(--mono); font-size: var(--fs-12); color: var(--text);
  padding: var(--s-1) var(--s-3); border: 1px solid var(--line); border-radius: 999px; background: var(--raised);
}
.hero-actions { display: flex; align-items: center; gap: var(--s-6); }
.icon-link { display: inline-flex; width: 28px; height: 28px; color: var(--text-muted); }
.icon-link:hover { color: var(--accent); }
.icon-link svg { width: 100%; height: 100%; fill: currentColor; }

.btn {
  display: inline-block; padding: var(--s-3) var(--s-6); border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 700;
  text-decoration: none; text-transform: uppercase; letter-spacing: .1em; font-size: var(--fs-12);
}
.btn:hover { background: var(--text); }

/* Project tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); margin-top: var(--s-6); }
.tile {
  --c: var(--accent);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: var(--s-2);
  min-height: 132px; padding: var(--s-6);
  text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s ease, transform .2s ease;
}
.tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--c); }
.tile:nth-child(2) { --c: var(--accent-2); }
.tile:nth-child(3) { --c: var(--accent-3); }
.tile em { font-style: normal; font-size: var(--fs-14); color: var(--text-muted); }
.tile strong { font-size: var(--fs-18); font-weight: 600; }
.tile span { font-family: var(--mono); font-size: var(--fs-12); color: var(--c); }
a.tile:hover { border-color: var(--c); transform: translateY(-3px); }

/* Project write-ups */
.project { --c: var(--accent); padding: var(--s-16) 0; background: var(--bg); border-top: 1px solid var(--line); scroll-margin-top: 64px; }
.project:nth-of-type(even) { background: var(--bg-alt); }
#search-ads { --c: var(--accent-2); }
#labor-forecasting { --c: var(--accent-3); }
.eyebrow { font-family: var(--mono); font-size: var(--fs-12); letter-spacing: .1em; text-transform: uppercase; color: var(--c); margin-bottom: var(--s-3); }
.project h2 { font-size: var(--fs-48); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); margin: var(--s-6) 0 var(--s-12); }
.metric {
  padding: var(--s-6); font-size: var(--fs-14); color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: var(--radius);
}
.metric strong { display: block; font-size: var(--fs-32); line-height: 1.1; margin-bottom: var(--s-2); color: var(--text); letter-spacing: -.02em; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-12); align-items: start; }
.split p, .split ul { max-width: var(--prose); color: var(--text-muted); }
.project h3 { font-size: var(--fs-18); margin: var(--s-6) 0 var(--s-2); }
.project h3:first-child { margin-top: 0; }
.project ul { padding-left: var(--s-6); margin: 0 0 var(--s-4); }
.project li { margin-bottom: var(--s-2); }
.project li::marker { color: var(--c); }
.facts { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-6); margin: 0; }
.facts div + div { margin-top: var(--s-4); }
.facts dt { font-family: var(--mono); font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }
.facts dd { margin: var(--s-1) 0 0; }
.shot { margin: 0 0 var(--s-6); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

/* Page title on the Physical Products tab */
.page-title {
  padding: var(--s-16) 0 var(--s-12);
  background:
    radial-gradient(50% 60% at 15% 40%, var(--glow), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--bg);
}
.page-title h1 { font-size: var(--fs-64); }
.page-title p { font-size: var(--fs-18); color: var(--text-muted); max-width: var(--prose); }

/* Footer — the contact block */
.footer { background: var(--surface); border-top: 1px solid var(--line); }
.footer-grid { width: min(var(--wrap), 100% - 2 * var(--s-4)); margin-inline: auto; }
.footer-text { padding: var(--s-16) 0; }
.footer-text h2 { font-size: var(--fs-32); margin-bottom: var(--s-4); }
.footer-text ul { list-style: none; padding: 0; margin: var(--s-6) 0 var(--s-12); }
.footer-text li { margin-bottom: var(--s-2); }
.footer-text li a { text-decoration: none; color: var(--text-muted); }
.footer-text li a:hover { color: var(--accent); }
.footer-text address { font-style: normal; font-family: var(--mono); font-size: var(--fs-14); color: var(--text-muted); }
.footer-text address a:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile { transition: none; }
  a.tile:hover { transform: none; }
}

@media (max-width: 800px) {
  .nav ul { gap: var(--s-3) var(--s-6); }
  .hero { padding-top: var(--s-8); }
  .hero-card, .split { grid-template-columns: 1fr; }
  .hero-card { padding: var(--s-6); gap: var(--s-6); }
  .hero-card h1, .page-title h1 { font-size: var(--fs-48); }
  .tiles, .metrics { grid-template-columns: 1fr; }
  .hero-card img { order: -1; aspect-ratio: auto; height: 320px; max-height: none; }
  .project h2 { font-size: var(--fs-32); }
  .hero-actions { flex-wrap: wrap; }
  .footer-text { padding: var(--s-12) 0; }
}

@media (min-width: 801px) and (max-width: 1100px) { .tiles { grid-template-columns: 1fr 1fr; } }

/* Headline numbers under the intro */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4);
  margin: 0 0 var(--s-6); padding: var(--s-4) 0; border-block: 1px solid var(--line);
}
.stats dt {
  font-size: var(--fs-24); font-weight: 700; letter-spacing: -.02em; line-height: 1.1;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stats dd { margin: var(--s-1) 0 0; font-family: var(--mono); font-size: var(--fs-12); color: var(--text-muted); }
@media (max-width: 800px) { .stats { grid-template-columns: 1fr 1fr 1fr; gap: var(--s-3); } }
.hero-card p strong { color: var(--text); font-weight: 600; }

/* Highlighted Products heading above the tiles */
.highlights { padding-top: var(--s-6); }
.highlights h2 { font-family: var(--mono); font-size: var(--fs-14); font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0; }
.highlights .tiles { margin-bottom: var(--s-16); }
.tile { justify-content: flex-start; min-height: 96px; }

/* ---------- Product case-study pages ---------- */
.ph {
  display: grid; place-items: center; min-height: 220px; padding: var(--s-6);
  text-align: center; font-family: var(--mono); font-size: var(--fs-14); color: var(--text-muted);
  background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 12px, var(--bg-alt) 12px, var(--bg-alt) 24px);
  border: 1px dashed var(--line); border-radius: var(--radius);
}
.ph.tall { min-height: 360px; }

.case-hero {
  --c: var(--accent);
  padding: var(--s-24) 0 var(--s-16); text-align: center;
  background:
    radial-gradient(50% 60% at 50% 30%, var(--glow), transparent 70%),
    radial-gradient(40% 50% at 85% 60%, var(--glow-2), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.kicker { font-family: var(--mono); font-size: var(--fs-12); letter-spacing: .2em; text-transform: uppercase; color: var(--c); margin-bottom: var(--s-4); }
.case-hero h1 { font-size: var(--fs-64); margin-bottom: var(--s-6); }
.case-hero p { font-size: var(--fs-18); color: var(--text-muted); max-width: var(--prose); margin-inline: auto; }
.case-hero .metrics { max-width: 860px; margin: var(--s-12) auto 0; text-align: left; }

.case-layout { display: grid; grid-template-columns: 220px 1fr; gap: var(--s-12); padding: var(--s-12) 0 var(--s-16); }
.toc { position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 96px); overflow-y: auto; }
.toc p { font-family: var(--mono); font-size: var(--fs-12); letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--s-3); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: var(--s-1) var(--s-3); margin-left: -1px; border-left: 2px solid transparent;
  font-size: var(--fs-14); color: var(--text-muted); text-decoration: none;
}
.toc a:hover { color: var(--text); border-left-color: var(--accent); }

.case-body { min-width: 0; }
.cs { --c: var(--accent); padding: var(--s-12) 0; border-bottom: 1px solid var(--line); scroll-margin-top: 72px; }
.cs:first-child { padding-top: 0; }
.cs h2 { font-size: var(--fs-32); }
.cs h3 { font-size: var(--fs-18); margin: var(--s-6) 0 var(--s-2); }
.cs p, .cs li { color: var(--text-muted); }
.cs p { max-width: var(--prose); }
.cs ul { padding-left: var(--s-6); max-width: var(--prose); }
.cs li { margin-bottom: var(--s-2); }
.cs li::marker { color: var(--c); }
.cs .split { margin-top: var(--s-6); }
.cs .metrics { margin: var(--s-6) 0; }
.metrics.four { grid-template-columns: repeat(4, 1fr); }
.metrics.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .metrics.four { grid-template-columns: 1fr 1fr; } }
.hypothesis {
  margin: var(--s-6) 0 0; padding: var(--s-6); max-width: var(--prose);
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent-2); border-radius: var(--radius);
  font-size: var(--fs-18); font-style: italic;
}
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); margin-top: var(--s-6); }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.cards.one { grid-template-columns: 1fr; }
.card { padding: var(--s-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.steps { list-style: none; padding: 0; margin: var(--s-6) 0 0; display: grid; gap: var(--s-4); counter-reset: step; max-width: none; }
.steps > li { counter-increment: step; padding: var(--s-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 0; }
.steps > li::before { content: "Step " counter(step); display: block; font-family: var(--mono); font-size: var(--fs-12); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s-2); }
.steps strong { color: var(--text); }

.table-wrap { overflow-x: auto; margin-top: var(--s-6); border: 1px solid var(--line); border-radius: var(--radius); }
.table-wrap table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: var(--fs-14); }
.table-wrap th { text-align: left; font-family: var(--mono); font-size: var(--fs-12); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); background: var(--raised); }
.table-wrap th, .table-wrap td { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap td { color: var(--text-muted); }
.table-wrap td:first-child { color: var(--text); font-weight: 600; }
.table-wrap tr:last-child td { border-bottom: 0; }

.case-next { display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; padding-top: var(--s-12); }

@media (max-width: 900px) {
  .case-layout { grid-template-columns: 1fr; gap: var(--s-6); }
  .toc { position: static; max-height: none; overflow-x: auto; }
  .toc ol { display: flex; gap: var(--s-2); border-left: 0; padding-bottom: var(--s-2); }
  .toc a { white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; margin: 0; }
  .cards, .cards.two { grid-template-columns: 1fr; }
  .case-hero { padding: var(--s-16) 0 var(--s-12); }
  .case-hero h1 { font-size: var(--fs-48); }
}
figure.card { margin: 0; }
figure.card figcaption { font-family: var(--mono); font-size: var(--fs-12); color: var(--text-muted); }
.shot figcaption { padding: var(--s-3) var(--s-4); font-family: var(--mono); font-size: var(--fs-12); color: var(--text-muted); background: var(--surface); border-top: 1px solid var(--line); }
@media (max-width: 900px) { .kicker { letter-spacing: .14em; } }

/* Animated network behind the case-study hero (threat-bg.js) */
.case-hero { position: relative; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.case-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(55% 45% at 50% 38%, rgba(11, 13, 18, .82), rgba(11, 13, 18, .25) 75%, transparent);
}
.case-hero > .wrap { position: relative; z-index: 1; }

/* Numbered source notes under a section */
.cs sup a { color: var(--accent); text-decoration: none; font-family: var(--mono); font-size: var(--fs-12); padding-left: 1px; }
.sources { margin: var(--s-4) 0 var(--s-6); padding-left: var(--s-6); font-family: var(--mono); font-size: var(--fs-12); }
.sources li { margin-bottom: var(--s-1); }
.sources a { color: var(--text-muted); }
.sources a:hover { color: var(--accent); }
.cs > .shot { margin-top: var(--s-6); }
.cs > .shot img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.cs > .shot.full img { aspect-ratio: auto; object-fit: contain; }
.cs p a { color: var(--accent); }
.card strong { color: var(--text); }
.research-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); margin: var(--s-6) 0; }
.research-facts div + div { margin-top: 0; }

/* Persona card */
.persona { margin: var(--s-8) 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.persona-head { display: flex; gap: var(--s-6); align-items: center; padding: var(--s-6); border-bottom: 1px solid var(--line); background: var(--raised); }
.avatar {
  flex: none; display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%;
  font-size: var(--fs-24); font-weight: 700; color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
img.avatar { object-fit: cover; background: var(--raised); box-shadow: 0 0 0 2px var(--accent); }
.persona-tag { font-family: var(--mono); font-size: var(--fs-12); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s-1); }
.persona-head h3 { font-size: var(--fs-24); margin: 0 0 var(--s-3); }
.persona-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-8); margin: 0; }
.persona-meta dt { font-family: var(--mono); font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.persona-meta dd { margin: 0; }
.persona-body { display: grid; grid-template-columns: 1.3fr 1fr 1fr; }
.persona-body > div { padding: var(--s-6); }
.persona-body > div + div { border-left: 1px solid var(--line); }
.persona h4 { font-size: var(--fs-14); font-family: var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--text); margin: 0 0 var(--s-3); }
.persona ul { padding-left: var(--s-4); margin: 0; }
.persona p { margin: 0; }

/* Journey map */
.journey table { min-width: 860px; }
.journey thead th { color: var(--accent); }
.journey tbody th { text-align: left; width: 150px; font-family: var(--mono); font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .08em; color: var(--text); background: var(--raised); }
.journey td:first-child { font-weight: 400; color: var(--text-muted); }
.journey tbody tr:last-child td { color: var(--text); }
.mood { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 600; color: var(--text); }
.mood::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--accent)); }
.mood.worried { --c: var(--accent-2); }
.mood.unsure { --c: var(--accent-3); }
.mood.good { --c: var(--accent); }

@media (max-width: 900px) {
  .persona-head { flex-direction: column; align-items: flex-start; }
  .persona-body { grid-template-columns: 1fr; }
  .persona-body > div + div { border-left: 0; border-top: 1px solid var(--line); }
}

/* Proof of concept: one italic paragraph, key phrases in bold, image beside */
#poc .split { align-items: center; margin-top: 0; }
.poc-text { font-style: italic; font-size: var(--fs-18); line-height: 1.7; }
.poc-text strong { color: var(--text); }
.io li strong { color: var(--text); }

/* Data pipeline: four stages in a 2×2 grid */
.steps.pipeline { grid-template-columns: repeat(2, 1fr); }
.pipeline > li h3 { margin: 0 0 var(--s-3); font-size: var(--fs-18); color: var(--text); }
.pipeline ul { padding-left: var(--s-4); margin: 0; }
.pipeline ul li { margin-bottom: var(--s-2); }
.pipeline > li:nth-child(2)::before { color: var(--accent-3); }
.pipeline > li:nth-child(3)::before { color: var(--accent-2); }
@media (max-width: 900px) { .steps.pipeline { grid-template-columns: 1fr; } }
#stack .split { margin-top: 0; align-items: center; }
.stack-list li strong { color: var(--text); }
.model-type { font-family: var(--mono); font-size: var(--fs-12); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-top: auto; }
.models .card { display: flex; flex-direction: column; }
.models .model-type { margin: 0 0 var(--s-4); }
.models h4 { font-family: var(--mono); font-size: var(--fs-12); letter-spacing: .1em; text-transform: uppercase; color: var(--text); margin: var(--s-2) 0 var(--s-1); }

/* System architecture diagram (inline SVG; colours come from the tokens) */
.arch-wrap { overflow-x: auto; margin-top: var(--s-6); padding: var(--s-4); background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); }
.arch { display: block; width: 100%; min-width: 820px; height: auto; font-family: var(--font); }
.arch .box { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.arch .box.src { stroke: var(--accent-3); }
.arch .box.det { stroke: var(--accent); fill: var(--raised); }
.arch .box.llm { stroke: var(--accent-2); fill: var(--raised); }
.arch .box.resp { stroke: var(--accent); }
.arch .box.fb { stroke: var(--accent-3); stroke-dasharray: 5 4; }
.arch .t { fill: var(--text); font-size: 14px; font-weight: 600; }
.arch .s { fill: var(--text-muted); font-size: 12px; }
.arch .col { fill: var(--text-muted); font-family: var(--mono); font-size: 11px; letter-spacing: .12em; }
.arch .lab { fill: var(--text-muted); font-family: var(--mono); font-size: 10px; }
.arch .fbl { fill: var(--accent-3); }
.arch .cloud { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 8 6; }
.arch .cloud-lab { fill: var(--accent); font-family: var(--mono); font-size: 11px; letter-spacing: .14em; }
.arch .ar { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.arch .ar.llm { stroke: var(--accent-2); }
.arch .ar.dash { stroke-dasharray: 4 4; stroke: var(--accent-3); }
.arch .ar.fb { stroke: var(--accent-3); stroke-dasharray: 5 4; }
.arch .ah { fill: var(--accent); }
.arch .ah.llm { fill: var(--accent-2); }
.arch .ah.fb { fill: var(--accent-3); }
.arch-legend { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); padding: 0; margin: var(--s-4) 0 0; font-family: var(--mono); font-size: var(--fs-12); color: var(--text-muted); }
.arch-legend li::before { content: ""; display: inline-block; width: 18px; height: 0; margin-right: var(--s-2); vertical-align: middle; border-top: 2px solid var(--accent); }
.arch-legend .k-llm::before { border-top-color: var(--accent-2); }
.arch-legend .k-fb::before { border-top: 2px dashed var(--accent-3); }

/* Impact vs. effort matrix */
.matrix {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2);
  margin-top: var(--s-6); padding: 0 0 var(--s-8) var(--s-8);
}
.axis { position: absolute; font-family: var(--mono); font-size: var(--fs-12); letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.axis-x { bottom: 0; left: 50%; transform: translateX(-50%); }
.axis-y { left: 0; top: 50%; transform: translateY(-50%) rotate(-90deg); transform-origin: left top; translate: var(--s-3) 3em; white-space: nowrap; }
.quad { --c: var(--accent); padding: var(--s-6); background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: var(--radius); }
.quad h4 { margin: 0 0 var(--s-3); font-size: var(--fs-16); color: var(--text); }
.quad h4 span { display: block; margin-top: var(--s-1); font-family: var(--mono); font-size: var(--fs-12); font-weight: 400; color: var(--c); }
.quad ul { padding-left: var(--s-4); margin: 0; }
.quad li { margin-bottom: var(--s-2); }
.q-bet { --c: var(--accent-2); }
.q-quick { --c: var(--accent-3); }
.q-not { --c: var(--line); }
.q-not h4 span { color: var(--text-muted); }
@media (max-width: 700px) {
  .matrix { grid-template-columns: 1fr; padding: 0; }
  .axis { display: none; }
}

/* Roadmap grid: phases across, workstreams down, items as chips */
.roadmap table { min-width: 760px; table-layout: fixed; }
.roadmap thead th { color: var(--text); font-size: var(--fs-12); }
.roadmap thead th:first-child { width: 112px; }
.roadmap thead th span { display: block; margin-top: var(--s-1); color: var(--accent); }
.roadmap tbody th { text-align: left; font-family: var(--mono); font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .08em; color: var(--text); background: var(--raised); }
.roadmap ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.roadmap li {
  margin: 0; padding: var(--s-2) var(--s-3); font-size: var(--fs-12); line-height: 1.4; color: var(--text);
  background: var(--raised); border-left: 3px solid var(--c, var(--accent)); border-radius: 4px;
}
.roadmap td:first-child { font-weight: 400; }
.r-ai { --c: var(--accent); }
.r-product { --c: var(--accent-2); }
.r-gtm { --c: var(--accent-3); }

/* Tabs */
.tabs { display: inline-flex; gap: var(--s-1); margin-top: var(--s-6); padding: var(--s-1); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.tabs button {
  font: inherit; font-family: var(--mono); font-size: var(--fs-12); letter-spacing: .08em; text-transform: uppercase;
  padding: var(--s-2) var(--s-4); border: 0; border-radius: 999px; background: transparent; color: var(--text-muted); cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.tabs button:hover:not([aria-selected="true"]) { color: var(--text); }
.tabs + .table-wrap, .tabs ~ .build { margin-top: var(--s-4); }

/* Detailed build roadmap: phases as columns of epics, each a short task checklist */
.build { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); }
.build[hidden], .roadmap[hidden] { display: none; }
.build-col { --c: var(--accent); display: grid; align-content: start; gap: var(--s-3); }
.build-col.p2 { --c: var(--accent-2); }
.build-col.p3 { --c: var(--accent-3); }
.build-col.p4 { --c: var(--text-muted); }
.build-phase { margin: 0; padding-bottom: var(--s-2); border-bottom: 2px solid var(--c); font-family: var(--mono); font-size: var(--fs-12); letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
.build-phase span { display: block; color: var(--c); }
.epic { padding: var(--s-3) var(--s-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.epic h4 { margin: 0 0 var(--s-2); font-size: var(--fs-14); color: var(--text); }
.epic ul { list-style: none; padding: 0; margin: 0; max-width: none; }
.epic li { position: relative; margin: 0 0 var(--s-1); padding-left: var(--s-6); font-size: var(--fs-12); line-height: 1.45; color: var(--text-muted); }
.epic li::before { content: ""; position: absolute; left: 0; top: 2px; width: 12px; height: 12px; border: 1.5px solid var(--c); border-radius: 3px; }
.epic li::after { content: ""; position: absolute; left: 4px; top: 4px; width: 4px; height: 7px; border: solid var(--c); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
@media (max-width: 1000px) { .build { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .build { grid-template-columns: 1fr; } }

/* User stories */
.stories table { min-width: 760px; }
.stories td:first-child { width: 150px; }
.stories td:nth-child(2) { width: 36%; }
.stories td strong { color: var(--text); font-weight: 600; }
.phase-tag { display: block; margin-top: var(--s-1); font-family: var(--mono); font-size: var(--fs-12); font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.stories ul { margin: 0; padding-left: var(--s-4); display: grid; gap: var(--s-1); }
.stories li { margin: 0; line-height: 1.45; }

/* Risks */
.risks table { min-width: 860px; }
.risks td:first-child { width: 140px; }
.risks td:nth-child(3), .risks td:nth-child(4) { width: 96px; }
.lvl { display: inline-block; padding: 2px var(--s-2); border: 1px solid currentColor; border-radius: 999px; font-family: var(--mono); font-size: var(--fs-12); letter-spacing: .04em; white-space: nowrap; }
.lvl.high { color: var(--accent-2); }
.lvl.med { color: var(--accent-3); }
.lvl.low { color: var(--text-muted); }

/* Lean canvas */
.lean {
  display: grid; gap: 1px; margin-top: var(--s-6); background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  grid-template-columns: repeat(10, 1fr);
  grid-template-areas:
    "problem problem solution solution uvp uvp channels channels segments segments"
    "problem problem metrics metrics uvp uvp channels channels segments segments"
    "cost cost cost cost cost revenue revenue revenue revenue revenue";
}
.lc { background: var(--surface); padding: var(--s-4); }
.lc h3 { margin: 0 0 var(--s-3); font-family: var(--mono); font-size: var(--fs-12); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.lc h4 { margin: var(--s-4) 0 var(--s-2); font-family: var(--mono); font-size: var(--fs-12); font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.lc p, .lc li { margin: 0; font-size: var(--fs-14); line-height: 1.5; color: var(--text-muted); }
.lc ul { margin: 0; padding-left: var(--s-4); display: grid; gap: var(--s-1); }
.lc .lc-big { color: var(--text); }
.lc-uvp { background: var(--raised); }
.lc-problem { grid-area: problem; } .lc-solution { grid-area: solution; } .lc-metrics { grid-area: metrics; }
.lc-uvp { grid-area: uvp; } .lc-channels { grid-area: channels; }
.lc-segments { grid-area: segments; } .lc-cost { grid-area: cost; } .lc-revenue { grid-area: revenue; }
@media (max-width: 900px) {
  .lean { grid-template-columns: 1fr 1fr; grid-template-areas: "uvp uvp" "problem segments" "solution metrics" "channels channels" "cost revenue"; }
}
@media (max-width: 560px) {
  .lean { grid-template-columns: 1fr; grid-template-areas: "uvp" "problem" "segments" "solution" "metrics" "channels" "cost" "revenue"; }
}

/* Forecast illustration (labor page overview) */
.fx-wrap { background: var(--bg-alt); }
.fx { display: block; width: 100%; height: auto; font-family: var(--font); }
.fx-bg { fill: var(--bg-alt); }
.fx-grid { stroke: var(--line); stroke-width: 1; opacity: .6; }
.fx-kick { fill: var(--accent); font-family: var(--mono); font-size: 18px; letter-spacing: .14em; }
.fx-sub { fill: var(--text-muted); font-size: 18px; }
.fx-ax { fill: var(--text-muted); font-family: var(--mono); font-size: 16px; }
.fx-legend text { fill: var(--text-muted); font-size: 16px; }
.fx-hist { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.fx-fc { fill: none; stroke: var(--accent-2); stroke-width: 3; stroke-dasharray: 8 7; stroke-linecap: round; }
.fx-band { fill: var(--accent-2); fill-opacity: .2; }
.fx-areaf { fill: url(#fx-area); }
.fx-stop-a { stop-color: var(--accent); stop-opacity: .22; }
.fx-stop-b { stop-color: var(--accent); stop-opacity: 0; }
.fx-glow-a { stop-color: var(--accent-2); stop-opacity: .22; }
.fx-glow-b { stop-color: var(--accent-2); stop-opacity: 0; }
.fx-today { stroke: var(--text-muted); stroke-width: 1.5; stroke-dasharray: 3 5; }
.fx-tag { fill: var(--text); font-family: var(--mono); font-size: 15px; letter-spacing: .12em; }
.fx-dot { fill: var(--text); stroke: var(--bg-alt); stroke-width: 3; }
.fx-pulse { fill: none; stroke: var(--accent-2); stroke-width: 2; opacity: 0; }
.fx-lead { stroke: var(--accent-2); stroke-width: 1.5; }
.fx-chip { fill: var(--raised); stroke: var(--accent-2); stroke-width: 1.5; }
.fx-chipt { fill: var(--text); font-size: 17px; font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .fx-anim-hist { stroke-dasharray: 1; stroke-dashoffset: 1; animation: fx-draw 1.6s ease-out .2s forwards; }
  .fx-anim-fc { opacity: 0; animation: fx-fade 1s ease-out 1.6s forwards; }
  .fx-anim-band, .fx-peak { opacity: 0; animation: fx-fade .8s ease-out 2.6s forwards; }
  .fx-pulse { animation: fx-pulse 2.4s ease-out 3.2s infinite; transform-box: fill-box; transform-origin: center; }
}
@keyframes fx-draw { to { stroke-dashoffset: 0; } }
@keyframes fx-fade { to { opacity: 1; } }
@keyframes fx-pulse { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }


/* MVP storyboard (search ads page) */
.sb-wrap { margin: var(--s-6) 0 0; overflow-x: auto; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); }
.sb { display: block; width: 100%; min-width: 760px; height: auto; font-family: var(--font); }
.sb-phone { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.sb-screen { fill: var(--bg); }
.sb-bar { fill: var(--raised); }
.sb-ico { fill: none; stroke: var(--text-muted); stroke-width: 1.5; }
.sb-q { fill: var(--text); font-size: 11px; }
.sb-ph { fill: var(--text-muted); font-size: 10px; }
.sb-tile { fill: var(--raised); }
.sb-li { fill: var(--text-muted); font-size: 11px; }
.sb-li.b { fill: var(--text); font-weight: 600; }
.sb-hl { fill: var(--raised); stroke: var(--accent); stroke-width: 1.5; }
.sb-av { fill: var(--raised); }
.sb-av.sp { fill: var(--accent-2); }
.sb-tag { fill: var(--accent); font-size: 10px; font-weight: 600; }
.sb-sp { fill: var(--bg); fill-opacity: .8; }
.sb-spt { fill: var(--accent); font-size: 7.5px; font-weight: 700; }
.sb-img { fill: var(--raised); }
.sb-shoe { fill: var(--accent-2); }
.sb-btn { fill: var(--accent); }
.sb-btnt { fill: var(--on-accent); font-size: 11px; font-weight: 700; }
.sb-ok { fill: none; stroke: var(--accent); stroke-width: 3; }
.sb-check { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.sb-arrow { fill: none; stroke: var(--text-muted); stroke-width: 1.5; }
.sb-ahp { fill: var(--text-muted); }
.sb-num { fill: var(--accent); font-family: var(--mono); font-size: 14px; letter-spacing: .1em; }
.sb-title { fill: var(--text); font-size: 16px; font-weight: 600; }
.sb-cap { fill: var(--text-muted); font-size: 13px; }
.sb-note { fill: var(--text-muted); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; }
