/* The brandbook specifies Myriad Pro for Latin text.  Adobe's desktop licence
   does not permit web embedding, so Myriad Pro stays first in the stack for
   readers who already have it installed, and Source Sans - Adobe's own
   open-licensed companion to it - is self-hosted as the face everyone else
   gets.  Self-hosting keeps the CSP `font-src 'self'` rule intact and adds no
   remote dependency.  Licence: assets/fonts/LICENSE-source-sans.txt */
@font-face {
    font-family: "Source Sans 3";
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("/assets/fonts/source-sans-300.woff2") format("woff2");
}

@font-face {
    font-family: "Source Sans 3";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/assets/fonts/source-sans-400.woff2") format("woff2");
}

@font-face {
    font-family: "Source Sans 3";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/assets/fonts/source-sans-600.woff2") format("woff2");
}

@font-face {
    font-family: "Source Sans 3";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/assets/fonts/source-sans-700.woff2") format("woff2");
}

@font-face {
    font-family: "Source Sans 3";
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url("/assets/fonts/source-sans-900.woff2") format("woff2");
}

:root {
    --brand-font: "Myriad Pro", "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

/* ---------------------------------------------------------------------------
   Brand mark

   The logo artwork is a rounded off-white tile carrying the navy mark, so it
   needs no frame of its own.  Two things must still be handled centrally:

   1. The tile colour is the brand off-white, which is also the light theme's
      page background, so on light grounds the mark would dissolve without a
      hairline ring to separate it.
   2. Every surface previously framed it differently: 0/12/13/15px radii, a
      cyan ring in the header and none elsewhere, and a wrapper that squeezed
      the header mark to 46x48 against the brandbook's no-distortion rule.

   `.brand-mark` is the single treatment.  Set the size on the element; the
   aspect ratio keeps it square whatever box it lands in.
--------------------------------------------------------------------------- */
:root {
    /* Brandbook graphic element: the mountain ridge, shared by the site
       footer and the presentation index. Lives here because a page may use
       it without loading main.css. */
    --pattern-mountain-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 24'%3E%3Cpath d='M0 20 L14 9 L24 15 L40 5 L52 14 L66 8 L78 17 L92 7 L104 14 L120 20' fill='none' stroke='%23000' stroke-width='1.5' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");

    --logo-radius: 22%;
    --logo-ring: rgba(23, 51, 88, .16);
    --logo-shadow: 0 6px 18px rgba(23, 51, 88, .14);
}

:where(body.dark, html[data-theme="dark"] body) {
    --logo-ring: rgba(255, 255, 255, .16);
    --logo-shadow: 0 6px 18px rgba(0, 0, 0, .32);
}

:where(body.high-contrast) {
    --logo-ring: #fff;
    --logo-shadow: none;
}

.brand-mark {
    display: block;
    aspect-ratio: 1;
    flex: 0 0 auto;
    object-fit: contain;
    border-radius: var(--logo-radius);
    box-shadow: 0 0 0 1px var(--logo-ring), var(--logo-shadow);
}
