/* One type system, with native letterforms for each supported script. */
:root, [lang] {
  --font-ui: "Onest", "Rubik", "Alexandria", "Anek Devanagari", system-ui, sans-serif;
}
[lang|="he"] {
  --font-ui: "Rubik", "Onest", "Alexandria", "Anek Devanagari", system-ui, sans-serif;
}
[lang|="ar"] {
  --font-ui: "Alexandria", "Onest", "Rubik", "Anek Devanagari", system-ui, sans-serif;
}
[lang|="hi"] {
  --font-ui: "Anek Devanagari", "Onest", "Rubik", "Alexandria", system-ui, sans-serif;
}
html { font-size: calc(112.5% * var(--a11y-text-scale, 1)); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, [lang], button, input, select, textarea, svg text {
  font-family: var(--font-ui);
}
body { font-size: 1rem; line-height: 1.65; font-weight: 400; letter-spacing: normal; }
input, select, textarea { font-size: 1rem; line-height: 1.5; }
button { line-height: 1.45; }
h1, h2 { font-weight: 700; line-height: 1.25; letter-spacing: -.025em; }
h3, h4 { font-weight: 650; line-height: 1.4; letter-spacing: -.01em; }
strong, b { font-weight: 650; }
.brand strong, .welcome-brand, .login-brand { font-weight: 700; }
.topbar h1, .portfolio-hero h2, .community-hero h2 { line-height: 1.2; letter-spacing: -.025em; }
.ticker .symbol, .symbol-block strong, .watchlist-top strong, .chart-head strong,
.news-head strong, .trade-plan-step strong, .metric strong, .analysis-tile strong,
.portfolio-metrics strong { letter-spacing: -.015em; font-variant-numeric: lining-nums tabular-nums; }
.price, .countdown strong, td, .portfolio-symbol-block, .last-run strong {
  font-variant-numeric: lining-nums tabular-nums;
}
.panel-note, .community-post-text, .news-card p, .login-subtitle { line-height: 1.75; }
.login-options button, .login-language-help, .login-legal { font-size: .875rem; }
.login-eyebrow { font-size: .8125rem; letter-spacing: .07em; }
#loginForm label { font-size: .9375rem; }
#siteControls { font-family: var(--font-ui); font-size: 1rem; }
#siteControls [lang] { font-family: var(--font-ui); }
#siteControls p { font-size: .9375rem; }
#siteControls h2 { font-size: 1.4rem; font-weight: 650; }
#siteControls .site-control-option { line-height: 1.65; }
/* Tracking can break connected Arabic forms and crowd Hebrew/Devanagari marks. */
:lang(he) :is(h1,h2,h3,h4,button,.brand strong,.section-title,.welcome-kicker),
:lang(ar) :is(h1,h2,h3,h4,button,.brand strong,.section-title,.welcome-kicker),
:lang(hi) :is(h1,h2,h3,h4,button,.brand strong,.section-title,.welcome-kicker) {
  letter-spacing: normal;
}
:lang(ar) :is(h1,h2,h3,h4), :lang(hi) :is(h1,h2,h3,h4) { line-height: 1.5; }
:lang(ar) body, :lang(hi) body { line-height: 1.85; }
@media (max-width: 480px) {
  .login-card h1 { line-height: 1.3; }
  .login-card :is(input,select,textarea) { min-width: 0; }
  .topbar h1 { overflow-wrap: anywhere; }
}

/* Compact heading hierarchy; rem units retain every accessibility text setting. */
:root {
  --heading-page: clamp(1.5rem, calc(1.25rem + .9vw * var(--a11y-text-scale, 1)), 2rem);
  --heading-section: clamp(1.2rem, calc(1.1rem + .3vw * var(--a11y-text-scale, 1)), 1.4rem);
  --heading-card: 1.125rem;
}
h1, .topbar h1, .login-card h1, .learning-hero h1 {
  font-size: var(--heading-page);
  line-height: 1.3;
}
.welcome-hero h1 { font-size: clamp(1.65rem, calc(1.3rem + 1.4vw * var(--a11y-text-scale, 1)), 2.5rem); line-height: 1.3; }
h2, .welcome-wrap h2, .portfolio-hero h2, .community-hero h2, .clock-hero h2 {
  font-size: var(--heading-section);
  line-height: 1.4;
}
h3, .welcome-wrap h3, .community-section-head h3 { font-size: var(--heading-card); }
body .topbar { min-height: 120px; }
.welcome-hero { padding-block: clamp(32px, 5vw, 64px) 32px; }
@media (max-width: 480px) { body .topbar { min-height: 100px; } }
