/* base.css — reset, typography, global elements */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--ff-en);
  font-size: var(--step-0);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
:lang(th), [lang="th"] { font-family: var(--ff-th); line-height: var(--lh-th); }
h1, h2, h3, h4 { margin: 0 0 var(--s-4); font-weight: 800; line-height: var(--lh-tight); letter-spacing: -0.015em; text-wrap: balance; }
:lang(th) h1, :lang(th) h2, :lang(th) h3, [lang="th"] h1, [lang="th"] h2, [lang="th"] h3 { font-weight: 700; line-height: 1.45; letter-spacing: 0; text-wrap: pretty; }
/* Thai pages (th/, generated by tools/build_th.py). IBM Plex Sans Thai is loaded only there. */
:lang(th) body { line-height: var(--lh-th); }
:lang(th) .lead { line-height: 1.7; }
:lang(th) h1, :lang(th) h2, :lang(th) h3, :lang(th) h4 { overflow-wrap: anywhere; }
:lang(th) .eyebrow { letter-spacing: 0.02em; }
/* phrase lock (TH-VOICE §7): a line may break only at a space or <wbr> between .th-nw chunks.
   Resets beat component rules that style span descendants (e.g. .flagship__nums span). */
.th-l, .th-nw { display: inline !important; margin: 0 !important; padding: 0 !important; font: inherit !important; color: inherit !important; letter-spacing: inherit !important; text-transform: inherit !important; }
.th-nw { white-space: nowrap; }
@media (max-width: 22.5rem) { h1 .th-nw, h2 .th-nw, h3 .th-nw { white-space: normal; } }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
h4 { font-size: var(--step-0); }
p { margin: 0 0 var(--s-4); max-width: 68ch; }
p:last-child { margin-bottom: 0; }
a { color: var(--c-primary); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--c-primary-700); }
.band--navy a, .band--primary a { color: inherit; }
ul, ol { margin: 0 0 var(--s-4); padding-left: 1.25em; }
li { margin-bottom: var(--s-2); }
img, svg, video { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
strong { font-weight: 700; }
small, .small { font-size: var(--step--1); }
.muted { color: var(--c-muted); }
.eyebrow { display: inline-block; font-size: var(--step--1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-primary); margin-bottom: var(--s-3); }
.band--navy .eyebrow { color: var(--c-amber); }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--c-muted); max-width: 60ch; }
.band--navy .lead { color: var(--c-muted); }
hr { border: 0; border-top: 1px solid var(--c-line); margin: var(--s-6) 0; }
code, kbd { font-family: var(--ff-mono); font-size: 0.9em; }
table { border-collapse: collapse; width: 100%; font-size: var(--step--1); }
th, td { text-align: left; padding: var(--s-3) var(--s-3); border-bottom: 1px solid var(--c-line); vertical-align: top; }
th { font-weight: 700; color: var(--c-muted); font-size: 0.8em; letter-spacing: 0.06em; text-transform: uppercase; }

/* focus */
:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; border-radius: var(--r-sm); }
.band--navy :focus-visible, .band--primary :focus-visible { outline-color: var(--c-amber); }
.skip-link { position: absolute; left: var(--s-4); top: -100px; z-index: 1000; background: var(--c-navy); color: #fff; padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); }
.skip-link:focus { top: var(--s-4); }
#main:focus { outline: none; }

/* visually hidden */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* placeholder for facts management must fill */
.tbc { display: inline-block; outline: 2px dashed var(--c-amber); outline-offset: 1px; background: var(--c-amber-100); color: var(--c-on-amber); padding: 0 0.35em; border-radius: var(--r-sm); font-weight: 600; }
.tbc::before { content: "TBC: "; font-size: 0.75em; letter-spacing: 0.05em; opacity: 0.8; }
.band--navy .tbc { background: rgba(245, 183, 0, 0.18); color: #fff; }

/* selection */
::selection { background: var(--c-amber); color: var(--c-on-amber); }
