/* Site-wide plain-CSS overrides, loaded on every page after main.css
   (linked from _includes/head/custom.html).
   Colours are the theme's own, from _sass/_variables.scss:
   darker-gray #313436 (page background), dark-gray #494e52, light-gray #bdc1c4 (text). */

/* Sidebar icons: the map-marker and GitHub icons were near-black on the dark
   background. Give them the same colour as the other sidebar icons and text. */
.author__urls.social-icons .fa,
.author__urls.social-icons .fab,
.author__urls.social-icons .fas {
  color: inherit;
}

/* Small screens: the "Follow" menu opened as a white popup with light-gray text
   (contrast 1.8:1). Use the theme's dark-gray instead (contrast 4.6:1).
   Desktop widths, where the list sits in the sidebar, are unaffected. */
@media not all and (min-width: 57.8125em) {
  .author__urls {
    background: #494e52;
  }
  .author__urls:after {
    border-color: #494e52 transparent;   /* the popup's arrow */
  }
}

/* Collapsible box: <details class="fold-box"><summary>Label</summary><ul>...</ul></details>
   A compact sibling of the research page's .drop boxes (same border, radius and caret).
   Used for "Earlier news" (home) and "Previously read" (blog). */
details.fold-box {
  margin: .75rem 0 1rem;
  border: 1px solid rgba(148,163,184,.30);
  border-radius: .5rem;
  background: transparent;
  font-size: .9rem;
}

details.fold-box > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .5rem .85rem;
  border-radius: calc(.5rem - 1px);
  cursor: pointer;
  list-style: none;                       /* hide the default marker (Firefox) */
  font-weight: 600;
  line-height: 1.4;
  color: inherit;                         /* theme text colour */
}

details.fold-box > summary::-webkit-details-marker {
  display: none;                          /* hide the default marker (Chrome, Safari) */
}

details.fold-box > summary::after {      /* caret on the right, as on .drop */
  content: "\25B8";
  font-size: 1rem;                        /* same caret size as .drop */
  opacity: .8;
  transition: transform .2s ease;
}

details.fold-box[open] > summary::after {
  transform: rotate(90deg);
}

details.fold-box > summary:hover {
  background: rgba(148,163,184,.08);
}

details.fold-box > summary:focus-visible {
  outline: 2px solid #52adc8;             /* theme link colour */
  outline-offset: 2px;
}

details.fold-box[open] > summary {
  border-bottom: 1px solid rgba(148,163,184,.25);
  border-radius: calc(.5rem - 1px) calc(.5rem - 1px) 0 0;
}

details.fold-box > ul {
  margin: 0;
  padding: .65rem .9rem .75rem 2rem;
}

details.fold-box > ul > li:last-child {
  margin-bottom: 0;
}
