/* =============================================================
   nav.css: the header, its dropdowns, the section bar, the phone menu and the
   three-card strip at the foot of a page. Identical in all three site folders;
   build.sh fails if the copies drift. Tokens only, no new colours.
   ============================================================= */
/* The header's geometry lives here and nowhere else, so the menu sits in the same place on every page. The
   `header.nav` prefix outranks a page's own `.wrap`, `.nav__row` or `.nav__links` rule whichever loads last:
   the home page's inline style used to load after this file and spread the links 26px apart. */
header.nav { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--fc-grid-line);
  background: rgba(249,245,242,0.9); backdrop-filter: blur(6px); }
header.nav .nav__row { display: flex; align-items: center; justify-content: space-between; height: 64px;
  max-width: 78rem; margin: 0 auto; padding: 0 clamp(1.25rem, 2vw, 2.25rem); }
header.nav .nav__links { gap: 0; }
.nav__links { display: flex; gap: 0; align-items: stretch; height: 64px; }
.nav__item { position: relative; display: flex; align-items: center; }
.nav__top { display: flex; align-items: center; gap: .3rem; height: 100%; padding: 0 .8rem;
  font-family: var(--fc-font-body); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--fc-neutral-600); border: 0; text-decoration: none; }
.nav__top:hover, .nav__item:focus-within > .nav__top { color: var(--fc-ink); }
.nav__links .nav__top.is-active { color: var(--fc-ink); box-shadow: inset 0 -3px 0 var(--fc-red); padding-bottom: 0; }
.nav__caret { font-size: 1.1em; line-height: 1; color: var(--fc-neutral-500); letter-spacing: 0; }
.nav__drop { display: none; position: absolute; top: 100%; left: 0; min-width: 14rem; z-index: 60;
  background: #fff; border: 1px solid var(--fc-neutral-200); border-radius: 4px; box-shadow: var(--fc-shadow-md); padding: .35rem 0; }
.nav__item:hover > .nav__drop, .nav__item:focus-within > .nav__drop { display: block; }
.nav__links .nav__drop a { display: block; padding: .55rem 1rem; font-family: var(--fc-font-body); font-size: .9rem;
  text-transform: none; letter-spacing: 0; box-shadow: none; color: var(--fc-ink); text-decoration: none; border: 0; white-space: nowrap; }
.nav__links .nav__drop a:hover, .nav__links .nav__drop a:focus-visible { background: var(--fc-paper); color: var(--fc-ink); }
.nav__links .nav__drop a.is-active { font-weight: 700; box-shadow: inset 3px 0 0 var(--fc-red); }

/* The section bar: where you are, and the pages of this section. It reads as the second row of the
   menu: on the paper, a hairline under it, the section's name as a tracked label, its pages as text
   tabs, and the page you are on marked the way the menu marks it, in ink with a red rule. */
.secbar { background: transparent; border-bottom: 1px solid var(--fc-grid-line); }
.secbar__row { display: flex; align-items: stretch; flex-wrap: wrap; gap: 0 1.4rem; min-height: 48px;
  max-width: 78rem; margin: 0 auto; padding: 0 clamp(1.25rem, 2vw, 2.25rem); }
.secbar__name { display: flex; align-items: center; font-family: var(--fc-font-body); font-weight: 600; font-size: .74rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--fc-ink); padding-right: 1.4rem; border-right: 1px solid var(--fc-grid-line); }
.secbar__tabs { display: flex; flex-wrap: wrap; gap: 0 1.3rem; }
.secbar__tabs a { display: flex; align-items: center; font-family: var(--fc-font-body); font-size: .88rem; font-weight: 400;
  padding: 0; border: 0; color: var(--fc-neutral-600); background: none; text-decoration: none; }
.secbar__tabs a:hover { color: var(--fc-ink); }
.secbar__tabs a.is-active, .secbar__tabs a.is-active:hover { color: var(--fc-ink); font-weight: 500; box-shadow: inset 0 -2px 0 var(--fc-red); }
.secbar__crumb { display: flex; align-items: center; font-family: var(--mono, monospace); font-size: .8rem; color: var(--fc-neutral-600); }
.secbar__row .masthead__city-wrap { margin-left: auto; align-self: center; flex: 0 1 17rem; min-width: 0; }

/* Phones: one Menu button, the same structure as a list */
.nav__mobile { display: none; }
.nav__mobile > summary { list-style: none; cursor: pointer; font-family: var(--fc-font-body); font-size: .78rem;
  letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--fc-ink); border-radius: 100px; padding: .4rem .95rem; }
.nav__mobile > summary::-webkit-details-marker { display: none; }
.nav__mobile-list { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 16rem; z-index: 60;
  background: #fff; border: 1px solid var(--fc-neutral-200); border-radius: 4px; box-shadow: var(--fc-shadow-md); padding: .5rem 0;
  max-width: calc(100vw - 2rem); max-height: calc(100vh - 6rem); overflow-y: auto; }
.nav__mobile-list a { display: block; padding: .45rem 1rem; font-family: var(--fc-font-body); color: var(--fc-ink); text-decoration: none; border: 0; }
.nav__mobile-list .nav__m-top { font-weight: 700; }
.nav__mobile-list .nav__m-sub { padding-left: 2rem; font-size: .9rem; }
@media (max-width: 820px) {
  .nav__links { display: none; }
  .nav__mobile { display: block; position: relative; }
  /* one line that scrolls sideways, fading at the edge so it reads as more */
  .secbar__row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 0 1rem;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .secbar__row::-webkit-scrollbar { display: none; }
  .secbar__name { padding-right: 1rem; flex: none; }
  .secbar__tabs { flex-wrap: nowrap; gap: 0 1rem; }
  .secbar__tabs a { font-size: .84rem; white-space: nowrap; }
  .secbar__row .masthead__city-wrap { margin-left: 0; flex: none; }
}

/* The three ways on from a page: look closer, understand, take part */
.next3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  max-width: var(--col-max, 78rem); margin: 3.5rem auto 2rem; padding: 0 var(--gutter, 28px); }
.next3__card { display: block; border: 1px solid var(--fc-ink); padding: 1.1rem 1.2rem; background: var(--fc-paper);
  color: var(--fc-ink); text-decoration: none; transition: box-shadow .15s ease; }
.next3__card:hover, .next3__card:focus-visible { box-shadow: 4px 4px 0 var(--fc-ink); color: var(--fc-ink); }
.next3__t { display: block; font-family: var(--fc-font-display); font-weight: 700; font-size: 1.1rem; }
.next3__t::after { content: " \2192"; color: var(--fc-red); }
.next3__s { display: block; margin-top: .3rem; font-family: var(--fc-font-body); font-size: .85rem; color: var(--fc-neutral-600); }
.next3--inset { padding: 0; margin: 2rem 0 2.5rem; }
@media (max-width: 820px) { .next3 { grid-template-columns: 1fr; } }

/* The atlas explainers link to each other in the page, not in a third menu row */
.explnav { max-width: var(--col-max, 78rem); margin: 3rem auto 1rem; padding: 1rem var(--gutter, 28px) 0;
  border-top: 1px solid var(--fc-ink); font-family: var(--fc-font-body); font-size: .9rem; }
.explnav { display: flex; flex-wrap: wrap; align-items: baseline; row-gap: .35rem; }   /* the links sit with no space between them, so as inline text they never wrap */
.explnav__h { font-weight: 700; margin-right: .6rem; }
.explnav a { margin-right: .9rem; color: var(--fc-ink); }
.explnav a.is-active { font-weight: 700; color: var(--fc-red); text-decoration: none; }
