/* ==========================================================================
   SCode Landing Page — Matte Obsidian × Brushed Champagne Gold
   100% aligned with crates/scode-ui/src/theme.rs (Dark & Alabaster Light)
   ========================================================================== */

:root,
[data-theme="dark"] {
  --bg: #111110;
  --bg-deep: #0b0b0a;
  --surface: #161616;
  --surface-1: #1d1d1b;
  --surface-2: #242321;
  --card: #2b2b2b;
  --card-glass: rgba(28, 27, 25, 0.72);
  --recessed: #0f0f0f;
  --hover: #343330;

  --fg: #eceae6;
  --fg-soft: #b8b5ae;
  --fg-muted: #8e8b85;
  --fg-inverse: #0d0d0d;

  --border: rgba(236, 234, 230, 0.09);
  --border-strong: rgba(236, 234, 230, 0.16);
  --popup-border: #4d4b47;

  --brand: #d9b277;
  --brand-soft: rgba(217, 178, 119, 0.14);
  --brand-glow: rgba(217, 178, 119, 0.28);
  --stream-glow: #e6cca0;
  --stream-hi: #f5e5c8;
  --accent: #c79e61;

  --success: #72be8a;
  --danger: #dc5b5b;
  --orange: #e5844e;
  --amethyst: #a89ce6;

  --diff-add-bg: rgba(27, 41, 32, 0.88);
  --diff-del-bg: rgba(43, 29, 29, 0.88);
  --diff-del-fg: #d48080;

  --heat-0: #282725;
  --heat-1: #4d3b24;
  --heat-2: #7a5b32;
  --heat-3: #ad834c;
  --heat-4: #d9b277;

  --shadow-window: 0 40px 120px -20px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(236, 234, 230, 0.09);
  --shadow-card: 0 20px 50px -24px rgba(0, 0, 0, 0.65);
  --spotlight-color: rgba(217, 178, 119, 0.11);
  --nav-bg: rgba(17, 17, 16, 0.72);
  --send-bg: #ffffff;
  --send-fg: #0d0d0d;
}

[data-theme="light"] {
  --bg: #f8f7f4;
  --bg-deep: #f0eeea;
  --surface: #ffffff;
  --surface-1: #f5f3ee;
  --surface-2: #edeae3;
  --card: #ffffff;
  --card-glass: rgba(255, 255, 255, 0.84);
  --recessed: #f2efe9;
  --hover: #e8e5df;

  --fg: #1c1b19;
  --fg-soft: #43403a;
  --fg-muted: #757068;
  --fg-inverse: #ffffff;

  --border: rgba(28, 27, 25, 0.1);
  --border-strong: rgba(28, 27, 25, 0.18);
  --popup-border: #d6d2ca;

  --brand: #9a6b2f;
  --brand-soft: rgba(154, 107, 47, 0.11);
  --brand-glow: rgba(154, 107, 47, 0.22);
  --stream-glow: #9a6b2f;
  --stream-hi: #b8833d;
  --accent: #8a5d24;

  --success: #1f7a4d;
  --danger: #c53b3b;
  --orange: #c75b22;
  --amethyst: #6a5ac2;

  --diff-add-bg: rgba(31, 122, 77, 0.11);
  --diff-del-bg: rgba(197, 59, 59, 0.1);
  --diff-del-fg: #a63232;

  --heat-0: #e8e4dc;
  --heat-1: #dfd0b8;
  --heat-2: #caa878;
  --heat-3: #b08448;
  --heat-4: #8a5d24;

  --shadow-window: 0 36px 90px -24px rgba(28, 27, 25, 0.2), 0 0 0 1px rgba(28, 27, 25, 0.1);
  --shadow-card: 0 18px 42px -24px rgba(28, 27, 25, 0.14);
  --spotlight-color: rgba(154, 107, 47, 0.08);
  --nav-bg: rgba(248, 247, 244, 0.78);
  --send-bg: #191816;
  --send-fg: #ffffff;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--bg);
  overflow-x: clip;
}

[data-theme="light"] html,
html[data-theme="light"] {
  color-scheme: light;
}

body {
  font-family: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Sleek native scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

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

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

code, kbd {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

kbd {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--fg-soft);
}

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

/* ---------- Ambient Backdrop (Inspired by splash.rs) ---------- */
.ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  pointer-events: none;
  opacity: 0.75;
}

.ambient-aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  will-change: transform;
}

.aurora-orb--gold {
  width: 680px;
  height: 360px;
  top: -120px;
  left: 50%;
  transform: translateX(-62%);
  background: radial-gradient(circle, rgba(217, 178, 119, 0.22), transparent 70%);
  animation: orbFloatA 14s ease-in-out infinite alternate;
}

.aurora-orb--warm {
  width: 560px;
  height: 320px;
  top: 40px;
  left: 50%;
  transform: translateX(8%);
  background: radial-gradient(circle, rgba(230, 204, 160, 0.13), transparent 70%);
  animation: orbFloatB 18s ease-in-out infinite alternate;
}

[data-theme="light"] .aurora-orb--gold {
  background: radial-gradient(circle, rgba(154, 107, 47, 0.14), transparent 70%);
}
[data-theme="light"] .aurora-orb--warm {
  background: radial-gradient(circle, rgba(199, 158, 97, 0.1), transparent 70%);
}

.aurora-horizon {
  position: absolute;
  top: 380px;
  left: 50%;
  transform: translateX(-50%);
  width: min(920px, 90vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-glow), var(--brand), var(--brand-glow), transparent);
  opacity: 0.45;
  animation: horizonExpand 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ambient-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes orbFloatA {
  0% { transform: translate(-62%, 0) scale(1); }
  100% { transform: translate(-54%, 26px) scale(1.08); }
}

@keyframes orbFloatB {
  0% { transform: translate(8%, 0) scale(1); }
  100% { transform: translate(-2%, -20px) scale(1.06); }
}

@keyframes horizonExpand {
  from { width: 0; opacity: 0; }
  to { width: min(920px, 90vw); opacity: 0.45; }
}

/* ---------- Navigation ---------- */
.nav-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 14px 0;
  transition: background-color 0.3s ease, border-color 0.3s ease, padding 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}

.nav-shell.scrolled {
  padding: 10px 0;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom-color: var(--border);
}

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

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-tile {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  overflow: hidden;
  background: #080808;
  border: 1px solid rgba(217, 178, 119, 0.38);
  box-shadow: 0 4px 16px rgba(217, 178, 119, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.brand-tile--sm {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.brand-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.56);
  display: block;
}

.brand-wordmark {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand-s {
  color: var(--brand);
}

.brand-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-muted);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid var(--border);
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-soft);
  padding: 6px 13px;
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--fg);
  background: var(--surface-2);
}

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

.icon-pill {
  height: 34px;
  min-width: 34px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--fg-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.icon-pill:hover {
  color: var(--fg);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.icon-pill svg {
  width: 15px;
  height: 15px;
}

[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

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

.mobile-drawer {
  border-top: 1px solid var(--border);
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  margin-top: 10px;
}

.mobile-drawer-inner {
  display: flex;
  flex-direction: column;
  padding: 14px 24px 20px;
  gap: 4px;
}

.mobile-drawer-inner a {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--fg-soft);
}

.mobile-drawer-inner a:hover {
  background: var(--surface-2);
  color: var(--fg);
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn-sm {
  font-size: 13px;
  padding: 7px 15px;
}

.btn-lg {
  font-size: 14.5px;
  padding: 13px 26px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--stream-hi) 0%, var(--brand) 52%, var(--accent) 100%);
  color: #12100c;
  box-shadow: 0 10px 30px -8px var(--brand-glow), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #272521 0%, #161513 100%);
  color: #f8f7f4;
  box-shadow: 0 12px 28px -8px rgba(25, 24, 22, 0.35);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.38) 50%, transparent 75%);
  transform: translateX(-130%);
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary:hover::after {
  transform: translateX(130%);
}

.btn-primary:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 16px 38px -8px var(--brand-glow);
}

.btn-secondary {
  background: var(--surface-1);
  color: var(--fg);
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-secondary:hover {
  background: var(--surface-2);
  border-color: var(--brand);
  transform: translateY(-1.5px);
}

.btn-ghost {
  color: var(--fg-soft);
}

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

.btn-arrow, .btn-icon {
  width: 15px;
  height: 15px;
  transition: transform 0.25s ease;
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* ---------- Hero ---------- */
.hero {
  padding: 132px 0 64px;
  position: relative;
}

.hero-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow-pill {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 9px;
  max-width: 100%;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg-soft);
  background: var(--card-glass);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.45);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 12px var(--brand);
  animation: pulseGlow 2.2s ease-in-out infinite;
}

.eyebrow-version {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid rgba(217, 178, 119, 0.3);
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.75); opacity: 0.45; }
}

.hero-title {
  margin-top: 26px;
  font-size: clamp(38px, 6.2vw, 76px);
  font-weight: 800;
  line-height: 1.09;
  letter-spacing: -0.035em;
  max-width: 920px;
}

.line-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 4px;
}

.line-inner {
  display: inline-block;
  transform: translateY(105%);
  opacity: 0;
  animation: maskRise 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

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

.gold-sheen {
  background: linear-gradient(100deg, var(--fg) 8%, var(--stream-hi) 32%, var(--brand) 52%, var(--accent) 72%, var(--fg) 96%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: goldSheen 7s linear infinite;
}

@keyframes goldSheen {
  to { background-position: 220% center; }
}

.hero-subtitle {
  margin-top: 22px;
  max-width: 680px;
  font-size: clamp(15px, 1.5vw, 17.5px);
  line-height: 1.78;
  color: var(--fg-soft);
}

.hero-cta-row {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.hero-telemetry {
  margin-top: 38px;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 18px 26px;
  padding: 13px 26px;
  border-radius: 16px;
  background: var(--card-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.telemetry-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.telemetry-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand);
}

.telemetry-lbl {
  font-size: 12px;
  color: var(--fg-muted);
}

.telemetry-sep {
  width: 1px;
  height: 26px;
  background: var(--border);
}

/* ---------- Flagship 3-Column ADE Interactive Mockup ---------- */
.stage-wrap {
  margin-top: 56px;
  position: relative;
  perspective: 1400px;
}

.stage-glow {
  position: absolute;
  inset: -30px 6% auto 6%;
  height: 220px;
  background: radial-gradient(ellipse at center, var(--brand-glow), transparent 72%);
  filter: blur(55px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.72;
}

.ade-window {
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-window);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.ade-titlebar {
  height: 44px;
  padding: 0 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  user-select: none;
}

.ade-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ade-mini-logo {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  overflow: hidden;
  background: #080808;
  flex-shrink: 0;
}

.ade-mini-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.56);
}

.ade-win-title {
  font-size: 12.5px;
  font-weight: 700;
}

.ade-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crumb-ws {
  color: var(--fg-soft);
  font-weight: 500;
}

.crumb-branch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

.crumb-branch svg {
  width: 11px;
  height: 11px;
}

.ade-search-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 8px;
  background: var(--recessed);
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--fg-muted);
}

.ade-search-pill svg {
  width: 12px;
  height: 12px;
}

.ade-title-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.ade-replay-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--brand);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  border: 1px solid rgba(217, 178, 119, 0.25);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.ade-replay-btn:hover {
  background: rgba(217, 178, 119, 0.24);
  transform: translateY(-1px);
}

.ade-replay-btn svg {
  width: 12px;
  height: 12px;
}

.win-controls {
  display: flex;
  gap: 6px;
}

.win-controls span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.ade-body {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) 316px;
  min-height: 515px;
}

/* Left Sidebar */
.ade-sidebar {
  background: var(--surface-1);
  border-right: 1px solid var(--border);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ade-new-task {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--fg);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.ade-new-task:hover {
  border-color: var(--brand);
}

.ade-new-task svg {
  width: 13px;
  height: 13px;
  color: var(--brand);
}

.ade-new-task kbd {
  margin-left: auto;
  font-size: 10px;
}

.ade-nav-mini {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mini-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--fg-soft);
  padding: 5px 8px;
  border-radius: 7px;
}

.badge-num {
  margin-left: auto;
  font-style: normal;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--fg-muted);
}

.dot-gold, .dot-muted, .ok-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-gold { background: var(--brand); }
.dot-muted { background: var(--fg-muted); }
.ok-dot { background: var(--success); }

.ade-side-section {
  flex: 1;
}

.ade-side-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 6px 8px;
}

.ade-session-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ade-session-item {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 9px;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.ade-session-item:hover {
  background: var(--surface-2);
}

.ade-session-item.active {
  background: var(--surface-2);
  border-color: rgba(217, 178, 119, 0.28);
}

.sess-status {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.sess-status.running {
  background: var(--brand);
  box-shadow: 0 0 8px var(--brand);
  animation: pulseGlow 1.8s infinite;
}

.sess-status.done {
  background: var(--success);
}

.sess-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sess-text strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sess-text small {
  font-size: 11px;
  color: var(--fg-muted);
}

.ade-quota-card {
  padding: 10px 11px;
  border-radius: 11px;
  background: var(--recessed);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.quota-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
}

.quota-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quota-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.quota-state {
  font-size: 10.5px;
  color: var(--success);
  background: rgba(114, 190, 138, 0.12);
  padding: 1px 7px;
  border-radius: 999px;
}

.quota-row {
  display: grid;
  grid-template-columns: 48px 1fr 28px;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  color: var(--fg-muted);
}

.quota-track {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.quota-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--brand));
}

.quota-fill--soft {
  background: linear-gradient(90deg, #5ea678, var(--success));
}

/* Center Transcript & Composer */
.ade-center {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  min-width: 0;
}

.ade-transcript {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  flex: 1;
}

.msg-user {
  display: flex;
  justify-content: flex-end;
}

.msg-user-bubble {
  max-width: 90%;
  padding: 10px 14px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg);
}

.inline-mention {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 1px 6px;
  border-radius: 5px;
  margin-right: 6px;
}

.msg-thinking {
  border-radius: 10px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--fg-muted);
}

.msg-thinking summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
  color: var(--fg-soft);
}

.msg-thinking summary::-webkit-details-marker { display: none; }

.think-spark { color: var(--brand); }
.think-chevron { margin-left: auto; transition: transform 0.2s ease; }
.msg-thinking[open] .think-chevron { transform: rotate(180deg); }

.msg-thinking p {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--border);
  line-height: 1.6;
}

.tool-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border-radius: 9px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  font-size: 12px;
}

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

.tool-kind {
  color: var(--fg-muted);
  font-weight: 600;
  font-size: 11.5px;
}

.tool-path {
  font-size: 11.5px;
  color: var(--fg);
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-meta, .tool-diff-stat, .tool-badge-ok {
  margin-left: auto;
  font-size: 11px;
  white-space: nowrap;
}

.tool-meta { color: var(--fg-muted); }
.tool-diff-stat ins { text-decoration: none; color: var(--success); margin-right: 4px; }
.tool-diff-stat del { text-decoration: none; color: var(--diff-del-fg); }

.tool-badge-ok {
  color: var(--success);
  background: rgba(114, 190, 138, 0.14);
  padding: 1px 7px;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
}

.msg-assistant {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg-stream-text {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--fg);
  min-height: 72px;
}

.msg-stream-text code {
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 5px;
  color: var(--stream-hi);
}

[data-theme="light"] .msg-stream-text code {
  color: var(--brand);
}

.msg-footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  color: var(--fg-muted);
}

.meta-chip--files {
  color: var(--brand);
  border-color: rgba(217, 178, 119, 0.28);
  background: var(--brand-soft);
}

/* Composer */
.ade-composer {
  margin: 0 16px 14px;
  padding: 11px 12px 9px;
  border-radius: 13px;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.composer-placeholder {
  font-size: 12.5px;
  color: var(--fg-muted);
}

.composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.composer-left-pills,
.composer-right-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mode-switcher {
  display: inline-flex;
  padding: 2px;
  border-radius: 8px;
  background: var(--recessed);
  border: 1px solid var(--border);
}

.mode-btn {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--fg-muted);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mode-btn.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.composer-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--fg-soft);
}

.composer-chip--muted {
  color: var(--fg-muted);
}

.context-ring {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: var(--fg-muted);
}

.context-ring svg {
  width: 16px;
  height: 16px;
}

.send-pill {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--send-bg);
  color: var(--send-fg);
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

/* Right Dock */
.section-desc code,
.bento-copy code,
.eco-checklist code {
  font-size: 0.88em;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--brand);
}

.ade-right {
  background: var(--recessed);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ade-dock-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px;
  gap: 4px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
}

.dock-tab {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--fg-muted);
  padding: 6px 4px;
  border-radius: 7px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dock-tab:hover { color: var(--fg-soft); }
.dock-tab.active {
  background: var(--surface-2);
  color: var(--fg);
  font-weight: 600;
}

.dock-pane {
  display: none;
  flex-direction: column;
  flex: 1;
}

.dock-pane.active {
  display: flex;
  animation: paneFade 0.25s ease;
}

@keyframes paneFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.dock-file-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  font-size: 11.5px;
  color: var(--fg-soft);
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
}

.diff-counts ins { text-decoration: none; color: var(--success); margin-right: 5px; }
.diff-counts del { text-decoration: none; color: var(--diff-del-fg); }

.diff-view {
  padding: 8px 0;
  font-size: 11px;
  line-height: 1.75;
  overflow-x: auto;
}

.diff-line {
  display: flex;
  gap: 10px;
  padding: 0 12px;
  white-space: pre;
}

.diff-line span {
  width: 18px;
  text-align: right;
  color: var(--fg-muted);
  opacity: 0.65;
  user-select: none;
}

.diff-line.add {
  background: var(--diff-add-bg);
  color: var(--success);
}

.diff-line.del {
  background: var(--diff-del-bg);
  color: var(--diff-del-fg);
}

.diff-line.ctx {
  color: var(--fg-soft);
}

/* Git Graph Tab */
.ai-sum-pill {
  font-size: 10.5px;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 2px 7px;
  border-radius: 999px;
}

.git-graph-list {
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
}

.git-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 4px;
  border-radius: 7px;
}

.git-row:hover { background: var(--surface-1); }

.git-lanes {
  width: 36px;
  height: 34px;
  flex-shrink: 0;
}

.git-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.git-info strong {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.git-info small {
  font-size: 10.5px;
  color: var(--fg-muted);
}

.git-ref {
  padding: 0 5px;
  border-radius: 4px;
}
.git-ref.gold { background: var(--brand-soft); color: var(--brand); }
.git-ref.green { background: rgba(114, 190, 138, 0.14); color: var(--success); }

/* Terminal Tab */
.term-live-dot {
  font-size: 10px;
  font-family: "JetBrains Mono", monospace;
  color: var(--success);
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(114, 190, 138, 0.14);
}

.term-body {
  padding: 12px;
  font-size: 11px;
  line-height: 1.8;
  color: var(--fg);
}

.t-gold { color: var(--brand); }
.t-green { color: var(--success); }
.t-muted { color: var(--fg-muted); }

.term-cursor {
  display: inline-block;
  width: 7px;
  height: 12px;
  vertical-align: middle;
  background: var(--brand);
  animation: blink 1s steps(1) infinite;
}

/* Todo Tab */
.todo-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--fg-soft);
}

.todo-item.done { color: var(--fg-muted); }
.todo-item.active { color: var(--fg); font-weight: 500; }

.todo-check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(114, 190, 138, 0.16);
  color: var(--success);
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  flex-shrink: 0;
  margin-top: 2px;
}

.todo-ring {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.8px solid var(--brand);
  flex-shrink: 0;
  margin-top: 2px;
  animation: pulseGlow 1.8s infinite;
}

/* ---------- Marquee ---------- */
.marquee-band {
  padding: 46px 0 36px;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, var(--surface-1), transparent);
}

.marquee-head {
  text-align: center;
  margin-bottom: 22px;
}

.mono-kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
}

.marquee-viewport {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}

.marquee-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: marqueeScroll 34s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.vendor-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fg-soft);
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.vendor-chip:hover {
  border-color: var(--brand);
  color: var(--fg);
}

.vendor-chip--accent {
  border-color: rgba(217, 178, 119, 0.35);
  color: var(--brand);
  background: var(--brand-soft);
}

.v-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.7;
}

/* ---------- Shared Section Styling ---------- */
.section {
  padding: 108px 0 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 44px;
}

.section-kicker {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--brand);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.section-desc {
  margin-top: 16px;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--fg-soft);
}

/* ---------- Spotlight Cards ---------- */
.spotlight-card {
  position: relative;
  border-radius: 20px;
  background: var(--card-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 50%), var(--spotlight-color), transparent 60%);
  transition: opacity 0.35s ease;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card:hover {
  border-color: rgba(217, 178, 119, 0.34);
}

/* ---------- Performance & Benchmark ---------- */
.perf-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
}

.perf-bench {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.card-header-row h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card-sub {
  margin-top: 5px;
  font-size: 13.5px;
  color: var(--fg-muted);
}

.gold-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid rgba(217, 178, 119, 0.32);
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.bench-bars {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.bench-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 9px;
  font-size: 13.5px;
}

.bench-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-soft);
}

.bench-name small {
  color: var(--fg-muted);
  font-size: 12px;
}

.bench-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.bench-dot.gold { background: var(--brand); box-shadow: 0 0 10px var(--brand); }
.bench-dot.muted { background: var(--fg-muted); opacity: 0.6; }

.gold-text { color: var(--brand); font-weight: 700; font-size: 16px; }
.muted-text { color: var(--fg-muted); }

.bench-track {
  height: 11px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.bench-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 1.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.bench-bars.animated .bench-fill {
  width: var(--pct);
}

.bench-fill--gold {
  background: linear-gradient(90deg, var(--accent), var(--brand), var(--stream-hi));
  box-shadow: 0 0 18px var(--brand-glow);
}

.bench-fill--muted {
  background: rgba(142, 139, 133, 0.35);
}

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

.arch-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  color: var(--fg-soft);
}

.perf-metrics-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.metric-tile {
  padding: 22px 24px;
}

.metric-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--fg-muted);
}

.metric-tag {
  font-size: 11px;
  color: var(--brand);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
}

.metric-big {
  margin: 10px 0 6px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.metric-unit {
  font-size: 15px;
  color: var(--brand);
  margin-left: 5px;
}

.metric-tile p {
  font-size: 13.5px;
  color: var(--fg-soft);
  line-height: 1.65;
}

/* ---------- Interactive Stream FX Playground ---------- */
.fx-playground {
  padding: 24px;
}

.fx-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

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

.fx-pill {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--fg-soft);
  transition: all 0.22s ease;
}

.fx-pill:hover {
  border-color: var(--border-strong);
  color: var(--fg);
}

.fx-pill.active {
  background: var(--brand);
  color: #12100c;
  border-color: var(--brand);
  font-weight: 700;
  box-shadow: 0 6px 22px -6px var(--brand-glow);
}

[data-theme="light"] .fx-pill.active {
  color: #ffffff;
}

.fx-controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fx-speed-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid var(--border);
}

.fx-speed-seg button {
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--fg-muted);
  transition: all 0.2s ease;
}

.fx-speed-seg button.active {
  background: var(--surface-2);
  color: var(--fg);
  font-weight: 600;
}

.fx-stage {
  padding-top: 22px;
}

.fx-stage-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.fx-stage-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.fx-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 12px var(--brand);
  animation: pulseGlow 1.3s infinite;
}

.fx-status-dot.done {
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
  animation: none;
}

.fx-stage-sub {
  font-size: 13px;
  color: var(--fg-muted);
}

.fx-odometer {
  font-size: 12px;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 4px 12px;
  border-radius: 999px;
}

.fx-sep { opacity: 0.45; margin: 0 6px; }

.fx-output-box {
  padding: 28px 30px;
  border-radius: 16px;
  background: var(--recessed);
  border: 1px solid var(--border);
  min-height: 185px;
}

.fx-text {
  font-size: clamp(15.5px, 1.8vw, 18.5px);
  line-height: 2;
  color: var(--fg);
  letter-spacing: 0.01em;
  white-space: pre-wrap;
}

.fx-cursor {
  display: inline-block;
  width: 2.5px;
  height: 1.15em;
  vertical-align: -0.18em;
  margin-left: 3px;
  border-radius: 2px;
  background: var(--brand);
  box-shadow: 0 0 14px var(--brand);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  0%, 48% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* 6 Real Stream Effects (matching crates/scode-ui/src/stream_fx & docs/ai-stream-effects.html) */
.fx-rise .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
  filter: blur(6px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), filter 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.fx-rise .ch.on { opacity: 1; transform: none; filter: blur(0); }

.fx-blur .ch {
  display: inline-block;
  opacity: 0;
  filter: blur(13px);
  transform: scale(1.06);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.fx-blur .ch.on { opacity: 1; filter: blur(0); transform: scale(1); }

.fx-typeglow .ch { opacity: 0; }
.fx-typeglow .ch.on {
  opacity: 1;
  animation: typeGlowFlash 0.72s ease-out;
}
@keyframes typeGlowFlash {
  0% {
    color: var(--stream-hi);
    background: rgba(217, 178, 119, 0.42);
    box-shadow: 0 0 16px rgba(217, 178, 119, 0.65);
    border-radius: 3px;
  }
  100% {
    background: transparent;
    box-shadow: none;
  }
}

.fx-shine .ch {
  display: inline-block;
  opacity: 0;
  transform: translateX(-5px);
}
.fx-shine .ch.on {
  opacity: 1;
  transform: none;
  animation: shineSweep 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes shineSweep {
  0% { opacity: 0; color: var(--stream-hi); text-shadow: 0 0 18px var(--brand); }
  45% { opacity: 1; color: var(--brand); text-shadow: 0 0 12px var(--brand-glow); }
  100% { opacity: 1; color: var(--fg); text-shadow: none; }
}

.fx-word .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(6px) scale(0.95);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fx-word .ch.on {
  opacity: 1;
  transform: none;
}

.fx-ink .ch {
  display: inline-block;
  opacity: 0;
  filter: blur(9px);
  transform: scale(0.84);
  transition: opacity 0.68s ease-out, filter 0.68s ease-out, transform 0.68s cubic-bezier(0.22, 1, 0.36, 1), color 0.68s ease-out;
  color: var(--brand);
}
.fx-ink .ch.on {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
  color: var(--fg);
}

/* ---------- Bento Feature Grid ---------- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.bento-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.bento-span-7 { grid-column: span 7; }
.bento-span-5 { grid-column: span 5; }
.bento-span-6 { grid-column: span 6; }

.bento-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--brand);
  margin-bottom: 10px;
}

.bento-copy h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.bento-copy p {
  margin-top: 9px;
  font-size: 14px;
  line-height: 1.72;
  color: var(--fg-soft);
}

.git-visual {
  padding: 16px;
  border-radius: 14px;
  background: var(--recessed);
  border: 1px solid var(--border);
}

.git-hero-svg {
  width: 100%;
  height: auto;
  display: block;
}

.pulse-node {
  animation: pulseGlow 2.2s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.cron-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cron-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--recessed);
  border: 1px solid var(--border);
}

.cron-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px rgba(114, 190, 138, 0.7);
}

.cron-row strong { display: block; font-size: 13px; }
.cron-row small { font-size: 11px; color: var(--fg-muted); }

.cron-pill {
  margin-left: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(114, 190, 138, 0.14);
  color: var(--success);
}

.mcp-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mcp-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 10px;
  background: var(--recessed);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg-soft);
}

.mcp-pill--gold {
  color: var(--brand);
  border-color: rgba(217, 178, 119, 0.35);
  background: var(--brand-soft);
  font-family: "JetBrains Mono", monospace;
}

/* Heatmap */
.heatmap-box {
  padding: 16px;
  border-radius: 14px;
  background: var(--recessed);
  border: 1px solid var(--border);
}

.heatmap-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--fg-muted);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.heatmap-tooltip {
  color: var(--brand);
}

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

.heat-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--heat-0);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  cursor: pointer;
}

.heat-cell:hover {
  transform: scale(1.3);
  z-index: 2;
  box-shadow: 0 0 10px var(--brand-glow);
}

.heat-cell.l1, .hl-1 { background: var(--heat-1); }
.heat-cell.l2, .hl-2 { background: var(--heat-2); }
.heat-cell.l3, .hl-3 { background: var(--heat-3); }
.heat-cell.l4, .hl-4 { background: var(--heat-4); }
.hl-0 { background: var(--heat-0); }

.heatmap-legend {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-size: 11px;
  color: var(--fg-muted);
}

.heatmap-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

.subagent-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sub-chip {
  padding: 12px;
  border-radius: 12px;
  background: var(--recessed);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sub-chip span {
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
}

.sub-chip small {
  font-size: 11px;
  color: var(--fg-muted);
}

.shortcut-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.shortcut-strip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--recessed);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--fg-soft);
}

.shortcut-strip em { font-style: normal; }

/* ---------- Safety 4-Mode Matrix ---------- */
.safety-panel {
  padding: 36px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 36px;
  align-items: center;
}

.safety-title {
  font-size: clamp(24px, 3.2vw, 38px);
}

.safety-tabs {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.safety-tab {
  text-align: left;
  padding: 13px 15px;
  border-radius: 13px;
  background: var(--recessed);
  border: 1px solid var(--border);
  transition: all 0.22s ease;
}

.safety-tab strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.safety-tab span {
  font-size: 12px;
  color: var(--fg-muted);
}

.safety-tab:hover {
  border-color: var(--border-strong);
}

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

.safety-tab.active strong {
  color: var(--brand);
}

.perm-card {
  padding: 24px;
  border-radius: 16px;
  background: var(--recessed);
  border: 1px solid var(--border-strong);
}

.perm-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--fg-soft);
}

.perm-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 3px 10px;
  border-radius: 999px;
}

.perm-matrix {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.perm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--fg-soft);
}

.perm-pill {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.perm-pill.allow { background: rgba(114, 190, 138, 0.14); color: var(--success); }
.perm-pill.ask { background: rgba(217, 178, 119, 0.16); color: var(--brand); }
.perm-pill.deny { background: rgba(220, 91, 91, 0.14); color: var(--danger); }
.perm-pill.guard { background: rgba(168, 156, 230, 0.15); color: var(--amethyst); }

/* ---------- Ecosystem Section ---------- */
.eco-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 36px;
  align-items: center;
}

.eco-checklist {
  list-style: none;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.eco-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: var(--fg-soft);
}

.check-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.eco-cta {
  margin-top: 28px;
}

.eco-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

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

.eco-brand-row {
  display: flex;
  align-items: center;
  gap: 11px;
}

.eco-brand-row strong { display: block; font-size: 14.5px; }
.eco-brand-row small { font-size: 11.5px; color: var(--fg-muted); }

.connected-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--success);
  background: rgba(114, 190, 138, 0.12);
  padding: 5px 11px;
  border-radius: 999px;
}

.eco-rings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: center;
}

.ring-stat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--fg-soft);
}

.ring-stat svg {
  width: 82px;
  height: 82px;
}

.ring-center {
  position: absolute;
  top: 29px;
  font-size: 16px;
  font-weight: 700;
}

.effort-bar {
  padding: 14px 16px;
  border-radius: 13px;
  background: var(--recessed);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.effort-label {
  font-size: 12.5px;
  color: var(--fg-muted);
}

.effort-pills {
  display: flex;
  gap: 4px;
  font-size: 11px;
}

.effort-pills span {
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--fg-muted);
  background: var(--surface-1);
}

.effort-pills span.active {
  background: var(--brand);
  color: #12100c;
  font-weight: 700;
}

/* ---------- Download Stage ---------- */
.download-section {
  padding-bottom: 96px;
}

.download-stage {
  position: relative;
  padding: 68px 36px 54px;
  border-radius: 28px;
  background: linear-gradient(180deg, var(--surface-1) 0%, var(--recessed) 100%);
  border: 1px solid rgba(217, 178, 119, 0.25);
  text-align: center;
  overflow: hidden;
  box-shadow: var(--shadow-window);
}

.download-rings {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 560px;
  height: 560px;
  border-radius: 50%;
  border: 1px solid rgba(217, 178, 119, 0.14);
  box-shadow: 0 0 0 90px rgba(217, 178, 119, 0.025), 0 0 120px var(--brand-glow);
  pointer-events: none;
}

.download-emblem {
  position: relative;
  width: 68px;
  height: 68px;
  margin: 0 auto 24px;
  border-radius: 18px;
  overflow: hidden;
  background: #080808;
  border: 1px solid rgba(217, 178, 119, 0.5);
  box-shadow: 0 16px 46px var(--brand-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.download-emblem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.56);
}

.download-title {
  position: relative;
  font-size: clamp(28px, 4.2vw, 46px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.download-sub {
  position: relative;
  margin: 14px auto 0;
  max-width: 560px;
  color: var(--fg-soft);
  font-size: 15.5px;
}

.platform-cards {
  position: relative;
  margin: 38px auto 0;
  max-width: 920px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.platform-card {
  padding: 20px 20px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.platform-card--primary {
  border-color: rgba(217, 178, 119, 0.45);
  background: linear-gradient(145deg, rgba(217, 178, 119, 0.14), var(--card-glass));
}

.platform-card--soon {
  opacity: 0.7;
  cursor: default;
}

.plat-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--brand);
  flex-shrink: 0;
}

.plat-icon svg {
  width: 19px;
  height: 19px;
}

.plat-info {
  min-width: 0;
  flex: 1;
}

.plat-info strong {
  display: block;
  font-size: 14.5px;
}

.plat-info span {
  display: block;
  font-size: 11px;
  color: var(--fg-muted);
  margin-top: 2px;
}

.plat-cta {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--brand);
  color: #12100c;
  white-space: nowrap;
}

[data-theme="light"] .plat-cta { color: #ffffff; }

.plat-cta--muted {
  background: var(--surface-2);
  color: var(--fg-muted);
}

.dl-footnote {
  position: relative;
  margin-top: 28px;
  font-size: 12px;
  color: var(--fg-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.dl-footnote a {
  color: var(--brand);
}

.dl-footnote a:hover {
  text-decoration: underline;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 54px 0 36px;
  background: var(--bg-deep);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand p {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--fg-muted);
  line-height: 1.7;
}

.footer-cols {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}

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

.footer-col h4 {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 4px;
}

.footer-col a, .footer-static {
  font-size: 13px;
  color: var(--fg-muted);
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--brand);
}

.footer-bottom {
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--fg-muted);
}

/* ---------- Reveal Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0ms);
}

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

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 24px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--brand);
  color: var(--fg);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .ade-body {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .ade-right {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .perf-grid,
  .safety-panel,
  .eco-grid {
    grid-template-columns: 1fr;
  }
  .platform-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .container {
    padding: 0 16px;
  }
  .nav-links,
  .nav-hide-sm,
  .nav-cta-desktop,
  .brand-tag {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .hero-title {
    font-size: clamp(32px, 9.2vw, 48px);
  }
  .eyebrow-pill {
    font-size: 11.5px;
    border-radius: 16px;
    padding: 6px 12px;
  }
  .ade-window,
  .ade-right,
  .ade-center,
  .bento-card,
  .spotlight-card {
    min-width: 0;
    max-width: 100%;
  }
  .ade-titlebar {
    grid-template-columns: 1fr auto;
  }
  .ade-title-center {
    display: none;
  }
  .ade-body {
    grid-template-columns: 1fr;
  }
  .ade-sidebar {
    display: none;
  }
  .bento-span-7,
  .bento-span-5,
  .bento-span-6 {
    grid-column: span 12;
  }
  .subagent-chips {
    grid-template-columns: 1fr;
  }
  .safety-tabs {
    grid-template-columns: 1fr;
  }
  .telemetry-sep {
    display: none;
  }
  .hero {
    padding-top: 100px;
  }
  .section {
    padding-top: 76px;
  }
  .safety-panel {
    padding: 24px 18px;
  }
  .download-stage {
    padding: 46px 18px 38px;
  }
  .heatmap-grid {
    grid-template-columns: repeat(14, 1fr);
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .line-inner {
    opacity: 1 !important;
    transform: none !important;
  }
}
