/*
 * Copyright 2026 Greg Whitaker
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/* Shared by the user guide and the generated Java API reference. */
:root {
  color-scheme: light;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --ink: #404040;
  --muted: #666666;
  --heading: #171717;
  --accent: #dbeafe;
  --line: #e5e5e5;
  --paper: #ffffff;
  --surface: #f7f7f7;
  --hover: #eeeeee;
  --nav-ink: #595959;
  --link: #2563eb;
  --link-hover: #1d4ed8;
  --active: #edf3ff;
  --active-ink: #1d4ed8;
  --inline-code: #f2f2f2;
  --table-head: #f5f5f5;
  --code-background: #151515;
  --code-header: #202020;
  --code-border: #363636;
  --code-ink: #e5e5e5;
  --code-muted: #a3a3a3;
  --code-string: #a5c9ff;
  --code-keyword: #c4b5fd;
  --code-number: #d4d4d4;
  --button-background: #171717;
  --button-hover: #333333;
  --note-background: #f7f7f7;
  --note-border: #d4d4d4;
  --brand-background: #242424;
  --brand-ink: #ffffff;
  --warning-background: #f5f5f5;
  --warning-border: #a3a3a3;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #cfcfcf;
  --muted: #a3a3a3;
  --heading: #f5f5f5;
  --accent: #233b61;
  --line: #303030;
  --paper: #111111;
  --surface: #181818;
  --hover: #262626;
  --nav-ink: #b5b5b5;
  --link: #8ab4f8;
  --link-hover: #b8d4ff;
  --active: #19263a;
  --active-ink: #a8c7fa;
  --inline-code: #242424;
  --table-head: #202020;
  --code-background: #0b0b0b;
  --code-header: #191919;
  --code-border: #333333;
  --note-background: #1a1a1a;
  --note-border: #3a3a3a;
  --button-background: #e5e5e5;
  --button-hover: #ffffff;
  --brand-background: #e5e5e5;
  --brand-ink: #171717;
  --warning-background: #242424;
  --warning-border: #646464;
}
[hidden] { display: none !important; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--heading); text-decoration: none; font: 650 16px/1.3 var(--font-sans); letter-spacing: -.025em; }
.brand:hover { color: var(--heading); }
.brand-mark { display: grid; place-content: center; width: 35px; height: 38px; border-radius: 9px; background: var(--brand-background); color: var(--brand-ink); flex-shrink: 0; }
.brand-mark svg { width: 25px; height: 25px; }
.brand-subtitle { display: block; margin-top: 3px; color: var(--muted); letter-spacing: .1em; font: 9px/1.4 var(--font-mono); }
.theme-toggle { --thumb-size: 24px; position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; place-items: center; flex-shrink: 0; width: calc(var(--thumb-size) * 2 + 8px); height: calc(var(--thumb-size) + 8px); padding: 3px; box-sizing: border-box; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; }
.theme-toggle::before { content: ""; position: absolute; inset: 3px auto 3px 3px; width: var(--thumb-size); border-radius: 50%; background: var(--heading); transition: transform 160ms ease; }
.theme-toggle[aria-checked="true"]::before { transform: translateX(var(--thumb-size)); }
.theme-toggle:hover { background: var(--hover); }
.theme-toggle:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
.theme-toggle svg { position: relative; width: 16px; height: 16px; }
.theme-toggle[aria-checked="false"] .theme-icon-sun, .theme-toggle[aria-checked="true"] .theme-icon-moon { color: var(--paper); }
@media (max-width: 760px) {
  .brand { font-size: 14px; gap: 8px; }
  .brand-mark { width: 32px; height: 36px; font-size: 19px; }
}
@media (max-width: 420px) {
  .theme-toggle { --thumb-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle::before { transition: none; }
}
@media print {
  :root, :root[data-theme] {
    color-scheme: light;
    --ink: #111111;
    --heading: #111111;
    --muted: #444444;
    --paper: #ffffff;
    --surface: #f3f3f3;
    --line: #dddddd;
    --link: #1e40af;
    --active: #eeeeee;
    --active-ink: #111111;
    --inline-code: #f3f3f3;
    --table-head: #f3f3f3;
    --warning-background: #f5f5f5;
    --warning-border: #a3a3a3;
  }
  .theme-toggle { display: none; }
}
