/* #AktaUntukSemua: sistem reka bentuk. Satu motif (§), latar gelap, satu biru NWS. Lihat DESIGN.md.
   Palet: latar dan dakwat sebagai teras, biru NWS (daripada logo) sebagai satu-satunya aksen. Gelap ialah lalai; mod cerah berfungsi penuh. */
:root {
  --bg: #0b0d10; --surface: #161a1f; --ink: #eef1f4; --muted: #a3adb7;
  --field: #3d63e0; --field-ink: #ffffff;
  --accent: #8aa6ff; --accent-ink: #0b0d10; --tint: #1d2c4f;
  --paper: #ffffff; --paper-ink: #0b0d10;
  --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-expo: cubic-bezier(.16, 1, .3, 1); --ease-in-out: cubic-bezier(.76, 0, .24, 1); --ease-exit: cubic-bezier(.55, .055, .675, .19);
  --t-press: 140ms; --t-hover: 180ms; --t-ui: 260ms;
  --margin: clamp(16px, 2.4vw, 32px); --maxw: 1440px;
  --step-small: clamp(.875rem, .85rem + .1vw, .9375rem);
  --step-body: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);
  --fs-q: clamp(1.5rem, 2.5vw, 2.25rem);
  --fs-state: clamp(2.25rem, 4.6vw, 4.75rem);
  --display: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --text: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sb-h: 56px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6f8; --surface: #e6eaee; --ink: #0e1116; --muted: #4a545e;
  --field: #1642bf; --field-ink: #ffffff;
  --accent: #1642bf; --accent-ink: #ffffff; --tint: #dbe4ff;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--step-body)/1.55 var(--text); text-rendering: optimizeLegibility; overflow-x: clip; }
img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: .07em; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
b, strong { font-weight: 600; }
::selection { background: var(--field); color: var(--field-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.sr, .skip:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 99; left: 12px; top: 12px; padding: 10px 16px; background: var(--ink); color: var(--bg); }
.wrap { width: min(100% - 2 * var(--margin), var(--maxw)); margin-inline: auto; }
.tnum { font-variant-numeric: tabular-nums lining-nums; }
.ic { flex: none; }
.disp { font-family: var(--display); font-weight: 700; letter-spacing: -.04em; line-height: .95; }
.sec-mark { color: var(--accent); font-weight: 700; }

/* ------------------------------------------------------------ pengepala: carian ialah baris pertama */
.top { position: relative; z-index: 30; }
.top__row { display: flex; align-items: center; gap: 12px clamp(16px, 2.2vw, 32px); padding: 16px var(--margin); max-width: calc(var(--maxw) + 2 * var(--margin)); margin-inline: auto; }
.top__nav { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(8px, 1.4vw, 20px); margin-left: auto; font-size: var(--step-small); font-weight: 500; }
.top__nav > a:not(.lang__b) { padding: 10px 2px; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .3em; text-decoration-thickness: 2px; transition: text-decoration-color var(--t-hover) ease; }
.top__nav > a:hover, .top__nav > a[aria-current] { text-decoration-color: currentColor; }
.top__search { flex: 1; min-width: 0; }
.logo { display: inline-flex; align-items: baseline; text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: -.035em; white-space: nowrap; }
.logo i { font-style: normal; color: var(--accent); }
.logo b { font-weight: 700; }
.nws { display: inline-flex; align-items: center; gap: 10px; font-size: var(--step-small); line-height: 1.25; }
.nws__logo { width: 34px; height: 34px; }
.nws__txt b { display: block; font-weight: 600; }
.iconbtn { display: grid; place-items: center; width: 44px; height: 44px; background: transparent; border: 0; color: inherit; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.iconbtn:hover { background: var(--surface); }
.iconbtn:active { transform: scale(.94); }
.lang { display: inline-flex; gap: 2px; }
.lang__b { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none; font-weight: 600; font-size: var(--step-small); transition: background-color var(--t-hover) ease; }
.lang__b.on { background: var(--ink); color: var(--bg); }
a.lang__b:hover { background: var(--surface); }

/* ------------------------------------------------------------ kotak carian */
.sb { position: relative; }
.sb__field { display: flex; align-items: stretch; gap: 0; min-height: var(--sb-h); padding-left: 20px; background: var(--surface); color: var(--ink); transition: outline-color var(--t-hover) ease; }
.sb__field:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.sb__icon { color: var(--muted); margin: auto 8px auto -4px; }
.sb__input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; font-size: clamp(1.0625rem, 1.5vw, 1.375rem); font-weight: 500; padding: 8px 0; }
.sb__input::placeholder { color: var(--muted); opacity: 1; }
.sb__input::-webkit-search-cancel-button { display: none; }
.sb__clear[hidden] { display: none; }
.sb__clear { display: grid; place-items: center; align-self: center; width: 44px; height: 44px; border: 0; background: transparent; color: var(--muted); }
.sb__clear:hover { color: var(--ink); }
.sb__go { display: inline-flex; align-items: center; gap: 10px; padding: 0 clamp(18px, 2.4vw, 32px); border: 0; background: var(--field); color: var(--field-ink); font-weight: 700; font-size: var(--step-body); transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.sb__go:hover { background: var(--ink); color: var(--bg); }
.sb__go:active { transform: scale(.97); }
.sb__list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px); max-height: min(62vh, 440px); overflow: auto; background: var(--surface); color: var(--ink); box-shadow: 0 14px 36px rgb(0 0 0 / .45); } /* taste-skill-ignore: menu cadangan yang benar-benar terapung */
.sb__list[hidden] { display: none; }
.sb__head { padding: 10px 14px 4px; font-size: var(--step-small); color: var(--muted); }
.sb__item { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 10px; padding: 10px 14px; cursor: pointer; align-items: baseline; }
.sb__item .ico { color: var(--muted); transform: translateY(3px); }
.sb__t b { font-weight: 400; color: var(--muted); }
.sb__item small { grid-column: 2; font-size: var(--step-small); color: var(--muted); }
.sb__item[aria-selected="true"], .sb__item:hover { background: var(--ink); color: var(--bg); }
.sb__item[aria-selected="true"] .ico, .sb__item[aria-selected="true"] small, .sb__item[aria-selected="true"] .sb__t b, .sb__item:hover small, .sb__item:hover .ico, .sb__item:hover .sb__t b { color: var(--bg); }

/* ------------------------------------------------------------ kawalan */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border: 0; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--step-body); line-height: 1.2; transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--field); color: var(--field-ink); }
.btn--primary:hover { background: var(--ink); color: var(--bg); }
.btn--sm { min-height: 40px; padding: 7px 14px; font-size: var(--step-small); }
.btn .ic { transition: transform var(--t-ui) var(--ease-out); }
.btn:hover .ic { transform: translateX(3px); }
.btn--light { background: var(--paper); color: var(--paper-ink); }
.btn--light:hover { background: var(--paper-ink); color: var(--paper); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 0; background: var(--surface); color: var(--ink); text-decoration: none; font-size: var(--step-small); font-weight: 600; transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.chip:hover, .chip--on, .chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.badge { display: inline-block; padding: 2px 8px; background: var(--surface); color: var(--ink); font-size: var(--step-small); font-weight: 600; line-height: 1.4; vertical-align: middle; }
.badge--ok { background: var(--tint); }
.badge--bad { background: var(--ink); color: var(--bg); }
.badge--warn { background: var(--surface); }
.badge--gray { color: var(--muted); font-weight: 400; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--surface); font-size: var(--step-small); line-height: 1.5; margin: 12px 0; }
.notice .ic { margin-top: 2px; }
.tile { display: inline-grid; place-items: center; color: var(--accent); }
.skeleton { height: 1.1rem; margin: 12px 0; background: var(--surface); animation: sk 1.4s ease-in-out infinite alternate; }
@keyframes sk { to { opacity: .5; } }
.empty { padding: 56px 0; max-width: 56ch; }
.empty h2 { font-family: var(--display); font-weight: 700; letter-spacing: -.035em; font-size: var(--fs-q); margin: 12px 0 8px; }
.empty p { color: var(--muted); }
mark { background: var(--tint); color: var(--ink); padding: 0 .12em; }

/* ------------------------------------------------------------ kaki: jemputan di atas nama yang memenuhi lebar */
.foot { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; min-height: min(92svh, 920px); padding: clamp(40px, 6vw, 88px) var(--margin) 0; background: var(--field); color: var(--field-ink); overflow: hidden; }
.foot :focus-visible { outline-color: var(--field-ink); }
.foot a { text-decoration-color: transparent; transition: text-decoration-color var(--t-hover) ease; }
.foot a:hover, .foot button.foot__btn:hover { text-decoration-color: currentColor; }
.foot__top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px var(--margin); max-width: var(--maxw); width: 100%; margin-inline: auto; }
.foot__inv { grid-column: 1 / span 7; display: grid; justify-items: start; gap: 28px; }
.foot__inv h2 { font-family: var(--display); font-weight: 700; font-size: var(--fs-state); line-height: .92; letter-spacing: -.045em; }
.foot__links { grid-column: 9 / span 4; display: grid; gap: 4px; align-content: start; justify-items: start; font-size: var(--step-body); font-weight: 600; }
.foot__links a, .foot__btn { display: inline-flex; align-items: center; min-height: 44px; }
.foot__btn { background: none; border: 0; padding: 0; text-align: left; font-weight: 600; text-decoration: underline; text-decoration-color: transparent; }
.foot .nws__txt { display: block; }
.foot__small { display: grid; gap: 8px; max-width: var(--maxw); width: 100%; margin-inline: auto; font-size: var(--step-small); }
.foot__small p { max-width: 66ch; }
.foot__name { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(3rem, 15vw, 16rem); line-height: .8; letter-spacing: -.065em; white-space: nowrap; transform: translateY(24%); user-select: none; }
.foot__name span { display: inline-block; }

@media (max-width: 900px) {
  .top__row { flex-wrap: wrap; row-gap: 10px; }
  .top__search { order: 3; flex-basis: 100%; }
  .nws__txt { display: none; }
  .foot__inv { grid-column: 1 / -1; }
  .foot__inv h2 { font-size: clamp(1.75rem, 7vw, 3rem); }
  .foot__links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0 22px; }
}
@media (max-width: 760px) {
  .top__nav > a:not(.lang__b) { display: none; }
  .top__nav { gap: 2px; }
  :root { --sb-h: 52px; }
}
@media print { .top, .foot, .toc, .sec__copy { display: none !important; } body { background: #fff; color: #000; } }
::view-transition-old(root) { animation: vt-leave 180ms var(--ease-exit) both; }
::view-transition-new(root) { animation: vt-arrive 360ms var(--ease-out) 60ms both; }
@keyframes vt-leave { to { opacity: 0; } }
@keyframes vt-arrive { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
