/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --bg: #060a12;
  --bg-2: #0a101c;
  --surface: #0f1727;
  --surface-2: #151f34;
  --line: rgba(148, 163, 184, 0.16);
  --line-strong: rgba(148, 163, 184, 0.3);
  --text: #e8eef7;
  --muted: #94a3b8;
  --accent: #34e0a1;
  --accent-2: #38bdf8;
  --accent-ink: #03130d;
  --accent-soft: rgba(52, 224, 161, 0.12);
  --warn: #fbbf24;
  --crit: #fb7185;
  --glow-a: rgba(52, 224, 161, 0.16);
  --glow-b: rgba(56, 189, 248, 0.14);
  --grid: rgba(148, 163, 184, 0.06);
  --header-bg: rgba(6, 10, 18, 0.78);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);

  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  --radius: 18px;
  --radius-sm: 12px;
  --container: 1180px;
  color-scheme: dark;
}

:root[data-theme='light'] {
  --bg: #f5f7fb;
  --bg-2: #eef2f8;
  --surface: #ffffff;
  --surface-2: #f3f6fb;
  --line: rgba(15, 23, 42, 0.11);
  --line-strong: rgba(15, 23, 42, 0.24);
  --text: #0b1323;
  --muted: #55627a;
  --accent: #05875c;
  --accent-2: #0369a1;
  --accent-ink: #ffffff;
  --accent-soft: rgba(5, 135, 92, 0.1);
  --warn: #b45309;
  --crit: #be123c;
  --glow-a: rgba(5, 135, 92, 0.12);
  --glow-b: rgba(3, 105, 161, 0.1);
  --grid: rgba(15, 23, 42, 0.05);
  --header-bg: rgba(245, 247, 251, 0.82);
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 12% -8%, var(--glow-a), transparent 65%),
    radial-gradient(800px 520px at 96% 4%, var(--glow-b), transparent 62%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: linear-gradient(#000 0%, #000 45%, transparent 100%);
  mask-image: linear-gradient(#000 0%, #000 45%, transparent 100%);
  pointer-events: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

.hidden {
  display: none !important;
}

.container {
  width: min(var(--container), 100% - 40px);
  margin-inline: auto;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px var(--glow-a);
}

.btn-primary:hover {
  box-shadow: 0 14px 38px var(--glow-a), 0 0 0 4px var(--accent-soft);
}

.btn-secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn.small {
  padding: 9px 16px;
  font-size: 0.86rem;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  min-width: 0;
}

.brand-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  flex: none;
}

.brand-text {
  display: grid;
  line-height: 1.2;
  min-width: 0;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
  white-space: nowrap;
}

.brand-text small {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.15s ease, background 0.15s ease;
}

.main-nav a:hover,
.main-nav a[aria-current='page'] {
  color: var(--text);
  background: var(--accent-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun,
:root[data-theme='light'] .theme-toggle .icon-moon {
  display: none;
}

:root[data-theme='light'] .theme-toggle .icon-sun {
  display: block;
}

.nav-toggle {
  display: none;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding: 96px 0;
}

.section.tight {
  padding: 64px 0;
}

.section.alt {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 48px;
}

.section-heading.center {
  margin-inline: auto;
  text-align: center;
}

.section-heading h1,
.section-heading h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
}

.section-heading p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.06rem;
}

.section-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-kicker::before {
  content: '';
  width: 22px;
  height: 1px;
  background: currentColor;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 72px 0 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 12px;
  margin-bottom: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text);
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2s infinite;
  flex: none;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(52, 224, 161, 0.55);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(52, 224, 161, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(52, 224, 161, 0);
  }
}

.hero h1 {
  font-size: clamp(2.3rem, 5.2vw, 4.1rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin-top: 24px;
  max-width: 58ch;
  font-size: 1.12rem;
  color: var(--muted);
}

.lead strong {
  color: var(--text);
  font-weight: 600;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.tag {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--surface);
}

/* Console (stays dark in both themes, like a real terminal) */
.console {
  background: #070c16;
  color: #dbe5f3;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 0 1px rgba(52, 224, 161, 0.06), 0 0 80px rgba(52, 224, 161, 0.08);
  overflow: hidden;
  font-family: var(--font-mono);
}

.console-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #0c1322;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 0.72rem;
  color: #8a99b3;
}

.console-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #263247;
}

.console-title {
  margin-left: 8px;
  margin-right: auto;
}

.console-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #34e0a1;
}

.console-state[data-state='incident'] {
  color: #fb7185;
}

.console-state[data-state='incident'] .pulse {
  background: #fb7185;
  animation: none;
}

.console-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.console-kpis div {
  padding: 14px 16px;
  border-right: 1px solid rgba(148, 163, 184, 0.16);
}

.console-kpis div:last-child {
  border-right: 0;
}

.console-kpis span {
  display: block;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a99b3;
}

.console-kpis strong {
  display: block;
  margin-top: 4px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #f1f5fb;
  font-variant-numeric: tabular-nums;
}

.console-log {
  min-height: 292px;
  padding: 16px;
  font-size: 0.76rem;
  line-height: 1.55;
}

.log-line {
  display: grid;
  grid-template-columns: 62px 56px 1fr;
  gap: 10px;
  padding: 3px 0;
  animation: logIn 0.35s ease both;
}

@keyframes logIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.log-time {
  color: #5d6d88;
}

.log-src {
  font-weight: 600;
}

.log-line[data-src='ALERT'] .log-src {
  color: #fb7185;
}

.log-line[data-src='AI'] .log-src {
  color: #38bdf8;
}

.log-line[data-src='HUMAN'] .log-src {
  color: #fbbf24;
}

.log-line[data-src='OK'] .log-src {
  color: #34e0a1;
}

.console-foot {
  padding: 10px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 0.66rem;
  color: #6f7f9a;
}

/* Impact stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 64px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.stat {
  padding: 26px 24px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat span {
  display: block;
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--muted);
}

/* Tool marquee */
.marquee {
  padding: 22px 0;
  border-block: 1px solid var(--line);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  gap: 44px;
  width: max-content;
  animation: marquee 48s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ==========================================================================
   Capability grid
   ========================================================================== */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.cap-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.cap-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.cap-card.wide {
  grid-column: span 2;
}

.cap-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.cap-icon svg {
  width: 22px;
  height: 22px;
}

.cap-card h3 {
  font-size: 1.14rem;
}

.cap-card p {
  color: var(--muted);
  font-size: 0.93rem;
}

.cap-card .outcomes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

.cap-card .outcomes li {
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
}

/* ==========================================================================
   Skill matrix
   ========================================================================== */
.section.flush-top {
  padding-top: 0;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 18px;
}

.skill-card {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.skill-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
}

.skill-head small {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The percentage badge rides on the tip of the bar as it moves */
.skill-meter {
  position: relative;
  padding-top: 34px;
}

.skill-value {
  position: absolute;
  top: 4px;
  left: clamp(46px, var(--level), 100%);
  transform: translateX(-100%);
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.skill-value::after {
  content: '';
  position: absolute;
  right: 6px;
  bottom: -4px;
  width: 8px;
  height: 8px;
  background: inherit;
  transform: rotate(45deg);
  z-index: -1;
}

.skill-track {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.skill-track span {
  display: block;
  width: var(--level);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* Roles */
.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: role;
}

.role-card {
  position: relative;
  padding: 26px 24px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  counter-increment: role;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.role-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.role-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(var(--accent), var(--accent-2));
}

.role-card::after {
  content: '0' counter(role);
  position: absolute;
  top: 22px;
  right: 22px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
}

.role-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.role-card h3 {
  margin: 10px 0 10px;
  font-size: 1.3rem;
}

.role-card p {
  font-size: 0.93rem;
  color: var(--muted);
}

@media (max-width: 960px) {
  .role-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .role-grid {
    grid-template-columns: 1fr;
  }
}

/* Toolchain logo wall */
.tools-heading {
  margin-bottom: 32px;
}

.tool-groups {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.tool-group {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.tool-group:last-child {
  border-bottom: 0;
}

.tool-group h3 {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.tool:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

/* Logos sit on a white chip so brand colours read correctly in both themes */
.tool-logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  flex: none;
}

.tool-logo svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   Operating loop (24x7 command center)
   ========================================================================== */
.loop {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  counter-reset: step;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.loop-step {
  position: relative;
  padding: 26px 22px 28px;
  border-right: 1px solid var(--line);
  counter-increment: step;
}

.loop-step:last-child {
  border-right: 0;
}

.loop-step::before {
  content: '0' counter(step);
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent);
}

.loop-step h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.loop-step p {
  font-size: 0.9rem;
  color: var(--muted);
}

.who {
  display: inline-block;
  margin-top: 14px;
  padding: 3px 9px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  background: var(--accent-soft);
  color: var(--accent);
}

.who.human {
  background: rgba(251, 191, 36, 0.12);
  color: var(--warn);
}

.split {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.split .card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.split .card p {
  font-size: 0.93rem;
  color: var(--muted);
}

/* ==========================================================================
   AI automator
   ========================================================================== */
.ai-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: start;
}

.ai-grid .section-heading {
  margin-bottom: 0;
  position: sticky;
  top: 108px;
}

.ai-list {
  display: grid;
  gap: 12px;
}

.ai-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.ai-item .when {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  padding-top: 3px;
}

.ai-item h3 {
  font-size: 1.02rem;
  margin-bottom: 4px;
}

.ai-item p {
  font-size: 0.92rem;
  color: var(--muted);
}

/* ==========================================================================
   Case studies
   ========================================================================== */
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.case-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.case-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.case-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.case-top .domain {
  color: var(--accent);
}

.case-card h3 {
  font-size: 1.38rem;
}

.case-card > p {
  color: var(--muted);
  font-size: 0.96rem;
}

.case-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: auto;
}

.case-metrics div {
  padding: 14px 16px;
  background: var(--surface-2);
}

.case-metrics strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.1;
  color: var(--accent);
}

.case-metrics span {
  font-size: 0.8rem;
  color: var(--muted);
}

.stack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.check-list {
  display: grid;
  gap: 8px;
  font-size: 0.94rem;
  color: var(--muted);
}

.check-list li {
  position: relative;
  padding-left: 24px;
}

.check-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ==========================================================================
   Leadership / engagement
   ========================================================================== */
.lead-grid,
.engage-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.lead-grid .card h3,
.engage-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.lead-grid .card p,
.engage-card p {
  font-size: 0.92rem;
  color: var(--muted);
}

.engage-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.engage-card .for {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.engage-card .check-list {
  font-size: 0.88rem;
}

.engage-card .link {
  margin-top: auto;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
}

.engage-card .link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonial-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.testimonial-head .section-heading {
  margin-bottom: 0;
}

.testimonial-grid {
  columns: 3 300px;
  column-gap: 18px;
}

.testimonial-card {
  break-inside: avoid;
  margin: 0 0 18px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.testimonial-card blockquote {
  margin: 0 0 20px;
  font-size: 0.98rem;
  white-space: pre-line;
}

.testimonial-card .stars {
  margin-bottom: 12px;
  color: var(--warn);
  letter-spacing: 3px;
  font-size: 0.95rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  flex: none;
}

.testimonial-author strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.3;
}

.testimonial-author div span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.testimonial-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.testimonial-meta .tag.verified {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.testimonial-meta a.tag:hover {
  color: var(--accent-2);
  border-color: var(--accent-2);
}

.empty-state {
  padding: 48px 28px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

.empty-state h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.empty-state p {
  max-width: 52ch;
  margin: 0 auto 22px;
  color: var(--muted);
}

/* Dialog */
dialog.modal {
  width: min(640px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  overflow: auto;
}

dialog.modal::backdrop {
  background: rgba(3, 6, 12, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 28px 0;
}

.modal-head h2 {
  font-size: 1.5rem;
}

.modal-head p {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.modal-body {
  padding: 22px 28px 28px;
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form {
  display: grid;
  gap: 16px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field label,
.field legend {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0;
}

.field .hint {
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

fieldset.field {
  border: 0;
  margin: 0;
  padding: 0;
}

.star-input {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
}

.star-input input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.star-input label {
  font-size: 1.7rem;
  line-height: 1;
  color: var(--line-strong);
  cursor: pointer;
  transition: color 0.12s ease;
}

.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label {
  color: var(--warn);
}

.star-input input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  font-size: 0.86rem;
  color: var(--muted);
}

.check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.form-message {
  min-height: 1.4em;
  font-size: 0.9rem;
  color: var(--muted);
}

.form-message[data-state='error'] {
  color: var(--crit);
}

.form-message[data-state='ok'] {
  color: var(--accent);
}

.otp-input {
  font-family: var(--font-mono);
  font-size: 1.5rem !important;
  letter-spacing: 0.5em;
  text-align: center;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: start;
}

.contact-grid .section-heading {
  margin-bottom: 28px;
}

.contact-points {
  display: grid;
  gap: 14px;
}

.contact-points li {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
}

.contact-points span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
}

.contact-points a {
  color: var(--accent);
}

.contact-points a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Inner pages
   ========================================================================== */
.page-hero {
  padding: 80px 0 24px;
}

.page-hero .section-heading {
  margin-bottom: 0;
  max-width: 860px;
}

.page-hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
}

.about-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.portrait {
  position: sticky;
  top: 108px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.portrait dl {
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
  font-size: 0.88rem;
}

.portrait dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.portrait dd {
  margin: 0;
}

.prose {
  display: grid;
  gap: 18px;
  font-size: 1.08rem;
  color: var(--muted);
}

.prose strong {
  color: var(--text);
}

.prose h2 {
  margin-top: 24px;
  font-size: 1.6rem;
  color: var(--text);
}

.about-stats {
  margin-top: 14px;
}

.about-stats .stat {
  padding: 20px 18px;
}

.about-stats .stat strong {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  color: var(--text);
}

.about-stats .stat span {
  font-size: 0.82rem;
}

.about-roles {
  margin-top: 10px;
}

.about-roles .section-kicker {
  margin-bottom: 0;
}

.about-roles .role-tags {
  margin-top: 12px;
}

.about-roles .tag {
  padding: 7px 14px;
  font-size: 0.78rem;
  color: var(--text);
}

.prose .cta-row {
  margin-top: 10px;
}

.timeline {
  display: grid;
  gap: 0;
  border-left: 1px solid var(--line-strong);
  margin-left: 6px;
}

.timeline-item {
  position: relative;
  padding: 0 0 32px 30px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.timeline-item .year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.timeline-item h3 {
  font-size: 1.2rem;
  margin: 6px 0;
}

.timeline-item p {
  color: var(--muted);
  font-size: 0.96rem;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.article-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.article-card h3 {
  font-size: 1.16rem;
}

.article-card p {
  font-size: 0.93rem;
  color: var(--muted);
}

.article-card .tag {
  align-self: flex-start;
  color: var(--accent);
}

.article-card .status {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 18px;
}

.featured-post h2 {
  font-size: 1.7rem;
  margin: 12px 0;
}

.featured-post p {
  color: var(--muted);
}

.subscribe-card h3 {
  font-size: 1.2rem;
  margin: 10px 0 16px;
}

.post-list {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.post-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.post-list li:last-child {
  border-bottom: 0;
}

.post-list .n {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent);
}

.post-list h3 {
  font-size: 1.04rem;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(520px 220px at 0% 0%, var(--glow-a), transparent 70%),
    var(--surface);
}

.cta-band h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  max-width: 22ch;
}

.cta-band p {
  margin-top: 10px;
  color: var(--muted);
  max-width: 52ch;
}

/* Access gate */
.gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.gate-card {
  width: min(460px, 100%);
  padding: 36px 32px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.gate-card .brand {
  margin-bottom: 26px;
}

.gate-card h1 {
  font-size: 1.7rem;
  margin: 14px 0 10px;
}

.gate-card > p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.gate-card .btn {
  width: 100%;
}

.gate-note {
  margin-top: 22px;
  font-size: 0.78rem;
  color: var(--muted);
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.86rem;
}

.link-btn:hover {
  text-decoration: underline;
}

/* Moderation + 404 */
.moderation {
  padding: 72px 0;
  max-width: 720px;
  display: grid;
  gap: 22px;
}

.moderation blockquote {
  margin: 18px 0;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
}

.moderation a {
  color: var(--accent);
}

.moderation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding: 48px 0 36px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.footer-top p {
  margin-top: 12px;
  max-width: 44ch;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  align-content: flex-start;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 22px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .cap-grid,
  .lead-grid,
  .engage-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .loop {
    grid-template-columns: 1fr;
  }

  .loop-step {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .loop-step:last-child {
    border-bottom: 0;
  }

  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-grid;
  }

  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 20px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 12px 14px;
    font-size: 1rem;
  }

  .hero-grid,
  .ai-grid,
  .contact-grid,
  .about-grid,
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .ai-grid .section-heading,
  .portrait {
    position: static;
  }

  .portrait {
    max-width: 320px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat:nth-child(2) {
    border-right: 0;
  }

  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .case-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .tool-group {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px;
  }

  .section {
    padding: 72px 0;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(var(--container), 100% - 32px);
  }

  .brand-text small,
  .nav-actions .btn {
    display: none;
  }

  .hero {
    padding-top: 44px;
  }

  .cap-grid,
  .lead-grid,
  .engage-grid,
  .article-grid,
  .field-row {
    grid-template-columns: 1fr;
  }

  .cap-card.wide {
    grid-column: auto;
  }

  .skill-grid {
    grid-template-columns: 1fr;
  }

  .log-line {
    grid-template-columns: 50px 1fr;
  }

  .log-time {
    display: none;
  }

  .console-log {
    min-height: 330px;
  }

  .ai-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .contact-points li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .case-card,
  .cta-band {
    padding: 24px;
  }

  .modal-head {
    padding: 22px 20px 0;
  }

  .modal-body {
    padding: 18px 20px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Blog posts, diagrams, code blocks and the prompt library
   ========================================================================== */
.post-head {
  max-width: 860px;
  padding: 64px 0 8px;
}

.back-link {
  display: inline-block;
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.back-link:hover {
  color: var(--accent);
}

.post-head .section-kicker {
  display: flex;
}

.post-head h1 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
}

.post-lede {
  margin-top: 20px;
  font-size: 1.2rem;
  color: var(--muted);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
}

.post-body {
  max-width: 860px;
  padding: 32px 0 72px;
}

.post-body > p {
  margin: 18px 0;
  font-size: 1.06rem;
}

.post-body > h2 {
  margin: 52px 0 14px;
  font-size: 1.6rem;
}

.post-body p a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body code,
.section-heading code,
.takeaways code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.86em;
}

/* Diagrams */
.diagram {
  margin: 30px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.diagram > figcaption {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 0.86rem;
  color: var(--muted);
}

.flow {
  display: flex;
  align-items: stretch;
  gap: 26px;
}

.node {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  padding: 14px 14px 15px;
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg);
}

.node strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.25;
}

.node span {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}

.node.ok {
  border-top-color: var(--accent);
}

.node.ai {
  border-top-color: var(--accent-2);
}

.node.warn,
.node.human {
  border-top-color: var(--warn);
}

.node.danger {
  border-top-color: var(--crit);
}

.flow:not(.vertical) > .node:not(:last-child)::after {
  content: "\2192";
  position: absolute;
  right: -22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.05rem;
}

.flow.vertical {
  flex-direction: column;
  gap: 28px;
}

.flow.vertical > .node {
  flex: none;
}

.flow.vertical > .node:not(:last-child)::after {
  content: "\2193";
  position: absolute;
  left: 50%;
  bottom: -26px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 1.05rem;
}

.lanes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.lane,
.boundary {
  padding: 16px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
}

.lane.ok,
.boundary.ok {
  border-color: var(--accent);
}

.lane.ai {
  border-color: var(--accent-2);
}

.lane.danger {
  border-color: var(--crit);
}

.boundary.warn {
  border-color: var(--warn);
}

.lane-label,
.boundary-label {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.cross {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
}

.wire {
  display: grid;
  gap: 10px;
  justify-items: center;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-align: center;
}

.wire-up {
  color: var(--accent);
}

.wire-down {
  color: var(--warn);
}

.wire-label {
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--crit);
  color: #fff;
  font-weight: 600;
}

.tiers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.tier {
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg);
}

.tier.ok {
  border-left-color: var(--accent);
}

.tier.ai {
  border-left-color: var(--accent-2);
}

.tier.warn {
  border-left-color: var(--warn);
}

.tier.danger {
  border-left-color: var(--crit);
}

.tier-n {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.tier strong {
  display: block;
  margin: 4px 0 6px;
  font-family: var(--font-display);
}

.tier p {
  font-size: 0.82rem;
  color: var(--muted);
}

.tier em {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.loop-ring {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.bars {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 210px 1fr 70px;
  gap: 14px;
  align-items: center;
  font-size: 0.88rem;
}

.bar-track {
  height: 16px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--muted);
}

.bar-fill.ai {
  background: var(--accent-2);
}

.bar-fill.ok {
  background: var(--accent);
}

.bar-fill.warn {
  background: var(--warn);
}

.bar-fill.danger {
  background: var(--crit);
}

.bar-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: right;
}

/* Tables */
.table-wrap {
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

table.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--surface);
}

table.grid th,
table.grid td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

table.grid th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
}

table.grid tr:last-child td {
  border-bottom: 0;
}

table.grid td:first-child {
  font-weight: 600;
}

/* Code blocks stay dark in both themes */
.code,
.prompt-card pre {
  background: #0b1220;
  color: #dbe5f3;
}

.code {
  margin: 24px 0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.code figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px 9px 16px;
  background: #111a2c;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #8a99b3;
}

.code pre,
.prompt-card pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  tab-size: 2;
}

.code pre code,
.prompt-card pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
}

.copy-btn {
  flex: none;
  padding: 5px 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: transparent;
  color: #dbe5f3;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.copy-btn:hover,
.copy-btn.copied {
  border-color: #34e0a1;
  color: #34e0a1;
}

.takeaways {
  margin: 48px 0 0;
  padding: 26px 28px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.takeaways h2 {
  margin-bottom: 14px;
  font-size: 1.2rem;
}

.takeaways .check-list {
  color: var(--text);
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 40px;
}

.post-nav a {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.15s ease;
}

.post-nav a:hover {
  border-color: var(--accent);
}

.post-nav a.next {
  text-align: right;
}

.post-nav span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.post-nav strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
  line-height: 1.3;
}

/* Blog index */
a.featured-post {
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

a.featured-post:hover,
.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.post-card .tag {
  align-self: flex-start;
  color: var(--accent);
}

.post-card h3 {
  font-size: 1.14rem;
}

.post-card p {
  font-size: 0.92rem;
  color: var(--muted);
}

.post-card-meta {
  margin-top: auto;
  padding-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent);
}

/* Prompt library */
.how-to {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

.how-to .node {
  background: var(--surface);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.chip {
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.86rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.chip:hover {
  border-color: var(--accent);
}

.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.prompt-list {
  display: grid;
  gap: 16px;
}

.prompt-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.prompt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
}

.prompt-head h3 {
  margin: 10px 0 6px;
  font-size: 1.16rem;
}

.prompt-head p {
  font-size: 0.9rem;
  color: var(--muted);
}

.prompt-head .tag {
  color: var(--accent);
}

.prompt-head .copy-btn {
  padding: 9px 16px;
  border-color: var(--line-strong);
  color: var(--text);
  font-size: 0.78rem;
}

.prompt-head .copy-btn:hover,
.prompt-head .copy-btn.copied {
  border-color: var(--accent);
  color: var(--accent);
}

.prompt-card pre {
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  border-top: 1px solid var(--line);
}

/* About page: the headline sits on one line on desktop and wraps on small screens */
.page-hero .section-heading.wide {
  max-width: none;
}

.page-hero h1.one-line {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}

@media (min-width: 1000px) {
  .page-hero h1.one-line {
    white-space: nowrap;
  }
}

/* Seven nav links need a little less room on mid-size screens */
@media (min-width: 961px) and (max-width: 1160px) {
  .main-nav a {
    padding: 8px 8px;
    font-size: 0.85rem;
  }

  .brand-text small {
    display: none;
  }
}

@media (max-width: 960px) {
  .flow:not(.vertical) {
    flex-direction: column;
    gap: 28px;
  }

  .flow:not(.vertical) > .node {
    flex: none;
  }

  .flow:not(.vertical) > .node:not(:last-child)::after {
    content: "\2193";
    right: auto;
    left: 50%;
    top: auto;
    bottom: -26px;
    transform: translateX(-50%);
  }

  .lanes,
  .cross,
  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav a.next {
    text-align: left;
  }

  .tiers,
  .loop-ring,
  .how-to,
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .tiers,
  .loop-ring,
  .how-to,
  .post-grid {
    grid-template-columns: 1fr;
  }

  .diagram {
    padding: 16px;
  }

  .bar-row {
    grid-template-columns: 1fr 60px;
    gap: 6px 10px;
  }

  .bar-label {
    grid-column: 1 / -1;
  }

  .prompt-head {
    flex-direction: column;
  }

  .post-head {
    padding-top: 40px;
  }
}

/* ==========================================================================
   Story posts: cover art, story steps and illustrative UI mock-ups
   ========================================================================== */
.cover {
  margin: 0 0 28px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.cover svg {
  display: block;
  width: 100%;
  height: auto;
}

.story-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 0 12px;
}

.story-step {
  padding: 16px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
}

.story-step span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.story-step p {
  margin-top: 8px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.story-step.danger {
  border-top-color: var(--crit);
}

.story-step.danger span {
  color: var(--crit);
}

.story-step.ai {
  border-top-color: var(--accent-2);
}

.story-step.ai span {
  color: var(--accent-2);
}

.story-step.warn {
  border-top-color: var(--warn);
}

.story-step.warn span {
  color: var(--warn);
}

.story-step.ok {
  border-top-color: var(--accent);
}

.story-step.ok span {
  color: var(--accent);
}

.story .post-body > h2 {
  margin-top: 44px;
}

.story-note {
  margin-top: 28px !important;
  padding-top: 18px;
  border-top: 1px dashed var(--line-strong);
  font-size: 0.86rem !important;
  color: var(--muted);
}

.try-list {
  display: grid;
  gap: 10px;
  padding-left: 22px;
  list-style: decimal;
  font-size: 0.96rem;
}

.try-list li::marker {
  font-family: var(--font-mono);
  color: var(--accent);
}

/* Mock-ups look like an app window; they stay dark in both themes */
.mock {
  margin: 28px 0;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--radius-sm);
  background: #0b1220;
  color: #dbe5f3;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: #111a2c;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #8a99b3;
}

.mock-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2a3850;
}

.mock-bar span {
  margin-left: 8px;
}

.mock-body {
  padding: 8px 0;
}

.mock > figcaption {
  padding: 10px 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 0.78rem;
  color: #8a99b3;
}

.mock-row {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 9px 16px;
  font-size: 0.86rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.mock-row:last-child {
  border-bottom: 0;
}

.mock-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #6f7f9a;
  white-space: nowrap;
}

.sev {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6f7f9a;
}

.sev.crit {
  background: #fb7185;
}

.sev.warn {
  background: #fbbf24;
}

.sev.ok {
  background: #34e0a1;
}

.sev.ai {
  background: #38bdf8;
}

.chat {
  display: grid;
  gap: 10px;
  padding: 10px 16px;
}

.bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  background: #18233a;
  font-size: 0.88rem;
  line-height: 1.5;
}

.bubble.me {
  justify-self: end;
  background: #1d4ed8;
  color: #fff;
}

.bubble .speaker {
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  opacity: 0.7;
}

.panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  padding: 8px 14px;
}

.panel {
  position: relative;
  padding: 14px 14px 46px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
  background: #0f1829;
  overflow: hidden;
}

.panel-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a99b3;
}

.panel strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1.1;
  color: #34e0a1;
}

.panel.ai strong {
  color: #38bdf8;
}

.panel.warn strong {
  color: #fbbf24;
}

.panel.danger strong {
  color: #fb7185;
}

.panel small {
  font-size: 0.74rem;
  color: #8a99b3;
}

.spark {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 38px;
}

.spark-line {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.spark-area {
  fill: rgba(56, 189, 248, 0.12);
  stroke: none;
}

/* Story cards on the blog index */
.story-thumb {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.story-thumb svg {
  width: 28px;
  height: 28px;
}

@media (max-width: 960px) {
  .story-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .story-steps {
    grid-template-columns: 1fr;
  }

  .mock-row {
    grid-template-columns: 14px 1fr;
  }

  .mock-meta {
    grid-column: 2;
  }

  .bubble {
    max-width: 94%;
  }
}

/* User-story cards in role posts */
.user-stories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 24px 0;
}

.user-story {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent-2);
  border-radius: 12px;
  background: var(--surface);
}

.user-story span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.user-story p {
  margin-top: 8px;
  font-size: 0.94rem;
  line-height: 1.5;
}

@media (max-width: 620px) {
  .user-stories {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Infographic (fixed light palette so the exported image always looks the same)
   ========================================================================== */
.ig-wrap {
  margin-top: 8px;
}

.ig-actions {
  margin: 14px 0 0;
  text-align: right;
}

.infographic {
  margin: 0;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #d5deeb;
  background: #f4f7fc;
  color: #0b1b3a;
  font-size: 12.5px;
  line-height: 1.4;
  overflow: hidden;
}

.infographic ul,
.infographic ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ig-top {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 14px;
}

.ig-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ig-logo {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #d5deeb;
  color: #1496ff;
  flex: none;
}

.ig-logo svg {
  width: 32px;
  height: 32px;
}

.ig-brand b {
  display: block;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.1;
}

.ig-brand span {
  font-size: 11.5px;
  font-weight: 600;
  color: #33466b;
}

.ig-title,
.ig-band {
  display: flex;
  align-items: center;
  border-radius: 12px;
  background: #0d2a5c;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
}

.ig-title {
  justify-content: center;
  padding: 12px 18px;
  font-size: 22px;
}

.ig-band {
  gap: 14px;
  margin: 14px 0 10px;
  padding: 9px 16px;
  font-size: 16px;
}

.ig-band span {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  opacity: 0.8;
}

.ig-row {
  display: grid;
  gap: 10px;
}

.ig-row.six {
  grid-template-columns: repeat(6, 1fr);
}

.ig-row.three {
  grid-template-columns: 1.5fr 1fr 1fr;
  margin-top: 12px;
}

.ig-card {
  padding: 0 12px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--c);
  overflow: hidden;
}

.ig-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 -12px 10px;
  padding: 8px 12px;
  background: var(--c-soft);
  color: var(--c);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
}

.ig-card-head b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  font-size: 13px;
}

.ig-card > strong,
.ig-stage > strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.ig-card li,
.ig-stage li,
.ig-list li {
  position: relative;
  padding-left: 12px;
  margin-top: 3px;
}

.ig-card li::before,
.ig-stage li::before,
.ig-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c, #0d2a5c);
}

.c1 { --c: #1d6fd6; --c-soft: #e3effd; }
.c2 { --c: #1f8f4e; --c-soft: #e2f5ea; }
.c3 { --c: #b7791f; --c-soft: #fdf3d9; }
.c4 { --c: #c53030; --c-soft: #fde8e8; }
.c5 { --c: #5a3fc0; --c-soft: #ece8fb; }
.c6 { --c: #0e7490; --c-soft: #def4f8; }

.ig-pipe {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 16px;
}

.ig-stage {
  position: relative;
  padding: 0 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #d5deeb;
}

.ig-stage-head {
  margin: 0 -10px 10px;
  padding: 7px 10px;
  border-radius: 11px 11px 0 0;
  background: var(--c);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12.5px;
  text-align: center;
}

.ig-stage:not(:last-child)::after {
  content: '\2192';
  position: absolute;
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b46c1;
  font-size: 17px;
  font-weight: 700;
}

.s0 { --c: #334155; }
.s1 { --c: #5a3fc0; }
.s2 { --c: #1d6fd6; }
.s3 { --c: #0e7490; }
.s4 { --c: #b7791f; }
.s5 { --c: #c0337a; }
.s6 { --c: #4c51bf; }

.ig-panel {
  padding: 0 14px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #d5deeb;
  overflow: hidden;
}

.ig-panel-head {
  margin: 0 -14px 10px;
  padding: 8px 14px;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
}

.ig-panel-head.navy { background: #0d2a5c; }
.ig-panel-head.blue { background: #1d6fd6; }
.ig-panel-head.green { background: #1f8f4e; }

.ig-quote {
  margin: 0 0 10px;
  font-weight: 600;
  color: #33466b;
}

.ig-trace {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.ig-hop {
  position: relative;
  padding: 8px 6px;
  border: 1px solid #d5deeb;
  border-radius: 10px;
  background: #f8fafd;
  text-align: center;
  color: #0b1b3a;
}

.ig-hop strong {
  display: block;
  font-size: 12px;
}

.ig-hop span {
  display: block;
  font-size: 10.5px;
  color: #5b6b88;
}

.ig-hop em {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2f5ea;
  color: #166534;
  font-style: normal;
  font-weight: 700;
  font-size: 11.5px;
}

.ig-hop.bad {
  border-color: #e53e3e;
  background: #fff1f1;
}

.ig-hop.bad em {
  background: #e53e3e;
  color: #fff;
}

.ig-hop:not(:last-child)::after {
  content: '\2192';
  position: absolute;
  right: -13px;
  top: 50%;
  transform: translateY(-50%);
  color: #5b6b88;
}

.ig-trace.on-page {
  gap: 20px;
}

.ig-trace.on-page .ig-hop {
  padding: 14px 8px;
}

.ig-trace.on-page .ig-hop strong {
  font-size: 0.92rem;
}

.ig-trace.on-page .ig-hop span {
  font-size: 0.78rem;
}

.ig-trace.on-page .ig-hop em {
  font-size: 0.86rem;
}

.ig-trace.on-page .ig-hop:not(:last-child)::after {
  right: -17px;
}

.ig-steps {
  margin-top: 12px !important;
  counter-reset: igs;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 14px;
}

.ig-steps li {
  position: relative;
  padding-left: 24px;
  counter-increment: igs;
}

.ig-steps li::before {
  content: counter(igs);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #0d2a5c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.ig-list.ok {
  --c: #1f8f4e;
}

.ig-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 11px;
  color: #5b6b88;
}

.ig-foot span:first-child {
  font-weight: 700;
  color: #0d2a5c;
}

@media (max-width: 1100px) {
  .ig-row.six {
    grid-template-columns: repeat(3, 1fr);
  }

  .ig-pipe {
    grid-template-columns: repeat(2, 1fr);
  }

  .ig-stage:not(:last-child)::after {
    display: none;
  }

  .ig-row.three,
  .ig-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .ig-row.six,
  .ig-pipe,
  .ig-steps {
    grid-template-columns: 1fr;
  }

  .ig-trace,
  .ig-trace.on-page {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .ig-hop:not(:last-child)::after,
  .ig-trace.on-page .ig-hop:not(:last-child)::after {
    content: '\2193';
    right: auto;
    left: 50%;
    top: auto;
    bottom: -20px;
    transform: translateX(-50%);
  }

  .ig-foot {
    flex-direction: column;
  }
}

/* Poster-style infographic ("dashboard is green") */
.ig-logo svg {
  color: #1496ff;
}

.ig-wrap.narrow {
  max-width: 900px;
}

.infographic.ig2 {
  padding: 0;
  background: #f7f9fd;
  font-size: 14px;
}

.ig2-hero {
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 20px;
  align-items: center;
  padding: 30px 32px 24px;
  background: linear-gradient(135deg, #ffffff 0%, #e9f0fd 100%);
}

.ig2-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6b7fa6;
}

.ig2-kicker i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #9db0d3;
}

.ig2-headline {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #0b1b3a;
}

.ig2-headline em,
.ig2-banner-text em {
  font-style: normal;
  color: #3b6cf6;
}

.ig2-sub {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.5;
  color: #33466b;
}

.ig2-sub b {
  color: #0b1b3a;
}

.ig2-photo {
  position: relative;
}

.ig2-photo img {
  width: 100%;
  height: auto;
  border-radius: 22px;
  border: 4px solid #fff;
  box-shadow: 0 14px 34px rgba(13, 42, 92, 0.2);
}

.ig2-photo span {
  position: absolute;
  right: -6px;
  bottom: -14px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #0d2a5c;
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  transform: rotate(-4deg);
  border-bottom: 3px solid #3b6cf6;
}

.ig2-label {
  padding: 22px 32px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0b1b3a;
}

.ig2-path {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 0 24px;
}

.ig2-hop {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.ig2-hop b {
  font-size: 12.5px;
  line-height: 1.25;
  color: #0b1b3a;
}

.ig2-ico {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--fg);
}

.ig2-ico svg {
  width: 30px;
  height: 30px;
}

.ig2-ico.a { --bg: #e3ecfd; --fg: #2f5fd0; }
.ig2-ico.b { --bg: #ece6fb; --fg: #6d3fd0; }
.ig2-ico.c { --bg: #e1ecfb; --fg: #326ce5; }
.ig2-ico.d { --bg: #e5e9fb; --fg: #3b4fc4; }
.ig2-ico.e { --bg: #fdf1d8; --fg: #c98a10; }
.ig2-ico.f { --bg: #fde4e6; --fg: #d14b5a; }

.ig2-hop:not(:last-child)::after {
  content: '\2192';
  position: absolute;
  right: -10px;
  top: 22px;
  color: #7f8fb0;
  font-size: 16px;
}

.ig2-signals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 24px 32px 0;
}

.ig2-signal {
  padding: 16px 18px 18px;
  border-radius: 14px;
  background: var(--bg);
}

.ig2-signal.m { --bg: #e7f6ee; --fg: #17824a; }
.ig2-signal.l { --bg: #efeafb; --fg: #6d3fd0; }
.ig2-signal.t { --bg: #e6effd; --fg: #2f5fd0; }

.ig2-signal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
}

.ig2-signal-head svg {
  width: 26px;
  height: 26px;
}

.ig2-signal strong {
  display: block;
  margin: 12px 0 8px;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.2;
  color: #0b1b3a;
}

.ig2-signal p {
  font-size: 12.5px;
  line-height: 1.45;
  color: #45577a;
}

.ig2-bracket {
  height: 16px;
  margin: 10px 110px 0;
  border: 1.5px solid #a9b8d6;
  border-top: 0;
  border-radius: 0 0 12px 12px;
}

.ig2-together {
  display: flex;
  justify-content: center;
  margin-top: -1px;
}

.ig2-together span {
  margin-top: 10px;
  padding: 8px 20px;
  border-radius: 999px;
  background: #e3ecfd;
  font-size: 13.5px;
  font-weight: 600;
  color: #0b1b3a;
}

.ig2-banner {
  display: grid;
  grid-template-columns: 54px 1fr 1fr;
  gap: 20px;
  align-items: center;
  margin: 22px 32px 0;
  padding: 22px 26px;
  border-radius: 16px;
  background: #0d2a5c;
  color: #fff;
}

.ig2-banner > svg {
  width: 46px;
  height: 46px;
  color: #fff;
}

.ig2-banner-text {
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
}

.ig2-banner-text em {
  color: #6f9bff;
}

.ig2-banner-list {
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 12.5px;
}

.ig2-banner-list li {
  position: relative;
  margin-top: 5px;
  padding-left: 14px;
}

.ig2-banner-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6f9bff;
}

.ig2-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
  padding: 18px 32px 22px;
  font-size: 12px;
  color: #6b7fa6;
}

.ig2-tags b {
  margin-left: auto;
  color: #0d2a5c;
}

.tiers.three {
  grid-template-columns: repeat(3, 1fr);
}

.ig-trace.on-page.six {
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.ig-trace.on-page.six .ig-hop:not(:last-child)::after {
  right: -15px;
}

@media (max-width: 760px) {
  .ig2-hero {
    grid-template-columns: 1fr;
    padding: 22px 20px;
  }

  .ig2-photo {
    max-width: 180px;
  }

  .ig2-headline {
    font-size: 28px;
  }

  .ig2-path {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 8px;
    padding: 0 12px;
  }

  .ig2-hop:not(:last-child)::after,
  .ig2-bracket {
    display: none;
  }

  .ig2-signals,
  .ig2-banner,
  .tiers.three,
  .ig-trace.on-page.six {
    grid-template-columns: 1fr;
  }

  .ig2-signals,
  .ig2-label,
  .ig2-tags {
    padding-left: 20px;
    padding-right: 20px;
  }

  .ig2-banner {
    margin: 20px 20px 0;
  }

  .ig2-banner-text,
  .ig2-banner-list {
    padding-left: 0;
    border-left: 0;
  }

  .ig2-tags b {
    margin-left: 0;
  }
}

/* ==========================================================================
   Daily Observability Tips
   ========================================================================== */
.tip-home {
  display: grid;
  gap: 14px;
}

.tip-home .link {
  justify-self: end;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
}

.tip-home .link:hover {
  text-decoration: underline;
}

.tip-card {
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
}

.tip-card.featured {
  padding: 30px 32px;
  background:
    radial-gradient(520px 200px at 100% 0%, var(--glow-b), transparent 70%),
    var(--surface);
}

.tip-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
}

.tip-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.tip-no {
  color: var(--accent);
  font-weight: 600;
}

.tip-card h2,
.tip-card h3 {
  font-size: 1.25rem;
}

.tip-card.featured h2,
.tip-card.featured h3 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
}

.tip-body {
  margin-top: 10px;
  max-width: 74ch;
  color: var(--muted);
  white-space: pre-line;
}

.tip-card.featured .tip-body {
  font-size: 1.1rem;
  color: var(--text);
}

.tip-thought {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  font-style: italic;
}

.tip-thought span {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.tip-tools {
  display: flex;
  gap: 14px;
  margin-top: 16px;
}

.tips-layout {
  display: grid;
  gap: 40px;
  max-width: 900px;
}

.tips-heading {
  margin-bottom: 16px;
  font-size: 1.3rem;
}

.tip-archive {
  display: grid;
  gap: 14px;
}

.tip-month {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.tip-empty,
.tip-form-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.tip-form h2 {
  font-size: 1.3rem;
}

.tip-form-note {
  margin-top: 6px;
}

@media (max-width: 620px) {
  .tip-card,
  .tip-card.featured {
    padding: 20px;
  }

  .tip-thought {
    flex-direction: column;
    gap: 4px;
  }
}

/* Dark reference-sheet infographic (metric cardinality) */
.infographic.dark {
  background: #071226;
  border-color: #1c2f55;
  color: #e6edf8;
  font-size: 12px;
}

.c-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.c-title {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.c-title em {
  font-style: normal;
  color: #facc15;
}

.c-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 6px;
  font-size: 12px;
  color: #b8c6e0;
}

.c-chips span + span::before {
  content: '|';
  margin-right: 14px;
  color: #4a5d85;
}

.c-site {
  flex: none;
  padding: 9px 16px;
  border-radius: 10px;
  background: #facc15;
  color: #1a1a1a;
  font-weight: 700;
  font-size: 13px;
}

.ig-row.c-a {
  grid-template-columns: 1fr 1.25fr 1fr;
}

.ig-row.c-b {
  grid-template-columns: 1.15fr 1.15fr 1fr;
  margin-top: 10px;
}

.ig-row.c-c {
  grid-template-columns: 1.15fr 1.1fr 0.9fr;
  margin-top: 10px;
}

.infographic.dark .ig-panel {
  padding: 0 12px 12px;
  background: #0c1b36;
  border-color: var(--pc);
}

.ig-panel-head.num {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 -12px 10px;
  padding: 7px 12px;
  background: color-mix(in srgb, var(--pc) 34%, #0c1b36);
  font-size: 13.5px;
}

.ig-panel-head.num b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pc);
  color: #fff;
  font-size: 12px;
  flex: none;
}

.infographic.dark .ig-list li::before {
  background: #7f93b8;
}

.infographic.dark .ig-list.ok li::before,
.infographic.dark .ig-list.no li::before {
  top: 0.2em;
  width: 11px;
  height: 11px;
  background: #22a06b;
}

.infographic.dark .ig-list.ok li,
.infographic.dark .ig-list.no li {
  padding-left: 18px;
}

.infographic.dark .ig-list.no li::before {
  background: #e5484d;
}

.infographic.dark .ig-list.warn li::before {
  background: #f59e0b;
}

.infographic.dark .ig-list.red li::before {
  background: #e5484d;
}

.infographic.dark .ig-list.amber li::before {
  background: #f59e0b;
}

.infographic.dark .ig-list.violet li::before {
  background: #a855f7;
}

.c-code {
  margin: 0 0 8px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #050d1c;
  border: 1px solid #1c2f55;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
  color: #cfe0ff;
  white-space: pre;
  overflow: hidden;
}

.c-code mark {
  background: rgba(229, 72, 77, 0.28);
  color: #ffb4b6;
  border-radius: 3px;
}

.c-pipe {
  display: grid;
  grid-template-columns: 0.8fr 1.5fr 1fr;
  gap: 18px;
}

.c-box {
  position: relative;
  padding: 8px 9px;
  border: 1px solid #25407a;
  border-radius: 9px;
  background: #0a1730;
  line-height: 1.55;
}

.c-box span,
.c-col > span {
  display: block;
  margin-bottom: 6px;
  padding: 3px 6px;
  border-radius: 5px;
  background: #16305f;
  color: #fff;
  font-weight: 700;
  font-size: 11.5px;
  text-align: center;
}

.c-box b {
  color: #7fb2ff;
}

.c-box:not(:last-child)::after {
  content: '\2192';
  position: absolute;
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
  color: #7fb2ff;
  font-size: 15px;
}

.c-cols {
  display: grid;
  gap: 8px;
}

.c-cols.two {
  grid-template-columns: 1fr 1fr;
}

.c-cols.three {
  grid-template-columns: repeat(3, 1fr);
}

.c-col {
  padding: 7px 8px 9px;
  border: 1px solid #1c2f55;
  border-radius: 9px;
  background: #0a1730;
}

.c-col.no > span {
  background: #7a1f24;
}

.c-col.ok > span {
  background: #14573c;
}

.c-col.red > span {
  background: #7a1f24;
}

.c-col.amber > span {
  background: #7a4b06;
}

.c-col.violet > span {
  background: #4c1d95;
}

.c-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.c-table th,
.c-table td {
  padding: 5px 7px;
  border: 1px solid #1c2f55;
  text-align: left;
}

.c-table th {
  background: #16305f;
  color: #fff;
}

.c-table td:nth-child(2) {
  color: #ff9a9d;
}

.c-table td:nth-child(3),
.c-table td:nth-child(4) {
  color: #6ee7a8;
}

.c-legend {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 6px;
  font-size: 11px;
}

.c-legend span::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 2px;
  background: #e5484d;
}

.c-legend .good::before {
  background: #22a06b;
}

.c-chart {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.c-pair {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.c-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 118px;
  width: 100%;
  padding-top: 16px;
  border-bottom: 1px solid #25407a;
}

.c-bars i {
  position: relative;
  width: 22px;
  border-radius: 3px 3px 0 0;
  background: #e5484d;
}

.c-bars i.good {
  background: #22a06b;
}

.c-bars em {
  position: absolute;
  left: 50%;
  top: -15px;
  transform: translateX(-50%);
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.c-pair b {
  font-size: 11px;
}

.c-pair span {
  font-size: 10.5px;
  color: #6ee7a8;
}

.infographic.dark .ig-foot {
  color: #8ea2c8;
}

.infographic.dark .ig-foot span:first-child {
  color: #facc15;
}

@media (max-width: 1100px) {
  .ig-row.c-a,
  .ig-row.c-b,
  .ig-row.c-c {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .c-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .c-pipe,
  .c-cols.two,
  .c-cols.three {
    grid-template-columns: 1fr;
  }

  .c-box:not(:last-child)::after {
    display: none;
  }

  .c-table {
    font-size: 10.5px;
  }
}

/* Six-pillar SRE toolkit poster */
.infographic.toolkit {
  padding: 30px 28px 18px;
  background: #f2eee3;
  border-color: #ddd5c2;
  color: #1c1c1c;
  font-size: 13px;
}

.tk-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-align: center;
  color: #171717;
}

.tk-title em {
  font-style: normal;
  color: #5c8a1e;
}

.tk-title span {
  color: #0f5b46;
}

.tk-sub {
  margin-top: 10px;
  text-align: center;
  font-size: 14px;
  color: #4c4a42;
}

.tk-pillars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  align-items: end;
  margin-top: 26px;
  padding-bottom: 58px;
}

.tk-pillar {
  position: relative;
  min-height: var(--h);
  padding: 14px 10px 74px;
  border: 1.5px solid #0f5b46;
  border-radius: 12px;
  background: #d8efb2;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.tk-pillar.sand {
  background: #f1dcae;
}

.tk-q {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  color: #0f5b46;
}

.tk-tools {
  display: grid;
  gap: 8px;
}

.tk-tools li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px 5px 5px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.2;
}

.tk-ico {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex: none;
}

.tk-ico svg {
  width: 17px;
  height: 17px;
}

.tk-cat {
  position: absolute;
  left: 50%;
  bottom: -58px;
  display: grid;
  place-items: center;
  width: 122px;
  height: 122px;
  padding: 10px;
  border-radius: 50%;
  background: #0f5b46;
  color: #fff;
  text-align: center;
  transform: translateX(-50%);
  box-shadow: 0 8px 18px rgba(15, 91, 70, 0.35);
}

.tk-cat b {
  font-family: var(--font-display);
  font-size: 13.5px;
  line-height: 1.2;
}

.tk-fan {
  display: block;
  width: 100%;
  height: 96px;
  margin-top: -2px;
}

.tk-fan line {
  stroke: #0f5b46;
  stroke-width: 4;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.tk-hub {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-top: -14px;
}

.tk-hub i {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #cfcabb);
  border: 2px solid #0f5b46;
}

.tk-hub b {
  padding: 5px 16px;
  border-radius: 999px;
  background: #0f5b46;
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
}

.tk-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  font-size: 11.5px;
  color: #6b675b;
}

.tk-foot span:first-child {
  font-weight: 700;
  color: #0f5b46;
}

@media (max-width: 1000px) {
  .tk-pillars {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 84px;
  }

  .tk-pillar {
    min-height: 0;
  }

  .tk-fan,
  .tk-hub i {
    display: none;
  }

  .tk-hub {
    margin-top: 18px;
  }
}

@media (max-width: 620px) {
  .infographic.toolkit {
    padding: 22px 14px 16px;
  }

  .tk-pillars {
    grid-template-columns: repeat(2, 1fr);
    gap: 84px 12px;
  }

  .tk-cat {
    width: 108px;
    height: 108px;
  }

  .tk-foot {
    flex-direction: column;
  }
}
