/*
 * TokenPilot semantic typography and copy fallbacks.
 *
 * This component layer is intentionally not loaded globally yet.
 * It depends on static/css/tokens.css from the token foundation PR and
 * will be enabled later through a controlled single-page cascade pilot.
 */

body{
  color:var(--text-primary);
}

a{
  color:var(--accent-primary);
}

a:hover{
  color:var(--accent-primary-strong);
}

.notice,
.empty,
.footer-note,
.small,
.section-head p,
.titlebox p,
.form-status,
.field-help,
.field-hint,
.caption,
.meta,
.subtle,
.description{
  color:var(--text-secondary);
}

.k,
.stat .k,
.card .k,
.profile-field span,
.profile-metric span,
.trading-stat-label,
.label,
.eyebrow{
  color:var(--text-secondary);
}

.v,
.stat .v,
.card .v,
.profile-metric strong,
.trading-stat-value,
.value,
.emphasis{
  color:var(--text-primary);
}

.text-muted,
.is-muted{
  color:var(--text-tertiary);
}

.text-success,
.is-success{
  color:var(--state-success);
}

.text-warning,
.is-warning{
  color:var(--state-warning);
}

.text-danger,
.is-danger{
  color:var(--state-danger);
}

code,
kbd,
pre{
  color:var(--text-primary);
}

/* Radar tab title token layer. */

#tab-market .panel-head h3,
#tab-market .section-title{
  color:var(--tab-market-title-text, color-mix(in srgb, var(--accent-primary) 24%, var(--text-primary)));
}

#tab-flow .panel-head h3,
#tab-flow .section-title{
  color:var(--tab-flow-title-text, color-mix(in srgb, var(--accent-violet, var(--accent-primary)) 24%, var(--text-primary)));
}

#tab-elliott .panel-head h3,
#tab-elliott .section-title{
  color:var(--tab-elliott-title-text, color-mix(in srgb, var(--state-warning) 28%, var(--text-primary)));
}

#tab-fib .panel-head h3,
#tab-fib .section-title{
  color:var(--tab-fib-title-text, color-mix(in srgb, var(--accent-violet, var(--accent-primary)) 20%, var(--text-primary)));
}

#tab-spot_setup .panel-head h3,
#tab-spot_setup .section-title{
  color:var(--tab-spot-setup-title-text, color-mix(in srgb, var(--state-success) 24%, var(--text-primary)));
}

#tab-trading_setup .panel-head h3,
#tab-trading_setup .section-title{
  color:var(--tab-trading-setup-title-text, color-mix(in srgb, var(--state-danger) 24%, var(--text-primary)));
}

/* Card copy fallback token layer. */

.ai-decision-title,
.ai-decision-score strong{
  color:var(--text-primary);
}

.ai-decision-sub,
.ai-decision-score span{
  color:var(--text-secondary);
}

/* Detail card copy fallback token layer. */

.ai-decision-box-title,
.ai-decision-meta-row,
.ai-decision-meta-row.ai-trigger-zone-row small{
  color:var(--text-secondary);
}

.ai-decision-list,
.ai-decision-meta-row strong,
.ai-decision-meta-row.ai-trigger-zone-row b{
  color:var(--text-primary);
}

.ai-decision-meta-row.ai-trigger-zone-row{
  border-color:var(--state-warning-ring);
  background:var(--state-warning-soft);
}

/* Sentiment and insight copy token layer. */

.metric .v,
.insight-title,
.score-formula-side > strong,
.sentiment-component-head strong{
  color:var(--text-primary);
}

.sentiment-context-meta{
  color:var(--accent-primary);
}

.sentiment-ai-note{
  color:var(--state-warning);
}

.sentiment-component-head span{
  color:var(--text-secondary);
}

.sentiment-evidence-list li,
.sentiment-warning-list li,
.sentiment-evidence-list a{
  color:var(--accent-primary);
}

/* Setup copy token layer. */

.setup-summary strong,
.setup-zone-price{
  color:var(--text-primary);
}

.setup-summary span,
.setup-zone-label,
.setup-zone-note{
  color:var(--text-secondary);
}

/* Fib and Elliott visual copy token layer. */

.fib-visual-head strong,
.elliott-visual-title,
.fib-focus-card strong,
.elliott-focus-card strong{
  color:var(--text-primary);
}

.fib-visual-head span,
.elliott-visual-sub,
.fib-focus-card small,
.elliott-focus-card small,
.fib-svg-anchor-label,
.fib-svg-distance{
  color:var(--text-secondary);
  fill:var(--text-secondary);
}

.fib-visual-meta span,
.elliott-visual-confidence span,
.fib-focus-card span,
.elliott-focus-card span,
.fib-svg-section-label,
.fib-svg-grid-row text,
.elliott-grid-row text,
.fib-svg-table-kicker,
.fib-svg-table-col{
  color:var(--text-tertiary, var(--text-secondary));
  fill:var(--text-tertiary, var(--text-secondary));
}

.fib-visual-meta strong,
.elliott-visual-confidence strong{
  color:var(--accent-info);
}

.fib-svg-ratio,
.fib-svg-price,
.fib-svg-table-headline,
.fib-svg-table-price{
  fill:var(--text-primary);
}

.fib-svg-golden,
.fib-svg-current-readout,
.fib-svg-table-ratio.is-golden,
.fib-svg-table-ratio.is-current,
.fib-svg-table-price.is-golden,
.fib-svg-table-price.is-current,
.fib-svg-table-zone.is-golden,
.fib-svg-table-zone.is-current{
  fill:var(--state-warning);
}

/* Fib level copy token layer. */

.fib-level-card.fib-up .fib-level-top span,
.fib-level-card.fib-up .fib-level-top strong{
  color:var(--state-success-text);
}

.fib-level-card.fib-down .fib-level-top span,
.fib-level-card.fib-down .fib-level-top strong{
  color:var(--state-danger);
}

.fib-level-note{
  color:var(--text-secondary);
}

/* Elliott visual footer token layer. */

.elliott-visual-title span{
  color:var(--state-warning);
}

.elliott-visual-title em{
  color:var(--state-success-text);
  background:var(--state-success-soft);
}

.elliott-visual-shell.is-candidate .elliott-visual-title em{
  color:var(--state-warning);
  background:var(--state-warning-soft);
}

.elliott-visual-footer{
  border-top-color:var(--border-muted);
}

.elliott-visual-footer span{
  color:var(--text-tertiary, var(--text-secondary));
}

.elliott-visual-footer strong{
  color:var(--text-primary);
}

.elliott-visual-footer div:last-child strong{
  color:var(--state-danger);
}

/* Fib SVG table legend token layer. */

.fib-svg-table-legend{
  fill:var(--text-tertiary, var(--text-secondary));
}

.fib-svg-table-legend.is-golden{
  fill:var(--state-warning);
}

.fib-svg-table-legend.is-target{
  fill:var(--text-secondary);
}

/* Radar hero and metric copy token layer. */

.hero-subtitle,
.metric .k{
  color:var(--text-secondary);
}
