:root {
  --bg: #ffffff;
  --bg-alt: #f6f8f5;
  --ink: #1f2328;
  --ink-soft: #424a53;
  --muted: #68717a;
  --line: #e2e6df;
  --line-strong: #ccd4ca;
  --accent: #286a5a;
  --accent-strong: #174f42;
  --accent-soft: #e8f2ee;
  --amber-soft: #fff5dc;
  --blue-soft: #eef5fb;
  --link: #0b5d8f;
  --link-hover: #063e62;
  --code-bg: #f4f6f7;
  --maxw: 1120px;
  --maxw-narrow: 840px;
  --radius: 8px;
  --transition: 160ms ease-out;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

p {
  margin: 0 0 1em;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
}

sup {
  color: var(--muted);
  font-size: 0.72em;
  line-height: 0;
  vertical-align: super;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 10;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: var(--maxw-narrow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.site-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.site-mark:hover {
  color: var(--ink);
  text-decoration: none;
}

.site-mark span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
}

.language-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
}

.language-switch__button {
  min-width: 48px;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.language-switch__button:hover {
  color: var(--ink);
}

.language-switch__button.is-active {
  background: var(--ink);
  color: #ffffff;
}

.hero {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f9fbf8 100%);
}

.hero__inner {
  padding-top: 36px;
  padding-bottom: 56px;
  text-align: center;
}

.venue {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.title {
  max-width: 920px;
  margin: 0 auto 18px;
  color: var(--ink);
  font-size: 46px;
  font-weight: 700;
  line-height: 1.12;
  text-wrap: balance;
}

.title__nowrap {
  white-space: nowrap;
}

.authors {
  max-width: 860px;
  margin: 0 auto 10px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.75;
  text-wrap: balance;
}

.authors a {
  font-weight: 600;
}

.affil {
  max-width: 860px;
  margin: 0 auto 24px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.75;
  text-wrap: balance;
}

.hero-thesis {
  max-width: 880px;
  margin: 24px auto 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.7;
  text-wrap: balance;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 30px 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.btn--primary:hover {
  border-color: #303741;
  background: #303741;
  color: #ffffff;
}

.btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 22px;
  padding: 0 6px;
  border-radius: 5px;
  background: rgba(40, 106, 90, 0.12);
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 700;
}

.btn--primary .btn__icon {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.section {
  padding: 66px 0;
  border-top: 1px solid var(--line);
}

.section:first-child {
  border-top: 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section-heading {
  margin-bottom: 30px;
}

.eyebrow {
  display: block;
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.headline {
  max-width: 800px;
  color: var(--ink);
  font-family: "Noto Serif", Georgia, "Times New Roman", serif;
  font-size: 39px;
  font-weight: 700;
  line-height: 1.14;
  text-wrap: balance;
}

.section-lead {
  max-width: 840px;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
}

.section-lead--narrow {
  max-width: 760px;
}

.section-lead--compact {
  margin: 0 0 18px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: start;
}

.prose {
  color: var(--ink-soft);
  font-size: 17px;
}

.prose p:last-child {
  margin-bottom: 0;
}

.card-grid,
.task-card-grid,
.mechanism-layout,
.problem-grid,
.figure-grid {
  display: grid;
  gap: 18px;
}

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

.info-card,
.task-card,
.mechanism-card,
.problem-card,
.figure-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.info-card,
.mechanism-card,
.problem-card {
  padding: 24px;
}

.card-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.info-card h3,
.task-card h3,
.mechanism-card h3,
.problem-card h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.info-card p,
.task-card p,
.mechanism-card p,
.problem-card p {
  margin: 0;
  color: var(--ink-soft);
}

.tabs {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  overflow: hidden;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  padding: 6px;
  border-bottom: 1px solid var(--line);
  background: #eef3ef;
}

.tab-button {
  flex: 1 1 190px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.tab-button:hover {
  color: var(--ink);
}

.tab-button.is-active {
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--ink);
}

.tab-panel {
  padding: 24px;
}

.filter-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.filter-label {
  flex: 0 0 118px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.filter-chip {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.filter-chip:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.filter-chip.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.task-count {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

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

.task-card {
  padding: 20px;
}

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

.task-code {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--ink);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.task-group {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.task-card p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.55;
}

.task-card strong,
.cite-use strong {
  color: var(--ink);
}

.cite-use {
  margin-top: 14px !important;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.empty-state {
  margin: 18px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--amber-soft);
  color: var(--ink-soft);
  font-weight: 700;
}

.mechanism-layout,
.problem-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mechanism-card:first-child {
  background: var(--blue-soft);
}

.mechanism-card:nth-child(2) {
  background: #ffffff;
}

.mechanism-card:nth-child(3) {
  background: var(--amber-soft);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  -webkit-overflow-scrolling: touch;
}

.benchmark-table {
  width: 100%;
  min-width: 930px;
  border-collapse: collapse;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.45;
}

.benchmark-table th,
.benchmark-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.benchmark-table th {
  background: #eef4f1;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

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

.benchmark-table td:first-child {
  color: var(--ink);
}

.benchmark-table details {
  max-width: 260px;
}

.benchmark-table summary {
  color: var(--link);
  cursor: pointer;
  font-weight: 700;
}

.benchmark-table summary:hover {
  color: var(--link-hover);
}

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

.figure-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.figure-card figure {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin: 0;
}

.figure-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

figcaption {
  min-height: 88px;
  padding: 16px 18px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

figcaption strong {
  color: var(--ink);
}

.figure-actions {
  display: flex;
  gap: 10px;
  padding: 0 18px 18px;
}

.figure-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.figure-actions a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.resources-callout {
  padding: 36px 0;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.resources-callout .container {
  padding-top: 22px;
  padding-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.resources-callout h2 {
  margin-bottom: 8px;
  font-size: 20px;
}

.resources-callout p {
  margin: 0;
  color: var(--ink-soft);
}

.bibtex {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--code-bg);
  overflow: hidden;
}

.bibtex pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.65;
}

.bibtex__copy {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: background var(--transition), border-color var(--transition);
}

.bibtex__copy:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.footer {
  padding: 30px 0 42px;
  border-top: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.footer p {
  margin: 0 0 8px;
}

.footer p:last-child {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .split,
  .card-grid--three,
  .task-card-grid,
  .mechanism-layout,
  .problem-grid,
  .figure-grid {
    grid-template-columns: 1fr;
  }

  .title {
    font-size: 38px;
  }

  .headline {
    font-size: 34px;
  }

  .tab-panel {
    padding: 20px;
  }
}

@media (max-width: 700px) {
  .container {
    padding: 0 18px;
  }

  .topbar {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .site-mark span:last-child {
    display: none;
  }

  .hero__inner {
    padding-top: 30px;
    padding-bottom: 44px;
  }

  .title {
    font-size: 32px;
  }

  .title__nowrap {
    white-space: normal;
  }

  .hero-thesis,
  .prose,
  .section-lead {
    font-size: 16px;
  }

  .links {
    justify-content: stretch;
  }

  .btn {
    flex: 1 1 calc(50% - 10px);
    padding-inline: 10px;
  }

  .section {
    padding: 50px 0;
  }

  .headline {
    font-size: 29px;
  }

  .info-card,
  .task-card,
  .mechanism-card,
  .problem-card {
    padding: 18px;
  }

  .tab-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tab-button {
    min-width: 0;
    font-size: 13px;
  }

  .tab-panel {
    padding: 16px;
  }

  .filter-panel {
    padding: 14px;
  }

  .filter-label {
    flex-basis: 100%;
  }

  .table-wrap {
    margin-right: -18px;
    border-right: 0;
    border-radius: var(--radius) 0 0 var(--radius);
  }

  .benchmark-table {
    min-width: 860px;
    font-size: 13px;
  }

  .benchmark-table th,
  .benchmark-table td {
    padding: 11px 12px;
  }

  figcaption {
    min-height: 0;
  }

  .bibtex pre {
    padding: 52px 18px 18px;
    font-size: 12.5px;
  }
}

@media (max-width: 430px) {
  .btn {
    flex-basis: 100%;
  }

  .tab-list {
    grid-template-columns: 1fr;
  }

  .language-switch__button {
    min-width: 44px;
  }
}
