:root {
  --ink: #18201c;
  --muted: #627066;
  --paper: #f6f8f3;
  --surface: #ffffff;
  --line: #d9e2d7;
  --field: #edf3ec;
  --forest: #24513c;
  --forest-dark: #173528;
  --warning: #b34b35;
  --water: #286ca0;
  --track: #767a73;
  --shadow: 0 20px 60px rgba(21, 34, 28, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

button,
select,
input {
  font: inherit;
}

.hidden-site-link {
  display: none;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 392px;
  min-height: 100vh;
  background: #dfe6df;
}

.app-shell.panel-minimized {
  grid-template-columns: minmax(0, 1fr) 58px;
}

.map-stage {
  position: relative;
  min-height: 100vh;
}

.map-canvas {
  position: absolute;
  inset: 0;
}

.map-status {
  position: absolute;
  left: 22px;
  bottom: 22px;
  z-index: 2;
  padding: 10px 14px;
  color: #fff;
  background: rgba(24, 32, 28, 0.86);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.2;
  box-shadow: var(--shadow);
}

.map-status:empty {
  display: none;
}

.control-panel {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  padding: 18px;
  overflow-y: auto;
  background: rgba(246, 248, 243, 0.97);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.panel-handle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-handle span,
.panel-handle strong {
  display: block;
  line-height: 1.2;
}

.panel-handle span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.panel-handle strong {
  margin-top: 2px;
  font-size: 17px;
  font-weight: 900;
}

.panel-handle button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 38px;
  padding: 0;
  color: #fff;
  background: var(--forest);
  border: 1px solid var(--forest);
  border-radius: 6px;
  cursor: pointer;
  overflow: visible;
}

.panel-handle .chevron {
  display: block;
  width: 13px;
  height: 13px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: translateX(2px) rotate(-45deg);
}

.app-shell.panel-minimized .panel-handle {
  min-height: calc(100vh - 36px);
  flex-direction: column;
  justify-content: flex-start;
  margin-bottom: 0;
  padding-top: 4px;
  text-align: center;
}

.app-shell.panel-minimized .panel-handle div {
  display: none;
}

.app-shell.panel-minimized .panel-handle button {
  width: 42px;
  height: 42px;
}

.app-shell.panel-minimized .panel-handle .chevron {
  transform: translateX(-2px) rotate(135deg);
}

.app-shell.panel-minimized .panel-content {
  display: none;
}

.brand {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  background: var(--forest-dark);
  border-radius: 8px;
  overflow: hidden;
}

.brand-mark img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.brand-link strong,
.brand-link small {
  display: block;
  line-height: 1.1;
}

.brand-link strong {
  font-size: 18px;
  font-weight: 900;
}

.brand-link small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.top-nav a {
  padding: 8px 10px;
  color: var(--forest-dark);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.top-nav .version-toggle,
.button.primary {
  color: #fff;
  background: var(--forest);
  border-color: var(--forest);
}

.top-nav .version-toggle:hover {
  background: var(--forest-dark);
}

.intro-panel,
.stats-grid,
.filters,
.limit-control,
.latest-panel,
.panel,
.section-band,
.resource-grid a,
.resource-card,
.province-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.intro-panel,
.filters,
.limit-control,
.latest-panel,
.panel,
.section-band {
  padding: 16px;
}

.intro-panel {
  margin-top: 14px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: 28px;
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.2;
}

p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.62;
}

.quick-note,
.location-status {
  font-size: 14px;
  line-height: 1.45;
}

.quick-note {
  margin-bottom: 14px;
}

.location-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--forest);
  font-weight: 750;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button,
.section-heading button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 13px;
  color: var(--forest-dark);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding: 10px;
}

.stats-grid div {
  min-height: 78px;
  padding: 12px;
  background: var(--field);
  border-radius: 7px;
}

.stats-grid span {
  display: block;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.stats-grid small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.filters,
.limit-control,
.latest-panel {
  margin-top: 12px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: 17px;
}

.section-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.filter-row + .filter-row {
  border-top: 1px solid var(--line);
}

.filter-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--forest);
}

.filter-row span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 999px;
}

.filter-row.kill span::before {
  background: var(--warning);
}

.filter-row.spotted span::before {
  background: var(--water);
}

.filter-row.tracks span::before {
  background: var(--track);
}

.limit-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.limit-control label {
  font-size: 14px;
  font-weight: 800;
}

.limit-control select {
  min-height: 38px;
  padding: 6px 34px 6px 10px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.latest-list {
  display: grid;
  gap: 10px;
  max-height: 300px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.latest-list li {
  padding: 12px;
  background: var(--field);
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
}

.latest-list li:hover,
.latest-list li:focus {
  border-color: var(--forest);
  outline: none;
}

.report-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 850;
}

.report-title span:last-child {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

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

.site-content {
  width: min(1180px, calc(100% - 36px));
  margin: 28px auto;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.section-band {
  margin-bottom: 18px;
  padding: 28px;
}

.section-intro {
  max-width: 740px;
  margin-bottom: 18px;
}

.province-grid,
.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.resource-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.province-grid article,
.resource-grid a,
.resource-card {
  padding: 16px;
}

.province-grid p {
  margin: 0;
  font-size: 14px;
}

.resource-grid a,
.resource-card {
  display: block;
  text-decoration: none;
}

.resource-grid strong,
.resource-grid span {
  display: block;
}

.resource-grid strong {
  margin-bottom: 8px;
  font-size: 17px;
}

.resource-grid span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.text-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--forest);
  font-weight: 850;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.section-note {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.quick-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.quick-list.large {
  font-size: 16px;
}

.modern-page-grid {
  margin-top: 18px;
}

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

.stacked-list article {
  padding: 16px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stacked-list p {
  margin-bottom: 0;
}

.info-window {
  max-width: 280px;
  color: #1e2721;
  font: 14px/1.45 Inter, ui-sans-serif, system-ui, sans-serif;
}

.info-window h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.info-window p {
  margin: 5px 0;
}

.info-window img {
  display: block;
  width: 100%;
  max-height: 180px;
  margin-top: 10px;
  object-fit: cover;
  border-radius: 6px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 4vw, 48px);
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 750;
}

.report-page {
  min-height: 100vh;
  background: var(--paper);
}

.report-shell {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

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

.report-card {
  padding: clamp(18px, 4vw, 34px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modern-form {
  display: grid;
  gap: 16px;
}

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

.modern-form label,
.modern-form label span {
  display: grid;
  gap: 7px;
}

.modern-form label span,
.optional-fields summary {
  color: var(--forest-dark);
  font-size: 13px;
  font-weight: 850;
}

.modern-form input,
.modern-form select,
.modern-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.modern-form textarea {
  resize: vertical;
}

.optional-fields {
  padding: 14px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.optional-fields summary {
  cursor: pointer;
}

.optional-fields label {
  margin-top: 12px;
}

.checker-field {
  position: absolute;
  left: -9999px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.form-note,
.notice {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.notice {
  margin-bottom: 16px;
  padding: 12px 14px;
  background: #fff7e2;
  border: 1px solid #e2c36d;
  border-radius: 8px;
  color: #5c4310;
  font-weight: 750;
}

@media (max-width: 900px) {
  .app-shell,
  .app-shell.panel-minimized {
    grid-template-columns: 1fr;
    grid-template-rows: 62vh auto;
  }

  .app-shell.panel-minimized {
    grid-template-rows: calc(100vh - 88px) 88px;
  }

  .map-stage {
    min-height: 62vh;
  }

  .app-shell.panel-minimized .map-stage {
    min-height: calc(100vh - 88px);
  }

  .control-panel {
    min-height: auto;
    padding: 18px;
    border-top: 1px solid var(--line);
    border-left: 0;
    box-shadow: 0 -18px 50px rgba(21, 34, 28, 0.16);
  }

  .panel-handle {
    min-height: 38px;
    margin: -4px 0 14px;
  }

  .panel-handle .chevron {
    transform: translateY(-1px) rotate(45deg);
  }

  .app-shell.panel-minimized .control-panel {
    overflow: hidden;
    padding: 7px 18px calc(42px + env(safe-area-inset-bottom, 0px));
  }

  .app-shell.panel-minimized .panel-handle {
    min-height: 40px;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px));
  }

  .app-shell.panel-minimized .panel-handle div {
    display: none;
  }

  .app-shell.panel-minimized .panel-handle button {
    width: 54px;
    height: 38px;
  }

  .app-shell.panel-minimized .panel-handle .chevron {
    transform: translateY(1px) rotate(225deg);
  }

  @supports (padding-bottom: max(0px)) {
    .app-shell.panel-minimized .control-panel {
      padding-bottom: max(42px, env(safe-area-inset-bottom));
    }

    .app-shell.panel-minimized .panel-handle {
      padding-bottom: max(36px, env(safe-area-inset-bottom));
    }
  }

  h1 {
    font-size: 24px;
  }

  .latest-list {
    max-height: none;
  }

  .content-grid,
  .province-grid {
    grid-template-columns: 1fr;
  }

  .report-header {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .top-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 12px;
  }

  .stats-grid,
  .resource-grid,
  .resource-grid.compact {
    grid-template-columns: 1fr;
  }

  .site-content {
    width: calc(100% - 28px);
  }

  .limit-control,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .button-row {
    width: 100%;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .map-status {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }
}
