/* ==========================================================================
   SENTINEL GOVCON SOLUTIONS - SITE STYLESHEET (css/site.css)
   --------------------------------------------------------------------------
   Art direction: a set of engineering drawings printed in negative.
   A near-black sheet, steel hairlines, white ink, and ONE accent colour
   (radar amber) used sparingly. Squared corners, no shadows, no gradients
   for decoration.

   INDEX
     1. Tokens ............ colours, fonts and sizes used everywhere
     2. Reset and base .... sensible defaults for plain elements
     3. Typography ........ headings, body text, small monospace labels
     4. Layout ............ container, sections with the margin rail, grids
     5. Components ........ reusable parts, in this order:
          5.1  Skip link                5.10 Badge, chip, status dot
          5.2  Site header + nav        5.11 Form controls
          5.3  Buttons and text links   5.12 Accordion
          5.4  Labels and section head  5.13 Notice
          5.5  Card and card grid       5.14 Tick list
          5.6  Panel                    5.15 Dimension line
          5.7  Figure frame             5.16 Page hero (inner pages)
          5.8  Title block              5.17 Site footer
          5.9  Spec table (definition list)
     6. Home page ......... rules used only by index.html
     7. Utilities ......... small single-purpose helper classes
     8. Print ............. dark-on-white version for paper and PDF
     9. High contrast ..... for visitors who use a Windows contrast theme

   BREAKPOINTS (written "mobile first": the plain rules are for phones and
   each @media block adds to them as the screen gets wider)
      600px   large phones / small tablets
      900px   tablets and small laptops: two-column sections
     1100px   desktop: the margin rail appears
     1160px   the navigation becomes a row of links (below this: Menu button)
     1280px   wide desktop: four cards in a row

   NAMING
     .block            a component            (.card)
     .block__part      a piece of it          (.card__title)
     .block--variant   a variation of it      (.card-grid--joined)
     .is-state         a state set by script  (.is-nav-open)
   ========================================================================== */


/* ==========================================================================
   1. TOKENS
   Custom properties ("variables"). Change a value here and it changes
   everywhere. The schematic figures read the same colour names.
   ========================================================================== */

/* The two typefaces. Their files are part of the site (assets/fonts) and
   are loaded from there, not from another website.

     Archivo ......... headings and text. ONE file holds every weight (100
                       to 900) and every width (62% to 125%). Leave the two
                       ranges in its rule as they are: they tell browsers
                       which weights and widths the file can draw.
     IBM Plex Mono ... labels and data. One file for each weight in use:
                       Regular is 400, Medium is 500, SemiBold is 600.
                       These are IBM's own files, exactly as IBM publishes
                       them and under IBM's file names (README.md says
                       where they came from). Leave the files themselves
                       as they are: the licence lets anyone pass IBM's
                       files on unchanged, but a copy that has been
                       converted or trimmed may not keep the name "Plex"
                       without IBM's permission.

   "swap" shows text straight away in a fallback font and switches to the
   real one when its file has arrived.

   The files hold the letters and signs of English and most Western
   European languages. A character a file does not have (the arrows in the
   labels, a Polish or Czech letter, Cyrillic, Greek) is drawn in a
   fallback font instead.

   Both typefaces are free to use and to pass on under the SIL Open Font
   License; its text sits beside the font files and has to stay with them.

   One thing IBM's files do on Windows (seen in Edge, Chrome and Brave): at
   a size of 15 screen pixels they draw capital letters 9 pixels tall,
   although they are 10 pixels tall at 14 and 11 at 16. The 12px labels
   land on that size when Windows is set to 125% scaling. It comes from
   IBM's files, not from this stylesheet.

   IF YOU EVER REPLACE A FONT FILE, the new file needs a NEW ADDRESS: a new
   name, or the same name in a new folder. Browsers are told to keep each
   font file for a year, so a browser that already has a file would not
   fetch a changed one from the same address. IBM's file names carry no
   version number, so a later release from IBM can come under the very
   same names: keep the names and put those files in a new folder inside
   assets/fonts. Then put the new address in three places: here, in
   _headers (the file is named there twice over: in the list of font files
   that browsers may keep, and in each of the "Link" blocks for the four
   pages), and in harness.css in the _dev folder (the test pages and the
   link-preview image use it). README.md records where the files came
   from; update that too. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../assets/fonts/archivo-variable-latin.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/IBMPlexMono-Regular-Latin1.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/IBMPlexMono-Medium-Latin1.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/IBMPlexMono-SemiBold-Latin1.woff2") format("woff2");
}

:root {
  /* Sheet: backgrounds */
  --bg: #07090c;        /* page background */
  --bg-2: #0b0f14;      /* panels, cards, figure frames */
  --bg-3: #11171e;      /* raised and hover surfaces */

  /* Hairlines */
  --line: #1d2630;      /* hairline borders */
  --line-2: #2c3947;    /* stronger borders */

  /* Ink: text */
  --ink: #eef2f5;       /* primary text, headings */
  --ink-2: #b4c0cb;     /* body text */
  --ink-3: #8192a3;     /* annotations and captions (dimmest colour allowed for text) */

  /* Trace: schematic linework */
  --trace: #9fb4c7;     /* main linework */
  --trace-2: #5d7286;   /* secondary linework (graphics and control outlines, never text) */
  --trace-3: #33414f;   /* faint construction lines (graphics only) */

  /* The single accent */
  --amber: #ffb224;
  --amber-2: #c98a17;   /* dim amber */
  --amber-glow: rgba(255, 178, 36, 0.18);

  /* Blueprint grid lines */
  --grid: rgba(159, 180, 199, 0.055);

  /* Site-only additions (the figures do not use these) */
  --amber-hi: #ffc65a;                  /* primary button, hover */
  --danger: #ff7a6b;                    /* form errors only */
  --header-bg: rgba(7, 9, 12, 0.86);    /* translucent sticky header */

  /* Font stacks. The first name in each is one of the two typefaces set up
     above. The names after it are the fallbacks, used while a font file is
     still on its way, or if it never arrives; the page must still look
     right in them. */
  --font-display: "Archivo", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Archivo", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;

  /* Sizes */
  --container: 1240px;                      /* widest the content ever gets */
  --gutter: clamp(20px, 4vw, 48px);         /* space at the left and right screen edges */
  --gap: 24px;                              /* space between grid columns */
  --section-pad: clamp(56px, 7vw, 96px);    /* space above and below each section */
  --header-h: 64px;                         /* height of the sticky header */
}

@media (min-width: 72.5em) {
  :root { --header-h: 72px; }   /* taller once the navigation is a row of links */
}


/* ==========================================================================
   2. RESET AND BASE
   Deliberately light: the figures in js/figures/ inherit from here.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;                 /* dark scrollbars and form widgets */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Links to a section stop just below the sticky header, not under it. */
  scroll-padding-top: calc(var(--header-h) + 8px);
}

/* A link to a section glides there instead of jumping, but only once the
   page has settled: js/site.js (part 9) puts the class "is-loaded" on
   <html> a moment after the page has finished loading. Until then a jump
   is instant, on purpose. On a first visit the fonts arrive while the page
   is loading and push everything below them down a little; a glide that
   had already set off would stop where the section used to be, 50 to 100
   pixels short of it. (Without JavaScript every jump is instant.) */
@media (prefers-reduced-motion: no-preference) {
  html.is-loaded { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font: 400 1rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--ink);
  text-decoration-color: var(--trace-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  color: var(--amber);
  text-decoration-color: currentColor;
}

/* Keyboard focus: one clear amber ring on everything that can take focus. */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

::selection {
  background: var(--amber);
  color: var(--bg);
}

[hidden] {
  display: none !important;
}

/* Visitors who ask for less motion get none. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ==========================================================================
   3. TYPOGRAPHY
   Headings: Archivo at expanded width (font-stretch: 125%), heavy, tight.
   Body:     Archivo at normal width.
   Labels:   IBM Plex Mono, small capitals, widely spaced.
   NOTE: the "font" shorthand resets font-stretch, so heading styles below
   set font-family, size and weight one by one instead.
   ========================================================================== */

h1, h2, h3, h4 {
  color: var(--ink);
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;           /* even line lengths, where supported */
  overflow-wrap: break-word;    /* a very long word may break rather than overflow */
}

h1 {
  font-size: clamp(2rem, 4.4vw, 4rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

h2 { font-size: clamp(1.625rem, 0.95rem + 1.85vw, 2.5rem); }

h3 {
  font-size: 1.125rem;
  line-height: 1.25;
  letter-spacing: 0;
}

h4 {
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: 0;
}

/* Larger opening paragraph. */
.lede {
  font-size: clamp(1.0625rem, 0.98rem + 0.42vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-2);
}

/* Running text: slightly larger, paragraphs and lists spaced apart,
   comfortable line length. */
.prose {
  max-width: 68ch;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.prose > * + * {
  margin-top: 1em;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

/* Drawing-style label: small monospace capitals. Also resets heading styles,
   so it can be put on an <h2> or <h3> that should look like a label. */
.label {
  font-family: var(--font-mono);
  font-stretch: 100%;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-wrap: wrap;
  color: var(--ink-3);
}

/* Data values (codes, identifiers, numbers) are set in monospace. */
.data {
  font-family: var(--font-mono);
  font-size: 0.9375em;
  letter-spacing: 0.03em;
}

.small-print {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ink-3);
}


/* ==========================================================================
   4. LAYOUT
   ========================================================================== */

/* Centres content and keeps it away from the screen edges. */
.container {
  width: min(100% - (2 * var(--gutter)), var(--container));
  margin-inline: auto;
}

/* --- Section with a margin rail ------------------------------------------
   Markup:
     <section class="section" id="...">
       <div class="container section__grid">
         <div class="section__rail"> <p class="section-label">...</p> </div>
         <div class="section__body"> ...content... </div>
       </div>
     </section>

   Phones and tablets: the rail is a small label above the content.
   Desktop (1100px+): a 12-column grid. The rail takes the first 2 columns
   (like the zone references in the margin of a drawing) and the content
   takes the other 10.
   -------------------------------------------------------------------------- */

.section__grid {
  padding-block: var(--section-pad);
  border-top: 1px solid var(--line);
}

.section__rail {
  margin-bottom: 20px;
}

@media (min-width: 1100px) {
  .section__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
    padding-block: 0;
  }

  /* The rail's right border is the vertical hairline that runs down the
     page between the margin and the content. */
  .section__rail {
    grid-column: 1 / span 2;
    margin-bottom: 0;
    padding: var(--section-pad) 16px var(--section-pad) 0;
    border-right: 1px solid var(--line);
  }

  .section__body {
    grid-column: 3 / -1;
    padding-block: var(--section-pad);
  }

  /* A section without a rail: add this class to use the full width. */
  .section__body--full {
    grid-column: 1 / -1;
  }
}

/* --- Two-column split ------------------------------------------------------
   Stacked on phones; side by side from 900px on a 10-column grid.
   .split        5 + 5 columns
   .split--4-6   4 + 6 columns
   .split--6-4   6 + 4 columns
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  gap: 40px var(--gap);
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    align-items: start;
  }

  .split > * { grid-column: span 5; }

  .split--4-6 > :first-child { grid-column: span 4; }
  .split--4-6 > :last-child { grid-column: span 6; }

  .split--6-4 > :first-child { grid-column: span 6; }
  .split--6-4 > :last-child { grid-column: span 4; }
}

/* A row of buttons and links that wraps when it runs out of room. */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}


/* ==========================================================================
   5. COMPONENTS
   ========================================================================== */

/* --- 5.1 Skip link -----------------------------------------------------------
   First thing a keyboard user reaches; jumps past the header. Hidden until
   it receives focus. */

.skip-link {
  position: absolute;
  top: 8px;
  left: var(--gutter);
  z-index: 100;
  padding: 14px 18px;
  background: var(--amber);
  color: var(--bg);
  font: 600 0.8125rem/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-300%);
}

.skip-link:focus {
  color: var(--bg);
  transform: none;
}


/* --- 5.2 Site header and navigation -------------------------------------------
   Sticky, translucent, with a hairline underneath. script adds:
     .is-scrolled   on .site-header once the page has scrolled
     .is-nav-open   on .site-header while the phone menu is open */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.site-header.is-scrolled {
  background: rgba(7, 9, 12, 0.94);
  border-bottom-color: var(--line-2);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);   /* "min" so the bar can grow if a visitor enlarges the text */
}

/* Brand: logo + company name, links to the home page. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand__logo {
  flex: none;
  width: 40px;
  height: 40px;
}

.brand__name {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* The name is written as two <span>s so it always breaks into two lines
   at the same place: "Sentinel GovCon" / "Solutions". */
.brand__name span {
  display: block;
}

/* The logo is a black square with rounded corners. On a near-black page its
   edge would vanish, so it gets a 1px outline that follows those corners. */
.logo,
.brand__logo {
  border-radius: 6%;
  box-shadow: 0 0 0 1px var(--line-2);
}

/* Menu button (phones and tablets only). */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  height: 44px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--trace-2);
  border-radius: 0;
  color: var(--ink);
  font: 500 0.75rem/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

/* HOVER LOOKS ON CONTROLS THAT SWITCH ON AND OFF (this button, the filter
   chips, job rows, FAQ items, the Pause switches) are written inside
   "@media (hover: hover)", which means: only where a mouse or trackpad is
   the main pointer. On a touch screen a tap leaves a hover look switched
   on until the next tap somewhere else, so a control that had just been
   switched off would still look half on. Plain links, buttons and form
   fields keep their hover look everywhere. */
@media (hover: hover) {
  .nav-toggle:hover {
    border-color: var(--ink);
  }
}

/* Two bars that cross into an X while the menu is open. */
.nav-toggle__icon {
  position: relative;
  width: 18px;
  height: 9px;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1.5px solid currentColor;
  transition: transform 0.18s ease;
}

.nav-toggle__icon::before { top: 0; }
.nav-toggle__icon::after { bottom: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before {
  transform: translateY(3.75px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* Navigation links (shared by the phone panel and the desktop row). */
.site-nav__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  font: 500 0.75rem/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-3);
}

.site-nav__link:hover {
  color: var(--ink);
}

.site-nav__link[aria-current="page"] {
  color: var(--amber);
}

/* Phones, tablets and small laptops: the navigation is a panel that drops
   down below the header when the Menu button is pressed. (The row of links
   needs about 1160px to fit on one line, so that is where it takes over.
   The breakpoint is written in em (72.5em = 1160px at the usual text size)
   so that visitors who enlarge their browser's text get the Menu button
   instead of a row of links that no longer fits.) */
@media (max-width: 72.49em) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: 0 var(--gutter) 28px;
    background: var(--bg);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line-2);
  }

  /* Closed by default, but only while there is a working Menu button to
     open it: js/boot.js puts the class "js-menu" on <html> for that.
     "visibility: hidden" also takes the links out of the keyboard tab order
     while the panel is closed. "overscroll-behavior: contain" keeps a swipe
     on the open panel from moving the page behind it in Chrome and Edge
     from version 144 and Firefox from version 150, on computers and
     Android. On an iPhone or iPad (any browser) and in older versions it
     only works while the panel is long enough to scroll, or not at all;
     there the page behind still moves, as it always did. */
  .js-menu .site-nav {
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
    overscroll-behavior: contain;
  }

  .js-menu .site-header.is-nav-open .site-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }

  .site-nav__list {
    counter-reset: nav-item;
  }

  .site-nav__link {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 56px;
    border-bottom: 1px solid var(--line);
    font-size: 0.8125rem;
    color: var(--ink);
  }

  /* Index number in front of each link: 01, 02, 03 ... */
  .site-nav__link::before {
    counter-increment: nav-item;
    content: counter(nav-item, decimal-leading-zero);
    content: counter(nav-item, decimal-leading-zero) / "";  /* not read aloud */
    color: var(--ink-3);
  }

  .site-nav__cta {
    display: flex;
    width: 100%;
    margin-top: 24px;
  }

  /* No working Menu button (JavaScript is off, or js/site.js never arrived
     and js/boot.js took the class "js-menu" away again): the links are
     simply laid out under the brand and the header scrolls away. */
  html:not(.js-menu) .site-header { position: static; }
  html:not(.js-menu) .site-header__bar { flex-wrap: wrap; height: auto; padding-top: 10px; }
  html:not(.js-menu) .nav-toggle { display: none; }
  html:not(.js-menu) .site-nav { position: static; flex: 1 0 100%; max-height: none; padding: 0 0 20px; border: 0; }
}

/* The same panel on a low, wide screen: a phone held sideways. One column
   of six rows does not fit there, and at some screen heights it would end
   right on a row line and look complete, with the last entries out of
   sight. So here the links go side by side in two columns of shorter rows
   (01 and 02, then 03 and 04, then 05), with the button underneath. At the
   usual text size that fits on any screen at least 266px high. On a lower
   screen the panel scrolls, and between about 210px and 250px high the
   button is visibly cut off, which shows it. The same two columns are used
   where the links are laid out without the Menu button.
   (Up to 440px high; the one-column panel needs 438px. 560px is the least
   width at which two columns are used. These two are written in px, not
   em, because the header and rows they are measured against are fixed in
   px.) */
@media (min-width: 560px) and (max-width: 72.49em) and (max-height: 440px) {
  .site-nav {
    padding-bottom: 16px;
  }

  .site-nav__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--gap);
  }

  .site-nav__link {
    min-height: 44px;
  }

  .site-nav__cta {
    margin-top: 12px;
  }
}

/* Desktop: the navigation is a row inside the header. */
@media (min-width: 72.5em) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
  }

  .site-nav__list {
    display: flex;
    align-items: center;
    gap: 26px;
  }

  .site-nav__link {
    display: block;
    padding: 12px 0;
  }
}


/* --- 5.3 Buttons and text links -------------------------------------------------
   .btn--primary     amber fill, dark text: one main action per view
   .btn--secondary   hairline outline
   .btn--sm          smaller (used in the header)
   .btn--block       full width
   .link-arrow       plain text link followed by an arrow
   Works on <a> and <button>. Disabled: the disabled attribute on a <button>,
   or aria-disabled="true" on a link. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 0;
  font: 600 0.8125rem/1.3 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn--primary {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--bg);
}

.btn--primary:hover {
  background: var(--amber-hi);
  border-color: var(--amber-hi);
  color: var(--bg);
}

.btn--primary:active {
  background: var(--amber-2);
  border-color: var(--amber-2);
}

.btn--secondary {
  background: transparent;
  border-color: var(--trace-2);
  color: var(--ink);
}

.btn--secondary:hover {
  background: var(--bg-3);
  border-color: var(--ink);
  color: var(--ink);
}

.btn--secondary:active {
  background: var(--bg-2);
}

.btn--sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.75rem;
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn[aria-disabled="true"] {
  pointer-events: none;
}

/* Text link with an arrow that nudges forward on hover. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--trace-2);
  color: var(--ink);
  font: 500 0.8125rem/1.4 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.link-arrow::after {
  content: "\2192";
  content: "\2192" / "";   /* the arrow is decoration: not read aloud */
  transition: transform 0.15s ease;
}

.link-arrow:hover {
  border-bottom-color: var(--amber);
  color: var(--amber);
}

.link-arrow:hover::after {
  transform: translateX(4px);
}


/* --- 5.4 Labels and section heading -----------------------------------------------
   .eyebrow         small label above a page title, led by a short leader line
   .section-label   the "SHEET 03 / APPROACH" marker; lives in the margin rail
   .section-head    a section's <h2> plus an optional intro paragraph
   .section-head--split   title on the left, intro on the right (900px+) */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font: 500 0.75rem/1.5 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 28px;
  border-top: 1px solid var(--trace-2);
}

/* Number and text stay on one row. If the text is too long for a phone it
   wraps inside its own box, so the dash after the number never points at
   an empty space. */
.section-label {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 4px 12px;
  font: 500 0.75rem/1.5 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.section-label__no {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  white-space: nowrap;
}

/* Short dash between the sheet number and the label text. */
.section-label__no::after {
  content: "";
  width: 20px;
  border-top: 1px solid var(--trace-2);
}

.section-label__text {
  min-width: 0;   /* lets long label text wrap instead of pushing the row wider */
}

/* In the desktop rail the label is stacked: number, hairline, text. It is
   "sticky", so it stays in view while its section scrolls past. */
@media (min-width: 1100px) {
  .section__rail .section-label {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 28px);
    padding-top: 2px;   /* lines the label up with the top of the heading's capitals */
  }

  /* The hairline under the sheet number runs on to meet the rail's border. */
  .section__rail .section-label__no {
    display: block;
    margin: 0 -16px 10px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line-2);
  }

  .section__rail .section-label__no::after {
    display: none;
  }
}

.section-head {
  margin-bottom: clamp(32px, 4.5vw, 56px);
}

.section-head__title {
  max-width: 20em;
}

.section-head__intro {
  max-width: 60ch;
  margin-top: 20px;
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.55;
}

@media (min-width: 900px) {
  .section-head--split {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    column-gap: var(--gap);
    align-items: end;
  }

  .section-head--split .section-head__title { grid-column: span 6; }

  .section-head--split .section-head__intro {
    grid-column: span 4;
    margin-top: 0;
    padding-bottom: 0.2em;
  }
}


/* --- 5.5 Card and card grid ----------------------------------------------------------
   .card                a bordered box. Its parts, in this order, all optional:
     .card__head          top row: a number on the left, an icon on the right
     .card__title         the heading
     .card__text          the description
     .card__meta          small closing line under a hairline
   .card--link          a card that is itself a link (use on an <a>)
   .card-grid           2 columns from 600px
   .card-grid--3        3 columns from 900px
   .card-grid--4        4 columns from 1280px
   .card-grid--joined   cards share hairlines, like the cells of a table, and
                        their titles, texts and meta lines sit on shared rows.
                        Give every card in a joined grid the same parts. */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 2.2vw, 28px);
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
}

.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.card__no {
  font: 500 0.75rem/1 var(--font-mono);
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

/* Line-art icon: stroke only, drawn in the linework colour. */
.card__icon {
  flex: none;
  width: 52px;
  height: 52px;
  fill: none;
  stroke: var(--trace);
  stroke-width: 1.25;
}

/* The one amber detail inside each icon (the "signal"). */
.card__icon-signal {
  stroke: var(--amber);
}

/* The text grows to fill the card, which pins the meta line to the bottom. */
.card__text {
  flex: 1 0 auto;
  margin-top: 12px;
  font-size: 0.9375rem;
}

.card__meta {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-3);
}

.card--link {
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.card--link:hover {
  background: var(--bg-3);
  border-color: var(--trace-2);
  color: var(--ink-2);
}

.card-grid {
  display: grid;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 600px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
  .card-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Joined: no gaps. The grid draws the top and left hairlines; each card
   draws its own right and bottom ones, so lines are never doubled. */
.card-grid--joined {
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.card-grid--joined > .card {
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Shared rows ("subgrid"): each card borrows four rows from the grid (head,
   title, text, meta), so a three-line title in one card pushes the text
   down in all of them and everything stays level. Browsers that do not
   know subgrid skip this block and simply stack each card on its own. */
@supports (grid-template-rows: subgrid) {
  .card-grid--joined > .card {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 4;
  }
}


/* --- 5.6 Panel ----------------------------------------------------------------------------
   A bordered box with an optional labelled head and foot. Good for tables,
   forms and summaries. */

.panel {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
}

.panel__head {
  padding: 13px 20px;
  border-bottom: 1px solid var(--line-2);
  font: 500 0.75rem/1.5 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.panel__body {
  padding: 20px;
}

.panel__foot {
  padding: 14px 20px;
  border-top: 1px solid var(--line-2);
}


/* --- 5.7 Figure frame ------------------------------------------------------------------------
   Markup (the page owns the frame and caption; a figure script fills the
   stage):
     <figure class="fig">
       <div class="fig__frame"><div class="fig__stage" data-figure="scope"></div></div>
       <figcaption class="fig__cap"><span class="fig__no">FIG. 01</span> Caption text</figcaption>
     </figure>
   Write the stage with NOTHING between its tags (not even a space or a line
   break): the placeholder below only applies while the stage is empty.

   .fig--side   from 900px, the caption sits in a narrow column to the
                right of the frame instead of underneath it. */

.fig__frame {
  position: relative;
  padding: clamp(8px, 2.2vw, 20px);
  background: var(--bg-2);
  border: 1px solid var(--line);
}

/* The stage hands every figure the same plain starting point (text size,
   colour, spacing), wherever on a page the figure is placed. */
.fig__stage {
  display: block;
  width: 100%;
  color: var(--ink-2);
  font: 400 1rem/1.6 var(--font-body);
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
}

/* Placeholder shown until the figure is drawn (or if scripts are off): an
   empty plotting area with a centre mark. */
.fig__stage:empty {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(var(--trace-3), var(--trace-3)) center / 25px 1px no-repeat,
    linear-gradient(var(--trace-3), var(--trace-3)) center / 1px 25px no-repeat,
    linear-gradient(var(--grid) 1px, transparent 1px) center / 24px 24px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) center / 24px 24px;
}

/* A rough shape for each figure. A visitor sees these when JavaScript is
   off or a script file never arrived (the figure is then never drawn),
   and, in a browser too old for the exact heights further down, for the
   moment before the figure is drawn. */
.fig__stage[data-figure="scope"]:empty { aspect-ratio: 1 / 1; }
.fig__stage[data-figure="sentinel"]:empty { aspect-ratio: 16 / 9; }
.fig__stage[data-figure="tracks"]:empty { aspect-ratio: 4 / 1; }
.fig__stage[data-figure="flowdown"]:empty { aspect-ratio: 4 / 3; }
.fig__stage[data-figure="neural"]:empty { aspect-ratio: 16 / 10; }

/* THE EXACT HEIGHT EACH DRAWING WILL HAVE.
   While a figure is on its way, its empty box is given the very height the
   finished drawing will have, so that nothing below it moves when the
   drawing arrives. Without this the home page grew by about 1,400 pixels on
   a phone as the figures were drawn, and a visitor who had gone to a
   section, and then reloaded the page or came back to it, was put down a
   screen away from where they had been. (The "Pause animations" button
   appears at the same moment as the drawings; its place is kept free in
   the same way: see ".motion-toggle[hidden]" further down.)

   How it works:
     - js/boot.js puts the class "js-figures" on <html> while the figures
       are expected, and takes it away again if one is still missing when
       the page has finished loading (then the rough shapes above return).
     - The first rule lets the rules after it ask how wide the frame is
       ("@container"), and "cqw" in them means one hundredth of that width.
       The scope needs none of this: it is a square at every width.

   WHERE THE NUMBERS COME FROM: each figure's script works out its own size
   from the width it is given, and the rules below repeat that sum. IF YOU
   CHANGE HOW A FIGURE SIZES ITSELF, CHANGE ITS LINES HERE TOO.
     sentinel ... js/figures/sentinel.js: stacked below 520px wide, short
                  labels below 700px (COMPACT_FROM, WIDE_FROM); the lines
                  are fitted to the heights it draws
     tracks ..... js/figures/tracks.js: stacked below 460px (STACK_BELOW)
     flowdown ... js/figures/flowdown.js: its layouts start at 380, 480 and
                  640px (MODES); the readout under it (its longest
                  sentence) takes three lines below 364.5px, two up to
                  737px and one from there
     neural ..... js/figures/neural.js: compact below 480px (COMPACT_BELOW);
                  the drawing is 0.7 times the width (compact) or 0.6 times
                  the width less 30px (wide), each within limits, and the
                  bar above it with its gap takes 41px. From 880px wide
                  (MAX_WIDTH) the drawing simply scales. */
.js-figures .fig__frame:has(> .fig__stage:empty) {
  container-type: inline-size;
}

@container (min-width: 0) {
  .js-figures .fig__stage[data-figure="sentinel"]:empty {
    aspect-ratio: auto;
    height: calc(82.376cqw - 195.18px);
  }

  .js-figures .fig__stage[data-figure="tracks"]:empty {
    aspect-ratio: auto;
    height: calc(33.333cqw + 47.19px);
  }

  .js-figures .fig__stage[data-figure="flowdown"]:empty {
    aspect-ratio: auto;
    height: 425.5px;
  }

  .js-figures .fig__stage[data-figure="neural"]:empty {
    aspect-ratio: auto;
    height: calc(max(310px, min(60cqw - 30px, 56.591cqw)) + 41px);
  }
}

@container (max-width: 736.99px) {
  .js-figures .fig__stage[data-figure="flowdown"]:empty { height: 445.5px; }
}

@container (max-width: 699.99px) {
  .js-figures .fig__stage[data-figure="sentinel"]:empty {
    height: min(74.812cqw - 73.58px, 62.961cqw - 4.87px);
  }
}

@container (max-width: 639.49px) {
  .js-figures .fig__stage[data-figure="flowdown"]:empty { height: 532.5px; }
}

@container (max-width: 519.99px) {
  .js-figures .fig__stage[data-figure="sentinel"]:empty {
    height: min(790.59px, 316cqw - 179.25px, 226.071cqw + 71.68px);
  }
}

@container (max-width: 479.49px) {
  .js-figures .fig__stage[data-figure="neural"]:empty {
    height: calc(clamp(196px, 70cqw, 300px) + 41px);
  }
}

@container (max-width: 459.99px) {
  .js-figures .fig__stage[data-figure="tracks"]:empty {
    height: calc(126.003cqw + 1.97px);
  }
}

@container (max-width: 379.49px) {
  .js-figures .fig__stage[data-figure="flowdown"]:empty { height: 608.5px; }
}

@container (max-width: 364.49px) {
  .js-figures .fig__stage[data-figure="flowdown"]:empty { height: 629px; }
}

.fig__cap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 14px;
  margin-top: 12px;
  font: 400 0.75rem/1.55 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.fig__no {
  color: var(--amber);
  font-weight: 500;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

@media (min-width: 900px) {
  .fig--side {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    column-gap: var(--gap);
    align-items: start;
  }

  .fig--side > .fig__frame {
    grid-column: 1 / span 8;
  }

  .fig--side > .fig__cap {
    display: block;
    grid-column: 9 / span 2;
    margin-top: 0;
    padding-top: 12px;
    border-top: 1px solid var(--line-2);
  }

  .fig--side .fig__no {
    display: block;
    margin-bottom: 6px;
  }
}

/* Animation switch: the "Pause animations" button. js/site.js (part 2)
   makes it work; pressing it stops or restarts every figure animation.
   It lives in a figure caption, after the caption text:
     <figcaption class="fig__cap fig__cap--switch">
       <span class="fig__no">FIG. 01</span> Caption text
       <button class="motion-toggle" type="button" data-motion-toggle hidden>
         <svg class="motion-toggle__icon" ...>(pause shape, play shape)</svg>
         <span class="motion-toggle__label" data-motion-label>Pause animations</span>
       </button>
     </figcaption>
   A quiet text button in the label style. The box is 44px tall so that it
   is easy to hit with a finger, although the lettering is small. */
.motion-toggle {
  grid-column: 2;                /* under the caption text, lined up with it */
  justify-self: start;           /* only as wide and as tall as it needs to be */
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0 0 0 -12px;           /* cancels the left padding: the icon lines up with the text above */
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ink-2);
  font: 500 0.75rem/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: color 0.15s ease;
}

/* With a mouse or trackpad only (the reason is given at the Menu button,
   .nav-toggle:hover). */
@media (hover: hover) {
  .motion-toggle:hover {
    color: var(--ink);
  }
}

/* The focus ring is drawn just inside the tall box, close around the words. */
.motion-toggle:focus-visible {
  outline-offset: -6px;
}

.motion-toggle__icon {
  flex: none;
  width: 8px;
  height: 10px;
  fill: currentColor;
}

/* The icon holds two shapes. Show the one that matches the words: two bars
   while the animations run, a triangle while they are paused (js/site.js
   puts the class "is-motion-paused" on <html> for as long as they are). */
.is-motion-paused .motion-toggle__pause,
html:not(.is-motion-paused) .motion-toggle__play {
  display: none;
}

/* Room for the longer wording ("Pause animations": 16 letters and their
   spacing), so the button keeps its width when it changes to "Play". */
.motion-toggle__label {
  min-width: calc(16ch + 1.6em);
  text-align: left;
}

/* Wide screens: the button sits at the right-hand end of the caption row.
   The negative top margin lifts its words level with the first caption line.
   (Below 1360px the caption text would be squeezed into a narrow column,
   so there the button stays underneath it.) */
@media (min-width: 1360px) {
  .fig__cap--switch {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .fig__cap--switch > .motion-toggle {
    grid-column: 3;
    grid-row: 1;
    margin: -12px -12px 0 0;
  }
}

/* The button needs JavaScript: it carries the "hidden" attribute in the page
   and js/site.js removes that once the button works, so it never shows when
   scripts are off. It is also left out when the visitor has asked for
   reduced motion, because then nothing moves in the first place, and on
   paper. */
@media (prefers-reduced-motion: reduce) {
  .motion-toggle {
    display: none;
  }
}

@media print {
  .motion-toggle {
    display: none;
  }
}

/* While the button is still waiting for its script, its place is kept free:
   it takes up its room but cannot be seen or pressed. Otherwise it would
   push the rest of the page down by up to 45 pixels at the moment it
   appeared. This is only done while the drawings are expected (the class
   "js-figures", see js/boot.js), on a screen, and for visitors who have not
   asked for reduced motion; in every other case the button takes no room,
   as before. */
@media screen and (prefers-reduced-motion: no-preference) {
  .js-figures .motion-toggle[hidden] {
    display: inline-flex !important;   /* wins over the general "[hidden]" rule */
    visibility: hidden;
  }
}


/* --- 5.8 Title block -----------------------------------------------------------------------------
   Labelled cells divided by hairlines, like the title block in the corner of
   an engineering drawing.
     <dl class="titleblock">
       <div class="titleblock__cell">
         <dt class="titleblock__label">Ownership</dt>
         <dd class="titleblock__value">Veteran-owned small business</dd>
       </div>
       ...
     </dl>
   Cells wrap to fit the width; the last cell stretches to finish its row. */

.titleblock {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line-2);
}

.titleblock__cell {
  padding: 14px 18px 16px;
  background: var(--bg-2);
}

.titleblock__cell:last-child {
  grid-column-end: -1;
}

.titleblock__label {
  margin-bottom: 6px;
  font: 500 0.6875rem/1.4 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.titleblock__value {
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--ink);
  text-wrap: balance;
}

.titleblock__value--data {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}


/* --- 5.9 Spec table (definition list) ------------------------------------------------------------
   Term on the left, value on the right, a hairline under each row.
     <dl class="spec">
       <div class="spec__row">
         <dt class="spec__term">CAGE code</dt>
         <dd class="spec__desc spec__desc--data">259V2</dd>
       </div>
     </dl>
   Inside a .panel the rows pick up the panel's side padding. */

.spec {
  border-top: 1px solid var(--line-2);
}

.spec__row {
  display: grid;
  grid-template-columns: minmax(96px, 32%) minmax(0, 1fr);
  column-gap: 20px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.spec__term {
  font: 500 0.75rem/1.5 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.spec__desc {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.spec__desc--data {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  letter-spacing: 0.03em;
}

.panel > .spec {
  border-top: 0;
}

.panel > .spec > .spec__row {
  padding-inline: 20px;
}

.panel > .spec > .spec__row:last-child {
  border-bottom: 0;
}

@media (max-width: 419.98px) {
  .spec__row { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
}


/* --- 5.10 Badge, chip, status dot ------------------------------------------------------------------
   .badge         a small static tag                         <span class="badge">TS/SCI</span>
   .badge--accent amber outline, for the one tag that matters most
   .chip          a tag you can press (filters). Use a <button> with
                  aria-pressed="true|false"; the pressed chip turns amber.
   .tag-list      wraps a row of badges or chips
   .status-dot    small amber "active" marker in front of a status */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  font: 500 0.6875rem/1.4 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge--accent {
  border-color: var(--amber-2);
  color: var(--amber);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--trace-2);
  border-radius: 0;
  color: var(--ink-2);
  font: 500 0.75rem/1.3 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* With a mouse or trackpad only (the reason is given at the Menu button,
   .nav-toggle:hover). */
@media (hover: hover) {
  .chip:hover {
    background: var(--bg-3);
    border-color: var(--ink);
    color: var(--ink);
  }
}

.chip.is-selected,
.chip[aria-pressed="true"],
.chip[aria-current="true"] {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--bg);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  background: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-glow);
  vertical-align: 0.08em;
}


/* --- 5.11 Form controls ----------------------------------------------------------------------------------
     <div class="field">
       <label class="field__label" for="name">Name <span class="field__req">*</span></label>
       <input class="input" id="name" type="text" aria-describedby="name-help">
       <p class="field__help" id="name-help">Help text.</p>
       <p class="field__error" id="name-error">Error text.</p>
     </div>
   Error state: add aria-invalid="true" to the control (or .field--error to
   the wrapper) and show the .field__error text. Never rely on colour alone:
   the error text says what is wrong. */

.field {
  display: grid;
  gap: 8px;
}

.field__label {
  font: 500 0.75rem/1.5 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.field__req {
  color: var(--amber);
}

.input,
.select,
.textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  background: var(--bg-2);
  border: 1px solid var(--trace-2);
  border-radius: 0;
  color: var(--ink);
  font: 400 1rem/1.5 var(--font-body);   /* 16px or more stops phones zooming in on focus */
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--ink-3);
  opacity: 1;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--trace);
}

.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-color: var(--amber);
  background: var(--bg-3);
}

.textarea {
  min-height: 148px;
  resize: vertical;
}

/* The select's own arrow is replaced by one drawn with two small gradients. */
.select {
  padding-right: 44px;
  -webkit-appearance: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: right 21px center, right 15px center;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.input:disabled,
.select:disabled,
.textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.field__help {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-3);
}

.field__error {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--danger);
}

.field--error .input,
.field--error .select,
.field--error .textarea,
.input[aria-invalid="true"],
.select[aria-invalid="true"],
.textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

/* Native checkboxes and radio buttons pick up the accent. */
input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--amber);
}


/* --- 5.12 Accordion --------------------------------------------------------------------------------------
   Built on the browser's own <details>/<summary>, so it works without
   JavaScript and with a keyboard out of the box.
     <div class="accordion">
       <details class="accordion__item">
         <summary class="accordion__summary">
           <h3 class="accordion__q">Question?</h3>
           <span class="accordion__icon" aria-hidden="true"></span>
         </summary>
         <div class="accordion__panel"><p>Answer.</p></div>
       </details>
     </div> */

.accordion {
  border-top: 1px solid var(--line-2);
}

.accordion__item {
  border-bottom: 1px solid var(--line);
}

.accordion__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  list-style: none;       /* hides the browser's own triangle */
  cursor: pointer;
}

.accordion__summary::-webkit-details-marker {
  display: none;          /* the same, for Safari */
}

.accordion__q {
  font-family: var(--font-body);
  font-stretch: 100%;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  text-wrap: wrap;
}

/* Plus sign in a small square; becomes an amber minus when open. */
.accordion__icon {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-2);
  color: var(--ink);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  margin: -0.75px 0 0 -6px;
  border-top: 1.5px solid currentColor;
  transition: transform 0.2s ease;
}

.accordion__icon::after {
  transform: rotate(90deg);
}

/* With a mouse or trackpad only (the reason is given at the Menu button,
   .nav-toggle:hover). Keep this rule above the next one: when two rules
   disagree the later one wins, and that keeps an open item's square amber
   under the pointer. */
@media (hover: hover) {
  .accordion__summary:hover .accordion__icon {
    border-color: var(--ink);
  }
}

.accordion__item[open] .accordion__icon {
  border-color: var(--amber);
  color: var(--amber);
}

.accordion__item[open] .accordion__icon::after {
  transform: rotate(0deg);
}

/* "overflow-anchor: none": when a visitor reloads a page, or comes back to
   it, the browser puts them back by lining the page up on something that
   was at the top of the screen. An answer must not be that something. The
   first answer is open when the page loads and slides into place over a
   quarter of a second (the animation below); Chrome and Edge lined the
   page up on it while it was still 4px too high, and left the visitor 4px
   off. With this line they pick something else nearby instead. */
.accordion__panel {
  max-width: 66ch;
  padding: 0 56px 24px 0;
  overflow-anchor: none;
}

.accordion__panel > * + * {
  margin-top: 0.8em;
}

.accordion__item[open] > .accordion__panel {
  animation: accordion-open 0.25s ease;
}

@keyframes accordion-open {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}


/* --- 5.13 Notice -------------------------------------------------------------------------------------------
   A boxed note. .notice--accent for the one that must not be missed;
   .notice--error for a problem (pair it with role="alert" in the markup).
     <p class="notice"><span class="notice__label">Note</span> Text.</p> */

.notice {
  padding: 14px 18px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--trace);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.notice__label {
  display: block;
  margin-bottom: 4px;
  font: 500 0.6875rem/1.5 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.notice--accent {
  border-left-color: var(--amber);
}

.notice--error {
  border-left-color: var(--danger);
}

.notice--error .notice__label {
  color: var(--danger);
}


/* --- 5.14 Tick list -------------------------------------------------------------------------------------------
   A plain list where each item is marked by a short drafting tick and
   separated by hairlines.   <ul class="ticklist"> <li>...</li> </ul> */

.ticklist {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-2);
}

.ticklist > li {
  position: relative;
  padding: 14px 0 14px 30px;
  border-bottom: 1px solid var(--line);
}

.ticklist > li::before {
  content: "";
  position: absolute;
  top: calc(14px + 0.8em);
  left: 0;
  width: 14px;
  border-top: 1px solid var(--trace);
}


/* --- 5.15 Dimension line -----------------------------------------------------------------------------------------
   A drawing-style measurement marker:   |------ LABEL ------|
     <span class="dim">Pre-award</span>
   It fills the width of whatever it is placed in. */

.dim {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 15px;
  border-left: 1px solid var(--trace-2);
  border-right: 1px solid var(--trace-2);
  font: 500 0.6875rem/1 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-3);
}

.dim::before,
.dim::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--trace-2);
}


/* --- 5.16 Page hero (inner pages) ------------------------------------------------------------------------------
   The top of every page except the home page: label, <h1>, intro, over a
   faint blueprint grid.
     <section class="page-hero">
       <div class="container page-hero__inner">
         <p class="eyebrow">Careers</p>
         <h1 class="page-hero__title">Open roles</h1>
         <p class="page-hero__intro">Intro text.</p>
       </div>
     </section> */

.page-hero {
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center top;
  -webkit-mask-image: linear-gradient(100deg, transparent 20%, #000 100%);
  mask-image: linear-gradient(100deg, transparent 20%, #000 100%);
}

.page-hero__inner {
  position: relative;
  padding-block: clamp(48px, 7vw, 96px) clamp(40px, 6vw, 80px);
}

.page-hero__title {
  max-width: 18em;
  margin-top: 20px;
  font-size: clamp(2rem, 1.3rem + 2.9vw, 3.25rem);
}

.page-hero__intro {
  max-width: 62ch;
  margin-top: 20px;
  font-size: clamp(1.0625rem, 0.98rem + 0.42vw, 1.25rem);
  line-height: 1.55;
}


/* --- 5.17 Site footer ---------------------------------------------------------------------------------------------- */

.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line-2);
}

.site-footer__top {
  display: grid;
  gap: 40px var(--gap);
  padding-block: clamp(48px, 6vw, 72px) 48px;
}

.site-footer__brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 18px;
  align-items: center;
}

.site-footer__logo {
  width: 56px;
  height: 56px;
}

.site-footer__name {
  color: var(--ink);
  font-family: var(--font-display);
  font-stretch: 125%;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-footer__tagline {
  grid-column: 1 / -1;
  max-width: 44ch;
  margin-top: 14px;
  font-size: 0.9375rem;
}

.site-footer__heading {
  margin-bottom: 14px;
}

.site-footer__list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__list a {
  display: inline-block;
  padding: 5px 0;
  color: var(--ink-2);
  font-size: 0.9375rem;
  text-decoration: none;
}

.site-footer__list a:hover {
  color: var(--amber);
  text-decoration: underline;
}

.site-footer__bottom {
  display: grid;
  gap: 12px;
  padding-block: 24px 40px;
  border-top: 1px solid var(--line);
}

.site-footer__corp {
  font: 400 0.75rem/1.7 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.site-footer__copy {
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.site-footer__fine {
  max-width: 96ch;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ink-3);
}

@media (min-width: 600px) {
  .site-footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .site-footer__top {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .site-footer__brand { grid-column: 1 / span 5; align-self: start; }
  .site-footer__col--nav { grid-column: 7 / span 3; }
  .site-footer__col--inquiry { grid-column: 10 / span 3; }
}


/* ==========================================================================
   6. HOME PAGE (index.html only)
   ========================================================================== */

/* --- 6.1 Hero -----------------------------------------------------------------
   Phones:  title, text, figure stacked.
   600px+:  title across the top; text beside the figure.
   900px+:  12 columns. Title and text take 7, the figure takes 5. */

.hero {
  position: relative;
  overflow: hidden;   /* keeps the background grid inside the hero */
}

/* Faint blueprint grid, strongest around the figure and faded away from it
   so that it never runs behind the text at full strength. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 75% 85% at 78% 36%, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 82%);
  mask-image: radial-gradient(ellipse 75% 85% at 78% 36%, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 82%);
}

.hero__inner {
  position: relative;
  padding-block: clamp(32px, 4vw, 48px) clamp(40px, 5vw, 64px);
}

.hero__grid {
  display: grid;
  gap: 28px var(--gap);
}

.hero__title {
  margin-top: 20px;
}

.hero__lede {
  max-width: 34em;
  text-wrap: pretty;   /* avoids a single word alone on the last line, where supported */
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__email {
  margin-top: 18px;
}

@media (min-width: 600px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 42%);
    align-items: start;
  }

  .hero__head { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto 1fr;
  }

  .hero__head { grid-column: 1 / span 7; grid-row: 1; }
  .hero__copy { grid-column: 1 / span 7; grid-row: 2; }
  .hero__figure { grid-column: 8 / span 5; grid-row: 1 / span 2; }
}

/* --- 6.2 Sheet identification block (under the hero) ---------------------------------
   The company "title block": logo and legal name on the left, labelled
   cells on the right. Built from the .titleblock component. */

.sheet-id {
  position: relative;
  display: grid;
  gap: 1px;
  margin-top: clamp(36px, 4vw, 44px);
  background: var(--line);
  border: 1px solid var(--line-2);
}

.sheet-id__brand {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  background: var(--bg-2);
}

.sheet-id__logo {
  flex: none;
  width: 64px;
  height: 64px;
}

.sheet-id__name {
  color: var(--ink);
  font-family: var(--font-display);
  font-stretch: 125%;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
}

/* The three cells: stacked on phones, side by side from 600px. */
.sheet-id__cells {
  grid-template-columns: minmax(0, 1fr);
  background: transparent;
  border: 0;
}

@media (min-width: 600px) {
  .sheet-id__cells { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .sheet-id {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .sheet-id__brand {
    gap: 20px;
    padding: 20px 32px 20px 24px;
  }

  .sheet-id__logo {
    width: 76px;
    height: 76px;
  }

  .sheet-id__name {
    font-size: 1.25rem;
  }

  .sheet-id__name span {
    display: block;   /* "Sentinel GovCon" / "Solutions LLC" on two lines */
  }

  .sheet-id__cells .titleblock__cell {
    padding: 16px 20px 18px;
  }
}

/* --- 6.3 Capabilities -------------------------------------------------------------------- */

.cap-strip {
  display: grid;
  gap: 10px var(--gap);
  align-items: center;
  padding: 20px clamp(20px, 2.2vw, 28px);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-top: 0;   /* joins the strip to the card grid above it */
}

.cap-strip__label {
  color: var(--ink);
}

.cap-strip__text {
  font-size: 0.9375rem;
}

.cap-strip .link-arrow {
  justify-self: start;
}

@media (min-width: 900px) {
  .cap-strip {
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 32px;
  }
}

/* --- 6.4 Namesake ---------------------------------------------------------------------------
   From 900px everything in this section keeps to the first 8 of the 10
   content columns, and the figure captions sit in the last 2 (.fig--side). */

.namesake__text {
  display: grid;
  gap: 1em var(--gap);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.namesake__fig {
  margin-top: clamp(32px, 4vw, 48px);
}

.namesake__fig + .namesake__fig {
  margin-top: var(--gap);
}

/* Detect / Track / Cue: a row of labelled steps, each led by a small glyph
   and a leader line. */
.steps {
  display: grid;
  gap: 28px var(--gap);
  margin: clamp(40px, 5vw, 64px) 0 0;
  padding: 0;
  list-style: none;
}

.steps__label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-stretch: 100%;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.steps__label::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line-2);
}

.steps__glyph {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--trace);
  stroke-width: 1.25;
}

.steps__glyph-signal {
  fill: var(--amber);
  stroke: var(--amber);
}

.steps__text {
  max-width: 36ch;
  margin-top: 12px;
  font-size: 0.9375rem;
}

@media (min-width: 600px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  /* Exactly as wide as 8 of the 10 content columns. */
  .namesake__text,
  .steps {
    width: calc(80% - (0.2 * var(--gap)));
  }

  .namesake__text {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- 6.5 Approach: signal-flow diagram ----------------------------------------------------------
   An ordered list drawn as a block diagram. Numbered nodes are joined by
   connector lines with arrowheads: top to bottom on phones, left to right
   from 900px. A dimension line above marks which phases come before and
   after contract award. */

.flow {
  --node: 40px;   /* size of a numbered node */
}

.flow__dims {
  display: none;
}

.flow__steps {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow__step {
  position: relative;
  display: grid;
  grid-template-columns: var(--node) minmax(0, 1fr);
  column-gap: 20px;
  padding-bottom: 36px;
}

.flow__step:last-child {
  padding-bottom: 0;
}

.flow__node {
  display: grid;
  place-items: center;
  grid-row: 1 / span 2;
  width: var(--node);
  height: var(--node);
  background: var(--bg);
  border: 1px solid var(--trace);
  color: var(--ink);
  font: 500 0.875rem/1 var(--font-mono);
}

.flow__title {
  display: flex;
  align-items: center;
  min-height: var(--node);
  font-size: 1.25rem;
}

.flow__text {
  grid-column: 2;
  max-width: 44ch;
  margin-top: 2px;
}

/* Connector: a line from the bottom of this node to the top of the next... */
.flow__step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: var(--node);
  bottom: 0;
  left: calc(var(--node) / 2);
  border-left: 1px solid var(--trace-2);
}

/* ...ending in an arrowhead (a triangle made from borders). */
.flow__step:not(:last-child)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: calc(var(--node) / 2 - 4px);
  border-top: 8px solid var(--trace);
  border-left: 4.5px solid transparent;
  border-right: 4.5px solid transparent;
}

@media (min-width: 900px) {
  .flow__dims {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
  }

  .flow__dim--pre { grid-column: 1 / span 3; }
  .flow__dim--post { grid-column: 4; border-left: 0; }

  .flow__steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .flow__step {
    display: block;
    padding: 0 28px 0 0;
  }

  .flow__title {
    display: block;
    min-height: 0;
    margin-top: 24px;
  }

  .flow__text {
    margin-top: 10px;
    font-size: 0.9375rem;
  }

  /* Connector: from the right edge of this node to the left edge of the next. */
  .flow__step:not(:last-child)::before {
    top: calc(var(--node) / 2);
    right: 0;
    bottom: auto;
    left: var(--node);
    border-left: 0;
    border-top: 1px solid var(--trace-2);
  }

  .flow__step:not(:last-child)::after {
    top: calc(var(--node) / 2 - 4px);
    right: 0;
    bottom: auto;
    left: auto;
    border-top: 4.5px solid transparent;
    border-bottom: 4.5px solid transparent;
    border-left: 8px solid var(--trace);
    border-right: 0;
  }
}

/* --- 6.6 Flow-down ------------------------------------------------------------------------------------- */

.flowdown__list-title {
  margin: 32px 0 12px;
}

/* --- 6.7 Staffing ------------------------------------------------------------------------------------------ */

.staffing__text > * + * {
  margin-top: 20px;
}

.staffing__text .actions {
  margin-top: 28px;
}

/* --- 6.8 Credentials ------------------------------------------------------------------------------------------ */

.creds {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-2);
}

.creds__item {
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--line);
}

.creds__text {
  max-width: 46ch;
  margin-top: 8px;
}

/* --- 6.9 Mission: a quiet, typographic section ------------------------------------------------------------------ */

.mission__title {
  max-width: 19em;
  font-size: clamp(1.75rem, 1rem + 2.6vw, 3.25rem);
  line-height: 1.08;
}

.mission__cols {
  display: grid;
  gap: 24px var(--gap);
  margin-top: clamp(36px, 5vw, 64px);
}

.mission__cols p {
  padding-top: 20px;
  border-top: 1px solid var(--line-2);
}

@media (min-width: 900px) {
  .mission__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --- 6.10 FAQ ------------------------------------------------------------------------------------------------------ */

.faq__head {
  margin-bottom: 0;
}

@media (min-width: 900px) {
  /* The heading stays in view while the questions scroll past. */
  .faq__head {
    position: sticky;
    top: calc(var(--header-h) + 28px);
  }
}

/* --- 6.11 Call to action ---------------------------------------------------------------------------------------------- */

.cta {
  position: relative;
  display: grid;
  gap: 32px var(--gap);
  padding: clamp(28px, 5vw, 64px);
  background-color: var(--bg-2);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  border: 1px solid var(--line-2);
}

.cta__text p {
  max-width: 52ch;
  margin-top: 20px;
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.55;
}

.cta__actions {
  display: grid;
  gap: 16px;
  justify-items: start;
}

.cta__email {
  font-size: 0.9375rem;
}

@media (min-width: 900px) {
  .cta {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    align-items: end;
  }

  .cta__text { grid-column: span 6; }
  .cta__actions { grid-column: 7 / span 4; justify-items: end; }
  .cta__actions .btn { white-space: nowrap; }   /* the button label stays on one line */
}


/* ==========================================================================
   7. UTILITIES
   ========================================================================== */

/* Hidden on screen, still read by screen readers. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.nowrap { white-space: nowrap; }
.text-ink { color: var(--ink); }
.text-amber { color: var(--amber); }

/* Corner ticks: short brighter marks on the four corners of a box, as on
   the frame of a drawing. Figure frames have them built in; add class
   "ticks" to give them to any other bordered box. The box needs
   position: relative (cards, panels and title blocks already have it). */
.fig__frame::before,
.ticks::before {
  --tick: 9px;
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    linear-gradient(var(--trace), var(--trace)) left top / var(--tick) 1px no-repeat,
    linear-gradient(var(--trace), var(--trace)) left top / 1px var(--tick) no-repeat,
    linear-gradient(var(--trace), var(--trace)) right top / var(--tick) 1px no-repeat,
    linear-gradient(var(--trace), var(--trace)) right top / 1px var(--tick) no-repeat,
    linear-gradient(var(--trace), var(--trace)) left bottom / var(--tick) 1px no-repeat,
    linear-gradient(var(--trace), var(--trace)) left bottom / 1px var(--tick) no-repeat,
    linear-gradient(var(--trace), var(--trace)) right bottom / var(--tick) 1px no-repeat,
    linear-gradient(var(--trace), var(--trace)) right bottom / 1px var(--tick) no-repeat;
}

/* Scroll reveal. js/site.js adds "reveal-on" to <html> and "is-revealed" to
   each [data-reveal] element as it scrolls into view. Nothing is hidden
   unless that script is running. */
.reveal-on [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
}

.reveal-on [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-on [data-reveal] {
    opacity: 1;
    transform: none;
  }
}


/* ==========================================================================
   8. PRINT
   Paper is white, so the palette flips to dark ink on a light sheet. The
   figures read the same tokens, so line drawings flip with it.
   ========================================================================== */

@media print {
  :root {
    --bg: #ffffff;
    --bg-2: #ffffff;
    --bg-3: #f2f4f6;
    --line: #c9d0d7;
    --line-2: #9aa5b0;
    --ink: #000000;
    --ink-2: #1c2228;
    --ink-3: #4b5661;
    --trace: #33414f;
    --trace-2: #5d7286;
    --trace-3: #aab4be;
    --amber: #8a5a00;
    --amber-2: #8a5a00;
    --amber-glow: transparent;
    --grid: transparent;
    --section-pad: 28px;
  }

  html { color-scheme: light; }

  body { font-size: 11pt; }

  .skip-link,
  .nav-toggle,
  .site-nav,
  .hero::before,
  .page-hero::before {
    display: none !important;
  }

  /* The second line covers a page that was scrolled before it was printed:
     on screen the scrolled header turns dark, and paper must not. */
  .site-header,
  .site-header.is-scrolled {
    position: static;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .logo,
  .brand__logo {
    box-shadow: none;
  }

  .btn {
    border: 1px solid var(--ink);
    background: none;
    color: var(--ink);
  }

  .cta {
    background-image: none;
  }

  /* The corner ticks are drawn as a background on a layer that lies over
     its whole box. A print dialog normally has "Background graphics"
     switched off, and browsers then paint any layer that has a background
     plain white, which would cover everything in the box. "exact" asks for
     the layer to be printed as drawn: the ticks and nothing else. */
  .fig__frame::before,
  .ticks::before {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Everything is visible on paper, whatever the scroll position was. */
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Print the answers of closed accordion items too (newer browsers). */
  details::details-content {
    content-visibility: visible;
  }

  .card,
  .panel,
  .fig,
  .titleblock,
  .sheet-id,
  .accordion__item,
  .flow__step {
    break-inside: avoid;
  }

  h1, h2, h3 {
    break-after: avoid;
  }
}


/* ==========================================================================
   9. HIGH CONTRAST
   Windows has "contrast themes" (Settings > Accessibility). With one
   switched on, the browser swaps the site's colours for the visitor's own
   few colours and takes background colours away. Text, borders, buttons
   and form fields come through that well by themselves. The rules below
   repair the places where a colour that is taken away was the only thing
   carrying the meaning. The colour names in them (Highlight, HighlightText,
   CanvasText) stand for the visitor's own theme colours.
   ========================================================================== */

@media (forced-colors: active) {
  /* The pressed filter chip is marked by its amber fill and nothing else.
     Here it gets the theme's own "selected" colours. "forced-color-adjust:
     none" lets these colours through; the ring that shows keyboard focus
     takes the theme's text colour, so it shows on any background. */
  .chip.is-selected,
  .chip[aria-pressed="true"],
  .chip[aria-current="true"] {
    forced-color-adjust: none;
    background: Highlight;
    border-color: Highlight;
    color: HighlightText;
    outline-color: CanvasText;
  }

  /* The current page in the menu is marked by amber alone: underline it. */
  .site-nav__link[aria-current="page"] {
    text-decoration: underline;
  }

  /* A figure is a picture, drawn light on dark, and keeps its own colours
     as a photograph would. Without this, a light theme leaves its pale
     lines on a white background. (The second line is needed because
     browsers switch the theme colours back on for lettering inside a
     drawing.) */
  .fig__frame,
  .fig__frame * {
    forced-color-adjust: none;
  }

  /* The small card icons are drawn in the theme's text colour. */
  .card__icon,
  .card__icon-signal {
    stroke: CanvasText;
  }
}
