/* Talks of Record network mark, modest contrast/spacing, overscroll, clickable section rows.
   Loaded last. Does not change accents, fonts, illustrations, layouts or 14–15px labels. */

/* Dark page background on html so iOS Safari overscroll / status-bar gap is not cream. */
html { background-color: var(--bg, #0c0d10); color-scheme: dark; }
body { background-color: var(--bg, #0c0d10); }
html[data-reading="paper"] { color-scheme: light; }

/* Requests of Record network link: 22px (30px from 720px), weight 600, near-white, no underline. */
html body .mast .mast-in a.nb-hub,
html body header.mast .mast-in a.nb-hub {
  font-size: 22px !important;
  font-weight: 600 !important;
  font-stretch: 100% !important;
  letter-spacing: -0.03em !important;
  color: var(--fg) !important;
  text-decoration: none !important;
  padding: 0 !important;
  line-height: 1.15 !important;
}
html body .mast .mast-in a.nb-hub:hover,
html body .mast .mast-in a.nb-hub:focus-visible,
html body header.mast .mast-in a.nb-hub:hover,
html body header.mast .mast-in a.nb-hub:focus-visible {
  color: color-mix(in srgb, var(--fg) 55%, #fff) !important;
  text-decoration: none !important;
}
html[data-reading="paper"] body .mast .mast-in a.nb-hub:hover,
html[data-reading="paper"] body .mast .mast-in a.nb-hub:focus-visible,
html[data-reading="paper"] body header.mast .mast-in a.nb-hub:hover,
html[data-reading="paper"] body header.mast .mast-in a.nb-hub:focus-visible {
  color: color-mix(in srgb, var(--fg) 75%, #000) !important;
}
@media (min-width: 720px) {
  html body .mast .mast-in a.nb-hub,
  html body header.mast .mast-in a.nb-hub { font-size: 30px !important; }
}

/* Marginal rhythm: a little more air between a stacked title and its body on section rows. */
ul.secs > li > a > b,
.secs > li > a > b { margin-bottom: 8px; }

/* Section-index rows (Tunnels, Institutions, any ul.secs): make the whole row an obvious hit target.
   Accent chevron at the right of the title. No change where a cue already exists (hub .open). */
ul.secs > li > a,
.secs > li > a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 12px;
  text-decoration: none;
  padding: 14px 8px 16px 0;
  border-radius: 2px;
  transition: background-color .15s ease;
}
ul.secs > li > a > b,
.secs > li > a > b {
  grid-column: 1;
  grid-row: 1;
}
ul.secs > li > a > span,
.secs > li > a > span {
  grid-column: 1 / -1;
  grid-row: 2;
}
ul.secs > li > a::after,
.secs > li > a::after {
  content: "";
  grid-column: 2;
  grid-row: 1;
  width: .46em;
  height: .46em;
  margin-top: .42em;
  border-right: 1.5px solid var(--accent, currentColor);
  border-top: 1.5px solid var(--accent, currentColor);
  transform: rotate(45deg);
  transition: transform .15s ease;
  justify-self: end;
}
ul.secs > li > a:hover,
ul.secs > li > a:active,
.secs > li > a:hover,
.secs > li > a:active {
  background-color: color-mix(in srgb, var(--fg) 5.5%, transparent);
}
ul.secs > li > a:hover::after,
ul.secs > li > a:active::after,
.secs > li > a:hover::after,
.secs > li > a:active::after {
  transform: rotate(45deg) translate(2px, -2px);
}
ul.secs > li > a:focus-visible,
.secs > li > a:focus-visible {
  outline: 2px solid var(--accent, var(--accent-hi, currentColor));
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  ul.secs > li > a,
  .secs > li > a,
  ul.secs > li > a::after,
  .secs > li > a::after { transition: none; }
}
