:root {
  color-scheme: dark;
  --background: oklch(0.13 0 0); --foreground: oklch(0.96 0 0);
  --card: oklch(0.18 0 0); --muted: oklch(0.76 0 0);
  --border: oklch(0.5 0 0); --primary: oklch(0.47 0.18 27);
  --accent: oklch(0.76 0.14 27); --destructive: oklch(0.8 0.13 27);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--background); color: var(--foreground); font-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; }
[hidden] { display: none !important; }
header { max-width: 1200px; margin: auto; padding: 24px 40px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { color: var(--foreground); text-decoration: none; font-size: 20px; font-weight: 650; }
.brand span { color: var(--muted); font-size: 16px; font-weight: 400; margin-left: 12px; }
main { max-width: 1040px; margin: 48px auto; padding: 0 40px 40px; }
h1 { font-size: 32px; line-height: 1.2; letter-spacing: -0.025em; margin: 0 0 16px; }
p { max-width: 64ch; color: var(--muted); }
.intro { margin-bottom: 40px; }
.login { max-width: 440px; margin: 80px auto 0; }
.login form { margin-top: 32px; display: grid; gap: 12px; }
.login button { margin-top: 12px; }
label { font-weight: 600; }
input, textarea, button { font: inherit; }
input, textarea { color: var(--foreground); background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 12px 16px; width: 100%; }
textarea { display: block; min-height: 380px; resize: vertical; line-height: 1.7; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 15px; }
button { min-height: 44px; padding: 10px 20px; border-radius: 6px; border: 1px solid transparent; background: var(--primary); color: var(--foreground); font-weight: 600; cursor: pointer; transition: background 150ms, opacity 150ms; }
button:hover { background: oklch(0.4 0.15 27); }
button:active { opacity: .85; }
button:disabled { opacity: .55; cursor: default; }
.quiet { background: transparent; border-color: var(--border); font-size: 14px; padding: 8px 12px; }
.quiet:hover { background: oklch(0.26 0 0); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.toolbar, .tools, .save-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar { justify-content: space-between; margin-bottom: 12px; }
.hint { color: var(--muted); font-size: 14px; }
.save-row { margin-top: 24px; }
details { margin-top: 48px; border-top: 1px solid var(--border); padding-top: 24px; }
summary { cursor: pointer; min-height: 44px; }
ul { padding: 0; list-style: none; }
li { margin: 12px 0; }
#feedback { margin-top: 24px; }
#feedback.error { color: var(--destructive); }
.skip { position: absolute; top: -100px; left: 16px; color: var(--foreground); background: var(--card); padding: 12px; }
.skip:focus { top: 8px; }
@media (max-width: 640px) {
  header { padding: 20px; flex-wrap: wrap; }
  .brand span { display: block; margin-left: 0; }
  main { padding: 0 20px 32px; margin-top: 32px; }
  .login { margin-top: 48px; }
  .toolbar { align-items: flex-start; }
  .tools { gap: 8px; }
  textarea { min-height: 360px; font-size: 16px; }
  .save-row { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
