/* ============================================================
   Unfork.ai — 归一
   亮色玻璃拟态:浅彩渐变光斑 + 半透明白卡 + 柔和弥散阴影
   ============================================================ */

:root {
  --bg: #F4F6FB;
  --ink: #1B2233;
  --ink-soft: #5B6478;
  --line: rgba(27, 34, 51, 0.08);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.85);
  --violet: #7C6CF6;
  --cyan: #38BDF8;
  --pink: #F472B6;
  --amber: #FBBF24;
  --green: #34D399;
  --font-display: "Sora", "Noto Sans SC", sans-serif;
  --font-body: "Manrope", "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", "Noto Sans SC", monospace;
  --topbar-h: 72px;
  --shadow-sm: 0 2px 12px rgba(27, 34, 51, 0.06);
  --shadow-md: 0 8px 32px rgba(27, 34, 51, 0.08);
  --shadow-lg: 0 20px 60px rgba(27, 34, 51, 0.12);
}

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

html { scroll-behavior: smooth; }

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

/* Soft gradient blob background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 50% 40% at 12% 8%, rgba(124, 108, 246, 0.16), transparent 65%),
    radial-gradient(ellipse 45% 38% at 88% 12%, rgba(56, 189, 248, 0.18), transparent 65%),
    radial-gradient(ellipse 42% 36% at 78% 78%, rgba(244, 114, 182, 0.14), transparent 65%),
    radial-gradient(ellipse 40% 34% at 15% 88%, rgba(52, 211, 153, 0.13), transparent 65%),
    radial-gradient(ellipse 36% 30% at 50% 50%, rgba(251, 191, 36, 0.07), transparent 70%);
  pointer-events: none;
}
body > * { position: relative; z-index: 1; }

::selection { background: var(--violet); color: #fff; }

.mono { font-family: var(--font-mono); }

/* Generic glass surface */
.glass {
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ============ Topbar ============ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: rgba(244, 246, 251, 0.6);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}
.topbar-inner {
  max-width: 1280px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand-word::after {
  content: "";
  display: inline-block;
  width: 0.18em; /* Compensate trailing letter-spacing for visual centering */
}
.brand-cn {
  font-size: 12px;
  font-weight: 700;
  color: var(--violet);
  background: rgba(124, 108, 246, 0.1);
  border: 1px solid rgba(124, 108, 246, 0.25);
  padding: 2px 9px;
  border-radius: 999px;
}

.nav { display: flex; gap: 12px; }
.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 15px;
  border-radius: 999px;
  transition: background .18s, color .18s;
}
.nav a:hover { background: rgba(255, 255, 255, 0.8); color: var(--ink); box-shadow: var(--shadow-sm); }

.topbar-right { display: flex; align-items: center; gap: 12px; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 6px 13px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s, transform .18s;
}
.lang-toggle:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.lang-opt { opacity: .35; transition: opacity .15s; }
.lang-opt.is-on { opacity: 1; color: var(--violet); }
.lang-divider { opacity: .3; }

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.menu-btn span {
  display: block;
  width: 22px; height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s;
}

/* ============ Buttons ============ */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  padding: 14px 30px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-solid {
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  color: #fff;
  box-shadow: 0 8px 24px rgba(124, 108, 246, 0.35);
}
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(124, 108, 246, 0.45); }
.btn-ghost {
  background: var(--glass-strong);
  backdrop-filter: blur(12px);
  color: var(--ink);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-sm { padding: 9px 20px; font-size: 13px; }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--topbar-h) + 8px) 28px 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(27, 34, 51, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 34, 51, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 90% 80% at 60% 40%, #000 25%, transparent 75%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
  flex: 1;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--violet);
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 7px 18px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}
.kicker-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25); }
  50% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 5.4vw, 72px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  white-space: nowrap;
}
body[data-lang="en"] .hero-title {
  white-space: normal;
  font-size: clamp(28px, 4.4vw, 58px);
}
body[data-lang="en"] .hero-title .line.accent { display: inline; }
body[data-lang="en"] .hero-title .line.accent::before { content: "\A"; white-space: pre; }
.hero-title .line { display: inline; }
.hero-title .accent { white-space: nowrap; }
@media (max-width: 900px) {
  .hero-title { white-space: normal; }
}
.hero-title .accent {
  background: linear-gradient(120deg, var(--violet), var(--cyan) 60%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  width: fit-content;
}

.hero-sub {
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 500;
  color: var(--ink-soft);
  max-width: 540px;
  margin-bottom: 36px;
}

/* Hero one-line try input */
.hero-try {
  display: flex;
  align-items: center;
  max-width: 540px;
  margin-bottom: 22px;
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 6px 6px 6px 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, border-color .2s;
}
/* Centered standalone row above the banner (position/length tuned per user annotation) */
.hero-try-top {
  position: relative;
  z-index: 2;
  margin: 110px auto -4px;
  width: 560px;
  max-width: calc(100% - 40px);
}
.hero-try:hover {
  border-color: rgba(124, 108, 246, 0.4);
  box-shadow: 0 6px 22px rgba(124, 108, 246, 0.14);
  transform: translateY(-1px);
}
.hero-try:focus-within {
  border-color: rgba(124, 108, 246, 0.55);
  box-shadow: 0 8px 28px rgba(124, 108, 246, 0.18);
}
.hero-try-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
}
.hero-try-input::placeholder { color: var(--ink-soft); opacity: .75; }
.hero-try-send {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #b3b9c6;
  cursor: pointer;
  box-shadow: none;
  transition: transform .18s, box-shadow .18s, background .18s, color .18s;
}
.hero-try:hover .hero-try-send,
.hero-try:focus-within .hero-try-send {
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  color: #fff;
  box-shadow: 0 6px 18px rgba(124, 108, 246, 0.35);
}
.hero-try-send:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(124, 108, 246, 0.45); }
.hero-try-send:active { transform: scale(.95); }
.hero-try-send svg { display: block; }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-meta { display: flex; gap: 20px; flex-wrap: nowrap; }
.meta-item {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
}
.meta-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.meta-label { font-size: 12px; color: var(--ink-soft); margin-top: 7px; white-space: nowrap; }

.hero-viz {
  position: relative;
  aspect-ratio: 1 / 1;
  max-height: 560px;
  width: 100%;
  border-radius: 28px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
}
.hero-brain {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  padding: 6%;
  box-sizing: border-box;
}
#forkCanvas { width: 100%; height: 100%; display: block; }
/* ============ Generic section ============ */
.section {
  padding: 72px 28px;
  max-width: 1280px;
  margin: 0 auto;
}
.section-dark {
  max-width: none;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(24px);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}
.section-dark > * { max-width: 1280px; margin-left: auto; margin-right: auto; }

.section-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 36px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.sec-title { min-width: 0; overflow-wrap: break-word; }
.section-head::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 140px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
}
.sec-index {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--violet);
}
.sec-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 4.2vw, 54px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  flex: 1;
}
.sec-tag {
  font-size: 11.5px;
  letter-spacing: .2em;
  opacity: .4;
  white-space: nowrap;
}

/* ============ Thesis ============ */
.thesis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.thesis-card {
  border-radius: 24px;
  padding: 32px 28px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform .22s, box-shadow .22s;
}
.thesis-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.thesis-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  box-shadow: 0 6px 16px rgba(124, 108, 246, 0.3);
}
.thesis-card:nth-child(1) .thesis-num { background: linear-gradient(135deg, var(--violet), var(--cyan)); }
.thesis-card:nth-child(2) .thesis-num { background: linear-gradient(135deg, var(--pink), var(--amber)); box-shadow: 0 6px 16px rgba(244, 114, 182, 0.3); }
.thesis-card:nth-child(3) .thesis-num { background: linear-gradient(135deg, var(--green), var(--cyan)); box-shadow: 0 6px 16px rgba(52, 211, 153, 0.3); }
.thesis-card:nth-child(4) .thesis-num { background: linear-gradient(135deg, var(--cyan), var(--violet)); box-shadow: 0 6px 16px rgba(96, 165, 250, 0.3); }
.thesis-card:nth-child(5) .thesis-num { background: linear-gradient(135deg, var(--amber), var(--pink)); box-shadow: 0 6px 16px rgba(245, 158, 11, 0.3); }
.thesis-card:nth-child(6) .thesis-num { background: linear-gradient(135deg, var(--violet), var(--pink)); box-shadow: 0 6px 16px rgba(196, 132, 252, 0.3); }
.thesis-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.thesis-card p { color: var(--ink-soft); font-size: 15.5px; }

.manifesto {
  border-radius: 24px;
  padding: 40px 44px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--glass-border);
  border-left: 5px solid var(--violet);
  box-shadow: var(--shadow-md);
}
.manifesto-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(23px, 2.8vw, 34px);
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin-bottom: 14px;
}
.manifesto cite { font-style: normal; font-size: 13px; color: var(--ink-soft); }

/* ---- Product philosophy ---- */
.manifesto-philosophy {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
}
.phil-item { position: relative; }
.phil-num {
  display: inline-block;
  font-size: 12px;
  color: var(--violet);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.phil-item h4 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.phil-item p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.75;
}

@media (max-width: 720px) {
  .manifesto-philosophy {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 22px;
    padding-top: 18px;
  }
}

/* ============ Tech ============ */
.tech-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.tech-lede {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin-bottom: 40px;
}
.tech-list { list-style: none; }
.tech-list li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-size: 15.5px;
  align-items: baseline;
}
.tech-list li:last-child { border-bottom: 1px solid var(--line); }
.tech-key {
  color: var(--violet);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: .12em;
}
.tech-list span:last-child { color: var(--ink-soft); }

.tech-pipeline { display: flex; flex-direction: column; }
.pipe-stage { display: flex; flex-direction: column; gap: 8px; }
.pipe-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.pipe-box {
  border-radius: 16px;
  padding: 16px 20px;
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--ink);
}
.pipe-forks { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fork-chip {
  border-radius: 9px;
  padding: 3px 10px;
  font-size: 12.5px;
  color: var(--ink-soft);
  background: rgba(124, 108, 246, 0.08);
  border: 1px solid rgba(124, 108, 246, 0.18);
}
.pipe-forks em { font-style: normal; font-size: 12px; color: var(--ink-soft); margin-left: auto; }
.pipe-core {
  background: linear-gradient(135deg, rgba(124, 108, 246, 0.14), rgba(56, 189, 248, 0.14));
  border: 1px solid rgba(124, 108, 246, 0.35);
  color: var(--violet);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: .06em;
  text-align: center;
}
.pipe-out {
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.1);
  color: #0B8A5F;
}
.pipe-arrow {
  text-align: center;
  color: var(--violet);
  font-size: 18px;
  line-height: 1;
  padding: 7px 0;
}
.tech-note {
  margin-top: 52px;
  font-size: 12.5px;
  color: var(--ink-soft);
  opacity: .85;
}

/* ============ Demo console ============ */
.demo-lede { color: var(--ink-soft); margin-bottom: 40px; max-width: 660px; }

.demo-console {
  border-radius: 28px;
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
}
.dc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
}
.dc-prims { display: flex; gap: 8px; flex-wrap: wrap; }
.dc-prim {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  transition: color .18s, background .18s, border-color .18s, box-shadow .18s;
}
.dc-prim:hover { color: var(--violet); border-color: rgba(124, 108, 246, 0.4); }
.dc-prim.is-active {
  color: #fff;
  background: var(--violet);
  border-color: var(--violet);
  box-shadow: 0 4px 14px rgba(124, 108, 246, 0.35);
}
.dc-endpoint { font-size: 11px; letter-spacing: .08em; color: var(--ink-soft); }

.dc-grid { display: grid; grid-template-columns: 1.15fr 1fr; }
.dc-input-col {
  padding: 26px 28px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.dc-result-col {
  padding: 26px 28px;
  background: rgba(255, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.dc-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.dc-textarea {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  resize: vertical;
  min-height: 64px;
  transition: border-color .2s, box-shadow .2s;
}
.dc-textarea:focus {
  outline: none;
  border-color: rgba(124, 108, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(124, 108, 246, 0.12);
}
.dc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dc-chip {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s, box-shadow .18s;
}
.dc-chip:hover { color: var(--violet); border-color: rgba(124, 108, 246, 0.4); }
.dc-chip.is-active {
  color: var(--violet);
  background: rgba(124, 108, 246, 0.1);
  border-color: rgba(124, 108, 246, 0.45);
  box-shadow: 0 2px 10px rgba(124, 108, 246, 0.15);
}
.dc-actions { display: flex; align-items: center; gap: 14px; margin-top: 4px; flex-wrap: wrap; }
.dc-status { font-size: 12px; letter-spacing: .02em; min-height: 18px; }
.dc-status.is-live { color: #0B8A5F; }
.dc-status.is-fallback { color: #B45309; }
.dc-status.is-calling { color: var(--violet); }

.dc-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dc-latency { font-size: 11px; color: var(--ink-soft); }
.dc-decision {
  font-size: 22px;
  font-weight: 700;
  color: #0B8A5F;
  word-break: break-all;
  min-height: 30px;
}
.dc-decision.is-low { color: #B45309; }
.dc-conf { display: flex; align-items: center; gap: 14px; }
.conf-bar {
  flex: 1;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(27, 34, 51, 0.07);
}
.conf-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  transition: width .8s cubic-bezier(.2,.8,.2,1);
}
.conf-num { font-weight: 600; font-size: 15px; min-width: 52px; text-align: right; color: #0B8A5F; }
.conf-fill.is-low { background: linear-gradient(90deg, var(--amber), var(--pink)); }
.conf-num.is-low { color: #B45309; }

.dc-probs { display: flex; flex-direction: column; gap: 8px; }
.dc-prob-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.dc-prob-name {
  flex: 0 0 auto;
  max-width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}
.dc-prob-row.is-top .dc-prob-name { font-weight: 700; color: var(--violet); }
.dc-prob-bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(27, 34, 51, 0.07);
  overflow: hidden;
}
.dc-prob-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  transition: width .7s cubic-bezier(.2,.8,.2,1);
}
.dc-prob-row.is-top .dc-prob-fill { background: linear-gradient(90deg, var(--green), var(--cyan)); }
.dc-prob-val { flex: 0 0 52px; text-align: right; color: var(--ink-soft); }

.dc-raw {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}
.dc-raw summary {
  cursor: pointer;
  padding: 10px 14px;
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.dc-raw-pre {
  margin: 0;
  padding: 0 14px 12px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  overflow-x: auto;
  white-space: pre;
  max-width: 100%;
  min-width: 0;
}
#runDemo:disabled { opacity: .5; cursor: wait; }

/* ============ Use cases ============ */
.scenes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.scene-card {
  border-radius: 24px;
  padding: 30px 24px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform .22s, box-shadow .22s;
}
.scene-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.scene-icon {
  font-size: 24px;
  width: 54px; height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  margin-bottom: 20px;
  color: #fff;
}
.scene-card:nth-child(1) .scene-icon { background: linear-gradient(135deg, var(--pink), var(--amber)); box-shadow: 0 6px 16px rgba(244, 114, 182, 0.3); }
.scene-card:nth-child(2) .scene-icon { background: linear-gradient(135deg, var(--amber), var(--pink)); box-shadow: 0 6px 16px rgba(251, 191, 36, 0.3); }
.scene-card:nth-child(3) .scene-icon { background: linear-gradient(135deg, var(--green), var(--cyan)); box-shadow: 0 6px 16px rgba(52, 211, 153, 0.3); }
.scene-card:nth-child(4) .scene-icon { background: linear-gradient(135deg, var(--violet), var(--cyan)); box-shadow: 0 6px 16px rgba(124, 108, 246, 0.3); }
.scene-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.scene-card p { font-size: 14.5px; color: var(--ink-soft); }

/* ============ Roadmap ============ */
.roadmap { list-style: none; position: relative; padding-left: 34px; }
.roadmap::before {
  content: "";
  position: absolute;
  left: 8px; top: 8px; bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--violet), var(--cyan), var(--pink));
  opacity: .35;
}
.road-item { position: relative; padding: 0 0 44px 28px; }
.road-item:last-child { padding-bottom: 0; }
.road-dot {
  position: absolute;
  left: -34px; top: 7px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(27, 34, 51, 0.15);
  box-shadow: var(--shadow-sm);
}
.road-item.is-done .road-dot {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2);
}
.road-item.is-active .road-dot {
  background: var(--amber);
  border-color: var(--amber);
  animation: pulse-amber 2s infinite;
}
@keyframes pulse-amber {
  0%, 100% { box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.3); }
  50% { box-shadow: 0 0 0 9px rgba(251, 191, 36, 0); }
}
.road-phase {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.road-item.is-done .road-phase { color: #0B8A5F; }
.road-item.is-active .road-phase { color: #B45309; }
.road-body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 6px 0 8px;
}
.road-body p { color: var(--ink-soft); font-size: 15.5px; max-width: 560px; }

/* ============ Contact ============ */
.contact-panel {
  border-radius: 32px;
  background:
    radial-gradient(ellipse 70% 90% at 50% 0%, rgba(124, 108, 246, 0.18), transparent 70%),
    var(--glass);
  backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--glass-border);
  padding: 84px 48px;
  text-align: center;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.contact-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 4.4vw, 54px);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  background: linear-gradient(120deg, var(--violet), var(--cyan) 60%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.contact-sub { font-size: 17px; color: var(--ink-soft); margin-bottom: 30px; }
.contact-mail {
  display: inline-block;
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 600;
  color: var(--violet);
  text-decoration: none;
  border-bottom: 2px solid rgba(124, 108, 246, 0.35);
  padding-bottom: 4px;
  transition: border-color .18s, color .18s;
}
.contact-mail:hover { color: var(--cyan); border-color: var(--cyan); }

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--line);
  padding: 48px 28px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(16px);
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-brand { display: flex; align-items: baseline; gap: 12px; }
.footer-domain { font-size: 13px; color: var(--ink-soft); }
.footer-copy { font-size: 12.5px; color: var(--ink-soft); opacity: .65; }

/* ============ Inner page hero ============ */
.page-hero {
  padding: calc(var(--topbar-h) + 48px) 28px 40px;
  max-width: 1280px;
  margin: 0 auto;
}
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--violet);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(38px, 5vw, 62px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 18px;
}
.page-hero h1 .accent {
  background: linear-gradient(120deg, var(--violet), var(--cyan) 60%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-lede {
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--ink-soft);
  max-width: 760px;
}

/* ============ Data tables ============ */
.dtable-wrap {
  border-radius: 20px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow-x: auto;
}
.dtable { width: 100%; border-collapse: collapse; min-width: 560px; }
.dtable th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: left;
  color: var(--ink-soft);
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  white-space: normal;
  overflow-wrap: break-word;
}
.dtable td {
  padding: 13px 20px;
  font-size: 14.5px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13.5px;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}
.dtable td:first-child, .dtable td.td-text { font-family: var(--font-body); font-size: 14.5px; }
/* First column (item) stays on one line; content columns (other than td-text) wrap to avoid horizontal scroll */
.dtable td:first-child { white-space: nowrap; }
.dtable td.td-text { white-space: normal; overflow-wrap: break-word; word-break: break-word; }
.dtable td:not(:first-child):not(.td-text) { white-space: normal; overflow-wrap: break-word; word-break: break-word; }
.dtable tbody tr:last-child td { border-bottom: none; }
.dtable tbody tr:hover { background: rgba(255, 255, 255, 0.5); }
.dtable td.win { color: var(--violet); font-weight: 700; }
.dtable td.win2 { color: #B45309; font-weight: 700; }
.dtable td.tie { color: var(--ink); font-weight: 600; opacity: .75; }
.dtable td.rowhead {
  font-weight: 700;
  color: var(--violet);
  background: rgba(124, 108, 246, 0.05);
  border-right: 1px solid var(--line);
}
.dtable .attr-cn {
  font-style: normal;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink-soft);
  margin-left: 8px;
}
[data-lang="en"] .attr-cn { display: none; }
.dtable-dense td { padding: 9px 16px; }
.td-key { color: var(--violet); font-weight: 500; white-space: nowrap; }

/* ============ Docs page components ============ */
.doc-link-line { margin-top: 28px; }
.doc-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--violet);
  text-decoration: none;
  transition: color 0.2s ease;
}
.doc-link:hover { color: var(--cyan); }
[data-lang="en"] .doc-link { letter-spacing: 0.01em; }

/* ============ Private deployment card ============ */
.dep-card {
  margin-top: 40px;
  border-radius: 28px;
  padding: 40px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.dep-head { margin-bottom: 32px; }
.dep-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--violet);
  background: rgba(124, 108, 246, 0.1);
  border: 1px solid rgba(124, 108, 246, 0.25);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 16px;
}
.dep-head h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 2.6vw, 34px);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.dep-lede { font-size: 15.5px; color: var(--ink-soft); }
/* Card header lede: wraps normally, no horizontal scrollbar */
.dep-head .dep-lede {
  white-space: normal;
  overflow-wrap: anywhere;
}
.dep-sub {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  margin: 32px 0 18px;
}
@media (max-width: 720px) {
  .dep-card { padding: 26px 20px; border-radius: 20px; }
}

/* Docs hub */
.doc-hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.doc-hub-card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  border-radius: 24px; padding: 30px 26px;
  background: var(--glass); backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform .22s, box-shadow .22s;
}
.doc-hub-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.doc-hub-idx { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--violet); }
.doc-hub-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; margin: 10px 0 8px; }
.doc-hub-card p { font-size: 14px; color: var(--ink-soft); flex: 1; }
.doc-hub-arrow {
  display: inline-block; margin-top: 16px; color: var(--violet);
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
}

/* Docs section tabs */
.doc-tabs {
  max-width: 1280px; margin: 0 auto; padding: 0 28px 8px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.doc-tab {
  text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 14px;
  padding: 8px 18px; border-radius: 999px; background: var(--glass);
  border: 1px solid var(--glass-border); box-shadow: var(--shadow-sm);
  transition: background .18s, color .18s, transform .18s;
}
.doc-tab:hover { color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.doc-tab.is-current {
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  color: #fff; border-color: transparent;
}
.doc-crumb {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); margin-bottom: 14px;
}
.doc-crumb a { color: var(--violet); text-decoration: none; }
.doc-crumb a:hover { color: var(--cyan); }

/* Docs pager */
.doc-pager {
  max-width: 1280px; margin: 0 auto; padding: 0 28px 96px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.doc-pager a {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink);
  border-radius: 20px; padding: 22px 26px; background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform .22s, box-shadow .22s;
}
.doc-pager a:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.doc-pager a.doc-pager-next { text-align: right; align-items: flex-end; }
.doc-pager .pager-dir {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--violet);
}
.doc-pager .pager-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; }

/* ============ Benchmarks components ============ */
.bench-lede { color: var(--ink-soft); max-width: 780px; margin-bottom: 28px; }
.bench-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}
.bstat-card {
  border-radius: 20px;
  padding: 26px 22px;
  text-align: center;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bstat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bstat-label { font-size: 12.5px; color: var(--ink-soft); }
.bench-block { margin-bottom: 36px; }
.bench-h {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2.2vw, 26px);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.bench-note {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-top: 16px;
  max-width: 780px;
  line-height: 1.7;
}
.bench-note-nowrap {
  max-width: none;
  white-space: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
}
.bench-meta {
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--ink-soft);
  opacity: .75;
  margin-top: 8px;
}
.bench-details {
  margin: 0 0 60px;
  border-radius: 20px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.bench-details summary {
  cursor: pointer;
  padding: 20px 26px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--violet);
  list-style: none;
  transition: background .18s;
  user-select: none;
}
.bench-details summary::-webkit-details-marker { display: none; }
.bench-details summary::before { content: "▸ "; }
.bench-details[open] summary::before { content: "▾ "; }
.bench-details summary:hover { background: rgba(255, 255, 255, 0.55); }
.bench-details[open] summary { border-bottom: 1px solid var(--line); }
.bench-details .dtable-wrap {
  margin: 20px;
  border: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.45);
}

/* Weakness cards */
.weak-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.weak-card {
  border-radius: 18px;
  padding: 22px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--amber);
  box-shadow: var(--shadow-sm);
}
.weak-key {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #B45309;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.weak-card p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; }

/* ============ Models page components ============ */
.prims {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.prim-card {
  border-radius: 18px;
  padding: 20px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}
.prim-key {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--violet);
  background: rgba(124, 108, 246, 0.1);
  border: 1px solid rgba(124, 108, 246, 0.25);
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.prim-card p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; }

.bounds {
  margin-top: 44px;
  border-radius: 22px;
  padding: 30px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}
.bounds-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  margin-bottom: 18px;
}
.bounds-fit, .bounds-nofit {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  font-size: 14.5px;
  line-height: 1.7;
  margin-bottom: 14px;
}
.bounds-fit strong { color: #0B8A5F; }
.bounds-nofit strong { color: #B45309; }
.bounds-fit span, .bounds-nofit span { color: var(--ink-soft); }

.code-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.code-block {
  position: relative;
  border-radius: 16px;
  padding: 22px 24px;
  background: #151B30;
  color: #DCE3F5;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  overflow-x: auto;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
}
.code-block .cb-lang {
  position: absolute;
  top: 14px; right: 18px;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(220, 227, 245, 0.4);
}
.models-note {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 16px;
  max-width: 780px;
  line-height: 1.7;
}

/* ============ Use-case card extras ============ */
.scene-prim {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--violet);
  background: rgba(124, 108, 246, 0.1);
  border: 1px solid rgba(124, 108, 246, 0.25);
  padding: 3px 11px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.scene-data {
  display: inline-block;
  margin-top: 16px;
  font-size: 11.5px;
  color: #0B8A5F;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.28);
  padding: 6px 12px;
  border-radius: 10px;
}

/* ============ Home quick links ============ */
.home-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.q-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  border-radius: 24px;
  padding: 30px 26px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform .22s, box-shadow .22s;
}
.q-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.q-idx {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--violet);
}
.q-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  margin: 10px 0 8px;
}
.q-card p { font-size: 14px; color: var(--ink-soft); }
.q-arrow {
  display: inline-block;
  margin-top: 16px;
  color: var(--violet);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
}

/* ============ Community page ============ */
.community-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-bottom: 40px;
}
.com-card {
  border-radius: 24px;
  padding: 30px 26px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform .22s, box-shadow .22s;
}
.com-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.com-icon {
  width: 54px; height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  margin-bottom: 20px;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-display);
}
.com-card:nth-child(1) .com-icon { background: linear-gradient(135deg, #24292E, #57606A); box-shadow: 0 6px 16px rgba(36, 41, 46, 0.3); }
.com-card:nth-child(2) .com-icon { background: linear-gradient(135deg, var(--amber), var(--pink)); box-shadow: 0 6px 16px rgba(251, 191, 36, 0.3); }
.com-card:nth-child(3) .com-icon { background: linear-gradient(135deg, var(--violet), var(--cyan)); box-shadow: 0 6px 16px rgba(124, 108, 246, 0.3); }
.com-card:nth-child(4) .com-icon { background: linear-gradient(135deg, var(--green), var(--cyan)); box-shadow: 0 6px 16px rgba(52, 211, 153, 0.3); }
.com-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.com-soon {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: #B45309;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.com-card p { font-size: 14px; color: var(--ink-soft); margin-bottom: 14px; }
.com-link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--violet);
  text-decoration: none;
  border-bottom: 1px dashed rgba(124, 108, 246, 0.45);
  transition: color .18s, border-color .18s;
}
.com-link:hover { color: var(--cyan); border-color: var(--cyan); }

/* ============ Current-page highlight ============ */
.nav a.is-current {
  background: rgba(255, 255, 255, 0.85);
  color: var(--violet);
  box-shadow: var(--shadow-sm);
}

/* ============ Scroll reveal ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-viz { max-height: 420px; max-width: 520px; margin: 0 auto; }
  .thesis-grid { grid-template-columns: 1fr; }
  .tech-layout { grid-template-columns: 1fr; gap: 48px; }
  .scenes-grid { grid-template-columns: repeat(2, 1fr); }
  .dc-grid { grid-template-columns: 1fr; }
  .dc-input-col { border-right: none; border-bottom: 1px solid var(--line); }
  .bench-stats { grid-template-columns: repeat(2, 1fr); }
  .home-quick { grid-template-columns: repeat(2, 1fr); }
  .community-grid { grid-template-columns: repeat(2, 1fr); }
  .weak-grid { grid-template-columns: 1fr; }
  .prims { grid-template-columns: 1fr; }
  .doc-hub-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav {
    position: fixed;
    top: var(--topbar-h);
    left: 0; right: 0;
    flex-direction: column;
    background: rgba(244, 246, 251, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    padding: 12px 20px 20px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .menu-btn { display: flex; }
  .menu-btn.is-open span:nth-child(1) { transform: translateY(3.7px) rotate(45deg); }
  .menu-btn.is-open span:nth-child(2) { transform: translateY(-3.7px) rotate(-45deg); }
  .topbar-right .btn { display: none; }
  .section { padding: 48px 20px; }
  .hero { padding: calc(var(--topbar-h) + 32px) 20px 0; }
  .page-hero { padding: calc(var(--topbar-h) + 36px) 20px 32px; }
  .scenes-grid { grid-template-columns: 1fr; }
  .bench-stats { grid-template-columns: 1fr; }
  .home-quick { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: 1fr; }
  .contact-panel { padding: 56px 24px; }
  .hero-meta { gap: 10px; overflow-x: auto; scrollbar-width: none; }
  .hero-meta::-webkit-scrollbar { display: none; }
  .meta-item { flex: 0 0 auto; padding: 10px 12px; border-radius: 14px; }
  .meta-num { font-size: 20px; }
  .meta-label { font-size: 10px; margin-top: 5px; }
  .section-head { flex-wrap: wrap; gap: 10px; }
  .bounds-fit, .bounds-nofit { grid-template-columns: 1fr; gap: 4px; }
  .doc-hub-grid { grid-template-columns: 1fr; }
  .doc-tabs { padding: 0 20px 8px; }
  .doc-pager { grid-template-columns: 1fr; padding: 0 20px 72px; }
  .doc-pager a.doc-pager-next { text-align: left; align-items: flex-start; }
}

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

/* ============ Dual-system diagram ============ */
.brain-diagram-card {
  width: 100%;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.brain-diagram-frame {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 16px;
  background: #f8fbff;
  -webkit-overflow-scrolling: touch;
}
.brain-diagram-frame img {
  display: block;
  width: 100%;
  min-width: 900px;
  height: auto;
}
.brain-diagram-caption {
  margin: 12px 6px 2px;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.7;
  letter-spacing: 0;
}

@media (max-width: 720px) {
  .brain-diagram-card { padding: 8px; border-radius: 18px; }
  .brain-diagram-frame {
    border-radius: 12px;
    overflow-x: hidden;
    overflow-y: hidden;
  }
  .brain-diagram-frame img {
    width: 100%;
    min-width: 0;
    height: auto;
  }
  .brain-diagram-caption { margin: 10px 4px 2px; font-size: 10.5px; }
}

/* ============ Topbar dropdowns ============ */
.nav-drop { position: relative; display: flex; align-items: center; }
.nav-drop-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 15px;
  border-radius: 999px;
  line-height: inherit;
  transition: background .18s, color .18s;
}
.nav-drop-toggle:hover { background: rgba(255, 255, 255, 0.8); color: var(--ink); box-shadow: var(--shadow-sm); }
.nav-drop.is-current .nav-drop-toggle { background: rgba(255, 255, 255, 0.85); color: var(--violet); box-shadow: var(--shadow-sm); }
.nav-caret { transition: transform .2s; flex: none; }
.nav-drop:hover .nav-caret,
.nav-drop:focus-within .nav-caret,
.nav-drop.is-open .nav-caret { transform: rotate(180deg); }

.nav-drop-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 268px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 120;
}
.nav-drop-menu::before {
  content: "";
  position: absolute;
  top: -10px; left: 0; right: 0;
  height: 10px;
}
.nav-drop:hover .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu,
.nav-drop.is-open .nav-drop-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-drop-menu a {
  display: block;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  white-space: nowrap;
  transition: background .16s, color .16s;
}
.nav-drop-menu a:hover { background: rgba(124, 108, 246, 0.1); color: var(--violet); }
.nav-drop-menu a.is-current { background: rgba(124, 108, 246, 0.12); color: var(--violet); }

/* Docs dropdown: many items, use a multi-column grid (two rows) to reduce height; pops centered below the trigger */
.nav-drop:has(a[data-i18n^="doc.tab"]) .nav-drop-menu {
  left: 50%;
  right: auto;
  transform: translateX(-50%) translateY(-6px);
  max-width: calc(100vw - 32px);
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  grid-auto-columns: minmax(120px, 1fr);
  gap: 4px 8px;
  min-width: 0;
}
.nav-drop:has(a[data-i18n^="doc.tab"]):hover .nav-drop-menu,
.nav-drop:has(a[data-i18n^="doc.tab"]):focus-within .nav-drop-menu,
.nav-drop:has(a[data-i18n^="doc.tab"]).is-open .nav-drop-menu {
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 720px) {
  .nav-drop { display: block; width: 100%; }
  .nav-drop-toggle {
    width: 100%;
    justify-content: space-between;
    font-size: 16px;
    padding: 10px 4px;
    border-radius: 12px;
  }
  .nav-drop-toggle:hover { background: transparent; box-shadow: none; }
  .nav-drop.is-current .nav-drop-toggle { background: transparent; box-shadow: none; }
  .nav-drop-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    padding: 0 0 0 14px;
    min-width: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    transition: max-height .22s ease, padding .22s ease;
  }
  .nav-drop-menu::before { display: none; }
  .nav-drop.is-open .nav-drop-menu {
    visibility: visible;
    max-height: 320px;
    padding: 4px 0 8px 14px;
  }
  .nav-drop-menu a { white-space: normal; padding: 8px 12px; }
  /* Mobile docs dropdown reverts to a single-column accordion */
  .nav-drop:has(a[data-i18n^="doc.tab"]) .nav-drop-menu {
    display: block;
    left: auto;
    right: auto;
    transform: none;
  }
}

    .footer-copy a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
    .footer-copy a:hover { color: var(--ink); }
    .footer-sep { margin: 0 6px; opacity: .5; }
