/* Poppins 400/500/600 (latin, latin-ext) from @fontsource/poppins@5.3.0, SIL OFL 1.1 (see OFL-Poppins.txt).
   unicode-range values copied from the package CSS. Paths are relative to this file. */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/fonts/poppins-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/fonts/poppins-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/assets/fonts/poppins-latin-ext-500-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/assets/fonts/poppins-latin-500-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/assets/fonts/poppins-latin-ext-600-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/assets/fonts/poppins-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* Generated by build.py from brand/tokens.json — do not edit. Sources are recorded per token in tokens.json. */
:root {
  --c-primary: #304FFE;
  --c-primary-hover: #1334EF;
  --c-primary-pressed: #0929DE;
  --c-primary-tint: #6F84FF;
  --c-decoration: #ADB9FF;
  --c-surface-light: #F0F5FF;
  --c-text: #14120E;
  --c-text-secondary: #676767;
  --c-text-muted: #7F7F84;
  --c-text-legal: #49454F;
  --c-text-placeholder: #999999;
  --c-border-strong: #CCCCCC;
  --c-separator: #EEEEEE;
  --c-surface-muted: #F5F5F5;
  --c-surface: #FFFFFF;
  --c-focus: #14120E;
  --c-disabled-bg: #EEEEEE;
  --c-disabled-text: #7F7F84;
  --c-on-primary: #FFFFFF;
  --c-nav: #000000;
  --c-callout: #F0F5FF;
  --font-family: Poppins, system-ui, sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-button: 600;
  --fs-h1: 40px;
  --lh-h1: 1.2;
  --fs-h1-m: 32px;
  --lh-h1-m: 1.25;
  --fs-h1-lg: 36px;
  --lh-h1-lg: 1.2;
  --fs-h2: 34px;
  --lh-h2: 1.4;
  --fs-h2-m: 28px;
  --lh-h2-m: 1.3;
  --fs-h2-lg: 32px;
  --lh-h2-lg: 1.35;
  --fs-h3: 34px;
  --lh-h3: 1.05882;
  --fs-h3-m: 26px;
  --lh-h3-m: 1.38462;
  --fs-h3-lg: 28px;
  --lh-h3-lg: 1.14286;
  --fs-h4: 28px;
  --lh-h4: 1.14286;
  --fs-h4-m: 20px;
  --lh-h4-m: 1.2;
  --fs-h4-lg: 26px;
  --lh-h4-lg: 1.38462;
  --fs-h5: 26px;
  --lh-h5: 1.38462;
  --fs-h5-m: 18px;
  --lh-h5-m: 1.33333;
  --fs-h5-lg: 22px;
  --lh-h5-lg: 1.45455;
  --fs-h6: 22px;
  --lh-h6: 1.45455;
  --fs-h6-m: 16px;
  --lh-h6-m: 1.5;
  --fs-h6-lg: 18px;
  --lh-h6-lg: 1.33333;
  --fs-body-lead: 17px;
  --lh-body-lead: 1.6;
  --fs-body-lead-m: 16px;
  --lh-body-lead-m: 1.6;
  --fs-body: 16px;
  --lh-body: 1.6;
  --fs-body-m: 16px;
  --lh-body-m: 1.6;
  --fs-small: 14px;
  --lh-small: 20px;
  --fs-caption: 12px;
  --lh-caption: 18px;
  --fs-legal: 11px;
  --lh-legal: 16px;
  --fs-accordion-title: 18px;
  --lh-accordion-title: 24px;
  --fs-accordion-title-m: 16px;
  --lh-accordion-title-m: 1.333;
  --fs-nav: 17px;
  --lh-nav: 24px;
  --fs-nav-m: 16px;
  --lh-nav-m: 24px;
  --fs-logo: 30px;
  --lh-logo: 26px;
  --fs-body-ui: 16px;
  --lh-body-ui: 24px;
  --fs-prose: 16px;
  --lh-prose: 1.6;
  --fs-input: 16px;
  --fs-row-title: 16px;
  --lh-row-title: 24px;
  --fs-row-subtitle: 13px;
  --lh-row-subtitle: 18px;
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --space-section-y-desktop: 64px;
  --space-section-y-mobile: 48px;
  --layout-container: 1200px;
  --layout-container-narrow: 760px;
  --layout-container-pad: 30px;
  --layout-container-pad-mobile: 16px;
  --layout-header-height: 80px;
  --layout-logo-width: 182px;
  --layout-grid-gap: 32px;
  --layout-aside: 300px;
  --layout-logo-height: 36px;
  --layout-logo-height-mobile: 26px;
  --layout-logo-height-compact: 30px;
  --r-sm: 4px;
  --r-xs: 2px;
  --r-num: 4px;
  --r-pill: 45px;
  --border-hairline: 1px;
  --shadow-none: none;
  --motion-duration: 0.3s;
  --motion-easing: cubic-bezier(0.4, 0, 0.2, 1);
  --component-button-height-l: 48px;
  --component-button-height-s: 40px;
  --component-input-height: 48px;
  --component-table-cell-y: 16px;
  --component-table-cell-x: 24px;
  --component-card-pad: 24px;
  --component-accordion-pad-y: 28px;
  --component-banner-pad: 8px 16px;
  --component-accordion-pad-y-m: 24px;
  --component-num-size: 28px;
  --component-route-height: 96px;
  --component-table-min: 640px;
  --component-field-min: 180px;
  --component-row-height: 68px;
  --component-row-icon: 40px;
  --component-callout-border: 3px;
  --focus-width: 2px;
  --focus-offset: 2px;
  --icon-size-l: 24px;
  --icon-size: 20px;
  --icon-stroke: 2px;
  --diagram-stroke: 1.5px;
  --diagram-font: 14px;
  --diagram-font-small: 12px;
  --diagram-min-width: 640px;
}
/* JustMarkets Malaysia preview portal — component styles.
   Rules: every colour, size, space, radius, shadow and timing comes from a custom property
   generated from brand/tokens.json (tokens.css). Media-query breakpoints are written as
   dollar-prefixed layout token names that build.py replaces with token values. Unitless numbers, 0, %, em and fr are allowed. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--layout-header-height); }
body {
  margin: 0;
  font-family: var(--font-family);
  font-weight: var(--font-weight-regular);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-text);
  background: var(--c-surface);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: var(--font-weight-medium); color: var(--c-text); }
h1, .h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }
h2, .h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
h3, .h3 { font-size: var(--fs-h4); line-height: var(--lh-h4); }
h4, .h4 { font-size: var(--fs-h6); line-height: var(--lh-h6); }
p { margin: 0 0 var(--s-4); }
ul, ol { margin: 0 0 var(--s-4); padding-left: var(--s-5); }
li + li { margin-top: var(--s-2); }
a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 0.15em; transition: color var(--motion-duration) var(--motion-easing); }
a:hover { color: var(--c-primary-hover); }
a:active { color: var(--c-primary-pressed); }
:focus-visible { outline: var(--focus-width) solid var(--c-focus); outline-offset: var(--focus-offset); border-radius: var(--r-xs); }
strong { font-weight: var(--font-weight-medium); }
small, .small { font-size: var(--fs-small); line-height: var(--lh-small); }
.muted { color: var(--c-text-secondary); }
.visually-hidden { position: absolute !important; width: var(--border-hairline); height: var(--border-hairline); overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--s-4); top: calc(-1 * var(--s-9)); z-index: 100; background: var(--c-surface); padding: var(--s-2) var(--s-4); border: var(--border-hairline) solid var(--c-border-strong); border-radius: var(--r-sm); }
.skip-link:focus { top: var(--s-4); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: calc(var(--layout-container) + 2 * var(--layout-container-pad)); margin: 0 auto; padding-inline: var(--layout-container-pad); }
.container--narrow { max-width: calc(var(--layout-container-narrow) + 2 * var(--layout-container-pad)); }
.section { padding: var(--space-section-y-desktop) 0; }
.section--light { background: var(--c-surface-light); }
.section--grey { background: var(--c-separator); }
.section--tight { padding-top: 0; }
.section-head { text-align: center; max-width: var(--layout-container-narrow); margin: 0 auto var(--s-7); }
.section-head p { color: var(--c-text-secondary); font-size: var(--fs-body-lead); line-height: var(--lh-body-lead); margin: var(--s-4) 0 0; }
.section-head--left { text-align: left; margin-left: 0; }
.grid { display: grid; gap: var(--layout-grid-gap); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mt-7 { margin-top: var(--s-7); }
.mb-0 { margin-bottom: 0; }
.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-8); align-items: start; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: var(--c-surface); }
.header__row { display: flex; align-items: center; gap: var(--s-5); min-height: var(--layout-header-height); padding: var(--s-4) var(--s-5); max-width: none; }
.brandmark { display: inline-flex; flex-direction: column; min-width: 0; flex: 0 1 auto; text-decoration: none; color: var(--c-text); line-height: var(--lh-small); }
.brandmark:hover { color: var(--c-text); }
.brandmark__name { font-size: var(--fs-h6); line-height: 1.2; font-weight: var(--font-weight-semibold); color: var(--c-text); white-space: nowrap; }
.logo { display: inline-flex; align-items: center; flex: none; padding: var(--s-1) 0; }
.logo img { display: block; height: var(--layout-logo-height); width: auto; }
.logo--footer img { height: var(--layout-logo-height-mobile); }
.brandmark__tag { margin-top: var(--s-1); font-size: var(--fs-legal); line-height: var(--lh-legal); color: var(--c-text-secondary);  white-space: normal; }
.nav { flex: 1; }
.nav__list { display: flex; gap: var(--s-5); list-style: none; margin: 0; padding: 0; flex-wrap: nowrap; white-space: nowrap; }
.nav__list li + li { margin-top: 0; }
.nav__link { color: var(--c-nav); text-decoration: none; font-size: var(--fs-nav); line-height: var(--lh-nav); padding: var(--s-2) 0; border-bottom: var(--border-hairline) solid transparent; display: inline-block; }
.nav__link:hover { color: var(--c-primary); }
.nav__link[aria-current="page"], .nav__link.is-section { border-bottom-color: var(--c-text); }
.header__actions { display: flex; gap: var(--s-4); align-items: center; flex: none; }
.nav__actions { display: none; }
.menu-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--component-button-height-l); padding: var(--s-2) var(--s-5);
  font: inherit; font-size: var(--fs-body-ui); line-height: var(--lh-body-ui); font-weight: var(--font-weight-button); white-space: nowrap;
  border-radius: var(--r-sm); border: var(--border-hairline) solid transparent; text-decoration: none; cursor: pointer;
  transition: background-color var(--motion-duration) var(--motion-easing), border-color var(--motion-duration) var(--motion-easing), color var(--motion-duration) var(--motion-easing);
}
.btn-primary { background: var(--c-primary); color: var(--c-on-primary); }
.btn-primary:hover { background: var(--c-primary-hover); color: var(--c-on-primary); }
.btn-primary:active { background: var(--c-primary-pressed); color: var(--c-on-primary); }
.btn-secondary { background: var(--c-surface); color: var(--c-nav); border-color: var(--c-border-strong); }
.btn-secondary:hover { background: var(--c-surface-muted); color: var(--c-nav); }
.btn-secondary:active { background: var(--c-separator); color: var(--c-nav); }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--c-disabled-bg); color: var(--c-disabled-text); border-color: var(--c-disabled-bg); cursor: not-allowed; }
.btn--s { min-height: var(--component-button-height-s); padding: var(--s-2) var(--s-4); font-size: var(--fs-small); line-height: var(--lh-small); }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.btn-row--center { justify-content: center; }
.btn .icon { width: var(--icon-size); height: var(--icon-size); }

/* External first-party links: always labelled with destination */
.ext::after { content: "\2197"; display: inline-block; margin-left: var(--s-1); font-size: 0.9em; text-decoration: none; }
.dest { display: block; font-size: var(--fs-legal); line-height: var(--lh-legal); color: var(--c-text-secondary); margin-top: var(--s-1); }

/* ---------- Hero ---------- */
.hero { padding: var(--space-section-y-desktop) 0; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-8); align-items: start; }
.hero h1 { margin-bottom: var(--s-5); }
.hero__lead { font-size: var(--fs-body-lead); line-height: var(--lh-body-lead); color: var(--c-text-secondary); max-width: var(--layout-container-narrow); }
.hero__publisher { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--c-text-secondary); margin-top: var(--s-5); }

/* ---------- List panel (hero right column; styled like the live "Popular" list, no prices) ---------- */
.list-panel { border-top: 0; }
.list-panel__head { display: flex; justify-content: space-between; gap: var(--s-4); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--c-text); padding: 0 var(--s-5) var(--s-4); }
.list-panel__head span:last-child { color: var(--c-text-secondary); }
.list-panel ul { list-style: none; margin: 0; padding: 0; }
.list-panel li { margin: 0; }
.list-row { display: grid; grid-template-columns: var(--component-row-icon) minmax(0, 1fr) auto; gap: var(--s-4); align-items: center; min-height: var(--component-row-height); padding: var(--s-3) var(--s-5); border-top: var(--border-hairline) solid var(--c-separator); color: var(--c-text); text-decoration: none; }
a.list-row:hover { background: var(--c-surface-muted); color: var(--c-text); }
.list-row__icon { display: grid; place-items: center; width: var(--component-row-icon); height: var(--component-row-icon); border-radius: 50%; background: var(--c-surface-light); color: var(--c-primary); }
.list-row__icon svg { width: var(--icon-size); height: var(--icon-size); }
.list-row__title { display: block; font-size: var(--fs-row-title); line-height: var(--lh-row-title); font-weight: var(--font-weight-medium); }
.list-row__sub { display: block; font-size: var(--fs-row-subtitle); line-height: var(--lh-row-subtitle); color: var(--c-text-secondary); }
.list-panel__note { font-size: var(--fs-row-subtitle); line-height: var(--lh-row-subtitle); color: var(--c-text-secondary); padding: var(--s-3) var(--s-5) 0; margin: 0; border-top: var(--border-hairline) solid var(--c-separator); }
.list-row__value { font-size: var(--fs-row-title); line-height: var(--lh-row-title); text-align: right; white-space: nowrap; }

/* ---------- Page title (inner pages) ---------- */
.page-head { padding: var(--s-6) 0 var(--s-7); }
.page-head h1 { margin: var(--s-5) 0 var(--s-4); max-width: var(--layout-container-narrow); }
.page-head__lead { font-size: var(--fs-body-lead); line-height: var(--lh-body-lead); color: var(--c-text-secondary); max-width: var(--layout-container-narrow); margin: 0; }
.page-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-5); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--c-text-secondary); }

/* ---------- Breadcrumbs ---------- */
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); font-size: var(--fs-small); line-height: var(--lh-small); }
.breadcrumb li + li { margin-top: 0; }
.breadcrumb li + li::before { content: "/"; color: var(--c-text-placeholder); margin-right: var(--s-2); }
.breadcrumb a { color: var(--c-text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-text); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--c-text); }

/* ---------- Article body ---------- */
.article { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--layout-aside)); gap: var(--s-8); align-items: start; }
.prose { max-width: var(--layout-container-narrow); font-size: var(--fs-prose); line-height: var(--lh-prose); }
.prose h2 { font-size: var(--fs-h4); line-height: var(--lh-h4); margin: var(--s-8) 0 var(--s-4); }
.prose h3 { font-size: var(--fs-h6); line-height: var(--lh-h6); margin: var(--s-6) 0 var(--s-3); }
.prose > :first-child { margin-top: 0; }
.prose figure, .prose .table-wrap, .prose .notice, .prose .example, .prose .steps, .prose .card, .prose .faq { margin: var(--s-6) 0; }
.answer { font-size: var(--fs-body-lead); line-height: var(--lh-body-lead); border-left: var(--focus-width) solid var(--c-primary); padding-left: var(--s-5); margin-bottom: var(--s-6); }
.aside { position: sticky; top: calc(var(--layout-header-height) + var(--s-5)); display: grid; gap: var(--s-5); }
.toc { border: var(--border-hairline) solid var(--c-separator); border-radius: var(--r-sm); padding: var(--s-5); font-size: var(--fs-small); line-height: var(--lh-small); }
.toc h2 { font-size: var(--fs-body-ui); line-height: var(--lh-body-ui); margin-bottom: var(--s-3); }
.toc ol { margin: 0; padding-left: var(--s-5); }
.toc a { color: var(--c-text); text-decoration: none; }
.toc a:hover { color: var(--c-primary); text-decoration: underline; }

/* ---------- Cards ---------- */
.card { background: var(--c-surface); border: var(--border-hairline) solid var(--c-separator); border-radius: var(--r-sm); padding: var(--component-card-pad); display: flex; flex-direction: column; gap: var(--s-4); }
.card h3, .card h2 { font-size: var(--fs-h5); line-height: var(--lh-h5); }
.card p { margin: 0; color: var(--c-text-secondary); }
.card__foot { margin-top: auto; padding-top: var(--s-2); }
.card--link { text-decoration: none; color: var(--c-text); transition: border-color var(--motion-duration) var(--motion-easing); }
.card--link:hover { border-color: var(--c-border-strong); color: var(--c-text); }
.card--link .more { color: var(--c-primary); font-weight: var(--font-weight-medium); }
.spec { margin: 0; padding-top: var(--s-4); border-top: var(--border-hairline) solid var(--c-separator); display: grid; gap: var(--s-4); }
.spec div { display: grid; gap: var(--s-1); }
.spec dt { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--c-text-muted); }
.spec dd { margin: 0; }

/* ---------- Badges ---------- */
.badge { display: inline-block; font-size: var(--fs-legal); line-height: var(--lh-legal); font-weight: var(--font-weight-medium); padding: var(--s-1) var(--s-2); border-radius: var(--r-sm); background: var(--c-surface-light); color: var(--c-primary-pressed); vertical-align: middle; }
.badge--warn { background: var(--c-surface-light); color: var(--c-text); }
.badge--neutral { background: var(--c-surface-muted); color: var(--c-text-legal); }
.badge--alert { background: var(--c-surface-light); color: var(--c-text); border: var(--border-hairline) solid var(--c-decoration); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-sm); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-body-ui); line-height: var(--lh-body-ui); }
.table caption { text-align: left; caption-side: bottom; font-size: var(--fs-legal); line-height: var(--lh-legal); color: var(--c-text-secondary); padding-top: var(--s-3); }
.table th, .table td { padding: var(--component-table-cell-y) var(--component-table-cell-x); text-align: left; vertical-align: top; border-bottom: var(--border-hairline) solid var(--c-separator); }
.table thead th { font-weight: var(--font-weight-regular); border-bottom-color: var(--c-text-placeholder); }
.table tbody th { font-weight: var(--font-weight-regular); color: var(--c-text-muted); }
.table--compact th, .table--compact td { padding: var(--s-3) var(--s-4); }
.table--wide { min-width: var(--component-table-min); }
.cite { font-size: var(--fs-legal); line-height: 1; text-decoration: none; color: var(--c-text-secondary); white-space: nowrap; vertical-align: 0.15em; }
.cite:hover { color: var(--c-primary); text-decoration: underline; }
.table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Notices ---------- */
.notice { background: var(--c-callout); color: var(--c-text); border: 0; border-left: var(--component-callout-border) solid var(--c-primary); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: var(--s-5); }
.notice__title { display: flex; align-items: center; gap: var(--s-2); font-weight: var(--font-weight-medium); font-size: var(--fs-body-ui); line-height: var(--lh-body-ui); margin: 0 0 var(--s-3); }
.notice p:last-child, .notice ul:last-child { margin-bottom: 0; }
.notice--regulator { background: var(--c-callout); }
.notice--info { background: var(--c-callout); }
.notice .icon { width: var(--icon-size); height: var(--icon-size); flex: none; color: var(--c-text); }
.notice__scope { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--c-text-legal); }

/* ---------- Illustrative example ---------- */
.example { border: var(--border-hairline) dashed var(--c-border-strong); border-radius: var(--r-sm); padding: var(--s-5); }
.example__label { display: inline-block; font-size: var(--fs-legal); line-height: var(--lh-legal); font-weight: var(--font-weight-medium); text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-text-legal); background: var(--c-surface-muted); padding: var(--s-1) var(--s-2); border-radius: var(--r-xs); margin-bottom: var(--s-3); }
.example p:last-child { margin-bottom: 0; }
.calc { display: grid; gap: var(--s-1); margin: var(--s-4) 0; padding: var(--s-4); background: var(--c-surface-muted); border-radius: var(--r-sm); font-variant-numeric: tabular-nums; }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: var(--s-4); }
.steps li { counter-increment: step; position: relative; min-height: var(--component-num-size); padding-left: calc(var(--component-num-size) + var(--s-4)); margin: 0; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: var(--component-num-size); height: var(--component-num-size); border: var(--border-hairline) solid var(--c-separator); border-radius: var(--r-num); font-size: var(--fs-small); line-height: 1; }
code { font-size: 0.9em; overflow-wrap: anywhere; }

/* ---------- FAQ accordion (native details) ---------- */
.faq { border-top: var(--border-hairline) solid var(--c-separator); counter-reset: faq; }
.faq__item { border-bottom: var(--border-hairline) solid var(--c-separator); counter-increment: faq; }
.faq__item > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: var(--component-num-size) minmax(0, 1fr) var(--icon-size); gap: var(--s-4); align-items: center; padding: var(--component-accordion-pad-y) 0; font-size: var(--fs-accordion-title); line-height: var(--lh-accordion-title); }
.faq__item > summary::-webkit-details-marker { display: none; }
.faq__item > summary::before { content: counter(faq); display: grid; place-items: center; width: var(--component-num-size); height: var(--component-num-size); border: var(--border-hairline) solid var(--c-separator); border-radius: var(--r-num); font-size: var(--fs-small); }
.faq__icon { width: var(--icon-size); height: var(--icon-size); color: var(--c-text); transition: transform var(--motion-duration) var(--motion-easing); }
.faq__item[open] .faq__icon { transform: rotate(45deg); }
.faq__item > summary:hover { color: var(--c-text-muted); }
.faq__body { padding: 0 var(--icon-size) var(--component-accordion-pad-y) calc(var(--component-num-size) + var(--s-4)); color: var(--c-text-legal); }
.faq__body p:last-child { margin-bottom: 0; }
.faq-group + .faq-group { margin-top: var(--s-8); }
.faq-group h2 { margin-bottom: var(--s-5); }
.topic-index { display: flex; flex-wrap: wrap; gap: var(--s-3); list-style: none; padding: 0; }
.topic-index li + li { margin-top: 0; }
.topic-index a { display: inline-block; padding: var(--s-2) var(--s-4); border: var(--border-hairline) solid var(--c-border-strong); border-radius: var(--r-sm); text-decoration: none; color: var(--c-text); font-size: var(--fs-small); line-height: var(--lh-small); }
.topic-index a:hover { background: var(--c-surface-muted); }

/* ---------- Choosers (CSS-only tabs; work without JavaScript) ---------- */
.chooser { border: var(--border-hairline) solid var(--c-separator); border-radius: var(--r-sm); padding: var(--s-5); background: var(--c-surface); }
.chooser__q { font-weight: var(--font-weight-medium); margin: 0 0 var(--s-4); }
.chooser__options { display: flex; flex-wrap: wrap; gap: var(--s-2); border: 0; margin: 0 0 var(--s-5); padding: 0; }
.chooser__options legend { font-weight: var(--font-weight-medium); margin-bottom: var(--s-4); padding: 0; }
.chooser__option { position: relative; }
.chooser__option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chooser__option label { display: inline-block; padding: var(--s-2) var(--s-4); border: var(--border-hairline) solid var(--c-border-strong); border-radius: var(--r-sm); font-size: var(--fs-small); line-height: var(--lh-small); cursor: pointer; background: var(--c-surface); transition: background-color var(--motion-duration) var(--motion-easing); }
.chooser__option label:hover { background: var(--c-surface-muted); }
.chooser__option input:checked + label { background: var(--c-text); color: var(--c-surface); border-color: var(--c-text); }
.chooser__option input:focus-visible + label { outline: var(--focus-width) solid var(--c-focus); outline-offset: var(--focus-offset); }
.chooser__panel { display: none; }
.chooser__panel h3 { font-size: var(--fs-h6); line-height: var(--lh-h6); margin-bottom: var(--s-3); }
.chooser__panel p:last-child { margin-bottom: 0; }
/* Panel n is shown when option n is checked (up to 6 options) */
.chooser:has(.chooser__option:nth-of-type(1) input:checked) .chooser__panel:nth-of-type(1),
.chooser:has(.chooser__option:nth-of-type(2) input:checked) .chooser__panel:nth-of-type(2),
.chooser:has(.chooser__option:nth-of-type(3) input:checked) .chooser__panel:nth-of-type(3),
.chooser:has(.chooser__option:nth-of-type(4) input:checked) .chooser__panel:nth-of-type(4),
.chooser:has(.chooser__option:nth-of-type(5) input:checked) .chooser__panel:nth-of-type(5),
.chooser:has(.chooser__option:nth-of-type(6) input:checked) .chooser__panel:nth-of-type(6) { display: block; }
/* Browsers without :has() show every panel, each with its own heading */
@supports not selector(:has(*)) { .chooser__panel { display: block; margin-top: var(--s-5); } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: var(--s-4) var(--s-5); border-left: var(--border-hairline) solid var(--c-separator); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__value { font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: var(--font-weight-medium); }
.stat__label { color: var(--c-text-secondary); font-size: var(--fs-small); line-height: var(--lh-small); margin-top: var(--s-2); }

/* ---------- Learning shelf ---------- */
.shelf { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-4); }
.shelf .card { padding: var(--s-5); }
.shelf .card h3 { font-size: var(--fs-body-ui); line-height: var(--lh-body-ui); }
.shelf__meta { font-size: var(--fs-legal); line-height: var(--lh-legal); color: var(--c-text-secondary); }

/* ---------- Diagrams (inline SVG uses tokens through classes) ---------- */
figure { margin: 0; }
.figure { border: var(--border-hairline) solid var(--c-separator); border-radius: var(--r-sm); padding: var(--s-5); background: var(--c-surface); }
.figure svg { display: block; width: 100%; height: auto; font-family: var(--font-family); }
.figure figcaption { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--c-text-secondary); margin-top: var(--s-4); }
.d-box { fill: var(--c-surface); stroke: var(--c-border-strong); stroke-width: var(--diagram-stroke); }
.d-box--brand { fill: var(--c-surface-light); stroke: var(--c-primary); }
.d-box--muted { fill: var(--c-surface-muted); stroke: var(--c-separator); }
.d-box--warn { fill: var(--c-callout); stroke: var(--c-primary); }
.d-box--deco { fill: var(--c-decoration); stroke: none; }
.d-line { stroke: var(--c-text-muted); stroke-width: var(--diagram-stroke); fill: none; }
.d-line--brand { stroke: var(--c-primary); }
.d-line--dash { stroke-dasharray: 4 4; }
.d-arrow { fill: var(--c-text-muted); }
.d-text { fill: var(--c-text); font-size: var(--diagram-font); }
.d-text--strong { font-weight: var(--font-weight-medium); }
.d-text--small { fill: var(--c-text-secondary); font-size: var(--diagram-font-small); }
.d-text--brand { fill: var(--c-primary-pressed); }
.d-bar { fill: var(--c-primary); }
.d-bar--soft { fill: var(--c-decoration); }
.d-grid { stroke: var(--c-separator); stroke-width: var(--diagram-stroke); }

.figure--scroll, .figure:has(> svg) { overflow-x: auto; }
.figure--scroll svg, .figure > svg { min-width: var(--diagram-min-width); }

/* HTML tree diagram: brand -> entities -> agreement (reflows on mobile) */
.tree { display: grid; gap: var(--s-5); justify-items: center; }
.tree__node { border: var(--border-hairline) solid var(--c-border-strong); border-radius: var(--r-sm); padding: var(--s-3) var(--s-4); background: var(--c-surface); text-align: center; font-size: var(--fs-small); line-height: var(--lh-small); }
.tree__node strong { display: block; font-size: var(--fs-body-ui); line-height: var(--lh-body-ui); }
.tree__node--brand { background: var(--c-surface-light); border-color: var(--c-primary); }
.tree__node--warn { background: var(--c-callout); border-color: var(--c-surface-light); border-left: var(--component-callout-border) solid var(--c-primary); max-width: var(--layout-container-narrow); }
.tree__kids { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); width: 100%; position: relative; padding-top: var(--s-5); border-top: var(--border-hairline) solid var(--c-text-muted); }
.tree__kids .tree__node { text-align: left; position: relative; }
.tree__kids .tree__node::before { content: ""; position: absolute; left: 50%; top: calc(-1 * var(--s-5)); height: var(--s-5); border-left: var(--border-hairline) solid var(--c-text-muted); }
.tree__node--muted { background: var(--c-surface-muted); border-style: dashed; }
.tree__stem { width: 0; height: var(--s-5); border-left: var(--border-hairline) solid var(--c-text-muted); margin: calc(-1 * var(--s-5)) 0; }
@media (max-width: 810px) {
  .tree__kids { grid-template-columns: minmax(0, 1fr); border-top: 0; border-left: var(--border-hairline) solid var(--c-text-muted); padding: 0 0 0 var(--s-4); }
  .tree__kids .tree__node::before { left: calc(-1 * var(--s-4)); top: 50%; width: var(--s-4); height: 0; border-left: 0; border-top: var(--border-hairline) solid var(--c-text-muted); }
}

/* ---------- Sources record ---------- */
.sources { font-size: var(--fs-small); line-height: var(--lh-small); }
.sources h2 { font-size: var(--fs-h6); line-height: var(--lh-h6); margin-bottom: var(--s-4); }
.sources ol { padding-left: var(--s-5); }
.sources li { color: var(--c-text-legal); }
.sources .src-date { color: var(--c-text-secondary); white-space: nowrap; }

/* ---------- Next step ---------- */
.next { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-4); padding: var(--s-5); border: var(--border-hairline) solid var(--c-separator); border-radius: var(--r-sm); margin-top: var(--s-8); }
.next__label { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--c-text-secondary); display: block; }
.next__title { font-weight: var(--font-weight-medium); }
.related { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); }
.related li + li { margin-top: 0; }

/* ---------- Tools (local calculators) ---------- */
.tool { border: var(--border-hairline) solid var(--c-separator); border-radius: var(--r-sm); padding: var(--s-5); }
.tool__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--component-field-min)), 1fr)); gap: var(--s-4); margin-bottom: var(--s-4); }
.field { display: grid; gap: var(--s-1); min-width: 0; }
.field label { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--c-text-muted); }
.field input, .field select { width: 100%; min-width: 0; font: inherit; font-size: var(--fs-input); min-height: var(--component-input-height); padding: var(--s-3) var(--s-4); border: var(--border-hairline) solid var(--c-separator); border-radius: var(--r-sm); background: var(--c-surface); color: var(--c-text); transition: border-color var(--motion-duration); }
.field input:hover, .field select:hover { border-color: var(--c-border-strong); }
.field input:focus-visible, .field select:focus-visible { border-color: var(--c-text); }
.tool__out { font-size: var(--fs-body-lead); line-height: var(--lh-body-lead); font-weight: var(--font-weight-medium); }
.tool__note { font-size: var(--fs-legal); line-height: var(--lh-legal); color: var(--c-text-secondary); margin-top: var(--s-3); }
.js-only { display: none; }
.js .js-only { display: block; }

/* ---------- Footer ---------- */
.footer { padding: var(--s-9) 0 var(--s-6); border-top: var(--border-hairline) solid var(--c-separator); margin-top: var(--s-8); }
.footer__brand { margin-bottom: var(--s-6); }
.footer__cols { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-5); margin-bottom: var(--s-7); }
.footer__cols h2 { font-size: var(--fs-body-ui); line-height: var(--lh-body-ui); margin-bottom: var(--s-4); }
.footer__cols ul { list-style: none; padding: 0; margin: 0; font-size: var(--fs-small); line-height: var(--lh-small); }
.footer__cols li + li { margin-top: var(--s-3); }
.footer__cols a { color: var(--c-text); text-decoration: none; }
.footer__cols a:hover { color: var(--c-text-muted); text-decoration: underline; }
.footer__legal { border-top: var(--border-hairline) solid var(--c-separator); padding-top: var(--s-6); font-size: var(--fs-legal); line-height: var(--lh-legal); color: var(--c-text-legal); }
.footer__legal p { margin-bottom: var(--s-4); }
.footer__legal a { color: var(--c-text-legal); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4); border-top: var(--border-hairline) solid var(--c-separator); padding-top: var(--s-5); margin-top: var(--s-5); font-size: var(--fs-legal); line-height: var(--lh-legal); color: var(--c-text-legal); }

/* ---------- Responsive ---------- */
@media (max-width: 1439px) {
  .logo img { height: var(--layout-logo-height-compact); }
  .header__actions .btn-primary { display: none; }
}
@media (max-width: 1280px) {
  :root {
    --fs-h1: var(--fs-h1-lg); --lh-h1: var(--lh-h1-lg);
    --fs-h2: var(--fs-h2-lg); --lh-h2: var(--lh-h2-lg);
    --fs-h4: var(--fs-h4-lg); --lh-h4: var(--lh-h4-lg);
    --fs-h5: var(--fs-h5-lg); --lh-h5: var(--lh-h5-lg);
    --fs-h6: var(--fs-h6-lg); --lh-h6: var(--lh-h6-lg);
  }
  .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1199px) {
  .header__row { flex-wrap: wrap; padding: var(--s-4); gap: var(--s-4); }
  .brandmark { flex: 1 1 0; }
  .nav { flex-basis: 100%; }
  .nav__list { gap: var(--s-2) var(--s-5); }
  .js .menu-toggle { display: inline-flex; margin-left: auto; }
  .nav__actions { display: grid; gap: var(--s-3); margin-top: var(--s-4); }
  .header__actions { display: none; }
  .js .nav { display: none; }
  .js .nav.is-open { display: block; border-top: var(--border-hairline) solid var(--c-separator); padding-top: var(--s-4); }
  .js .nav.is-open .nav__list { flex-direction: column; gap: 0; }
  .js .nav.is-open .nav__link { display: block; padding: var(--s-3) 0; font-size: var(--fs-nav); border-bottom: var(--border-hairline) solid var(--c-separator); }
  .menu-toggle { align-items: center; justify-content: center; gap: var(--s-2); background: none; border: 0; border-radius: var(--r-sm); min-height: var(--component-button-height-s); min-width: var(--component-button-height-s); padding: var(--s-2); font: inherit; font-size: var(--fs-small); color: var(--c-text); cursor: pointer; }
  .menu-toggle .icon { width: var(--icon-size-l); height: var(--icon-size-l); }
  .hero__grid, .split, .article { grid-template-columns: minmax(0, 1fr); }
  .aside { position: static; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  :root {
    --fs-h1: var(--fs-h1-m); --lh-h1: var(--lh-h1-m);
    --fs-h2: var(--fs-h2-m); --lh-h2: var(--lh-h2-m);
    --fs-h4: var(--fs-h4-m); --lh-h4: var(--lh-h4-m);
    --fs-h5: var(--fs-h5-m); --lh-h5: var(--lh-h5-m);
    --fs-h6: var(--fs-h6-m); --lh-h6: var(--lh-h6-m);
    --fs-body-lead: var(--fs-body-lead-m); --lh-body-lead: var(--lh-body-lead-m);
    --fs-body: var(--fs-body-m); --lh-body: var(--lh-body-m);
    --fs-accordion-title: var(--fs-accordion-title-m); --lh-accordion-title: var(--lh-accordion-title-m);
    --fs-nav: var(--fs-nav-m); --lh-nav: var(--lh-nav-m);
    --component-accordion-pad-y: var(--component-accordion-pad-y-m);
  }
  .section, .hero { padding: var(--space-section-y-mobile) 0; }
  .section--tight { padding-top: 0; }
  .grid--3, .grid--2 { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-4); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 580px) {
  .container { padding-inline: var(--layout-container-pad-mobile); }
  .grid--4, .shelf { grid-template-columns: minmax(0, 1fr); }
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn-row .btn { width: 100%; }
  .section-head { text-align: left; }
  .faq__body { padding-left: 0; padding-right: 0; }
  .table th, .table td { padding: var(--component-table-cell-y) var(--s-4); }
  .next { flex-direction: column; align-items: stretch; }
}
@media (max-width: 600px) {
  .logo img { height: var(--layout-logo-height-mobile); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .header, .footer__cols, .menu-toggle { display: none; }
  .faq__body { display: block; }
}
