/* BETA pages — the shared look of /pillars and /enablers (29 Nov 2026: taken out of pillars.php so both
   pages are one design; includes/beta.js draws them, includes/beta-page.php lays them out). */
:root {
  --ink: #0e0e0e; --ink-2: #161616; --paper: #f5f0e8; --paper-2: #ede8dc; --white: #fff; --card: #fbf9f5;
  --muted: #514b45; --border: rgba(14,14,14,.1); --line-dark: rgba(245,240,232,.12);
  --gold: #d4a017; --gold-light: #f0c842; --red: #c8102e; --green: #1f8a4c; --good: #1f8a4c; --bad: #c8102e;
  --sans: "Plus Jakarta Sans", -apple-system, "Segoe UI", sans-serif;
  --max: 1720px; --gutter: clamp(1.25rem, 3.2vw, 3rem); --r-lg: 22px; --r-md: 14px; --bar: 66px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--sans); background: var(--paper); color: var(--ink); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.pulse-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #23a55a; box-shadow: 0 0 0 0 rgba(35,165,90,.6); animation: livePulse 2.4s infinite; flex-shrink: 0; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(35,165,90,.55); } 70% { box-shadow: 0 0 0 9px rgba(35,165,90,0); } 100% { box-shadow: 0 0 0 0 rgba(35,165,90,0); } }

/* ══ HERO ═══════════════════════════════════════════════════════════════ */
.hero { background: var(--ink); color: var(--paper); padding-top: 100px; position: relative; isolation: isolate; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(900px 560px at 85% 20%, rgba(240,200,66,.09), transparent 60%), radial-gradient(700px 500px at 0% 110%, rgba(31,138,76,.1), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 6rem); align-items: end; padding-top: clamp(2.5rem, 5vw, 4.5rem); padding-bottom: clamp(3rem, 5vw, 4.5rem); }
.kick { display: flex; align-items: center; gap: .6rem; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(245,240,232,.6); }
.kick::before { content: ""; width: 22px; height: 2px; background: var(--gold-light); border-radius: 2px; }
.hero h1 { font-size: clamp(2.8rem, 5.8vw, 6.2rem); line-height: .94; letter-spacing: -.05em; font-weight: 800; margin: 1.2rem 0 1.4rem; }
.hero h1 span { color: var(--gold-light); }
.hero p { font-size: clamp(1.02rem, 1.2vw, 1.2rem); line-height: 1.7; color: rgba(245,240,232,.7); max-width: 40rem; }
.hk { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-dark); border-radius: var(--r-lg); overflow: hidden; }
.hk div { padding: 1.4rem 1.5rem 1.5rem; border-right: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); }
.hk div:nth-child(2n) { border-right: 0; }
.hk b { display: block; font-size: clamp(2.2rem, 3.6vw, 3.4rem); font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.hk span { display: block; margin-top: .55rem; font-size: .88rem; color: rgba(245,240,232,.6); }
.hk .live { grid-column: 1 / -1; display: flex; align-items: center; gap: .7rem; padding: .95rem 1.5rem; border: 0; font-size: .86rem; color: rgba(245,240,232,.6); background: rgba(245,240,232,.03); }
.flagline { display: grid; grid-template-columns: 3fr 1fr 3fr 1fr 3fr; height: 6px; }
.flagline i:nth-child(1) { background: #0e0e0e; } .flagline i:nth-child(2), .flagline i:nth-child(4) { background: #f5f0e8; }
.flagline i:nth-child(3) { background: var(--red); } .flagline i:nth-child(5) { background: var(--green); }

/* ══ TABS ═══════════════════════════════════════════════════════════════ */
.tabs { position: sticky; top: var(--bar); z-index: 40; background: var(--paper); border-bottom: 1px solid var(--border); }
.tabs-in { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; padding-top: .65rem; padding-bottom: .65rem; }
.tabs-in::-webkit-scrollbar { display: none; }
.tab { flex-shrink: 0; display: inline-flex; align-items: center; gap: .55rem; height: 44px; padding: 0 1.1rem 0 .55rem; border-radius: 999px; border: 1px solid var(--border); background: var(--white); font-weight: 700; font-size: .9rem; cursor: pointer; transition: background .15s, border-color .15s; }
.tab i { width: 30px; height: 30px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; font-style: normal; font-size: .76rem; font-weight: 800; }
.tab:hover { border-color: rgba(14,14,14,.3); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tab[aria-selected="true"] i { background: var(--gold-light); color: var(--ink); }

/* ══ PILLAR ═════════════════════════════════════════════════════════════ */
.pillar { padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(4rem, 7vw, 6rem); }
.ph { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: stretch; }
.ph-text { display: flex; flex-direction: column; }
.ph-n { font-size: clamp(4rem, 9vw, 8.5rem); font-weight: 800; letter-spacing: -.06em; line-height: .8; color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.ph h2 { font-size: clamp(2rem, 3.6vw, 3.4rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; margin: 1.2rem 0 .9rem; }
.ph p { color: var(--muted); font-size: 1.02rem; line-height: 1.7; max-width: 36rem; }
.ph-stats { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: auto; padding-top: 1.6rem; border-top: 1.5px solid var(--ink); }
.ph-stats b { display: block; font-size: 1.8rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.ph-stats span { font-size: .84rem; color: var(--muted); }
.ph-img { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 340px; background: var(--ink); }
.ph-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,10,.55), rgba(10,10,10,0) 55%); }
.ph-img .cap { position: absolute; left: 1.4rem; bottom: 1.2rem; z-index: 1; color: var(--paper); font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

.sec-t { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: clamp(2.5rem, 4vw, 3.5rem) 0 1.1rem; }
.sec-t h3 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.sec-t span { font-size: .86rem; color: var(--muted); }

/* Headline results */
.hl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.hm { background: var(--ink); color: var(--paper); border-radius: var(--r-lg); padding: clamp(1.4rem, 2.2vw, 2rem); display: flex; flex-direction: column; gap: .8rem; }
.hm-top { display: flex; justify-content: space-between; gap: .8rem; align-items: center; }
.hm-prog { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-light); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chg { flex-shrink: 0; display: inline-flex; align-items: center; gap: .2rem; font-size: .8rem; font-weight: 800; padding: .22rem .6rem; border-radius: 999px; white-space: nowrap; }
.chg.good { background: rgba(35,165,90,.16); color: #4fd38a; } .chg.bad { background: rgba(229,72,77,.16); color: #ff7b80; } .chg.new { background: rgba(240,200,66,.16); color: var(--gold-light); } .chg.neutral { background: rgba(245,240,232,.1); color: rgba(245,240,232,.75); }
.hm h4 { font-size: 1.02rem; line-height: 1.35; font-weight: 700; min-height: 2.7em; }
.hm .now { font-size: clamp(2.3rem, 3.6vw, 3.4rem); font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.hm .from { font-size: .9rem; color: rgba(245,240,232,.6); }
.bars { display: grid; gap: 6px; margin-top: auto; padding-top: .4rem; }
.bars div { display: grid; grid-template-columns: 4.4rem 1fr; gap: .7rem; align-items: center; font-size: .72rem; font-weight: 700; color: rgba(245,240,232,.5); }
.bars span { height: 8px; border-radius: 8px; background: rgba(245,240,232,.07); overflow: hidden; }
.bars i { display: block; height: 100%; border-radius: 8px; background: rgba(245,240,232,.32); }
.bars div:last-child i { background: var(--gold-light); }

/* Programmes */
.progs { display: grid; gap: 1rem; }
.prog { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.prog-h { display: flex; justify-content: space-between; align-items: start; gap: 1.5rem; padding: 1.4rem 1.6rem 1.1rem; }
.prog-h h4 { font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.prog-h p { font-size: .92rem; color: var(--muted); margin-top: .35rem; max-width: 60rem; }
.prog-h .pc { flex-shrink: 0; font-size: .8rem; font-weight: 700; color: var(--muted); background: var(--paper-2); padding: .3rem .7rem; border-radius: 999px; white-space: nowrap; }
.prog-b { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); border-top: 1px solid var(--border); }
.prog-b.one { grid-template-columns: 1fr; }
.mt { width: 100%; border-collapse: collapse; }
.mt th { text-align: left; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: .8rem 1rem .6rem; border-bottom: 1px solid var(--border); }
.mt th:first-child, .mt td:first-child { padding-left: 1.6rem; }
.mt td { padding: .85rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: .92rem; }
.mt tr:last-child td { border-bottom: 0; }
.mt .lbl { font-weight: 600; line-height: 1.35; }
.mt .b { color: var(--muted); white-space: nowrap; }
.mt .b small, .mt .c small { display: block; font-size: .74rem; color: var(--muted); font-weight: 600; }
.mt .c { font-weight: 800; white-space: nowrap; font-size: 1rem; }
.mt .x .chg.good { background: rgba(31,138,76,.12); color: var(--good); } .mt .x .chg.bad { background: rgba(200,16,46,.1); color: var(--bad); } .mt .x .chg.new { background: rgba(212,160,23,.15); color: #8a6400; } .mt .x .chg.neutral { background: var(--paper-2); color: var(--muted); }
.mt .bar { width: 22%; min-width: 90px; }
.mt .bar span { display: block; height: 7px; border-radius: 7px; background: var(--paper-2); position: relative; overflow: hidden; }
.mt .bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; }
.mt .bar i.b0 { background: rgba(14,14,14,.18); } .mt .bar i.b1 { background: var(--gold); mix-blend-mode: multiply; }
.ach { padding: 1.1rem 1.6rem 1.3rem; border-left: 1px solid var(--border); background: var(--card); }
.prog-b.one .ach { border-left: 0; }
.ach h5 { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.ach ul { list-style: none; display: grid; gap: .65rem; }
.ach li { position: relative; padding-left: 1.2rem; font-size: .92rem; line-height: 1.55; }
.ach li::before { content: ""; position: absolute; left: 0; top: .55rem; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.ach button { margin-top: .7rem; border: 0; background: none; font-weight: 700; font-size: .86rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0; }
.none { padding: 1.2rem 1.6rem 1.4rem; color: var(--muted); font-size: .92rem; border-top: 1px solid var(--border); }

.src { display: flex; align-items: center; gap: .6rem; margin-top: 2.2rem; font-size: .86rem; color: var(--muted); }
.loading { padding: 5rem 0; text-align: center; color: var(--muted); }

@media (max-width: 1100px) {
  .hero-grid, .ph, .prog-b { grid-template-columns: 1fr; }
  .ach { border-left: 0; border-top: 1px solid var(--border); }
  .hl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-img { min-height: 260px; }
}
@media (max-width: 768px) {
  :root { --bar: 72px; }
  .hero { padding-top: 72px; }
  .hl { grid-template-columns: minmax(0, 1fr); }
  .mt thead { display: none; }
  .mt, .mt tbody, .mt tr, .mt td { display: block; width: 100%; }
  .mt tr { display: grid; grid-template-columns: 1fr auto; gap: .3rem .8rem; padding: .9rem 1.2rem; border-bottom: 1px solid var(--border); }
  .mt td { padding: 0 !important; border: 0; }
  .mt .lbl { grid-column: 1 / -1; }
  .mt .bar { grid-column: 1 / -1; min-width: 0; }
  .prog-h { flex-direction: column; gap: .6rem; padding: 1.2rem 1.2rem 1rem; }
  .ach { padding: 1rem 1.2rem 1.2rem; }
}
@media (prefers-reduced-motion: reduce) { .pulse-dot { animation: none; } }

/* ══ AT A GLANCE (all enablers, or all pillars) ══════════════════════════ */
/* Columns chosen by the script so every row is full (10 → 5 + 5; 6 → 3 + 3); narrower screens use the tablet count */
.ag { display: grid; grid-template-columns: repeat(var(--ag-cols, 5), minmax(0, 1fr)); gap: 1rem; }
.ag-c { display: flex; flex-direction: column; gap: .7rem; text-align: left; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.3rem 1.3rem 1.4rem; cursor: pointer; transition: border-color .15s, transform .15s; min-height: 100%; }
.ag-c:hover { border-color: rgba(14,14,14,.35); transform: translateY(-2px); }
.ag-c:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.ag-c.empty { background: transparent; border-style: dashed; }
.ag-n { width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: var(--gold-light); display: grid; place-items: center; font-weight: 800; }
.ag-c.empty .ag-n { background: var(--paper-2); color: var(--muted); }
.ag-c h4 { font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; }
.ag-s { font-size: .84rem; color: var(--muted); line-height: 1.45; }
.ag-m { margin-top: auto; padding-top: .7rem; border-top: 1px solid var(--border); display: grid; gap: .15rem; }
.ag-m b { font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.ag-m span { font-size: .82rem; color: var(--muted); line-height: 1.4; }
.ag-go { font-size: .84rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* A header without a photograph: the number and name set large on dark */
.ph-tile { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 340px; background: var(--ink); color: var(--paper); padding: clamp(1.5rem, 3vw, 2.5rem); display: flex; flex-direction: column; justify-content: space-between; isolation: isolate; }
.ph-tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(520px 360px at 90% 10%, rgba(240,200,66,.14), transparent 60%), radial-gradient(420px 320px at 0% 100%, rgba(31,138,76,.14), transparent 60%); }
.ph-tile .big { font-size: clamp(6rem, 14vw, 12rem); font-weight: 800; letter-spacing: -.06em; line-height: .8; color: transparent; -webkit-text-stroke: 1.5px rgba(245,240,232,.4); }
.ph-tile .cap { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-light); }
.ph-tile .nm { font-size: clamp(1.2rem, 1.8vw, 1.6rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; max-width: 22rem; }

/* Nothing recorded yet: said plainly, with what will appear */
.empty-note { margin-top: clamp(2rem, 3.5vw, 3rem); border: 1.5px dashed rgba(14,14,14,.25); border-radius: var(--r-lg); padding: clamp(1.4rem, 2.5vw, 2rem); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.empty-note .ic { width: 44px; height: 44px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; }
.empty-note .ic svg { width: 22px; height: 22px; }
.empty-note h3 { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.empty-note p { color: var(--muted); font-size: .95rem; line-height: 1.65; margin-top: .35rem; max-width: 52rem; }

/* A link out from a pillar or enabler (e.g. Infrastructure → the Infrastructure Scorecard) */
.deep { margin-top: 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--ink); color: var(--paper); border-radius: var(--r-lg); padding: 1.2rem 1.5rem; }
.deep b { font-size: 1.02rem; } .deep span { display: block; font-size: .88rem; color: rgba(245,240,232,.65); margin-top: .15rem; }
.deep .go { flex-shrink: 0; height: 42px; padding: 0 1.1rem; border-radius: 999px; background: var(--gold-light); color: var(--ink); font-weight: 800; font-size: .88rem; display: inline-flex; align-items: center; }

/* ══ MORE ON BETA: the other BETA page, the report, the map ══════════════ */
.more { padding: 0 0 clamp(4rem, 7vw, 6rem); }
.more-h { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 1.1rem; }
.more-g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.more-c { display: flex; flex-direction: column; gap: .45rem; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.4rem 1.5rem 1.5rem; transition: border-color .15s, transform .15s; }
.more-c:hover { border-color: rgba(14,14,14,.35); transform: translateY(-2px); }
.more-c .k { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.more-c b { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.more-c p { font-size: .9rem; color: var(--muted); line-height: 1.55; }
.more-c .go { margin-top: auto; padding-top: .6rem; font-size: .86rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1300px) { .ag { grid-template-columns: repeat(var(--ag-cols-md, 2), minmax(0, 1fr)); } }
@media (max-width: 900px) { .ag { grid-template-columns: repeat(2, minmax(0, 1fr)); } .more-g { grid-template-columns: 1fr; } .ph-tile { min-height: 220px; } }
@media (max-width: 560px) { .ag { grid-template-columns: minmax(0, 1fr); } .deep { flex-direction: column; align-items: flex-start; } .empty-note { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ag-c, .more-c { transition: none; } .ag-c:hover, .more-c:hover { transform: none; } }
