/* AIHFabs public typography contract. Colors and component geometry stay in page CSS. */
:root{--site-font:"Inter","Microsoft YaHei","PingFang SC","Noto Sans CJK SC",Arial,sans-serif;--type-body:16px;--type-body-weight:400;--type-body-leading:1.7;--type-emphasis:600;--type-h1:42px;--type-h2:34px;--type-h3:18px;--type-h4:20px;--type-price:32px;--type-control:14px;--type-nav:14px;--type-tab:14px;--type-caption:13px;--type-label:12px;--type-input:16px}
@media(min-width:640px) and (max-width:1023px){:root{--type-h1:36px;--type-h2:30px;--type-h4:18px;--type-price:30px}}
@media(max-width:639px){:root{--type-body:14px;--type-h1:32px;--type-h2:27px;--type-h4:18px;--type-price:28px;--type-caption:12px}}
html body{font-family:var(--site-font);font-size:var(--type-body);font-weight:400;line-height:1.7}
html body :is(p,li,td,dd,dt){font-size:var(--type-body);line-height:1.7;font-weight:400}
html body :is(th,dt,strong,b){font-weight:600}
html body h1{font-size:var(--type-h1);line-height:1.2;font-weight:600}
html body h2{font-size:var(--type-h2);line-height:1.25;font-weight:600}
html body h3{font-size:var(--type-h3);line-height:1.4;font-weight:600}
html body h4{font-size:var(--type-h4);line-height:1.4;font-weight:600}
html body :is(h1,h2,h3,h4) :is(a,span,strong,b){font-size:inherit;font-weight:inherit;line-height:inherit}
html body :is(input,select,textarea){font-family:var(--site-font);font-size:var(--type-input);font-weight:400;line-height:1.7}
html body :is(button,.btn,[role=button]){font-family:var(--site-font);font-size:var(--type-control);font-weight:600}
html body :is(small,figcaption,.breadcrumb,.breadcrumb-item){font-size:var(--type-caption);line-height:1.6}
html body :is(.nav-link,[role=tab]){font-size:var(--type-tab);font-weight:600}
html body :is(.blog-card__summary,.article-detail-hero__lede,.article-author__bio,.article-cta__lead,.font-text,.faqs-list .content,.faq-answer,.svc-doc-body,.svc-doc-lead,.home-hero-subtitle,.cart,.qpage){font-size:var(--type-body);font-weight:400;line-height:1.7}
html body :is(summary,.faqs-list .title){font-size:var(--type-body);font-weight:600;line-height:1.7}

/* Semantic content rules outrank legacy component defaults without importance flags. */
html body #main-content :is(p,li,td,dd){font-size:var(--type-body);font-weight:400;line-height:1.7}
html body #main-content :is(th,dt){font-size:var(--type-body);font-weight:600;line-height:1.7}
html body #main-content h1{font-size:var(--type-h1);font-weight:600;line-height:1.2}
html body #main-content h2{font-size:var(--type-h2);font-weight:600;line-height:1.25}
html body #main-content h3{font-size:var(--type-h3);font-weight:600;line-height:1.4}
html body #main-content h4{font-size:var(--type-h4);font-weight:600;line-height:1.4}
html body #main-content :is(input,select,textarea){font-size:var(--type-input);font-family:var(--site-font)}
html body #main-content :is([class*=kicker],[class*=eyebrow],[class$=__tag],.home-team-module){font-size:var(--type-label);font-weight:600;line-height:1.6}
html body #main-content :is(small,figcaption,[class*=caption],[class*=__meta],[class*=__note],[class$="-hint"],[class$="-note"],.home-hero-formats,.home-team-role,.home-team-focus,.ta-note){font-size:var(--type-caption);line-height:1.6}
html body #main-content :is(nav li,[role=tab],.nav-link){font-size:var(--type-nav);line-height:1.5}

/* The existing H2 hero subtitle is descriptive copy; retain its H tag. */
html body #main-content .home-hero-subtitle{font-size:var(--type-body);font-weight:400;line-height:1.7}

/* Editor-authored inline typography cannot be normalized by specificity alone.
   Keep this single exception in the shared contract; never override editor colors. */
:where(.article-detail-page .middle-content .content,.faq-detail-richtext),:where(.article-detail-page .middle-content .content,.faq-detail-richtext) :not(.bi,.iconfont,.fa,.fas,.far,.fab,[class^="icon-"],[class^="fa-"],[class^="bi-"]){font-family:var(--site-font)!important}
:where(.article-detail-page .middle-content .content,.faq-detail-richtext) :is(p,li,td,th,dd,dt){font-size:var(--type-body)!important;line-height:1.7!important;font-weight:400!important}
:where(.article-detail-page .middle-content .content,.faq-detail-richtext) :is(span,a){font-size:inherit!important;line-height:inherit!important;font-weight:inherit!important}
:where(.article-detail-page .middle-content .content,.faq-detail-richtext) :is(th,dt,strong,b){font-weight:600!important}
:where(.article-detail-page .middle-content .content,.faq-detail-richtext) h1{font-size:var(--type-h1)!important;font-weight:600!important;line-height:1.2!important}
:where(.article-detail-page .middle-content .content,.faq-detail-richtext) h2{font-size:var(--type-h2)!important;font-weight:600!important;line-height:1.25!important}
:where(.article-detail-page .middle-content .content,.faq-detail-richtext) h3{font-size:var(--type-h3)!important;font-weight:600!important;line-height:1.4!important}
:where(.article-detail-page .middle-content .content,.faq-detail-richtext) h4{font-size:var(--type-h4)!important;font-weight:600!important;line-height:1.4!important}
:where(.article-detail-page .middle-content .content,.faq-detail-richtext) figcaption :is(p,span){font-size:var(--type-caption)!important;line-height:1.6!important}
:where(.article-detail-page .middle-content .content,.faq-detail-richtext){min-width:0;max-width:100%;overflow-x:auto}
