:root {
  --bg: #ffffff;
  --paper: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #eef2f7;
  --line: #e5e7eb;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --violet: #7c3aed;
  --violet-soft: #ede9fe;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 14px 40px rgba(15, 23, 42, 0.06);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-wide: 1240px;
  --max-narrow: 920px;
  --mono: "SFMono-Regular", "Cascadia Code", "Liberation Mono", Menlo, Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  margin-left: auto;
  margin-right: auto;
  width: min(100%, var(--max-wide));
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue); }
code, pre { font-family: var(--mono); }
pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: anywhere;
  overflow: hidden;
}
code {
  overflow-wrap: anywhere;
  word-break: normal;
}

.site-header {
  position: sticky;
  top: 0.75rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(calc(100% - 2rem), var(--max-wide));
  margin: 1rem auto 0;
  padding: 0.72rem 0.9rem;
  border: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 36px rgba(15, 23, 42, 0.06);
}
.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  margin-left: 1rem;
  font-size: 1.75rem;
  font-weight: 760;
  letter-spacing: -0.03em;
}
.brand-logo {
  width: 350px;
  height: auto;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 0.95rem;
}
.nav-links { display: flex; align-items: center; gap: 0.3rem; font-size: 1rem; }
.nav-links a { padding: 0.45rem 0.7rem; border-radius: 999px; }
.nav-links a:hover { background: var(--soft); color: var(--ink); }

.section-narrow, .section-wide { width: min(calc(100% - 2rem), var(--max-wide)); margin-inline: auto; }
.section-narrow { max-width: var(--max-narrow); }

.hero {
  min-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6.5rem 0 4rem;
  text-align: center;
}
.eyebrow {
  margin: 0 0 1rem;
  color: var(--blue);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero h1 { margin: 0; font-size: clamp(2.3rem, 12vw, 7rem); line-height: 0.92; letter-spacing: -0.06em; }
.subtitle {
  max-width: 760px; margin: 1.2rem auto 1.1rem; font-size: clamp(1.45rem, 3vw, 2.45rem);
  font-weight: 620; line-height: 1.14; letter-spacing: -0.055em;
}
.authors {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 0.9rem; margin: 1.3rem 0 0.2rem; font-size: 1.25rem; font-weight: 650;
}
.affiliation {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 650;
}
.affiliation-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-left: 2.35rem;
  margin-top: 1.5rem;
}
.affiliation-logos a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.affiliation-logos img {
  display: block;
  width: auto;
  height: 2.5rem;
  max-width: 400px;
}
.link-row {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 0.75rem; margin: 2rem 0 2.4rem;
}
.pill-link, .ghost-button, .tab-button, .step-button {
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.pill-link {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem;
  padding: 0.65rem 1.05rem; border-radius: 999px; font-weight: 720;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}
.pill-link:hover, .ghost-button:hover, .tab-button:hover, .step-button:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
}
.abstract-card {
  max-width: 860px; padding: clamp(1.4rem, 4vw, 2.25rem); border: 1px solid var(--line);
  border-radius: var(--radius-xl); background: rgba(255, 255, 255, 0.72); box-shadow: var(--shadow); text-align: left;
}
.abstract-card h2 {
  margin: 0 0 0.75rem; font-size: 1.2rem;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.abstract-card p { margin: 0; color: #000000; font-size: 1.02rem; }

.section-wide { padding: 6rem 0; }
.section-heading { margin: 0 auto 2rem; text-align: center; }
.section-heading h2 { margin: 0; font-size: clamp(2.15rem, 5vw, 4rem); line-height: 1.02; letter-spacing: -0.03em; }
.section-heading h2 {
  display: block;
  width: 100%;
  max-width: 100%;
}
.section-heading p:not(.eyebrow) { margin: 1rem auto 0; font-size: 1.04rem; }

.pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 0.65rem;
  align-items: stretch;
  margin-top: 2.5rem;
}
.pipeline-step {
  min-height: 170px; padding: 1.3rem; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: rgba(255, 255, 255, 0.82); box-shadow: var(--shadow-soft);
}
.step-number { color: var(--blue); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.13em; }
.pipeline-step h3, .feature-card h3, .state-card h4, .takeaway-card h3, .chart-card h3, .context-card h3 {
  margin: 0 0 0.45rem; line-height: 1.18; letter-spacing: -0.035em;
}
.pipeline-step p, .feature-card p { margin: 0; font-size: 0.95rem; }
.pipeline-arrow { display: grid; place-items: center; font-size: 1.5rem; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1rem; }
.feature-card { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); }

.diagram-card {
  margin: 0;
  padding: clamp(1rem, 2vw, 1.4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}
.overview-diagram {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}
.diagram-card figcaption {
  margin-top: 0.85rem;
  color: #334155;
  font-size: 0.98rem;
  text-align: center;
}
.component-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.1rem;
}
.component-card {
  padding: 1.15rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.86);
  box-shadow: var(--shadow-soft);
}
.component-kicker {
  display: inline-flex;
  margin-bottom: 0.55rem;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.component-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.02rem;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.component-card p {
  margin: 0;
  color: #374151;
  font-size: 0.92rem;
  line-height: 1.55;
}
.experiment-primer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin: 0 0 1.6rem;
}
.primer-card {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.86);
  box-shadow: var(--shadow-soft);
}
.primer-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.primer-card p,
.primer-card li {
  color: #374151;
  font-size: 0.96rem;
  line-height: 1.65;
}
.primer-card p { margin: 0.55rem 0 0; }
.primer-card ul { margin: 0.2rem 0 0; padding-left: 1.2rem; }
.primer-card li { margin: 0.45rem 0; }
.metric-card { grid-column: 1 / -1; }
.metric-explainer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.metric-explainer > div {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
}
.metric-explainer strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #0f172a;
}
.metric-explainer code {
  padding: 0.12rem 0.34rem;
  border-radius: 8px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.9em;
}
.metric-categories {
  margin-top: 0.9rem !important;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  color:#000000;
}

.context-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.95fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.context-card {
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255,255,255,0.78);
  box-shadow: var(--shadow-soft);
}
.context-card h3 { font-size: 1.25rem; }
.problem-description-card ul { margin: 0.4rem 0 0; padding-left: 1.2rem; color: #374151; }
.problem-description-card li { margin: 0.55rem 0; }
.context-copy { margin: 0.35rem 0 0.9rem; color: #374151; }
.context-grid-wrap {
  padding: 1rem; border-radius: 20px; background: linear-gradient(180deg, #f9fafb, #ffffff); border: 1px solid var(--line);
}
.compact-example { display: grid; place-items: center; }

.example-shell {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
}
.example-toolbar, .example-stage {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--paper);
}
.compact-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem;
}
.step-strip {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.35rem;
  justify-content: stretch;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scrollbar-width: none;
}
.step-strip::-webkit-scrollbar {
  display: none;
}

.fixed-strip {
  display: flex;
  width: 100%;
  min-width: 0;
}
.step-button {
  width: 1.95rem;
  height: 1.95rem;
  padding: 0;
  min-width: 1.95rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 810;
  text-align: center;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.82rem;
}
.step-button.active {
  border-color: rgba(37, 99, 235, 0.45);
  background: var(--blue);
  color: white;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
}
.step-arrow {
  flex: 1 1 0;
  min-width: 1.2rem;
  max-width: 999px;
  height: 1.9rem;
  position: relative;
  display: block;
  color: var(--muted);
  background-image: linear-gradient(90deg, var(--blue), var(--blue));
  background-repeat: no-repeat;
  background-position: left 0 top 50%;
  background-size: 0 2px;
}
.step-arrow::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0.55rem;
  top: 50%;
  border-top: 2px solid var(--line);
}
.step-arrow::after {
  content: '';
  position: absolute;
  right: -0.02rem;
  top: 50%;
  width: 0.42rem;
  height: 0.42rem;
  border-top: 2px solid var(--line);
  border-right: 2px solid var(--line);
  transform: translateY(-50%) rotate(45deg);
}
.step-arrow.is-complete {
  background-size: calc(100% - 0.55rem) 2px;
}
.step-arrow.is-complete::after,
.step-arrow.is-flowing::after {
  border-top-color: var(--blue);
  border-right-color: var(--blue);
}
.step-arrow.is-flowing {
  animation: step-arrow-flow 760ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes step-arrow-flow {
  from {
    background-size: 0 2px;
  }
  to {
    background-size: calc(100% - 0.55rem) 2px;
  }
}
.step-index {
  flex: 0 0 auto; display: grid; place-items: center; width: 2rem; height: 2rem;
  border-radius: 999px; background: var(--soft); font-weight: 800;
}
.step-button.active .step-index { background: var(--blue); color: white; }
.step-copy { min-width: 0; }
.step-copy strong, .step-copy span { display: block; }
.step-copy strong { font-size: 0.93rem; line-height: 1.2; }
.step-copy span { margin-top: 0.12rem; font-size: 0.8rem; line-height: 1.25; }
.ghost-button { min-width: 5rem; padding: 0.55rem 0.8rem; border-radius: 999px; font-weight: 720; }

.example-stage { padding: 1.2rem; }
.state-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wide-header h3 { margin: 0.35rem 0 0; font-size: clamp(1.35rem, 3vw, 2.1rem); letter-spacing: -0.055em; }
.badge {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 999px;
  padding: 0.35rem 0.65rem; background: var(--blue-soft); color: var(--blue); font-size: 0.8rem; font-weight: 800;
}
.translation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  margin-top: 1rem;
}
.translation-row .state-card.code-card {
  display: flex;
  flex-direction: column;
}
.translation-row .state-card.code-card pre {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.flow-arrow {
  display: grid; place-items: center; min-width: 3.5rem; color: var(--blue);
  font-size: clamp(1.9rem, 3vw, 2.8rem); font-weight: 900;
}
.detail-row { display: grid; gap: 1rem; margin-top: 1rem; }
.synthesis-detail-row { grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.55fr); align-items: start; }
.repair-detail-row { grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr); align-items: start; }
.state-card {
  padding: 0.5rem; background: white; overflow: hidden;
}
.state-card h4 { font-size: 1rem; letter-spacing: 0.04em; text-transform: uppercase; }
.state-card pre {
  height: auto; padding: 1rem 1.05rem; border-radius: 16px;
  background: #f8fafc; color: #1f2937; font-size: 0.92rem; line-height: 1.58; overflow: hidden;
}
.accent-blue { border-top: 4px solid var(--blue); }
.accent-green { border-top: 4px solid var(--green); }
.accent-violet { border-top: 4px solid var(--violet); }
.accent-amber { border-top: 4px solid var(--amber); }
.accent-red { border-top: 4px solid var(--red); }

.sig-block {
  padding: 0.8rem 0.9rem; border-radius: 14px; background: #f8fafc;
  font-family: var(--mono); font-size: 0.9rem; line-height: 1.55; color: #1f2937;
}
.tok-keyword { color: #2563eb; font-weight: 700; }
.tok-type { color: #7c3aed; font-weight: 650; }
.tok-string { color: #000000; }
.tok-comment { color: #64748b; font-style: italic; }
.tok-ident { color: #000000; }
.tok-op { color: #dc2626; font-weight: 700; }
.tok-num { color: #9333ea; }

.definition-stack { display: grid; gap: 0.55rem; align-content: start; }
.definition-card { padding: 0.4rem 0.55rem; border: 1px solid #e9e8f8; border-radius: 16px; background: #faf9ff; }
.definition-card p { margin: 0.35rem 0 0; color: #4b5563; font-size: 0.9rem; line-height: 1.4; }
.def-desc { padding-left: 1.45rem; color: #b45309; }
.worklist { display: flex; flex-wrap: wrap; gap: 0.55rem; align-content: flex-start; }
.workitem, .empty-chip {
  display: inline-flex; align-items: center; gap: 0.4rem; border-radius: 999px;
  padding: 0.35rem 0.65rem; font-size: 0.8rem; font-weight: 800;
}
.workitem { color: var(--blue); background: var(--blue-soft); }
.empty-chip { background: var(--soft); }

.grid-caption { margin-bottom: 0.85rem; font-size: 1.1rem; line-height: 1.5; text-align: center; }
.depot-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.45rem; max-width: 260px; margin-inline: auto;
}
.mini-grid { display: grid; grid-template-columns: 1fr; max-width: 64px; margin-inline: auto; }
.cell, .mini-cell {
  display: grid; place-items: center; aspect-ratio: 1; border: 1px solid var(--line);
  border-radius: 12px; background: white; font-family: var(--mono); font-size: 1rem; font-weight: 800;
}
.cell.wall, .mini-cell.wall { background: #fff7ed; border-color: rgba(217, 119, 6, 0.24); }
.cell.row-hit, .cell.col-hit { background: var(--blue-soft); border-color: rgba(37, 99, 235, 0.34); }
.cell.bomb, .mini-cell.active { color: white; background: var(--blue); border-color: var(--blue); }

.solver-status {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.9rem 1rem; border-radius: 18px;
  background: #f8fafc; border: 1px solid var(--line); font-weight: 780;
}
.status-dot { width: 0.75rem; height: 0.75rem; border-radius: 999px; background: #9ca3af; }
.solver-status.unsat { color: var(--red); background: var(--red-soft); border-color: rgba(220, 38, 38, 0.25); }
.solver-status.sat { color: var(--green); background: var(--green-soft); border-color: rgba(22, 163, 74, 0.25); }
.solver-status.unsat .status-dot { background: var(--red); }
.solver-status.sat .status-dot { background: var(--green); }
#repair-feedback { margin: 0; color: #374151; font-size: 0.98rem; line-height: 1.7; }

.result-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; margin-bottom: 1.1rem; }
.result-method-card {
  width: min(100%, 1120px);
  margin: 0 auto 1.25rem;
  padding: clamp(1.05rem, 2.4vw, 1.45rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.92);
  box-shadow: var(--shadow-soft);
}
.result-method-header {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.95rem;
}
.result-method-eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.result-method-header h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.8rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}
.result-method-header p {
  margin: 0;
  color: #475569;
  font-size: 0.98rem;
  line-height: 1.6;
}
.result-method-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 0.7rem;
  margin: 0;
}
.result-method-item {
  display: grid;
  gap: 0.32rem;
  align-content: start;
  position: relative;
  padding: 0.78rem 0.85rem;
  padding-left: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
  border-left: 0.42rem solid var(--method-color, var(--blue));
}
.result-method-list dt {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.25;
}
.result-method-list dd {
  margin: 0;
  color: #374151;
  font-size: 0.93rem;
  line-height: 1.55;
}

.tab-button { padding: 0.65rem 1rem; border-radius: 999px; font-weight: 780; font-size: 1.2rem; }
.tab-button.active { background: var(--ink); border-color: var(--ink); color: white; }
.chart-legend {
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 0.8rem 1.2rem;
  margin: 0.2rem 0 1rem; color: #334155;
}
.results-shared-legend {
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 0.95rem 1.5rem;
  width: fit-content; max-width: 100%; margin: 0 auto 1.35rem; padding: 0.95rem 1.35rem;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,0.88); box-shadow: var(--shadow-soft);
}
.legend-item { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 1.2rem; font-weight: 650; color: #000000; }
.legend-item.shared { font-size: 1rem; font-weight: 760; color: #334155; }
.legend-dot { width: 0.72rem; height: 0.72rem; border-radius: 999px; background: var(--bar-color, var(--blue)); }
.legend-dot.shared { width: 1rem; height: 1rem; }

.results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; justify-items: center; }
.chart-card, .takeaway-card {
  border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--paper); box-shadow: var(--shadow-soft);
}
.chart-card { padding: 1.15rem; text-align: center; width: min(100%, 760px); }
.chart-card.full-width { grid-column: 1 / -1; justify-self: center; }
.chart-card h3 { margin: 0 0 0.25rem; font-size: 1.18rem; letter-spacing: -0.035em; }
.chart-card p { margin: 0 0 1rem; font-size: 0.92rem; }
.chart-svg-wrap { width: 100%; overflow-x: auto; }
.chart-svg {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
  max-width: 100%;
}
.chart-axis, .chart-gridline, .chart-bar-label, .chart-group-label, .chart-tick-label { font-family: var(--sans); }
.chart-gridline { stroke: #e5e7eb; stroke-width: 1; }
.chart-axis { stroke: #94a3b8; stroke-width: 1.2; }
.chart-bar-label { fill: #334155; font-size: 18px;}
.chart-group-label { fill: #475569; font-size: 24px; }
.chart-tick-label { fill: #475569; font-size: 1.25rem; }
.chart-tick-label { font-size: 16px; }
.takeaway-card { margin-top: 1rem; padding: 1.4rem; }
.takeaway-card p { margin: 0.5rem 0 0; color: #000000; }

.site-footer {
  display: flex; justify-content: center; gap: 1rem; width: min(calc(100% - 2rem), var(--max-wide));
  margin: 0 auto 2rem; padding: 2rem 0; border-top: 1px solid var(--line); font-size: 0.9rem;
}
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .step-arrow.is-flowing {
    animation: none;
    transition: none;
  }
}

@media (max-width: 1100px) {
  .pipeline, .feature-grid, .results-grid, .context-shell, .synthesis-detail-row, .repair-detail-row, .translation-row, .component-summary, .experiment-primer, .metric-explainer {
    grid-template-columns: 1fr;
  }
  .flow-arrow, .pipeline-arrow { display: none; }
  .fixed-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-toolbar { flex-direction: column; align-items: stretch; }
  .result-method-list { grid-template-columns: 1fr; }
  .chart-card { width: min(100%, 640px); }
}

@media (max-width: 760px) {
  .site-header { align-items: flex-start; border-radius: 24px; }
  .nav-links { display: none; }
  .hero { min-height: auto; padding-top: 5rem; }
  .feature-grid, .results-grid, .context-shell, .repair-detail-row, .synthesis-detail-row, .fixed-strip, .component-summary, .experiment-primer, .metric-explainer {
    grid-template-columns: 1fr;
  }
  .repair-header { flex-direction: column; align-items: flex-start; }
  .chart-card { padding: 0.9rem; }
  .chart-svg { min-width: 0; }
  .site-footer { flex-direction: column; }
}

/* Revised overview: one consolidated card instead of five separate cards */
.overview-process-card {
  margin-top: 1.1rem;
  padding: clamp(1.25rem, 3vw, 1.7rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.9);
  box-shadow: var(--shadow-soft);
}
.overview-process-header {
  max-width: 900px;
}
.overview-process-header h3 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
}
.overview-process-header p {
  margin: 0;
  color: #374151;
  font-size: 1rem;
}
.overview-bullet-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.overview-bullet-block {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #f8fafc;
}
.overview-bullet-block h4 {
  margin: 0 0 0.7rem;
  font-size: 1.25rem;
  letter-spacing: -0.035em;
}
.overview-bullet-block ul {
  margin: 0;
  padding-left: 1.15rem;
}
.overview-bullet-block li {
  margin: 0.48rem 0;
  color: #374151;
  font-size: 0.96rem;
  line-height: 1.6;
}
/* Revised experiment setup and metric examples */
.setup-list {
  margin-top: 0.35rem !important;
}
.metric-intro {
  max-width: 980px;
}
.metric-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.metric-visual-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.7fr);
  gap: 1rem;
  align-items: stretch;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #f8fafc;
}
.metric-visual-card h4 {
  margin: 0.55rem 0 0.45rem;
  font-size: 1.08rem;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.metric-visual-card p {
  margin: 0;
}
.metric-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 860;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.metric-tag.accept {
  color: var(--green);
  background: var(--green-soft);
}
.metric-tag.reject {
  color: var(--red);
  background: var(--red-soft);
}
.metric-visual-stage {
  display: grid;
  align-content: center;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}
.case-expression {
  text-align: center;
  font-size: 0.92rem;
}
.metric-depot-grid {
  max-width: 220px;
  gap: 0.36rem;
}
.metric-depot-grid .cell {
  border-radius: 10px;
  font-size: 0.92rem;
}
.cell.missed {
  color: #991b1b;
  background: #fee2e2;
  border-color: rgba(220, 38, 38, 0.36);
  box-shadow: inset 0 0 0 2px rgba(220, 38, 38, 0.08);
}
.cell.bad-bomb {
  color: #111827;
  background: var(--amber-soft);
  border-color: rgba(217, 119, 6, 0.42);
}
.case-status {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  padding: 0.48rem 0.7rem;
  border-radius: 999px;
  font-weight: 820;
  font-size: 1rem;
}
.accept-status {
  color: var(--green);
  background: var(--green-soft);
}
.reject-status {
  color: var(--red);
  background: var(--red-soft);
}

@media (max-width: 1100px) {
  .overview-bullet-columns,
  .metric-visual-grid,
  .metric-visual-card {
    grid-template-columns: 1fr;
  }
}

/* Feedback revisions */
.hero {
  min-height: auto;
  padding: 5.4rem 0 1.6rem;
}
.section-wide {
  padding: 4rem 0;
}
#overview {
  padding-top: 2.25rem;
}
.link-row {
  margin: 1.2rem 0 1.6rem;
}
.affiliation {
  color: #334155;
  font-weight: 650;
}
.logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 1.15rem 0 0.3rem;
}
.logo-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.45rem;
  padding: 0.32rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.86);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.logo-card:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: var(--shadow-soft);
}
.logo-card img {
  display: block;
  width: auto;
  height: 2.35rem;
}
.logo-card:first-child img {
  height: 2.3rem;
}
.io-spec-card {
  margin: 1rem 0;
  padding: clamp(1rem, 2.2vw, 1.35rem);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255,255,255,0.86);
  box-shadow: var(--shadow-soft);
}
.io-spec-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.io-spec-header h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.04em;
}
.io-spec-header p {
  margin: 0.35rem 0 0;
  color: #475569;
  font-size: 0.96rem;
}
.io-strip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
  color: #111827;
  font-size: 0.95rem;
  white-space: nowrap;
}
.io-strip code {
  padding: 0.12rem 0.36rem;
  border-radius: 8px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.92em;
}
.io-arrow {
  color: var(--blue);
  font-weight: 900;
}
.mapping-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
}
.mapped-text,
.mapped-formula {
  background: #ffffff;
}
.mapped-formula {
  grid-column: 1 / -1;
  width: 100%;
}
.mapped-text h4,
.mapped-formula h4 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mapped-text p {
  margin: 0;
  color: #111827;
  font-size: 1rem;
  line-height: 1.85;
}
.map-token {
  display: inline;
  padding: 0.08rem 0.24rem;
  border-radius: 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  font-weight: 650;
}
.map-spec { background: rgba(14, 165, 233, 0.18); color: #075985; }
.map-valid { background: rgba(34, 197, 94, 0.18); color: #166534; }
.map-wipe { background: rgba(234, 179, 8, 0.28); color: #854d0e; }
.map-wall { background: rgba(248, 113, 113, 0.22); color: #991b1b; }
.mapped-formula pre {
  padding: 0.75rem 0 0;
  border-radius: 0;
  background: transparent;
  color: #111827;
  font-size: 0.86rem;
  line-height: 1.58;
  overflow-x: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.mapped-formula code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
}
.formal-definition-list {
  display: grid;
  gap: 0.72rem;
}
.formal-definition {
  padding: 0.78rem 0.82rem;
  border: 1px solid #e5e7eb;
  border-left: 5px solid #94a3b8;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}
.spec-def { border-left-color: #0ea5e9; }
.valid-def { border-left-color: #22c55e; }
.wipe-def { border-left-color: #eab308; }
.wall-def { border-left-color: #f87171; }
.formal-signature {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem 0.38rem;
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.45;
}
.def-keyword {
  color: #2563eb;
  font-weight: 850;
}
.formal-name {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.36rem 0.12rem;
  font-weight: 900;
  line-height: 1.25;
}
.formal-args {
  min-width: 0;
  overflow-wrap: anywhere;
}
.formal-body {
  max-width: 100%;
  padding-top: 3px !important;
  margin-left: 1.45rem;
}
 .method-card {
  grid-column: 1 / -1;
}
.method-card-intro {
  margin: 0 0 1rem !important;
  color: #374151;
}
.method-rq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}
.method-rq-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #f8fafc;
}
.method-rq-card h4 {
  margin: 0 0 0.75rem;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.method-rq-card dl {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}
.method-rq-card dl > div {
  display: grid;
  grid-template-columns: 6.8rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  padding: 0.58rem 0.68rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.78);
}
.method-rq-card dt {
  margin: 0;
  color: #0f172a;
  font-weight: 850;
}
.method-rq-card dd {
  margin: 0;
  color: #374151;
  font-size: 0.91rem;
  line-height: 1.5;
}
.rq1-methods { border-top: 4px solid var(--green); }
.rq2-methods { border-top: 4px solid var(--blue); }
.rq3-methods { border-top: 4px solid #eab308; }
.rq4-methods { border-top: 4px solid #ef4444; }
.site-footer {
  align-items: center;
  flex-direction: column;
  gap: 0.8rem;
}
.footer-logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-logo-row img {
  height: 2.2rem;
  width: auto;
  max-width: 140px;
}

@media (max-width: 1100px) {
  .io-spec-header,
  .mapping-grid,
  .method-rq-grid,
  .method-rq-card dl > div {
    grid-template-columns: 1fr;
  }
  .io-spec-header {
    flex-direction: column;
  }
  .io-strip {
    justify-content: flex-start;
    white-space: normal;
  }
}

@media (max-width: 760px) {
  .hero {
    padding-top: 4.7rem;
  }
  .affiliation-logos img {
    height: 2rem;
  }
  .footer-logo-row img {
    height: 1.3rem;
  }
  .logo-card img,
  .logo-card:first-child img {
    height: 2rem;
  }
  .mapped-formula pre {
    font-size: 0.78rem;
  }
}
