/* Shared styles for the secondary pages (404, privacy). The home page inlines its own. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/manrope-latin.woff2) format("woff2");
}

@font-face {
  font-family: "Manrope Fallback";
  font-weight: 400;
  src: local("Arial");
  size-adjust: 102.33%;
  ascent-override: 104.17%;
  descent-override: 29.32%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Manrope Fallback";
  font-weight: 500;
  src: local("Arial");
  size-adjust: 104.21%;
  ascent-override: 102.29%;
  descent-override: 28.79%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Manrope Fallback";
  font-weight: 600 700;
  src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 98.67%;
  ascent-override: 108.04%;
  descent-override: 30.41%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light dark;
  --bg: #F3F5F7;
  --text: #0E1A24;
  --muted: #5A6470;
  --rule: #D4E0E6;
  --accent: #2F6F8F;
  --accent-hover: #2A6481;
  --button: #2F6F8F;
  --button-hover: #2A6481;
  --on-button: #FFFFFF;
  --gutter: clamp(1.5rem, 5vw, 3rem);
}

/* Same scheme logic as the home page: dark follows the system unless theme.js sets data-theme. */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1A24;
    --text: #F3F5F7;
    --muted: #9AA8B4;
    --rule: #22323D;
    --accent: #86ABBE;
    --accent-hover: #A1BECC;
    --button: #F3F5F7;
    --button-hover: #E2E9EE;
    --on-button: #0E1A24;
  }
}

@media screen {
  :root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0E1A24;
    --text: #F3F5F7;
    --muted: #9AA8B4;
    --rule: #22323D;
    --accent: #86ABBE;
    --accent-hover: #A1BECC;
    --button: #F3F5F7;
    --button-hover: #E2E9EE;
    --on-button: #0E1A24;
  }
}

:root[data-theme="light"] { color-scheme: light; }

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", "Manrope Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1, h2, p, ul { margin: 0; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}

a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header { padding-block: 1.25rem; }

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.brand img {
  display: block;
  width: auto;
  height: 28px;
}

.brand .on-dark { display: none; }

@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .on-light { display: none; }
  :root:not([data-theme="light"]) .brand .on-dark { display: block; }
}

@media screen {
  [data-theme="dark"] .brand .on-light { display: none; }
  [data-theme="dark"] .brand .on-dark { display: block; }
}

@media (forced-colors: active) {
  :root[data-theme] .brand .on-light { display: block; }
  :root[data-theme] .brand .on-dark { display: none; }
}

@media (forced-colors: active) and (prefers-color-scheme: dark) {
  :root[data-theme] .brand .on-light { display: none; }
  :root[data-theme] .brand .on-dark { display: block; }
}

main { padding-block: clamp(3rem, 8vw, 6rem); }

.eyebrow {
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .04em;
}

h1 {
  max-width: 20ch;
  margin-top: .5rem;
  font-size: clamp(2rem, 1.5rem + 3vw, 3.5rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.lede {
  max-width: 44ch;
  margin-top: 1.25rem;
  text-wrap: pretty;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 2rem;
  padding: .8rem 1.25rem;
  border: 1px solid transparent; /* Shows as the outline in forced-colors mode. */
  border-radius: .5rem;
  background: var(--button);
  color: var(--on-button);
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color 150ms;
}

.button:hover {
  background: var(--button-hover);
  color: var(--on-button);
}

.prose {
  max-width: 62ch;
  margin-top: 2.5rem;
}

.prose h2 {
  margin-top: 2rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.prose p, .prose ul { margin-top: .75rem; text-wrap: pretty; }

.prose ul { padding-inline-start: 1.25rem; }

.prose li + li { margin-top: .25rem; }

.updated {
  margin-top: 2.5rem;
  color: var(--muted);
  font-size: .9375rem;
}

.footer {
  padding-block: 2rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .8125rem;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}

/* Theme switch, as in the home page footer; the margins keep it from growing the 1.6em line. */
.theme {
  display: inline-flex;
  margin: calc((1.6em - 30px) / 2) 0 calc((1.6em - 30px) / 2) auto;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
}

:root:not([data-theme]) .theme { display: none; }

.theme label {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 44px;
  margin-block: -8px;
  color: var(--muted);
  cursor: pointer;
  transition: color 150ms;
}

.theme label:hover { color: var(--text); }

.theme input {
  position: absolute;
  inset: 0;
  width: 24px;
  height: 24px;
  margin: auto;
  border-radius: 50%;
  appearance: none;
  cursor: pointer;
  transition: background-color 150ms;
}

.theme input:checked {
  background: var(--rule);
  box-shadow: inset 0 0 0 1px var(--muted);
}

.theme input:focus-visible { outline-offset: 1px; }

.theme svg {
  position: relative;
  pointer-events: none;
}

.theme label:has(:checked) { color: var(--text); }

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

@media (forced-colors: active) {
  .theme input:checked { border: 1px solid CanvasText; }
}

@media print {
  .theme { display: none; }
}
