:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #1c3144;
  background: #f4f7fa;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 18px max(22px, calc((100vw - 1200px) / 2));
  color: #fff;
  background: #18354e;
}

header strong, h1, h2, h3 { font-family: Georgia, serif; }
header strong { display: block; max-width: 760px; font-size: 20px; line-height: 1.25; }
header small { color: #cbd8e5; }
main { max-width: 1200px; margin: auto; padding: 26px 22px 70px; }
h1 { font-size: clamp(28px, 4vw, 42px); }
h2 { font-size: 24px; }
h3 { font-size: 19px; }

.eyebrow {
  color: #5a7182;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.muted { color: #617789; }
.mini { font-size: 12px; }
.panel, .card {
  border: 1px solid #dae4eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 10px #1e41500a;
}

.panel { margin: 20px 0; padding: 22px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 13px; }
.dir { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 8px; }
.card, .listnav {
  padding: 18px;
  color: inherit;
  text-align: left;
}

.listnav {
  padding: 12px 14px;
  border: 1px solid #dce4eb;
  border-radius: 8px;
  color: #214c68;
  background: #fff;
}

.listnav:hover {
  border-color: #5a96be;
  box-shadow: 0 3px 14px #1e41501a;
}

.card strong { display: block; margin-bottom: 6px; }
.card small { color: #617789; }
.btn, .chip {
  padding: 9px 14px;
  border: 1px solid #cbd9e4;
  border-radius: 9px;
  color: #244a66;
  background: #fff;
  font-weight: 600;
}

.btn.active, .chip.active { border-color: #214f70; color: #fff; background: #214f70; }
.btn:disabled { cursor: default; opacity: .4; }
.bar, .controls { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.bar { justify-content: space-between; margin-bottom: 14px; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.crumb { padding: 2px 4px; border: 0; color: #286d98; background: none; }

.search { width: 100%; padding: 16px; border: 1px solid #b9ccd9; border-radius: 11px; font-size: 17px; }
.home-selection { min-height: 52px; margin: 18px 0; }
.home-selection .birder-context { min-height: 52px; margin: 0; }
.home-selection .searchwrap { position: relative; }
.suggest { max-height: 350px; overflow: auto; border: 1px solid #c8d8e2; border-radius: 12px; background: #fff; }
.suggest button { display: flex; justify-content: space-between; width: 100%; padding: 13px 15px; border: 0; background: #fff; text-align: left; }
.tag { padding: 4px 8px; border-radius: 5px; color: #326e92; background: #eaf3f8; font-size: 11px; }

.scroll-cols { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 15px; scroll-snap-type: x mandatory; }
.colcard { flex: 0 0 min(370px, 88vw); align-self: flex-start; scroll-snap-align: start; }
.entries { width: 100%; border-collapse: collapse; font-size: 14px; }
.entries th, .entries td { padding: 9px 8px; border-bottom: 1px solid #e7ecf1; text-align: left; vertical-align: top; }
.entries .count { text-align: right; font-variant-numeric: tabular-nums; }
.highlight { background: #dff0ff; }
.month-heading th { color: #294b63; background: #e8f0f6; }
.omission td { color: #7891a2; text-align: center; }

.birder-context { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 8px 0 10px; padding: 9px 13px; border: 1px solid #96b8ce; border-radius: 12px; background: #eaf3f9; }
.birder-context .clear-birder { margin-left: auto; }

button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #5fa6d9; outline-offset: 2px; }

@media (max-width: 640px) {
  header { padding: 14px 18px; }
  main { padding: 20px 14px; }
  .panel { padding: 15px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .dir { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
