:root {
  color-scheme: light dark;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #17202a;
  --muted: #667383;
  --line: #d7dee7;
  --accent: #176b55;
  --danger: #b42318;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--text); }
header, main, footer { width: min(1040px, calc(100% - 32px)); margin-inline: auto; }
.site-header { padding: 40px 0 20px; }
.eyebrow { margin: 0; color: var(--accent); font-size: 12px; font-weight: 700; }
h1 { margin: 4px 0 8px; font-size: 32px; }
h2 { margin: 0 0 8px; }
p { color: var(--muted); }
main { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
button, input, textarea { font: inherit; letter-spacing: 0; }
button { min-height: 40px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 14px; cursor: pointer; }
nav button { border-width: 0 1px 0 0; border-radius: 0; background: var(--surface); color: var(--text); }
nav button[aria-selected="true"] { color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #2f80ed66; outline-offset: 2px; }
section { min-height: 440px; padding: 24px; }
label { display: block; margin-top: 16px; font-weight: 600; }
textarea, input, pre { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); }
textarea { min-height: 280px; padding: 12px; resize: vertical; font-family: ui-monospace, monospace; line-height: 1.5; }
input { min-height: 40px; margin: 8px 0; padding: 8px 10px; }
pre { min-height: 120px; padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
[role="status"] { min-height: 24px; color: var(--muted); }
[role="status"].error { color: var(--danger); }
footer { padding: 18px 0 36px; color: var(--muted); font-size: 13px; }
a { color: var(--accent); }

@media (prefers-color-scheme: dark) {
  :root { --bg: #11171e; --surface: #1b242e; --text: #edf2f7; --muted: #a8b3c1; --line: #364250; --accent: #51c8a1; --danger: #ff8b82; }
}

@media (max-width: 720px) {
  .site-header { padding-top: 24px; }
  h1 { font-size: 27px; }
  section { min-height: 0; padding: 16px; }
}
