:root {
  --ink: #17211f;
  --muted: #5e6f6a;
  --faint: #eef4f1;
  --paper: #ffffff;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --coral: #c2410c;
  --amber: #b7791f;
  --violet: #6d5bd0;
  --border: #dbe7e2;
  --soft-border: #e9efec;
  --shadow: 0 18px 45px rgb(23 33 31 / 0.10);
  --shadow-soft: 0 10px 28px rgb(23 33 31 / 0.07);
  --radius: 8px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

a {
  color: var(--teal-dark);
}

a:hover {
  color: var(--coral);
}

.hero,
.section,
.footer {
  display: block;
}

.hero-body {
  padding: 3rem 1.5rem;
}

.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: 1.25rem;
  padding-left: 1.25rem;
}

.is-max-desktop {
  max-width: 960px;
}

.is-max-widescreen {
  max-width: 1240px;
}

.columns {
  display: flex;
  gap: 1.5rem;
}

.columns.is-vcentered {
  align-items: center;
}

.columns.is-variable.is-6 {
  gap: 1.5rem;
}

.columns.is-variable.is-8 {
  gap: 2rem;
}

.column {
  flex: 1 1 0;
  min-width: 0;
}

.column.is-5 {
  flex: 0 0 calc(42% - 1rem);
}

.column.is-7 {
  flex: 0 0 calc(58% - 1rem);
}

.title,
.subtitle {
  word-break: normal;
}

.table-container {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

.table th,
.table td {
  padding: 0.85rem 1rem;
}

.content p:not(:last-child) {
  margin-bottom: 1em;
}

.project-hero {
  background:
    linear-gradient(180deg, rgb(238 244 241 / 0.78), rgb(255 255 255 / 0.96)),
    repeating-linear-gradient(90deg, rgb(15 118 110 / 0.06) 0, rgb(15 118 110 / 0.06) 1px, transparent 1px, transparent 56px);
  border-bottom: 1px solid var(--border);
}

.project-hero .hero-body {
  padding: 5rem 1.5rem 4rem;
}

.eyebrow,
.band-label,
.panel-kicker {
  margin: 0 0 0.7rem;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.publication-title {
  max-width: 980px;
  margin: 0 0 1.35rem !important;
  color: var(--ink) !important;
  font-size: 3.55rem !important;
  font-weight: 800 !important;
  line-height: 1.04 !important;
  letter-spacing: 0 !important;
}

.publication-subtitle {
  max-width: 820px;
  margin: 0 0 1.6rem !important;
  color: var(--muted);
  font-size: 1.2rem !important;
  line-height: 1.55;
}

.publication-authors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: center;
  color: var(--ink);
  font-weight: 650;
  margin-bottom: 0.4rem;
}

.author-separator {
  color: var(--teal);
}

.publication-venue {
  margin: 0 0 1.45rem;
  color: var(--muted);
  font-weight: 550;
}

.publication-links {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.3rem;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.5rem 0.56rem;
  border-radius: var(--radius) !important;
  font-size: 0.86rem;
  font-weight: 750 !important;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease !important;
}

.button:hover {
  transform: translateY(-1px);
}

.primary-action {
  color: white !important;
  background: var(--teal) !important;
  border: 1px solid var(--teal) !important;
  box-shadow: var(--shadow-soft);
}

.primary-action:hover {
  background: var(--teal-dark) !important;
}

.secondary-action {
  color: var(--ink) !important;
  background: rgb(255 255 255 / 0.84) !important;
  border: 1px solid var(--border) !important;
}

.secondary-action:hover {
  border-color: var(--teal) !important;
  box-shadow: var(--shadow-soft);
}

.hero-figure {
  margin: 0;
  padding: 0;
}

.hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section {
  padding: 4.5rem 1.5rem;
}

.tldr-section {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.tldr-panel {
  padding: 1.35rem 1.5rem;
  background: #f6faf8;
  border: 1px solid var(--border);
  border-left: 5px solid var(--teal);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.tldr-panel h2 {
  margin: 0 0 0.55rem;
  color: var(--teal-dark);
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tldr-panel p {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 550;
  line-height: 1.65;
}

.muted-section {
  background: var(--faint);
  border-top: 1px solid var(--soft-border);
  border-bottom: 1px solid var(--soft-border);
}

.section-title {
  margin: 0 0 1.35rem;
  color: var(--ink);
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0;
}

.section-intro {
  width: 100%;
  max-width: none;
  margin: -0.45rem 0 1.6rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.diagnostic-subtitle {
  margin: 0 0 0.7rem;
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.25;
}

.reading-cue {
  width: 100%;
  max-width: none;
  margin: -0.55rem 0 1.1rem;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.6;
}

.reading-cue strong {
  font-weight: 800;
}

.takeaway {
  width: 100%;
  max-width: none;
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  color: var(--ink);
  background: #f6faf8;
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  font-size: 0.98rem;
  line-height: 1.55;
}

.takeaway strong {
  color: var(--teal-dark);
}

.research-copy {
  color: var(--muted);
  font-size: 1.05rem;
}

.research-copy p {
  margin-bottom: 1.2rem;
}

.info-panel,
.finding {
  height: 100%;
  padding: 1.35rem;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.info-panel h3,
.finding h3 {
  margin: 0 0 0.6rem;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.25;
}

.info-panel p:last-child,
.finding p {
  margin-bottom: 0;
  color: var(--muted);
}

.reward-table-wrap,
.audit-table-wrap,
.utility-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow: var(--shadow-soft);
}

.utility-table-wrap {
  max-width: none;
  margin-right: auto;
  margin-left: 0;
}

.table {
  margin-bottom: 0 !important;
  color: var(--ink);
  background: var(--paper);
  font-size: 0.94rem;
  line-height: 1.45;
}

.table thead th {
  color: var(--ink);
  background: #f6faf8;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

.table td,
.table th {
  border-color: var(--soft-border) !important;
  vertical-align: middle !important;
}

.reward-table {
  min-width: 760px;
}

.reward-table td:nth-child(1) {
  width: 150px;
}

.reward-table td:nth-child(4) {
  white-space: nowrap;
}

.reward-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 0.34rem 0.58rem;
  color: white;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.reward-tag.r0 {
  background: var(--amber);
}

.reward-tag.r1 {
  background: var(--teal);
}

.reward-tag.r2 {
  background: var(--violet);
}

.reward-tag.r4 {
  background: var(--coral);
}

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

.finding {
  position: relative;
  padding-top: 3.35rem;
}

.finding-index {
  position: absolute;
  top: 1rem;
  left: 1.3rem;
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 850;
}

.audit-table {
  font-size: 0.84rem;
  min-width: 1480px;
}

.audit-table td,
.audit-table th {
  text-align: right !important;
  white-space: nowrap;
  padding: 0.72rem 0.8rem;
}

.audit-table td:first-child,
.audit-table th:first-child,
.audit-table td:nth-child(2),
.audit-table th:nth-child(2),
.audit-table td:nth-child(3),
.audit-table th:nth-child(3) {
  text-align: left !important;
}

.audit-table tbody td:nth-child(4),
.audit-table tbody td:nth-child(10),
.audit-table thead th:nth-child(4),
.audit-table thead th:nth-child(10) {
  box-shadow: inset 1px 0 0 #7b928c;
}

.audit-group td {
  color: var(--teal-dark);
  background: #eef4f1;
  box-shadow: none !important;
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-align: left !important;
  text-transform: uppercase;
}

.table-note {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.utility-snapshot {
  margin-top: 3rem;
}

.utility-snapshot h3 {
  margin: 0 0 0.45rem;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 800;
}

.utility-snapshot p {
  width: 100%;
  max-width: none;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.utility-snapshot .reading-cue,
.utility-snapshot .takeaway {
  color: var(--ink);
}

.utility-table {
  font-size: 0.86rem;
  min-width: 1320px;
}

.utility-table td,
.utility-table th {
  text-align: right !important;
  white-space: nowrap;
  padding: 0.62rem 0.68rem;
}

.utility-table td:first-child,
.utility-table th:first-child,
.utility-table td:nth-child(2),
.utility-table th:nth-child(2) {
  text-align: left !important;
}

.utility-table td:nth-child(3),
.utility-table th:nth-child(3),
.utility-table td:nth-child(6),
.utility-table th:nth-child(6) {
  background: #f6faf8;
}

.utility-table tbody td:nth-child(3),
.utility-table tbody td:nth-child(7),
.utility-table tbody td:nth-child(10) {
  box-shadow: inset 1px 0 0 #7b928c;
}

.utility-table thead tr:first-child th:nth-child(3),
.utility-table thead tr:first-child th:nth-child(4),
.utility-table thead tr:first-child th:nth-child(5),
.utility-table thead tr:nth-child(2) th:first-child,
.utility-table thead tr:nth-child(2) th:nth-child(5) {
  box-shadow: inset 1px 0 0 #7b928c;
}

.utility-table thead tr:first-child th[colspan] {
  background: #eef4f1;
  color: var(--teal-dark);
  text-align: center !important;
}

.utility-table thead tr:first-child th:nth-child(4) {
  background: #eef4f1;
  color: var(--teal-dark);
}

.good-delta {
  color: var(--teal-dark);
  font-weight: 850;
}

.bad-delta {
  color: var(--coral);
  font-weight: 850;
}

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

.diagnostic-figure {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.diagnostic-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 0.77;
  object-fit: contain;
  background: white;
  border-bottom: 1px solid var(--soft-border);
}

.diagnostic-figure figcaption {
  padding: 0.75rem 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

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

pre {
  margin: 0 !important;
  padding: 1.25rem !important;
  color: var(--ink) !important;
  background: #f6faf8 !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  overflow-x: auto;
  box-shadow: var(--shadow-soft);
}

code {
  color: var(--ink) !important;
  background: transparent !important;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace !important;
  font-size: 0.9rem;
}

.copy-bibtex-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.9rem;
  color: white;
  background: var(--teal);
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.copy-bibtex-btn:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
}

.copy-bibtex-btn.copied {
  background: #15803d;
  border-color: #15803d;
}

.footer {
  padding: 2.4rem 1.5rem;
  background: #17211f;
  color: #d7e4df;
}

.footer a {
  color: #8be0d5;
}

.footer p {
  margin: 0;
}

.scroll-to-top {
  position: fixed;
  right: 1.3rem;
  bottom: 1.3rem;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: white;
  background: var(--teal);
  border: 0;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  transition: opacity 160ms ease, visibility 160ms ease, transform 160ms ease, background 160ms ease;
}

.scroll-to-top:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.button:focus,
.copy-bibtex-btn:focus,
.scroll-to-top:focus,
a:focus {
  outline: 3px solid rgb(15 118 110 / 0.28);
  outline-offset: 2px;
}

@media screen and (max-width: 1024px) {
  .project-hero .hero-body {
    padding: 3.5rem 1.25rem 3rem;
  }

  .column.is-5 {
    flex: 0 0 calc(38% - 1rem);
  }

  .column.is-7 {
    flex: 0 0 calc(62% - 1rem);
  }

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

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

  .hero-figure img {
    height: auto;
  }
}

@media screen and (max-width: 900px) {
  .publication-links {
    flex-wrap: wrap;
  }
}

@media screen and (max-width: 768px) {
  .columns {
    flex-direction: column;
  }

  .column.is-5,
  .column.is-7 {
    flex-basis: auto;
  }

  .section {
    padding: 3rem 1rem;
  }

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

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

  .publication-links .button {
    flex: 1 1 100%;
  }

  .finding-grid,
  .figure-grid {
    grid-template-columns: 1fr;
  }

  .hero-figure img {
    min-height: auto;
  }

  .bibtex-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  .scroll-to-top,
  .publication-links,
  .copy-bibtex-btn {
    display: none;
  }

  .project-hero,
  .muted-section {
    background: white;
  }

  .hero-figure,
  .diagnostic-figure,
  .info-panel,
  .finding {
    box-shadow: none;
  }
}
