/* TOC only. Canonical M Sefira 1.101 (Regular), copied without modification.
   Load after mobile-policy-20261013.css and catalogue-toc-20261012.css. */
@font-face {
  font-family: "M Sefira";
  src: url("assets/fonts/m-sefira-1.101/M-Sefira-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

#book .catalogue-toc {
  --toc-number-size: 1.6cqw;
  --toc-panel-height: 31cqw;
}

/* One quiet baseline for the chapter name and its page range. */
#book .catalogue-toc-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.4cqw;
  width: 100%;
  min-width: 0;
}

#book .catalogue-toc-group summary {
  min-height: 6.6cqw;
  padding-block: 1cqw;
}

#book .catalogue-toc .catalogue-toc-range,
#book .catalogue-toc .catalogue-toc-pages {
  display: inline-block;
  flex: none;
  color: #4E5340;
  font: 400 var(--toc-number-size)/1.4 "M Sefira", sans-serif;
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
  letter-spacing: .025em;
  white-space: nowrap;
  direction: ltr;
  unicode-bidi: isolate;
}

#book .catalogue-toc .catalogue-toc-range-separator {
  padding-inline: .1em;
}

/* The two closing sections share a chapter, while keeping their own links. */
#book .catalogue-toc-group[data-toc-group="information"] .catalogue-toc-link {
  margin: 0;
  min-height: 4.6cqw;
  font-size: 1.8cqw;
  border: 0;
}

@media (max-width: 600px) {
  #book .catalogue-toc {
    --toc-number-size: 10px;
    --toc-panel-height: max(48px, calc(77cqw - 205px));
  }
  #book .catalogue-toc-heading { gap: 7px; }
  #book .catalogue-toc-group summary {
    min-height: 36px;
    padding-block: 4px;
  }
  #book .catalogue-toc-group[data-toc-group="information"] .catalogue-toc-link {
    min-height: 29px;
    font-size: clamp(11px, 1.8cqw, 13px);
  }
}

@media (max-width: 360px) {
  #book .catalogue-toc { --toc-panel-height: 48px; }
  #book .catalogue-toc-heading { gap: 4px; }
  #book .catalogue-toc .catalogue-toc-note { display: none; }
}
