.eds-bio-monitor {
  --eds-bg: #f5f8f4;
  --eds-panel: #ffffff;
  --eds-ink: #14231d;
  --eds-muted: #607069;
  --eds-line: #dbe6dd;
  --eds-green: #1f6b4f;
  --eds-green-dark: #14543d;
  --eds-shadow: 0 16px 36px rgba(20, 35, 29, 0.14);
  color: var(--eds-ink);
  width: 100%;
  max-width: 100%;
  display: block;
  clear: both;
  white-space: normal;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.eds-bio-monitor * {
  box-sizing: border-box;
  white-space: normal;
}

code .eds-bio-monitor,
p .eds-bio-monitor {
  display: block;
  width: min(1180px, 100%);
  margin: 0 auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.4;
  text-align: left;
}

.eds-bio-monitor button,
.eds-bio-monitor input,
.eds-bio-monitor select {
  font-family: inherit;
}

.eds-bio-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 24px;
  align-items: stretch;
  padding: 28px;
  border: 1px solid var(--eds-line);
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #eef6f1 100%);
}

.eds-bio-kicker {
  margin: 0 0 8px;
  color: var(--eds-green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eds-bio-hero h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.03;
  letter-spacing: 0;
}

.eds-bio-hero p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--eds-muted);
  font-size: 16px;
  line-height: 1.55;
}

.eds-latest-card {
  min-height: 210px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px;
  border-radius: 10px;
  background: var(--eds-panel);
  border: 1px solid var(--eds-line);
  box-shadow: var(--eds-shadow);
}

.eds-latest-card > span,
.eds-bio-summary span {
  color: var(--eds-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eds-latest-card strong {
  font-size: 22px;
  line-height: 1.12;
}

.eds-latest-card em {
  color: var(--eds-muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.35;
}

.eds-latest-image {
  overflow: hidden;
  min-height: 88px;
  border-radius: 8px;
  background: #edf4ef;
}

.eds-latest-image:empty {
  display: none;
}

.eds-latest-image img {
  width: 100%;
  height: 150px;
  display: block;
  object-fit: cover;
}

.eds-bio-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.eds-bio-summary > div {
  padding: 14px 16px;
  border: 1px solid var(--eds-line);
  border-radius: 8px;
  background: var(--eds-panel);
}

.eds-bio-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.eds-map-section {
  overflow: hidden;
  border: 1px solid var(--eds-line);
  border-radius: 10px;
  background: var(--eds-bg);
}

.eds-map-section .eds-map-wrap {
  position: relative;
  height: min(720px, 72vh);
  min-height: 560px;
}

.eds-map-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
  padding: 12px 14px;
  background: #fbfdfb;
  border-top: 1px solid var(--eds-line);
}

.eds-legend-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  width: 100%;
}

.eds-legend-inline h3 {
  flex: 0 0 auto;
  margin: 0 4px 0 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eds-legend-inline .eds-legend-row {
  appearance: none;
  flex: 1 1 145px;
  border: 1px solid var(--eds-line);
  border-radius: 999px;
  background: #fff;
  color: var(--eds-ink);
  cursor: pointer;
  width: auto;
  min-width: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  opacity: 0.48;
  transition: opacity 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.eds-legend-inline .eds-legend-row.is-active {
  opacity: 1;
  border-color: rgba(31, 107, 79, 0.28);
  background: #f5fbf7;
}

.eds-legend-inline .eds-legend-row span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.eds-legend-inline .eds-legend-row b {
  flex: 0 0 auto;
}

.eds-map-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.eds-map-actions button {
  min-height: 36px;
  border: 1px solid var(--eds-line);
  border-radius: 8px;
  background: #fff;
  color: var(--eds-green-dark);
  cursor: pointer;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.eds-map-actions button:first-child {
  border-color: var(--eds-green);
  background: var(--eds-green);
  color: #fff;
}

.eds-map-clock {
  grid-column: 1 / -1;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--eds-line);
  border-radius: 8px;
  background: #fff;
}

.eds-map-clock span,
.eds-map-clock strong {
  display: inline;
}

.eds-map-clock span {
  margin-right: 8px;
  color: var(--eds-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eds-map-clock strong {
  font-size: 14px;
}

.eds-capture-meta {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 620;
  max-width: min(520px, calc(100% - 32px));
  padding: 10px 12px;
  border: 1px solid rgba(31, 107, 79, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--eds-green-dark);
  box-shadow: 0 8px 24px rgba(20, 35, 29, 0.12);
  font-size: 13px;
  font-weight: 850;
}

.eds-tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}

.eds-tabbar button {
  border: 1px solid var(--eds-line);
  border-radius: 999px;
  background: #fff;
  color: var(--eds-green-dark);
  cursor: pointer;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
}

.eds-tabbar button.is-active {
  background: var(--eds-green);
  border-color: var(--eds-green);
  color: #fff;
}

.eds-tabbar button.eds-alert-tab {
  border-color: rgba(188, 75, 81, 0.35);
  background: #fff7f6;
  color: #9f343b;
}

.eds-tabbar button.eds-alert-tab.is-active {
  border-color: #bc4b51;
  background: #bc4b51;
  color: #fff;
}

.eds-tab-panels {
  margin-top: 12px;
}

.eds-tab-panel {
  display: none;
  padding: 18px;
  border: 1px solid var(--eds-line);
  border-radius: 10px;
  background: var(--eds-panel);
}

.eds-tab-panel.is-active {
  display: block;
}

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

.eds-tab-panel details {
  border: 1px solid var(--eds-line);
  border-radius: 8px;
  background: #fbfdfb;
  padding: 0;
}

.eds-tab-panel details + details {
  margin-top: 12px;
}

.eds-tab-panel summary {
  cursor: pointer;
  padding: 14px 16px;
  color: var(--eds-green-dark);
  font-size: 16px;
  font-weight: 850;
}

.eds-tab-panel details > :not(summary) {
  margin-left: 16px;
  margin-right: 16px;
}

.eds-tab-panel details > :last-child {
  margin-bottom: 16px;
}

.eds-tab-panel ul {
  color: var(--eds-muted);
  line-height: 1.6;
}

.eds-threat-alerts {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 520;
  width: min(330px, calc(100% - 32px));
  padding: 12px;
  border: 1px solid rgba(188, 75, 81, 0.3);
  border-radius: 8px;
  background: rgba(255, 250, 248, 0.96);
  box-shadow: var(--eds-shadow);
}

.eds-threat-alerts strong {
  display: block;
  margin-bottom: 8px;
  color: #9f343b;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.eds-threat-alerts div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 7px 0;
  border-top: 1px solid rgba(188, 75, 81, 0.14);
}

.eds-threat-alerts div:first-of-type {
  border-top: 0;
}

.eds-threat-alerts b {
  display: block;
  color: var(--eds-ink);
}

.eds-threat-alerts em {
  display: block;
  color: var(--eds-muted);
  font-size: 12px;
  font-style: normal;
}

.eds-threat-alerts img {
  width: 42px;
  height: 42px;
  border-radius: 7px;
  object-fit: cover;
  background: #f3e7e5;
}

.eds-threat-list {
  display: grid;
  gap: 12px;
}

.eds-threat-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(188, 75, 81, 0.24);
  border-radius: 8px;
  background: #fffaf8;
}

.eds-threat-photo {
  overflow: hidden;
  width: 108px;
  height: 108px;
  border-radius: 8px;
  background: #f3e7e5;
}

.eds-threat-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.eds-threat-photo span {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 10px;
  color: #9f343b;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.eds-threat-level {
  display: inline-flex;
  margin-bottom: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #bc4b51;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eds-threat-card h4 {
  margin: 0 0 4px;
  color: #9f343b;
  font-size: 18px;
}

.eds-threat-card p {
  margin: 5px 0;
  color: var(--eds-muted);
  line-height: 1.45;
}

.eds-threat-card em {
  font-style: normal;
}

.eds-threat-card a {
  display: inline-flex;
  margin-top: 5px;
  color: var(--eds-green-dark);
  font-weight: 850;
}

.eds-bio-layout {
  height: min(720px, calc(100vh - 120px));
  min-height: 600px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--eds-line);
  border-radius: 10px;
  background: var(--eds-bg);
}

.eds-bio-controls {
  overflow: auto;
  padding: 18px;
  background: #fbfdfb;
  border-right: 1px solid var(--eds-line);
}

.eds-control-group {
  padding: 0 0 18px;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--eds-line);
}

.eds-control-group h3 {
  margin: 0 0 12px;
  color: #354a40;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eds-control-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.eds-control-heading h3 {
  margin: 0;
}

.eds-control-heading button,
.eds-bio-controls select,
.eds-bio-controls input[type="search"] {
  font: inherit;
}

.eds-control-heading button {
  border: 0;
  border-radius: 8px;
  background: var(--eds-green);
  color: #fff;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.eds-tool-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.eds-tool-actions button {
  min-height: 38px;
  border: 1px solid var(--eds-line);
  border-radius: 8px;
  background: #fff;
  color: var(--eds-green-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.eds-control-group label:not(.eds-check) {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--eds-muted);
  font-size: 12px;
  font-weight: 800;
}

.eds-bio-controls select,
.eds-bio-controls input[type="search"] {
  width: 100%;
  height: 38px;
  border: 1px solid var(--eds-line);
  border-radius: 8px;
  background: #fff;
  color: var(--eds-ink);
  padding: 0 10px;
}

.eds-check {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #24352e;
  font-size: 14px;
}

.eds-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--eds-green);
}

.eds-check b {
  margin-left: auto;
  color: var(--eds-muted);
  font-size: 12px;
}

.eds-dot {
  width: 11px;
  height: 11px;
  display: inline-block;
  border-radius: 999px;
}

.eds-note {
  margin: 8px 0 0;
  color: var(--eds-muted);
  font-size: 12px;
  line-height: 1.45;
}

.eds-map-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
}

.eds-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 560px;
  background: #dfe8e2;
}

.eds-map-status,
.eds-legend {
  position: absolute;
  z-index: 500;
  border: 1px solid rgba(219, 230, 221, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--eds-shadow);
}

.eds-map-status {
  top: 16px;
  left: 16px;
  max-width: min(420px, calc(100% - 32px));
  padding: 10px 12px;
  color: var(--eds-green-dark);
  font-size: 13px;
  font-weight: 800;
}

.eds-map-section .eds-map-status {
  max-width: min(460px, calc(100% - 380px));
}

.eds-legend {
  right: 16px;
  bottom: 16px;
  width: 250px;
  padding: 14px;
}

.eds-legend h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.eds-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  font-size: 12px;
}

.eds-legend-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eds-legend-row i {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 999px;
}

.eds-marker-wrap {
  background: transparent;
  border: 0;
}

.eds-marker {
  width: 16px;
  height: 16px;
  display: block;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--marker-color);
  box-shadow: 0 2px 8px rgba(20, 35, 29, 0.28);
}

.eds-popup {
  max-width: 260px;
}

.eds-popup img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 8px;
}

.eds-popup h3,
.eds-popup p {
  margin: 0 0 5px;
}

.eds-popup p {
  color: var(--eds-muted);
  font-size: 12px;
}

.eds-popup a {
  color: var(--eds-green);
  font-weight: 800;
  text-decoration: none;
}

.eds-bio-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.eds-bio-panels article {
  padding: 20px;
  border: 1px solid var(--eds-line);
  border-radius: 10px;
  background: var(--eds-panel);
}

.eds-bio-panels h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.eds-bio-panels p {
  color: var(--eds-muted);
  line-height: 1.58;
}

.eds-objectives-panel ul {
  margin: 0;
  padding-left: 20px;
  color: var(--eds-muted);
  line-height: 1.6;
}

.eds-panel-note {
  margin-top: -4px;
  font-size: 13px;
}

.eds-ranking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.eds-ranking-card {
  padding: 12px;
  border: 1px solid var(--eds-line);
  border-radius: 8px;
  background: #fbfdfb;
}

.eds-ranking-card h4 {
  margin: 0 0 10px;
  color: var(--eds-green-dark);
  font-size: 14px;
}

.eds-ranking-card p {
  margin: 0;
  font-size: 13px;
}

.eds-ranking-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-top: 1px solid rgba(219, 230, 221, 0.8);
  color: var(--eds-ink);
  text-decoration: none;
}

.eds-ranking-row:hover strong {
  color: var(--eds-green);
  text-decoration: underline;
}

.eds-ranking-row:first-of-type {
  border-top: 0;
}

.eds-ranking-row > b,
.eds-ranking-row small {
  border-radius: 999px;
  background: #e8f2ed;
  color: var(--eds-green-dark);
  text-align: center;
  font-weight: 800;
}

.eds-ranking-row > b {
  width: 24px;
  height: 24px;
  line-height: 24px;
}

.eds-ranking-row small {
  min-width: 28px;
  padding: 3px 7px;
}

.eds-ranking-row strong,
.eds-ranking-row em {
  display: block;
}

.eds-ranking-row strong {
  font-size: 13px;
}

.eds-ranking-row em {
  color: var(--eds-muted);
  font-size: 11px;
}

.eds-species-list {
  display: grid;
  gap: 8px;
}

.eds-species-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--eds-line);
  border-radius: 8px;
  color: var(--eds-ink);
  text-decoration: none;
}

.eds-species-row strong,
.eds-species-row em {
  display: block;
}

.eds-species-row em {
  color: var(--eds-muted);
  font-size: 12px;
}

.eds-species-row b {
  min-width: 34px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8f2ed;
  color: var(--eds-green-dark);
  text-align: center;
}

.eds-bio-monitor .leaflet-control-layers,
.eds-bio-monitor .leaflet-control-zoom {
  border: 0 !important;
  box-shadow: var(--eds-shadow) !important;
}

.eds-capture-mode .leaflet-overlay-pane svg {
  overflow: visible;
}

@media (max-width: 960px) {
  .eds-bio-hero,
  .eds-bio-summary,
  .eds-bio-layout,
  .eds-bio-panels,
  .eds-ranking-grid,
  .eds-filter-grid,
  .eds-map-footer {
    grid-template-columns: 1fr;
  }

  .eds-map-section .eds-map-wrap {
    min-height: 520px;
    height: 62vh;
  }

  .eds-map-section .eds-map-status {
    max-width: calc(100% - 32px);
  }

  .eds-map-actions {
    justify-content: flex-start;
  }

  .eds-map-actions button {
    flex: 1 1 180px;
  }

  .eds-bio-layout {
    height: auto;
    min-height: 0;
  }

  .eds-bio-controls {
    max-height: 420px;
    border-right: 0;
    border-bottom: 1px solid var(--eds-line);
  }

  .eds-map-wrap {
    height: 560px;
  }
}

@media (max-width: 620px) {
  .eds-bio-hero {
    padding: 20px;
  }

  .eds-legend {
    left: 12px;
    right: 12px;
    width: auto;
  }

  .eds-map-actions {
    justify-content: stretch;
  }

  .eds-map-actions button {
    flex: 1 1 100%;
  }

  .eds-legend-inline h3 {
    flex-basis: 100%;
  }

  .eds-legend-inline .eds-legend-row {
    flex: 1 1 100%;
  }

  .eds-capture-meta {
    left: 10px;
    top: 10px;
    max-width: calc(100% - 20px);
    font-size: 11px;
  }

  .eds-threat-card {
    grid-template-columns: 1fr;
  }

  .eds-threat-photo {
    width: 100%;
    height: 190px;
  }

  .eds-threat-alerts {
    position: static;
    width: auto;
    margin: 10px;
  }
}
