/* The site's navbar, the same on every page (index.html, voting.html): a purple bar holding the logo and the nav. Its
   markup is in each page (scripts/build-html.mjs checks they match), its fitting in map/src/nav.ts: the gaps close up as the
   window narrows, and when the chips would touch the page gets .burger and the nav is a menu behind a hamburger (.nav-open). It
   sticks to the top of the page (the home page fixes it: its landing page scrolls inside a layer of its own). */
:root { --purple: #2a1a3e; --vermilion: #d64b1f; --blue: #2c5faa; --gold: #d9a441; --paper: #e3ddd0; --ground: #f3efe6; --px: clamp(20px, 4vw, 48px); }
#site-head a { text-decoration: none; }
#site-head a:not(.chip) { color: inherit; } /* a chip link keeps its chip colour */
#site-head button { border: 0; cursor: pointer; }
.chip[aria-current="page"] { box-shadow: inset 0 -5px 0 var(--purple); } /* the page you are on */
#site-head { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 40px; align-items: center; padding: 0 var(--px); background: var(--purple); color: var(--paper); }
#logo { grid-area: 1 / 1; display: flex; align-items: baseline; gap: .22em; padding: 10px 4px 6px; white-space: nowrap; font: italic 400 clamp(40px, 4.4vw, 46px)/1 "Instrument Serif", Georgia, serif; }
#logo b { color: #f0813f; font: 400 .89em/1 Anton, Impact, sans-serif; }
#logo-strip { grid-area: 2 / 1; margin: 0 0 10px; padding: 5px 10px 4px; background: var(--vermilion); text-align: center; white-space: nowrap; font: 500 10px/1 "Space Grotesk", system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase; }
#site-nav { grid-area: 1 / 2 / 3 / 3; display: flex; align-items: center; justify-content: flex-end; gap: 12px; /* main.ts narrows the gap */ }
#site-nav > * { flex: none; }
.chip { display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box; padding: 6px 15px 0; font: 400 24px/1 Anton, Impact, sans-serif; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.chip.c1 { background: var(--blue); color: var(--paper); }
.chip.c2 { background: var(--gold); color: var(--purple); }
.chip.c3 { background: var(--paper); color: var(--purple); }
.chip.c4 { background: var(--vermilion); color: var(--paper); box-shadow: 4px 4px 0 var(--gold); }
.chip:hover, .soc a:hover { opacity: .85; }
/* Not available yet: a red cross over it (a paper edge under the red, so it reads on the vermilion chip too), no clicks. */
.na { position: relative; cursor: not-allowed; }
.na:hover { opacity: 1; }
.na::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top right, transparent calc(50% - 3px), var(--paper) calc(50% - 3px), var(--paper) calc(50% - 1.5px), #e01b1b calc(50% - 1.5px), #e01b1b calc(50% + 1.5px), var(--paper) calc(50% + 1.5px), var(--paper) calc(50% + 3px), transparent calc(50% + 3px)),
              linear-gradient(to bottom right, transparent calc(50% - 3px), var(--paper) calc(50% - 3px), var(--paper) calc(50% - 1.5px), #e01b1b calc(50% - 1.5px), #e01b1b calc(50% + 1.5px), var(--paper) calc(50% + 1.5px), var(--paper) calc(50% + 3px), transparent calc(50% + 3px)); }
.soc { display: flex; gap: 2px; }
.soc a { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--gold); }
#burger { display: none; grid-area: 1 / 2; justify-self: end; align-items: center; justify-content: center; width: 48px; height: 48px; background: none; color: var(--gold); }
#burger svg:last-child, .nav-open #burger svg:first-child { display: none; }
.nav-open #burger svg:last-child { display: block; }
.burger #site-nav { display: none; }
.burger #burger { display: flex; }
.burger #logo-strip { grid-column: 1 / -1; margin: 0 calc(-1 * var(--px)); padding: 7px var(--px) 6px; text-align: left; }
/* The menu the hamburger opens: the same nav, as a sheet under the bar. */
.burger.nav-open #site-nav { display: flex; grid-area: auto; /* else its grid cell, not the bar, would be what it hangs from */ position: absolute; top: 100%; left: 0; right: 0; height: calc(100vh - 100%); height: calc(100dvh - 100%); box-sizing: border-box;
                             flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 14px; padding: 30px 20px 26px; overflow-y: auto; background: var(--ground); }
.burger.nav-open .chip { min-height: 62px; padding: 9px 18px 0; font-size: 42px; }
.burger.nav-open .chip.c3 { background: var(--purple); color: var(--paper); }
.burger.nav-open .chip.c4 { box-shadow: 6px 6px 0 var(--purple); }
.burger.nav-open .soc { margin-top: auto; gap: 8px; }
.burger.nav-open .soc a { width: 48px; height: 48px; background: var(--purple); color: var(--paper); }
