/* Appearance: System, Light or Dark. theme.js sets data-theme on the page to the colors in use.
   Light is the default look in kit.css; this file only swaps the tokens for Dark and adds the picker. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e9ebef;
  --ink-solid: #f5f6f8;
  --muted: #a9aeb8;
  --faint: #8d929c;
  --line: #2a2f37;
  --line-strong: #3e444f;
  --paper: #121418;
  --paper-warm: #1b1d22;
  --paper-deep: #23262c;
  --panel: #1a1e25;
  --panel-line: #2c323c;
  --cobalt: #86a9f4;
  --cobalt-ink: #a9c3f8;
  --cobalt-wash: #1b2740;
  --sage: #86b793;
  --sage-wash: #1a2b20;
  --brick: #f0937c;
  --brick-wash: #35201a;
  --gold: #d9ac52;
  --shadow: 0 1px 2px #00000040, 0 8px 24px -12px #00000099;
  --shadow-pop: 0 18px 50px -14px #000000cc;
  --surface: #1a1d23;
  --seg-on: #333a46;
  --on-ink: #101216;
  --ink-hover: #ffffff;
  --ink-2: #cfd3da;
  --ink-3: #b7bcc6;
  --sage-ink: #a3d3b0;
  --brick-ink: #f6b3a1;
  --brick-soft: #e9a18d;
  --sage-line: #2f4a38;
  --brick-line: #5b3328;
  --cobalt-line: #2d406a;
  --paper-line: #3a352b;
  --hover-line: #5a616d;
  --hover-wash: #ffffff12;
  --disabled-bg: #20242b;
  --placeholder: #838893;
  --selection: #2f4a80;
  --scrim: #000000a6;
  --code-bg: #0b0c0f;
  --skel-a: #23272e;
  --skel-b: #2c3139;
  --checker-a: #d7dae0;
  --checker-b: #eceef2;
}
:root[data-theme="dark"] body { background: var(--paper); }
/* The mark is solid black: show it light on the dark header. */
:root[data-theme="dark"] .brand img { filter: invert(1); }
:root[data-theme="dark"] body:not(.app-mode) .app-hero { background: radial-gradient(56% 60% at 88% 16%, #1b2a47, #1b2a4700 72%), radial-gradient(46% 55% at 2% 100%, #1a2e24, #1a2e2400 70%), radial-gradient(40% 40% at 58% 0%, #2a2418, #2a241800 70%), linear-gradient(180deg, #17181c, var(--paper)); }
:root[data-theme="dark"] .hero-phones::before { background: radial-gradient(closest-side, #ffffff14, #ffffff00); }
:root[data-theme="dark"] .code, :root[data-theme="dark"] .prose pre { border: 1px solid var(--line); }
:root[data-theme="dark"] .dialog { border: 1px solid var(--line); }

/* The Appearance picker: a small three-way choice, in the footer and in Settings. */
.appearance { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; }
.appearance-label { font: var(--type-label); color: var(--ink-2); }
.appearance .segmented { display: inline-grid; grid-template-columns: repeat(3, auto); padding: 3px; gap: 2px; border-radius: 10px; }
.appearance .segmented button { min-height: 32px; padding: 0 12px; border-radius: 8px; font: var(--type-control); font-size: 13.5px; }
@media (pointer: coarse) { .appearance .segmented button { min-height: 44px; padding: 0 14px; } }
.appearance-field { display: grid; gap: 8px; }
.appearance-field .appearance { display: grid; gap: 8px; }
.appearance-field .segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.appearance-slot { margin: 6px 0 0; }
.appearance .segmented button:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
/* In the workspace the picker lives in Settings, so the footer one steps aside. */
body.app-mode .site-foot .appearance-slot { display: none; }
/* The picker also appears on the plain pages (For AI assistants), which do not load the app styles. */
.appearance .segmented { background: var(--panel); border: 1px solid var(--panel-line); }
.appearance .segmented button { border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.appearance .segmented button[aria-checked="true"] { background: var(--seg-on); color: var(--ink-solid); box-shadow: 0 1px 3px #0000001a; }
