/* Shared site chrome for every page: the header navigation on small screens and the full footer.
   Loaded after site.css, which holds the tokens (--ai, --paper, --sumi, --quiet, --line), the font and the header base. */

.top__links a[aria-current] { color: var(--ai); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* On small screens the section links move to a second row instead of disappearing. */
@media (max-width: 860px) {
  .top__in { flex-wrap: wrap; row-gap: 0; padding-top: 8px; }
  .top .top__links { display: flex; order: 3; width: 100%; margin: 0; gap: 4px 20px; flex-wrap: wrap; }
  .top__links a { font-size: 15px; padding: 10px 0; }
}

.site-foot { margin-top: clamp(56px, 8vw, 96px); border-top: 1px solid var(--line); background: var(--paper); color: var(--quiet); font-size: 15px; }
.site-foot__in { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 32px; padding-block: 48px 32px; }
.site-foot__brand p { margin-top: 14px; max-width: 18em; }
.site-foot__col h2 { font-size: 15px; font-weight: 650; color: var(--sumi); margin-bottom: 8px; }
.site-foot__col ul { list-style: none; margin: 0; padding: 0; }
.site-foot__col a { display: inline-block; padding-block: 7px; color: var(--quiet); text-decoration: none; }
.site-foot__col a:focus-visible { outline: 3px solid var(--ai); outline-offset: 3px; border-radius: 6px; }
.site-foot__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 20px 28px; border-top: 1px solid var(--line); }
@media (hover: hover) and (pointer: fine) { .site-foot__col a:hover { color: var(--ai); text-decoration: underline; } }
@media (max-width: 860px) {
  .site-foot__in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-foot__brand { grid-column: 1 / -1; }
}

/* A page that ends in a full-bleed band (the home page's closing section) runs straight into the footer. */
.close + .site-foot, main:has(> .close:last-child) + .site-foot { margin-top: 0; border-top: 0; }
/* The closing scene is cream like the footer, so the footer keeps its rule to separate them. */
main:has(> .close--scene:last-child) + .site-foot { border-top: 1px solid var(--line); }
