html {
  scroll-behavior: smooth;
}

:root {
  --accent: #b33a32;
  --accent-dark: #8f2c26;
  --accent-soft: #fff3f1;
  --accent-border: #efcbc7;
}

body {
  font-family: 'Noto Sans', sans-serif;
  padding-top: 3.25rem;
  color: #17202a;
  background: #ffffff;
}

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

.navbar {
  border-bottom: 1px solid #e7ecf2;
}

.navbar-brand img {
  max-height: 3.25rem;
}

.navbar-item {
  font-family: 'Google Sans', sans-serif;
}

.publication-title,
.publication-subtitle,
.publication-authors,
.title {
  font-family: 'Google Sans', sans-serif;
}

.hero-section {
  padding-top: 4.25rem;
  padding-bottom: 2.75rem;
}

.eyebrow {
  color: var(--accent);
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 0.75rem;
}

.publication-title {
  line-height: 1.04;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.publication-subtitle {
  color: #4a5663;
  line-height: 1.35;
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
}

.publication-authors {
  color: #17202a;
  margin-top: 0.35rem;
}

.publication-authors sup {
  font-size: 0.68em;
  margin-left: 0.08rem;
}

.publication-notes {
  color: #627282;
  margin-top: 0.2rem;
}

.publication-authors a {
  color: var(--accent) !important;
}

.publication-authors a:hover {
  text-decoration: underline;
}

.author-block {
  display: inline-block;
  margin-left: 0.16rem;
  margin-right: 0.16rem;
}

.publication-links {
  margin-top: 1.15rem;
}

.link-block a {
  margin: 0.25rem;
}

.button.is-dark {
  background-color: #17202a;
  border-color: #17202a;
}

.button.is-dark:hover {
  background-color: var(--accent);
  border-color: var(--accent);
}

.placeholder-link {
  opacity: 0.86;
}

.workflow-wrap {
  margin-top: 2.25rem;
}

.paper-figure {
  background: #ffffff;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 12px 28px rgba(20, 36, 54, 0.08);
}

.paper-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-figure {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

.section.hero.is-light {
  background: #f5f8fb;
}

section[id] {
  scroll-margin-top: 5.25rem;
}

.content p {
  line-height: 1.72;
}

.method-grid,
.result-grid {
  display: grid;
  gap: 1rem;
}

.method-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2rem;
}

.method-step,
.result-card {
  background: #ffffff;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  padding: 1.25rem;
  height: 100%;
}

.method-step {
  display: flex;
  flex-direction: column;
}

.method-step p,
.result-card p {
  color: #4a5663;
  line-height: 1.6;
}

.step-index {
  color: var(--accent) !important;
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.formula {
  font-family: 'Castoro', serif;
  color: #17202a;
  white-space: nowrap;
}

.formula-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.formula-card {
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: center;
  min-height: 8.75rem;
  padding: 1rem 1.15rem;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #f9fbfd;
}

.panel-label {
  color: var(--accent);
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-align: center;
}

.formula-large {
  font-family: 'Castoro', serif;
  font-size: 1.02rem;
  line-height: 1.45;
  color: #17202a;
  overflow-x: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.75rem;
  text-align: center;
}

.result-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 2rem;
}

.metric {
  color: var(--accent-dark) !important;
  font-family: 'Google Sans', sans-serif;
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.playground-shell {
  margin-top: 2rem;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(20, 36, 54, 0.08);
  overflow: hidden;
}

.playground-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: end;
  padding: 1.25rem;
  border-bottom: 1px solid #e7ecf2;
  background: #f9fbfd;
}

.dataset-input-row {
  display: grid;
  grid-template-columns: 7rem minmax(10rem, 1fr);
  gap: 1rem;
  align-items: center;
}

.dataset-input-row .input {
  border-radius: 6px;
}

.slider-input {
  width: 100%;
  accent-color: var(--accent);
}

.slider-input::-webkit-slider-thumb {
  background: var(--accent);
}

.slider-input::-moz-range-thumb {
  background: var(--accent);
  border-color: var(--accent);
}

.slider-input::-webkit-slider-runnable-track {
  accent-color: var(--accent);
}

.slider-input::-moz-range-progress {
  background: var(--accent);
}

.budget-control {
  min-width: 12rem;
}

.budget-buttons {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #c9d7e5;
  border-radius: 7px;
  overflow: hidden;
  background: #ffffff;
}

.budget-button {
  border: 0;
  background: #ffffff;
  color: #17202a;
  cursor: pointer;
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  line-height: 1;
  padding: 0.8rem 1rem;
  min-width: 5.75rem;
}

.budget-button + .budget-button {
  border-left: 1px solid #c9d7e5;
}

.budget-button.is-active {
  background: var(--accent);
  color: #ffffff;
}

.playground-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #e7ecf2;
}

.playground-summary > div {
  background: #ffffff;
  padding: 1rem 1.25rem;
}

.playground-summary span {
  display: block;
  color: #627282;
  font-family: 'Google Sans', sans-serif;
  font-size: 0.86rem;
  margin-bottom: 0.25rem;
}

.playground-summary strong {
  display: block;
  color: #17202a;
  font-family: 'Google Sans', sans-serif;
  font-size: 1.08rem;
}

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

.playground-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.playground-table th,
.playground-table td {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid #e7ecf2;
  vertical-align: middle;
}

.playground-table th {
  color: #627282;
  font-family: 'Google Sans', sans-serif;
  font-size: 0.86rem;
  text-align: left;
}

.playground-table tbody tr.is-best-practical {
  background: var(--accent-soft);
}

.playground-table tbody tr.is-oracle {
  background: #fff9ee;
}

.method-name {
  color: #17202a;
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  white-space: nowrap;
}

.method-note {
  color: #627282;
  display: block;
  font-size: 0.8rem;
  line-height: 1.35;
  margin-top: 0.25rem;
}

.subset-chip {
  display: inline-block;
  margin: 0.12rem 0.18rem 0.12rem 0;
  padding: 0.28rem 0.42rem;
  border: 1px solid #c9d7e5;
  border-radius: 6px;
  background: #ffffff;
  color: #17202a;
  font-family: 'Google Sans', sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
}

.subset-muted {
  color: #627282;
}

.utility-cell {
  min-width: 9.5rem;
}

.utility-value {
  display: block;
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.utility-track {
  height: 0.45rem;
  border-radius: 999px;
  background: #e7ecf2;
  overflow: hidden;
}

.utility-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.gain-value {
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
}

.results-carousel {
  overflow: hidden;
  margin-top: 2rem;
}

.results-carousel .item {
  margin: 0.35rem;
  overflow: hidden;
  padding: 1rem;
}

.figure-caption {
  max-width: 900px;
  margin: 1rem auto 0;
  color: #4a5663;
  font-size: 1.05rem;
  line-height: 1.55;
  text-align: center;
}

.slider-pagination .slider-page {
  background: #17202a;
}

.slider-pagination .slider-page.is-active {
  background: var(--accent);
}

.slider-navigation-next,
.slider-navigation-previous {
  border-color: #e7ecf2;
  color: #17202a;
}

.slider-navigation-next:hover,
.slider-navigation-previous:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.slider-navigation-next svg,
.slider-navigation-previous svg {
  fill: #17202a;
}

.contribution-list {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

#BibTeX pre {
  font-size: 0.92rem;
  max-width: 100%;
  overflow-x: auto;
  border-radius: 8px;
  background: #f5f8fb;
  border: 1px solid #dce5ee;
}

.footer {
  background: #f5f8fb;
  border-top: 1px solid #dce5ee;
}

@media screen and (max-width: 1023px) {
  .navbar-menu {
    border-top: 1px solid #e7ecf2;
  }

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

  .playground-toolbar {
    grid-template-columns: 1fr;
  }

  .playground-summary {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 768px) {
  body {
    padding-top: 3rem;
  }

  .hero-section {
    padding-top: 3rem;
  }

  .publication-title {
    font-size: 1.9rem !important;
  }

  .publication-subtitle {
    font-size: 1.2rem !important;
  }

  .method-grid,
  .result-grid,
  .formula-panel {
    grid-template-columns: 1fr;
  }

  .paper-figure {
    padding: 0.5rem;
  }

  .metric {
    font-size: 1.8rem;
  }

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

  .budget-control,
  .budget-buttons {
    width: 100%;
  }

  .budget-button {
    min-width: 0;
  }
}
