/* Compact study doors. Same Night blue as the reader. Safe on pages that do not load reader.css. */
.mm-doors, .mm-doors * { box-sizing: border-box; }
.mm-doors {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  max-width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px; line-height: 1.2;
}
.mm-doors a, .mm-doors button.mm-door {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 12px; border-radius: 7px;
  border: 1px solid var(--line, #253246); background: var(--panel, #18212d);
  color: var(--ink, #e9eef5); text-decoration: none; cursor: pointer;
  flex: 1 1 6.6rem; max-width: 100%;
  font: inherit; font-size: 15px;
}
.mm-doors a.mm-brand {
  flex: 1 1 auto; justify-content: flex-start;
  background: transparent; border-color: transparent;
  color: var(--accent2, #a9c8f5);
  font-family: Cinzel, Georgia, serif; letter-spacing: .04em; font-size: 1.05rem;
}
.mm-doors a[aria-current="page"], .mm-doors a:hover, .mm-doors a:focus-visible,
.mm-doors button.mm-door:hover, .mm-doors button.mm-door:focus-visible {
  border-color: var(--accent, #6aa9ff); color: var(--accent, #6aa9ff); outline: none;
}
header .mm-doors { background: transparent; padding: 0 0 8px; }
.mm-doors-bar {
  position: sticky; top: 0; z-index: 40;
  background: #0f141b; border-bottom: 1px solid #253246; padding: 8px 10px;
}

/* One row on a phone: brand, then the doors. Ask is the fourth. */
@media (max-width: 520px) {
  .mm-doors { flex-wrap: nowrap; gap: 3px; }
  .mm-doors a, .mm-doors button.mm-door {
    flex: 1 1 0; min-width: 0; padding: 0 3px; font-size: 12px; white-space: nowrap; letter-spacing: 0;
  }
  .mm-doors a.mm-brand { flex: 0 0 auto; padding: 0 3px 0 0; font-size: .68rem; letter-spacing: 0; }
}
@media (max-width: 420px) {
  /* A row that already holds extra links hides the brand so the doors stay one row. */
  .mm-doors:has(a:nth-child(6)) { gap: 2px; }
  .mm-doors:has(a:nth-child(6)) a.mm-brand { display: none; }
  .mm-doors:has(a:nth-child(6)) a,
  .mm-doors:has(a:nth-child(6)) button.mm-door { font-size: 11px; padding: 0 2px; }
}
@media (max-width: 350px) {
  .mm-doors a.mm-brand { display: none; }
}
