/* ============================================
   AIContext.gr: Design System
   ============================================ */

:root {
  --bg: #FAFAF8;
  --bg-muted: #F4F4F2;
  --text-primary: #111111;
  --text-secondary: #666666;
  --accent: #0F5CC0;
  --accent-light: rgba(15, 92, 192, 0.06);
  --border: #E7E7E7;
  --card: #FFFFFF;
  --success: #1a6b3c;
  --success-light: rgba(26, 107, 60, 0.06);
  --warning-muted: #8a8a8a;
  --dark-bg: #111111;
  --dark-text: #FAFAF8;
  --dark-muted: #999999;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  --font: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', 'SF Mono', monospace;
  --container: 1120px;
  --container-narrow: 680px;
  --header-height: 72px;
  --transition: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  /* Motion */
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 200ms;
  --duration-reveal: 700ms;
  --shadow-rest: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 4px 14px rgba(0, 0, 0, 0.06);
  --shadow-press: 0 1px 2px rgba(0, 0, 0, 0.04);
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px rgba(15, 92, 192, 0.45);

  /* Vertical rhythm */
  --space-section: 96px;
  --space-section-lg: 112px;
  --space-section-cta: 128px;
  --space-section-compact: 64px;
  --space-section-mobile: 72px;
  --space-section-lg-mobile: 88px;
  --space-heading: 24px;
  --space-heading-sm: 20px;
  --space-stack: 32px;
  --space-stack-lg: 40px;
  --space-prose: 40px;
  --space-card: 28px;
  --space-card-inner: 24px;
  --space-grid: 16px;
  --space-diagram: 32px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg);
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}

.container--narrow {
  max-width: var(--container-narrow);
  text-align: center;
}

.container--narrow-left {
  max-width: var(--container-narrow);
}

.container--faq {
  max-width: 760px;
}

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  box-shadow: var(--shadow-press);
  transition:
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    background var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
  }

  .btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-press);
    transition-duration: 100ms;
  }
}

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

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

@media (hover: hover) {
  .btn-primary:hover {
    background: #0d4fa8;
    border-color: #0d4fa8;
  }

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

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.header.scrolled {
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  height: var(--header-height);
  gap: 24px;
}

.logo {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex-shrink: 0;
  line-height: 1;
  transition: opacity var(--duration-fast) var(--ease-out);
  text-decoration: none;
  color: var(--text-primary);
}

.logo-mark {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.logo-text {
  line-height: 1.2;
}

@media (hover: hover) {
  .logo:hover {
    opacity: 0.72;
  }
}

.header:not(.docs-header) .logo {
  margin-left: 8px;
}

.logo-desc {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.header:not(.docs-header) .nav-links {
  margin-left: 36px;
  margin-right: auto;
}

.docs-header .nav-links {
  margin-right: 112px;
}

.nav-links a {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-out), opacity var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
}

@media (hover: hover) {
  .nav-links a:hover {
    color: var(--text-primary);
  }

  .nav-links a:hover::after {
    opacity: 0.28;
  }
}

.nav-links a.is-active {
  color: var(--text-primary);
}

.nav-links a.is-active::after {
  opacity: 0.4;
}

.btn-nav {
  padding: 10px 20px;
  font-size: 14px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: opacity var(--duration-fast) var(--ease-out);
}

@media (hover: hover) {
  .nav-toggle:hover {
    opacity: 0.65;
  }
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
}

/* Hero */
.hero {
  padding: calc(var(--header-height) + 64px) 0 100px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.hero-content {
  max-width: 548px;
}

.hero-title {
  font-size: clamp(1.9rem, 3.7vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-subtitle p {
  color: var(--text-secondary);
  font-size: 17px;
  margin-bottom: 12px;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-mechanism {
  margin-top: 16px !important;
  margin-bottom: 0 !important;
  padding: 14px 16px;
  background: rgba(15, 92, 192, 0.042);
  border: 1px solid rgba(15, 92, 192, 0.085);
  border-radius: 10px;
  color: var(--text-primary) !important;
  font-size: 16px !important;
  line-height: 1.55 !important;
}

.hero-mechanism strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-analogy {
  color: var(--text-primary) !important;
  font-weight: 500;
  font-size: 16px !important;
  margin-top: 8px !important;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  line-height: 1.55 !important;
}

.hero-principle {
  margin-top: 14px !important;
  padding-top: 0;
  border-top: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-principle span {
  display: block;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 16px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 22px;
  flex-wrap: wrap;
}

/* Flow diagram */
.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
}

.flow-diagram {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.flow-node {
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-size: 14px;
  font-weight: 500;
}

.flow-node--muted {
  color: var(--text-secondary);
  font-weight: 400;
}

.flow-node--accent {
  background: var(--accent-light);
  border-color: rgba(15, 92, 192, 0.2);
  color: var(--accent);
  font-weight: 600;
}

.flow-connector {
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-line {
  width: 1px;
  height: 100%;
  background: var(--border);
  opacity: 0.55;
  transform-origin: top center;
}

/* Hero flow intro (first visit, homepage only) */
.flow-diagram.flow-intro:not(.flow-intro-complete) .flow-line {
  transform: scaleY(0);
}

.flow-diagram.flow-intro.flow-playing .flow-connector:nth-child(2) .flow-line {
  animation: flowLineDraw 0.34s var(--ease-out) forwards;
}

.flow-diagram.flow-intro.flow-playing .flow-connector:nth-child(4) .flow-line {
  animation: flowLineDraw 0.34s var(--ease-out) 0.34s forwards;
}

.flow-diagram.flow-intro.flow-playing .flow-connector:nth-child(6) .flow-line {
  animation: flowLineDraw 0.34s var(--ease-out) 0.68s forwards;
}

.flow-diagram.flow-intro:not(.flow-intro-complete) .flow-node {
  opacity: 0;
  transform: translateY(4px);
}

.flow-diagram.flow-intro.flow-playing .flow-node:nth-child(1) {
  animation: flowNodeIn 0.45s var(--ease-out) 1.02s forwards;
}

.flow-diagram.flow-intro.flow-playing .flow-node:nth-child(3) {
  animation: flowNodeIn 0.45s var(--ease-out) 1.14s forwards;
}

.flow-diagram.flow-intro.flow-playing .flow-node:nth-child(5) {
  animation: flowNodeIn 0.45s var(--ease-out) 1.26s forwards,
             flowAccentPulse 0.65s var(--ease-out) 1.85s forwards;
}

.flow-diagram.flow-intro.flow-playing .flow-node:nth-child(7) {
  animation: flowNodeIn 0.45s var(--ease-out) 1.38s forwards;
}

@keyframes flowLineDraw {
  to { transform: scaleY(1); }
}

@keyframes flowNodeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.flow-diagram.flow-intro-complete .flow-node {
  opacity: 1;
  transform: translateY(0);
}

.flow-diagram.flow-intro-complete .flow-line {
  transform: scaleY(1);
}

/* URL card */
.url-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.url-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.url-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.url-text {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.url-copy {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    background var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

.url-copy-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.url-copy-svg--check {
  display: none;
}

@media (hover: hover) {
  .url-copy:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
  }

  .url-copy:active {
    transform: translateY(0);
    box-shadow: var(--shadow-press);
    transition-duration: 100ms;
  }
}

.url-copy.copied {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(15, 92, 192, 0.22);
}

.url-copy.copied .url-copy-svg--copy {
  display: none;
}

.url-copy.copied .url-copy-svg--check {
  display: block;
}

.url-copy-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--text-primary);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-hover);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.url-copy.copied .url-copy-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Sections */
.section {
  padding: var(--space-section) 0;
}

.section--large {
  padding: var(--space-section-lg) 0;
}

.section--muted {
  background: var(--bg-muted);
}

.section--dark {
  background: var(--dark-bg);
  color: var(--dark-text);
}

.section--cta {
  padding: var(--space-section-cta) 0;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.375rem);
  margin-bottom: var(--space-heading);
  letter-spacing: -0.03em;
  max-width: 720px;
}

.section--compact {
  padding: var(--space-section-compact) 0;
}

.section-title--small {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  margin-bottom: 12px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-title--center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-title--huge {
  font-size: clamp(1.875rem, 3.5vw, 2.5rem);
  max-width: none;
  margin-bottom: var(--space-heading-sm);
}

.section-subtitle {
  font-size: 18px;
  color: var(--dark-muted);
  margin-bottom: 10px;
  max-width: 560px;
}

.section--dark .section-title {
  color: var(--dark-text);
}

.section-lead {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 640px;
  margin-bottom: var(--space-stack);
}

.section-lead--center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.demo-disclaimer {
  font-size: 13px;
  color: var(--dark-muted);
  margin-bottom: var(--space-stack-lg);
}

.prose {
  margin-bottom: var(--space-prose);
  max-width: 640px;
}

.prose p {
  color: var(--text-secondary);
  font-size: 17px;
  margin-bottom: 10px;
  line-height: 1.7;
}

.prose--emphasis,
.prose p.prose--emphasis {
  color: var(--text-primary);
  font-weight: 500;
  margin-top: 20px;
}

.prose--center {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-stack-lg);
}

/* Check list */
.check-list {
  margin-top: var(--space-stack);
}

.check-list li {
  position: relative;
  padding: 8px 0 8px 22px;
  font-size: 16px;
  color: var(--text-primary);
  line-height: 1.55;
}

.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.1em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Split layout */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* Structure card */
.structure-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-card-inner);
}

.structure-header {
  font-size: 14px;
  font-weight: 600;
  font-family: var(--mono);
  padding: 14px 18px;
  background: var(--text-primary);
  color: var(--bg);
  border-radius: 10px;
  margin-bottom: 14px;
  text-align: center;
}

.structure-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.structure-block {
  font-size: 13px;
  font-weight: 500;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  text-align: center;
}

.structure-block--meta {
  grid-column: 1 / -1;
  background: var(--accent-light);
  border-color: rgba(15, 92, 192, 0.15);
  color: var(--accent);
  font-size: 12px;
}

/* Cards */
.cards-grid {
  display: grid;
  gap: var(--space-grid);
}

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-card) var(--space-card-inner);
  box-shadow: var(--shadow-rest);
  transition:
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
    border-color: #dcdcdc;
  }
}

.card h3 {
  font-size: 17px;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
}

.card--compact {
  padding: 22px 20px;
}

.card--compact h3 {
  font-size: 16px;
}

.card--quote .quote {
  font-style: italic;
  color: var(--text-primary);
  font-size: 16px;
  margin-top: 4px;
}

.card--standard h3 {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.card--standard p {
  font-size: 14px;
}

.card a {
  color: inherit;
}

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

.standards-grid {
  margin-top: var(--space-stack-lg);
}

.compat-sub {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: var(--space-stack);
}

.compat-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.compat-chip {
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text-primary);
}

.compat-chip--muted {
  color: var(--text-secondary);
  border-style: dashed;
}

.ecosystem-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 480px;
  margin: 0 auto 32px;
}

.eco-node {
  width: 100%;
  max-width: 320px;
  padding: 16px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-size: 15px;
  font-weight: 500;
}

.eco-node--accent {
  background: var(--accent-light);
  border-color: rgba(15, 92, 192, 0.2);
  color: var(--accent);
  font-weight: 600;
}

.eco-connector {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
}

.eco-connector--fan {
  height: 40px;
}

.eco-line {
  width: 1px;
  height: 100%;
  background: var(--border);
}

.eco-fan {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(400px, 85vw);
  height: 1px;
  background: var(--border);
}

.eco-ai-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 440px;
  padding: 8px 0 16px;
  position: relative;
}

.eco-ai-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: var(--border);
}

.eco-ai {
  font-size: 12px;
  font-weight: 500;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  position: relative;
}

.eco-ai::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 16px;
  background: var(--border);
}

.eco-ai--muted {
  color: var(--text-secondary);
  border-style: dashed;
}

.eco-caption {
  font-size: 16px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.demo-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.demo-link:hover {
  color: #fff;
}

.demo-link:hover {
  color: #fff;
}

/* Tomorrow timeline */
.tomorrow-timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 480px;
  margin: var(--space-stack-lg) auto 0;
}

.tomorrow-step {
  text-align: center;
  width: 100%;
}

.tomorrow-era {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.tomorrow-step--current .tomorrow-era {
  color: var(--accent);
}

.tomorrow-node {
  padding: 16px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
}

.tomorrow-node--accent {
  background: var(--accent-light);
  border-color: rgba(15, 92, 192, 0.2);
  color: var(--accent);
}

.tomorrow-arrow {
  padding: 12px 0;
  color: var(--text-secondary);
  font-size: 14px;
  opacity: 0.4;
}

/* Credibility */
.credibility-list li {
  position: relative;
  padding: 12px 0 12px 22px;
  font-size: 17px;
  color: var(--text-primary);
  line-height: 1.55;
}

.credibility-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.25em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Model comparison */
.model-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-grid);
  margin-top: var(--space-stack-lg);
}

.model-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-card) var(--space-card-inner);
}

.model-panel--new {
  border-color: rgba(15, 92, 192, 0.18);
}

.model-panel h3 {
  font-size: 16px;
  margin-bottom: var(--space-heading-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

.model-panel--new h3 {
  color: var(--accent);
}

.model-flow {
  margin-bottom: var(--space-heading-sm);
}

.model-step {
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  text-align: center;
  line-height: 1.45;
}

.model-step--accent {
  background: var(--accent-light);
  border-color: rgba(15, 92, 192, 0.2);
  color: var(--accent);
  font-weight: 500;
}

.model-arrow {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  padding: 6px 0;
  opacity: 0.5;
}

.model-list li {
  font-size: 14px;
  padding: 6px 0 6px 18px;
  position: relative;
  color: var(--text-secondary);
}

.model-list--bad li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: #b0b0b0;
}

.model-list--good li {
  color: var(--text-primary);
}

.model-list--good li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2 6l2.5 2.5L10 3' stroke='%231a6b3c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
}

.model-note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Comparison demo */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-grid);
}

.comparison-panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: var(--space-card-inner) var(--space-card-inner);
  background: rgba(255, 255, 255, 0.04);
}

.comparison-panel--with {
  border-color: rgba(15, 92, 192, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.comparison-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-heading-sm);
  color: var(--dark-muted);
}

.comparison-panel--with .comparison-label {
  color: rgba(255, 255, 255, 0.7);
}

.conversation {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  padding: 20px 22px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--duration-reveal) var(--ease-out), transform var(--duration-reveal) var(--ease-out);
}

.comparison.animate .compare-step[data-step="1"] {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.25s;
}

.comparison.animate .compare-step[data-step="2"] {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.85s;
}

.message-role {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  color: var(--dark-muted);
}

.message--citizen,
.message--prompt {
  background: rgba(255, 255, 255, 0.05);
}

.message--uncertain {
  background: rgba(255, 255, 255, 0.03);
}

.message--official {
  background: rgba(26, 107, 60, 0.08);
  border-color: rgba(26, 107, 60, 0.15);
}

.message p,
.message-body p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--dark-text);
}

.message-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--dark-text);
}

.prompt-text {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--dark-text);
  white-space: pre-wrap;
}

.prompt-url {
  color: #6ba3e8;
}

.prompt-line--blink {
  animation: cursorBlink 2.5s ease-in-out infinite;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.answer-steps {
  margin: 12px 0;
  padding-left: 0;
  counter-reset: step;
}

.answer-steps li {
  position: relative;
  padding: 4px 0 4px 24px;
  font-size: 14px;
  color: var(--dark-text);
  counter-increment: step;
}

.answer-steps li::before {
  content: counter(step) '.';
  position: absolute;
  left: 0;
  color: var(--dark-muted);
  font-size: 13px;
}

.answer-link span {
  font-family: var(--mono);
  font-size: 12px;
  color: #6ba3e8;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag-list li {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 500;
}

.tag-list--bad li {
  background: rgba(255, 255, 255, 0.06);
  color: var(--dark-muted);
}

.tag-list--good li {
  background: rgba(26, 107, 60, 0.12);
  color: #7ec99a;
}

/* Pilot steps */
.pilot-steps {
  max-width: 640px;
  margin: 0 auto;
}

.pilot-step {
  display: flex;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.pilot-step:last-child {
  border-bottom: none;
}

.pilot-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 50%;
}

.pilot-step h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.pilot-step p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Bullet list */
.bullet-list {
  margin-top: var(--space-stack);
}

.bullet-list li {
  position: relative;
  padding: 10px 0 10px 22px;
  font-size: 17px;
  color: var(--text-secondary);
}

.bullet-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.2em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

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

.faq-item summary {
  padding: 18px 0;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--duration-fast) var(--ease-out);
}

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

.faq-item summary::after {
  content: '+';
  font-size: 20px;
  font-weight: 300;
  color: var(--text-secondary);
  transition: transform var(--duration-fast) var(--ease-out);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

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

.faq-item summary:focus-visible {
  border-radius: 4px;
}

.faq-item p {
  padding: 0 0 18px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 600px;
}

/* CTA */
.cta-copy p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.cta-copy--emphasis {
  color: var(--text-primary) !important;
  font-weight: 500;
  margin-top: 16px !important;
}

.cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: var(--space-stack-lg);
  flex-wrap: wrap;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 44px 0 28px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 300px;
  flex-shrink: 0;
}

.footer-brand .official-badge--inline {
  margin-top: 10px;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(17, 17, 17, 0.06);
  width: 100%;
}

.footer-spec {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.footer-origin {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  margin: 0;
}

.footer-origin__flag {
  font-size: 17px;
  line-height: 1;
  vertical-align: -0.1em;
}

.footer-nav {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  align-content: flex-start;
  justify-content: flex-end;
  flex: 1;
  max-width: 540px;
  padding: 26px 0 2px 40px;
  margin-left: auto;
}

.footer-nav::before {
  content: '';
  position: absolute;
  left: 0;
  top: 26px;
  bottom: 8px;
  width: 1px;
  background: rgba(17, 17, 17, 0.1);
}

.footer-nav a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-out), opacity var(--duration-fast) var(--ease-out);
}

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

.footer-disclaimer {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-disclaimer p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 720px;
  opacity: 0.85;
  margin: 0;
}

.footer--standard .footer-tagline {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  max-width: 320px;
  line-height: 1.55;
}

/* Official version label (RFC-style) */
.official-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding: 4px 10px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 4px;
  background: rgba(17, 17, 17, 0.02);
  text-decoration: none;
  color: var(--text-secondary);
  transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
}

.official-badge--header {
  position: absolute;
  top: 10px;
  right: 40px;
  z-index: 2;
}

.official-badge--inline {
  align-items: flex-start;
  padding: 3px 8px;
}

@media (hover: hover) {
  a.official-badge:hover {
    border-color: rgba(17, 17, 17, 0.14);
    background: rgba(17, 17, 17, 0.035);
  }
}

.official-badge__line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.official-badge__name {
  color: var(--text-secondary);
}

.official-badge__status {
  color: var(--text-primary);
  opacity: 0.72;
}

.official-badge__version {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-secondary);
  opacity: 0.9;
}

/* Legacy alias — maps to official badge */
.spec-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding: 4px 10px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 4px;
  background: rgba(17, 17, 17, 0.02);
  text-decoration: none;
  color: var(--text-secondary);
  transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
}

.spec-badge--header {
  position: absolute;
  top: 10px;
  right: 40px;
  z-index: 2;
}

.spec-badge:hover {
  border-color: rgba(17, 17, 17, 0.14);
  background: rgba(17, 17, 17, 0.035);
}

.spec-badge__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.spec-badge__row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.spec-badge__version {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--text-secondary);
}

.spec-badge__status {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
  opacity: 0.72;
}

.arch-rfc {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  max-width: 420px;
  margin: var(--space-diagram) auto 20px;
  padding: 24px 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
}

.arch-rfc-step {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
}

.arch-rfc-step--highlight {
  border-color: rgba(15, 92, 192, 0.25);
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 500;
}

.arch-rfc-step code {
  font-size: 11px;
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-weight: 400;
}

.arch-rfc-arrow {
  color: var(--text-secondary);
  opacity: 0.45;
  padding: 4px 0;
}

.arch-rfc-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border: 1px dashed var(--border);
  border-radius: 6px;
}

.arch-rfc-row span {
  font-size: 11px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card);
}

.arch-rfc-row span.muted {
  border-style: dashed;
  color: var(--text-secondary);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--duration-reveal) var(--ease-out), transform var(--duration-reveal) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }

/* Focus & interaction polish */
a[href],
button,
summary,
.url-copy,
.nav-toggle,
.btn-docs,
input,
select,
textarea {
  cursor: pointer;
}

input:not([type="button"]):not([type="submit"]):not([type="reset"]),
textarea {
  cursor: text;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn:focus-visible,
.url-copy:focus-visible,
.nav-toggle:focus-visible {
  box-shadow: var(--focus-ring);
}

.nav-links a:focus-visible::after {
  opacity: 0.4;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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

  .flow-diagram.flow-intro .flow-node,
  .flow-diagram.flow-intro .flow-line {
    opacity: 1;
    transform: none;
  }

  .message {
    opacity: 1;
    transform: none;
  }

  .prompt-line--blink {
    animation: none;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid,
  .split-layout,
  .model-compare,
  .comparison,
  .cards-grid--3 {
    grid-template-columns: 1fr;
  }

  .logo-desc {
    display: none;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 24px;
  }

  .official-badge--header,
  .spec-badge--header {
    right: 56px;
    top: 6px;
  }

  .official-badge__name,
  .spec-badge__label {
    display: none;
  }

  .nav-links,
  .btn-nav {
    display: none;
  }

  .nav-links {
    margin-right: 0;
    margin-left: 0;
  }

  .header:not(.docs-header) .logo {
    margin-left: 0;
  }

  .docs-header .nav-links {
    margin-right: 0;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 18px;
    margin-left: 0;
  }

  .hero {
    padding-top: calc(var(--header-height) + 48px);
    padding-bottom: 80px;
  }

  .hero-grid {
    gap: 40px;
  }

  .hero-visual {
    padding-top: 0;
  }

  .section {
    padding: var(--space-section-mobile) 0;
  }

  .section--compact {
    padding: 56px 0;
  }

  .section--large,
  .section--cta {
    padding: var(--space-section-lg-mobile) 0;
  }

  .footer-grid {
    flex-direction: column;
    gap: 28px;
  }

  .footer-nav {
    width: 100%;
    max-width: none;
    padding: 20px 0 0;
    margin-left: 0;
    border-top: 1px solid rgba(17, 17, 17, 0.1);
    justify-content: flex-start;
  }

  .footer-nav::before {
    display: none;
  }

  .footer-brand {
    max-width: none;
  }

  .hero-actions,
  .cta-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

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

  .structure-block--meta {
    grid-column: auto;
  }
}

@media (min-width: 769px) {
  .nav .logo-desc {
    display: block;
  }
}

@media (max-width: 480px) {
  .eco-ai-row::before,
  .eco-ai::before,
  .eco-fan {
    display: none;
  }

  .eco-ai-row {
    padding-top: 0;
  }
}
