.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-place-controls { position: absolute; z-index: 2; top: 12px; left: 12px; display: flex; max-width: calc(100% - 76px); gap: 6px; flex-wrap: wrap; }
.map-place-controls button { min-height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 3px; background: rgba(7, 19, 16, .92); color: var(--ink); font: 700 .7rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; cursor: pointer; }
.map-place-controls button[aria-pressed="true"] { border-color: var(--amber); background: var(--amber); color: #06110e; }
.map-place-controls button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.scale-rail { position: absolute; z-index: 2; top: 56px; right: 12px; display: grid; width: 126px; gap: 4px; padding: 9px; border: 1px solid var(--line); background: rgba(7, 19, 16, .9); color: var(--muted); font: .65rem/1.15 ui-monospace, SFMono-Regular, Menlo, monospace; }
.scale-step { display: flex; gap: 7px; align-items: center; }
.scale-step::before { width: 6px; height: 6px; border: 1px solid currentColor; border-radius: 50%; content: ""; }
.scale-step.is-current { color: var(--amber); }
.scale-step.is-current::before { background: var(--amber); }
.scale-rail strong { margin-top: 3px; padding-top: 7px; border-top: 1px solid var(--line); color: var(--ink); font: .62rem/1.35 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.map-fallback { position: absolute; z-index: 2; right: 16px; bottom: 16px; width: min(340px, calc(100% - 32px)); 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; box-sizing: border-box; }
.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-list-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.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; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 14px; background: var(--ink); color: var(--paper); text-decoration: none; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.release-bar, .release-footer { display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: 14px 28px; border-bottom: 1px solid var(--line); background: #071310; color: var(--muted); font: 700 .72rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .05em; text-transform: uppercase; }
.release-bar nav { display: flex; gap: 20px; align-items: center; }
.release-bar a { color: var(--muted); text-decoration: none; }
.release-bar a:hover { color: var(--ink); }
.pending-status { border-left-color: var(--amber); background: rgba(245, 189, 103, .06); }
.live-status { border-left-color: var(--mint); background: rgba(117, 230, 196, .06); }
.release-ledger { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 24px; border: 1px solid var(--line); }
.release-ledger article { position: relative; min-height: 168px; padding: 24px; border-right: 1px solid var(--line); }
.release-ledger article:last-child { border-right: 0; }
.release-ledger strong { display: block; margin-top: 36px; font: 500 clamp(1.7rem, 3vw, 2.8rem)/1 Georgia, "Times New Roman", serif; }
.release-ledger p { max-width: 260px; margin: 10px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.ledger-mark { position: absolute; top: 24px; left: 24px; width: 42px; height: 5px; }
.source-mark { background: var(--amber); }
.derived-mark { background: var(--mint); }
.pending-mark { border: 1px dashed var(--amber); }
.live-mark { background: #00cf75; }
.evidence-status { margin: 18px 0 0; padding: 12px 14px; border-left: 2px solid var(--amber); color: var(--muted); font-size: .78rem; line-height: 1.5; }
.planned-resources .resource { box-shadow: inset 0 2px var(--amber); }
.live-resources .resource { box-shadow: inset 0 2px #00cf75; }
.planned-resources .resource strong { display: block; color: var(--ink); font-size: .82rem; }
.planned-resources code { display: block; margin-top: 10px; color: var(--muted); font: .68rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.release-footer { border-top: 1px solid var(--line); border-bottom: 0; }
@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; }
  .map-place-controls { max-width: calc(100% - 24px); }
  .scale-rail { top: 100px; right: 10px; width: 116px; }
  .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; }
  .release-bar, .release-footer { align-items: flex-start; padding: 12px 18px; font-size: .64rem; }
  .release-bar > span { display: none; }
  .release-ledger { grid-template-columns: 1fr; }
  .release-ledger article { min-height: 136px; border-right: 0; border-bottom: 1px solid var(--line); }
  .release-ledger article:last-child { border-bottom: 0; }
}
