/* Living boundaries — a small local layer on top of sustainability.css. */

:root {
  --edge-deep: #4f6b3f;
  --edge-mid: #78905a;
  --edge-soft: #e8efdf;
  --edge-straw: #f3ead8;
  --edge-clay: #9c672c;
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  margin: var(--space-6) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: boundary;
}

.boundary-card {
  min-inline-size: 0;
  padding: var(--space-5);
  background: var(--edge-soft);
  border: 1px solid var(--border);
  border-block-start: 5px solid var(--edge-deep);
  border-radius: var(--radius-medium);
}

.boundary-card:nth-child(2) {
  border-block-start-color: var(--edge-clay);
}

.boundary-card:nth-child(3) {
  border-block-start-color: var(--edge-mid);
}

.boundary-card .tag {
  display: block;
  margin-block-end: 0.4rem;
  color: var(--edge-clay);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.boundary-card h3 {
  font-size: var(--step-1);
}

.boundary-card p {
  margin-block-start: 0.35rem;
  color: var(--forest-muted);
  font-size: var(--step--1);
  line-height: 1.55;
}

.boundary-figure {
  margin: var(--space-6) 0;
}

.boundary-figure img {
  inline-size: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  background: var(--edge-straw);
}

.boundary-figure figcaption {
  margin-block-start: 0.6rem;
  color: var(--forest-muted);
  font-size: var(--step--1);
  line-height: 1.5;
}

.boundary-note {
  padding: var(--space-4) var(--space-5);
  background: var(--edge-soft);
  border: 1px solid var(--border);
  border-inline-start: 4px solid var(--edge-deep);
  border-radius: var(--radius-small);
  color: var(--forest-muted);
  font-size: var(--step--1);
  line-height: 1.55;
}

.boundary-note strong {
  color: var(--forest);
}

.season-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0.9rem;
  margin: var(--space-5) 0;
  padding: 0;
  list-style: none;
}

.season-card {
  padding: 0.9rem 1rem;
  background: var(--guide-paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
}

.season-card h3 {
  margin: 0;
  color: var(--edge-deep);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  letter-spacing: 0;
}

.season-card ul {
  margin: 0.5rem 0 0;
  padding-inline-start: 1rem;
  color: var(--forest-muted);
  font-size: var(--step--1);
  line-height: 1.5;
}

.season-card li + li {
  margin-block-start: 0.3rem;
}

.species-table .latin {
  display: block;
  color: var(--forest-muted);
  font-size: 0.75em;
  font-style: italic;
  font-weight: 500;
}

@media (max-width: 46rem) {
  .boundary-card {
    padding: 1rem;
  }

  .guide-table {
    font-size: 0.78rem;
  }
}

@media print {
  .boundary-figure,
  .boundary-card,
  .season-card {
    break-inside: avoid;
  }

  .boundary-figure img {
    max-block-size: 8cm;
  }
}
