:root {
  --bg: #0f141b;
  --surface: rgba(20,27,35,0.92);
  --surface-2: rgba(26,35,46,0.96);
  --line: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.14);
  --text: #edf3f9;
  --muted: #96a4b5;
  --highlight: #9fc57f;
  --gold: #dcc39a;
  --shadow: 0 22px 64px rgba(0,0,0,0.28);
  --serif: 'Noto Serif SC', serif;
  --sans: 'Inter', sans-serif;
  --display-cn: 'Noto Sans SC', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, #0d1218 0%, #111823 100%);
  color: var(--text);
  font-family: var(--sans);
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
}
a { color: inherit; text-decoration: none; }
img, iframe { display: block; width: 100%; }
figure { margin: 0; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 28px 22px 36px;
  border-right: 1px solid var(--line);
  background: rgba(9,13,18,0.92);
  backdrop-filter: blur(10px);
}
.brand h1 {
  margin: 8px 0 10px;
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.15;
}
.kicker, .eyebrow, .label, .meta, figcaption, .support-title, .board-title, .section-chip {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
}
.kicker, .eyebrow { color: var(--highlight); }
.support-title { color: #ff7a7a; }
.summary, .legend, figcaption, .meta { color: var(--muted); line-height: 1.72; }
.toc { display: grid; gap: 8px; margin: 24px 0 18px; }
.toc a {
  position: relative;
  padding: 11px 14px 11px 16px;
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
  color: rgba(237,243,249,.82);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}
.toc a::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  border-radius: 999px;
  background: var(--highlight);
  transition: height 180ms ease, opacity 180ms ease;
  opacity: 0;
}
.toc a:hover {
  transform: translateX(4px);
  background: rgba(255,255,255,.05);
  border-color: rgba(159,197,127,.22);
  color: rgba(237,243,249,.98);
  box-shadow: 0 12px 26px rgba(0,0,0,.14);
}
.toc a:hover::before,
.toc a:focus-visible::before {
  height: 60%;
  opacity: 1;
}
.toc a:focus-visible {
  outline: none;
  background: rgba(255,255,255,.05);
  border-color: rgba(159,197,127,.28);
  color: rgba(237,243,249,.98);
  box-shadow: 0 0 0 1px rgba(159,197,127,.12) inset, 0 12px 26px rgba(0,0,0,.14);
}
.support-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.support-toggle.on {
  background: rgba(159,197,127,.12);
  border-color: rgba(159,197,127,.28);
}
.support-icon { color: var(--highlight); }
.legend {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
}
.hl { color: var(--highlight); }
.main {
  padding: 34px 40px 160px;
  display: grid;
  gap: 34px;
}
.panel {
  min-height: 86vh;
  padding: 26px 28px 28px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(15,20,27,.76), rgba(15,20,27,.54));
  box-shadow: 0 28px 80px rgba(0,0,0,.18);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-items: start;
}
.hero-panel {
  min-height: 88vh;
  justify-content: center;
}
.hero-head {
  max-width: 1180px;
  width: 100%;
  justify-self: start;
  align-self: center;
  text-align: left;
  padding-left: 0;
}
.hero-title-en {
  margin-top: 12px;
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.08;
  letter-spacing: .08em;
  color: rgba(237,243,249,.66);
  font-weight: 600;
  max-width: none;
}
.hero-title-zh {
  margin-top: 16px;
  font-size: clamp(44px, 5.6vw, 86px);
  line-height: .98;
  max-width: 12ch;
  letter-spacing: -.045em;
}
.section-rail {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.section-rail-left::before {
  flex: 0 0 0;
  width: 0;
}
.section-rail::before,
.section-rail::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
}
.section-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: var(--highlight);
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(0,0,0,.16);
}
.section-head {
  max-width: 1180px;
  width: 100%;
  justify-self: start;
  align-self: start;
  text-align: left;
  padding-left: 0;
}
.section-title-en {
  margin-top: 10px;
  font-size: clamp(16px, 1.25vw, 22px);
  line-height: 1.08;
  letter-spacing: .08em;
  color: rgba(237,243,249,.64);
  font-weight: 600;
  text-transform: uppercase;
}
.section-head h2, .hero-head h2,
.section-title-zh {
  margin: 12px 0 0;
  font-family: var(--display-cn);
  font-weight: 900;
  line-height: 1.02;
  font-size: clamp(34px, 3.2vw, 52px);
  max-width: 14ch;
  color: rgba(245,248,252,.98);
  letter-spacing: -.035em;
}
.hero-head .section-title-en {
  font-size: clamp(16px, 1.25vw, 22px);
  letter-spacing: .08em;
  color: rgba(237,243,249,.64);
}
.hero-head .section-title-zh {
  font-size: clamp(46px, 5.8vw, 88px);
  line-height: .97;
  max-width: 12ch;
  letter-spacing: -.045em;
}
.hero-lead {
  margin: 26px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.85;
}
.section-body,
.layout-two-col,
.layout-flow,
.layout-showcase,
.gallery-showcase,
.gallery-thumbs,
.gallery-controls,
.arch-grid,
.compact-arch-grid,
.stack-col,
.proof-board-grid,
.translation-row,
.excavator-flow,
.architecture-grid-sim,
.validation-grid,
.batch-lanes,
.batch-metrics,
.selection-columns {
  display: grid;
  gap: 18px;
}
.section-body { margin-top: 22px; }
.layout-two-col { grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); align-items: start; }
.triad-layout { grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); }
.intake-layout { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); }
.architecture-layout { grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); }
.layout-showcase { align-content: start; }
.stack-col { align-content: start; }
.triad-notes { align-content: stretch; }
.compact-arch-grid { grid-template-columns: 1fr 1fr; }
.principle-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 14px;
  align-items: stretch;
  margin-top: 22px;
}
.flow-grid-clean { margin-top: 0; }
.step-card, .text-card, .arch-card, .img-card, .frame-card, .html-infographic, .proof-board {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 22px;
}
.step-card, .text-card, .arch-card, .html-infographic { padding: 20px 20px 18px; }
.step-card span {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--highlight);
  font-weight: 800;
  font-size: 18px;
}
.step-card p, .text-card p, .text-card li, .arch-card p, .arch-card li, .support-block p, .support-block li,
.flow-node p, .translation-col p, .arch-sim-card p {
  line-height: 1.74;
}
.step-arrow, .flow-arrow, .translation-divider {
  color: var(--highlight);
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  align-self: center;
}
.label {
  margin: 0 0 10px;
  color: var(--gold);
  font-weight: 700;
}
.text-card ul, .arch-card ul, .support-block ul {
  margin: 0;
  padding-left: 18px;
}
.accent-surface { background: var(--surface-2); }
.recon-card { position: relative; overflow: hidden; }
.recon-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(159,197,127,.05), rgba(255,255,255,0) 60%);
  pointer-events: none;
}
.board-title {
  margin-bottom: 14px;
  color: var(--gold);
}
.html-infographic {
  background: linear-gradient(180deg, rgba(24,32,42,.96), rgba(18,25,33,.96));
}
.excavator-flow, .translation-row {
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
}
.flow-node, .translation-col, .arch-sim-card {
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}
.flow-node span, .translation-col span, .arch-sim-card span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--highlight);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.architecture-grid-sim { grid-template-columns: 1fr 1fr; }
.arch-sim-card.wide { grid-column: 1 / -1; }
.accent-node {
  border-color: rgba(159,197,127,.26);
  box-shadow: 0 0 0 1px rgba(159,197,127,.1) inset;
}
.proof-board { padding: 16px; }
.proof-board-grid { grid-template-columns: 1fr 1fr; }
.validation-grid {
  grid-template-columns: 1fr 1fr;
}
.triad-board {
  min-height: 100%;
}
.validation-gate {
  grid-column: 1 / -1;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}
.validation-item {
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}
.validation-item span,
.validation-gate span,
.batch-lane span,
.metric-card strong,
.selection-col span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--highlight);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.batch-lanes {
  grid-template-columns: repeat(3, minmax(0,1fr));
}
.batch-lane,
.metric-card,
.selection-col {
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}
.batch-metrics {
  grid-template-columns: repeat(3, minmax(0,1fr));
}
.metric-card span {
  display: block;
  color: var(--muted);
  line-height: 1.65;
}
.selection-columns {
  grid-template-columns: repeat(3, minmax(0,1fr));
}

.proof-chip {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  overflow: hidden;
}
.proof-chip img {
  width: 100%;
  aspect-ratio: 1.35 / 1;
  object-fit: cover;
}
.proof-chip figcaption {
  padding: 8px 10px 10px;
  font-size: 10px;
}
.intake-live-frame {
  align-self: stretch;
  display: flex;
}
.intake-live-frame iframe {
  width: 100%;
  min-height: 100%;
  height: 100%;
  border: 0;
  background: #0f1115;
  border-radius: 22px;
}
.img-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
}
.infographic-card {
  width: 100%;
  max-width: 100%;
  margin: 0;
  justify-self: stretch;
  align-self: start;
}
.infographic-card img {
  width: 100%;
  max-height: 560px;
  aspect-ratio: auto;
  object-fit: contain;
  background: #0d1218;
  padding: 14px;
}
.fullwidth-infographic {
  width: 100%;
  max-width: 100%;
}
.compact-infographic {
  justify-self: stretch;
  align-self: start;
}
figcaption { padding: 12px 14px 14px; }
.gallery-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.gallery-filter {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.gallery-filter.active {
  background: rgba(159,197,127,.12);
  border-color: rgba(159,197,127,.28);
  color: var(--highlight);
}
.gallery-showcase {
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  align-items: start;
  margin-top: 18px;
}
.gallery-hero {
  max-width: 660px;
}
.gallery-hero img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.gallery-aside { display: grid; gap: 18px; }
.gallery-thumbs {
  grid-template-columns: repeat(5, minmax(0,1fr));
  margin-top: 18px;
}
.gallery-thumb {
  padding: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  color: var(--text);
  overflow: hidden;
  cursor: pointer;
}
.gallery-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.gallery-thumb span {
  display: block;
  padding: 10px 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}
.gallery-thumb.active {
  border-color: rgba(159,197,127,.34);
  box-shadow: 0 0 0 1px rgba(159,197,127,.12) inset;
}
.gallery-thumb.is-hidden { display: none; }
.support-block {
  display: none;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(255,122,122,.38);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,122,122,.10), rgba(255,122,122,.04));
  box-shadow: 0 0 0 1px rgba(255,122,122,.10) inset, 0 18px 40px rgba(120, 10, 10, 0.12);
}
.support-block p, .support-block li { color: #ffd7d7; }
.support-block strong { color: #ffb0b0; }
body.support-on .support-block { display: block; }
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 560ms ease, transform 560ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 1260px) {
  body { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .main {
    padding: 26px 24px 110px;
    gap: 24px;
  }
  .panel {
    min-height: auto;
    padding: 24px 20px 28px;
  }
  .layout-two-col,
  .triad-layout,
  .intake-layout,
  .architecture-layout,
  .gallery-showcase,
  .compact-arch-grid,
  .principle-grid,
  .proof-board-grid,
  .gallery-thumbs,
  .excavator-flow,
  .translation-row,
  .architecture-grid-sim,
  .validation-grid,
  .batch-lanes,
  .batch-metrics,
  .selection-columns {
    grid-template-columns: 1fr;
  }
  .step-arrow, .flow-arrow, .translation-divider { display: none; }
  .infographic-card,
  .gallery-hero { max-width: 100%; }
}
