@font-face {
  font-family: Inter;
  src: url("./assets/fonts/inter.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("./assets/fonts/ibm-plex-mono.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #202a3b;
  --text: #424e62;
  --muted: #5c6980;
  --accent: #2458b5;
  --brand: #2458b5;
  --line: #dce3ee;
  --sans: Inter, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --page-gutter: clamp(1.125rem, 4.4vw, 4rem);
  --page-bg: #fcfdff;
  --surface: #ffffff;
  --brand-hover: #184390;
  --accent-hover: #184390;
  --on-brand: #ffffff;
  --surface-soft: color-mix(in srgb, var(--brand) 3%, var(--page-bg));
  --brand-faint: color-mix(in srgb, var(--brand) 2%, var(--page-bg));
  --brand-wash: color-mix(in srgb, var(--brand) 8%, var(--page-bg));
  --accent-wash: var(--brand-wash);
  --brand-light: color-mix(in srgb, var(--brand) 15%, var(--page-bg));
  --brand-line: color-mix(in srgb, var(--brand) 25%, var(--page-bg));
  --brand-border: color-mix(in srgb, var(--brand) 52%, var(--page-bg));
  --brand-shadow: color-mix(in srgb, var(--brand) 8%, transparent);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font: 400 1rem/1.68 var(--sans);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

button {
  font: inherit;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.shell {
  max-width: 70rem;
  width: calc(100% - var(--page-gutter) * 2);
  margin-inline: auto;
}

.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  inset: 0.75rem auto auto 0.75rem;
  z-index: 10;
  background: var(--page-bg);
  padding: 0.5rem 0.75rem;
}

.layout {
  display: grid;
  min-width: 0;
}

.project-body {
  min-width: 0;
}

.contents {
  position: sticky;
  z-index: 3;
  top: 0;
  min-width: 0;
  background: var(--page-bg);
  border-bottom: 1px solid var(--line);
}

.contents p {
  display: none;
}

.contents ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0.65rem 0.2rem;
}

.contents a {
  display: block;
  padding: 0.33rem 0.55rem;
  border-radius: 0.32rem;
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
}

.contents a:hover,
.contents a[aria-current] {
  background: var(--accent-wash);
  color: var(--accent);
}

.contents a[aria-current] {
  font-weight: 650;
}

.contents a:focus-visible {
  outline-offset: -2px;
}

.micro {
  font: 550 0.875rem/1.5 var(--sans);
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

h2,
h3 {
  font-family: var(--sans);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.icon-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.project-opening {
  color: var(--ink);
  background: radial-gradient(ellipse at 83% 72%, var(--brand-faint) 0%, var(--page-bg) 57%);
  padding-bottom: clamp(1rem, 2vw, 2rem);
}

.project-heading {
  position: relative;
  isolation: isolate;
  text-align: center;
  padding: clamp(1.25rem, 1.7vw, 1.7rem) var(--page-gutter) clamp(1.75rem, 2.25vw, 2.5rem);
}

.hero-field {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(transparent, #000 12%, #000 75%, transparent);
}

.hero-field::after {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(ellipse 36% 50% at 50% 53%, var(--page-bg) 15%, color-mix(in srgb, var(--page-bg) 90%, transparent) 47%, transparent 100%);
}

.hero-halo {
  position: absolute;
  inset: -25%;
  background: radial-gradient(ellipse 24% 37% at 27% 45%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 75%), radial-gradient(ellipse 22% 35% at 75% 55%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 75%);
}

.hero-trajectories {
  position: absolute;
  inset: -3%;
  width: 106%;
  height: 106%;
  translate: var(--hero-x, 0px) var(--hero-y, 0px);
  transition: translate 900ms ease-out;
  fill: none;
}

.hero-lines {
  stroke: url(#hero-line-color);
  stroke-width: 1;
}

.hero-streams {
  stroke: var(--brand);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 1.2 98.8;
  opacity: 0.7;
}

.hero-nodes {
  fill: var(--brand-border);
}

.hero-nodes circle {
  transform-box: fill-box;
  transform-origin: center;
}

.hero-motion-toggle {
  position: absolute;
  right: 0;
  bottom: 0.65rem;
  border: 0;
  border-radius: 0.3rem;
  padding: 0.2rem 0.5rem;
  background: transparent;
  color: var(--muted);
  font-size: 0.875rem;
}

.hero-motion-toggle:hover {
  color: var(--accent);
  background: var(--accent-wash);
}

.motion-enabled .hero-streams use {
  animation: hero-signal 16s linear infinite;
  animation-play-state: paused;
}

.motion-enabled .hero-streams use:nth-child(2) {
  animation-duration: 20s;
  animation-delay: -9s;
}

.motion-enabled .hero-streams use:nth-child(3) {
  animation-duration: 19s;
  animation-delay: -5s;
  animation-direction: reverse;
}

.motion-enabled .hero-streams use:nth-child(4) {
  animation-duration: 24s;
  animation-delay: -16s;
  animation-direction: reverse;
}

.motion-enabled .hero-halo {
  animation: hero-breathe 12s ease-in-out infinite alternate;
  animation-play-state: paused;
}

.motion-enabled .hero-nodes circle {
  animation: hero-node 5s ease-in-out infinite;
  animation-play-state: paused;
}

.motion-enabled .hero-nodes circle:nth-child(2) {
  animation-delay: -2.5s;
}

.motion-enabled .hero-nodes circle:nth-child(3) {
  animation-delay: -1s;
}

.motion-enabled .hero-nodes circle:nth-child(4) {
  animation-delay: -3.5s;
}

.hero-animating .hero-streams use,
.hero-animating .hero-halo,
.hero-animating .hero-nodes circle {
  animation-play-state: running;
}

/* Hero Visual Gallery (method diagrams + simulation benchmark scenes) */
.hero-visual-marquee {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  overflow: hidden;
  opacity: 0.8;
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.vis-track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.vis-set {
  display: flex;
  align-items: stretch;
  gap: 14px;
  padding-right: 14px;
}

.vis-card {
  border-radius: 11px;
  border: 1px solid var(--brand-border);
  box-shadow: 0 6px 18px -10px rgba(20, 24, 48, 0.25);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.vis-sim {
  width: 212px;
  height: 114px;
  background: #171a26;
}

.vis-sim img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vis-center-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 16, 28, 0.28);
  pointer-events: none;
}

.vis-center-overlay span {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(14, 18, 30, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(5px);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.vis-paper {
  width: 248px;
  height: 116px;
  background: #ffffff;
  padding: 5px;
}

.vis-paper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.hero-visual-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 50% 66% at 50% 48%, color-mix(in srgb, var(--page-bg) 92%, transparent) 0%, color-mix(in srgb, var(--page-bg) 68%, transparent) 52%, transparent 100%);
}

@keyframes preview-marquee {
  to {
    transform: translateX(-50%);
  }
}

.motion-enabled .vis-track {
  animation: preview-marquee 42s linear infinite;
  animation-play-state: paused;
}

.motion-enabled .vis-track:nth-child(2) {
  animation-direction: reverse;
  animation-duration: 48s;
}

.motion-enabled .vis-track:nth-child(3) {
  animation-duration: 38s;
}

.hero-animating .vis-track {
  animation-play-state: running;
}

@media (prefers-reduced-motion: reduce) {
  .vis-track {
    animation: none !important;
  }
}

@keyframes hero-signal {
  to {
    stroke-dashoffset: -100;
  }
}

@keyframes hero-breathe {
  from {
    transform: translate(-1%, -2%) scale(0.98);
  }

  to {
    transform: translate(2%, 3%) scale(1.08);
  }
}

@keyframes hero-node {

  0%,
  100% {
    opacity: 0.35;
    scale: 0.85;
  }

  50% {
    opacity: 0.8;
    scale: 1.15;
  }
}


.wordmark-stage {
  position: relative;
  isolation: isolate;
  margin: 1.5rem auto 0;
  max-width: 86rem;
  padding-top: clamp(2.4rem, 5.65vw, 5.75rem);
}

.project-wordmark {
  margin: 0;
  color: var(--ink);
  font: 850 clamp(2.85rem, 8.45vw, 6.75rem)/0.97 var(--sans);
  letter-spacing: -0.073em;
  text-shadow: 0 0 20px var(--page-bg), 0 0 8px var(--page-bg);
  white-space: nowrap;
}

.project-wordmark span,
.project-subtitle em {
  color: var(--brand);
}

.project-subtitle {
  margin: clamp(0.9rem, 1.45vw, 1.45rem) auto 0;
  font: 400 clamp(1rem, 1.7vw, 1.4rem)/1.5 var(--sans);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.project-subtitle em {
  font-style: inherit;
}

.project-team {
  margin: 0.7rem auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.project-team a {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.78rem;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--page-bg) 88%, transparent);
  backdrop-filter: blur(6px);
  color: var(--ink);
  font: 600 0.9375rem/1.4 var(--sans);
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}

.project-team a:hover {
  border-color: var(--brand-border);
  background: var(--brand-wash);
  color: var(--accent);
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  margin-top: clamp(0.95rem, 1.4vw, 1.35rem);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  padding: 0.52rem 1.05rem;
  border: 1px solid rgba(36, 88, 181, 0.22);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font: 600 0.9rem/1.2 var(--sans);
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 4px 14px -10px rgba(20, 28, 48, 0.28);
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.hero-badge:hover {
  transform: translateY(-1px);
  border-color: var(--brand-border);
  background: #f4f8ff;
  color: var(--accent);
  box-shadow: 0 8px 20px -12px var(--brand-shadow);
}

.hero-badge .badge-icon {
  width: 1.08rem;
  height: 1.08rem;
  flex: 0 0 auto;
}

.hero-badge .badge-emoji {
  font-size: 1rem;
  line-height: 1;
}

.hero-badge.badge-code {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 6px 18px -10px var(--brand-shadow);
}

.hero-badge.badge-code:hover {
  border-color: #1d4a9c;
  background: #1d4a9c;
  color: #ffffff;
  box-shadow: 0 10px 24px -10px var(--brand-shadow);
}

.hero-badge.badge-report .badge-icon {
  color: #b53b3b;
}

.hero-badge.badge-ms .badge-icon {
  color: #5b4ef0;
}

.project-icon {
  display: block;
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
  color: var(--brand);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-icon.github-icon {
  stroke: none;
}

.project-github .project-icon {
  width: 1.2em;
  height: 1.2em;
}

.project-overview {
  max-width: 70rem;
  width: calc(100% - var(--page-gutter) * 2);
  margin-inline: auto;
}

.overview-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-block: clamp(0.45rem, 0.8vw, 1rem);
}

.overview-copy h2 {
  margin: 0 0 0.65rem;
  color: var(--ink);
  font-size: clamp(1.65rem, 2.6vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.035em;
}

.overview-copy>p {
  max-width: none;
  margin: 0;
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.58;
  text-wrap: pretty;
}

.overview-copy>p strong {
  color: var(--ink);
  font-weight: 650;
}

.framework-figure.figure-embed {
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: var(--surface);
  box-shadow: 0 4px 18px -14px rgba(20, 24, 38, 0.22);
}

.framework-figure.figure-embed img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.45rem;
}

.framework-figure.overview-framework {
  margin-top: 1.5rem;
}

.project-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.85rem, 1.5vw, 1.25rem);
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.project-principles li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  min-width: 0;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface);
  box-shadow: 0 4px 18px -14px rgba(20, 24, 38, 0.22);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.project-principles li:hover {
  transform: translateY(-2px);
  border-color: var(--brand-border);
  box-shadow: 0 10px 26px -14px var(--brand-shadow);
}

.principle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.55rem;
  border: 1px solid var(--brand-line);
  background: var(--brand-wash);
}

.principle-icon .project-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.principle-body {
  min-width: 0;
}

.project-principles strong {
  display: block;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.project-principles .principle-sub {
  display: block;
  margin-top: 0.25rem;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 550;
}

.project-principles p {
  margin: 0.5rem 0 0;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.55;
}

.robot-cycle {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 40rem;
  min-height: 16rem;
  aspect-ratio: 600 / 338;
  margin: 0 auto;
  background: radial-gradient(ellipse 50% 60% at 50% 53%, var(--brand-wash) 10%, var(--brand-faint) 57%, transparent 100%);
}

.cycle-arrows {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.cycle-robot {
  position: absolute;
  width: 43%;
  height: 56%;
  left: 50%;
  top: 51%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  z-index: -1;
}

.cycle-stages {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cycle-stages li {
  position: absolute;
  display: flex;
  align-items: center;
  gap: clamp(0.32rem, 0.82vw, 0.76rem);
  min-width: 25%;
  max-width: 45%;
  border: 1px solid var(--brand-line);
  border-radius: clamp(0.83rem, 1.65vw, 1.65rem);
  padding: clamp(0.52rem, 0.87vw, 0.85rem) clamp(0.5rem, 1.25vw, 1.24rem);
  background: linear-gradient(158deg, var(--surface-soft), var(--brand-light) 88%);
  line-height: 1.15;
}

.cycle-stages .project-icon {
  width: clamp(1.28rem, 2.45vw, 2.4rem);
  height: clamp(1.28rem, 2.45vw, 2.4rem);
}

.cycle-stages strong {
  display: block;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.035em;
}

.cycle-stages span {
  display: block;
  margin-top: 0.22rem;
  color: var(--text);
  font-size: clamp(0.75rem, 1.1vw, 0.9rem);
  line-height: 1.2;
}

.stage-deploy,
.stage-learn {
  left: 50%;
  transform: translateX(-50%);
}

.stage-deploy {
  top: 0;
}

.stage-learn {
  bottom: 0;
}

.stage-improve,
.stage-experience {
  top: 50%;
  transform: translateY(-50%);
}

.stage-improve {
  left: 0;
}

.stage-experience {
  right: 0;
}

.project-stats {
  display: grid;
  grid-template-columns: 0.84fr 1.15fr 1.12fr 1fr;
  width: calc(100% - clamp(0.95rem, 1.9vw, 2rem) * 2);
  max-width: 70rem;
  margin: clamp(1.65rem, 2.7vw, 2.8rem) auto 0;
  padding: clamp(0.8rem, 1.28vw, 1.3rem) clamp(0.35rem, 1.15vw, 1rem);
  list-style: none;
  background: linear-gradient(118deg, var(--surface-soft), var(--brand-wash) 85%, var(--brand-light));
  border-radius: clamp(0.8rem, 1.7vw, 1.55rem);
}

.project-stats li {
  position: relative;
  min-width: 0;
}

.project-stats li+li::before {
  position: absolute;
  inset: 0.35rem auto 0.35rem 0;
  content: "";
  border-left: 1px solid var(--brand-line);
}

.project-stats a {
  display: flex;
  height: 100%;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(0.4rem, 1.2vw, 1.3rem);
  padding: 0.25rem clamp(0.55rem, 1.35vw, 1.35rem);
  border-radius: 0.55rem;
  color: inherit;
  text-decoration: none;
  line-height: 1.26;
}

.project-stats a:hover,
.project-stats a:focus-visible {
  background: color-mix(in srgb, var(--surface) 52%, transparent);
  color: var(--accent);
}

.project-stats .project-icon {
  align-self: flex-start;
  width: clamp(1.55rem, 3.05vw, 3rem);
  height: clamp(1.55rem, 3.05vw, 3rem);
  margin-top: 0.2rem;
  color: var(--brand);
}

.project-stats strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.project-stats .stats-text {
  margin-top: 0.18rem;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.project-stats a>span>span {
  display: block;
  margin-top: 0.27rem;
  font-size: 0.9375rem;
}

.project-stats small {
  display: block;
  max-width: 29ch;
  margin-top: 0.31rem;
  color: var(--muted);
  font-size: 0.875rem;
  text-wrap: pretty;
}

.article-section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--line);
}

.article-section>h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.625rem, 2.5vw, 2rem);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.6rem 1.25rem;
  margin-bottom: 1.75rem;
}

.section-head>div {
  display: contents;
}

.section-head h2 {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-size: clamp(1.625rem, 2.5vw, 2rem);
}

.section-lead {
  grid-column: 1 / -1;
  grid-row: 2;
  max-width: none;
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.section-lead strong {
  color: var(--ink);
  font-weight: 600;
}

.section-action {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  font-size: 0.9375rem;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
}

.section-action:hover {
  text-decoration: underline;
}

.meta-pill {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  background: var(--brand-wash);
  color: var(--accent);
  font: 500 0.8125rem/1.4 var(--mono);
  white-space: nowrap;
}

.article-section>p {
  max-width: none;
  color: var(--text);
  margin: 0.45rem 0 0.85rem;
}

/* News & Updates */
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--surface);
  overflow: hidden;
}

.news-item {
  display: grid;
  grid-template-columns: 5.5rem 5.25rem minmax(0, 1fr);
  gap: 0.45rem 1rem;
  align-items: baseline;
  padding: 1.15rem 1.35rem;
  transition: background-color 180ms ease;
}

.news-item+.news-item {
  border-top: 1px solid var(--line);
}

.news-item:hover {
  background: var(--brand-faint);
}

.news-date {
  font: 500 0.875rem/1.5 var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.news-badge {
  justify-self: start;
  display: inline-block;
  padding: 0.14rem 0.52rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.news-badge.is-latest {
  border-color: var(--brand-line);
  background: var(--brand-wash);
  color: var(--accent);
}

.news-body strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.4;
}

.news-body p {
  margin: 0.25rem 0 0;
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.58;
}

.news-body a {
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
}

.news-body a:hover {
  text-decoration: underline;
}

.framework-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--surface-soft);
}

.framework-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  padding: 1.1rem 1.25rem 0;
}

.framework-head h3 {
  margin: 0;
  font-size: 1.0625rem;
}

.framework-head a {
  font-size: 0.875rem;
  font-weight: 550;
  text-decoration: none;
}

.framework-head a:hover {
  text-decoration: underline;
}

.framework-caption {
  color: var(--muted);
  font-size: 0.875rem;
}

.media-showcase,
.figure-showcase {
  padding: 0 1.25rem 1.25rem;
}

.media-showcase .framework-head,
.figure-showcase .framework-head {
  padding-inline: 0;
}

.media-video-wrap,
.figure-frame {
  display: block;
  margin-top: 0.9rem;
  border-radius: 0.6rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 10px 30px -20px rgba(20, 28, 48, 0.25);
}

.media-video-wrap video {
  display: block;
  width: 100%;
  height: auto;
  background: #f6f8fc;
}

.figure-frame {
  padding: 0.75rem;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.figure-frame:hover {
  border-color: var(--brand-border);
  box-shadow: 0 12px 32px -18px var(--brand-shadow);
}

.figure-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.35rem;
}

.section-lead code {
  padding: 0.08rem 0.36rem;
  border-radius: 0.25rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 0.85em;
}

/* Shared 3-column explanatory strip (RLinf-inspired) */
.detail-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  border: 1px solid var(--brand-line);
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--brand) 4%, var(--surface));
  overflow: hidden;
}

.detail-strip li {
  padding: 1.15rem 1.25rem;
  min-width: 0;
}

.detail-strip li+li {
  border-left: 1px solid var(--line);
}

.detail-strip-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.detail-strip-head:last-child {
  margin-bottom: 0;
}

.detail-strip-head strong {
  color: var(--ink);
  font-size: 0.96875rem;
  font-weight: 650;
}

.detail-strip-head code {
  padding: 0.12rem 0.42rem;
  border-radius: 0.28rem;
  background: var(--brand-wash);
  color: var(--accent);
  font-size: 0.8rem;
  line-height: 1.35;
}

.detail-strip p {
  margin: 0;
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.58;
}

.components {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0.8rem 1.2rem 1rem;
}

.components div {
  border: 1px solid var(--line);
  border-top: 2px solid var(--brand-border);
  border-radius: 0.3rem;
  background: var(--page-bg);
  padding: 0.62rem;
}

.components dt {
  font-weight: 650;
  font-size: 0.875rem;
}

.components dd {
  margin: 0.23rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.46;
}

.framework-base {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.75rem;
  border-top: 1px solid var(--line);
  background: var(--brand-wash);
  padding: 0.6rem 1.2rem;
  color: var(--text);
  font-size: 0.875rem;
}

.framework-base strong {
  color: var(--accent);
  font-weight: 650;
}

.code-block {
  margin: 1rem 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--surface-soft);
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  padding: 0.52rem 0.85rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.copy-button {
  padding: 0.18rem 0.56rem;
}

pre {
  margin: 0;
  padding: 0.85rem;
  overflow-x: auto;
  color: var(--text);
}

pre:focus-visible {
  outline-offset: -3px;
}

pre,
code {
  font: 500 0.9rem/1.65 var(--mono);
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding-block: 1.15rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.footer span {
  font-weight: 600;
}

.project-heading {
  padding-bottom: 3rem;
}

.project-workspace {
  margin-left: 0.5rem;
  background: var(--brand);
  color: var(--on-brand);
  border-color: var(--brand);
}

.project-workspace:hover {
  background: var(--brand-hover);
  color: var(--on-brand);
}

.project-stats {
  width: calc(100% - var(--page-gutter) * 2);
  border-radius: 0.6rem;
}

.project-principles {
  margin-top: 1.75rem;
  padding-top: 0;
}

.page-layout>main {
  min-width: 0;
}

.project-toc {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--page-bg);
  border-bottom: 1px solid var(--line);
}

.project-toc summary {
  padding: 0.75rem var(--page-gutter);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

.contents {
  position: static;
  margin: 0;
  border: 0;
}

.contents ul {
  padding: 0 1rem 0.75rem;
}

.contents a {
  padding: 0.55rem 0.85rem;
  font-size: 0.9375rem;
}

.components {
  gap: 0.75rem;
  padding-block: 1.25rem;
}

.components div {
  padding: 1rem 0.75rem;
}

.support-section {
  max-width: none;
  margin-inline: auto;
  padding-block: 3.5rem;
}

.methods-catalog {
  border-block: 1px solid var(--line);
}

.catalog-row {
  display: grid;
  grid-template-columns: minmax(10rem, 22%) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  padding: 1.35rem 1rem;
  min-height: 5.5rem;
}

.catalog-row+.catalog-row {
  border-top: 1px solid var(--line);
}

.catalog-row:first-child {
  background: var(--surface-soft);
}

.catalog-row h3 {
  margin: 0;
  max-width: 15ch;
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: -0.02em;
}

.catalog-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.catalog-items li {
  white-space: nowrap;
}

.catalog-items li:not(:last-child)::after {
  content: "·";
  margin-inline: 0.65rem;
  color: var(--muted);
}

.catalog-items a,
.catalog-row h3 a,
.catalog-details a {
  color: var(--ink);
  text-decoration: none;
}

.catalog-items a:hover,
.catalog-row h3 a:hover,
.catalog-details a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.catalog-details {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  font-size: 0.96875rem;
  line-height: 1.65;
}

.catalog-details>div {
  display: grid;
  grid-template-columns: minmax(7rem, 18%) minmax(0, 1fr);
  gap: 0.5rem 1.5rem;
}

.catalog-details dt {
  font-weight: 600;
}

.catalog-details dd {
  margin: 0;
}

.catalog-note {
  color: var(--muted);
}

.catalog-guide {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

.ui-embed {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  overflow: hidden;
  background: var(--page-bg);
}

.ui-embed-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  font-size: 0.875rem;
}

.ui-embed-bar a {
  font-weight: 550;
  text-decoration: none;
}

.ui-label {
  color: var(--muted);
  font-weight: 500;
}

.ui-embed iframe {
  display: block;
  width: 100%;
  height: 760px;
  border: 0;
  background: var(--surface-soft);
}

.ui-embed-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.8125rem;
}

/* Quick start 2-column layout (RLinf-inspired) */
.quickstart-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 2rem;
  align-items: start;
}

.quickstart-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.quickstart-steps li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--brand-line);
  background: var(--brand-wash);
  color: var(--accent);
  font: 650 0.875rem/1 var(--sans);
}

.quickstart-steps strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
}

.quickstart-steps p {
  margin: 0.25rem 0 0;
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.58;
}

.quickstart-steps code {
  padding: 0.08rem 0.35rem;
  border-radius: 0.25rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 0.82rem;
}

.quickstart-steps a {
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
}

.quickstart-steps a:hover {
  text-decoration: underline;
}

.code-card {
  min-width: 0;
}

.code-card .code-block {
  margin: 0;
  border-radius: 0.65rem;
}

.code-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}

.code-tabs button {
  padding: 0.36rem 0.78rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 550;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.code-tabs button:hover {
  border-color: var(--brand-line);
  color: var(--accent);
}

.code-tabs button[aria-selected="true"] {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--on-brand);
}

/* Contributors & Contribute CTA (XPolicyLab-inspired) */
.contrib-groups {
  display: grid;
  gap: 1.15rem;
}

.contrib-block {
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 1.25rem 1.35rem;
  background: var(--surface);
}

.contrib-block h3 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
}

.contrib-prose {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.65;
}

.contrib-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
}

.contrib-tags li {
  padding: 0.38rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: var(--surface-soft);
  font-size: 0.875rem;
  color: var(--text);
}

.contrib-tags strong {
  color: var(--ink);
  font-weight: 600;
}

.contrib-tags span {
  color: var(--muted);
}

.contribute-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 1.25rem;
  padding: 1.2rem 1.35rem;
  border: 1px solid var(--brand-line);
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--brand) 4%, var(--surface));
}

.contribute-callout>div:first-child {
  max-width: 40rem;
}

.contribute-callout h3 {
  margin: 0 0 0.3rem;
  font-size: 1.0625rem;
}

.contribute-callout p {
  margin: 0;
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.58;
}

.contribute-callout code {
  padding: 0.08rem 0.35rem;
  border-radius: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.82rem;
}

.contribute-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn-outline,
.btn-solid {
  display: inline-flex;
  align-items: center;
  padding: 0.48rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.btn-outline {
  border: 1px solid var(--brand-border);
  background: var(--surface);
  color: var(--accent);
}

.btn-outline:hover {
  background: var(--brand-wash);
  color: var(--accent-hover);
}

.btn-solid {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: var(--on-brand);
}

.btn-solid:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: var(--on-brand);
}

.citation-section {
  border-bottom: 0;
}

.citation-section .code-block {
  margin: 0;
  border-radius: 0.65rem;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(176px, 1fr));
  gap: 1.25rem;
  padding: 0.2rem 0.2rem 0.75rem;
  overflow-x: auto;
}

.community-card {
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 1rem;
  background: var(--page-bg);
  text-align: center;
}

.community-card h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.community-card a {
  display: block;
}

.community-card img {
  display: block;
  width: 100%;
  height: auto;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 0;
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 4.75rem;
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.75rem;
}

.footer-brand strong {
  color: var(--ink);
  font-weight: 650;
}

.footer-brand span {
  font-weight: 400;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.copy-button {
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  background: var(--page-bg);
  color: var(--ink);
  font-size: 0.875rem;
}

.benchmark-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.benchmark-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.benchmark-tabs button:hover:not(:disabled) {
  border-color: var(--brand-line);
  background: var(--brand-wash);
  color: var(--accent);
}

.benchmark-tabs button[aria-selected="true"] {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 4px 14px var(--brand-shadow);
}

.benchmark-tabs button:disabled {
  background: color-mix(in srgb, var(--surface-soft) 85%, var(--surface));
  border-color: var(--line);
  color: color-mix(in srgb, var(--muted) 65%, transparent);
  opacity: 0.65;
  cursor: not-allowed;
}

.tab-count {
  padding: 0.06rem 0.42rem;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font: 500 0.72rem/1.35 var(--mono);
}

.benchmark-tabs button.has-data .tab-count {
  background: var(--brand-wash);
  color: var(--accent);
}

.benchmark-tabs button[aria-selected="true"] .tab-count {
  background: color-mix(in srgb, var(--on-brand) 20%, transparent);
  color: var(--on-brand);
}

.benchmark-card {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 6px 24px -18px rgba(20, 24, 38, 0.2);
}

.benchmark-card-head {
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
}

.benchmark-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 1rem;
}

.benchmark-toolbar h3 {
  margin: 0;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.benchmark-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1.15rem;
}

.benchmark-filters[hidden] {
  display: none;
}

.subset-picker {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
}

.subset-label {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.subset-options {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  padding: 0.18rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.subset-btn {
  padding: 0.26rem 0.68rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.81rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.subset-btn:hover:not(:disabled) {
  color: var(--ink);
  background: var(--surface-soft);
}

.subset-btn[aria-pressed="true"] {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 2px 8px var(--brand-shadow);
}

.subset-btn:disabled {
  color: color-mix(in srgb, var(--muted) 58%, transparent);
  opacity: 0.55;
  cursor: not-allowed;
}

.bench-scale {
  color: var(--muted);
  font: 500 0.8rem/1.3 var(--mono);
  white-space: nowrap;
}

.benchmark-table-scroll {
  overflow-x: auto;
}

.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 22rem;
  font-variant-numeric: tabular-nums;
}

.benchmark-card[data-view="overview"] .benchmark-table {
  min-width: 38rem;
}

.benchmark-table th,
.benchmark-table td {
  padding: 0.85rem 1.2rem;
  text-align: right;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.benchmark-table .col-rank {
  width: 3.75rem;
  text-align: center;
  padding-inline: 0.75rem;
}

.benchmark-table .col-method {
  text-align: left;
  min-width: 11rem;
}

.benchmark-table .col-method a {
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}

.benchmark-table .col-method a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.benchmark-table .method-pending {
  color: var(--muted);
  font-weight: 550;
  cursor: default;
}

.th-stack.is-muted {
  opacity: 0.6;
}

.benchmark-table .col-sr {
  min-width: 11rem;
}

.benchmark-table .col-bench {
  min-width: 8.5rem;
}

.th-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.08rem;
  line-height: 1.2;
}

.th-stack small {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

.benchmark-table thead {
  background: color-mix(in srgb, var(--surface-soft) 65%, var(--surface));
}

.benchmark-table thead th {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.benchmark-table thead button {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 0;
  border-radius: 0.3rem;
  padding: 0.22rem 0.42rem;
  color: inherit;
  background: transparent;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
}

.benchmark-table thead button:hover,
.benchmark-table th[aria-sort="descending"] button,
.benchmark-table th[aria-sort="ascending"] button {
  background: var(--brand-wash);
  color: var(--accent);
}

.sort-arrow {
  font-size: 0.78rem;
  opacity: 0.75;
}

.benchmark-table tbody tr {
  transition: background-color 160ms ease;
}

.benchmark-table tbody tr:hover {
  background: var(--brand-faint);
}

.benchmark-table tbody tr.is-rank-1 {
  background: color-mix(in srgb, var(--brand) 4%, var(--surface));
}

.benchmark-table tbody tr.is-pending {
  opacity: 0.66;
}

.benchmark-table tbody tr:last-child>* {
  border-bottom: 0;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font: 650 0.78rem/1 var(--mono);
}

.rank-badge.is-gold {
  border-color: #d9a441;
  background: color-mix(in srgb, #f5b942 22%, var(--surface));
  color: #946208;
}

.rank-badge.is-silver {
  border-color: #9ba5b4;
  background: color-mix(in srgb, #9ba5b4 18%, var(--surface));
  color: #4a5568;
}

.rank-badge.is-bronze {
  border-color: #c4845a;
  background: color-mix(in srgb, #c4845a 20%, var(--surface));
  color: #824722;
}

.rank-badge.is-empty {
  border-color: transparent;
  background: transparent;
}

.method-cell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.method-cell a {
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}

.method-cell a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.mode-tag {
  padding: 0.1rem 0.46rem;
  border-radius: 0.3rem;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
}

.mode-tag.mode-policy {
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
  color: var(--accent);
  background: var(--brand-faint);
}

.mode-tag.mode-code {
  border-color: color-mix(in srgb, #2d7d62 30%, var(--line));
  color: #246850;
  background: color-mix(in srgb, #2d7d62 7%, var(--surface));
}

.mode-tag.mode-direct {
  border-color: color-mix(in srgb, #3b6fc2 30%, var(--line));
  color: #2c579e;
  background: color-mix(in srgb, #3b6fc2 7%, var(--surface));
}

.mode-tag.mode-learning {
  border-color: color-mix(in srgb, #85529c 30%, var(--line));
  color: #6f3f85;
  background: color-mix(in srgb, #85529c 7%, var(--surface));
}

.sr-meter {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  min-width: 11rem;
}

.benchmark-card[data-view="overview"] .sr-meter {
  flex-direction: column;
  align-items: flex-end;
  gap: 0.28rem;
  min-width: 5.8rem;
}

.sr-value {
  font: 700 0.96rem/1.2 var(--mono);
  color: var(--ink);
  min-width: 3.6rem;
  text-align: right;
}

.sr-track {
  display: block;
  width: 9.5rem;
  height: 0.42rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 75%, transparent);
  overflow: hidden;
  order: -1;
}

.benchmark-card[data-view="overview"] .sr-track {
  width: 5.8rem;
  height: 0.36rem;
  order: 0;
}

.sr-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-border), var(--brand));
}

.cell-empty {
  color: var(--muted);
}

.scope-pill {
  display: inline-block;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 550;
}

.scope-pill.is-complete {
  border-color: color-mix(in srgb, #24785b 35%, var(--line));
  background: color-mix(in srgb, #24785b 9%, var(--surface));
  color: #1c6249;
}

.scope-pill.is-interim {
  border-color: var(--brand-line);
  background: var(--brand-wash);
  color: var(--accent);
}

.scope-pill.is-mixed {
  border-color: color-mix(in srgb, #3b6fc2 35%, var(--line));
  background: color-mix(in srgb, #3b6fc2 9%, var(--surface));
  color: #295397;
}

.scope-pill.is-external {
  border-color: color-mix(in srgb, #b87b1e 40%, var(--line));
  background: color-mix(in srgb, #e2a23b 12%, var(--surface));
  color: #8a590c;
}

.benchmark-note {
  margin: 0;
  padding: 0.85rem 1.35rem;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

/* Per-task breakdown drawer */
.benchmark-tasks {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.benchmark-tasks summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.35rem;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.benchmark-tasks summary::-webkit-details-marker {
  display: none;
}

.benchmark-tasks summary::after {
  content: "Show Table ▾";
  font-size: 0.8rem;
  color: var(--muted);
}

.benchmark-tasks[open] summary::after {
  content: "Hide Table ▴";
}

.benchmark-tasks summary:hover {
  background: var(--brand-faint);
}

.benchmark-tasks-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.tasks-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 40rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
}

.tasks-table th,
.tasks-table td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

.tasks-table thead th {
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 650;
  white-space: nowrap;
}

.tasks-table .task-col-name {
  text-align: left;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.tasks-table .task-id {
  display: inline-block;
  margin-right: 0.5rem;
  color: var(--muted);
  font: 500 0.74rem/1 var(--mono);
}

.tasks-table .task-col-val {
  text-align: right;
  white-space: nowrap;
}

.tasks-table td[data-reported="true"] {
  background: color-mix(in srgb, var(--brand) calc(var(--pct, 0) * 0.22%), var(--surface));
}

.tasks-table td strong {
  display: block;
  font: 650 0.84rem/1.2 var(--mono);
  color: var(--ink);
}

.tasks-table td.is-best strong {
  color: var(--accent);
}

.tasks-table td small {
  display: block;
  font: 500 0.71rem/1.2 var(--mono);
  color: var(--muted);
}

.tasks-table tbody tr:last-child>* {
  border-bottom: 0;
}

@media (min-width: 1120px) {
  html {
    scroll-padding-top: 2rem;
  }

  .page-layout {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr) 9rem;
    gap: 2rem;
    align-items: start;
    max-width: 90rem;
    width: calc(100% - 3rem);
    margin-inline: auto;
  }

  .page-layout>main {
    grid-area: 1 / 2;
  }

  .project-toc {
    grid-area: 1 / 3;
    top: 3rem;
    margin-top: 4rem;
    border: 0;
  }

  .project-toc summary {
    display: none;
  }

  .contents p {
    display: block;
    margin: 0 0 0.75rem;
    padding-left: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 650;
    color: var(--ink);
  }

  .contents ul {
    display: grid;
    justify-content: start;
    gap: 0.35rem;
    padding: 0;
  }

  .contents a {
    display: inline-block;
    padding: 0.32rem 0.75rem;
    white-space: normal;
  }

  .project-overview,
  .project-stats,
  .page-layout .shell {
    width: 100%;
  }

  .page-layout .layout {
    max-width: 68rem;
  }

  .project-body>.article-section {
    margin-inline: auto;
  }

  .project-heading {
    padding-inline: 0;
  }

  .project-wordmark {
    font-size: clamp(4.5rem, 7.5vw, 6.75rem);
  }
}

@media (min-width: 1120px) and (max-width: 1399px) {
  .project-overview {
    grid-template-columns: 1fr;
  }

  .robot-cycle {
    max-width: 32rem;
  }

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

  .catalog-row {
    grid-template-columns: 9rem minmax(0, 1fr);
    gap: 1.25rem;
  }

  .catalog-details>div {
    grid-template-columns: 7rem minmax(0, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 860px) {
  .overview-copy {
    padding-block: 0;
  }

  .project-principles {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 1rem;
  }

  .project-stats li:nth-child(odd)::before {
    content: none;
  }

  .project-stats li:nth-child(n + 3) {
    border-top: 1px solid var(--brand-line);
    padding-top: 1rem;
  }

  .project-stats a {
    justify-content: flex-start;
  }

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

  .detail-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-strip li+li {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .quickstart-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .catalog-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .catalog-row h3 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 7rem;
  }

  .project-heading {
    padding-top: 0.75rem;
    padding-bottom: 2.5rem;
  }

  .wordmark-stage {
    padding-top: 2.5rem;
  }

  .project-wordmark {
    font-size: clamp(2.5rem, 9vw, 3.5rem);
  }

  .project-github {
    font-size: 0.875rem;
  }

  .project-subtitle {
    max-width: 27rem;
  }

  .project-principles {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .project-principles span {
    margin-top: 0.1rem;
  }

  .robot-cycle {
    aspect-ratio: 4 / 3;
    max-width: 24rem;
  }

  .cycle-stages li {
    max-width: 42%;
  }

  .cycle-stages strong {
    font-size: 0.875rem;
  }

  .cycle-stages span {
    font-size: 0.75rem;
  }

  .project-stats a {
    padding-inline: 0.5rem;
  }

  .contents ul {
    gap: 0;
    justify-content: flex-start;
  }

  .contents a {
    padding: 0.45rem 0.5rem;
    font-size: 0.875rem;
  }

  .article-section {
    padding-block: 2.5rem;
  }

  .section-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-action,
  .meta-pill {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
  }

  .news-item {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 1rem;
  }

  .news-body {
    grid-column: 1 / -1;
  }

  .components {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-inline: 0.75rem;
  }

  .components div {
    padding: 0.75rem 0.5rem;
  }

  .support-section {
    padding-block: 2.5rem;
  }

  .catalog-row {
    padding: 1.5rem 0.75rem;
  }

  .catalog-items {
    gap: 0.5rem 0;
  }

  .catalog-details {
    gap: 1.25rem;
  }

  .catalog-details>div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
  }

  .catalog-details dt {
    color: var(--muted);
    font-size: 0.875rem;
  }

  .ui-embed iframe {
    height: 720px;
  }

  .community-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
    gap: 0.85rem;
  }

  .community-card {
    padding: 0.75rem;
  }
}

.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  z-index: 20;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

.project-github,
.project-stats a,
.contents a,
.copy-button {
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.community-card,
.components>div {
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.catalog-row {
  transition: background-color 220ms ease;
}

.catalog-row:focus-within {
  background-color: var(--brand-wash);
}

.ui-embed {
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

.ui-embed:focus-within {
  border-color: var(--brand-border);
  box-shadow: 0 8px 32px var(--brand-shadow);
}

@media (hover: hover) and (pointer: fine) {
  .project-github:hover {
    box-shadow: 0 4px 14px var(--brand-shadow);
  }

  .community-card:hover,
  .components>div:hover {
    transform: translateY(-3px);
    border-color: var(--brand-border);
    box-shadow: 0 8px 24px var(--brand-shadow);
  }

  .catalog-row:hover {
    background-color: var(--brand-wash);
  }

  .ui-embed:hover {
    border-color: var(--brand-border);
    box-shadow: 0 8px 32px var(--brand-shadow);
  }
}

.motion-enabled .reveal-target {
  transition: opacity 320ms ease, translate 320ms cubic-bezier(0.22, 1, 0.36, 1), background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.motion-enabled .reveal-pending {
  opacity: 0;
  translate: 0 16px;
}

.intro-motion .project-wordmark {
  animation: wordmark-arrive 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cycle-motion .cycle-stages>li {
  animation: cycle-highlight 1.1s ease-in-out;
}

.cycle-motion .cycle-stages>.stage-experience {
  animation-delay: 1.1s;
}

.cycle-motion .cycle-stages>.stage-learn {
  animation-delay: 2.2s;
}

.cycle-motion .cycle-stages>.stage-improve {
  animation-delay: 3.3s;
}

.cycle-motion .cycle-arrows>g>path {
  animation: cycle-flow 1.1s linear;
}

.cycle-motion .cycle-arrows>g>path:nth-child(2) {
  animation-delay: 1.1s;
}

.cycle-motion .cycle-arrows>g>path:nth-child(3) {
  animation-delay: 2.2s;
}

.cycle-motion .cycle-arrows>g>path:nth-child(4) {
  animation-delay: 3.3s;
}

@keyframes wordmark-arrive {
  from {
    opacity: 0;
    translate: 0 12px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes cycle-highlight {

  0%,
  100% {
    border-color: var(--brand-line);
    box-shadow: 0 0 0 0 transparent;
  }

  30%,
  65% {
    border-color: var(--brand-border);
    box-shadow: 0 0 0 5px var(--brand-shadow), 0 6px 20px var(--brand-shadow);
  }
}

@keyframes cycle-flow {
  0% {
    stroke: var(--brand);
    stroke-dasharray: 10 12;
    stroke-dashoffset: 44;
    opacity: 0.5;
  }

  35%,
  75% {
    opacity: 1;
  }

  100% {
    stroke: var(--brand);
    stroke-dasharray: 10 12;
    stroke-dashoffset: 0;
    opacity: 0.5;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .motion-enabled .reveal-pending {
    opacity: 1;
    translate: none;
  }

  .community-card:hover,
  .components>div:hover {
    transform: none;
  }
}
