*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, sans-serif;
  background: #0f0f0f;
  color: #e8e8e8;
  min-height: 100vh;
}

nav {
  display: flex;
  gap: 1.5rem;
  padding: 1rem 2rem;
  border-bottom: 1px solid #222;
}

nav a {
  color: #888;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.03em;
}

nav a.active, nav a:hover { color: #fff; }

main {
  max-width: 560px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tagline {
  color: #666;
  margin-top: 0.4rem;
  margin-bottom: 2rem;
}

form {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

input[type="text"],
input[type="number"] {
  flex: 1;
  padding: 0.65rem 1rem;
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 6px;
  color: #e8e8e8;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s;
}

input[type="text"]:focus,
input[type="number"]:focus { border-color: #555; }


button {
  padding: 0.65rem 1.4rem;
  background: #e8e8e8;
  color: #0f0f0f;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

button:hover { background: #fff; }

#results, #message { margin-top: 2rem; }

.no-match  { color: #666; }
.swap-note { color: #888; font-size: 0.9rem; margin-bottom: 0.75rem; font-style: italic; }

.match-count { color: #aaa; margin-bottom: 0.75rem; }

.match-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.match-list li {
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 6px;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  color: #ccc;
}

.match-list li  { display: flex; flex-direction: column; gap: 0.2rem; }
.match-name     { color: #fff; font-weight: 600; }
.meta           { color: #888; font-size: 0.875rem; }
.report-date    { color: #555; font-size: 0.8rem; }

.field-group { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }

#submit-form { flex-direction: column; align-items: stretch; }
#submit-form button { align-self: flex-start; }

.preview {
  min-height: 1.4em;
  color: #888;
  font-size: 0.9rem;
  font-style: italic;
}

.success { color: #6ee7b7; }
.error   { color: #fca5a5; }

.prose h1 { margin-bottom: 1.25rem; }
.prose h2 { margin-top: 2.5rem; margin-bottom: 0.75rem; font-size: 1.2rem; color: #aaa; }
.prose p  { color: #ccc; line-height: 1.7; }
