/* GULF optical baseline, 28 October 2026. Measured on GULF TH/EN Home.
 * Size-only ink-height calibration; Tank CI faces and weights stay in use.
 * Decorative headings/kickers/KPIs retain their original default typography.
 * Source, method and exact ratios: docs/functional-typography-2026-10-28/.
 * Load last. Component geometry remains owned by the existing page CSS.
 */
html[lang][data-language="th"] {
  --type-functional-body: min(1.55220477rem, calc(1.16415358rem + 0.51740159vw));
  --type-functional-action: min(1.50341880rem, calc(1.12756410rem + 0.50113960vw));
  --type-functional-supporting: min(1.42285437rem, calc(1.13181598rem + 0.38805119vw));
  --type-functional-navigation: min(1.44077635rem, calc(1.11190349rem + 0.43849715vw));
  --type-functional-footer-heading: min(1.37813390rem, calc(1.09624288rem + 0.37585470vw));
  --type-functional-company: min(1.74623037rem, calc(1.21265998rem + 0.71142719vw));
  --type-body-size: var(--type-functional-body);
  --type-body-compact-size: var(--type-functional-body);
  --type-body-lead-size: var(--type-functional-body);
  --type-hero-body-size: var(--type-functional-body);
  --type-action-size-th: var(--type-functional-action);
  --type-action-size-en: var(--type-functional-action);
  --type-action-compact-th: var(--type-functional-action);
  --type-action-compact-en: var(--type-functional-action);
  --type-supporting-size: var(--type-functional-supporting);
}
html[lang][data-language="en"] {
  --type-functional-body: 1.59971315rem;
  --type-functional-action: 1.51930815rem;
  --type-functional-supporting: 1.39974900rem;
  --type-functional-navigation: 1.42435139rem;
  --type-functional-footer-heading: 1.33535600rem;
  --type-functional-company: min(1.89458684rem, calc(1.67022787rem + 0.29914529vw));
  --type-body-size: var(--type-functional-body);
  --type-body-compact-size: var(--type-functional-body);
  --type-body-lead-size: var(--type-functional-body);
  --type-hero-body-size: var(--type-functional-body);
  --type-action-size-th: var(--type-functional-action);
  --type-action-size-en: var(--type-functional-action);
  --type-action-compact-th: var(--type-functional-action);
  --type-action-compact-en: var(--type-functional-action);
  --type-supporting-size: var(--type-functional-supporting);
}

/* Reading text includes standfirsts, prose lists, table values and form values.
 * Inline prose links/strong inherit their surrounding reading style.
 */
html[lang][data-language] {
  --type-functional-reading-weight: 400;
}
html[lang][data-language="th"] { --type-functional-reading-weight: 700; }
html[lang][data-language] body :is(
  .fact p, .ab-cred__text, .pf-chain li,
  .ct-field input:not([type="checkbox"]):not([type="radio"]),
  .ct-field select, .ct-field textarea, .ct-inquiry p,
  .ti-blog .search-form input, .ti-blog table,
  .consent-banner__text, .consent-option p
) {
  font-family: var(--type-body-family);
  font-size: var(--type-functional-body);
  font-weight: var(--type-functional-reading-weight);
  font-style: normal;
  font-synthesis: none;
  line-height: 1.5;
  letter-spacing: 0;
}
html[lang][data-language] .ti-blog table :is(td, th) { font-size: inherit; }
html[lang][data-language] :is(.ct-field input, .ct-field textarea, .ti-blog .search-form input)::placeholder {
  font: inherit; letter-spacing: inherit;
}
/* Functional labels/actions share a cut and size; solid, outline and text-only
 * treatments retain their existing boxes. These are not editorial kickers.
 */
html[lang][data-language] body :is(
  .news-item__copy > a, .consent-manage,
  .ct-field label, .nr-chip, .na-card__category, .sf-card__label,
  .ab-info__row dt, .ct-sub dt, .pf-detail__list dt, .pf-detail__rolelabel,
  .ti-blog .story__topic, .ti-blog .search-form label,
  .ti-blog .search-result__topic, .ti-blog table thead th,
  .ti-blog [data-toc-link], .pr-index a
) {
  font-family: var(--type-action-family);
  font-size: var(--type-functional-action);
  font-weight: var(--type-action-weight);
  font-style: normal;
  font-synthesis: none;
  line-height: 1.2;
  letter-spacing: 0;
}
/* Higher-specificity editorial labels are overridden only inside these UI uses. */
html[lang][data-language] body main[id] .ti-blog :is(.story__topic, .search-form label),
html[lang][data-language] body .ti-blog main[id] :is(.story__topic, .search-form label) {
  font-size: var(--type-functional-action);
}
html[lang][data-language] .ti-blog :is(.section-heading, .browse-all) > span {
  font-family: var(--type-supporting-family);
  font-size: var(--type-functional-supporting);
  font-weight: var(--type-functional-reading-weight);
  line-height: 1.4;
}
/* All primary/submenu entries use the measured visible GULF navigation label,
 * not the enclosing anchor's unrelated font-size. Hit areas stay page-owned.
 */
html[lang][data-language] body :is(
  .desktop-nav a, .nav-group__toggle, .mobile-menu nav a,
  .mobile-menu__group-label, .language-switch, .menu-toggle__label
) {
  font-family: var(--type-action-family);
  font-size: var(--type-functional-navigation);
  font-weight: var(--type-action-weight);
  font-style: normal;
  font-synthesis: none;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}
html[lang][data-language] body .site-footer :is(
  .site-footer__lead p:not(.site-footer__tagline),
  .site-footer__grid p, .site-footer__grid a, .site-footer__bottom
) {
  font-family: var(--type-supporting-family);
  font-size: var(--type-functional-supporting);
  font-weight: var(--type-functional-reading-weight);
  font-style: normal;
  font-synthesis: none;
  line-height: 1.4;
  letter-spacing: 0;
}
html[lang][data-language] body .site-footer h2 {
  font-family: var(--type-action-family);
  font-size: var(--type-functional-footer-heading);
  font-weight: var(--type-action-weight);
  font-style: normal;
  font-synthesis: none;
  line-height: 1.2;
  letter-spacing: 0;
}
html[lang][data-language] body .site-footer__company p:first-child {
  font-size: var(--type-functional-company);
  font-weight: 700;
}
html[lang][data-language] .site-footer__bottom :is(a, button) { font: inherit; }
/* Secondary functional uses without an exact GULF Home component reuse the
 * closest reading/action token; this is internal consistency, not a claimed
 * measurement of a GULF form, filter, pagination or table of contents. */
html[lang][data-language] body :is(
  .career-filters button, .nr-more__button, .nr-readmore, .nr-viewall,
  .nr-topic, .skip-link, .consent-option strong, .consent-option__fixed,
  .ti-blog .topic-nav a, .ti-blog .pagination, .ti-blog .pagination a,
  .ti-blog .toc-mobile summary, .ti-blog .toc-mobile summary > span:nth-child(2)
) {
  font-family: var(--type-action-family);
  font-size: var(--type-functional-action);
  font-weight: var(--type-action-weight);
  font-style: normal;
  font-synthesis: none;
  line-height: 1.2;
  letter-spacing: 0;
}
html[lang][data-language] body :is(
  .consent-banner__text, .consent-banner__copy > p:not(.consent-banner__eyebrow),
  .consent-option small, .ct-field__hint, .mobile-menu p
) {
  font-family: var(--type-body-family);
  font-size: var(--type-functional-supporting);
  font-weight: var(--type-functional-reading-weight);
  font-style: normal;
  line-height: 1.4;
  letter-spacing: 0;
}
html[lang][data-language] body .nr-empty {
  font-family: var(--type-body-family);
  font-size: var(--type-functional-body);
  font-weight: var(--type-functional-reading-weight);
  line-height: 1.5;
}
html[lang][data-language] .ti-blog [data-toc-link] > span:first-child,
html[lang][data-language] .ti-blog .article-steps li::before {
  font-family: var(--type-highlight-family);
  font-size: var(--type-ordinal-size);
  font-weight: var(--type-highlight-weight);
  line-height: 1;
}
/* Release automatic text minimums inside the original tracks. Explicit
 * component minima (buttons, image boxes) retain their higher-specificity rule.
 * Font preview can then wrap within the same columns instead of widening them. */
main :where(section, article, aside, div, ul, ol, li) > :where(div, section, article, aside, ul, ol, li, a, p, h1, h2, h3, span) { min-width: 0; }
/* Phrase wrapping follows the viewport after a preview resize. The shared
 * legacy wrapper can otherwise retain a long no-wrap phrase between frames. */
.th-nb[data-review-wrap] { white-space: normal; }
html[lang][data-language="th"] .pr-hero h1 { max-width: 100%; }
.th-nb:is([data-review-wrap], .th-nb--free) { overflow-wrap: anywhere; }
html[data-font-review-active] main .th-nb { white-space: normal; overflow-wrap: anywhere; }
/* Remaining functional rows from the full rendered-text census. */
html[lang][data-language] body :is(.esg-policy, .esg-policy > span:not([aria-hidden]), .esg-doc, .esg-doc__name, .na-archive a, .mt-route__links strong, .pl-handoff__map strong, .pr-index > p) {
  font-family: var(--type-action-family); font-size: var(--type-functional-action);
  font-weight: var(--type-action-weight); line-height: 1.2;
  font-style: normal; font-synthesis: none; letter-spacing: 0;
}
html[lang][data-language] .nr-topic span { font: inherit; letter-spacing: inherit; }
html[lang][data-language] body :is(.ct-route__action, .pf-figure > p, .mt-fact__label, .sf-stat__text) {
  font-family: var(--type-body-family); font-size: var(--type-functional-supporting);
  font-weight: var(--type-functional-reading-weight); line-height: 1.4; letter-spacing: 0;
}
html[lang][data-language] body :is(.mt-cta__docs li, .ss2-request__docs li) {
  font-family: var(--type-body-family); font-size: var(--type-functional-body);
  font-weight: var(--type-functional-reading-weight); line-height: 1.5;
}
/* Keep the original intrinsic minimum of each KPI column. The last value and
 * its unit must participate in track sizing, rather than escape an equal track. */
.facts__grid > .fact { min-width: auto; }
@media (max-width: 767px) {
  /* Phone headlines and labels keep their fonts and sizes while Thai wraps
   * naturally within the existing column, including after a preview reset. */
  main .th-nb { white-space: normal; overflow-wrap: anywhere; }
}

/* Visitor text-size utility: one compact Aa button in the navigation. */
.text-size-control { display:inline-flex; align-items:center; flex:none; }
.text-size-toggle { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; padding:0; border:0; border-radius:0; background:transparent; color:inherit; cursor:pointer; }
.text-size-toggle__glyph { font-family:var(--type-action-family); font-weight:var(--type-action-weight); font-size:26px; line-height:1; letter-spacing:0; }
.text-size-toggle__glyph>span { font:inherit; font-size:20px; }
.text-size-toggle:hover,.text-size-toggle[aria-expanded="true"] { background:rgba(255,255,255,.12); }
.text-size-toggle:focus-visible { outline:2px solid currentColor; outline-offset:2px; }
.font-review { position:fixed; z-index:45; top:var(--font-review-top,80px); left:var(--font-review-left,12px); right:auto; width:min(248px,calc(100vw - 24px)); max-width:calc(100vw - 24px); display:block; padding:16px; border:1px solid #c9d2e2; background:#fff; color:#1b1464; box-sizing:border-box; font-family:var(--type-action-family); font-size:var(--type-functional-navigation); font-weight:var(--type-action-weight); line-height:1.2; text-align:left; letter-spacing:0; box-shadow:0 8px 20px rgba(16,53,88,.10); }
.font-review[hidden] { display:none!important; }
.font-review__caption { display:block; margin:0 0 12px; font:inherit; }
.font-review__buttons { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; width:100%; border:1px solid #d7dfeb; }
.font-review button { min-width:0; min-height:44px; padding:4px; border:0; border-radius:0; background:transparent; color:inherit; cursor:pointer; font-family:var(--type-action-family); font-size:26px; font-weight:var(--type-action-weight); line-height:1; }
.font-review [data-font-percent] { display:grid; place-items:center; font:700 18px/1 Arial,sans-serif; }
.font-review button[data-font-reset] { display:block; width:100%; margin-top:8px; color:#065baa; font-size:var(--type-functional-action); line-height:1.2; }
.font-review button:hover { background:#e8f5fc; }
.font-review button:focus-visible { outline:2px solid #065baa; outline-offset:-2px; }
.font-review button:disabled { opacity:.35; cursor:default; }
@media print { .text-size-control { display:none!important; } }
/* Give enlarged navigation labels the same room as the default layout. */
@media(max-width:1240px) {
  html[data-text-scale="105"] .desktop-nav { display:none; }
  html[data-text-scale="105"] .site-header__inner { grid-template-columns:1fr auto; }
  html[data-text-scale="105"] .menu-toggle { display:flex; }
}
@media(max-width:1300px) {
  html[data-text-scale="110"] .desktop-nav { display:none; }
  html[data-text-scale="110"] .site-header__inner { grid-template-columns:1fr auto; }
  html[data-text-scale="110"] .menu-toggle { display:flex; }
}
@media(max-width:1360px) {
  html[data-text-scale="115"] .desktop-nav { display:none; }
  html[data-text-scale="115"] .site-header__inner { grid-template-columns:1fr auto; }
  html[data-text-scale="115"] .menu-toggle { display:flex; }
}
@media(max-width:1420px) {
  html[data-text-scale="120"] .desktop-nav { display:none; }
  html[data-text-scale="120"] .site-header__inner { grid-template-columns:1fr auto; }
  html[data-text-scale="120"] .menu-toggle { display:flex; }
}
