:root {
    color-scheme: light dark;
    --background: light-dark(#fcfbf9, #020202);
    --surface: light-dark(#fff, #151413);
    --foreground: light-dark(#201e1d, #eee);
    --color-accent-100: light-dark(#a6420d, #ef6f2e);
    --color-accent-300: light-dark(#a6420d, #d15010);
    --color-base-400: light-dark(#514c49, #a49d9a);
    --color-base-500: light-dark(#69625e, #8a8380);
    --color-base-600: light-dark(#827972, #5c5855);
    --color-base-700: light-dark(#a49b95, #4d4947);
    --color-base-800: light-dark(#c8c0bb, #3d3a39);
    --color-base-1000: light-dark(#f2efec, #1f1d1c);

    --font-sans: "Geist", system-ui, -apple-system, sans-serif;
    --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    --radius-sm: 4px;
    --radius-lg: 8px;
    --max-width: 720px;
    --gutter: 20px;

    --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

.theme-switch {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: var(--foreground);
    background: var(--background);
    border: 1px dashed var(--color-base-700);
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.theme-switch:hover, .theme-switch:focus-visible { color: var(--color-accent-100); border-color: currentColor; }
.theme-switch[hidden], .theme-switch svg g { display: none; }
[data-theme="system"] .icon-system, [data-theme="light"] .icon-light, [data-theme="dark"] .icon-dark { display: inline; }

body > .theme-switch { position: absolute; z-index: 2; top: 14px; right: var(--gutter); }
.theme-switch:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

@media print {
    :root[data-theme] { color-scheme: light; }
    .theme-switch { display: none; }
}
