:root {
  --accent: #b91c1c;
  --ink: #1f2430;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f8f9fb;
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  max-width: 880px;
  padding: 0 1rem 4rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

header { padding: 2rem 0 1rem; }
header h1 { margin: 0; font-size: 2rem; }
header h1 a { color: var(--accent); text-decoration: none; }
.tagline { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.9rem; }

.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 1rem 0 0.5rem;
}

#q {
  flex: 1 1 320px;
  font-size: 1.15rem;
  padding: 0.6rem 0.9rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  outline: none;
}
#q:focus { border-color: var(--accent); }

.direction { display: flex; gap: 0.75rem; font-size: 0.9rem; color: var(--muted); }
.direction label { cursor: pointer; white-space: nowrap; }

#status { min-height: 1.4rem; color: var(--muted); font-size: 0.85rem; margin: 0.25rem 0 0.75rem; }

section h2 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
thead th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
  padding: 0.4rem 0.5rem;
}
tbody td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:nth-child(odd) { background: var(--bg-soft); }
td.cat { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
td.type { color: var(--muted); font-style: italic; white-space: nowrap; }
td.trans a { color: var(--accent); text-decoration: none; }
td.trans a:hover { text-decoration: underline; }

.suggest { color: var(--muted); }
.suggest a { color: var(--accent); text-decoration: none; }
.suggest a:hover { text-decoration: underline; }

footer { margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 1rem; }
footer p { color: var(--muted); font-size: 0.8rem; }
footer a { color: var(--accent); }

@media (max-width: 560px) {
  header { padding-top: 1.25rem; }
  td.cat { display: none; }
  thead th:first-child { display: none; }
}
