/* Earth Credit Registry — shared brand styling
   Derived from Landseed brand system (Grand Army Spring 2026).
   Loaded by every page so cross-page nav reads as one product. */

:root {
  --bg: #000;
  --bg-soft: #0a0a0a;
  --fg: #fff;
  --fg-soft: #c8c8c8;
  --muted: #777;
  --muted-2: #555;
  --line: #1f1f1f;
  --line-2: #2a2a2a;
  --green: #00BE5A;
  --pink: #E682E6;
  --yellow: #FFC800;
  --aqua: #32C8FF;
  --blue: #1482FF;
  --warn: #ff7a59;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--fg); }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  letter-spacing: -0.04em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  font-feature-settings: 'ss01' on, 'cv11' on;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--fg); }
button { background: none; border: none; color: inherit; cursor: pointer; font: inherit; padding: 0; }
.mono { font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace; font-weight: 500; }
.display { font-family: 'Hanken Grotesk', sans-serif; font-weight: 700; letter-spacing: -0.05em; }
hr { border: 0; height: 1px; background: var(--line); margin: 32px 0; }

/* ── header ─────────────────────────────────────────── */

header.site {
  border-bottom: 1px solid var(--line);
  padding: 22px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}
.site .logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.05em;
}
.site .logo svg { width: 36px; height: 18px; flex-shrink: 0; }
.site .logo .sub {
  color: var(--muted);
  font-weight: 400;
  font-size: 14px;
  border-left: 1px solid var(--line);
  padding-left: 14px;
  margin-left: 4px;
}
.site .nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--muted);
  align-items: center;
}
.site .nav a:hover { color: var(--fg); }
.site .nav a.active { color: var(--fg); }
.site .nav .dummy {
  color: var(--muted-2);
  cursor: not-allowed;
  position: relative;
}
.site .nav .dummy::after {
  content: 'soon';
  position: absolute;
  top: -10px;
  right: -28px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-2);
  font-family: 'JetBrains Mono', monospace;
}
@media (max-width: 720px) {
  header.site { padding: 18px 24px; }
  .site .nav { gap: 18px; }
  .site .nav .dummy::after { display: none; }
  .site .logo .sub { display: none; }
}

/* ── main + sections ────────────────────────────────── */

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 40px 96px;
}
@media (max-width: 720px) {
  main { padding: 40px 24px 64px; }
}

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 12px;
  font-family: 'JetBrains Mono', monospace;
}
.h1 {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}
.h2 {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}
.h3 {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.lede {
  font-size: 18px;
  line-height: 1.5;
  color: var(--fg-soft);
  max-width: 720px;
  margin-top: 18px;
}
.lede strong { color: var(--fg); font-weight: 600; }
.section { margin-top: 64px; }
.section + .section { margin-top: 80px; }

/* ── stats strip ────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 56px;
  margin-bottom: 56px;
}
.stat { padding: 22px 28px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 8px;
  font-family: 'JetBrains Mono', monospace;
}
.stat-value {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.04em;
}
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
}

/* ── list ───────────────────────────────────────────── */

.table-head, .row {
  display: grid;
  grid-template-columns: 110px 110px 1fr 130px 140px 110px;
  align-items: center;
  gap: 24px;
  padding: 18px 20px;
}
.row .credits { font-size: 18px; font-weight: 600; color: var(--fg); }
.row:hover .credits { color: var(--green); }
.table-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
}
.row {
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  transition: background 120ms ease;
  color: var(--fg-soft);
}
.row:hover { background: rgba(255,255,255,0.025); color: var(--fg); }
.row .pid { font-size: 12px; color: var(--muted); }
.row .name { font-weight: 600; color: var(--fg); }
.row .name-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.row .ts { color: var(--muted); font-size: 13px; }
.eci {
  display: flex;
  align-items: center;
  gap: 10px;
}
.eci-num { font-size: 16px; font-weight: 600; min-width: 48px; }
.eci-bar {
  flex: 1;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  min-width: 60px;
}
.eci-bar > span { display: block; height: 100%; }
.coords { font-size: 12px; color: var(--muted); }

@media (max-width: 900px) {
  .table-head { display: none; }
  .row {
    grid-template-columns: 1fr 96px;
    gap: 8px 16px;
    padding: 18px 0;
    align-items: start;
  }
  .row .pid { grid-row: 1; grid-column: 1; }
  .row .id-block { grid-row: 1 / 3; grid-column: 1; }
  .row > .eci { grid-row: 1; grid-column: 2; }
  .row .ts, .row .coords, .row .area { grid-column: 1; }
}

/* ── pills + chips ──────────────────────────────────── */

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid var(--line-2);
  color: var(--fg-soft);
}
.pill.green { color: var(--green); border-color: rgba(0,190,90,0.35); }
.pill.amber { color: var(--yellow); border-color: rgba(255,200,0,0.35); }
.pill.pink  { color: var(--pink);  border-color: rgba(230,130,230,0.35); }
.pill.blue  { color: var(--aqua);  border-color: rgba(50,200,255,0.35); }

/* ── empty + error ──────────────────────────────────── */

.empty, .error {
  padding: 80px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.error { color: var(--warn); }

/* ── meta block ─────────────────────────────────────── */

.meta {
  margin-top: 80px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}
.meta p + p { margin-top: 14px; }
.meta strong { color: var(--fg); font-weight: 600; }
.meta a { color: var(--aqua); }
.meta a:hover { color: var(--fg); }

/* ── footer ─────────────────────────────────────────── */

footer.site {
  border-top: 1px solid var(--line);
  padding: 32px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 80px;
}
footer.site a:hover { color: var(--fg); }
footer.site nav { display: flex; gap: 24px; }

/* ── detail page ────────────────────────────────────── */

.crumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 32px;
  font-family: 'JetBrains Mono', monospace;
}
.crumb a:hover { color: var(--fg); }
.crumb .sep { margin: 0 10px; color: var(--line-2); }

.title-block { margin-bottom: 40px; }
.title-block .h1 { font-size: clamp(36px, 5.5vw, 56px); }
.title-block .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: stretch;
  margin-bottom: 48px;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.kpi {
  padding: 22px 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.kpi:nth-child(2n) { border-right: 0; }
.kpi:nth-last-child(-n+2) { border-bottom: 0; }
.kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 6px;
}
.kpi-value {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.04em;
}
.kpi-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

.dim-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: var(--bg-soft);
}
.dim-row {
  display: grid;
  grid-template-columns: 110px 1fr 60px;
  gap: 16px;
  align-items: center;
  padding: 10px 0;
  font-size: 13px;
}
.dim-row + .dim-row { border-top: 1px solid var(--line); }
.dim-row .label { color: var(--fg-soft); }
.dim-row .bar {
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.dim-row .bar > span { display: block; height: 100%; }
.dim-row .v { font-family: 'JetBrains Mono', monospace; text-align: right; color: var(--fg); font-weight: 500; }

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 24px;
}
@media (max-width: 900px) { .panel-grid { grid-template-columns: 1fr; } }
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px 28px;
}
.panel .h3 { margin-bottom: 16px; }
.panel dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 24px;
  font-size: 13px;
}
.panel dt { color: var(--muted); }
.panel dd { color: var(--fg); font-family: 'JetBrains Mono', monospace; text-align: right; }
.panel dd.text { font-family: 'Inter', sans-serif; text-align: right; max-width: 60%; }

.threat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}
.threat-row {
  padding: 14px 0;
}
.threat-row + .threat-row { border-top: 1px solid var(--line); }
.threat-row .top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.threat-row .name { font-size: 13px; color: var(--fg-soft); }
.threat-row .v { font-family: 'JetBrains Mono', monospace; font-weight: 500; }
.threat-row .src { font-size: 12px; color: var(--muted); line-height: 1.5; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.tags .tag {
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--fg-soft);
  font-family: 'JetBrains Mono', monospace;
}
.bullets {
  list-style: none;
  padding: 0;
}
.bullets li {
  padding: 8px 0 8px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--fg-soft);
  line-height: 1.55;
  position: relative;
}
.bullets li:last-child { border-bottom: 0; }
.bullets li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 14px;
}

.permalink {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
  margin-top: 20px;
  padding: 14px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.permalink code { color: var(--aqua); }

/* ── prose pages (about / methodology) ───────────────── */

.prose {
  max-width: 760px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg-soft);
}
.prose h2, .prose h3 {
  color: var(--fg);
  margin-top: 56px;
  margin-bottom: 14px;
}
.prose h2 { font-size: 26px; font-family: 'Hanken Grotesk', sans-serif; font-weight: 700; letter-spacing: -0.04em; }
.prose h3 { font-size: 18px; font-family: 'Hanken Grotesk', sans-serif; font-weight: 700; }
.prose p + p { margin-top: 16px; }
.prose strong { color: var(--fg); font-weight: 600; }
.prose code { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--aqua); }
.prose ul {
  list-style: none;
  margin: 16px 0;
  padding: 0;
}
.prose ul li {
  padding: 6px 0 6px 18px;
  position: relative;
}
.prose ul li::before {
  content: '·';
  color: var(--muted);
  position: absolute;
  left: 0;
}
.prose dl {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 12px 24px;
  margin: 16px 0;
  font-size: 14px;
}
.prose dt { color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.prose dd { color: var(--fg-soft); }

/* ── live monitoring strip ──────────────────────────── */

.live-strip {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
  margin-bottom: 56px;
}
@media (max-width: 1100px) { .live-strip { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px)  { .live-strip { grid-template-columns: 1fr; } }

.live-tile {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 240px;
}
.live-tile .tile-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  flex-shrink: 0;
}
.live-tile .tile-head .label { display: flex; align-items: center; gap: 8px; }
.live-tile .tile-head .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.14em;
}
.live-tile .tile-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 0;
}
.live-tile .tile-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
}
.dot.rec  { background: #ff3b30; box-shadow: 0 0 0 0 rgba(255,59,48,0.5); animation: pulse-rec 1.6s infinite; }
.dot.live { background: var(--green); box-shadow: 0 0 0 0 rgba(0,190,90,0.5); animation: pulse-live 2.4s infinite; }
.dot.sim  { background: var(--yellow); }
@keyframes pulse-rec {
  0%   { box-shadow: 0 0 0 0 rgba(255,59,48,0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(255,59,48,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,59,48,0); }
}
@keyframes pulse-live {
  0%   { box-shadow: 0 0 0 0 rgba(0,190,90,0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(0,190,90,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,190,90,0); }
}

/* ── camera tile ────────────────────────────────────── */

.camera {
  position: relative;
  width: 100%;
  flex: 1;
  background: #000;
  overflow: hidden;
}
.camera svg.frame { display: block; width: 100%; height: 100%; }
.camera .ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.camera .ui::before {
  /* subtle scanlines */
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 3px);
  mix-blend-mode: overlay;
}
.camera .corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: rgba(255,255,255,0.55);
  border-style: solid;
  border-width: 0;
}
.camera .corner.tl { top: 12px;    left: 12px;    border-top-width: 1px; border-left-width: 1px; }
.camera .corner.tr { top: 12px;    right: 12px;   border-top-width: 1px; border-right-width: 1px; }
.camera .corner.bl { bottom: 12px; left: 12px;    border-bottom-width: 1px; border-left-width: 1px; }
.camera .corner.br { bottom: 12px; right: 12px;   border-bottom-width: 1px; border-right-width: 1px; }
.camera .ts {
  position: absolute;
  top: 14px;
  right: 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.06em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.camera .cam-id {
  position: absolute;
  top: 14px;
  left: 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.camera .badge-sim {
  position: absolute;
  bottom: 14px;
  right: 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,200,0,0.75);
  border: 1px solid rgba(255,200,0,0.4);
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(0,0,0,0.4);
}

/* ── bioacoustic tile ───────────────────────────────── */

.bio {
  position: relative;
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
.bio svg.wave { display: block; width: 100%; height: 80px; }
.bio .stack {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}
.bio .axis {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--muted-2);
  margin-top: 4px;
  letter-spacing: 0.08em;
}

/* ── readout tile (live weather / air) ──────────────── */

.readout {
  flex: 1;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.readout .big {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: 36px;
  letter-spacing: -0.04em;
  line-height: 1;
}
.readout .big .unit { font-size: 16px; color: var(--muted); margin-left: 4px; font-weight: 400; }
.readout .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 6px;
}
.readout .row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--fg-soft);
  font-family: 'JetBrains Mono', monospace;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.readout .row:first-of-type { border-top: 0; }
.readout .row .k { color: var(--muted); }
.readout .skel {
  display: inline-block;
  height: 1em;
  width: 60px;
  background: linear-gradient(90deg, var(--line), var(--line-2), var(--line));
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 3px;
  vertical-align: -2px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── flagship card ──────────────────────────────────── */

.flagship {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  align-items: center;
}
@media (max-width: 720px) {
  .flagship { grid-template-columns: 1fr; gap: 16px; padding: 24px; }
}
.flagship svg.silhouette { width: 100%; height: 160px; display: block; }
.flagship .name {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  color: var(--fg);
}
.flagship .sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  font-family: 'JetBrains Mono', monospace;
}
.flagship .obs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 12px;
}
.flagship .obs .v {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.flagship .obs .l {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-top: 4px;
}

/* ── vintage chip on the title block ────────────────── */

.vintage-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-soft);
  text-transform: uppercase;
}
.vintage-chip .dot { background: var(--aqua); }

/* ── credit batch hero block (detail page) ──────────── */

.batch-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  margin: 32px 0 0;
  padding: 36px 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    radial-gradient(ellipse at top right, rgba(0,190,90,0.05), transparent 50%),
    var(--bg-soft);
}
@media (max-width: 900px) { .batch-hero { grid-template-columns: 1fr; padding: 28px; gap: 24px; } }
.batch-hero .credit-headline {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(48px, 9vw, 96px);
  letter-spacing: -0.06em;
  line-height: 0.95;
  color: var(--green);
}
.batch-hero .credit-headline .unit {
  font-size: 0.32em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: 16px;
  font-weight: 400;
  font-family: 'JetBrains Mono', monospace;
  vertical-align: middle;
}
.batch-hero .lede-mini {
  margin-top: 12px;
  font-size: 14px;
  color: var(--fg-soft);
  line-height: 1.55;
}
.batch-hero .calc {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  align-self: center;
}
.batch-hero .calc-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.batch-hero .calc-row:last-child { border-bottom: 0; padding-top: 14px; }
.batch-hero .calc-row.total { color: var(--green); font-weight: 600; font-size: 15px; }
.batch-hero .calc-row .op { color: var(--muted-2); text-align: right; }
.batch-hero .calc-row .k { color: var(--muted); }
.batch-hero .calc-row .v { text-align: right; color: var(--fg); }

/* ── small fire watch tile (in live strip) ──────────── */

.firewatch {
  flex: 1;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}
.firewatch .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.firewatch .big {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: 36px;
  letter-spacing: -0.04em;
  line-height: 1;
}
.firewatch .map {
  position: relative;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 12px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 12px);
  overflow: hidden;
}
.firewatch .map .pin {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #ff7a59;
  box-shadow: 0 0 0 2px rgba(255,122,89,0.18);
}
.firewatch .map .center {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1px solid var(--green);
  box-shadow: 0 0 0 2px rgba(0,190,90,0.2);
}
.firewatch .row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--muted);
}

/* ── soil profile bar chart ─────────────────────────── */

.soil-bar {
  display: grid;
  grid-template-columns: 140px 1fr 80px;
  gap: 16px;
  align-items: center;
  padding: 10px 0;
  font-size: 13px;
}
.soil-bar + .soil-bar { border-top: 1px solid var(--line); }
.soil-bar .label { color: var(--fg-soft); }
.soil-bar .meter {
  position: relative;
  height: 8px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.soil-bar .meter > span {
  display: block;
  height: 100%;
  border-radius: 4px;
}
.soil-bar .v {
  font-family: 'JetBrains Mono', monospace;
  text-align: right;
  color: var(--fg);
  font-weight: 500;
}

.soil-depth {
  display: flex;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  height: 72px;
}
.soil-depth .layer {
  flex: 1;
  display: flex;
  align-items: end;
  justify-content: center;
  padding-bottom: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(255,255,255,0.6);
  border-right: 1px solid rgba(0,0,0,0.25);
  text-shadow: 0 1px 1px rgba(0,0,0,0.4);
  letter-spacing: 0.06em;
}
.soil-depth .layer:last-child { border-right: 0; }

/* ── vegetation annual cycle ────────────────────────── */

.veg-cycle {
  margin-top: 8px;
}
.veg-cycle svg.curve {
  width: 100%;
  height: 110px;
  display: block;
}
.veg-cycle .axis {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted-2);
  margin-top: 6px;
  letter-spacing: 0.04em;
}
.veg-cycle .axis span { text-align: center; }
.veg-cycle .stack {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-top: 14px;
}

/* ── audit trail ────────────────────────────────────── */

.audit-trail {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  overflow: hidden;
}
.audit-trail .row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 14px 28px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.audit-trail .row:last-child { border-bottom: 0; }
.audit-trail .row .k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--muted);
}
.audit-trail .row .v {
  font-family: 'JetBrains Mono', monospace;
  color: var(--fg);
  word-break: break-word;
}
.audit-trail .row .v.text { font-family: 'Inter', sans-serif; color: var(--fg-soft); }
.audit-trail .row .v code { color: var(--aqua); }
.audit-trail .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.audit-trail .header .seal {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--green);
  text-transform: none;
}
.audit-trail .row.anchor-row { background: rgba(0,190,90,0.025); }
.audit-trail .row.anchor-row .k { color: var(--green); }

/* ── ledger integrity strip (homepage) ──────────────── */

.integrity {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 24px;
  background: var(--bg-soft);
  overflow: hidden;
}
@media (max-width: 720px) { .integrity { grid-template-columns: 1fr 1fr; } }
.integrity .cell {
  padding: 18px 22px;
  border-right: 1px solid var(--line);
}
.integrity .cell:last-child { border-right: 0; }
@media (max-width: 720px) {
  .integrity .cell:nth-child(2) { border-right: 0; }
  .integrity .cell:nth-child(1), .integrity .cell:nth-child(2) { border-bottom: 1px solid var(--line); }
}
.integrity .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 8px;
}
.integrity .v {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--fg);
  word-break: break-all;
}
.integrity .v code { color: var(--aqua); }

/* ── tabbed container (CSS-only, accessible) ──────────── */
/* All tab content is rendered server-side; CSS reveals the
   active panel. Works without JavaScript and stays indexable. */

.tabs {
  margin: 56px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  overflow: hidden;
  position: relative;
}
.tabs input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.tab-nav {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.tab-nav label {
  padding: 18px 28px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
  white-space: nowrap;
  user-select: none;
  position: relative;
  flex-shrink: 0;
}
.tab-nav label:hover {
  color: var(--fg-soft);
  background: rgba(255,255,255,0.02);
}
.tab-nav label .count {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  font-size: 9px;
  letter-spacing: 0.08em;
  background: var(--line);
  color: var(--muted);
  border-radius: 3px;
}
.tab-content {
  display: none;
  padding: 32px;
  animation: tabFade 220ms ease;
}
@media (max-width: 720px) { .tab-content { padding: 22px; } }
@keyframes tabFade {
  from { opacity: 0; transform: translateY(-2px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tab-content > .h3:first-child { margin-top: 0; }
.tab-content .panel-grid:first-child { margin-top: 0; }
.tab-content .panel-grid + .panel-grid { margin-top: 24px; }
.tab-content .section-note {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

/* The active-tab CSS selectors. Each radio's :checked state reveals
   its matching .tab-content and underlines its label. */
.tabs input#tab-site:checked       ~ .tab-nav label[for="tab-site"],
.tabs input#tab-calc:checked       ~ .tab-nav label[for="tab-calc"],
.tabs input#tab-ops:checked        ~ .tab-nav label[for="tab-ops"],
.tabs input#tab-narrative:checked  ~ .tab-nav label[for="tab-narrative"] {
  color: var(--fg);
  border-bottom-color: var(--green);
  background: var(--bg);
}
.tabs input#tab-site:checked       ~ .tab-content[data-tab="site"],
.tabs input#tab-calc:checked       ~ .tab-content[data-tab="calc"],
.tabs input#tab-ops:checked        ~ .tab-content[data-tab="ops"],
.tabs input#tab-narrative:checked  ~ .tab-content[data-tab="narrative"] {
  display: block;
}
