/* Hebrew portfolio overrides. Load after hfm.css, only on the Hebrew page. */
html:is([lang="he"], [dir="rtl"]) { direction: rtl; --sans: "Noto Sans Hebrew", "Segoe UI", Arial, sans-serif; }
html:is([lang="he"], [dir="rtl"]) body { text-align: start; }
html:is([lang="he"], [dir="rtl"]) :is(h1, h2, h3, h4, .eyebrow, .quote-label, .market-card-header h2, .option-kind, .option-minimum strong, .option-rules h4, .investing-notes h3) { letter-spacing: normal; text-transform: none; }
html:is([lang="he"], [dir="rtl"]) :is(h1, h2, h3) { line-height: 1.22; }
html:is([lang="he"], [dir="rtl"]) :is(.hero h1, .contact-copy h2, .section-heading h2, .account-panel-heading h3, .option-card h3) { overflow-wrap: break-word; }
html:is([lang="he"], [dir="rtl"]) :is(.hero-grid, .contact-grid, .options-grid, .investing-notes, .steps-rail li, .account-panel-heading, .panel-access, .panel-next, .section-heading) > * { min-inline-size: 0; }
html:is([lang="he"], [dir="rtl"]) :is(.brand, .brand-name, .footer-wordmark) { direction: ltr; unicode-bidi: isolate; }
html:is([lang="he"], [dir="rtl"]) :is(.brand-name, .brand-name > span) { font-family: Inter, Arial, sans-serif; }
html:is([lang="he"], [dir="rtl"]) .brand { flex-shrink: 0; }
html:is([lang="he"], [dir="rtl"]) .skip-link { left: auto; inset-inline-start: 16px; }
html:is([lang="he"], [dir="rtl"]) .language-switcher {
  direction: ltr;
  flex-shrink: 0;
  border-left: 0;
  border-inline-end: 1px solid var(--line);
  padding-inline: 0 15px;
}
html:is([lang="he"], [dir="rtl"]) .language-switcher a { font-size: .7rem; min-width: 29px; }
html:is([lang="he"], [dir="rtl"]) .language-switcher a[lang="he"] { min-width: 39px; }
html:is([lang="he"], [dir="rtl"]) .site-header nav > a { font-size: .8rem; line-height: 1.5; }
html:is([lang="he"], [dir="rtl"]) :is(.nav-register, .button, .text-link, .option-select, .social-link) { max-inline-size: 100%; }
html:is([lang="he"], [dir="rtl"]) :is(.nav-register, .button, .text-link, .option-select, .social-link) > span[aria-hidden="true"] { display: inline-block; flex-shrink: 0; transform: scaleX(-1); }
/* Provider widgets and their moving numeric quote track remain LTR. */
html:is([lang="he"], [dir="rtl"]) :is(.quote-window, .quote-track, .quote-feed, .sessions-window, .account-frame) { direction: ltr; }
html:is([lang="he"], [dir="rtl"]) .market-card-header h2 { text-align: start; }
html:is([lang="he"], [dir="rtl"]) :is([dir="ltr"], .ltr, .step-index, .option-letter, .account-number strong, .contact-details a) { direction: ltr; unicode-bidi: isolate; }
html:is([lang="he"], [dir="rtl"]) :is(.step-index, .option-minimum strong, .account-number strong) { font-variant-numeric: tabular-nums; }
html:is([lang="he"], [dir="rtl"]) .option-minimum strong { display: inline-block; max-inline-size: 100%; }
html:is([lang="he"], [dir="rtl"]) .option-top { min-inline-size: 0; }
html:is([lang="he"], [dir="rtl"]) .option-kind { max-inline-size: 100%; overflow-wrap: break-word; }
html:is([lang="he"], [dir="rtl"]) .option-rules ul { padding-left: 0; padding-inline-start: 17px; }
html:is([lang="he"], [dir="rtl"]) .account-number { row-gap: 10px; }
html:is([lang="he"], [dir="rtl"]) .account-number strong { display: inline-block; }
html:is([lang="he"], [dir="rtl"]) :is(.contact-details a, .private-help, .referral-note, .frame-note) { overflow-wrap: anywhere; }
html:is([lang="he"], [dir="rtl"]) .footer-bottom > span { text-align: end; }

@media (min-width: 601px) {
  html:is([lang="he"], [dir="rtl"]) .options-grid > .option-card:only-child .option-rules {
    border-left: 0;
    border-inline-start: 1px solid #344254;
    padding-left: 0;
    padding-inline-start: 28px;
  }
}
/* Two uncluttered rows: brand/languages, then existing navigation/actions.
   This header needs no JavaScript menu or additional hidden navigation. */
@media (max-width: 1040px) {
  html:is([lang="he"], [dir="rtl"]) { scroll-padding-top: 160px; }
  html:is([lang="he"], [dir="rtl"]) .account-panel { scroll-margin-top: 160px; }
  html:is([lang="he"], [dir="rtl"]) .nav {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    padding-block: 16px;
  }
  html:is([lang="he"], [dir="rtl"]) .nav > .brand { align-self: flex-start; min-height: 40px; }
  html:is([lang="he"], [dir="rtl"]) .nav > nav { width: 100%; min-inline-size: 0; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; }
  html:is([lang="he"], [dir="rtl"]) .language-switcher { position: absolute; inset-block-start: 18px; inset-inline-start: 0; border: 0; padding: 0; gap: 3px; }
  html:is([lang="he"], [dir="rtl"]) .nav-register { gap: 12px; }
}
@media (max-width: 820px) {
  html:is([lang="he"], [dir="rtl"]) .option-rules ul { font-size: .75rem; }
  html:is([lang="he"], [dir="rtl"]) .option-card h3 { font-size: 1.3rem; }
  html:is([lang="he"], [dir="rtl"]) .option-select { font-size: .8rem; gap: 14px; }
  html:is([lang="he"], [dir="rtl"]) .option-minimum strong { font-size: 1.4rem; }
  html:is([lang="he"], [dir="rtl"]) .account-panel-heading > .text-link { flex-shrink: 1; }
}
@media (max-width: 760px) {
  html:is([lang="he"], [dir="rtl"]) .footer-bottom > span { text-align: start; }
  html:is([lang="he"], [dir="rtl"]) .panel-next { align-items: stretch; }
  html:is([lang="he"], [dir="rtl"]) .panel-next .button { align-self: flex-start; }
}
@media (max-width: 600px) {
  html:is([lang="he"], [dir="rtl"]) .nav > nav { gap: 10px 16px; }
  html:is([lang="he"], [dir="rtl"]) .site-header nav > a { font-size: .8rem; }
  html:is([lang="he"], [dir="rtl"]) .nav-register { padding-inline: 14px; }
  html:is([lang="he"], [dir="rtl"]) .option-kind { font-size: .65rem; padding-inline: 6px; }
  html:is([lang="he"], [dir="rtl"]) .option-card h3 { font-size: 1.4rem; }
  html:is([lang="he"], [dir="rtl"]) .option-select { font-size: .85rem; }
  html:is([lang="he"], [dir="rtl"]) .option-minimum > span { font-size: .7rem; }
  html:is([lang="he"], [dir="rtl"]) .account-panel-heading > .text-link { max-inline-size: 100%; }
  html:is([lang="he"], [dir="rtl"]) .account-number { gap: 10px 14px; }
  html:is([lang="he"], [dir="rtl"]) .steps-rail ol { grid-template-columns: 1fr; gap: 17px; }
  html:is([lang="he"], [dir="rtl"]) .steps-rail li { display: flex; align-items: flex-start; gap: 13px; }
  html:is([lang="he"], [dir="rtl"]) .step-index { margin-block: 2px 0; }
  html:is([lang="he"], [dir="rtl"]) .steps-rail strong { font-size: .82rem; }
  html:is([lang="he"], [dir="rtl"]) .steps-rail p { font-size: .76rem; }
}

html[lang="he"] bdi[dir="ltr"]{white-space:nowrap}
