/* ==========================================================================
   Epilepsy rotation guide
   A 73 KB survival guide read on shift. Everything in it was equally weighted
   and a <select> was the only way to move: you cannot scan a dropdown. These
   styles add a sticky section bar, in-page search, and a checklist that
   remembers where you got to.
   ========================================================================== */

.rg-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fbfcfe;
  border-bottom: 1px solid #e3e8ee;
  padding: 0.6rem 0 0.55rem;
  margin: 0 0 1.1rem;
}

.rg-search-wrap { position: relative; display: flex; align-items: center; margin-bottom: 0.5rem; }

.rg-search-wrap i {
  position: absolute; left: 0.7rem;
  font-size: 0.78rem; color: #8a95a1; pointer-events: none;
}

.rg-search {
  width: 100%;
  border: 1px solid #d7dee6;
  border-radius: 999px;
  padding: 0.4rem 0.85rem 0.4rem 2rem;
  font-size: 0.83rem;
  background: #fff;
  color: #26313c;
}

.rg-search:focus { outline: 2px solid #0b6ab8; outline-offset: 1px; }

/* Chips scroll sideways rather than wrapping to four rows and pushing the
   content off screen - the bar is sticky, so its height is a running cost. */
.rg-chips {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  scrollbar-width: thin;
}

.rg-chip {
  flex: 0 0 auto;
  border: 1px solid #d7dee6;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: #45515e;
  background: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.rg-chip:hover { background: #eef4fa; border-color: #0b6ab8; color: #0b6ab8; }
.rg-chip.is-current { background: #0b6ab8; border-color: #0b6ab8; color: #fff; }
.rg-chip[hidden] { display: none; }

.rg-count { margin: 0.4rem 0 0; font-size: 0.74rem; color: #5a6570; }

body.dark .rg-bar { background: #1c1c1e; border-bottom-color: #3a3a3c; }
body.dark .rg-search { background: #2c2c2e; border-color: #48484a; color: #f5f5f7; }
body.dark .rg-search-wrap i { color: #aeaeb2; }
body.dark .rg-chip { background: #2c2c2e; border-color: #48484a; color: #e5e5ea; }
body.dark .rg-chip:hover { background: #3a3a3c; color: #6cb6f0; border-color: #58a9ec; }
body.dark .rg-chip.is-current { background: #1a6bb5; border-color: #1a6bb5; color: #fff; }
body.dark .rg-count { color: #aeaeb2; }

/* ------------------------------------------------------------ checklist */

.rg-progress { margin: 0 0 0.75rem; }

.rg-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: #e6ebf1;
  overflow: hidden;
}

.rg-progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: #1f6f4a;
  transition: width 0.25s ease;
}

.rg-progress-text {
  margin: 0.35rem 0 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: #35704a;
}

ul.checklist { list-style: none; padding-left: 0; }

.rg-check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.4rem 0;
  line-height: 1.5;
}

.rg-check {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.1rem;
  border: 1.5px solid #b9c4d0;
  border-radius: 5px;
  background: #fff;
  color: transparent;
  font-size: 0.66rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.rg-check:hover { border-color: #1f6f4a; }
.rg-check:focus-visible { outline: 2px solid #0b6ab8; outline-offset: 2px; }

.rg-check-item.is-done .rg-check {
  background: #1f6f4a;
  border-color: #1f6f4a;
  color: #fff;
}

.rg-check-item.is-done { color: #7a848e; }
.rg-check-item.is-done > *:not(.rg-check) { text-decoration: line-through; }

body.dark .rg-progress-bar { background: #3a3a3c; }
body.dark .rg-progress-bar span { background: #5aa872; }
body.dark .rg-progress-text { color: #8ecfa2; }
body.dark .rg-check { background: #2c2c2e; border-color: #55606b; }
body.dark .rg-check-item.is-done .rg-check { background: #5aa872; border-color: #5aa872; color: #10231a; }
body.dark .rg-check-item.is-done { color: #98a2ac; }

@media (max-width: 560px) {
  .rg-chip { font-size: 0.72rem; padding: 0.26rem 0.6rem; }
}
