/* The public chrome: header, primary navigation, brand lockup, header actions, the shared button
   family, the phone action bar and sheet, and the site footer.

   Owned responsibility. The landing page drew this chrome first, and its rules lived across
   landing.css, landing-navigation.css, landing-chrome-theme.css and landing-refresh.css, so no other
   public page could wear it without linking the whole landing stylesheet. Every public page now
   carries the same markup (src/public/publicChrome.ts) and links this one file, which reads only
   its own tokens below and the shared layer in theme.css. A page stylesheet sets two things for it
   and nothing else: `--public-chrome-inset`, the band inset its header and footer share with its
   content, on body; and the sections it links to in the nav.

   Load order: after fonts.css and before every page stylesheet, with theme.css last. Page modifiers
   such as the landing's .btn-large are written after these rules and win on order; nothing here
   relies on coming late.

   The light palette below is the public palette, moved here from landing.css's :root so every
   public page has it; theme.css holds the dark values for the same names. */

:root {
  --bg: #ffffff;
  --bg-soft: #f2f5f8;
  --bg-sky: #eaf3ff;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --surface-blue: #edf5ff;
  --text: #0f172a;
  --muted: #4f5b6b;
  --subtle: #667386;
  --line: #d7dde5;
  --line-strong: #aeb9c7;
  --blue: #2563eb;
  --blue-strong: #1d4ed8;
  --blue-soft: #e5f1ff;
  --cyan: #1473ff;
  --green: #3f6212;
  --amber: #574600;
  --red: #c0262d;
  --white: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  /* One elevation language with the console. The geometry is fixed; the ink is a variable so
     theme.css can hand dark mode its own cast and top rim. Public elevation is a suggestion of
     depth, not a drop shadow. */
  --elevation-contact: rgba(15, 23, 42, .04);
  --elevation-ambient: rgba(15, 23, 42, .04);
  --elevation-ambient-strong: rgba(15, 23, 42, .06);
  --elevation-cast: rgba(15, 23, 42, .09);
  --elevation-rim: transparent;
  --shadow-surface: inset 0 1px 0 var(--elevation-rim), 0 1px 2px var(--elevation-contact), 0 4px 12px var(--elevation-ambient);
  --shadow-raised: inset 0 1px 0 var(--elevation-rim), 0 2px 6px var(--elevation-contact), 0 14px 30px var(--elevation-ambient-strong);
  --shadow-overlay: inset 0 1px 0 var(--elevation-rim), 0 8px 18px var(--elevation-ambient-strong), 0 28px 60px var(--elevation-cast);
  --shadow-soft: var(--shadow-raised);
  --shadow-card: var(--shadow-surface);
  --pixel-shadow-sm: var(--shadow-surface);
  --pixel-shadow-md: var(--shadow-surface);
  --pixel-shadow-lg: var(--shadow-raised);
  --pixel-shadow-blue: 0 6px 18px rgba(0, 111, 238, .16);
  --pixel-shadow-hover: 0 10px 24px rgba(0, 111, 238, .14);

  /* Glass. `--glass-fill` is a translucent paint over whatever canvas the page has, `--glass-stroke`
     the rim that keeps a surface findable against a pale backdrop, `--glass-blur` the radius every
     public surface shares. Console surfaces do not read these. */
  /* Header chrome. The glass fill is thin enough for the blur behind it to do something; the solid
     is what a browser without backdrop-filter gets instead. */
  --header-glass: rgba(255, 255, 255, .62);
  --header-solid: rgba(255, 255, 255, .95);
  /* Footer veil, three stops of one colour so the fade never passes through grey. */
  --footer-veil-0: rgba(238, 247, 255, 0);
  --footer-veil-1: rgba(238, 247, 255, .52);
  --footer-veil-2: rgba(238, 247, 255, .94);
  --glass-fill: rgba(255, 255, 255, .72);
  --glass-fill-strong: rgba(255, 255, 255, .86);
  --glass-fill-quiet: rgba(255, 255, 255, .54);
  /* A bright rim all the way round reads as a bevel. The rim is a hairline that exists to keep the
     card findable against a pale backdrop, nothing more. */
  --glass-stroke: rgba(17, 38, 68, .07);
  --glass-edge: rgba(11, 13, 18, .05);
  --glass-highlight: rgba(255, 255, 255, .55);
  --glass-blur: 18px;
  --glass-blur-strong: 28px;
  --glass-saturate: 1.35;

  /* The navigation's ink and accent. The landing page's --landing-muted / --landing-blue /
     --landing-blue-strong alias these, so each colour is stated once. */
  --public-ink-muted: #5d6878;
  --public-accent: #0068e8;
  --public-accent-strong: #004fb8;
}

html[data-theme="dark"] {
  --public-ink-muted: #adbbce;
  --public-accent: #55a7ff;
  --public-accent-strong: #91c1ff;
}

/* ---- Shared ground ------------------------------------------------------------------
   The chrome inherits nothing from the page it sits on. The landing body sets Inter at 16/1.5 and
   an editorial body sets 16/1.68 in a different fallback stack, so the same nav read as two
   different components. Each root states what the landing body used to hand it. */

:is(.public-header, .site-footer, .app-shell, .app-sheet) {
  color: var(--text);
  font-family: Inter, "Inter Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:where(.public-header, .site-footer, .app-shell, .app-sheet),
:where(.public-header, .site-footer, .app-shell, .app-sheet) * {
  box-sizing: border-box;
}

:where(.public-header, .site-footer, .app-shell, .app-sheet) a {
  color: inherit;
}

/* One element-and-pseudo-class step, so a page's bare `:focus-visible` cannot repaint the chrome's
   ring and the theme button's and the action bar's own rings still win over it. */
:where(.public-header, .site-footer, .app-shell, .app-sheet) :is(a, button):focus-visible {
  outline: 2px solid #0068e8;
  outline-offset: 3px;
}

/* ---- Header ------------------------------------------------------------------------ */

.public-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 72px;
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  /* The inset is the page's: the landing centres its bands on 1150px, an article on 1280px, the
     reference on its shell. Header, content and footer read the same token so their edges agree.
     Percentages inside it resolve here, against the body's content box, never against 100vw. */
  padding: 12px var(--public-chrome-inset, 24px);
  border-bottom: 1px solid var(--glass-stroke);
  /* Opaque fallback first: without backdrop-filter this has to be a solid bar, not a see-through one. */
  background: var(--header-solid);
  box-shadow: 0 8px 32px rgba(23, 67, 92, 0.06);
}

/* Frosted, where it is supported. Thin fill, saturation above one, so it reads as glass over the
   page's own canvas rather than as a slightly soft white bar. */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .public-header {
    background: var(--header-glass);
    -webkit-backdrop-filter: blur(var(--glass-blur-strong)) saturate(var(--glass-saturate));
    backdrop-filter: blur(var(--glass-blur-strong)) saturate(var(--glass-saturate));
  }
}

.brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: var(--text);
  text-decoration: none;
  /* The wordmark is the <img>; `.brand-word` beside it is clipped to 1x1px for screen readers, so
     no font here paints a pixel. Brand wordmark: an owned asset, deliberately off the text scale. */
  font-size: 2.3rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 0.86;
  font-synthesis-weight: auto;
  position: relative;
}

.brand-word {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.brand-word-web,
.brand-word-tzm {
  display: inline-block;
  color: currentColor;
}

.brand-word-web {
  color: var(--blue);
}

.brand-logo {
  display: block;
  width: 128px;
  height: 28px;
  /* A soft trailing long-shadow: three drop-shadows at increasing distance and decreasing opacity
     read as light falling away from the mark. `drop-shadow` follows the logo's own alpha shape,
     which a `box-shadow` on an <img> cannot. */
  filter:
    drop-shadow(1px 1px 0 rgba(30, 41, 59, 0.16))
    drop-shadow(2px 2px 2px rgba(30, 41, 59, 0.10))
    drop-shadow(4px 4px 5px rgba(30, 41, 59, 0.06));
}

.public-header__nav {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.5vw, 24px);
  color: var(--public-ink-muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.public-header__nav a {
  position: relative;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
}

.public-header__nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--public-accent);
  opacity: 0;
  transform: scaleX(0.45);
  transition: opacity 160ms ease, transform 160ms ease;
}

.public-header__nav a:hover,
.public-header__nav a.is-active,
.public-header__nav a[aria-current="page"] {
  color: var(--public-accent-strong);
}

.public-header__nav a.is-active::after,
.public-header__nav a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.public-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

.public-header__actions .theme-toggle {
  --theme-control-size: 44px;
  border-width: 2px;
  border-radius: var(--radius-sm);
  box-shadow: var(--pixel-shadow-sm);
}

/* ---- Buttons ------------------------------------------------------------------------
   The public button family. Pages add size modifiers of their own (the landing's .btn-large) after
   this file; paint and states are owned here. */

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0 16px;
  font-family: inherit;
  font-size: 16px;
  /* Actions read at 500. A 700-weight button is shouting at the one place the page has already
     earned attention. */
  font-weight: 500;
  letter-spacing: -0.006em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.btn:hover {
  transform: translate(-1px, -1px);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: white;
  background: var(--blue);
  box-shadow: var(--pixel-shadow-blue);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--blue-strong);
  box-shadow: var(--shadow-surface);
}

.btn-secondary {
  color: var(--text);
  background: var(--surface-blue);
  border-color: var(--line);
}

/* Disabled reads as unavailable and stops answering the pointer: no lift, no press, no hover paint. */
.btn:is(:disabled, [aria-disabled="true"]) {
  cursor: not-allowed;
  opacity: .55;
  transform: none;
  box-shadow: none;
}

.btn-primary:is(:disabled, [aria-disabled="true"]):hover {
  background: var(--blue);
}

.btn-secondary:is(:disabled, [aria-disabled="true"]):hover {
  background: var(--surface-blue);
}

.btn-google {
  gap: 8px;
}

.google-mark {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  padding: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08), 0 1px 0 rgba(255, 255, 255, 0.48);
}

/* Below this width the header keeps only the wordmark and the theme control; the navigation and
   the primary action move to the action bar at the bottom of the viewport, where a thumb can
   reach them. */
@media (max-width: 1120px) {
  .public-header {
    --public-mobile-control-size: 48px;
    isolation: isolate;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 16px;
    padding-block: 12px;
  }

  .public-header__actions .theme-toggle {
    --theme-control-size: var(--public-mobile-control-size);
    min-width: var(--public-mobile-control-size);
    min-height: var(--public-mobile-control-size);
    order: 1;
  }

  .public-header__actions {
    gap: 12px;
  }

  .public-header__actions .btn {
    display: none;
  }

  /* Hidden by the stylesheet, not only by the attribute public-chrome.js sets: that script is
     deferred, so on a phone the links painted across the header for a beat before it ran and read
     as a flash of stray text. The attribute still comes, and keeps the links out of the tab order. */
  .public-header__nav,
  .public-header__nav[hidden] {
    display: none;
  }

  /* The action bar is fixed, so the page needs a floor tall enough to scroll clear of it. */
  body:has(> [data-app-shell]) {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  .brand-logo {
    width: 116px;
    height: auto;
  }

  .google-mark {
    width: 20px;
    height: 20px;
    padding: 2px;
  }
}

/* ---- Action bar -------------------------------------------------------------------- */

.app-shell {
  --app-shell-control: var(--public-mobile-control-size, 48px);
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, var(--glass-highlight), transparent 46%),
    var(--glass-fill-strong);
  box-shadow:
    inset 0 1px 0 var(--glass-stroke),
    var(--shadow-overlay);
}

.app-shell[hidden] {
  display: none;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .app-shell {
    -webkit-backdrop-filter: blur(var(--glass-blur-strong)) saturate(var(--glass-saturate));
    backdrop-filter: blur(var(--glass-blur-strong)) saturate(var(--glass-saturate));
    background:
      linear-gradient(180deg, var(--glass-highlight), transparent 46%),
      var(--glass-fill);
  }
}

.app-shell__sections,
.app-shell__cta {
  min-height: var(--app-shell-control);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  /* Touch feedback is a press, not a hover: a phone has no hover, so a lit state entered on tap
     has nothing to leave it. */
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.app-shell__sections {
  min-width: 0;
  justify-content: flex-start;
  color: var(--text);
  background: var(--glass-fill-quiet);
  box-shadow: inset 0 0 0 1px var(--glass-stroke);
}

.app-shell__sections:active {
  transform: scale(0.97);
}

.app-shell__sections:focus-visible,
.app-shell__cta:focus-visible {
  outline: 2px solid var(--glow-route);
  outline-offset: 3px;
}

.app-shell__icon {
  width: 20px;
  height: 20px;
  flex: none;
  display: grid;
  place-items: center;
}

.app-shell__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.app-shell__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell__cta {
  flex: none;
  color: var(--white);
  background: var(--blue);
}

.app-shell__cta:active {
  transform: scale(0.97);
}

.app-shell__cta .google-mark {
  width: 18px;
  height: 18px;
  flex: none;
  padding: 2px;
  border-radius: 50%;
  background: var(--white);
}

/* ---- Sheet ------------------------------------------------------------------------- */

.app-sheet {
  position: fixed;
  inset: 0;
  z-index: 45;
}

.app-sheet[hidden] {
  display: none;
}

.app-sheet__scrim {
  position: absolute;
  inset: 0;
  background: rgba(6, 12, 22, 0.42);
  opacity: 0;
  transition: opacity 200ms ease;
}

.app-sheet.is-open .app-sheet__scrim {
  opacity: 1;
}

.app-sheet__panel {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  /* dvh rather than vh: on iOS the collapsing address bar makes vh taller than the visible
     viewport, which put the last link under the browser chrome. */
  max-height: min(72dvh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px calc(20px + env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0;
  background:
    linear-gradient(180deg, var(--glass-highlight), transparent 46%),
    var(--glass-fill-strong);
  box-shadow:
    inset 0 1px 0 var(--glass-stroke),
    var(--shadow-overlay);
  transform: translateY(100%);
  transition: transform 220ms cubic-bezier(0.32, 0.72, 0, 1);
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .app-sheet__panel {
    -webkit-backdrop-filter: blur(var(--glass-blur-strong)) saturate(var(--glass-saturate));
    backdrop-filter: blur(var(--glass-blur-strong)) saturate(var(--glass-saturate));
  }
}

.app-sheet.is-open .app-sheet__panel {
  transform: translateY(0);
}

.app-sheet__grip {
  display: block;
  width: 40px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: var(--line-strong);
}

/* The eyebrow idiom: 11px, weight 500, wide tracking, quiet ink. */
.app-sheet__title {
  margin: 0 0 12px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.app-sheet__list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  list-style: none;
}

.app-sheet__list a {
  min-height: var(--public-mobile-control-size, 48px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

.app-sheet__list a::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--line-strong);
}

.app-sheet__list a:active {
  background: var(--glass-fill-quiet);
}

.app-sheet__list a:focus-visible {
  outline: 2px solid var(--glow-route);
  outline-offset: -2px;
}

.app-sheet__list a.is-active,
.app-sheet__list a[aria-current] {
  color: var(--blue-strong);
  background: var(--glass-fill-quiet);
}

.app-sheet__list a.is-active::before,
.app-sheet__list a[aria-current]::before {
  background: var(--blue);
  box-shadow: 0 0 0 4px var(--glow-route-soft);
}

/* The page behind the sheet must not scroll with it. */
body.app-sheet-open {
  overflow: hidden;
}

/* ---- Footer ------------------------------------------------------------------------ */

.site-footer {
  position: relative;
  z-index: 2;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: start;
  padding: 64px var(--public-chrome-inset, 24px) 32px;
  border: 0;
  background: transparent;
}

/* The footer fades up out of the page. The stops are one colour at every alpha, because fading
   between two hues desaturates through the middle and reads as a grey band. No backdrop-filter: a
   filter starts at its element's box edge, a boundary no gradient can soften. */
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
    var(--footer-veil-0) 0%,
    var(--footer-veil-1) 34%,
    var(--footer-veil-2) 72%,
    var(--footer-veil-2) 100%);
}

.site-footer > div,
.site-footer > nav {
  position: relative;
  z-index: 1;
}

/* `> div` also matches `.footer-legal`, which is a div too - the measure meant for the brand blurb
   collapsed the legal strip into a stacked column. Name the brand block. The brand and the link
   columns share one start line. */
.site-footer > div:not(.footer-legal) {
  display: grid;
  align-content: start;
  gap: 16px;
  max-width: 34ch;
}

/* The compact footer brand is a fine-pointer decision: 44px of min-height buys nothing next to a
   mouse and costs the grid its tight stacking. On a touch screen it is the tap target for the link
   that goes home, which is the case the 44px rule exists for. */
.site-footer > div:not(.footer-legal) .brand {
  min-height: 0;
}

@media (pointer: coarse) {
  .site-footer > div:not(.footer-legal) .brand {
    min-height: 44px;
  }
}

.site-footer a {
  position: relative;
  text-decoration: none;
}

.site-footer p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.72);
}

/* The trust marks are a footnote, not a section. */
.site-footer .console-footer__trust {
  height: auto;
  margin-top: 16px;
}

.site-footer nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(148px, max-content));
  gap: 16px 56px;
  color: var(--muted);
  font-weight: 400;
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.72);
}

/* `align-content: start` packs each group's rows to the top, so three columns of different
   lengths share one 44px rhythm instead of each spreading across the tallest column's height. */
.footer-link-group {
  display: grid;
  align-content: start;
  gap: 0;
  min-width: 148px;
}

.footer-link-group > span {
  margin-bottom: 8px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

/* The 44px target is the row height. Footer navigation is navigation, not prose; 14px reads as a
   list you scan. */
.footer-link-group a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.004em;
}

.site-footer a:hover,
.footer-link-group a:focus-visible,
.footer-link-group a[aria-current="page"] {
  color: var(--blue-strong);
}

/* The copyright and what Webtzm does with a Google account - the two things a visitor checks before
   signing in - below the link columns and above nothing else. */
.footer-legal {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

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

.footer-assurances li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 500;
}

/* A tick, not a shield badge: the claim is the content, and a coloured chip around each one would
   say the same thing twice. */
.footer-assurances li::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
}

@media (max-width: 900px) {
  .site-footer {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .site-footer nav {
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 24px 16px;
  }

  /* The lede sat at a 360px measure inside a 342px column, so it wrapped one word short of the
     edge on every line. */
  .site-footer p {
    max-width: none;
  }
}

/* Three link groups in a two-column grid leave the last one stranded beside an empty half-row. The
   trailing group takes the full width and lays its own links across both columns, so the block
   ends flush instead of ragged. */
@media (max-width: 620px) {
  .site-footer nav {
    gap: 20px 16px;
  }

  .footer-link-group:last-child {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-link-group:last-child > span {
    grid-column: 1 / -1;
  }

  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---- Dark ---------------------------------------------------------------------------
   Paint only; the geometry above is shared by both themes. The header's fill comes from
   --header-glass / --header-solid, which theme.css redefines for dark, so no background here: an
   override at this specificity would beat the @supports rule that frosts it. */

html[data-theme="dark"] .public-header {
  border-color: var(--glass-stroke);
  box-shadow: 0 8px 32px rgba(2, 8, 20, .32);
}

html[data-theme="dark"] .public-header__actions .theme-toggle {
  border-color: #38506f;
  color: var(--public-accent-strong);
  background: #14243a;
  box-shadow: var(--shadow-surface);
}

html[data-theme="dark"] .brand-logo {
  filter: drop-shadow(2px 2px 0 rgba(0, 114, 255, .28));
}

/* In dark mode `--blue` is the light accent that reads on a dark ground, so white on it is 2.51:1.
   The filled button takes a deeper blue that white reads on; the action bar keeps the light accent
   with dark ink on it, 7.3:1. */
html[data-theme="dark"] .btn-primary {
  border-color: #1a5fab;
  color: #fff;
  background: #1f6fc7;
}

html[data-theme="dark"] .btn-primary:hover {
  border-color: #164f90;
  color: #fff;
  background: #195ca6;
}

html[data-theme="dark"] .btn-primary:is(:disabled, [aria-disabled="true"]):hover {
  border-color: #1a5fab;
  background: #1f6fc7;
}

html[data-theme="dark"] .app-shell__cta {
  color: #071525;
}

html[data-theme="dark"] .site-footer :is(p, nav) {
  text-shadow: none;
}

html[data-theme="dark"] .site-footer a {
  color: var(--public-ink-muted);
}

html[data-theme="dark"] .site-footer .footer-link-group a:focus-visible {
  color: var(--blue-strong);
}

html[data-theme="dark"] .site-footer a:hover,
html[data-theme="dark"] .site-footer .footer-link-group a[aria-current="page"] {
  color: var(--public-accent-strong);
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .public-header__nav a::after,
  .app-shell__sections,
  .app-shell__cta,
  .app-sheet__scrim,
  .app-sheet__panel {
    transition: none;
  }

  .app-shell__sections:active,
  .app-shell__cta:active {
    transform: none;
  }
}
