/* ==========================================================================
   SEN: Live — installed capacity card
   Quarterly data from the sen-capacity archive; the module fetches
   data/capacity-latest.json once and renders into an inner .sl-cap div.
   ========================================================================== */

.sl-cap-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  margin: 0 0 0.15rem;
  font-size: 1rem;
}

.sl-cap-when {
  margin: 0 0 0.75rem;
  color: var(--sl-text-soft);
  font-size: 0.8rem;
  text-align: center;
}

.sl-cap {
  max-width: 100%;
}

.sl-cap-rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  column-gap: 2.5rem;
  margin-bottom: 0.6rem;
}

.sl-cap-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.18rem 0;
}

.sl-cap-label {
  flex: 0 0 auto;
}

/* Panel-sized chips; the negative vertical margins are load-bearing —
   a taller row would shift every row height (see lesson L1). */
.sl-cap .sl-help {
  width: 1.6em;
  height: 1.6em;
  font-size: 1em;
  margin-top: -0.4em;
  margin-bottom: -0.4em;
}

.sl-cap-sub {
  flex: 1 1 auto;
  color: var(--sl-text-soft);
  font-size: 0.75rem;
  text-align: right;
}

.sl-cap-row .sl-cap-value {
  margin-left: auto;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.sl-cap-sub + .sl-cap-value {
  margin-left: 0.5rem;
}

.sl-cap-rule {
  border: 0;
  border-top: 1px solid var(--sl-rule);
  margin: 0.35rem 0;
}

.sl-cap-total .sl-cap-row {
  padding: 0.12rem 0;
  font-weight: 600;
}

.sl-cap-note {
  color: var(--sl-text-soft);
  font-size: 0.8rem;
  line-height: 1.45;
  margin: 0.5rem 0 0.6rem;
}

.sl-cap-solar b {
  color: var(--sl-text);
  font-weight: 700;
}

/* The chip sits inside a paragraph rather than beside a row label, so it
   needs its own baseline alignment. It is emitted mid-sentence, right after
   the combined figure, because at the end of the note it wrapped onto a
   line of its own — a non-breaking space does not hold an inline-block. */
.sl-cap-note .sl-help {
  margin-left: 0.35em;
  vertical-align: -0.3em;
}

/* The figures and the eleven-year shape answer the same question from two
   directions, so they share one card. Below 900px they stack — the same
   breakpoint the gas card uses. */
.sl-cap-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: var(--sl-gap);
  align-items: start;
}

@media (max-width: 900px) {
  .sl-cap-split {
    grid-template-columns: 1fr;
  }
}

.sl-cap-more {
  margin: 0.7rem 0 0;
  font-size: 0.8rem;
  text-align: center;
}