/* Analysis — equity scorecards and lenses */

:root {
  --rt-bg: #050810;
  --rt-text: #e8f4ff;
  --rt-muted: #8aaabb;
  --rt-dim: #5a7a8a;
  --rt-border: rgba(0, 229, 255, 0.15);
  --rt-accent: #00e5ff;
  --rt-warn: #ffb347;
  --rt-ok: #5dffb0;
  --rt-font: "Space Grotesk", system-ui, sans-serif;
  --rt-mono: "JetBrains Mono", monospace;
}

.rt-page {
  background: var(--rt-bg);
  color: var(--rt-text);
  font-family: var(--rt-font);
  min-height: 100vh;
}

.rt-page-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

.rt-back {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--rt-accent);
  text-decoration: none;
}

.rt-back:hover {
  text-decoration: underline;
}

.rt-eyebrow {
  font-family: var(--rt-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rt-dim);
  margin: 0 0 0.35rem;
}

.rt-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  letter-spacing: -0.02em;
}

.rt-lead {
  margin: 0 0 1rem;
  color: var(--rt-muted);
  line-height: 1.55;
  max-width: 44rem;
}

.rt-lead code {
  font-family: var(--rt-mono);
  font-size: 0.85em;
  color: var(--rt-accent);
}

.rt-meta {
  font-family: var(--rt-mono);
  font-size: 0.68rem;
  color: var(--rt-dim);
  margin: 0.75rem 0 0;
}

.rt-loading,
.rt-empty {
  color: var(--rt-muted);
  font-size: 0.9rem;
}

.rt-symbol-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.25rem 0 1.5rem;
}

.rt-symbol-chip {
  font-family: var(--rt-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--rt-border);
  border-radius: 4px;
  background: rgba(0, 229, 255, 0.04);
  color: var(--rt-accent);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.rt-symbol-chip:hover,
.rt-symbol-chip:focus-visible {
  border-color: rgba(0, 229, 255, 0.45);
  background: rgba(0, 229, 255, 0.1);
  outline: none;
}

.rt-symbol-chip.is-active {
  border-color: var(--rt-accent);
  background: rgba(0, 229, 255, 0.16);
  color: var(--rt-text);
}

.rt-symbol-chip.is-partial::after {
  content: " · partial";
  color: var(--rt-warn);
  font-size: 0.58rem;
}

.rt-panel {
  margin-bottom: 2rem;
  padding: 1.1rem 1rem;
  border: 1px solid var(--rt-border);
  border-radius: 8px;
  background: rgba(5, 12, 22, 0.85);
}

.rt-panel h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.rt-overview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.rt-overview-controls {
  display: flex;
  gap: 0.35rem;
}

.rt-filter-btn {
  font-family: var(--rt-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--rt-border);
  border-radius: 4px;
  background: transparent;
  color: var(--rt-muted);
  cursor: pointer;
}

.rt-filter-btn.is-active {
  color: var(--rt-accent);
  border-color: rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.08);
}

.rt-picker-divider {
  flex: 0 0 100%;
  margin: 0.35rem 0 0.1rem;
  font-family: var(--rt-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rt-dim);
}

#rt-overview-table {
  max-height: 16rem;
  overflow: auto;
}

.rt-col-updated {
  font-family: var(--rt-mono);
  font-size: 0.68rem;
  color: var(--rt-dim);
  white-space: nowrap;
}

.rt-col-action {
  max-width: 11rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rt-overview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.rt-overview-table th,
.rt-overview-table td {
  padding: 0.5rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--rt-border);
}

.rt-overview-table th {
  font-family: var(--rt-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rt-dim);
}

.rt-overview-table tr[data-symbol] {
  cursor: pointer;
}

.rt-overview-table tr[data-symbol]:hover,
.rt-overview-table tr.is-selected {
  background: rgba(0, 229, 255, 0.06);
}

.rt-badge {
  font-family: var(--rt-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

.rt-badge--ready {
  color: var(--rt-ok);
  border: 1px solid rgba(93, 255, 176, 0.35);
}

.rt-badge--partial {
  color: var(--rt-warn);
  border: 1px solid rgba(255, 179, 71, 0.35);
}

.rt-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.rt-detail-head h3 {
  margin: 0;
  font-size: 1.35rem;
}

.rt-detail-sub {
  margin: 0;
  color: var(--rt-muted);
  font-size: 0.88rem;
}

.rt-partial-banner {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px dashed rgba(255, 179, 71, 0.45);
  border-radius: 6px;
  background: rgba(255, 179, 71, 0.06);
  font-size: 0.85rem;
  color: var(--rt-warn);
}

.rt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.rt-btn {
  font-family: var(--rt-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--rt-border);
  border-radius: 4px;
  color: var(--rt-accent);
  text-decoration: none;
  background: rgba(0, 229, 255, 0.05);
}

.rt-btn:hover {
  border-color: rgba(0, 229, 255, 0.45);
}

.rt-score-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 800px) {
  .rt-score-grid {
    grid-template-columns: 1fr;
  }
}

.rt-score-gauge {
  text-align: center;
  padding: 0.75rem;
  border: 1px solid var(--rt-border);
  border-radius: 8px;
}

.rt-score-gauge strong {
  display: block;
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--rt-accent);
  line-height: 1.1;
}

.rt-score-gauge span {
  font-family: var(--rt-mono);
  font-size: 0.65rem;
  color: var(--rt-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rt-action-line {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--rt-warn);
}

.rt-radar-wrap {
  min-height: 220px;
}

.rt-radar-wrap svg {
  width: 100%;
  max-width: 320px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.rt-dim-bars {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.rt-dim-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr 2rem;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.78rem;
}

.rt-dim-label {
  color: var(--rt-muted);
}

.rt-dim-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(0, 229, 255, 0.08);
  overflow: hidden;
}

.rt-dim-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.5), var(--rt-accent));
}

.rt-dim-val {
  font-family: var(--rt-mono);
  font-size: 0.68rem;
  text-align: right;
}

.rt-scenario-bars {
  margin-top: 1rem;
}

.rt-scenario-bars h4 {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-family: var(--rt-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rt-dim);
}

.rt-scenario-row {
  display: grid;
  grid-template-columns: 4rem 1fr 5.5rem;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
}

.rt-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.rt-metric-chip {
  font-family: var(--rt-mono);
  font-size: 0.62rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--rt-border);
  border-radius: 4px;
  color: var(--rt-muted);
}

.rt-metric-chip strong {
  color: var(--rt-text);
  margin-left: 0.35rem;
}

.rt-lens-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.rt-lens-tab {
  font-family: var(--rt-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--rt-border);
  border-radius: 4px;
  background: transparent;
  color: var(--rt-muted);
  cursor: pointer;
}

.rt-lens-tab.is-active {
  color: var(--rt-accent);
  border-color: rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.08);
}

.rt-lens-tab--macro.is-active {
  color: #c4a8ff;
  border-color: rgba(196, 168, 255, 0.45);
  background: rgba(196, 168, 255, 0.1);
}

.rt-macro-cot {
  margin-bottom: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(196, 168, 255, 0.22);
  border-radius: 8px;
  background: rgba(196, 168, 255, 0.06);
}

.rt-macro-cot-kicker {
  margin: 0 0 0.25rem;
  font-family: var(--rt-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c4a8ff;
}

.rt-macro-cot-note,
.rt-macro-cot-date,
.rt-macro-cot-loading,
.rt-macro-cot-empty {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--rt-muted);
}

.rt-macro-cot-date {
  margin-top: 0.35rem;
  font-family: var(--rt-mono);
  font-size: 0.62rem;
}

.rt-macro-cot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.rt-macro-cot-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--rt-border);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
}

.rt-macro-cot-label {
  font-size: 0.72rem;
  color: var(--rt-text);
}

.rt-macro-cot-net {
  font-family: var(--rt-mono);
  font-size: 0.68rem;
  color: var(--rt-accent);
}

.rt-macro-cot-meta {
  font-size: 0.62rem;
  color: var(--rt-muted);
}

.rt-macro-cot-foot {
  margin: 0.65rem 0 0;
  font-size: 0.72rem;
}

.rt-macro-cot-foot a {
  color: var(--rt-accent);
}

.rt-lens-body {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--rt-muted);
  max-height: 28rem;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.rt-lens-body h2,
.rt-lens-body h3,
.rt-lens-body h4 {
  color: var(--rt-text);
  margin: 1rem 0 0.5rem;
}

.rt-lens-body table.rt-report-meta {
  width: 100%;
  margin: 0.75rem 0 1.25rem;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.rt-lens-body table.rt-report-meta th[scope="row"] {
  width: 11.5rem;
  padding: 0.4rem 0.65rem 0.4rem 0;
  vertical-align: top;
  text-align: left;
  font-weight: 500;
  color: var(--rt-text);
  border: none;
  background: transparent;
}

.rt-lens-body table.rt-report-meta td {
  padding: 0.4rem 0;
  vertical-align: top;
  color: var(--rt-muted);
  border: none;
  background: transparent;
}

.rt-lens-body table.rt-report-meta tr + tr th,
.rt-lens-body table.rt-report-meta tr + tr td {
  border-top: 1px solid var(--rt-border);
}

.rt-lens-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.8rem;
}

.rt-lens-body th,
.rt-lens-body td {
  border: 1px solid var(--rt-border);
  padding: 0.35rem 0.5rem;
  text-align: left;
}

.rt-lens-body a {
  color: var(--rt-accent);
}

.rt-flow-panel {
  margin: 0 0 1.5rem;
  padding: 1rem 1.1rem 1.15rem;
  border: 1px solid var(--rt-border);
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.03);
}

.rt-flow-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.rt-flow-head h4 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--rt-text);
}

.rt-flow-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--rt-mono);
  font-size: 0.62rem;
  color: var(--rt-dim);
}

.rt-flow-tag {
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--rt-border);
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rt-flow-tag--basis {
  color: var(--rt-warn);
  border-color: rgba(255, 179, 71, 0.35);
}

.rt-flow-source {
  color: var(--rt-muted);
}

.rt-flow-toggle {
  display: flex;
  gap: 0.35rem;
}

.rt-flow-view {
  font-family: var(--rt-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--rt-border);
  border-radius: 4px;
  background: transparent;
  color: var(--rt-muted);
  cursor: pointer;
}

.rt-flow-view.is-active {
  color: var(--rt-accent);
  border-color: rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.08);
}

.rt-flow-note {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  color: var(--rt-warn);
  line-height: 1.45;
}

.rt-flow-chart {
  width: 100%;
  min-height: 240px;
  overflow-x: auto;
}

.rt-flow-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.rt-flow-margins {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.85rem;
}

.rt-margin-lane {
  display: grid;
  grid-template-columns: 7.5rem 1fr 2.5rem;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.72rem;
}

.rt-margin-label {
  color: var(--rt-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rt-margin-track {
  height: 0.35rem;
  background: rgba(0, 229, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.rt-margin-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.55), rgba(93, 255, 176, 0.75));
  border-radius: 2px;
}

.rt-margin-pct {
  font-family: var(--rt-mono);
  font-size: 0.65rem;
  color: var(--rt-dim);
  text-align: right;
}

.rt-flow-tip {
  min-height: 1.1rem;
  margin: 0.55rem 0 0;
  font-family: var(--rt-mono);
  font-size: 0.68rem;
  color: var(--rt-accent);
}
