:root {
  --text: #1b1b1f;
  --muted: #4a4a52;
  --surface: #ffffff;
  --panel: #f1f3f8;
  --line: #c4c7d0;
  --accent: #0b57d0;
  --on-accent: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

header,
main,
footer {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1rem;
}

header a {
  font-weight: 700;
  text-decoration: none;
}

h1 {
  margin: 1rem 0 0.5rem;
  font-size: 1.75rem;
  line-height: 1.25;
}

.tool {
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--panel);
}

.tool label {
  display: block;
  margin: 0.75rem 0 0.25rem;
  font-weight: 600;
}

[hidden] {
  display: none !important;
}

.tool input,
.tool select {
  width: 100%;
  max-width: 20rem;
  padding: 0.5rem;
  border: 1px solid var(--muted);
  border-radius: 0.25rem;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.tool button {
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  border: 0;
  border-radius: 0.25rem;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 600;
}

.tool button:disabled {
  background: var(--muted);
}

.drop {
  margin: 0.25rem 0;
  padding: 1rem;
  border: 2px dashed var(--muted);
  border-radius: 0.5rem;
  background: var(--surface);
}

.drop.dragging {
  border-style: solid;
  border-color: var(--accent);
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.drop p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.result {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  background: var(--surface);
}

.result h2 {
  margin: 0.5rem 0;
  font-size: 1.25rem;
}

.note {
  color: var(--muted);
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--panel);
  font-size: 0.875rem;
  line-height: 1.4;
}

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
