/* The styling of every page outside the app. In its own file: the security policy allows no style blocks inside the page. */
/* The app's font (Geist, SIL Open Font License, see /fonts/geist-LICENSE.txt), served from this
   address like everything else. Copies of the files in @fontsource-variable/geist (guarded by
   tests/unit/typography.test.ts). */
@font-face {
  font-family: "Geist Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/geist-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/geist-latin-wght-normal.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;
}
/* Light and dark follow the visitor's system setting; the dark colors are the app's dark palette
   (src/index.css). */
:root {
  color-scheme: light dark;
  --background: #ffffff;
  --text: #16181d;
  --text-soft: #3d424d;
  --text-muted: #5b6170;
  --link: #3b46d6;
  --button: #4f56d9;
  --button-hover: #3f46c4;
  --on-button: #ffffff;
  --border: #e3e6ec;
  --border-strong: #d0d4dc;
  --image-border: #dfe2e8;
  --code-background: #f6f7f9;
  --shadow: rgba(22, 24, 29, 0.12);
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #16181d;
    --text: #eceef2;
    --text-soft: #c5cbd6;
    --text-muted: #98a2b3;
    --link: #8b93ff;
    --button: #8b93ff;
    --button-hover: #a3a9ff;
    --on-button: #0f1115;
    --border: #2a2e37;
    --border-strong: #3a3f4b;
    --image-border: #3a3f4b;
    --code-background: #1f2229;
    --shadow: rgba(0, 0, 0, 0.45);
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 17px/1.6 "Geist Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 46rem; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
h1, h2, h3 { font-weight: 600; }
h1 { font-size: 2.1rem; line-height: 1.2; margin: 0 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; margin: 2.75rem 0 0.5rem; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 0.15rem; }
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }
li { margin-bottom: 0.4rem; }
a { color: var(--link); }
.lead { font-size: 1.15rem; color: var(--text-soft); }
.updated { margin-top: 2.75rem; color: var(--text-muted); font-size: 0.95rem; }
.open {
  display: inline-block;
  margin: 0.5rem 0 2rem;
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  background: var(--button);
  color: var(--on-button);
  font-weight: 600;
  text-decoration: none;
}
.open:hover { background: var(--button-hover); }
img { display: block; width: 100%; height: auto; border: 1px solid var(--image-border); border-radius: 10px; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}
pre {
  margin: 0.5rem 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--code-background);
  overflow-x: auto;
}

/* The link for skipping past the header: out of sight until it has the focus. */
.skip {
  position: absolute;
  top: -4rem;
  left: 0.75rem;
  z-index: 1;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  background: var(--button);
  color: var(--on-button);
  font-weight: 600;
}
.skip:focus { top: 0.75rem; }

/* The header on every page (scripts/generate-site-shell.mjs). */
.site-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
}
.site-bar .brand { font-weight: 700; font-size: 1.2rem; color: var(--text); text-decoration: none; }
.site-bar nav { display: flex; flex-wrap: wrap; gap: 0 1.25rem; flex: 1; font-size: 1rem; }
.site-bar nav a { display: inline-flex; align-items: center; min-height: 24px; color: var(--text-soft); text-decoration: none; }
.site-bar nav a:hover { color: var(--text); text-decoration: underline; }
.site-bar .open.small { margin: 0; padding: 0.45rem 0.9rem; font-size: 0.95rem; white-space: nowrap; }

/* The footer on every page. */
.site-footer {
  max-width: 72rem;
  margin: 0 auto 3rem;
  padding: 1.5rem 1.25rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
}
.site-footer p { margin: 0 0 0.25rem; }
.site-footer a { display: inline-flex; align-items: center; min-height: 24px; }
.site-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.25rem; }

@media (max-width: 40rem) {
  .site-bar { flex-wrap: wrap; gap: 0.5rem 1rem; }
  .site-bar .brand { flex: 1; }
  .site-bar nav { order: 1; flex-basis: 100%; }
}

/* Tables (the examples' properties and relationships) and definition lists in the docs. */
table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1.5rem; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--text-soft); }
dl { margin: 0 0 1rem; }
dt { font-weight: 600; margin-top: 0.75rem; }
dd { margin: 0.1rem 0 0 1rem; }

/* The report form. */
.site-form { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; margin: 1.5rem 0; }
.site-form[hidden] { display: none; }
.site-form label { display: flex; flex-direction: column; gap: 0.25rem; width: 100%; font-weight: 600; }
.site-form label[hidden] { display: none; }
.site-form small { color: var(--text-muted); font-weight: 400; }
.site-form input:not([type="radio"], [type="checkbox"]), .site-form textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--background);
  color: var(--text);
  font: inherit;
  font-weight: 400;
}
.site-form label.check { flex-direction: row; gap: 0.5rem; font-weight: 400; }
.site-form fieldset { width: 100%; margin: 0; padding: 0; border: 0; }
.site-form fieldset[hidden] { display: none; }
.site-form legend { padding: 0; font-weight: 600; }
.site-form fieldset label { display: block; font-weight: 400; }
.site-form button { margin: 0; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.site-form button:disabled { opacity: 0.6; }
.site-form p { margin: 0; }
.currencies a { margin-left: 0.5rem; }
.currencies a[aria-current] { color: var(--text); font-weight: 600; text-decoration: none; }
.saving { display: block; color: var(--text-muted); font-weight: 400; }
