/* ============================================================
   THE PAYERS' LEDGER — companion stylesheet
   Inherits palette + type from styles.css
   ============================================================ */

.payers-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-end;
}
.payers-nav__link {
  color: var(--ember-3);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.payers-nav__link:hover { color: var(--ember-2); }

/* -------- PANEL -------- */
.panel {
  margin: 2.5rem auto;
  padding: 1.5rem 2rem 2rem;
  max-width: 1280px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(20, 16, 12, 0.6), rgba(10, 6, 4, 0.4));
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.panel-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  letter-spacing: 0.01em;
  color: var(--bone-2);
  margin: 0;
}
.numeral {
  color: var(--ember);
  font-style: italic;
  margin-right: 0.5rem;
  font-weight: 600;
}
.panel-sub {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--ash);
  font-size: 0.85em;
  margin-left: 0.3em;
}
.panel-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--bone);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ash);
  box-shadow: 0 0 6px transparent;
  transition: background 0.3s, box-shadow 0.3s;
}
.dot.live {
  background: #6dbf6d;
  box-shadow: 0 0 8px #6dbf6dcc;
  animation: pulse 2s infinite;
}
.dot.stale {
  background: var(--ember);
  box-shadow: 0 0 8px var(--ember-glow);
}
.dot.err {
  background: var(--neg);
  box-shadow: 0 0 8px #ff7a5c88;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* -------- TICKER TABLE -------- */
.ticker-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(10, 6, 4, 0.5);
}
.ticker-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.ticker-table thead th {
  background: rgba(28, 24, 18, 0.85);
  color: var(--ash);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.7rem 0.85rem;
  text-align: right;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ticker-table thead th.t-sym,
.ticker-table thead th.t-name { text-align: left; }
.ticker-table tbody td {
  padding: 0.7rem 0.85rem;
  text-align: right;
  border-bottom: 1px solid rgba(42, 34, 26, 0.5);
  color: var(--bone-2);
  white-space: nowrap;
}
.ticker-table tbody td.t-sym {
  text-align: left;
  font-weight: 700;
  color: var(--ember-3);
  letter-spacing: 0.04em;
}
.ticker-table tbody td.t-name {
  text-align: left;
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--bone-3);
}
.ticker-table tbody tr:last-child td { border-bottom: none; }
.ticker-table tbody tr:hover { background: rgba(255, 90, 31, 0.05); }

.cell-pos { color: var(--pos); }
.cell-neg { color: var(--neg); }
.cell-muted { color: var(--ash); }
.cell-flash { animation: flash 0.6s ease-out; }
@keyframes flash {
  0% { background: rgba(255, 184, 107, 0.18); }
  100% { background: transparent; }
}
.skeleton {
  display: inline-block;
  width: 3em;
  height: 0.9em;
  background: linear-gradient(90deg, var(--ink-3), var(--ink-4), var(--ink-3));
  background-size: 200% 100%;
  border-radius: 2px;
  animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* -------- BIG STAT FOOTER -------- */
.panel-foot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.big-stat__label {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 0.4rem;
}
.big-stat__value {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--bone-3);
  line-height: 1;
}
.big-stat__unit {
  color: var(--ember);
  font-size: 0.55em;
  margin-left: 0.1em;
  font-weight: 500;
}
.big-stat__caption {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ash);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* -------- SCORECARD GRID -------- */
.scorecard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.scorecard {
  padding: 1.4rem 1.3rem;
  background: rgba(20, 16, 12, 0.55);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ember);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.panel--denials .scorecard {
  border-left-color: var(--neg);
}
.scorecard__metric {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 4vw, 2.8rem);
  color: var(--bone-3);
  line-height: 1;
}
.scorecard__label {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--bone);
  line-height: 1.35;
}
.scorecard__delta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ember-3);
  letter-spacing: 0.04em;
  margin-top: 0.3rem;
}
.scorecard__delta.delta-up { color: var(--ember-2); }
.scorecard__delta.delta-warn { color: var(--ember-3); }
.scorecard__source {
  margin-top: auto;
  padding-top: 0.6rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.scorecard__source a {
  color: var(--ash);
  text-decoration: none;
  border-bottom: 1px dotted var(--char);
}
.scorecard__source a:hover { color: var(--ember-3); border-bottom-color: var(--ember); }

/* -------- SYNTHESIS -------- */
.synthesis {
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%, rgba(255, 90, 31, 0.08), transparent 70%),
    linear-gradient(180deg, rgba(20, 16, 12, 0.6), rgba(10, 6, 4, 0.4));
}
.synthesis h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  color: var(--bone-2);
  margin: 0 0 1rem;
}
.synth-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.55;
  color: var(--bone-3);
  max-width: 60ch;
  margin: 0 auto;
  text-align: center;
}

/* -------- MOBILE -------- */
@media (max-width: 720px) {
  .panel { padding: 1rem 1rem 1.5rem; margin: 1.5rem 0.5rem; }
  .ticker-table { font-size: 0.78rem; }
  .ticker-table thead th,
  .ticker-table tbody td { padding: 0.55rem 0.6rem; }
  .ticker-table thead th.t-rev,
  .ticker-table tbody td.t-rev,
  .ticker-table thead th.t-cap,
  .ticker-table tbody td.t-cap { display: none; }
}
