:root {
  --page: #ffffff;
  --paper: #fbfaf7;
  --paper-soft: #f5f9fb;
  --page-soft: #f5f9fb;
  --panel: #ffffff;
  --panel-tint: #f8fbfc;
  --ink: #0b2328;
  --ink-soft: #39575f;
  --muted: #6d838a;
  --line: #d9e6e9;
  --line-strong: #7ba2a9;
  --rule-blue: #4b82e6;
  --stroke: #123d46;
  --visual: #58d7dc;
  --visual-dark: #16aab3;
  --text-token: #fff0cf;
  --text-token-dark: #c69131;
  --chip: #e9f8f8;
  --focus: #008f99;
  --shadow: 0 12px 28px rgb(18 61 70 / 0.08);
  --shadow-soft: 0 6px 18px rgb(18 61 70 / 0.055);
  --radius: 8px;
  --radius-sm: 6px;
  --max-width: 1120px;
  --display-serif: Georgia, "Times New Roman", serif;
  --body-sans: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html {
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: var(--body-sans);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body,
button,
input,
select,
textarea {
  font-family: var(--body-sans);
}

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

sup {
  font-size: 0.65em;
  line-height: 0;
  vertical-align: baseline;
  position: relative;
  top: -0.5em;
}

a {
  color: #086f78;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

a:focus-visible,
button:focus-visible,
.project-button:focus-visible,
.copy-bibtex-btn:focus-visible,
.scroll-to-top:focus-visible {
  outline: 3px solid rgb(0 143 153 / 0.32);
  outline-offset: 3px;
}

.container:not(.is-max-desktop) {
  max-width: var(--max-width) !important;
}

.section {
  padding: 5.6rem 1.5rem;
}

.publication-hero {
  color: var(--ink);
  background:
    linear-gradient(180deg, rgb(246 253 253 / 0.84) 0%, var(--paper) 48%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
}

.publication-hero .hero-body {
  padding: 6.25rem 1.5rem 3.8rem;
}

.publication-hero .container {
  text-align: center;
}

.publication-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.95rem;
  margin-bottom: 1.25rem;
  padding: 0.28rem 0.7rem;
  color: var(--stroke);
  background: rgb(255 255 255 / 0.62);
  border: 1px solid rgb(22 170 179 / 0.26);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.publication-title {
  max-width: 900px;
  margin: 0 auto !important;
  color: var(--ink) !important;
  font-family: var(--display-serif);
  font-size: clamp(3.6rem, 8.5vw, 7.1rem);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: 0;
}

.publication-subtitle {
  max-width: 760px;
  margin: 1.35rem auto 0;
  color: var(--ink-soft);
  font-size: 1.22rem;
  line-height: 1.6;
}

.publication-authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.26rem 0.7rem;
  max-width: 930px;
  margin: 1.65rem auto 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 650;
}

.author-block {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}

.author-block a {
  color: inherit;
  text-decoration: none;
  transition: opacity 120ms ease;
}

.author-block a:hover {
  opacity: 0.75;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.publication-affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 0.9rem;
  margin-top: 0.85rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.publication-affiliations span {
  display: inline-flex;
  align-items: center;
}

.publication-affiliations span + span::before {
  width: 0.35rem;
  height: 0.35rem;
  margin-right: 0.9rem;
  background: var(--visual-dark);
  border-radius: 999px;
  content: "";
}

.publication-notes {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.62rem;
  margin: 1.8rem auto 0;
}

.project-button,
.light-button,
.copy-bibtex-btn {
  min-height: 2.55rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.project-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  padding: 0.6rem 0.92rem;
  color: #ffffff;
  background: var(--stroke);
  border: 1px solid var(--stroke);
  box-shadow: 0 5px 14px rgb(18 61 70 / 0.12);
  text-decoration: none;
}

.project-button:hover {
  color: #ffffff;
  background: #0a2f37;
  border-color: #0a2f37;
  transform: translateY(-1px);
}

.project-button i {
  font-size: 0.95rem;
}

.hero-pipeline {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(220px, 0.9fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 0.85rem;
  width: 100%;
  margin: 3.2rem auto 0;
  padding: 3.45rem 1.05rem 1.1rem;
  background: rgb(255 255 255 / 0.78);
  border: 1px solid rgb(18 61 70 / 0.18);
  border-radius: var(--radius);
  box-shadow: 0 18px 45px rgb(18 61 70 / 0.09);
}

.pipeline-label {
  position: absolute;
  top: 1rem;
  color: var(--stroke);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pipeline-label-left {
  left: 1.25rem;
}

.pipeline-label-right {
  right: 1.25rem;
}

.pipeline-stage {
  display: flex;
  min-height: 148px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.15rem;
  color: var(--ink);
  background: rgb(255 255 255 / 0.7);
  border: 1px solid rgb(18 61 70 / 0.13);
  border-radius: var(--radius-sm);
}

.pipeline-stage p {
  max-width: 260px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}

.token-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 2.3rem;
}

.token {
  width: 1.28rem;
  height: 1.9rem;
  border: 2px solid var(--stroke);
  border-radius: 5px;
}

.visual-token {
  background: var(--visual);
  box-shadow: inset 0 -6px 0 rgb(22 170 179 / 0.22);
}

.text-token {
  background: var(--text-token);
  border-color: #9b792e;
  box-shadow: inset 0 -6px 0 rgb(198 145 49 / 0.2);
}

.token-plus {
  color: var(--stroke);
  font-weight: 800;
}

.pipeline-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stroke);
  font-size: 1.75rem;
  font-weight: 800;
}

.transformer-stage {
  background: #102f37;
  border-color: #102f37;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
}

.transformer-stage strong {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 850;
}

.transformer-stage span {
  color: #c5e5e8;
  font-size: 0.92rem;
  line-height: 1.45;
}

.deploy-flow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.deploy-flow span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  color: var(--stroke);
  background: var(--chip);
  border: 1px solid rgb(22 170 179 / 0.22);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 800;
}

.pipeline-takeaway {
  max-width: 780px;
  margin: 1rem auto 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.55;
}

.pipeline-takeaway::before {
  display: inline-block;
  width: 2.4rem;
  height: 1px;
  margin-right: 0.65rem;
  background: var(--visual-dark);
  vertical-align: middle;
  content: "";
}

.evidence-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.evidence-chips span,
.demo-samples span,
.quick-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.42rem 0.7rem;
  color: var(--stroke);
  background: #eef8f8;
  border: 1px solid rgb(22 170 179 / 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
}

.metrics-section {
  padding-top: 2.25rem;
  padding-bottom: 3.2rem;
  background: var(--page);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.method-card,
.tldr-grid article,
.release-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
}

.metric-card {
  padding: 1.35rem 1.25rem;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.metric-card:last-child {
  border-right: 0;
}

.metric-card strong {
  display: block;
  color: var(--stroke);
  font-family: var(--display-serif);
  font-size: 2.35rem;
  font-weight: 400;
  line-height: 1;
}

.metric-card span {
  display: block;
  margin-top: 0.65rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}

.paper-summary,
.results-section,
.demo-section,
.citation-section {
  background: var(--paper-soft);
}

.section-heading {
  position: relative;
  max-width: 820px;
  margin: 0 auto 2.45rem;
  padding-bottom: 1.1rem;
  text-align: center;
}

.section-heading::after {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: min(220px, 42vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--visual-dark), var(--rule-blue), transparent);
  content: "";
  transform: translateX(-50%);
}

.section-heading p {
  color: var(--ink-soft);
}

.section-kicker {
  margin: 0 0 0.55rem;
  color: var(--visual-dark) !important;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--display-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0;
}

.lead-copy {
  margin-top: 1.35rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.lead-copy p + p {
  margin-top: 1rem;
}

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

.tldr-grid article,
.method-card,
.release-card {
  padding: 1.25rem;
}

.tldr-grid h3,
.method-card h3,
.release-card h3 {
  margin: 0 0 0.55rem;
  color: var(--stroke);
  font-size: 1.02rem;
  font-weight: 850;
}

.tldr-grid p,
.method-card p,
.release-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.figure-panel,
.table-panel,
.demo-panel {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.figure-panel {
  margin: 2rem 0 0;
}

.figure-panel img {
  width: 100%;
  background: var(--panel-tint);
}

.figure-panel figcaption {
  margin: 0;
  padding: 0.85rem 1rem 1rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  line-height: 1.45;
}

.table-panel {
  margin-top: 2rem;
  box-shadow: 0 10px 26px rgb(18 61 70 / 0.055);
}

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

.table-header {
  padding: 1rem 1.1rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.table-header h3 {
  margin: 0;
  color: var(--stroke);
  font-size: 1rem;
  font-weight: 850;
}

.table-header a {
  flex: 0 0 auto;
  font-size: 0.9rem;
  font-weight: 700;
}

.responsive-table {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 0.92rem;
}

th,
td {
  padding: 0.82rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

thead th {
  color: var(--stroke);
  background: #eef8f8;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tbody th {
  color: var(--stroke);
  font-weight: 800;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

.highlight-row th,
.highlight-row td {
  background: #fff8e8;
}

.highlight-row th:first-child {
  box-shadow: inset 4px 0 0 var(--text-token-dark);
}

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

.probe-story-grid,
.probe-grid {
  margin-top: 0;
}

.figure-story {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 1rem;
  min-width: 0;
}

.figure-story .figure-panel {
  margin: 0;
}

.story-figure {
  align-self: start;
}

.research-takeaway {
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 2px solid var(--visual-dark);
}

.research-takeaway p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.65;
}

.research-takeaway strong {
  color: var(--stroke);
  font-weight: 850;
}

.wide-story {
  max-width: 960px;
  margin: 2rem auto 0;
}

.wide-figure {
  max-width: 960px;
  margin-right: auto;
  margin-left: auto;
}

.demo-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.9fr) auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: #102f37;
  border-color: #102f37;
}

.demo-panel .section-title,
.demo-panel p {
  color: #ffffff;
}

.demo-panel .section-kicker {
  color: var(--visual) !important;
}

.demo-panel p:not(.section-kicker) {
  margin-top: 0.7rem;
  color: #d7edef;
}

.demo-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.demo-samples span {
  color: #dff7f7;
  background: rgb(255 255 255 / 0.08);
  border-color: rgb(255 255 255 / 0.18);
}

.light-button {
  color: var(--stroke);
  background: var(--text-token);
  border-color: var(--text-token);
  box-shadow: none;
}

.light-button:hover {
  color: var(--stroke);
  background: #ffe7ad;
  border-color: #ffe7ad;
}

.release-section {
  background: var(--page);
}

.release-card {
  box-shadow: none;
}

.release-card a {
  display: inline-flex;
  margin-top: 0.85rem;
  font-weight: 850;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.quick-links a {
  text-decoration: none;
}

.quick-links a:hover {
  color: #ffffff;
  background: var(--stroke);
  border-color: var(--stroke);
}

.citation-section {
  padding-bottom: 5rem;
}

.bibtex-header {
  margin-bottom: 0.85rem;
}

.copy-bibtex-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 5.6rem;
  padding: 0.55rem 0.8rem;
  color: var(--stroke);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  cursor: pointer;
}

.copy-bibtex-btn:hover,
.copy-bibtex-btn.copied {
  color: #ffffff;
  background: var(--stroke);
  border-color: var(--stroke);
}

#bibtex-code {
  max-width: 100%;
  margin: 0;
  overflow-x: auto;
  padding: 1rem;
  color: #d8eff1;
  background: #0b2328;
  border: 1px solid #0b2328;
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre;
}

.footer {
  padding: 2.5rem 1.5rem;
  color: var(--ink-soft);
  background: #edf4f6;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.footer p {
  margin: 0;
}

.footer p + p {
  margin-top: 0.65rem;
}

.scroll-to-top {
  position: fixed;
  right: 1.15rem;
  bottom: 1.15rem;
  z-index: 40;
  display: inline-flex;
  width: 2.9rem;
  height: 2.9rem;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--stroke);
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 999px;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.45rem);
  visibility: hidden;
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    background-color 160ms ease,
    visibility 160ms ease;
}

.scroll-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.scroll-to-top:hover {
  background: #0a2f37;
}

.scroll-to-top i {
  font-size: 0.95rem;
  line-height: 1;
}

.sr-only,
.is-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
}

@media (max-width: 900px) {
  .section {
    padding: 3.6rem 1.25rem;
  }

  .publication-hero .hero-body {
    padding: 4rem 1.25rem 3rem;
  }

  .publication-subtitle {
    font-size: 1.12rem;
  }

  .hero-pipeline {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding: 3rem 1rem 1rem;
  }

  .pipeline-label {
    position: static;
    justify-content: center;
  }

  .pipeline-label-left {
    order: -5;
  }

  .pipeline-label-right {
    order: 0;
    margin-top: 0.35rem;
  }

  .token-stage {
    order: -4;
  }

  .token-stage + .pipeline-arrow {
    order: -3;
  }

  .transformer-stage {
    order: -2;
  }

  .transformer-stage + .pipeline-arrow {
    order: -1;
  }

  .deploy-stage {
    order: 1;
  }

  .pipeline-arrow {
    min-height: 1.75rem;
    font-size: 1.7rem;
    transform: rotate(90deg);
  }

  .pipeline-stage {
    min-height: auto;
  }

  .metric-grid,
  .tldr-grid,
  .method-grid,
  .release-grid,
  .figure-story-grid,
  .probe-story-grid,
  .result-figure-grid,
  .probe-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric-card:last-child {
    border-bottom: 0;
  }

  .demo-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .section {
    padding: 3rem 1rem;
  }

  .publication-hero .hero-body {
    padding: 3.3rem 1rem 2.5rem;
  }

  .publication-title {
    font-size: clamp(2.55rem, 14vw, 4rem);
  }

  .publication-subtitle {
    font-size: 1rem;
  }

  .publication-affiliations {
    gap: 0.35rem 0.55rem;
  }

  .publication-affiliations span + span::before {
    display: none;
  }

  .publication-links,
  .quick-links {
    width: 100%;
  }

  .project-button,
  .quick-links a {
    width: 100%;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .pipeline-takeaway {
    text-align: left;
  }

  .pipeline-takeaway::before {
    display: none;
  }

  .hero-pipeline {
    margin-top: 2.2rem;
    padding: 1rem;
  }

  .pipeline-label {
    font-size: 0.72rem;
  }

  .deploy-flow {
    width: 100%;
  }

  .deploy-flow span {
    flex: 1 1 100%;
    justify-content: center;
  }

  .section-heading {
    text-align: left;
  }

  .section-heading::after {
    left: 0;
    width: 8rem;
    transform: none;
  }

  .section-title {
    font-size: 1.55rem;
  }

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

  .table-header a,
  .copy-bibtex-btn {
    width: 100%;
  }

  .copy-bibtex-btn {
    min-width: 0;
  }

  #bibtex-code {
    font-size: 0.8rem;
  }

  .demo-panel {
    padding: 1.1rem;
  }

  .scroll-to-top {
    right: 0.85rem;
    bottom: 0.85rem;
    width: 2.65rem;
    height: 2.65rem;
  }
}
