:root {
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-ui: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --paper: #f4ecd8;
  --paper-2: #efe5cc;
  --bg-surface: #fbf6e9;
  --bg-surface-alt: #f1e7cf;
  --bg-surface-hover: #e8dcbe;
  --ink: #2c2a23;
  --ink-soft: #6c6354;
  --forest: #2f5d3b;
  --forest-deep: #244a2f;
  --lichen: #6f8f4e;
  --amber: #c8662a;
  --rust: #9c3b1b;
  --on-accent: #fbf6e9;
  --bg-glass: rgba(250, 245, 232, 0.86);
  --border-color: #d8c8a4;
  --border-light: rgba(120, 96, 50, 0.18);
  --shadow-soft: 0 6px 18px rgba(58, 43, 18, 0.16);
  --shadow-modal: 0 24px 60px rgba(40, 30, 12, 0.3);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-pill: 999px;
  --transition-fast: 0.18s ease;
  font-family: var(--font-ui);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
}

.app-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
}

.site-header {
  position: relative;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 88px;
  padding: 14px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 14px rgba(58, 43, 18, 0.1);
}

.brand-block {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  line-height: 1;
}

.cem-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  background: var(--forest);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.cem-button:hover,
.cem-button:focus-visible {
  background: var(--forest-deep);
  transform: translateY(-1px);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 370px) minmax(0, 1fr);
  min-height: 0;
}

.dashboard {
  position: relative;
  z-index: 500;
  overflow-y: auto;
  padding: 18px;
  background: var(--paper);
  border-right: 1px solid var(--border-color);
  scrollbar-color: var(--border-color) transparent;
}

.content-area {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px 28px;
  background: #f7f5ef;
}

.dashboard-section {
  padding: 18px;
  margin-bottom: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: 0 3px 12px rgba(58, 43, 18, 0.08);
}

.dashboard-section[hidden] {
  display: none;
}

.section-kicker {
  margin: 0 0 5px;
  color: var(--lichen);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.dashboard h2,
.detail-subheading {
  margin: 0;
  font-family: var(--font-display);
  color: var(--ink);
}

.dashboard h2 {
  font-size: 1.45rem;
}

.bird-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 14px;
}

.date-filter {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  margin: 2px 0 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.date-filter legend,
.date-filter label {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 600;
}

.date-filter input {
  min-height: 36px;
  margin-top: 4px;
  font-size: 0.74rem;
}

.bird-search input,
.bird-search button,
.secondary-button {
  min-height: 42px;
  border-radius: var(--radius-sm);
  font: inherit;
}

.bird-search input {
  width: 100%;
  padding: 0 12px;
  color: var(--ink);
  background: #fffdf7;
  border: 1px solid var(--border-color);
  outline: none;
}

.bird-search input:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(47, 93, 59, 0.13);
}

.bird-search button {
  padding: 0 14px;
  border: 0;
  color: var(--on-accent);
  background: var(--forest);
  font-weight: 700;
  cursor: pointer;
}

.secondary-button {
  width: 100%;
  margin-top: 9px;
  color: var(--forest-deep);
  background: transparent;
  border: 1px solid var(--forest);
  font-weight: 700;
  cursor: pointer;
}

.map-mode,
.details-intro {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.45;
}

.map-mode-banner {
  margin: 0 0 14px;
  padding: 13px 16px;
  color: var(--forest-deep);
  background: #e4eef4;
  border-left: 4px solid var(--forest);
  border-radius: var(--radius-md);
  font-weight: 600;
}

.species-heading {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.species-heading:has(img[hidden]) {
  grid-template-columns: 1fr;
}

.species-heading img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--paper-2);
}

.scientific-name {
  margin: 3px 0 7px;
  color: var(--ink-soft);
  font-style: italic;
}

.iucn-badge {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  color: var(--forest-deep);
  background: #dcebd8;
  font-size: 0.72rem;
  font-weight: 700;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 0;
}

.metric-grid > div {
  min-width: 0;
  padding: 9px;
  background: var(--bg-surface-alt);
  border-radius: var(--radius-sm);
}

.metric-grid dt {
  color: var(--ink-soft);
  font-size: 0.7rem;
  text-transform: capitalize;
}

.metric-grid dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.image-credit {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.sidebar-subheading {
  margin: 18px 0 7px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  font-family: var(--font-display);
  font-size: 1rem;
}

.sidebar-copy {
  margin: 8px 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

.ranked-spots {
  padding: 0;
  margin: 8px 0 0;
  list-style: none;
}

.ranked-spots button,
.ranked-spots .rank-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 8px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-light);
  font: inherit;
  font-size: 0.78rem;
  text-align: left;
}

.ranked-spots button { cursor: pointer; }
.ranked-spots button:hover { color: var(--forest); }
.rank-name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}
.rank-project {
  font-size: 0.68rem;
  color: var(--ink-soft);
  font-family: var(--font-mono);
}
.rank-value { color: var(--forest); font-weight: 700; }

.details-panel {
  min-height: 180px;
}

.analysis-output {
  min-height: 260px;
  margin-top: 18px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: 0 3px 14px rgba(58, 43, 18, 0.08);
}

.analysis-output.is-empty {
  min-height: 260px;
}

.analysis-output h2 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 1.6rem;
}

.detail-subheading {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  font-size: 1.03rem;
}

.species-list {
  padding: 0;
  margin: 8px 0 0;
  list-style: none;
}

.species-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.84rem;
}

.hour-chart {
  display: flex;
  align-items: end;
  gap: 2px;
  height: 92px;
  margin-top: 12px;
  padding-top: 8px;
  border-bottom: 1px solid var(--border-color);
}

.hour-bar {
  flex: 1;
  min-width: 2px;
  background: var(--lichen);
  border-radius: 2px 2px 0 0;
}

.chart-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.data-table-wrap {
  margin-top: 9px;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.data-table th,
.data-table td {
  padding: 9px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  vertical-align: top;
}

.data-table th { color: var(--ink-soft); font-size: 0.7rem; text-transform: uppercase; }
.data-table a { color: var(--forest); font-weight: 700; }

/* Spot Analysis Charts Grid (Side-by-side / Stacked Responsive) */
.analysis-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.analysis-chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 18px 20px 20px;
  box-shadow: 0 4px 16px rgba(58, 43, 18, 0.05);
  display: flex;
  flex-direction: column;
}

.analysis-chart-card h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--ink);
}

.chart-subtitle {
  margin: 3px 0 14px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* Diurnal Bar Chart with Axes and Gridlines */
.diurnal-chart-body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.diurnal-plot-area {
  display: flex;
  align-items: flex-end;
  position: relative;
  height: 180px;
  padding-left: 42px;
}

.y-axis-label {
  position: absolute;
  left: -2px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.y-axis-ticks {
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: right;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--ink-soft);
  pointer-events: none;
}

.diurnal-gridlines {
  position: absolute;
  left: 42px;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.diurnal-gridlines span {
  width: 100%;
  border-bottom: 1px solid rgba(120, 96, 50, 0.12);
}

.diurnal-bars-wrap {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

.diurnal-bar {
  flex: 1;
  min-height: 2px;
  background: linear-gradient(to top, #2f5d3b, #6f8f4e);
  border-radius: 3px 3px 0 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}

.diurnal-bar:hover {
  opacity: 0.9;
  transform: scaleY(1.03);
}

.diurnal-x-axis {
  display: flex;
  justify-content: space-between;
  padding-left: 42px;
  margin-top: 6px;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--ink-soft);
}

/* Species Diurnal Heatmap Card with Vertical Legend */
.heatmap-card-body {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.species-heatmap-table-wrap {
  flex: 1;
  overflow-x: auto;
}

.species-heatmap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
}

.species-heatmap-table th,
.species-heatmap-table td {
  padding: 2.5px 1.5px;
  text-align: center;
  vertical-align: middle;
}

.species-name-th {
  width: 130px;
  text-align: left !important;
  color: var(--ink-soft);
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  padding-bottom: 6px !important;
}

.hour-th {
  font-size: 0.65rem;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-weight: 600;
  padding-bottom: 6px !important;
}

.species-name-td {
  text-align: left !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 6px !important;
}

.heatmap-species-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 2px 4px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.heatmap-species-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--forest-deep);
}

.heatmap-species-btn small {
  margin-left: 4px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.heatmap-cell {
  height: 16px;
  min-width: 12px;
  border-radius: 2px;
  transition: transform 0.1s ease, outline 0.1s ease;
  cursor: pointer;
}

.heatmap-cell:hover {
  transform: scale(1.3);
  outline: 2px solid var(--forest-deep);
  z-index: 5;
  position: relative;
}

.hour-axis-label {
  font-size: 0.66rem;
  font-family: var(--font-mono);
  color: var(--ink-soft);
  font-weight: 600;
  padding-top: 6px !important;
  text-align: center;
}

/* Vertical Legend on Right Side of Heatmap */
.heatmap-vertical-legend {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 155px;
  padding-top: 14px;
  font-size: 0.68rem;
  color: var(--ink-soft);
  font-weight: 600;
  white-space: nowrap;
}

.vertical-gradient-bar {
  width: 14px;
  flex: 1;
  margin: 6px 0;
  border-radius: 4px;
  background: linear-gradient(to bottom, #173f2b, #2f5d3b, #6f8f4e, #cbe0bf);
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.15);
}

.analysis-note {
  padding: 11px 12px;
  margin: 10px 0 0;
  color: var(--forest-deep);
  background: #edf4e8;
  border-left: 3px solid var(--lichen);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.45;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.map-panel {
  position: relative;
  min-width: 0;
  height: clamp(430px, 57vh, 610px);
  min-height: 430px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(58, 43, 18, 0.1);
}

.map {
  width: 100%;
  height: 100%;
  min-height: 420px;
  z-index: 1;
}

.status {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 900;
  transform: translateX(-50%);
  width: min(calc(100% - 32px), 560px);
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.map-legend {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 850;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  font-size: 0.7rem;
}

.map-legend[hidden] { display: none; }
.map-legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend-dot { width: 11px; height: 11px; border-radius: 50%; background: #d6a53a; }
.legend-dot--high { width: 17px; height: 17px; background: var(--rust); }

.detection-marker {
  color: #fff;
  background: var(--rust);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(44, 42, 35, 0.38);
}

.status[hidden] {
  display: none;
}

.status--error {
  border-color: color-mix(in srgb, var(--rust) 38%, transparent);
  color: var(--rust);
}

.status--success {
  border-color: rgba(47, 93, 59, 0.35);
  color: var(--forest-deep);
}

.leaflet-control-zoom {
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-soft) !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background: var(--bg-glass) !important;
  color: var(--ink) !important;
  border-bottom-color: var(--border-light) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.leaflet-control-zoom a:hover {
  background: var(--bg-surface-hover) !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--bg-surface);
  color: var(--ink);
  box-shadow: var(--shadow-modal);
}

.leaflet-popup-content-wrapper {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.leaflet-popup-content {
  margin: 14px 16px;
}

.leaflet-control-zoom {
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-soft) !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background: var(--bg-glass) !important;
  color: var(--ink) !important;
  border-bottom-color: var(--border-light) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.leaflet-control-zoom a:hover {
  background: var(--bg-surface-hover) !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--bg-surface);
  color: var(--ink);
  box-shadow: var(--shadow-modal);
}

.leaflet-popup-content-wrapper {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.leaflet-popup-content {
  margin: 14px 16px;
}

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

.popup-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
}

.popup-project-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 6px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--forest-deep);
  background: #eef5e9;
  border: 1px solid rgba(47, 93, 59, 0.2);
  border-radius: 4px;
}

.popup-description {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.4;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  color: #fff;
  background: var(--forest);
  font-family: var(--font-ui);
  font-weight: 700;
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: rgba(111, 143, 78, 0.42);
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .app-shell {
    display: block;
    height: auto;
    min-height: 100vh;
  }

  .site-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .cem-button {
    width: 100%;
  }

  .workspace {
    display: flex;
    flex-direction: column;
  }

  .dashboard {
    order: 2;
    overflow: visible;
    border-top: 1px solid var(--border-color);
    border-right: 0;
  }

  .content-area {
    order: 1;
    overflow: visible;
    padding: 14px;
  }

  .map-panel {
    height: 58vh;
    min-height: 400px;
  }

  .analysis-output,
  .analysis-output.is-empty {
    min-height: 220px;
  }

  .bird-search {
    grid-template-columns: 1fr;
  }
}

/* Refined exploration dashboard */
:root {
  --paper: #f2f6ef;
  --paper-2: #e7efe2;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f3f7f0;
  --bg-surface-hover: #e7efe2;
  --ink: #173027;
  --ink-soft: #6b786f;
  --forest: #24583a;
  --forest-deep: #173f2b;
  --lichen: #718f5b;
  --border-color: #dce5d8;
  --border-light: rgba(36, 88, 58, 0.12);
  --shadow-soft: 0 7px 20px rgba(31, 64, 42, 0.11);
  --shadow-modal: 0 18px 45px rgba(22, 50, 34, 0.2);
  --radius-sm: 9px;
  --radius-md: 14px;
}

body {
  background: #eef3eb;
}

.site-header {
  min-height: 70px;
  padding: 9px 22px;
  background: rgba(255, 255, 253, 0.96);
  border-bottom-color: rgba(36, 88, 58, 0.1);
  box-shadow: 0 3px 18px rgba(29, 62, 39, 0.08);
  backdrop-filter: blur(14px);
}

.brand-block {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(145deg, #eef4e9, #dbe9d3);
  border: 1px solid rgba(36, 88, 58, 0.12);
  border-radius: 50% 50% 44% 56%;
  color: var(--forest);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  transform: rotate(-5deg);
}

.brand-block h1 {
  color: var(--forest-deep);
  font-size: 1.35rem;
}

.brand-block .eyebrow {
  margin: 3px 0 0;
  font-size: 0.55rem;
  letter-spacing: 0.16em;
}

.cem-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 0.78rem;
  box-shadow: 0 6px 16px rgba(23, 63, 43, 0.2);
}

.workspace {
  grid-template-columns: minmax(286px, 316px) minmax(0, 1fr);
}

.dashboard {
  padding: 14px;
  background:
    radial-gradient(circle at 10% 100%, rgba(113, 143, 91, 0.13), transparent 30%),
    #f3f6f1;
  border-right-color: rgba(36, 88, 58, 0.1);
}

.dashboard-section {
  padding: 15px;
  margin-bottom: 12px;
  background: rgba(255, 255, 253, 0.96);
  border-color: rgba(36, 88, 58, 0.1);
  box-shadow: 0 4px 14px rgba(31, 64, 42, 0.07);
}

.dashboard h2 {
  font-size: 1.2rem;
}

.section-kicker {
  color: #69835a;
  font-size: 0.64rem;
}

.bird-search {
  margin-top: 11px;
}

.bird-search input,
.bird-search button,
.secondary-button {
  min-height: 38px;
}

.bird-search input {
  background: #fbfcfa;
  border-color: #d8e2d4;
  font-size: 0.8rem;
}

.bird-search button {
  box-shadow: 0 4px 10px rgba(23, 63, 43, 0.16);
}

.date-filter {
  padding: 8px;
  background: #f8faf6;
}

.date-filter input {
  min-height: 33px;
  background: #fff;
}

.secondary-button {
  background: #fff;
  border-color: #d3dfcf;
  font-size: 0.8rem;
}

.secondary-button::before {
  margin-right: 7px;
  color: var(--lichen);
  content: "⌘";
}

.content-area {
  padding: 14px 18px 28px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.68), rgba(245, 248, 243, 0.92)),
    #f6f8f4;
}

.map-mode-banner {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  margin: 0 0 10px;
  color: #55715e;
  background: #edf4e9;
  border: 1px solid rgba(36, 88, 58, 0.1);
  border-left: 0;
  border-radius: 999px;
  font-size: 0.72rem;
}

.map-mode-banner::before {
  width: 7px;
  height: 7px;
  margin-right: 7px;
  background: #6fa153;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(111, 161, 83, 0.13);
  content: "";
}

.map-panel {
  height: clamp(470px, 62vh, 650px);
  min-height: 470px;
  border-color: rgba(36, 88, 58, 0.1);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(31, 64, 42, 0.12);
}

.map-callout {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 850;
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: min(410px, calc(100% - 30px));
  padding: 11px 15px;
  background: rgba(255, 255, 253, 0.91);
  border: 1px solid rgba(36, 88, 58, 0.1);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(31, 64, 42, 0.13);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.map-callout-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  color: #fff;
  background: var(--forest);
  border-radius: 50%;
}

.map-callout strong,
.map-callout small {
  display: block;
}

.map-callout strong {
  color: var(--forest-deep);
  font-family: var(--font-display);
  font-size: 1rem;
}

.map-callout small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.7rem;
}

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

.network-stats article {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 13px 14px;
  background: rgba(255, 255, 253, 0.95);
  border: 1px solid rgba(36, 88, 58, 0.1);
  border-radius: 13px;
  box-shadow: 0 4px 14px rgba(31, 64, 42, 0.07);
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--forest);
  background: #eaf2e5;
  border-radius: 50%;
  font-size: 1rem;
}

.network-stats strong,
.network-stats small {
  display: block;
}

.network-stats strong {
  color: var(--forest-deep);
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1;
}

.network-stats small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.66rem;
  line-height: 1.25;
}

.analysis-output {
  margin-top: 12px;
  padding: 24px;
  border-color: rgba(36, 88, 58, 0.1);
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(31, 64, 42, 0.08);
}

.analysis-output.is-empty {
  min-height: 170px;
  background:
    radial-gradient(circle at 90% 120%, rgba(113, 143, 91, 0.1), transparent 35%),
    #fff;
}

.metric-grid > div {
  background: #f3f7f0;
  border: 1px solid rgba(36, 88, 58, 0.07);
}

.data-table-wrap {
  border: 1px solid rgba(36, 88, 58, 0.11);
  border-radius: 11px;
}

.data-table {
  background: #fff;
}

.data-table thead {
  background: #eef4ea;
}

.data-table th,
.data-table td {
  padding: 11px 12px;
  border-bottom-color: rgba(36, 88, 58, 0.1);
}

.data-table tbody tr:hover {
  background: #f8faf6;
}

.data-table a {
  display: inline-block;
  max-width: 250px;
  overflow: hidden;
  color: #2f7047;
  text-decoration-thickness: 1px;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.recordings-panel {
  margin-top: 18px;
}

.recordings-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.recordings-count,
.recordings-empty {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.recordings-list {
  display: grid;
  gap: 8px;
  min-height: 42px;
}

.recording-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(36, 88, 58, 0.12);
  border-radius: 8px;
  background: #fff;
}

.recording-card.is-playing {
  border-color: rgba(47, 112, 71, 0.35);
  background: #f7fbf4;
}

.recording-play {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #2f7047;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}

.recording-play:hover {
  background: #24583a;
}

.recording-body {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.recording-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  font-size: 0.82rem;
}

.recording-topline strong {
  overflow: hidden;
  color: var(--forest-deep);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recording-topline span {
  color: var(--ink-soft);
  white-space: nowrap;
}

.recording-species {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.recording-species span {
  max-width: 100%;
  overflow: hidden;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--forest-deep);
  background: #edf4e9;
  font-size: 0.72rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recording-waveform {
  display: grid;
  grid-template-columns: repeat(38, 1fr);
  align-items: center;
  gap: 2px;
  height: 28px;
}

.recording-waveform span {
  display: block;
  min-height: 4px;
  border-radius: 999px;
  background: #d7e3d0;
}

.recording-waveform span.is-played {
  background: #2f7047;
}

.recording-times,
.recordings-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.recordings-pager {
  justify-content: flex-end;
  margin-top: 10px;
}

.recordings-pager button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(36, 88, 58, 0.18);
  border-radius: 6px;
  color: var(--forest-deep);
  background: #fff;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
}

.recordings-pager button:disabled {
  cursor: default;
  opacity: 0.45;
}

.cem-marker-icon-wrap {
  background: transparent !important;
  border: none !important;
}

.cem-marker-icon {
  position: relative;
  display: grid !important;
  place-items: center;
  width: 34px !important;
  height: 34px !important;
  color: #fff;
  background: linear-gradient(145deg, #2f6b46, #173f2b);
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: 50% 50% 50% 12%;
  box-shadow: 0 7px 14px rgba(23, 63, 43, 0.3);
  font-size: 1rem;
  transform: rotate(-45deg);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.cem-marker-icon:hover {
  transform: rotate(-45deg) scale(1.14);
  box-shadow: 0 9px 20px rgba(23, 63, 43, 0.5);
  z-index: 1000 !important;
}

.cem-marker-icon span {
  transform: rotate(45deg);
  pointer-events: none;
}

.legend-dot {
  background: #88a96c;
}

.legend-dot--high {
  background: #173f2b;
}

/* --- Snippet Audio Players (9s Focal Clips) --- */

.species-snippet-wrap {
  margin-top: 14px;
}

.species-snippet-banner {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(58, 43, 18, 0.06);
}

.snippet-banner-header {
  margin-bottom: 10px;
}

.snippet-banner-header strong {
  font-size: 0.85rem;
  color: var(--forest-deep);
  font-family: var(--font-ui);
  letter-spacing: 0.02em;
}

.snippet-player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid rgba(47, 93, 59, 0.2);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 6px rgba(47, 93, 59, 0.08);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.snippet-player:hover {
  border-color: var(--forest);
  box-shadow: 0 4px 12px rgba(47, 93, 59, 0.14);
}

.snippet-player.is-playing {
  border-color: var(--forest);
  background: #f4faf4;
}

.snippet-player--compact {
  display: inline-flex;
  padding: 2px 4px;
  gap: 6px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.play-snippet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--forest);
  color: #ffffff;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(23, 63, 43, 0.25);
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.play-snippet-btn:hover {
  background: var(--forest-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(23, 63, 43, 0.35);
}

.play-snippet-btn:active {
  transform: translateY(0);
}

.snippet-player--compact .play-snippet-btn {
  min-height: 26px;
  padding: 0 10px;
  font-size: 0.72rem;
  box-shadow: 0 1px 3px rgba(23, 63, 43, 0.2);
}

.play-snippet-btn.is-playing {
  background: #173f2b;
}

.play-snippet-btn.is-loading {
  background: #6c6354;
  cursor: wait;
}

.snippet-play-icon {
  font-size: 0.75rem;
  line-height: 1;
}

.snippet-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.snippet-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
}

.snippet-conf {
  background: #e1efe0;
  color: var(--forest-deep);
  border: 1px solid rgba(47, 93, 59, 0.2);
}

.snippet-spot {
  background: #eef2f6;
  color: #2c4257;
  border: 1px solid rgba(44, 66, 87, 0.15);
}

.snippet-sub {
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-style: italic;
}

.snippet-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  height: 18px;
  padding-right: 4px;
}

.snippet-player--compact .snippet-wave {
  display: none;
}

.snippet-wave span {
  display: block;
  width: 3px;
  height: 6px;
  border-radius: 2px;
  background: #c6d9c4;
  transition: height 0.15s ease, background 0.15s ease;
}

.snippet-player.is-playing .snippet-wave span {
  background: var(--forest);
  animation: wavePulse 0.8s ease-in-out infinite alternate;
}

.snippet-player.is-playing .snippet-wave span:nth-child(1) {
  animation-delay: 0s;
}
.snippet-player.is-playing .snippet-wave span:nth-child(2) {
  animation-delay: 0.2s;
}
.snippet-player.is-playing .snippet-wave span:nth-child(3) {
  animation-delay: 0.4s;
}
.snippet-player.is-playing .snippet-wave span:nth-child(4) {
  animation-delay: 0.15s;
}

@keyframes wavePulse {
  0% {
    height: 4px;
  }
  100% {
    height: 18px;
  }
}



@media (max-width: 980px) {
  .network-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: center;
    flex-direction: row;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-block .eyebrow {
    display: none;
  }

  .cem-button {
    width: auto;
    min-height: 36px;
    padding: 0 11px;
    font-size: 0.68rem;
  }

  .map-callout {
    right: 12px;
    left: 12px;
  }

  .network-stats {
    grid-template-columns: 1fr 1fr;
  }

  .data-table a {
    max-width: 170px;
  }

  .recording-card {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 9px;
  }

  .recording-topline {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .recording-topline span {
    white-space: normal;
  }

  .recording-species {
    white-space: normal;
  }

}

/* ------------------------------------------------------------------ */
/* Field guide                                                         */
/* The user manual, styled as a page torn from a naturalist's notebook */
/* and pinned over the map. See js/HelpGuide.js for the entries.       */
/* ------------------------------------------------------------------ */

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

.help-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: linear-gradient(145deg, #eef4e9, #dbe9d3);
  border: 1px solid rgba(36, 88, 58, 0.18);
  border-radius: 50% 50% 44% 56%;
  color: var(--forest);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  transform: rotate(6deg);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.help-toggle:hover,
.help-toggle:focus-visible {
  transform: rotate(0deg) scale(1.06);
  box-shadow: 0 6px 16px rgba(23, 63, 43, 0.2);
  outline: none;
}
.help-toggle[aria-expanded="true"] {
  background: var(--forest);
  color: var(--on-accent);
  transform: rotate(0deg);
}

.help-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1190;
  background: rgba(44, 42, 35, 0.28);
  backdrop-filter: blur(2px);
}

.help-guide {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  width: min(420px, 92vw);
  transform: translateX(104%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
.help-guide.is-open {
  transform: translateX(0);
}

.help-guide-inner {
  height: 100%;
  overflow-y: auto;
  padding: 26px 26px 22px 30px;
  background:
    /* margin rule, like a ruled notebook */
    linear-gradient(90deg, transparent 22px, rgba(156, 59, 27, 0.35) 22px, rgba(156, 59, 27, 0.35) 23px, transparent 23px),
    /* faint horizontal lines */
    repeating-linear-gradient(180deg, transparent 0 27px, rgba(120, 96, 50, 0.1) 27px 28px),
    var(--paper);
  border-left: 1px solid var(--border-color);
  box-shadow: var(--shadow-modal);
}

.help-guide-header {
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px dashed var(--border-color);
}
.help-guide-header h2 {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--forest-deep);
  letter-spacing: -0.01em;
}
.help-close {
  position: absolute;
  top: -6px;
  right: -8px;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--ink-soft);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.help-close:hover,
.help-close:focus-visible {
  border-color: var(--border-color);
  color: var(--rust);
  outline: none;
}

.help-entries {
  list-style: none;
  margin: 0;
  padding: 0;
}
.help-entry {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  opacity: 0;
  transform: translateY(6px);
  animation: help-entry-in 0.35s ease forwards;
  animation-delay: calc(80ms + var(--i, 0) * 45ms);
}
.help-entry:last-child {
  border-bottom: 0;
}
@keyframes help-entry-in {
  to { opacity: 1; transform: none; }
}
.help-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-top: 2px;
  background: rgba(255, 255, 253, 0.9);
  border: 1px solid var(--border-color);
  border-radius: 50% 50% 44% 56%;
  color: var(--forest);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  transform: rotate(-6deg);
}
.help-entry h3 {
  margin: 0 0 3px;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
}
.help-entry p {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.45;
}
.help-what {
  color: var(--ink);
}
.help-how {
  margin-top: 4px !important;
  color: var(--ink-soft);
}
.help-how::before {
  content: "→ ";
  color: var(--amber);
}

.help-guide-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
  font-size: 0.74rem;
  color: var(--ink-soft);
}
.help-guide-footer kbd {
  padding: 1px 5px;
  background: rgba(255, 255, 253, 0.9);
  border: 1px solid var(--border-color);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

@media (prefers-reduced-motion: reduce) {
  .help-guide { transition: none; }
  .help-entry { animation: none; opacity: 1; transform: none; }
  .help-toggle { transition: none; }
}

/* ------------------------------------------------------------------ */
/* Front page                                                          */
/* An overlay below the header. / shows it, /#map hides it; see        */
/* js/Landing.js. Modelled on the register-style landing used across   */
/* the CEM services: kicker, serif headline, one card, one action, and */
/* a "plate" illustration on the right.                                */
/* ------------------------------------------------------------------ */

.landing {
  position: fixed;
  top: var(--header-h, 70px);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1050;
  overflow-y: auto;
  background:
    linear-gradient(90deg, rgba(120, 96, 50, 0.06) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(180deg, rgba(120, 96, 50, 0.06) 1px, transparent 1px) 0 0 / 48px 48px,
    radial-gradient(circle at 85% 20%, rgba(113, 143, 91, 0.16), transparent 40%),
    var(--paper);
  opacity: 1;
  transition: opacity 0.42s ease, transform 0.42s ease;
}
.landing.is-leaving {
  opacity: 0;
  transform: translateY(-14px);
  pointer-events: none;
}

.landing-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  max-width: 1180px;
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(28px, 6vh, 72px) clamp(20px, 4vw, 48px);
}

.landing-kicker {
  margin: 0 0 10px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
}

.landing-title {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.2vw, 3.3rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.landing-title em {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: var(--forest);
}

.landing-card {
  padding: 20px 22px;
  background: rgba(255, 255, 253, 0.92);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 22px rgba(58, 43, 18, 0.08);
}
.landing-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--forest-deep);
}
.landing-card p {
  margin: 0 0 10px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.landing-card p:last-child { margin-bottom: 0; }
.landing-card strong { color: var(--ink); font-weight: 600; }

.landing-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
}
.landing-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  background: var(--forest);
  color: var(--on-accent);
  border-radius: 9px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(23, 63, 43, 0.28);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.landing-cta:hover,
.landing-cta:focus-visible {
  background: var(--forest-deep);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(23, 63, 43, 0.32);
  outline: none;
}
.landing-cta span { transition: transform var(--transition-fast); }
.landing-cta:hover span { transform: translateX(3px); }

.landing-secondary {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--forest);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}
.landing-secondary:hover { color: var(--forest-deep); }

.landing-video {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  padding: 12px 14px;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  color: var(--ink-soft);
  font-size: 0.8rem;
}
.landing-video strong { display: block; color: var(--ink); font-size: 0.86rem; }
.landing-video small { display: block; }
.landing-video-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  background: rgba(255, 255, 253, 0.9);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--forest);
  font-size: 0.9rem;
}
.landing-video.is-placeholder { opacity: 0.85; }

/* Plate ------------------------------------------------------------- */

.landing-plate {
  position: relative;
  margin: 0;
  padding: 26px 14px 30px;
  background: rgba(255, 255, 253, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 10px 34px rgba(58, 43, 18, 0.12);
  color: var(--ink);
}
.plate-svg {
  display: block;
  width: 100%;
  height: auto;
}
.plate-tag {
  position: absolute;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  background: rgba(255, 255, 253, 0.85);
  border-radius: 3px;
}
.plate-tag--tl { top: 8px; left: 12px; }
.plate-tag--tr { top: 8px; right: 12px; }
.plate-tag--bl { bottom: 8px; left: 12px; }
.plate-tag--br { bottom: 8px; right: 12px; }
.plate-live {
  color: var(--forest);
  font-weight: 600;
}

@keyframes plate-listen {
  0%   { r: 12; opacity: 0.9; }
  100% { r: 30; opacity: 0; }
}
.plate-rings .ring {
  animation: plate-listen 2.6s ease-out infinite;
}
.plate-rings .ring--2 { animation-delay: 0.9s; }
.plate-rings .ring--3 { animation-delay: 1.7s; }

@media (max-width: 860px) {
  .landing-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .landing-plate { order: -1; max-width: 420px; }
}

@media (prefers-reduced-motion: reduce) {
  .landing { transition: none; }
  .plate-rings .ring { animation: none; opacity: 0.5; }
  .landing-cta, .landing-cta span { transition: none; }
}
