/* Web-only styles for this guide's pages: site navigation, and media
   queries for screens. They're not in guide.css because the PDF uses
   guide.css, and its maker (WeasyPrint) warns about media queries.
   gen-html links this after guide.css, so these rules can override it.

   SPDX-FileCopyrightText: OpenSSF project contributors
   SPDX-License-Identifier: MIT */

div.sitenav {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  margin: 1em 0;
  padding: 0.5em 0;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
}
/* Top bar (masthead). The logo's dark text needs a light
   background in dark mode. On narrow screens, drop the guide's
   name so the bar stays one line. */
.masthead {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #ccc;
}
.masthead .brand { flex: none; line-height: 0; }
.masthead .brand img { display: block; height: 1.75rem; width: auto; border-radius: 4px; }
@media (prefers-color-scheme: dark) {
  .masthead .brand img { background: #fff; padding: 2px 4px; }
}
.masthead .guide-name {
  flex: 1;
  min-width: 0;
  text-wrap: balance;  /* If it needs two lines, make them even. */
  color: var(--text);
  text-decoration: none;
}
.masthead .quicknav { display: flex; gap: 1rem; margin-left: auto; white-space: nowrap; }
@media (max-width: 600px) {
  .masthead .guide-name { display: none; }
}
body > footer p { margin: 0.5rem 0; }
span.navlink { flex: 1; }
span.nav-prev { text-align: left; }
span.nav-up, span.nav-top { text-align: center; }
span.nav-next { text-align: right; }
span.navlink-label { display: inline-block; }
@media (max-width: 720px) {
  .overview > ul { grid-template-columns: 1fr; }
  .overview > ul > li:not(:last-child)::after {
    content: "↓";
    content: "↓" / "";
    right: auto;
    left: 50%;
    top: auto;
    bottom: -2rem;
    transform: translateX(-50%);
  }
}
/* Don't print the site navigation. This is here, not in guide.css,
   so it comes after (and overrides) the rules above. */
@media print {
  .masthead, .sitenav-container, body > footer { display: none; }
}
