/*
 * site.css — the whole DN69-A design system and page styles, in one hand-written file (no build step).
 *
 * Colours are sampled from the DN69-A logo: cocoa disc, leaf-green "6", peach "9", gold "A".
 * Type: Archivo (slightly wide, heavy) for headings, echoing the wide logo lettering; IBM Plex Sans with
 * IBM Plex Sans Thai for text, so English and Thai sit together on the Quick Assessment.
 * Layout: white pages, left-aligned, one 1120px column; cocoa and peach bands separate major sections.
 *
 * Order: 1 tokens, 2 base, 3 layout helpers, 4 header/footer, 5 components, 6 pages, 7 Quick Assessment,
 * 8 selection bar, 9 small screens, 10 print and reduced motion.
 * CSP note: views must not use style="" attributes; add a class here instead.
 */

/* ---- 1. tokens ---------------------------------------------------------------------------------- */
:root {
  --cocoa: #3A1D0D;        /* logo disc: headings, dark bands, primary dark button */
  --cocoa-2: #5C3520;
  --ink: #2B1A10;          /* body text */
  --muted: #6A5546;        /* secondary text, 5.9:1 on white */
  --leaf: #22802A;         /* action colour, white text passes 4.5:1 */
  --leaf-dark: #1A6521;
  --leaf-soft: #E7F4E2;
  --gold: #E3A416;         /* accent: highlights, selection bar, never body text on white */
  --gold-text: #8A5A00;    /* gold that is readable as text on white */
  --peach: #FCEDE0;        /* soft band and panel tint */
  --peach-2: #F3D5BD;
  --line: #E8D8CA;
  --white: #fff;
  --head: "Archivo", "Arial Narrow", "IBM Plex Sans Thai", Arial, sans-serif;
  --text: "IBM Plex Sans", "IBM Plex Sans Thai", "Noto Sans Thai", "Segoe UI", system-ui, sans-serif;
  --r: 6px;                /* controls */
  --r-lg: 14px;            /* panels */
  --shadow: 0 1px 2px rgba(58, 29, 13, .06), 0 10px 28px rgba(58, 29, 13, .09);
}

/* ---- 2. base ------------------------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 1.0625rem/1.6 var(--text); }
h1, h2, h3, p, ul, ol, dl, dd, blockquote, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--head); font-stretch: 108%; color: var(--cocoa); line-height: 1.1; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: 0; line-height: 1.25; }
h2 small, h3 small { display: block; margin-top: .3rem; font: 400 .9rem/1.4 var(--text); color: var(--muted); letter-spacing: 0; }
a { color: var(--leaf-dark); text-underline-offset: .18em; }
a:hover { color: var(--cocoa); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 3px; }
b, strong { font-weight: 600; }
input, select, textarea, button { font: inherit; color: inherit; }
input[type="search"], input[type="text"], select, textarea {
  width: 100%; padding: .7rem .85rem; background: var(--white); border: 1.5px solid var(--peach-2); border-radius: var(--r);
}
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--cocoa); }
input[type="checkbox"] { width: 1.25rem; height: 1.25rem; accent-color: var(--leaf); flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--cocoa); color: #fff; padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: 0; }

/* ---- 3. layout helpers -------------------------------------------------------------------------- */
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.pad { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.narrow { max-width: 780px; }
.pad > h2 { margin-top: 3rem; }
.pad > .panel, .pad > .two + .panel { margin-top: 1.25rem; }
.pad > h2:first-child, .pad > h1 + h2 { margin-top: 0; }
.lead { margin-top: .9rem; max-width: 46rem; font-size: 1.16rem; line-height: 1.55; color: var(--cocoa-2); }
.pad > p:not([class]) { margin-top: 1rem; max-width: 46rem; }
.fine { margin-top: .9rem; max-width: 52rem; font-size: .875rem; line-height: 1.5; color: var(--muted); }
.note { margin-top: 1.5rem; padding: 1rem 1.2rem; max-width: 52rem; background: var(--leaf-soft); border-left: 4px solid var(--leaf); border-radius: 0 var(--r) var(--r) 0; font-size: .95rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.6rem; }
.two, .three, .split { display: grid; gap: 1.25rem; margin-top: 1.75rem; }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); margin-top: 0; align-items: start; }
.band-peach { background: var(--peach); }
.band-brown { background: var(--cocoa); color: #F6E3D2; }
.band-brown h2 { color: #fff; }
.crumbs { margin-bottom: 1.1rem; font-size: .9rem; color: var(--muted); }

/* ---- 4. header and footer ----------------------------------------------------------------------- */
.proto { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .35rem .75rem; margin: 0; background: var(--cocoa); color: #fff; text-align: center; font-size: 1rem; font-weight: 600; line-height: 1.35; padding: .6rem 1rem; border-bottom: 4px solid var(--gold); }
.proto-tag { background: var(--gold); color: var(--cocoa); padding: .1rem .7rem; border-radius: 999px; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
html[lang="th"] .proto-tag { letter-spacing: 0; text-transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.site-head { background: var(--white); border-bottom: 1px solid var(--line); }
/* Header height shrinks on short screens so the menu and the whole hero stay in view on laptops (see section 6b). */
:root { --head-h: clamp(68px, 11vh, 92px); --proto-h: 45px; }
body.no-proto { --proto-h: 0px; }
.head-row { display: flex; align-items: center; gap: 1.5rem; min-height: var(--head-h); }
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; flex: none; }
.brand > img { width: calc(var(--head-h) - 16px); height: calc(var(--head-h) - 16px); }
.brand-by { display: grid; gap: .1rem; font-size: .68rem; line-height: 1.2; color: var(--muted); }
.brand-by img { width: 64px; height: auto; }
.main-nav { display: flex; gap: 1.5rem; margin-left: auto; font-weight: 500; font-size: .98rem; }
.main-nav a { color: var(--cocoa); text-decoration: none; padding-block: .4rem; border-bottom: 3px solid transparent; }
.main-nav a:hover { border-color: var(--peach-2); }
.main-nav a[aria-current] { border-color: var(--gold); }
.site-foot { background: var(--cocoa); color: #EBD2BE; font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr auto; gap: 2.5rem; padding-block: 3rem 2.2rem; }
.site-foot a { color: #fff; }
.site-foot li { margin-top: .35rem; }
.foot-name { font: 800 1.5rem/1 var(--head); font-stretch: 112%; color: #fff; margin-bottom: .5rem; }
.foot-h { font-weight: 600; color: var(--gold); margin-bottom: .3rem; }
.foot-grid > div:first-child p + p { margin-top: .4rem; }
.foot-logos { display: flex; gap: .8rem; align-items: center; align-self: start; }
.foot-logos img { background: #fff; border-radius: 10px; padding: .4rem; box-sizing: content-box; }
.foot-line { border-top: 1px solid var(--cocoa-2); text-align: center; padding: 1rem; font-size: .85rem; }

/* ---- 5. components ------------------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .72rem 1.25rem; border: 2px solid transparent;
  border-radius: var(--r); font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer; text-align: center;
}
.btn-gold { background: var(--gold); color: var(--cocoa); border-color: var(--cocoa); box-shadow: 0 2px 0 var(--cocoa); }
.btn-gold:hover { background: #F0B52E; color: var(--cocoa); }
.btn-lg { padding: .95rem 1.7rem; font-size: 1.125rem; }
.btn-leaf { background: var(--leaf); color: #fff; }
.btn-leaf:hover { background: var(--leaf-dark); color: #fff; }
.btn-brown { background: var(--cocoa); color: #fff; }
.btn-brown:hover { background: var(--cocoa-2); color: #fff; }
.btn-line { background: transparent; border-color: var(--cocoa); color: var(--cocoa); }
.btn-line:hover { background: var(--cocoa); color: #fff; }
.btn-light { background: #fff; color: var(--cocoa); }
.btn-light:hover { background: var(--peach); color: var(--cocoa); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.wide { width: 100%; margin-top: .8rem; }
.linkish { background: none; border: 0; padding: 0; color: var(--leaf-dark); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.linkish.on-dark { color: #fff; }

/* Service codes (BDM-01, S04) are real identifiers clients quote back to us, so they get one fixed look. */
.code { display: inline-block; font: 700 .82em/1 var(--head); font-stretch: 100%; letter-spacing: .03em; color: var(--gold-text); background: #FFF4D6; padding: .28em .5em; border-radius: 4px; white-space: nowrap; vertical-align: .08em; }
.code-lg { font-size: 1rem; margin-bottom: .8rem; }
.ghg { color: var(--leaf); cursor: help; }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem; }
.band-peach .panel { border-color: var(--peach-2); }
.panel > * + * { margin-top: .8rem; }
.panel-gold { border: 2px solid var(--gold); background: #FFFBF0; }
.range { font: 700 1.3rem/1.25 var(--head); color: var(--cocoa); }
.range span { display: block; font: 400 .9rem/1.4 var(--text); color: var(--muted); }

.ticks li { position: relative; padding-left: 1.7rem; margin-top: .6rem; }
.ticks li::before { content: ""; position: absolute; left: .15rem; top: .42em; width: .85rem; height: .45rem; border-left: 3px solid var(--leaf); border-bottom: 3px solid var(--leaf); transform: rotate(-45deg); }
.ticks.cols { columns: 2; column-gap: 3rem; margin-top: 1.2rem; max-width: none; }
.ticks.cols li { break-inside: avoid; }
.plain li { margin-top: .3rem; }

.num-list { counter-reset: n; display: grid; gap: 1.1rem; }
.num-list li { counter-increment: n; display: grid; grid-template-columns: 2.4rem 1fr; column-gap: .9rem; }
.num-list li::before { content: counter(n); grid-row: span 2; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--cocoa); color: var(--gold); font: 800 1.1rem var(--head); }
.num-list b { align-self: start; color: var(--cocoa); }
.num-list li { align-items: start; }
.num-list span { grid-column: 2; color: var(--cocoa-2); font-size: .97rem; }
.num-list.row { grid-template-columns: repeat(3, 1fr); margin-top: 1.2rem; }

.table-wrap { overflow-x: auto; margin-top: 1.5rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.narrow-table { max-width: 34rem; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
caption { text-align: left; padding: .9rem 1rem .2rem; font-weight: 600; color: var(--cocoa); }
th, td { padding: .7rem 1rem; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
thead th { border-top: 0; background: var(--cocoa); color: #fff; font-weight: 600; font-size: .85rem; white-space: nowrap; }
caption + thead th { border-top: 0; }
tbody th { font-weight: 600; color: var(--cocoa); }
tbody th a { color: inherit; text-decoration: none; }
tbody th a:hover { text-decoration: underline; }
tbody th small { font-weight: 400; color: var(--muted); }
.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.faq details { border-bottom: 1px solid var(--peach-2); }
.faq summary { cursor: pointer; padding: 1rem 2rem 1rem 0; font-weight: 600; color: var(--cocoa); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .2rem; top: .75rem; font: 500 1.5rem/1 var(--head); color: var(--gold-text); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 2rem 1.1rem 0; color: var(--cocoa-2); }
.faq { margin-top: 1rem; }

/* Service rows: explorer, segment pages and related lists all use this one pattern. */
.svc-list { margin-top: 1.25rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; overflow: hidden; }
.svc { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: start; padding: 1rem 1.15rem; border-top: 1px solid var(--line); }
.svc:first-child, .svc[hidden] + .svc:not([hidden]) { border-top-color: transparent; }
.svc[hidden] { display: none; }
.svc.is-picked { background: var(--leaf-soft); }
.svc-pick { padding-top: .2rem; cursor: pointer; }
.svc-title a { font-weight: 600; color: var(--cocoa); text-decoration: none; margin-left: .25rem; }
.svc-title a:hover { text-decoration: underline; }
.svc-desc { margin-top: .25rem; font-size: .93rem; color: var(--muted); }
.svc-fee { display: grid; justify-items: end; text-align: right; font-size: .82rem; color: var(--muted); white-space: nowrap; }
.svc-fee b { font: 700 1.05rem var(--head); color: var(--cocoa); }
.svc-fee .fit { margin-top: .2rem; }

/* The ladder: three stages as rising steps. Height carries the meaning (each stage builds on the last). */
.ladder { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; align-items: stretch; }
.rung { display: flex; flex-direction: column; gap: .7rem; padding: 1.4rem; background: #fff; border-radius: 0 0 var(--r-lg) var(--r-lg); border-top: 8px solid var(--leaf); box-shadow: var(--shadow); }
.rung-1 { margin-top: 5rem; }
.rung-2 { margin-top: 2.5rem; border-top-color: var(--gold); }
.rung-3 { border-top-color: var(--cocoa); }
.rung-when { font-weight: 600; font-size: .9rem; color: var(--muted); }
.rung-1 .rung-when { color: var(--leaf-dark); }
.rung-2 .rung-when { color: var(--gold-text); }
.rung-price { margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--line); font-weight: 600; color: var(--cocoa); font-size: .95rem; }

/* ---- 6. pages ----------------------------------------------------------------------------------- */
/* home */
.hero { background: var(--peach); border-bottom: 6px solid var(--gold); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: 2rem; align-items: center; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.9rem); font-stretch: 114%; letter-spacing: -.03em; line-height: 1; }
.hero h1 span { display: block; white-space: nowrap; } /* two deliberate lines, never an orphaned word */
.hero-logo { justify-self: center; width: min(100%, 400px); filter: drop-shadow(0 18px 30px rgba(58, 29, 13, .22)); }
.gap-search { margin-top: 2rem; max-width: 36rem; position: relative; }
.gap-search label { display: block; font-weight: 600; color: var(--cocoa); margin-bottom: .4rem; }
.gap-field { display: flex; gap: .5rem; }
.gap-field input { border-color: var(--cocoa); padding: .85rem 1rem; font-size: 1.08rem; }
.gap-field .btn { flex: none; }
.gap-results { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + .35rem); background: #fff; border: 1.5px solid var(--cocoa); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.gap-results a { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; padding: .65rem .9rem; color: var(--cocoa); text-decoration: none; }
.gap-results li + li { border-top: 1px solid var(--line); }
.gap-results a:hover, .gap-results a:focus-visible { background: var(--leaf-soft); }
.gap-fee { font-size: .9rem; color: var(--muted); white-space: nowrap; }
.gap-none { padding: .65rem .9rem; font-size: .9rem; color: var(--muted); }
.hero-alt { margin-top: 1rem; font-size: .98rem; }
/* Quick Assessment callout in the hero and the floating pill (every page except the assessment). */
.qa-callout { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 1.25rem; padding: 1rem 1.25rem; background: var(--peach); border: 2px solid var(--gold); border-radius: var(--r); }
.qa-callout p { flex: 1 1 18rem; margin: 0; }
.qa-float { position: fixed; z-index: 40; right: 0; top: 50%; transform: translateY(-50%); writing-mode: vertical-rl; padding: 1.1rem .75rem; border-radius: var(--r) 0 0 var(--r); font-size: 1.05rem; font-weight: 700; letter-spacing: .04em; text-decoration: none; background: var(--gold); color: var(--cocoa); border: 2px solid var(--cocoa); border-right: 0; box-shadow: -4px 4px 16px rgba(58, 29, 13, .3); }
.qa-float:hover { background: #F0B52E; color: var(--cocoa); padding-right: 1rem; }
html[lang="th"] .qa-float { letter-spacing: 0; }
/* Phones: same right-edge tab, slimmer, so it never sits on top of the page's buttons. */
@media (max-width: 720px) {
  .qa-float { padding: .8rem .45rem; font-size: .82rem; letter-spacing: .02em; }
  .qa-float:hover { padding-right: .45rem; }
}

/* ---- 6b. laptop / desktop: menu and hero always fit in the first screen ------------------------------ */
@media (min-width: 961px) {
  .hero { display: grid; align-content: center; min-height: calc(100vh - var(--head-h) - var(--proto-h) - 1px); min-height: calc(100svh - var(--head-h) - var(--proto-h) - 1px); }
  .hero h1 { font-size: clamp(2rem, min(5.4vw, 8.2vh), 3.9rem); }
  .hero-grid { padding-block: clamp(1rem, 4vh, 4.5rem); }
  .gap-search { margin-top: clamp(.75rem, 3vh, 2rem); }
  .qa-callout { margin-top: clamp(.75rem, 2.4vh, 1.25rem); padding-block: clamp(.6rem, 1.8vh, 1rem); }
  .hero-logo { width: min(100%, 400px, 46vh); }
}
/* Very short laptop windows (about 600px of page height): tighten the text so nothing is pushed below the fold. */
@media (min-width: 961px) and (max-height: 640px) {
  .hero .lead { font-size: .98rem; line-height: 1.45; }
  .gap-search label { margin-bottom: .2rem; }
  .gap-field input { padding-block: .6rem; }
  .qa-callout { font-size: .95rem; gap: .5rem 1rem; }
  .qa-callout .btn-lg { padding: .6rem 1.2rem; font-size: 1rem; }
}
.seg-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-top: 1.75rem; }
.seg-tile { display: grid; gap: .3rem; align-content: start; height: 100%; padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; color: var(--cocoa-2); font-size: .92rem; line-height: 1.4; background: #fff; }
.seg-tile .code { justify-self: start; margin-bottom: .35rem; }
.seg-tile b { font: 700 1.08rem/1.2 var(--head); color: var(--cocoa); }
.seg-tile small { margin-top: .4rem; font-size: .8rem; color: var(--muted); }
.seg-tile:hover { border-color: var(--cocoa); box-shadow: var(--shadow); color: var(--cocoa-2); }
.essence-word { font: 800 1.7rem/1.1 var(--head); font-stretch: 112%; color: var(--gold); margin-bottom: .6rem; }
.essence-word span { display: block; font: 400 .95rem/1.4 var(--text); color: #EBD2BE; }

/* services explorer */
.filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr) minmax(0, .8fr); gap: .9rem; margin-top: 1.75rem; padding: 1.1rem; background: var(--peach); border-radius: var(--r-lg); }
.filters label span { display: block; font-weight: 600; font-size: .88rem; color: var(--cocoa); margin-bottom: .3rem; }
.f-count { margin-top: 1rem; font-weight: 600; color: var(--cocoa); }
.empty { margin-top: 1rem; padding: 1.5rem; text-align: center; background: var(--peach); border-radius: var(--r-lg); }

/* segment */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.2rem 2rem; margin-top: 1.75rem; padding: 1.3rem 1.5rem; background: var(--peach); border-radius: var(--r-lg); }
.facts dt { font-size: .85rem; color: var(--muted); }
.facts dd { font-weight: 600; color: var(--cocoa); }
.prev-next { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-weight: 600; }

/* service */
.svc-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: start; }
.svc-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; font-size: .88rem; }
.tags span { padding: .3rem .7rem; background: var(--peach); border-radius: 99px; color: var(--cocoa-2); }
.tags .tag-ghg { background: var(--leaf-soft); color: var(--leaf-dark); }
.fee-card { min-width: 17rem; padding: 1.4rem; background: var(--cocoa); color: #EBD2BE; border-radius: var(--r-lg); font-size: .9rem; }
.fee-card .fee { font: 800 2.2rem/1.1 var(--head); font-stretch: 110%; color: #fff; margin-block: .2rem; }
.fee-card .btn { width: 100%; margin-top: 1rem; background: var(--gold); color: var(--cocoa); }
.fee-card .btn:hover { background: #F2B93A; color: var(--cocoa); }
.gap-quote { margin-top: 2rem; padding: 1.4rem 1.6rem; background: var(--peach); border-left: 6px solid var(--gold); border-radius: 0 var(--r-lg) var(--r-lg) 0; font-size: 1.25rem; line-height: 1.45; color: var(--cocoa); max-width: 52rem; }
.gap-quote p { font-size: .88rem; font-weight: 600; color: var(--gold-text); margin-bottom: .3rem; }
.score { color: var(--cocoa-2); }
.score b { font: 800 2.6rem/1 var(--head); color: var(--cocoa); }
.score span { display: block; font-size: .92rem; margin-top: .2rem; }
.dims li { display: grid; grid-template-columns: 1fr auto; gap: .15rem .8rem; margin-top: .85rem; font-size: .92rem; }
.dims svg { grid-column: 1 / -1; width: 100%; height: .6rem; overflow: visible; }
.dims small { grid-column: 1 / -1; color: var(--muted); font-size: .78rem; }
.bar-bg { fill: var(--peach); } .bar-ok { fill: var(--leaf); } .bar-mid { fill: var(--gold); } .bar-low { fill: var(--cocoa-2); } .bar-target { fill: var(--cocoa); }
.q-sample { counter-reset: q; }
.q-sample li { counter-increment: q; display: grid; grid-template-columns: 2rem 1fr; padding: .7rem 0; border-top: 1px solid var(--line); }
.q-sample li::before { content: counter(q); font-weight: 700; color: var(--gold-text); }

/* how it works */
.steps8 { counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-top: 1.75rem; }
.steps8 li { counter-increment: s; display: grid; gap: .3rem; align-content: start; padding: 1.1rem; background: #fff; border-radius: var(--r-lg); font-size: .93rem; color: var(--cocoa-2); }
.steps8 li::before { content: counter(s); font: 800 2rem/1 var(--head); color: var(--gold); }
.steps8 li:nth-child(n+5)::before { color: var(--leaf); }
.steps8 b { font: 700 1.1rem var(--head); color: var(--cocoa); }

/* about */
.entities img { height: 96px; width: auto; }
.motto { margin-top: 1rem; font: 700 1.15rem var(--head); color: var(--gold-text); }
.circle { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-top: 1.5rem; }
.circle li { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: start; padding: 1rem; background: #fff; border-radius: var(--r-lg); }
.ini { display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--cocoa); color: var(--gold); font: 800 .9rem var(--head); }
.circle li:first-child .ini { background: var(--gold); color: var(--cocoa); }
.circle b { display: block; color: var(--cocoa); }
.circle span:not(.ini) { font-size: .85rem; color: var(--muted); line-height: 1.4; display: block; }
.ip-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2rem; margin-top: 1.5rem; }
.ip-list li { padding: 1.3rem 0; border-top: 3px solid var(--cocoa); display: grid; gap: .5rem; align-content: start; font-size: .95rem; }
.ip-serves { font-size: .85rem; color: var(--muted); }

/* contact */
.contact-card { text-decoration: none; color: var(--cocoa-2); }
.contact-card:hover { border-color: var(--cocoa); box-shadow: var(--shadow); color: var(--cocoa-2); }
.contact-card .range { word-break: break-word; }

/* ---- 7. Quick Assessment (class names are used by assets/js/assessment.js) ------------------------ */
.qa-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; padding-block: clamp(2rem, 5vw, 3.5rem); }
.langbar { display: flex; border: 2px solid var(--cocoa); border-radius: var(--r); overflow: hidden; flex: none; }
.langbar button { border: 0; background: transparent; padding: .5rem .95rem; font-weight: 600; cursor: pointer; }
.langbar button[aria-pressed="true"] { background: var(--cocoa); color: #fff; }
.qa-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-bottom: 2.2rem; }
.qa-steps li { padding-bottom: .7rem; border-bottom: 3px solid var(--line); color: var(--muted); font-size: .95rem; }
.qa-steps li span { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; margin-right: .4rem; border-radius: 50%; border: 1.5px solid var(--peach-2); font-size: .8rem; font-weight: 700; }
.qa-steps [aria-current] { border-color: var(--leaf); color: var(--leaf-dark); }
.qa-steps [aria-current] span { background: var(--leaf); border-color: var(--leaf); color: #fff; }
#qa h2:focus { outline: none; }
.context { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-block: 1.5rem; }
.context label, .estimate-head label { font-weight: 600; font-size: .9rem; color: var(--cocoa); }
.context small { font-weight: 400; color: var(--muted); }
.context select { margin-top: .35rem; }
.areas-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.area { display: grid; grid-template-columns: auto 1fr; gap: .75rem; padding: 1rem; border: 1.5px solid var(--line); border-radius: var(--r-lg); cursor: pointer; }
.area:has(input:checked) { border-color: var(--leaf); background: var(--leaf-soft); }
.area strong, .area small { display: block; }
.area strong { color: var(--cocoa); line-height: 1.3; }
.area small { margin-top: .2rem; color: var(--muted); font-size: .86rem; line-height: 1.4; }
.qa-actions { display: flex; justify-content: flex-end; gap: 1rem; align-items: center; margin-top: 1.75rem; }
.split-actions { justify-content: space-between; }
.question-group { margin-top: 1rem; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.question-group summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; background: var(--peach); font: 700 1.08rem var(--head); color: var(--cocoa); cursor: pointer; }
.question-group summary small { font: 400 .85rem var(--text); color: var(--muted); }
.question { display: grid; grid-template-columns: minmax(0, 1fr) 13rem; gap: 1rem; align-items: center; padding: .9rem 1.2rem; border-top: 1px solid var(--line); }
.question strong, .question small { display: block; }
.question strong { font-weight: 500; }
.question small { color: var(--muted); font-size: .84rem; }
.result-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.75rem; margin-top: 1.75rem; align-items: start; }
.match-group + .match-group { margin-top: 1.5rem; }
.match-group h3 { margin-bottom: .5rem; }
.match-row { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; padding: .8rem 0; border-top: 1px solid var(--line); cursor: pointer; }
.match-row strong, .match-row small { display: block; }
.match-row small { color: var(--muted); font-size: .84rem; }
.match-row .fit { display: block; margin-top: .2rem; font-size: .82rem; color: var(--gold-text); }
.match-row .fee { font-weight: 600; color: var(--cocoa); white-space: nowrap; }
.no-match { padding: 1.5rem; background: var(--peach); border-radius: var(--r-lg); }
.estimate { position: sticky; top: 1rem; padding: 1.4rem; background: var(--peach); border-radius: var(--r-lg); border-top: 8px solid var(--gold); }
.estimate-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.estimate-head select { width: auto; margin-left: .3rem; padding: .35rem .5rem; }
.total-price { font: 800 2.3rem/1.1 var(--head); color: var(--cocoa); margin-top: .8rem; }
.prices { margin-top: .8rem; }
.prices div { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-top: 1px solid var(--peach-2); font-size: .93rem; }
.prices dd { font-weight: 600; white-space: nowrap; }
.or-line { text-align: center; margin-top: .6rem; color: var(--muted); font-size: .9rem; }
.estimate details { margin-top: .6rem; font-size: .9rem; }
.estimate details summary { cursor: pointer; color: var(--leaf-dark); }
.estimate textarea { margin-block: .6rem; font-size: .85rem; }
.estimate > .linkish { display: block; margin: 1rem auto 0; font-size: .9rem; }
.delivery { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }

/* ---- 8. selection bar --------------------------------------------------------------------------- */
.basket { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 1.5rem; padding: .85rem 1.25rem; background: var(--cocoa); color: #F6E3D2; border-top: 4px solid var(--gold); box-shadow: 0 -8px 24px rgba(58, 29, 13, .2); }
.basket[hidden] { display: none; }
.basket-sum { max-width: 40rem; font-size: .98rem; line-height: 1.4; }
.basket-sum b { color: #fff; }
.basket-note { font-size: .78rem; color: #D9BBA4; margin-top: .15rem; }
.basket-acts { display: flex; align-items: center; gap: .7rem; flex: none; }
.basket-acts select { width: auto; padding: .55rem .5rem; border-color: transparent; }
.basket-acts .btn { padding: .6rem 1rem; font-size: .95rem; }
body.has-basket { padding-bottom: 6.5rem; }

/* ---- 9. small screens --------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .head-row { flex-wrap: wrap; gap: .4rem 1rem; padding-block: .6rem; }
  /* Menu becomes one swipeable row under the logo: no hamburger, no JavaScript. */
  .main-nav { order: 3; width: 100%; margin: 0; overflow-x: auto; gap: 1.3rem; white-space: nowrap; border-top: 1px solid var(--line); padding-top: .3rem; }
  .seg-grid, .steps8 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .three, .circle, .ip-list, .areas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .result-layout { grid-template-columns: 1fr; }
  .estimate { position: static; }
  .basket { flex-direction: column; align-items: stretch; gap: .6rem; }
  .basket-acts { flex-wrap: wrap; }
  body.has-basket { padding-bottom: 11rem; }
}
@media (max-width: 680px) {
  body { font-size: 1rem; }
  .hero h1 { font-size: 7.3vw; } /* keeps "Any corporate gap." on one line down to 320px */
  .hero-grid, .two, .three, .split, .ladder, .svc-head, .filters, .context, .circle, .ip-list, .areas-grid, .num-list.row { grid-template-columns: 1fr; }
  .hero-logo { display: none; }
  .rung-1, .rung-2 { margin-top: 0; }
  .gap-field { flex-direction: column; }
  .brand > img { width: 60px; height: 60px; }
  .ticks.cols { columns: 1; }
  .svc { grid-template-columns: auto minmax(0, 1fr); }
  .svc-fee { grid-column: 2; justify-items: start; text-align: left; grid-auto-flow: column; gap: .7rem; align-items: baseline; }
  .svc-fee .fit { display: none; }
  .fee-card { min-width: 0; }
  .question { grid-template-columns: 1fr; gap: .5rem; }
  .qa-head { flex-direction: column; align-items: start; }
  .qa-steps li b { display: block; margin-top: .3rem; font-size: .85rem; }
  .foot-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .prev-next { flex-direction: column; }
  .basket-note { display: none; }
  body.has-basket { padding-bottom: 10rem; }
}

/* ---- 9b. language toggle and Thai typography ----------------------------------------------------
   Toggle: two plain links (EN / ไทย) in the header, the current language filled in. Thai: no letter-spacing
   (it breaks Thai clusters), taller line height (Thai has stacked vowels and tone marks), and a Thai-capable
   heading font because Archivo has no Thai glyphs; stretch is only meaningful for Archivo. */
.lang-toggle { display: flex; flex: none; border: 2px solid var(--cocoa); border-radius: var(--r); overflow: hidden; }
.lang-toggle a { padding: .35rem .75rem; font-weight: 600; font-size: .92rem; color: var(--cocoa); text-decoration: none; line-height: 1.4; }
.lang-toggle a:hover { background: var(--peach); }
.lang-toggle a[aria-current] { background: var(--cocoa); color: #fff; }
.lang-toggle a:focus-visible { outline-offset: -3px; }
html[lang="th"] { --head: "IBM Plex Sans Thai", "Noto Sans Thai", "Archivo", Tahoma, sans-serif; }
html[lang="th"] body { line-height: 1.75; }
html[lang="th"] h1, html[lang="th"] h2, html[lang="th"] h3 { font-stretch: 100%; letter-spacing: 0; line-height: 1.3; }
html[lang="th"] h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 700; }
html[lang="th"] h2 { font-weight: 700; }
html[lang="th"] .btn, html[lang="th"] .code, html[lang="th"] .main-nav { letter-spacing: 0; }
html[lang="th"] .main-nav { font-size: .95rem; }
html[lang="th"] .hero h1 span { white-space: normal; } /* Thai has no spaces between words: let it wrap where the browser can */
@media (max-width: 960px) { .lang-toggle { order: 2; margin-left: auto; } }

/* ---- 9c. consent banner (shown only when analytics is configured) ------------------------------------ */
.consent { position: fixed; inset: auto 0 0 0; z-index: 60; background: #fff; border-top: 3px solid var(--gold); box-shadow: 0 -6px 24px rgba(58,29,13,.18); padding: 1rem 0; }
.consent[hidden] { display: none; }
.consent-in { display: flex; gap: 1.25rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.consent-in p { margin: 0 0 .25rem; max-width: 62ch; }
.consent-h { font-weight: 700; color: var(--cocoa); }
.consent-acts { display: flex; gap: .6rem; flex-wrap: wrap; }
.consent a { color: var(--leaf); }

/* ---- 10. print and reduced motion --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .site-head nav, .qa-float, .qa-callout, .basket, .proto, .svc-pick, .actions, .filters { display: none !important; }
  body { font-size: 11pt; }
  .band-brown, .site-foot, .fee-card { background: #fff !important; color: #000 !important; }
  .band-brown h2, .fee-card .fee, .site-foot a, .foot-name { color: #000 !important; }
}
