html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* .form-control's own focus ring is owned by theme.css (accent-tinted) —
excluded here so this rule doesn't win the cascade tie and override it. */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--eq-accent, #258cfb);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ============================================================
   SIDEBAR — icon rail (rail 1) + subsection panel (rail 2).
   Plain global rules, not Razor CSS isolation: these links use
   asp-page (the Anchor Tag Helper rewrites the element at compile
   time), and tag-helper-generated elements don't reliably receive
   the isolation scope attribute — a *.cshtml.css rule targeting
   them silently never applies. Keeping this here avoids that trap.
   ============================================================ */

.sidebar-rail {
  padding: 0.5rem;
  display: flex;
  align-items: center;
}

.sidebar-rail .nav {
  align-items: center;
}

.sidebar-rail .nav-link {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  margin: 0.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  border-radius: var(--bs-border-radius, 0.375rem);
}

@media (min-width: 768px) {
  .sidebar-rail {
    flex: 0 0 4rem;
    max-width: 4rem;
    flex-direction: column;
  }
}

.sidebar-panel {
  padding: 1rem;
}

.sidebar-panel .nav-link {
  padding: 0.4rem 0.75rem;
  /* Without an explicit size, subsection links fall back to the 1rem
  Bootstrap default — larger than the 0.72rem uppercase group label
  above them, which reads backwards (the heading looks smaller than
  what it's heading). Keep it below the group label's visual weight
  (still uppercase/bold) but above its size. */
  font-size: 0.85rem;
}

.sidebar-panel-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--eq-text-faint, var(--bs-secondary-color));
  margin-bottom: 1.5rem;
  text-decoration: none;
}

a.sidebar-panel-title:hover,
a.sidebar-panel-title:focus {
  color: var(--eq-ink, var(--bs-body-color));
}

a.sidebar-panel-title.active {
  color: var(--eq-accent, var(--bs-primary));
}

.sidebar-panel-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.75rem 0 0.25rem;
}

.sidebar-panel-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--eq-text-faint, var(--bs-secondary-color));
  text-decoration: none;
}

a.sidebar-panel-group-label:hover,
a.sidebar-panel-group-label:focus {
  color: var(--eq-ink, var(--bs-body-color));
}

a.sidebar-panel-group-label.active {
  color: var(--eq-accent, var(--bs-primary));
}

.sidebar-panel-group-chevron-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 0;
  background: none;
  padding: 0;
  color: var(--eq-text-faint, var(--bs-secondary-color));
}

.sidebar-panel-group-chevron-btn:hover {
  color: var(--eq-ink, var(--bs-body-color));
}

.sidebar-panel-group-chevron {
  font-size: 0.7rem;
  transition: transform 0.15s ease;
}

.sidebar-panel-group-chevron-btn.collapsed .sidebar-panel-group-chevron {
  transform: rotate(-90deg);
}

@media (min-width: 768px) {
  .sidebar-panel {
    flex: 0 0 220px;
    max-width: 220px;
  }

  /* Deliberately not sticky/independently-scrolling — it should scroll
  away with the rest of the page, the same as rail 1, rather than
  pinning itself while everything else moves. */
  .sidebar-panel-scroll {
    position: static;
  }
}

/* ============================================================
   METADATA LINE
   For secondary info (e.g. collection source/timestamp) that
   should read as present but not compete for attention — smaller
   than Bootstrap's own ".small" utility, which is as far as
   Bootstrap alone goes.
   ============================================================ */

.text-meta {
  font-size: 0.75rem;
  color: var(--eq-text-faint, var(--bs-secondary-color));
}