/*
  SFS base: document, typography, links, and low-level resets.
  Component variants stay in their component files.
  Docs: _deploy/css-compartmentalisation-readable-map-20260704.md
  Related: _deploy/css-compartmentalisation-worklog-20260704.md; _deploy/css-compartmentalisation-verification-20260704.md
*/

* {
  box-sizing: border-box;
}

html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}

h2 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.015em;
}

h3 {
  margin: 26px 0 10px;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 650;
  color: var(--text);
}

p {
  margin: 0 0 12px;
}

a,
a:visited {
  color: var(--brand);
}

a:hover {
  color: #244761;
}

/* style-pass-2n: reduce blue/link visual weight.
   Blue remains the accent, but ordinary text and file names should not shout. */

a,
a:visited {
  color: color-mix(in srgb, var(--brand-strong) 72%, var(--text));
  font-weight: 500;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  background: #f1f3f5;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 1px 4px;
  word-break: break-word;
}

@media (prefers-color-scheme: dark) {
  a,
  a:visited {
    color: color-mix(in srgb, var(--brand-strong) 62%, var(--text));
  }

  code {
    background: var(--surface-soft);
    border-color: var(--line);
  }
}

.muted {
  color: var(--muted);
  font-size: 0.94em;
}
