:root {
  --ink: #111827;
  --muted: #5b6472;
  --line: #e5e7eb;
  --line-strong: #c7ccd4;
  --paper: #ffffff;
  --desk: #ffffff;
  --soft: #f7f8fa;
  --teal: #245c63;
  --blue: #334e75;
  --green: #426a4a;
  --amber: #9a6a18;
  --coral: #a4493d;
  --shadow: 0 10px 26px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--desk);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  letter-spacing: 0;
}

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

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

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 66px;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 850;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--ink);
  border-radius: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.nav-links a {
  min-height: 36px;
  padding: 8px 12px;
  color: var(--muted);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 760;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  background: #f3f4f6;
}

.hero {
  width: min(980px, calc(100% - 40px));
  min-height: 510px;
  margin: 0 auto;
  padding: 104px 0 88px;
  border-bottom: 1px solid var(--line);
}

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

.authors {
  margin-top: 26px;
  font-size: 15px;
  line-height: 1.65;
}

.authors p,
.affiliations p,
.intro-copy p {
  margin: 0;
}

.authors p {
  color: var(--ink);
}

.affiliations p {
  color: var(--muted);
}

.intro-copy p {
  color: #2f3742;
}

.authors strong {
  margin-right: 8px;
  font-weight: 800;
}

.authors sup,
.affiliations sup {
  margin-right: 2px;
  font-size: 0.72em;
  vertical-align: super;
}

.affiliations {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(62px, 11vw, 132px);
  line-height: 0.92;
  font-weight: 900;
}

.hero h1 {
  color: transparent;
  background: linear-gradient(90deg, #111827 0%, #245c63 92%);
  -webkit-background-clip: text;
  background-clip: text;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 4.5vw, 54px);
  line-height: 1.05;
  font-weight: 880;
}

h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

p {
  color: var(--muted);
}

.hero-lede {
  max-width: 860px;
  margin: 26px 0 0;
  color: #2f3742;
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.42;
  font-weight: 520;
}

.paper-subtitle {
  position: relative;
  max-width: 860px;
  margin: 24px 0 0;
  padding-bottom: 18px;
  color: #2f3742;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.22;
  font-weight: 700;
}

.paper-subtitle::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(360px, 58%);
  height: 3px;
  background: linear-gradient(90deg, #245c63, rgba(36, 92, 99, 0));
  border-radius: 999px;
}

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

.button,
.pagination button,
.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  font-weight: 780;
  cursor: pointer;
}

.button.primary {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.button.secondary {
  background: #fff;
}

.resource-button {
  gap: 7px;
  min-width: 108px;
  min-height: 38px;
  padding: 0 12px;
}

.explorer-button {
  min-width: 158px;
}

.button-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.arxiv-logo {
  color: #b31b1b;
}

.paper-summary {
  align-self: stretch;
  display: grid;
  align-content: start;
  min-height: 330px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.paper-summary.compact {
  align-self: center;
  min-height: auto;
}

.paper-title {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
  color: var(--teal);
}

.paper-summary dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.paper-summary div {
  padding: 12px;
  background: #fafafa;
  border: 1px solid #eaedf0;
  border-radius: 8px;
}

.paper-summary dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.paper-summary dd {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 860;
}

.paper-summary dd:not(:only-child) {
  overflow-wrap: anywhere;
}

.section {
  padding: 74px 0;
}

.section-inner,
.task-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.contract-section {
  background: #fff;
}

.results-section,
.task-page-section {
  background: var(--soft);
}

.intro-section {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.results-section {
  background: #fff;
}

.task-page-section,
.task-detail-section {
  min-height: calc(100vh - 126px);
  padding-top: 42px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
  gap: 26px;
  align-items: end;
  margin-bottom: 24px;
}

.section-heading.tight {
  display: block;
}

.section-heading.centered {
  display: block;
  max-width: 820px;
  margin: 0 auto 26px;
  text-align: center;
}

.intro-heading {
  margin-bottom: 18px;
}

.results-card,
.task-detail-page {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: none;
}

.main-figure {
  width: min(1080px, 100%);
  margin: 30px auto 0;
  padding: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  border: 0;
  border-radius: 8px;
  box-shadow:
    0 24px 70px rgba(17, 24, 39, 0.10),
    0 1px 0 rgba(255, 255, 255, 0.92) inset;
}

.main-figure img {
  width: 100%;
  background: #fff;
  border: 0;
  border-radius: 4px;
}

.results-card {
  overflow: hidden;
}

.best-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(180px, auto);
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.best-result span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 820;
  text-transform: uppercase;
}

.best-result strong {
  font-size: clamp(38px, 7vw, 70px);
  line-height: 1;
  font-weight: 900;
}

.best-result em {
  justify-self: end;
  color: var(--ink);
  font-style: normal;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
}

.results-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  font-size: 14px;
}

.results-table th,
.results-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e6eaee;
  text-align: center;
  white-space: nowrap;
}

.results-table th:first-child,
.results-table td:first-child {
  text-align: left;
}

.results-table thead th {
  color: #34404a;
  background: #f4f6f8;
  font-size: 12px;
  text-transform: uppercase;
}

.results-table tbody th {
  font-weight: 760;
}

.results-table .group-row th {
  color: var(--teal);
  background: #fafafa;
  font-size: 12px;
  text-transform: uppercase;
}

.results-table .col-best {
  background: rgba(36, 92, 99, 0.08);
  font-weight: 820;
}

.results-table .overall-best {
  color: #fff;
  background: var(--ink);
  font-weight: 860;
}

.filters {
  display: grid;
  grid-template-columns: minmax(260px, 1.7fr) repeat(2, minmax(150px, 0.7fr));
  gap: 12px;
  margin-bottom: 22px;
}

.registry-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.registry-heading h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.04;
}

.filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.filters input,
.filters select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
}

.filters input:focus,
.filters select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(36, 92, 99, 0.12);
}

.task-page-layout {
  display: block;
}

.task-list-panel {
  padding: 0;
}

.task-detail-shell {
  width: min(960px, calc(100% - 40px));
  margin: 0 auto;
}

.task-detail-page {
  margin-top: 18px;
  padding: 28px;
}

.task-list-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.task-list-heading h2 {
  font-size: 28px;
}

#task-status,
#page-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.task-card {
  display: grid;
  gap: 12px;
  min-height: 226px;
  padding: 15px;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.task-card:hover,
.task-card.active {
  border-color: #aeb7c2;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.07);
  transform: translateY(-1px);
}

.task-card-top,
.detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-id {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 17px;
  font-weight: 850;
}

.level-pill {
  flex: 0 0 auto;
  padding: 4px 8px;
  color: #fff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
}

.level-L1 { background: #2563eb; }
.level-L2 { background: #059669; }
.level-L3 { background: #f97316; }
.level-L4 { background: #dc2626; }

.brief {
  display: -webkit-box;
  min-height: 66px;
  margin: 0;
  overflow: hidden;
  color: #4a5662;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.task-meta,
.download-list,
.detail-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  max-width: 100%;
  padding: 4px 8px;
  color: #394550;
  background: #eef2f3;
  border: 1px solid #dde4e7;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 730;
}

.family-tag {
  color: #165c56;
  background: #e7f1ef;
  border-color: #c7dcda;
}

.file-tag {
  color: #3c4854;
  background: #f1f4f7;
  border-color: #dce4eb;
}

.task-card dl,
.detail-grid {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 5px 10px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.task-card dt,
.detail-grid dt {
  font-weight: 800;
}

.task-card dd,
.detail-grid dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.detail-brief {
  margin: 12px 0 12px;
  color: #35404a;
  font-size: 15px;
}

.intro-copy {
  display: grid;
  gap: 14px;
  width: min(980px, 100%);
  margin: 0 auto;
  color: #2f3742;
  font-size: 16px;
  line-height: 1.72;
}

.intro-copy strong {
  color: var(--ink);
  font-weight: 820;
}

.detail-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.detail-section h3 {
  margin-bottom: 8px;
  color: #35404a;
  font-size: 14px;
  text-transform: uppercase;
}

.section-title-row h3 {
  margin-bottom: 0;
}

.text-link {
  color: var(--teal);
  font-size: 12px;
  font-weight: 840;
}

.instruction-summary {
  margin: 0 0 10px;
  color: #3f4a55;
  font-size: 13px;
}

.instruction-box {
  max-height: 280px;
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
  color: #303942;
  background: #fafafa;
  border: 1px solid #e6eaee;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.instruction-box.compact {
  max-height: 190px;
}

.download-link {
  justify-content: flex-start;
  align-items: flex-start;
  flex: 1 1 240px;
  flex-direction: column;
  gap: 2px;
  max-width: 100%;
  min-height: 38px;
  overflow-wrap: anywhere;
}

.download-link span,
.target-row strong {
  color: #26303a;
}

.download-link small,
.target-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.target-list {
  display: grid;
  gap: 8px;
}

.target-row {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  background: #fafafa;
  border: 1px solid #e6eaee;
  border-radius: 6px;
  overflow-wrap: anywhere;
}

.no-results {
  grid-column: 1 / -1;
  padding: 34px 12px;
  color: var(--muted);
  text-align: center;
  background: #fff;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 16px;
}

.task-detail-page .detail-title-row {
  align-items: flex-start;
}

.task-detail-page .detail-title-row h1 {
  font-size: clamp(42px, 5vw, 72px);
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.task-detail-page .instruction-box {
  max-height: none;
}

.task-detail-page .empty-detail {
  padding: 18px 0 4px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 32px;
  color: #fff;
  background: #25302f;
}

.site-footer a {
  font-weight: 800;
}

@media (max-width: 1040px) {
  .section-heading {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 20px;
  }

  .hero,
  .section-inner,
  .task-shell,
  .task-detail-shell {
    width: min(100% - 28px, 1180px);
  }

  .hero {
    min-height: auto;
    padding: 54px 0;
  }

  h1 {
    font-size: clamp(58px, 18vw, 92px);
  }

  .section {
    padding: 54px 0;
  }

  .task-page-section,
  .task-detail-section {
    padding-top: 32px;
  }

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

  .best-result,
  .filters,
  .task-grid {
    grid-template-columns: 1fr;
  }

  .task-detail-page {
    padding: 20px;
  }

  .task-detail-page .detail-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .best-result em {
    justify-self: start;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 26px 20px;
  }
}
