/* Design tokens and base elements. Colors follow docs/DESIGN.md. */
@font-face { font-family: Inter; src: url('/assets/fonts/Inter-latin-math.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
:root {
  color-scheme: dark;
  --page: #06080f; --panel: #0d111b; --raised: #151b28; --sunken: #080c14;
  --border: #293142; --border-strong: #65738f;
  --text: #f2f6ff; --muted: #acbddf;
  --green: #5cecff; --amber: #c4a0ff; --blue: #88b5ff; --pink: #efaaff; --error: #ffb8db;
  --radius: 8px; --header: 56px;
  font: 16px/1.6 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv11', 'ss01';
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--page); }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: var(--green); }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--green); color: #06080f; padding: 8px 14px; border-radius: var(--radius); }
.skip-link:focus { top: 8px; }
#skip-workspace:focus { left: 190px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--raised); color: var(--text); font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover:not(:disabled) { border-color: var(--green); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primary { background: var(--green); border-color: var(--green); color: #06080f; }
.btn.primary:hover:not(:disabled) { background: #9af5ff; }
.btn.ghost { background: transparent; }
.btn.large { min-height: 48px; padding: 10px 24px; font-size: 17px; }
.btn.icon-only { min-width: 40px; padding: 8px; font-size: 20px; }

progress { appearance: none; height: 8px; width: 100%; border: 0; border-radius: 4px; overflow: hidden; background: #202938; }
progress::-webkit-progress-bar { background: #202938; }
progress::-webkit-progress-value { background: var(--green); border-radius: 4px; }
progress::-moz-progress-bar { background: var(--green); }

input[type=text], input[type=email], input[type=password], select { min-height: 40px; padding: 6px 12px; font: inherit; font-size: 16px; color: var(--text); background: var(--sunken); border: 1px solid var(--border-strong); border-radius: var(--radius); }
input[type=range] { accent-color: var(--amber); }
.error-banner { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 90; max-width: min(640px, 92vw); padding: 12px 18px; border: 1px solid var(--error); border-radius: var(--radius); background: #321b40; color: var(--error); }
@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }

/* Short transitions show interface changes without continuous motion. */
@keyframes interface-appear { from { opacity: .6; } to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-reduce-motion="1"]) :is(.btn, .topnav a, input, select, textarea) { transition: background-color .14s ease, border-color .14s ease, color .14s ease; }
  html:not([data-reduce-motion="1"]) :is(dialog[open], .error-banner:not([hidden]), .feedback:not(:empty)) { animation: interface-appear .16s ease-out; }
  html:not([data-reduce-motion="1"]) details[open] > :not(summary) { animation: interface-appear .16s ease-out; }
}
html[data-reduce-motion="1"] *, html[data-reduce-motion="1"] *::before, html[data-reduce-motion="1"] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
