* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 16px 48px;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  max-width: 1100px;
  margin-inline: auto;
}

.hero { padding: 28px 0 12px; }
h1 { margin: 0; font-size: 2.4rem; letter-spacing: 0.02em; }
.wordmark { font-family: var(--mono); }
.tagline { margin: 4px 0 8px; color: var(--muted); font-size: 1.05rem; }

textarea {
  width: 100%;
  font: 1.25rem/1.4 var(--mono);
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--fg);
  resize: vertical;
}
textarea:focus { outline: none; border-color: var(--accent); }

.curl {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: 0.9rem;
}
.curl a { color: var(--fg); text-decoration: none; border-bottom: 1px dotted var(--muted); }
.curl a:hover { border-bottom-style: solid; }
.curl code { font-family: var(--mono); overflow-wrap: anywhere; }
.curl select {
  font: inherit;
  font-size: 0.85rem;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
}
.curl select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button {
  font: inherit;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
}
button:hover { border-color: var(--accent); }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h2 {
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 28px 0 10px;
}

ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.row {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: 12px;
  align-items: baseline;
  text-align: left;
  padding: 10px 14px;
  border-radius: 10px;
  transition: background 0.15s, border-color 0.15s;
}
.row .name { font-family: var(--mono); color: var(--accent-2); font-size: 0.9rem; }
.row .out { font-family: var(--mono); overflow-wrap: anywhere; white-space: pre-wrap; min-height: 1.4em; }
.row .out:empty::after { content: '\00a0'; }
img.out { height: 20px; width: auto; max-width: 100%; align-self: center; }
.row.copied { background: var(--accent-soft); border-color: var(--accent); }
.row.selected { border-color: var(--accent); }

#api { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--border); }
#api h2 { font-size: 1.3rem; text-transform: none; letter-spacing: 0; color: var(--fg); }
#api h3 { font-size: 1rem; margin: 24px 0 6px; }
#api table + h3, #api pre { margin-top: 16px; }
#api p { color: var(--muted); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
td, th { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
pre { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px; overflow-x: auto; font-size: 0.9rem; }
code { font-family: var(--mono); }


#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(10px);
  background: var(--fg);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  max-width: calc(100vw - 32px);
  overflow-wrap: anywhere;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 600px) {
  h1 { font-size: 1.8rem; }
  ul { grid-template-columns: 1fr; }
  .row { grid-template-columns: 6em 1fr; }
}
