:root {
  --forest: #151515;
  --evergreen: #1f4d3a;
  --moss: #557a46;
  --pine: #2d6a4f;
  --sky: #6faed9;
  --trail: #b48a5a;
  --stone: #e6e8e6;
  --cloud: #f8f9f8;
  --low: #66bb6a;
  --moderate: #fbc02d;
  --high: #f57c00;
  --extreme: #c62828;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(21, 21, 21, 0.11);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cloud);
  color: var(--forest);
  font-family: Inter, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 18px clamp(18px, 4vw, 52px);
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
  background: rgba(248, 249, 248, 0.9);
  backdrop-filter: blur(18px);
}

.brand img {
  display: block;
  width: clamp(150px, 17vw, 230px);
  height: auto;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.main-nav a {
  border-radius: 999px;
  color: rgba(21, 21, 21, 0.7);
  font-weight: 700;
  padding: 10px 14px;
}

.main-nav a:hover {
  background: var(--stone);
  color: var(--forest);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-button,
.secondary-button,
.icon-button {
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  min-height: 44px;
}

.primary-button {
  background: var(--evergreen);
  color: var(--white);
  padding: 0 18px;
}

.primary-button:hover {
  background: var(--pine);
  transform: translateY(-1px);
}

.secondary-button {
  background: var(--white);
  border-color: rgba(31, 77, 58, 0.35);
  color: var(--forest);
  padding: 0 16px;
}

.secondary-button:hover,
.icon-button:hover {
  border-color: var(--pine);
}

.icon-button {
  background: var(--white);
  width: 44px;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon-button svg {
  width: 20px;
}

.map-shell {
  display: grid;
  grid-template-columns: minmax(340px, 0.66fr) minmax(580px, 1.34fr);
  gap: clamp(24px, 3vw, 44px);
  align-items: start;
  min-height: calc(100vh - 82px);
  padding: clamp(26px, 4vw, 58px) clamp(18px, 4vw, 52px) 34px;
}

.map-copy {
  align-self: start;
  max-width: 650px;
  padding-top: clamp(28px, 6vh, 78px);
}

.eyebrow {
  color: var(--moss);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: Manrope, Inter, sans-serif;
  letter-spacing: 0;
  line-height: 1.04;
  margin: 0;
}

h1 {
  font-size: clamp(2.55rem, 5.2vw, 5.15rem);
  max-width: 820px;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 3.4rem);
}

h3 {
  font-size: 1.25rem;
}

.map-copy > p:not(.eyebrow),
.report-intro p {
  color: rgba(21, 21, 21, 0.74);
  font-size: 1.08rem;
  max-width: 650px;
}

.search-bar {
  align-items: center;
  background: var(--white);
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  grid-template-columns: 24px 1fr auto;
  margin-top: 28px;
  padding: 10px;
}

.search-bar svg {
  color: var(--moss);
  margin-left: 8px;
  width: 21px;
}

.search-bar input {
  border: 0;
  color: var(--forest);
  min-width: 0;
  outline: 0;
  width: 100%;
}

.search-bar button {
  background: var(--forest);
  border: 0;
  border-radius: 12px;
  color: var(--white);
  cursor: pointer;
  font-weight: 800;
  min-height: 44px;
  padding: 0 18px;
}

.search-results {
  display: none;
  gap: 8px;
  margin-top: 14px;
}

.search-results.active {
  display: grid;
}

.search-result {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 14px;
  color: var(--forest);
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: 42px 1fr auto;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}

.search-result:hover,
.sighting-item:hover {
  border-color: rgba(31, 77, 58, 0.32);
  transform: translateY(-1px);
}

.search-result strong {
  display: block;
  font-family: Manrope, Inter, sans-serif;
  line-height: 1.1;
}

.search-result span {
  color: rgba(21, 21, 21, 0.62);
  font-size: 0.9rem;
}

.search-result .animal-token {
  border-radius: 11px;
  height: 42px;
  width: 42px;
}

.live-map {
  position: relative;
  height: clamp(620px, calc(100vh - 150px), 840px);
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 20px;
  background: #eef1eb;
  box-shadow: var(--shadow);
  contain: layout paint size;
}

#wildlife-map {
  height: 100%;
  min-height: 100%;
  width: 100%;
}

.maplibregl-map {
  background: #eef1eb;
  font-family: Inter, system-ui, sans-serif;
  height: 100%;
  width: 100%;
}

.maplibregl-canvas {
  outline: 0;
}

.maplibregl-ctrl-top-right {
  top: 76px;
  right: 18px;
}

.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-bottom-right {
  margin-bottom: 12px;
}

.maplibregl-ctrl-group {
  border: 1px solid rgba(21, 21, 21, 0.12) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 24px rgba(21, 21, 21, 0.12) !important;
  overflow: hidden;
}

.maplibregl-popup-content {
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(21, 21, 21, 0.18);
  font-family: Inter, system-ui, sans-serif;
  padding: 14px;
}

.maplibregl-popup-close-button {
  color: var(--forest);
  font-size: 1.2rem;
  padding: 4px 8px;
}

.map-topbar {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  z-index: 500;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 14px;
  padding: 11px 14px;
  backdrop-filter: blur(14px);
  font-weight: 800;
}

.status-dot {
  background: var(--low);
  border-radius: 50%;
  display: inline-block;
  height: 9px;
  margin-right: 8px;
  width: 9px;
}

.wildlife-map-marker {
  align-items: center;
  background: var(--forest);
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px 999px 999px 4px;
  box-shadow: 0 13px 28px rgba(21, 21, 21, 0.24);
  color: var(--white);
  cursor: pointer;
  display: flex;
  height: 44px;
  justify-content: center;
  padding: 0;
  position: relative;
  transform: rotate(-45deg);
  width: 44px;
}

.wildlife-map-marker .animal-svg {
  height: 19px;
  position: relative;
  transform: rotate(45deg);
  width: 19px;
  z-index: 1;
}

.marker-bear,
.marker-large-predator {
  background: var(--forest);
}

.marker-venomous-snake,
.marker-reptile {
  background: var(--high);
}

.marker-mammal {
  background: var(--moss);
}

.marker-other {
  background: var(--trail);
}

.map-empty {
  position: absolute;
  left: 50%;
  top: 54%;
  z-index: 450;
  width: min(360px, calc(100% - 48px));
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  text-align: center;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(14px);
}

.map-empty[hidden] {
  display: none;
}

.map-empty i {
  color: var(--evergreen);
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.map-detail-link {
  background: var(--evergreen);
  border: 0;
  border-radius: 9px;
  color: var(--white);
  cursor: pointer;
  font-weight: 800;
  margin-top: 8px;
  padding: 8px 10px;
}

.badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 900;
  margin-bottom: 10px;
  padding: 6px 10px;
}

.badge.agency {
  background: rgba(111, 174, 217, 0.2);
  color: #255f87;
}

.badge.verified {
  background: rgba(31, 77, 58, 0.13);
  color: var(--evergreen);
}

.badge.pending {
  background: rgba(21, 21, 21, 0.08);
  color: rgba(21, 21, 21, 0.7);
}

.map-empty p {
  margin: 4px 0 14px;
}

dl,
dd {
  margin: 0;
}

.detail-content dl {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 18px;
}

.detail-content dt {
  color: rgba(21, 21, 21, 0.55);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-content dd {
  font-family: "IBM Plex Sans", Inter, sans-serif;
  font-weight: 700;
}

.control-band,
.dashboard,
.content-grid,
.report-section,
.seo-band {
  margin: 0 auto;
  max-width: 1440px;
  padding-left: clamp(18px, 4vw, 52px);
  padding-right: clamp(18px, 4vw, 52px);
}

.control-band {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 54px;
}

.filter-group,
.toggle {
  align-items: center;
  background: var(--white);
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 14px;
  display: flex;
  gap: 10px;
  min-height: 52px;
  padding: 8px 12px;
}

.filter-group label {
  color: rgba(21, 21, 21, 0.56);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

select,
input,
textarea {
  background: var(--white);
  border: 1px solid rgba(21, 21, 21, 0.12);
  border-radius: 12px;
  color: var(--forest);
  min-height: 44px;
  padding: 10px 12px;
}

.filter-group select {
  border: 0;
  min-height: auto;
  padding: 0 20px 0 0;
}

.toggle {
  cursor: pointer;
  font-weight: 800;
}

.toggle input,
.terms input {
  accent-color: var(--evergreen);
}

.dashboard {
  padding-bottom: 58px;
}

.section-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 24px;
  max-width: 790px;
}

.metric-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, 1fr);
}

.metric-card {
  background: var(--white);
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: var(--radius);
  padding: 20px;
}

.metric-card span {
  color: rgba(21, 21, 21, 0.62);
  font-weight: 800;
}

.metric-card strong {
  display: block;
  font-family: "IBM Plex Sans", Inter, sans-serif;
  font-size: 3.6rem;
  line-height: 1;
  margin: 16px 0 6px;
}

.metric-card p {
  margin: 0;
}

.metric-card.low {
  border-top: 5px solid var(--low);
}

.metric-card.moderate {
  border-top: 5px solid var(--moderate);
}

.metric-card.elevated {
  border-top: 5px solid var(--high);
}

.metric-card.high {
  border-top: 5px solid var(--extreme);
}

.content-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1.18fr 0.82fr;
  padding-bottom: 70px;
}

.panel,
.report-form {
  background: var(--white);
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: var(--radius);
  box-shadow: 0 14px 50px rgba(21, 21, 21, 0.06);
}

.panel {
  padding: 22px;
}

.panel-header {
  align-items: start;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-header a {
  color: var(--evergreen);
  font-weight: 900;
}

.sighting-list {
  display: grid;
  gap: 10px;
}

.sighting-item {
  align-items: center;
  background: var(--white);
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 14px;
  color: var(--forest);
  cursor: pointer;
  display: grid;
  gap: 14px;
  grid-template-columns: 52px 1fr auto;
  padding: 12px;
  text-align: left;
  width: 100%;
}

.animal-token {
  align-items: center;
  background: var(--forest);
  border-radius: 13px;
  color: var(--white);
  display: flex;
  font-size: 1.15rem;
  font-weight: 900;
  height: 52px;
  justify-content: center;
  position: relative;
  width: 52px;
}

.animal-svg {
  display: block;
  height: 22px;
  width: 22px;
}

.sighting-item h3 {
  font-size: 1rem;
}

.sighting-item p {
  color: rgba(21, 21, 21, 0.62);
  margin: 4px 0 0;
}

.species-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.species-cloud button {
  background: var(--cloud);
  border: 1px solid rgba(21, 21, 21, 0.09);
  border-radius: 999px;
  color: rgba(21, 21, 21, 0.74);
  cursor: pointer;
  font-weight: 800;
  padding: 10px 13px;
}

.species-cloud button.active,
.species-cloud button:hover {
  background: var(--evergreen);
  color: var(--white);
}

.species-feature {
  align-items: center;
  background: var(--cloud);
  border-radius: var(--radius);
  display: grid;
  gap: 16px;
  grid-template-columns: 72px 1fr;
  margin-top: 22px;
  padding: 18px;
}

.species-icon {
  background: var(--forest);
  border-radius: 16px;
  color: var(--white);
  display: grid;
  font-family: "IBM Plex Sans", Inter, sans-serif;
  font-weight: 800;
  height: 72px;
  place-items: center;
  width: 72px;
}

.species-feature p {
  margin: 6px 0 0;
}

.report-section {
  display: grid;
  gap: clamp(22px, 4vw, 54px);
  grid-template-columns: minmax(280px, 0.75fr) minmax(360px, 1.25fr);
  padding-bottom: 72px;
}

.report-intro {
  align-self: start;
  position: sticky;
  top: 118px;
}

.process-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.process-list span {
  background: var(--white);
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 14px;
  font-weight: 900;
  padding: 14px;
}

.report-form {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 30px);
}

.report-form label,
.auth-modal label {
  color: rgba(21, 21, 21, 0.7);
  display: grid;
  font-weight: 800;
  gap: 7px;
}

.form-row {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, 1fr);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.upload-box {
  align-items: center;
  border: 1px dashed rgba(31, 77, 58, 0.45);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex !important;
  justify-content: center;
  min-height: 118px;
  text-align: center;
}

.upload-box input {
  display: none;
}

.upload-box svg {
  color: var(--evergreen);
  width: 28px;
}

.terms {
  align-items: start;
  display: grid !important;
  gap: 10px !important;
  grid-template-columns: auto 1fr;
}

.seo-band {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
  padding-bottom: 72px;
}

.seo-band a {
  background: var(--forest);
  border-radius: var(--radius);
  color: var(--white);
  min-height: 138px;
  padding: 20px;
}

.seo-band span {
  color: rgba(255, 255, 255, 0.65);
  display: block;
  font-size: 0.78rem;
  font-weight: 900;
  margin-bottom: 28px;
  text-transform: uppercase;
}

.seo-band strong {
  font-family: Manrope, Inter, sans-serif;
  font-size: 1.35rem;
  line-height: 1.15;
}

.site-footer {
  align-items: center;
  background: var(--forest);
  color: var(--white);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  padding: 28px clamp(18px, 4vw, 52px);
}

.site-footer img {
  width: 180px;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
  margin: 0;
}

.site-footer div {
  display: flex;
  gap: 18px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 800;
}

.auth-modal {
  border: 0;
  border-radius: 18px;
  box-shadow: var(--shadow);
  max-width: 440px;
  padding: 0;
  width: calc(100% - 32px);
}

.detail-modal {
  border: 0;
  border-radius: 18px;
  box-shadow: var(--shadow);
  max-width: 620px;
  padding: 0;
  width: calc(100% - 32px);
}

.detail-modal::backdrop {
  background: rgba(21, 21, 21, 0.45);
  backdrop-filter: blur(4px);
}

.detail-modal form {
  display: flex;
  justify-content: flex-end;
  padding: 18px 18px 0;
}

.detail-content {
  padding: 0 26px 26px;
}

.detail-content h2 {
  margin-bottom: 8px;
}

.detail-content p {
  color: rgba(21, 21, 21, 0.68);
}

.detail-source {
  color: var(--evergreen);
  display: inline-flex;
  font-weight: 900;
  margin-top: 18px;
}

.auth-modal::backdrop {
  background: rgba(21, 21, 21, 0.45);
  backdrop-filter: blur(4px);
}

.auth-modal form {
  display: grid;
  gap: 16px;
  padding: 26px;
}

.close-button {
  background: var(--cloud);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  height: 38px;
  justify-self: end;
  line-height: 1;
  width: 38px;
}

.modal-note {
  color: rgba(21, 21, 21, 0.6);
  margin: 0;
}

@media (max-width: 1120px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    display: none;
  }

  .map-shell,
  .content-grid,
  .report-section {
    grid-template-columns: 1fr;
  }

  .map-copy {
    max-width: 860px;
  }

  .report-intro {
    position: static;
  }

  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 14px 16px;
  }

  .brand img {
    width: 142px;
  }

  .secondary-button,
  .header-actions .primary-button {
    display: none;
  }

  .map-shell {
    min-height: auto;
    padding-top: 24px;
  }

  h1 {
    font-size: 2.55rem;
  }

  .search-bar {
    grid-template-columns: 22px 1fr;
  }

  .search-bar button {
    grid-column: 1 / -1;
  }

  .live-map {
    height: 560px;
    min-height: 560px;
    border-radius: 16px;
  }

  #wildlife-map {
    height: 100%;
    min-height: 100%;
  }

  .map-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-content dl,
  .metric-grid,
  .form-row,
  .seo-band {
    grid-template-columns: 1fr;
  }

  .sighting-item {
    align-items: start;
    grid-template-columns: 46px 1fr;
  }

  .search-result {
    align-items: start;
    grid-template-columns: 42px 1fr;
  }

  .sighting-item .badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .search-result .badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .species-feature {
    grid-template-columns: 1fr;
  }
}
