/* Project page for "Beyond Adjacent Layers" (NeurIPS 2026). Used by _layouts/project.html. */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #f4f5f7;
  --ink: #1c2230;
  --ink-2: #4c5466;
  --ink-3: #737b8c;
  --rule: #e2e4e9;
  --grid: #eceef2;
  --link: #1f5fae;
  --focus: #2a78d6;
  /* Series: categorical slots 1-3, plus a neutral for the two weakest baselines. */
  --s-fcm: #2a78d6;
  --s-delta: #eb6834;
  --s-short: #1baf7a;
  --s-neutral: #8d94a1;
  --cell-self: #d6d9df;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #16181d;
    --panel: #1e2127;
    --ink: #e8e9ed;
    --ink-2: #b6bbc6;
    --ink-3: #8b919d;
    --rule: #2d3139;
    --grid: #262a31;
    --link: #82b2ef;
    --focus: #3987e5;
    --s-fcm: #3987e5;
    --s-delta: #d95926;
    --s-short: #199e70;
    --s-neutral: #6f7581;
    --cell-self: #3a3f48;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #16181d;
  --panel: #1e2127;
  --ink: #e8e9ed;
  --ink-2: #b6bbc6;
  --ink-3: #8b919d;
  --rule: #2d3139;
  --grid: #262a31;
  --link: #82b2ef;
  --focus: #3987e5;
  --s-fcm: #3987e5;
  --s-delta: #d95926;
  --s-short: #199e70;
  --s-neutral: #6f7581;
  --cell-self: #3a3f48;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  font-variant-numeric: oldstyle-nums proportional-nums;
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

/* Top bar: a quiet way back to the rest of the site. */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  max-width: 960px; margin: 0 auto; padding: 18px 24px;
  font-family: var(--sans); font-size: 14px;
}
.topbar a { color: var(--ink-2); text-decoration: none; }
.topbar a:hover { color: var(--ink); text-decoration: underline; }
.topbar__links { display: flex; gap: 20px; align-items: center; }
#theme-toggle {
  font: inherit; color: var(--ink-2); background: none; border: 0; padding: 0; cursor: pointer;
}
#theme-toggle:hover { color: var(--ink); text-decoration: underline; }

/* Column: prose at a reading measure, figures allowed to break wider. */
.paper { max-width: 960px; margin: 0 auto; padding: 0 24px 48px; }
.paper > *, .paper section > * { max-width: 680px; margin-left: auto; margin-right: auto; }
.paper > section { max-width: none; }
.paper .wide, .paper section > .wide { max-width: 912px; }

.masthead-paper { padding: 56px 0 8px; }
.venue { font-family: var(--sans); font-size: 14px; color: var(--ink-2); margin: 0 0 14px; }
h1 { margin: 0 0 22px; font-weight: 500; letter-spacing: -0.01em; }
h1 .t1 { display: block; font-size: 46px; line-height: 1.08; }
h1 .t2 { display: block; font-size: 26px; line-height: 1.3; font-weight: 400; color: var(--ink-2); margin-top: 10px; }
.authors { margin: 0; font-size: 20px; }
.authors a { color: inherit; text-decoration-color: var(--rule); }
.affil { margin: 0 0 22px; color: var(--ink-2); font-size: 17px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.btn {
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  color: var(--ink); text-decoration: none;
  border: 1px solid var(--rule); border-radius: 6px; padding: 7px 14px;
}
.btn:hover { border-color: var(--ink-3); text-decoration: none; background: var(--panel); }

.lead { font-size: 21px; line-height: 1.6; margin-top: 40px; margin-bottom: 36px; }

h2 { font-size: 28px; line-height: 1.25; font-weight: 500; margin-top: 72px; margin-bottom: 16px; letter-spacing: -0.005em; }
h3 { font-size: 21px; line-height: 1.3; font-weight: 600; margin-top: 44px; margin-bottom: 8px; }
p { margin-top: 0; margin-bottom: 1.1em; }

figure { margin: 36px auto; }
figcaption { font-family: var(--sans); font-size: 14px; line-height: 1.55; color: var(--ink-2); margin-top: 12px; max-width: 680px; }
.teaser img { display: block; width: 100%; height: auto; border-radius: 6px; }
:root[data-theme="dark"] .teaser img { background: #ffffff; }

.steps { padding-left: 1.4em; }
.steps li { margin-bottom: 0.8em; padding-left: 0.2em; }
.steps strong { font-weight: 600; }

/* Figure chrome shared by all charts. */
.fig-label { font-family: var(--sans); font-size: 13px; color: var(--ink-2); margin: 0 0 8px; }
.chart { width: 100%; }
.chart svg, #heatmap svg, #ratio-chart svg { display: block; overflow: visible; }
svg text { font-family: var(--sans); fill: var(--ink-2); font-variant-numeric: tabular-nums lining-nums; }
.axis-line { stroke: var(--rule); stroke-width: 1; }
.grid-line { stroke: var(--grid); stroke-width: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--sans); font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend svg { overflow: visible; }

/* Similarity explorer. */
.explorer__grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 36px; align-items: start; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-family: var(--sans); font-size: 14px; color: var(--ink-2); margin-bottom: 10px; }
.controls output { display: inline-block; min-width: 2.6em; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums lining-nums; }
.controls input[type="range"] { flex: 1 1 160px; accent-color: var(--s-fcm); min-width: 120px; }
.controls .check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.controls .check input { accent-color: var(--s-fcm); margin: 0; }
.readout { font-family: var(--sans); font-size: 15px; line-height: 1.5; color: var(--ink); margin: 12px 0 0; font-variant-numeric: tabular-nums lining-nums; }
.ratio-row { cursor: pointer; }
.ratio-row[aria-disabled="true"] { cursor: default; }
.ratio-row:focus { outline: none; }
.ratio-row:focus-visible .ratio-hit { stroke: var(--focus); stroke-width: 2; }
.ratio-row .ratio-name { fill: var(--ink-2); }
.ratio-row[aria-selected="true"] .ratio-name { fill: var(--ink); font-weight: 500; }
.ratio-row[aria-disabled="true"] .ratio-name { fill: var(--ink-3); }

/* Tooltip. */
.tip {
  position: absolute; z-index: 10; pointer-events: none;
  background: var(--bg); color: var(--ink); border: 1px solid var(--rule); border-radius: 6px;
  box-shadow: 0 4px 14px rgba(20, 24, 33, 0.12);
  font-family: var(--sans); font-size: 13px; line-height: 1.45; padding: 8px 10px; max-width: 280px;
  font-variant-numeric: tabular-nums lining-nums;
}
.tip[hidden] { display: none; }
.tip b { font-weight: 500; }
.tip .row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tip .row span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }

/* Small multiples sit side by side when there is room. */
.small-multiples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.small-multiples .panel-title { font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--ink); margin: 0 0 4px; }

/* Tables. */
.table-wrap { overflow-x: auto; margin-bottom: 28px; }
.tableview .table-wrap { margin-bottom: 0; }
table.data { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 14px; font-variant-numeric: tabular-nums lining-nums; }
table.data caption { text-align: left; color: var(--ink-2); padding-bottom: 8px; caption-side: top; }
table.data th, table.data td { padding: 7px 10px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th { font-weight: 500; color: var(--ink-2); border-bottom-color: var(--ink-3); }
table.data tbody th { font-weight: 400; }
table.data td.best { font-weight: 600; }
.tableview { margin-top: 10px; font-family: var(--sans); font-size: 14px; }
.tableview summary { cursor: pointer; color: var(--link); width: max-content; }
.tableview .table-wrap { margin-top: 10px; }

/* Citation. */
.bib { position: relative; }
.bib pre {
  margin: 0; padding: 46px 18px 16px; background: var(--panel); border-radius: 6px; overflow-x: auto;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.55; color: var(--ink);
}
.copy {
  position: absolute; top: 10px; right: 10px;
  font-family: var(--sans); font-size: 13px; color: var(--ink-2);
  background: var(--bg); border: 1px solid var(--rule); border-radius: 5px; padding: 4px 10px; cursor: pointer;
}
.copy:hover { color: var(--ink); border-color: var(--ink-3); }

.foot { max-width: 728px; margin: 0 auto; padding: 32px 24px 56px; border-top: 1px solid var(--rule); font-family: var(--sans); font-size: 14px; color: var(--ink-2); }
.foot a { color: inherit; }

@media (max-width: 820px) {
  .explorer__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .small-multiples { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 18px; }
  .topbar { padding: 14px 16px; }
  .paper { padding: 0 16px 40px; }
  .masthead-paper { padding-top: 28px; }
  h1 .t1 { font-size: 34px; }
  h1 .t2 { font-size: 21px; }
  .lead { font-size: 19px; }
  h2 { font-size: 24px; margin-top: 56px; }
  .foot { padding: 28px 16px 44px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
