/* ═══════════════════════════════════════════════════════
   DESIGN TOKENS — inherited from effector-landing
═══════════════════════════════════════════════════════ */
:root {
  --bg:          #0F0F0F;
  --bg2:         #141414;
  --surface:     #1A1A1A;
  --surface2:    #222222;
  --surface3:    #2A2A2A;
  --border:      #2A2A2A;
  --border2:     #333333;

  --red:         #E03E3E;
  --red-dim:     rgba(224,62,62,0.10);
  --red-glow:    rgba(224,62,62,0.20);
  --orange:      #F27A3A;
  --orange-dim:  rgba(242,122,58,0.08);
  --green:       #4ade80;
  --green-dim:   rgba(74,222,128,0.08);
  --amber:       #fbbf24;
  --blue:        #60a5fa;
  --blue-dim:    rgba(96,165,250,0.10);

  --text:        #F5F0EB;
  --text2:       #9CA3AF;
  --text3:       #6B7280;

  --radius:      12px;
  --radius-sm:   8px;
  --radius-xs:   6px;

  --font-mono:   'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  --font-sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;

  /*
   * Letterpress on near-black / gray (#0F0F0F, #141414, #1A1A1A):
   * - 字色：统一暗红（低明度、带色相），忌灰褐 —— 灰了会像浮灰，不像印泥。
   * - 「下面那条线」在暗底上是凹槽底：用纯黑/近黑影叠在字下方（em 缩放），才压得下去；
   *   顶沿只用极弱暖红高光，不用大白，避免发灰、发浮。
   */
  --letterpress-shadow:
    /* 上沿：暗锈红微光（与字同色系统，非灰白） */
    0 -0.025em 0 rgba(180, 70, 65, 0.22),
    /* 下沿：槽底 —— 明显的一条「沉下去」的暗（关键） */
    0 0.04em 0 rgba(0, 0, 0, 0.92),
    0 0.07em 0.12em rgba(0, 0, 0, 0.78),
    0 0.12em 0.22em rgba(0, 0, 0, 0.45),
    /* 对角咬边，略加深 */
    0.025em 0.04em 0 rgba(0, 0, 0, 0.35),
    -0.02em -0.02em 0 rgba(120, 40, 36, 0.35);
  /* 暗红印泥：utility / 非渐变字用 */
  --letterpress-ink: #3e1614;
  /* 区块标签：同向渐变，整体压暗；色相偏红、少橙（与 hero 亮橙红可区分） */
  --label-gradient: linear-gradient(135deg, #8a2228 0%, #621a1f 100%);
  /*
   * 渐变字浮雕：明暗结构不变；高光/咬边与字身同为偏暗酒红，避免桃橙感。
   */
  --letterpress-shadow-label:
    /* 上沿：主层 —— 暗红高光（压暗、偏红） */
    0 -0.03em 0 rgba(165, 58, 64, 0.4),
    0 -0.02em 0 rgba(120, 38, 42, 0.32),
    /* 下沿：浅槽 */
    0 0.04em 0 rgba(0, 0, 0, 0.4),
    0 0.07em 0.12em rgba(0, 0, 0, 0.28),
    0 0.12em 0.22em rgba(0, 0, 0, 0.18),
    /* 对角：深红褐咬边 */
    0.02em 0.035em 0 rgba(28, 10, 12, 0.26),
    -0.025em -0.025em 0 rgba(140, 48, 52, 0.36);

  /* Landing — 各区块水平留白（Problem / How It Works / …） */
  --landing-pad-x: 56px;
  --landing-pad-x-sm: 28px;
  /* How It Works — 竖线位置 + 左侧文案缩进 */
  /* Align the vertical connector with the left step dot. Tuned to avoid
     the horizontal connector "floating" away from the vertical line. */
  --steps-line-x: 38px;
  --steps-copy-pl: 40px;

  --sidebar-w:   260px;
  --topnav-h:    56px;
  --content-max: 820px;
}

/* ═══════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}
a { color: var(--orange); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--red); }
code, pre { font-family: var(--font-mono); }

/* ═══════════════════════════════════════════════════════
   TOP NAV
═══════════════════════════════════════════════════════ */
.topnav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--topnav-h);
  background: rgba(15,15,15,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 36px;
  z-index: 100;
}
.topnav-logo {
  font-size: 18px; font-weight: 700; color: var(--text);
  display: flex; align-items: center;
  /* no gap — logo reads as effectorHQ */
  margin-right: 44px;
}
.topnav-logo span { color: var(--red); }
.topnav-links { display: flex; gap: 8px; flex: 1; }
.topnav-links a {
  color: var(--text2); padding: 8px 16px; border-radius: var(--radius-xs);
  font-size: 14px; font-weight: 500; transition: all 0.2s;
}
.topnav-links a:hover { color: var(--text); background: var(--surface); }
.topnav-links a.active { color: var(--orange); background: var(--orange-dim); }
.topnav-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 8px 14px;
  color: var(--text3); font-size: 13px; cursor: pointer;
  transition: border-color 0.2s;
}
.topnav-search:hover { border-color: var(--border2); }
.topnav-search kbd {
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: 4px; padding: 1px 6px; font-size: 11px;
  font-family: var(--font-sans);
}
.topnav-github {
  display: flex; align-items: center; color: var(--text3) !important;
  transition: color 0.2s;
}
.topnav-github:hover { color: var(--text) !important; }

/* ═══════════════════════════════════════════════════════
   LAYOUT: SIDEBAR + CONTENT
═══════════════════════════════════════════════════════ */
.layout {
  display: flex;
  padding-top: var(--topnav-h);
  min-height: 100vh;
}
.sidebar {
  position: fixed; top: var(--topnav-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  padding: 20px 16px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--bg);
  z-index: 50;
}
.sidebar-section { margin-bottom: 24px; }
.sidebar-section-title {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text3);
  padding: 0 8px; margin-bottom: 6px;
}
.sidebar a {
  display: block; padding: 5px 8px; border-radius: var(--radius-xs);
  color: var(--text2); font-size: 13.5px; transition: all 0.15s;
  line-height: 1.5;
}
.sidebar a:hover { color: var(--text); background: var(--surface); }
.sidebar a.active { color: var(--orange); background: var(--orange-dim); font-weight: 500; }

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
}
.content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 40px 40px 80px;
}

/* ═══════════════════════════════════════════════════════
   CONTENT TYPOGRAPHY
═══════════════════════════════════════════════════════ */
.content h1 {
  font-size: 32px; font-weight: 700; margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.content h2 {
  font-size: 22px; font-weight: 600; margin-top: 48px; margin-bottom: 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.content h3 {
  font-size: 17px; font-weight: 600; margin-top: 32px; margin-bottom: 8px;
}
.content h4 {
  font-size: 14px; font-weight: 600; margin-top: 24px; margin-bottom: 6px;
  color: var(--text2);
}
.content p { margin-bottom: 16px; color: var(--text); }
.content ul, .content ol { margin-bottom: 16px; padding-left: 24px; }
.content li { margin-bottom: 6px; color: var(--text); }
.content li code, .content p code {
  background: var(--surface2); padding: 2px 6px; border-radius: 4px;
  font-size: 0.88em; color: var(--orange);
}
.content strong { font-weight: 600; }
.content em { font-style: italic; color: var(--text2); }
.content blockquote {
  border-left: 3px solid var(--red); padding: 12px 16px;
  margin: 16px 0; background: var(--red-dim); border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  color: var(--text2);
}
.content hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.content img { max-width: 100%; border-radius: var(--radius-sm); }

/* Code blocks */
.content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  overflow-x: auto;
  margin-bottom: 16px;
  font-size: 13.5px;
  line-height: 1.6;
  position: relative;
}
.content pre[data-lang] {
  padding-top: 36px;
}
.content pre code {
  background: none; padding: 0; color: var(--text);
  font-size: inherit;
}

/* Tables */
.content table {
  width: 100%; border-collapse: collapse; margin-bottom: 16px;
  font-size: 14px;
}
.content th {
  text-align: left; padding: 10px 12px;
  border-bottom: 2px solid var(--border2);
  font-weight: 600; font-size: 13px; color: var(--text2);
}
.content td {
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  color: var(--text);
}
.content tr:hover td { background: var(--surface); }

/* ═══════════════════════════════════════════════════════
   PAGE SUBTITLE
═══════════════════════════════════════════════════════ */
.page-subtitle {
  font-size: 16px; color: var(--text2); margin-bottom: 32px;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════
   PREV/NEXT NAVIGATION
═══════════════════════════════════════════════════════ */
.page-nav {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--border);
}
.page-nav a {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text2); font-size: 13px; transition: all 0.2s; flex: 1;
}
.page-nav a:hover { border-color: var(--orange); background: var(--orange-dim); }
.page-nav a .nav-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.05em; }
.page-nav a .nav-title { color: var(--text); font-weight: 500; }
.page-nav .next { text-align: right; }

/* ═══════════════════════════════════════════════════════
   SEARCH OVERLAY
═══════════════════════════════════════════════════════ */
.search-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  z-index: 200; justify-content: center; padding-top: 120px;
}
.search-overlay.open { display: flex; }
.search-box {
  width: 560px; max-height: 480px; background: var(--surface);
  border: 1px solid var(--border2); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.search-input {
  width: 100%; padding: 16px 20px; background: transparent;
  border: none; border-bottom: 1px solid var(--border);
  color: var(--text); font-size: 16px; font-family: var(--font-sans);
  outline: none;
}
.search-results {
  max-height: 380px; overflow-y: auto; padding: 8px;
}
.search-result {
  display: block; padding: 10px 12px; border-radius: var(--radius-xs);
  color: var(--text); cursor: pointer; transition: background 0.1s;
}
.search-result:hover, .search-result.focused { background: var(--surface2); }
.search-result-title { font-weight: 500; font-size: 14px; }
.search-result-section { font-size: 12px; color: var(--text3); margin-top: 2px; }
.search-empty { padding: 20px; text-align: center; color: var(--text3); font-size: 14px; }

/* ═══════════════════════════════════════════════════════
   HOME PAGE
═══════════════════════════════════════════════════════ */
.layout-home .content {
  max-width: none;
  padding: 0;
}
.home-hero {
  text-align: center; padding: 80px 24px 60px;
  max-width: 740px; margin: 0 auto;
  position: relative;
}
.home-hero::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 120px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), var(--orange), transparent);
  opacity: 0.4;
}
.home-hero h1 {
  font-size: 48px; font-weight: 800; letter-spacing: -0.03em;
  margin-bottom: 16px; border: none;
}
.home-hero h1 .accent { color: var(--red); }
.home-hero .tagline {
  font-size: 20px; color: var(--text2); line-height: 1.6;
  margin-bottom: 32px;
}
.home-hero .cta-row { display: flex; gap: 12px; justify-content: center; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--red); color: #fff; padding: 10px 24px;
  border-radius: var(--radius-xs); font-weight: 600; font-size: 15px;
  transition: all 0.2s; border: 1px solid transparent;
  box-shadow: 0 2px 8px rgba(224,62,62,0.25);
}
.btn-primary:hover { background: #c93535; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(224,62,62,0.35); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border2);
  color: var(--text); padding: 10px 24px;
  border-radius: var(--radius-xs); font-weight: 500; font-size: 15px;
  transition: all 0.2s;
}
.btn-secondary:hover { background: var(--surface2); border-color: var(--text3); }

/* Feature cards grid */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  max-width: 960px; margin: 0 auto 60px; padding: 0 24px;
}
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--border2); }
.feature-card .icon { font-size: 28px; margin-bottom: 12px; }
.feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.feature-card p { font-size: 13.5px; color: var(--text2); line-height: 1.6; }

/* Stats bar */
.stats-bar {
  display: flex; justify-content: center; gap: 48px;
  padding: 24px; margin-bottom: 60px;
}
.stat { text-align: center; }
.stat-value { font-size: 32px; font-weight: 700; color: var(--red); }
.stat-label { font-size: 13px; color: var(--text3); margin-top: 4px; }

/* Quick install */
.quick-install {
  max-width: 560px; margin: 0 auto 60px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px;
  font-family: var(--font-mono); font-size: 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.quick-install code { color: var(--text); }
.quick-install .dollar { color: var(--text3); margin-right: 8px; }
.quick-install button {
  background: var(--surface2); border: 1px solid var(--border2);
  color: var(--text3); border-radius: 4px; padding: 4px 10px;
  font-size: 12px; cursor: pointer;
}

/* ═══════════════════════════════════════════════════════
   LANDING PAGE — SECTIONS (from effector-landing)
═══════════════════════════════════════════════════════ */
.landing-section {
  padding: 120px 0; max-width: 1400px; margin: 0 auto;
  padding-left: var(--landing-pad-x); padding-right: var(--landing-pad-x);
}
.landing-section.alt-bg {
  background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  max-width: none; padding-left: 0; padding-right: 0;
}
.landing-section.alt-bg > .landing-inner { max-width: 1400px; margin: 0 auto; padding: 0 var(--landing-pad-x); }
/* 与 hero h1 同族：Inter 800 斜体；字身用红→橙渐变，浮雕用多层 text-shadow（勿用 filter 替代） */
.section-label {
  display: block;
  font-family: var(--font-sans);
  font-style: italic;
  font-weight: 800;
  font-size: clamp(26px, 3.2vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0 0 16px;
  padding: 0;
  border-radius: 0;
  background: var(--label-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  text-shadow: var(--letterpress-shadow-label);
}
.section-title {
  font-size: clamp(28px, 4vw, 38px); font-weight: 700;
  letter-spacing: -0.025em; line-height: 1.2; margin-bottom: 20px; border: none;
  color: var(--text);
}
.section-desc {
  font-size: 16px; color: var(--text2); max-width: 620px; line-height: 1.75; margin-bottom: 56px;
}

/* Utility — same physics as --letterpress-shadow */
.letterpress-soft {
  font-family: var(--font-display);
  font-weight: 400;
  text-shadow: var(--letterpress-shadow);
}
.letterpress-soft,
.letterpress-soft.italic {
  font-style: italic;
}

/* Hero pill — original capsule (not letterpress); text in home.html */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--red-dim);
  border: 1px solid rgba(224, 62, 62, 0.2);
  border-radius: 100px;
  padding: 6px 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--red);
  margin: 0 auto 28px;
  text-shadow: none;
}
.hero-badge::before {
  content: '';
  width: 16px;
  height: 16px;
  background-color: transparent;
  background-image: url("/assets/hero-hands-logo.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  animation: heroBadgePulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes heroBadgePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Hero gradient text */
.gradient {
  background: linear-gradient(135deg, var(--red) 0%, var(--orange) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* Hero install boxes */
.hero-install {
  display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 16px;
  font-family: var(--font-mono); font-size: 13px; color: var(--text);
  gap: 10px; cursor: pointer; transition: all 0.2s;
}
.hero-install:hover { border-color: var(--text3); background: var(--surface2); }
.hero-install .prompt { color: var(--text3); user-select: none; }
.hero-install .cmd { color: var(--orange); }
.hero-install .copy-btn {
  background: none; border: none; color: var(--text3); cursor: pointer;
  padding: 2px; transition: color 0.2s; font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(2px);
}
.hero-install .copy-btn svg { display: block; }
.hero-install .copy-btn:hover { color: var(--text); }

.hero-stats {
  display: flex; gap: 48px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border);
}
.hero-stat { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.hero-stat .num { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; color: var(--text); font-family: var(--font-sans); }
.hero-stat .label { font-size: 12px; color: var(--text3); font-weight: 500; letter-spacing: 0.03em; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text2); padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 500; border: 1px solid var(--border2);
  transition: all 0.2s; background: none; cursor: pointer;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text3); }

/* Problem grid */
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.problem-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.problem-card:hover { border-color: var(--border2); box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.problem-card .icon {
  width: 36px; height: 36px; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; margin-bottom: 14px; background: var(--red-dim);
}
.problem-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.problem-card p { font-size: 13.5px; color: var(--text2); line-height: 1.65; }

/* Steps — minmax(0) + min-width:0 avoids text column overflowing into code column */
.steps { display: flex; flex-direction: column; gap: 0; position: relative; }
.step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 64px;
  align-items: start;
  padding: 72px 0 104px;
  border-bottom: none;
  position: relative;
  z-index: 1;
}

/* Horizontal divider: start at the connector so the left intersection area never
   shows an extra segment. (Fixes the "line overflow" look.) */
.step::after {
  content: '';
  position: absolute;
  left: var(--steps-line-x);
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--border);
  z-index: 0;
}

.step:last-child::after {
  display: none;
}
.step > * {
  min-width: 0;
}
.step:last-child {
  border-bottom: none;
  padding-bottom: 72px;
}
/* First .step is nth-child(2) — after .steps-line */
.steps > .step:nth-child(2) {
  padding-top: 48px;
}
.step > div:not(.step-code) {
  padding-left: var(--steps-copy-pl);
}
.step-num {
  font-size: 12px; font-weight: 700;
  font-family: var(--font-mono); margin-bottom: 12px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  display: inline-block; padding: 0; border-radius: 0;
  font-size: 14px; letter-spacing: 0.02em;
}
.step h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; border: none; }
.step p { font-size: 14.5px; color: var(--text2); line-height: 1.7; }
.step-code {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s, border-color 0.3s;
  isolation: isolate;
}
.step:hover .step-code {
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  border-color: var(--border2);
}
.step-code-header {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  background: var(--surface2); border-bottom: 1px solid var(--border);
  font-size: 11.5px; color: var(--text3); font-family: var(--font-mono);
}
.step-code-header .dot { width: 7px; height: 7px; border-radius: 50%; }
.step-code pre {
  padding: 18px; font-size: 12.5px; line-height: 1.7; overflow-x: auto;
  color: var(--text2); margin: 0; border: none; border-radius: 0; background: var(--surface);
  position: static;
}
.step-code pre .kw { color: var(--red); }
.step-code pre .str { color: var(--orange); }
.step-code pre .comment { color: var(--text3); }
.step-code pre .fn { color: #93c5fd; }
.step-code pre .type { color: var(--green); }
.step-code pre .bool { color: var(--amber); }
.step-code pre .section { color: var(--text); font-weight: 600; }

/* Ecosystem grid */
.cap-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.cap-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; transition: all 0.25s;
}
.cap-card:hover { border-color: var(--border2); box-shadow: 0 4px 20px rgba(0,0,0,0.12); transform: translateY(-1px); }
.cap-card .tag {
  display: inline-block; font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 100px; margin-bottom: 14px;
}
.cap-card .tag.core { background: var(--red-dim); color: var(--red); }
.cap-card .tag.tool { background: var(--orange-dim); color: var(--orange); }
.cap-card .tag.infra { background: var(--green-dim); color: var(--green); }
.cap-card h3 {
  font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--text);
  font-family: var(--font-mono); letter-spacing: -0.01em; border: none;
}
.cap-card p { font-size: 13.5px; color: var(--text2); line-height: 1.6; }

/* MCP highlight */
.highlight-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}
.highlight-box h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; border: none; }
.highlight-box p { font-size: 14.5px; color: var(--text2); line-height: 1.7; margin-bottom: 20px; }
.checklist { list-style: none; display: flex; flex-direction: column; gap: 8px; padding: 0; }
.checklist li {
  display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text2); line-height: 1.5;
}
.checklist li::before { content: '✓'; color: var(--green); font-weight: 700; font-size: 12px; margin-top: 2px; flex-shrink: 0; }
.mcp-code {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.8;
  color: var(--text2); white-space: pre;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.15);
}

/* Comparison table (landing) */
.landing-table { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.landing-table table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.landing-table thead th {
  text-align: left; padding: 14px 24px; border-bottom: 2px solid var(--border2);
  font-weight: 600; color: var(--text2); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em;
}
.landing-table thead th:last-child { color: var(--red); }
.landing-table tbody td { padding: 13px 24px; border-bottom: 1px solid var(--border); color: var(--text3); }
.landing-table tbody td:first-child { color: var(--text2); }
.landing-table tbody td:last-child { color: var(--orange); font-weight: 500; }
.landing-table tbody tr:last-child td { border-bottom: none; }
.landing-table tbody tr:hover td { background: var(--surface2); }

/* Architecture diagram */
.arch-diagram {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px 40px;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 2;
  color: var(--text2); overflow-x: auto; white-space: pre; text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.arch-diagram .layer-label {
  color: var(--text3); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--surface2); padding: 2px 12px; border-radius: 4px;
}
.arch-diagram .pkg { color: var(--orange); font-weight: 500; }
.arch-diagram .arrow { color: var(--text3); }

/* CTA section */
.cta-section {
  text-align: center; padding: 120px 48px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 50%, var(--bg) 100%);
  border-top: 1px solid var(--border);
  position: relative;
}
.cta-section::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 200px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), var(--orange), transparent);
  opacity: 0.3;
}
.cta-section h2 {
  font-size: clamp(30px, 4vw, 44px); font-weight: 800;
  letter-spacing: -0.03em; margin-bottom: 16px; border: none;
}
.cta-section p { font-size: 16px; color: var(--text2); margin-bottom: 32px; max-width: 460px; margin-left: auto; margin-right: auto; line-height: 1.7; }
.cta-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════
   BEFORE & AFTER GRID
═══════════════════════════════════════════════════════ */
.before-after-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  border: 1px solid var(--border);
}
.ba-col {
  padding: 36px 32px; display: flex; flex-direction: column; gap: 0;
}
.ba-before { background: var(--surface); }
.ba-after {
  background: linear-gradient(135deg, var(--surface2) 0%, rgba(74,222,128,0.03) 100%);
  border-left: 1px solid var(--border);
}
.ba-header {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 24px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.ba-before .ba-header { color: var(--text3); }
.ba-after .ba-header { color: var(--green); }
.ba-item {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 14px; line-height: 1.5; padding: 10px 0; color: var(--text2);
  transition: color 0.2s;
}
.ba-after .ba-item:hover { color: var(--text); }
.ba-icon { flex-shrink: 0; font-size: 13px; margin-top: 2px; }
.ba-icon.ba-x { color: var(--text3); opacity: 0.6; }
.ba-icon.ba-check { color: var(--green); font-weight: 700; }

/* ═══════════════════════════════════════════════════════
   ADOPTION GRID
═══════════════════════════════════════════════════════ */
.adopt-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.adopt-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 24px;
  transition: all 0.3s ease;
  position: relative; overflow: hidden;
}
.adopt-card > * {
  position: relative;
  z-index: 1;
}
.adopt-card:hover {
  border-color: var(--border2); box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  transform: translateY(-3px);
}
.adopt-icon {
  display: inline-block;
  margin-bottom: 18px;
  opacity: 0.85;
  transform-origin: left top;
  transition: transform 0.3s ease, opacity 0.3s;
}
.adopt-icon svg {
  display: block;
  width: 48px;
  height: 48px;
}
.adopt-card:hover .adopt-icon {
  opacity: 1;
  transform: scale(1.28);
}
.adopt-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; color: var(--text); border: none; }
.adopt-card p { font-size: 13.5px; color: var(--text2); line-height: 1.65; }
.adopt-card code {
  background: var(--surface2); padding: 1px 5px; border-radius: 3px;
  font-size: 0.85em; color: var(--orange);
}

/* ═══════════════════════════════════════════════════════
   ECOSYSTEM TABLE
═══════════════════════════════════════════════════════ */
.eco-table {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.eco-row {
  display: grid; grid-template-columns: 220px 1fr 80px;
  padding: 0; border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.eco-row.eco-last { border-bottom: none; }
.eco-row:not(.eco-header):hover { background: var(--surface2); }
.eco-row:not(.eco-header) { cursor: default; }
.eco-row:not(.eco-header):hover .eco-name code { color: var(--text); }
.eco-row.eco-header {
  background: var(--surface2);
  border-bottom: 2px solid var(--border2);
}
.eco-row.eco-header > div {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text3); padding: 12px 20px;
}
.eco-name {
  padding: 12px 20px; font-size: 13px;
}
.eco-name code {
  background: none; color: var(--orange); font-weight: 500; font-size: 12.5px;
}
.eco-desc {
  padding: 12px 20px; font-size: 13px; color: var(--text2); line-height: 1.5;
}
.eco-tier { padding: 12px 20px; display: flex; align-items: center; }
/* Compact pill badges — only if .eco-badge appears inside legacy table rows */
.eco-tier .eco-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 100px;
}
.eco-tier .eco-badge.eco-core { background: var(--red-dim); color: var(--red); }
.eco-tier .eco-badge.eco-tool { background: var(--orange-dim); color: var(--orange); }
.eco-tier .eco-badge.eco-infra { background: var(--green-dim); color: var(--green); }
.eco-tier .eco-badge.eco-dist { background: var(--blue-dim); color: var(--blue); }

/* ═══════════════════════════════════════════════════════
   TRY IT GRID
═══════════════════════════════════════════════════════ */
.try-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.try-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 24px;
  transition: all 0.3s ease; text-decoration: none; color: var(--text);
  display: block; position: relative; overflow: hidden;
}
.try-card::after {
  content: '→'; position: absolute; bottom: 24px; right: 24px;
  font-size: 18px; color: var(--text3); opacity: 0;
  transition: all 0.3s; transform: translateX(-8px);
}
.try-card:hover {
  border-color: var(--border2); box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  transform: translateY(-3px); color: var(--text);
}
.try-card:hover::after { opacity: 1; transform: translateX(0); }
.try-icon {
  display: inline-block;
  margin-bottom: 18px;
  transform-origin: left top;
  transition: transform 0.3s ease;
}
.try-icon svg {
  display: block;
  width: 48px;
  height: 48px;
}
.try-card:hover .try-icon { transform: scale(1.28); }
.try-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; border: none; }
.try-card p { font-size: 13px; color: var(--text2); line-height: 1.6; }

/* ═══════════════════════════════════════════════════════
   HERO GLOW ORBS — subtle animated bg decoration
═══════════════════════════════════════════════════════ */
.hero-glow {
  position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(100px); opacity: 0.12; z-index: -1;
}
.hero-glow-1 {
  width: 400px; height: 400px; top: -100px; left: -120px;
  background: var(--red);
  animation: glowFloat 8s ease-in-out infinite alternate;
}
.hero-glow-2 {
  width: 300px; height: 300px; bottom: -60px; right: -100px;
  background: var(--orange);
  animation: glowFloat 10s ease-in-out 2s infinite alternate-reverse;
}
@keyframes glowFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.1); }
}

/* ═══════════════════════════════════════════════════════
   BEFORE/AFTER DOT INDICATORS (replacing generic ✗/✓)
═══════════════════════════════════════════════════════ */
.ba-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  position: relative;
}
.ba-dot-red {
  background: rgba(224,62,62,0.5);
  box-shadow: 0 0 0 2px rgba(224,62,62,0.15);
}
.ba-dot-green {
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(74,222,128,0.15);
  animation: dotPulse 2.5s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(74,222,128,0.15); }
  50% { box-shadow: 0 0 0 5px rgba(74,222,128,0.08); }
}

/* ═══════════════════════════════════════════════════════
   STEPS — vertical connecting line + step dots
═══════════════════════════════════════════════════════ */
.steps-line {
  position: absolute; left: var(--steps-line-x); top: 56px; bottom: 56px; width: 1px;
  background: linear-gradient(180deg, var(--red), var(--orange), var(--green), var(--blue));
  opacity: 0.2;
  z-index: 0;
  pointer-events: none;
}
.step-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--orange));
  margin-right: 8px; vertical-align: middle;
  box-shadow: 0 0 8px rgba(224,62,62,0.3);
}

/* Step code header — macOS-style triple dots */
.step-code-header .dot {
  width: 7px; height: 7px; border-radius: 50%;
}

/* ═══════════════════════════════════════════════════════
   ADOPTION CARDS — numbered badge
═══════════════════════════════════════════════════════ */
.adopt-num {
  position: absolute; top: 16px; right: 16px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--text3); opacity: 0.3;
  transition: all 0.3s;
}
.adopt-card:hover .adopt-num {
  opacity: 0.7;
  background: linear-gradient(135deg, var(--red), var(--orange));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ═══════════════════════════════════════════════════════
   ECOSYSTEM CARDS (replacing table)
═══════════════════════════════════════════════════════ */
.eco-cards {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
/* Ecosystem：首行仅右上胶囊；下一行起左对齐包名（与页面源码 DOM 一致） */
.eco-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 22px 22px;
  transition: all 0.25s; position: relative; overflow: hidden;
  display: block;
  text-decoration: none;
  color: inherit;
}
.eco-card::before {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--red), var(--orange));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s ease;
}
.eco-card:hover { border-color: var(--border2); background: var(--surface2); }
.eco-card:hover::before { transform: scaleX(1); }
.eco-card-hero {
  grid-column: span 1;
  background: linear-gradient(135deg, var(--surface) 0%, rgba(242, 122, 58, 0.04) 100%);
  border-color: rgba(242, 122, 58, 0.14);
}
.eco-card-hero:has(.eco-core) {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(224, 62, 62, 0.07) 100%);
  border-color: rgba(224, 62, 62, 0.18);
}
.eco-card-hero:has(.eco-dist) {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(96, 165, 250, 0.07) 100%);
  border-color: rgba(96, 165, 250, 0.18);
}
.eco-card-tier {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 12px;
  min-height: 0;
}
.eco-card > h3 {
  margin: 0 0 12px 0;
  padding: 0;
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  color: var(--orange);
  letter-spacing: -0.01em;
  border: none;
  line-height: 1.35;
}
.eco-card p {
  font-family: var(--font-sans);
  font-size: 13px; color: var(--text2); line-height: 1.5; margin: 0;
  padding: 0;
}
.eco-card .eco-badge {
  flex-shrink: 0;
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.15;
  padding: 2px 7px;
  border-radius: 999px;
  border: none;
  text-shadow: none;
  -webkit-text-stroke: 0;
  filter: none;
}
.eco-card .eco-badge.eco-core {
  background: var(--red-dim);
  color: var(--red);
}
.eco-card .eco-badge.eco-dist {
  background: var(--blue-dim);
  color: var(--blue);
}
.eco-card .eco-badge.eco-tool {
  background: var(--orange-dim);
  color: var(--orange);
}
.eco-card .eco-badge.eco-infra {
  background: var(--green-dim);
  color: var(--green);
}
.eco-card-meta {
  font-size: 11px; color: var(--text3); margin-top: 12px;
  font-family: var(--font-sans); letter-spacing: 0.02em;
  padding: 0;
}

/* ═══════════════════════════════════════════════════════
   TRY IT — mouse-follow glow effect
═══════════════════════════════════════════════════════ */
.try-card[data-glow]::before,
.adopt-card[data-glow]::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  opacity: 0; transition: opacity 0.4s;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    300px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    rgba(224,62,62,0.06),
    transparent 60%
  );
}
.try-card[data-glow="orange"]::before,
.adopt-card[data-glow="orange"]::before {
  background: radial-gradient(300px circle at var(--glow-x, 50%) var(--glow-y, 50%), rgba(242,122,58,0.08), transparent 60%);
}
.try-card[data-glow="green"]::before,
.adopt-card[data-glow="green"]::before {
  background: radial-gradient(300px circle at var(--glow-x, 50%) var(--glow-y, 50%), rgba(74,222,128,0.06), transparent 60%);
}
.try-card[data-glow="blue"]::before,
.adopt-card[data-glow="blue"]::before {
  background: radial-gradient(300px circle at var(--glow-x, 50%) var(--glow-y, 50%), rgba(147,197,253,0.06), transparent 60%);
}
.try-card[data-glow="red"]::before,
.adopt-card[data-glow="red"]::before {
  background: radial-gradient(300px circle at var(--glow-x, 50%) var(--glow-y, 50%), rgba(224,62,62,0.06), transparent 60%);
}
.try-card[data-glow]:hover::before,
.adopt-card[data-glow]:hover::before { opacity: 1; }

/* ═══════════════════════════════════════════════════════
   CTA — animated glow backdrop
═══════════════════════════════════════════════════════ */
.cta-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 600px; height: 200px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(224,62,62,0.06) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
  animation: ctaGlow 6s ease-in-out infinite alternate;
}
@keyframes ctaGlow {
  0% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

/* Responsive for new components */
@media (max-width: 1024px) {
  .adopt-grid { grid-template-columns: repeat(2, 1fr); }
  .try-grid { grid-template-columns: repeat(2, 1fr); }
  .eco-cards { grid-template-columns: repeat(2, 1fr); }
  .eco-card-hero { grid-column: span 1; }
}
@media (max-width: 768px) {
  .before-after-grid { grid-template-columns: 1fr; }
  .adopt-grid { grid-template-columns: 1fr; }
  .try-grid { grid-template-columns: 1fr; }
  .eco-cards { grid-template-columns: 1fr; }
  .section-label {
    font-size: clamp(22px, 5vw, 34px);
    letter-spacing: -0.03em;
  }
  .eco-card .eco-badge {
    font-size: 9px;
    padding: 3px 8px;
  }
  .steps-line { display: none; }
  .hero-glow { display: none; }
  .step > div:not(.step-code) {
    padding-left: 12px;
  }
}

/* Embedded app iframe */
.embedded-app {
  width: 100%; height: 700px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--bg2);
}

/* Landing responsive */
@media (max-width: 768px) {
  .problem-grid { grid-template-columns: 1fr; }
  .step {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 48px 0 72px;
  }
  .steps > .step:nth-child(2) {
    padding-top: 32px;
  }
  .step:last-child {
    padding-bottom: 48px;
  }
  .step:nth-child(even) .step-code { order: -1; }
  .cap-grid { grid-template-columns: 1fr; }
  .highlight-box { grid-template-columns: 1fr; padding: 24px; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .landing-section { padding: 64px 0; padding-left: var(--landing-pad-x-sm); padding-right: var(--landing-pad-x-sm); }
  .landing-section.alt-bg > .landing-inner { padding: 0 var(--landing-pad-x-sm); }
  .cta-section { padding: 64px 20px; }
}

/* ═══════════════════════════════════════════════════════
   TYPE EXPLORER
═══════════════════════════════════════════════════════ */
.type-explorer {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin: 24px 0;
}
.type-explorer-toolbar {
  display: flex; gap: 8px; padding: 12px 16px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.type-filter {
  padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 500;
  cursor: pointer; border: 1px solid var(--border); background: transparent;
  color: var(--text2); transition: all 0.2s;
}
.type-filter:hover { border-color: var(--text3); color: var(--text); }
.type-filter.active { border-color: var(--orange); color: var(--orange); background: var(--orange-dim); }
.type-explorer svg { width: 100%; height: 500px; background: var(--bg2); }
.type-detail-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: 300px;
  background: var(--surface); border-left: 1px solid var(--border);
  padding: 20px; overflow-y: auto; display: none;
}
.type-detail-panel.open { display: block; }

/* Type catalog cards */
.type-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px; margin: 16px 0;
}
.type-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
  transition: border-color 0.2s; display: block; color: var(--text);
}
.type-card:hover { border-color: var(--orange); color: var(--text); }
.type-card .type-name { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.type-card .type-cat {
  font-size: 11px; color: var(--text3); text-transform: uppercase;
  letter-spacing: 0.05em;
}
.type-card .type-desc { font-size: 13px; color: var(--text2); margin-top: 8px; line-height: 1.5; }

/* Category badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.badge-input { background: var(--blue-dim); color: var(--blue); }
.badge-output { background: var(--green-dim); color: var(--green); }
.badge-context { background: var(--orange-dim); color: var(--orange); }

/* ═══════════════════════════════════════════════════════
   PLAYGROUND
═══════════════════════════════════════════════════════ */
.playground-container {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; height: 500px; margin: 24px 0;
}
.playground-editor, .playground-output {
  display: flex; flex-direction: column;
}
.playground-editor { border-right: 1px solid var(--border); }
.playground-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--text2);
}
.playground-editor textarea {
  flex: 1; background: var(--bg2); color: var(--text); border: none;
  padding: 16px; font-family: var(--font-mono); font-size: 13px;
  line-height: 1.6; resize: none; outline: none;
}
.playground-output pre {
  flex: 1; margin: 0; border: none; border-radius: 0;
  background: var(--bg2);
}

/* ═══════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--border); padding: 32px 24px;
  text-align: center; color: var(--text3); font-size: 13px;
  margin-left: var(--sidebar-w);
}
.footer a { color: var(--text2); }

/* ═══════════════════════════════════════════════════════
   HOME LAYOUT (no sidebar)
═══════════════════════════════════════════════════════ */
.layout-home .sidebar { display: none; }
.layout-home .main { margin-left: 0; }
.layout-home .footer { margin-left: 0; }

/* ═══════════════════════════════════════════════════════
   MOBILE
═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .footer { margin-left: 0; }
  .content { padding: 24px 16px 60px; }
  .content h1 { font-size: 26px; }
  .content h2 { font-size: 20px; }
  .home-hero h1 { font-size: 32px; }
  .features-grid { grid-template-columns: 1fr; }
  .stats-bar { gap: 24px; flex-wrap: wrap; }
  .playground-container { grid-template-columns: 1fr; height: auto; }
  .playground-editor { height: 250px; border-right: none; border-bottom: 1px solid var(--border); }
  .playground-output { height: 250px; }
  .topnav-links { display: none; }
  .type-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════
   COLLAPSIBLE SIDEBAR
═══════════════════════════════════════════════════════ */
.sidebar-section.collapsed > a { display: none; }
.sidebar-chevron {
  font-size: 10px; color: var(--text3); transition: transform 0.2s;
  display: inline-block;
}
.sidebar-section.collapsed .sidebar-chevron { transform: rotate(-90deg); }
.sidebar-section-title:hover { color: var(--text2); }

/* ═══════════════════════════════════════════════════════
   BACK TO TOP
═══════════════════════════════════════════════════════ */
.back-to-top {
  position: fixed; bottom: 32px; right: 32px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border2);
  color: var(--text2); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: all 0.3s ease;
  z-index: 90;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--surface2); color: var(--text); border-color: var(--orange); transform: translateY(-2px); }

/* ═══════════════════════════════════════════════════════
   TABLE OF CONTENTS (scroll spy)
═══════════════════════════════════════════════════════ */
.toc {
  position: fixed; top: calc(var(--topnav-h) + 24px);
  right: 24px; width: 200px;
  font-size: 12.5px; z-index: 40;
}
.toc-title {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text3); margin-bottom: 8px;
}
.toc ul { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--border); }
.toc li { padding: 3px 0 3px 12px; }
.toc li.toc-h3 { padding-left: 24px; }
.toc a {
  color: var(--text3); text-decoration: none; transition: color 0.2s;
  line-height: 1.5; display: block;
}
.toc a:hover { color: var(--text2); }
.toc a.active { color: var(--orange); }

/* Hide TOC on narrow screens */
@media (max-width: 1280px) { .toc { display: none; } }

/* ═══════════════════════════════════════════════════════
   COPY BUTTON ENHANCED
═══════════════════════════════════════════════════════ */
.content pre .copy-btn {
  position: absolute; top: 8px; right: 8px;
  background: var(--surface2); border: 1px solid var(--border2);
  color: var(--text3); border-radius: 4px; padding: 3px 8px;
  font-size: 11px; cursor: pointer; opacity: 0; transition: all 0.2s;
  font-family: var(--font-sans);
}
.content pre:hover .copy-btn { opacity: 1; }
.content pre .copy-btn:hover { color: var(--text); background: var(--surface3); }

/* ═══════════════════════════════════════════════════════
   SMOOTH ENTRANCE ANIMATIONS
═══════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.content > h1:first-child,
.content > .page-subtitle:first-of-type { animation: fadeInUp 0.4s ease both; }
.content > h1:first-child + .page-subtitle { animation: fadeInUp 0.4s ease 0.1s both; }

/* Hero entrance */
.home-hero { animation: fadeInUp 0.5s ease both; }
.home-hero .hero-badge { animation: fadeInUp 0.4s ease 0.1s both; }
.home-hero h1 { animation: fadeInUp 0.5s ease 0.2s both; }
.home-hero .tagline { animation: fadeInUp 0.5s ease 0.3s both; }
.home-hero .hero-stats { animation: fadeInUp 0.5s ease 0.5s both; }

/* Landing section scroll animation (enhanced by IntersectionObserver below) */
.landing-section { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.landing-section.visible { opacity: 1; transform: translateY(0); }

/* Staggered card animations */
.problem-card, .cap-card, .step, .adopt-card, .try-card, .ba-col, .eco-card, .bench-known-gaps, .bench-chain-section { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.landing-section.visible .problem-card,
.landing-section.visible .cap-card,
.landing-section.visible .step,
.landing-section.visible .adopt-card,
.landing-section.visible .try-card,
.landing-section.visible .ba-col,
.landing-section.visible .eco-card,
.landing-section.visible .bench-known-gaps,
.landing-section.visible .bench-chain-section { opacity: 1; transform: translateY(0); }
.landing-section.visible .problem-card:nth-child(1),
.landing-section.visible .cap-card:nth-child(1),
.landing-section.visible .step:nth-child(1) { transition-delay: 0.1s; }
.landing-section.visible .problem-card:nth-child(2),
.landing-section.visible .cap-card:nth-child(2),
.landing-section.visible .step:nth-child(2) { transition-delay: 0.2s; }
.landing-section.visible .problem-card:nth-child(3),
.landing-section.visible .cap-card:nth-child(3),
.landing-section.visible .step:nth-child(3) { transition-delay: 0.3s; }
.landing-section.visible .problem-card:nth-child(4),
.landing-section.visible .cap-card:nth-child(4),
.landing-section.visible .step:nth-child(4) { transition-delay: 0.4s; }
.landing-section.visible .cap-card:nth-child(5) { transition-delay: 0.5s; }
.landing-section.visible .cap-card:nth-child(6) { transition-delay: 0.6s; }
.landing-section.visible .cap-card:nth-child(7) { transition-delay: 0.7s; }
.landing-section.visible .cap-card:nth-child(8) { transition-delay: 0.8s; }
/* Eco card stagger */
.landing-section.visible .eco-card:nth-child(1) { transition-delay: 0.05s; }
.landing-section.visible .eco-card:nth-child(2) { transition-delay: 0.1s; }
.landing-section.visible .eco-card:nth-child(3) { transition-delay: 0.15s; }
.landing-section.visible .eco-card:nth-child(4) { transition-delay: 0.2s; }
.landing-section.visible .eco-card:nth-child(5) { transition-delay: 0.25s; }
.landing-section.visible .eco-card:nth-child(6) { transition-delay: 0.3s; }
.landing-section.visible .eco-card:nth-child(7) { transition-delay: 0.35s; }
.landing-section.visible .eco-card:nth-child(8) { transition-delay: 0.4s; }
.landing-section.visible .eco-card:nth-child(9) { transition-delay: 0.45s; }
/* Adopt card stagger */
.landing-section.visible .adopt-card:nth-child(1) { transition-delay: 0.05s; }
.landing-section.visible .adopt-card:nth-child(2) { transition-delay: 0.12s; }
.landing-section.visible .adopt-card:nth-child(3) { transition-delay: 0.19s; }
.landing-section.visible .adopt-card:nth-child(4) { transition-delay: 0.26s; }
/* Try card stagger */
.landing-section.visible .try-card:nth-child(1) { transition-delay: 0.05s; }
.landing-section.visible .try-card:nth-child(2) { transition-delay: 0.12s; }
.landing-section.visible .try-card:nth-child(3) { transition-delay: 0.19s; }
.landing-section.visible .try-card:nth-child(4) { transition-delay: 0.26s; }

/* ═══════════════════════════════════════════════════════
   BENCHMARK SECTION
═══════════════════════════════════════════════════════ */
.bench-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}
.bench-bars {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.bench-bar {
  display: grid;
  grid-template-columns: 180px 1fr 56px;
  align-items: center;
  gap: 16px;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.landing-section.visible .bench-bar { opacity: 1; transform: translateX(0); }
.landing-section.visible .bench-bar:nth-child(1) { transition-delay: 0.1s; }
.landing-section.visible .bench-bar:nth-child(2) { transition-delay: 0.2s; }
.landing-section.visible .bench-bar:nth-child(3) { transition-delay: 0.3s; }
.landing-section.visible .bench-bar:nth-child(4) { transition-delay: 0.4s; }
.landing-section.visible .bench-bar:nth-child(5) { transition-delay: 0.5s; }
.bench-bar-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}
.bench-bar-track {
  height: 10px;
  background: var(--surface2);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}
.bench-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--red), var(--orange));
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}
/* Glow effect on bar fill */
.bench-bar-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  width: 8px;
  height: 16px;
  background: var(--orange);
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease 1.2s;
}
.landing-section.visible .bench-bar-fill {
  width: var(--target-width);
}
.landing-section.visible .bench-bar-fill::after {
  opacity: 0.6;
}
.bench-bar-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--orange);
  text-align: right;
}

/* Score card */
.bench-score-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s;
}
.landing-section.visible .bench-score-card { opacity: 1; transform: translateY(0); }
.bench-score-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--orange));
}
.bench-score-number {
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}
.bench-score-label {
  font-size: 14px;
  color: var(--text2);
  margin-top: 4px;
  font-weight: 500;
}
.bench-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.bench-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bench-stat-num {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.bench-stat-label {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bench-run {
  margin-top: 24px;
  padding: 10px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--orange);
  border: 1px solid var(--border);
}
.bench-methodology {
  margin-top: 32px;
  font-size: 12.5px;
  color: var(--text3);
  line-height: 1.7;
  text-align: center;
}
.bench-methodology a {
  color: var(--text2);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.bench-methodology a:hover { color: var(--orange); }

/* ─── Benchmark Tabs ────────────────────────────── */
.bench-tabs {
  display: flex; gap: 4px; margin-bottom: 36px;
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 4px; border: 1px solid var(--border);
  width: fit-content; margin-left: auto; margin-right: auto;
}
.bench-tab {
  padding: 10px 24px; border-radius: var(--radius-xs);
  font-size: 13px; font-weight: 600; color: var(--text3);
  background: transparent; border: none; cursor: pointer;
  transition: all 0.25s;
  font-family: var(--font-sans);
}
.bench-tab:hover { color: var(--text2); }
.bench-tab.active {
  background: var(--surface2); color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.bench-tier { display: none; }
.bench-tier.active { display: block; }

/* ─── Known Gaps (Tier A) ───────────────────────── */
.bench-known-gaps {
  margin-top: 36px; padding: 20px 24px;
  background: var(--bg); border-radius: var(--radius);
  border: 1px solid var(--border);
}
.bench-gap-title {
  font-size: 12px; font-weight: 700; color: var(--amber);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.bench-gap-items { display: flex; flex-direction: column; gap: 10px; }
.bench-gap-item {
  font-size: 13px; color: var(--text2); line-height: 1.6;
  padding-left: 12px; border-left: 2px solid var(--border2);
}
.bench-gap-item code {
  background: var(--surface2); padding: 1px 5px; border-radius: 3px;
  font-size: 12px; color: var(--orange);
}
.bench-gap-tag {
  display: inline-block; font-size: 11px; font-weight: 600;
  color: var(--amber); background: rgba(251,191,36,0.08);
  padding: 1px 8px; border-radius: 3px; margin-right: 6px;
  font-family: var(--font-mono);
}

/* ─── Tier B — Comparison Table ─────────────────── */
.bench-b-header { margin-bottom: 8px; }
.bench-b-label-row {
  display: grid;
  grid-template-columns: 1fr 80px 80px 60px;
  gap: 12px; align-items: center;
  padding: 0 0 12px; border-bottom: 1px solid var(--border);
}
.bench-b-col-label {
  font-size: 11px; font-weight: 600; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.04em;
  text-align: center;
}
.bench-b-col-eff { color: var(--orange); }

.bench-b-section-title {
  display: flex; align-items: center; gap: 10px;
  margin: 24px 0 12px; font-size: 12px; color: var(--text3);
}
.bench-b-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 3px; text-transform: uppercase; letter-spacing: 0.04em;
}
.bench-b-comparable { background: rgba(96,165,250,0.12); color: var(--blue); }
.bench-b-differential { background: rgba(242,122,58,0.12); color: var(--orange); }

.bench-b-row {
  display: grid;
  grid-template-columns: 1fr 80px 80px 60px;
  gap: 12px; align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(42,42,42,0.5);
  opacity: 0; transform: translateX(-8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  transition-delay: var(--row-delay, 0s);
}
.landing-section.visible .bench-b-row { opacity: 1; transform: translateX(0); }

.bench-b-dim { display: flex; gap: 12px; align-items: center; }
.bench-b-dim-id {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  color: var(--text3); width: 28px; flex-shrink: 0;
}
.bench-b-dim-name { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.3; }
.bench-b-dim-ref { font-size: 11px; color: var(--text3); margin-top: 2px; }

.bench-b-val {
  font-family: var(--font-mono); font-size: 15px; font-weight: 600;
  text-align: center;
}
.bench-b-val-base { color: var(--text3); }
.bench-b-val-eff { color: var(--text); }
.bench-b-val-regress { color: var(--amber); }

.bench-b-delta {
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  text-align: center; border-radius: 4px; padding: 2px 6px;
}
.bench-b-delta-pos { color: var(--green); background: rgba(74,222,128,0.08); }
.bench-b-delta-neg { color: var(--amber); background: rgba(251,191,36,0.08); }

/* Tier B summary cards */
.bench-b-summary {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-top: 32px;
}
.bench-b-summary-item {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 20px 16px;
  text-align: center;
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.landing-section.visible .bench-b-summary-item { opacity: 1; transform: translateY(0); }
.landing-section.visible .bench-b-summary-item:nth-child(1) { transition-delay: 0.5s; }
.landing-section.visible .bench-b-summary-item:nth-child(2) { transition-delay: 0.6s; }
.landing-section.visible .bench-b-summary-item:nth-child(3) { transition-delay: 0.7s; }
.landing-section.visible .bench-b-summary-item:nth-child(4) { transition-delay: 0.8s; }
.bench-b-summary-num {
  font-size: 32px; font-weight: 800; letter-spacing: -0.03em;
  line-height: 1;
}
.bench-b-summary-label {
  font-size: 11px; color: var(--text3); margin-top: 6px;
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* Regression callout */
.bench-b-regression {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 24px; padding: 16px 20px;
  background: rgba(251,191,36,0.04);
  border: 1px solid rgba(251,191,36,0.15);
  border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text2); line-height: 1.6;
}
.bench-b-regression-icon { font-size: 18px; flex-shrink: 0; }
.bench-b-regression strong { color: var(--amber); }
.bench-b-regression em { color: var(--text3); font-style: italic; }

/* Composition chain mini-viz */
.bench-chain-section { margin-top: 32px; }
.bench-chain-title {
  font-size: 12px; font-weight: 700; color: var(--text2);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.bench-chains {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.bench-chain {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 12px;
  padding: 8px 12px; border-radius: var(--radius-xs);
  background: var(--bg); border: 1px solid var(--border);
}
.bench-chain-icon { font-weight: 700; flex-shrink: 0; }
.bench-chain-ok .bench-chain-icon { color: var(--green); }
.bench-chain-fail .bench-chain-icon { color: var(--red); }
.bench-chain-arrow { color: var(--text3); margin: 0 2px; }
.bench-chain-type {
  margin-left: auto; font-size: 10px; color: var(--text3);
  background: var(--surface2); padding: 1px 6px; border-radius: 3px;
}
.bench-chain-note {
  font-size: 11px; color: var(--text3); margin-top: 10px;
  font-style: italic;
}

/* ─── Steps vertical timeline glow ───────────────── */
.steps-line {
  position: absolute;
  left: 18px;
  top: 40px;
  bottom: 40px;
  width: 2px;
  background: linear-gradient(180deg, var(--red), var(--orange), transparent);
  opacity: 0.15;
  z-index: 0;
}
.step-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  margin-right: 10px;
  vertical-align: middle;
  box-shadow: 0 0 8px var(--red-glow), 0 0 16px rgba(224,62,62,0.1);
  animation: dotPulse 3s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 8px var(--red-glow), 0 0 16px rgba(224,62,62,0.1); }
  50% { box-shadow: 0 0 12px var(--red-glow), 0 0 24px rgba(224,62,62,0.2); }
}

/* ─── Step code block hover glow ─────────────────── */
.step-code {
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.step-code:hover {
  box-shadow: 0 4px 24px rgba(224,62,62,0.08), 0 0 0 1px rgba(224,62,62,0.12);
  border-color: rgba(224,62,62,0.2);
}

/* ─── Adopt card gradient top border on hover ──── */
.adopt-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.adopt-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--orange));
  transform: scaleX(0);
  transition: transform 0.35s ease;
  transform-origin: left;
}
.adopt-card:hover::before { transform: scaleX(1); }
.adopt-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,0.3); }

/* ─── Try card arrow reveal on hover ─────────── */
.try-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.try-card::after {
  content: '→';
  position: absolute;
  right: 24px;
  bottom: 24px;
  top: auto;
  font-size: 18px;
  color: var(--text3);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.try-card:hover::after { opacity: 1; transform: translateX(0); }
.try-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,0.3); }

/* ─── Eco card hover ───────────────────────────── */
.eco-card {
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.eco-card:hover {
  transform: translateY(-2px);
  border-color: var(--border2);
}

/* ─── CTA gradient separator ─────────────────── */
.cta-section {
  position: relative;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), var(--orange), transparent);
}

/* Responsive for benchmark */
@media (max-width: 1024px) {
  .bench-grid { grid-template-columns: 1fr; gap: 32px; }
  .bench-score-card { max-width: 400px; margin: 0 auto; }
  .bench-b-summary { grid-template-columns: repeat(2, 1fr); }
  .bench-chains { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .bench-bar { grid-template-columns: 120px 1fr 48px; gap: 10px; }
  .bench-bar-label { font-size: 12px; }
  .bench-score-number { font-size: 56px; }
  .steps-line { display: none; }
  .bench-tabs { flex-direction: column; width: 100%; }
  .bench-b-label-row { display: none; }
  .bench-b-row {
    grid-template-columns: 1fr;
    gap: 8px; padding: 16px 0;
  }
  .bench-b-val, .bench-b-delta { text-align: left; }
  .bench-b-summary { grid-template-columns: repeat(2, 1fr); }
  .bench-b-summary-num { font-size: 24px; }
  .bench-chains { grid-template-columns: 1fr; }
  .bench-chain { font-size: 11px; flex-wrap: wrap; }
}

/* Sidebar toggle for mobile */
.sidebar-toggle {
  display: none; background: none; border: none; color: var(--text);
  font-size: 20px; cursor: pointer; padding: 4px 8px;
}
@media (max-width: 768px) {
  .sidebar-toggle { display: block; }
  .sidebar.open { display: block; z-index: 150; width: 100%; }
}

/* ═══════════════════════════════════════════════════════
   Meme cursor + click "pop" animation
═══════════════════════════════════════════════════════ */
@keyframes effectorClickPop {
  0% {
    transform: scale(1);
    filter: none;
    box-shadow: 0 0 0 rgba(0,0,0,0);
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  28% {
    transform: scale(1.18);
    filter: drop-shadow(0 0 12px rgba(242,122,58,0.45));
    box-shadow: 0 0 0 1px rgba(242,122,58,0.28), 0 8px 26px rgba(0,0,0,0.22);
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  58% {
    transform: scale(0.985);
    filter: drop-shadow(0 0 9px rgba(224,62,62,0.28));
    box-shadow: 0 0 0 1px rgba(224,62,62,0.16), 0 5px 14px rgba(0,0,0,0.18);
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  74% {
    transform: scale(1.035);
    filter: drop-shadow(0 0 10px rgba(224,62,62,0.22));
    box-shadow: 0 0 0 1px rgba(224,62,62,0.12), 0 7px 18px rgba(0,0,0,0.16);
    animation-timing-function: cubic-bezier(0.1, 0.9, 0.2, 1);
  }
  100% {
    transform: scale(1);
    filter: none;
    box-shadow: 0 0 0 rgba(0,0,0,0);
  }
}

.effector-click-pop {
  animation: effectorClickPop 860ms both;
  transform-origin: center;
  will-change: transform, filter, box-shadow;
}

/* Force the meme cursor on interactive elements.
   Some elements define their own cursor styles on :active/:focus; !important avoids
   the "default arrow cursor" fallback during clicking. */
:root {
  --effector-meme-cursor: url("/assets/deal-with-it-pointer-48.png") 15 0, auto;
}
a, button, input[type="button"], input[type="submit"], input[type="reset"], select, textarea,
[role="button"], [onclick], label {
  cursor: var(--effector-meme-cursor) !important;
}
a:active, button:active, [role="button"]:active, [onclick]:active, label:active {
  cursor: var(--effector-meme-cursor) !important;
}
