/* Intelli AI Website — Design System & Editorial Components (Origin: KRISHNA) */

:root {
  /* Dark Obsidian Theme (Default, echoes Intelli AI Android workspace) */
  --bg-page: #0a0d14;
  --bg-elevated: #111622;
  --bg-card: #141a28;
  --bg-card-hover: #192133;
  --bg-subtle: rgba(255, 255, 255, 0.035);
  --bg-code: #0b0f18;
  --bg-nav: rgba(10, 13, 20, 0.78);

  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(43, 127, 255, 0.42);

  /* Brand palette extracted from Intelli AI 3D logo */
  --brand: #2b7fff;
  --brand-hover: #4690ff;
  --brand-deep: #0b3b8c;
  --brand-soft: rgba(43, 127, 255, 0.14);
  --emerald: #34d399;
  --emerald-soft: rgba(52, 211, 153, 0.13);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.13);

  --text: #f3f6fc;
  --text-secondary: #a1adc4;
  --text-muted: #6e7b94;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.65);
  --hero-wash: radial-gradient(75% 55% at 50% 0%, rgba(43, 127, 255, 0.14) 0%, rgba(11, 59, 140, 0.05) 55%, transparent 100%);

  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg-page: #f7f9fc;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f2f6fc;
  --bg-subtle: rgba(15, 23, 42, 0.035);
  --bg-code: #0f172a;
  --bg-nav: rgba(247, 249, 252, 0.84);

  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);
  --border-accent: rgba(29, 108, 224, 0.38);

  --brand: #1d6ce0;
  --brand-hover: #1458be;
  --brand-deep: #0a2d6b;
  --brand-soft: rgba(29, 108, 224, 0.1);
  --emerald: #059669;
  --emerald-soft: rgba(5, 150, 105, 0.1);
  --amber: #d97706;
  --amber-soft: rgba(217, 119, 6, 0.1);

  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, 0.14);
  --hero-wash: radial-gradient(75% 55% at 50% 0%, rgba(43, 127, 255, 0.11) 0%, rgba(219, 234, 254, 0.45) 55%, transparent 100%);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

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

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

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

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 0.12em 0.42em;
  border-radius: 5px;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==================== Navigation ==================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--bg-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

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

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.version-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid var(--border-accent);
  transition: transform 0.15s var(--ease);
}

.version-pill:hover {
  transform: translateY(-1px);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

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

/* ==================== Buttons ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform 0.16s var(--ease), background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 8px 20px -8px rgba(43, 127, 255, 0.55);
}

.btn-primary:hover {
  background: var(--brand-hover);
}

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

.btn-secondary:hover {
  background: var(--bg-card-hover);
}

.btn-ghost {
  color: var(--text-secondary);
  padding: 8px 12px;
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

.btn-lg {
  padding: 12px 22px;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
}

/* ==================== Hero ==================== */
.hero {
  position: relative;
  padding: 68px 0 48px;
  background-image: var(--hero-wash);
  border-bottom: 1px solid var(--border);
}

.hero-top {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.hero-emblem-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero-emblem-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

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

.hero-title {
  font-size: clamp(2.15rem, 4.8vw, 3.6rem);
  font-weight: 800;
  line-height: 1.09;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}

.hero-title-accent {
  color: var(--brand);
}

.hero-lead {
  font-size: clamp(1.02rem, 1.8vw, 1.16rem);
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 30px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-meta-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 44px;
}

.hero-meta-strip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-showcase {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-lg);
}

.hero-showcase img {
  width: 100%;
  border-radius: calc(var(--radius-lg) - 8px);
}

.hero-showcase-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 10px 4px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

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

/* ==================== Section Layout ==================== */
section {
  padding: 84px 0;
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 660px;
  margin-bottom: 40px;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
}

.section-title {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ==================== Interactive Agent Switcher ==================== */
.agent-workbench {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 20px;
  align-items: stretch;
}

.agent-tabs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agent-tab {
  text-align: left;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s var(--ease);
}

.agent-tab:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.agent-tab.active {
  background: var(--bg-elevated);
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.agent-tab-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.agent-tab-name {
  font-weight: 700;
  font-size: 0.98rem;
}

.agent-tab-proto {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}

.agent-tab.active .agent-tab-proto {
  color: var(--brand);
  border-color: var(--border-accent);
  background: var(--brand-soft);
}

.agent-tab-summary {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.agent-stage {
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 28px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
}

.agent-stage-copy h3 {
  font-size: 1.45rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}

.agent-stage-lead {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.check-list svg {
  color: var(--emerald);
  flex-shrink: 0;
  margin-top: 3px;
}

.agent-stage-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.phone-frame {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: #0b0e14;
  box-shadow: var(--shadow-lg);
  cursor: zoom-in;
  transition: transform 0.2s var(--ease);
}

.phone-frame:hover {
  transform: translateY(-2px);
}

.phone-frame img {
  width: 100%;
  height: auto;
}

.phone-zoom-chip {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background: rgba(10, 13, 20, 0.78);
  color: #f3f6fc;
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
}

/* ==================== Runtimes & Bridge Topology ==================== */
.runtime-switcher {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  overflow: hidden;
  margin-bottom: 24px;
}

.runtime-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.runtime-tab {
  padding: 15px 16px;
  text-align: left;
  border-right: 1px solid var(--border);
  transition: background-color 0.15s ease;
  position: relative;
}

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

.runtime-tab:hover {
  background: var(--bg-card-hover);
}

.runtime-tab.active {
  background: var(--bg-elevated);
}

.runtime-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--brand);
}

.runtime-tab-title {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
}

.runtime-tab-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.runtime-body {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 28px;
  padding: 28px;
  align-items: center;
}

.runtime-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.runtime-copy h3 {
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.runtime-copy p {
  color: var(--text-secondary);
  font-size: 0.94rem;
  margin-bottom: 16px;
}

.runtime-facts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.runtime-fact {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
}

.runtime-fact:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.runtime-fact span:first-child {
  color: var(--text-muted);
}

.runtime-fact strong {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: right;
}

.topology-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.topo-node {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topo-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.topo-node h4 {
  font-size: 0.92rem;
  font-weight: 700;
}

.topo-node p {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.topo-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  padding: 0 6px;
}

/* ==================== Asymmetric Bento Features ==================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.bento-card {
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.bento-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.bento-span-2 {
  grid-column: span 2;
}

.bento-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  color: var(--brand);
}

.bento-card h3 {
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.bento-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}

.bento-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--brand);
}

.bento-link:hover {
  text-decoration: underline;
}

.mcp-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}

.mcp-pill {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  transition: all 0.14s ease;
}

.mcp-pill:hover,
.mcp-pill.active {
  color: var(--text);
  border-color: var(--brand);
  background: var(--brand-soft);
}

.mcp-detail-box {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.mcp-detail-box strong {
  color: var(--text);
}

/* ==================== Gallery & Lightbox ==================== */
.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

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

.filter-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

.gallery-count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.2s var(--ease), border-color 0.2s ease;
}

.gallery-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.gallery-thumb {
  aspect-ratio: 9 / 19;
  overflow: hidden;
  background: #0b0e14;
  border-bottom: 1px solid var(--border);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.35s var(--ease);
}

.gallery-card:hover .gallery-thumb img {
  transform: scale(1.03);
}

.gallery-meta {
  padding: 12px 14px;
}

.gallery-meta h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.gallery-meta p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 9, 15, 0.92);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox.open {
  display: flex;
}

.lightbox-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 92vw;
  max-height: 92vh;
}

.lightbox-frame img {
  max-height: 78vh;
  max-width: 86vw;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.75);
}

.lightbox-bar {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #e2e8f0;
  font-size: 0.9rem;
}

.lightbox-counter {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #94a3b8;
}

.lb-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}

.lb-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lb-close {
  position: fixed;
  top: 18px;
  right: 22px;
}

.lb-nav-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

/* ==================== Download Picker & Build ==================== */
.download-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: start;
}

.release-panel {
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
}

.release-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.release-header h3 {
  font-size: 1.25rem;
  font-weight: 750;
}

.pkg-chip {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.variant-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.variant-option {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.variant-option:hover {
  border-color: var(--border-strong);
}

.variant-option.active {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.variant-title {
  font-weight: 700;
  font-size: 0.94rem;
}

.variant-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.variant-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.release-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.changelog-box {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.changelog-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.changelog-list {
  margin-top: 12px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.terminal-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--bg-code);
  color: #e5ecf6;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.terminal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.terminal-mode-tabs {
  display: flex;
  gap: 6px;
}

.term-tab {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: 6px;
  color: #94a3b8;
}

.term-tab.active {
  background: rgba(43, 127, 255, 0.22);
  color: #93c5fd;
}

.copy-btn {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.terminal-code {
  padding: 18px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.68;
  white-space: pre-wrap;
  overflow-x: auto;
}

.prereq-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.prereq-chip {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.prereq-chip strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--brand);
}

.prereq-chip span {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Companions & Guides */
.companion-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.companion-card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.15s ease, transform 0.15s var(--ease);
}

.companion-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.companion-card h4 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.companion-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

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

.guide-card {
  padding: 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.guide-card:hover {
  border-color: var(--brand);
  background: var(--bg-card-hover);
}

.guide-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.guide-card h3 {
  font-size: 1.06rem;
  font-weight: 700;
}

.guide-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ==================== Guide Reader Page (guide.html) ==================== */
.guide-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 32px;
  padding: 40px 0 80px;
}

.guide-sidebar {
  position: sticky;
  top: 84px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.guide-nav-group {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.guide-nav-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.guide-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.guide-nav-list a {
  display: block;
  padding: 6px 9px;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.guide-nav-list a:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.guide-nav-list a.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.markdown-article {
  min-width: 0;
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.markdown-article h1 {
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  line-height: 1.2;
}

.markdown-article h2 {
  font-size: 1.35rem;
  font-weight: 750;
  margin: 32px 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.markdown-article h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 22px 0 8px;
}

.markdown-article h4 {
  font-size: 0.96rem;
  font-weight: 700;
  margin: 16px 0 6px;
}

.markdown-article p {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.markdown-article ul,
.markdown-article ol {
  color: var(--text-secondary);
  margin: 0 0 14px 22px;
}

.markdown-article li {
  margin-bottom: 6px;
}

.markdown-article a {
  color: var(--brand);
  text-decoration: underline;
}

.markdown-article blockquote {
  margin: 14px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--brand);
  background: var(--brand-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
}

.markdown-article blockquote p:last-child {
  margin-bottom: 0;
}

.markdown-article pre {
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-code);
  color: #e2e8f0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.55;
}

.markdown-article pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

.markdown-article .table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.markdown-article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.markdown-article th,
.markdown-article td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.markdown-article th {
  background: var(--bg-subtle);
  font-weight: 600;
}

/* ==================== Footer ==================== */
footer {
  padding: 44px 0;
  border-bottom: none;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

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

.footer-bottom {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==================== Interactive Promo Section ==================== */
.promo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(290px, 360px);
  gap: 36px;
  align-items: center;
  margin-top: 28px;
}

.promo-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.promo-now {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.promo-step-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.promo-now h3,
.promo-now strong {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 600;
}

.promo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.promo-chapters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.promo-chapter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.promo-chapter-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
  transform: translateY(-1px);
}

.promo-chapter-btn.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--text);
  font-weight: 600;
}

.promo-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.promo-phone-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.promo-phone-shell {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 9 / 16;
  border-radius: 30px;
  overflow: hidden;
  background: #04060c;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.promo-phone-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #04060c;
}

/* ==================== Responsive ==================== */
@media (max-width: 980px) {
  .agent-workbench,
  .runtime-body,
  .download-grid,
  .guide-shell,
  .promo-grid {
    grid-template-columns: 1fr;
  }

  .agent-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .runtime-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .companion-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .topology-strip {
    grid-template-columns: 1fr;
  }

  .topo-link {
    flex-direction: row;
    justify-content: flex-start;
    padding: 4px 0 4px 52px;
  }

  .guide-sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px 18px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 12px;
  }

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

  .nav-cta-github {
    display: none;
  }

  .agent-tabs,
  .agent-stage,
  .runtime-tabs,
  .bento-grid,
  .guides-grid,
  .prereq-bar {
    grid-template-columns: 1fr;
  }

  .bento-span-2 {
    grid-column: span 1;
  }

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

  .companion-row {
    grid-template-columns: 1fr;
  }

  .markdown-article {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
