/* IASCL V46.483 — one consistent, more readable type scale for every public page (Persian and English).
   Loaded last on purpose: it only raises sizes that were too small; layout is untouched. */
html[lang]{--t-body:16px;--t-nav:16px;--t-menu:15.5px;--t-small:13.5px;--t-meta:14px;--t-label:14.5px;--t-btn:15.5px}
html[lang="fa"]{--t-nav:17px;--t-menu:16px}
html[lang] body{font-size:var(--t-body)!important}

/* ---- main menu ---- */
@media(min-width:901px){
 html[lang] .nav>a,html[lang] .nav>.nav-dropdown>a,html[lang] .nav>.nav-dropdown>a.nav-parent{font-size:var(--t-nav)!important}
 html[lang] .dropdown-menu a,html[lang] .dropdown-menu.sub a{font-size:var(--t-menu)!important;line-height:1.6}
}
/* narrower desktop windows: keep the menu on one line */
@media(min-width:901px) and (max-width:1239px){html[lang="en"] .nav>a,html[lang="en"] .nav>.nav-dropdown>a,html[lang="en"] .nav>.nav-dropdown>a.nav-parent{font-size:14px!important}}
@media(min-width:1240px) and (max-width:1279px){html[lang="en"] .nav>a,html[lang="en"] .nav>.nav-dropdown>a,html[lang="en"] .nav>.nav-dropdown>a.nav-parent{font-size:15px!important}}
@media(min-width:901px) and (max-width:1099px){html[lang="fa"] .nav>a,html[lang="fa"] .nav>.nav-dropdown>a,html[lang="fa"] .nav>.nav-dropdown>a.nav-parent{font-size:14px!important}}
@media(min-width:1100px) and (max-width:1239px){html[lang="fa"] .nav>a,html[lang="fa"] .nav>.nav-dropdown>a,html[lang="fa"] .nav>.nav-dropdown>a.nav-parent{font-size:16px!important}}
@media(max-width:900px){html[lang] .nav a{font-size:16.5px!important}html[lang] .dropdown-menu a{font-size:15.5px!important}}
html[lang] .header-language-switch,html[lang] .auth-language-switch{font-size:15px}
html[lang] .skip-link{font-size:15px}

/* ---- introductions under page titles ---- */
html[lang] .page-hero p,html[lang] .about-hero p,html[lang] .guide-hero p,html[lang] .archive-hero p,html[lang] .library-hero p,html[lang] .iascl-content-hero p{font-size:17.5px!important;line-height:1.85}
html[lang] .eyebrow,html[lang] .home-eyebrow,html[lang] .iascl-content-kicker{font-size:14px;letter-spacing:.03em}

/* ---- cards, lists, home page ---- */
html[lang] .dept h3{font-size:17.5px}
html[lang] .dept p,html[lang] .pg-card p{font-size:16px}
html[lang] .pg-card h2{font-size:20px}
html[lang] .pg-more,html[lang] a.pg-more{font-size:15.5px}
html[lang] .panel-head a{font-size:15px}
html[lang] .list-item small,html[lang] .home-feature-copy small{font-size:14px}
html[lang] .iascl-v328-kicker,html[lang] .iascl-v328-date{font-size:14px}
html[lang] .iascl-v328-copy p{font-size:16px}
html[lang] .iascl-card-kicker{font-size:13px}
html[lang] .iascl-chip{font-size:14px}
html[lang] .iascl-filterbar button{font-size:16px}
html[lang] .home-library-stat-card span,html[lang] .home-library-stat-card small,html[lang] .home-library-stat-card em{font-size:14px}
html[lang] .library-home-caption strong,html[lang] .library-home-caption span{font-size:14.5px}
html[lang] .guidelines-kicker,html[lang] .guidelines-count{font-size:13.5px}
html[lang] .sponsor-head-links a{font-size:15px}
html[lang] .about-tabs button{font-size:16.5px}
html[lang] .about-fact span{font-size:15px}
html[lang] dt,html[lang] dd{font-size:16.5px}

/* ---- News & Events and Advances lists / details ---- */
html[lang] .adv-item-kick{font-size:12.5px}
html[lang] .adv-item-title{font-size:15.5px}
html[lang] .adv-item-date{font-size:13.5px}
html[lang] .adv-sec h3{font-size:15px}
html[lang] .adv-sec p,html[lang] .adv-refs ol{font-size:16.5px}
html[lang] .adv-head h2{font-size:26px}
html[lang] .adv-back,html[lang] .adv-detail .iascl-card-actions a{font-size:15.5px}

/* ---- member / board / committee cards ---- */
html[lang] .cardLinks a,html[lang] .affSrc,html[lang] .profileOpenHint,html[lang] .councilCardField b,html[lang] .councilCardField a,html[lang] .cardTop .meta .tag{font-size:13.5px}
html[lang] .field.affiliation b,html[lang] .field.affiliation,html[lang] .field.metrics b,html[lang] .field.metrics,html[lang] .cmtRole{font-size:14.5px}
html[lang] .members-directory-head .members-count,html[lang] .members-directory-head div{font-size:14.5px}

/* ---- library / guidelines ---- */
html[lang] .lib-filters label span,html[lang] .lib-search span,html[lang] .lib-sort span,html[lang] .lib-seg-label{font-size:14.5px}
html[lang] .library-tab,html[lang] .library-scope-tab,html[lang] .lib-group-tab,html[lang] .lib-seg button,html[lang] .collapse-controls,html[lang] .toolbar-actions button{font-size:14.5px}
html[lang] .guide-stats span,html[lang] .guide-stats b{font-size:14.5px}
html[lang] .lib-resulttext small,html[lang] .category-toggle em,html[lang] .lib-g-count small{font-size:14px}
html[lang] .archive-card .badge{font-size:14px}

/* ---- buttons, inputs, labels ---- */
html[lang] main button,html[lang] main .btn,html[lang] main a.button,html[lang] .btn{font-size:var(--t-btn)}
html[lang] main input,html[lang] main select,html[lang] main textarea{font-size:16px}
html[lang] label{font-size:var(--t-label)}
html[lang] small:not(.sponsor-tier){font-size:var(--t-meta)}

/* ---- sign-in page ---- */
html[lang] .auth-card .subtle,html[lang] .auth-foot a,html[lang] .auth-foot span,html[lang] .login-divider span,html[lang] .demo-picker .note,html[lang] .login-role span{font-size:14.5px}

/* ---- footer ---- */
html[lang] .footer h3{font-size:17.5px}
html[lang] .footer a,html[lang] .footer p{font-size:15px;line-height:1.9}
html[lang] .footer-brand h2{font-size:19px}
html[lang] .footer-bottom,html[lang] .footer-bottom span,html[lang] .footer-bottom a{font-size:13.5px}

/* a few elements that older rules fix with higher priority */
html[lang] .members-grid .card .cmtRole,html[lang] article.card .cmtRole{font-size:14.5px!important}
html[lang] .guideline-home-footer a.btn,html[lang] a.btn.guideline-library-link,html[lang] .guideline-search-wrap button{font-size:15px!important}
html[lang] .iascl-v328-kicker,html[lang] .iascl-v328-date{font-size:14px!important}
html[lang] .lib-resulttext small,html[lang] .toolbar .lib-resulttext small{font-size:14px!important}
html[lang] .profileOpenHint{font-size:13.5px!important}

/* V46.483: keep the Hero text clear of the round prev/next arrows (desktop). */
@media(min-width:901px){
  body.iascl-home .hero.iascl-v328-unified-hero .iascl-v328-copy{padding-left:80px!important;padding-right:80px!important}
}

/* V46.483 — larger main menu on desktop screens */
@media(min-width:1280px){html[lang="fa"] .nav>a,html[lang="fa"] .nav>.nav-dropdown>a,html[lang="fa"] .nav>.nav-dropdown>a.nav-parent{font-size:19px!important}html[lang] .dropdown-menu a{font-size:16.5px!important}}
@media(min-width:1600px){html[lang="fa"] .nav>a,html[lang="fa"] .nav>.nav-dropdown>a,html[lang="fa"] .nav>.nav-dropdown>a.nav-parent{font-size:20px!important}html[lang] .dropdown-menu a{font-size:17px!important}}
@media(min-width:1440px){html[lang="en"] .nav>a,html[lang="en"] .nav>.nav-dropdown>a,html[lang="en"] .nav>.nav-dropdown>a.nav-parent{font-size:17.5px!important}}
@media(min-width:1600px){html[lang="en"] .nav>a,html[lang="en"] .nav>.nav-dropdown>a,html[lang="en"] .nav>.nav-dropdown>a.nav-parent{font-size:19px!important}}
@media(min-width:1280px) and (max-width:1439px){html[lang="en"] .nav>a,html[lang="en"] .nav>.nav-dropdown>a,html[lang="en"] .nav>.nav-dropdown>a.nav-parent{font-size:16px!important}}

/* V46.553 accessibility pass: keyboard focus on member names, links in text that do not rely on colour alone, comfortable tap targets */
.profileClickable .name .nameLink{color:inherit;text-decoration:none}
.profileClickable .name .nameLink:hover{text-decoration:underline}
.profileClickable:focus-within{outline:3px solid #1173ba;outline-offset:2px}
main p>a:not(.btn):not([class*="btn"]){text-decoration:underline;text-underline-offset:2px}
a.councilLink{display:inline-block;padding:4px 0;min-height:24px}
.auth-language-switch{display:inline-block;padding:5px 8px;min-height:28px}
.auth-card .auth-foot a,.auth-card .login-help a,.auth-card p>a,.auth-card .row>a{display:inline-block;padding:4px 0;min-height:24px}
.profileClickable .name .nameLink{display:inline-block;padding:3px 0;min-height:24px}
.cmt-crumbs a,a.cmt-link{display:inline-block;padding:4px 2px;min-height:24px}
input[type="checkbox"],input[type="radio"]{min-width:20px;min-height:20px}

/* IASCL V46.556 - footer: five columns. Column 1 = logo, name (the calligraphic name picture on Persian pages) and slogan; columns 2 to 5 = the four link groups. */
.footer-top{grid-template-columns:minmax(0,1.45fr) repeat(var(--fcols,4),minmax(0,1fr));gap:4px 28px;padding:34px 0 24px}
.footer-top>.footer-brand{flex-direction:column;align-items:flex-start;gap:14px;margin:0;padding:0;border:0}
.footer-top>.footer-brand>img{width:84px;height:84px}
.footer-brand h2 .footer-name-img{display:block;width:min(100%,300px);height:auto;max-width:100%;filter:brightness(0) invert(1)}
.footer-brand h2:has(.footer-name-img){margin:0;line-height:0}
.footer-top>.footer-brand p{margin:0}
.footer-top>div:not(.footer-brand) h3{margin-bottom:6px}
.footer-top>div:not(.footer-brand)>a{display:block;margin:0;padding:6px 0}
@media (max-width:1000px){
  .footer-top{grid-template-columns:repeat(var(--fcols,4),minmax(0,1fr))}
  .footer-top>.footer-brand{grid-column:1/-1;flex-direction:row;align-items:center;gap:16px;padding-bottom:20px;margin-bottom:14px;border-bottom:1px solid rgba(255,255,255,.14)}
  .footer-brand h2 .footer-name-img{width:min(60vw,300px)}
}
@media (max-width:760px){.footer-top{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 20px}.footer-top>.footer-brand{margin-bottom:0}.footer-top>div:not(.footer-brand)>a{padding:8px 0}}
@media (max-width:360px){.footer-top{grid-template-columns:minmax(0,1fr)}}

/* IASCL V46.554 - no flash: the menu links and the footer links are invisible (their space is kept) until the saved menu / footer has been applied
   by menu-runtime.js / footer-runtime.js (they add the class iascl-nav-ready / iascl-footer-ready). If a script cannot run, they appear by themselves after 15 seconds (V46.563: was 4). */
@keyframes iascl-unhold{to{visibility:visible}}
html:not(.iascl-nav-ready) #nav>*{visibility:hidden;animation:iascl-unhold 0s linear 15s forwards}
html:not(.iascl-footer-ready) .footer-top>div:not(.footer-brand){visibility:hidden;animation:iascl-unhold 0s linear 15s forwards}

/* V46.573 - phone header (screens up to 760 px wide): top row = logo, language switch and the menu button; below it the association name and the catch line, centred.
   When the menu is open it appears directly under the top row. Computers and tablets are unchanged. (The layout first came in V46.570; the menu button joined the top row in V46.573.) */
@media (max-width:760px){
  html[lang] .main-header .header-inner{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto auto!important;grid-template-areas:"logo gap switch menu" "nav nav nav nav" "name name name name"!important;
    column-gap:10px!important;row-gap:0!important;align-items:center!important;padding:6px 0 12px!important;direction:ltr!important}
  html[lang="fa"] .main-header .header-inner{grid-template-columns:auto auto minmax(0,1fr) auto!important;grid-template-areas:"menu switch gap logo" "nav nav nav nav" "name name name name"!important}
  html[lang] .main-header .brand{display:contents!important}
  html[lang] .main-header .brand-center{grid-area:logo!important;width:56px!important;height:56px!important;margin:0!important;justify-self:start!important}
  html[lang="fa"] .main-header .brand-center{justify-self:end!important}
  html[lang] .main-header .brand-logo{width:56px!important;height:56px!important}
  html[lang] .main-header .header-language-switch{grid-area:switch!important;justify-self:end!important;align-self:center!important;margin:0!important;min-height:40px!important}
  html[lang="fa"] .main-header .header-language-switch{justify-self:start!important}
  html[lang] .main-header .menu-btn{grid-area:menu!important;display:flex!important;align-items:center!important;justify-content:center!important;align-self:center!important;width:44px!important;height:40px!important;min-height:40px!important;padding:0!important;margin:0!important;font-size:20px!important;line-height:1!important}
  html[lang] .main-header .nav{grid-area:nav!important;width:100%!important}
  html[lang="fa"] .main-header .nav{direction:rtl!important}
  html[lang="en"] .main-header .nav{direction:ltr!important}
  html[lang] .main-header .nav.open{margin-top:8px!important}
  html[lang] .main-header .brand-name-side{grid-area:name!important;width:100%!important;min-width:0!important;display:flex!important;flex-direction:column!important;align-items:center!important;text-align:center!important;padding:0!important;margin:8px 0 0!important}
  html[lang="fa"] .main-header .society-name-image{width:min(100%,340px)!important;max-width:100%!important;height:auto!important}
  html[lang="en"] .main-header .brand-name-en{font-size:clamp(20px,6vw,26px)!important;line-height:1.2!important;white-space:normal!important;text-align:center!important;max-width:100%!important}
  html[lang] .main-header .brand-tagline{margin:6px 0 0!important;font-size:13px!important;line-height:1.55!important;text-align:center!important;max-width:34em!important}
}
