/* adaptive.css · v5.4.12 — Phase 2 IC display
 *
 * v5.4.12 — adaptive.html now uses the canonical shell (<body>+<main>
 * unclassed, 1360px max via global rule). Sections that need to span both
 * columns are listed in style.css full-row selectors (.adp-hero,
 * .adp-strategies-panel, .adp-row3, .adp-calibration). */

/* IC cell — keep IC value + multiplier badge on one line so the column
 * doesn't blow up the table width. */
.adp-ic-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.adp-ic-pill .badge {
  font-size: 10px;
  letter-spacing: 0.4px;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.adp-ic-pill .badge.up   { color: var(--up);   background: rgba(95,211,154,0.06); }
.adp-ic-pill .badge.down { color: var(--down); background: rgba(224,107,107,0.06); }
.adp-ic-pill .badge.muted{ color: var(--muted); background: rgba(154,146,194,0.06); }
.adp-ic-pill .badge.pending { color: var(--muted); border-style: dashed; opacity: 0.7; }

/* v5.4.13 — Phase 4: FLIPPED state. Distinct red+gold border + pulse glow
 * so it's clearly different from "×0.5 dampen". The strategy is running,
 * just inverted. */
.adp-effect.flipped {
  color: var(--gold);
  background: rgba(224,107,107,0.10);
  border: 1px solid var(--gold);
  border-radius: 3px;
  padding: 1px 6px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 0 6px rgba(244,213,110,0.4);
}

/* v5.4.18 — Phase 8 loss patterns / sweet spots */
.adp-regime-panel { padding: 16px 20px; }
.adp-regime-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}
.adp-regime-col h3 {
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 700;
  letter-spacing: 1px;
  margin: 0 0 8px;
  text-transform: uppercase;
}
.adp-regime-col h3 .muted { font-weight: 400; letter-spacing: 0.3px; text-transform: none; font-size: 11px; }
.adp-regime-danger h3 { color: #E5484D; }
.adp-regime-sweet  h3 { color: #5FD39A; }
.adp-regime-col table { margin: 0; }
.adp-regime-col tbody td:first-child {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-dim);
}
.adp-regime-col tbody tr td:nth-child(4) { font-weight: 600; }
.adp-regime-danger tbody tr td:nth-child(4) { color: #E5484D; }
.adp-regime-sweet  tbody tr td:nth-child(4) { color: #5FD39A; }
.adp-regime-col tbody tr td:last-child {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  text-align: right;
}

.adp-regime-full {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.adp-regime-full summary {
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 11px; font-weight: 600;
  letter-spacing: 1px;
  color: var(--gold);
  text-transform: uppercase;
  padding: 4px 0;
}
.adp-regime-full summary:hover { color: var(--text); }
#adpRegimeFullBody {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 10px;
}
.adp-regime-feature-block {
  background: rgba(11,11,22,0.4);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
}
.adp-regime-feature-block h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600;
  margin: 0 0 6px;
  color: var(--gold);
}
.adp-regime-feature-block table { margin: 0; font-size: 11px; }
.adp-regime-feature-block tbody td { padding: 3px 6px; }

@media (max-width: 900px) { .adp-regime-row { grid-template-columns: 1fr; } }

.adp-hero { padding: 16px 18px; }
.adp-hero-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px 24px;
  margin-bottom: 6px;
}
.adp-stat { display: flex; flex-direction: column; gap: 3px; }
.adp-stat-k { font-size: 10px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.adp-stat-v {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px; font-weight: 600; color: var(--text);
}
.adp-stat-v.up   { color: var(--up); }
.adp-stat-v.down { color: var(--down); }
.adp-hero-note { font-size: 11px; padding-top: 6px; border-top: 1px solid var(--line); }

/* Tables */
.adp-table-wrap { overflow-x: auto; }
.adp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 6px;
}
.adp-table thead th {
  text-align: left;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold-2);
  text-transform: uppercase;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(18,18,42,0.6);
}
.adp-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(42,38,88,0.4);
  color: var(--text-dim);
  vertical-align: middle;
}
.adp-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.adp-table .mono { font-family: 'JetBrains Mono', monospace; }
.adp-table .up   { color: var(--up); }
.adp-table .down { color: var(--down); }
.adp-table .muted { color: var(--muted); }

.adp-table-sm { font-size: 12px; }
.adp-table-sm thead th { padding: 8px 10px; font-size: 9px; }
.adp-table-sm tbody td { padding: 6px 10px; }

/* State badges */
.adp-state {
  display: inline-flex;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid currentColor;
  text-transform: uppercase;
}
.adp-state.active  { color: var(--up);   background: rgba(95,211,154,0.08); }
.adp-state.testing { color: var(--gold-2); background: rgba(244,213,110,0.10); }
.adp-state.parked  { color: var(--muted); background: rgba(154,146,194,0.10); }
.adp-state.retired { color: var(--down);  background: rgba(224,107,107,0.08); opacity: 0.7; }

/* Weight bar */
.adp-weight-cell { display: flex; align-items: center; gap: 8px; }
.adp-weight-bar {
  width: 80px; height: 6px;
  background: rgba(42,38,88,0.6);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.adp-weight-bar > div {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-2));
  border-radius: 3px;
  transition: width 200ms ease;
}
.adp-weight-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; min-width: 38px; text-align: right;
}

/* 3-up row */
.adp-row3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 1100px) { .adp-row3 { grid-template-columns: 1fr; } }
.adp-row3 .panel { padding: 14px 16px; }

/* Calibration row colors */
.adp-calib-table tr.calib-good { background: rgba(95,211,154,0.04); }
.adp-calib-table tr.calib-bad  { background: rgba(224,107,107,0.04); }
.adp-calib-table tr.calib-low  { opacity: 0.5; }
