
/* Layout: white page in Jalur Gemilang colours. Flag hero with countdown, ticker, then figures, charts, watch-list, measures. Single light theme by choice. */
:root {
  --bg: #ffffff;
  --soft: #f4f6fb;        /* pale navy wash for panels */
  --ink: #0d1330;
  --muted: #5a6280;
  --line: #e3e7f0;
  --navy: #010066;        /* Jalur Gemilang blue */
  --red: #cc0001;         /* Jalur Gemilang red */
  --yellow: #ffcc00;      /* Jalur Gemilang yellow */
  --navy-2: #3d47b8;
  --sky: #8e98e6;
  --display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--display); margin: 0; }
a { color: var(--navy-2); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; line-height: 1.12; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); font-weight: 800; letter-spacing: -0.02em; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; max-width: 65ch; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.src { font-size: 0.82rem; color: var(--muted); }
.src a { color: inherit; }
.wrap { max-width: 68rem; margin: 0 auto; padding-inline: 16px; }

/* Stripe band: the flag's 14 stripes as a thin running border */
.stripes { height: 6px; background: repeating-linear-gradient(90deg, var(--red) 0 28px, #fff 28px 56px); background-size: 56px 6px; animation: run 3s linear infinite; }
@keyframes run { to { background-position: 56px 0; } }

/* Top bar */
.topbar { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding-block: 0.7rem; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.logo svg { width: 38px; height: 38px; flex: none; }
.logo b { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.logo b span { color: var(--red); }
.logo b em { font-style: normal; color: var(--muted); font-weight: 500; }
.pill { display: inline-flex; align-items: center; gap: 0.45rem; font: 700 0.75rem/1 var(--mono); padding: 0.45rem 0.7rem; border-radius: 999px; background: #fff7d6; color: var(--ink); border: 1px solid #f3e1a0; text-transform: uppercase; letter-spacing: 0.05em; }
.pill i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 0 rgba(255, 204, 0, 0.6); animation: ping 1.8s ease-out infinite; }
.pill.live { background: #ffe9e9; border-color: #f5c2c2; }
.pill.live i { background: var(--red); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(204, 0, 1, 0.45); } 100% { box-shadow: 0 0 0 10px rgba(204, 0, 1, 0); } }

/* Hero */
.hero { padding-block: 2.5rem 2rem; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; }
.kicker { display: inline-flex; gap: 0.5rem; align-items: center; font: 700 0.78rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--red); }
.kicker::before { content: ""; width: 1.6rem; height: 3px; background: var(--red); }
.hero h1 { font-size: clamp(2.3rem, 6.2vw, 4rem); font-weight: 800; letter-spacing: -0.035em; margin-top: 0.8rem; }
.hero h1 .hl { background: linear-gradient(transparent 62%, var(--yellow) 62%); padding-inline: 0.1em; }
.hero .lede { font-size: 1.12rem; color: var(--muted); margin-top: 1rem; }
.countdown { margin-top: 1.6rem; display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: stretch; }
.cd { background: var(--navy); color: #fff; border-radius: 12px; padding: 0.6rem 0.8rem; min-width: 4.6rem; text-align: center; }
.cd b { display: block; font: 700 1.7rem/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.cd span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.75; }
.cd-label { align-self: center; font-size: 0.9rem; color: var(--muted); max-width: 14rem; line-height: 1.4; }
.flag-stage { position: relative; display: grid; place-items: center; }
.flag-stage svg.flag { width: 100%; max-width: 30rem; height: auto; filter: drop-shadow(0 18px 30px rgba(1, 0, 102, 0.18)); }
.orbit { position: absolute; inset: -6% -2%; pointer-events: none; }
.chip { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0.5rem 0.75rem; box-shadow: 0 10px 24px rgba(13, 19, 48, 0.1); font-size: 0.8rem; line-height: 1.3; animation: bob 5s ease-in-out infinite; }
.chip b { display: block; font: 700 1.05rem var(--mono); color: var(--navy); }
.chip.c1 { left: 0; bottom: 4%; }
.chip.c2 { right: 0; top: 0; animation-delay: -2.5s; }
.chip.c2 b { color: var(--red); }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* Ticker */
.ticker { background: var(--navy); color: #fff; overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-flex; gap: 2.5rem; padding-block: 0.7rem; animation: scroll 60s linear infinite; }
.ticker-track span { font-size: 0.92rem; display: inline-flex; gap: 0.6rem; align-items: center; }
.ticker-track span::before { content: "★"; color: var(--yellow); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* Sections */
main { display: grid; gap: 4.5rem; padding-block: 3.5rem 4rem; }
section { display: grid; gap: 1.4rem; }
.head { display: grid; gap: 0.5rem; }
.eyebrow { font: 700 0.75rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--red); }

/* Headline tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.tile { border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.2rem; display: grid; gap: 0.5rem; align-content: start; min-width: 0; position: relative; overflow: hidden; background: #fff; }
.tile::after { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 100%; background: var(--navy); transform-origin: left; animation: grow 1.2s cubic-bezier(.2, .7, .2, 1) both; }
.tile:nth-child(3n+2)::after { background: var(--red); }
.tile:nth-child(3n)::after { background: var(--yellow); }
.tile .k { font-size: 0.88rem; color: var(--muted); font-weight: 500; }
.tile .row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.tile .v26 { font: 700 1.55rem/1.1 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.tile .yr { font: 700 0.7rem var(--mono); color: var(--muted); }
.tile .v27 { font-size: 0.85rem; border-top: 1px dashed var(--line); padding-top: 0.5rem; display: flex; justify-content: space-between; gap: 0.5rem; }
.tile .v27 b { font-family: var(--mono); color: var(--red); }
.tile .v27.prev span { color: var(--muted); font-family: var(--mono); }
.tile .v26 { font-size: 1.9rem; }
.tile .v27.waiting b { color: var(--muted); font-weight: 500; }
@keyframes grow { from { transform: scaleX(0); } }

/* Waffle */
.waffle-wrap { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 2.5rem; align-items: center; background: var(--soft); border-radius: 20px; padding: 1.75rem; }
.waffle { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; aspect-ratio: 1; max-width: 100%; }
.waffle i { border-radius: 4px; background: var(--c); animation: pop 0.5s cubic-bezier(.2, .9, .3, 1.4) both; animation-delay: calc(var(--n) * 12ms); }
@keyframes pop { from { transform: scale(0); opacity: 0; } }
.legend { display: grid; gap: 0.7rem; }
.legend button { all: unset; cursor: pointer; display: grid; grid-template-columns: 1rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; padding: 0.45rem 0.6rem; border-radius: 10px; }
.legend button:hover, .legend button:focus-visible, .legend button.on { background: #fff; box-shadow: 0 4px 14px rgba(13, 19, 48, 0.08); }
.legend button:focus-visible { outline: 3px solid var(--yellow); }
.legend .sw { width: 1rem; height: 1rem; border-radius: 4px; background: var(--c); }
.legend .lbl { font-weight: 600; }
.legend .lbl small { display: block; font-weight: 400; color: var(--muted); font-size: 0.8rem; }
.legend .pc { font: 700 1.05rem var(--mono); }
.waffle.focus i:not(.hit) { opacity: 0.18; }
.waffle i { transition: opacity 0.25s; }

/* Donut + bars */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.panel { border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem; display: grid; gap: 1.1rem; align-content: start; min-width: 0; background: #fff; }
.donut-row { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1.25rem; align-items: center; }
.donut { width: 100%; height: auto; }
.donut circle { fill: none; stroke-width: 16; }
.donut .seg { stroke-linecap: butt; transform: rotate(-90deg); transform-origin: 50% 50%; animation: draw 1.4s cubic-bezier(.3, .8, .3, 1) both; }
@keyframes draw { from { stroke-dasharray: 0 999; } }
.donut text { font-family: var(--mono); fill: var(--ink); }
.bars { display: grid; gap: 0.75rem; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 0.75rem; align-items: baseline; font-size: 0.92rem; }
.bar .track { grid-column: 1 / -1; height: 0.7rem; background: var(--soft); border-radius: 99px; overflow: hidden; }
.bar .fill { height: 100%; border-radius: 99px; background: var(--c, var(--navy)); transform-origin: left; animation: grow 1.3s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 90ms + 0.2s); }
.bar .sub { grid-column: 1 / -1; font-size: 0.8rem; color: var(--muted); }
.bar .v { font: 700 0.95rem var(--mono); }

/* Deficit */
.deficit svg { width: 100%; height: auto; display: block; }
.deficit text { font: 500 12px var(--mono); fill: var(--muted); }
.deficit .lbl { fill: var(--ink); font-weight: 700; }
.deficit .line { fill: none; stroke: var(--red); stroke-width: 3; stroke-dasharray: 600; animation: dash 2s ease-out both 0.3s; }
@keyframes dash { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }
.facts { display: grid; gap: 0.2rem; }
.fact { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 1rem; padding-block: 0.65rem; border-bottom: 1px solid var(--line); }
.fact:last-child { border-bottom: 0; }
.fact b { font: 700 0.98rem var(--mono); color: var(--navy); text-align: right; }
.fact small { grid-column: 1 / -1; color: var(--muted); font-size: 0.8rem; }

/* Watch list */
.watch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.watch-item { border-radius: 16px; padding: 1.2rem; display: grid; gap: 0.5rem; align-content: start; background: var(--soft); transition: transform 0.2s, box-shadow 0.2s; }
.watch-item:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(1, 0, 102, 0.1); }
.watch-item .ic { width: 2.4rem; height: 2.4rem; border-radius: 10px; display: grid; place-items: center; background: #fff; }
.watch-item .ic svg { width: 1.4rem; height: 1.4rem; }
.tag.done { background: var(--navy); color: #fff; }
.outcome { background: #fff; border-left: 4px solid var(--red); padding: 0.55rem 0.75rem; border-radius: 6px; font-size: 0.93rem; }
.outcome b { color: var(--red); }
.tag { justify-self: start; font: 700 0.68rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.07em; padding: 0.32rem 0.5rem; border-radius: 6px; background: var(--yellow); color: var(--navy); }
.priorities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 1.5rem; padding: 0; margin: 0; list-style: none; counter-reset: p; }
.priorities li { display: grid; grid-template-columns: 2rem 1fr; gap: 0.5rem; font-size: 0.95rem; counter-increment: p; align-items: start; }
.priorities li::before { content: counter(p); font: 700 0.8rem/1 var(--mono); color: #fff; background: var(--navy); border-radius: 50%; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; }

/* Featured expert analysis */
.ft { position: relative; border-radius: 26px; background: #fffaf0; border: 1px solid #efe3c4; padding: clamp(1.4rem, 5vw, 3.5rem); display: grid; gap: 1.6rem; overflow: hidden; box-shadow: 0 30px 60px rgba(1, 0, 102, 0.12); }
.ft::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px; background: repeating-linear-gradient(90deg, var(--red) 0 44px, #fff 44px 88px, var(--navy) 88px 132px, var(--yellow) 132px 176px); }
.ft-top { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.ft-label { font: 700 0.78rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; background: var(--red); color: #fff; padding: 0.5rem 0.75rem; border-radius: 6px; }
.ft-h { margin: 0; font-size: clamp(1.9rem, 5vw, 3.4rem); line-height: 1.05; letter-spacing: -0.03em; color: var(--navy); max-width: 22ch; text-wrap: balance; }
.ft-by { display: flex; align-items: center; gap: 1rem; }
.ft-by img { width: 5.5rem; height: 5.5rem; border-radius: 50%; object-fit: cover; object-position: center 15%; border: 4px solid #fff; box-shadow: 0 0 0 3px var(--yellow); flex: none; }
.ft-by b { display: block; font-size: 1.2rem; }
.ft-by span { display: block; font-size: 0.92rem; color: var(--muted); }
.ft-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.ft-text { display: grid; gap: 1rem; font-size: 1.05rem; line-height: 1.75; color: var(--ink); }
.ft-text p { margin: 0; }
.ft-text p:first-child::first-letter { float: left; font: 800 3.6rem/0.85 var(--display); color: var(--red); margin: 0.35rem 0.5rem 0 0; }
.ft-side { display: grid; gap: 1.2rem; position: sticky; top: 8rem; }
.ft-pull { margin: 0; background: var(--navy); color: #fff; border-radius: 20px; padding: 1.5rem; font-size: 1.25rem; line-height: 1.35; font-weight: 700; position: relative; }
.ft-pull::before { content: "\201C"; display: block; font: 800 3.5rem/0.6 var(--display); color: var(--yellow); margin-bottom: 0.4rem; }
.ft-assess { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1.2rem 1.3rem; display: grid; gap: 0.7rem; }
.ft-assess h4 { margin: 0; font: 700 0.75rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--red); }
.ft-assess ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; counter-reset: a; }
.ft-assess li { counter-increment: a; display: grid; grid-template-columns: 1.8rem 1fr; gap: 0.6rem; align-items: center; font-weight: 600; font-size: 0.95rem; }
.ft-assess li::before { content: counter(a); width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--yellow); color: var(--navy); display: grid; place-items: center; font: 700 0.8rem var(--mono); }
.ex-sub { display: grid; gap: 0.4rem; margin-top: 1rem; } .ex-sub h3 { margin: 0; font-size: 1.35rem; } .ex-sub p { margin: 0; }
@media (max-width: 760px) { .ft-grid { grid-template-columns: minmax(0, 1fr); } .ft-side { position: static; } }
/* Sarawak */
.sw-hl .tile .row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.sw-hl .tile .v26 { font-size: 1.7rem; }
.sw-hl .tile .was { font: 700 0.8rem var(--mono); color: var(--muted); }
.sw-personas { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.8rem; }
.sw-persona { border-radius: 18px; padding: 1.1rem 1.2rem; background: #fffaf0; border: 1px solid #f2dc8a; border-top: 6px solid #111; display: grid; gap: 0.6rem; align-content: start; }
.sw-persona:nth-child(3n+2) { border-top-color: #cc0001; } .sw-persona:nth-child(3n) { border-top-color: #ffcc00; }
.sw-persona b { font-size: 1.02rem; }
.sw-persona ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.35rem; font-size: 0.9rem; }
.sw-legend { display: flex; gap: 1rem; font-size: 0.82rem; color: var(--muted); margin-top: -0.4rem; }
.sw-legend i { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 3px; margin-right: 0.35rem; vertical-align: -1px; }
.bar .track.two { display: grid; gap: 3px; height: auto; background: none; }
.bar .track.two .fill { height: 0.65rem; position: relative; }
.bar .track.two .fill.prev { background: #c5cad8; }
.sw-ins { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.6rem; }
.sw-ins li { background: #fffaf0; border-left: 5px solid #ffcc00; border-radius: 10px; padding: 0.7rem 0.9rem; font-size: 0.92rem; }
.sw-ansx { font-size: 0.95rem; line-height: 1.5; color: var(--ink); } .sw-ans-l { font: 700 0.7rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.07em; color: #146c2e; border-top: 1px dashed var(--line); padding-top: 0.55rem; }
.sw-recap { border: 1px solid var(--line); border-radius: 18px; padding: 1rem 1.2rem; display: grid; gap: 1.2rem; background: #fff; }
.sw-recap[open] { gap: 1.4rem; }
.sw-recap summary { cursor: pointer; list-style: none; display: grid; gap: 0.2rem; }
.sw-recap summary::-webkit-details-marker { display: none; }
.sw-recap summary span { font-weight: 800; font-size: 1.2rem; } .sw-recap summary span::after { content: "  +"; color: var(--red); font-family: var(--mono); }
.sw-recap[open] summary span::after { content: "  −"; }
.sw-recap summary small { color: var(--muted); font-size: 0.88rem; }
.sw-recap > * + * { margin-top: 1.2rem; }

.tb-right { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.sw-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.8rem 0.3rem 0.35rem; border-radius: 999px; background: #111; color: #fff; text-decoration: none; font: 700 0.8rem/1 var(--display); border: 2px solid #111; box-shadow: 0 0 0 0 rgba(255, 204, 0, 0.55); animation: swglow 2.6s ease-out infinite; transition: transform 0.2s; }
.sw-btn:hover { transform: translateY(-1px); }
.sw-btn b { color: #ffcc00; }
.sw-btn .swflag { width: 1.8rem; height: 1.2rem; border-radius: 999px; box-shadow: none; }
.sw-btn.on { border-color: #ffcc00; animation: none; }
.sw-btn i.sw-b { font-style: normal; }
@media (max-width: 600px) { .tb-right { flex-wrap: nowrap; } .sw-btn i.sw-b { display: none; } .tb-right .pill { font-size: 0.68rem; padding: 0.4rem 0.55rem; } }
@keyframes swglow { 0% { box-shadow: 0 0 0 0 rgba(255, 204, 0, 0.55); } 70% { box-shadow: 0 0 0 9px rgba(255, 204, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 204, 0, 0); } }

.sw-pointer { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-radius: 18px; background: linear-gradient(90deg, #fff7d6, #fff); border: 1px solid #f2dc8a; border-left: 6px solid #111; color: var(--ink); text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; margin-bottom: -2rem; }
.sw-pointer:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0, 0, 0, 0.08); }
.sw-pointer > span { display: grid; gap: 0.15rem; flex: 1; min-width: 0; }
.sw-pointer b { font-size: 1.05rem; } .sw-pointer > span > span { font-size: 0.9rem; color: var(--muted); }
.sw-pointer i { font-style: normal; font: 700 1.3rem var(--mono); color: var(--red); }
.swflag { width: 3rem; height: 2rem; flex: none; border-radius: 5px; box-shadow: 0 0 0 1px rgba(0,0,0,0.08); }
.sw-hero { display: flex; gap: 1.2rem; align-items: flex-start; }
.sw-hero .swflag { width: 4.5rem; height: 3rem; margin-top: 0.3rem; }
.sw-date { display: flex; gap: 1rem; align-items: center; background: #111; color: #fff; border-radius: 16px; padding: 1rem 1.2rem; border-left: 8px solid #ffcc00; }
.sw-date b { font: 700 0.75rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: #ffcc00; white-space: nowrap; }
.sw-date span { font-size: 0.95rem; line-height: 1.5; } .sw-date a { color: #ffcc00; }
.sw-h { font-size: 1.35rem; margin: 1.2rem 0 -0.6rem; }
.sw-p { margin: 0; }
.tiles.sw-tiles { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.sw-tiles .tile::before { background: #ffcc00 !important; }
.sw-tiles .tile .sub { font-size: 0.82rem; color: var(--muted); }
.sw-st { justify-self: start; font: 700 0.68rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.07em; padding: 0.32rem 0.5rem; border-radius: 6px; }
.sw-st.done { background: #dff5e3; color: #146c2e; } .sw-st.progress { background: #fff3c4; color: #7a5b00; } .sw-st.pending { background: #ffe9e9; color: #a30000; } .sw-st.open { background: var(--soft); color: var(--muted); }
.measure .sw-out.progress, .measure .sw-out.pending, .measure .sw-out.open { background: var(--soft); }
.measure .sw-out { grid-column: 1 / -1; font-size: 0.88rem; background: #f3fbf4; border-radius: 10px; padding: 0.55rem 0.75rem; margin: 0.2rem 0; }
.sw-q { font-weight: 700; font-size: 1.02rem; }
.sw-ans { font: 700 0.7rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.07em; color: var(--red); border-top: 1px dashed var(--line); padding-top: 0.55rem; }
/* Johor subsite */
.jh-btn { background: #0b1f6e; border-color: #0b1f6e; }
.jh-btn b { color: #ffcc00; } .jh-btn .swflag, .jh-pointer .swflag { border-radius: 6px; } .jh-btn.on { border-color: #ffcc00; }
.jh-pointer { border-left-color: #0b1f6e; background: linear-gradient(90deg, #e9edfb, #fff); border-color: #c8d0f0; }
#johor .sw-date { border-left-color: #cc0001; background: #0b1f6e; }
#johor .sw-tiles .tile::before { background: #0b1f6e !important; }
#johor .sw-persona { background: #f3f5fc; border-color: #c8d0f0; border-top-color: #0b1f6e; }
#johor .sw-persona:nth-child(3n+2) { border-top-color: #cc0001; } #johor .sw-persona:nth-child(3n) { border-top-color: #ffcc00; }
#johor .sw-ins li { background: #f3f5fc; border-left-color: #0b1f6e; }
#johor .sg-pillars li::before { color: #0b1f6e; }
@media (max-width: 600px) { .tb-right .sw-btn b { display: none; } .tb-right .sw-btn { padding-right: 0.65rem; } }
/* Selangor subsite */
.sg-btn { background: #cc0001; border-color: #cc0001; }
.sg-btn b { color: #ffcc00; }
.sg-btn.on { border-color: #ffcc00; }
.sg-pointer { border-left-color: #cc0001; background: linear-gradient(90deg, #fff1e6, #fff); border-color: #f6cfb5; }
#selangor .sw-date { border-left-color: #cc0001; background: #2a0606; }
#selangor .sw-tiles .tile::before { background: #cc0001 !important; }
#selangor .sw-persona { background: #fff6f0; border-color: #f6cfb5; border-top-color: #cc0001; }
#selangor .sw-persona:nth-child(3n+2) { border-top-color: #ffcc00; } #selangor .sw-persona:nth-child(3n) { border-top-color: #111; }
#selangor .sw-ins li { background: #fff6f0; border-left-color: #cc0001; }
.sg-pillars { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.7rem; counter-reset: p; }
.sg-pillars li { counter-increment: p; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 0.9rem 1rem; display: grid; gap: 0.3rem; align-content: start; }
.sg-pillars li::before { content: counter(p); font: 800 1.4rem/1 var(--mono); color: #cc0001; }
.sg-pillars b { font-size: 0.98rem; } .sg-pillars span { font-size: 0.85rem; color: var(--muted); font-style: italic; }
.sg-limits { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.5rem; font-size: 0.92rem; }
@media (max-width: 600px) { .sw-hero .swflag { display: none; } .sw-date { flex-direction: column; align-items: flex-start; gap: 0.4rem; } .sw-pointer { margin-bottom: -1rem; } }
/* Measures */
.glance { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 0.8rem; }
.gl { text-align: left; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem 1.15rem 1rem; display: grid; gap: 0.55rem; align-content: start; cursor: pointer; position: relative; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.gl::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--c, var(--navy)); }
.gl:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(1, 0, 102, 0.1); border-color: var(--navy); }
.gl-top { display: flex; align-items: center; gap: 0.6rem; }
.gl-top svg { width: 2.1rem; height: 2.1rem; flex: none; padding: 0.4rem; border-radius: 10px; background: var(--soft); color: var(--navy); box-sizing: border-box; }
.gl-name { display: grid; gap: 0.15rem; } .gl-top b { font-size: 1rem; line-height: 1.2; }
.gl-top .n { font: 700 0.72rem/1 var(--mono); color: var(--muted); white-space: nowrap; }
.gl-big.sm { font-size: 1.2rem; } .gl-big { font: 800 1.65rem/1.05 var(--mono); color: var(--c, var(--navy)); letter-spacing: -0.02em; }
.gl-lbl { font-size: 0.86rem; font-weight: 600; margin-top: -0.3rem; }
.gl ul { margin: 0.1rem 0 0; padding: 0.55rem 0 0; list-style: none; border-top: 1px dashed var(--line); display: grid; gap: 0.3rem; font-size: 0.82rem; color: var(--muted); }
.gl li { display: flex; justify-content: space-between; gap: 0.6rem; }
.gl li b { font: 700 0.78rem var(--mono); color: var(--ink); white-space: nowrap; text-align: right; }
.gl[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.gl[aria-pressed="true"] .gl-big { color: var(--yellow); }
.gl[aria-pressed="true"] ul, .gl[aria-pressed="true"] .n { color: #c9cdf0; } .gl[aria-pressed="true"] li b { color: #fff; } .gl[aria-pressed="true"] ul { border-color: rgba(255,255,255,0.25); }
.list-head { margin: 0.6rem 0 -0.4rem; font-size: 1.15rem; }
@media (max-width: 600px) {
  .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
  .gl { padding: 0.85rem 0.8rem 0.8rem; gap: 0.4rem; border-radius: 14px; }
  .gl ul { display: none; }
  .gl-top { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .gl-top b { font-size: 0.88rem; }
  .gl-big { font-size: 1.2rem; } .gl-big.sm { font-size: 0.95rem; }
  .gl-lbl { font-size: 0.76rem; margin-top: -0.15rem; }
}

.filters { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.filters button { font: 600 0.85rem/1 var(--display); padding: 0.55rem 0.85rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.filters button .num { margin-left: 0.35rem; opacity: 0.6; }
.filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.measures { display: grid; gap: 0.7rem; }
.measure { border: 1px solid var(--line); border-radius: 14px; padding: 0.95rem 1.1rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 1rem; }
.measure .amt { font: 700 1rem var(--mono); color: var(--red); text-align: right; }
.show-all { justify-self: center; font: 700 0.95rem var(--display); padding: 0.75rem 1.3rem; border-radius: 999px; border: 2px solid var(--navy); background: #fff; color: var(--navy); cursor: pointer; }
.show-all:hover { background: var(--navy); color: #fff; }
.bar .track .fill.ghost { position: absolute; left: 0; top: 0; background: var(--sky); opacity: 0.45; }
.bar .track .fill:not(.ghost) { position: relative; }
.measure .rep { color: var(--red); font-weight: 600; }
.measure .meta { grid-column: 1 / -1; font-size: 0.82rem; color: var(--muted); }
.empty { border: 2px dashed var(--line); border-radius: 16px; padding: 1.6rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.2rem; align-items: center; }
.empty svg { width: 3.4rem; height: 3.4rem; }

.sources { display: grid; gap: 0.45rem; padding-left: 1.1rem; margin: 0; font-size: 0.93rem; }
footer { background: var(--navy); color: #c9cdf0; }
footer .wrap { padding-block: 2rem; display: grid; gap: 0.9rem; font-size: 0.9rem; }
footer .logo { color: #fff; }
footer .logo b em { color: #c9cdf0; }
footer .credit { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 0.9rem; color: #fff; }
footer .credit a { color: var(--yellow); }



/* Expert views */
.ex-list { display: grid; gap: 1.75rem; }
.xp { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; padding: clamp(1.5rem, 4.5vw, 3.5rem); border-radius: 24px; background: var(--navy); color: #fff; box-shadow: 0 24px 50px rgba(1, 0, 102, 0.18); position: relative; overflow: hidden; }
.xp::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: repeating-linear-gradient(90deg, var(--red) 0 22px, #fff 22px 44px); }
.xp-photo { margin: 0; }
.xp-photo img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 20%; border-radius: 18px; border-bottom: 8px solid var(--yellow); background: #e3e7f5; }
.xp-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.xp-tag { font: 700 0.72rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; padding: 0.4rem 0.6rem; border-radius: 6px; background: var(--yellow); color: var(--navy); }
.xp-tag.op { background: rgba(255, 255, 255, 0.12); color: #fff; border: 1px solid rgba(255, 255, 255, 0.3); }
.xp-pull { font-size: clamp(1.6rem, 3.4vw, 2.6rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin: 0; text-wrap: balance; position: relative; padding-left: 1.4rem; border-left: 6px solid var(--yellow); }
.xp-head { font-size: 1.15rem; font-weight: 700; color: var(--yellow); }
.xp-text { display: grid; gap: 0.8rem; color: #dfe3fb; font-size: 1rem; line-height: 1.7; max-width: 68ch; }
.xp-who { display: grid; gap: 0.15rem; border-top: 1px solid rgba(255, 255, 255, 0.2); padding-top: 1rem; }
.xp-who b { font-size: 1.15rem; }
.xp-who span { font-size: 0.9rem; color: #c9cdf0; }
@media (max-width: 52rem) {
  .xp { grid-template-columns: minmax(0, 1fr); }
  .xp-photo { width: min(11rem, 50%); }
}

/* Budget 2027 and you: profile simulator */
[hidden] { display: none !important; }
.cta { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1.2rem; background: var(--red); color: #fff; text-decoration: none; font-weight: 700; padding: 0.8rem 1.2rem; border-radius: 999px; box-shadow: 0 8px 20px rgba(204, 0, 1, 0.25); transition: transform 0.2s; }
.cta:hover { transform: translateY(-2px); }
.sim-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sim-tabs button { font: 700 0.92rem/1 var(--display); padding: 0.7rem 1rem; border-radius: 999px; border: 2px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.sim-tabs button:hover { border-color: var(--navy); }
.sim-tabs button[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.sim { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 1.5rem; align-items: stretch; }
.sim-stage { position: relative; border-radius: 20px; background: radial-gradient(circle at 50% 35%, #ffffff 0%, #eef1fa 60%, #e3e7f5 100%); min-height: 24rem; overflow: hidden; border: 1px solid var(--line); }
.sim-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.sim-stage canvas:active { cursor: grabbing; }
.sim-badge { position: absolute; left: 1rem; top: 1rem; background: var(--yellow); color: var(--navy); font: 700 0.75rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; padding: 0.45rem 0.65rem; border-radius: 6px; }
.sim-hint { position: absolute; right: 1rem; bottom: 0.8rem; margin: 0; font-size: 0.78rem; color: var(--muted); }
.sim-body { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.sim-who h3 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.sim-gain { display: grid; gap: 0.15rem; background: var(--navy); color: #fff; border-radius: 16px; padding: 1rem 1.2rem; }
.sim-gain:empty { display: none; }
.sim-gain b { font: 700 2rem/1.1 var(--mono); color: var(--yellow); }
.sim-gain span { font-size: 0.9rem; opacity: 0.85; }
.sim-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.sim-list li { border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 12px; padding: 0.75rem 0.95rem; display: grid; gap: 0.25rem; background: #fff; animation: slidein 0.45s cubic-bezier(.2,.7,.2,1) both; }
.sim-list li:nth-child(even) { border-left-color: var(--navy); }
.sim-list li:nth-child(2) { animation-delay: 0.06s; } .sim-list li:nth-child(3) { animation-delay: 0.12s; } .sim-list li:nth-child(4) { animation-delay: 0.18s; } .sim-list li:nth-child(5) { animation-delay: 0.24s; }
@keyframes slidein { from { opacity: 0; transform: translateX(14px); } }
.si-top { display: flex; justify-content: space-between; gap: 0.75rem; align-items: baseline; flex-wrap: wrap; }
.si-amt { font: 700 0.92rem var(--mono); color: var(--red); }
.sim-list p { font-size: 0.88rem; color: var(--muted); }
.calc { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 1.5rem; background: var(--soft); border-radius: 20px; padding: 1.5rem; }
.calc-in { display: grid; gap: 0.7rem; align-content: start; min-width: 0; }
.calc-in label { font-weight: 600; font-size: 0.92rem; }
.salary-row { display: grid; grid-template-columns: minmax(0, 1fr) 7.5rem; gap: 0.75rem; align-items: center; }
.salary-row input[type="range"] { width: 100%; accent-color: var(--red); }
.calc input[type="number"], .calc select { font: 700 1rem var(--mono); padding: 0.5rem 0.6rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
.calc select { width: auto; margin-left: 0.5rem; }
.calc-opts { display: grid; gap: 0.55rem; }
.chk { display: flex; gap: 0.5rem; align-items: center; font-weight: 500 !important; }
.chk input { accent-color: var(--navy); width: 1.1rem; height: 1.1rem; }
.calc-out { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.net-hero { background: #fff; border-radius: 16px; padding: 1.1rem 1.3rem; display: grid; gap: 0.2rem; border: 1px solid var(--line); }
.net-hero b { font: 700 2.4rem/1.1 var(--mono); color: var(--red); }
.net-hero span { font-size: 0.88rem; }
.tbl-wrap { overflow-x: auto; background: #fff; border-radius: 14px; border: 1px solid var(--line); }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tbl th, .tbl td { padding: 0.55rem 0.85rem; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th:first-child { text-align: left; font-weight: 500; }
.tbl thead th { font: 700 0.75rem var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.tbl td { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tbl tr.sub th, .tbl tr.sub td { color: var(--muted); font-size: 0.84rem; }
.tbl tr.tot th, .tbl tr.tot td { font-weight: 700; color: var(--navy); background: #fff7d6; }
.tbl tr:last-child th, .tbl tr:last-child td { border-bottom: 0; }
.taxbar { display: grid; gap: 0.5rem; }
.taxbar > div { display: grid; grid-template-columns: 3rem minmax(0, 1fr) 6.5rem; gap: 0.6rem; align-items: center; font: 700 0.85rem var(--mono); }
.taxbar .tb { height: 0.8rem; background: #fff; border-radius: 99px; overflow: hidden; }
.taxbar .tb i { display: block; height: 100%; border-radius: 99px; background: var(--sky); transition: width 0.5s cubic-bezier(.2,.7,.2,1); }
.taxbar > div:nth-child(2) .tb i { background: var(--navy); }
.taxbar b { text-align: right; }
@media (max-width: 52rem) {
  .sim, .calc { grid-template-columns: minmax(0, 1fr); }
  .sim-stage { min-height: 20rem; }
  .calc { padding: 1.1rem; }
  .tbl { font-size: 0.82rem; }
  .tbl th, .tbl td { padding: 0.5rem 0.45rem; }
}

@media (max-width: 52rem) {
  .hero .wrap, .waffle-wrap, .split { grid-template-columns: minmax(0, 1fr); }
  .watch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flag-stage { order: -1; }
}
@media (max-width: 36rem) {
  .tiles, .watch, .priorities { grid-template-columns: minmax(0, 1fr); }
  .donut-row { grid-template-columns: 7.5rem minmax(0, 1fr); }
  .chip { font-size: 0.72rem; }
  .waffle-wrap { padding: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.tabs { display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; font: 700 0.92rem/1 var(--display); color: var(--muted); text-decoration: none; padding: 0.85rem 0.9rem 0.75rem; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--navy); }
.tabs a[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--red); }
.topbar .tabrow { padding-block: 0; display: block; border-top: 1px solid var(--line); }
.tab-off { display: none !important; }

/* "Try it yourself" dropdown: links to the standalone interactives (mylife.html, rm100.html, yourtax.html) */
.topbar .tabrow { display: flex; align-items: stretch; gap: 0.5rem; flex-wrap: nowrap; }
.tabrow .tabs { flex: 1 1 0; min-width: 0; margin-right: 0; }
.play { position: relative; flex: none; display: flex; align-items: center; }
.play-btn { display: inline-flex; align-items: center; gap: 0.4rem; font: 700 0.88rem/1 var(--display); color: var(--navy); background: #fff7d6; border: 1px solid #f3e1a0; border-radius: 999px; padding: 0.5rem 0.75rem 0.5rem 0.65rem; cursor: pointer; white-space: nowrap; }
.play-btn:hover, .play-btn[aria-expanded="true"], .play-btn.on { background: var(--yellow); border-color: var(--yellow); }
.play-btn .pb-ico { width: 1rem; height: 1rem; flex: none; }
.play-btn .pb-chev { width: 0.7rem; height: 0.7rem; flex: none; transition: transform 0.2s; }
.play-btn[aria-expanded="true"] .pb-chev { transform: rotate(180deg); }
.play-menu { position: absolute; right: 0; top: calc(100% + 6px); width: min(22rem, calc(100vw - 32px)); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 40px rgba(13, 19, 48, 0.16); padding: 0.45rem; z-index: 20; }
.play-menu[hidden] { display: none; }
.play-menu .pm-head { font: 700 0.68rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 0.55rem 0.6rem 0.45rem; }
.play-menu a { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 0.15rem 0.75rem; align-items: center; padding: 0.6rem; border-radius: 12px; text-decoration: none; color: var(--ink); }
.play-menu a:hover, .play-menu a:focus-visible { background: var(--soft); outline-offset: -2px; }
.play-menu .pm-ico { grid-row: span 2; width: 2.4rem; height: 2.4rem; border-radius: 10px; display: grid; place-items: center; font: 800 0.72rem/1 var(--display); letter-spacing: -0.02em; }
.play-menu b { font-weight: 800; font-size: 0.95rem; }
.play-menu span.pm-d { font-size: 0.82rem; color: var(--muted); line-height: 1.35; }
.play-menu .pm-foot { font-size: 0.74rem; color: var(--muted); padding: 0.5rem 0.6rem 0.35rem; border-top: 1px solid var(--line); margin-top: 0.3rem; }
.play-btn .pb-s { display: none; }
.play-menu a[aria-current="page"] { background: var(--soft); }
/* Embedded interactives: each runs in its own frame, filling the screen under the top bar */
.tool { background: var(--soft); }
.tool iframe { display: block; width: 100%; height: calc(100vh - var(--tb, 110px)); height: calc(100dvh - var(--tb, 110px)); border: 0; background: #fff; }
.tool .tool-load { display: grid; place-items: center; height: 40vh; color: var(--muted); font: 600 0.9rem var(--display); }
body.tool-on main { display: none; }
@media (max-width: 600px) { .play-btn .pb-t { display: none; } .play-btn .pb-s { display: inline; } }

/* Analysis: fiscal sustainability lab */
.an-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.an-tile { border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.1rem; display: grid; gap: 0.4rem; align-content: start; min-width: 0; background: #fff; }
.an-tile .k { font-size: 0.86rem; color: var(--muted); font-weight: 500; }
.an-tile .v { font: 700 1.7rem/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.an-tile .d { font: 500 0.78rem var(--mono); color: var(--muted); }
.an-meter { height: 8px; border-radius: 4px; background: var(--soft); position: relative; margin-top: 0.3rem; }
.an-meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--navy-2); }
.an-meter b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.an-tile .lim { font-size: 0.8rem; color: var(--muted); line-height: 1.4; }
.an-tile .st { font: 700 0.7rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }
.an-tile .st.ok { color: #146c2e; } .an-tile .st.no { color: var(--red); }
.an-ch-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.an-ch-head p { font-size: 0.9rem; margin-top: 0.3rem; }
.an-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--soft); }
.an-seg button, .an-presets button { font: 600 0.8rem var(--display); border: 0; background: none; color: var(--muted); padding: 0.4rem 0.8rem; border-radius: 999px; cursor: pointer; }
.an-seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(13,19,48,.12); }
.an-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.82rem; color: var(--muted); }
.an-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.an-legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.an-legend i.gap { height: 10px; background: rgba(204,0,1,.14); }
.an-legend i.fan { height: 10px; background: rgba(204,0,1,.16); }
.an-plot svg { width: 100%; height: auto; display: block; overflow: visible; }
.an-plot text { font: 500 11px var(--mono); fill: var(--muted); }
.an-plot .grid { stroke: var(--line); stroke-width: 1; }
.an-plot .lbl { fill: var(--ink); font-weight: 700; }
.an-plot .ev { font: 500 10px var(--display); fill: var(--muted); }
.an-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.an-foot details { flex: 1 1 20rem; font-size: 0.88rem; }
.an-foot summary { cursor: pointer; font-weight: 600; color: var(--navy-2); }
.an-foot details > div { display: grid; gap: 0.5rem; padding-top: 0.6rem; color: var(--muted); }
.an-foot code { font: 500 0.82rem var(--mono); background: var(--soft); padding: 0.1rem 0.35rem; border-radius: 5px; color: var(--ink); }
.an-dl { font: 600 0.8rem var(--display); border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 0.45rem 0.9rem; cursor: pointer; white-space: nowrap; }
.an-dl::before { content: "↓ "; color: var(--red); }
.an-all { align-items: center; }
.an-presets { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.an-presets button { border: 1px solid var(--line); background: #fff; }
.an-presets button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.an-sim-grid { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.an-sliders { display: grid; gap: 1rem; }
.an-sl label { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.86rem; font-weight: 600; }
.an-sl label b { font: 700 0.86rem var(--mono); color: var(--red); }
.an-sl input { width: 100%; accent-color: var(--navy-2); }
.an-sl small { display: block; font-size: 0.76rem; color: var(--muted); line-height: 1.35; }
.an-result { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: baseline; margin-bottom: 0.6rem; }
.an-result .big { font: 700 2rem/1 var(--mono); }
.an-result span { font-size: 0.88rem; color: var(--muted); max-width: 34ch; }
.an-sources summary { cursor: pointer; } .an-sources summary h3 { display: inline; }
.an-sources ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.35rem; font-size: 0.85rem; color: var(--muted); }
.an-tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: #fff; border-radius: 10px; padding: 0.5rem 0.7rem; font: 500 0.78rem/1.45 var(--mono); box-shadow: 0 6px 18px rgba(0,0,0,.2); max-width: 16rem; }
.an-tip b { font-family: var(--display); display: block; margin-bottom: 0.15rem; }
.an-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.35rem; }
@media (max-width: 52rem) { .an-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .an-sim-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .an-tile .v { font-size: 1.35rem; } .an-seg button { padding: 0.35rem 0.55rem; font-size: 0.74rem; } }
/* Lab: Sarawak's finances */
.lab-nav { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.lab-nav span { font: 700 0.72rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-right: 0.3rem; }
.lab-nav a { font: 600 0.85rem var(--display); text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 0.45rem 0.9rem; background: #fff; }
.lab-nav a:hover { border-color: var(--navy-2); }
.lab-nav a .swflag { width: 18px; height: 12px; vertical-align: -1px; margin-right: 0.35rem; border-radius: 2px; }
.sl-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.sl-bars { display: grid; gap: 0.55rem; }
.sl-bar { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 3.6rem; gap: 0.6rem; align-items: center; font-size: 0.85rem; }
.sl-bar .yl { font: 600 0.82rem var(--mono); line-height: 1.2; }
.sl-bar .yl small { display: block; font: 500 0.68rem var(--display); color: var(--muted); }
.sl-bar .tr { height: 14px; background: var(--soft); border-radius: 4px; position: relative; }
.sl-bar .tr i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: #cc0001; }
.sl-bar .tr i.est { background: repeating-linear-gradient(135deg, #cc0001 0 5px, #e86b6c 5px 8px); }
.sl-bar b { font: 700 0.85rem var(--mono); text-align: right; }
.sl-bar.big { grid-template-columns: 6.5rem minmax(0, 1fr) 5rem; }
.sl-bar.big .tr i { background: #3d47b8; }
.sl-bar.big.me .tr i { background: #cc0001; }
.sl-stack { display: flex; height: 44px; border-radius: 6px; overflow: hidden; gap: 2px; }
.sl-stack div { min-width: 2px; }
.sl-mixlegend { display: grid; gap: 0.4rem; font-size: 0.84rem; }
.sl-mixlegend div { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; }
.sl-mixlegend i { width: 12px; height: 12px; border-radius: 3px; }
.sl-mixlegend b { font: 700 0.82rem var(--mono); white-space: nowrap; }
@media (max-width: 52rem) { .sl-split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .sl-bar, .sl-bar.big { grid-template-columns: 5.2rem minmax(0, 1fr) 3.6rem; } .sl-bar.big { grid-template-columns: 5.2rem minmax(0, 1fr) 4.4rem; } }
/* Lab: oil dependency */
.oil-sub { margin-top: 0.4rem; } .oil-subp { font-size: 0.9rem; margin-top: -0.6rem; }
.oil-chk { display: flex; gap: 0.5rem; align-items: center; font-size: 0.86rem; font-weight: 600; cursor: pointer; }
.oil-chk input { accent-color: var(--navy-2); width: 1rem; height: 1rem; }
.oil-out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; margin-bottom: 1rem; }
.oil-out div { background: var(--soft); border-radius: 12px; padding: 0.7rem 0.8rem; display: grid; gap: 0.2rem; }
.oil-out small { font-size: 0.78rem; color: var(--muted); }
.oil-out b { font: 700 1.25rem/1.1 var(--mono); }
.oil-out .net { background: #fff; border: 2px solid var(--ink); }
.oil-def { display: grid; gap: 0.5rem; font-size: 0.86rem; }
.oil-def .row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) 3.4rem; gap: 0.6rem; align-items: center; }
.oil-def .tr { height: 16px; background: var(--soft); border-radius: 4px; position: relative; }
.oil-def .tr i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: #3d47b8; transition: width 0.25s; }
.oil-def .tr i.you { background: #cc0001; }
.oil-def .tr em { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--ink); }
.oil-def b { font: 700 0.9rem var(--mono); text-align: right; }
.oil-def p { font-size: 0.86rem; color: var(--muted); }
@media (max-width: 420px) { .oil-out { grid-template-columns: minmax(0, 1fr); } }
/* ---------- Malaysia states map ---------- */
.st-btn { background: var(--navy); border-color: var(--navy); }
.st-btn b { color: #ffcc00; } .st-btn.on { border-color: #ffcc00; animation: none; }
.st-flags { display: inline-flex; } .st-flags .swflag { width: 1.35rem; height: 0.9rem; border-radius: 3px; box-shadow: 0 0 0 1.5px var(--navy); }
.st-flags .swflag + .swflag { margin-left: -0.45rem; }
.mym-wrap { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(17rem, 1fr); gap: 1rem; align-items: start; }
.mym-map { position: relative; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, #f3f6ff, #fff); padding: 0.6rem; }
#mym-svg { display: block; width: 100%; height: auto; }
.mym-st { stroke: #fff; stroke-width: 1.1; stroke-linejoin: round; cursor: pointer; transition: fill .15s; outline: none; }
.mym-st.s2027 { fill: #3d47b8; } .mym-st.s2026 { fill: #9aa3e3; } .mym-st.snone { fill: #d5d9e6; } .mym-st.sft { fill: #d5d9e6; }
.mym-st:hover, .mym-st:focus-visible { fill: #cc0001; }
.mym-st.sel { fill: #ffcc00; stroke: #111; stroke-width: 1.6; }
.mym-flag { pointer-events: none; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.35)); }
.mym-call circle { fill: #3d47b8; stroke: #fff; stroke-width: 1.4; } .mym-call.sel circle { fill: #ffcc00; stroke: #111; }
.mym-call line { stroke: #8a91ad; stroke-width: 0.9; }
.mym-call text { font: 600 11px var(--display); fill: var(--ink); }
.mym-call { cursor: pointer; } .mym-call:hover circle, .mym-call:focus-visible circle { fill: #cc0001; }
.mym-call { outline: none; }
.mym-key { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; font-size: 0.78rem; color: var(--muted); padding: 0.3rem 0.4rem 0.1rem; }
.mym-key span { display: inline-flex; align-items: center; gap: 0.35rem; } .mym-key i { width: 0.8rem; height: 0.8rem; border-radius: 3px; display: inline-block; }
.mym-panel { border: 1px solid var(--line); border-radius: 18px; background: #fff; padding: 1.1rem 1.2rem; display: grid; gap: 0.75rem; align-content: start; min-height: 100%; }
.mym-ph { display: flex; align-items: center; gap: 0.7rem; }
.mym-ph .swflag { width: 3rem; height: 2rem; border-radius: 4px; box-shadow: 0 0 0 1px var(--line); flex: none; }
.mym-ph h3 { font-size: 1.25rem; margin: 0; line-height: 1.15; }
.mym-badge { display: inline-block; font: 700 0.68rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; padding: 0.3rem 0.5rem; border-radius: 999px; margin-top: 0.25rem; }
.mym-badge.s2027 { background: #3d47b8; color: #fff; } .mym-badge.s2026 { background: #e6e9fb; color: #3d47b8; } .mym-badge.snone, .mym-badge.sft { background: #eef0f5; color: var(--muted); }
.mym-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.mym-nums div { background: #f6f7fb; border-radius: 12px; padding: 0.55rem 0.6rem; display: grid; gap: 0.2rem; min-width: 0; }
.mym-nums span { font-size: 0.72rem; color: var(--muted); line-height: 1.2; }
.mym-nums b { font: 700 1rem/1.15 var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mym-nums b.neg { color: var(--red); } .mym-nums b.pos { color: #0a7a3b; }
.mym-meta { font-size: 0.86rem; color: var(--muted); display: grid; gap: 0.2rem; }
.mym-meta em { font-style: normal; color: var(--ink); }
.mym-lines { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.35rem; font-size: 0.9rem; }
.mym-fed { background: #fff7d6; border: 1px solid #f2dc8a; border-radius: 12px; padding: 0.6rem 0.75rem; font-size: 0.88rem; display: grid; gap: 0.2rem; }
.mym-fed b { font: 700 0.68rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: #8a6d00; }
.mym-go { justify-self: start; display: inline-flex; gap: 0.4rem; align-items: center; font: 700 0.9rem/1 var(--display); padding: 0.7rem 1rem; border-radius: 999px; background: var(--navy); color: #fff; text-decoration: none; }
.mym-go:hover { background: #cc0001; }
.mym-intro { display: grid; gap: 0.6rem; } .mym-intro p { margin: 0; font-size: 0.92rem; }
.mym-intro .big { font: 800 2.2rem/1 var(--mono); color: var(--navy); }
.mym-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.mym-chips button { display: inline-flex; align-items: center; gap: 0.4rem; font: 600 0.82rem/1 var(--display); padding: 0.4rem 0.7rem 0.4rem 0.4rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.mym-chips button .swflag { width: 1.3rem; height: 0.87rem; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }
.mym-chips button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.mym-chips button small { font: 700 0.62rem var(--mono); color: var(--muted); } .mym-chips button[aria-pressed="true"] small { color: #ffcc00; }
.stc-bars, .stf-bars { display: grid; gap: 0.45rem; }
.stc-row, .stf-row { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 0.7rem; align-items: center; font-size: 0.86rem; }
.stc-row > span, .stf-row > span { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; min-width: 0; }
.stc-row .swflag, .stf-row .swflag { width: 1.3rem; height: 0.87rem; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); flex: none; }
.stc-track { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.stc-bar { height: 1.15rem; border-radius: 4px; background: #3d47b8; min-width: 3px; flex: none; }
.stc-bar.y2026 { background: #b8bee9; }
.stc-track b { font: 700 0.8rem var(--mono); white-space: nowrap; } .stc-track small { font: 600 0.7rem var(--mono); color: var(--muted); }
.stf-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stf-tiles .v26 { font-size: 1.6rem; }
.stf-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.8rem; color: var(--muted); margin: 0.2rem 0 0.8rem; }
.stf-legend span { display: inline-flex; align-items: center; gap: 0.35rem; } .stf-legend i { width: 0.8rem; height: 0.8rem; border-radius: 3px; }
.stf-tax { background: var(--navy); } .stf-dev { background: #e0a800; }
.stf-pair { display: grid; gap: 3px; min-width: 0; }
.stf-pair div { display: flex; align-items: center; gap: 0.45rem; }
.stf-pair i { display: block; height: 0.75rem; border-radius: 3px; min-width: 2px; flex: none; }
.stf-pair b { font: 700 0.74rem var(--mono); white-space: nowrap; }
.mym-limits { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.4rem; color: var(--muted); font-size: 0.92rem; }
.mym-sources { margin: 0; padding-left: 1.4rem; display: grid; gap: 0.35rem; font-size: 0.84rem; }
.mym-sources a { color: var(--navy); } .mym-sources span { color: var(--muted); }
@media (max-width: 860px) { .mym-wrap { grid-template-columns: minmax(0, 1fr); } .stf-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .mym-map { padding: 0.3rem; border-radius: 14px; } .mym-nums b { font-size: 0.9rem; } .stc-row, .stf-row { grid-template-columns: 6.6rem minmax(0, 1fr); font-size: 0.8rem; } .stf-tiles { grid-template-columns: minmax(0, 1fr); } .st-flags .swflag:nth-child(n+2) { display: none; } }

/* multi-page additions */
.pg-h1 { font-size: clamp(1.5rem, 3.4vw, 2rem); font-weight: 800; letter-spacing: -0.02em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tabs a[aria-current="page"] { color: var(--navy); }
.lab-nav a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.state-nav span { display: inline-flex; align-items: center; gap: 0.4rem; }
.state-nav span .swflag { width: 18px; height: 12px; border-radius: 2px; }
[id] { scroll-margin-top: calc(var(--tb, 110px) + 12px); }
.lab-hub { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.9rem; }
.lab-hub a { display: grid; gap: 0.45rem; align-content: start; padding: 1.2rem; border-radius: 18px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.lab-hub a:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,0.07); }
.lab-hub b { font-size: 1.1rem; } .lab-hub span { color: var(--muted); font-size: 0.92rem; } .lab-hub i { font: 700 0.72rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--red); font-style: normal; }
main > .lab-nav:first-child { margin-bottom: -3rem; }
main { padding-top: 2.5rem; }
@media (max-width: 600px) { .tb-right .pill { display: none; } .sw-btn span { white-space: nowrap; } main > .lab-nav:first-child { margin-bottom: -2.5rem; } }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin: 0.6rem 0 1rem; font-size: 0.88rem; }
.foot-nav a { color: inherit; }
