/* Signalling panel styles, plus the generic .pending-instrument card used by
   other sections once their feeds exist. Tokens only, no hex. */

.signalling-panel {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

/* Current-period meter: faint fill is period progress, frost fill is the
   signalling share, the gold tick marks the threshold. Both fills are
   scaled against the same denominator (period_size) so the gap between
   them reads directly off the bar. */

.signalling-meter {
  width: 100%;
}

.meter-track {
  position: relative;
  height: 1.6rem;
  margin-top: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.meter-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}

.meter-fill-elapsed {
  background: var(--line-strong);
}

.meter-fill-signal {
  background: var(--frost);
}

.meter-tick {
  position: absolute;
  top: -0.3rem;
  bottom: -0.3rem;
  width: 0;
  border-left: 1px dashed var(--gold);
}

.meter-tick-label {
  position: absolute;
  top: -1.05rem;
  left: 0;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--gold);
  white-space: nowrap;
}

.meter-unavailable .meter-track {
  border-style: dashed;
}

.meter-caption {
  margin: 0.5rem 0 0;
  font-family: var(--body);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--faint);
}

/* Headline stats */

.signalling-headline {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem 2.4rem;
  margin: 0;
}

.signalling-headline .stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.signalling-headline dt {
  font-family: var(--body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
  color: var(--faint);
}

.signalling-headline dd {
  margin: 0;
  font-family: var(--mono);
  font-weight: 300;
  font-size: 1.25rem;
  color: var(--text);
}

.signalling-headline .stat-note {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Previous-periods table */

.subhead {
  margin: 0 0 0.5rem;
  font-family: var(--body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--faint);
}

.signalling-history-empty {
  margin: 0;
  color: var(--faint);
  font-size: 0.85rem;
}

.signalling-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.signalling-table th,
.signalling-table td {
  padding: 0.32rem 0.6rem;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

.signalling-table th:first-child,
.signalling-table td:first-child {
  padding-left: 0;
  text-align: left;
}

.signalling-table th {
  font-family: var(--body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--faint);
}

.signalling-table td {
  font-family: var(--mono);
  color: var(--text);
}

.signalling-table td.frost {
  color: var(--frost);
}

/* Concentration slot: editorial line reserved for per-pool attribution */

.concentration-slot {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.concentration-slot .pending-chip {
  margin-left: 0.4rem;
  vertical-align: 1px;
}

/* Generic pending-instrument card, for sections whose feed does not exist
   yet (docs/feeds.md "Planned"). Other components' JS applies this class;
   it lives here because signalling.js was the first to need it. */

.pending-instrument {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
}

.pending-instrument p {
  margin: 0;
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .signalling-headline {
    gap: 1rem 1.4rem;
  }
  .signalling-headline dd {
    font-size: 1.05rem;
  }
}

/* Link to history page under signalling section */
.history-link {
  margin: 0.8rem 0 0;
  font-size: 0.82rem;
}
.history-link a {
  color: var(--blue);
  text-decoration: none;
}
.history-link a:hover {
  text-decoration: underline;
}

/* The severed note replaces the meter's race reading once the mandatory
   window contains a rejection (js/signalling.js: mandatorySevered). It is a
   statement about what the numbers mean now, so it sits at body weight, not
   caption weight. */
.signalling-severed-note {
  margin: 0.9rem 0 0.3rem;
  font-family: var(--body);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
  border-left: 2px solid var(--gold);
  padding-left: 0.75rem;
}
