/* ---------------------------------------------------------------------------
   Left panel — region cards
   Every card is the same height and shows the same fields, so the list reads
   as a table. The relative length of a region is carried by a bar inside the
   card rather than by the card's height.
--------------------------------------------------------------------------- */

.wp-regions {
  --wp-void: #0a1118;
  --wp-sheet: #131c26;
  --wp-sheet-2: #18232f;
  --wp-line: #2a3846;
  --wp-ink: #e4edf6;
  --wp-dim: #7d93a9;
  --wp-faint: #566d84;
  --wp-accent: #4fd1b0;
  --wp-accent-deep: #1f6b5a;
  --wp-ochre: #d9a24b;
  --wp-bad: #e0684f;
  --wp-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wp-rcard {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--wp-sheet-2); color: var(--wp-ink); font: inherit;
  border: 1px solid var(--wp-line); border-left: 3px solid var(--wp-card-c, var(--wp-accent));
  border-radius: 3px; padding: 6px 8px 7px;
}
.wp-rcard:hover { background: #1d2a38; }
.wp-rcard:focus-visible { outline: 2px solid var(--wp-accent); outline-offset: 1px; }
.wp-rcard.is-on { background: #12251f; border-color: var(--wp-accent-deep); border-left-color: var(--wp-card-c, var(--wp-accent)); }

/* line 1 — identity */
.wp-rtop { display: flex; align-items: baseline; gap: 7px; }
.wp-rid { font-family: var(--wp-mono); font-size: 11.5px; font-weight: 700; }
.wp-rid.is-under { color: var(--wp-bad); }
.wp-rwarn { color: var(--wp-ochre); font-size: 10px; }
.wp-rrange {
  margin-left: auto; font-family: var(--wp-mono); font-size: 9.5px;
  color: var(--wp-faint); font-variant-numeric: tabular-nums;
}

/* line 2 — proportional length */
.wp-rbar { display: flex; align-items: center; gap: 6px; margin: 5px 0 5px; }
.wp-rbar-track { flex: 1; height: 3px; background: var(--wp-void); border-radius: 2px; overflow: hidden; }
.wp-rbar-fill { height: 100%; background: var(--wp-card-c, var(--wp-accent)); border-radius: 2px; }
.wp-rlen {
  font-family: var(--wp-mono); font-size: 9.5px; color: var(--wp-dim);
  font-variant-numeric: tabular-nums; flex: none; min-width: 52px; text-align: right;
}

/* line 3 — the numbers that drive the design */
.wp-rstats { display: flex; gap: 9px; }
.wp-stat {
  display: flex; align-items: baseline; gap: 3px;
  font-family: var(--wp-mono); font-size: 9.5px; font-variant-numeric: tabular-nums;
}
.wp-stat .k { color: var(--wp-faint); font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; }
.wp-stat .v { color: var(--wp-ink); }
.wp-stat.slope .v { color: var(--wp-card-c, var(--wp-accent)); }
.wp-stat.q .v.is-under { color: var(--wp-bad); }

/* inline editor inside the selected card */
.wp-reditor { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--wp-line); }
.wp-transition {
  margin: 8px 0 0; padding: 6px 8px; border-radius: 2px; font-size: 10.5px; line-height: 1.5;
  background: #2e1e10; border-left: 3px solid var(--wp-ochre); color: #f2d8ac;
}
.wp-transition.is-high { background: #3a1a17; border-left-color: var(--wp-bad); color: #ffd6cf; }
.wp-transition b { display: block; margin-bottom: 1px; }

/* line 4 — hydraulic reality + governing assembly */
.wp-rstats2 { margin-top: 3px; }
.wp-rasm {
  margin-left: auto; font-size: 9px; color: var(--wp-faint);
  max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wp-rstats2 .v { white-space: nowrap; }
.wp-rstats2 { gap: 7px; }

/* labeled key/value grid — explicit names instead of single letters */
.wp-rgrid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px;
  margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--wp-line);
}
.wp-rkv {
  display: flex; justify-content: space-between; align-items: baseline; gap: 6px;
  font-family: var(--wp-mono); font-size: 9.5px; font-variant-numeric: tabular-nums;
}
.wp-rkv .k { color: var(--wp-faint); font-size: 8.5px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.wp-rkv .v { color: var(--wp-ink); white-space: nowrap; }
.wp-rkv.q .v.is-under { color: var(--wp-bad); font-weight: 700; }
.wp-rcard .wp-rasm {
  margin-top: 4px; font-size: 9px; color: var(--wp-faint);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wp-rcost { margin-top: 4px; font-family: var(--wp-mono); font-size: 9.5px; color: var(--wp-ochre); }
.wp-rtrans { margin-top: 3px; font-family: var(--wp-mono); font-size: 9px; }
