:root {
  font-family: "Segoe UI", "Microsoft JhengHei", system-ui, sans-serif;
  color: #243e36; background: #f3f5ef; font-synthesis: none;
  --green: #245e48; --muted: #64766b; --line: #dce5db;
}
* { box-sizing: border-box; }
body { margin: 0; border-top: 5px solid var(--green); }
main { max-width: 1200px; margin: auto; padding: 36px 28px; }
.hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 650; letter-spacing: .09em; color: var(--green); }
.brand-mark { display: inline-grid; place-items: center; width: 26px; height: 26px; background: var(--green); color: #fff; border-radius: 7px; margin-right: 6px; }
h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: .035em; font-weight: 750; }
.intro { margin: 9px 0 0; color: var(--muted); font-size: 15px; }
.update-badge { flex-shrink: 0; border: 1px solid #cfddca; background: #eaf0e3; padding: 9px 14px; border-radius: 30px; font-size: 12px; color: #486643; }
#last-update { margin-top: 4px; font-size: 11px; color: var(--muted); }
.update-badge span { color: #74934f; margin-right: 5px; }
a { color: var(--green); text-underline-offset: 4px; }
button, select { font: inherit; }
button { cursor: pointer; border: 1px solid #d3ddd2; background: #fff; color: var(--green); border-radius: 6px; padding: 7px 12px; font-size: 13px; }
button:hover { background: #e8f0e6; border-color: #98b29c; }
.filter-panel { padding: 18px 22px; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 24px; }
#filters { display: flex; gap: 18px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid #edf0e9; }
#filters label { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 650; color: var(--muted); }
select { padding: 8px 32px 8px 12px; border: 1px solid #ccd8cd; border-radius: 6px; color: #243e36; background: #fafcf8; font-size: 14px; }
#filters .region-select { display: none; }
#regions { display: flex; flex-wrap: wrap; gap: 5px 7px; padding-top: 14px; }
.region-link { padding: 7px 12px; border-radius: 6px; font-size: 14px; text-decoration: none; color: #53695b; }
.region-link:hover { background: #f0f4ea; }
.region-link[aria-current="page"] { background: var(--green); color: #fff; font-weight: 650; }
.results-panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 22px #234c3610; overflow: hidden; }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px; }
h2 { margin: 0; font-size: 19px; font-weight: 700; }.heading-divider { padding: 0 12px; color: #bcc9b7; font-weight: 400; }
#summary { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.table-actions { display: flex; gap: 8px; }

main { padding: 18px 16px; }
.hero { flex-wrap: wrap; margin-bottom: 16px; }
h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
.filter-panel { padding: 12px 14px; margin-bottom: 12px; }
.region-link { padding: 5px 9px; }
.results-heading { padding: 12px 14px; flex-wrap: wrap; }
.table-actions { flex-shrink: 0; }
.table-actions button { white-space: nowrap; }
#days { width: 64px; font: inherit; padding: 7px; border: 1px solid #ccd8cd; border-radius: 6px; }
#filters { flex-wrap: wrap; gap: 10px 18px; }
.score-info, .coverage { margin: 0; padding: 8px 14px; font-size: 12px; line-height: 1.6; }
.score-info { background: #f5f8f2; color: var(--muted); }
.coverage { background: #fff7dc; color: #79531c; }
.hotspot-table { width: 100%; border-collapse: collapse; table-layout: auto; font-size: 13px; }
.hotspot-table > thead { background: #eaf0e5; }
th, td { padding: 8px 12px; border-bottom: 1px solid #e5ebe1; }
.hotspot-table > thead th { white-space: nowrap; font-size: 12px; text-align: left; }
.location-cell { text-align: left; width: 100%; overflow-wrap: anywhere; }
.toggle-group { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; padding: 6px 0; background: transparent; font-weight: 600; }
.toggle-icon { display: grid; place-items: center; flex: 0 0 24px; height: 26px; border: 1px solid #aec3a6; border-radius: 5px; background: #f7faf3; }
.heat-cell { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.heat-cell strong { display: block; font-size: 20px; color: #245e48; }
.heat-cell small { font-size: 10px; color: var(--muted); }
.curve-cell { min-width: 240px; }
.heat-curve { width: 280px; max-width: 100%; margin: 0; }
.heat-curve svg { display: block; width: 100%; height: auto; }
.heat-curve text { font: 9px system-ui; fill: #667b6b; }
.bird-cell, .birdmap-cell, .map-cell { text-align: center; white-space: nowrap; font-size: 12px; }
.unavailable { color: #8b958e; cursor: help; }
.location-group:nth-of-type(even) .group-row { background: #f8faf5; }
.location-group.is-open .group-row { background: #edf4e9; }
.expanded-row > td { padding: 10px 16px; background: #fbfcfa; }
.detail-stats { margin: 0 0 8px; font-size: 12px; color: var(--muted); line-height: 1.8; }
.daily-values { font-size: 12px; color: #506655; margin-bottom: 10px; }
.daily-values summary { cursor: pointer; padding: 5px 0; }
.daily-values ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 5px; padding-left: 20px; }
.records { width: 100%; border-collapse: collapse; font-size: 13px; }
.records th { text-align: left; font-size: 11px; color: var(--muted); }
.records th, .records td { padding: 7px 8px; }
.species-cell { width: 55px; text-align: right; font-variant-numeric: tabular-nums; }
.date-cell { width: 125px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.observer-cell { overflow-wrap: anywhere; }
.external-icon { display: inline-block; font-size: .85em; margin-left: 4px; }
.external-link { white-space: nowrap; }
.observer-cell .external-link { white-space: normal; }
.status-bar { display: flex; gap: 10px; align-items: center; padding: 10px 14px; }
#status { margin: 0; font-size: 12px; color: var(--muted); }#status.error { color: #a32626; }
.empty-state { padding: 20px; color: var(--muted); }
footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.8; }
footer p { margin: 0; }footer a { display: inline-block; margin-right: 14px; }
:focus-visible { outline: 3px solid #b5822f; outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 760px) {
  main { padding: 12px 8px; }
  .hero { gap: 8px; margin-bottom: 12px; }.hero > div { min-width: 0; }
  .eyebrow { letter-spacing: 0; }.intro { font-size: 13px; }
  .update-badge { font-size: 10px; padding: 5px 9px; }
  .filter-panel { padding: 10px; }
  #filters .region-select { display: flex; }#regions { display: none; }
  #filters label { gap: 8px; }select { max-width: 100%; padding: 7px 8px; }
  h2 { font-size: 16px; }#summary { font-size: 12px; }
  .hotspot-table, .hotspot-table > tbody { display: block; width: 100%; }
  .hotspot-table > thead { display: none; }
  .location-group { border-top: 1px solid var(--line); }
  .group-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 70px; padding: 6px 10px; }
  .group-row > * { border: 0; padding: 3px 0; min-width: 0; width: auto; }
  .location-cell { grid-column: 1 / 3; grid-row: 1; }
  .heat-cell { grid-column: 1; grid-row: 2 / 4; align-self: center; text-align: left; }
  .curve-cell { grid-column: 2; grid-row: 2 / 4; }
  .heat-curve { width: 100%; }
  .bird-cell { grid-column: 3; grid-row: 1; align-self: center; text-align: right; }
  .birdmap-cell { grid-column: 3; grid-row: 2; text-align: right; }
  .map-cell { grid-column: 3; grid-row: 3; align-self: start; text-align: right; }
  .expanded-row { display: block; }.expanded-row > td { display: block; padding: 8px; }
  .records { table-layout: fixed; }.records th:first-child { width: 40px; }.records th:nth-child(2) { width: 108px; }
  .records td, .records th { padding: 7px 3px; font-size: 12px; }
  .daily-values ul { display: block; }.daily-values li { margin: 5px 0; overflow-wrap: anywhere; }
  footer { display: block; }footer p + p { margin-top: 8px; }
}

.hotspot-table > thead small { display: block; font-size: 10px; font-weight: normal; color: var(--muted); margin-top: 3px; }
