@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap");

/*
 * Scalar inlines a `.light-mode { --scalar-background-* }` block in each HTML page.
 * It ties on specificity with `:root`, so we attach the same tokens to `html.light-mode`
 * / `body.light-mode` (higher specificity) and keep the reading surface near-white.
 */
:root,
html.light-mode,
body.light-mode {
  /* :root alone can lose to inlined `.light-mode` (same specificity, later in head); html/body selectors win. */
  --scalar-font: "Instrument Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --scalar-font-code: "JetBrains Mono", "Fira Code", "Monaco", "Consolas", monospace;
  --scalar-color-1: #0f172a;
  --scalar-color-2: #1e293b;
  --scalar-color-3: #64748b;
  --scalar-color-accent: #6ee7b7;
  --scalar-background-1: #faf9f7;
  --scalar-background-2: #f3ece3;
  --scalar-background-3: #e8dfd2;
  --scalar-border-color: #e2e8f0;
  --scalar-radius: 10px;
}

html.dark-mode,
body.dark-mode {
  --scalar-color-1: #f8fafc;
  --scalar-color-2: #e2e8f0;
  --scalar-color-3: #94a3b8;
  --scalar-color-accent: #6ee7b7;
  --scalar-background-1: #0f172a;
  --scalar-background-2: #1e293b;
  --scalar-background-3: #111827;
  --scalar-border-color: #334155;
}

/* Guide layout: steady scroll chain, fewer odd overscroll quirks at foot of pages */
html.light-mode .t-doc,
html.dark-mode .t-doc,
body.light-mode .t-doc,
body.dark-mode .t-doc {
  overscroll-behavior-y: contain;
}

/* Scoped “Related files” strip so warm fill does not cover the taxonomy / body copy */
.light-mode .amos-related-files,
.dark-mode .amos-related-files {
  margin-top: 2rem;
  padding: 1.25rem 1.375rem;
  border-radius: var(--scalar-radius);
  border: 1px solid var(--scalar-border-color);
  background-color: var(--scalar-background-2);
  box-shadow: var(--scalar-shadow-1, 0 1px 3px rgba(0, 0, 0, 0.08));
}
