:root {
  --bg: #fbfaf7;
  --paper: #ffffff;
  --ink: #17191c;
  --muted: #59616a;
  --line: #d9d4ca;
  --line-soft: #ece7dd;
  --red: #a23a36;
  --blue: #356fa5;
  --teal: #227b72;
  --gold: #b08a25;
  --soft-red: #fde8e6;
  --soft-yellow: #fff4c4;
  --soft-blue: #e7f4fb;
  --shadow: 0 12px 36px rgba(24, 25, 28, 0.08);
  --content-width: 880px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--teal);
  text-underline-offset: 3px;
}

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

.hero {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 34px;
  text-align: center;
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.top-nav a {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.top-nav a:hover {
  color: var(--teal);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  max-width: 960px;
  margin: 0 auto 14px;
  font-size: clamp(1.72rem, 2.6vw, 2.35rem);
  line-height: 1.14;
  font-weight: 850;
}

.submission-note {
  margin: 0 0 26px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.author-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 22px;
  max-width: 850px;
  margin: 0 auto;
}

.author-block .name {
  display: block;
  font-size: 1.04rem;
  font-weight: 750;
}

.author-block .affiliation {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.94rem;
}

.equal-note {
  margin: 12px 0 24px;
  color: var(--muted);
  font-size: 0.84rem;
}

.button-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 780;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
}

.pill.paper {
  background: var(--red);
}

.pill.code {
  background: #20242a;
}

.pill.data {
  background: var(--blue);
}

.pill.hf {
  background: var(--gold);
  color: #171300;
}

.paper-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 62px 0;
  border-top: 1px solid var(--line-soft);
}

.paper-section.first {
  border-top: 1px solid var(--line);
}

.section-copy {
  width: min(var(--content-width), 100%);
  margin: 0 auto 28px;
  text-align: left;
}

.section-copy h2 {
  margin: 0;
  font-size: clamp(1.16rem, 1.65vw, 1.5rem);
  line-height: 1.24;
  font-weight: 820;
}

.section-copy p {
  margin: 15px 0 0;
  color: #333942;
  font-size: 1.04rem;
}

.after-figure {
  margin-top: 34px;
}

.contribution-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: contribution;
}

.contribution-list li {
  counter-increment: contribution;
  position: relative;
  margin: 13px 0;
  padding-left: 48px;
  color: #333942;
  font-size: 1.03rem;
}

.contribution-list li::before {
  content: counter(contribution);
  position: absolute;
  left: 0;
  top: 0.1em;
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--teal);
  background: #f0f7f5;
  font-weight: 850;
}

.figure-frame {
  width: min(var(--content-width), 100%);
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.figure-frame img {
  width: 100%;
}

.scroll-figure {
  overflow: hidden;
}

.scroll-figure img {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.visual-results img {
  min-width: 0;
}

figcaption {
  padding: 13px 18px 15px;
  color: var(--muted);
  background: #fff;
  font-size: 0.92rem;
  text-align: center;
}

.task-table {
  width: min(900px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.task-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.32fr) 1fr;
}

.task-row > div {
  padding: 15px 18px;
  border-top: 1px solid var(--line-soft);
}

.task-row > div:first-child {
  font-weight: 800;
}

.task-row.header > div {
  border-top: 0;
  background: #262a2f;
  color: #fff;
  font-weight: 850;
}

.task-row.restoration {
  background: var(--soft-red);
}

.task-row.removal {
  background: var(--soft-yellow);
}

.task-row.generation {
  background: var(--soft-blue);
}

.web-table-wrap {
  width: min(980px, 100%);
  margin: 0 auto;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.web-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.web-table caption {
  caption-side: bottom;
  padding: 12px 16px 14px;
  color: var(--muted);
  text-align: center;
  font-size: 0.88rem;
}

.web-table th,
.web-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
}

.web-table th {
  background: #262a2f;
  color: #fff;
}

.web-table td:first-child {
  font-weight: 760;
  text-align: left;
}

.web-table tbody tr:nth-child(1),
.web-table tbody tr:nth-child(2),
.web-table tbody tr:nth-child(3),
.web-table tbody tr:nth-child(4) {
  background: var(--soft-red);
}

.web-table tbody tr:nth-child(5),
.web-table tbody tr:nth-child(6),
.web-table tbody tr:nth-child(7),
.web-table tbody tr:nth-child(8),
.web-table tbody tr:nth-child(9) {
  background: var(--soft-blue);
}

.web-table tbody tr:nth-child(10),
.web-table tbody tr:nth-child(11) {
  background: var(--soft-yellow);
}

.bibtex {
  position: relative;
  width: min(900px, 100%);
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  background: #20242a;
  box-shadow: var(--shadow);
}

.bibtex button {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 780;
  cursor: pointer;
}

pre {
  margin: 0;
  padding: 30px;
  overflow-x: auto;
  color: #f9f5ee;
  font-size: 0.92rem;
  line-height: 1.5;
}

.footer {
  padding: 28px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  text-align: center;
}

.footer p {
  margin: 0;
}

@media (max-width: 760px) {
  .hero {
    width: min(100% - 24px, 1120px);
    padding-top: 14px;
  }

  .top-nav {
    gap: 9px;
    margin-bottom: 30px;
  }

  .top-nav a {
    font-size: 0.86rem;
  }

  h1 {
    font-size: 1.46rem;
  }

  .author-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .pill.data,
  .pill.hf {
    grid-column: span 2;
  }

  .paper-section {
    width: min(100% - 24px, 1180px);
    padding: 46px 0;
  }

  .section-copy h2 {
    font-size: 1.14rem;
  }

  .section-copy p,
  .contribution-list li {
    font-size: 0.98rem;
  }

  .task-row {
    grid-template-columns: 1fr;
  }

  .task-row > div {
    padding: 12px 14px;
  }

  figcaption {
    text-align: left;
  }

  pre {
    padding: 58px 18px 20px;
    font-size: 0.82rem;
  }
}
