/* Permission Protocol Brand System v1.0 */
/* Typography: Space Grotesk + Space Mono */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* Infrastructure-grade design system */
/* Reference: Early Stripe + Cloudflare seriousness */

:root {
  /* Permission Protocol Brand Colors */
  --void: #0a0a0a;
  --ash: #1a1a1a;
  --signal: #c8c8c8;
  --permit: #44aa99;
  --deny: #aa4455;
  
  /* Legacy colors for compatibility */
  --black: #e0e0e0;
  --white: #0a0a0a;
  --gray-50: #0a0a0a;
  --gray-100: #111111;
  --gray-200: #1a1a1a;
  --gray-300: #222222;
  --gray-400: #666666;
  --gray-500: #888888;
  --gray-600: #9a9a9a;
  --gray-700: #c8c8c8;
  --gray-800: #d4d4d4;
  --gray-900: #e0e0e0;
  
  /* Brand Typography System */
  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Space Mono', 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
  
  --max-width: 1200px;
  --content-width: 720px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--signal);
  background: var(--void);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
  color: var(--signal);
}

a {
  color: var(--permit);
  text-decoration: none;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.content {
  max-width: var(--content-width);
}

section {
  padding: 6rem 0;
}

/* Explicit section backgrounds - no alternating pattern */

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  border-bottom: 1px solid #222;
  backdrop-filter: blur(10px);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

/* Permission Protocol Brand Lockup — Animated (blocked → signed) */

@keyframes pp-gate-open {
  0%   { transform: scaleY(1); opacity: 0.7; }
  40%  { transform: scaleY(0.6); opacity: 1; }
  70%  { transform: scaleY(1.15); opacity: 1; }
  100% { transform: scaleY(1); opacity: 1; }
}

@keyframes pp-status-shift {
  0%   { background: var(--deny); box-shadow: none; }
  30%  { background: #886633; box-shadow: none; }
  100% { background: var(--permit); box-shadow: 0 0 6px rgba(68, 170, 153, 0.55); }
}

@keyframes pp-scan {
  0%   { left: -100%; opacity: 0; }
  30%  { opacity: 0.18; }
  100% { left: 120%; opacity: 0; }
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 1rem;
  letter-spacing: 0.02em;
  line-height: 1;
  position: relative;
  overflow: visible;
}

/* Gate status indicator — small dot to the left */
.brand-lockup::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--deny);
  margin-right: 7px;
  flex-shrink: 0;
  opacity: 0.55;
  transition: none;
}

/* Scan shimmer — runs across the text on hover */
.brand-lockup::after {
  content: '';
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(68,170,153,0.2), transparent);
  pointer-events: none;
  opacity: 0;
}

.logo:hover .brand-lockup::before {
  animation: pp-status-shift 0.5s ease forwards;
}

.logo:hover .brand-lockup::after {
  animation: pp-scan 0.6s ease 0.1s forwards;
}

.brand-lockup .permission {
  color: var(--void);
  font-weight: 600; /* Space Grotesk SemiBold */
  margin-right: 0.1em;
  transition: letter-spacing 0.35s ease;
}

.logo:hover .brand-lockup .permission {
  letter-spacing: 0.04em;
}

.brand-lockup .protocol-light {
  color: var(--gray-400);
  font-weight: 300; /* Space Grotesk Light */
  opacity: 0.65;
  transition: color 0.45s ease 0.15s, opacity 0.45s ease 0.15s;
}

.logo:hover .brand-lockup .protocol-light {
  color: var(--permit);
  opacity: 1;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--gray-600);
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--permit);
}

.nav-links a.primary {
  color: var(--permit);
  font-weight: 500;
}

/* Nav CTA button - always visible */
.nav-cta-btn {
  display: none;
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--signal) !important;
  border: 1px solid #333;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.15s;
  margin-left: auto;
  margin-right: 0.75rem;
}

.nav-cta-btn:hover {
  border-color: var(--permit);
  color: var(--permit) !important;
  background: rgba(68, 170, 153, 0.08);
}

/* Sticky Mobile CTA bar */
.mobile-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  border-top: 1px solid #222;
  padding: 0.75rem 1rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.mobile-sticky-cta .btn {
  width: 100%;
  max-width: 300px;
}

.sticky-cta-subtext {
  font-size: 0.75rem;
  color: var(--gray-500);
}

/* Hero */
.hero {
  padding: 10rem 0 6rem;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.hero h1 {
  font-size: 3rem;
  max-width: 800px;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.hero .subheadline {
  font-size: 1.25rem;
  color: var(--gray-600);
  max-width: 600px;
  margin-bottom: 1.5rem;
}

.hero-trust-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.trust-bullet {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--gray-600);
}

.trust-bullet::before {
  content: "✓ ";
  color: var(--gray-400);
}

.hero-scarcity {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 1rem;
}

/* Mobile trust bullets - hidden on desktop */
.hero-trust-bullets-mobile {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid #333;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--permit);
  color: var(--void);
  border-color: var(--permit);
}

.btn-primary:hover {
  background: #59b6a7;
  border-color: #59b6a7;
}

.btn-secondary {
  background: transparent;
  color: var(--signal);
  border: 1px solid #333;
}

.btn-secondary:hover {
  border-color: var(--permit);
  color: var(--permit);
  background: rgba(68, 170, 153, 0.08);
}

.btn-ghost {
  background: transparent;
  color: var(--signal);
  border: 1px solid #333;
  padding: 0.75rem 0;
}

.btn-ghost:hover {
  color: var(--permit);
  border-color: var(--permit);
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Terminal / Code blocks */
.terminal {
  background: var(--gray-900);
  color: var(--gray-100);
  border-radius: 8px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
}

.terminal-header {
  background: var(--gray-800);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gray-600);
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27ca40; }

.terminal-body {
  padding: 1.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.terminal-line {
  margin-bottom: 0.25rem;
}

.terminal-line.dimmed {
  color: var(--gray-500);
}

.terminal-line .label {
  color: var(--gray-400);
}

.terminal-line .value {
  color: var(--white);
}

.terminal-line .status-rejected {
  color: #ef4444;
}

.terminal-line .status-approved {
  color: #22c55e;
}

.terminal-line .reason {
  color: #fbbf24;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: #1a1a1a !important;
  border: 1px solid #222;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
}

pre {
  background: var(--gray-900);
  color: var(--gray-100);
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-wrap: break-word;
}

pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: inherit;
  font-size: inherit;
}

/* Lists */
ul.requirements {
  list-style: none;
  margin: 1.5rem 0;
}

ul.requirements li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--gray-700);
}

ul.requirements li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--gray-400);
}

/* Demo section */
.demo-container {
  margin-top: 2rem;
}

.demo-caption {
  display: none;
}

.demo-status-panel {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
  padding: 1rem 1.5rem;
  background: var(--gray-100);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.status-row {
  display: flex;
  gap: 0.5rem;
}

.status-label {
  color: var(--gray-500);
}

.status-value {
  font-weight: 500;
  color: var(--gray-400);
}

.status-value.pending {
  color: #f59e0b;
}

.status-value.approved {
  color: var(--permit);
}

.status-value.blocked {
  color: var(--deny);
}

.status-value.allowed {
  color: var(--permit);
}

.status-value.present {
  color: #22c55e;
}

.status-value.absent {
  color: var(--gray-400);
}

.terminal-controls {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
}

.terminal-btn {
  background: var(--gray-700);
  border: none;
  color: var(--gray-300);
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.875rem;
  min-width: 28px;
  min-height: 28px;
}

.terminal-btn:hover {
  background: var(--gray-600);
  color: var(--white);
}

.terminal-cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
  color: var(--gray-400);
}

@keyframes blink {
  50% { opacity: 0; }
}

.deploy-blocked {
  display: inline-block;
  background: var(--deny);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  font-weight: 600;
  animation: pulse-blocked 0.5s ease-out;
}

@keyframes pulse-blocked {
  0% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.demo-controls {
  margin-bottom: 1rem;
}

.demo-btn {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: 0.625rem 1rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.demo-btn:hover {
  background: var(--gray-200);
}

.demo-btn.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* Architecture diagram */
.diagram {
  margin: 2rem 0;
  padding: 2rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
}

.diagram-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.diagram-node {
  padding: 0.75rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  text-align: center;
}

.diagram-node.highlight {
  border-color: var(--black);
  font-weight: 500;
}

.diagram-arrow {
  color: var(--gray-400);
  font-size: 1.25rem;
}

.diagram-note {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-left: 0.5rem;
}

/* Sections */
.section-header {
  margin-bottom: 2rem;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--gray-600);
}

/* Structural Claim */
.claim-section {
  padding: 4rem 0;
  background: var(--gray-900);
}

.structural-claim {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--white);
  margin: 0;
  line-height: 1.5;
}

/* Why Now Section */
.why-now-section {
  padding: 4rem 0;
  background: var(--gray-100);
}

.why-now-list {
  list-style: none;
  margin: 1.5rem 0 0;
}

.why-now-list li {
  position: relative;
  padding: 0.75rem 0 0.75rem 1.5rem;
  color: var(--gray-700);
  font-size: 1rem;
}

.why-now-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--gray-400);
}

/* Contrast Section (tight table) */
.contrast-section {
  padding: 4rem 0;
}

.contrast-table-tight {
  margin-top: 1.5rem;
}

.contrast-row {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 1rem;
}

.contrast-row:last-child {
  border-bottom: none;
}

.contrast-left {
  flex: 1;
  color: var(--gray-500);
}

.contrast-arrow {
  padding: 0 1rem;
  color: var(--gray-400);
}

.contrast-right {
  flex: 1;
  font-weight: 500;
  color: var(--gray-900);
}

/* Section Backgrounds - Brand Colors */
#authorization-requirements,
#failure-mode,
#receipt-example,
#diagnostic,
#designed-for {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}

/* Inevitability Statement */
#inevitability {
  padding: 3rem 0;
  text-align: center;
}

.inevitability-statement {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--gray-600);
  font-style: italic;
  margin: 0;
}

/* Failure Mode */
.failure-list {
  list-style: none;
  margin: 1.5rem 0;
}

.failure-list li {
  position: relative;
  padding: 0.75rem 0 0.75rem 1.5rem;
  color: var(--gray-700);
}

.failure-list li::before {
  content: "×";
  position: absolute;
  left: 0;
  color: var(--gray-400);
  font-weight: bold;
}

.failure-conclusion {
  margin-top: 1.5rem;
  color: var(--gray-900);
}

/* Before/After Comparison */
#before-after {
  padding: 4rem 0;
}

.comparison-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 2rem;
}

.comparison-column {
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--gray-300);
}

.comparison-column.highlight {
  border-color: var(--black);
  border-width: 2px;
}

.comparison-column h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.comparison-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--gray-700);
}

.flow-arrow {
  color: var(--gray-400);
}

.comparison-note {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* Receipt Payload */
.receipt-payload {
  background: var(--gray-900);
  color: var(--gray-100);
  padding: 1.5rem;
  border-radius: 8px;
  font-size: 0.875rem;
  margin: 1.5rem 0;
}

/* Trust Boundary Diagram */
.boundary-diagram {
  margin: 2rem 0;
}

.plane {
  padding: 1.5rem;
  text-align: center;
}

.plane h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.plane-items {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.execution-plane {
  background: var(--white);
  border: 1px solid var(--gray-300);
}

.authority-plane {
  background: #111;
  color: #c8c8c8;
}

.boundary-line {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0;
}

.boundary-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 1rem;
  position: relative;
}

.boundary-label::before,
.boundary-label::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 60px;
  height: 1px;
  background: var(--gray-300);
}

.boundary-label::before {
  right: 100%;
}

.boundary-label::after {
  left: 100%;
}

/* Diagnostic Trigger */
.diagnostic-trigger {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--white);
  border-left: 3px solid var(--black);
  font-size: 1rem;
}

/* CTA Microcopy */
.cta-microcopy {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-top: 0.75rem;
}

/* Invariant Grid */
.invariant-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.invariant-card {
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--gray-300);
}

.invariant-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.invariant-card p {
  font-size: 0.9375rem;
  color: var(--gray-600);
  margin: 0;
}

/* Demo Toggle */
.demo-intro {
  font-size: 1rem;
  color: var(--gray-700);
  margin-bottom: 1.5rem;
}

.demo-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  overflow: hidden;
  width: fit-content;
}

.demo-tab {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: 0.625rem 1.25rem;
  background: var(--white);
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  border-right: 1px solid var(--gray-300);
}

.demo-tab:last-child {
  border-right: none;
}

.demo-tab:hover {
  background: var(--gray-50);
}

.demo-tab.active {
  background: var(--gray-900);
  color: var(--white);
}

/* Diagnostic Checklist */
.diagnostic-checklist {
  list-style: none;
  margin: 1.5rem 0;
}

.diagnostic-checklist li {
  position: relative;
  padding: 0.75rem 0 0.75rem 2rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}

.diagnostic-checklist li:last-child {
  border-bottom: none;
}

.diagnostic-checklist li::before {
  content: "☐";
  position: absolute;
  left: 0;
  color: var(--gray-400);
  font-size: 1.125rem;
  transition: all 0.15s ease;
}

/* Interactive checklist */
.diagnostic-subtitle {
  color: var(--gray-500);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

#diagnostic-conclusion.urgent {
  color: var(--deny);
  font-weight: 600;
}

#diagnostic-conclusion.urgent-strong {
  color: var(--deny);
  font-weight: 600;
  text-transform: uppercase;
}

/* Counter badge */
.check-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--gray-500);
  transition: color 0.2s ease;
}

.check-counter.hot {
  color: var(--deny);
  font-weight: 600;
}

.diagnostic-conclusion {
  margin-top: 1.5rem;
  font-size: 1rem;
}

/* Interactive Diagnostic Checklist */
.diagnostic-checklist--interactive {
  gap: 0;
}

.diagnostic-checklist--interactive li {
  padding: 0;
  border-bottom: 1px solid var(--gray-100);
}

.diagnostic-checklist--interactive li:last-child {
  border-bottom: none;
}

.diagnostic-checklist--interactive li::before {
  display: none; /* replaced by custom checkbox icon */
}

.diagnostic-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 0;
  cursor: pointer;
  user-select: none;
  width: 100%;
  transition: background 0.15s ease;
  border-radius: 4px;
}

.diagnostic-item:hover .diagnostic-check-icon {
  border-color: var(--deny);
}

.diagnostic-cb {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.diagnostic-check-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--gray-400, #888);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease;
  position: relative;
}

.diagnostic-cb:checked + .diagnostic-check-icon {
  background: var(--deny);
  border-color: var(--deny);
}

.diagnostic-cb:checked + .diagnostic-check-icon::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

.diagnostic-cb:checked ~ .diagnostic-label {
  color: var(--gray-900, #e0e0e0);
}

.diagnostic-label {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--gray-700);
  transition: color 0.15s ease;
}

/* CTA reveal (hidden by default, shown after 2+ checks) */
.diagnostic-cta-reveal {
  display: none;
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #151515 0%, #0a0a0a 100%);
  border-left: 3px solid var(--deny);
  border-radius: 4px;
  animation: slideIn 0.3s ease;
}

.diagnostic-cta-reveal.is-visible {
  display: block;
}

.diagnostic-cta-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f0f0f0;
  margin: 0 0 0.75rem 0;
}

.diagnostic-cta-btn {
  display: inline-block;
  margin-top: 0;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Approval Not Authority Section - keep white for contrast table visibility */

/* Contrast Table */
.contrast-table {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 2rem;
  margin-top: 2rem;
}

.contrast-column {
  background: var(--white);
  padding: 1.5rem;
  border: 1px solid var(--gray-300);
}

.contrast-column h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-200);
}

.contrast-column ul {
  list-style: none;
  margin: 0;
}

.contrast-column li {
  padding: 0.5rem 0;
  color: var(--gray-700);
  font-size: 0.9375rem;
}

/* Technical Note */
.technical-note {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--gray-700);
  margin: 1.5rem 0;
}

/* Example block */
.example {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--gray-50);
  border-left: 2px solid var(--gray-300);
}

.example-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

/* Designed For Section */
#designed-for {
  background: var(--gray-100);
}

/* Disqualification section */
.disqualify-list {
  list-style: none;
  margin: 1.5rem 0;
}

.disqualify-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--gray-700);
}

.disqualify-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--gray-400);
}

/* CTA section */
.cta-section {
  text-align: center;
  padding: 8rem 0;
}

.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.cta-subtext {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* Form */
.form-container {
  max-width: 480px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--gray-700);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  background: var(--white);
  transition: border-color 0.15s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--black);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-radio-group {
  display: flex;
  gap: 1.5rem;
}

.form-radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.form-radio input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Footer */
footer {
  padding: 3rem 0;
  border-top: 1px solid #1a1a1a;
  background: var(--void);
}

footer .container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.footer-text {
  font-size: 0.875rem;
  color: #666;
}

.footer-trust {
  font-size: 0.8125rem;
  color: #666;
  text-align: center;
}

/* Mobile hamburger menu */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  margin-right: -10px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--signal);
  margin: 5px 0;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

.nav-overlay.active {
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  section {
    padding: 4rem 0;
  }
  
  .nav-links {
    gap: 1.5rem;
  }
  
  .nav-links a {
    font-size: 0.8125rem;
  }
  
  .btn-group {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  /* Code blocks - bump font, increase padding, handle overflow */
  .terminal,
  pre {
    font-size: 0.8125rem;
    border-radius: 6px;
  }
  
  .terminal-body {
    padding: 1rem 1.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  pre {
    padding: 1.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Subtle scroll indicator */
  pre::-webkit-scrollbar,
  .terminal-body::-webkit-scrollbar {
    height: 4px;
  }
  
  pre::-webkit-scrollbar-thumb,
  .terminal-body::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 2px;
  }
}

@media (max-width: 640px) {
  /* Mobile nav */
  .nav-toggle {
    display: block;
  }
  
  /* Show nav CTA button on mobile */
  .nav-cta-btn {
    display: block;
  }
  
  /* Hide Request Access in hamburger menu on mobile */
  .nav-links .mobile-hide {
    display: none;
  }
  
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0a0a0a;
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 0;
    z-index: 100;
    border-top: 1px solid #1a1a1a;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .nav-links li {
    border-bottom: 1px solid #1a1a1a;
  }
  
  .nav-links a {
    display: block;
    font-size: 1.1rem;
    color: #c8c8c8;
    min-height: 48px;
    line-height: 48px;
    padding: 0;
    font-family: var(--font-sans);
    font-weight: 500;
    letter-spacing: 0.02em;
  }
  
  .nav-links a:hover,
  .nav-links a.active {
    color: #44aa99;
  }
  
  /* Sticky bottom CTA bar */
  .mobile-sticky-cta {
    display: flex;
  }
  
  /* Add padding to footer so sticky CTA doesn't cover content */
  footer {
    padding-bottom: 5rem;
  }
  
  /* Demo touch targets - Apple HIG minimum 44x44px */
  .terminal-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
    font-size: 1rem;
  }
  
  .terminal-controls {
    gap: 0.75rem;
  }
  
  /* Demo caption for mobile context */
  .demo-caption {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.75rem;
    text-align: center;
  }
  
  /* Hero - tighter on mobile */
  .hero {
    padding: 7rem 0 4rem;
    min-height: auto;
  }
  
  .hero h1 {
    font-size: 1.75rem;
    line-height: 1.25;
  }
  
  .hero .subheadline {
    font-size: 1.125rem;
    margin-bottom: 2rem;
  }
  
  /* Hero simplification - hide trust bullets on mobile, show after CTA */
  .hero-trust-bullets {
    display: none;
  }
  
  .hero-trust-bullets-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
  }
  
  /* Invariant section - card spacing */
  ul.requirements {
    margin: 1.5rem 0;
  }
  
  ul.requirements li {
    padding: 1rem 0 1rem 1.5rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--gray-200);
  }
  
  ul.requirements li:last-child {
    border-bottom: none;
  }
  
  /* Demo button - full width, generous padding */
  .demo-btn {
    width: 100%;
    padding: 1rem;
    font-size: 0.875rem;
    min-height: 44px;
  }
  
  .demo-container {
    margin-top: 1.5rem;
  }
  
  /* Reduce CTA section padding */
  .cta-section {
    padding: 5rem 0;
  }
  
  .cta-section h2 {
    font-size: 1.5rem;
  }
  
  /* Page header tighter */
  .page-header {
    padding: 6rem 0 3rem;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
  
  .page-header .lead {
    font-size: 1.125rem;
  }
  
  /* Container padding on mobile */
  .container {
    padding: 0 1.5rem;
  }
  
  /* v2 components mobile */
  .structural-claim {
    font-size: 1.125rem;
  }
  
  .invariant-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .invariant-card {
    padding: 1.25rem;
  }
  
  .demo-toggle {
    width: 100%;
  }
  
  .demo-tab {
    flex: 1;
    text-align: center;
    padding: 0.75rem 0.5rem;
  }
  
  .contrast-table {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* v3 components mobile */
  .inevitability-statement {
    font-size: 1rem;
  }
  
  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .comparison-flow {
    font-size: 0.75rem;
  }
  
  .plane-items {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .boundary-label::before,
  .boundary-label::after {
    width: 30px;
  }
  
  /* v5 components mobile */
  .hero-trust-bullets {
    margin-bottom: 2rem;
  }
  
  .trust-bullet {
    font-size: 0.75rem;
  }
  
  .demo-status-panel {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
  }
  
  .contrast-row {
    font-size: 0.9375rem;
  }
}

/* Page-specific: Deploy Gate, Architecture, Receipt Model */
.page-header {
  padding: 8rem 0 4rem;
  border-bottom: 1px solid var(--gray-200);
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.page-header .lead {
  font-size: 1.25rem;
  color: var(--gray-600);
  max-width: 600px;
}

.page-content {
  padding: 4rem 0;
}

.page-content h2 {
  margin-top: 3rem;
}

.page-content h2:first-child {
  margin-top: 0;
}

/* Mobile nav handled above */

/* Gate Semantics Visualization */
.gate-semantics {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 3rem 0;
  padding: 2rem;
  background: var(--void);
  border-radius: 8px;
  border: 1px solid var(--ash);
}

.gate-state {
  flex: 1;
  text-align: center;
}

.gate-state h3 {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.gate-state .terminal-output {
  background: #1a1a1a !important;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  border: 1px solid #333;
}

.gate-state .terminal-output pre {
  margin: 0;
  color: var(--permit);
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.2;
}

.gate-state p {
  color: var(--signal);
  opacity: 0.8;
  font-size: 0.85rem;
  margin: 0;
}

.gate-arrow {
  color: var(--signal);
  opacity: 0.6;
  font-size: 2rem;
  margin: 0 2rem;
}

/* Brand Color States */
.deny-state {
  color: var(--deny) !important;
}

.permit-state {
  color: var(--permit) !important;
}

.gate-state.blocked .terminal-output {
  border-color: var(--deny);
}

.gate-state.permitted .terminal-output {
  border-color: var(--permit);
}

@media (max-width: 768px) {
  .gate-semantics {
    flex-direction: column;
    gap: 1rem;
  }
  
  .gate-arrow {
    transform: rotate(90deg);
    margin: 1rem 0;
  }
}

/* Dark Brand Theme (index, deploy-gate, install) */
.pp-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}

.pp-gate-svg {
  display: block;
  flex-shrink: 0;
}

.pp-wordmark-inline {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  line-height: 1;
}

.pp-wordmark-inline .perm { font-weight: 500; }
.pp-wordmark-inline .slash { font-weight: 300; opacity: 0.5; margin: 0 0.4em; }
.pp-wordmark-inline .proto { font-weight: 300; opacity: 0.6; }

.dark-brand-page {
  background: var(--void);
  color: var(--signal);
}

.dark-brand-page h1,
.dark-brand-page h2,
.dark-brand-page h3,
.dark-brand-page h4 {
  color: var(--signal);
  font-family: var(--font-sans);
  font-weight: 600;
}

.dark-brand-page p,
.dark-brand-page li {
  color: #9a9a9a;
}

.dark-brand-page a {
  color: var(--permit);
}

.dark-brand-page nav {
  background: rgba(10, 10, 10, 0.92);
  border-bottom: 1px solid var(--ash);
  backdrop-filter: blur(10px);
}

.dark-brand-page .logo {
  color: var(--signal);
}

.dark-brand-page .nav-links a {
  color: #9a9a9a;
}

.dark-brand-page .nav-links a:hover {
  color: var(--signal);
}

.dark-brand-page .nav-links a.primary {
  color: var(--permit);
}

.dark-brand-page .nav-cta-btn {
  background: transparent;
  border: 1px solid #2b7568;
  color: var(--permit) !important;
}

.dark-brand-page .nav-cta-btn:hover {
  background: rgba(68, 170, 153, 0.08);
}

.dark-brand-page .nav-toggle span {
  background: var(--signal);
}

.dark-brand-page .nav-overlay {
  background: rgba(0, 0, 0, 0.68);
}

.dark-brand-page section {
  border-top: 1px solid var(--ash);
}

.dark-brand-page section:first-of-type {
  border-top: 0;
}

.dark-brand-page .page-header,
.dark-brand-page .install-hero {
  border-bottom: 1px solid var(--ash);
  background: var(--void);
}

.dark-brand-page .why-now-section,
.dark-brand-page .contrast-section,
.dark-brand-page #authorization-requirements,
.dark-brand-page #failure-mode,
.dark-brand-page #receipt-example,
.dark-brand-page #diagnostic,
.dark-brand-page #designed-for,
.dark-brand-page .cta-section {
  background: var(--void);
  border-color: var(--ash);
}

.dark-brand-page .contrast-row,
.dark-brand-page .diagnostic-checklist li,
.dark-brand-page .hero-trust-bullets-mobile {
  border-color: var(--ash);
}

.dark-brand-page .contrast-left,
.dark-brand-page .contrast-arrow,
.dark-brand-page .trust-bullet::before,
.dark-brand-page .technical-note,
.dark-brand-page .cta-subtext,
.dark-brand-page .cta-microcopy,
.dark-brand-page .status-label,
.dark-brand-page .diagram-arrow,
.dark-brand-page .diagram-note,
.dark-brand-page .example-title,
.dark-brand-page .time-badge {
  color: #666;
}

.dark-brand-page .contrast-right,
.dark-brand-page .status-value {
  color: var(--signal);
}

.dark-brand-page .btn {
  border-radius: 0;
  border: 1px solid #2c2c2c;
}

.dark-brand-page .btn-primary {
  background: var(--permit);
  border-color: var(--permit);
  color: var(--void);
}

.dark-brand-page .btn-primary:hover {
  background: #5bb8a9;
  border-color: #5bb8a9;
}

.dark-brand-page .btn-secondary,
.dark-brand-page .btn-ghost {
  background: transparent;
  border: 1px solid #2c2c2c;
  color: var(--signal);
}

.dark-brand-page .btn-secondary:hover,
.dark-brand-page .btn-ghost:hover {
  color: var(--permit);
  border-color: var(--permit);
}

.dark-brand-page .btn-deny,
.dark-brand-page .btn-danger {
  background: var(--deny);
  border-color: var(--deny);
  color: var(--signal);
}

.dark-brand-page code,
.dark-brand-page pre,
.dark-brand-page .terminal,
.dark-brand-page .receipt-payload,
.dark-brand-page .code-block {
  background: #1a1a1a !important;
  color: var(--signal);
  border: 1px solid #222;
  font-family: var(--font-mono);
}

.dark-brand-page code {
  background: #111;
}

.dark-brand-page pre code,
.dark-brand-page .code-block code {
  border: 0;
}

.dark-brand-page .terminal-header {
  background: #111;
  border-bottom: 1px solid #222;
}

.dark-brand-page .terminal-line.dimmed {
  color: #8b8b8b;
}

.dark-brand-page .terminal-line .label {
  color: #777;
}

.dark-brand-page .terminal-line .value {
  color: var(--signal);
}

.dark-brand-page .terminal-line .status-approved {
  color: var(--permit);
}

.dark-brand-page .terminal-line .status-rejected {
  color: var(--deny);
}

.dark-brand-page .diagram,
.dark-brand-page .example,
.dark-brand-page .help-box,
.dark-brand-page .demo-status-panel,
.dark-brand-page .diagnostic-trigger,
.dark-brand-page .comparison-column,
.dark-brand-page .contrast-column,
.dark-brand-page .invariant-card,
.dark-brand-page .diagram-node,
.dark-brand-page .plane.execution-plane,
.dark-brand-page .gate-state .terminal-output {
  background: #1a1a1a !important;
  border-color: #222;
  color: var(--signal);
}

.dark-brand-page .authority-plane {
  background: #101010;
  border: 1px solid #222;
  color: #c8c8c8;
}

.dark-brand-page .authority-plane .plane-items span {
  color: #c8c8c8;
}

.dark-brand-page .execution-plane .plane-items span {
  color: #c8c8c8;
}

.dark-brand-page .boundary-label::before,
.dark-brand-page .boundary-label::after {
  background: #2a2a2a;
}

.dark-brand-page .boundary-label {
  color: #666;
}

.dark-brand-page .install-step {
  border-left: 1px solid #2a2a2a;
}

.dark-brand-page .install-step::before {
  background: var(--permit);
  color: var(--void);
}

.dark-brand-page .prereq-list li::before {
  color: var(--permit);
}

.dark-brand-page .time-badge {
  background: #101010;
  border: 1px solid #222;
  font-family: var(--font-mono);
}

.dark-brand-page .yaml-comment { color: #667085; }
.dark-brand-page .yaml-key { color: #93c5fd; }
.dark-brand-page .yaml-string { color: #86efac; }
.dark-brand-page .yaml-var { color: #fbbf24; }

.dark-brand-page .code-block .copy-btn {
  background: #111;
  color: #a6a6a6;
  border: 1px solid #2a2a2a;
}

.dark-brand-page .code-block .copy-btn:hover {
  color: var(--permit);
  border-color: var(--permit);
}

.dark-brand-page .mobile-sticky-cta {
  background: rgba(10, 10, 10, 0.95);
  border-top: 1px solid var(--ash);
  box-shadow: none;
}

.dark-brand-page footer {
  background: var(--void);
  border-top: 1px solid var(--ash);
}

.dark-brand-page footer .pp-lockup,
.dark-brand-page .footer-text,
.dark-brand-page .footer-trust {
  color: #666;
}

.dark-brand-page .footer-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.dark-brand-page .page-content h2 {
  padding-top: 1.75rem;
  border-top: 1px solid var(--ash);
}

.dark-brand-page .page-content h2:first-child {
  padding-top: 0;
  border-top: 0;
}

@media (max-width: 640px) {
  .dark-brand-page .nav-links {
    background: var(--void);
  }

  .dark-brand-page .nav-links li {
    border-bottom: 1px solid var(--ash);
  }

  .dark-brand-page .nav-links a {
    color: var(--signal);
  }
}

/* Blog post styles */
.blog-post .highlight {
  background: var(--void) !important;
  border-left: 3px solid var(--deny);
  padding: 1.5rem;
  margin: 2rem 0;
  font-size: 1.25rem;
  color: var(--signal) !important;
}

.blog-post .highlight p {
  margin: 0;
  margin-bottom: 0.5rem;
  color: var(--signal) !important;
}

.blog-post .highlight p:last-child {
  margin-bottom: 0;
  color: var(--signal) !important;
}

/* Blog CTA boxes */
.blog-post .cta {
  margin-top: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%);
  border-radius: 8px;
  text-align: center;
  color: #ffffff !important;
}

.blog-post .cta p {
  color: #ffffff !important;
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

.blog-post .cta a {
  display: inline-block;
  padding: 1rem 2rem;
  background: #fff;
  color: #0a0a0a;
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
  margin: 0.5rem;
}

.blog-post .cta a:hover {
  background: #f0f0f0;
}

/* Presentation Mode (/present) */
.present-mode {
  background: radial-gradient(circle at 20% 10%, #1c2430 0%, var(--void) 45%, #050505 100%);
  color: var(--signal);
  overflow: hidden;
}

.present-mode nav {
  background: rgba(10, 10, 10, 0.88);
  border-bottom: 1px solid #2b2b2b;
  backdrop-filter: blur(8px);
}

.present-mode .brand-lockup .permission {
  color: #ffffff;
}

.present-mode .brand-lockup .protocol-light {
  color: var(--signal);
  opacity: 0.75;
}

.present-mode .nav-links a,
.present-mode .logo,
.present-mode .nav-cta-btn {
  color: var(--signal);
}

.present-mode .nav-links a.primary {
  color: var(--permit);
}

.present-mode .nav-cta-btn {
  background: var(--permit);
  color: var(--void) !important;
}

.present-mode .nav-cta-btn:hover {
  background: #65b8aa;
}

.present-deck {
  height: 100vh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.present-slide {
  min-height: 100vh;
  padding: 8rem 0 3rem;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
}

.present-inner {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.present-kicker {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: #7e94a6;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.present-wordmark {
  font-size: clamp(2.8rem, 10vw, 8rem);
  color: #ffffff;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 1rem;
}

.present-subtitle {
  color: #e6edf2;
  font-size: clamp(1.15rem, 2.3vw, 2rem);
  max-width: 18ch;
}

.present-slide h2 {
  font-size: clamp(2rem, 7.2vw, 5.2rem);
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.present-gate {
  width: min(460px, 88vw);
  margin: 1.5rem 0;
  transition: transform 0.25s ease;
}

.present-gate--xl {
  width: min(600px, 90vw);
}

.present-gate-svg {
  width: 100%;
  height: auto;
}

.present-gate-frame {
  stroke: var(--signal);
  stroke-width: 6;
  fill: rgba(26, 26, 26, 0.35);
}

.present-gate-door {
  fill: rgba(200, 200, 200, 0.15);
  stroke: var(--signal);
  stroke-width: 4;
  transform-origin: 110px 70px;
  transition: transform 0.35s ease, fill 0.35s ease;
}

.present-gate-seam,
.present-gate-lock {
  stroke: var(--deny);
  stroke-width: 6;
  stroke-linecap: round;
}

.present-gate-cross {
  stroke: var(--deny);
  stroke-width: 5;
  stroke-linecap: round;
}

.present-gate-check {
  stroke: var(--permit);
  stroke-width: 6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.present-gate-knob {
  fill: var(--signal);
}

.present-gate--signed .present-gate-door {
  fill: rgba(68, 170, 153, 0.22);
  transform: translateX(26px) scaleX(0.9);
}

.present-gate--signed .present-gate-seam,
.present-gate--signed .present-gate-lock,
.present-gate--signed .present-gate-cross {
  stroke: rgba(170, 68, 85, 0.2);
}

.present-gate--signed .present-gate-check {
  opacity: 1;
}

.present-problem-line {
  font-size: clamp(1.2rem, 2.6vw, 2.4rem);
  color: #d5dce2;
  margin-bottom: 0.4rem;
}

.present-highlight {
  color: var(--permit);
  font-size: clamp(1.25rem, 2.8vw, 2.5rem);
  font-weight: 600;
  margin-top: 1rem;
}

.present-flow {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr auto 1.5fr;
  gap: 1.25rem;
  align-items: center;
}

.present-flow-node {
  border: 1px solid #394653;
  border-radius: 12px;
  padding: 1.25rem;
  font-size: clamp(1rem, 1.8vw, 1.6rem);
  text-align: center;
  background: rgba(26, 26, 26, 0.6);
  color: #ecf1f4;
}

.present-flow-arrow {
  font-size: clamp(1.4rem, 3.5vw, 2.8rem);
  color: #93a4b3;
}

.present-flow-results {
  display: grid !important;
  gap: 1rem;
}

.present-flow-result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid #2b3440;
  border-radius: 12px;
  padding: 0.85rem;
  background: rgba(16, 20, 25, 0.8);
}

.present-flow-result .present-gate {
  width: 96px;
  margin: 0;
}

.present-flow-result span {
  font-size: clamp(0.9rem, 1.5vw, 1.2rem);
  color: #e5eaee;
}

.present-flow-result.deny strong {
  color: var(--deny);
}

.present-flow-result.permit strong {
  color: var(--permit);
}

.present-live-copy {
  font-size: clamp(1rem, 2vw, 1.6rem);
  color: #cfd8df;
  margin-bottom: 1rem;
}

.present-live-controls {
  display: inline-flex;
  border: 1px solid #394653;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.present-live-btn {
  background: transparent;
  border: 0;
  color: #b5c1cb;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

.present-live-btn.is-active {
  background: #22313f;
  color: #ffffff;
}

.present-live-gate {
  display: block;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.present-live-gate:focus-visible {
  outline: 2px solid var(--permit);
  outline-offset: 6px;
  border-radius: 12px;
}

.present-live-state {
  margin-top: 0.8rem;
  font-size: clamp(1rem, 2.1vw, 1.5rem);
  color: #d6dee4;
}

.present-live-state strong {
  color: #ffffff;
}

.present-split {
  width: min(1300px, 94vw);
}

.present-compare-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 1.4rem;
}

.present-pane {
  border-radius: 16px;
  padding: 1.8rem;
  border: 1px solid #2d3843;
  min-height: 360px;
}

.present-pane h3 {
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);
  color: #ffffff;
}

.present-pane p {
  font-size: clamp(0.98rem, 1.6vw, 1.25rem);
  color: #d8e0e5;
  margin-bottom: 0.6rem;
}

.present-pane--without {
  background: linear-gradient(160deg, rgba(170, 68, 85, 0.2), rgba(25, 12, 14, 0.95));
}

.present-pane--with {
  background: linear-gradient(160deg, rgba(68, 170, 153, 0.2), rgba(7, 18, 15, 0.95));
}

.present-cta .present-inner {
  text-align: center;
}

.present-cta-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.2rem 0;
  flex-wrap: wrap;
}

.present-mode .present-cta .btn-primary {
  background: var(--permit);
  color: #061311;
}

.present-mode .present-cta .btn-primary:hover {
  background: #65b8aa;
}

.present-mode .present-cta .btn-ghost {
  color: #e7edf2;
  border-color: #4d5c6a;
}

.present-stars {
  display: inline-flex;
  margin-top: 1rem;
}

.present-dots {
  position: fixed;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  z-index: 120;
}

.present-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid #7f90a0;
  background: rgba(127, 144, 160, 0.2);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.present-dot.is-active {
  background: var(--permit);
  border-color: var(--permit);
  transform: scale(1.15);
}

@media (max-width: 980px) {
  .present-flow {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .present-flow-arrow {
    transform: rotate(90deg);
    justify-self: center;
  }

  .present-compare-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .present-slide {
    padding: 6.6rem 0 2.5rem;
  }

  .present-dots {
    top: auto;
    bottom: 1rem;
    right: 50%;
    transform: translateX(50%);
    flex-direction: row;
    background: rgba(7, 9, 12, 0.55);
    padding: 0.55rem;
    border-radius: 999px;
  }

  .present-pane {
    min-height: 0;
  }

  .present-live-controls {
    margin-bottom: 0.7rem;
  }
}

/* Brand Showcase Page */
.brand-page {
  background: var(--void);
  color: var(--signal);
  min-height: 100vh;
}

.brand-page .container {
  max-width: 1120px;
}

.brand-page p {
  color: #8a8a8a;
}

.brand-hero {
  padding: 8.5rem 0 3.5rem;
  text-align: center;
}

.brand-kicker {
  font-family: var(--font-mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.62rem;
  color: #5f5f5f;
  margin-bottom: 1.5rem;
}

.brand-hero-mark {
  margin-bottom: 1.25rem;
}

.brand-gate {
  overflow: visible;
}

.brand-gate line {
  stroke-linecap: square;
  stroke-width: 2.4;
  transition: opacity 280ms ease, stroke 280ms ease, transform 280ms ease;
}

.brand-card-light .brand-gate line,
.brand-guide-card .brand-gate line {
  stroke-width: 2.2;
}

.brand-page .gate-blocked {
  stroke: #9a9a9a;
  opacity: 1;
}

.brand-page .gate-signed {
  stroke: var(--permit);
  opacity: 0;
}

.brand-page .gate-barrier {
  stroke: var(--deny);
}

.brand-page.is-signed .gate-blocked {
  opacity: 0;
}

.brand-page.is-signed .gate-signed {
  opacity: 1;
}

.brand-page.is-signed .gate-barrier {
  stroke: var(--permit);
}

.brand-gate-hero {
  animation: brand-gate-pulse 2200ms ease-in-out infinite;
}

@keyframes brand-gate-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.brand-wordmark-xl,
.brand-wordmark-lg,
.brand-wordmark-inline {
  display: inline-flex;
  gap: 0.2em;
  line-height: 1;
  letter-spacing: 0.03em;
}

.brand-wordmark-xl {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 0.9rem;
}

.brand-wordmark-lg {
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
}

.brand-wordmark-inline {
  font-size: 1.05rem;
}

.brand-wordmark-permission {
  font-weight: 500;
  color: var(--signal);
}

.brand-wordmark-protocol {
  font-weight: 300;
  color: var(--signal);
  opacity: 0.6;
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  color: #7f7f7f;
}

.brand-section {
  padding: 2.2rem 0;
}

.brand-section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #6a6a6a;
  margin-bottom: 1rem;
}

.brand-toggle-wrap {
  border: 1px solid #1f1f1f;
  background: #101010;
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-toggle-btn {
  border: 1px solid #424242;
  background: transparent;
  color: #9f9f9f;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 220ms ease;
}

.brand-toggle-dot {
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 50%;
  background: var(--deny);
  transition: background 220ms ease;
}

.brand-page.is-signed .brand-toggle-btn {
  color: var(--permit);
  border-color: #2b7568;
  background: rgba(68, 170, 153, 0.08);
}

.brand-page.is-signed .brand-toggle-dot {
  background: var(--permit);
}

.brand-note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
}

.brand-grid-2 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.brand-card {
  border-radius: 12px;
  padding: 1.4rem;
  border: 1px solid #252525;
  min-height: 162px;
}

.brand-card-dark {
  background: #0e0e0e;
}

.brand-card-light {
  background: #f0f0ed;
  border-color: #d5d5d1;
  color: var(--ash);
}

.brand-card-light .brand-wordmark-permission,
.brand-card-light .brand-wordmark-protocol,
.brand-card-light .brand-wordmark-inline,
.brand-card-light .brand-wordmark-lg {
  color: var(--ash);
}

.brand-card-light .brand-wordmark-protocol {
  opacity: 0.6;
}

.brand-card-light .gate-blocked,
.brand-guide-card .gate-blocked {
  stroke: #4f4f4f;
}

.brand-size-ladder {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(0.55rem, 1.6vw, 1.2rem);
  min-height: 120px;
}

.brand-size-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.brand-size-item span {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: #666;
}

.brand-lockup-horizontal {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.brand-lockup-compact {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: #7b7b7b;
  margin-bottom: 1rem;
}

.brand-lockup-vertical {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}

.brand-palette {
  display: grid !important;
  gap: 0.85rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.brand-swatch {
  border: 1px solid #242424;
  border-radius: 10px;
  padding: 0.8rem;
  background: #0f0f0f;
}

.brand-chip {
  width: 100%;
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.65rem;
}

.brand-swatch p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--signal);
}

.brand-swatch span {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: #7e7e7e;
}

.brand-type {
  min-height: 180px;
}

.brand-type-label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.66rem;
  color: #7b7b7b;
}

.brand-type-grotesk {
  font-family: var(--font-sans);
  font-size: clamp(1.1rem, 2vw, 1.8rem);
  line-height: 1.3;
  color: var(--signal);
}

.brand-type-grotesk span {
  font-weight: 500;
}

.brand-type-mono {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #8e8e8e;
  line-height: 1.65;
  margin: 0;
  white-space: pre-wrap;
}

.brand-guidelines {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.brand-guide-card {
  border: 1px solid #232323;
  border-radius: 10px;
  background: #101010;
  padding: 1rem;
}

.brand-guide-title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6e6e6e;
}

.brand-clearspace-box {
  position: relative;
  border: 1px dashed #3a3a3a;
  padding: 1.6rem;
  margin: 0.6rem 0;
  display: inline-flex;
}

.brand-clearspace-x {
  position: absolute;
  font-family: var(--font-mono);
  color: var(--permit);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
}

.brand-clearspace-top {
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
}

.brand-clearspace-left {
  left: -0.7rem;
  top: 50%;
  transform: translateY(-50%);
}

.brand-minsize-wrap {
  display: flex;
  gap: 1.2rem;
  align-items: flex-end;
  margin: 0.85rem 0;
}

.brand-minsize-wrap div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.brand-too-small {
  opacity: 0.5;
}

.brand-ok,
.brand-no {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand-ok {
  color: var(--permit);
}

.brand-no {
  color: var(--deny);
}

.brand-misuse-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.brand-misuse-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.brand-misuse-box {
  border: 1px dashed rgba(170, 68, 85, 0.45);
  min-height: 94px;
  width: 100%;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f0f0f;
}

.brand-misuse-item p {
  margin: 0;
  color: #9b6e75;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.brand-bad-rotate {
  transform: rotate(35deg);
}

.brand-bad-stretch {
  transform: scaleX(1.45);
}

.brand-bad-outline {
  opacity: 0.3;
}

.brand-bad-effect {
  filter: blur(0.8px) drop-shadow(0 0 7px rgba(68, 170, 153, 0.7));
}

@media (max-width: 900px) {
  .brand-grid-2,
  .brand-guidelines {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 640px) {
  .brand-hero {
    padding-top: 7rem;
  }

  .brand-size-ladder {
    flex-wrap: wrap;
    min-height: auto;
  }

  .brand-toggle-wrap {
    align-items: flex-start;
  }

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

/* === Dark Theme Global Override ===
   Forces dark brand on pages with class="dark-brand-page"
   Overrides legacy light tokens and keeps brand page light cards intact */

body.dark-brand-page {
  background: var(--void) !important;
  color: var(--signal) !important;
}

.dark-brand-page nav {
  background: rgba(10, 10, 10, 0.92) !important;
  border-bottom: 1px solid #222 !important;
  backdrop-filter: blur(10px);
}

.dark-brand-page header,
.dark-brand-page section,
.dark-brand-page footer,
.dark-brand-page .hero,
.dark-brand-page .content-section,
.dark-brand-page .mobile-sticky-cta,
.dark-brand-page .nav-links {
  background: var(--void) !important;
  color: var(--signal);
}

.dark-brand-page h1,
.dark-brand-page h2,
.dark-brand-page h3,
.dark-brand-page h4,
.dark-brand-page h5 {
  color: #e0e0e0 !important;
}

.dark-brand-page p,
.dark-brand-page li,
.dark-brand-page td,
.dark-brand-page label,
.dark-brand-page .lead,
.dark-brand-page .subtitle,
.dark-brand-page .description {
  color: var(--signal) !important;
}

.dark-brand-page .step-indicator,
.dark-brand-page .subheadline,
.dark-brand-page .hero-scarcity,
.dark-brand-page .cta-subtext,
.dark-brand-page .cta-microcopy,
.dark-brand-page .technical-note,
.dark-brand-page .diagram-arrow,
.dark-brand-page .diagram-note,
.dark-brand-page .status-label,
.dark-brand-page .example-title,
.dark-brand-page .time-badge,
.dark-brand-page .footer-text,
.dark-brand-page .footer-trust,
.dark-brand-page .sticky-cta-subtext {
  color: #888 !important;
}

.dark-brand-page a:not(.btn):not(.cta-primary):not(.cta-secondary):not(.nav-links a) {
  color: var(--permit);
}

.dark-brand-page nav a,
.dark-brand-page .nav-links a {
  color: var(--signal) !important;
}

.dark-brand-page nav a:hover,
.dark-brand-page .nav-links a:hover,
.dark-brand-page nav a.active,
.dark-brand-page .nav-links a.primary {
  color: var(--permit) !important;
}

.dark-brand-page .btn {
  background: transparent !important;
  color: var(--signal) !important;
  border: 1px solid #333 !important;
}

.dark-brand-page .cta-primary,
.dark-brand-page .btn-primary {
  background: var(--permit) !important;
  color: var(--void) !important;
  border-color: var(--permit) !important;
}

.dark-brand-page .cta-primary:hover,
.dark-brand-page .btn-primary:hover {
  background: #59b6a7 !important;
  border-color: #59b6a7 !important;
}

.dark-brand-page .cta-secondary,
.dark-brand-page .btn-secondary,
.dark-brand-page .btn-ghost {
  background: transparent !important;
  color: var(--signal) !important;
  border-color: #333 !important;
}

.dark-brand-page .cta-secondary:hover,
.dark-brand-page .btn-secondary:hover,
.dark-brand-page .btn-ghost:hover {
  color: var(--permit) !important;
  border-color: var(--permit) !important;
  background: rgba(68, 170, 153, 0.08) !important;
}

.dark-brand-page .btn-deny,
.dark-brand-page .btn-danger {
  background: var(--deny) !important;
  border-color: var(--deny) !important;
  color: #e0e0e0 !important;
}

.dark-brand-page .card,
.dark-brand-page .feature-card,
.dark-brand-page .comparison-table,
.dark-brand-page .step-card,
.dark-brand-page .config-table,
.dark-brand-page .form-textarea,
.dark-brand-page .diagram-node,
.dark-brand-page .comparison-column,
.dark-brand-page .execution-plane,
.dark-brand-page .diagnostic-trigger,
.dark-brand-page .invariant-card,
.dark-brand-page .contrast-column,
.dark-brand-page .demo-status-panel,
.dark-brand-page .diagram,
.dark-brand-page .example,
.dark-brand-page .help-box,
.dark-brand-page table,
.dark-brand-page td,
.dark-brand-page pre,
.dark-brand-page code,
.dark-brand-page .terminal,
.dark-brand-page .receipt-payload,
.dark-brand-page .code-block {
  background: var(--ash) !important;
  color: var(--signal) !important;
  border-color: #222 !important;
}

.dark-brand-page th,
.dark-brand-page .terminal-header {
  background: #111 !important;
  color: var(--signal) !important;
  border-color: #222 !important;
}

.dark-brand-page pre,
.dark-brand-page code,
.dark-brand-page .terminal,
.dark-brand-page .receipt-payload,
.dark-brand-page .code-block {
  border: 1px solid #222 !important;
}

.dark-brand-page .terminal-body {
  background: var(--ash) !important;
  border-color: #222 !important;
}

.dark-brand-page .terminal-line .status-approved {
  color: var(--permit) !important;
}

.dark-brand-page .terminal-line .status-rejected {
  color: var(--deny) !important;
}

.dark-brand-page input,
.dark-brand-page textarea,
.dark-brand-page select,
.dark-brand-page .form-input,
.dark-brand-page .form-select,
.dark-brand-page .form-textarea {
  background: var(--ash) !important;
  color: var(--signal) !important;
  border: 1px solid #222 !important;
}

.dark-brand-page input:focus,
.dark-brand-page textarea:focus,
.dark-brand-page select:focus {
  border-color: var(--permit) !important;
}

.dark-brand-page .mobile-sticky-cta {
  background: rgba(10, 10, 10, 0.95) !important;
  border-top: 1px solid #222 !important;
}

.dark-brand-page footer {
  border-top: 1px solid #1a1a1a !important;
  background: var(--void) !important;
}

.dark-brand-page footer .pp-lockup {
  color: #666 !important;
}

.brand-card-light {
  background: #f0f0ed !important;
  border-color: #d5d5d1 !important;
  color: var(--ash) !important;
}

/* Gate Visual Card — SVG diagram replacing ASCII art */
.gate-visual-card {
  background: #1a1a1a !important;
  border: 1px solid #222;
  border-radius: 6px;
  padding: 2rem 1.5rem;
  margin-bottom: 0.75rem;
}

.gate-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.gate-flow-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.gate-flow-arrow {
  font-size: 1.2rem;
  color: #444;
}

.gate-flow-blocked {
  color: var(--deny) !important;
  font-weight: 700;
  font-size: 1.4rem;
}

.gate-svg-large {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .gate-flow {
    gap: 0.5rem;
  }
  .gate-svg-large {
    width: 56px;
    height: 56px;
  }
  .gate-flow-label {
    font-size: 0.75rem;
  }
}

/* Gate Compact — side-by-side on all screens */
.gate-compact {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 1rem;
  max-width: 600px;
  margin: 2rem auto;
}

.gate-compact-card {
  background: #1a1a1a !important;
  border: 1px solid #222 !important;
  border-radius: 8px;
  padding: 1.25rem 1rem;
  text-align: center;
}

.gate-compact-header {
  margin-bottom: 1rem;
}

.gate-compact-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.gate-compact-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.gate-compact-actor,
.gate-compact-result {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--signal);
}

.gate-compact-arrow {
  font-size: 1rem;
  color: #444;
}

.gate-compact-desc {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #666;
  letter-spacing: 0.02em;
}

@media (max-width: 400px) {
  .gate-compact {
    gap: 0.5rem;
  }
  .gate-compact-card {
    padding: 1rem 0.5rem;
  }
  .gate-compact-flow {
    gap: 0.25rem;
  }
  .gate-compact-actor,
  .gate-compact-result {
    font-size: 0.7rem;
  }
  svg[width="40"] {
    width: 32px;
    height: 32px;
  }
}

/* Homepage redesign (presentation visual patterns) */
.home-redesign .home-section {
  padding: 5rem 0;
}

.home-redesign .home-section:first-child {
  padding-top: 7rem;
}

.home-redesign h1,
.home-redesign h2,
.home-redesign h3 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.home-redesign h1 {
  font-size: clamp(52px, 9vw, 104px) !important;
  font-weight: 600 !important;
  font-family: "Space Grotesk", sans-serif !important;
  line-height: 1.05 !important;
  letter-spacing: -0.02em !important;
}

.home-redesign h2 {
  font-size: clamp(36px, 6vw, 72px) !important;
  font-weight: 600 !important;
  font-family: "Space Grotesk", sans-serif !important;
  line-height: 1.05 !important;
  letter-spacing: -0.02em !important;
}

.home-redesign h3 {
  font-size: clamp(20px, 3vw, 30px) !important;
  font-weight: 600 !important;
  font-family: "Space Grotesk", sans-serif !important;
}

.home-redesign p,
.home-redesign li {
  margin: 0;
  font-family: 'Space Mono', monospace !important;
  font-size: clamp(14px, 1.6vw, 24px) !important;
  color: #9f9f9f !important;
  line-height: 1.6 !important;
}

.home-redesign .label {
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #6f6f6f;
  margin-bottom: 16px;
}

/* Blog Article */
.blog-post {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.blog-back-link {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: #6f6f6f;
  text-decoration: none;
  letter-spacing: 0.04em;
  margin-bottom: 2rem;
}

.blog-back-link:hover {
  color: #44aa99;
}

.blog-post h1 {
  font-family: "Space Grotesk", sans-serif !important;
  font-size: clamp(32px, 5vw, 48px) !important;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #e0e0e0;
  margin: 0 0 1rem;
}

.blog-post .blog-date {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: #6f6f6f;
  letter-spacing: 0.06em;
  margin-bottom: 3rem;
  display: block;
}

.blog-post h2 {
  font-family: "Space Grotesk", sans-serif !important;
  font-size: clamp(22px, 3vw, 32px) !important;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #c8c8c8;
  margin: 3rem 0 1rem;
}

.blog-post h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
  color: #c8c8c8;
  margin: 2rem 0 0.75rem;
}

.blog-post p {
  font-family: 'Space Mono', monospace;
  font-size: 15px;
  line-height: 1.75;
  color: #9f9f9f;
  margin: 0 0 1.25rem;
}

.blog-post a {
  color: #44aa99;
  text-decoration: none;
}

.blog-post a:hover {
  text-decoration: underline;
}

.blog-post blockquote {
  border-left: 3px solid #44aa99;
  margin: 2rem 0;
  padding: 1rem 0 1rem 1.5rem;
  background: rgba(68, 170, 153, 0.04);
}

.blog-post blockquote p {
  color: #b0b0b0;
  font-style: italic;
}

.blog-post ul, .blog-post ol {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.blog-post li {
  font-family: 'Space Mono', monospace;
  font-size: 15px;
  line-height: 1.75;
  color: #9f9f9f;
  margin-bottom: 0.5rem;
}

.blog-post li strong {
  color: #c8c8c8;
}

.blog-post pre {
  background: #0c0c0c;
  border: 1px solid #202020;
  padding: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border-radius: 0;
}

.blog-post code {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
}

@media (min-width: 640px) {
  .blog-post code {
    font-size: 0.875rem;
  }
}

.blog-post img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  border: 1px solid #1a1a1a;
}

.blog-post .hero-image {
  width: 100%;
  max-height: 16rem;
  object-fit: cover;
}

@media (min-width: 640px) {
  .blog-post .hero-image {
    max-height: 24rem;
  }
}

/* Highlight boxes in articles */
.blog-post .highlight,
.blog-post .callout {
  background: rgba(68, 170, 153, 0.06);
  border: 1px solid #1a3a34;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

.blog-post .highlight p,
.blog-post .callout p {
  color: #b0b0b0;
  margin-bottom: 0;
}

/* Deny-colored markers for threat/problem items */
.blog-post .threat-marker,
.blog-post .deny-text {
  color: #aa4455;
}

/* Permit-colored markers for solution items */
.blog-post .solution-marker,
.blog-post .permit-text {
  color: #44aa99;
}

/* Blog hero (index page) */
.blog-hero {
  padding: 6rem 1.5rem 4rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.blog-hero .label {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #6f6f6f;
}

.home-redesign .title-sub {
  margin-top: 6px;
}

.home-redesign .stack {
  display: grid;
  gap: 20px;
}

.home-redesign .center {
  text-align: center;
  justify-items: center;
}

.home-redesign .gate-wrap {
  line-height: 0;
  margin: 12px 0;
}

.home-redesign .hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.home-redesign .problem-lines {
  margin-top: 8px;
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}

.home-redesign .problem-strong {
  color: #c8c8c8 !important;
  font-size: clamp(20px, 2.6vw, 34px);
}

.home-redesign .problem-close {
  color: #44aa99 !important;
  font-size: clamp(22px, 2.8vw, 36px);
}

.home-redesign .flow {
  display: grid;
  gap: 20px;
  margin-top: 8px;
}

.home-redesign .flow-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: clamp(18px, 2.2vw, 28px);
  color: #c8c8c8;
}

.home-redesign .chip {
  border: 1px solid #2a2a2a;
  background: #0d0d0d;
  padding: 10px 14px;
  font-family: 'Space Mono', monospace;
}

.home-redesign .arrow {
  color: #666;
  font-size: 30px;
}

.home-redesign .flow-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
}

.home-redesign .flow-card {
  border: 1px solid #202020;
  background: #0c0c0c;
  padding: 18px;
  display: grid;
  gap: 14px;
  justify-items: start;
}

.home-redesign .flow-card strong {
  font-size: clamp(16px, 1.5vw, 22px);
}

.home-redesign .flow-card.deny strong {
  color: #aa4455;
}

.home-redesign .flow-card.permit strong {
  color: #44aa99;
}

.home-redesign .split {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 14px;
}

.home-redesign .panel {
  border: 1px solid #202020;
  background: #0c0c0c;
  padding: 26px;
  min-height: 350px;
  display: grid;
  align-content: start;
  gap: 14px;
  justify-items: center;
  text-align: center;
}

.home-redesign .panel.without h3,
.home-redesign .panel.without p {
  color: #ca8e96 !important;
}

.home-redesign .panel.with h3,
.home-redesign .panel.with p {
  color: #93c8be !important;
}

.home-redesign .chaos {
  width: 136px;
  height: 136px;
  border: 2px solid #aa4455;
  border-radius: 50%;
  position: relative;
  opacity: 0.95;
  margin-top: 12px;
}

.home-redesign .chaos::before,
.home-redesign .chaos::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 74%;
  height: 2px;
  background: #aa4455;
  transform-origin: center;
}

.home-redesign .chaos::before {
  transform: translate(-50%, -50%) rotate(35deg);
}

.home-redesign .chaos::after {
  transform: translate(-50%, -50%) rotate(-35deg);
}

.home-redesign .cta-link {
  display: inline-block;
  margin-top: 10px;
  color: #44aa99;
  border: 1px solid #44aa99;
  padding: 12px 18px;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: 'Space Mono', monospace;
}

.home-redesign .cta-link.ghost {
  color: #c8c8c8;
  border-color: #2a2a2a;
}

.home-redesign .receipt-tags {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.home-redesign .diagnostic-checklist--interactive li {
  border-bottom: 1px solid #202020;
  padding: 0;
}

.home-redesign .diagnostic-checklist--interactive li::before {
  display: none;
}

.home-redesign .diagnostic-trigger {
  border: 1px solid #202020 !important;
  border-left: 3px solid #44aa99 !important;
  background: #0c0c0c !important;
}

.home-redesign .disqualify-list li::before {
  content: "•";
  color: #44aa99;
}

@media (max-width: 900px) {
  .home-redesign .flow-results {
    grid-template-columns: 1fr;
  }

  .home-redesign .split {
    grid-template-columns: 1fr;
  }
}

.blog-hero h1 {
  font-family: "Space Grotesk", sans-serif !important;
  font-size: clamp(36px, 6vw, 64px) !important;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #e0e0e0;
  margin: 0 0 1rem;
}

.blog-hero-sub {
  font-family: 'Space Mono', monospace;
  font-size: clamp(14px, 1.4vw, 18px);
  color: #888;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* Blog CTA at bottom of articles */
.blog-cta {
  margin-top: 4rem;
  padding: 2rem;
  border: 1px solid #202020;
  background: #0c0c0c;
  text-align: center;
  display: grid;
  gap: 16px;
  justify-items: center;
}

.blog-cta p {
  font-size: 14px;
  color: #888;
  margin: 0;
}

.blog-cta .cta-link {
  display: inline-block;
  color: #44aa99;
  border: 1px solid #44aa99;
  padding: 10px 16px;
  text-decoration: none;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.blog-card {
  border: 1px solid #202020 !important;
  background: #0c0c0c !important;
  padding: 28px;
  display: grid;
  gap: 16px;
  transition: border-color 0.2s ease;
}

.blog-card:hover {
  border-color: #333;
}

.blog-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-card-date {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6f6f6f;
}

.blog-card-tag {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid #2a2a2a;
  padding: 4px 10px;
  color: #888;
}

.blog-card h2 {
  font-family: "Space Grotesk", sans-serif !important;
  font-size: clamp(20px, 2.5vw, 28px) !important;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #c8c8c8;
  margin: 0;
}

.blog-card p {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  line-height: 1.6;
  color: #888;
  margin: 0;
}

.blog-card-link {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  color: #44aa99;
  text-decoration: none;
  letter-spacing: 0.02em;
}

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