/* ldu/base.css: the document layer in the LDU look (slice 1).

   Element selectors only (specificity 0,0,1 or a bare pseudo), so a class in comms/* or ldu-ds always wins; this
   only styles what nothing styled. Colours and sizes are all var() from vendor/ldu-ds/css/tokens.css and
   ldu/tokens.css. Body font, size and line-height are left to ldu-ds (the same values), and the reduced-motion
   rule stays in vendor/ldu-ds/css/base.css. */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

/* One link everywhere (Milan, 16 Nov: "the lilac text with on hover the underline"): lilac, its underline fading in on hover. Page CSS does
   not recolour links. A link inside running text keeps a quiet underline at rest, because lilac is only 2.77:1 against the ink text beside
   it (1.47:1 dark) and colour alone may not mark a link there (WCAG 1.4.1; Milan, 16 Nov). Buttons, chips, cards and tabs are not links. */
a {
  color: var(--accent);
  text-decoration-line: underline;   /* longhands: older Safari drops the shorthand and keeps the underline showing (Paul, 17 Nov) */
  text-decoration-thickness: 1px;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}
:where(p, blockquote, small, label, .mk-legal__sec, .ldu-empty__text, .auth__card-text) a:where(:not([class])),
.prose a:where(:not([class])) { text-decoration-line: underline; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }   /* .prose: over ldu-ds's none */
a:hover { text-decoration-color: currentColor; }

/* keyboard focus is always visible, one ring for everything */
:focus-visible {
  outline: var(--ring-w) solid var(--ring);
  outline-offset: var(--ring-offset);
}

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

/* the hover contract: colour, background or border, 150ms, never lift or shadow.
   Rules in comms/* set the hover colours; this makes them ease in. */
a, button, [role="button"], summary {
  transition: color var(--dur), background-color var(--dur), border-color var(--dur), text-decoration-color var(--dur);
}

/* Scrollbars, the platform default (Milan, 3 Nov: the client card's quiet bar "as the default styling for these scroll indicators"): a 4px
   rounded --ink-4 bar on a faint track. ldu-ds colours every scrollbar with scrollbar-color, and Chrome then ignores the drawn
   ::-webkit-scrollbar, so it is reset to auto where the drawn one is supported; Firefox gets the same colours. A scroll area hidden on
   purpose (scrollbar-width: none, or ::-webkit-scrollbar display: none on a class) stays hidden. */
@supports selector(::-webkit-scrollbar) {
  * { scrollbar-width: auto; scrollbar-color: auto; }
}
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-color: var(--ink-4) color-mix(in srgb, var(--line) 50%, transparent); }
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { border: 4px solid transparent; border-radius: 999px; background: color-mix(in srgb, var(--line) 50%, transparent) padding-box; }
::-webkit-scrollbar-thumb { border: 4px solid transparent; border-radius: 999px; background: var(--ink-4) padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
