* { box-sizing: border-box; }
:root { color-scheme: light; --bg: #fff; --ink: #252525; --muted: #747780; --line: #e7e7e7; --panel: #f7f8f8; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
:root[data-theme="dark"] { color-scheme: dark; --bg: #202220; --ink: #e5e7e5; --muted: #a4aaa4; --line: #414641; --panel: #262926; }
body { background: var(--bg); color: var(--ink); margin: 0; }
main { width: min(720px, calc(100% - 40px)); margin: auto; padding: 48px 0 64px; }
nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 32px; color: var(--muted); font-size: 12px; }
a { color: inherit; text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 24px; line-height: 1.3; font-weight: 500; letter-spacing: -.025em; margin: 0; }
.intro { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 8px 0; }
.note { font-size: 12px; color: var(--muted); margin: 8px 0 24px; }
.controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 20px 0 12px; }
button, select { font: inherit; font-size: 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); color: var(--ink); padding: 9px 13px; cursor: pointer; transition: background 140ms, transform 120ms; }
button:hover { background: var(--panel); } button:active { transform: translateY(1px); }
button[aria-pressed="true"], button.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
button:disabled { opacity: .5; cursor: default; }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 2px solid #7181a5; outline-offset: 4px; }
.status { min-height: 20px; margin: 12px 0; font-size: 12px; color: var(--muted); }
.control-label { font-size: 12px; color: var(--muted); min-width: 52px; }
:root[data-preview] main { width: 600px; height: 400px; padding: 0; }
:root[data-preview] nav, :root[data-preview] .page-heading, :root[data-preview] .controls, :root[data-preview] .status { display: none; }
:root[data-preview] body { overflow: hidden; }
@media (max-width: 480px) { main { width: calc(100% - 28px); padding-top: 28px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
