:root {
  color-scheme: dark;
  --bg: #07110f;
  --bg-elevated: #0b1714;
  --panel: rgba(14, 29, 25, 0.86);
  --panel-solid: #0d1d19;
  --panel-soft: #10241f;
  --text: #f1f6f2;
  --muted: #9db0a8;
  --faint: #63776f;
  --line: rgba(184, 214, 200, 0.14);
  --line-strong: rgba(184, 214, 200, 0.25);
  --accent: #87f7b1;
  --accent-strong: #3ee989;
  --accent-soft: rgba(91, 242, 151, 0.12);
  --blue: #72b7ff;
  --orange: #ffb46b;
  --violet: #bc9aff;
  --red: #ff7d7d;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
  --radius: 26px;
  --radius-small: 15px;
  --max-width: 1240px;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f7f3;
  --bg-elevated: #ecf3ed;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-solid: #ffffff;
  --panel-soft: #eaf3ec;
  --text: #102019;
  --muted: #52675d;
  --faint: #7d9087;
  --line: rgba(21, 57, 40, 0.12);
  --line-strong: rgba(21, 57, 40, 0.22);
  --accent: #167745;
  --accent-strong: #0b8d49;
  --accent-soft: rgba(10, 139, 72, 0.1);
  --blue: #166bc2;
  --orange: #b75a10;
  --violet: #7551c6;
  --red: #c44242;
  --shadow: 0 30px 90px rgba(29, 62, 45, 0.13);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(59, 228, 132, 0.06), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(150, 194, 174, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 194, 174, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

code,
pre {
  font-family: var(--font-mono);
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(calc(100% - 32px), var(--max-width));
  min-height: 62px;
  padding: 8px 10px 8px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(18px) saturate(140%);
  transform: translateX(-50%);
  transition: border-color 180ms ease, background 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-size: 0.91rem;
  font-weight: 730;
  letter-spacing: -0.015em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(102, 246, 159, 0.34);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--muted);
  font-size: 0.83rem;
}

.desktop-nav a,
.site-footer a {
  transition: color 160ms ease;
}

.desktop-nav a:hover,
.site-footer a:hover {
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.language-toggle,
.theme-toggle,
.menu-toggle {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.language-toggle {
  width: auto;
  min-width: 48px;
  padding: 0 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 700;
}

.language-toggle:hover,
.theme-toggle:hover,
.menu-toggle:hover {
  border-color: var(--line-strong);
  background: var(--panel-soft);
}

.theme-icon {
  color: var(--muted);
  font-size: 1.05rem;
  transform: rotate(-20deg);
}

.menu-toggle,
.mobile-nav {
  display: none;
}

.button {
  display: inline-flex;
  min-height: 49px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 0.88rem;
  font-weight: 700;
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease, color 170ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button span {
  font-size: 1rem;
  transition: transform 170ms ease;
}

.button:hover span {
  transform: translate(2px, -2px);
}

.button-primary {
  background: var(--accent);
  color: #07110f;
  box-shadow: 0 12px 34px rgba(53, 221, 123, 0.17);
}

html[data-theme="light"] .button-primary {
  color: #fff;
}

.button-secondary,
.button-ghost {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  color: var(--text);
}

.button-secondary:hover,
.button-ghost:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: var(--accent-soft);
}

.button-small {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 12px;
  font-size: 0.79rem;
}

.section {
  position: relative;
  width: min(calc(100% - 48px), var(--max-width));
  margin: 0 auto;
  padding: 112px 0;
}

.section-narrow {
  width: min(calc(100% - 48px), 960px);
}

.hero {
  display: grid;
  min-height: 870px;
  grid-template-columns: minmax(0, 0.94fr) minmax(520px, 1.06fr);
  align-items: center;
  gap: 62px;
  padding-top: 160px;
  padding-bottom: 90px;
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 2;
}

.hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
}

.hero-glow-one {
  top: 70px;
  right: -220px;
  width: 690px;
  height: 690px;
  background: radial-gradient(circle, rgba(48, 230, 124, 0.13), transparent 68%);
}

.hero-glow-two {
  bottom: 0;
  left: -360px;
  width: 580px;
  height: 580px;
  background: radial-gradient(circle, rgba(84, 166, 255, 0.07), transparent 70%);
}

.eyebrow,
.section-kicker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft), 0 0 24px var(--accent);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin: 25px 0 26px;
  font-size: clamp(3.5rem, 5.35vw, 5.35rem);
  font-weight: 680;
  letter-spacing: -0.065em;
  line-height: 0.99;
}

h1 em {
  color: var(--accent);
  font-style: normal;
}

h2 {
  margin-bottom: 22px;
  font-size: clamp(2.35rem, 4.1vw, 4.1rem);
  font-weight: 650;
  letter-spacing: -0.052em;
  line-height: 1.04;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.22rem;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.hero-lede {
  max-width: 650px;
  margin-bottom: 33px;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.4vw, 1.18rem);
  line-height: 1.72;
}

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

.paper-credits {
  max-width: 680px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.paper-credits p {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.6;
}

.paper-credits small {
  color: var(--faint);
  font-size: 0.62rem;
}

.hero-meta {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 48px;
}

.hero-meta div {
  display: flex;
  min-width: 100px;
  flex-direction: column;
  padding: 0 22px;
  border-left: 1px solid var(--line-strong);
}

.hero-meta div:first-child {
  padding-left: 0;
  border-left: 0;
}

.hero-meta strong {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  line-height: 1.2;
}

.hero-meta span {
  margin-top: 4px;
  color: var(--faint);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

.hero-visual {
  perspective: 1200px;
}

.terminal-card {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: color-mix(in srgb, var(--panel-solid) 92%, transparent);
  box-shadow: var(--shadow);
  transform: rotateY(-2deg) rotateX(1deg);
}

.terminal-card::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
  content: "";
  pointer-events: none;
}

.terminal-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 54px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

.live-pill {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 7px;
  color: var(--accent);
}

.live-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.terminal-body {
  padding: 23px 22px 18px;
}

.lineage-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.75rem;
}

.lineage-heading code {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--faint);
  font-size: 0.65rem;
}

.lineage {
  position: relative;
  min-height: 430px;
  padding: 12px 0;
}

.lineage-spine {
  position: absolute;
  top: 30px;
  bottom: 28px;
  left: 31px;
  width: 2px;
  background: linear-gradient(var(--faint), var(--accent));
  opacity: 0.58;
}

.commit {
  position: absolute;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 22px;
  padding-left: 25px;
}

.commit > i {
  z-index: 2;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 3px solid var(--panel-solid);
  border-radius: 50%;
  background: var(--faint);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.commit-base { top: 10px; }
.commit-one { top: 121px; }
.commit-branch { top: 224px; left: 93px; }
.commit-two { top: 328px; }

.commit-one > i,
.commit-two > i {
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(100, 244, 156, 0.48), 0 0 18px rgba(73, 239, 139, 0.24);
}

.commit-branch > i {
  background: var(--orange);
}

.branch-line {
  position: absolute;
  top: 165px;
  left: 31px;
  width: 98px;
  height: 88px;
  border-bottom: 2px solid rgba(255, 180, 107, 0.5);
  border-left: 2px solid rgba(255, 180, 107, 0.5);
  border-radius: 0 0 0 28px;
}

.commit-card {
  display: grid;
  width: min(100%, 435px);
  grid-template-columns: 1fr auto;
  gap: 2px 20px;
  align-items: center;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--panel-soft) 74%, transparent);
}

.commit-card strong {
  grid-row: span 2;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1.12rem;
}

.commit-card small {
  color: var(--faint);
  font-size: 0.67rem;
}

.commit-id {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.commit-card-best {
  border-color: rgba(73, 236, 138, 0.35);
  background: var(--accent-soft);
}

.commit-card-best strong {
  color: var(--accent);
}

.commit-card-muted {
  width: min(100%, 335px);
  border-color: rgba(255, 180, 107, 0.2);
}

.commit-card-muted strong {
  color: var(--orange);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.artifact-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px 15px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--bg) 42%, transparent);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.63rem;
}

.artifact-strip span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.artifact-strip b {
  font-weight: inherit;
}

.artifact-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.green { background: var(--accent); }
.blue { background: var(--blue); }
.orange { background: var(--orange); }
.violet { background: var(--violet); }

.visual-note {
  margin-top: 12px;
  color: var(--faint);
  font-size: 0.7rem;
  text-align: center;
}

.thesis {
  padding-top: 150px;
  padding-bottom: 150px;
  text-align: center;
}

.thesis::before,
.thesis::after {
  position: absolute;
  top: 50%;
  width: 13%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong));
  content: "";
}

.thesis::before { left: -17%; }
.thesis::after { right: -17%; transform: rotate(180deg); }

.thesis h2 {
  margin-top: 22px;
}

.thesis > p:last-child {
  max-width: 790px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.06rem;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  align-items: end;
  gap: 70px;
  margin-bottom: 52px;
}

.section-heading h2 {
  max-width: 780px;
  margin: 15px 0 0;
}

.section-heading > p {
  margin-bottom: 8px;
  color: var(--muted);
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.level-card {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, color-mix(in srgb, var(--panel) 88%, transparent), color-mix(in srgb, var(--panel-soft) 58%, transparent));
  transition: border-color 180ms ease, transform 180ms ease;
}

.level-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-5px);
}

.level-card::before {
  position: absolute;
  top: -130px;
  right: -110px;
  width: 270px;
  height: 270px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--level-color), transparent 70%);
  content: "";
  opacity: 0.12;
}

.level-one { --level-color: var(--blue); }
.level-two { --level-color: var(--violet); }
.level-three { --level-color: var(--accent); }

.level-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.level-topline span {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--level-color) 38%, transparent);
  border-radius: 13px;
  background: color-mix(in srgb, var(--level-color) 10%, transparent);
  color: var(--level-color);
  font-family: var(--font-mono);
  font-size: 0.79rem;
  font-weight: 800;
}

.level-topline small {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.level-icon {
  display: flex;
  height: 150px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 18px 0;
  color: var(--faint);
  font-family: var(--font-mono);
}

.level-icon > span:not(.icon-arrow) {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  background: var(--panel-soft);
}

.level-icon .icon-check {
  border-color: color-mix(in srgb, var(--level-color) 35%, transparent) !important;
  color: var(--level-color);
}

.icon-arrow {
  color: var(--level-color);
}

.judge-icon {
  position: relative;
}

.judge-icon i {
  width: 38px;
  height: 1px;
  background: var(--line-strong);
}

.judge-icon b {
  position: absolute;
  bottom: 16px;
  padding: 4px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--level-color) 11%, transparent);
  color: var(--level-color);
  font-size: 0.62rem;
  font-weight: 700;
}

.loop-icon {
  gap: 9px;
}

.loop-icon > span {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
  color: var(--level-color);
  font-size: 0.68rem;
}

.loop-icon i {
  color: var(--level-color);
  font-size: 1.15rem;
  font-style: normal;
}

.level-card p {
  min-height: 79px;
  color: var(--muted);
  font-size: 0.91rem;
}

.task-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 24px;
}

.task-list span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.63rem;
}

.workflow-shell {
  display: grid;
  overflow: hidden;
  grid-template-columns: 0.75fr 1.18fr 0.8fr;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.workflow-shell > div {
  min-height: 460px;
  padding: 23px;
  border-right: 1px solid var(--line);
}

.workflow-shell > div:last-child {
  border-right: 0;
}

.panel-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.panel-label span {
  color: var(--accent);
  font-family: var(--font-mono);
}

.folder-tree {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 43px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.folder-tree > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.folder-tree .indent {
  padding-left: 25px;
  color: var(--muted);
}

.folder-tree small {
  margin-left: auto;
  color: var(--faint);
  font-size: 0.55rem;
}

.folder,
.file {
  position: relative;
  width: 15px;
  height: 12px;
  flex: 0 0 auto;
  border: 1px solid var(--faint);
  border-radius: 2px;
}

.folder::before {
  position: absolute;
  top: -4px;
  left: 1px;
  width: 6px;
  height: 3px;
  border: 1px solid var(--faint);
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
  content: "";
}

.file {
  width: 12px;
  height: 15px;
}

.folder.accent,
.folder.accent::before,
.file.score {
  border-color: var(--accent);
}

.cycle-panel {
  background: color-mix(in srgb, var(--panel-soft) 46%, transparent);
}

.cycle-diagram {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 340px;
  margin: 38px auto 0;
}

.cycle-diagram svg {
  position: absolute;
  inset: 8px 0 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.cycle-diagram path {
  fill: none;
  stroke: var(--line-strong);
  stroke-dasharray: 5 5;
  stroke-width: 1.4;
}

.cycle-center {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: flex;
  width: 112px;
  height: 112px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(88, 240, 148, 0.34);
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: 0 0 50px rgba(70, 230, 135, 0.08);
  transform: translate(-50%, -50%);
}

.cycle-center span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
}

.cycle-center strong {
  color: var(--accent);
  font-size: 0.82rem;
}

.cycle-node {
  position: absolute;
  z-index: 3;
  display: flex;
  min-width: 90px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-solid);
  color: var(--muted);
  font-size: 0.7rem;
}

.cycle-node b {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.58rem;
}

.node-inspect { top: 11px; left: 20px; }
.node-train { top: 51px; right: 5px; }
.node-submit { right: 0; bottom: 35px; }
.node-revise { bottom: 0; left: 28px; }

.api-block {
  margin-top: 43px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
}

.api-block > div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.method {
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 800;
}

.api-block code {
  color: var(--muted);
  font-size: 0.72rem;
}

.api-block pre {
  margin: 0;
  padding: 17px 14px;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.85;
}

.grader-panel > p {
  margin-top: 24px;
  color: var(--faint);
  font-size: 0.78rem;
}

.findings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.finding-card {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  padding: 29px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.finding-feature {
  grid-row: span 2;
  min-height: 616px;
  background:
    radial-gradient(circle at 80% 15%, rgba(76, 237, 140, 0.13), transparent 19rem),
    var(--panel);
}

.finding-label {
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid rgba(76, 237, 140, 0.26);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  text-transform: uppercase;
}

.score-jump {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: center;
  gap: 14px;
  margin: 82px 0 78px;
}

.score-jump > div:not(.score-arrow) {
  display: flex;
  flex-direction: column;
}

.score-jump span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  text-transform: uppercase;
}

.score-jump strong {
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 4vw, 3.45rem);
  letter-spacing: -0.06em;
  line-height: 1.1;
}

.score-jump > div:last-child {
  align-items: flex-end;
}

.score-jump > div:last-child strong {
  color: var(--accent);
}

.score-arrow {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-arrow i {
  position: relative;
  width: 100%;
  height: 1px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, var(--line-strong), var(--accent));
}

.score-arrow i::after {
  position: absolute;
  top: -3px;
  right: 0;
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
  content: "";
  transform: rotate(45deg);
}

.finding-card p {
  max-width: 530px;
  color: var(--muted);
  font-size: 0.92rem;
}

.finding-index {
  margin-bottom: 48px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.route-patterns {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.route-patterns > div {
  display: grid;
  grid-template-columns: 9px 1fr;
  gap: 11px;
  align-items: center;
}

.route-patterns > div > i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.route-patterns > div:last-child > i { background: var(--blue); }

.route-patterns span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--panel-soft) 68%, transparent);
}

.route-patterns small {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  text-transform: uppercase;
}

.route-patterns strong {
  color: var(--muted);
  font-size: 0.7rem;
}

.signal-lines {
  display: flex;
  height: 57px;
  align-items: end;
  gap: 8px;
  margin-top: 26px;
}

.signal-lines i {
  width: 14%;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(var(--blue), rgba(114, 183, 255, 0.08));
}

.signal-lines i:nth-child(1) { height: 18%; }
.signal-lines i:nth-child(2) { height: 62%; }
.signal-lines i:nth-child(3) { height: 31%; }
.signal-lines i:nth-child(4) { height: 94%; }
.signal-lines i:nth-child(5) { height: 48%; }

.hard-loop {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 29px;
}

.hard-loop span {
  padding: 7px 10px;
  border: 1px solid rgba(255, 125, 125, 0.2);
  border-radius: 8px;
  background: rgba(255, 125, 125, 0.06);
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 0.61rem;
}

.hard-loop span + span::before {
  margin-right: 8px;
  color: var(--faint);
  content: "→";
}

.audit {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(550px, 1.2fr);
  align-items: center;
  gap: 80px;
}

.audit-copy > p:not(.section-kicker) {
  color: var(--muted);
}

.audit-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.audit-list li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 15px;
  padding: 19px 0;
  border-top: 1px solid var(--line);
}

.audit-list li > span {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.63rem;
}

.audit-list div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.audit-list strong {
  font-size: 0.88rem;
}

.audit-list small {
  color: var(--faint);
  font-size: 0.74rem;
}

.audit-list code {
  color: var(--muted);
}

.trace-window {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 21px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.trace-tabs {
  display: flex;
  gap: 24px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.trace-tabs b {
  align-self: center;
  margin-left: auto;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  font-weight: 650;
  text-transform: uppercase;
}

.trace-tabs span {
  position: relative;
  padding: 15px 0 13px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.63rem;
}

.trace-tabs .active {
  color: var(--text);
}

.trace-tabs .active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--accent);
  content: "";
}

.trace-content {
  padding: 16px 20px;
}

.trace-row {
  position: relative;
  display: grid;
  grid-template-columns: 42px 10px 1fr;
  gap: 13px;
  align-items: start;
  min-height: 77px;
}

.trace-row:not(:last-child)::after {
  position: absolute;
  top: 23px;
  bottom: 0;
  left: 59px;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.trace-row > span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.58rem;
}

.trace-row > i {
  z-index: 1;
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border: 2px solid var(--panel-solid);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-strong);
}

.trace-green { background: var(--accent); }
.trace-red { background: var(--red); }
.trace-blue { background: var(--blue); }

.trace-row div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.trace-row strong {
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 650;
}

.trace-row small {
  color: var(--faint);
  font-size: 0.67rem;
}

.trace-footer {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.57rem;
}

.task-matrix {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 21px;
  background: var(--panel);
}

.matrix-head,
.matrix-row {
  display: grid;
  grid-template-columns: 0.55fr 0.82fr 1fr 1.65fr;
  gap: 20px;
  align-items: center;
  padding: 17px 22px;
}

.matrix-head {
  border-bottom: 1px solid var(--line-strong);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.61rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.matrix-row {
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  transition: background 150ms ease;
}

.matrix-row:last-child {
  border-bottom: 0;
}

.matrix-row:hover {
  background: var(--accent-soft);
}

.matrix-row > span:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.matrix-row strong {
  color: var(--text);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot.l1 { background: var(--blue); }
.dot.l2 { background: var(--violet); }
.dot.l3 { background: var(--accent); }

.cta {
  min-height: 520px;
  overflow: hidden;
  margin-top: 100px;
  padding: 105px 48px;
  border: 1px solid rgba(84, 240, 146, 0.24);
  border-radius: 32px;
  background:
    linear-gradient(125deg, rgba(53, 214, 116, 0.09), transparent 55%),
    var(--panel-solid);
  text-align: center;
}

.cta h2 {
  margin: 19px 0;
  font-size: clamp(2.8rem, 5.1vw, 5.3rem);
}

.cta > p:not(.section-kicker) {
  max-width: 650px;
  margin: 0 auto 30px;
  color: var(--muted);
}

.cta-actions {
  justify-content: center;
}

.cta-orbit {
  position: absolute;
  border: 1px solid rgba(91, 239, 150, 0.14);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-one {
  top: -310px;
  left: 50%;
  width: 800px;
  height: 800px;
  transform: translateX(-50%);
}

.orbit-two {
  top: -175px;
  left: 50%;
  width: 540px;
  height: 540px;
  transform: translateX(-50%);
}

.citation {
  padding-bottom: 130px;
}

.citation-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.citation-heading h2 {
  margin: 10px 0 0;
  font-size: 2.1rem;
}

.copy-button {
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  cursor: pointer;
}

.copy-button:hover {
  border-color: rgba(83, 235, 143, 0.32);
  color: var(--accent);
}

.citation pre {
  margin: 24px 0 0;
  overflow-x: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.71rem;
  line-height: 1.75;
}

.site-footer {
  display: grid;
  width: min(calc(100% - 48px), var(--max-width));
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 25px;
  margin: 0 auto;
  padding: 33px 0 45px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.72rem;
}

.site-footer p {
  margin: 0;
  text-align: center;
}

.site-footer > div {
  display: flex;
  justify-self: end;
  gap: 22px;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal[data-delay="1"] { transition-delay: 90ms; }
.reveal[data-delay="2"] { transition-delay: 180ms; }
.reveal[data-delay="3"] { transition-delay: 270ms; }

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

html[data-language="zh"] body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", var(--font-sans);
}

html[data-language="zh"] h1,
html[data-language="zh"] h2,
html[data-language="zh"] h3 {
  letter-spacing: -0.04em;
}

html[data-language="zh"] h1 {
  max-width: 760px;
  line-height: 1.08;
}

html[data-language="zh"] .section-kicker,
html[data-language="zh"] .eyebrow {
  letter-spacing: 0.045em;
}

@media (max-width: 1080px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 175px;
  }

  .hero-copy {
    max-width: 850px;
  }

  .hero-visual {
    width: min(100%, 760px);
    margin: 10px auto 0;
  }

  .terminal-card {
    transform: none;
  }

  .workflow-shell {
    grid-template-columns: 1fr 1.25fr;
  }

  .workflow-shell > div:nth-child(2) {
    border-right: 0;
  }

  .grader-panel {
    grid-column: 1 / -1;
    min-height: auto !important;
    border-top: 1px solid var(--line);
  }

  .audit {
    grid-template-columns: 1fr;
  }

  .audit-copy {
    max-width: 800px;
  }

  .audit-visual {
    width: min(100%, 800px);
  }
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .desktop-nav,
  .button-ghost {
    display: none;
  }

  .menu-toggle {
    display: grid;
    gap: 5px;
  }

  .menu-toggle span {
    width: 16px;
    height: 1px;
    background: var(--muted);
    transition: transform 180ms ease;
  }

  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(3px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-3px) rotate(-45deg);
  }

  .mobile-nav {
    position: absolute;
    top: 70px;
    right: 0;
    left: 0;
    display: flex;
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    gap: 0;
    border: 1px solid transparent;
    border-radius: 15px;
    background: var(--panel-solid);
    opacity: 0;
    transition: max-height 220ms ease, opacity 180ms ease, border-color 180ms ease;
  }

  .mobile-nav.is-open {
    max-height: 330px;
    border-color: var(--line-strong);
    box-shadow: var(--shadow);
    opacity: 1;
  }

  .mobile-nav a {
    padding: 13px 17px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.83rem;
  }

  .mobile-nav a:last-child {
    border-bottom: 0;
    color: var(--accent);
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .level-grid {
    grid-template-columns: 1fr;
  }

  .level-card {
    min-height: 405px;
  }

  .level-card p {
    min-height: auto;
  }

  .findings-grid {
    grid-template-columns: 1fr;
  }

  .finding-feature {
    grid-row: auto;
    min-height: 540px;
  }

  .matrix-head {
    display: none;
  }

  .matrix-row {
    grid-template-columns: 72px 1fr;
    gap: 8px 16px;
  }

  .matrix-row > span:nth-child(3),
  .matrix-row > span:nth-child(4) {
    grid-column: 2;
  }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .site-footer > div {
    justify-self: center;
  }
}

@media (max-width: 650px) {
  .section,
  .section-narrow,
  .site-footer {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .section {
    padding: 78px 0;
  }

  .site-header {
    top: 9px;
    width: calc(100% - 18px);
    min-height: 57px;
    padding-left: 12px;
  }

  .brand > span:last-child {
    font-size: 0.78rem;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
  }

  .language-toggle,
  .theme-toggle,
  .menu-toggle {
    width: 38px;
    height: 38px;
  }

  .language-toggle {
    min-width: 43px;
    padding: 0 8px;
  }

  .hero {
    display: block;
    padding-top: 132px;
  }

  h1 {
    font-size: clamp(3.05rem, 15vw, 4.25rem);
  }

  h2 {
    font-size: clamp(2.15rem, 10.5vw, 3.2rem);
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 0;
  }

  .hero-meta div,
  .hero-meta div:first-child {
    padding-left: 15px;
    border-left: 1px solid var(--line-strong);
  }

  .hero-visual {
    margin-top: 65px;
  }

  .terminal-body {
    padding: 17px 12px 12px;
  }

  .terminal-bar {
    grid-template-columns: 1fr auto;
  }

  .terminal-dots {
    display: none;
  }

  .commit {
    padding-left: 11px;
    gap: 11px;
  }

  .lineage-spine {
    left: 17px;
  }

  .commit-branch {
    left: 30px;
  }

  .branch-line {
    left: 17px;
    width: 42px;
  }

  .commit-card {
    padding: 12px;
  }

  .commit-card small {
    max-width: 145px;
  }

  .artifact-strip {
    grid-template-columns: 1fr;
  }

  .thesis {
    padding-top: 110px;
    padding-bottom: 110px;
  }

  .thesis h2 br {
    display: none;
  }

  .level-card {
    padding: 21px;
  }

  .workflow-shell {
    display: block;
  }

  .workflow-shell > div {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workflow-shell > div:last-child {
    border-bottom: 0;
  }

  .cycle-panel {
    min-height: 460px !important;
  }

  .cycle-diagram {
    transform: scale(0.83);
    transform-origin: center top;
  }

  .finding-card {
    padding: 22px;
  }

  .finding-feature {
    min-height: 475px;
  }

  .score-jump {
    margin: 60px 0;
  }

  .score-jump strong {
    font-size: 2rem;
  }

  .audit {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .trace-tabs {
    gap: 14px;
  }

  .trace-row {
    grid-template-columns: 36px 9px 1fr;
    gap: 8px;
  }

  .trace-row:not(:last-child)::after {
    left: 48px;
  }

  .trace-footer {
    flex-direction: column;
    gap: 5px;
  }

  .matrix-row {
    padding: 15px;
    font-size: 0.75rem;
  }

  .cta {
    width: calc(100% - 28px);
    min-height: 480px;
    margin-top: 55px;
    padding: 78px 20px;
  }

  .cta-actions .button {
    width: 100%;
  }

  .citation-heading {
    align-items: start;
    flex-direction: column;
  }

  .citation pre {
    padding: 17px;
    font-size: 0.61rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
