:root {
  color-scheme: light;
}
[data-screen="plans"] .plan-intro, [data-screen="ledger"] .ledger-intro {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.tier-usage, .tier-proof, .tier-personas {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,170px),1fr));
  gap: 12px;
}
.tier-usage > div, .tier-proof > div, .tier-personas > button {
  border: 1px solid #e1e4ef;
  border-radius: 12px;
  background: #f7f8fd;
  color: #232844;
  padding: 12px;
  min-width: 0;
}
.tier-usage dt, .tier-proof dt { color: #585e78; font-size: .83rem; }
.tier-usage dd, .tier-proof dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 700; }
.tier-personas button { text-align: left; font: inherit; cursor: pointer; }
.tier-personas button[aria-pressed="true"] { border-color: #3b3fb8; box-shadow: inset 0 0 0 1px #3b3fb8; }
.tier-personas button span { display: block; margin-top: 4px; color: #585e78; font-size: .85rem; }
.tier-matrix { min-width: 565px; width: 100%; }
.tier-matrix td, .tier-matrix th { text-align: start; vertical-align: top; }
.tier-matrix th[scope="rowgroup"] { background: #edf0fa; text-align: start; }
.tier-matrix td > span { display: inline-block; color: #176c49; font-weight: 700; }
.tier-matrix .tier-status { color: #594275; }
.tier-matrix .tier-limit { color: #585e78; }
.tiers .tier.tier-current { border-color: #3b3fb8; }
.tier-intent { padding: 12px; background: #ebefff; border-radius: 10px; }
.tier-hero-card { overflow-wrap: anywhere; }
.tier-day-chart { border-collapse: separate; border-spacing: 3px; table-layout: fixed; width: 100%; max-width: 740px; }
.tier-day-chart th { font-size: .68rem; color: #585e78; }
.tier-day-chart thead th:not(:first-child) > span { writing-mode: vertical-rl; rotate: 180deg; display:inline-block; }
.tier-day-chart thead th:first-child { width: 28px; }
.tier-day-chart td { aspect-ratio: 1; height: clamp(8px,2.4vw,24px); border-radius: 3px; }
.tier-day-chart td.in-free { outline: 2px solid #383b80; outline-offset:-1px; }
.tier-section-title { font-size: 1.1rem; margin: 0 0 8px; }
.tier-redesign-space { display: grid; gap: 14px; }
.tier-redesign-space > * { min-width: 0; }
.tier-check-control { display: flex; flex-wrap: wrap; align-items:center; gap: 8px; }
.tier-check-control output { overflow-wrap:anywhere; }
@media (max-width:550px) { .tier-day-chart { border-spacing: 2px; } .tier-day-chart th { font-size:.55rem; } }
.signals-controls,.signals-outcomes {display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center}
.signals-controls label {display:flex;gap:6px;align-items:center}
.signal-spectrum {display:grid;grid-template-columns:repeat(auto-fit,minmax(102px,1fr));gap:6px}
.signal-spectrum section {border:1px solid #dfe4f0;background:#f4f6fc;border-radius:8px;padding:7px;min-width:0;overflow-wrap:anywhere}
.signal-spectrum h3 {font-size:.85rem;margin:0}
.signal-spectrum p {margin:5px 0 0;font-size:.8rem}
.signals-outcomes span {padding:4px 8px;background:#f4f6fc;border-radius:6px}

.market-history {max-height:400px;overflow:auto}
#lab-select, #market-filter, #model-asset {min-width:0;max-width:100%}
[data-screen="lab"] .tablewrap {display:block;max-width:100%;overflow-x:auto}
@media (max-width:550px) {
  #lab-record .table {table-layout:fixed;width:100%;min-width:0}
  #lab-record th, #lab-record td {padding:8px 4px;white-space:normal;overflow-wrap:anywhere}
}
[data-screen="lab"] {grid-template-columns:minmax(0,1fr)}
[data-screen="lab"] > * {min-width:0}
[data-screen="market"],[data-screen="forecasts"] {grid-template-columns:minmax(0,1fr)}
[data-screen="market"] > *,[data-screen="forecasts"] > * {min-width:0}
