/* The public pages (about, privacy, 404). Same tokens and type as the app: src/styles/tokens.css. */
@font-face {
  font-family: "DM Sans Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  src: url(site-dm-sans-n-pgipR-Zw.woff2) format("woff2-variations");
  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: "Newsreader Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(site-newsreader-YpgTIdmjzH.woff2) format("woff2-variations");
  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;
}

:root {
  color-scheme: light;
  --font-sans: "DM Sans Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Newsreader Variable", ui-serif, Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --paper: #faf9f5;
  --ink: #1f1e1d;
  --text: #0b0b0b;
  --text-2: #52514e;
  --text-3: #6b6a65;
  --surface-2: #ffffff;
  --border: rgba(11, 11, 11, 0.1);
  --border-strong: rgba(11, 11, 11, 0.2);
  --hover: rgba(11, 11, 11, 0.05);
  --accent: #2a78d6;
  --accent-text: #184f95;
  --code-bg: rgba(11, 11, 11, 0.05);
  --primary-bg: #1f1e1d;
  --primary-fg: #faf9f5;
  --shadow: 0 0 0 1px var(--border), 0 1px 2px rgba(11, 11, 11, 0.04), 0 8px 24px rgba(11, 11, 11, 0.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0b0b0b;
    --ink: #f0efec;
    --text: #f0efec;
    --text-2: #c3c2b7;
    --text-3: #a3a29b;
    --surface-2: #1a1a19;
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.2);
    --hover: rgba(255, 255, 255, 0.06);
    --accent-text: #6da7ec;
    --code-bg: rgba(255, 255, 255, 0.08);
    --primary-bg: #f0efec;
    --primary-fg: #0b0b0b;
    --shadow: 0 0 0 1px var(--border), 0 8px 24px rgba(0, 0, 0, 0.4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0b0b0b;
  --ink: #f0efec;
  --text: #f0efec;
  --text-2: #c3c2b7;
  --text-3: #a3a29b;
  --surface-2: #1a1a19;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --hover: rgba(255, 255, 255, 0.06);
  --accent-text: #6da7ec;
  --code-bg: rgba(255, 255, 255, 0.08);
  --primary-bg: #f0efec;
  --primary-fg: #0b0b0b;
  --shadow: 0 0 0 1px var(--border), 0 8px 24px rgba(0, 0, 0, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 80px;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body.site {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 16px/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a {
  color: var(--accent-text);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
img {
  max-width: 100%;
  height: auto;
}
code {
  font: 0.88em/1 var(--font-mono);
  background: var(--code-bg);
  border-radius: 4px;
  padding: 0.12em 0.36em;
  white-space: nowrap;
}
/* Long words and addresses wrap instead of pushing the page wider than a phone. */
.doc {
  overflow-wrap: anywhere;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  background: var(--primary-bg);
  color: var(--primary-fg);
  padding: 10px 14px;
  border-radius: 8px;
}
.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 640px) {
  .wrap {
    padding: 0 24px;
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  margin-right: auto;
  min-height: 44px;
}
.brand svg {
  width: 28px;
  height: 28px;
  flex: none;
}
.site-nav {
  display: flex;
  gap: 2px;
}
.site-nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  padding: 10px 10px;
  border-radius: 6px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-nav a:hover {
  background: var(--hover);
  color: var(--text);
}
.site-nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}
@media (max-width: 560px) {
  /* Hidden from sight on phones, kept as the link's accessible name. */
  .brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .site-nav a {
    padding: 10px 8px;
  }
}

/* Buttons: inverted ink for the one primary action, hairline for the rest. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  border: 0;
  box-shadow: inset 0 0 0 1px var(--border-strong);
  background: transparent;
  color: var(--text);
  font: 500 15px/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease;
}
.btn:hover {
  background: var(--hover);
  text-decoration: none;
}
.btn-primary {
  background: var(--primary-bg);
  color: var(--primary-fg);
  box-shadow: none;
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--primary-bg) 86%, var(--paper));
}
.btn-sm {
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
}
.header-row .btn-sm {
  white-space: nowrap;
}
@media (max-width: 420px) {
  .header-row .btn-sm {
    display: none;
  }
}

/* Document */
.doc {
  max-width: 46rem;
  padding-top: 24px;
  padding-bottom: 72px;
}
.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0 0 28px;
  font-size: 13px;
  color: var(--text-3);
}
/* The page's own list indent must not push the path out of line with the heading under it. */
.doc .crumbs ol {
  padding-left: 0;
}
.doc .crumbs li {
  margin: 0;
}
.crumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--text-3);
}
.crumbs a {
  color: var(--text-2);
}
.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
}
h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 18px;
}
h2 {
  font-size: clamp(1.55rem, 1.25rem + 1.2vw, 2rem);
  line-height: 1.2;
  margin: 56px 0 14px;
}
h3 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 30px 0 8px;
}
.lede {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0 0 20px;
  text-wrap: pretty;
}
.meta {
  font-size: 14px;
  color: var(--text-3);
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
}
p,
li {
  text-wrap: pretty;
}
.doc p,
.doc ul,
.doc ol {
  margin: 0 0 14px;
}
.doc ul,
.doc ol {
  padding-left: 1.3em;
}
.doc li {
  margin: 0 0 8px;
}
.doc li::marker {
  color: var(--text-3);
}
.hero-shot {
  margin: 40px -16px 8px;
}
.hero-shot img {
  display: block;
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
@media (min-width: 900px) {
  .hero-shot {
    margin: 48px -9rem 8px;
  }
}
@media (max-width: 640px) {
  .hero-shot {
    margin: 32px 0 8px;
  }
}
.toc {
  margin: 40px 0 0;
  padding: 18px 20px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--border);
}
.toc h2 {
  font: 600 13px/1.4 var(--font-sans);
  letter-spacing: 0;
  color: var(--text-2);
  margin: 0 0 8px;
}
.toc ol {
  margin: 0;
  padding-left: 1.2em;
  columns: 2 14rem;
  column-gap: 24px;
}
.toc li {
  margin: 0 0 4px;
  break-inside: avoid;
}
.table-wrap {
  overflow-x: auto;
  margin: 0 0 16px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--border);
}
thead th {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
}
tbody th {
  font-weight: 400;
  width: 34%;
}

/* Share */
.share {
  margin-top: 64px;
  padding: 24px;
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
.share h2 {
  margin-top: 0;
}
.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 12px;
}
.share-link {
  flex: 1 1 16rem;
  display: flex;
}
.share-link input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  border: 0;
  box-shadow: inset 0 0 0 1px var(--border-strong);
  background: var(--paper);
  color: var(--text);
  font: 14px var(--font-mono);
}
.share-targets {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 !important;
  margin: 0 !important;
}
.share-targets li {
  margin: 0 !important;
}
.share-status {
  min-height: 1.5em;
  margin: 10px 0 0 !important;
  font-size: 14px;
  color: var(--text-2);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  font-size: 14px;
  color: var(--text-2);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: space-between;
}
.footer-row p {
  margin: 0;
}
.footer-row nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}
.footer-row nav a {
  color: var(--text-2);
  display: inline-block;
  padding: 6px 0;
}

.not-found {
  min-height: 60vh;
  padding-top: 12vh;
}

/*
  High-contrast modes drop shadows and backgrounds, which is how every outline on these pages
  is drawn. Real borders stand in for them so buttons and boxes keep their edges.
*/
@media (forced-colors: active) {
  .btn,
  .toc,
  .share,
  .share-link input,
  .hero-shot img {
    border: 1px solid CanvasText;
  }
  .btn-primary {
    border-color: Highlight;
  }
  .site-header {
    border-bottom: 1px solid CanvasText;
  }
}

/* On paper: the words, in black on white, with where each link goes written out. */
@media print {
  /* Every way the dark theme can be on is named, or a dark-mode reader prints white on white. */
  :root,
  :root:not([data-theme="light"]),
  :root[data-theme="dark"] {
    color-scheme: light;
    --paper: #fff;
    --ink: #000;
    --text: #000;
    --text-2: #222;
    --text-3: #444;
    --surface-2: #fff;
    --border: #999;
    --border-strong: #666;
    --accent-text: #123f7a;
    --code-bg: #eee;
  }
  .site-header,
  .site-footer nav,
  .skip,
  .cta,
  .share,
  .toc {
    display: none !important;
  }
  body.site {
    font-size: 11pt;
  }
  .doc {
    max-width: none;
    padding: 0;
  }
  .hero-shot {
    margin: 16pt 0;
  }
  .hero-shot img {
    box-shadow: none;
  }
  h2,
  h3 {
    break-after: avoid;
  }
  li,
  tr {
    break-inside: avoid;
  }
  .doc a[href^="https://"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    word-break: break-all;
  }
}
