/* ============================================================================================================
 * theme.css -- the IDN69 "first light" look (2026-11). Loaded AFTER styles.css on every public page.
 *
 * PURPOSE
 *   A new look without rewriting styles.css. The IDN69 mark is a night-and-day loop (deep blue night, orange sun),
 *   and the site now follows it: the top of each page is the sky just before sunrise, everything below is daylight
 *   -- white working surfaces where the numbers are read. Two brand colours only, each with ONE job:
 *       sun orange  = the thing to press, and the money numbers
 *       sky blue    = where you are (current step, selected choice), links and keyboard focus
 *   Green / amber / red keep their meaning from the results tables (meets target / close / below) and nothing else.
 *
 * HOW IT IS BUILT (after the font declarations: three parts, in this order)
 *   1. TOKENS      new values for the variables styles.css already uses, plus a few new ones.
 *   2. RECOLOUR    generated by tools/build_theme_recolor.py: styles.css hard-codes the old navy / amber / teal
 *                  in about 190 declarations that bypass its own variables; this block re-points each of them to
 *                  a token. Do not edit it by hand -- re-run the tool after changing colours in styles.css.
 *   3. DESIGN      hand-written rules: type, header, hero, form controls, cards, results, and a closing
 *                  "Contrast" section that keeps every text/background pair at WCAG AA.
 *
 * TO GO BACK TO THE OLD LOOK: remove the <link ... theme.css> line from the page (index.php, knowledge.php,
 *   compliance.php, contact.php, about.php, includes/policy_page.php, 404.php, 500.php). Nothing else depends on it.
 *
 * RULES THIS FILE KEEPS (the public Content-Security-Policy): no inline styles, no external URLs. Images are
 *   CSS gradients or data: URIs; fonts are self-hosted files in assets/fonts/ (declared in part 0 below).
 * ============================================================================================================ */

/* ============================== 0. FONTS ============================== */
/* Bai Jamjuree (headings, figures) and IBM Plex Sans + IBM Plex Sans Thai (text): Latin and Thai subsets from the
   @fontsource packages, SIL OFL 1.1, self-hosted in assets/fonts/ like the fonts in fonts.css. Declared here, not in
   fonts.css, so the theme is self-contained: remove the theme link and these files are never downloaded. */
@font-face{font-family:'Bai Jamjuree';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/bai-jamjuree-thai-600-normal.woff2') format('woff2');unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC;}
@font-face{font-family:'Bai Jamjuree';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/bai-jamjuree-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;}
@font-face{font-family:'Bai Jamjuree';font-style:normal;font-weight:700;font-display:swap;src:url('../fonts/bai-jamjuree-thai-700-normal.woff2') format('woff2');unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC;}
@font-face{font-family:'Bai Jamjuree';font-style:normal;font-weight:700;font-display:swap;src:url('../fonts/bai-jamjuree-latin-700-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:'IBM Plex Sans';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/ibm-plex-sans-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:'IBM Plex Sans';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/ibm-plex-sans-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:'IBM Plex Sans';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/ibm-plex-sans-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;}
@font-face{font-family:'IBM Plex Sans Thai';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/ibm-plex-sans-thai-thai-400-normal.woff2') format('woff2');unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC;}
@font-face{font-family:'IBM Plex Sans Thai';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/ibm-plex-sans-thai-thai-500-normal.woff2') format('woff2');unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC;}
@font-face{font-family:'IBM Plex Sans Thai';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/ibm-plex-sans-thai-thai-600-normal.woff2') format('woff2');unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC;}

/* ============================== 1. TOKENS ============================== */
:root {
  /* Night side of the mark */
  --night: #050C24;
  --ink-900: #08153A;
  --ink-800: #0C2157;
  --ink-700: #123079;
  --ink-rgb: 8, 21, 58;

  /* Sky blue: position, selection, links, focus */
  --blue: #0B5FD0;
  --blue-dark: #0949A3;
  --blue-bright: #2B84F0;
  --sky: #6CCBF7;
  --blue-tint: #E9F2FD;
  --blue-rgb: 11, 95, 208;

  /* Sun orange: the call to action and the money numbers */
  --accent: #FA7A0A;
  --accent-dark: #E05E00;
  --accent-light: #FFF1E3;
  --accent-ink: #B34100;          /* orange that passes as small text on white */
  --accent-rgb: 250, 122, 10;
  --gold: #FDB92E;

  /* Names styles.css already uses, re-pointed */
  --primary: #0A1B45;
  --primary-dark: #050C24;
  --primary-light: #E9F0FB;
  --primary-glow: rgba(11, 95, 208, 0.16);
  --warm: #FA7A0A;
  --warm-light: #FFF1E3;
  --coral: #F4511E;
  --coral-light: #FFEDE5;
  --bg: #F4F7FC;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --txt: #0A1B45;
  --txt-secondary: #46537A;
  --txt-muted: #5F6C93;           /* 4.8:1 on the page background, 5.2:1 on white */
  --border: #D9E0EE;
  --border-strong: #B4BFD6;

  --shadow-xs: 0 1px 2px rgba(8, 21, 58, 0.04);
  --shadow-sm: 0 1px 2px rgba(8, 21, 58, 0.05), 0 1px 3px rgba(8, 21, 58, 0.04);
  --shadow-md: 0 1px 2px rgba(8, 21, 58, 0.04), 0 10px 24px -14px rgba(8, 21, 58, 0.18);
  --shadow-lg: 0 2px 4px rgba(8, 21, 58, 0.04), 0 18px 36px -18px rgba(8, 21, 58, 0.24);
  --shadow-xl: 0 4px 8px rgba(8, 21, 58, 0.05), 0 28px 56px -24px rgba(8, 21, 58, 0.34);
  --shadow-glow: 0 0 0 4px rgba(11, 95, 208, 0.18);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Results semantics (unchanged meaning) */
  --good: #087F57;
  --good-tint: #E2F5EC;
  --warn: #9A5700;
  --warn-tint: #FFF4D6;
  --bad: #C62828;
  --bad-tint: #FDEBEB;

  /* Type: Bai Jamjuree for headings and figures, IBM Plex Sans for reading. Both are drawn with a matching Thai
     (Bai Jamjuree itself; IBM Plex Sans Thai), so the Thai page has the same voice as the English one. */
  --font-display: 'Bai Jamjuree', 'IBM Plex Sans Thai', 'Noto Sans Thai', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', 'IBM Plex Sans Thai', 'Noto Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Section accents (body[data-sec]): the assessment tool takes the sun, the Knowledge Hub the sky. Compliance (indigo)
   and Contact (coral) keep the hues they had, which sit on either side of the two brand colours. */
body[data-sec="tool"] { --sec-lt: #FDB92E; --sec-ui: #B34100; --sec-rgb: 250, 122, 10; }
body[data-sec="kh"]   { --sec-lt: #6CCBF7; --sec-ui: #0B5FD0; --sec-ui2: #2B84F0; --sec-tint: #E9F2FD; --sec-rgb: 11, 95, 208; --sec-hero: #0C2157; }
body[data-sec="comp"] { --sec-hero: #1B1F6B; }

/* ============================== 2. RECOLOUR ============================== */
/* >>> RECOLOUR: generated by tools/build_theme_recolor.py -- do not edit by hand >>> */
.header { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--ink-700) 100%); }
.header::before { background: radial-gradient(ellipse at 30% 50%, rgba(var(--accent-rgb), 0.06), transparent 60%); }
.brand-text .brand-name { background: linear-gradient(135deg, #FFFFFF 0%, var(--accent) 100%); }
.hero { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--ink-700) 100%); }
.hero::before { background: radial-gradient(ellipse at 20% 30%, rgba(var(--accent-rgb), 0.08), transparent 50%), radial-gradient(ellipse at 80% 70%, rgba(var(--accent-rgb), 0.05), transparent 50%); }
.hero h1 span { background: linear-gradient(135deg, var(--accent) 0%, var(--gold) 100%); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], textarea { box-shadow: var(--shadow-sm), inset 0 1px 2px rgba(var(--ink-rgb), 0.04); }
input[type="text"]:hover, input[type="email"]:hover, input[type="tel"]:hover, input[type="number"]:hover, textarea:hover { box-shadow: var(--shadow-md), inset 0 1px 2px rgba(var(--ink-rgb), 0.04); }
select { box-shadow: var(--shadow-sm), inset 0 1px 2px rgba(var(--ink-rgb), 0.04); }
select:hover { box-shadow: var(--shadow-md), inset 0 1px 2px rgba(var(--ink-rgb), 0.04); }
input[type="checkbox"]:checked { box-shadow: 0 2px 8px rgba(var(--ink-rgb), 0.4); }
.country-code-select { box-shadow: var(--shadow-sm), inset 0 1px 2px rgba(var(--ink-rgb), 0.04); }
.country-code-select:hover { box-shadow: var(--shadow-md), inset 0 1px 2px rgba(var(--ink-rgb), 0.04); }
.choice-btn::after { background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.05), rgba(var(--ink-rgb), 0.05)); }
.choice-btn.selected { box-shadow: var(--shadow-xl), 0 0 0 4px var(--primary-glow), inset 0 1px 0 rgba(var(--accent-rgb),0.15); }
.btn-primary { box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.3); }
.btn-primary:hover { box-shadow: 0 10px 28px rgba(var(--accent-rgb), 0.4); }
.btn-download { box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.35) !important; }
.btn-download:hover { box-shadow: 0 14px 32px rgba(var(--accent-rgb), 0.45) !important; }
.consent-box { border: 1px solid rgba(var(--accent-rgb), 0.25); }
.otp-panel { border: 1px solid rgba(var(--accent-rgb), 0.3); }
.highlight-item { border: 1px solid rgba(var(--accent-rgb), 0.2); }
.bar-fill { box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.3); }
.cta-card { background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--ink-700)); border: 1px solid rgba(var(--accent-rgb), 0.2); }
.cta-contacts a:hover { color: var(--gold); }
.idn69-toast { box-shadow: 0 8px 24px rgba(var(--ink-rgb), 0.18); }
.idn69-toast-warning { background: var(--accent-dark); }
.idn69-toast-info { background: var(--primary); }
.spec-card-title { color: var(--primary); }
.spec-note { border-left: 4px solid var(--gold); }
.budget-table tr.total td { border-top: 2px solid var(--primary); }
.ppa-comment.ppa-too_low, .ppa-comment.ppa-can_be_more { background: var(--accent-light); }
.header-join { color: var(--primary); }
.join-overlay { background: rgba(var(--ink-rgb), .6); }
.explore-caution { background: var(--accent-light); }
.kh-hero { background: linear-gradient(135deg,var(--primary-dark) 0%,var(--primary) 55%,var(--sec-hero,var(--ink-700)) 100%); }
.kh-hero::before { background: radial-gradient(ellipse at 85% 10%,rgba(var(--accent-rgb),.18),transparent 55%),radial-gradient(ellipse at 10% 90%,rgba(var(--sec-rgb,15,118,110),.30),transparent 55%); }
.kh-search input { color: var(--txt); }
.kh-count-live { color: var(--sec-ui,var(--blue)); }
.kh-tabs { box-shadow: 0 4px 14px rgba(var(--ink-rgb),.06); }
.kh-tab.on { background: var(--sec-ui,var(--blue)); }
.kh-tab:focus-visible, .kh-btn:focus-visible, .kh-cta:focus-visible, .kh-card:focus-visible { outline: 2px solid var(--sec-ui,var(--blue)); }
.kh-section { box-shadow: 0 6px 22px rgba(var(--ink-rgb),.05); }
.kh-sec-icon { background: linear-gradient(135deg,var(--sec-tint,var(--blue-tint)),var(--accent-light)); }
.kh-note { border-left: 4px solid var(--accent-dark); background: var(--accent-light); }
.kh-filter select { color: var(--txt); }
.kh-filter select:focus { outline: 2px solid var(--sec-ui,var(--blue)); }
.kh-card { border-top: 4px solid var(--sec-ui,var(--blue)); }
.kh-card:hover { box-shadow: 0 14px 30px rgba(var(--ink-rgb),.12); }
.kh-card.kh-c-epc { border-top-color: var(--primary); }
.kh-card.kh-c-om, .kh-card.kh-c-o-m { border-top-color: var(--accent-dark); }
.kh-card-go { color: var(--sec-ui,var(--blue)); }
.kh-tag { background: var(--sec-tint,var(--blue-tint)); }
.kh-pill { color: var(--sec-ui,var(--blue)); background: var(--sec-tint,var(--blue-tint)); }
.kh-group>summary>span:first-child::before { color: var(--sec-ui,var(--blue)); }
.kh-group>summary:focus-visible { outline: 2px solid var(--sec-ui,var(--blue)); }
.kh-row-main strong { color: var(--txt); }
.kh-btn { color: var(--sec-ui,var(--blue)); border: 1.5px solid var(--sec-ui,var(--blue)); }
.kh-btn:hover { background: var(--sec-ui,var(--blue)); }
.kh-link-card>a { color: var(--sec-ui,var(--blue)); }
.kh-info li a { color: var(--sec-ui,var(--blue)); }
.kh-soon { background: linear-gradient(135deg,var(--blue-tint),var(--accent-light)); }
.kh-cta { color: var(--primary-dark); box-shadow: 0 6px 16px rgba(var(--accent-rgb),.35); }
.kh-band { background: linear-gradient(135deg,var(--primary-dark),var(--primary) 60%,var(--ink-700)); }
.cases-table th { background: var(--navy,var(--primary)); }
.res-val-accent { color: var(--accent-dark); }
.kpi-note { border-left: 3px solid var(--gold); }
.join-step { background: var(--blue); }
.join-otp-code { background: var(--blue-tint); }
.brand-home:focus-visible { outline: 3px solid var(--accent); }
.lg-overlay { background: rgba(var(--ink-rgb), .6); }
.lg-dialog { color: var(--txt); }
.epc-row { border-bottom: 1px solid rgba(var(--ink-rgb), .12); }
.choice-img { box-shadow: 0 1px 6px rgba(var(--ink-rgb), 0.15); }
.rec-card { background: linear-gradient(135deg, var(--accent-light), #ffffff); }
.rec-eyebrow { color: var(--accent-dark, var(--accent-dark)); }
.rec-title { color: var(--primary, var(--primary)); }
.rec-figures { color: var(--primary, var(--primary)); }
.sub-summary { color: var(--primary, var(--primary)); }
.sub-v { color: var(--primary, var(--primary)); }
.header-join { box-shadow: 0 4px 14px rgba(var(--accent-rgb), .35); }
.pillar-drawer { border: 1px solid rgba(var(--accent-rgb), .45); }
.pillar-drawer { color: var(--txt); border-color: var(--blue); box-shadow: 0 -8px 26px rgba(var(--ink-rgb), .22); }
.pillar-toggle { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-bright) 100%); }
.pillar-toggle:hover { background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-dark) 100%); }
.pillar-toggle-arrow { color: var(--blue); }
.pillar-list li { background: var(--blue-tint); }
.pillar-list strong { color: var(--txt); }
.pillar-list em { background: var(--accent-light); }
.pillar-more { color: var(--blue); }
.partner-item:has(.partner-link):hover { border-color: var(--teal, var(--blue)); box-shadow: 0 4px 14px rgba(var(--ink-rgb), .10); }
.partner-link:focus-visible { outline: 2px solid var(--teal, var(--blue)); }
.soc-website { background: var(--blue); }
.policy-toc a { color: var(--accent-dark, var(--accent-dark)); }
.lang-opt { color: var(--primary); }
.lang-opt:hover:not(:disabled) { background: var(--accent-light); }
.lang-opt[aria-selected="true"] { background: var(--accent-light); color: var(--accent-ink); }
.sub-h { color: var(--accent-ink); }
.sub-edit { color: var(--accent-ink); border: 1px solid var(--accent-ink); }
.sub-edit:hover { background: var(--accent-light); }
[data-sec-on="epc_ppa"], .sec-opt[data-secid="epc_ppa"], .sec-pill[data-secid="epc_ppa"] { --sec: var(--blue); }
.results .highlight-item { background: linear-gradient(135deg, var(--primary-dark), var(--ink-700)); box-shadow: 0 8px 22px rgba(var(--ink-rgb), .28); }
.results .highlight-item::before { background: linear-gradient(90deg, var(--accent), #FFD27A); }
.results .card { box-shadow: 0 6px 20px rgba(var(--ink-rgb), .08); }
.results .kpi-card { box-shadow: 0 3px 12px rgba(var(--ink-rgb), .08); }
.rvw-head { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--ink-700) 100%); border-bottom: 4px solid var(--accent); }
.rvw-icon { background: rgba(var(--accent-rgb), .18); border: 1px solid rgba(var(--accent-rgb), .5); }
.rvw-body .sub-group { box-shadow: 0 3px 12px rgba(var(--ink-rgb), .07); border-top: 4px solid var(--rc, var(--accent)); }
.rvw-body .sub-group:nth-child(1) { --rc: var(--primary); }
.rvw-body .sub-group:nth-child(2) { --rc: var(--accent); }
.rvw-body .sub-group:nth-child(3) { --rc: var(--blue); }
.rvw-body .sub-h { color: var(--rc, var(--accent-ink)); }
.rvw-body .sub-edit { color: var(--rc, var(--accent-ink)); border-color: var(--rc, var(--accent-ink)); }
.rvw-actions #rvwOk { box-shadow: 0 8px 22px rgba(var(--accent-rgb), .4); }
.results .sub-summary { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--ink-700) 100%); border-bottom: 4px solid var(--accent); }
.results .sub-summary::before { color: var(--accent); }
.results .sub-card .sub-lock { background: rgba(var(--accent-rgb), .16); border-color: rgba(var(--accent-rgb), .5); }
#subBody .sub-group { box-shadow: 0 3px 12px rgba(var(--ink-rgb), .07); border-top: 4px solid var(--rc, var(--accent)); }
#subBody .sub-group:nth-child(1) { --rc: var(--primary); }
#subBody .sub-group:nth-child(2) { --rc: var(--accent); }
#subBody .sub-group:nth-child(3) { --rc: var(--blue); }
#subBody .sub-h { color: var(--rc, var(--accent-ink)); }
.report-jump { border: 1px solid rgba(var(--accent-rgb), .55); background: linear-gradient(135deg, var(--primary-dark), var(--ink-700)); box-shadow: 0 10px 28px rgba(var(--ink-rgb), .38), 0 0 0 4px rgba(var(--accent-rgb), .14); }
.report-jump:hover { box-shadow: 0 14px 34px rgba(var(--ink-rgb), .45), 0 0 0 5px rgba(var(--accent-rgb), .25); }
.report-jump:focus-visible { outline: 3px solid var(--accent); }
.report-jump .rj-ico { background: linear-gradient(135deg, var(--accent), #ffc45c); color: var(--primary-dark); }
.cond-card { border-left: 5px solid var(--accent); }
.cond-h { color: var(--primary-dark); }
.cond-list li::marker { color: var(--accent-dark); }
.demo-bar .demo-btn { background: var(--accent); color: var(--primary-dark); }
.demo-bar .demo-otp { background: var(--primary-dark); }
.demo-bar .demo-otp b { color: var(--accent); }
.kh-chip[aria-pressed="true"] { background: var(--sec-ui,var(--blue)); border-color: var(--sec-ui,var(--blue)); }
.kh-chip:focus-visible { outline: 2px solid var(--sec-ui,var(--blue)); }
.kh-cc-head strong { color: var(--txt); }
.ct-hero { background: radial-gradient(ellipse at 92% 0%,rgba(var(--sec-rgb,15,118,110),.40),transparent 60%),linear-gradient(120deg,var(--primary-dark) 0%,var(--primary) 100%); }
.ct-card { box-shadow: 0 8px 28px rgba(var(--ink-rgb),.08); }
.ct-form::before { background: linear-gradient(90deg,var(--sec-ui,var(--blue)),var(--accent)); }
.ct-form label, .ct-form legend { color: var(--primary); }
.ct-form input[type=text], .ct-form input[type=email], .ct-form select, .ct-form textarea { color: var(--txt); }
.ct-form input:focus, .ct-form select:focus, .ct-form textarea:focus { border-color: var(--sec-ui,var(--blue)); }
.ct-item { background: var(--accent-light); }
.ct-item-icon { color: var(--accent-ink); }
.ct-item-k { color: var(--accent-ink); }
.ct-item strong { color: var(--primary); }
.ct-chip:hover span { border-color: var(--sec-ui,var(--blue)); }
.ct-chip input:checked+span { background: var(--sec-ui,var(--blue)); border-color: var(--sec-ui,var(--blue)); }
.ct-chip input:focus-visible+span { outline: 2px solid var(--primary); }
.ct-consent { background: var(--blue-tint); }
.ct-consent input { accent-color: var(--sec-ui,var(--blue)); }
.ct-consent a { color: var(--sec-ui,var(--blue)); }
.ct-btn { background: linear-gradient(135deg,var(--sec-ui,var(--blue)),var(--sec-ui2,var(--blue-bright))); }
.ct-btn-alt { background: linear-gradient(135deg,var(--accent),var(--accent)); color: var(--primary)!important; box-shadow: 0 6px 16px rgba(var(--accent-rgb),.35); }
.ct-side h2 { color: var(--primary); }
.ct-next li>span { background: var(--sec-ui,var(--blue)); }
.ct-next li strong { color: var(--primary); }
.ct-ok { box-shadow: 0 8px 28px rgba(var(--ink-rgb),.08); }
.ct-ok-icon { background: linear-gradient(135deg,#10b981,var(--sec-ui,var(--blue))); }
.kh-report { color: var(--accent-ink); border: 1.5px solid var(--accent); background: var(--accent-light); }
.kh-report:hover, .kh-report:focus-visible { background: var(--accent); }
body[data-sec="tool"] { --sec-lt: var(--accent); --sec-ui: var(--accent-ink); }
body[data-sec="kh"] { --sec-lt: var(--sky); --sec-ui: var(--blue); --sec-ui2: var(--blue-bright); --sec-tint: var(--blue-tint); --sec-hero: var(--ink-700); }
/* <<< RECOLOUR: end of generated block <<< */

/* ============================== 3. DESIGN ============================== */

/* ---- Type ---------------------------------------------------------------------------------------------- */
body {
  font-family: var(--font-body);
  font-feature-settings: "tnum" 1;      /* figures line up in columns everywhere (budget, cash-flow tables) */
  letter-spacing: 0;
}
.brand-text .brand-name, .hero h1, .pillars-section h2, .pillar-card h3, .members-section h2, .member-name, .card-title,
.otp-panel-title, .otp-panel #fotp, .highlight-value, .retrofit-label, .cta-text h3, .free-band-text h2, .join-dialog h2,
.kh-hero h1, .kh-sec-head h2, .kh-card > strong, .kh-group > summary, .kh-info h3, .kh-soon strong, .kh-band h2,
.pillar-panel h3, .kpi-value, .epc-tile-val, .epc-out-val, .carbon-value, .ct-hero h1, .policy h1, .policy h2, .about h2,
.about-sub, .errpage h1, .cond-h, .rvw-head h2 {
  font-family: var(--font-display);
}
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="url"], textarea, select,
.btn, .bill-words, .join-form input[type="url"], .fx-picker select, .sub-edit, .soc {
  font-family: var(--font-body);
}
/* Labels were upper-case with wide tracking. Sentence case reads faster, and Thai has no capitals to begin with. */
label, .highlight-label, .kpi-label, .epc-tile-label, .epc-out-label, .carbon-label, .label-xs {
  text-transform: none;
  letter-spacing: 0;
}
label { font-size: 13.5px; font-weight: 600; color: var(--txt); margin-bottom: 7px; }
.label-xs, .location-grid label, .location-row label {
  font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--txt); margin-bottom: 6px;
}
.help-text, .retrofit-note, .card-subtitle { color: var(--txt-secondary); }
a { color: var(--blue); }
:focus-visible { outline: 3px solid rgba(var(--blue-rgb), .55); outline-offset: 2px; }

/* ---- Header -------------------------------------------------------------------------------------------- */
.header {
  background: var(--night);
  box-shadow: none;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  padding-top: 10px; padding-bottom: 10px;
}
.header::before { display: none; }
.logo-img { height: 44px; filter: none; border-radius: 8px; }
.brand-text .brand-name { background: none; -webkit-text-fill-color: #fff; color: #fff; font-weight: 700; letter-spacing: .01em; }
.brand-subtitle { color: rgba(255, 255, 255, .62); letter-spacing: .02em; text-transform: none; font-weight: 500; }
.header-link { opacity: .78; font-weight: 500; transition: opacity .15s ease, border-color .15s ease; }
.header-link:hover { opacity: 1; }
.header-link[aria-current="page"] { opacity: 1; border-bottom-color: var(--accent); }
.header-join {
  background: var(--accent); color: var(--night); border-radius: var(--radius-md); font-weight: 600;
  box-shadow: none; padding: 9px 18px;
}
.header-join:hover { background: #FF8D2B; transform: none; }
/* Phones: logo, name and the Menu button on ONE row (the strapline pushed the button onto a second row). */
@media (max-width: 600px) {
  .header { flex-direction: row; align-items: center; padding: 10px 14px; row-gap: 8px; }
  .logo-img { height: 38px; }
  .brand-subtitle { display: none; }
}

/* ---- Hero: the sky before sunrise, with the estimate where the sun comes up -------------------------------- */
.hero {
  text-align: left;
  padding: 0;
  isolation: isolate;
  background:
    radial-gradient(58% 80% at 86% 112%, rgba(253, 185, 46, .62) 0%, rgba(250, 122, 10, .46) 24%, rgba(250, 122, 10, 0) 60%),
    radial-gradient(46% 56% at 6% 0%, rgba(108, 203, 247, .13) 0%, rgba(108, 203, 247, 0) 72%),
    linear-gradient(168deg, var(--night) 0%, var(--ink-900) 40%, var(--ink-800) 74%, var(--ink-700) 100%);
}
/* A few stars on the night side, fading out toward the dawn -- the left half of the mark. */
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 4% 16%, rgba(255, 255, 255, .95) 50%, transparent 52%),
    radial-gradient(1px 1px at 11% 58%, rgba(255, 255, 255, .7) 50%, transparent 52%),
    radial-gradient(1.6px 1.6px at 19% 9%, rgba(255, 255, 255, .85) 50%, transparent 52%),
    radial-gradient(1px 1px at 27% 34%, rgba(255, 255, 255, .6) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 34% 78%, rgba(255, 255, 255, .55) 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 41% 13%, rgba(255, 255, 255, .8) 50%, transparent 52%),
    radial-gradient(1px 1px at 48% 46%, rgba(255, 255, 255, .5) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 55% 7%, rgba(255, 255, 255, .6) 50%, transparent 52%),
    radial-gradient(1px 1px at 63% 26%, rgba(255, 255, 255, .4) 50%, transparent 52%);
  -webkit-mask-image: linear-gradient(100deg, #000 0%, #000 30%, transparent 66%);
  mask-image: linear-gradient(100deg, #000 0%, #000 30%, transparent 66%);
}
/* The sun, half above the horizon (the hero's bottom edge). */
.hero::after {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  left: auto; top: auto; right: 5%; bottom: -270px; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, #FFEBB0 0%, #FDB92E 36%, #FA7A0A 66%, rgba(250, 122, 10, 0) 70%);
  opacity: .9;
}
.hero-inner {
  max-width: 1180px; margin: 0 auto; padding: 40px 28px 56px;
  /* start, not center: the quick-estimate card is taller than the text, so centring pushed the heading ~120px down
     and the intro text off the first screen. The text now starts level with the top of the card. */
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, 410px); gap: 64px; align-items: start;
}
.hero-content { max-width: none; margin: 0; padding-top: 14px; }
/* The hero fills the first screen: it is as tall as the visible area under the header, so the next section (the 1-2-3
   step bar) is not seen peeking in at the bottom. --hero-offset is the height of what sits above it (the header; the
   red demo bar too on a local demo page). The cap keeps it from becoming huge on a very tall window (1000 px). The content block
   is centred in the space; the two columns inside still start level with each other. */
:root { --hero-offset: 67px; }
body:has(#demoBar) { --hero-offset: 116px; }
.hero {
  display: flex; align-items: center;
  min-height: min(calc(100vh - var(--hero-offset)), 1000px);
  min-height: min(calc(100svh - var(--hero-offset)), 1000px);
}
.hero-inner { width: 100%; }
.hero h1 {
  font-size: clamp(34px, 4.2vw, 54px); font-weight: 700; line-height: 1.05; letter-spacing: -.022em;
  margin: 0 0 16px; max-width: 13ch; text-shadow: none;
}
.hero p { font-size: 17px; line-height: 1.6; max-width: 58ch; margin: 0 0 22px; color: rgba(255, 255, 255, .84); }
.hero p.hero-note { font-size: 14px; line-height: 1.55; color: rgba(255, 255, 255, .6); font-style: normal; margin: 0 0 26px; }
.hero-trust { justify-content: flex-start; gap: 10px 26px; margin: 0; }
.trust-item {
  background: none; border: 0; padding: 0; border-radius: 0; backdrop-filter: none;
  font-size: 13.5px; font-weight: 500; color: rgba(255, 255, 255, .8);
}
.trust-item::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: none; }
.trust-icon { display: none; }
/* "Go straight to the full assessment": a real button (outlined, so the orange stays for the Quick estimate action),
   not a text link, with a down chevron drawn in CSS because the target is further down the page. */
.hero-skip {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 22px;
  padding: 13px 22px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, .85);
  background: rgba(255, 255, 255, .1); color: #fff; font-weight: 600; font-size: 16px; line-height: 1.2; text-decoration: none;
  transition: background-color .15s, color .15s, border-color .15s;
}
.hero-skip::after {
  content: ''; width: 9px; height: 9px; flex: none; margin-top: -3px;
  border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.hero-skip:hover { background: #fff; border-color: #fff; color: var(--txt); }
.hero-skip:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* Quick estimate card */
.ql {
  background: #fff; color: var(--txt); border-radius: var(--radius-xl); padding: 22px 24px 20px;
  box-shadow: 0 30px 70px -28px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .5);
}
.ql h2 { font-family: var(--font-display); font-size: 21px; font-weight: 700; line-height: 1.2; margin: 0 0 4px; }
.hero .ql p { max-width: none; }
.hero .ql p.ql-sub { font-size: 13.5px; color: var(--txt-secondary); margin: 0 0 18px; line-height: 1.5; }
.ql-fields { display: grid; gap: 10px; }
.ql-field label { margin-bottom: 5px; }
.ql-out { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin: 14px 0 4px; padding-top: 14px; border-top: 1px solid var(--border); }
.ql-stat b { display: block; font-family: var(--font-display); font-size: 25px; font-weight: 700; line-height: 1.1; color: var(--txt); white-space: nowrap; }
.ql-stat span { display: block; font-size: 12.5px; color: var(--txt-secondary); margin-top: 3px; }
.ql-stat.ql-wide { grid-column: 1 / -1; }
.ql-stat.ql-wide b { color: var(--accent-ink); }
.hero .ql p.ql-note { font-size: 12.5px; line-height: 1.5; color: var(--txt-secondary); margin: 10px 0 16px; }
.ql .btn-primary { margin-top: 0; }
/* Continue takes the room; Reset is the smaller second action beside it (wraps under it on very narrow screens). */
.ql-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ql-actions .btn-primary { flex: 1 1 200px; }
.ql-actions .btn-secondary { flex: 0 0 auto; margin-top: 0; }
.ql-empty .ql-stat b { color: var(--txt-muted); }
/* Example state: the bill box is empty and its grey placeholder (150,000) is what the figures are calculated from.
   The figures are greyed to match, with a one-line caption, and turn to normal ink once the visitor types their own bill. */
.hero .ql p.ql-eg { display: none; grid-column: 1 / -1; margin: 0; font-size: 12px; font-weight: 600; color: var(--txt-muted); }
.hero .ql.ql-example p.ql-eg { display: block; }
.ql-example .ql-stat b, .ql-example .ql-stat.ql-wide b { color: var(--txt-muted); }

/* Short screens (laptops, small windows): the card shrinks in steps so the whole of it, button included, stays on the
   first screen next to the heading. Only the two-column layout needs this; below 940 px wide the card sits under the
   text and is reached by scrolling. Heights are the browser's visible area, not the monitor's. */
@media (min-width: 941px) and (max-height: 800px) {
  .hero-inner { padding-top: 28px; padding-bottom: 36px; }
  .ql { padding: 18px 22px 16px; }
  .ql h2 { font-size: 19px; }
  .hero .ql p.ql-sub { font-size: 13px; margin-bottom: 12px; }
  .ql-fields { gap: 8px; }
  .ql-field label { margin-bottom: 3px; font-size: 13px; }
  .ql-field input, .ql-field select { padding-top: 8px; padding-bottom: 8px; font-size: 15px; }
  .ql-out { margin: 12px 0 4px; padding-top: 12px; gap: 10px 14px; }
  .ql-stat b { font-size: 22px; }
  .ql-stat span { font-size: 12px; margin-top: 2px; }
  .hero .ql p.ql-note { font-size: 12px; margin: 8px 0 12px; }
  .ql .btn-primary, .ql .btn-secondary { padding-top: 11px; padding-bottom: 11px; }
}
@media (min-width: 941px) and (max-height: 690px) {
  .hero-inner { padding-top: 20px; padding-bottom: 24px; }
  .hero .ql p.ql-sub { display: none; }
  .ql-out { margin-top: 10px; padding-top: 10px; gap: 8px 14px; }
  .ql-stat b { font-size: 20px; }
  .hero .ql p.ql-note { font-size: 11.5px; line-height: 1.4; margin: 6px 0 10px; }
  .ql-field input, .ql-field select { padding-top: 6px; padding-bottom: 6px; }
}

@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; gap: 34px; padding: 44px 20px 52px; }
  .hero h1 { max-width: 16ch; }
  .hero::after { right: -90px; bottom: -300px; }
  .hero p.hero-note { display: none; }
}
@media (max-width: 520px) {
  .hero-inner { padding: 34px 16px 44px; }
  .hero p { font-size: 16px; }
  .ql { padding: 20px 18px; }
  .ql-stat b { font-size: 22px; }
}

/* ---- Steps ---------------------------------------------------------------------------------------------- */
.progress-section { scroll-margin-top: 84px; padding-top: 36px; }
.step-circle {
  width: 38px; height: 38px; font-family: var(--font-display); font-weight: 700; font-size: 16px;
  background: #fff; border: 1.5px solid var(--border-strong); color: var(--txt-muted); box-shadow: none;
}
.step.active .step-circle { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: 0 0 0 5px rgba(var(--blue-rgb), .16); transform: none; }
.step.completed .step-circle { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: none; }
.step-label { font-size: 13.5px; text-transform: none; letter-spacing: 0; width: auto; white-space: nowrap; }
@media (max-width: 520px) { .step-label { font-size: 12px; white-space: normal; width: 84px; } }
.step.active .step-label { color: var(--txt); font-weight: 600; }
.step.completed .step-label { color: var(--txt-secondary); }

/* ---- Cards and form controls ---------------------------------------------------------------------------- */
.card { border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow-md); padding: 30px; }
.card:hover { box-shadow: var(--shadow-md); }
.card-title { font-size: 21px; font-weight: 700; letter-spacing: -.005em; }
.card-subtitle { font-size: 14.5px; margin-bottom: 22px; padding-left: 0; }   /* was indented to clear the icon */
/* Emoji stood in for icons. They render differently on every device and do not suit a lender's or an investor's
   screen; the headings carry the page on their own. (Screen only: the print layout is untouched.) */
@media screen {
  .card-icon, .kpi-icon, .om-icon, .pillar-li-icon, .rvw-icon, .shading-btn .retrofit-label, .btn-download > span { display: none; }
}

input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="url"], textarea, select, .country-code-select {
  border: 1.5px solid var(--border-strong); background: #fff; box-shadow: none; border-radius: var(--radius-md);
  padding: 12px 14px; font-size: 15.5px; font-weight: 400; color: var(--txt); transform: none;
  /* A stated line height: with the default ("normal") a drop-down list took its height from whichever font had
     arrived when it was first laid out, so the same page came out 1px different from one load to the next. */
  line-height: 1.3;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="text"]:hover, input[type="email"]:hover, input[type="tel"]:hover, input[type="number"]:hover, input[type="url"]:hover,
textarea:hover, select:hover, .country-code-select:hover {
  background: #fff; border-color: var(--txt-muted); box-shadow: none; transform: none;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus, input[type="number"]:focus, input[type="url"]:focus,
textarea:focus, select:focus, .country-code-select:focus {
  background: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(var(--blue-rgb), .16); transform: none; outline: none;
}
select, .country-code-select, select:hover, select:focus, .country-code-select:hover, .country-code-select:focus {
  -webkit-appearance: none; appearance: none; padding-right: 40px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%230A1B45' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px;
}
select:disabled { background-color: var(--bg); color: var(--txt-muted); cursor: progress; }
/* The calling-code list was capped at 160px, which cut "+66 (Thailand)" short. Wide enough for it on a desktop;
   on a phone it stays narrow so the number field beside it keeps its room (the "+66" is what must stay visible). */
.country-code-select { max-width: 204px; }
@media (max-width: 600px) { .country-code-select { max-width: 150px; } }
::placeholder { color: #8791AE; opacity: 1; }
input[type="checkbox"] { accent-color: var(--blue); }

.consent-box { background: var(--blue-tint); border: 1px solid rgba(var(--blue-rgb), .22); color: var(--txt); }
.consent-box label, .inline-check { font-weight: 500; }

/* Buttons: one orange action per screen; everything else is quiet. */
.btn { border-radius: var(--radius-md); font-weight: 600; font-size: 15.5px; letter-spacing: 0; }
.btn-primary {
  background: var(--accent); color: var(--night);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 22px -10px rgba(var(--accent-rgb), .85);
}
.btn-primary::before { display: none; }
.btn-primary:hover { background: #FF8D2B; transform: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 12px 26px -10px rgba(var(--accent-rgb), .95); }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary { background: #fff; color: var(--txt); border: 1.5px solid var(--border-strong); box-shadow: none; }
.btn-secondary:hover { border-color: var(--txt); background: #fff; transform: none; }

/* Choices (building type, retrofit level, shading, O&M package): selected = sky blue, never a dark fill. */
.choice-btn { border: 1.5px solid var(--border); border-radius: var(--radius-lg); box-shadow: none; padding: 14px 14px 16px; }
.choice-btn::after { display: none; }
.choice-btn:hover { border-color: var(--txt-muted); transform: none; box-shadow: none; }
.choice-btn.selected, .choice-btn.selected:hover {
  background: var(--blue-tint); border-color: var(--blue); box-shadow: 0 0 0 3px rgba(var(--blue-rgb), .16); transform: none;
}
.choice-btn.selected .choice-label { color: var(--blue-dark); }
.choice-btn.selected .choice-desc { color: var(--txt-secondary); }
.choice-img { border-radius: var(--radius-md); }
.retrofit-btn, .om-card { border: 1.5px solid var(--border); border-radius: var(--radius-md); }
.retrofit-btn:hover, .om-card:hover { border-color: var(--txt-muted); transform: none; }
.retrofit-btn.selected, .om-card.selected { background: var(--blue-tint); border-color: var(--blue); box-shadow: 0 0 0 3px rgba(var(--blue-rgb), .16); }
.retrofit-label { font-size: 19px; font-weight: 700; }
.shading-btn .retrofit-desc { font-size: 14px; font-weight: 600; color: var(--txt); }
.om-name { font-family: var(--font-display); font-weight: 700; }
.om-cost { color: var(--accent-ink); font-weight: 600; }

/* ---- Results --------------------------------------------------------------------------------------------- */
/* Headline figures: night tiles, figures in sun gold. */
.highlight-item {
  background: linear-gradient(160deg, var(--ink-900), var(--ink-800)); border: 0; border-radius: var(--radius-lg);
  padding: 22px 18px; text-align: left; box-shadow: none;
}
.highlight-item::before { display: none; }
.highlight-item:hover { transform: none; box-shadow: none; }
.highlight-value { color: var(--gold); font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; }
.highlight-label { color: rgba(255, 255, 255, .74); font-size: 13px; font-weight: 500; }

.bar-track { background: var(--primary-light); }
.bar-fill { background: linear-gradient(90deg, var(--accent), var(--gold)); }

/* Detail tiles: plain, left-aligned, no coloured caps. The nine section colours are gone on purpose: nine hues cannot
   work as a legend, and each block already carries its section name as text. */
.kpi-card { text-align: left; border-radius: var(--radius-md); box-shadow: none; padding: 16px 16px 14px; }
.kpi-card::before, .kpi-card[data-sec-on]::before { display: none; }
.kpi-card:hover { transform: none; box-shadow: none; border-color: var(--border); }
.kpi-card[data-sec-on] { border-color: var(--border); }
.kpi-value { font-size: clamp(18px, 2vw, 23px); font-weight: 700; color: var(--txt); margin-bottom: 5px; }
.kpi-card.accent .kpi-value { color: var(--accent-ink); }
.kpi-label { font-size: 12.5px; color: var(--txt-secondary); line-height: 1.35; }

[data-sec-on], .sec-opt[data-secid], .sec-pill[data-secid] { --sec: var(--blue); --sec-rgb: var(--blue-rgb); }
.card[data-sec-on], .sec-wrap > .card { border-top: 1px solid var(--border); }
tr[data-sec-on] > td:first-child { box-shadow: none; }
.sec-pill { background: var(--blue-tint); border-color: transparent; color: var(--blue-dark); font-weight: 600; }
.sec-pill::before { display: none; }
#sectionPanel .sec-opt { border: 1.5px solid var(--border); border-left-width: 1.5px; border-radius: var(--radius-md); }
#sectionPanel .sec-opt b { color: var(--txt); font-weight: 600; }
#sectionPanel .sec-opt small { text-transform: none; letter-spacing: 0; color: var(--txt-secondary); font-size: 12.5px; }
#sectionPanel .sec-opt:has(input:checked) { background: var(--blue-tint); border-color: var(--blue); box-shadow: none; }
.sec-picker legend { font-family: var(--font-display); font-weight: 700; font-size: 18px; }

.chart-card h4, .chart-container h4, .coverage-bar h4 { font-family: var(--font-display); font-weight: 700; }
.sub-card { background: #fff; color: var(--txt); }

/* ---- Bands below the tool -------------------------------------------------------------------------------- */
.free-band { border-top: 1px solid var(--border); }
.free-band-text h2, .pillars-section h2, .members-section h2 { font-weight: 700; letter-spacing: -.01em; }
.pillar-card { border-radius: var(--radius-lg); box-shadow: none; padding: 22px 20px 24px; }
.pillar-card::before, .pillars-section::before { display: none; }
.pillar-card:hover { transform: none; box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.pillar-card:hover .pillar-logo { transform: none; }
.pillar-link { color: var(--blue); }
.partner-item { border-radius: var(--radius-md); box-shadow: none; }

/* ---- Footer, drawer, toasts ------------------------------------------------------------------------------ */
.site-footer { background: var(--night); color: rgba(255, 255, 255, .7); }
.site-footer a { color: rgba(255, 255, 255, .78); }
.site-footer a:hover { color: #fff; }
.pillar-toggle { background: var(--ink-800); border-radius: var(--radius-md) var(--radius-md) 0 0; }
.pillar-toggle:hover { background: var(--ink-700); }
.pillar-toggle-arrow { color: var(--ink-800); }
.pillar-drawer { border-color: var(--ink-800); }
.report-jump { background: var(--accent); color: var(--night); }
/* quicklook.js sets body.hero-visible while the hero is on screen: the fixed "More on the IDN69 platform" tab would
   otherwise sit on top of the quick-estimate button. It comes back as soon as the visitor scrolls to the form. */
body.hero-visible .pillar-footer.show { display: none; }

/* ---- Contrast: every text/background pair meets WCAG AA (4.5:1, or 3:1 for large text) ------------------------ */
/* Bright orange is for fills, borders and large figures: as small text on a light surface --accent measures 2.7:1
   and --accent-dark 3.6:1. Small text that styles.css sets in those tokens moves to --accent-ink (5.7:1 on white),
   and links in running text to --blue (5.9:1). */
.policy a, .policy-toc a, .about a, .consent-note a, .free-band-text a, .crumbs a,
.explore-links a, .explore-foot a { color: var(--blue); }
.policy a:hover, .policy-toc a:hover, .about a:hover, .consent-note a:hover, .free-band-text a:hover, .crumbs a:hover,
.explore-links a:hover, .explore-foot a:hover { color: var(--blue-dark); }
.ct-hero .crumbs a { color: var(--gold); }             /* this trail sits on the dark Contact header */
.bill-words, .ppa-title, .ppa-value, .rec-eyebrow { color: var(--accent-ink); }
.btn-secondary:hover { color: var(--txt); }
.rvw-body .sub-group:nth-child(2), #subBody .sub-group:nth-child(2) { --rc: var(--accent-ink); }
.bar-text { color: var(--primary); }                   /* the percentage inside the orange coverage bar */
.kh-stats strong { color: var(--gold); }               /* figures on the dark Knowledge Hub and Compliance headers */
.ct-btn { background: var(--sec-ui, var(--blue)); }    /* one solid colour: white text failed on the light end of the gradient */
.ct-btn-alt { background: var(--accent); }             /* the orange alternative keeps its own fill under dark text */
.idn69-toast-success { background: #1B8046; }          /* was #1f8a4c, 4.4:1 under white text */

/* ---- Motion: nothing moves unless the visitor acts, and never when they have asked for less ---------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print { .ql, .hero-skip { display: none; } }


/* ---- Type-to-search lists (assets/js/combobox.js): a text box + list in front of every <select> with more than 9 options.
   The real <select> stays in the page, visually hidden (not display:none, so focus and scroll-to-error still reach it). ---- */
.cb { position: relative; display: block; min-width: 0; }
.cb[hidden] { display: none; }
select.cb-native { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; opacity: 0; overflow: hidden; pointer-events: none; }
.cb::after { content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--txt-secondary); border-bottom: 2px solid var(--txt-secondary); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.cb-input { width: 100%; padding-right: 38px; text-overflow: ellipsis; }
.cb-input:disabled { background-color: var(--bg); color: var(--txt-muted); cursor: progress; }
.cb-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; max-height: min(280px, 45vh); overflow-y: auto; padding: 4px; background: #fff; border: 1.5px solid var(--border-strong); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.cb-list[hidden] { display: none; }
.cb-up .cb-list { top: auto; bottom: calc(100% + 4px); }
.cb-opt { padding: 9px 12px; border-radius: 8px; font-size: 15px; line-height: 1.3; color: var(--txt); cursor: pointer; }
.cb-opt.cb-active { background: var(--blue-tint); }
.cb-opt[aria-selected="true"] { font-weight: 700; color: var(--blue-dark); }
.cb-none { padding: 10px 12px; font-size: 14px; color: var(--txt-muted); }
/* The phone-code list is narrow in the form; its dropdown is wider so "+66 (Thailand)" and long country names fit. */
.cb-phone { flex: 0 0 auto; width: 204px; max-width: 204px; }
.cb-phone .cb-list { right: auto; width: 300px; max-width: calc(100vw - 32px); }
@media (max-width: 600px) { .cb-phone { width: 150px; max-width: 150px; } }

/* ==== Quick estimate, richer version (chips, bill slider, live figures, report preview) ====
   Markup in index.php (#quickLook), behaviour in assets/js/quicklook.js. Bar widths and the slider fill are set from JS
   through the CSSOM (el.style), which the strict Content-Security-Policy allows; there are no inline style attributes. */
.ql { position: relative; overflow: hidden; }
.ql::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, var(--accent), var(--gold, #F5A623), #12805c); }
.ql-head { margin-bottom: 14px; }
.ql-badge { display: inline-block; margin-bottom: 8px; padding: 3px 11px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-light); border-radius: 999px; }
.hero .ql p.ql-sub { margin-bottom: 0; }
.ql-field { margin-bottom: 12px; }
.ql-lbl { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.ql-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* facility chips */
.ql-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.ql-chip { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 6px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--txt);
  background: #fff; border: 1.5px solid var(--border); border-radius: 11px; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s, transform .1s; }
.ql-chip:hover { border-color: var(--primary); }
.ql-chip:active { transform: scale(.97); }
.ql-chip[aria-checked="true"] { color: var(--primary); background: var(--primary-light); border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.ql-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* bill slider */
.ql-bill-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ql-bill-top label { margin: 0; }
.ql-bill-out { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--accent-ink); white-space: nowrap; }
.ql-example .ql-bill-out { color: var(--txt-muted); }
.ql-range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0; padding: 0; background: transparent; cursor: pointer; --fill: 50%; }
.ql-range::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--fill), var(--border) var(--fill)); }
.ql-range::-moz-range-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--fill), var(--border) var(--fill)); }
.ql-range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 8px rgba(10, 27, 69, .3); transition: transform .12s; }
.ql-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 8px rgba(10, 27, 69, .3); }
.ql-range:hover::-webkit-slider-thumb, .ql-range:active::-webkit-slider-thumb { transform: scale(1.12); }
.ql-range:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 99px; }
.ql-bill-exact { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.ql-bill-exact label { margin: 0; font-size: 12.5px; font-weight: 500; color: var(--txt-secondary); }
.ql-bill-exact input { width: 150px; padding-top: 7px; padding-bottom: 7px; text-align: right; }

/* live figures */
.ql-out { gap: 12px 16px; }
.ql-hero-stat span { margin: 0 0 2px; font-weight: 600; }
.ql-hero-stat b { font-size: 36px; letter-spacing: -.01em; }
.ql-bars { grid-column: 1 / -1; display: grid; gap: 7px; }
.ql-barrow { display: grid; grid-template-columns: 78px 1fr auto; align-items: center; gap: 9px; font-size: 12.5px; color: var(--txt-secondary); }
.ql-barrow em { min-width: 82px; font-style: normal; font-weight: 700; text-align: right; color: var(--txt); }
.ql-bar { display: block; height: 10px; overflow: hidden; background: var(--border); border-radius: 99px; }
.ql-bar u { display: block; height: 100%; width: 0; border-radius: 99px; text-decoration: none; transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.ql-bar-now u { background: #7e8cb0; }
.ql-bar-sun u { background: #12805c; }
.ql-life { grid-column: 1 / -1; }
.ql-life-track { display: flex; height: 12px; overflow: hidden; background: var(--border); border-radius: 99px; }
.ql-life-track u { display: block; height: 100%; text-decoration: none; transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.ql-life-track u:first-child { background: #7e8cb0; }
.ql-life-track u:last-child { background: #12805c; }
.ql-life-key { display: flex; justify-content: space-between; gap: 8px; margin-top: 5px; font-size: 12px; color: var(--txt-secondary); }
.ql-life-key span:last-child { font-weight: 700; color: #12805c; }
.ql-net b { color: #12805c; font-size: 26px; }
.ql-example .ql-net b, .ql-example .ql-life-key span:last-child { color: var(--txt-muted); }
.ql-example .ql-bar-sun u, .ql-example .ql-life-track u:last-child { opacity: .55; }

/* what the full report adds */
.ql-teaser { margin: 14px 0 4px; padding: 12px 14px; background: linear-gradient(180deg, #f8faff, #f1f5fc); border: 1px dashed #b9c5de; border-radius: 12px; }
.hero .ql p.ql-teaser-h { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--primary); }
.ql-teaser ul { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin: 0; padding: 0; list-style: none; }
.ql-teaser li { display: flex; align-items: flex-start; gap: 6px; font-size: 12.5px; line-height: 1.35; color: var(--txt); }
.ql-lock { flex: none; font-size: 11px; opacity: .7; }

/* call to action */
.ql .btn-primary::after { content: ' \2192'; }
.hero .ql p.ql-micro { margin: 8px 0 0; font-size: 12px; text-align: center; color: var(--txt-secondary); }

@media (max-width: 420px) {
  .ql-hero-stat b { font-size: 30px; }
  .ql-teaser ul { grid-template-columns: 1fr; }
  .ql-bill-exact input { width: 120px; }
}
/* Short laptop screens: keep the first screen to the inputs and the key figures; the report preview moves below the fold. */
@media (min-width: 940px) and (max-height: 880px) {
  .ql-teaser { display: none; }
  .ql-bars { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ql-bar u, .ql-life-track u, .ql-chip, .ql-range::-webkit-slider-thumb { transition: none; }
}

/* Advertisement block in the hero (replaces the old plain headline): typical quote vs IDN69 report. */
.ad-badge { display: inline-block; background: var(--gold); color: #1a1a1a; font-weight: 700; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; margin: 0 0 14px; }
.hero h1 { max-width: 16ch; }
.ad-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 4px 0 20px; max-width: 560px; }
.ad-card { position: relative; border-radius: 14px; padding: 14px 16px 14px; font-size: 13.5px; line-height: 1.4; }
.ad-card h3 { font-family: var(--font-display); font-size: 15px; margin: 10px 0 8px; }
.ad-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ad-card li { padding-left: 20px; position: relative; }
.ad-card li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.ad-them { background: rgba(255, 255, 255, .07); border: 1px dashed rgba(255, 255, 255, .35); color: rgba(255, 255, 255, .7); }
.ad-them h3 { color: rgba(255, 255, 255, .85); }
.ad-them li::before { content: '\2715'; color: #ff9a8a; }
.ad-us { background: #fff; color: var(--txt); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .7); border: 2px solid var(--accent); }
.ad-us h3 { color: var(--primary-dark); }
.ad-us li::before { content: '\2713'; color: #0f8a5f; }
.ad-free { position: absolute; top: -11px; right: 12px; background: var(--accent); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .08em; padding: 4px 11px; border-radius: 999px; }
/* Mini page drawings: one sparse sheet vs a stack of full report pages. */
.ad-page, .ad-stack { height: 54px; position: relative; }
.ad-page { background: rgba(255, 255, 255, .12); border-radius: 6px; padding: 9px 10px; display: grid; gap: 6px; align-content: start; }
.ad-page i { display: block; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .35); }
.ad-page i:first-child { width: 60%; }
.ad-page b { display: block; height: 14px; width: 40%; border-radius: 3px; background: rgba(255, 255, 255, .5); }
.ad-stack i { position: absolute; top: 0; width: 70%; height: 100%; border-radius: 6px; background: #e9eef9; border: 1px solid #c9d3ea; }
.ad-stack i:nth-child(1) { left: 0; top: 6px; }
.ad-stack i:nth-child(2) { left: 14%; top: 3px; background: #f3f6fd; }
.ad-stack i:nth-child(3) { left: 28%; background: #fff; display: flex; align-items: flex-end; gap: 4px; padding: 6px 8px; }
.ad-stack b { flex: 1; border-radius: 2px 2px 0 0; background: var(--accent); }
.ad-stack b:nth-child(1) { height: 35%; } .ad-stack b:nth-child(2) { height: 60%; background: #0f8a5f; } .ad-stack b:nth-child(3) { height: 90%; }
.ad-cta { display: inline-block; background: var(--accent); color: #fff; font-weight: 700; font-size: 16px; padding: 13px 24px; border-radius: 12px; text-decoration: none; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6); margin: 0 0 22px; }
.ad-cta:hover { filter: brightness(1.08); }
.hero .hero-skip { display: none; }
@media (max-width: 520px) { .ad-vs { grid-template-columns: 1fr; } }
.ad-sample { display: inline-block; margin: 0 0 22px 18px; color: #fff; font-weight: 600; font-size: 15px; text-underline-offset: 4px; }
.ad-sample::after { content: ' \2197'; }
.ad-sample:hover { color: var(--gold); }
@media (max-width: 520px) { .ad-sample { margin-left: 0; display: block; } }

/* "Email me the link" opt-in under the Quick estimate. */
.ql-mail { margin-top: 12px; border-top: 1px dashed var(--border, #d7deeb); padding-top: 12px; }
.ql-mail-toggle { background: none; border: 0; padding: 4px 0; color: var(--primary-dark, #1B2A4A); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
#qlMailBox { display: grid; gap: 8px; margin-top: 8px; }
#qlMailBox[hidden] { display: none; }
#qlMailBox label { font-size: 13px; font-weight: 600; }
#qlMailBox input[type=email] { width: 100%; }
.ql-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0; }
.ql-mail-consent { display: flex; gap: 8px; align-items: flex-start; }
.ql-mail-consent input { margin-top: 3px; flex: none; }
.ql-mail-consent label { font-weight: 400; line-height: 1.4; }
.ql-mail-priv { font-size: 13px; }
.ql-mail-msg { margin: 0; font-size: 13px; min-height: 1em; }
.ql-mail-msg.is-bad { color: #b42318; } .ql-mail-msg.is-ok { color: #067647; }
.ql-mail .ql-mail-msg { font-size: 13px; }
