/* Dark theme for the document pages (trust, docs, legal), which keep their own styles
   instead of site.css. html[data-theme] is set by the inline script in each page's head.
   Colors match site.css's dark theme. */

.theme-toggle {
  width: 34px; height: 34px; flex: none; display: inline-grid; place-items: center; padding: 0;
  border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink-2);
  cursor: pointer; transition: color .2s, border-color .2s;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-3); }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* !important beats the logo's inline display:block */
.theme-sun, .logo-dark { display: none !important; }

html[data-theme="dark"] {
  color-scheme: dark;
  --accent: #e2353d; --accent-soft: rgba(226,53,61,.12);
  --ink: #f2f2f0; --ink-2: #c3c4ca; --ink-3: #8b8d96;
  --paper: #060709; --card: #0e0f12; --line: rgba(255,255,255,.1); --good: #2fbf7a;
  --code-bg: #0b0c0f; --code-ink: #e8e8e6;
}
html[data-theme="dark"] .theme-sun, html[data-theme="dark"] .logo-dark { display: block !important; }
html[data-theme="dark"] .theme-moon, html[data-theme="dark"] .logo-light { display: none !important; }
html[data-theme="dark"] header.site { background: rgba(6,7,9,.9); }
html[data-theme="dark"] .skip-link { color: var(--paper); }
html[data-theme="dark"] .doc-head, html[data-theme="dark"] th { border-bottom-color: var(--ink-3); }
html[data-theme="dark"] th { background: #15161a; }
html[data-theme="dark"] code { background: rgba(255,255,255,.08); }
html[data-theme="dark"] pre { box-shadow: inset 0 0 0 1px var(--line); }
