/* Self-hosted fonts (VIZ-108). SIL OFL 1.1, see /assets/fonts/LICENSE.txt */
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/dm-sans-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/dm-sans-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/ibm-plex-mono-400-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/ibm-plex-mono-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/ibm-plex-mono-500-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/ibm-plex-mono-500-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/assets/fonts/space-grotesk-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/assets/fonts/space-grotesk-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Shared header (mega-menu) and footer styles. Page styles stay inline in each page.
   Loaded after the inline <style>, so these rules win over the old .nav rules. */

.nav-links { align-items: center; gap: 1.4rem; }
.nav-links > a, .dd-btn { color: var(--muted); font: inherit; font-size: 0.95rem; }
.nav-links > a:hover, .dd-btn:hover, .dd-btn[aria-expanded="true"] { color: var(--ink); }
.dd { position: relative; }
.dd-btn { background: none; border: 0; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 0.4ch; }
.dd-btn::after { content: "▾"; font-size: 0.75em; color: var(--faint); }
.dd-panel { display: none; position: absolute; top: calc(100% + 0.9rem); left: -1rem; z-index: 60; min-width: 15rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1rem; box-shadow: 0 20px 50px -24px rgba(11,16,21,0.35); }
.dd-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -0.9rem; height: 0.9rem; } /* hover bridge */
.dd.open .dd-panel { display: block; }
html:not(.js) .dd:focus-within .dd-panel { display: block; }
@media (hover: hover) and (min-width: 1081px) { .dd:hover .dd-panel { display: block; } }
.dd-panel a { display: block; padding: 0.45rem 0.6rem; border-radius: 4px; color: var(--ink); font-size: 0.94rem; }
.dd-panel a:hover { background: var(--panel-2); }
.dd-panel a small { display: block; color: var(--muted); font-size: 0.82rem; }
.dd-panel h4 { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); font-weight: 500; margin: 0 0 0.4rem 0.6rem; }
.dd-mega { display: none; min-width: 34rem; }
.dd.open .dd-mega, html:not(.js) .dd:focus-within .dd-mega { display: grid; }
@media (hover: hover) and (min-width: 1081px) { .dd:hover .dd-mega { display: grid; } }
.dd-mega { grid-template-columns: 1fr 1fr; gap: 1rem; }
.dd-box { background: var(--panel-2); border-radius: 4px; padding: 0.8rem 0.6rem; }
.dd-box p { color: var(--muted); font-size: 0.86rem; margin: 0 0.6rem 0.4rem; }
.dd-box a { color: var(--blue); }

@media (max-width: 1080px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links { display: flex; flex-direction: column; align-items: stretch; gap: 0; position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 0.5rem clamp(1.1rem, 4vw, 2.5rem) 1rem; max-height: calc(100vh - 70px); overflow-y: auto; }
  .nav.open .nav-links > a, .nav.open .dd-btn { padding: 0.75rem 0; width: 100%; justify-content: space-between; }
  .nav.open .nav-links .mobile-only { display: block; }
  .dd-panel, .dd-mega { position: static; min-width: 0; box-shadow: none; border: 0; padding: 0 0 0.6rem; background: none; }
  .dd-panel::before { display: none; }
  .dd-mega { grid-template-columns: 1fr; gap: 0.4rem; }
  /* No JS: show every link as a plain list, no hamburger. */
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .nav { height: auto; flex-wrap: wrap; padding-block: 0.8rem; }
  html:not(.js) .nav-links { display: flex; flex-direction: column; align-items: flex-start; width: 100%; gap: 0.4rem; }
  html:not(.js) .nav-links .mobile-only { display: inline; }
  html:not(.js) .dd-panel, html:not(.js) .dd-mega { display: block; }
}
@media (min-width: 1081px) { .nav-links .mobile-only { display: none; } }

/* footer */
.footer-legal { display: inline-flex; gap: 1.2rem; }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } }

/* template pages: buttons inside .prose keep their own colours */
.prose a.btn-primary { color: #fff; }
.prose a.btn-ghost { color: var(--ink); }
