/* Elll.ai Studio Night and Studio Day architectural stylesheet */

:root,
[data-theme="night"] {
  --canvas-deep: #0C100F;
  --canvas: #131716;
  --surface-1: #1A1F1D;
  --surface-2: #212725;
  --surface-3: #23211E;
  --surface-elevated: #262D2A;

  --elll-ink: #ECEAE3;
  --elll-mid-crest: #EFE7DC;
  --elll-mid-settle: #EDE9DF;
  --elll-pillar-crest: #EFE7DB;
  --elll-pillar-settle: #EDE9E0;
  --elll-arm-crest: #EEE8DD;

  --text-1: #F2F1EC;
  --text-2: #C3C2BB;
  --text-3: #908F88;

  --border-subtle: rgba(236, 234, 228, 0.14);
  --border: rgba(236, 234, 228, 0.26);
  --border-strong: rgba(236, 234, 228, 0.38);

  --accent: #3D7268;
  --accent-hover: #478377;
  --accent-ink: #EEF5F1;
  --accent-text: #6BA096;
  --accent-soft: #547F70;
  --accent-tint: rgba(61, 114, 104, 0.16);
  --accent-border: rgba(107, 160, 150, 0.42);

  --ok: #6BA18F;
  --ok-tint: rgba(107, 161, 143, 0.14);
  --warn: #D9A13E;
  --warn-tint: rgba(217, 161, 62, 0.14);
  --danger: #EC6C5B;
  --danger-tint: rgba(236, 108, 91, 0.14);
  --info: #6AA6D9;
  --info-tint: rgba(106, 166, 217, 0.14);

  --header-bg: rgba(12, 16, 15, 0.94);
  --modal-scrim: rgba(6, 9, 8, 0.80);
  --hero-glow: 0 0 0 1px rgba(61, 114, 104, 0.55), 0 4px 18px rgba(61, 114, 104, 0.20);
  --ambient-wash: radial-gradient(1100px 720px at 66% -8%, rgba(61, 114, 104, 0.085), transparent 62%);

  --font-display: "Space Grotesk", "Inter", system-ui, -apple-system, sans-serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  --radius-card: 2px;
  --radius-control: 2px;
  --container-max: 1240px;
  --header-h: 64px;

  color-scheme: dark;
}

[data-theme="day"] {
  --canvas-deep: #ECEAE3;
  --canvas: #F4F2EC;
  --surface-1: #FAF9F5;
  --surface-2: #ECEAE3;
  --surface-3: #E6E3DA;
  --surface-elevated: #E3DFD5;

  --elll-ink: #394B44;
  --elll-mid-crest: #3E544B;
  --elll-mid-settle: #3C5048;
  --elll-pillar-crest: #3F544C;
  --elll-pillar-settle: #3C4F48;
  --elll-arm-crest: #3E524A;

  --text-1: #20241F;
  --text-2: #4A514C;
  --text-3: #5B615B;

  --border-subtle: rgba(32, 36, 31, 0.12);
  --border: rgba(32, 36, 31, 0.24);
  --border-strong: rgba(32, 36, 31, 0.42);

  --accent: #2F5C53;
  --accent-hover: #264C44;
  --accent-ink: #F4F2EC;
  --accent-text: #2F5C53;
  --accent-soft: #436E61;
  --accent-tint: rgba(47, 92, 83, 0.11);
  --accent-border: rgba(47, 92, 83, 0.36);

  --ok: #255D4D;
  --ok-tint: rgba(37, 93, 77, 0.11);
  --warn: #734904;
  --warn-tint: rgba(115, 73, 4, 0.11);
  --danger: #AD3527;
  --danger-tint: rgba(173, 53, 39, 0.11);
  --info: #255B85;
  --info-tint: rgba(37, 91, 133, 0.11);

  --header-bg: rgba(244, 242, 236, 0.96);
  --modal-scrim: rgba(20, 24, 22, 0.62);
  --hero-glow: 0 0 0 1px rgba(47, 92, 83, 0.42), 0 4px 16px rgba(47, 92, 83, 0.14);
  --ambient-wash: radial-gradient(1100px 720px at 66% -8%, rgba(47, 92, 83, 0.065), transparent 62%);

  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--canvas-deep);
  color: var(--text-1);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

body {
  margin: 0;
  background-color: var(--canvas);
  color: var(--text-1);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
}

body.modal-open {
  overflow: hidden;
}

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

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

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

button {
  cursor: pointer;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-control);
  transition: top 120ms ease;
}

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

.tabular {
  font-variant-numeric: tabular-nums;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

section[id],
main[id] {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

/* Sticky architectural header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding-inline: 2px;
}

.brand-mark-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-wordmark {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-1);
}

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

.header-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 11px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--radius-control);
  white-space: nowrap;
  transition: color 140ms ease, background-color 140ms ease;
}

.header-nav a:hover {
  color: var(--text-1);
  background-color: var(--surface-2);
}

.header-nav a[aria-current="page"] {
  color: var(--text-1);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.mobile-drawer-nav a[aria-current="page"] {
  color: var(--accent-text);
}

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

/* Buttons (2:1 padding ratio, minimum 44px hit target) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 24px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 90ms ease;
}

.btn:active {
  transform: translateY(1px);
}

button:disabled,
.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  transform: none;
}

.btn-lg {
  min-height: 48px;
  padding: 14px 28px;
  font-size: 15px;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

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

.btn-hero-glow {
  box-shadow: var(--hero-glow);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-1);
  border-color: transparent;
}

.btn-ghost:hover {
  background-color: var(--surface-2);
}

.btn-secondary {
  background-color: var(--surface-2);
  color: var(--text-1);
  border-color: var(--border);
}

.btn-secondary:hover {
  background-color: var(--surface-elevated);
  border-color: var(--border-strong);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 12px;
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.btn-icon:hover {
  color: var(--text-1);
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.btn-icon svg {
  flex-shrink: 0;
}

[data-theme="night"] .theme-icon-moon,
[data-theme="day"] .theme-icon-sun {
  display: none;
}

.mobile-menu-btn {
  display: none;
}

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 160;
  background: var(--canvas-deep);
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.mobile-drawer[hidden] {
  display: none;
}

.mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-block: 24px;
}

.mobile-drawer-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 8px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--text-1);
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-drawer-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

/* Section typography and rhythm */
.section {
  padding-block: clamp(72px, 8.5vw, 120px);
  border-top: 1px solid var(--border-subtle);
}

.section-deep {
  background-color: var(--canvas-deep);
}

.section-header {
  max-width: 760px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.kicker {
  display: inline-block;
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--text-1);
  font-weight: 600;
}

.h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.h3 {
  font-size: clamp(19px, 1.8vw, 22px);
  line-height: 1.26;
  letter-spacing: -0.015em;
}

.lead {
  margin: 20px 0 0;
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.58;
  color: var(--text-2);
  max-width: 62ch;
}

.body-copy {
  margin: 0;
  font-size: 15px;
  line-height: 1.62;
  color: var(--text-2);
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* Hero section */
.hero {
  background-color: var(--canvas-deep);
  background-image: var(--ambient-wash);
  padding-block: clamp(56px, 7vw, 108px) clamp(64px, 7.5vw, 112px);
  border-top: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}

.hero-copy .lead {
  max-width: 56ch;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}

.trust-micro-line {
  list-style: none;
  margin: 28px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-3);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 10px 28px;
}

.trust-micro-line li {
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

/* Hero architectural monolith chamber */
.monolith-chamber {
  position: relative;
  background-color: var(--canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 440px;
}

.chamber-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-3);
}

.chamber-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ok);
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: var(--ok);
  border-radius: 50%;
  flex-shrink: 0;
}

.chamber-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 24px;
  min-height: 316px;
}

.corner-mark {
  position: absolute;
  width: 11px;
  height: 11px;
  color: var(--border);
  pointer-events: none;
}

.corner-mark.tl { top: 14px; left: 14px; }
.corner-mark.tr { top: 14px; right: 14px; }
.corner-mark.bl { bottom: 14px; left: 14px; }
.corner-mark.br { bottom: 14px; right: 14px; }

.hero-monolith-svg {
  width: min(228px, 60vw);
  height: auto;
  aspect-ratio: 1040 / 1220;
}

.chamber-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border-subtle);
}

.chamber-telemetry {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border-subtle);
  background-color: var(--canvas-deep);
}

.chamber-telemetry span {
  padding: 9px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-3);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.chamber-telemetry span:nth-child(even) {
  border-right: 0;
}

.chamber-telemetry span:nth-last-child(-n+2) {
  border-bottom: 0;
}

.motion-btn {
  min-height: 44px;
  padding: 10px 8px;
  border: 0;
  border-right: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  transition: background-color 140ms ease, color 140ms ease;
}

.motion-btn:last-child {
  border-right: 0;
}

.motion-btn:hover {
  color: var(--text-1);
  background-color: var(--surface-1);
}

.motion-btn[aria-pressed="true"] {
  background-color: var(--surface-2);
  color: var(--text-1);
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* Inline Elll monolith kinetic animations */
.elll-svg-layer {
  display: none;
}

.monolith-chamber[data-motion="swiss-detent"] .layer-swiss {
  display: inline;
}

.monolith-chamber[data-motion="architectural-flow"] .layer-flow {
  display: inline;
}

.monolith-chamber[data-motion="static"] .layer-static {
  display: inline;
}

.elll-solid {
  fill: var(--elll-ink);
}

.elll-swiss-mid {
  fill: var(--elll-ink);
  animation: elllMidDetent 2.3s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

.elll-swiss-pillar {
  fill: var(--elll-ink);
  animation: elllPillarDetent 2.3s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

.elll-swiss-p1 { animation-delay: 0.14s; }
.elll-swiss-p2 { animation-delay: 0.30s; }
.elll-swiss-p3 { animation-delay: 0.46s; }

@keyframes elllMidDetent {
  0%, 100% { transform: translateY(0px); fill: var(--elll-ink); }
  20%      { transform: translateY(-82px); fill: var(--elll-mid-crest); }
  44%      { transform: translateY(82px); fill: var(--elll-mid-settle); }
  66%      { transform: translateY(0px); fill: var(--elll-ink); }
}

@keyframes elllPillarDetent {
  0%, 100% { transform: translateY(0px); fill: var(--elll-ink); }
  20%      { transform: translateY(-78px); fill: var(--elll-pillar-crest); }
  44%      { transform: translateY(64px); fill: var(--elll-pillar-settle); }
  66%      { transform: translateY(0px); fill: var(--elll-ink); }
}

.elll-flow-arm {
  fill: var(--elll-ink);
  transform-origin: 0px 0px;
  animation: elllArmBreath 2.0s ease-in-out infinite;
}

.elll-flow-arm-1 { animation-delay: 0.00s; }
.elll-flow-arm-2 { animation-delay: -0.26s; }
.elll-flow-arm-3 { animation-delay: -0.52s; }

.elll-flow-pillar {
  fill: var(--elll-ink);
  transform-origin: 0px 500px;
  animation: elllTideWave 2.0s ease-in-out infinite;
}

.elll-flow-p1 { animation-delay: 0.00s; }
.elll-flow-p2 { animation-delay: -0.34s; }
.elll-flow-p3 { animation-delay: -0.68s; }

@keyframes elllArmBreath {
  0%, 100% { transform: scaleX(1.00); fill: var(--elll-ink); }
  50%      { transform: scaleX(0.64); fill: var(--elll-arm-crest); }
}

@keyframes elllTideWave {
  0%, 100% { transform: translateY(-64px) scaleY(0.95); fill: var(--elll-mid-crest); }
  50%      { transform: translateY(64px) scaleY(0.95); fill: var(--elll-ink); }
}

@media (prefers-reduced-motion: reduce) {
  .elll-swiss-mid,
  .elll-swiss-pillar,
  .elll-flow-arm,
  .elll-flow-pillar {
    animation: none !important;
    transform: none !important;
  }
}

/* Section 01: Thesis cards and comparison table */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  background-color: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.table-block {
  margin-top: 48px;
}

.table-caption-heading {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background-color: var(--surface-1);
}

.compare-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.compare-table th,
.compare-table td {
  padding: 18px 20px;
  vertical-align: top;
  border-bottom: 1px solid var(--border-subtle);
}

.compare-table thead th {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  background-color: var(--canvas-deep);
}

.compare-table thead th.col-elll {
  color: var(--accent-text);
  border-left: 1px solid var(--accent-border);
  background-color: var(--surface-2);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.compare-table tbody th {
  font-weight: 600;
  color: var(--text-1);
  width: 19%;
}

.compare-table tbody td {
  color: var(--text-2);
  width: 24%;
}

.compare-table tbody td.col-elll {
  width: 33%;
  color: var(--text-1);
  background-color: var(--surface-2);
  border-left: 1px solid var(--accent-border);
}

/* Section 02: Sovereign Architecture Perimeter Diagram */
.perimeter-frame {
  border: 1px solid var(--border);
  background-color: var(--canvas-deep);
  padding: 6px;
  border-radius: var(--radius-card);
}

.perimeter-inner {
  border: 1px solid var(--border-subtle);
  padding: clamp(20px, 3vw, 32px);
  background-color: var(--canvas);
}

.perimeter-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.perimeter-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-1);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-control);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.chip-ok {
  background-color: var(--ok-tint);
  color: var(--ok);
  border-color: rgba(107, 161, 143, 0.30);
}

.chip-warn {
  background-color: var(--warn-tint);
  color: var(--warn);
  border-color: rgba(217, 161, 62, 0.32);
}

.chip-info {
  background-color: var(--info-tint);
  color: var(--info);
  border-color: rgba(106, 166, 217, 0.30);
}

.chip-neutral {
  background-color: var(--surface-2);
  color: var(--text-2);
  border-color: var(--border-subtle);
}

.planes-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.arch-plane {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 16px 32px;
  padding: 24px;
  background-color: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  align-items: start;
}

.arch-plane:nth-child(even) {
  background-color: var(--surface-2);
}

.arch-plane-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.arch-plane-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.spec-tag {
  padding: 5px 10px;
  background-color: var(--canvas-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
}

.outside-perimeter {
  margin-top: 20px;
  padding: 22px 26px;
  background-color: var(--surface-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 12px 28px;
  align-items: baseline;
}

.outside-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
}

/* Section 03: Interactive Harness Preview */
.harness-shell {
  background-color: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
}

.harness-tablist {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--canvas-deep);
}

.harness-tab {
  min-height: 56px;
  padding: 14px 18px;
  border: 0;
  border-right: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-2);
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: background-color 140ms ease, color 140ms ease;
}

.harness-tab:last-child {
  border-right: 0;
}

.harness-tab:hover {
  background-color: var(--surface-1);
  color: var(--text-1);
}

.harness-tab[aria-selected="true"] {
  background-color: var(--surface-2);
  color: var(--text-1);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.harness-stage {
  padding: clamp(24px, 3.2vw, 36px);
  min-height: 540px;
}

@media (min-width: 960px) {
  .harness-stage {
    min-height: 772px;
  }
}

.harness-panel[hidden] {
  display: none;
}

.panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-toolbar .mono-tag {
  display: block;
}

.segmented-group {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background-color: var(--canvas-deep);
}

.seg-btn {
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-right: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  transition: background-color 140ms ease, color 140ms ease;
}

.seg-btn:last-child {
  border-right: 0;
}

.seg-btn:hover {
  color: var(--text-1);
  background-color: var(--surface-1);
}

.seg-btn[aria-pressed="true"] {
  background-color: var(--accent);
  color: var(--accent-ink);
}

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

.manifest-row {
  padding: 18px 20px;
  background-color: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.manifest-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.manifest-val {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}

.manifest-note {
  font-size: 13px;
  color: var(--text-2);
}

.boundary-summary-bar {
  margin-top: 18px;
  padding: 14px 18px;
  background-color: var(--canvas-deep);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
}

/* Stage 02: Memory pipeline */
.memory-pipeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.pipe-card {
  padding: 22px;
  background-color: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pipe-code {
  padding: 12px 14px;
  background-color: var(--canvas-deep);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-2);
  word-break: break-word;
}

.conflict-box {
  margin-top: 18px;
  padding: 18px 20px;
  background-color: var(--canvas-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.conflict-box.is-conflict {
  border-color: var(--warn);
}

/* Stage 03: Seat orchestration */
.seats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.seat-card {
  padding: 18px;
  background-color: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.seat-card.is-highlighted {
  border-color: var(--accent-border);
}

.seat-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.seat-role {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-1);
}

.seat-holder {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-text);
  margin-top: 3px;
}

.seat-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
}

.cap-track {
  position: relative;
  height: 8px;
  background-color: var(--canvas-deep);
  border: 1px solid var(--border-subtle);
}

.cap-fill {
  height: 100%;
  background-color: var(--accent);
}

.cap-ceiling {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 80%;
  width: 2px;
  background-color: var(--text-3);
}

.cap-caption {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

.tool-separator {
  margin-top: 16px;
  padding: 16px 20px;
  background-color: var(--canvas-deep);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inline-receipt {
  margin-top: 14px;
  padding: 12px 16px;
  background-color: var(--ok-tint);
  border: 1px solid rgba(107, 161, 143, 0.34);
  color: var(--ok);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-receipt[hidden] {
  display: none;
}

/* Stage 04: Approval gate and event spine */
.gate-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 20px;
  align-items: stretch;
}

.gate-proposal {
  padding: 24px;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gate-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.gate-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
}

.event-spine {
  padding: 22px;
  background-color: var(--canvas-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.spine-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.spine-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
}

.spine-item {
  padding: 10px 12px;
  background-color: var(--surface-1);
  border-left: 2px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spine-item.is-ok {
  border-left-color: var(--ok);
}

.spine-item.is-warn {
  border-left-color: var(--warn);
}

.spine-event-type {
  font-weight: 500;
  color: var(--text-1);
}

.spine-item.is-ok .spine-event-type {
  color: var(--ok);
}

.spine-item.is-warn .spine-event-type {
  color: var(--warn);
}

.spine-meta {
  color: var(--text-3);
  font-size: 11px;
}

/* Section 04: Execution planes 2x2 */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.surface-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.icon-box {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--accent-text);
  flex-shrink: 0;
}

/* Section 05: Security and Governance */
.gov-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.gov-index {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent-text);
}

.readiness-callout {
  margin-top: 28px;
  padding: 26px 28px;
  background-color: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 12px 32px;
  align-items: baseline;
}

/* Section 06: Technical Diligence Q&A */
.qa-list {
  border-top: 1px solid var(--border-subtle);
}

.qa-item {
  border-bottom: 1px solid var(--border-subtle);
}

.qa-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 20px 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 500;
  color: var(--text-1);
}

.qa-item summary::-webkit-details-marker {
  display: none;
}

.qa-item summary:hover {
  color: var(--accent-text);
}

.qa-toggle {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  position: relative;
  color: var(--text-3);
}

.qa-toggle::before,
.qa-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.qa-toggle::before {
  width: 14px;
  height: 1.5px;
}

.qa-toggle::after {
  width: 1.5px;
  height: 14px;
  transition: transform 160ms ease, opacity 160ms ease;
}

.qa-item[open] .qa-toggle::after {
  transform: translate(-50%, -50%) scaleY(0);
  opacity: 0;
}

.qa-answer {
  padding: 0 0 26px;
  max-width: 74ch;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-2);
}

/* Section 07: Briefings and Pilots */
.track-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.track-card {
  width: 100%;
  text-align: left;
  padding: 28px;
  background-color: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.track-card:hover {
  border-color: var(--border-strong);
  background-color: var(--surface-2);
}

.track-card[aria-pressed="true"] {
  background-color: var(--surface-2);
  border-color: var(--accent);
}

.track-action-label {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Composer (used both inline and in modal) */
.composer-card {
  padding: clamp(24px, 3.2vw, 36px);
  background-color: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.composer-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
}

.field input,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  font-size: 15px;
  color: var(--text-1);
  transition: border-color 140ms ease, background-color 140ms ease;
}

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

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-3);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent-text);
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-tint);
}

.field input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-error {
  font-size: 13px;
  color: var(--danger);
  min-height: 0;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.focus-chip {
  min-height: 44px;
  padding: 9px 14px;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  font-size: 13px;
  color: var(--text-2);
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.focus-chip:hover {
  color: var(--text-1);
  border-color: var(--border-strong);
}

.focus-chip[aria-pressed="true"] {
  background-color: var(--accent-tint);
  border-color: var(--accent-text);
  color: var(--text-1);
}

.dispatch-ready {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dispatch-ready[hidden],
.composer-form[hidden] {
  display: none;
}

.dispatch-preview {
  margin: 0;
  padding: 18px 20px;
  background-color: var(--canvas-deep);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.dispatch-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.direct-fallback {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--text-3);
}

.direct-fallback a {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Footer */
.site-footer {
  background-color: var(--canvas-deep);
  border-top: 1px solid var(--border-subtle);
  padding-block: 64px 56px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr));
  gap: 36px;
}

/* Inline prose links and multi-page architectural components */
.text-link {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 140ms ease;
}

.text-link:hover {
  color: var(--text-1);
}

.card-link {
  margin-top: auto;
  padding-top: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.card-link:hover {
  color: var(--text-1);
}

.breadcrumb-bar {
  background-color: var(--canvas-deep);
  border-bottom: 1px solid var(--border-subtle);
}

.breadcrumb-nav ol {
  list-style: none;
  margin: 0;
  padding: 12px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}

.breadcrumb-nav li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: var(--text-3);
  transition: color 140ms ease;
}

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

.breadcrumb-sep {
  color: var(--border-strong);
  user-select: none;
}

.breadcrumb-nav [aria-current="page"] {
  color: var(--text-1);
}

/* Inner pillar and guide page headers */
.page-hero {
  background-color: var(--canvas-deep);
  background-image: var(--ambient-wash);
  padding-block: clamp(48px, 6vw, 84px);
}

.page-hero-inner {
  max-width: 880px;
}

.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 28px;
}

.spec-strip {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border-subtle);
  background-color: var(--surface-1);
}

.spec-strip li {
  padding: 16px 18px;
  border-right: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-1);
}

.spec-strip li:last-child {
  border-right: 0;
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}

/* Editorial prose and two-column guide layout */
.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: start;
}

.prose-column {
  max-width: 68ch;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.prose-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-margin-top: calc(var(--header-h) + 28px);
}

.prose-block h2 {
  font-size: clamp(24px, 2.5vw, 32px);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.prose-block h3 {
  font-size: 19px;
  line-height: 1.28;
  margin-top: 8px;
}

.prose-lead {
  margin: 0;
  font-size: 17px;
  line-height: 1.62;
  color: var(--text-1);
}

.prose-list {
  margin: 4px 0 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 15px;
  line-height: 1.62;
  color: var(--text-2);
}

.prose-list li::marker {
  color: var(--accent-text);
}

.callout-panel {
  padding: 24px 26px;
  background-color: var(--surface-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cta-band {
  padding: 28px 30px;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.guide-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.toc-box {
  padding: 22px;
  background-color: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toc-list a {
  display: block;
  padding: 7px 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-2);
  border-bottom: 1px solid var(--border-subtle);
  transition: color 140ms ease;
}

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

.toc-list a:hover {
  color: var(--accent-text);
}

/* Open visible Q&A editorial blocks (zero hidden prose) */
.qa-open-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.qa-open-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.qa-open-card {
  padding: 24px 26px;
  background-color: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qa-open-card h3 {
  font-size: 18px;
  line-height: 1.32;
}

/* Related links cross-grid */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.related-link-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  background-color: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  transition: border-color 140ms ease, background-color 140ms ease;
}

.related-link-card:hover {
  border-color: var(--accent-border);
  background-color: var(--surface-2);
}

.related-link-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
}

.related-link-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}

/* Investors animated brand kit gallery */
.brand-kit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.brand-asset-card {
  background-color: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.brand-preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background-color: #0C100F;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-preview-stage.is-light-stage {
  background-color: #F4F2EC;
}

.brand-preview-stage img {
  width: 192px;
  height: 192px;
  object-fit: contain;
}

.brand-asset-meta {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.svg-kit-strip {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.svg-kit-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  background-color: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  transition: border-color 140ms ease, background-color 140ms ease;
}

.svg-kit-link:hover {
  border-color: var(--accent-border);
  background-color: var(--surface-2);
}

/* 404 recovery layout */
.not-found-section {
  min-height: calc(100vh - var(--header-h) - 240px);
  display: flex;
  align-items: center;
  padding-block: 80px;
  background-color: var(--canvas-deep);
}

.not-found-card {
  max-width: 680px;
  padding: clamp(28px, 4vw, 44px);
  background-color: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.recovery-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-list a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 14px;
  color: var(--text-2);
  transition: color 140ms ease;
}

.footer-list a:hover {
  color: var(--text-1);
}

.footer-legal {
  margin: 8px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}

/* Accessible Briefing Modal (no outside-click draft loss, explicit Close button) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 180;
  background-color: var(--modal-scrim);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-dialog {
  width: 100%;
  max-width: 680px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background-color: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--canvas-deep);
}

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

/* Responsive Breakpoints (12, 8, and 4 columns, zero overflow down to 320px) */
@media (max-width: 1080px) {
  .header-nav,
  .desktop-theme-btn {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }
}

@media (max-width: 1024px) {
  .hero-grid,
  .guide-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-sidebar {
    position: static;
    order: -1;
  }

  .monolith-chamber {
    min-height: 360px;
  }

  .grid-3,
  .gov-grid,
  .memory-pipeline,
  .spec-strip,
  .related-grid,
  .svg-kit-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spec-strip li {
    border-bottom: 1px solid var(--border-subtle);
  }

  .arch-plane,
  .outside-perimeter,
  .readiness-callout,
  .gate-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .harness-tablist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .harness-tab {
    border-bottom: 1px solid var(--border-subtle);
  }

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

@media (max-width: 768px) {
  .header-cta {
    padding: 10px 14px;
    font-size: 13px;
  }

  .grid-3,
  .grid-2,
  .gov-grid,
  .track-grid,
  .manifest-grid,
  .memory-pipeline,
  .seats-grid,
  .form-grid-2,
  .footer-grid,
  .spec-strip,
  .qa-open-grid,
  .related-grid,
  .brand-kit-grid,
  .svg-kit-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .spec-strip li {
    border-right: 0;
  }

  .breadcrumb-nav a,
  .toc-list a,
  .footer-list a,
  .recovery-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .harness-tablist {
    grid-template-columns: minmax(0, 1fr);
  }

  .harness-tab {
    border-right: 0;
  }

  .harness-stage {
    min-height: 0;
  }

  .modal-header,
  .modal-body {
    padding-inline: 18px;
  }

  .chamber-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta-row .btn {
    width: 100%;
  }

  .hero-cta-row .btn-ghost {
    border-color: var(--border);
    background-color: var(--surface-1);
  }

  .trust-micro-line {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .motion-btn {
    font-size: 10px;
    padding: 10px 4px;
  }
}

@media (max-width: 380px) {
  .header-inner {
    gap: 10px;
  }

  .brand-link {
    gap: 8px;
  }

  .header-actions {
    gap: 6px;
  }

  .header-cta {
    padding: 10px 10px;
    font-size: 12px;
  }

  .btn-icon {
    padding: 0 8px;
    gap: 6px;
  }

  .chamber-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}
