/* TRACE BENCH: warm editorial research interface. */

:root {
  --bg: #f4ede2;
  --bg-rgb: 244, 237, 226;
  --bg-card: rgba(255, 252, 246, 0.72);
  --bg-card-h: rgba(255, 252, 246, 0.94);
  --surface: #ebe3d2;
  --surface-2: #e2d9c6;
  --paper: #fffaf1;
  --paper-rgb: 255, 250, 241;
  --text: #2b2118;
  --text-dim: #5c4f42;
  --text-muted: #746557;
  --accent: #a94d2f;
  --accent-rgb: 169, 77, 47;
  --accent2: #6f7f5f;
  --accent2-rgb: 111, 127, 95;
  --accent3: #d4a574;
  --accent3-rgb: 212, 165, 116;
  --fail: #aa4f46;
  --pending: #9a8b79;
  --border: rgba(72, 54, 38, 0.14);
  --border-strong: rgba(72, 54, 38, 0.24);
  --gradient: linear-gradient(135deg, #c15f3c, #a64c32);
  --gradient-subtle: linear-gradient(135deg, rgba(193, 95, 60, 0.12), rgba(111, 127, 95, 0.08));
  --font-display: 'Source Serif 4', 'Noto Sans SC', Georgia, serif;
  --font-body: 'IBM Plex Sans', 'Noto Sans SC', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --max-w: 1220px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 0.3s var(--ease);
}

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(80, 60, 40, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 60, 40, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
}

section {
  scroll-margin-top: 76px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.navbar.scrolled {
  border-bottom: 1px solid var(--border);
  background: rgba(var(--bg-rgb), 0.92);
  box-shadow: 0 10px 40px rgba(43, 33, 24, 0.05);
}

.navbar__logo-text {
  color: var(--text);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: var(--text);
  letter-spacing: 0.02em;
}

.navbar__logo-img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  object-fit: contain;
}

.navbar__links a {
  color: var(--text-dim);
}

.lang-switch {
  background: rgba(43, 33, 24, 0.06);
  border: 1px solid var(--border);
}

.section-header--left {
  max-width: 820px;
  text-align: left;
}

.section-header--left .section-sub {
  margin-left: 0;
}

.section-tag {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
}

.section-title {
  color: var(--text);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: var(--text);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.section-sub {
  color: var(--text-dim);
}

.btn--glass {
  color: var(--text);
  background: rgba(var(--paper-rgb), 0.72);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.btn--glass:hover {
  background: var(--paper);
  border-color: var(--border-strong);
}

.btn--ghost {
  color: var(--text-dim);
  border-color: var(--border);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

/* Hero */
.hero {
  min-height: 900px;
  gap: clamp(24px, 4vw, 72px);
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: 'ROLE / REQUIREMENT / EVIDENCE / STATE';
  position: absolute;
  top: 104px;
  right: -70px;
  color: rgba(43, 33, 24, 0.055);
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.4em;
  transform: rotate(90deg);
}

.hero__particles::before,
.hero__particles::after {
  opacity: 0.08;
}

.hero__content {
  max-width: 620px;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__eyebrow-rule {
  width: 36px;
  height: 1px;
  background: var(--border-strong);
}

.hero__title {
  margin-bottom: 24px;
}

.hero__title-line--1,
.hero__title-line--2 {
  font-family: var(--font-display);
  font-size: clamp(4rem, 8vw, 7.2rem);
  font-weight: 700;
  letter-spacing: -0.075em;
}

.hero__title-line--1 {
  color: var(--accent);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: var(--accent);
}

.hero__title-line--2 {
  margin-top: -0.18em;
}

.hero__subtitle {
  max-width: 540px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 600;
  line-height: 1.4;
}

.hero__desc {
  max-width: 570px;
  color: var(--text-dim);
  font-size: 1rem;
}

.hero__btns {
  margin-bottom: 36px;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid var(--border);
}

.hero__stat {
  min-width: 132px;
  padding: 20px 28px 0 0;
  margin-right: 28px;
  border-right: 1px solid var(--border);
}

.hero__stat:last-child {
  margin-right: 0;
  border-right: 0;
}

.hero__stat-num {
  display: block;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.hero__stat-label {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__visual {
  max-width: 660px;
}

.hero__img-wrapper {
  width: 100%;
  max-width: 620px;
  overflow: hidden;
  background: rgba(var(--paper-rgb), 0.88);
  border: 1px solid var(--border-strong);
  box-shadow:
    0 24px 70px rgba(43, 33, 24, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.hero__scroll {
  bottom: 24px;
}

/* Live trace */
.trace-console {
  font-family: var(--font-body);
}

.trace-console__topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 16px;
  color: var(--text-muted);
  background: rgba(43, 33, 24, 0.035);
  border-bottom: 1px solid var(--border);
  font-size: 0.68rem;
}

.trace-console__topbar > span:first-child {
  display: flex;
  gap: 5px;
}

.trace-console__topbar > span:first-child i {
  width: 7px;
  height: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
}

.trace-console__live {
  justify-self: end;
  color: var(--accent2);
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.trace-console__live::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  background: var(--accent2);
  border-radius: 50%;
}

.trace-console__dialogue {
  padding: 22px;
}

.trace-message {
  max-width: 84%;
}

.trace-message span {
  display: block;
  margin-bottom: 5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.trace-message p {
  padding: 12px 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px 13px 13px;
  font-size: 0.78rem;
  line-height: 1.55;
}

.trace-message--user {
  margin-left: auto;
  text-align: right;
}

.trace-message--user p {
  text-align: left;
  border-radius: 13px 4px 13px 13px;
}

.trace-message--target {
  margin-right: auto;
  text-align: left;
}

.trace-message--target p {
  text-align: left;
  background: rgba(var(--accent2-rgb), 0.08);
  border-color: rgba(var(--accent2-rgb), 0.22);
  border-radius: 4px 13px 13px;
}

.trace-connector {
  height: 32px;
  margin-right: 32px;
  margin-left: auto;
  border-right: 1px dashed var(--border-strong);
}

.trace-connector span {
  display: block;
  position: relative;
  top: 6px;
  right: 9px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  text-align: right;
}

.trace-tool {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  max-width: 88%;
  margin: 16px auto 0;
  padding: 11px 13px;
  background: rgba(var(--accent3-rgb), 0.11);
  border: 1px solid rgba(var(--accent3-rgb), 0.35);
  border-radius: var(--radius-xs);
}

.trace-tool__head {
  grid-column: 1 / -1;
  color: #8d6139;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.trace-tool__head i {
  margin-right: 6px;
}

.trace-tool code {
  color: var(--accent);
  font-size: 0.68rem;
}

.trace-tool small {
  color: var(--text-dim);
  font-size: 0.65rem;
  text-align: right;
}

.trace-console__tracker {
  padding: 14px 22px 20px;
  background: rgba(43, 33, 24, 0.025);
  border-top: 1px solid var(--border);
}

.trace-console__tracker > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 31px;
  padding: 5px 9px;
  color: var(--text-dim);
  border-bottom: 1px solid rgba(72, 54, 38, 0.07);
  font-family: var(--font-mono);
  font-size: 0.64rem;
}

.trace-console__tracker .trace-console__tracker-head {
  color: var(--text-muted);
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.trace-console__tracker .trace-console__highlight {
  background: rgba(var(--accent-rgb), 0.07);
  box-shadow: inset 2px 0 var(--accent);
}

.status {
  padding: 2px 7px;
  border-radius: 100px;
  font-style: normal;
}

.status--done {
  color: var(--accent2);
  background: rgba(var(--accent2-rgb), 0.1);
}

.status--progress {
  color: #9a683e;
  background: rgba(var(--accent3-rgb), 0.14);
}

.status--pending {
  color: var(--pending);
  background: rgba(140, 125, 110, 0.1);
}

/* Evidence */
.evidence {
  padding: 110px 0;
}

.evidence-grid {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, 0.75fr);
  gap: 16px;
}

.evidence-card {
  min-height: 250px;
  padding: 26px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(43, 33, 24, 0.04);
}

.evidence-card--hero {
  grid-row: span 2;
  min-height: 430px;
  background: var(--text);
  color: var(--paper);
}

.evidence-card__label {
  display: block;
  margin-bottom: 44px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.evidence-card__value {
  display: block;
  margin-bottom: 14px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1;
}

.evidence-card p {
  color: var(--text-dim);
  font-size: 0.84rem;
  line-height: 1.6;
}

.evidence-card__detail {
  display: block;
  margin-top: 22px;
  padding-top: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.63rem;
}

.coverage-compare {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: 16px;
}

.coverage-row__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.coverage-row__meta span {
  color: rgba(var(--paper-rgb), 0.68);
  font-size: 0.8rem;
}

.coverage-row__meta strong {
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1;
}

.coverage-track {
  height: 8px;
  margin: 15px 0 8px;
  overflow: hidden;
  background: rgba(var(--paper-rgb), 0.1);
  border-radius: 100px;
}

.coverage-track span {
  display: block;
  height: 100%;
  background: var(--accent3);
  border-radius: inherit;
}

.coverage-row--trace .coverage-track span {
  background: #98aa82;
}

.coverage-row small {
  color: rgba(var(--paper-rgb), 0.5);
  font-family: var(--font-mono);
  font-size: 0.6rem;
}

.evidence-card--hero .evidence-card__note {
  margin-top: 54px;
  padding-top: 18px;
  color: rgba(var(--paper-rgb), 0.6);
  border-top: 1px solid rgba(var(--paper-rgb), 0.12);
  font-size: 0.72rem;
}

/* Framework */
.framework {
  padding: 110px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.method-board {
  display: grid;
  grid-template-columns: 0.95fr 1.35fr 1fr;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(43, 33, 24, 0.08);
}

.method-stage {
  min-width: 0;
  padding: 26px;
  border-right: 1px solid var(--border);
}

.method-stage:nth-child(3) {
  border-right: 0;
}

.method-stage--loop {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.15fr 1.4fr 1.45fr;
  align-items: center;
  gap: 30px;
  border-top: 1px solid var(--border);
  border-right: 0;
  background: rgba(var(--accent2-rgb), 0.045);
}

.method-stage__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
}

.method-stage__num {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
}

.method-stage__kicker {
  display: block;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.method-stage h3 {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.25;
}

.method-stage__foot {
  margin-top: 20px;
  padding-top: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  text-align: center;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  color: var(--accent2);
  background: rgba(var(--accent2-rgb), 0.08);
  border: 1px solid rgba(var(--accent2-rgb), 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.method-arrow {
  width: 1px;
  height: 24px;
  margin: 0 auto;
  background: var(--border-strong);
}

.method-arrow span {
  display: block;
  width: 6px;
  height: 6px;
  border-right: 1px solid var(--text-muted);
  border-bottom: 1px solid var(--text-muted);
  transform: translate(-2px, 17px) rotate(45deg);
}

.mini-checklist {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.mini-checklist li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 7px;
  padding: 8px 10px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  font-size: 0.69rem;
}

.mini-checklist li:last-child {
  border-bottom: 0;
}

.mini-checklist li span:first-child {
  color: var(--accent2);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
}

.dialogue-demo {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.dialogue-line {
  max-width: 88%;
}

.dialogue-line--user {
  align-self: flex-end;
}

.dialogue-line--user > span {
  text-align: right;
}

.dialogue-line > span {
  display: block;
  margin-bottom: 3px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.55rem;
}

.dialogue-line p {
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px 10px 10px;
  font-size: 0.7rem;
  line-height: 1.5;
}

.dialogue-line--user p {
  border-radius: 10px 3px 10px 10px;
}

.dialogue-line--target {
  align-self: flex-start;
}

.dialogue-line--target p {
  background: rgba(var(--accent2-rgb), 0.08);
  border-color: rgba(var(--accent2-rgb), 0.22);
  border-radius: 3px 10px 10px;
}

.tracker-call {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 8px;
  padding: 9px 11px;
  background: rgba(var(--accent3-rgb), 0.12);
  border: 1px solid rgba(var(--accent3-rgb), 0.3);
  border-radius: var(--radius-xs);
}

.tracker-call span {
  color: #936b43;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  text-transform: uppercase;
}

.tracker-call .private-marker i {
  margin-right: 4px;
}

.tracker-call .private-marker > span {
  display: inline;
}

.tracker-call code {
  justify-self: end;
  color: var(--accent);
  font-size: 0.59rem;
}

.tracker-call small {
  grid-column: 1 / -1;
  color: var(--text-dim);
  font-size: 0.6rem;
}

.trace-table {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: rgba(43, 33, 24, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.trace-table > div {
  display: grid;
  grid-template-columns: 32px repeat(4, 1fr);
  place-items: center;
  min-height: 24px;
  font-family: var(--font-mono);
  font-size: 0.57rem;
}

.trace-table__head {
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.state-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
}

.state-dot--done {
  background: var(--accent2);
  border-color: var(--accent2);
}

.state-dot--progress {
  background: var(--accent3);
  border-color: var(--accent3);
}

.state-dot--failed {
  background: var(--fail);
  border-color: var(--fail);
}

.state-dot--pending {
  background: transparent;
}

.trace-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.55rem;
}

.trace-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.loop-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.loop-flow span {
  padding: 9px 11px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.65rem;
  text-align: center;
}

.loop-flow i {
  color: var(--accent);
  font-size: 0.7rem;
}

.method-stage--loop > p:not(.method-stage__foot) {
  color: var(--text-dim);
  font-size: 0.76rem;
  line-height: 1.6;
}

.method-stage--loop .method-stage__head,
.method-stage--loop .method-stage__foot {
  margin: 0;
}

/* State machine */
.state-machine {
  display: grid;
  grid-template-columns: 0.75fr 1.65fr;
  gap: 40px;
  margin-top: 64px;
  padding: 38px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.state-machine__intro .section-tag {
  margin-bottom: 12px;
}

.state-machine__intro h3,
.scoring__intro h3 {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.2;
}

.state-machine__intro p {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.state-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.state-flow__arrow {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.state-node,
.state-release {
  min-width: 118px;
  padding: 14px 12px;
  background: var(--paper);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  text-align: center;
}

.state-node strong,
.state-release strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.state-node span,
.state-release span {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.55rem;
}

.state-node--completed {
  border-color: rgba(var(--accent2-rgb), 0.4);
}

.state-node--failed {
  border-color: rgba(170, 79, 70, 0.4);
}

.state-node--abandoned {
  border-color: rgba(140, 125, 110, 0.45);
}

.state-terminal-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.state-release {
  color: var(--paper);
  background: var(--text);
  border-color: var(--text);
}

.state-release i {
  margin-bottom: 7px;
  color: var(--accent3);
}

.state-release span {
  color: rgba(var(--paper-rgb), 0.62);
}

/* Scoring */
.scoring {
  margin-top: 64px;
}

.scoring__intro {
  display: grid;
  grid-template-columns: 0.8fr 1.6fr;
  align-items: end;
  gap: 40px;
  margin-bottom: 24px;
}

.scoring__intro .section-tag {
  grid-column: 1;
  justify-self: start;
  margin-bottom: -28px;
}

.scoring__intro h3 {
  grid-column: 1;
  margin: 0;
}

.overall-formula {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 24px;
  background: var(--text);
  color: var(--paper);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.77rem;
}

.overall-formula > span {
  color: var(--accent3);
  font-size: 0.95rem;
  font-weight: 700;
}

.overall-formula em {
  font-style: normal;
}

.overall-formula b {
  color: rgba(var(--paper-rgb), 0.45);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.metric-grid article {
  min-height: 190px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.metric-weight {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.metric-grid h4 {
  margin: 22px 0 8px;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.metric-grid p {
  color: var(--text-dim);
  font-size: 0.73rem;
  line-height: 1.55;
}

/* Leaderboard */
.results {
  padding: 110px 0;
}

.leaderboard-shell {
  padding: 22px;
  background: rgba(var(--paper-rgb), 0.82);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 18px 60px rgba(43, 33, 24, 0.06);
}

.lb-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.lb-tabs,
.lb-tools,
.lb-view-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
}

.lb-tabs button,
.lb-view-toggle button {
  padding: 8px 14px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  transition: all var(--transition);
}

.lb-tabs button:hover,
.lb-tabs button.active,
.lb-view-toggle button:hover,
.lb-view-toggle button.active {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  border-color: rgba(var(--accent-rgb), 0.3);
}

.lb-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  background: rgba(43, 33, 24, 0.035);
  border: 1px solid var(--border);
  border-radius: 100px;
}

.lb-search i {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.lb-search input {
  width: 145px;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  font: 0.7rem var(--font-mono);
}

.lb-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.lb-rank-hint {
  margin: 12px 2px 16px;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.lb-rank-hint i {
  margin-right: 6px;
  color: var(--accent3);
}

.lb-loading,
.lb-empty {
  padding: 60px 20px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-align: center;
}

.lb-loading i {
  margin-right: 8px;
}

.lb-table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  scrollbar-color: rgba(43, 33, 24, 0.2) transparent;
  scrollbar-width: thin;
}

.lb-table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}

.lb-table th,
.lb-table td {
  padding: 10px 13px;
  border-bottom: 1px solid rgba(72, 54, 38, 0.08);
  font-size: 0.72rem;
  text-align: center;
  white-space: nowrap;
}

.lb-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface);
}

.lb-table th button {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
}

.lb-table th button i {
  width: 10px;
  margin-left: 4px;
  font-size: 0.55rem;
  opacity: 0.34;
}

.lb-table th button.active {
  color: var(--accent);
}

.lb-table th button.active i {
  opacity: 1;
}

.lb-table td {
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.lb-table th:first-child,
.lb-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 48px;
  background: var(--paper);
}

.lb-table th:first-child {
  z-index: 4;
  background: var(--surface);
}

.lb-table th:nth-child(2),
.lb-table td:nth-child(2) {
  position: sticky;
  left: 48px;
  z-index: 2;
  min-width: 190px;
  background: var(--paper);
  box-shadow: 8px 0 14px -14px rgba(43, 33, 24, 0.8);
  text-align: left;
}

.lb-table th:nth-child(2) {
  z-index: 4;
  background: var(--surface);
}

.lb-table .lb-model {
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
}

.lb-table .lb-overall {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.055);
  font-weight: 700;
}

.lb-table .lb-top td:first-child {
  color: var(--accent);
  font-weight: 700;
}

.lb-table .lb-top--1 td:first-child,
.lb-table .lb-top--1 td:nth-child(2) {
  background-color: var(--paper);
  background-image: linear-gradient(
    90deg,
    rgba(var(--accent3-rgb), 0.24),
    rgba(var(--accent-rgb), 0.06)
  );
}

.lb-table tbody tr:hover td {
  background-color: #f1e8d9;
}

.lb-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px;
}

.lb-chart-row {
  display: grid;
  grid-template-columns: 30px minmax(140px, 1fr) minmax(180px, 2.2fr) 56px;
  align-items: center;
  gap: 12px;
  min-height: 34px;
}

.lb-chart-rank,
.lb-chart-row strong {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

.lb-chart-rank {
  color: var(--text-muted);
  text-align: right;
}

.lb-chart-model {
  overflow: hidden;
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-chart-track {
  height: 19px;
  overflow: hidden;
  background: rgba(43, 33, 24, 0.05);
  border-radius: 3px;
}

.lb-chart-track span {
  display: block;
  height: 100%;
  background: var(--accent2);
  border-radius: inherit;
}

.lb-chart-row--1 .lb-chart-track span,
.lb-chart-row--2 .lb-chart-track span,
.lb-chart-row--3 .lb-chart-track span {
  background: var(--accent);
}

.lb-chart-row strong {
  color: var(--accent);
  text-align: right;
}

.results__footnote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.results__footnote p {
  max-width: 690px;
}

.results__footnote a {
  color: var(--accent);
  font-weight: 600;
}

.results__footnote a i {
  margin-left: 6px;
  font-size: 0.65rem;
}

/* Robustness */
.robustness {
  padding: 100px 0;
  color: var(--paper);
  background: var(--text);
}

.robustness .section-tag {
  color: var(--accent3);
  background: rgba(var(--accent3-rgb), 0.1);
  border-color: rgba(var(--accent3-rgb), 0.2);
}

.robustness .section-title {
  color: var(--paper);
  -webkit-text-fill-color: var(--paper);
}

.robust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(var(--paper-rgb), 0.16);
  border-bottom: 1px solid rgba(var(--paper-rgb), 0.16);
}

.robust-grid article {
  min-height: 260px;
  padding: 30px;
  border-right: 1px solid rgba(var(--paper-rgb), 0.16);
}

.robust-grid article:last-child {
  border-right: 0;
}

.robust-card__index {
  color: var(--accent3);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.robust-grid h3 {
  margin: 46px 0 10px;
  color: rgba(var(--paper-rgb), 0.65);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
}

.robust-grid strong {
  display: block;
  margin-bottom: 22px;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.robust-grid p {
  color: rgba(var(--paper-rgb), 0.56);
  font-size: 0.8rem;
}

/* Dataset */
.dataset {
  padding: 110px 0;
}

.dataset-composition {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 0.55fr;
  align-items: stretch;
  gap: 12px;
}

.dataset-source,
.dataset-total {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.dataset-source--ce {
  border-top: 3px solid var(--accent);
}

.dataset-source--scenario {
  border-top: 3px solid var(--accent2);
}

.dataset-source__count,
.dataset-total > span {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.dataset-source--scenario .dataset-source__count {
  color: var(--accent2);
}

.dataset-source h3 {
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 1rem;
}

.dataset-source p {
  color: var(--text-dim);
  font-size: 0.74rem;
  line-height: 1.55;
}

.dataset-plus,
.dataset-equals {
  align-self: center;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.dataset-total {
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  color: var(--paper);
  background: var(--text);
  text-align: center;
}

.dataset-total > span {
  color: var(--accent3);
}

.dataset-total small {
  color: rgba(var(--paper-rgb), 0.62);
  font-size: 0.65rem;
}

.checklist-dimensions {
  display: grid;
  grid-template-columns: 0.75fr 1.8fr 0.65fr;
  align-items: center;
  gap: 30px;
  margin-top: 24px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.checklist-dimensions h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.dimension-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dimension-list span {
  padding: 6px 10px;
  color: var(--text-dim);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
}

.dataset-total-items {
  padding-left: 24px;
  border-left: 1px solid var(--border-strong);
  text-align: center;
}

.dataset-total-items strong {
  display: block;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 2rem;
}

.dataset-total-items span {
  color: var(--text-muted);
  font-size: 0.63rem;
}

/* Team and footer */
.team {
  padding: 100px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.team-card {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 36px;
  background: var(--paper);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

.team-list {
  margin: 0;
}

.team-row {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 24px;
  padding: 17px 0;
  border-bottom: 1px solid var(--border);
}

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

.team-row dt {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.team-row dd {
  color: var(--text);
  font-size: 0.85rem;
}

.team-note {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.footer {
  padding: 70px 0 30px;
  color: var(--paper);
  background: var(--text);
  border-top: 0;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.6fr 0.7fr;
  gap: 72px;
}

.footer__cite,
.footer__info {
  min-width: 0;
}

.footer__cite h3,
.footer__info h3 {
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.footer__bibtex {
  padding: 18px;
  overflow-x: auto;
  background: rgba(var(--paper-rgb), 0.055);
  border: 1px solid rgba(var(--paper-rgb), 0.14);
  border-radius: var(--radius-sm);
}

.footer__bibtex code {
  color: rgba(var(--paper-rgb), 0.72);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.65;
}

.footer__cite-note {
  margin-top: 10px;
  color: rgba(var(--paper-rgb), 0.45);
  font-size: 0.67rem;
}

.footer__link-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer__link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  color: rgba(var(--paper-rgb), 0.65);
  border-bottom: 1px solid rgba(var(--paper-rgb), 0.12);
  font-size: 0.78rem;
}

.footer__link-list a:hover {
  color: var(--accent3);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 46px;
  padding-top: 22px;
  color: rgba(var(--paper-rgb), 0.38);
  border-top: 1px solid rgba(var(--paper-rgb), 0.12);
  font-size: 0.68rem;
}

/* Motion */
[data-aos] {
  opacity: 0;
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}

[data-aos='fade-up'] {
  transform: translateY(24px);
}

[data-aos].aos-animate {
  opacity: 1;
  transform: none;
}

/* Responsive */
@media (max-width: 1100px) {
  .hero {
    flex-direction: column;
    padding-top: 120px;
  }

  .hero__content,
  .hero__visual {
    width: 100%;
    max-width: 760px;
  }

  .hero__visual {
    margin-top: 30px;
  }

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

  .evidence-card--hero {
    grid-row: span 3;
  }

  .method-board {
    grid-template-columns: 1fr 1fr;
  }

  .method-stage:nth-child(2) {
    border-right: 0;
  }

  .method-stage:nth-child(3) {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border);
  }

  .method-stage--loop {
    grid-template-columns: 1fr;
  }

  .state-machine,
  .scoring__intro {
    grid-template-columns: 1fr;
  }

  .overall-formula {
    grid-column: 1;
    grid-row: auto;
  }

  .scoring__intro .section-tag,
  .scoring__intro h3 {
    grid-column: 1;
  }

  .scoring__intro .section-tag {
    margin-bottom: -24px;
  }

  .metric-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .dataset-composition {
    grid-template-columns: 1fr auto 1fr;
  }

  .dataset-equals {
    display: none;
  }

  .dataset-total {
    grid-column: 1 / -1;
  }

  .checklist-dimensions {
    grid-template-columns: 1fr 2fr;
  }

  .dataset-total-items {
    grid-column: 1 / -1;
    padding: 20px 0 0;
    border-top: 1px solid var(--border-strong);
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .section-header {
    margin-bottom: 42px;
  }

  .hero {
    min-height: auto;
    padding: 104px 20px 90px;
  }

  .hero::before,
  .hero__scroll {
    display: none;
  }

  .hero__content {
    padding: 0;
  }

  .hero__title-line--1,
  .hero__title-line--2 {
    font-size: clamp(3.5rem, 19vw, 5.2rem);
  }

  .hero__stat {
    min-width: 30%;
    padding-right: 12px;
    margin-right: 12px;
  }

  .hero__stat-num {
    font-size: 1.6rem;
  }

  .trace-tool {
    grid-template-columns: 1fr;
  }

  .trace-tool code,
  .trace-tool small {
    justify-self: start;
    text-align: left;
  }

  .evidence,
  .framework,
  .results,
  .robustness,
  .dataset,
  .team {
    padding: 78px 0;
  }

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

  .evidence-card--hero {
    grid-row: auto;
    min-height: 410px;
  }

  .method-board {
    display: block;
  }

  .method-stage,
  .method-stage:nth-child(2),
  .method-stage:nth-child(3) {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .method-stage--loop {
    display: block;
  }

  .method-stage--loop .loop-flow,
  .method-stage--loop > p {
    margin-top: 20px;
  }

  .state-machine {
    padding: 26px 20px;
  }

  .state-flow {
    flex-direction: column;
  }

  .state-flow__arrow {
    transform: rotate(90deg);
  }

  .state-terminal-group {
    width: 100%;
  }

  .state-node,
  .state-release {
    width: 100%;
  }

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

  .metric-grid article {
    min-height: auto;
  }

  .overall-formula {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .lb-controls,
  .lb-tools,
  .results__footnote {
    align-items: stretch;
    flex-direction: column;
  }

  .lb-tabs {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .lb-tabs button {
    flex: 0 0 auto;
  }

  .lb-search {
    flex: 1;
  }

  .lb-search input {
    width: 100%;
  }

  .lb-chart-row {
    grid-template-columns: 24px minmax(110px, 1fr) 50px;
    gap: 8px;
  }

  .lb-chart-track {
    grid-column: 2 / -1;
    grid-row: 2;
    height: 7px;
  }

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

  .robust-grid article {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(var(--paper-rgb), 0.16);
  }

  .robust-grid article:last-child {
    border-bottom: 0;
  }

  .robust-grid h3 {
    margin-top: 28px;
  }

  .dataset-composition {
    grid-template-columns: 1fr;
  }

  .dataset-plus,
  .dataset-equals {
    display: block;
    text-align: center;
  }

  .dataset-source {
    align-items: flex-start;
  }

  .checklist-dimensions {
    grid-template-columns: 1fr;
  }

  .team-card {
    padding: 14px 22px;
  }

  .team-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

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

  .footer__bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 420px) {
  .lb-table {
    min-width: 760px;
  }

  .lb-table th:first-child,
  .lb-table td:first-child {
    width: 40px;
    max-width: 40px;
  }

  .lb-table th:nth-child(2),
  .lb-table td:nth-child(2) {
    left: 40px;
    min-width: 128px;
    max-width: 128px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-aos] {
    opacity: 1;
    transform: none;
  }
}
