/* Inter and JetBrains Mono, both SIL Open Font License 1.1, served from this
   origin so the page needs nothing from a third party. Licences sit next to the
   files in public/fonts/. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/inter-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/jbmono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/jbmono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root,
:root[data-theme="dark"] {
  --bg: #0d1113;
  --surface: #151a1d;
  --surface-2: #1a2024;
  --border: #262d31;
  --text: #e7ebed;
  --text-dim: #8b969c;
  --text-faint: #5c6569;
  --accent: #4f9d95;
  --accent-soft: #4f9d9522;
  --gt: #dd9c4f;
  --gt-soft: #dd9c4f33;
  --model: #7aa2f7;
  --model-soft: #7aa2f733;
  --miss-bg: #7a2e2e33;
  --miss-text: #e08585;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Inter", ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
}

:root[data-theme="light"] {
  --bg: #f5f6f7;
  --surface: #ffffff;
  --surface-2: #eef0f1;
  --border: #dde1e3;
  --text: #171b1d;
  --text-dim: #5b656a;
  --text-faint: #93999d;
  --accent: #2f7d76;
  --accent-soft: #2f7d7614;
  --gt: #a6691f;
  --gt-soft: #a6691f1c;
  --model: #3b63c9;
  --model-soft: #3b63c91f;
  --miss-bg: #d4514b1c;
  --miss-text: #b53a34;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-feature-settings: "cv05" 1, "ss03" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .15s, color .15s;
}

.empty {
  padding: 30px;
  color: var(--text-faint);
  font-size: 0.82rem;
  text-align: center;
}

.chip {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.68rem;
  font-weight: 650;
}
.chip.inline-chip {
  background: var(--gt-soft);
  border-color: var(--gt);
  color: var(--gt);
}

header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
header h1 {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}
header h1 a {
  color: inherit;
  text-decoration: none;
  border-radius: 5px;
}
header h1 a:hover {
  color: var(--accent);
}
header h1 a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
header .sub {
  color: var(--text-dim);
  font-size: 0.78rem;
}

.themeToggle {
  width: 32px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.themeToggle:hover {
  background: var(--surface-2);
}

.helpToggle {
  margin-left: auto;
  width: 32px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.helpToggle:hover {
  background: var(--surface-2);
}

.helpOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: #00000066;
  z-index: 50;
  align-items: center;
  justify-content: center;
}
.helpOverlay.open {
  display: flex;
}
.helpPanel {
  width: min(640px, 92vw);
  max-height: 84vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 40px #00000044;
}
.helpHead {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.helpHead h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
}
.helpClose {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}
.helpClose:hover {
  color: var(--text);
}
.helpBody {
  padding: 6px 18px 18px;
}
.helpSection h3 {
  margin: 12px 0 4px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.helpSection dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(96px, auto) 1fr;
  column-gap: 12px;
  row-gap: 3px;
}
.helpSection dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 650;
  color: var(--text);
  white-space: nowrap;
}
.helpSection dd {
  margin: 0;
  font-size: 0.73rem;
  color: var(--text-dim);
  line-height: 1.35;
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
}
label.inline {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-dim);
  font-size: 0.75rem;
}
select,
input[type="search"] {
  padding: 6px 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.82rem;
  outline: none;
}
select:focus,
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
input[type="search"] {
  width: 260px;
}

main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 300px 1fr;
}
#right {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
#queryListWrap {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 340px 1fr;
}
#rightCol {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
#body {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px;
}

#fileList {
  min-height: 0;
  overflow-y: auto;
  border-right: 1px solid var(--border);
}

.list-item {
  padding: 6px 12px;
  border-bottom: 1px solid var(--surface-2);
  font-family: var(--mono);
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.list-item:hover {
  background: var(--surface);
}
.list-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.list-item .meta {
  display: block;
  color: var(--text-faint);
  font-family: var(--sans);
  font-size: 0.68rem;
}
.list-group-hdr {
  margin-top: 4px;
  padding: 6px 12px 4px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.66rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

#queryList {
  min-height: 0;
  overflow-y: auto;
  border-right: 1px solid var(--border);
}

.listCaption {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 10px;
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--text-faint);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.listCaption b {
  color: var(--text-dim);
}

.gtRankBadge {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 650;
}
.gtRankBadge.hit {
  background: var(--gt-soft);
  color: var(--gt);
}
.gtRankBadge.miss {
  background: var(--miss-bg);
  color: var(--miss-text);
}

#queryHeader {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.8rem;
}
#queryHeader b {
  color: var(--text);
  font-weight: 650;
}
.qh-label {
  display: inline-block;
  margin-right: 6px;
  color: var(--text-faint);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.qh-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}
.qh-arrow {
  color: var(--text-faint);
  margin: 0 2px;
}
.qh-fields {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.qh-field {
  display: flex;
  align-items: baseline;
  gap: 0;
}

#rankTableWrap {
  max-height: 45vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

table.rank {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.78rem;
}
table.rank th {
  position: sticky;
  top: 0;
  padding: 6px 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: .03em;
  text-align: left;
  text-transform: uppercase;
}
table.rank td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--surface-2);
  white-space: nowrap;
}
table.rank tr:hover td {
  background: var(--surface);
  cursor: pointer;
}
table.rank tr.selected td {
  background: var(--accent-soft);
}
table.rank td.gt {
  color: var(--gt);
  font-weight: 700;
}
table.rank tr.tableGroupSep td {
  padding: 4px 8px;
  background: var(--surface-2);
  color: var(--text-faint);
  font-size: 0.66rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: default;
}
table.rank tr.tableGroupSep:hover td {
  background: var(--surface-2);
}
table.rank tr.tablePruned td,
table.rank tr.tablePruned:hover td {
  padding: 9px 10px;
  background: transparent;
  color: var(--text-faint);
  font-size: 0.72rem;
  text-align: center;
  cursor: default;
}

#detailWrap {
  min-width: 0;
  margin-top: 14px;
  overflow-x: hidden;
}
#detailWrap h3 {
  margin: 14px 0 8px;
  color: var(--text);
  font-size: 0.82rem;
}

.vuln-info {
  margin-bottom: 16px;
}
.vuln-info-label {
  margin-bottom: 4px;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.72rem;
}
.vuln-usage {
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.76rem;
}

.chartWrap {
  max-width: 1200px;
  margin: 10px 0;
  padding: 10px 12px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.chartWrap canvas {
  display: block;
  width: 100%;
  cursor: crosshair;
}
.chartTitle {
  margin-bottom: 6px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 650;
}
.chartTitle .chip {
  margin-left: 6px;
  color: var(--accent);
  border-color: var(--accent);
  vertical-align: 1px;
}
.chartLegend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  color: var(--text-dim);
  font-size: 0.72rem;
}
.chartLegend span.sw {
  display: inline-block;
  width: 12px;
  height: 3px;
  margin-right: 5px;
  border-radius: 2px;
  vertical-align: 2px;
}
.chartTooltip {
  position: fixed;
  z-index: 20;
  display: none;
  padding: 5px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.7rem;
  pointer-events: none;
}

.windowsToggle {
  margin-top: 12px;
}
.windowsToggle summary {
  padding: 6px 4px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.windowsToggle summary::-webkit-details-marker {
  display: none;
}
.windowsToggle summary::before {
  content: '▸';
  display: inline-block;
  width: 14px;
  color: var(--text-faint);
}
.windowsToggle[open] summary::before {
  content: '▾';
}
.windowsToggle summary:hover {
  color: var(--accent);
}

table.windows {
  width: 100%;
  margin-top: 6px;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.74rem;
}
table.windows th {
  padding: 4px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 0.66rem;
  text-align: left;
  text-transform: uppercase;
}
table.windows td {
  padding: 3px 8px;
  border-bottom: 1px solid var(--surface-2);
}
table.windows tr:hover td {
  background: var(--surface);
  cursor: pointer;
}
table.windows tr.hi td {
  background: var(--model-soft);
}
table.windows th.sortable {
  cursor: pointer;
  user-select: none;
}
table.windows th.sortable:hover {
  color: var(--accent);
}
table.windows .sortArrow {
  display: inline-block;
  width: 0.8em;
  opacity: 0.7;
}

.scorebar {
  display: inline-block;
  width: 60px;
  height: 6px;
  margin-left: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
  vertical-align: middle;
}
.scorebar > span {
  display: block;
  height: 100%;
  background: var(--accent);
}

#errBanner {
  display: none;
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 50;
  max-height: 30vh;
  overflow: auto;
  padding: 10px 14px;
  background: #3a1414;
  border: 1px solid #a34;
  border-radius: 8px;
  color: #f8b4b4;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  white-space: pre-wrap;
}

table.rank tr.noDetail td {
  opacity: 0.45;
}
table.rank tr.noDetail:hover td {
  opacity: 0.7;
}

.empty .failReason {
  display: inline-block;
  margin-top: 6px;
  color: var(--miss-text);
  font-family: var(--mono);
  font-size: 0.7rem;
}

#queryHeader.is-empty {
  border-bottom: none;
}
#rankTableWrap:empty {
  border: none;
}

/* ---- Guide & examples (first-load welcome pane) ---- */

.guideToggle {
  margin-left: auto;
  padding: 0 12px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
}
.guideToggle:hover {
  background: var(--surface-2);
  color: var(--text);
}
.guideToggle.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.guideToggle + .helpToggle {
  margin-left: 0;
}

#welcome {
  display: none;
  min-height: 0;
  overflow-y: auto;
}
body.showWelcome #welcome {
  display: block;
  flex: 1;
}
body.showWelcome #queryListWrap {
  display: none;
}
body.showWelcome main {
  grid-template-columns: 1fr;
}
body.showWelcome #fileList,
body.showWelcome .controls {
  display: none;
}
.welcome {
  max-width: 2000px;
  padding: 44px 48px 84px;
}

/* three equal columns that fill the pane; auto-fit is deliberately avoided here,
   since with only three sections it leaves a phantom empty column on wide screens */
.wGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 48px;
  align-items: start;
}
@media (max-width: 1180px) {
  .wGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 780px) {
  .wGrid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.wGrid > .wSection {
  min-width: 0;
}

/* the opening statement is the largest text on the page */
.wLede {
  margin: 0;
  /* no cap: each sentence should keep its own line on a wide screen */
  max-width: none;
  display: grid;
  gap: 3px;
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.62;
  letter-spacing: -0.008em;
}

.wSection {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.wSection > h3 {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 680;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}
.wSectionNote {
  margin-left: 7px;
  color: var(--text-faint);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.wPara {
  margin: 0 0 15px;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.7;
}
.wPara b {
  color: var(--text);
}
.wNote {
  margin: 16px 0 0;
  color: var(--text-faint);
  font-size: 0.83rem;
}
.wNote b {
  color: var(--text-dim);
}

/* the four panes: one flowing sentence each, sharing one left edge */
.wList {
  margin: 0;
  padding: 0;
  list-style: none;
}
.wList li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 3px 10px;
  margin-bottom: 15px;
}
.wList li:last-child {
  margin-bottom: 0;
}
.wList b {
  color: var(--text);
  font-weight: 650;
}
.wItemHead {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 9px;
  color: var(--text);
  font-size: 0.94rem;
}
.wItemBody {
  grid-column: 2;
  display: grid;
  gap: 1px;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.62;
}
.wItemBody b {
  color: var(--text);
  font-weight: 600;
}
.wNum {
  grid-column: 1;
  grid-row: 1;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.67rem;
  font-weight: 700;
}
.wWhere {
  color: var(--text-faint);
  font-size: 0.78rem;
}

.wStages {
  margin: 0 0 15px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px 16px;
  align-items: baseline;
}
.wStages dt {
  color: var(--accent);
  font-size: 0.83rem;
  font-weight: 650;
  white-space: nowrap;
}
.wStages dd {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.6;
}
.wStages dd b {
  color: var(--text);
}
/* the two standing rules, set apart from the three stages above them */
.wRules {
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--surface-2);
}
.wRules dt {
  color: var(--text);
  white-space: nowrap;
}
.wDim {
  color: var(--text-faint);
}

.wList code,
.wStages code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 0.81rem;
  color: var(--text);
}

svg.layoutMap {
  display: block;
  width: 100%;
  height: auto;
  margin: 2px 0 22px;
}
svg.layoutMap .lmNum {
  fill: var(--accent);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
}

svg.anatomy {
  display: block;
  width: 100%;
  margin: 24px 0 15px;
}
svg.anatomy .anAx {
  fill: var(--text-faint);
  font-family: var(--sans);
  font-size: 13px;
}
svg.anatomy .anTag {
  fill: var(--accent);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 650;
}

.wLegend {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.wLegend li {
  display: grid;
  grid-template-columns: 13px 1fr;
  gap: 9px;
  color: var(--text-dim);
  font-size: 0.84rem;
  line-height: 1.55;
}
.wLegendText {
  min-width: 0;
}
.wLegend b {
  color: var(--text);
  font-weight: 650;
}
.wLegend .sw {
  width: 13px;
  height: 3px;
  border-radius: 2px;
  align-self: center;
  margin-top: 1px;
}

/* the paper's cases are links, so they look like a list of links */
.wCases {
  display: grid;
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
  overflow: hidden;
}
.wCase {
  display: grid;
  grid-template-columns: 24px 1fr 14px;
  /* the figure label, the title and the arrow are different sizes, so line them
     up on their baselines rather than letting the grid stretch them */
  align-items: baseline;
  gap: 4px 11px;
  padding: 12px 13px;
  border: none;
  background: var(--bg);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .13s;
}
.wCase:hover {
  background: var(--surface-2);
}
.wCase:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.wCaseFig {
  grid-column: 1;
  grid-row: 1;
  color: var(--text-faint);
  font-size: 0.75rem;
  font-weight: 650;
}
.wCaseName {
  grid-column: 2;
  grid-row: 1;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
}
.wCaseRoute {
  grid-column: 2;
  grid-row: 2;
  color: var(--text-faint);
  font-size: 0.79rem;
  overflow-wrap: anywhere;
}
.wCaseRoute code {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.wStages dt {
  font-weight: 650;
}
.wCaseGo {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  color: var(--text-faint);
  transition: color .13s, transform .13s;
}
.wCase:hover .wCaseGo {
  color: var(--accent);
  transform: translateX(2px);
}

/* ---- Citation, in the guide under the paper's examples ---- */

.wCite {
  margin-top: 20px;
  padding: 13px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.wCiteLabel {
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 680;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.wCiteRef {
  color: var(--text);
  font-size: 0.76rem;
  line-height: 1.5;
}
.wCiteVenue {
  color: var(--text-dim);
}

.wCiteBib {
  margin: 10px 0 0;
  padding: 9px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.66rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  -webkit-user-select: all;
  user-select: all;
}

.wCiteActions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.wCiteBtn {
  display: inline-flex;
  align-items: center;
  height: 27px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
.wCiteBtn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.wCiteBtn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
