/* ============================================================
   RAD/S² DESIGN SYSTEM
   radsquared.ai — Angular Acceleration Manifested
   ============================================================ */

/* --- Local Fonts (SIL Open Font License) --- */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/Inter-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/Inter-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/Inter-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/Inter-Bold.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/IBMPlexMono-Regular.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/IBMPlexMono-Medium.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/IBMPlexMono-SemiBold.woff2') format('woff2'); }

/* --- CSS Custom Properties --- */
:root {
  --rad-bg-dark: #0A1018;
  --rad-surface-dark: #101A26;
  --rad-bg-light: #F3F1EA;
  --rad-fg: #F5F7FA;
  --rad-fg-light: #111417;
  --rad-muted: #6E7884;
  --rad-grid: #C7CCD1;
  --rad-blue: #2C6FB2;
  --rad-orange: #C86A2B;
  --rad-success: #2F8F5B;
  --rad-warn: #D9932E;
  --rad-error: #A94A44;

  --font-sans: 'Inter', 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'JetBrains Mono', monospace;

  --ease-standard: cubic-bezier(0.2, 0.0, 0.2, 1);
  --duration-fast: 120ms;
  --duration-base: 180ms;
  --duration-panel: 260ms;
  --duration-system: 420ms;

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

/* --- Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
}

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

/* --- Mode: Dark --- */
body.dark {
  background: var(--rad-bg-dark);
  color: var(--rad-fg);
}

body.dark .surface {
  background: var(--rad-surface-dark);
}

/* --- Mode: Light --- */
body.light {
  background: var(--rad-bg-light);
  color: var(--rad-fg-light);
}

body.light .surface {
  background: #fff;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 65ch;
}

.mono {
  font-family: var(--font-mono);
}

.label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rad-muted);
}

.body-sm {
  font-size: 0.875rem;
  line-height: 1.5;
}

.text-muted {
  color: var(--rad-muted);
}

.text-blue { color: var(--rad-blue); }
.text-orange { color: var(--rad-orange); }
.text-success { color: var(--rad-success); }
.text-warn { color: var(--rad-warn); }
.text-error { color: var(--rad-error); }

/* --- Layout: Container & Grid --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.grid {
  display: grid;
  gap: var(--space-4);
}

/* 12-col desktop */
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(12, 1fr); }
  .col-1  { grid-column: span 1; }
  .col-2  { grid-column: span 2; }
  .col-3  { grid-column: span 3; }
  .col-4  { grid-column: span 4; }
  .col-5  { grid-column: span 5; }
  .col-6  { grid-column: span 6; }
  .col-7  { grid-column: span 7; }
  .col-8  { grid-column: span 8; }
  .col-9  { grid-column: span 9; }
  .col-10 { grid-column: span 10; }
  .col-11 { grid-column: span 11; }
  .col-12 { grid-column: span 12; }
}

/* 8-col tablet */
@media (min-width: 640px) and (max-width: 1023px) {
  .grid { grid-template-columns: repeat(8, 1fr); }
  .col-t-1 { grid-column: span 1; }
  .col-t-2 { grid-column: span 2; }
  .col-t-3 { grid-column: span 3; }
  .col-t-4 { grid-column: span 4; }
  .col-t-5 { grid-column: span 5; }
  .col-t-6 { grid-column: span 6; }
  .col-t-7 { grid-column: span 7; }
  .col-t-8 { grid-column: span 8; }
}

/* 4-col mobile */
@media (max-width: 639px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .col-m-1 { grid-column: span 1; }
  .col-m-2 { grid-column: span 2; }
  .col-m-3 { grid-column: span 3; }
  .col-m-4 { grid-column: span 4; }
}

/* --- Navigation --- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  transition: background var(--duration-panel) var(--ease-standard);
}

body.dark .site-nav {
  background: rgba(10, 16, 24, 0.92);
  border-bottom: 1px solid rgba(245, 247, 250, 0.06);
}

body.light .site-nav {
  background: rgba(243, 241, 234, 0.92);
  border-bottom: 1px solid rgba(17, 20, 23, 0.08);
}

.site-nav {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

body.dark .nav-brand { color: var(--rad-fg); }
body.light .nav-brand { color: var(--rad-fg-light); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-2);
  transition: color var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard);
  border-bottom: 1.5px solid transparent;
}

body.dark .nav-link {
  color: var(--rad-muted);
}
body.dark .nav-link:hover,
body.dark .nav-link.active {
  color: var(--rad-fg);
}
body.dark .nav-link.active {
  border-bottom-color: var(--rad-orange);
}

body.light .nav-link {
  color: var(--rad-muted);
}
body.light .nav-link:hover,
body.light .nav-link.active {
  color: var(--rad-fg-light);
}
body.light .nav-link.active {
  border-bottom-color: var(--rad-blue);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-1);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  transition: transform var(--duration-base) var(--ease-standard),
              opacity var(--duration-fast) var(--ease-standard);
}

body.dark .nav-toggle span { background: var(--rad-fg); }
body.light .nav-toggle span { background: var(--rad-fg-light); }

.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: var(--space-4);
    gap: var(--space-3);
  }
  body.dark .nav-links {
    background: rgba(10, 16, 24, 0.96);
    border-bottom: 1px solid rgba(245, 247, 250, 0.06);
  }
  body.light .nav-links {
    background: rgba(243, 241, 234, 0.96);
    border-bottom: 1px solid rgba(17, 20, 23, 0.08);
  }
  .nav-links.open {
    display: flex;
  }
}

/* --- Page structure --- */
.page-content {
  padding-top: calc(56px + var(--space-6));
  padding-bottom: var(--space-8);
}

/* --- Section spacing --- */
.section {
  margin-bottom: var(--space-8);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

body.dark .section-label { color: var(--rad-muted); }
body.light .section-label { color: var(--rad-muted); }

/* --- Cards / Panels --- */
.panel {
  border-radius: 2px;
  padding: var(--space-4);
  transition: border-color var(--duration-base) var(--ease-standard);
}

body.dark .panel {
  background: var(--rad-surface-dark);
  border: 1px solid rgba(245, 247, 250, 0.06);
}
body.dark .panel:hover {
  border-color: rgba(245, 247, 250, 0.12);
}

body.light .panel {
  background: #fff;
  border: 1px solid rgba(17, 20, 23, 0.08);
}
body.light .panel:hover {
  border-color: rgba(17, 20, 23, 0.16);
}

/* --- Dividers --- */
.divider {
  height: 1px;
  margin: var(--space-6) 0;
}

body.dark .divider { background: rgba(245, 247, 250, 0.06); }
body.light .divider { background: rgba(17, 20, 23, 0.08); }

/* --- Buttons / Links --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-3);
  border: 1px solid;
  border-radius: 2px;
  transition: all var(--duration-base) var(--ease-standard);
}

body.dark .btn {
  border-color: rgba(245, 247, 250, 0.2);
  color: var(--rad-fg);
}
body.dark .btn:hover {
  border-color: var(--rad-orange);
  color: var(--rad-orange);
}

body.light .btn {
  border-color: rgba(17, 20, 23, 0.2);
  color: var(--rad-fg-light);
}
body.light .btn:hover {
  border-color: var(--rad-blue);
  color: var(--rad-blue);
}

/* --- Footer --- */
.site-footer {
  padding: var(--space-6) var(--space-4);
  text-align: center;
}

.site-footer .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.site-footer .footer-brand {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.site-footer .footer-links {
  display: flex;
  gap: var(--space-3);
}

.site-footer .footer-link {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color var(--duration-fast) var(--ease-standard);
}

body.dark .site-footer {
  border-top: 1px solid rgba(245, 247, 250, 0.06);
  color: var(--rad-muted);
}
body.dark .site-footer .footer-link:hover { color: var(--rad-fg); }

body.light .site-footer {
  border-top: 1px solid rgba(17, 20, 23, 0.08);
  color: var(--rad-muted);
}
body.light .site-footer .footer-link:hover { color: var(--rad-fg-light); }

/* --- Engineering Grid (visible background for light mode) --- */
body.light .engineering-grid {
  background-image:
    linear-gradient(rgba(199, 204, 209, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(199, 204, 209, 0.2) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* --- Inline SVG diagram defaults --- */
svg.diagram {
  overflow: visible;
}

svg.diagram text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

body.dark svg.diagram text { fill: var(--rad-fg); }
body.light svg.diagram text { fill: var(--rad-fg-light); }

body.dark svg.diagram .stroke-primary { stroke: var(--rad-fg); }
body.dark svg.diagram .stroke-muted { stroke: var(--rad-muted); }

body.light svg.diagram .stroke-primary { stroke: var(--rad-fg-light); }
body.light svg.diagram .stroke-muted { stroke: var(--rad-muted); }

/* --- Audio player --- */
.audio-player {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: 2px;
}

body.dark .audio-player {
  background: var(--rad-surface-dark);
  border: 1px solid rgba(245, 247, 250, 0.06);
}

body.light .audio-player {
  background: #fff;
  border: 1px solid rgba(17, 20, 23, 0.08);
}

.audio-player audio {
  width: 100%;
  height: 36px;
}

/* --- Utility --- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.pt-6 { padding-top: var(--space-6); }
.pb-6 { padding-bottom: var(--space-6); }
.text-center { text-align: center; }
.w-full { width: 100%; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* --- Pipeline / Phase cards (roadmap) --- */
.phase-card {
  position: relative;
  padding: var(--space-4);
  border-radius: 2px;
  border-left: 3px solid var(--rad-blue);
}

body.light .phase-card {
  background: #fff;
  border-top: 1px solid rgba(17, 20, 23, 0.08);
  border-right: 1px solid rgba(17, 20, 23, 0.08);
  border-bottom: 1px solid rgba(17, 20, 23, 0.08);
}

body.dark .phase-card {
  background: var(--rad-surface-dark);
  border-top: 1px solid rgba(245, 247, 250, 0.06);
  border-right: 1px solid rgba(245, 247, 250, 0.06);
  border-bottom: 1px solid rgba(245, 247, 250, 0.06);
}

.phase-card .phase-duration {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rad-blue);
  margin-bottom: var(--space-1);
}

.phase-card .phase-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.phase-card .phase-gate {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--rad-muted);
  margin-bottom: var(--space-2);
}

/* Phase accent colors */
.phase-card.phase-1 { border-left-color: var(--rad-blue); }
.phase-card.phase-1 .phase-duration { color: var(--rad-blue); }
.phase-card.phase-2 { border-left-color: var(--rad-orange); }
.phase-card.phase-2 .phase-duration { color: var(--rad-orange); }
.phase-card.phase-3 { border-left-color: var(--rad-warn); }
.phase-card.phase-3 .phase-duration { color: var(--rad-warn); }
.phase-card.phase-4 { border-left-color: var(--rad-success); }
.phase-card.phase-4 .phase-duration { color: var(--rad-success); }

/* --- Node / Topology (team page) --- */
.node {
  position: relative;
  padding: var(--space-3);
  border-radius: 2px;
}

body.dark .node {
  background: var(--rad-surface-dark);
  border: 1px solid rgba(245, 247, 250, 0.08);
}

body.dark .node:hover {
  border-color: rgba(245, 247, 250, 0.16);
}

.node-monogram {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--rad-surface-dark);
  border: 1px solid rgba(245, 247, 250, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--rad-orange);
  margin-bottom: var(--space-2);
  flex-shrink: 0;
}

.node-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(245, 247, 250, 0.12);
  margin-bottom: var(--space-2);
  flex-shrink: 0;
}

.node-name {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
}

.node-role {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--rad-muted);
  margin-top: var(--space-1);
}

/* --- Venture cards --- */
.venture-card {
  padding: var(--space-4);
  border-radius: 2px;
  border-left: 3px solid var(--rad-orange);
}

body.dark .venture-card {
  background: var(--rad-surface-dark);
  border-top: 1px solid rgba(245, 247, 250, 0.06);
  border-right: 1px solid rgba(245, 247, 250, 0.06);
  border-bottom: 1px solid rgba(245, 247, 250, 0.06);
}

.venture-card h3 {
  margin-bottom: var(--space-2);
}

.venture-card p {
  color: var(--rad-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* --- Pathway cards (contact) --- */
.pathway {
  padding: var(--space-4);
  border-radius: 2px;
}

body.dark .pathway {
  background: var(--rad-surface-dark);
  border: 1px solid rgba(245, 247, 250, 0.06);
}

body.dark .pathway:hover {
  border-color: rgba(245, 247, 250, 0.12);
}

.pathway .pathway-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rad-orange);
  margin-bottom: var(--space-2);
}

.pathway p {
  color: var(--rad-muted);
  font-size: 0.9375rem;
}

/* --- Manifesto section styling --- */
.manifesto-section {
  margin-bottom: var(--space-7);
}

.manifesto-section h2 {
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid rgba(17, 20, 23, 0.1);
}

.manifesto-section h3 {
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}

.manifesto-section p {
  margin-bottom: var(--space-3);
}

.manifesto-section blockquote {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  padding: var(--space-3) var(--space-4);
  margin: var(--space-4) 0;
  border-left: 3px solid var(--rad-blue);
  color: var(--rad-muted);
}

body.light .manifesto-section blockquote {
  background: rgba(44, 111, 178, 0.04);
}

/* --- Engine schematic (index) --- */
.engine-schematic {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) 0;
}

.engine-identity {
  text-align: center;
  margin-bottom: var(--space-5);
}

.engine-identity .identity-mark {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.engine-identity .identity-type {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rad-muted);
  margin-top: var(--space-2);
}

.engine-identity .identity-tagline {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--rad-orange);
  margin-top: var(--space-2);
}

.engine-subtitle {
  text-align: center;
  max-width: 52ch;
  margin: 0 auto var(--space-6);
  color: var(--rad-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* --- Operating mode cards --- */
.mode-card {
  padding: var(--space-4);
  border-radius: 2px;
  position: relative;
}

.mode-card::after {
  content: '→';
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--rad-orange);
  opacity: 0.4;
  transition: opacity var(--duration-base) var(--ease-standard),
              transform var(--duration-base) var(--ease-standard);
}

.mode-card:hover::after {
  opacity: 1;
  transform: translateX(2px);
}

body.dark .mode-card {
  background: var(--rad-surface-dark);
  border: 1px solid rgba(245, 247, 250, 0.06);
  transition: border-color var(--duration-base) var(--ease-standard);
}

body.dark .mode-card:hover {
  border-color: var(--rad-orange);
}

.mode-card .mode-number {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rad-orange);
  margin-bottom: var(--space-2);
}

.mode-card .mode-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.mode-card .mode-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--rad-muted);
  margin-bottom: var(--space-2);
}

.mode-card .mode-desc {
  font-size: 0.875rem;
  color: var(--rad-muted);
  line-height: 1.5;
}

/* --- Definition list (what it is / is not) --- */
.definition-row {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}

.definition-row .def-not {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--rad-muted);
  text-decoration: line-through;
  min-width: 180px;
  flex-shrink: 0;
}

.definition-row .def-why {
  font-size: 0.875rem;
  color: var(--rad-muted);
}

@media (max-width: 639px) {
  .definition-row {
    flex-direction: column;
    gap: var(--space-1);
  }
  .definition-row .def-not {
    min-width: auto;
  }
}

/* --- Subsystem nav nodes (index page) --- */
.subsystem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.subsystem-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-3);
  border-radius: 2px;
  text-align: center;
  transition: all var(--duration-base) var(--ease-standard);
}

body.dark .subsystem-node {
  border: 1px solid rgba(245, 247, 250, 0.06);
}

body.dark .subsystem-node:hover {
  border-color: var(--rad-orange);
  background: rgba(200, 106, 43, 0.04);
}

.subsystem-node .node-icon {
  width: 32px;
  height: 32px;
  margin-bottom: var(--space-2);
  stroke: var(--rad-muted);
  transition: stroke var(--duration-base) var(--ease-standard);
}

.subsystem-node:hover .node-icon {
  stroke: var(--rad-orange);
}

.subsystem-node .node-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rad-muted);
  transition: color var(--duration-base) var(--ease-standard);
}

.subsystem-node:hover .node-label {
  color: var(--rad-fg);
}

/* --- Roles list (opportunities) --- */
.role-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
}

body.light .role-item {
  border-bottom: 1px solid rgba(17, 20, 23, 0.06);
}

.role-item .role-marker {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rad-blue);
  flex-shrink: 0;
}

.role-item .role-name {
  font-size: 1rem;
  font-weight: 500;
}

/* --- Progression arrows (roadmap) --- */
.progression-bar {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin: var(--space-4) 0;
}

.progression-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rad-muted);
}

.progression-item::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 1px;
  background: var(--rad-grid);
}

.progression-item:last-child::after {
  display: none;
}

/* --- Team topology connections --- */
.topology-group {
  margin-bottom: var(--space-6);
}

.topology-group .group-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.topology-group .group-line {
  flex: 1;
  height: 1px;
}

body.dark .topology-group .group-line {
  background: rgba(245, 247, 250, 0.08);
}

.topology-group .group-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rad-orange);
  flex-shrink: 0;
}

.topology-nodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-3);
}

/* --- Kill criteria section --- */
.kill-criteria {
  padding: var(--space-4);
  border-radius: 2px;
}

body.light .kill-criteria {
  background: rgba(169, 74, 68, 0.04);
  border: 1px solid rgba(169, 74, 68, 0.12);
}

body.light .kill-criteria h3 {
  color: var(--rad-error);
}

/* --- Cultural soil section --- */
.cultural-soil {
  padding: var(--space-4);
  border-radius: 2px;
}

body.light .cultural-soil {
  background: rgba(47, 143, 91, 0.04);
  border: 1px solid rgba(47, 143, 91, 0.12);
}

body.light .cultural-soil h3 {
  color: var(--rad-success);
}

/* --- Accessibility --- */

/* Skip-to-content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-3);
  z-index: 200;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  border-radius: 2px;
  transition: top var(--duration-fast) var(--ease-standard);
}

.skip-link:focus {
  top: var(--space-2);
  outline: 2px solid var(--rad-orange);
  outline-offset: 2px;
}

body.dark .skip-link {
  background: var(--rad-surface-dark);
  color: var(--rad-fg);
  border: 1px solid rgba(245, 247, 250, 0.12);
}

body.light .skip-link {
  background: #fff;
  color: var(--rad-fg-light);
  border: 1px solid rgba(17, 20, 23, 0.12);
}

/* Focus-visible styles for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--rad-orange);
  outline-offset: 2px;
}

/* Remove default focus ring for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Specific focus styles for interactive elements */
.nav-link:focus-visible,
.btn:focus-visible,
.subsystem-node:focus-visible,
.pathway:focus-visible,
.node:focus-visible,
.footer-link:focus-visible {
  outline: 2px solid var(--rad-orange);
  outline-offset: 2px;
  border-radius: 2px;
}

body.light .nav-link:focus-visible,
body.light .btn:focus-visible,
body.light .subsystem-node:focus-visible {
  outline-color: var(--rad-blue);
}

/* Improved muted text contrast: bump #6E7884 to #8A919A for better WCAG AA on dark bg */
body.dark .text-muted,
body.dark .section-label,
body.dark .node-role,
body.dark .mode-card .mode-label,
body.dark .mode-card .mode-desc,
body.dark .venture-card p,
body.dark .pathway p,
body.dark .definition-row .def-not,
body.dark .definition-row .def-why {
  color: #8A919A;
}

/* Improved muted text contrast on light backgrounds */
body.light .text-muted,
body.light .section-label {
  color: #545D68;
}

/* Distinguishable link styling in content areas */
.manifesto-section a,
.page-content p a {
  border-bottom: 1px solid currentColor;
  transition: color var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard);
}

body.dark .manifesto-section a,
body.dark .page-content p a {
  color: var(--rad-orange);
  border-bottom-color: rgba(200, 106, 43, 0.4);
}

body.dark .manifesto-section a:hover,
body.dark .page-content p a:hover {
  border-bottom-color: var(--rad-orange);
}

body.light .manifesto-section a,
body.light .page-content p a {
  color: var(--rad-blue);
  border-bottom-color: rgba(44, 111, 178, 0.3);
}

body.light .manifesto-section a:hover,
body.light .page-content p a:hover {
  border-bottom-color: var(--rad-blue);
}

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
  .page-content {
    padding-top: calc(56px + var(--space-4));
  }
  .section {
    margin-bottom: var(--space-6);
  }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.375rem; }
}
