/* Book and chapter grids. */
.nav__search { position: sticky; top: -4px; z-index: 1; padding: 4px 0 8px; background: var(--bg); }

.nav__input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  font-size: 16px;
  outline: none;
}
.nav__input:focus { border-color: var(--accent); }
.nav__preview { min-height: 18px; padding: 4px 2px 0; font-size: 13px; color: var(--accent); }

.nav__group {
  margin: 14px 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.nav__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 6px;
}
.nav__grid--chapters { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); margin-top: 8px; }

.nav__tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 52px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-raised);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.nav__tile:active { background: var(--surface-2); }
.nav__tile.is-current { box-shadow: inset 0 0 0 1.5px var(--accent); }

/* recency bar along the foot of each tile */
.nav__tile::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--heat-c, transparent);
}
.nav__tile[data-heat="1"] { --heat-c: var(--heat-1); }
.nav__tile[data-heat="2"] { --heat-c: var(--heat-2); }
.nav__tile[data-heat="3"] { --heat-c: var(--heat-3); }
.nav__tile[data-heat="4"] { --heat-c: var(--heat-4); }

.nav__abbr { font-weight: 600; }
.nav__name { max-width: 100%; padding: 0 4px; overflow: hidden; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; color: var(--text-faint); }

.nav__backlink { padding: 8px 0; color: var(--accent); font-size: 14px; }
