:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #5c5c5c;
  --line: #d9d9d9;
  --accent: #2f6b38;
  --brand: #3d8a47;
  --soft: #f1f6f1;
  --warn: #8a5a00;
  --warn-soft: #fff6e0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131517;
    --fg: #ececec;
    --muted: #a8a8a8;
    --line: #32373c;
    --accent: #8fd19e;
    --brand: #7cc68b;
    --soft: #18211a;
    --warn: #e6b450;
    --warn-soft: #2a2412;
  }
}
* { box-sizing: border-box; }
/* The hidden attribute wins over any display rule below. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
header { border-bottom: 1px solid var(--line); }
header .bar {
  max-width: 46rem;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}
header .brand { font-weight: 650; text-decoration: none; color: var(--fg); margin-right: auto; display: inline-flex; align-items: center; gap: 9px; }
.brand img { width: 28px; height: 28px; display: block; }
.brand .map { color: var(--brand); }
.hero { display: flex; align-items: center; gap: 18px; margin: 0.4em 0 0.5em; }
.hero img { width: 84px; height: 84px; flex: 0 0 auto; }
.hero h1 { margin: 0; }
header nav { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; }
header nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
header nav #nav-account { display: contents; }
header nav a[aria-current="page"] { color: var(--fg); font-weight: 600; }
header nav a:hover { color: var(--accent); }
main { max-width: 46rem; margin: 0 auto; padding: 24px 16px 48px; }
main.wide { max-width: 64rem; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0.4em 0 0.5em; }
h2 { font-size: 1.3rem; margin: 1.6em 0 0.5em; }
h3 { font-size: 1.05rem; margin: 1.3em 0 0.4em; }
p, li { max-width: 40rem; }
a { color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--muted); }
.note { background: var(--soft); border-left: 3px solid var(--accent); padding: 10px 14px; margin: 1.2em 0; }
.note.warn { background: var(--warn-soft); border-left-color: var(--warn); }
table { border-collapse: collapse; margin: 1em 0; font-size: 15px; width: 100%; }
th, td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll-x { overflow-x: auto; }
code { font-size: 0.92em; background: var(--soft); padding: 1px 4px; border-radius: 3px; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer .bar { max-width: 46rem; margin: 0 auto; padding: 16px; }
.button, button {
  display: inline-block;
  font: inherit;
  font-size: 15px;
  padding: 7px 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
@media (prefers-color-scheme: dark) { .button, button { color: #0d1c10; } }
.button.plain, button.plain { background: transparent; color: var(--fg); border-color: var(--line); }
button.small, .button.small { font-size: 13px; padding: 3px 9px; }
button:disabled, .button.disabled { opacity: 0.45; pointer-events: none; }
input, select, textarea {
  font: inherit;
  font-size: 15px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
}
.muted { color: var(--muted); }
.small { font-size: 14px; }
.links a { margin-right: 10px; white-space: nowrap; }
dl dt { font-weight: 600; margin-top: 0.8em; }
dl dd { margin: 0.2em 0 0; }
/* Cover Mapper additions */
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 10px 18px; }
.card { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.card h3 { margin: 0 0 4px; }
.f { display: flex; gap: 8px; align-items: center; margin: 6px 0; flex-wrap: wrap; }
.f > label.l, .f > .l { min-width: 9.5em; color: var(--muted); }
input.wide, textarea.wide, select.wide { width: 100%; }
.status { color: var(--muted); min-height: 1.4em; }
.error { color: #b3261e; }
@media (prefers-color-scheme: dark) { .error { color: #ffb4ab; } }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 1em 0 0.6em; }
.tabs button { background: transparent; color: var(--muted); border: 1px solid transparent; border-bottom: none; border-radius: 6px 6px 0 0; }
.tabs button[aria-selected="true"] { color: var(--fg); border-color: var(--line); background: var(--bg); font-weight: 600; margin-bottom: -1px; }
.pill { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 10px; background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.pill.rare { color: #8a2f00; border-color: #e0a07c; background: #fff2ea; }
@media (prefers-color-scheme: dark) { .pill.rare { color: #ffb68f; border-color: #6b3a1f; background: #2a1a10; } }
.mapbox { width: 100%; height: 26rem; border: 1px solid var(--line); border-radius: 8px; }
table.rows td input, table.rows td select { width: 100%; min-width: 5em; font-size: 14px; padding: 3px 5px; }
.sw { display: inline-block; width: 11px; height: 11px; border-radius: 2px; vertical-align: middle; margin-right: 5px; border: 1px solid rgba(0,0,0,0.25); }
