.atlas-title-row, .atlas-title-actions, .atlas-votes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.atlas-title-row { gap: .2rem .8rem; }
.atlas-title-actions, .atlas-votes { gap: .25rem .4rem; }
.atlas-title-actions {
  max-width: 100%;
  /* Center the controls against the visible title glyphs, below the line box center. */
  position: relative;
  inset-block-start: clamp(1px, .3vw, 4px);
}
.atlas-title-actions > .atlas-code-jump, .atlas-votes button, .atlas-rank-dialog button {
  min-height: 2rem;
  padding: .2rem .6rem;
  border: 1px solid var(--ch-line, #4a594a);
  border-radius: .35rem;
  background: var(--ch-surface, #111815);
  color: var(--ch-text, #dce8d3);
  font: 500 .85rem/1.3 system-ui, sans-serif;
  cursor: pointer;
}
.atlas-title-actions > .atlas-code-jump:hover, .atlas-votes button:hover, .atlas-rank-dialog button:hover { border-color: var(--ch-accent, #afc68d); }
.atlas-votes .atlas-vote-button { display: inline-flex; gap: .35rem; align-items: center; font-variant-numeric: tabular-nums; }
@media (max-width: 360px) {
  .atlas-title-actions, .atlas-votes { column-gap: .25rem; }
  .atlas-title-actions > .atlas-code-jump, .atlas-votes button { padding-inline: .2rem; }
}
.atlas-vote-button svg { fill: none; stroke: var(--ch-danger, #e4abb0); stroke-width: 1.6; }
.atlas-vote-button[aria-pressed="true"] svg { fill: var(--ch-danger, #f5909b); stroke: var(--ch-danger, #f5909b); }
.atlas-votes button:disabled { cursor: default; }
.atlas-votes [data-status], .atlas-rank-message { color: var(--ch-muted, #e6d1a8); font-size: .85rem; }
.atlas-vote-reader { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.atlas-votes [hidden], .atlas-rank-dialog [hidden] { display: none !important; }
.atlas-rank-dialog {
  width: min(36rem, calc(100% - 1.5rem));
  max-height: 84vh;
  max-height: 84dvh;
  padding: 1rem clamp(.75rem, 2vw, 1.25rem);
  border: 1px solid var(--ch-line, #52614f);
  border-radius: .5rem;
  background: var(--ch-surface, #111915);
  color: var(--ch-text, #e1ebda);
}
.atlas-rank-dialog[open] { display: flex; flex-direction: column; }
.atlas-rank-dialog::backdrop { background: #050907c7; }
.atlas-rank-heading, .atlas-rank-filters { display: flex; align-items: center; gap: .5rem .9rem; }
.atlas-rank-heading { justify-content: space-between; }
.atlas-rank-heading h2 { margin: 0; font-size: 1.25rem; line-height: 1.25; }
.atlas-rank-heading button { min-width: 2rem; font-size: 1.2rem; }
.atlas-rank-filters { margin-top: .65rem; flex-wrap: wrap; }
.atlas-rank-filters input[type="search"] { min-width: 0; flex: 1 1 11rem; padding: .32rem .5rem; border: 1px solid var(--ch-line, #53644d); border-radius: .25rem; color: inherit; background: var(--ch-paper, #09110d); font: inherit; font-size: .9rem; }
.atlas-rank-filters label { font-size: .85rem; }
.atlas-rank-filters input[type="checkbox"] { accent-color: var(--ch-accent, #c3ed83); }
.atlas-rank-message { margin-top: .4rem; }
.atlas-rank-list { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.atlas-rank-list table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.atlas-rank-list th, .atlas-rank-list td { padding: .32rem .4rem; text-align: left; }
.atlas-rank-list th { position: sticky; top: 0; background: var(--ch-soft, #18251c); font-weight: 600; }
.atlas-rank-list td { border-bottom: 1px solid var(--ch-line, #2d3b32); }
.atlas-rank-list :is(th, td):first-child { color: var(--ch-muted, #bac9ba); width: 3.5em; }
.atlas-rank-list :is(th, td):last-child { text-align: right; font-variant-numeric: tabular-nums; }
.atlas-rank-list a { color: inherit; text-decoration-color: var(--ch-accent, #596b54); text-underline-offset: 3px; overflow-wrap: anywhere; }
.atlas-rank-list a:hover, .atlas-rank-list a[aria-current="page"] { color: var(--ch-accent, #daffa1); }
.atlas-rank-heart { margin-inline-start: .35em; color: var(--ch-danger, #f5909b); }
