/* ==========================================================================
   SYNAPTROVE DESIGN SYSTEM
   Monochrome, minimal, structured memory cloud for AI agents
   ========================================================================== */

@font-face {
  font-family: 'Geist';
  src: url('../assets/fonts/Geist-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist';
  src: url('../assets/fonts/Geist-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist';
  src: url('../assets/fonts/Geist-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('../assets/fonts/GeistMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('../assets/fonts/GeistMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #111213;
  --panel: #161719;
  --panel-hover: #1D1E21;
  --line: #26272B;
  --text: #D6D6D6;
  --muted: #9E9EA3;
  --faint: #68686D;
  --mono-subtle: #8E8E93;
  
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  --sidebar-w: 340px;
  --content-max-w: 880px;
}

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

html {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: #FFFFFF;
  color: #000000;
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 150ms ease, color 150ms ease;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}

/* Page fade transition */
.page-fade {
  animation: fadeIn 150ms ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* App container */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background-color: var(--bg);
}

/* ==========================================================================
   SIDEBAR (Fixed 340px on desktop)
   Preserved in original nav bar palette
   ========================================================================== */

.sidebar {
  --bg: #0B0B0C;
  --panel: #121214;
  --panel-hover: #18181B;
  --line: #26262A;
  --text: #F5F5F5;
  --muted: #A3A3A8;
  --faint: #6E6E73;
  --mono-subtle: #8E8E93;

  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background-color: var(--bg);
  border-right: 1px solid var(--line);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.sidebar-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-glyph {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-glyph svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-wordmark {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* Segmented toggle: Human | Agent */
.view-toggle {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  background-color: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.view-toggle-btn {
  padding: 3px 8px;
  color: var(--muted);
  border-radius: 1px;
  transition: background-color 150ms ease, color 150ms ease;
  user-select: none;
}

.view-toggle-btn:hover {
  color: var(--text);
}

.view-toggle-btn.active {
  background-color: #242429;
  color: #FFFFFF;
  font-weight: 500;
}

/* Primary Navigation (Home, Research) */
.nav-primary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: all 150ms ease;
}

.nav-item:hover {
  color: var(--text);
  background-color: var(--panel);
}

.nav-item.active {
  color: #FFFFFF;
  background-color: var(--panel);
  font-weight: 500;
}

.nav-marker {
  width: 6px;
  height: 6px;
  background-color: transparent;
  display: inline-block;
  flex-shrink: 0;
}

.nav-item.active .nav-marker {
  background-color: #FFFFFF;
}

/* Dashed divider */
.sidebar-divider {
  border: none;
  border-top: 1px dashed var(--line);
  margin: 16px 0 24px 0;
}

/* On This Page (Tick rail index) */
.sidebar-index {
  flex: 1;
}

.index-header {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mono-subtle);
  margin-bottom: 16px;
}

.tick-rail {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  padding-left: 2px;
}

.tick-rail-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  transition: color 150ms ease;
  padding: 2px 0;
}

.tick-rail-item a:hover {
  color: var(--text);
}

.tick-mark {
  height: 1px;
  width: 6px;
  background-color: var(--faint);
  display: inline-block;
  flex-shrink: 0;
  transition: width 180ms ease, background-color 180ms ease;
}

.tick-rail-item.active a {
  color: #FFFFFF;
  font-weight: 500;
}

.tick-rail-item.active .tick-mark {
  width: 16px;
  background-color: #FFFFFF;
}

/* Sidebar footer */
.sidebar-footer {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-social-links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar-social-links a:hover {
  color: #FFFFFF;
}

.sidebar-legal-note {
  font-size: 11px;
  color: var(--mono-subtle);
  line-height: 1.4;
}

/* ==========================================================================
   MAIN CONTENT COLUMN
   ========================================================================== */

.main-column {
  margin-left: var(--sidebar-w);
  flex: 1;
  max-width: var(--content-max-w);
  padding: 64px;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
}

/* Status Chip */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background-color: var(--panel);
  border-radius: 2px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  margin-bottom: 32px;
  letter-spacing: 0.04em;
}

.chip-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #FFFFFF;
  display: inline-block;
}

.chip-link {
  border-left: 1px solid var(--line);
  padding-left: 10px;
  color: var(--muted);
  transition: color 150ms ease;
}

.chip-link:hover {
  color: #FFFFFF;
}

/* Headline H1 */
.hero-headline {
  font-family: var(--font-sans);
  font-size: clamp(40px, 5.2vw, 68px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-subhead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 32px;
  max-width: 680px;
}

/* CTA Buttons */
.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #FFFFFF;
  color: #000000;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 13px 22px;
  border: 1px solid #FFFFFF;
  border-radius: 2px;
  transition: background-color 150ms ease, border-color 150ms ease;
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 13px 22px;
  border: 1px solid var(--line);
  border-radius: 2px;
  position: relative;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.btn-secondary:hover {
  border-color: #4A4A52;
  background-color: var(--panel);
}

/* Bracket corner ticks on secondary button */
.btn-secondary .corner-tl {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 4px;
  height: 4px;
  border-top: 1px solid #FFFFFF;
  border-left: 1px solid #FFFFFF;
}

.btn-secondary .corner-br {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 4px;
  height: 4px;
  border-bottom: 1px solid #FFFFFF;
  border-right: 1px solid #FFFFFF;
}

/* Hatched diagonal-stripe email bar */
.hatched-bar {
  background: repeating-linear-gradient(
    45deg,
    #121214,
    #121214 8px,
    #18181D 8px,
    #18181D 16px
  );
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
  gap: 16px;
}

.hatched-info {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.hatched-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mono-subtle);
  flex-shrink: 0;
}

.hatched-email {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  background-color: var(--panel);
  padding: 6px 10px;
  border-radius: 2px;
  transition: all 150ms ease;
  flex-shrink: 0;
}

.copy-btn:hover {
  color: #FFFFFF;
  border-color: #4A4A52;
}

/* ==========================================================================
   HERO ART PANEL (Inline Procedural Branching Graph)
   ========================================================================== */

.hero-art-container {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 2px;
  background-color: var(--bg);
  position: relative;
  overflow: hidden;
  margin-bottom: 72px;
  aspect-ratio: 800 / 440;
  height: 440px;
}

.hero-art-container img.hero-art-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 768px) {
  .hero-art-container {
    height: 320px;
  }
}

@media (max-width: 480px) {
  .hero-art-container {
    height: 240px;
  }
}

/* Subtle radial vignette behind SVG */
.art-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 55% 45%, transparent 40%, rgba(17, 18, 19, 0.75) 90%);
}

/* Hover effects & animations on SVG graph */
.graph-node {
  transition: r 200ms ease, fill 200ms ease, filter 200ms ease;
  cursor: crosshair;
}

.graph-node:hover {
  r: 5px !important;
  fill: #FFFFFF !important;
  filter: drop-shadow(0 0 4px #FFFFFF);
}

.active-edge {
  stroke-dasharray: 20 6;
  animation: pulseEdge 6s linear infinite;
}

@keyframes pulseEdge {
  0% { stroke-dashoffset: 260; opacity: 0.3; }
  50% { opacity: 0.95; }
  100% { stroke-dashoffset: 0; opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  .active-edge {
    animation: none !important;
    stroke-dasharray: none !important;
  }
  .page-fade {
    animation: none !important;
  }
}

/* ==========================================================================
   CONTENT SECTIONS
   ========================================================================== */

.content-section {
  padding-top: 56px;
  margin-top: 56px;
  border-top: 1px solid var(--line);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mono-subtle);
  margin-bottom: 20px;
}

.section-h2 {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 16px;
}

.section-body {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 720px;
  margin-bottom: 24px;
}

/* Architecture Diagram Panel */
.architecture-diagram-panel {
  background-color: #121214;
  border: 1px solid #26262A;
  border-radius: 4px;
  padding: 24px 20px;
  margin-top: 24px;
}

.architecture-loop {
  --drift: 5;
  margin: 0;
  position: relative;
}

.architecture-canvas {
  border: 1px solid #282832;
  border-radius: 4px;
  background: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px) 8px 8px / 16px 16px, #0C0C0E;
  width: 720px;
  max-width: 100%;
  height: 360px;
  position: relative;
  overflow: hidden;
  margin-inline: auto;
}

.architecture-canvas .edges {
  z-index: 1;
  fill: none;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: block;
}
.architecture-canvas .edges-s { display: none; }

.architecture-canvas .frame,
.architecture-canvas .node,
.architecture-canvas .tag,
.architecture-canvas .verb,
.architecture-canvas .fleet {
  z-index: 2;
}

.architecture-canvas .track {
  stroke: #262632;
  stroke-width: 1px;
  stroke-dasharray: 3 3;
  stroke-linejoin: miter;
  shape-rendering: crispEdges;
  animation: track-drift calc(6s / max(var(--drift), 0.01)) linear infinite;
}

@keyframes track-drift {
  to { stroke-dashoffset: -6px; }
}

.architecture-canvas .comet {
  stroke: #FFFFFF;
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  visibility: hidden;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.85));
}
.architecture-canvas .comet-tail { stroke-opacity: 0.22; }
.architecture-canvas .comet-mid { stroke-opacity: 0.55; }
.architecture-canvas .comet-head { stroke-opacity: 1; }
.architecture-canvas .comet.is-faint {
  stroke: #A1A1AA;
  filter: drop-shadow(0 0 2px rgba(161, 161, 170, 0.6));
}

.architecture-canvas .frame {
  border: 1px solid #282832;
  border-radius: 2px;
  position: absolute;
  left: var(--wx);
  top: var(--wy);
  width: var(--ww);
  height: var(--wh);
  pointer-events: none;
}
.architecture-canvas .frame-name {
  font-family: var(--font-mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #FFFFFF;
  background: #0C0C0E;
  border: 1px solid #282832;
  border-radius: 2px;
  padding: 0 8px;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 16px;
  position: absolute;
  top: -8px;
  left: 14px;
}

.architecture-canvas .node {
  left: var(--wx);
  top: var(--wy);
  background: #16161B;
  border: 1px solid var(--line);
  color: #FFFFFF;
  transition: border-color 0.24s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.24s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s ease, box-shadow 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  justify-content: center;
  align-items: center;
  display: flex;
  position: absolute;
  border-radius: 3px;
  transform: scale(1);
}
.architecture-canvas .node:hover {
  border-color: #52525B;
}
.architecture-canvas .node.is-hot {
  border-color: #FFFFFF;
  background-color: #1C1C24;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.24);
  transform: scale(1.02);
}
.architecture-canvas .node.is-warm {
  border-color: #71717A;
  background-color: #181820;
}
.architecture-canvas .node::after {
  content: "";
  border: 1px solid #FFFFFF;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  inset: -1px;
  border-radius: inherit;
}
.architecture-canvas .node.is-hot::after {
  animation: node-ring 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes node-ring {
  0% { opacity: 0.55; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.3); }
}

.architecture-canvas .tile { width: 44px; height: 44px; }
.architecture-canvas .tile-lg { width: 56px; height: 56px; }
.architecture-canvas .node svg {
  width: 20px;
  height: 20px;
  display: block;
  color: #F4F4F5;
}

.architecture-canvas .hub {
  width: 64px;
  height: 64px;
  background: #181822;
  border-color: #383844;
  place-items: center;
  display: grid;
}
.architecture-canvas .hub.is-hot {
  background: #20202E;
  border-color: #FFFFFF;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}
.architecture-canvas .hub .mark,
.architecture-canvas .hub .grid {
  grid-area: 1/1;
}
.architecture-canvas .hub .mark {
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}
.architecture-canvas .hub .mark svg {
  width: 22px;
  height: 22px;
  display: block;
  color: #FFFFFF;
}
.architecture-canvas .hub .grid {
  opacity: 0;
  filter: blur(4px);
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  grid-template-columns: repeat(3, 5px);
  gap: 2.5px;
  display: grid;
  transform: scale(0.6);
}
.architecture-canvas .hub .grid i {
  opacity: 0.15;
  background: #FFFFFF;
  border-radius: 1px;
  width: 5px;
  height: 5px;
  display: block;
}
.architecture-canvas .hub.is-working .mark {
  opacity: 0;
  filter: blur(4px);
  transform: scale(0.6);
}
.architecture-canvas .hub.is-working .grid {
  opacity: 1;
  filter: none;
  transform: scale(1);
}
.architecture-canvas .hub.is-working .grid i {
  animation: 0.65s ease-in-out infinite pixel-on;
}

@keyframes pixel-on {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 1; }
}

.architecture-canvas .hub[data-pattern=drive] .grid i:nth-child(1) { animation-delay: 90ms; }
.architecture-canvas .hub[data-pattern=drive] .grid i:nth-child(2) { animation-delay: 0.18s; }
.architecture-canvas .hub[data-pattern=drive] .grid i:nth-child(3) { animation-delay: 0.27s; }
.architecture-canvas .hub[data-pattern=drive] .grid i:nth-child(4) { animation-delay: 0s; }
.architecture-canvas .hub[data-pattern=drive] .grid i:nth-child(5) { animation-delay: 90ms; }
.architecture-canvas .hub[data-pattern=drive] .grid i:nth-child(6) { animation-delay: 0.18s; }
.architecture-canvas .hub[data-pattern=drive] .grid i:nth-child(7) { animation-delay: 90ms; }
.architecture-canvas .hub[data-pattern=drive] .grid i:nth-child(8) { animation-delay: 0.18s; }
.architecture-canvas .hub[data-pattern=drive] .grid i:nth-child(9) { animation-delay: 0.27s; }

.architecture-canvas .hub[data-pattern=orbit] .grid i:nth-child(1) { animation-delay: 0s; }
.architecture-canvas .hub[data-pattern=orbit] .grid i:nth-child(2) { animation-delay: 0.11s; }
.architecture-canvas .hub[data-pattern=orbit] .grid i:nth-child(3) { animation-delay: 0.22s; }
.architecture-canvas .hub[data-pattern=orbit] .grid i:nth-child(6) { animation-delay: 0.33s; }
.architecture-canvas .hub[data-pattern=orbit] .grid i:nth-child(9) { animation-delay: 0.44s; }
.architecture-canvas .hub[data-pattern=orbit] .grid i:nth-child(8) { animation-delay: 0.55s; }
.architecture-canvas .hub[data-pattern=orbit] .grid i:nth-child(7) { animation-delay: 0.66s; }
.architecture-canvas .hub[data-pattern=orbit] .grid i:nth-child(4) { animation-delay: 0.77s; }

.architecture-canvas .hub[data-pattern=focus] .grid i:nth-child(1),
.architecture-canvas .hub[data-pattern=focus] .grid i:nth-child(3),
.architecture-canvas .hub[data-pattern=focus] .grid i:nth-child(7),
.architecture-canvas .hub[data-pattern=focus] .grid i:nth-child(9) { animation-delay: 0s; }
.architecture-canvas .hub[data-pattern=focus] .grid i:nth-child(2),
.architecture-canvas .hub[data-pattern=focus] .grid i:nth-child(4),
.architecture-canvas .hub[data-pattern=focus] .grid i:nth-child(6),
.architecture-canvas .hub[data-pattern=focus] .grid i:nth-child(8) { animation-delay: 0.15s; }
.architecture-canvas .hub[data-pattern=focus] .grid i:nth-child(5) { animation-delay: 0.3s; }

.architecture-canvas .tag {
  left: var(--wx);
  top: var(--wy);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #71717A;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 500;
  line-height: 13px;
  position: absolute;
  transform: translate(-50%, 0);
  pointer-events: none;
  background: #0C0C0E;
  padding: 0 4px;
  border-radius: 2px;
}
.architecture-canvas .tag-under {
  color: #A1A1AA;
  background: transparent;
  padding: 0;
}
.architecture-canvas .tag-accent {
  color: #FFFFFF;
  background: transparent;
}

.architecture-canvas .verb {
  left: var(--wx);
  top: var(--wy);
  width: 96px;
  height: 18px;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FFFFFF;
  text-align: center;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 16px;
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: #0C0C0E;
  border: 1px solid #282832;
  border-radius: 2px;
  padding: 0 4px;
}
.architecture-canvas .verb span {
  opacity: 0;
  filter: blur(2px);
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1), filter 0.24s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  background: linear-gradient(90deg, #71717A 30%, #FFFFFF 50%, #71717A 70%) 0 0 / 200% 100%;
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: 1.8s linear infinite shimmer-text;
  position: absolute;
  inset: 0;
  transform: translateY(4px);
}
.architecture-canvas .verb span.is-on {
  opacity: 1;
  filter: none;
  transform: translateY(0);
}
@keyframes shimmer-text {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.architecture-canvas .fleet {
  left: var(--wx);
  top: var(--wy);
  gap: 8px;
  display: flex;
  position: absolute;
}
.architecture-canvas .chip {
  border: 1px solid #282832;
  background: #141418;
  width: 28px;
  height: 28px;
  border-radius: 3px;
  transition: border-color 0.24s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.24s ease, transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  justify-content: center;
  align-items: center;
  display: flex;
  cursor: pointer;
}
.architecture-canvas .chip:hover {
  border-color: #FFFFFF;
  background: #1C1C24;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}
.architecture-canvas .chip svg {
  display: block;
}

.diagram-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--mono-subtle);
  margin-top: 14px;
  letter-spacing: 0.02em;
}

.diagram-specs-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.spec-chip {
  background: #141418;
  border: 1px solid #222228;
  border-radius: 2px;
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #A1A1AA;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
}
.spec-chip.spec-strong {
  color: #FFFFFF;
  border-color: #32323D;
}

@media (max-width: 760px) {
  .architecture-canvas {
    width: 320px;
    height: 560px;
  }
  .architecture-canvas .edges-w { display: none !important; }
  .architecture-canvas .edges-s { display: block !important; }
  .architecture-canvas .frame,
  .architecture-canvas .node,
  .architecture-canvas .tag,
  .architecture-canvas .verb,
  .architecture-canvas .fleet {
    left: var(--sx) !important;
    top: var(--sy) !important;
  }
  .architecture-canvas .frame {
    width: var(--sw) !important;
    height: var(--sh) !important;
  }
  .architecture-canvas .tag[data-wide-only] { display: none !important; }
  .diagram-specs-bar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 360px) {
  .architecture-canvas {
    zoom: 0.9;
  }
}

@media (prefers-reduced-motion: reduce) {
  .architecture-canvas .track,
  .architecture-canvas .verb span,
  .architecture-canvas .hub .grid i,
  .architecture-canvas .node::after {
    animation: none !important;
  }
  .architecture-canvas .comet {
    display: none !important;
  }
}

/* Why It's Different Rows */
.diff-rows-container {
  display: flex;
  flex-direction: column;
  margin-top: 24px;
}

.diff-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: start;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.diff-row:last-child {
  border-bottom: 1px solid var(--line);
}

.diff-icon {
  width: 22px;
  height: 22px;
  color: var(--text);
  margin-top: 2px;
}

.diff-content-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.diff-content-desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.diff-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  white-space: nowrap;
}

.diff-tag.research {
  color: #D4D4D8;
  border-color: #38383F;
}

.diff-tag.active {
  color: #F5F5F5;
  border-color: #38383F;
  background-color: rgba(255, 255, 255, 0.04);
}

/* Status Section */
.status-content-box {
  background-color: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ==========================================================================
   RESEARCH PAGE
   ========================================================================== */

.research-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.62fr);
  align-items: center;
  gap: 28px;
}

.research-hero .hero-headline {
  max-width: 590px;
  font-size: clamp(36px, 4.4vw, 56px);
  margin-bottom: 14px;
}

.research-intro {
  max-width: 580px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 0;
}

.research-question-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background-color: var(--bg);
}

.question-card-label,
.takeaway-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}

.question-card-label {
  margin-bottom: 12px;
}

.relation-step,
.relation-answer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.relation-step strong,
.relation-answer strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.relation-answer {
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
  padding: 12px 0 0;
  border: 0;
}

.relation-answer strong {
  font-size: 22px;
}

.research-page .research-meta-badges {
  margin-top: 18px;
  margin-bottom: 34px;
}

/* Results Grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
  margin-bottom: 32px;
}

.result-card {
  background-color: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.result-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.result-metric-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mono-subtle);
}

.draft-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1px solid #73451A;
  background-color: #261608;
  color: #FFAE66;
  border-radius: 2px;
}

.result-big-number {
  font-family: var(--font-mono);
  font-size: clamp(32px, 3.8vw, 44px);
  font-weight: 500;
  line-height: 1.05;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.result-caption {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 18px;
}

.result-meta-line {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--mono-subtle);
  margin-bottom: 16px;
}

/* Mini comparison bar */
.result-bar-chart {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.bar-row:last-child {
  margin-bottom: 0;
}

.bar-label {
  width: 90px;
  color: var(--muted);
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  flex: 1;
  height: 6px;
  background-color: #1A1A1E;
  border-radius: 1px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 1px;
}

.bar-fill.synaptrove {
  background-color: #FFFFFF;
}

.bar-fill.baseline {
  background-color: var(--faint);
}

.bar-val {
  width: max-content;
  min-width: 38px;
  text-align: right;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Empty claims fallback in production */
.empty-claims-notice {
  background-color: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 32px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* Papers Section */
.papers-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.paper-card {
  background-color: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 24px;
}

.paper-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 12px;
}

.paper-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
}

.paper-status-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mono-subtle);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 2px;
  white-space: nowrap;
}

.paper-abstract {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

/* Method and caveats list */
.caveats-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.caveats-list li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.caveats-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--mono-subtle);
}

/* Corrections log */
.corrections-container {
  margin-top: 20px;
}

.correction-entry {
  display: flex;
  gap: 16px;
  padding: 16px;
  background-color: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.correction-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
}

/* ==========================================================================
   AGENT VIEW (Clean unboxed Markdown text stream matching reference)
   ========================================================================== */

.agent-markdown {
  font-family: var(--font-mono);
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  font-size: 13.5px;
  line-height: 1.7;
  letter-spacing: -0.005em;
  max-width: 760px;
  user-select: text;
}

.agent-markdown:focus {
  outline: none;
}

/* Hide sectional tick rail in sidebar when in agent mode */
.sidebar.is-agent .sidebar-divider,
.sidebar.is-agent .sidebar-index {
  display: none !important;
}

/* Footer on main column */
.page-footer {
  margin-top: 96px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-legal {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mono-subtle);
}

.footer-social-links {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.footer-social-links a {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: color 150ms ease;
}

.footer-social-links svg {
  display: block;
  width: 17px;
  height: 17px;
}

.footer-social-links a:hover {
  color: var(--muted);
}

/* Toast Notification for Clipboard Copy */
.copy-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #FFFFFF;
  color: #000000;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 8px 16px;
  border-radius: 2px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 150ms ease, transform 150ms ease;
  pointer-events: none;
  z-index: 9999;
}

.copy-toast.show {
  opacity: 1;
  transform: translateY(0);
}


/* ==========================================================================
   RESEARCH PUBLICATION STYLING
   ========================================================================== */

.research-meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  margin-bottom: 32px;
}

.meta-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  background-color: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 2px;
}

.meta-badge.highlight {
  color: #FFFFFF;
  border-color: #3F3F46;
  background-color: #18181B;
}

.research-narrative {
  font-size: 15px;
  line-height: 1.68;
  color: var(--muted);
  margin-bottom: 20px;
  max-width: 820px;
}

.research-narrative p {
  margin-bottom: 14px;
}

.research-narrative strong {
  color: var(--text);
  font-weight: 500;
}

.research-takeaway {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin: 20px 0 22px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--text);
  border-radius: 0 2px 2px 0;
  background-color: var(--panel);
}

.takeaway-label {
  padding-top: 2px;
  white-space: nowrap;
}

.research-takeaway p {
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
}

.research-highlight-box {
  background-color: var(--panel);
  border-left: 3px solid #FFFFFF;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px;
  margin: 20px 0 28px 0;
  border-radius: 0 2px 2px 0;
}

.highlight-box-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.highlight-box-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.code-math-box {
  background-color: #0E0E10;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: #E4E4E7;
  overflow-x: auto;
  margin: 18px 0 24px 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.figure-panel {
  background-color: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 18px;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
}

.figure-img {
  width: 100%;
  height: auto;
  border-radius: 2px;
  display: block;
  border: 1px solid var(--line);
  background-color: #09090B;
}

.figure-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mono-subtle);
  margin-top: 12px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

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

.figure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.figure-grid .figure-panel {
  margin: 0;
}

.research-table-wrapper {
  overflow-x: auto;
  margin: 20px 0 28px 0;
  border: 1px solid var(--line);
  border-radius: 2px;
  background-color: var(--panel);
}

.research-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: left;
  line-height: 1.5;
}

.research-table th {
  padding: 12px 14px;
  background-color: #161619;
  color: var(--text);
  font-weight: 500;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  text-transform: uppercase;
  white-space: nowrap;
}

.research-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #1C1C20;
  color: var(--muted);
  white-space: nowrap;
}

.research-table tr:last-child td {
  border-bottom: none;
}

.research-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

.research-table td.highlight-val {
  color: #FFFFFF;
  font-weight: 500;
}

.research-table td.positive-val {
  color: #FFFFFF;
  font-weight: 500;
}

.research-table td.zero-val {
  color: #71717A;
}

.pill-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background-color: #18181B;
  color: var(--text);
  letter-spacing: 0.04em;
  display: inline-block;
}

.pill-badge.active-effect {
  border-color: #3B82F6;
  color: #93C5FD;
  background-color: rgba(59, 130, 246, 0.1);
}

.pill-badge.collapse {
  border-color: #EF4444;
  color: #FCA5A5;
  background-color: rgba(239, 68, 68, 0.1);
}

.pill-badge.baseline {
  border-color: #3F3F46;
  color: #A1A1AA;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Under 1100px: Sidebar transforms into a top bar */
@media (max-width: 1099px) {
  .app-container {
    flex-direction: column;
  }

  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 16px 24px;
    background-color: rgba(11, 11, 12, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 500;
  }

  .sidebar-brand-row {
    margin-bottom: 0;
  }

  .sidebar-top-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .sidebar-nav-group {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .nav-primary {
    flex-direction: row;
    margin-bottom: 0;
    gap: 6px;
  }

  .sidebar-divider,
  .sidebar-index,
  .sidebar-footer {
    display: none !important;
  }

  .main-column {
    margin-left: 0;
    max-width: 100%;
    padding: 48px 24px;
  }
}

@media (max-width: 760px) {
  .research-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

/* Mobile: 390px Viewport */
@media (max-width: 640px) {
  .sidebar {
    padding: 12px 16px;
  }

  .sidebar-top-group {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .sidebar-brand-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .brand-wordmark {
    font-size: 16px;
  }

  .sidebar-nav-group {
    width: 100%;
    border-top: 1px solid var(--line);
    padding-top: 8px;
  }

  .nav-primary {
    width: 100%;
    display: flex;
    gap: 12px;
  }

  .nav-item {
    padding: 6px 10px;
    font-size: 11px;
  }

  .main-column {
    padding: 28px 16px;
  }

  .hero-headline {
    font-size: 34px;
    line-height: 1.08;
    margin-bottom: 16px;
  }

  .research-hero .hero-headline {
    font-size: 34px;
  }

  .research-takeaway {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 16px;
  }

  .hero-subhead {
    font-size: 16px;
    margin-bottom: 24px;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }

  .btn-secondary {
    margin-top: 2px;
  }

  .hatched-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .hatched-info {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .copy-btn {
    align-self: flex-start;
  }

  .diff-row {
    grid-template-columns: 24px 1fr;
    gap: 14px;
  }

  .diff-tag {
    grid-column: 2 / 3;
    justify-self: start;
    margin-top: 4px;
  }

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

  .footer-top-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
