/* WPK Notary 2.0 — shared furniture.
 *
 * Everything every rebuilt page needs: the sticky navy header and its drawer, the
 * band rhythm, the button set, the card, the trust strip and the footer. A page's
 * own stylesheet (home.css, services.css, ...) carries only what is unique to it.
 *
 * Built against design_handoff_wpk_site/ (revision of 2026-08-28). Two conversions
 * were applied throughout, both called for by that bundle:
 *
 *   1. The prototypes measure fluid values in container-query units, because their
 *      review frame is a container. Real pages are measured by the viewport, so
 *      every "7cqi" is written "7vw" here.
 *   2. The prototypes switch layout in JavaScript off window.innerWidth. That
 *      becomes two media queries: max-width 1023px and max-width 767px.
 *
 * The rule most easily lost in translation, repeated here because it is: CARD
 * BORDERS ARE GOLD (--border-gold), SECTION DIVIDERS ARE GREY (--hairline). Not
 * the other way round. Getting it backwards makes the site look grey and generic.
 */

/* ---------------------------------------------------------------- foundation */

/* The sticky header needs every ancestor to be auto-height; a fixed height
   anywhere above it silently kills position:sticky. */
html,
body {
  height: auto;
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: var(--type-base);
  line-height: var(--thai-body-line-height);
  letter-spacing: var(--thai-tracking);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
}

/* Thai never takes tracking, and never sets display type below 1.2. */
h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--text-ink);
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  letter-spacing: var(--thai-tracking);
  line-height: var(--thai-display-line-height);
}

p {
  margin: 0;
}

a {
  color: var(--text-link);
  text-decoration: none;
}

/* ------------------------------------------------------- accessibility floor */

/* The design bundle defines --focus-ring but never applies it: the prototypes are
   mouse-driven mock-ups. On a real page the ring is the only thing a keyboard user
   has, so it is applied here to everything focusable. :focus-visible keeps it off
   mouse clicks, so nothing changes for a pointer user. */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 2px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9);
}

/* Navy-on-navy is invisible. */
.v2-band--dark :focus-visible,
.v2-band--photo :focus-visible,
.v2-header :focus-visible {
  outline-color: var(--text-on-dark);
  box-shadow: 0 0 0 4px rgba(3, 33, 65, 0.9);
}

/* A 64px sticky header sits on top of whatever an in-page link jumps to,
   including an element reached by keyboard. */
[id] {
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

/* The handoff specifies no entrance animation anywhere, so the only motion on the
   site is colour and background on hover. Honour the preference regardless: it
   costs nothing here and covers anything added later. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Visible only once tabbed to. Five nav items plus a CTA sit between the top of
   every page and its content. */
.v2-skip {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: var(--radius-control);
  background: var(--canvas);
  color: var(--color-primary);
  font: var(--type-button);
  box-shadow: var(--shadow-soft);
  transition: top var(--motion-fast) var(--motion-ease);
}

.v2-skip:focus {
  top: 12px;
}

/* The small explanatory line under a heading, a button or a card body: the thing
   that answers a worry without competing with what it sits beneath.

   Six components had each built this for themselves — .v2-ctline__note,
   .v2-ctcard__note, .v2-articlefoot__note, .v2-faqrail__note, .v2-checklist__note
   and .v2-chainpanel__note — across five different settings: 16px/1.7, 15px/1.7,
   16px/1.6, 15px/1.6 and one that used the tokens. One role, five sizes, none of
   them decided. That near-miss repetition is precisely what makes a page read as
   generated rather than set; nobody spots it, everybody feels it.

   --type-meta / --lh-label is the declared pairing for this role. Use the modifier
   for a navy or photograph ground. */
.v2-note {
  margin: 0;
  font-size: var(--type-meta);
  line-height: var(--lh-label);
  letter-spacing: var(--thai-tracking);
  color: var(--text-muted);
  text-wrap: pretty;
  max-width: var(--measure-copy);
}

.v2-note--on-dark {
  color: var(--text-on-dark-soft);
}

/* A note that follows a call to action, rather than a heading. */
.v2-note--assure {
  margin-top: 12px;
}

.v2-note--assure + .v2-note--assure {
  margin-top: 4px;
}

.v2-note a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.v2-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------- layout: bands */

.v2-container {
  max-width: var(--container-max);
  margin: 0 auto;
}

.v2-band {
  padding: clamp(48px, 7vw, 96px) clamp(18px, 4vw, 48px);
  background: var(--canvas);
}

.v2-band--soft {
  background: var(--surface-soft);
}

.v2-band--dark {
  background: var(--surface-dark);
  color: var(--text-on-dark);
}

.v2-band--dark h1,
.v2-band--dark h2,
.v2-band--dark h3,
.v2-band--photo h1,
.v2-band--photo h2,
.v2-band--photo h3 {
  color: var(--text-on-dark);
}

/* Photo bands. The JPEGs are already navy-duotoned and darkened for white text,
   so there is deliberately no overlay, no scrim, no gradient and no filter here —
   adding one double-darkens the band and the type goes muddy. --surface-dark sits
   underneath as the ground the band falls back to if the image fails. */
.v2-band--photo {
  background-color: var(--surface-dark);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: var(--text-on-dark);
}

.v2-band--hairline-bottom {
  border-bottom: var(--border-hairline);
}

/* ------------------------------------------------------------- layout: grids */

/* Grid tracks are minmax(0,1fr) and never a bare 1fr: a bare 1fr carries
   min-width:auto, and one long unbreakable Thai term then pushes the whole column
   past the viewport. */
.v2-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
}

.v2-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 24px);
}

/* ---------------------------------------------------------------- type scale */

.v2-h1 {
  /* The 30px floor is load-bearing, not a taste call. The hero H1 holds each
     service phrase in white-space:nowrap so Thai never breaks mid-term, and
     "และบริการทางกฎหมาย" at 32px measures ~290px against the 284px of content
     width a 320px screen leaves. It overflowed by exactly 6px. */
  font-size: var(--type-display);
  line-height: var(--lh-display);
}

/* The other four pages' heroes. They each declared their own
   clamp(32px, 4.4vw, 52px) in their page stylesheet and never touched .v2-h1, so
   the display ramp and the floor above lived in the system and not on the site. */
.v2-h1--page {
  font-size: var(--type-display-page);
  line-height: var(--lh-display);
}

.v2-h2 {
  font-size: var(--type-headline);
  line-height: var(--lh-headline);
  text-wrap: balance;
}

/* The sub-section size, for the two bands that carry a second-order heading. */
.v2-h2--sub {
  font-size: var(--type-subhead);
  line-height: var(--lh-subhead);
}

.v2-h3 {
  font-size: var(--type-title);
  font-weight: var(--weight-semibold);
  /* Was 1.3 while .v2-artcard__title and .v2-step__title -- same size, same
     weight, same job -- were both 1.4. One role, one leading. 1.4 is also the
     kinder of the two for a card heading that wraps to a second Thai line. */
  line-height: var(--lh-title);
}

.v2-lead {
  font-size: var(--type-lead);
  line-height: var(--lh-lead);
  color: var(--text-body);
  text-wrap: pretty;
}

.v2-band--dark .v2-lead,
.v2-band--photo .v2-lead {
  color: var(--text-on-dark-soft);
}

.v2-body {
  font-size: var(--type-base);
  line-height: var(--lh-read);
  color: var(--text-body);
  text-wrap: pretty;
}

.v2-meta {
  font-size: var(--type-meta);
  line-height: var(--lh-label);
  color: var(--text-muted);
}

.v2-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* The 28x2px house rule, above an eyebrow. Gold appears at this weight and as
   ink — never as a fill behind text. */
.v2-rule {
  width: 28px;
  border-top: var(--rule-gold);
  margin-bottom: 16px;
}

.v2-band--dark .v2-rule,
.v2-band--photo .v2-rule {
  border-top: var(--rule-gold-on-dark);
}

.v2-eyebrow {
  font-size: var(--type-meta);
  font-weight: var(--weight-medium);
  line-height: var(--lh-label);
  color: var(--accent-gold);
}

.v2-band--dark .v2-eyebrow,
.v2-band--photo .v2-eyebrow {
  color: var(--accent-gold-on-dark);
}

.v2-badgepill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font: var(--type-caption-strong);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--surface-strong);
  color: var(--text-ink);
}

.v2-badgepill--dark {
  background: var(--surface-dark-elevated);
  color: var(--text-on-dark);
}

/* ------------------------------------------------------------------ buttons */

.v2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  height: var(--control-height);
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font: var(--type-button);
  letter-spacing: var(--tracking-flat);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--motion-base) var(--motion-ease),
    color var(--motion-base) var(--motion-ease);
}

.v2-btn--lg {
  height: var(--control-height-lg);
  padding: 16px 32px;
}

.v2-btn--primary {
  background: var(--color-primary);
  color: var(--text-on-primary);
}

.v2-btn--primary:hover,
.v2-btn--primary:active {
  background: var(--color-primary-active);
  color: var(--text-on-primary);
}

/* White pill on navy. Pair it with --line on an actual LINE link. */
.v2-btn--on-dark {
  background: var(--canvas);
  color: var(--color-primary);
}

.v2-btn--on-dark:hover,
.v2-btn--on-dark:active {
  background: var(--surface-strong);
  color: var(--color-primary);
}

.v2-btn--outline-on-dark {
  background: transparent;
  border-color: var(--text-on-dark);
  color: var(--text-on-dark);
}

.v2-btn--outline-on-dark:hover,
.v2-btn--outline-on-dark:active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-on-dark);
}

/* The LINE action.

   LINE is the entire conversion path on this site — ten links across the v2
   pages — and until now every one of them rendered as a plain pill whose only
   clue was the Thai word in the label. A visitor scanning for "where do I send
   this" had nothing to lock onto, and the site's most important control was its
   least identifiable one.

   The mark does that work. The ground stays navy or white: LINE green is the
   mark's own brand colour and never becomes a fill, which is the no-third-hue
   rule holding. Compose with --primary, --on-dark or --lg.

   .v2-btn already supplies inline-flex and the gap, so this only sizes the mark. */
.v2-btn--line > img {
  width: 20px;
  height: 20px;
  flex: none;
}

.v2-btn--lg.v2-btn--line > img {
  width: 24px;
  height: 24px;
}

/* The border is navy at 55%, not --hairline. A button's boundary is what says
   "this is a button", and WCAG 1.4.11 wants that boundary at 3:1 against both
   grounds it sits on; --hairline manages 1.3:1. 55% measures 3.23:1 on white and
   3.15:1 on --surface-soft, and stays clearly subordinate to the solid navy CTA. */
.v2-btn--secondary {
  background: transparent;
  border-color: rgba(6, 57, 112, 0.55);
  color: var(--color-primary);
}

.v2-btn--secondary:hover,
.v2-btn--secondary:active {
  background: var(--surface-soft);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* A row of buttons. Below 768px its children go full width, which is where the
   handoff's touch-target rule lands; --keep-inline opts a control out, and is
   what the header pills use. */
.v2-btnrow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ------------------------------------------------------------------- header */

.v2-header-sticky {
  position: sticky;
  top: 0;
  z-index: 50;
}

.v2-header {
  background: var(--surface-dark);
  color: var(--text-on-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Wordmark: the raster mark beside a set wordmark. The PNG is capped because no
   vector source exists yet. */
.v2-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.v2-wordmark__glyph {
  display: block;
  height: 24px;
  width: auto;
}

.v2-wordmark__type {
  display: inline-flex;
  align-items: baseline;
  gap: 0.32em;
  font-family: var(--font-display);
  font-size: var(--type-wordmark);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.01em;
  color: var(--color-primary);
}

/* The footer sets the brand one step up. It used to do it with an inline
   style="font-size:24px" in v2-footer.php, which put a second wordmark size
   outside the stylesheet where nothing could see it. */
.v2-wordmark--lg .v2-wordmark__type {
  font-size: var(--type-wordmark-lg);
}

.v2-wordmark__type span {
  font-weight: var(--weight-regular);
  font-size: 0.85em;
  color: var(--text-muted);
}

.v2-wordmark--on-dark .v2-wordmark__type {
  color: var(--text-on-dark);
}

.v2-wordmark--on-dark .v2-wordmark__type span {
  color: var(--text-on-dark-soft);
}

/* ---- the full row, 1024px and up ---- */

.v2-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  height: var(--nav-height);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

.v2-nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.v2-nav__link {
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  font-size: var(--type-base);
  line-height: var(--lh-title);
  white-space: nowrap;
  color: var(--text-on-dark-soft);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color var(--motion-base) var(--motion-ease);
}

.v2-nav__link:hover {
  color: var(--text-on-dark);
}

.v2-nav__link--active {
  color: var(--text-on-dark);
  border-bottom-color: var(--accent-gold-on-dark);
}

.v2-nav__right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.v2-lang {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: var(--type-micro);
}

.v2-lang__link {
  /* "TH" and "EN" measured 18x25 as bare inline text, under the 24x24 minimum
     in WCAG 2.5.8. The min-* pair widens the hit area without moving the glyphs
     or changing the 14px type. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  color: var(--text-on-dark-soft);
  transition: color var(--motion-base) var(--motion-ease);
}

.v2-lang__link:hover {
  color: var(--text-on-dark);
}

.v2-lang__link--active {
  color: var(--text-on-dark);
  font-weight: var(--weight-medium);
}

.v2-lang__sep {
  color: var(--hairline-on-dark);
}

/* ---- the compact bar, below 1024px ---- */

.v2-navbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--nav-height);
  padding: 0 clamp(16px, 4vw, 32px);
}

.v2-navbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.v2-navbar__cta {
  /* Was 40px, which put the page's primary action on mobile under both
     --control-height and the 44px touch target the rest of the system holds to.
     44 still clears the 64px bar with 10px above and below. */
  height: var(--control-height);
  padding: 8px 18px;
}

.v2-navbar__toggle {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  background: transparent;
  border: var(--border-on-dark);
  border-radius: var(--radius-pill);
  color: var(--text-on-dark);
  cursor: pointer;
}

/* The drawer opens INSIDE the header, above the page content, so it pushes the
   page down rather than covering it. That is why there is no backdrop and no
   scroll lock anywhere in this file — there is nothing underneath to trap. */
.v2-drawer {
  display: none;
  border-top: var(--border-on-dark);
  padding: 4px clamp(16px, 4vw, 32px) 20px;
}

.v2-drawer[data-open="true"] {
  display: block;
}

.v2-drawer__link {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  font-size: 17px;
  line-height: var(--lh-title);
  color: var(--text-on-dark-soft);
  border-bottom: var(--border-on-dark);
}

.v2-drawer__link--active {
  color: var(--text-on-dark);
}

.v2-drawer__lang {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.v2-drawer__lang .v2-btn {
  height: 40px;
  padding: 8px 20px;
}

/* -------------------------------------------------------------- trust strip */

.v2-trust {
  background: var(--canvas);
  border-top: var(--border-hairline);
  border-bottom: var(--border-hairline);
  padding: clamp(24px, 4vw, 32px) clamp(18px, 4vw, 48px);
}

.v2-trust__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px 40px;
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
}

/* The badge is now a link. inline-flex keeps it the same box it was. */
.v2-trust__verify {
  display: inline-flex;
  align-items: center;
}

.v2-trust__badge {
  height: 44px;
  width: auto;
}

.v2-trust__title {
  font-size: var(--type-base);
  font-weight: var(--weight-semibold);
  line-height: 1.5;
  color: var(--text-ink);
}

.v2-trust__line {
  font-size: var(--type-base);
  line-height: var(--lh-label);
  color: var(--text-muted);
  margin-top: 3px;
}

.v2-trust__num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--type-micro);
}

/* --------------------------------------------------------------------- cards */

/* Every card in the system. Gold border, 24px radius, 32px padding, and the one
   shadow tier the design allows — on hover only. */
.v2-card {
  display: block;
  background: var(--canvas);
  border: var(--border-gold);
  border-radius: var(--radius-card);
  padding: clamp(20px, 4vw, 32px);
  box-shadow: 0 1px 2px rgba(3, 33, 65, 0.03);
  transition: background var(--motion-base) var(--motion-ease),
    border-color var(--motion-base) var(--motion-ease),
    box-shadow var(--motion-base) var(--motion-ease);
}

a.v2-card:hover {
  background: var(--surface-soft);
  border-color: var(--color-gold);
  box-shadow: 0 2px 4px rgba(3, 33, 65, 0.04), 0 8px 20px rgba(3, 33, 65, 0.07);
}

/* The rule under a card's heading is a divider, so it is grey, not gold. */
.v2-card__rule {
  margin-top: 20px;
  padding-top: 16px;
  border-top: var(--border-hairline);
}

.v2-card__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--type-base);
  line-height: var(--lh-label);
  color: var(--text-muted);
}

/* The circular icon plate that opens a feature card. */
.v2-iconplate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-icon-plate);
  background: var(--wash-navy);
  color: var(--color-primary);
}

.v2-iconplate--sm {
  width: 32px;
  height: 32px;
}

/* ---------------------------------------------------------- article teasers */

.v2-artcard {
  display: block;
  background: var(--canvas);
  border: var(--border-gold);
  border-radius: var(--radius-card);
  overflow: hidden;
  color: var(--text-ink);
  box-shadow: 0 1px 2px rgba(3, 33, 65, 0.03);
  transition: background var(--motion-base) var(--motion-ease),
    border-color var(--motion-base) var(--motion-ease),
    box-shadow var(--motion-base) var(--motion-ease);
}

.v2-artcard:hover {
  background: var(--surface-soft);
  border-color: var(--color-gold);
  box-shadow: 0 2px 4px rgba(3, 33, 65, 0.04), 0 8px 20px rgba(3, 33, 65, 0.07);
}

.v2-artcard__img {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  display: block;
  background: var(--surface-strong);
  border-bottom: var(--border-hairline);
}

/* The placeholder an article without an uploaded image falls back to. */
.v2-artcard__noimg {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background: var(--surface-strong);
  border-bottom: var(--border-hairline);
  font-size: var(--type-meta);
  line-height: var(--lh-label);
  color: var(--text-muted);
}

.v2-artcard__body {
  padding: clamp(20px, 3.5vw, 32px);
}

/* Category is muted, deliberately not gold — gold is carrying the rules and the
   step numerals already. */
.v2-artcard__cat {
  font-size: var(--type-meta);
  /* Was 1.5, the only 15px role not on --lh-label. */
  line-height: var(--lh-label);
  /* Topic names come from the database and are Thai. Thai has no inter-letter
     word space, so tracking breaks word grouping outright; --thai-tracking is 0
     and is mandatory for any string that can contain Thai. The 0.04em the label
     role calls for is restored under lang="en", where the string is Latin. */
  letter-spacing: var(--thai-tracking);
  color: var(--text-muted);
}

html[lang="en"] .v2-artcard__cat {
  letter-spacing: 0.04em;
}

.v2-artcard__title {
  font-size: var(--type-title);
  font-weight: var(--weight-semibold);
  line-height: var(--lh-title);
  color: var(--text-ink);
  margin: 10px 0 0;
}

.v2-artcard__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font: var(--type-button);
  color: var(--color-primary);
}

.v2-artcard__more svg {
  transition: transform var(--motion-base) var(--motion-ease);
}

.v2-artcard:hover .v2-artcard__more svg {
  transform: translateX(3px);
}

/* ------------------------------------------------------------------- footer */

.v2-footer {
  background: var(--canvas);
  border-top: var(--border-hairline);
}

.v2-footer__grid {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) clamp(18px, 4vw, 48px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 32px);
}

.v2-footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v2-footer__head {
  font-size: var(--type-micro);
  font-weight: var(--weight-semibold);
  line-height: 1.5;
  /* Same rule as .v2-artcard__cat. These heads do have an EN branch in
     v2-footer.php ("Menu" / "Contact"), so the uppercase stays -- it is a no-op
     on Thai and correct on Latin -- but the tracking is scoped to lang="en". */
  letter-spacing: var(--thai-tracking);
  text-transform: uppercase;
  color: var(--text-ink);
}

html[lang="en"] .v2-footer__head {
  letter-spacing: 0.06em;
}

.v2-footer__blurb {
  font-size: var(--type-base);
  line-height: var(--lh-read);
  color: var(--text-muted);
  margin: 16px 0 0;
  max-width: var(--measure-tight); /* design: 30ch — ch is unsafe for Thai, see home.css */
  text-wrap: pretty;
}

.v2-footer__link {
  font-size: var(--type-base);
  line-height: var(--lh-label);
  padding: 3px 0;
  color: var(--text-muted);
  transition: color var(--motion-base) var(--motion-ease);
}

.v2-footer__link:hover {
  color: var(--color-primary);
}

.v2-footer__channel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.v2-footer__channel img,
.v2-footer__channel svg {
  width: 22px;
  height: 22px;
  flex: none;
}

.v2-legal {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-lg) clamp(18px, 4vw, 48px);
  border-top: var(--border-hairline-soft);
  display: flex;
  justify-content: space-between;
  gap: var(--space-base);
  flex-wrap: wrap;
  font: var(--type-caption);
  color: var(--text-muted);
}

.v2-legal a {
  /* 13px caption type gave the privacy-policy link a 22px box, just under the
     24x24 in WCAG 2.5.8. inline-flex + min-height lifts the target without
     changing the type or the legal band's baseline. */
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--text-muted);
}

.v2-legal a:hover {
  color: var(--color-primary);
}

/* --------------------------------------------------------- channel row icons */

.v2-channels {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 28px artwork inside a 44px target: the icons carry the row's visual weight,
   but 28px on its own fails as a tap target. The negative margin keeps the
   optical gap at the designed 12px. */
.v2-channels a {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  margin: 0 -8px;
}

.v2-channels img {
  width: 28px;
  height: 28px;
  display: block;
}

/* ============================================================================
   TABLET — 768px to 1023px
   Card grids go 2-up. Two-column bands stack: at this width two columns leave
   each side under 340px, which is too narrow for the document cards, the QR
   panel and the five-row status list. The header collapses here too, because
   the five Thai menu items do not fit one line.
   ========================================================================== */

@media (max-width: 1023px) {
  .v2-grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .v2-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v2-nav {
    display: none;
  }

  .v2-navbar {
    display: flex;
  }

  .v2-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v2-trust__grid {
    grid-template-columns: auto repeat(2, minmax(0, 1fr));
  }
}

/* ============================================================================
   MOBILE — below 768px
   One column everywhere, buttons full width, cards and bands at their tight
   padding. Nothing is hidden and no copy is shortened.
   ========================================================================== */

@media (max-width: 767px) {
  .v2-grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .v2-footer__grid,
  .v2-trust__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .v2-btnrow {
    flex-direction: column;
    align-items: stretch;
  }

  .v2-btnrow .v2-btn:not(.v2-btn--keep-inline) {
    width: 100%;
  }
}

/* ------------------------------------------------------------- cookie banner
 *
 * The banner is emitted by components/google-analytics.php in Bootstrap markup —
 * .container, .row, .col-md-8, .btn — and 2.0 pages do not load Bootstrap, so
 * without these rules it renders as a full-bleed dark bar with two default grey
 * buttons. The component is shared with the pages still on the old theme, so it
 * is restyled from here rather than edited: nothing about the live site changes.
 *
 * !important appears only where the component sets the property inline, which no
 * selector can otherwise beat.
 */

#cookie-consent-banner {
  background: var(--surface-dark) !important;
  padding: 16px clamp(18px, 4vw, 48px) !important;
  box-shadow: 0 -1px 0 var(--hairline-on-dark) !important;
  font-family: var(--font-body);
  font-size: var(--type-meta);
  line-height: var(--lh-label);
}

#cookie-consent-banner .container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0;
}

#cookie-consent-banner .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin: 0;
}

#cookie-consent-banner .col-md-8 {
  flex: 1 1 420px;
  min-width: 0;
  padding: 0;
}

#cookie-consent-banner .col-md-4 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 0;
}

#cookie-consent-banner p {
  margin: 0;
  color: var(--text-on-dark-soft);
}

#cookie-consent-banner a {
  color: var(--text-on-dark);
  text-decoration: underline;
}

/* Both controls take the header's pill shape and the 44px touch floor. */
#cookie-consent-banner .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font: var(--type-button);
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--motion-base) var(--motion-ease),
    color var(--motion-base) var(--motion-ease);
}

#cookie-consent-banner #accept-cookies {
  background: var(--canvas);
  color: var(--color-primary);
}

#cookie-consent-banner #accept-cookies:hover {
  background: var(--surface-strong);
}

#cookie-consent-banner #decline-cookies {
  background: transparent;
  border-color: var(--text-on-dark);
  color: var(--text-on-dark);
}

#cookie-consent-banner #decline-cookies:hover {
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 767px) {
  #cookie-consent-banner .col-md-4 {
    width: 100%;
  }

  #cookie-consent-banner .btn {
    flex: 1 1 0;
  }
}
