:root {
  color-scheme: light;
  --page: #f5f7f8;
  --paper: #ffffff;
  --paper-muted: #edf2f1;
  --ink: #14201f;
  --ink-soft: #344442;
  --muted: #667370;
  --line: #d7dfdd;
  --line-strong: #bcc9c6;
  --accent: #127c70;
  --accent-dark: #095e56;
  --accent-pale: #d9eee9;
  --blue: #315a80;
  --shell: 1120px;
  --shell-wide: 1280px;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shadow: 0 22px 65px rgba(20, 32, 31, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

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

body.dialog-open {
  overflow: hidden;
}

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

button,
a {
  color: inherit;
  font: inherit;
}

a {
  text-underline-offset: 3px;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  color: #092e2a;
  background: #bce4da;
}

.shell,
.shell-wide {
  width: min(var(--shell), calc(100% - 48px));
  margin-inline: auto;
}

.shell-wide {
  width: min(var(--shell-wide), calc(100% - 48px));
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: -60px;
  left: 16px;
  padding: 9px 14px;
  color: #fff;
  background: var(--ink);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* Navigation */
.site-header {
  position: sticky;
  z-index: 80;
  top: 0;
  border-bottom: 1px solid rgba(188, 201, 198, 0.72);
  background: rgba(245, 247, 248, 0.9);
  backdrop-filter: blur(16px) saturate(130%);
}

.nav {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  text-decoration: none;
}

.brand-copy {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-divider {
  width: 1px;
  height: 20px;
  background: var(--line-strong);
}

.brand-context {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border-radius: 10px;
  background: var(--ink);
}

.brand-mark svg {
  width: 27px;
  height: 27px;
  fill: var(--accent-pale);
  stroke: var(--accent);
  stroke-width: 2.1;
  stroke-linecap: round;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 27px;
}

.nav-links a {
  position: relative;
  padding: 18px 0 15px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-decoration: none;
}

.nav-links a::after {
  position: absolute;
  right: 50%;
  bottom: -1px;
  left: 50%;
  height: 2px;
  background: var(--accent);
  content: "";
  transition: right 160ms ease, left 160ms ease;
}

.nav-links a:hover,
.nav-links a[aria-current="true"] {
  color: var(--ink);
}

.nav-links a:hover::after,
.nav-links a[aria-current="true"]::after {
  right: 0;
  left: 0;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  margin: 5px auto;
  background: var(--ink);
  transition: transform 160ms ease, opacity 160ms ease;
}

/* Hero */
.hero {
  padding-top: clamp(30px, 4vw, 54px);
  padding-bottom: 30px;
  text-align: center;
}

.eyebrow,
.kicker {
  margin: 0 0 11px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 1100px;
  margin: 0 auto;
  line-height: 1.05;
  text-wrap: balance;
}

.project-name {
  display: block;
  margin-bottom: 13px;
  color: var(--ink);
  font-size: clamp(68px, 10vw, 118px);
  font-weight: 800;
  letter-spacing: -0.085em;
}

.project-name::after {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-left: 11px;
  border-radius: 50% 0 50% 50%;
  background: var(--accent);
  content: "";
  transform: rotate(-35deg) translateY(-20px);
}

.paper-title {
  display: block;
  font-family: var(--serif);
  font-size: clamp(31px, 4vw, 47px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.14;
}

.authors {
  display: grid;
  max-width: 1050px;
  gap: 5px;
  margin: 24px auto 0;
  color: var(--muted);
}

.authors p {
  margin: 0;
}

.author-names {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.75;
}

.affiliations {
  font-size: 13px;
  line-height: 1.7;
}

.authors sup {
  color: var(--accent-dark);
  font-size: 0.65em;
  font-weight: 700;
}

.resource-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 23px;
}

.resource-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 17px;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.resource-link:hover {
  border-color: #8fa7a1;
  color: var(--accent-dark);
  background: #fff;
  transform: translateY(-1px);
}

.resource-link.documentation-link,
.resource-link.documentation-link:hover {
  color: #111;
}

.resource-link.primary {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}

.resource-link.primary:hover {
  border-color: var(--accent-dark);
  color: #fff;
  background: var(--accent-dark);
}

.resource-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-figure {
  width: min(100%, 960px);
  margin-top: clamp(34px, 5vw, 58px);
  padding: clamp(12px, 2.3vw, 25px);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero-figure figcaption {
  margin: 14px auto 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 15px;
}

.paper-figure,
.paper-figure button {
  margin: 0;
}

.hero-figure {
  margin: clamp(34px, 5vw, 58px) auto 0;
}

.figure-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.figure-button img {
  width: 100%;
  transition: opacity 150ms ease;
}

.figure-button:hover img {
  opacity: 0.93;
}

/* Sections */
.section {
  padding-top: clamp(44px, 5vw, 64px);
  padding-bottom: clamp(44px, 5vw, 64px);
}

.section-heading {
  display: block;
  margin-bottom: 22px;
}

.section-index {
  display: none;
}

.section-heading h2,
.citation-layout h2,
.release-card h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-summary {
  max-width: 900px;
  margin: 12px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.6;
}

.semantic-highlight {
  color: var(--accent-dark);
  font-family: var(--serif);
  font-weight: 500;
}

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

.abstract-heading {
  max-width: 960px;
  margin: 0 auto 24px;
}

.abstract-heading h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.abstract-body {
  max-width: 960px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.75;
}

.abstract-text {
  margin: 0;
}

.abstract-body.is-collapsed .abstract-text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.abstract-toggle {
  margin-top: 14px;
  padding: 0 0 3px;
  color: var(--accent-dark);
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  font: 700 14px/1.2 var(--sans);
  cursor: pointer;
}

.abstract-toggle:hover {
  color: var(--ink);
}

/* Method */
.method-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--page);
}

.architecture-figure {
  padding: clamp(10px, 2vw, 24px);
  border: 1px solid var(--line);
  background: #fff;
}

.architecture-figure figcaption {
  max-width: 980px;
  margin: 12px auto 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
  gap: 18px;
}

.method-card {
  min-height: 0;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--line);
  background: #fff;
}

.method-card.accent-card {
  color: var(--ink);
  border-color: var(--line);
  background: #fff;
}

.method-number {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.accent-card .method-number {
  color: var(--accent);
}

.method-card h3,
.instruction-intro h3,
.result-copy h3,
.analysis-copy h3 {
  margin: 18px 0 13px;
  font-family: var(--sans);
  font-size: clamp(21px, 2.3vw, 27px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.method-card p {
  color: var(--ink-soft);
}

.accent-card p {
  color: var(--ink-soft);
}

.method-card ul {
  display: grid;
  gap: 6px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.method-card li::before {
  margin-right: 9px;
  color: var(--accent);
  content: "—";
}

.accent-card li::before {
  color: var(--accent);
}

.instruction-block {
  --demo-accent: var(--accent);
  position: relative;
  overflow: hidden;
  margin-top: 34px;
  padding: clamp(24px, 3vw, 38px);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: transparent;
  box-shadow: 0 16px 44px rgba(20, 32, 31, 0.055);
}

.instruction-intro {
  max-width: none;
}

.instruction-intro h3 {
  max-width: 1040px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 680;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.semantic-demo {
  margin-top: 22px;
}

.guidance-row {
  display: grid;
  overflow: hidden;
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-muted);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guidance-input-group {
  display: flex;
  min-width: 0;
  align-items: stretch;
}

.guidance-control {
  min-width: 0;
  flex: 1 1 auto;
  padding: 17px 22px 0;
  border: 0;
  background: transparent;
}

.guidance-range {
  --level-progress: 0%;
  display: block;
  width: calc(100% - 12px);
  height: 22px;
  margin: 0 6px;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.guidance-range::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--demo-accent) 0 var(--level-progress), var(--line-strong) var(--level-progress) 100%);
}

.guidance-range::-moz-range-track {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--demo-accent) 0 var(--level-progress), var(--line-strong) var(--level-progress) 100%);
}

.guidance-range::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  margin-top: -7px;
  appearance: none;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--demo-accent);
  box-shadow: 0 0 0 1px var(--accent-dark);
}

.guidance-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--demo-accent);
  box-shadow: 0 0 0 1px var(--accent-dark);
}

.guidance-stops {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 2px;
}

.guidance-button {
  display: grid;
  min-height: 57px;
  padding: 7px 0 11px;
  border: 0;
  color: var(--muted);
  background: transparent;
  text-align: center;
  transition: color 160ms ease;
  align-content: center;
  gap: 3px;
}

.guidance-button:hover {
  color: var(--ink);
}

.guidance-button.active {
  color: var(--ink);
}

.guidance-button:last-child {
  color: var(--ink);
}

.guidance-button strong {
  font-size: 15px;
  font-weight: 750;
}

.guidance-pause {
  display: grid;
  flex: 0 0 68px;
  margin: 10px 10px 10px 0;
  padding: 10px 7px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
  place-content: center;
  gap: 6px;
}

.guidance-pause:hover,
.guidance-pause[aria-pressed="true"] {
  color: var(--accent-dark);
  border-color: var(--line-strong);
  background: #e8f2f0;
}

.guidance-pause-icon {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.guidance-pause-label {
  font-size: 11px;
  font-weight: 750;
}

.guidance-summary {
  display: flex;
  min-width: 0;
  min-height: 96px;
  margin: 0;
  padding: 18px 28px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.5;
  align-items: center;
}

.cluster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.cluster-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 17px 16px 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: none;
}

.cluster-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  content: "";
}

.cluster-card:first-child::before {
  background: linear-gradient(90deg, #315a80 0 50%, #d27a37 50% 100%);
}

.cluster-card:last-child::before {
  background: linear-gradient(90deg, #147d70 0 33%, #8a9693 33% 66%, #6f62a6 66% 100%);
}

.cluster-header {
  position: absolute;
  z-index: 1;
  top: 10px;
  left: 11px;
  display: flex;
  max-width: calc(100% - 22px);
  padding: 6px 9px;
  border: 1px solid rgba(213, 224, 222, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(5px);
  align-items: baseline;
  gap: 10px;
}

.cluster-header h4 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.cluster-header h4 span {
  color: var(--muted);
  font-weight: 600;
}

.prompt-details {
  display: flex;
  min-height: 42px;
  margin: 8px 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: #e8f2f0;
  align-items: center;
  justify-content: center;
}

.demo-prompt {
  overflow-wrap: anywhere;
  margin: 0;
  color: #25413d;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.cluster-canvas-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.76;
  border: 1px solid #d5e0de;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 46%, #fff 0 45%, #f4f8f7 100%);
}

.cluster-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}

.cluster-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  transform: translate(-50%, -50%);
}

.semantic-demo[data-state="ready"] .cluster-loading {
  display: none;
}

.cluster-tooltip {
  position: absolute;
  z-index: 2;
  padding: 4px 7px;
  color: #fff;
  border-radius: 3px;
  background: rgba(20, 32, 31, 0.9);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  pointer-events: none;
  transform: translate(9px, -115%);
}

.cluster-legend {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 11px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 12px;
  padding: 6px 9px;
  color: var(--ink-soft);
  border: 1px solid rgba(213, 224, 222, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(5px);
  font-size: 11px;
}

.cluster-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cluster-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.projection-note,
.demo-error {
  margin: 10px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.5;
}

.projection-note span {
  color: var(--demo-accent);
}

.semantic-fallback {
  margin: 18px 0 0;
  border: 1px solid var(--line);
  background: #fff;
}

/* Results */
.result-tabs {
  display: flex;
  overflow-x: auto;
  gap: 4px;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--line-strong);
}

.result-tab {
  flex: 0 0 auto;
  padding: 13px 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 750;
}

.result-tab:hover,
.result-tab.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.result-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.65fr) minmax(0, 1.35fr);
  gap: clamp(35px, 6vw, 80px);
  padding-top: 40px;
  align-items: center;
}

.result-copy {
  padding-left: 5px;
}

.result-copy p:last-child {
  color: var(--muted);
}

.result-figure {
  padding: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.result-figure img {
  max-height: 580px;
  object-fit: contain;
}

/* Analysis */
.analysis-section {
  color: var(--ink);
  border-top: 1px solid var(--line);
  background: var(--page);
}

.analysis-section .section-index,
.analysis-section .kicker {
  color: var(--accent-dark);
}

.analysis-grid {
  display: grid;
  gap: 18px;
}

.analysis-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1.35fr);
  gap: 44px;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--line);
  background: #fff;
  align-items: center;
}

.analysis-card .analysis-copy p:last-child {
  color: var(--ink-soft);
}

.analysis-card .paper-figure {
  overflow: hidden;
  background: #fff;
}

.wide-card .paper-figure img {
  max-height: 560px;
  object-fit: contain;
}

.findings-summary {
  max-width: 960px;
  margin: 34px auto 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
}

/* Release + citation */
.release-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

.release-card {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 70px;
  padding: clamp(28px, 4vw, 44px) 0;
  color: var(--ink);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  align-items: end;
}

.release-card p:last-child {
  max-width: 650px;
  color: var(--ink-soft);
}

.release-actions {
  display: grid;
  border-top: 1px solid var(--line-strong);
}

.release-actions a {
  display: flex;
  justify-content: space-between;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line-strong);
  font-weight: 700;
  text-decoration: none;
}

.release-actions a:hover {
  color: var(--accent-dark);
}

.citation-section {
  padding: 56px 0;
  border-top: 1px solid var(--line);
  background: var(--paper-muted);
}

.citation-layout {
  display: grid;
  grid-template-columns: 0.5fr 1.5fr;
  gap: 70px;
}

.citation-box {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #fff;
}

.citation-toolbar {
  display: flex;
  min-height: 45px;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.citation-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.citation-toolbar button,
.citation-toolbar a {
  padding: 5px 10px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: var(--page);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.4;
  text-decoration: none;
}

.citation-toolbar button:hover,
.citation-toolbar a:hover {
  border-color: var(--line-strong);
  color: var(--accent-dark);
  background: #fff;
}

.citation-box pre {
  overflow-x: auto;
  margin: 0;
  padding: 22px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
}

.footer {
  padding: 28px 0;
  color: #aebbb8;
  background: #0e1716;
  font-size: 13px;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 30px;
  align-items: center;
}

.footer-inner p {
  margin: 0;
}

.footer-brand {
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}

/* Lightbox */
.lightbox {
  width: min(95vw, 1500px);
  max-width: none;
  max-height: 94vh;
  padding: 42px 18px 18px;
  border: 1px solid #57625f;
  background: #fff;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.35);
}

.lightbox::backdrop {
  background: rgba(9, 16, 15, 0.82);
  backdrop-filter: blur(4px);
}

.lightbox img {
  width: 100%;
  max-height: calc(94vh - 65px);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 4px;
  right: 10px;
  padding: 0 8px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 30px;
  line-height: 1;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 60px;
    right: 0;
    left: 0;
    display: none;
    padding: 7px 24px 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(245, 247, 248, 0.98);
  }

  .nav-links.open {
    display: grid;
  }

  .nav-links a {
    padding: 10px 0;
  }

  .nav-links a::after {
    display: none;
  }

  .result-panel,
  .analysis-card,
  .release-card,
  .citation-layout {
    grid-template-columns: 1fr;
  }

  .result-copy {
    max-width: 680px;
  }

  .instruction-intro h3 {
    max-width: 680px;
  }

  .analysis-card {
    gap: 25px;
  }
}

@media (max-width: 660px) {
  body {
    font-size: 16px;
  }

  .shell,
  .shell-wide {
    width: min(100% - 28px, var(--shell));
  }

  .desktop-break {
    display: none;
  }

  .project-name {
    font-size: clamp(64px, 23vw, 92px);
  }

  .project-name::after {
    width: 10px;
    height: 10px;
    transform: rotate(-35deg) translateY(-13px);
  }

  .paper-title {
    font-size: 28px;
  }

  .author-names br {
    display: none;
  }

  .resource-link {
    min-width: calc(50% - 5px);
  }

  .hero-figure {
    padding: 8px;
  }

  .hero-figure figcaption {
    display: none;
  }

  .section-heading {
    grid-template-columns: 40px 1fr;
  }

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

  .method-card {
    min-height: auto;
  }

  .instruction-block {
    padding: 18px 14px;
  }

  .instruction-intro h3 {
    font-size: 22px;
  }

  .guidance-control {
    padding: 14px 10px 0;
  }

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

  .guidance-pause {
    flex-basis: 52px;
    min-height: auto;
    margin: 8px 8px 8px 0;
    padding: 8px 5px;
  }

  .guidance-summary {
    min-height: 70px;
    padding: 13px 15px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .guidance-pause-label {
    display: none;
  }

  .guidance-button {
    min-height: 59px;
    padding: 7px 3px 10px;
  }

  .guidance-button strong {
    font-size: 13px;
  }

  .cluster-card {
    padding: 13px;
  }

  .cluster-header {
    top: 8px;
    left: 8px;
    display: flex;
    padding: 5px 7px;
    gap: 7px;
  }

  .cluster-legend {
    top: 8px;
    right: 8px;
    gap: 5px 8px;
    padding: 5px 7px;
    font-size: 10px;
  }

  .cluster-canvas-wrap {
    aspect-ratio: 1.45;
  }

  .release-card {
    gap: 35px;
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
  }

  .footer-inner p {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* Supervised fine-tuning comparison */
.finetuning-comparison { margin-top: 3rem; }
.finetuning-comparison h3 { font-size: clamp(1.4rem, 3vw, 2rem); }
.finetuning-comparison p { line-height: 1.7; }
.finetuning-comparison figure { margin: 2rem 0; }
.finetuning-comparison figcaption { text-align: center; margin-top: 0.75rem; }
.finetuning-table { overflow-x: auto; margin-top: 1.5rem; }
.finetuning-table table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.finetuning-table caption { text-align: left; margin-bottom: 1rem; line-height: 1.6; }
.finetuning-table th, .finetuning-table td { padding: 0.7rem; border-bottom: 1px solid #d9e2df; text-align: left; white-space: nowrap; }
.finetuning-table tbody tr:last-child { font-weight: 700; }

/* Evaluation settings and compact results on the project homepage. */
.evaluation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin: 2rem 0 1rem; }
.evaluation-card { border: 1px solid #d9e2df; border-radius: 16px; padding: 1.5rem; background: #fafcfb; }
.evaluation-card h3 { font-size: 1.25rem; line-height: 1.35; margin: .75rem 0; }
.evaluation-card p { line-height: 1.7; }
.evaluation-card a { display: inline-block; margin-top: .5rem; }
.evaluation-note { font-size: .9rem; line-height: 1.6; color: #52615b; margin-bottom: 2rem; }
.full-results { margin-top: 1.5rem; border-top: 1px solid #d9e2df; padding-top: 1rem; }
.full-results summary { cursor: pointer; font-weight: 600; padding: .5rem 0; }
.finetuning-comparison .paper-figure { max-width: 800px; margin: 2rem auto; }
@media (max-width: 800px) { .evaluation-grid { grid-template-columns: 1fr; } }

/* Compact publication badge inline with the paper title. */
.venue-badge { display: inline-block; vertical-align: middle; margin-left: .4rem; padding: .25rem .45rem; border: 1px solid #b9d4c8; border-radius: 4px; background: #edf6f0; color: #24583f; font-size: 14px; font-weight: 400; line-height: 1.3; letter-spacing: 0; white-space: nowrap; }

.brand-logo { display: block; width: 52px; height: auto; object-fit: contain; }
