/*
 * ShiftMed shell CSS (SPEC.md 5.1, 5.5 and 10.3). Shell classes start with .smx-, so uploaded
 * content can't collide with them. Element defaults (headings, links, focus, box sizing) apply
 * to the whole page, uploaded content included, but are scoped with :where(.smx-body), which
 * adds no specificity: an uploaded stylesheet's own a {}, h1 {} or * {} rules always win.
 * tests/unit/shell-css.test.ts enforces both forms. Colors and font stacks come only from the
 * var(--sm-...) tokens in tokens.css, which the layout loads first.
 *
 * Fonts are self-hosted (assets/fonts, SIL OFL 1.1, see the OFL-*.txt files there) and load
 * from this origin only. The url()s are relative, so they resolve under the same content-hashed
 * /static/<hash>/ path as this file. Subsets and ranges match Google Fonts: the latin-ext file
 * downloads only when a page uses one of its characters.
 */

@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/barlow-semi-condensed-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: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/barlow-semi-condensed-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: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/barlow-semi-condensed-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: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/barlow-semi-condensed-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: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/poppins-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: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/poppins-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: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/poppins-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: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/poppins-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: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins-700-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: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins-700-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;
}

/* Page base: Poppins Medium body text in Charcoal on White. */
.smx-body {
  margin: 0;
  background: var(--sm-white);
  color: var(--sm-charcoal);
  font-family: var(--sm-font-body);
  font-weight: 500;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

:where(.smx-body) *,
:where(.smx-body) *::before,
:where(.smx-body) *::after {
  box-sizing: border-box;
}

/* Headlines (h1 to h3): Barlow Semi Condensed Medium. */
:where(.smx-body) :is(h1, h2, h3) {
  margin: 0 0 0.5em;
  font-family: var(--sm-font-head);
  font-weight: 500;
  line-height: 1.15;
}

:where(.smx-body) h1 {
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
}

:where(.smx-body) h2 {
  font-size: clamp(1.75rem, 1.25rem + 2vw, 2.5rem);
}

:where(.smx-body) h3 {
  font-size: clamp(1.375rem, 1.125rem + 1vw, 1.75rem);
}

/* Subheads (h4 to h6): Poppins Bold. */
:where(.smx-body) :is(h4, h5, h6) {
  margin: 0 0 0.5em;
  font-family: var(--sm-font-body);
  font-weight: 700;
  line-height: 1.3;
}

:where(.smx-body) a {
  color: var(--sm-purple);
  text-underline-offset: 0.15em;
}

/* Visible focus for keyboard users (WCAG 2.2 AA). */
:where(.smx-body) :focus-visible {
  outline: 3px solid var(--sm-purple);
  outline-offset: 2px;
}

.smx-container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding: 2rem 1.25rem;
}

/* The slim "Prepared for <prospect>" bar above microsite content (SPEC.md 13). */
.smx-prepared {
  background: var(--sm-gray-light);
  font-size: 0.875rem;
}

.smx-prepared .smx-container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.5rem;
}

.smx-prepared-text {
  margin: 0;
  padding-block: 0.25rem;
}

/*
 * "Your ShiftMed contact" (SPEC.md 13): a <details> disclosure. The card opens in the bar's flow,
 * below the button, so it never covers the page or the next focused control, and it is never
 * wider than the bar. Text pairs: White on the Purple button, Charcoal and Purple on the White card.
 */
.smx-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: 100%;
  margin-left: auto;
}

.smx-contact-toggle {
  padding: 0.25rem 1rem;
  border-radius: var(--sm-radius-pill);
  background: var(--sm-purple);
  color: var(--sm-white);
  cursor: pointer;
  list-style: none;
}

.smx-contact-toggle::-webkit-details-marker {
  display: none;
}

.smx-contact-card {
  width: min(22rem, 100%);
  margin-top: 0.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--sm-radius-sm);
  background: var(--sm-white);
  overflow-wrap: anywhere;
}

.smx-contact-card p {
  margin: 0;
}

.smx-contact-name {
  font-weight: 700;
}

.smx-contact-card p + .smx-contact-line {
  margin-top: 0.5rem;
}

.smx-contact-label {
  font-weight: 700;
}

/*
 * The cross-page nav of a multi-page site (SPEC.md 13 and 5.5, docs/decisions/73-cross-page-nav.md):
 * a <details> disclosure, closed by default, so below 62rem the links sit behind the "Site pages"
 * toggle with no script. From 62rem, where the browser can style ::details-content, the toggle is
 * hidden and the links always show as a top nav. Elsewhere it stays a disclosure, so every link is
 * still reachable. Text pairs: Purple and Charcoal on White.
 */
.smx-pages {
  border-bottom: 1px solid var(--sm-gray-light);
  background: var(--sm-white);
}

.smx-pages-menu {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding: 0.5rem 1.25rem;
}

.smx-pages-toggle {
  display: inline-block;
  padding: 0.25rem 1rem;
  border: 2px solid var(--sm-purple);
  border-radius: var(--sm-radius-pill);
  color: var(--sm-purple);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

/* The pill has no disclosure triangle, as with the contact toggle: older WebKit draws one. */
.smx-pages-toggle::-webkit-details-marker {
  display: none;
}

.smx-pages-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  padding: 0.5rem 0 0;
  list-style: none;
}

.smx-pages-list a {
  display: inline-block;
  padding-block: 0.25rem;
}

.smx-pages-list a[aria-current="page"] {
  color: var(--sm-charcoal);
  font-weight: 700;
}

@media (min-width: 62rem) {
  @supports selector(::details-content) {
    .smx-pages-toggle {
      display: none;
    }

    .smx-pages-menu::details-content {
      content-visibility: visible;
    }

    .smx-pages-list {
      flex-flow: row wrap;
      gap: 0.25rem 1.5rem;
      padding-top: 0;
    }
  }
}

/* The wrapper around uploaded microsite content (a custom element, inline by default). */
.smx-content {
  display: block;
}

/*
 * Site chrome (SPEC.md 5.3 and 5.5): the header and footer built from the chrome setting.
 * Desktop layout from 62rem (992 px, where the live site's Bootstrap nav expands); below that the
 * menus and buttons collapse behind the "Menu" toggler (see the media query further down).
 */
.smx-utility-list,
.smx-menu-list,
.smx-menu-items,
.smx-footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.smx-header {
  border-bottom: 1px solid var(--sm-gray-light);
  background: var(--sm-white);
}

/* Skip link: off screen until focused, then shown at the top left. */
.smx-skip-link {
  position: absolute;
  z-index: 20;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--sm-radius-sm);
  background: var(--sm-white);
  color: var(--sm-purple);
}

/*
 * The link shows over the Purple utility bar, so its focus ring is Charcoal on the link's White
 * background, framed by a White band, and contrasts on both sides whatever sits behind it.
 */
.smx-skip-link:focus-visible {
  outline-color: var(--sm-charcoal);
  outline-offset: 0;
  box-shadow: 0 0 0 6px var(--sm-white);
}

.smx-skip-link:not(:focus) {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Utility bar and footer: White text on Purple, with a White focus ring. */
.smx-utility,
.smx-footer {
  background: var(--sm-purple);
  color: var(--sm-white);
}

.smx-utility a,
.smx-footer a {
  color: var(--sm-white);
}

.smx-utility :focus-visible,
.smx-footer :focus-visible {
  outline-color: var(--sm-white);
}

.smx-utility-list,
.smx-mainnav,
.smx-footer-inner {
  display: flex;
  flex-wrap: wrap;
  max-width: 72rem;
  margin-inline: auto;
  padding: 0.5rem 1.25rem;
}

.smx-utility-list {
  justify-content: flex-end;
  gap: 0.25rem 1.5rem;
  font-size: 0.875rem;
}

.smx-mainnav {
  align-items: center;
  gap: 1rem 2rem;
  padding-block: 1rem;
}

.smx-logo {
  display: inline-flex;
  flex: none;
}

/* Reserved for the official logo file (SPEC.md 5.2: at least 100 px wide). */
.smx-logo-slot {
  display: block;
  width: 140px;
  height: 40px;
}

.smx-menu-list,
.smx-legal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.smx-menu {
  position: relative;
}

.smx-menu-label {
  cursor: pointer;
}

.smx-menu-items {
  position: absolute;
  z-index: 10;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 14rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--sm-gray-light);
  border-radius: var(--sm-radius-sm);
  background: var(--sm-white);
}

.smx-menu-items li + li,
.smx-footer-list li + li {
  margin-top: 0.375rem;
}

/* The panel the mobile toggler controls. On desktop it is just the rest of the nav row. */
.smx-nav-panel {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}

.smx-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.smx-nav-toggle {
  display: none;
}

/* Three bars drawn in Purple, decorative only (the button's name is its "Menu" text). */
.smx-nav-toggle-icon {
  width: 1.125rem;
  height: 2px;
  background: var(--sm-purple);
  box-shadow:
    0 -6px 0 var(--sm-purple),
    0 6px 0 var(--sm-purple);
}

/*
 * Below 62rem: the toggler shows (once site-nav.js has removed its hidden attribute) and the
 * panel opens below the logo row as a full-width column. The menus open in place, pushing the
 * rest of the panel down, so nothing overlaps. Without the script the toggler stays hidden and
 * the panel stays open.
 */
@media (max-width: 61.98rem) {
  .smx-mainnav {
    column-gap: 1rem;
  }

  .smx-nav-toggle:not([hidden]) {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    padding: 0.5rem 1rem;
    border: 2px solid var(--sm-purple);
    border-radius: var(--sm-radius-pill);
    background: var(--sm-white);
    color: var(--sm-purple);
    font: inherit;
    cursor: pointer;
  }

  .smx-nav-toggle:not([hidden])[aria-expanded="false"] + .smx-nav-panel {
    display: none;
  }

  .smx-nav-panel {
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .smx-menu-list {
    flex-direction: column;
    gap: 0.75rem;
  }

  .smx-menu-items {
    position: static;
    min-width: 0;
    margin-top: 0.5rem;
    padding: 0 0 0 1rem;
    border: 0;
  }

  .smx-actions {
    margin-left: 0;
  }
}

/* Primary button: a Purple pill with White text. */
.smx-button {
  display: inline-block;
  padding: 0.625rem 1.5rem;
  border-radius: var(--sm-radius-pill);
  background: var(--sm-purple);
  color: var(--sm-white);
  font-family: var(--sm-font-body);
  font-weight: 500;
  text-decoration: none;
}

.smx-footer-inner {
  gap: 2rem 3rem;
  padding-block: 2.5rem;
}

.smx-footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
}

.smx-footer-heading {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.smx-footer-legal {
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--sm-white);
  padding-block: 1.25rem;
}

.smx-legal-list li + li {
  margin-top: 0;
}

.smx-valid-through,
.smx-copyright {
  margin: 0;
}

/*
 * Access page (SPEC.md 6): a Light Gray hero with the headline, a supporting line and one White
 * card holding the work email form. Text pairs are Charcoal on Light Gray, Charcoal and Purple on
 * White, and White on the Purple button, all in tests/unit/text-color-pairs.ts.
 */
.smx-access {
  background: var(--sm-gray-light);
}

.smx-access-inner {
  max-width: 40rem;
  padding-block: 3rem 4rem;
}

/* A link's email step uses the site title as this heading, so long unbroken words must wrap. */
.smx-access-inner h1 {
  overflow-wrap: anywhere;
}

.smx-access-intro {
  margin: 0 0 2rem;
  font-size: 1.125rem;
}

.smx-access-card {
  padding: 1.5rem;
  border-radius: var(--sm-radius-card);
  background: var(--sm-white);
}

/*
 * The continue offers for a returning device (story 9 part 3): one Purple pill link per granted
 * site, above the email form. A long title wraps inside the pill rather than overflowing.
 */
.smx-access-continue {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.smx-access-continue-link {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.smx-access-other {
  margin: 1.5rem 0 1rem;
}

.smx-access-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

/* The label wraps its text and the field, and takes the row's free width beside the button. */
.smx-access-field {
  display: flex;
  flex: 1 1 14rem;
  flex-direction: column;
  min-width: 0;
}

.smx-access-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

/* The field's border is Charcoal, so its edge contrasts with White (WCAG 2.2 1.4.11). */
.smx-access-input {
  width: 100%;
  min-width: 0;
  padding: 0.625rem 1rem;
  border: 2px solid var(--sm-charcoal);
  border-radius: var(--sm-radius-sm);
  background: var(--sm-white);
  color: var(--sm-charcoal);
  font: inherit;
}

.smx-access-submit {
  flex: none;
  border: 0;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
}

.smx-access-error {
  margin-top: 0.75rem;
  font-weight: 700;
}

.smx-access-error:empty {
  margin-top: 0;
}

/*
 * The one-time code step (SPEC.md 7.6) reuses the access card. Under the code form: the resend
 * button, Purple text and border on White, and the link back to the email step.
 */
.smx-code-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 1.5rem;
}

.smx-code-resend {
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--sm-purple);
  border-radius: var(--sm-radius-pill);
  background: var(--sm-white);
  color: var(--sm-purple);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.smx-access-privacy {
  margin: 1rem 0 0;
  font-size: 0.875rem;
}

/*
 * The honeypot (SPEC.md 7.4): positioned off screen. The markup (tabindex="-1" and an aria-hidden
 * wrapper) keeps it out of the tab order and the accessibility tree.
 */
.smx-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/*
 * Markdown pages (SPEC.md 10.3, story 15). The pipeline writes the page header first, then the
 * section nav and the content. Everything after the header is a centered reading column; the
 * column rules have zero specificity, or (0,0,1) for headings, so the upload's own rules, which
 * come later in the page, win. Blocks are wider. Text pairs: Charcoal on White and Light Gray,
 * Purple on White and Light Gray, White on Purple.
 */
.smx-page-header,
:where(.smx-page-header) ~ * {
  width: min(48rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

/*
 * Specificity (0,0,1), the same as the shell's heading defaults above, whose margins would
 * otherwise beat the column's centering.
 */
:where(.smx-page-header) ~ :is(h1, h2, h3, h4, h5, h6) {
  margin-inline: auto;
}

.smx-page-header {
  padding-top: 2rem;
}

/* The title when a hero block holds the page's H1: a paragraph that looks like the H1. */
.smx-page-title {
  margin: 0 0 0.5em;
  font-family: var(--sm-font-head);
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  font-weight: 500;
  line-height: 1.15;
}

.smx-hero-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 28rem;
  margin-bottom: 1.5rem;
  border-radius: var(--sm-radius-card);
  object-fit: cover;
}

:where(.smx-page-header) ~ * :where(img) {
  max-width: 100%;
  height: auto;
}

.smx-section-nav {
  margin-block: 1rem 2rem;
  padding-block: 0.75rem;
  border-block: 1px solid var(--sm-gray-light);
}

.smx-section-nav ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* A task list item: its disabled checkbox stands in for the bullet. */
.smx-task {
  list-style: none;
}

.smx-task > input {
  margin: 0 0.5rem 0 -1.5rem;
}

/* The ShiftMed blocks: hero, stats, cards and cta. */
.smx-page-header ~ .smx-block {
  width: min(72rem, calc(100% - 2.5rem));
  margin-block: 2.5rem;
}

.smx-block > :last-child {
  margin-bottom: 0;
}

.smx-hero,
.smx-cta {
  padding: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  border-radius: var(--sm-radius-card);
  overflow-wrap: anywhere;
}

/* Hero: a Barlow Semi Condensed headline and supporting line on Light Gray. */
.smx-hero {
  background: var(--sm-gray-light);
}

.smx-hero :is(h1, h2) {
  font-family: var(--sm-font-head);
  font-weight: 500;
}

.smx-hero p {
  max-width: 40rem;
  font-size: 1.125rem;
}

/* Every link in a hero or cta block is a call to action: a pill button on its own line. */
.smx-block [data-smx-cta] {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 1rem;
  padding: 0.625rem 1.5rem;
  border-radius: var(--sm-radius-pill);
  font-family: var(--sm-font-body);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
}

.smx-hero [data-smx-cta] {
  background: var(--sm-purple);
  color: var(--sm-white);
}

/* Stats: each figure in Barlow Semi Condensed above its label. */
.smx-stats ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
  gap: 1.5rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.smx-stats li > span {
  display: block;
}

.smx-stats li > span:first-child {
  color: var(--sm-purple);
  font-family: var(--sm-font-head);
  font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  font-weight: 500;
  line-height: 1.1;
}

/* Cards: Light Gray panels with the card radius, side by side where they fit. */
.smx-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: 1.5rem;
}

.smx-card {
  padding: 1.5rem;
  border-radius: var(--sm-radius-card);
  background: var(--sm-gray-light);
  overflow-wrap: anywhere;
}

.smx-card > :last-child {
  margin-bottom: 0;
}

/* Cta: White text on Purple, with a White pill button and a White focus ring. */
.smx-cta {
  background: var(--sm-purple);
  color: var(--sm-white);
}

.smx-cta a {
  color: var(--sm-white);
}

.smx-cta [data-smx-cta] {
  background: var(--sm-white);
  color: var(--sm-purple);
}

.smx-cta :focus-visible {
  outline-color: var(--sm-white);
}

/*
 * Print and save to PDF (SPEC.md 13, docs/decisions/245-lazy-images-and-print-stylesheet.md).
 * The header, the cross-page and in-page navs and the contact button are left out; the "Prepared
 * for" line, the content and the footer print in Charcoal on White, since browsers drop
 * backgrounds by default. A content link to an https page prints its URL after it, so the paper
 * copy still says where it goes; mailto:, tel:, in-page and relative links don't (their text says
 * enough, or the URL would mean nothing on paper). The upload's own colors are its own: only the
 * shell and the Markdown blocks are recolored.
 */
@media print {
  .smx-header,
  .smx-pages,
  .smx-section-nav,
  .smx-contact {
    display: none;
  }

  .smx-body,
  .smx-prepared,
  .smx-footer,
  .smx-hero,
  .smx-card,
  .smx-cta {
    background: var(--sm-white);
    color: var(--sm-charcoal);
  }

  .smx-prepared {
    border-bottom: 1px solid var(--sm-charcoal);
  }

  .smx-footer {
    border-top: 1px solid var(--sm-charcoal);
  }

  .smx-footer a,
  .smx-cta a,
  .smx-stats li > span:first-child {
    color: var(--sm-charcoal);
  }

  .smx-footer-legal {
    border-top-color: var(--sm-gray-light);
  }

  .smx-card,
  .smx-cta {
    border: 1px solid var(--sm-gray-light);
  }

  .smx-block [data-smx-cta] {
    border: 1px solid var(--sm-charcoal);
    background: var(--sm-white);
    color: var(--sm-charcoal);
  }

  .smx-content a[href^="https:" i]::after {
    content: " (" attr(href) ")";
    overflow-wrap: anywhere;
  }

  .smx-content :is(img, figure, .smx-card, .smx-stats li) {
    break-inside: avoid;
  }

  .smx-content :is(h1, h2, h3, h4, h5, h6) {
    break-after: avoid;
  }
}
