/* Accessible controls and predictable surfaces; no separate accessibility mode. */
:root { --control-border: #707d75; }
body { background:var(--bg); }
body::before { display:none; }
html { scroll-padding-block: 24px 110px; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #164e85 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px #fff !important;
}
:where(button, a, input, select, textarea, summary) { scroll-margin-block: 24px 110px; }
input:not([type="hidden"]), select, textarea { border-color: var(--control-border) !important; }
input[type="checkbox"], input[type="radio"] { accent-color: #356859; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border: 2px solid var(--red) !important; }
.rail, .panel, .topbar, .chart-card, .portfolio-hero, .portfolio-engine-note,
.community-hero, .community-cta, .community-card, .community-step, .community-post-card,
.portfolio-position-card, .portfolio-window-card, .portfolio-metrics article,
.watchlist-card, .signal-card, .thesis-card, .intel-card, .trade-plan-card, .market-card, .research-side {
  background: var(--surface);
}
.topbar::before, .topbar::after, .portfolio-hero::after, .panel::before, .chart-card::before { display: none; }
.search-dock, .push-settings-card, .community-principle, .metric, .market-clock-hero,
#marketClockHero, .countdown > div, .portfolio-capacity { background:var(--surface); color:var(--ink); }
.clock-kicker, .clock-meta, #marketClockHero h2, .countdown strong, .countdown span,
.portfolio-kicker, .portfolio-engine-note > span { color:var(--ink); }
.command, .research-search button, .watchlist-builder button, .profile-form button[type="submit"] {
  background:#356859; color:#fff;
}
.login-body footer { background:var(--surface); border-radius:10px; }
.publish-thesis-form, .analysis-tile, .email-alert-card, .news-card { background:var(--surface); color:var(--ink); }
.publish-actions button { background:#356859; color:#fff; }
.trade-plan-card { background:#143e34; color:#fff; }
.trade-plan-card strong { color:#fff; }
.trade-plan-card .panel-note { color:#fff; }
.rail .mark { background:#e2efe9; }
.portfolio-hero h2 { color:var(--ink); }
.search-dock::after, .ticker::before { display:none; }
.ticker, .score-line > strong { background:var(--surface); color:var(--ink); }
.rail .mark { color: #17211d; }
.rail a, .settings-language-grid button { background-color: var(--surface); }
.settings-language-grid button.active, .community-feed-tabs button[aria-pressed="true"] {
  color: #fff; background: #356859;
}
.accessibility-controls { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:0 0 16px; }
.accessibility-controls a, .accessibility-controls button { min-height:44px; padding:10px 14px; border:1px solid var(--control-border); border-radius:10px; background:var(--surface); color:var(--ink); }
.accessibility-controls p { flex-basis:100%; margin:0; padding:12px; background:var(--surface); color:var(--ink); }
.chart-data { margin-block:16px; }
.chart-data summary { cursor:pointer; min-height:44px; padding:12px; border:1px solid var(--control-border); border-radius:8px; font-weight:700; }
.table-scroll { overflow:auto; max-height:480px; border:1px solid var(--control-border); }
.table-scroll table { width:100%; border-collapse:collapse; background:var(--surface); color:var(--ink); }
.table-scroll caption { padding:12px; text-align:start; font-weight:700; }
.table-scroll th, .table-scroll td { padding:10px; border:1px solid var(--line); text-align:start; white-space:nowrap; }
.table-scroll th { background:var(--surface-2); }
.technical-chart { max-width:100%; background:var(--surface); }
.technical-chart text { fill:var(--muted); }
.chart-up { fill:#356859; stroke:#356859; }
.chart-down { fill:#fff; stroke:#9b3f38; stroke-width:2; }
.ema50 { stroke-dasharray:8 4; }
.ema200 { stroke-dasharray:2 4; }
.chart-external-note { line-height:1.6; }
.community-load-more { margin-block:16px; min-height:44px; padding:12px 20px; }
.portfolio-weekdays { flex-wrap:wrap; }
.portfolio-weekdays label { min-width:44px; min-height:44px; }
.portfolio-engine-note, .portfolio-hero, .community-hero { color:var(--ink); }
.portfolio-engine-note p, .portfolio-hero p, .community-hero p { color:var(--muted); }
html[data-updates-paused="true"] *, html[data-updates-paused="true"] *::before, html[data-updates-paused="true"] *::after {
  animation:none !important; transition:none !important; scroll-behavior:auto !important;
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}
@media (max-width:480px) {
  .settings-language-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .settings-language-grid button { overflow-wrap:anywhere; }
  .portfolio-add-form, .portfolio-settings-form, .portfolio-window-form, .portfolio-position-card { grid-template-columns:minmax(0,1fr); }
  .main { min-width:0; }
  h1, h2, h3, .panel-note, .community-post-text { overflow-wrap:anywhere; }
}
@media (forced-colors:active) {
  button, a, input, select, textarea, summary { forced-color-adjust:auto; }
  button, input, select, textarea, summary { border:1px solid ButtonText !important; }
  [aria-pressed="true"] { border:3px solid Highlight !important; }
}
