.protocol-stage {
  min-height: 100vh;
  padding: 28px;
  background:
    linear-gradient(rgba(117, 230, 196, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 230, 196, 0.04) 1px, transparent 1px),
    #06110f;
  background-size: 36px 36px;
}
.protocol-card {
  min-height: calc(100vh - 56px);
  padding: clamp(22px, 4vw, 48px);
  border: 1px solid var(--line);
  background: rgba(8, 24, 20, 0.92);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.3);
}
.protocol-card h2 {
  margin: 0 0 14px;
  font: 500 clamp(1.8rem, 3vw, 3rem)/1 Georgia, "Times New Roman", serif;
  letter-spacing: -0.035em;
}
.control-label {
  display: block;
  margin: 22px 0 8px;
  color: var(--amber);
  font: 720 0.72rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.control-row { display: flex; gap: 9px; flex-wrap: wrap; }
.control-row input,
.control-row select {
  flex: 1 1 280px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #071310;
  color: var(--ink);
  font: 0.88rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.control-row button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--mint);
  border-radius: 4px;
  background: var(--mint);
  color: #06110e;
  font-weight: 760;
  cursor: pointer;
}
.request {
  display: block;
  margin-top: 18px;
  padding: 14px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  background: #050c0a;
  color: #b8f5e2;
  font: 0.75rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 22px 0;
  border: 1px solid var(--line);
}
.metric { min-height: 96px; padding: 16px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric strong { display: block; font: 500 1.8rem/1 Georgia, serif; }
.metric span { color: var(--muted); font-size: 0.76rem; }
.result-map { min-height: 420px; border: 1px solid var(--line); background: #071310; }
.result-map #map { position: relative; min-height: 420px; }
.record-list { display: grid; gap: 10px; margin-top: 18px; }
.record {
  display: grid;
  grid-template-columns: minmax(110px, 0.4fr) 1fr;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}
.record strong { color: var(--ink); overflow-wrap: anywhere; }
.map-image {
  display: block;
  width: 100%;
  min-height: 320px;
  margin-top: 20px;
  border: 1px solid var(--line);
  background: #030807;
  object-fit: contain;
}
.mode-switch { display: flex; gap: 8px; margin-top: 20px; }
.mode-switch button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
.mode-switch button.active { border-color: var(--mint); background: var(--mint); color: #06110e; }
.harvest-stage { min-height: 100%; }
.harvest-card { min-height: 100%; max-width: 1420px; margin: 0 auto; }
.harvest-heading, .transect-head, .resource-heading { display: flex; justify-content: space-between; gap: 28px; align-items: end; }
.harvest-heading > p, .resource-heading > p { max-width: 390px; margin: 0 0 16px; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.harvest-heading .eyebrow, .transect-head .eyebrow, .resource-heading .eyebrow { margin-top: 0; }
.harvest-map { position: relative; min-height: clamp(390px, 58vh, 660px); overflow: hidden; border: 1px solid var(--line); background: #0b1513; }
.harvest-map #map { position: absolute; inset: 0; min-height: 100%; }
.map-fallback { position: absolute; z-index: 2; right: 16px; bottom: 16px; max-width: 340px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); background: rgba(7, 19, 16, .92); color: var(--muted); font-size: .78rem; line-height: 1.5; }
.map-credit { position: absolute; z-index: 2; left: 10px; bottom: 8px; padding: 4px 6px; background: rgba(7, 19, 16, .78); color: #d8ebe4; font-size: .68rem; pointer-events: none; }
.transect { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.transect h3, .resource-heading h3 { margin: 0; font: 500 clamp(1.25rem, 2.1vw, 1.8rem)/1 Georgia, serif; letter-spacing: -.03em; }
.transect-head > p { display: flex; gap: 8px; margin: 0; color: var(--muted); font-size: .72rem; }
.source-key, .derived-key { padding: 5px 7px; border: 1px solid var(--line); }
.source-key { border-color: rgba(255, 187, 34, .6); color: #ffd486; }
.derived-key { border-color: rgba(0, 150, 160, .7); color: #8edee5; }
.provenance-graph { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 18px 0 0; padding: 0; list-style: none; overflow: hidden; border: 1px solid var(--line); }
.provenance-graph li { position: relative; min-height: 144px; padding: 18px 15px 15px; border-right: 1px solid var(--line); }
.provenance-graph li:last-child { border-right: 0; }
.provenance-graph li:not(:last-child)::after { position: absolute; z-index: 1; right: -6px; top: 52%; width: 10px; height: 10px; border-top: 1px solid var(--ink); border-right: 1px solid var(--ink); background: #0a1b17; content: ""; transform: rotate(45deg) translateY(-50%); }
.provenance-graph strong { display: block; margin-top: 28px; color: var(--ink); font: 600 .9rem/1.22 Georgia, serif; }
.provenance-graph a, .provenance-graph span:not(.node-mark) { display: block; margin-top: 8px; color: var(--muted); font-size: .72rem; line-height: 1.42; overflow-wrap: anywhere; }
.provenance-graph a:hover { color: var(--mint); }
.node-mark { position: absolute; top: 18px; left: 15px; width: 34px; height: 5px; }
.tree { background: #006400; }.crop { background: #f096ff; }.water { background: #0064c8; }.built { background: #fa0000; }.moss { background: #00cf75; }
.evidence-grid { display: grid; grid-template-columns: minmax(260px, .78fr) minmax(360px, 1.22fr); margin-top: 28px; border: 1px solid var(--line); }
.evidence-block { min-width: 0; padding: 22px; }
.identity-block { border-right: 1px solid var(--line); }
.evidence-block .eyebrow { margin: 0 0 12px; }
.facts { display: grid; gap: 12px; margin: 0; }
.facts div { padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.facts div:last-child { padding-bottom: 0; border-bottom: 0; }
.facts dt { color: var(--muted); font-size: .7rem; }
.facts dd { margin: 4px 0 0; color: var(--ink); font: .76rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.legend-note { margin: -3px 0 14px; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.worldcover-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.worldcover-legend > p { grid-column: 1 / -1; margin: 0; padding: 12px; background: #0a1b17; color: var(--muted); font-size: .8rem; }
.legend-row { display: grid; grid-template-columns: 16px 1fr auto; gap: 9px; align-items: center; min-height: 35px; padding: 7px 9px; background: #0a1b17; color: var(--ink); font-size: .74rem; }
.legend-swatch { width: 16px; height: 16px; border: 1px solid rgba(255,255,255,.2); }
.legend-row code { color: var(--muted); font: .69rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.resource-checks { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.resource-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; border: 1px solid var(--line); }
.resource { min-height: 108px; padding: 16px; border-right: 1px solid var(--line); }
.resource:last-child { border-right: 0; }
.resource a { color: var(--ink); font-weight: 760; font-size: .82rem; }
.resource p { margin: 10px 0 0; color: var(--muted); font-size: .74rem; line-height: 1.45; }
.resource-ready { box-shadow: inset 0 2px #00cf75; }.resource-failed { box-shadow: inset 0 2px #fa0000; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media (max-width: 760px) {
  .protocol-stage { min-height: 68vh; padding: 14px; }
  .protocol-card { min-height: calc(68vh - 28px); padding: 20px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:last-child { border-bottom: 0; }
  .record { grid-template-columns: 1fr; gap: 4px; }
  .harvest-heading, .transect-head, .resource-heading { display: block; }
  .harvest-heading > p, .resource-heading > p { margin: 14px 0 0; }
  .harvest-map { min-height: 56vh; }
  .provenance-graph, .resource-list, .evidence-grid { grid-template-columns: 1fr; }
  .provenance-graph li, .resource { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .provenance-graph li:last-child, .resource:last-child { border-bottom: 0; }
  .provenance-graph li:not(:last-child)::after { right: auto; left: 28px; top: auto; bottom: -6px; transform: rotate(135deg); }
  .identity-block { border-right: 0; border-bottom: 1px solid var(--line); }
  .worldcover-legend { grid-template-columns: 1fr; }
  .transect-head > p { margin-top: 14px; flex-wrap: wrap; }
}
