/* ESPFlight UI/UX final polish — targeted, non-structural adjustments only. */

/* Improve small supporting-text contrast in light mode without changing hierarchy. */
:root{
  --dim:#606B78;
  --accent:#247653;
  --headingAccentA:#27825C;
  --headingAccentB:#329A6E;
}
html[data-theme="dark"]{
  --accent:#42D392;
  --headingAccentA:#42D392;
  --headingAccentB:#42B883;
}

/* Keep the bright brand green for logo/decoration, but use an accessible gradient for text. */
.accentText,
.hero h1 em{
  background:linear-gradient(100deg,var(--headingAccentA),var(--headingAccentB));
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
}
.logoWord span{color:var(--accent)}
.legalHeroCard small,.boardLabel small{font-size:11px}
.docsV2CalloutLabel,.docsV3NavGroup>summary,.docsV3SearchResults span{font-size:11px}

/* Slightly calmer Latin type scale and more comfortable line rhythm. Persian typography is untouched. */
html[lang="en"] .hero h1:not(.heroSlogan){
  font-size:clamp(54px,5.8vw,84px);
  line-height:1.06;
  letter-spacing:-.046em;
}
html[lang="en"] .hero h1.heroSlogan{
  font-size:clamp(50px,5vw,68px);
  line-height:1.12;
  letter-spacing:-.044em;
}
html[lang="en"] .pageHero h1,
html[lang="en"] .partnerHero h1,
html[lang="en"] .aboutHero h1{
  font-size:clamp(48px,5.3vw,70px);
  line-height:1.10;
  letter-spacing:-.043em;
}
html[lang="en"] .sectionTitle h2,
html[lang="en"] .philosophyCopy h2,
html[lang="en"] .offerCopy h2,
html[lang="en"] .foundingHomeGrid h2{
  line-height:1.14;
  letter-spacing:-.038em;
}
html[lang="en"] .docsV2ArticleHeader h1{
  font-size:clamp(36px,3.4vw,42px);
  line-height:1.16;
  letter-spacing:-.035em;
}
html[lang="en"] .docsV2Section h2{
  line-height:1.32;
}

/* Functional microcopy stays readable without making decorative mockups heavier. */
.docsV2NavGroup strong,
.docsV2Toc>strong{font-size:11px}
.docsV2Toc a{font-size:12px}
.docsV2Meta{font-size:12px}
.docsV2Version{font-size:11px}
.docsV2Pager span{font-size:11px}
.foundingSignals small,
.foundingSeal small,
.stageCard small,
.offerNotes span,
.partnerStagePills span,
.applicationChecklist b{font-size:11px}

/* Bring the desktop language control onto the same 40–44 px utility rhythm as its neighbors. */
.languagePicker>summary{
  height:40px;
  min-width:62px;
  padding-inline:10px;
  border-radius:10px;
  font-size:11.5px;
}
.languagePicker>summary svg{width:16px;height:16px;flex-basis:16px}
.languageMenu{top:48px}

/* Mobile table discoverability. Does not alter table, cell or RTL display semantics. */
.docsTableScrollHint{
  display:none;
  margin:0 0 8px;
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
  font-weight:600;
}
.docsTableScrollHint .scrollHintIcon{
  display:inline-block;
  margin-inline-end:6px;
  color:var(--accent);
  font-size:14px;
  line-height:1;
}
.docsV3TableWrap{
  scrollbar-width:thin;
  scrollbar-color:rgba(107,116,130,.55) transparent;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-inline:contain;
}
.docsV3TableWrap::-webkit-scrollbar{height:6px}
.docsV3TableWrap::-webkit-scrollbar-thumb{background:rgba(107,116,130,.45);border-radius:99px}
.docsV3TableWrap::-webkit-scrollbar-track{background:transparent}
.docsV3Code,
.docsProtocolExample pre{
  scrollbar-width:thin;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-inline:contain;
}

@media(max-width:700px){
  html[lang="en"] .hero h1:not(.heroSlogan){
    font-size:clamp(42px,11.5vw,52px);
    line-height:1.12;
    letter-spacing:-.042em;
  }
  html[lang="en"] .hero h1.heroSlogan{
    font-size:clamp(38px,10.8vw,48px);
    line-height:1.14;
    letter-spacing:-.04em;
  }
  html[lang="en"] .pageHero h1,
  html[lang="en"] .aboutHero h1{
    font-size:clamp(36px,9.8vw,44px);
    line-height:1.14;
    letter-spacing:-.038em;
  }
  html[lang="en"] .partnerHero h1{
    font-size:clamp(38px,10.4vw,46px);
    line-height:1.13;
    letter-spacing:-.04em;
  }
  html[lang="en"] .sectionTitle h2,
  html[lang="en"] .philosophyCopy h2,
  html[lang="en"] .offerCopy h2,
  html[lang="en"] .foundingHomeGrid h2{
    font-size:clamp(30px,8.2vw,38px);
    line-height:1.20;
    letter-spacing:-.034em;
  }
  html[lang="en"] .docsV2ArticleHeader h1{
    font-size:clamp(34px,9vw,40px);
    line-height:1.18;
    letter-spacing:-.032em;
  }
  /* Table hint remains hidden at widths where the full table can still fit. */
  .docsTableScrollHint{display:none}
  .docsTableScrollable{
    box-shadow:
      inset 18px 0 18px -22px rgba(33,53,71,.42),
      inset -18px 0 18px -22px rgba(33,53,71,.42),
      0 1px 2px rgba(24,39,75,.025);
  }
  html[data-theme="dark"] .docsTableScrollable{
    box-shadow:
      inset 18px 0 18px -22px rgba(231,231,236,.34),
      inset -18px 0 18px -22px rgba(231,231,236,.34),
      0 1px 2px rgba(0,0,0,.10);
  }
}

@media(min-width:641px) and (max-width:700px){
  .docsTableScrollable{box-shadow:0 1px 2px rgba(24,39,75,.025)}
  html[data-theme="dark"] .docsTableScrollable{box-shadow:0 1px 2px rgba(0,0,0,.10)}
}
@media(max-width:640px){
  .docsTableScrollHint{display:block}
}
