:root {
  --bg:            #0a0a0f;
  --bg-raised:     #111116;
  --bg-surface:    #17171d;
  --bg-card:       #1c1c23;
  --brand:         #c4bba8;
  --brand-soft:    rgba(196,187,168,0.10);
  --brand-line:    rgba(196,187,168,0.22);

  --border:        rgba(255,255,255,0.06);
  --border-subtle: rgba(255,255,255,0.04);

  --text:          #e4e4e8;
  --text-secondary:#9a9aa2;
  --text-muted:    #5c5c66;

  --ask:     #64B5F6;
  --plan:    #c8954a;
  --code:    #5236CC;
  --review:  #4DB6AC;

  --ask-bg:     rgba(100,181,246,0.06);
  --plan-bg:    rgba(200,149,74,0.06);
  --code-bg:    rgba(82,54,204,0.06);
  --review-bg:  rgba(77,182,172,0.06);

  --font:      'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'DM Mono', 'SF Mono', Consolas, monospace;
  --font-jp:   'Noto Serif JP', serif;

  --max-w: 960px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* grain */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  z-index: 9999;
}

::selection { background: rgba(82,54,204,0.25); }

a { color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--text); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── SCROLL REVEAL ── */
.r {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.55s cubic-bezier(0.16,1,0.3,1), transform 0.55s cubic-bezier(0.16,1,0.3,1);
}
.r.v { opacity: 1; transform: none; }
.r-d1 { transition-delay: 0.08s; }
.r-d2 { transition-delay: 0.16s; }
.r-d3 { transition-delay: 0.24s; }
.r-d4 { transition-delay: 0.32s; }
.r-d5 { transition-delay: 0.40s; }
.r-d6 { transition-delay: 0.48s; }
.r-d7 { transition-delay: 0.56s; }

/* ── HERO ENTRANCE ── */
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-banner  { animation: hero-rise 0.9s cubic-bezier(0.16,1,0.3,1) 0.05s both; }
.hero-title   { animation: hero-rise 0.9s cubic-bezier(0.16,1,0.3,1) 0.18s both; }
.hero-sub     { animation: hero-rise 0.9s cubic-bezier(0.16,1,0.3,1) 0.30s both; }
.hero-actions { animation: hero-rise 0.9s cubic-bezier(0.16,1,0.3,1) 0.46s both; }
.hero-meta span {
  animation: hero-rise 0.7s cubic-bezier(0.16,1,0.3,1) both;
}
.hero-meta span:nth-child(1) { animation-delay: 0.66s; }
.hero-meta span:nth-child(2) { animation-delay: 0.78s; }
.hero-meta span:nth-child(3) { animation-delay: 0.90s; }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0;
  transition: background 0.3s, backdrop-filter 0.3s;
}
nav.scrolled {
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 8px; }
.nav-logo svg { width: 26px; height: 26px; }
.nav-logo span { font-weight: 500; font-size: 0.95rem; color: var(--brand); letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { font-size: 0.8rem; color: var(--text-muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--text-secondary); }
.nav-gh {
  font-size: 0.75rem; padding: 6px 14px;
  border: 1px solid var(--border); border-radius: 6px;
  color: var(--text-secondary); transition: all 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.nav-gh svg { width: 13px; height: 13px; flex-shrink: 0; opacity: 0.7; }
.nav-gh:hover { border-color: rgba(255,255,255,0.12); color: var(--text); }
.nav-hamburger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; padding: 6px;
  background: none; border: 1px solid var(--border); border-radius: 6px;
  cursor: pointer;
}
.nav-hamburger span {
  display: block; width: 100%; height: 1.5px;
  background: var(--text-muted); border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
  transform-origin: center;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
  html { scroll-behavior: auto; }
  body::after { display: none; }
  .container { padding: 0 12px; }
  .r,
  .problem-item {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
  .demo-chat { padding: 16px 16px 14px; }
  .demo-chat-stage { min-height: 430px; }
  .demo-composer { margin: 0 8px 8px; }
  .demo-composer-inner { padding: 10px 10px 8px; }
  .demo-composer-bar { gap: 4px; }
  .demo-composer-left { gap: 4px; }
  .demo-model-chip { padding: 0; margin-left: -4px; }
  .demo-sep { display: none; }
  .demo-lock { display: none; }
  .demo-window,
  .demo-thread-hdr,
  .demo-chat,
  .demo-chat-stage,
  .demo-composer,
  .demo-composer-inner,
  .demo-composer-bar,
  .demo-composer-left,
  .demo-composer-right,
  .mode-pill,
  .msg-user,
  .msg-ai,
  .msg-diff-item,
  .msg-diff-item .path,
  .msg-diff-item .desc,
  .msg-finding {
    min-width: 0;
  }
  .demo-composer-left {
    flex: 1;
    overflow: hidden;
  }
  .demo-thread-title,
  .msg-diff-item .path,
  .msg-diff-item .desc,
  .msg-finding span {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .msg-diff-item {
    flex-wrap: wrap;
  }
  #demo .demo-composer-right {
    display: none;
  }
  #enhance .mode-pill {
    display: none;
  }
  #demo .mode-pill-btn {
    padding: 2px 10px;
    font-size: 0.72rem;
  }
  .nav-hamburger { display: flex; }
  .nav-links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-raised); border-bottom: 1px solid var(--border);
    padding: 0; overflow: hidden;
    max-height: 0; transition: max-height 0.3s ease, padding 0.3s ease;
  }
  .nav-links.open {
    max-height: 400px; padding: 8px 0;
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block; padding: 12px 24px;
    font-size: 0.9rem; width: 100%;
  }
  .nav-links li:last-child { padding: 8px 16px; }
  a.nav-gh {
    display: inline-flex; align-items: center; gap: 6px; width: auto; margin: 0;
  }
}

/* ── SECTION PRIMITIVES ── */
section { padding: 120px 0; }
.sec-border { border-top: 1px solid var(--border-subtle); }
.label {
  font-family: var(--font-mono);
  font-size: 0.65rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--brand);
  margin-bottom: 12px;
}
.title {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 500; letter-spacing: -0.02em;
  line-height: 1.25; color: var(--text);
  margin-bottom: 16px;
}
.subtitle {
  font-size: 0.95rem; color: var(--text-secondary);
  max-width: 540px; line-height: 1.65;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
}

.hero-banner {
  width: min(700px, 92vw);
  height: auto;
  margin-bottom: 28px;
  display: block;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
  max-width: 920px;
  margin-bottom: 18px;
  text-wrap: balance;
}

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

.hero-title-codex {
  color: #ffffff;
}

.hero-title-claude {
  color: #d97757;
}

.hero-sub {
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: var(--text-secondary);
  max-width: 700px;
  line-height: 1.7;
  margin-bottom: 40px;
  text-wrap: balance;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font); font-size: 0.82rem; font-weight: 500;
  padding: 10px 22px; border-radius: 8px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-secondary); cursor: pointer;
  transition: all 0.25s; text-decoration: none;
}
.btn:hover { border-color: rgba(255,255,255,0.12); color: var(--text); transform: translateY(-1px); }
.btn svg { width: 14px; height: 14px; }

.btn-primary {
  background: var(--code); border-color: var(--code);
  color: #fff;
}
.btn-primary:hover {
  background: #6248dd; border-color: #6248dd; color: #fff;
  box-shadow: 0 4px 24px rgba(82,54,204,0.2);
}

.hero-meta {
  margin-top: 48px;
  display: flex; gap: 24px; flex-wrap: wrap; justify-content: center;
}
.hero-meta span {
  font-size: 0.7rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}
.hero-meta .dot {
  width: 5px; height: 5px; border-radius: 50%;
}

/* ── PROBLEM ── */
.problem-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; margin-top: 40px;
}
@media (max-width: 640px) { .problem-grid { grid-template-columns: 1fr; gap: 32px; } }
.problem-col h3 {
  font-size: 0.7rem; font-family: var(--font-mono);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 16px;
}
.problem-col:last-child h3 { color: var(--text-secondary); }
.problem-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.problem-item.problem-in { opacity: 1; transform: none; }
.problem-item:last-child { border-bottom: none; }
.problem-col:last-child .problem-item { color: var(--text-secondary); }

/* ── DEMO (Desktop App Mock) ── */
.demo-window {
  margin-top: 40px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 8px 40px rgba(0,0,0,0.35);
}
/* Custom titlebar (mirrors DesktopTitleBar.tsx) */
.demo-titlebar {
  display: flex; align-items: center;
  height: 36px;
  padding: 0 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.demo-titlebar-left {
  display: flex; align-items: center; gap: 8px;
}
.demo-tb-logo {
  width: 20px; height: 20px; flex-shrink: 0;
}
.demo-tb-name {
  font-size: 0.72rem; font-weight: 600; color: var(--text);
  letter-spacing: -0.01em;
}
.demo-tb-stage {
  font-size: 0.5rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  padding: 1px 6px; border-radius: 9999px;
}
.demo-tb-controls {
  margin-left: auto;
  display: flex; align-items: center;
}
.demo-tb-ctrl {
  width: 32px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); background: none; border: none; cursor: default;
}
.demo-tb-ctrl svg { width: 10px; height: 10px; }
/* Thread header (mirrors ChatHeader.tsx) */
.demo-thread-hdr {
  display: flex; align-items: center; gap: 8px;
  height: 52px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.demo-thread-title {
  font-size: 0.82rem; font-weight: 500; color: var(--text);
}
.demo-thread-badge {
  font-size: 0.68rem; color: var(--text-muted);
  padding: 2px 10px; border-radius: 6px;
  border: 1px solid var(--border);
}

/* Chat messages area */
.demo-chat {
  padding: 20px 24px 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.demo-chat-stage {
  position: relative;
  min-height: 360px;
  overflow: hidden;
}
.dp {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  transform: translateX(36px) scale(0.985);
  transform-origin: center;
  pointer-events: none;
  will-change: opacity, transform;
  transition: opacity 0.8s ease, transform 1.2s cubic-bezier(0.16,1,0.3,1);
}
.dp.active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
  z-index: 2;
}
.dp.was-active {
  opacity: 0;
  transform: translateX(-36px) scale(0.985);
  z-index: 1;
}

.msg-user {
  align-self: flex-end;
  max-width: 85%;
  padding: 10px 16px;
  border-radius: 18px 18px 4px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.86rem; color: var(--text); line-height: 1.55;
}
.msg-ai {
  align-self: flex-start;
  max-width: 92%;
  font-size: 0.86rem; color: var(--text-secondary); line-height: 1.65;
}
.msg-ai p { margin-bottom: 10px; }
.msg-ai p:last-child { margin-bottom: 0; }
.dim { color: var(--text-muted); }
.hi { color: var(--plan); }
.fr { color: var(--code); }
.ok { color: var(--review); }
.warn { color: var(--ask); }
.il { /* inline code */
  font-family: var(--font-mono); font-size: 0.78rem;
  padding: 1px 6px; border-radius: 5px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border-subtle);
  color: var(--text);
}
.msg-plan-card {
  padding: 12px 16px; border-radius: 10px;
  border: 1px solid rgba(200,149,74,0.2); background: rgba(200,149,74,0.04);
  margin: 4px 0;
}
.msg-plan-card .plan-title {
  font-size: 0.75rem; font-weight: 500; color: var(--plan); margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.msg-plan-card ol {
  padding-left: 18px; margin: 0; font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6;
}
.msg-diff-list { margin: 4px 0; }
.msg-diff-item {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0; font-size: 0.82rem;
}
.msg-diff-item .badge {
  font-family: var(--font-mono); font-size: 0.62rem;
  padding: 1px 6px; border-radius: 3px; font-weight: 500;
}
.badge-mod { background: rgba(82,54,204,0.12); color: var(--code); }
.badge-add { background: rgba(77,182,172,0.12); color: var(--review); }
.msg-diff-item .path { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }
.msg-diff-item .desc { font-size: 0.78rem; color: var(--text-muted); }
.msg-finding {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 3px 0; font-size: 0.84rem;
}
.msg-finding .icon { font-size: 0.82rem; flex-shrink: 0; margin-top: 1px; }
.msg-stat {
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted);
  margin-top: 4px;
}

/* Composer footer */
.demo-composer {
  margin: 0 16px 16px;
  border-radius: 22px;
  padding: 1px;
  transition: background 0.3s;
}
.demo-composer-inner {
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid transparent;
  padding: 14px 16px 10px;
}
.demo-composer-input {
  font-size: 0.86rem; color: var(--text-muted);
  min-height: 20px; margin-bottom: 10px;
}
.demo-composer-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.demo-composer-left {
  display: flex; align-items: center; gap: 6px;
}
.demo-model-chip {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.72rem; color: var(--text-muted);
  padding: 3px 10px; border-radius: 6px;
  background: none; border: none; cursor: default;
}
.demo-model-chip svg { width: 14px; height: 14px; opacity: 0.6; }

/* ── Asset icons ── */
.asset-icon {
  display: inline-block; vertical-align: middle;
  width: 1em; height: 1em; flex-shrink: 0;
  filter: brightness(0) invert(1); opacity: 0.7;
}
.nav-gh .asset-icon { width: 15px; height: 15px; margin-right: 2px; }
.btn .asset-icon    { width: 14px; height: 14px; margin-right: 2px; opacity: 0.85; }
.demo-model-chip .asset-icon { width: 14px; height: 14px; opacity: 0.6; }
.arch-provider-icon { width: 13px; height: 13px; margin-right: 3px; opacity: 0.55; }
/* Claude uses its brand color — don't invert */
.arch-box.arch-claude .arch-provider-icon { filter: none; opacity: 0.9; }
.demo-sep {
  width: 1px; height: 14px; background: var(--border);
}

/* The real mode pill */
.mode-pill {
  display: flex; align-items: center; gap: 2px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.05);
  padding: 3px 4px;
}
.mode-pill-btn {
  border: none; background: transparent;
  border-radius: 9999px;
  padding: 2px 12px;
  font-family: var(--font); font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  line-height: 1.5;
}

.demo-sep2 { width: 1px; height: 14px; background: var(--border); }
.demo-lock {
  font-size: 0.72rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
  background: none; border: none; cursor: default;
}
.demo-lock svg { width: 12px; height: 12px; }

.demo-send-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.demo-send-btn:hover { transform: scale(1.08); }
.demo-send-btn svg { width: 14px; height: 14px; color: #fff; }

.demo-enhance-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; cursor: default;
  display: flex; align-items: center; justify-content: center;
  background: #D4AF37; color: #1a1a1a;
}
.demo-enhance-btn svg { width: 18px; height: 18px; }
.demo-composer-right {
  display: flex; align-items: center; gap: 6px;
}

/* ── LIST SECTIONS (card-free) ── */
.list-section {
  margin-top: 40px;
}
.list-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.list-item:last-child { border-bottom: none; }
.list-item h3 {
  font-size: 0.92rem; font-weight: 500;
  margin-bottom: 6px; color: var(--text);
}
.list-item p {
  font-size: 0.86rem; color: var(--text-secondary);
  line-height: 1.6; max-width: 640px;
}

/* ── SLASH COMMANDS DEMO ── */
.slash-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 40px;
}
@media (max-width: 640px) {
  .slash-layout { grid-template-columns: 1fr; gap: 32px; }
}
.slash-copy { max-width: 360px; }
.slash-copy .title { font-size: 2rem; }
.slash-demo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.slash-composer-outer { margin: 0; }
.slash-composer-input {
  display: flex; align-items: center; gap: 1px;
}
.slash-trigger { color: #D4AF37; font-weight: 600; }
.slash-query   { color: var(--text); }

.slash-palette {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.slash-palette-hdr {
  font-family: var(--font-mono); font-size: 0.58rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); padding: 10px 14px 6px;
}
.slash-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-radius: 6px; margin: 2px 4px;
  transition: background 0.12s;
}
.slash-item.active { background: rgba(255,255,255,0.06); }
.slash-icon {
  display: flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; flex-shrink: 0;
  color: var(--text-muted); opacity: 0.8;
}
.slash-icon svg { width: 16px; height: 16px; }
.slash-item.active .slash-icon { opacity: 1; }
.slash-cmd {
  font-family: var(--font-mono); font-size: 0.76rem;
  color: var(--text-muted); white-space: nowrap; min-width: 72px;
}
.slash-item.active .slash-cmd { color: var(--text-secondary); }
.slash-desc {
  font-size: 0.76rem; color: var(--text-muted); line-height: 1.4;
  opacity: 0.7;
}
.slash-item.active .slash-desc { opacity: 1; color: var(--text-secondary); }

/* ── ENHANCE DEMO ── */
#enhance .title,
#enhance .label,
#enhance .subtitle {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.enh-demo {
  margin-top: 40px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
.enh-tabs { justify-content: center; }
.enh-tabs {
  display: flex; gap: 4px; margin-bottom: 28px;
}
.enh-tab {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.06em;
  padding: 5px 16px; border-radius: 6px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); cursor: pointer;
  transition: all 0.2s;
}
.enh-tab:hover { color: var(--text-secondary); border-color: rgba(255,255,255,0.1); }
.enh-tab.active {
  background: rgba(212,175,55,0.1); border-color: rgba(212,175,55,0.25);
  color: #D4AF37;
}

/* Input field */
.enh-composer-wrap { margin-bottom: 16px; }
.enh-composer { margin: 0; }

.enh-slide-viewport {
  overflow: hidden;
  min-height: 22px;
  margin-bottom: 10px;
  position: relative;
  transition: height 0.4s cubic-bezier(0.4,0,0.2,1);
}
.enh-slide {
  transition: transform 0.45s cubic-bezier(0.4,0,0.2,1), opacity 0.45s ease;
}
.enh-slide.exit-left  { transform: translateX(-32px); opacity: 0; pointer-events: none; }
.enh-slide.enter-right { transform: translateX(32px);  opacity: 0; }
.enh-slide.enter-right.active { transform: translateX(0); opacity: 1; }

.enh-typed-text {
  font-size: 0.86rem; color: var(--text-muted); min-height: 20px;
}
.enh-cursor {
  display: inline-block; width: 2px; height: 1em;
  background: var(--text-muted);
  margin-left: 1px; vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.enh-enhance-anim svg {
  width: 18px; height: 18px;
  transform-box: fill-box;
  transform-origin: center;
}
.enh-enhance-anim.pulsing svg {
  animation: spin-orb 1s linear infinite;
}
@keyframes spin-orb {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.enh-gen-cursor {
  display: inline-block; width: 2px; height: 1em;
  background: #D4AF37; opacity: 0.8;
  margin-left: 1px; vertical-align: text-bottom;
  animation: blink 0.7s step-end infinite;
}
.wf-steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-top: 40px;
}
@media (max-width: 800px) { .wf-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .wf-steps { grid-template-columns: 1fr; } }
.wf-step {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 20px;
  transition: border-color 0.3s, transform 0.3s;
}
.wf-step:hover { border-color: rgba(255,255,255,0.1); transform: translateY(-2px); }
.wf-step-dot {
  width: 8px; height: 8px; border-radius: 50%;
  margin-bottom: 14px;
}
.wf-step[data-m="ask"]    .wf-step-dot { background: var(--ask); }
.wf-step[data-m="plan"]   .wf-step-dot { background: var(--plan); }
.wf-step[data-m="code"]   .wf-step-dot { background: var(--code); }
.wf-step[data-m="review"] .wf-step-dot { background: var(--review); }
.wf-step .wf-label {
  font-family: var(--font-mono); font-size: 0.62rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 4px;
}
.wf-step[data-m="ask"]    .wf-label { color: var(--ask); }
.wf-step[data-m="plan"]   .wf-label { color: var(--plan); }
.wf-step[data-m="code"]   .wf-label { color: var(--code); }
.wf-step[data-m="review"] .wf-label { color: var(--review); }
.wf-step h3 { font-size: 1rem; font-weight: 500; margin-bottom: 8px; }
.wf-step p { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.55; }
.wf-step .eg {
  margin-top: 12px; font-family: var(--font-mono);
  font-size: 0.7rem; color: var(--text-muted);
  font-style: italic; padding: 8px 12px;
  background: rgba(0,0,0,0.2); border-radius: 6px;
}

/* flow line */
.wf-flow {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; margin-top: 24px;
}
.wf-flow-d {
  width: 7px; height: 7px; border-radius: 50%;
  border: 1.5px solid var(--text-muted);
}
.wf-flow-d:nth-child(1) { border-color: var(--ask);    background: var(--ask-bg); }
.wf-flow-d:nth-child(3) { border-color: var(--plan);   background: var(--plan-bg); }
.wf-flow-d:nth-child(5) { border-color: var(--code);   background: var(--code-bg); }
.wf-flow-d:nth-child(7) { border-color: var(--review); background: var(--review-bg); }
.wf-flow-l { width: 48px; height: 1px; background: var(--border); }

/* ── ENHANCE ── */
.enh-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-top: 40px;
}
@media (max-width: 640px) { .enh-grid { grid-template-columns: 1fr; } }
.enh-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 20px;
}
.enh-card h3 {
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-secondary); margin-bottom: 8px;
}
.enh-card p { font-size: 0.84rem; color: var(--text-muted); line-height: 1.55; }
.enh-ex {
  margin-top: 12px; font-family: var(--font-mono); font-size: 0.68rem;
  padding: 8px 12px; background: rgba(0,0,0,0.25); border-radius: 6px;
  color: var(--text-muted); line-height: 1.7;
}
.enh-ex .after { color: var(--text-secondary); }

/* ── FEATURES ── */
.feat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-top: 40px;
}
@media (max-width: 800px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .feat-grid { grid-template-columns: 1fr; } }
.feat-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 20px;
  transition: border-color 0.3s;
}
.feat-card:hover { border-color: rgba(255,255,255,0.1); }
.feat-card h3 { font-size: 0.92rem; font-weight: 500; margin-bottom: 8px; }
.feat-card p { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.55; }

/* ── ARCHITECTURE ── */
.arch {
  display: flex; flex-direction: column;
  align-items: center; gap: 16px; margin-top: 40px;
}
.arch-box {
  padding: 14px 28px; border-radius: 10px;
  border: 1px solid; text-align: center; min-width: 180px;
}
.arch-box h4 {
  font-family: var(--font-mono); font-size: 0.62rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 2px;
}
.arch-box p { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }
.arch-ui    { border-color: rgba(100,181,246,0.2); background: var(--ask-bg); }
.arch-ui h4 { color: var(--ask); }
.arch-core  { border-color: rgba(82,54,204,0.3); background: var(--code-bg); }
.arch-core h4 { color: var(--code); }
.arch-row   { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.arch-codex { border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.03); }
.arch-codex h4 { color: #fff; }
.arch-claude { border-color: rgba(217,119,87,0.25); background: rgba(217,119,87,0.04); }
.arch-claude h4 { color: #D97757; }
.arch-repo  { border-color: rgba(255,255,255,0.06); background: rgba(255,255,255,0.02); }
.arch-repo h4 { color: var(--text-muted); }
.arch-repo p  { color: var(--text-muted); }
.arch-arrow {
  width: 1px; height: 24px;
  background: linear-gradient(180deg, var(--border), rgba(255,255,255,0.02));
  position: relative;
}
@keyframes arch-flow {
  0%   { top: -4px; opacity: 0; }
  12%  { opacity: 0.7; }
  88%  { opacity: 0.5; }
  100% { top: 28px; opacity: 0; }
}
.arch-arrow::after {
  content: '';
  position: absolute;
  left: -1px;
  width: 3px;
  height: 8px;
  border-radius: 3px;
  background: rgba(255,255,255,0.55);
  top: -4px;
  opacity: 0;
}
.arch-arrow.v::after {
  animation: arch-flow 2.4s ease-in-out infinite;
}
/* stagger the three arrows so the pulse chains top→bottom */
.arch > div:nth-child(2).v::after { animation-delay: 0.2s; }
.arch > div:nth-child(4).v::after { animation-delay: 1.0s; }
.arch > div:nth-child(6).v::after { animation-delay: 1.8s; }
.arch-rule {
  font-family: var(--font-mono); font-size: 0.72rem;
  font-style: italic; color: var(--brand);
  margin-top: 16px; text-align: center;
}

/* ── CONFIG ── */
.cfg-window {
  margin-top: 40px; max-width: 600px;
  border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
  background: var(--bg-raised);
}
.cfg-bar {
  padding: 9px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted);
}
.cfg-body {
  padding: 20px;
  font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.85;
  overflow-x: auto;
}
.ck { color: var(--ask); }
.cs { color: var(--review); }
.cc { color: var(--text-muted); font-style: italic; }
.cp { color: var(--text-muted); }

/* ── COMPARE ── */
.cmp-wrap {
  margin-top: 40px; overflow-x: auto;
  border: 1px solid var(--border); border-radius: 12px;
}
.cmp { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.cmp th, .cmp td {
  padding: 10px 14px; text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}
.cmp thead th {
  font-family: var(--font-mono); font-size: 0.62rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--bg-surface); color: var(--text-muted);
}
.cmp thead th:nth-child(2) { color: var(--code); }
.cmp td:first-child {
  text-align: left; color: var(--text-secondary);
  font-family: var(--font-mono); font-size: 0.72rem;
}
.cmp td:nth-child(2) { color: var(--text); }
.cmp td { color: var(--text-muted); }
.cmp tbody tr:last-child td { border-bottom: none; }
.chk { color: var(--review); }

/* ── WHY ── */
.why-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; margin-top: 40px;
}
@media (max-width: 640px) { .why-grid { grid-template-columns: 1fr; } }
.why-col h3 { font-size: 1rem; font-weight: 500; margin-bottom: 14px; }
.why-list { list-style: none; }
.why-list li {
  padding: 6px 0; font-size: 0.88rem; color: var(--text-secondary);
  display: flex; align-items: flex-start; gap: 8px;
}
.why-list li::before {
  content: ''; width: 3px; height: 3px; border-radius: 50%;
  background: var(--text-muted); margin-top: 0.5em; flex-shrink: 0;
}
.wn li::before { background: rgba(255,255,255,0.04); }
.wn li { color: var(--text-muted); }

/* ── ROADMAP ── */
.rm-phases {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-top: 40px;
}
@media (max-width: 640px) { .rm-phases { grid-template-columns: 1fr; } }
.rm-phase {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 24px 20px;
}
.rm-badge {
  font-family: var(--font-mono); font-size: 0.58rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px;
  display: inline-block; margin-bottom: 12px;
}
.rm-badge.done { background: rgba(77,182,172,0.08); color: var(--review); border: 1px solid rgba(77,182,172,0.15); }
.rm-badge.next { background: rgba(82,54,204,0.08); color: var(--code); border: 1px solid rgba(82,54,204,0.15); }
.rm-badge.planned { background: rgba(100,181,246,0.08); color: var(--ask); border: 1px solid rgba(100,181,246,0.15); }
.rm-phase h3 { font-size: 0.95rem; font-weight: 500; margin-bottom: 8px; }
.rm-phase ul { list-style: none; }
.rm-phase li {
  padding: 3px 0; font-size: 0.82rem; color: var(--text-secondary);
  display: flex; align-items: center; gap: 6px;
}
.rm-phase li::before { content: '·'; color: var(--text-muted); font-weight: bold; }

/* ── PHILOSOPHY ── */
.phil {
  text-align: center; padding: 100px 24px;
}
.phil blockquote {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-style: italic; color: var(--brand);
  max-width: 480px; margin: 0 auto 24px;
  line-height: 1.7;
}
.phil .kanji {
  font-family: var(--font-jp);
  font-size: 0.95rem; color: var(--brand);
  letter-spacing: 0.15em;
}

/* ── CTA ── */
.cta {
  text-align: center; padding: 100px 24px;
}
.cta-emblem { width: 96px; height: 96px; margin: 0 auto 36px; opacity: 0.72; }
.cta .title { max-width: 480px; margin: 0 auto 12px; }
.cta .subtitle { margin: 0 auto 32px; }
.cta-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.install-cmd {
  margin-top: 36px;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 20px; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: 8px;
  font-family: var(--font-mono); font-size: 0.8rem;
}
.install-cmd .prompt-char { color: var(--text-muted); }
.install-cmd code { color: var(--text-secondary); }
.install-cmd button {
  background: none; border: 1px solid var(--border); border-radius: 4px;
  padding: 3px 8px; font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--text-muted); cursor: pointer; transition: all 0.2s;
}
.install-cmd button:hover { color: var(--text-secondary); border-color: rgba(255,255,255,0.12); }

/* ── FOOTER ── */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-subtle);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.footer-brand { display: flex; align-items: center; gap: 6px; }
.footer-brand svg { width: 20px; height: 20px; }
.footer-brand span { font-size: 0.82rem; color: var(--brand); }
.footer-links { display: flex; gap: 20px; list-style: none; }
.footer-links a { font-size: 0.72rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--text-secondary); }
.footer-copy {
  width: 100%; text-align: center; margin-top: 16px;
  font-size: 0.62rem; color: var(--text-muted);
}
