/* ============================================================
   Build X-Agent Hackathon — Design Tokens & Base
   Style heritage: X-Agent (#move-03) — Space Grotesk + Geist
   ============================================================ */

:root {
  color-scheme: dark;

  /* Dark theme — warm stone-tinted blacks, mirroring the light palette */
  --bg: #0a0a09;       /* page background — almost black, slight warm */
  --bg-1: #141413;     /* surface cards (was white) */
  --bg-2: #1c1c1b;     /* header strip / table thead */
  --bg-3: #2a2a28;     /* unfilled dots / muted blocks */
  --line: #232321;     /* hairline divider */
  --line-2: #3a3a37;   /* visible border */

  --text: #fafaf9;     /* primary text — warm off-white */
  --text-2: #d6d3d1;
  --text-3: #a8a29e;
  --text-4: #78716c;

  /* Brand stays the same neon green; soft variants slightly punchier on dark */
  --brand: #08f0a5;
  --brand-2: #04a371;
  --brand-soft: #08f0a533;
  --brand-pill-bg: #08f0a526;
  --brand-pill-border: #08f0a566;

  /* Syntax accent colors lifted for dark-mode legibility */
  --syn-keyword: #fb923c;
  --syn-func: #60a5fa;
  --syn-const: #fbbf24;
  --syn-string: #34d399;
  --syn-comment: #a8a29e;
  --syn-prop: #a78bfa;
  --syn-num: #fbbf24;

  --container: 1280px;
  --header-h: 68px;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* user request: 全站统一 Inter — 包括 mono 区域。
     Inter 通过 OpenType 'tnum' 提供等宽数字，所以 .tnum / 倒计时 / 奖金数字依然对齐；
     代码块（.codecard）会失去等宽字符对齐感，如需恢复终端感可把这个变量
     单独改回 ui-monospace 系列。 */
  --font-mono: "Inter", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Force Inter's tabular numbers + opentype features site-wide for clean
   number alignment, since Inter replaces both sans and mono. */
html { font-feature-settings: "cv11", "ss01", "tnum" off; }
.tnum, .table .num, .stat .value, .schedule .time, .codecard {
  font-feature-settings: "tnum" 1, "cv11" 1;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  width: 100%;
  overflow-x: clip;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Subtle dotted backdrop + soft brand glow behind the hero */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(8, 240, 165, 0.10), transparent 60%),
    radial-gradient(ellipse 50% 35% at 50% 100%, rgba(8, 240, 165, 0.05), transparent 60%),
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.06) 1px, transparent 0);
  background-size: auto, auto, 24px 24px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 100%);
}

/* ============================================================
   Layout primitives
   ============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) {
  .container { padding: 0 40px; }
}

.app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 100vh;
}

main { flex: 1; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid color-mix(in oklab, var(--line-2) 22%, transparent);
  /* 极轻量玻璃：让下方 hero ambient light 的彩色真的透上来。
     之前 blur(16px) 会把下方颜色平均成一团灰，看上去就跟纯色一样。 */
  background: linear-gradient(
    to bottom,
    color-mix(in oklab, var(--bg) 12%, transparent),
    color-mix(in oklab, var(--bg) 4%, transparent)
  );
  backdrop-filter: blur(6px) saturate(1.6);
  -webkit-backdrop-filter: blur(6px) saturate(1.6);
}
/* 顶栏底部那道极细的霓虹高光线，区分 header 与 hero 但不破坏透感 */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    color-mix(in oklab, var(--brand) 35%, transparent),
    transparent
  );
  pointer-events: none;
}
.site-header .row {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--text);
}
/* 官方 brand logo (X-AGENT horizontal · 绿色 avatar + 白字)。
   原始 SVG 比例 548×140 ≈ 3.91:1，这里以高度为锚点。 */
.brand-mark .brand-logo {
  display: block;
  height: 28px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(8, 240, 165, 0.25));
  transition: filter .25s ease, transform .25s ease;
}
.brand-mark:hover .brand-logo {
  filter: drop-shadow(0 0 14px rgba(8, 240, 165, 0.45));
  transform: translateY(-1px);
}
/* 窄屏缩小 logo */
@media (max-width: 640px) {
  .brand-mark .brand-logo { height: 24px; }
}

.nav {
  display: none;
  align-items: center;
  height: 100%;
  gap: 28px;
  margin-left: 8px;
}
@media (min-width: 900px) { .nav { display: flex; } }
.nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  font-size: 14px;
  color: var(--text);
}
.nav a .num { color: var(--text-4); font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-size: 12px; }
.nav a:hover { color: var(--brand); }

.header-cta {
  margin-left: auto;
  display: flex; align-items: center; gap: 12px;
}

/* ============================================================
   Language switcher (header dropdown)
   ============================================================ */
.lang-switch { position: relative; }

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.lang-btn:hover,
.lang-btn[aria-expanded="true"] {
  color: var(--brand);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}
.lang-icon { width: 16px; height: 16px; flex: none; }
.lang-chev {
  width: 10px; height: 10px; flex: none;
  margin-left: 2px;
  transition: transform .18s ease;
}
.lang-btn[aria-expanded="true"] .lang-chev { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: rgba(20, 20, 19, 0.96);
  border: 1px solid var(--line-2);
  z-index: 50;
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 14px 36px -12px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease;
  pointer-events: none;
}
.lang-menu:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-menu li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: color .12s ease, background .12s ease;
}
.lang-menu li::before {
  content: "";
  width: 6px; height: 6px;
  flex: none;
  border-radius: 50%;
  background: transparent;
  transition: background .12s ease;
}
.lang-menu li:hover {
  color: var(--brand);
  background: rgba(8, 240, 165, 0.06);
}
.lang-menu li.is-selected {
  color: var(--brand);
}
.lang-menu li.is-selected::before {
  background: var(--brand);
  box-shadow: 0 0 8px rgba(8, 240, 165, 0.45);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
  white-space: nowrap;
}
.btn .arrow {
  width: 14px; height: 14px;
  transition: transform .15s ease;
}
.btn:hover .arrow { transform: translateX(3px); }
/* primary = inverted (light fill on dark page) */
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: #ffffff; }
/* brand = neon green CTA, dark text for contrast */
.btn-brand { background: var(--brand); color: #0a0a09; box-shadow: 0 0 24px -8px rgba(8, 240, 165, 0.55); }
.btn-brand:hover { background: var(--brand-2); color: #ffffff; box-shadow: 0 0 28px -6px rgba(4, 163, 113, 0.55); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   Pills / chips
   ============================================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.pill-brand-glass {
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
  background: var(--brand-pill-bg);
  border-color: var(--brand-pill-border);
  color: var(--brand);
}

/* Status pill — used when the event is concluded.
   Muted/amber tone so it reads as "completed", not "live". */
.pill-status-ended {
  height: 32px;
  padding: 0 14px 0 12px;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.pill-status-ended .status-icon {
  width: 14px;
  height: 14px;
  flex: none;
  color: #fbbf24;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.35));
}
.pill-brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #0a0a09;
}
.pill-brand-soft {
  background: var(--brand-soft);
  border-color: var(--brand-pill-border);
  color: var(--brand);
}
.pill-mono {
  background: var(--bg-2);
  border-color: var(--line);
  color: var(--text-3);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  /* 让 hero 视觉上向上延伸到 sticky header 后面，
     这样 ambient light canvas 才能铺到顶栏下方，
     header 的 backdrop-filter 才能模糊到真实的彩色背景。
     内容区用等量 padding-top 推回原视觉位置。 */
  margin-top: calc(-1 * var(--header-h));
  padding: calc(80px + var(--header-h)) 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
@media (min-width: 768px) {
  .hero { padding: calc(110px + var(--header-h)) 0 80px; }
}

/* Color4Bg ambient light canvas container — sits behind hero content,
   doesn't block clicks. The library mounts its own <canvas> inside #box. */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-bg > canvas,
.hero-bg canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
/* Soft fade so the blue glow blends into the dark page below */
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 30%;
  background: linear-gradient(to bottom, transparent, var(--bg) 95%);
  pointer-events: none;
  z-index: 1;
}

.hero .stack {
  position: relative;
  z-index: 2;
  display: flex; flex-direction: column; align-items: center;
}
.hero h1 {
  margin: 14px 0 0;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(48px, 9vw, 124px);
  /* 1.1 而非 1.02：给 "Agent" 的 g、未来可能出现的 p/y 等下行字符
     留出 descender 空间，避免被下一行覆盖切掉 */
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 1100px;
  text-align: center;
}

/* "Build X-Agent" — 金属质感渐变 + 缓慢扫光 */
.hero h1 .title-main {
  position: relative;
  display: inline-block;
  /* padding-bottom 让 inline-block 盒子完整包住 g 的 descender，
     同时 ::before 扫光层 (inset:0) 也会随之扩展、不会切掉 g 的下行 */
  padding-bottom: 0.08em;
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f5f5f4 45%,
    #a8a29e 100%
  );
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  filter: drop-shadow(0 2px 12px rgba(255, 255, 255, 0.08));
}
/* 扫光层：复制同一段文字，叠一条移动高光 */
.hero h1 .title-main::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 255, 255, 0.85) 50%,
    transparent 70%
  );
  background-size: 250% 100%;
  background-position: 200% 0;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  pointer-events: none;
  animation: title-shimmer 5.5s ease-in-out 1.2s infinite;
}

/* "Hackathon / 黑客松" — 霓虹绿 + 轻微呼吸辉光
   关键问题：亮绿色文字 + 大面积亮绿色 ambient light 背景 + 紧凑中文字符
   会让字几乎看不见。单纯加 text-shadow 在 hero 巨号字下被稀释。
   解法：用 -webkit-text-stroke 描一层近黑色描边，paint-order: stroke fill
   让填充压在描边上方 → 字芯仍然是霓虹绿，边缘有暗轮廓兜底。
   英文版描边几乎看不出来，所以双语都受益。 */
.hero h1 .accent {
  color: var(--brand);
  position: relative;
  display: inline-block;
  paint-order: stroke fill;
  -webkit-text-stroke: 1.5px rgba(2, 10, 20, 0.85);
  text-shadow:
    0 2px 8px rgba(2, 10, 20, 0.6),
    0 0 18px rgba(2, 10, 20, 0.5),
    0 0 10px rgba(8, 240, 165, 0.22),
    0 0 24px rgba(8, 240, 165, 0.10);
  animation: title-pulse 4.5s ease-in-out infinite;
}
.hero h1 .accent::after {
  content: "";
  display: inline-block;
  width: 14px; height: 14px;
  background: var(--brand);
  margin-left: 8px;
  vertical-align: 6px;
  box-shadow: 0 0 10px rgba(8, 240, 165, 0.35);
}

@keyframes title-shimmer {
  0%   { background-position: 200% 0; }
  60%  { background-position: -120% 0; }
  100% { background-position: -120% 0; }
}
@keyframes title-pulse {
  0%, 100% {
    text-shadow:
      0 2px 8px rgba(2, 10, 20, 0.6),
      0 0 18px rgba(2, 10, 20, 0.5),
      0 0 10px rgba(8, 240, 165, 0.22),
      0 0 24px rgba(8, 240, 165, 0.10);
  }
  50% {
    text-shadow:
      0 2px 8px rgba(2, 10, 20, 0.6),
      0 0 18px rgba(2, 10, 20, 0.5),
      0 0 14px rgba(8, 240, 165, 0.32),
      0 0 32px rgba(8, 240, 165, 0.16);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1 .title-main::before,
  .hero h1 .accent,
  .hero h1 .accent::after { animation: none; }
}
.hero p.lede {
  margin: 22px 0 0;
  max-width: 640px;
  font-size: 17px;
  line-height: 1.6;
  /* 纯白 + 70% 不透明度 —— 比标题更"轻"，让层次更明显 */
  color: rgba(255, 255, 255, 0.70);
}
.hero .cta-row {
  margin-top: 28px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}

/* Meta card row — sleek dark cards: icon + label + value, optional chevron link.
   Used inside the readme.md surface for prize-pool / venue. */
.meta-card-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 720px) {
  .meta-card-row { grid-template-columns: 1fr 1fr; gap: 16px; }
}

.meta-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: rgba(20, 20, 19, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  color: var(--text);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}
a.meta-card { cursor: pointer; }
a.meta-card:hover {
  border-color: rgba(8, 240, 165, 0.45);
  background: rgba(20, 20, 19, 0.72);
}
a.meta-card:hover .meta-card-chev { color: var(--brand); transform: translateX(2px); }

.meta-card-icon {
  flex: none;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
}
.meta-card-icon svg { width: 22px; height: 22px; }

.meta-card-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.meta-card-label {
  font-size: 13px;
  color: var(--text-3);
  letter-spacing: 0.01em;
}
.meta-card-value {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.2;
  font-feature-settings: "tnum" 1, "cv11" 1;
}
.meta-card-chev {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--text-4);
  transition: color 180ms ease, transform 180ms ease;
}

/* ============================================================
   Role toggle — segmented switch ("我是 Agent" / "我是人类")
   placed at the top of the intro section, left-aligned.
   ============================================================ */
.role-toggle {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  margin: 0 0 64px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 0;
  isolation: isolate;
}

/* Sliding highlight that moves between option buttons.
   Position + width are written by JS (in px) so the spring transition
   on `transform` and `width` produces a real "physical" slide
   instead of two background fades crossing each other. */
.role-toggle-thumb {
  position: absolute;
  z-index: 1;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: 0;
  background: var(--brand);
  border-radius: 0;
  box-shadow:
    0 0 0 1px rgba(8, 240, 165, 0.55),
    0 0 28px -6px rgba(8, 240, 165, 0.50);
  transform: translate3d(0, 0, 0);
  transition:
    transform .5s cubic-bezier(.4, 1.25, .35, 1),
    width     .5s cubic-bezier(.4, 1.25, .35, 1);
  will-change: transform, width;
  pointer-events: none;
}

.role-toggle-option {
  position: relative;
  z-index: 2;
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.55);
  border-radius: 0;
  transition: color .35s ease;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.role-toggle-option .role-icon {
  width: 18px;
  height: 18px;
  flex: none;
  display: block;
  transition: transform .35s cubic-bezier(.5, 1.4, .4, 1);
}
.role-toggle-option:hover {
  color: rgba(255, 255, 255, 0.9);
}
.role-toggle-option:hover .role-icon {
  transform: scale(1.06);
}
.role-toggle-option.is-active {
  color: #0a0a09;
  font-weight: 600;
}
.role-toggle-option.is-active .role-icon {
  transform: scale(1.04);
}
.role-toggle-option:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .role-toggle-thumb { transition: none; }
}

/* Tab panel switched by .role-toggle. Hidden ones don't render at all
   so layout collapses cleanly between intro and the next shared section.
   When shown, a brief fade-in keeps the swap from feeling jarring. */
.role-panel[hidden] { display: none; }
.role-panel:not([hidden]) {
  animation: role-panel-in .35s ease-out;
}
@keyframes role-panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .role-panel:not([hidden]) { animation: none; }
}

/* ============================================================
   Stats strip (the 4-up grid like X-Agent)
   ============================================================ */
.stats-strip {
  padding: 8px 0 36px;
}
.stats-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.stats-meta .live {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
}
.stats-meta .live .dot {
  width: 8px; height: 8px; border-radius: 999px; background: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 25%, transparent);
  animation: pulseBrand 2s ease-in-out infinite;
}
@keyframes pulseBrand {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--brand) 35%, transparent); }
  50%      { box-shadow: 0 0 0 6px color-mix(in oklab, var(--brand) 0%, transparent); }
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line-2);
}
@media (min-width: 640px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat {
  background: var(--bg-1);
  padding: 16px;
  min-height: 88px;
  display: flex; flex-direction: column; justify-content: space-between;
}
@media (min-width: 640px) { .stat { padding: 24px; min-height: 120px; } }
.stat .label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-4);
  white-space: nowrap;
  line-height: 1;
}
.stat .label .kw { color: var(--syn-keyword); }
.stat .label .pr { color: var(--syn-prop); }
.stat .value {
  font-family: var(--font-sans);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.01em;
  line-height: 1;
}
.stat .value .unit { font-size: 0.5em; color: var(--text-3); margin-left: 4px; }

/* ============================================================
   Section heading
   ============================================================ */
.section { padding: 24px 0; }
@media (min-width: 768px) { .section { padding: 32px 0; } }

/* hero 之后的第一个 section 视觉上稍微贴近 hero 一点，但不能再用大的负
   margin 把它“塞进” hero 矩形里 —— 之前 -60px 会让 #paths 的 h2 (Overview)
   被 hero 末端的标题大字 + ambient 渐变以及 sticky header 同时压住，
   anchor 跳转后看起来像被截断。这里改成 0，靠 hero 自身的底部 fade
   (`.hero::after`) 完成过渡。 */
.hero + .section { margin-top: 0; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 32px;
}
.section-head .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand);
}
.section-head h2 {
  margin: 8px 0 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* Inline section sub-heading — used when a section has a secondary block
   (e.g. Prizes section also contains the requirements list below). */
.subhead {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
}
.section-head .meta {
  font-family: var(--font-sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

/* ============================================================
   Surface card (with traffic-light header)
   ============================================================ */
.surface {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
}
.surface-head {
  height: 40px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line-2);
}
@media (min-width: 768px) { .surface-head { padding: 0 20px; } }
.surface-head .left { display: inline-flex; align-items: center; gap: 12px; }
.dots { display: inline-flex; align-items: center; gap: 6px; }
.dots i {
  width: 10px; height: 10px; border-radius: 999px; background: var(--bg-3);
}
.dots.three i:nth-child(1) { background: var(--text); }
.dots.three i:nth-child(2) { background: var(--text); }
.dots.three i:nth-child(3) { background: var(--text); }
.surface-head .step {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
}
.surface-body { padding: 24px 20px; }
@media (min-width: 768px) { .surface-body { padding: 32px; } }

.surface-title-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.surface-title-row h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.015em;
}
.surface-body p.body {
  margin: 22px 0 0;
  max-width: 720px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
}
.surface-body .strong-text { color: var(--text); font-weight: 500; }

/* ============================================================
   Two-column arena grid
   ============================================================ */
.arena-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 900px) { .arena-grid { grid-template-columns: 1fr 1fr; } }

/* "Your track" highlight — driven by role-toggle in #intro.
   When user picks vibe / nocode above, the matching arena card lights
   up with a brand-green ring + the ★ badge in its surface-head right slot.
   The non-matching card desaturates very slightly so the contrast reads. */
.arena .your-track-badge {
  display: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  text-shadow: 0 0 12px rgba(8, 240, 165, 0.45);
}
.arena.is-your-track {
  border-color: rgba(8, 240, 165, 0.55);
  box-shadow:
    0 24px 48px -24px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(8, 240, 165, 0.20),
    0 0 36px -10px rgba(8, 240, 165, 0.35);
}
.arena.is-your-track .your-track-badge {
  display: inline-flex;
  align-items: center;
  animation: arena-badge-in .35s ease-out;
}
.arena.is-your-track .surface-head {
  background: linear-gradient(
    to right,
    var(--bg-2),
    color-mix(in oklab, var(--brand) 8%, var(--bg-2))
  );
}
.arena:not(.is-your-track) {
  opacity: 0.78;
  transition: opacity .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.arena:not(.is-your-track):hover {
  opacity: 1;
}
@keyframes arena-badge-in {
  from { opacity: 0; transform: translateX(4px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .arena.is-your-track .your-track-badge { animation: none; }
  .arena:not(.is-your-track) { transition: none; }
}

.surface-body .label-row,
.arena .label-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
}
.surface-body .features {
  margin: 24px 0 0;
  border-top: 1px solid var(--line);
  padding: 0;
}
.surface-body .features li {
  list-style: none;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.surface-body .features li:last-child { border-bottom: 0; }
.surface-body .features .idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-4);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.surface-body .features .text {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.6;
}
.surface-body .features .text strong { color: var(--text); font-weight: 500; }

/* Requirements list — bonus rows highlight the "+" prefix in brand green. */
.surface-body .features.req-bonus .idx {
  color: var(--brand);
  font-weight: 600;
  font-size: 14px;
  padding-top: 0;
}

/* Developer resources — single column, horizontal grid on wide screens
   so the 3 dev links sit side-by-side rather than stacked. */
@media (min-width: 900px) {
  .surface-body .features.dev-res {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 32px;
    border-top: 1px solid var(--line);
  }
  .surface-body .features.dev-res li { border-bottom: 0; }
}

/* ============================================================
   Code / install block
   ============================================================ */
.codecard {
  display: flex;
  align-items: center;
  gap: 24px;
  background: #0a0a09;
  color: #fafaf9;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.75;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 0;
  padding: 28px 32px;
}

/* Install command: plain monochrome lines, wrap at word boundaries,
   only break inside very long tokens (URLs) when there's no space. */
.install-cmd {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.75;
  color: #fafaf9;
}
.install-cmd .cl {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Square green copy button on the right. */
.copy-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 88px;
  height: 44px;
  padding: 0 22px;
  background: var(--brand);
  color: #0a0a09;
  border: 0;
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.copy-btn:hover {
  background: #16ffb6;
  box-shadow: 0 0 24px -6px rgba(8, 240, 165, 0.55);
}
.copy-btn:active { transform: scale(0.97); }
.copy-btn.copied {
  background: #04a371;
  color: #ffffff;
}

@media (max-width: 720px) {
  .codecard {
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 18px;
  }
  .copy-btn { align-self: flex-end; }
}

/* ============================================================
   Tables
   ============================================================ */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 14px;
}
.table thead th {
  text-align: left;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line-2);
  padding: 12px 20px;
  font-weight: 400;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
}
.table tbody td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--text);
}
.table tbody tr:last-child td { border-bottom: 0; }
.table .right { text-align: right; }
.table .num { font-variant-numeric: tabular-nums; }
.table .muted { color: var(--text-3); }
.table .prize-row strong { color: var(--text); font-weight: 500; }
.table .prize-row .desc { display: block; color: var(--text-2); font-size: 13px; margin-top: 4px; line-height: 1.55; }
.table .badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--brand);
}
.table .badge i { width: 6px; height: 6px; border-radius: 999px; background: var(--brand); }

/* ============================================================
   Prize board — two-track podium layout
   ------------------------------------------------------------
   Replaces the old 4-row table. Each track is a .surface card
   with a 3-tier podium (gold/silver/bronze) plus a special-
   awards block underneath. The two surfaces sit side-by-side
   on desktop so the equal-pool symmetry is immediately visible.
   ============================================================ */
.prize-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 960px) {
  .prize-board { grid-template-columns: 1fr 1fr; gap: 28px; }
}

/* The track surface itself — reuses .surface base + adds
   "this is your track" highlight when the role-toggle picks it. */
.prize-track .your-track-badge {
  display: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  text-shadow: 0 0 12px rgba(8, 240, 165, 0.45);
}
.prize-track.is-your-track {
  border-color: rgba(8, 240, 165, 0.55);
  box-shadow:
    0 24px 48px -24px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(8, 240, 165, 0.20),
    0 0 36px -10px rgba(8, 240, 165, 0.35);
}
.prize-track.is-your-track .your-track-badge {
  display: inline-flex;
  align-items: center;
  animation: arena-badge-in .35s ease-out;
}
.prize-track.is-your-track .surface-head {
  background: linear-gradient(
    to right,
    var(--bg-2),
    color-mix(in oklab, var(--brand) 8%, var(--bg-2))
  );
}
.prize-track:not(.is-your-track) {
  opacity: 0.82;
  transition: opacity .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.prize-track:not(.is-your-track):hover { opacity: 1; }

/* Track header inside the surface body — title on the left,
   per-track pool summary on the right. */
.prize-track-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.prize-track-head .track-title h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(20px, 2.2vw, 24px);
  letter-spacing: -0.015em;
  color: var(--text);
}
.prize-track-head .track-sub {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.prize-track-head .track-pool {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
  white-space: nowrap;
}
.prize-track-head .pool-num {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--brand);
  text-shadow: 0 0 18px rgba(8, 240, 165, 0.30);
}
.prize-track-head .pool-unit {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-3);
  text-transform: uppercase;
}

/* Podium — three stacked tiers. tier-1 has brand accent,
   tier-2 default, tier-3 dimmed. */
.prize-podium {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.prize-tier {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 24px;
  row-gap: 10px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--line);
  border-left-width: 3px;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.prize-tier:hover {
  background: rgba(255, 255, 255, 0.03);
  transform: translateX(2px);
}
.prize-tier .tier-rank {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
}
.prize-tier .rank-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  color: var(--text-4);
  letter-spacing: -0.01em;
}
.prize-tier .rank-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.prize-tier .rank-name {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
}
.prize-tier .rank-count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.prize-tier .tier-amount {
  display: flex;
  align-items: baseline;
  gap: 6px;
  align-self: center;
  white-space: nowrap;
}
.prize-tier .amt-num {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
}
.prize-tier .amt-unit {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.prize-tier .tier-perks {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.prize-tier .tier-perks li {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  padding: 4px 10px;
}

/* Tier 1 — brand-green accent, glowing amount */
.prize-tier.tier-1 {
  border-left-color: var(--brand);
  background: linear-gradient(
    to right,
    color-mix(in oklab, var(--brand) 8%, transparent),
    transparent 60%
  );
}
.prize-tier.tier-1 .rank-num {
  color: var(--brand);
  text-shadow: 0 0 14px rgba(8, 240, 165, 0.40);
}
.prize-tier.tier-1 .amt-num {
  font-size: 34px;
  color: var(--brand);
  text-shadow: 0 0 18px rgba(8, 240, 165, 0.32);
}
.prize-tier.tier-1 .tier-perks li {
  color: var(--brand);
  background: var(--brand-pill-bg);
  border-color: var(--brand-pill-border);
}

/* Tier 2 — neutral white amount, brighter than t3 */
.prize-tier.tier-2 {
  border-left-color: var(--text-3);
}
.prize-tier.tier-2 .rank-num { color: var(--text-2); }

/* Tier 3 — dimmed across the board */
.prize-tier.tier-3 {
  border-left-color: var(--line-2);
  opacity: 0.92;
}
.prize-tier.tier-3 .amt-num { color: var(--text-2); }

/* Special awards — sits below the podium, accent color so it
   reads as "bonus" not "another main tier". */
.prize-special {
  margin-top: 24px;
  padding: 18px 20px;
  background: rgba(251, 146, 60, 0.04);
  border: 1px dashed rgba(251, 146, 60, 0.32);
}
.prize-special .special-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(251, 146, 60, 0.22);
}
.prize-special .special-tag {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--syn-keyword);
}
.prize-special .special-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--syn-keyword);
  opacity: 0.85;
}
.prize-special .special-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.prize-special .special-list li {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 2px;
  font-size: 13.5px;
  line-height: 1.55;
}
.prize-special .special-name {
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
}
.prize-special .special-desc {
  color: var(--text-3);
  min-width: 0;
}
@media (min-width: 520px) {
  .prize-special .special-list li {
    grid-template-columns: 110px minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 0;
    align-items: baseline;
  }
}

/* On very narrow screens, let the amount drop below the rank
   so nothing gets squished. */
@media (max-width: 420px) {
  .prize-tier {
    grid-template-columns: 1fr;
  }
  .prize-tier .tier-amount {
    align-self: flex-start;
  }
}

/* ============================================================
   Schedule (offline timeline)
   ============================================================ */
.schedule { display: grid; gap: 0; border-top: 1px solid var(--line); }
.schedule .row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 768px) {
  .schedule .row { grid-template-columns: 140px 200px 1fr; }
}
.schedule .time {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.schedule .who {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-4);
}
.schedule .what {
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
}
.schedule .what .desc {
  display: block;
  color: var(--text-3);
  font-size: 13.5px;
  margin-top: 4px;
}
.schedule .row.is-now {
  background: linear-gradient(90deg, rgba(8, 240, 165, 0.10), transparent 65%);
  border-left: 2px solid var(--brand);
  padding-left: 14px;
  margin-left: -16px;
}
.schedule .row.is-now .time::before {
  content: "● "; color: var(--brand);
}

/* ============================================================
   FAQ accordion
   ============================================================ */
.faq-list { border-top: 1px solid var(--line); }
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 0;
  display: grid;
  grid-template-columns: 28px 1fr 24px;
  gap: 16px;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-4);
  font-variant-numeric: tabular-nums;
}
.faq-item .q {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}
.faq-item .chev {
  width: 16px; height: 16px;
  display: inline-block;
  position: relative;
  color: var(--text-3);
  transition:
    color .25s ease,
    transform .45s cubic-bezier(.5, 1.4, .4, 1);
  transform: rotate(0deg);
  will-change: transform;
}
.faq-item summary:hover .chev { color: var(--brand); }
.faq-item[open] .chev {
  color: var(--brand);
  transform: rotate(180deg);
}

.faq-item .chev::before,
.faq-item .chev::after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 1px;
  transition: transform .45s cubic-bezier(.5, 1.4, .4, 1);
}
.faq-item .chev::before { top: 7px; left: 0; width: 16px; height: 2px; transform-origin: center; }
.faq-item .chev::after  { top: 0; left: 7px; width: 2px; height: 16px; transform-origin: center; }

/* On open: vertical bar rotates 90° (relative to parent) and parent
   rotates 180° → both bars end up horizontal, giving a clean "−"
   while spinning nicely instead of snapping. */
.faq-item[open] .chev::after { transform: rotate(90deg); }

.faq-item .a {
  padding: 0 0 22px 44px;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.65;
  max-width: 820px;
}
.faq-item .a a { color: var(--brand); border-bottom: 1px solid var(--brand-pill-border); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line-2);
  background: var(--bg);
  margin-top: auto;
}
.site-footer .row {
  min-height: 96px;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}
@media (min-width: 768px) {
  .site-footer .row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 80px;
  }
}
.site-footer .meta {
  font-size: 13px;
  color: var(--text-3);
}
.site-footer .meta strong { color: var(--text-2); font-weight: 500; }

/* ============================================================
   Utilities
   ============================================================ */
.mono { font-family: var(--font-mono); }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.muted-2 { color: var(--text-2); }
/* Anchor landing offset.
   = sticky header height (68) + breathing room (52)
   Needs to be generous because `.hero + .section { margin-top: -60px }`
   pulls #paths up into the hero, which eats into the visual gap and was
   causing the "Overview" h2 to land directly under the header. */
.scroll-mt { scroll-margin-top: calc(var(--header-h) + 52px); }

/* Animated arrow icon (pixel-style, matches X-Agent) */
.arrow-pixel {
  width: 14px; height: 14px;
  display: inline-block;
}

/* Hover micro-interaction for cards */
.lift {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.lift:hover {
  transform: translateY(-2px);
  border-color: rgba(8, 240, 165, 0.45);
  box-shadow:
    0 24px 48px -24px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(8, 240, 165, 0.15),
    0 0 32px -8px rgba(8, 240, 165, 0.25);
}

/* inline brand-colored hyperlinks used inside body / faq copy */
.link {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px dashed rgba(8, 240, 165, 0.45);
  transition: color .15s ease, border-color .15s ease;
}
.link:hover {
  color: #fff;
  border-bottom-color: var(--brand);
}


/* ============================================================
   Restructure (May 2026) — minimal hackathon page
   - Two big "path" cards (coder / no-code)
   - Inline submission form in the no-code card
   - Compact prize + rules sections
   These styles assume the existing surface/.lift/.btn primitives.
   ============================================================ */

/* Center-aligned section header (was always left-aligned). */
.section-head-center {
  text-align: center;
  margin-bottom: 32px;
}
.section-head-center > div { max-width: 720px; margin: 0 auto; }

/* ------- Path cards (coder vs no-code) ------- */
.path-card .surface-body { padding-top: 28px; }

.path-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--brand-pill-bg);
  border: 1px solid var(--brand-pill-border);
  color: var(--brand);
  margin-bottom: 14px;
}
.path-icon svg { width: 22px; height: 22px; }

.path-card h3 { margin: 0 0 6px; }
.path-card .body { color: var(--text-2); }

/* Numbered steps inside each path card */
.path-steps {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.path-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-2);
}
.path-steps .step-num {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--brand-pill-bg);
  border: 1px solid var(--brand-pill-border);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.path-steps .step-text { flex: 1 1 auto; }

/* Some steps wrap text + an inline CTA button (Open xagt.ai, Create now…).
   step-body is the column container that holds them, sized to fill the row. */
.path-steps .step-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

/* Compact brand button — sits inside a path step, must not shout louder
   than the surrounding text. Inherits .btn + .btn-brand for color/glow,
   shrinks the height/padding/font and drops the uppercase tracking. */
.path-steps .step-cta {
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  border-radius: 8px;
}
.path-steps .step-cta .arrow {
  width: 11px; height: 11px;
}

.path-foot {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.link-mini {
  font-size: 13px;
  color: var(--text-3);
  border-bottom: 1px dotted var(--text-4);
  transition: color .15s ease, border-color .15s ease;
}
.link-mini:hover { color: var(--brand); border-color: var(--brand); }

/* ------- Submission form (no-code path) ------- */
.submit-form {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2px;
}
.form-head-meta {
  font-size: 12px;
  color: var(--text-4);
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 13px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.field-optional {
  font-size: 11px;
  color: var(--text-4);
  text-transform: lowercase;
  padding: 1px 8px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
}
.field input {
  appearance: none;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.field input::placeholder { color: var(--text-4); }
.field input:hover { border-color: var(--text-4); }
.field input:focus {
  outline: none;
  border-color: var(--brand);
  background: rgba(8, 240, 165, 0.04);
  box-shadow: 0 0 0 3px rgba(8, 240, 165, 0.15);
}

.btn-block { width: 100%; justify-content: center; }

.form-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.55;
}
.form-feedback {
  margin: 0;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-2);
}
.form-feedback.is-error {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(248, 113, 113, 0.08);
  color: #fecaca;
}
.form-feedback.is-ok {
  border-color: var(--brand-pill-border);
  background: var(--brand-pill-bg);
  color: var(--brand);
  /* Bigger + bolder for the success state — the user just hit Submit and
     needs a clear visual confirmation. Persists until they edit again. */
  font-size: 14px;
  font-weight: 600;
  padding: 11px 14px;
}
.form-feedback.is-pending {
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
}
/* Submit button while a request is in flight. */
.submit-form .btn.is-busy {
  opacity: 0.65;
  cursor: progress;
  pointer-events: none;
}

/* ------- Compact prize list (replaces the older podium markup) ------- */
.prize-list {
  list-style: none;
  margin: 18px 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prize-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
}
.prize-list .prize-rank {
  font-size: 13px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.prize-list .prize-amt {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  font-feature-settings: "tnum" 1;
}
.prize-list .prize-count {
  font-size: 12.5px;
  color: var(--text-4);
}
.prize-special-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 10px 12px;
  font-size: 13px;
  border-radius: 8px;
  background: var(--brand-pill-bg);
  border: 1px dashed var(--brand-pill-border);
  color: var(--text-2);
}
.prize-special-line > span:first-child {
  color: var(--brand);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ------- Rules list (4 short bullets, single column) ------- */
/* 改成跟 .overview / .path-stage 一致的 720px 居中单列，让 Rules 段
   读起来像一份从上到下的 checklist，而不是 2x2 拼图 —— 每条规则
   独占一行更适合扫读。 */
.rule-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px auto 0;
  max-width: 720px;
}
.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.55;
}
.rule-check {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--brand-pill-bg);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  margin-top: 1px;
}
.rule-bonus {
  margin-top: 18px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-3);
}

/* Mobile: prize list reflows */
@media (max-width: 720px) {
  .prize-list li { grid-template-columns: auto 1fr; }
  .prize-list .prize-count { grid-column: 2; justify-self: end; }
}

/* ============================================================
   Tabbed paths (May 2026, follow-up)
   - Centered tab switcher (Developer / No-code) above the panels
   - Single panel shown at a time, centered, max-width: same on PC
     and mobile so the layout is identical across breakpoints
   ============================================================ */
.role-toggle {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 28px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  width: max-content;
  max-width: 100%;
}
.role-pill {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 12px 22px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.55);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color .2s ease, background .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.role-pill .role-icon {
  font-family: var(--font-mono);
  font-size: 13px;
  opacity: 0.85;
}
.role-pill:hover { color: rgba(255, 255, 255, 0.92); }
.role-pill.is-active {
  background: var(--brand);
  color: #0a0a09;
  font-weight: 600;
  box-shadow:
    0 0 0 1px rgba(8, 240, 165, 0.55),
    0 0 24px -6px rgba(8, 240, 165, 0.50);
}
.role-pill.is-active .role-icon { opacity: 1; }
.role-pill:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Stage that wraps the active panel — single column on every screen.
   Same max-width on PC and mobile so the visual rhythm is identical. */
.path-stage {
  display: block;
  max-width: 720px;
  margin: 0 auto;
}
.path-stage .role-panel { width: 100%; }

@media (max-width: 480px) {
  .role-toggle { width: 100%; }
  .role-pill { flex: 1 1 0; justify-content: center; padding: 12px 16px; }
}

/* ============================================================
   Overview block — the structured intro above the path tabs.
   Replaces the old wall of <br/><br/> centered text:
     · left-aligned paragraph for the lede (eyes don't bounce)
     · "2 ways" rendered as a definition list with mono pill keys
       so X-Agent / Builder line up cleanly instead of being two
       loose centered bullets
     · sdk link demoted to a quiet mono footer line
   ============================================================ */
.overview {
  max-width: 720px;
  margin: 0 auto 28px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.overview-lede {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-2);
}

.ways {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  padding: 16px 20px 4px;
}
.ways-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}
.ways-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: 0.01em;
}
.ways-tag .mono {
  color: var(--brand);
  font-size: 12px;
  font-weight: 500;
}
.ways-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-4);
  letter-spacing: 0.04em;
}

.ways-defs { margin: 0; padding: 0; }
.ways-defs > .way {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: baseline;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px dashed var(--line);
}
.ways-defs > .way:first-child { border-top: 0; padding-top: 16px; }
.way dt { margin: 0; }
.way dd {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-2);
}
.way-key {
  display: inline-block;
  padding: 5px 10px;
  background: var(--brand-pill-bg);
  border: 1px solid var(--brand-pill-border);
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.overview-sdk {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: center;
}
.overview-sdk .mono {
  color: var(--text-4);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

@media (max-width: 480px) {
  .ways { padding: 14px 16px 4px; }
  .ways-defs > .way {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px 0;
  }
  .ways-defs > .way:first-child { padding-top: 14px; }
}
