/* Layout and components. NO colour values in this file — use palette.css vars. */
@import url("palette.css");

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}
h1, h2, h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--color-link); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section--alt { background: var(--color-bg-alt); }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem;
  font-weight: 700; color: var(--color-accent); margin-bottom: 0.6rem;
}
.muted { color: var(--color-text-muted); }
.lede { font-size: 1.2rem; max-width: 42rem; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--color-panel); padding: 0.5rem 1rem; }

/* ---- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--color-panel);
  border-bottom: 1px solid var(--color-border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--color-text); font-weight: 800; font-size: 1.1rem; }
.brand svg { width: 40px; height: 40px; }
.nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--color-text-muted); font-weight: 600; font-size: 0.95rem; }
.nav a[aria-current="page"], .nav a:hover { color: var(--color-primary); }
@media (max-width: 560px) { .nav { gap: 0.8rem; } .nav a { font-size: 0.88rem; } .brand span { display: none; } }
@media (max-width: 430px) { .nav { gap: 0.6rem; flex-wrap: nowrap; } .nav a { font-size: 0.8rem; white-space: nowrap; } .brand svg { width: 34px; height: 34px; } }

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.75rem 1.4rem; border-radius: 999px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background 0.15s, transform 0.15s;
}
.btn--primary { background: var(--color-primary); color: var(--color-on-primary); }
.btn--primary:hover { background: var(--color-primary-hover); }
.btn--ghost { background: transparent; color: var(--color-text-on-dark); border-color: var(--color-text-on-dark-muted); }
.btn--ghost:hover { background: var(--overlay); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn--block { width: 100%; }

/* ---- Hero ----------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--color-hero-from), var(--color-hero-to));
  color: var(--color-text-on-dark);
  padding: clamp(4rem, 12vw, 8rem) 0 clamp(6rem, 14vw, 9rem);
}
.hero .eyebrow { color: var(--color-accent-soft); }
.hero p { color: var(--color-text-on-dark-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.waves { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 90px; }
.waves .w1 { fill: var(--color-wave); opacity: 0.35; }
.waves .w2 { fill: var(--color-accent-soft); opacity: 0.35; }
.waves .w3 { fill: var(--color-bg); }
.hero--small { padding: clamp(3rem, 9vw, 5rem) 0 clamp(5rem, 11vw, 7rem); }

/* ---- Species cards -------------------------------------------------------- */
.grid-3 { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--color-panel); border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-soft); display: flex; flex-direction: column;
  text-decoration: none; color: inherit; transition: transform 0.18s, box-shadow 0.18s;
}
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card-art { aspect-ratio: 16 / 10; background: linear-gradient(180deg, var(--color-panel-tint), var(--color-bg-alt)); display: grid; place-items: center; }
.card-art svg { width: 78%; height: auto; }
.card-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.card-body h3 { margin: 0; }
.card-meta { font-size: 0.9rem; color: var(--color-text-muted); }
.card-cta { margin-top: auto; padding-top: 0.6rem; font-weight: 700; color: var(--color-primary); }
.tag {
  display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 0.2rem 0.65rem;
  border-radius: 999px; background: var(--color-accent-bg); color: var(--color-accent);
}
.tag--pending { background: var(--color-warning-bg); color: var(--color-text); }

/* Species silhouettes */
.art-body { fill: var(--color-primary); }
.art-detail { fill: var(--color-teal); }
.art-line { fill: none; stroke: var(--color-wave); stroke-width: 3; stroke-linecap: round; }

/* ---- Steps ---------------------------------------------------------------- */
.steps { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; padding: 0; list-style: none; }
.steps li { background: var(--color-panel); border-radius: 16px; padding: 1.3rem; box-shadow: var(--shadow-soft); counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 50%; background: var(--color-accent-bg); color: var(--color-accent);
  font-weight: 800; margin-bottom: 0.7rem;
}

/* ---- Species page --------------------------------------------------------- */
.species-layout { display: grid; gap: 2rem; }
@media (min-width: 900px) { .species-layout { grid-template-columns: 1.35fr 1fr; align-items: start; } }
.facts { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 1.5rem 0; }
.fact { background: var(--color-bg-alt); border-radius: 14px; padding: 0.9rem 1rem; }
.fact dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); font-weight: 700; }
.fact dd { margin: 0.2rem 0 0; font-weight: 700; }
.threats { padding-left: 1.1rem; }
.threats li { margin-bottom: 0.7rem; }
.threats strong { color: var(--color-primary); }

/* ---- Donation calculator --------------------------------------------------- */
.donate-panel {
  background: var(--color-panel); border-radius: 22px; padding: 1.6rem;
  box-shadow: var(--shadow-lift); border-top: 6px solid var(--color-accent-soft);
}
@media (min-width: 900px) { .donate-panel { position: sticky; top: 88px; } }
.kg-readout { font-family: "Iowan Old Style", Georgia, serif; font-size: 3rem; font-weight: 700; line-height: 1; color: var(--color-primary); }
.kg-readout small { font-size: 1.2rem; color: var(--color-text-muted); }
.price-readout { font-size: 1.6rem; font-weight: 800; margin: 0.4rem 0 0.1rem; }
.equivalent { color: var(--color-accent); font-weight: 600; min-height: 1.6em; }
.range { width: 100%; margin: 1.2rem 0 0.4rem; accent-color: var(--color-slider-fill); height: 32px; }
.range-scale { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--color-text-muted); }
.kg-input-row { display: flex; align-items: center; gap: 0.6rem; margin: 1rem 0; }
.kg-input-row input {
  width: 6rem; min-height: 44px; font: inherit; font-weight: 700; padding: 0.4rem 0.6rem;
  border: 2px solid var(--color-border); border-radius: 10px; color: var(--color-text); background: var(--color-panel);
}
.breakdown { width: 100%; border-collapse: collapse; margin: 1rem 0 1.2rem; font-size: 0.95rem; }
.breakdown td { padding: 0.45rem 0; border-bottom: 1px solid var(--color-border); }
.breakdown td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.breakdown tr.total td { border-bottom: 0; font-weight: 800; padding-top: 0.7rem; }
.notice { border-radius: 12px; padding: 0.8rem 1rem; font-size: 0.92rem; margin-top: 1rem; }
.notice--warn { background: var(--color-warning-bg); }
.notice--ok { background: var(--color-accent-bg); }
.notice--error { background: var(--color-warning-bg); color: var(--color-error); font-weight: 600; }

/* ---- Transparency bar ------------------------------------------------------ */
.split-bar { display: flex; height: 22px; border-radius: 999px; overflow: hidden; margin: 1rem 0 0.6rem; }
.split-bar .field { background: var(--color-accent-soft); }
.split-bar .ops { background: var(--color-primary); }
.legend { display: flex; flex-wrap: wrap; gap: 1.2rem; font-size: 0.92rem; }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 0.4rem; vertical-align: -1px; }
.legend .l-field::before { background: var(--color-accent-soft); }
.legend .l-ops::before { background: var(--color-primary); }

.panel { background: var(--color-panel); border-radius: 18px; padding: 1.5rem; box-shadow: var(--shadow-soft); }
.two-col { display: grid; gap: 1.4rem; }
@media (min-width: 800px) { .two-col { grid-template-columns: 1fr 1fr; } }
.check-list { list-style: none; padding: 0; }
.check-list li { padding-left: 1.8rem; position: relative; margin-bottom: 0.7rem; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--color-accent); font-weight: 900; }

/* ---- Ledger ---------------------------------------------------------------- */
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 2rem; }
.stat { background: var(--color-panel); border-radius: 16px; padding: 1.1rem 1.2rem; box-shadow: var(--shadow-soft); }
.stat .num { font-size: 2rem; font-weight: 800; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.stat .label { font-size: 0.88rem; color: var(--color-text-muted); }
.table-wrap { overflow-x: auto; background: var(--color-panel); border-radius: 16px; box-shadow: var(--shadow-soft); }
table.ledger { width: 100%; border-collapse: collapse; min-width: 640px; }
.ledger th, .ledger td { padding: 0.8rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); font-size: 0.95rem; }
.ledger th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); background: var(--color-bg-alt); }
.ledger td.num { font-variant-numeric: tabular-nums; font-weight: 700; }
.empty-state { text-align: center; padding: 2.5rem 1rem; }

/* ---- Footer ---------------------------------------------------------------- */
.site-footer { background: var(--color-footer-bg); color: var(--color-text-on-dark-muted); padding: 3rem 0 2rem; font-size: 0.92rem; }
.site-footer a { color: var(--color-text-on-dark); }
.site-footer .wrap { display: grid; gap: 1.5rem; }
@media (min-width: 700px) { .site-footer .wrap { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h4 { color: var(--color-text-on-dark); margin: 0 0 0.6rem; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* fixes after visual review */
.site-footer .muted { color: var(--color-text-on-dark-muted); opacity: 0.8; }
.card-body .tag { align-self: flex-start; }
.jump-donate { display: inline-flex; margin-top: 1rem; }
@media (min-width: 900px) { .jump-donate { display: none; } }

/* ---- Simple layout additions ------------------------------------------- */
.section--tight { padding: clamp(2.2rem, 6vw, 3.5rem) 0; }
.narrow { max-width: 760px; }
.small { font-size: 0.85rem; }
.hero h1 + .lede { margin-top: 0.4rem; }

/* Drop-downs (native <details>, no JavaScript needed) */
.dd-group { display: grid; gap: 0.6rem; margin-top: 1.2rem; }
.dd { background: var(--color-panel); border: 1px solid var(--color-border); border-radius: 14px; }
.dd + .dd { margin-top: 0.6rem; }
.dd-group .dd + .dd { margin-top: 0; }
.dd > summary {
  list-style: none; cursor: pointer; padding: 1rem 3rem 1rem 1.1rem; position: relative;
  font-weight: 700; min-height: 48px;
}
.dd > summary::-webkit-details-marker { display: none; }
.dd > summary::after {
  content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--color-accent-bg); color: var(--color-accent); font-size: 1.2rem; line-height: 1;
}
.dd[open] > summary::after { content: "−"; }
.dd[open] > summary { border-bottom: 1px solid var(--color-border); }
.dd-body { padding: 0.9rem 1.1rem 0.4rem; }
.dd--small { margin: 0.8rem 0 1rem; }
.dd--small > summary { padding: 0.7rem 2.8rem 0.7rem 0.9rem; font-size: 0.95rem; min-height: 44px; }
.more { font-weight: 700; }
.more::after { content: " →"; }

/* Simple steps */
.steps--simple li { display: flex; flex-direction: column; gap: 0.2rem; }
.steps--simple span { color: var(--color-text-muted); font-size: 0.95rem; }

/* Quick-pick amount chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.6rem 0 0.4rem; }
.chip {
  font: inherit; font-weight: 700; min-height: 44px; padding: 0.4rem 1rem; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--color-border); background: var(--color-panel); color: var(--color-text);
}
.chip[aria-pressed="true"] { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-on-primary); }
.kg-line { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-top: 0.4rem; }
.kg-line .price-readout { margin: 0; font-size: 2rem; }

/* Photos and placeholders */
.photo { margin: 0 0 1rem; border-radius: 18px; overflow: hidden; background: var(--color-panel-tint); }
.photo img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.photo figcaption { font-size: 0.78rem; color: var(--color-text-muted); padding: 0.4rem 0.8rem; background: var(--color-panel); }
.photo-placeholder {
  aspect-ratio: 16 / 10; display: grid; place-items: center; position: relative;
  background: linear-gradient(180deg, var(--color-panel-tint), var(--color-bg-alt));
  border: 2px dashed var(--color-wave); border-radius: 18px;
}
.photo-placeholder svg { width: 70%; height: auto; opacity: 0.9; }
.photo-placeholder .ph-label {
  position: absolute; bottom: 0.6rem; left: 0.6rem; font-size: 0.75rem; font-weight: 700;
  background: var(--color-panel); color: var(--color-text-muted); padding: 0.2rem 0.6rem; border-radius: 999px;
}
.card .photo, .card .photo-placeholder { margin: 0; border-radius: 0; border-width: 0 0 2px 0; }
.card .photo img { aspect-ratio: 16 / 10; }
.doc h1 { margin-bottom: 0.4rem; }
.ledger--compact { min-width: 0; }

/* ---- Habitat map ----------------------------------------------------------- */
.map { margin: 0 0 1rem; }
.map-frame {
  position: relative; aspect-ratio: 3 / 2; border-radius: 18px; overflow: hidden;
  background: var(--color-map-sea); border: 1px solid var(--color-border); box-shadow: var(--shadow-soft);
}
.map-svg { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: zoom-in; user-select: none; }
.map-svg.is-zoomed { touch-action: none; cursor: grab; }
.map-svg.is-dragging { cursor: grabbing; }
.map-sea { fill: var(--color-map-sea); }
.map-land { fill: var(--color-map-land); stroke: var(--color-map-coast); stroke-width: 0.6px; vector-effect: non-scaling-stroke; }
.map-region { fill: var(--color-map-region); opacity: 0.55; }
.map-outline { fill: transparent; stroke: var(--color-map-region-line); stroke-width: 2px; stroke-dasharray: 6 4; pointer-events: all; }
.map-outlines a { cursor: pointer; }
.map-outlines a:hover .map-outline, .map-outlines a:focus .map-outline { stroke-width: 3.5px; stroke-dasharray: none; }
.map-label {
  fill: var(--color-map-label); stroke: var(--color-map-label-halo); paint-order: stroke;
  font-weight: 800; pointer-events: none; stroke-linejoin: round;
}
.map-controls { position: absolute; top: 0.6rem; right: 0.6rem; display: flex; flex-direction: column; gap: 0.35rem; }
.map-btn {
  min-width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--color-border);
  background: var(--color-panel); color: var(--color-text); font: inherit; font-weight: 800; font-size: 1.15rem;
  cursor: pointer; box-shadow: var(--shadow-soft);
}
.map-btn--wide { font-size: 0.75rem; padding: 0 0.4rem; }
.map-btn[disabled] { opacity: 0.45; cursor: default; }
.map-hint {
  position: absolute; left: 50%; bottom: 0.8rem; transform: translateX(-50%);
  background: var(--overlay); color: var(--color-text-on-dark); padding: 0.35rem 0.8rem; border-radius: 999px; font-size: 0.85rem;
}
.map-caption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; font-size: 0.8rem; padding: 0.5rem 0.2rem 0; }
.map-key::before {
  content: ""; display: inline-block; width: 14px; height: 10px; margin-right: 0.4rem; vertical-align: -1px;
  background: var(--color-map-region); border: 2px dashed var(--color-map-region-line); border-radius: 3px;
}
.habitat { margin: 1.6rem 0 0.4rem; }
.habitat h2 { margin-bottom: 0.6rem; }

/* ---- Latin names + facts & figures --------------------------------------- */
.latin-name { font-style: italic; font-size: 1.15rem; margin: -0.3rem 0 0.8rem; color: var(--color-text-on-dark-muted); }
.card-latin { font-style: italic; font-size: 0.9rem; color: var(--color-text-muted); margin-top: -0.2rem; }
.stats-section { margin: 1.8rem 0 0.4rem; }
.stat-grid { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.stat-card { margin: 0; background: var(--color-panel); border: 1px solid var(--color-border); border-left: 5px solid var(--color-accent-soft); border-radius: 14px; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.stat-figure { font-family: "Iowan Old Style", Georgia, serif; font-size: 1.9rem; font-weight: 700; line-height: 1.1; color: var(--color-primary); }
.stat-card p { margin: 0; font-size: 0.95rem; }
.stat-source { margin-top: auto; padding-top: 0.3rem; font-size: 0.78rem; color: var(--color-text-muted); }

/* ==========================================================================
   Geometric style (matches the logo: faceted navy/teal shapes, pale seams)
   ========================================================================== */
.ic { display: block; overflow: visible; }
.ic-dark   { fill: var(--color-facet-dark); }
.ic-mid    { fill: var(--color-facet-mid); }
.ic-light, .ic-shell { fill: var(--color-facet-light); }
.ic-light-soft { fill: var(--color-facet-light); opacity: 0.35; }
.ic-pale   { fill: var(--color-facet-pale); }
.ic-accent { fill: var(--color-facet-accent); }
.ic-seam   { fill: none; stroke: var(--color-facet-seam); stroke-width: 1.1; stroke-linejoin: round; stroke-linecap: round; }
.ic-seam-fill { fill: var(--color-facet-seam); }
.ic-edge   { stroke: var(--color-facet-dark); stroke-width: 2.4; stroke-linejoin: round; }
.ic-mesh   { fill: none; stroke: var(--color-facet-dark); stroke-width: 1.3; opacity: 0.75; }
.ic-line-dark, .ic-line-mid, .ic-line-light, .ic-line-accent { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ic-line-dark   { stroke: var(--color-facet-dark); stroke-width: 4.5; }
.ic-line-mid    { stroke: var(--color-facet-mid); stroke-width: 4.5; }
.ic-line-light  { stroke: var(--color-facet-light); stroke-width: 2.2; }
.ic-line-accent { stroke: var(--color-facet-accent); stroke-width: 3.2; }
/* loggerhead: warmer shell facets so it reads differently from the green turtle */
.ic--warm .ic-shell { fill: var(--color-facet-accent); }

/* Hero: faceted background + round logo */
.facets { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.facets polygon { fill: var(--color-facet-mid); }
.facets .fc1 { opacity: 0.16; }
.facets .fc2 { opacity: 0.09; }
.facets .fc3 { fill: var(--color-facet-light); opacity: 0.08; }
.hero .wrap { position: relative; }
.hero-grid { display: grid; gap: 1.6rem; align-items: center; }
.hero-logo { width: 180px; height: 180px; border-radius: 50%; box-shadow: var(--shadow-lift); order: -1; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1fr auto; gap: 3rem; }
  .hero-logo { width: 280px; height: 280px; order: 0; }
}
.nav a.nav-pledge { color: var(--color-primary); }

/* ---- What's in the water: depth explorer ---------------------------------- */
.depth {
  border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-soft); margin-top: 1.2rem;
  background: linear-gradient(180deg, var(--color-depth-surface) 0%, var(--color-depth-surface) 22%,
              var(--color-depth-mid) 45%, var(--color-depth-mid) 58%, var(--color-depth-floor) 80%);
}
.depth-band { padding: 1.1rem 1.1rem 1.3rem; display: grid; gap: 0.8rem; }

.depth-label { display: flex; flex-wrap: wrap; gap: 0.2rem 0.8rem; align-items: baseline; color: var(--color-depth-label); }
.depth-label strong { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; }
.depth-label span { font-size: 0.88rem; }
.depth-band--seafloor .depth-label { color: var(--color-depth-label-deep); }
.depth-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 1.6rem; }
.depth-items .plastic { width: 172px; }
.depth-band--midwater .depth-items { justify-content: space-evenly; }
@media (max-width: 560px) { .depth-items { gap: 0.7rem; } .depth-items .plastic { width: calc(50% - 0.35rem); } }
.plastic {
  font: inherit; text-align: center; cursor: pointer; color: var(--color-text);
  background: var(--color-illus-bg); border: 2px solid transparent; border-radius: 18px;
  padding: 0.9rem 0.7rem 0.8rem; display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  box-shadow: var(--shadow-soft); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  min-height: 48px;
}
.plastic:hover, .plastic:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--color-facet-mid); }
.plastic .ic { width: 84px; height: 84px; }
.plastic-name { font-weight: 800; line-height: 1.25; }
.plastic-hint { font-size: 0.8rem; color: var(--color-primary); font-weight: 700; }
/* gentle bob for floating items; off for people who prefer less motion */
@media (prefers-reduced-motion: no-preference) {
  .depth-band--surface .plastic .ic { animation: bob 4s ease-in-out infinite; }
  .depth-band--surface .plastic:nth-child(2) .ic { animation-delay: -1.3s; }
  .depth-band--surface .plastic:nth-child(3) .ic { animation-delay: -2.6s; }
}
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(-2deg); } }

/* Drawer (native <dialog>) */
.drawer {
  border: 0; padding: 0; margin: auto 0 0 auto; height: 100%; max-height: 100%;
  width: min(460px, 100%); background: var(--color-panel); color: var(--color-text);
  box-shadow: var(--shadow-lift); border-left: 6px solid var(--color-facet-mid);
}
.drawer::backdrop { background: var(--overlay); }
.drawer-content { padding: 1.4rem 1.4rem 2rem; overflow-y: auto; height: 100%; }
.drawer-close {
  position: absolute; top: 0.7rem; right: 0.7rem; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--color-border); background: var(--color-panel); color: var(--color-text);
  font: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.drawer-head { display: flex; align-items: center; gap: 0.9rem; margin: 0.2rem 3rem 0.6rem 0; }
.drawer-head h2 { margin: 0; font-size: 1.6rem; }
.drawer-icon { width: 72px; height: 72px; flex: none; background: var(--color-illus-bg); border-radius: 16px; padding: 6px; }
.drawer h3 { font-size: 1rem; margin: 1.2rem 0 0.35rem; color: var(--color-primary); font-family: inherit; }
.drawer-stat { background: var(--color-panel-tint); border-radius: 12px; padding: 0.7rem 0.9rem; margin: 0.4rem 0 0; }
.drawer-stat strong { font-family: "Iowan Old Style", Georgia, serif; font-size: 1.35rem; color: var(--color-primary); }
.pill-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pill-list li { background: var(--color-accent-bg); color: var(--color-accent); font-weight: 700; font-size: 0.88rem; border-radius: 999px; padding: 0.25rem 0.7rem; }
.drawer-actions { display: grid; gap: 0.6rem; margin-top: 0.6rem; }
.drawer-sources { font-size: 0.82rem; margin-top: 1.4rem; }
@media (max-width: 600px) {
  .drawer { margin: auto 0 0; width: 100%; height: auto; max-height: 88vh; border-left: 0; border-top: 6px solid var(--color-facet-mid); border-radius: 20px 20px 0 0; }
}

/* ---- Species markers on the map ------------------------------------------- */
.map-marker { cursor: pointer; }
.map-marker-bg { fill: var(--color-illus-bg); stroke: var(--color-facet-dark); stroke-width: 2.5; }
.map-marker:hover .map-marker-bg, .map-marker:focus .map-marker-bg { stroke: var(--color-facet-accent); stroke-width: 4; }
.map-marker:focus { outline: none; }
.map-marker:focus-visible .map-marker-bg { stroke: var(--color-focus); stroke-width: 6; }

/* ---- Pledge ---------------------------------------------------------------- */
.pledge-band { background: var(--color-illus-bg); }
.pledge-band-inner { display: grid; gap: 1.2rem; align-items: center; }
@media (min-width: 800px) { .pledge-band-inner { grid-template-columns: 1fr auto; } }
.pledge-count { font-weight: 800; color: var(--color-primary); }
.pledge-count--hero { color: var(--color-text-on-dark); }
.pledge-panel { padding: clamp(1.3rem, 4vw, 2.2rem); }
.pledge-text {
  margin: 0 0 1.4rem; padding: 1rem 1.2rem; border-left: 6px solid var(--color-facet-mid);
  background: var(--color-illus-bg); border-radius: 0 14px 14px 0;
  font-family: "Iowan Old Style", Georgia, serif; font-size: 1.3rem; line-height: 1.4;
}
.field-row { display: grid; gap: 0.3rem; margin-bottom: 1rem; }
.field-row label { font-weight: 700; }
.field-row input {
  font: inherit; min-height: 48px; padding: 0.5rem 0.8rem; border-radius: 12px;
  border: 2px solid var(--color-border); background: var(--color-panel); color: var(--color-text);
}
.field-row input:focus { border-color: var(--color-facet-mid); outline: none; }
.check-row { display: flex; gap: 0.7rem; align-items: flex-start; margin: 0 0 0.9rem; cursor: pointer; }
.check-row input { width: 22px; height: 22px; margin-top: 0.15rem; flex: none; accent-color: var(--color-facet-mid); }
.pledge-panel .btn { margin: 0.4rem 0 0.8rem; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pledge-done { text-align: center; padding: 1rem 0; }
.pledge-done:focus { outline: none; }
