:root {
  --bg: #eef4f8;
  --surface: #ffffff;
  --ink: #182433;
  --ink-soft: #4f5f75;
  --primary: #0f5c8d;
  --primary-dark: #0a456a;
  --accent: #d9782d;
  --line: #d6e2eb;
  --shadow: 0 10px 30px rgba(15, 40, 65, 0.08);
  --radius: 14px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 5%, #dce8f2 0, transparent 38%),
    radial-gradient(circle at 92% 10%, #e7f0f6 0, transparent 34%),
    var(--bg);
}

.paper-page {
  padding-bottom: 1.5rem;
}

.page-container {
  width: 85vw !important;
  max-width: 85vw !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.section {
  padding: 1.5rem 1.1rem;
  animation: rise-in 0.5s ease-out both;
}

.section:nth-of-type(2) {
  animation-delay: 0.04s;
}

.section:nth-of-type(3) {
  animation-delay: 0.08s;
}

.section:nth-of-type(4) {
  animation-delay: 0.12s;
}

.section:nth-of-type(5) {
  animation-delay: 0.16s;
}

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

.hero-main {
  text-align: center;
  padding: 0 0 0.5rem;
}

.paper-title {
  margin: 0 0 0.9rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.35rem;
  line-height: 1.16;
  color: var(--ink);
}

.paper-authors {
  margin: 0.2rem 0;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.paper-authors a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.paper-authors a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.equal-contrib {
  margin: 0.2rem 0;
  color: #67768a;
  font-size: 0.95rem;
}

.venue-note {
  margin: 0.35rem 0 0;
  color: #4d647c;
  font-size: 0.95rem;
  font-weight: 600;
}

.paper-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid #0d4d77;
  border-radius: 10px;
  padding: 0.62rem 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.action-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.content-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem;
}

.content-block h2 {
  margin: 0 0 0.8rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.48rem;
  color: var(--ink);
}

.content-block h3 {
  margin: 0 0 0.5rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  color: var(--ink);
}

.content-block p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
  font-size: 1.04rem;
}

.content-block ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ink-soft);
}

.content-block li {
  margin-bottom: 0.48rem;
  line-height: 1.52;
}

.source-note {
  margin-top: 0.85rem !important;
  color: #60738a !important;
  font-size: 0.93rem !important;
}

.source-note a {
  color: var(--primary);
}

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

.method-cards {
  display: grid;
  gap: 0.8rem;
}

.mini-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fcff;
  padding: 0.82rem 0.85rem;
}

.mini-card p {
  font-size: 0.96rem;
  margin: 0;
}

.mini-card.emphasis {
  border-left: 4px solid var(--primary);
}

.data-grid,
.results-simple-grid {
  display: grid;
  gap: 1rem;
}

.figure-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  padding: 0.78rem;
}

.figure-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  background: #f2f6fa;
}

.figure-card figcaption {
  margin-top: 0.7rem;
  color: #5f6f84;
  font-size: 0.95rem;
}

.sample-grid .figure-card img {
  height: 220px;
  object-fit: contain;
  background: #f2f6fa;
}

.data-note {
  margin-top: 0.8rem !important;
  color: #4c6179 !important;
  font-size: 1rem !important;
}

.section-intro {
  margin-bottom: 0.65rem !important;
}

.sector-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: #5d7087;
  font-size: 0.94rem;
  margin-bottom: 0.7rem;
}

.legend-box {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 0.35rem;
  border: 1px solid #a9bfd0;
  vertical-align: -1px;
}

.legend-box.studied {
  background: #d4e9ff;
  border-color: #83afd8;
}

.legend-box.generalization {
  background: #ffe7c9;
  border-color: #d8a86d;
}

.legend-box.empty {
  background: #f3f4f5;
  border-color: #d3d7dc;
}

.sector-layout {
  display: grid;
  gap: 0.9rem;
  align-items: start;
}

.sector-map-wrap {
  width: 100%;
}

.ra-labels {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.42rem;
  margin: 0 0 0.35rem;
}

.ra-labels span {
  text-align: center;
  font-size: 0.74rem;
  color: #5f7188;
  font-weight: 600;
}

.sector-map-body {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 0.5rem;
}

.dec-labels {
  display: grid;
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 0.42rem;
}

.dec-labels span {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.25rem;
  font-size: 0.74rem;
  color: #5f7188;
  font-weight: 600;
}

.sector-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.42rem;
}

.sector-cell {
  appearance: none;
  border: 1px solid #b8ccdc;
  background: #eef5fb;
  border-radius: 8px;
  padding: 0.55rem 0.3rem;
  text-align: center;
  font-size: 0.83rem;
  color: #27445f;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.sector-cell:hover,
.sector-cell:focus {
  background: #e2eff9;
  transform: translateY(-1px);
}

.sector-cell.is-studied {
  background: #dceeff;
  border-color: #7daed9;
}

.sector-cell.is-generalization {
  background: #ffedd7;
  border-color: #d6a972;
}

.sector-cell.is-empty {
  background: #f3f4f5;
  border-color: #d0d5da;
  color: #6e7884;
}

.sector-cell.selected {
  box-shadow: 0 0 0 2px #2f7bb8;
}

.sector-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fcff;
  padding: 0.95rem;
}

.sector-panel h3 {
  margin-top: 0;
}

.sector-panel p {
  margin: 0.26rem 0;
  font-size: 0.95rem;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
}

.table-image-wrap {
  margin-bottom: 1rem;
}

.metrics-table-figure img {
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: contain;
}

.result-plot-figure {
  margin-top: 0.4rem;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  background: #fcfeff;
  min-width: 0;
}

.table-wrap th,
.table-wrap td {
  border: 1px solid #d2e0ea;
  padding: 0.46rem 0.56rem;
  font-size: 0.9rem;
  text-align: left;
  vertical-align: top;
}

.table-wrap th {
  background: #eaf3f9;
  color: #2a4662;
  font-weight: 700;
}

.mini-card table {
  width: 100%;
  border-collapse: collapse;
  background: #fcfeff;
}

.mini-card th,
.mini-card td {
  border: 1px solid #d2e0ea;
  padding: 0.38rem 0.42rem;
  font-size: 0.84rem;
  text-align: left;
}

.mini-card th {
  background: #ecf5fb;
  color: #2a4662;
}

pre {
  margin: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f6fafc;
  padding: 1rem;
  overflow-x: auto;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9rem;
  color: #1f3245;
}

.bibtex-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.copy-btn {
  border: 1px solid #bfd4e3;
  background: #edf5fb;
  color: var(--primary-dark);
  border-radius: 9px;
  font-weight: 700;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}

.copy-btn:hover {
  background: #dfedf8;
}

.copy-btn:disabled {
  cursor: default;
  opacity: 0.8;
}

.paper-footer {
  border-top: 1px solid var(--line);
  padding: 1.1rem;
  color: #62748b;
  text-align: center;
  font-size: 0.95rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-bottom: 0.45rem;
}

.contact-links a {
  color: var(--primary);
  text-decoration: none;
}

.contact-links a:hover {
  text-decoration: underline;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(11px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 900px) {
  .method-layout {
    grid-template-columns: 1.25fr 1fr;
  }

  .method-cards {
    grid-template-columns: 1fr 1fr;
  }

  .data-grid,
  .results-simple-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .sector-layout {
    grid-template-columns: 1.5fr 1fr;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 1.1rem 0.74rem;
  }

  .page-container {
    width: 85vw !important;
    max-width: 85vw !important;
  }

  .paper-title {
    font-size: 1.68rem;
  }

  .paper-authors {
    font-size: 0.98rem;
  }

  .equal-contrib,
  .venue-note {
    font-size: 0.88rem;
  }

  .content-block {
    padding: 1rem;
  }

  .content-block h2 {
    font-size: 1.24rem;
  }

  .content-block p,
  .content-block li {
    font-size: 0.96rem;
  }

  .sector-cell {
    font-size: 0.78rem;
    padding: 0.5rem 0.2rem;
  }

  .sample-grid .figure-card img {
    height: 180px;
  }

  .metrics-table-figure img {
    max-height: 220px;
  }

  .ra-labels {
    display: none;
  }

  .sector-map-body {
    grid-template-columns: 1fr;
  }

  .dec-labels {
    display: none;
  }
}
