:root {
  --ink: #202633;
  --muted: #626d80;
  --line: #dce1ea;
  --paper: #fff;
  --soft: #f2f5fa;
  --blue: #385ec7;
  --orange: #cc7540;
  --accent: #385ec7;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace
}

* {
  box-sizing: border-box
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6
}

a {
  color: inherit;
  text-decoration: none
}

button,
select,
input {
  font: inherit
}

button,
select {
  cursor: pointer
}

button {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  padding: 7px 12px;
  border-radius: 5px;
  font-size: 14px
}

button:hover {
  background: #eaf0fc;
  border-color: #95a8d8
}

button:disabled {
  opacity: .5;
  cursor: wait
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
canvas:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 650;
  letter-spacing: -.03em;
  font-size: 20px
}

.mark {
  font: italic 34px Georgia, serif;
  color: var(--accent);
  letter-spacing: -.2em;
  padding-right: 9px
}

.mark span {
  font-size: 25px
}

.panel {
  max-width: 1236px;
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 40px #25365a05
}

.explorer-top {
  padding: 17px 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 12px
}

.segmented {
  display: flex;
  gap: 3px;
  background: var(--soft);
  padding: 4px;
  border-radius: 7px
}

.segmented button {
  border: 0;
  background: transparent;
  padding: 8px 15px
}

.segmented button[aria-pressed=true] {
  background: white;
  box-shadow: 0 1px 5px #20345c18;
  color: var(--accent)
}

.segmented span {
  font: 10px var(--mono);
  margin-left: 7px;
  color: var(--muted)
}

.small {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted)
}

.explorer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px
}

.plot-side {
  min-width: 0;
  padding: 18px 20px 0
}

.plot-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--muted)
}

select {
  max-width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 4px;
  padding: 7px 10px;
  color: var(--ink);
  font-size: 14px
}

.plot-toolbar select {
  margin-left: 6px
}

.zoom-buttons {
  display: flex;
  gap: 4px
}

.plot-wrap {
  position: relative;
  width: 100%;
  height: 540px;
  margin-top: 12px;
  background: #f7f9fc;
  border: 1px solid #e6ebf3;
  border-radius: 5px;
  overflow: hidden;
  background-image: linear-gradient(#d5ddeb33 1px, transparent 1px), linear-gradient(90deg, #d5ddeb33 1px, transparent 1px);
  background-size: 40px 40px
}

#embedding {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair
}

.axis-label {
  position: absolute;
  bottom: 10px;
  left: 14px;
  font: 9px var(--mono);
  letter-spacing: .07em;
  color: #778399;
  pointer-events: none
}

.plot-footer {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  padding: 11px 1px 15px
}

#plot-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #f7f9fced;
  color: var(--accent)
}

#plot-loading[hidden] {
  display: none
}

#tooltip {
  position: absolute;
  pointer-events: none;
  background: #202e4bed;
  color: white;
  font: 12px var(--mono);
  padding: 6px 9px;
  border-radius: 4px;
  max-width: 230px
}

.inspector {
  border-left: 1px solid var(--line);
  padding: 23px 22px;
  min-width: 0
}

.control-label {
  display: block;
  font: 11px var(--mono);
  letter-spacing: .1em;
  margin-bottom: 10px;
  color: var(--muted)
}

#colour {
  width: 100%
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 11px;
  color: var(--muted);
  margin: 13px 0 25px;
  min-height: 35px
}

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

.swatch {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0
}

.gradient {
  width: 100%;
  height: 7px;
  background: linear-gradient(90deg, #306580, #38a995, #e6c64b, #cb6037);
  border-radius: 3px
}

.selection-head {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px
}

.selection-head button {
  font-size: 11px;
  padding: 4px 7px;
  border: 0;
  background: var(--soft)
}

.row-control {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin: 14px 0
}

.row-control input {
  width: 92px;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: 12px var(--mono)
}

.row-control button {
  font-size: 12px;
  padding: 4px 8px
}

#selected-details {
  font-size: 16px;
  font-weight: 550;
  overflow-wrap: anywhere
}

#molecule {
  width: 100%;
  height: 150px;
  object-fit: contain
}

#molecule[hidden] {
  display: none
}

#structure-note {
  font-size: 11px;
  margin-bottom: 12px
}

.properties {
  display: grid;
  gap: 5px;
  margin-top: 12px
}

.property-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px
}

.property-row span {
  color: var(--muted)
}

.property-row b {
  font-family: var(--mono);
  font-weight: 400
}

details {
  margin: 15px 0;
  font-size: 12px
}

summary {
  cursor: pointer;
  color: var(--muted)
}

.identity {
  font: 11px/1.7 var(--mono);
  overflow-wrap: anywhere;
  margin-top: 8px
}

.neighbor-button {
  width: 100%;
  margin-top: 12px;
  color: var(--accent);
  font-size: 12px;
  background: var(--soft)
}

.neighbor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px
}

.neighbor-list button {
  font: 11px var(--mono);
  padding: 4px 7px
}

.explorer-note {
  display: grid;
  grid-template-columns: 150px 1fr;
  border-top: 1px solid var(--line);
  padding: 17px 23px;
  gap: 20px;
  background: #fafbfd
}

.note-label {
  font: 10px/1.7 var(--mono);
  color: var(--accent);
  letter-spacing: .07em
}

.explorer-note p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7
}

/* Keep molecular identity, family annotations, and the full structure distinct. */
#selected-family {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 6px 0 15px;
  overflow-wrap: anywhere
}

#molecule-figure {
  margin: 0 0 12px;
  padding: 12px 8px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white
}

#molecule-figure figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 550;
  padding: 0 4px
}

#molecule-figure figcaption span {
  font-size: 10px;
  font-weight: 400;
  white-space: nowrap;
  color: var(--accent);
  background: var(--soft);
  padding: 3px 5px;
  border-radius: 3px
}

#molecule-figure #molecule {
  display: block;
  height: 170px
}

#structure-note {
  font-size: 12px;
  line-height: 1.65
}

#reference-controls {
  margin-top: 18px
}

#reference-controls label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px
}

#reference-row {
  width: 100%;
  font-size: 13px
}

.neighbor-button:disabled {
  cursor: not-allowed
}

.neighbor-list {
  min-height: 62px;
  align-content: start
}

.selected-smiles-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 7px
}

.selected-smiles {
  display: block;
  font: 14px/1.65 var(--mono);
  font-weight: 400;
  overflow-wrap: anywhere;
  white-space: normal;
  user-select: text
}

.selected-smiles {
  max-height: 8.25em;
  overflow: auto;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto
}

.selected-smiles:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px
}

header {
  max-width: 1600px;
  margin: auto;
  padding: 18px 30px;
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line)
}

header h1 {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--muted);
  margin: 0;
  padding-left: 24px;
  border-left: 1px solid var(--line)
}

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 48px
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 0
}

.panel {
  max-width: none;
  box-shadow: none;
  border: 0;
  border-radius: 0;
  background: var(--paper)
}

.explorer-grid {
  grid-template-columns: minmax(0, 1fr) 330px;
  height: calc(100dvh - 240px);
  min-height: 480px
}

.plot-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-top: 16px
}

.plot-toolbar,
.plot-footer {
  flex-shrink: 0
}

.plot-wrap {
  height: auto;
  min-height: 0;
  flex: 1
}

.inspector {
  overflow-y: auto;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  scrollbar-gutter: stable
}

.projection-note {
  margin: 0;
  padding: 13px 23px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  background: #fafbfd
}

.projection-note summary {
  width: fit-content;
  color: var(--muted)
}

.projection-note p {
  max-width: 1000px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7
}

.skip {
  position: absolute;
  left: 15px;
  top: -100px;
  background: white;
  z-index: 5;
  padding: 10px
}

.skip:focus {
  top: 10px
}

[hidden] {
  display: none !important
}

@media(max-width:900px) {
  header {
    padding: 16px 20px
  }

  main {
    padding: 16px 20px
  }

  .explorer-grid {
    grid-template-columns: minmax(0, 1fr) 290px
  }

  .inspector {
    padding: 20px 16px
  }

  .plot-side {
    padding-left: 12px;
    padding-right: 12px
  }

  .explorer-top {
    padding: 12px 16px
  }

  .segmented button {
    padding: 7px 10px
  }
}

@media(max-width:650px) {
  header {
    padding: 16px;
    gap: 15px
  }

  .wordmark {
    font-size: 17px;
    gap: 8px
  }

  header h1 {
    font-size: 13px;
    padding-left: 15px
  }

  main {
    padding: 12px
  }

  .explorer-top {
    flex-wrap: wrap;
    padding: 10px;
    gap: 6px
  }

  .explorer-grid {
    display: block;
    height: auto;
    min-height: 0
  }

  .plot-side {
    display: block;
    padding: 12px 10px 0
  }

  .plot-wrap {
    height: clamp(320px, 52dvh, 460px)
  }

  .plot-toolbar {
    font-size: 11px
  }

  .plot-toolbar select {
    font-size: 12px;
    padding: 5px;
    margin-left: 4px
  }

  .zoom-buttons button {
    font-size: 12px;
    padding: 5px 8px
  }

  .inspector {
    overflow: visible;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 20px
  }

  .plot-footer {
    font-size: 10px
  }

  .projection-note {
    padding: 12px 16px
  }

  .segmented span {
    margin-left: 4px
  }

  .segmented button {
    padding: 7px 9px
  }
}

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

/* 3D projection controls and direct manipulation. */
#colour-category {
  width: 100%
}

.colour-detail-label {
  display: block;
  margin: 12px 0 6px;
  font-size: 12px;
  color: var(--muted)
}

.dataset-control {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted)
}

.projection-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center
}

.projection-controls label {
  white-space: nowrap
}

.plot-toolbar {
  flex-wrap: wrap
}

.plot-side>.plot-wrap {
  margin-top: 0
}

.plot-side>.plot-toolbar {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line)
}

#availability {
  margin: 8px 0 0;
  flex-shrink: 0
}

#embedding {
  cursor: grab
}

#embedding.dragging {
  cursor: grabbing
}

#plot-loading {
  padding: 24px;
  text-align: center;
  align-content: center;
  gap: 12px
}

#plot-loading button {
  justify-self: center
}

#identity {
  white-space: pre-wrap
}

.property-row b {
  text-align: right;
  overflow-wrap: anywhere
}

.property-row span {
  overflow-wrap: anywhere;
  min-width: 0
}

.plot-footer {
  gap: 12px
}

.plot-footer>span:last-child {
  white-space: nowrap
}

@media(max-width:1100px) {
  .projection-controls {
    gap: 6px
  }

  .plot-toolbar select {
    margin-left: 3px
  }

  .plot-toolbar {
    gap: 8px
  }

  .projection-controls select {
    font-size: 12px
  }
}

@media(max-width:650px) {
  .plot-footer {
    line-height: 1.6
  }

  .projection-controls {
    gap: 6px 10px
  }

  .projection-controls label {
    font-size: 11px
  }

  .zoom-buttons {
    margin-left: auto
  }
}

/* Independent 3D atomic geometry and optional property details. */
#molecule-figure {
  padding: 12px 8px 8px
}

#molecule-figure figcaption #molecule-title {
  font-size: 12px;
  font-weight: 550;
  color: var(--ink);
  background: none;
  padding: 0;
  white-space: normal
}

.molecule-wrap {
  position: relative;
  height: 250px;
  margin-top: 8px
}

#molecule-figure #molecule {
  position: relative;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab
}

#molecule:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px
}

#molecule-loading {
  position: absolute;
  inset: 0;
  background: #ffffffef;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 12px
}

#molecule-loading button {
  justify-self: center
}

.molecule-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 4px 0
}

.molecule-toolbar>span {
  font-size: 10px;
  color: var(--muted)
}

.molecule-toolbar>div {
  display: flex;
  gap: 4px
}

.molecule-toolbar button {
  font-size: 11px;
  padding: 3px 7px
}

#properties-details {
  border-top: 1px solid var(--line);
  padding-top: 12px
}

#properties-details summary {
  color: var(--ink);
  font-weight: 500
}

/* Static, recolourable comparison of every encoder layer. */
.overview {
  margin-bottom: 48px;
  padding: 24px 0 0;
  border-top: 1px solid var(--line)
}

.overview-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px
}

.overview h2 {
  font: 400 28px/1.2 Georgia, "Times New Roman", serif;
  margin: 0
}

.overview-header p {
  margin: 3px 0 0
}

.overview-colours {
  display: flex;
  flex-wrap: wrap;
  gap: 12px
}

.overview-colours label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: var(--muted)
}

.overview-colours select {
  min-width: 160px;
  max-width: 260px
}

.overview-scroll {
  overflow-x: auto;
  padding-bottom: 6px
}

#layer-grid {
  width: 100%;
  min-width: 1100px;
  table-layout: fixed;
  border-spacing: 7px;
  border-collapse: separate
}

#layer-grid th {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  padding: 0 0 5px
}

#layer-grid th:first-child {
  width: 78px;
  text-align: left
}

#layer-grid tbody th {
  color: var(--ink);
  vertical-align: middle;
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--paper)
}

#layer-grid td {
  padding: 0
}

.overview-cell {
  position: relative;
  aspect-ratio: 1;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden
}

.overview-cell canvas {
  /* Out of flow so the high-DPI backing size never feeds back into layout. */
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none
}

.overview-cell>span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--muted)
}

.overview-cell.unavailable {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  background: repeating-linear-gradient(135deg, #f7f9fc, #f7f9fc 7px, #edf1f7 7px, #edf1f7 8px)
}

#overview-legend {
  margin: 10px 0;
  min-height: 0
}

#overview-legend .gradient {
  max-width: 240px
}

#overview-status {
  margin: 8px 0 0
}

.overview-note {
  margin: 6px 0 0;
  max-width: 1000px
}

.point-size-control {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  flex-shrink: 0
}

.point-size-control input {
  width: 130px;
  accent-color: var(--accent);
  cursor: pointer
}

.point-size-control output {
  font: 11px var(--mono);
  min-width: 48px
}

@media(max-width:650px) {
  .overview {
    padding: 20px 0 0;
    margin-bottom: 36px
  }

  .overview-colours {
    width: 100%
  }

  .overview-colours label {
    flex: 1;
    min-width: 0
  }

  .overview-colours select {
    width: 100%;
    min-width: 0;
    font-size: 12px
  }

  .overview-scroll:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px
  }
}

/* Each plot owns its dataset, colours and visibility settings. */
.overview-header {
  align-items: flex-start
}

.overview-colours select {
  min-width: 100px;
  max-width: 230px
}

.appearance-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0 26px;
  flex-shrink: 0
}

.filter-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted)
}

.filter-control label {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer
}

.filter-control input {
  accent-color: var(--accent);
  margin: 0;
  width: 15px;
  height: 15px;
  cursor: pointer
}

.filter-help {
  font-size: 11px;
  margin: 5px 0 14px;
  max-width: 650px
}

.inspector .legend {
  margin-bottom: 12px
}

@media(max-width:650px) {
  .overview-colours label {
    flex: 1 1 40%
  }

  .overview-colours select {
    max-width: none
  }

  .appearance-controls {
    gap: 0 16px
  }

  .point-size-control input {
    width: 110px
  }
}

/* A persistent theme switch; transparent plot canvases reveal pure black. */
:root {
  color-scheme: light
}

#theme-toggle {
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0
}

#theme-toggle[aria-pressed=true] {
  background: var(--soft);
  border-color: var(--accent);
  color: var(--accent)
}

:root[data-theme=dark] {
  color-scheme: dark;
  --ink: #e8edf7;
  --muted: #acb7cb;
  --line: #354158;
  --paper: #10131b;
  --soft: #232c3d;
  --blue: #9eb8ff;
  --accent: #9eb8ff
}

[data-theme=dark] .panel {
  background: var(--paper)
}

[data-theme=dark] #molecule-figure {
  background: #181e2a
}

[data-theme=dark] button,
[data-theme=dark] select,
[data-theme=dark] .row-control input {
  background: #20293a;
  color: var(--ink)
}

[data-theme=dark] button:hover {
  background: #2d3a51;
  border-color: #8198c4
}

[data-theme=dark] .plot-wrap,
[data-theme=dark] .overview-cell,
[data-theme=dark] .molecule-wrap,
[data-theme=dark] #molecule {
  background: #000;
  background-image: none;
  border-color: var(--line)
}

[data-theme=dark] #plot-loading,
[data-theme=dark] #molecule-loading {
  background: #000;
  color: var(--muted)
}

[data-theme=dark] .projection-note,
[data-theme=dark] .skip {
  background: #181e2a
}

[data-theme=dark] .axis-label {
  color: #acb7cb
}

[data-theme=dark] #tooltip {
  background: #232c3df5;
  border: 1px solid var(--line);
  color: var(--ink)
}

@media(max-width:650px) {
  header {
    flex-wrap: wrap
  }

  #theme-toggle {
    padding: 5px 9px;
    font-size: 12px
  }
}

.percentile-heading {
  width: 100%;
  font-weight: 600;
  color: var(--ink)
}

.percentile-note {
  width: 100%;
  line-height: 1.6;
  max-width: 650px
}

/* A plain masthead, with the paper and resources on the same reading edge. */
.paper-header {
  display: block;
  max-width: 1280px;
  padding: 24px 32px 28px;
  border: 0;
  text-align: left
}

.header-tools {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 28px
}

#theme-toggle {
  padding: 3px 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px
}

#theme-toggle:hover,
#theme-toggle[aria-pressed=true] {
  background: none;
  color: var(--accent)
}

.paper-header h1 {
  max-width: 1050px;
  margin: 0;
  padding: 0;
  border: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 3.1vw, 42px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -.025em;
  color: var(--ink);
  text-wrap: balance
}

.paper-name {
  color: inherit
}

.paper-authors {
  font-size: 15px;
  margin: 20px 0 16px;
  color: var(--muted)
}

.paper-intro {
  max-width: 950px;
  margin: 0 0 52px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink)
}

.paper-resources {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px
}

.paper-resources a {
  color: var(--accent);
  font-size: 14px;
  line-height: 1.8;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px
}

.paper-resources a:hover {
  text-decoration-thickness: 2px
}

.citation-panel {
  margin-top: 48px;
  padding: 24px 0 0;
  border-top: 1px solid var(--line)
}

.citation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap
}

.citation-heading h2 {
  font: 400 28px/1.2 Georgia, "Times New Roman", serif;
  margin: 0
}

.citation-heading>div {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px
}

.citation-heading a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px
}

#bibtex-entry {
  overflow-x: auto;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 18px 0 0;
  padding: 20px;
  text-align: left;
  font: 12px/1.8 var(--mono);
  tab-size: 2
}

#bibtex-entry:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px
}

.citation-note {
  margin: 10px 0 0
}

#citation-status {
  margin: 0;
  min-height: 20px
}

@media(max-width:650px) {
  .paper-header {
    padding: 16px 20px 24px
  }

  .header-tools {
    margin-bottom: 24px
  }

  .paper-authors {
    margin: 18px 0 14px
  }

  .paper-resources {
    gap: 8px 20px
  }

  .paper-intro {
    font-size: 16px;
    margin-bottom: 36px
  }

  .citation-panel {
    padding: 20px 0 0
  }

  .citation-heading>div {
    gap: 12px
  }

  #bibtex-entry {
    padding: 14px;
    font-size: 11px
  }
}


/* Independent, keyboard-accessible family selections for each plot. */
.family-controls {
  min-width: 0;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px
}

.family-controls legend {
  font-size: 12px;
  color: var(--ink);
  padding: 0 5px
}

.family-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px
}

.family-actions span {
  margin-right: auto
}

.family-actions button {
  font-size: 11px;
  padding: 3px 7px
}

.family-controls p {
  margin: 8px 0
}

.family-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 5px 16px;
  max-height: 210px;
  overflow-y: auto;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  padding: 4px 5px
}

.family-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  cursor: pointer;
  min-width: 0
}

.family-options input {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
  margin: 0;
  flex-shrink: 0
}

.family-options small {
  margin-left: auto;
  color: var(--muted);
  font: 10px var(--mono)
}

.family-options .swatch {
  flex-shrink: 0
}

.inspector .family-options {
  grid-template-columns: 1fr;
  max-height: 210px
}

#atom-tooltip {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font: 12px/1.4 var(--mono);
  box-shadow: 0 2px 9px #0003;
  max-width: calc(100% - 8px)
}

/* Paper results: standalone scientific figures, with accessible source values. */
.paper-results {
  max-width: none;
  margin: 0 0 52px
}

.results-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin: 0 0 32px
}

.results-heading h2 {
  font: 400 28px/1.2 Georgia, "Times New Roman", serif;
  letter-spacing: -.015em;
  margin: 0
}

.results-heading>a {
  font-size: 12px
}


.results-figure {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--paper)
}



.paper-results a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px
}

.benchmark-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start
}

.result-chart {
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  scrollbar-width: thin
}

.result-chart img {
  display: block;
  width: 100%;
  height: auto
}

.result-chart .chart-dark {
  display: none
}

.qm9-chart img {
  min-width: 650px
}

.result-chart:focus-visible,
.results-table-scroll:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px
}

.results-figure figcaption {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 18px
}

.results-figure figcaption p {
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0
}

.results-figure figcaption strong {
  color: var(--ink);
  font-weight: 600
}

.results-values {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin: 18px 0 0
}

.results-values summary {
  font-size: 13px;
  color: var(--accent);
  width: fit-content
}

.results-values>p {
  color: var(--muted);
  max-width: 900px
}

.results-table-scroll {
  overflow-x: auto;
  margin-top: 18px
}

.results-table-scroll table {
  border-collapse: collapse;
  min-width: 100%;
  white-space: nowrap;
  font-size: 12px;
  text-align: right
}

.results-table-scroll caption {
  text-align: left;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 10px
}

.results-table-scroll th,
.results-table-scroll td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line)
}

.results-table-scroll th:first-child {
  text-align: left
}

.results-table-scroll thead {
  background: var(--soft)
}

.results-source {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
  text-align: left
}

[data-theme=dark] .results-figure {
  background: var(--paper)
}

[data-theme=dark] .result-chart .chart-light {
  display: none
}

[data-theme=dark] .result-chart .chart-dark {
  display: block
}

@media(max-width:1150px) {
  .benchmark-charts {
    grid-template-columns: 1fr
  }

  .results-figure {
    padding: 0
  }
}

@media(max-width:800px) {
  .results-figure figcaption {
    grid-template-columns: 1fr;
    gap: 12px
  }
}

@media(max-width:500px) {
  .paper-results {
    margin-bottom: 40px
  }

  .results-figure {
    padding: 0
  }
}

.benchmark-charts .qm9-chart {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto
}

.ranking-panel {
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px
}

.ranking-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px
}

.ranking-heading h3 {
  font-size: 16px;
  font-weight: 500;
  margin: 0
}



.results-table-scroll .reference-model {
  color: var(--muted);
  background: var(--soft)
}

.results-footnote {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin: 12px 0 20px
}

/* Paper-style rank diagram, with a shared axis for both weightings. */
.rank-figure-scroll {
  overflow-x: auto;
  overscroll-behavior-y: auto;
  margin: 12px 0 4px
}

.rank-diagram {
  display: block;
  width: 100%;
  min-width: 950px;
  height: auto;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink)
}

.rank-diagram text {
  fill: currentColor;
  font-size: 18px
}

.rank-diagram .rank-weighting-title {
  font-size: 18px;
  font-weight: 700
}

.rank-diagram .rank-axis-line {
  stroke: var(--ink);
  stroke-width: 1.6
}

.rank-diagram .rank-tick {
  font-size: 15px
}

.rank-diagram .rank-axis-caption {
  font-size: 14px;
  fill: var(--muted)
}

.rank-diagram .rank-group {
  stroke: #adb6bd;
  stroke-width: 3.5;
  opacity: .8
}

.rank-diagram [data-family=finetuned] {
  color: #c32930
}

.rank-diagram [data-family=lgbm] {
  color: #4877c8
}

.rank-diagram [data-family=mlp] {
  color: #b87200
}

.rank-diagram [data-family=other] {
  color: #8836a3
}

.rank-diagram .rank-ours text {
  font-weight: 700
}

.rank-diagram .rank-legend-item text,
.rank-diagram .rank-legend-label {
  fill: var(--ink);
  font-size: 16px
}

[data-theme=dark] .rank-diagram [data-family=finetuned] {
  color: #ff9296
}

[data-theme=dark] .rank-diagram [data-family=lgbm] {
  color: #91b8ff
}

[data-theme=dark] .rank-diagram [data-family=mlp] {
  color: #edbc70
}

[data-theme=dark] .rank-diagram [data-family=other] {
  color: #d3a0e7
}

[data-theme=dark] .rank-diagram .rank-group {
  stroke: #939fb4
}

/* Keep the explorer controls compact; separate sections with rules, not cards. */
.explorer {
  border-top: 1px solid var(--line);
  padding-top: 24px
}

#explorer-title {
  font: 400 28px/1.2 Georgia, "Times New Roman", serif;
  margin: 0 0 24px
}

.explorer-top {
  padding: 0 0 16px
}

.selection-label {
  font-size: 12px;
  color: var(--muted);
  margin: 0
}

.selection-head button {
  font-size: 11px
}

.segmented {
  border-radius: 3px
}

.segmented button {
  border-radius: 2px
}

.segmented button[aria-pressed=true] {
  box-shadow: none;
  border-bottom: 2px solid var(--accent)
}

button,
select,
.row-control input {
  border-radius: 3px
}

.plot-wrap,
.overview-cell,
#molecule-figure,
#bibtex-entry {
  border-radius: 2px
}

@media(max-width:900px) {
  main {
    padding: 0 20px 40px
  }

  .paper-header {
    padding-left: 20px;
    padding-right: 20px
  }
}

.distinct-intro {
  max-width: 950px;
  font-size: 16px;
  line-height: 1.8;
  margin: 0 0 24px
}

.distinct-chart {
  max-width: 1100px;
  margin: 0 auto
}

.distinct-chart img {
  min-width: 700px
}

.header-tools {
  align-items: center;
  gap: 18px
}

.header-tools #theme-toggle {
  margin-left: 0
}

.design-compare {
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px
}

.design-compare:hover {
  color: var(--accent)
}

.paper-intro a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px
}

.explorer-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px
}

.explorer-heading #explorer-title {
  margin: 0
}

.explorer {
  margin-bottom: 48px
}

.filter-help:empty,
#overview-status:empty {
  display: none
}

.benchmark-charts .qm9-chart {
  max-width: 900px
}

.explorer:fullscreen,
.explorer.is-fullscreen {
  background: var(--paper);
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow: auto;
  width: 100%;
  height: 100dvh;
  margin: 0;
  border: 0;
  border-radius: 0
}

.explorer.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1000
}

body.explorer-expanded {
  overflow: hidden
}

.explorer:fullscreen .explorer-heading,
.explorer.is-fullscreen .explorer-heading {
  flex-shrink: 0;
  margin-bottom: 16px
}

.explorer:fullscreen .explorer-grid,
.explorer.is-fullscreen .explorer-grid {
  flex: 1;
  min-height: 0;
  height: auto
}

.explorer:fullscreen .explorer-top,
.explorer.is-fullscreen .explorer-top {
  flex-shrink: 0
}

@media(max-width:650px) {

  .explorer:fullscreen .explorer-grid,
  .explorer.is-fullscreen .explorer-grid {
    display: block;
    overflow: auto
  }

  .explorer:fullscreen .plot-wrap,
  .explorer.is-fullscreen .plot-wrap {
    height: 60dvh
  }
}

.rank-weighting {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px
}

.rank-weighting button {
  font-size: 12px;
  padding: 5px 10px;
  background: transparent;
  color: var(--muted)
}

.rank-weighting button[aria-pressed=true] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--soft)
}

/* Quiet controls and lighter guide lines keep the rank diagram in focus. */
.rank-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line)
}

.rank-weighting {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--soft)
}

.rank-weighting button {
  border: 0;
  border-radius: 4px;
  padding: 8px 16px;
  font: 500 12px/1.3 var(--sans, Arial, sans-serif);
  white-space: nowrap
}

.rank-weighting button[aria-pressed=true] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 3px #00000012
}

.rank-weighting button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px
}

.rank-weighting-caption {
  font-size: 12px;
  color: var(--muted)
}

.rank-diagram .rank-stem {
  opacity: .35
}

.rank-diagram .rank-ours .rank-stem {
  opacity: .8;
  stroke-width: 1.6
}

.rank-diagram .rank-axis-line {
  stroke: var(--muted);
  stroke-width: 1
}

.rank-diagram .rank-group {
  stroke-linecap: round;
  opacity: .65
}

.projection-note {
  border-top: 1px solid var(--line);
  padding: 16px 0;
  margin: 0;
  flex-shrink: 0
}

.projection-note summary {
  color: var(--ink)
}

.projection-note p {
  max-width: 95ch;
  color: var(--muted);
  line-height: 1.7;
  margin: 12px 0 0
}

@media(max-width:650px) {
  .rank-chart-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px
  }

  .rank-weighting button {
    padding: 8px 14px
  }
}

.paper-authors sup {
  font-size: .7em;
  margin-left: 1px
}

.paper-affiliation {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin: -8px 0 20px
}

.paper-affiliation span {
  font-size: 11px
}

/* Section openings share one quiet, editorial rhythm. */
.current-design main {
  counter-reset: page-section
}

.current-design main>section {
  counter-increment: page-section;
  margin: 0 0 72px;
  padding-top: 0;
  border-top: 0;
  overflow: visible
}

.current-design :is(.results-heading, .explorer-heading, .overview-header, .citation-heading) {
  position: relative;
  box-sizing: border-box;
  min-height: 80px;
  margin: 0 0 28px;
  padding: 24px 0 18px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  gap: 18px;
}

.current-design :is(.results-heading, .explorer-heading, .overview-header, .citation-heading)::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 44px;
  height: 2px;
  background: var(--accent);
}

.current-design main>section h2 {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0;
  font: 400 28px/1.25 Georgia, "Times New Roman", serif
}

.current-design main>section h2::before {
  content: counter(page-section, decimal-leading-zero);
  font: 11px/1.5 var(--mono);
  color: var(--accent);
  align-self: center;
  letter-spacing: .04em
}

.current-design .overview-header p {
  margin: 8px 0 0 34px
}

.current-design .paper-intro {
  margin-bottom: 56px
}

.current-design .citation-panel {
  margin-bottom: 16px
}

.current-design .explorer:fullscreen,
.current-design .explorer.is-fullscreen {
  padding: 20px;
  margin: 0;
  overflow: auto
}

.current-design .explorer:fullscreen .explorer-heading,
.current-design .explorer.is-fullscreen .explorer-heading {
  min-height: 0;
  padding: 12px 16px;
  margin-bottom: 16px
}

@media(max-width:650px) {
  .current-design main>section {
    margin-bottom: 48px
  }

  .current-design :is(.results-heading, .explorer-heading, .overview-header, .citation-heading) {
    min-height: 68px;
    padding: 20px 0 14px;
    margin-bottom: 22px;
    gap: 12px
  }

  .current-design main>section h2 {
    font-size: 23px;
    gap: 12px
  }

  .current-design .overview-header p {
    margin-left: 30px
  }

  .current-design .explorer-heading {
    align-items: center
  }

  .current-design #fullscreen-explorer {
    flex-shrink: 0;
    font-size: 11px;
    padding: 6px 8px
  }
}

/* Leave-one-model-out comparison: shared axes and exact, accessible values. */
.ensemble-figure {
  margin: 36px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line)
}

.ensemble-heading h3 {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 6px
}

.ensemble-heading p {
  font-size: 13px;
  color: var(--muted);
  margin: 0
}

.ensemble-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin: 24px 0 12px
}

.ensemble-panel {
  min-width: 0;
  padding: 0 14px;
  border-left: 1px solid transparent
}

.ensemble-panel+.ensemble-panel {
  border-left-color: var(--line)
}

.ensemble-panel h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0
}

.ensemble-baseline {
  font-size: 11px;
  color: var(--muted);
  margin: 6px 0 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px
}

.ensemble-baseline strong {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--ink)
}

.ensemble-panel svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible
}

.ensemble-zero {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 3 4
}

.ensemble-point {
  color: var(--muted)
}

.ensemble-point line {
  stroke: currentColor;
  stroke-width: 2;
  opacity: .55
}

.ensemble-point circle {
  fill: currentColor
}

.ensemble-model {
  fill: var(--ink);
  font-size: 11px
}

.ensemble-delta {
  fill: currentColor;
  font: 10px var(--mono)
}

.ensemble-jepa {
  color: var(--accent)
}

.ensemble-jepa .ensemble-model {
  fill: var(--accent);
  font-weight: 600
}

.ensemble-tick {
  fill: var(--muted);
  font: 9px var(--mono)
}

.ensemble-figure>figcaption {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted)
}

.ensemble-reference {
  font-weight: 600;
  background: var(--soft)
}

@media(max-width:700px) {
  .ensemble-panels {
    grid-template-columns: 1fr;
    gap: 24px
  }

  .ensemble-panel {
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    border-left: 0
  }

  .ensemble-panel+.ensemble-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 24px 0 0
  }

  .ensemble-heading h3 {
    font-size: 17px
  }
}

.ensemble-takeaway {
  max-width: 900px;
  font-size: 13px;
  line-height: 1.8;
  margin: 18px 0;
  color: var(--ink)
}

.ensemble-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 20px 0 8px
}

.ensemble-selector button {
  font-size: 12px;
  padding: 7px 12px;
  background: transparent;
  color: var(--muted);
  border-color: transparent
}

.ensemble-selector button[aria-pressed=true] {
  color: var(--accent);
  border-color: var(--line);
  background: var(--soft)
}

.ensemble-interactive .ensemble-panels {
  display: block;
  max-width: 380px;
  margin: 20px auto 16px
}

.ensemble-interactive .ensemble-panel {
  padding: 0;
  border: 0;
  max-width: none
}

.ensemble-interactive .ensemble-panel h4 {
  display: none
}

.ensemble-interactive .ensemble-baseline {
  margin-top: 0
}

.ensemble-interactive>figcaption {
  text-align: center
}

.ensemble-interactive .ensemble-takeaway {
  font-size: 12px;
  color: var(--muted)
}

/* One analysis surface connects distinct predictions with ensemble contributions. */
.prediction-analysis {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px
}

.analysis-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 0 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line)
}

.analysis-switch button {
  padding: 9px 16px;
  font-size: 13px;
  background: transparent;
  color: var(--muted);
  border-color: transparent
}

.analysis-switch button[aria-pressed=true] {
  background: var(--soft);
  color: var(--accent);
  border-color: var(--line)
}

.analysis-summary {
  margin: 0 0 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted)
}

.prediction-analysis .results-figure {
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  background: transparent
}

.prediction-analysis .ensemble-figure {
  border: 0;
  padding: 0;
  margin: 0
}

.prediction-analysis .ensemble-heading {
  text-align: center
}

.prediction-analysis .ensemble-heading h3 {
  font-size: 16px;
  margin-bottom: 6px
}

.prediction-analysis .ensemble-selector {
  justify-content: center;
  margin-top: 18px
}

.prediction-analysis .ensemble-takeaway {
  text-align: center;
  margin: 18px auto
}

.prediction-analysis .results-source {
  margin-top: 18px;
  font-size: 11px
}

.prediction-analysis .results-values {
  margin-top: 20px
}

.classic-design #distinct-predictions .distinct-intro {
  text-align: center;
  max-width: 720px;
  font-size: 15px;
  line-height: 1.8
}

@media(max-width:650px) {
  .prediction-analysis {
    padding: 18px 12px
  }

  .analysis-switch {
    gap: 4px;
    margin-bottom: 20px;
    padding-bottom: 16px
  }

  .analysis-switch button {
    font-size: 11px;
    padding: 8px 10px
  }

  .prediction-analysis .ensemble-heading h3 {
    font-size: 15px
  }
}

/* Full-screen toggle carries an expand/collapse icon beside its label. */
#fullscreen-explorer {
  display: inline-flex;
  align-items: center;
  gap: 7px
}

#fullscreen-explorer svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round
}

/* The explorer box holds its dataset bar, map, controls, and projection note. */
.explorer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 14px
}

.explorer-intro {
  margin: 0;
  color: var(--muted)
}

.explorer:fullscreen .explorer-box,
.explorer.is-fullscreen .explorer-box {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column
}

.explorer:fullscreen .explorer-intro,
.explorer.is-fullscreen .explorer-intro {
  display: none
}

.current-design .explorer-heading {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px
}

.current-design .explorer-intro {
  margin-left: 34px;
  font-size: 14px;
  line-height: 1.7
}

@media(max-width:650px) {
  .current-design .explorer-intro {
    margin-left: 30px
  }
}

/* Contact line under the affiliation, and an icon on the theme toggle. */
.paper-affiliation {
  margin-bottom: 6px
}

.paper-contact {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 20px
}

.paper-contact a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px
}

#theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px
}

#theme-toggle svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round
}

.results-figure figcaption.qm9-caption {
  grid-template-columns: 1fr
}

.qm9-panel {
  min-width: 0
}

/* Short explanation beside the layer comparison controls. */
.overview-header>div:first-child {
  flex: 1 1 320px;
  max-width: 480px
}

.overview-intro {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6
}
/* Give the layer comparison its own heading and a stable controls row. */
.overview.panel{border:0;padding:0;background:transparent}
.overview-header{display:block;max-width:800px;text-align:center;margin:0 auto 28px}
.overview-header .overview-intro{max-width:720px;margin:12px auto 0;font-size:15px;line-height:1.7}
.overview-box{border:1px solid var(--line);border-radius:12px;padding:22px;background:var(--paper)}
.overview-box .overview-colours{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;align-items:end;margin-bottom:16px}
.overview-box .overview-colours label{min-width:0}
.overview-box .overview-colours select{min-width:0;max-width:none;width:100%}
.overview-box #overview-context{margin:0 0 18px;padding-bottom:14px;border-bottom:1px solid var(--line)}
@media(max-width:900px){.overview-box .overview-colours{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.overview-box{padding:16px 12px}.overview-box .overview-colours{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.overview-header .overview-intro{font-size:14px}.overview-header{margin-bottom:22px}}

/* Enlarged layer maps are redrawn from coordinates rather than scaled thumbnails. */
.overview-cell[role=button]{cursor:zoom-in}
.overview-cell[role=button]:hover{border-color:var(--accent)}
.overview-cell[role=button]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.overview-cell[aria-disabled=true]{cursor:wait}
.overview-dialog{width:min(880px,94vw);max-height:94dvh;padding:20px;border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--ink);box-shadow:0 24px 80px #0004}
.overview-dialog::backdrop{background:#080e1bcc;backdrop-filter:blur(3px)}
.overview-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:16px}
.overview-dialog-header h3{margin:0;font-size:14px;font-weight:500;line-height:1.6}
.overview-dialog-header button{flex-shrink:0}
.overview-dialog canvas{display:block;width:100%;height:min(72dvh,760px);background:var(--soft);border-radius:5px}
[data-theme=dark] .overview-dialog canvas{background:#000}
@media(max-width:650px){.overview-dialog{padding:14px}.overview-dialog-header{gap:12px}.overview-dialog-header h3{font-size:12px}.overview-dialog canvas{height:65dvh}}

/* Update banner linking to news posts, placed under the introduction. */
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.update-banner{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px 24px;max-width:950px;margin:-28px 0 52px;padding:14px 18px;border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:8px;background:var(--soft)}
.update-banner p{flex:1 1 420px;margin:0;font-size:15px;line-height:1.7}
.update-banner strong{color:var(--accent);font-weight:600}
.update-banner a{flex-shrink:0;color:var(--accent);font-size:14px;font-weight:600;text-decoration:underline;text-underline-offset:4px}
.update-banner a:hover{text-decoration-thickness:2px}
@media(max-width:650px){.update-banner{margin:-36px 0 40px;padding:12px 14px}.update-banner p{font-size:14px}}
/* Atom-JEPA-Bio is marked in green to set it apart from Atom-JEPA's blue. */
:root{--bio:#1a7f45}
:root[data-theme=dark]{--bio:#6fd69b}
.bio-name,.paper-name.bio-name{color:var(--bio)}
.update-banner .bio-name{font-weight:600}
