/* ==========================================================================
   Vibe Crafted Software — Design Tokens & Base Styles
   Swap the values under :root to apply a real brand kit later; the rest of
   this file (and every page) reads from these variables, so a rebrand is a
   one-file change.
   ========================================================================== */

@font-face {
  font-family: "Roboto";
  src: url("/assets/fonts/roboto-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("/assets/fonts/roboto-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Roboto has no reliable Thai glyph coverage — Noto Sans Thai fills the gap.
   Appended (not swapped in) to the font stack below, so Latin text keeps
   rendering in Roboto and only Thai code points fall back to this, per
   character, automatically. */
@font-face {
  font-family: "Noto Sans Thai";
  src: url("/assets/fonts/noto-sans-thai-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Thai";
  src: url("/assets/fonts/noto-sans-thai-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Grayscale palette — the whole theme reads from these. --gray-900 is the
     brand's exact "ink" value (#0C0C0C, per the logo/website style guide) —
     used for text, buttons, and the header lockup. The rest of the ramp is a
     softened black/white spread (not pure #000/#fff) supporting it for UI
     roles the brand kit doesn't itself define, like muted text and borders. */
  --gray-950: #050505;
  --gray-900: #0c0c0c;
  --gray-800: #262626;
  --gray-700: #404040;
  --gray-600: #525252;
  --gray-500: #6b6b6b;
  --gray-400: #a3a3a3;
  --gray-300: #d4d4d4;
  --gray-200: #e5e5e5;
  --gray-100: #f0f0f0;
  --gray-50: #f7f7f7;

  /* Brand colors — currently mapped onto the grayscale ramp. Kept as their
     own tokens (rather than using --gray-* directly everywhere) so a real
     accent color can be reintroduced later — e.g. for the planned hover
     highlight on product tiles — by changing only these two lines. */
  --color-primary: var(--gray-900);
  --color-primary-dark: var(--gray-950);
  --color-accent: var(--gray-600);
  --color-accent-dark: var(--gray-800);

  /* Reserved for a future hover/interaction accent (not used yet — see
     products.html tiles). Intentionally unused by any rule today. */
  --color-hover-accent: #4f46e5;
  --color-hover-accent-alt: #14b8a6;

  /* Neutrals */
  --color-bg: #ffffff;
  --color-bg-alt: var(--gray-50);
  --color-text: var(--gray-900);
  --color-text-muted: var(--gray-500);
  --color-border: var(--gray-200);

  /* Theme-dependent surfaces/foregrounds that flip in dark mode below —
     kept as their own tokens (rather than hardcoded) so every rule that
     uses them adapts automatically. */
  --color-header-bg: rgba(255, 255, 255, 0.92);
  --color-icon-bg: rgba(0, 0, 0, 0.06);
  --color-primary-foreground: #ffffff;
  --color-error-bg: rgba(220, 38, 38, 0.1);
  --color-error-text: #b91c1c;

  /* Floating panels (the open mobile menu, any dropdown): raised surface,
     full border and shadow, always all three together. */
  --color-surface-raised: #ffffff;
  --color-border-strong: var(--gray-300);
  --shadow-raised: 0 8px 24px rgba(0, 0, 0, 0.16);

  /* Footer: a dark band whatever the theme, so it has its own tokens
     instead of following the page background. */
  --footer-bg: var(--gray-900);
  --footer-fg: var(--gray-50);
  --footer-muted: var(--gray-400);
  --footer-border: var(--gray-800);

  /* Type */
  --font-heading: "Roboto", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-body: "Roboto", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  /* Layout */
  --radius: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --container-width: 1160px;
  /* A record only: custom properties do not work inside @media. The same
     value is typed into the nav media queries below and into main.js. */
  --breakpoint-nav: 1040px;

  /* Spacing: one 4px-based scale. Every margin, padding and gap uses a step;
     a one-off value is a sign-off finding. */
  --space-1: 0.25rem;   /*  4px */
  --space-2: 0.5rem;    /*  8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.5rem;    /* 24px */
  --space-6: 2rem;      /* 32px */
  --space-7: 3rem;      /* 48px */
  --space-8: 4rem;      /* 64px */

  /* Type: 16px body, a 1.25 (major third) heading scale, one comfortable measure. */
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;        /* h3, card titles */
  --text-xl: 1.563rem;       /* h2 */
  --text-2xl: 1.953rem;      /* h1 */
  --text-display: 2.441rem;  /* the home hero heading only */
  --leading-body: 1.6;
  --leading-heading: 1.2;
  --measure: 65ch;

  /* Focus ring: the text colour, so it contrasts with the page in both
     themes. Not currentColor, which on a filled button is the button's
     light text colour drawn on the page, where it can't be seen. */
  --color-focus: var(--color-text);

  color-scheme: light;
}

/* ---------- Dark mode ----------
   Automatic by default via prefers-color-scheme; an explicit
   data-theme="light"/"dark" attribute (set by the header toggle, see
   .theme-toggle below) always wins over the media query in both
   directions. The hero is deliberately excluded — it reads from the raw
   --gray-* constants, not these semantic tokens, so it stays a dark band
   in both themes rather than flipping. The footer stays dark too: only
   its --footer-bg changes, one step lighter than the dark page. */
:root[data-theme="dark"] {
  color-scheme: dark;   /* form controls and scrollbars follow */
  --color-bg: var(--gray-950);
  --color-bg-alt: #1c1c1c;
  --color-text: var(--gray-50);
  --color-text-muted: var(--gray-400);
  --color-border: var(--gray-800);
  --color-primary: var(--gray-50);
  --color-primary-dark: #ffffff;
  --color-primary-foreground: var(--gray-950);
  --color-accent: var(--gray-400);
  --color-accent-dark: var(--gray-200);
  --color-header-bg: rgba(5, 5, 5, 0.92);
  --color-icon-bg: rgba(255, 255, 255, 0.08);
  --color-error-bg: rgba(248, 113, 113, 0.14);
  --color-error-text: #f87171;
  --color-surface-raised: #1c1c1c;
  --color-border-strong: var(--gray-700);
  --shadow-raised: 0 8px 24px rgba(0, 0, 0, 0.6);
  --footer-bg: #1c1c1c;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --color-bg: var(--gray-950);
    --color-bg-alt: #1c1c1c;
    --color-text: var(--gray-50);
    --color-text-muted: var(--gray-400);
    --color-border: var(--gray-800);
    --color-primary: var(--gray-50);
    --color-primary-dark: #ffffff;
    --color-primary-foreground: var(--gray-950);
    --color-accent: var(--gray-400);
    --color-accent-dark: var(--gray-200);
    --color-header-bg: rgba(5, 5, 5, 0.92);
    --color-icon-bg: rgba(255, 255, 255, 0.08);
    --color-error-bg: rgba(248, 113, 113, 0.14);
    --color-error-text: #f87171;
    --color-surface-raised: #1c1c1c;
    --color-border-strong: var(--gray-700);
    --shadow-raised: 0 8px 24px rgba(0, 0, 0, 0.6);
    --footer-bg: #1c1c1c;
  }
}

/* ---------- Portal widgets ----------
   The portal's Statistics banner and Multi-mailer inject their own CSS and
   read the portal's token names, not this file's. Bridged here, after both
   themes, so they pick up the site's palette in light and dark. */
:root {
  --accent: var(--color-primary);
  --accent-ink: var(--color-primary-foreground);
  --violet: var(--color-primary);        /* their hover colour */
  --surface: var(--color-bg);
  --surface-2: var(--color-bg-alt);
  --bg: var(--color-bg);
  --text: var(--color-text);
  --text-muted: var(--color-text-muted);
  --text-soft: var(--color-text-muted);
  --line: var(--color-border);
  --line-strong: var(--color-border-strong);
  --font: var(--font-body);
  --sans: var(--font-body);
  --vcm-accent: var(--color-primary);    /* Multi-mailer button */
  --vcm-ink: var(--color-primary-foreground);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

/* One visible focus style for everything; never remove it without a
   replacement. Dark bands (hero, footer) set their own --color-focus. */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

@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;
  }
}

@media (forced-colors: active) {
  .btn,
  .nav-toggle,
  .card {
    border: 1px solid CanvasText;
  }
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* A link inside running text is underlined, so it isn't told apart by
   colour alone (WCAG 1.4.1); on this monochrome site colour can't do it. */
main :is(p, li, dd, td) a:not(.btn) {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  line-height: var(--leading-heading);
  margin: 0 0 var(--space-4);
  color: var(--color-text);
  text-wrap: balance;
}

/* Thai script's stacked tone/vowel marks get cramped at the Latin-tuned
   line-heights above. Scoped via :lang() (matches the lang="th" on <html>)
   rather than a second stylesheet, since this is a zero-build-step site. */
:lang(th) {
  line-height: 1.8;
}

h1:lang(th),
h2:lang(th),
h3:lang(th),
h4:lang(th) {
  line-height: 1.4;
}

h1 {
  font-size: var(--text-2xl);
}

h2 {
  font-size: var(--text-xl);
}

h3 {
  font-size: var(--text-lg);
}

h4 {
  font-size: var(--text-base);
}

p {
  margin: 0 0 var(--space-4);
}

ul {
  margin: 0 0 var(--space-4);
  padding-left: var(--space-5);
}

p,
li,
dd,
blockquote {
  max-width: var(--measure);
}

/* A capped paragraph in centred text would sit at the left edge. */
.text-center :is(p, li),
.section-header p {
  margin-inline: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.section {
  padding: var(--space-8) 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-header {
  max-width: 640px;
  margin: 0 auto var(--space-7);
  text-align: center;
}

.section-header p {
  color: var(--color-text-muted);
}

/* Heading over one group of cards when a section holds several grids
   (the Apps lineup, grouped by country). */
.group-heading {
  margin: var(--space-7) 0 var(--space-5);
}

.section-header + .group-heading {
  margin-top: 0;
}

.grid {
  display: grid;
  gap: var(--space-5);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .section {
    padding: var(--space-7) 0;
  }
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.brand {
  display: flex;
  align-items: center;
}

.brand:hover {
  text-decoration: none;
}

/* Header lockup. The brand kit's own spec (28-36px tall) reads as
   too small in practice — the wordmark all but disappears at that size,
   so this runs well past the documented range for legibility. */
.brand-lockup {
  height: 80px;
  width: auto;
}

/* lockup.svg's shapes are fixed pure black (#0C0C0C) fill / white
   stroke — invisible once the header background flips dark. Color-invert
   the vector itself for dark mode rather than swapping to the brand
   kit's separate "on dark" PNG export: that raster turned out to be a
   different, lower-resolution version of the logo (different wordmark
   font, blurry from being upscaled off a 44px-tall source), not just a
   recolor. Inversion is exact on this pure-B/W artwork and stays crisp
   at any size since it's still the same vector. */
:root[data-theme="dark"] .brand-lockup {
  filter: invert(1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-lockup {
    filter: invert(1);
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--color-text);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

/* a.nav-cta (not .nav-cta alone): needs to match .nav-links a's specificity
   so this rule's font-weight actually wins the cascade instead of silently
   losing to .nav-links a's font-weight: 500 above — previously masked
   because the old webfont happened to load a real 500 weight too, so the
   unintended override still looked plausible. */
a.nav-cta {
  background: var(--color-primary);
  color: var(--color-primary-foreground) !important;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--color-primary-dark);
}

.nav-toggle {
  display: none;
  /* .container is a 3-child flex row (brand, nav-toggle, nav) with
     justify-content: space-between. Once .nav-links is hidden, the
     wrapping <nav> collapses to ~0 width but still counts as the third
     flex item, so space-between splits the remaining room into two
     equal gaps and floats this button near the middle instead of the
     right edge. margin-left: auto claims all the space before it,
     pinning it (and the collapsed <nav> after it) to the right. */
  margin-left: auto;
  background: none;
  border: none;
  /* Buttons do not inherit the page colour; without this the icon's
     currentColor is the browser's button colour and vanishes in dark. */
  color: var(--color-text);
  cursor: pointer;
  padding: var(--space-2);
}

.nav-toggle svg {
  width: 26px;
  height: 26px;
}

@media (max-width: 1040px) {
  .nav-toggle {
    display: block;
  }
  .brand-lockup {
    height: 48px;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    /* Inset to match .container's own padding — .nav-links is
       positioned relative to .site-header (full viewport width), not
       .container, so left/right: 0 would run edge-to-edge past the
       hamburger button/logo above it, which sit inside the container's
       padding. This keeps the dropdown's edges aligned with them at
       every width. */
    left: var(--space-5);
    right: var(--space-5);
    flex-direction: column;
    align-items: flex-start;
    /* The header is about 5rem tall here (48px logo plus padding). A menu
       taller than the screen scrolls inside itself. */
    max-height: calc(100dvh - 5rem - var(--space-4));
    overflow-y: auto;
    padding: var(--space-4);
    /* Floating panel: raised surface + full border + shadow, together */
    background: var(--color-surface-raised);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-raised);
    display: none;
    gap: var(--space-4);
  }
  .nav-links.is-open {
    display: flex;
  }
}

/* Past phone width the open menu stops spanning the row */
@media (min-width: 480px) and (max-width: 1040px) {
  .nav-links {
    left: auto;
    width: min(20rem, calc(100% - 2 * var(--space-5)));
  }
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: none;
  color: var(--color-text);
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--color-bg-alt);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* The icon shows the mode a click switches to (matching the aria-label),
   not the current one: moon in light mode, sun in dark mode. */
.theme-toggle-icon--sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle-icon--moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle-icon--sun {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle-icon--moon {
    display: none;
  }
  :root:not([data-theme="light"]) .theme-toggle-icon--sun {
    display: block;
  }
}

/* ---------- Language switcher ---------- */
/* Grouped with .theme-toggle in one shared <li> (its own tight gap, not
   .nav-links' 32px) so it doesn't reintroduce the nav-wrapping bug the
   nav breakpoint was raised to fix — see .nav-links' own comment. */
.nav-utility {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border-radius: var(--radius);
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.lang-switch:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
  text-decoration: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-family: var(--font-body);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-primary-foreground);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--gray-700) 0%, var(--gray-900) 55%, var(--gray-950) 100%);
  color: #fff;
  /* A dark band in both themes: the page-level ring would vanish on it. */
  --color-focus: #fff;
  padding: calc(var(--space-8) + var(--space-6)) 0;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-7);
  align-items: center;
}

.hero h1,
.hero p {
  color: #fff;
}

.hero h1 {
  font-size: var(--text-display);
}

.hero-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: var(--space-4);
}

.hero-lede {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-5);
  flex-wrap: wrap;
}

.hero-actions .btn-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.hero-actions .btn-outline:hover {
  border-color: #fff;
  color: #fff;
}

.hero-art {
  width: 100%;
}

.page-hero {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-8) 0 var(--space-7);
}

.page-hero .section-header {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
  }
  .hero-art {
    max-width: 320px;
    margin: 0 auto;
  }
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--color-icon-bg);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2);
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-1) var(--space-2);
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-700);
  width: fit-content;
}

/* Inverted (dark) chip — distinguishes a second tag on the same card by
   value, not color, e.g. a vertical tag next to an integration-mode tag. */
.tag-alt {
  background: var(--color-primary);
  color: var(--color-primary-foreground);
}

/* ---------- App line-up cards ----------
   Same anatomy on every card (tag, title, one short summary, one link), so
   cards in a row match: the grid stretches them to equal height and the
   link is pinned to the bottom. */
.app-card .app-card-link {
  margin-top: auto;
  width: fit-content;
}

.app-card a.app-card-link:not(.btn) {
  font-weight: 600;
}

/* The card's own gap keeps the link off the summary; this adds a little more. */
.app-card p {
  margin-bottom: var(--space-2);
}

/* ---------- Stat strip (hero) ---------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin: var(--space-6) 0 0;
  padding: var(--space-5) 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-strip div {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.stat-strip dt {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.75);
  order: 2;
}

.stat-strip dd {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  order: 1;
}

@media (max-width: 480px) {
  .stat-strip {
    grid-template-columns: 1fr;
  }
}

/* ---------- Hero checklist (right column of a text-only hero) ---------- */
.hero-checklist {
  list-style: none;
  padding: var(--space-5);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.hero-checklist li {
  position: relative;
  padding-left: 1.75rem;
}

.hero-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 0.9rem;
  height: 0.5rem;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

/* A centred row of a primary and a secondary button on a light section. */
.cta-row {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-5);
}

/* ---------- Numbered steps ---------- */
.step-number {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-primary-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq details {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 24px;
}

.faq details[open] summary {
  margin-bottom: var(--space-2);
}

.faq details p:last-child {
  margin-bottom: 0;
}

/* ---------- Team ---------- */
.team-card {
  text-align: center;
}

.team-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.4rem;
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: var(--space-4);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-2);
  font-size: 0.95rem;
}

input,
textarea {
  width: 100%;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-bg);
  color: var(--color-text);
}

input:focus,
textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

textarea {
  resize: vertical;
  min-height: 140px;
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  font-size: 0.95rem;
  display: none;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  background: var(--color-bg-alt);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

/* Error keeps red rather than going grayscale — a functional/system signal
   (form validation, danger), not a brand color, so it's exempt from the
   monochrome palette on accessibility/convention grounds. The red itself
   still shifts to a lighter tint in dark mode (--color-error-*) so it
   keeps AA contrast against a near-black background. */
.form-status.is-error {
  background: var(--color-error-bg);
  color: var(--color-error-text);
}

/* ---------- Blog ---------- */
.post-card .post-date {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Post titles on the blog index are h2 (straight under the page's h1),
   sized like the other card titles. */
.post-card h2 {
  font-size: var(--text-lg);
}

.article {
  max-width: 720px;
  margin: 0 auto;
}

.article-meta {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  margin-bottom: var(--space-5);
}

.article h2 {
  margin-top: var(--space-6);
}

/* ---------- Footer ---------- */
/* A dark band in both themes, drawn from the --footer-* tokens. Type steps
   down from body copy, and headings differ from links by more than weight
   so a heading never reads as one more link. */
.site-footer {
  --color-focus: var(--footer-fg);   /* a dark band: the page-level ring would vanish */
  /* The Multi-mailer box sits on the dark band in both themes. */
  --vcm-accent: var(--footer-fg);
  --vcm-ink: var(--footer-bg);
  background: var(--footer-bg);
  color: var(--footer-fg);
  border-top: 1px solid var(--footer-border);
  padding: var(--space-7) 0 var(--space-5);
  margin-top: var(--space-8);
  font-size: 0.875rem;
}

.site-footer a {
  color: inherit;
}

.site-footer a:focus-visible {
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.footer-grid h2 {
  margin-bottom: var(--space-2);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--footer-muted);
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-partner-note {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  font-size: 0.8125rem;
  color: var(--footer-muted);
}

.footer-bottom {
  border-top: 1px solid var(--footer-border);
  padding-top: var(--space-5);
  font-size: 0.8125rem;
  color: var(--footer-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Statistics banner ---------- */
/* The banner is drawn by the portal's analytics.js, which reads these
   theme names and falls back to fixed light colours without them. Mapped
   onto this site's tokens so it follows the light and dark themes. */
.vcs-cc {
  --surface: var(--color-surface-raised);
  --text: var(--color-text);
  --line: var(--color-border-strong);
  --line-strong: var(--color-border-strong);
  --accent: var(--color-primary);
  --accent-ink: var(--color-primary-foreground);
  --r-sm: var(--radius);
}

/* Links are not underlined site-wide, which would leave "Details"
   looking like the sentence it sits in. */
.vcs-cc a {
  text-decoration: underline;
}

/* ---------- Skip link ---------- */
/* Off screen until focused; the first Tab stop on every page. */
.skip-link {
  position: absolute;
  top: calc(-1 * var(--space-8));
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  background: var(--color-primary);
  color: var(--color-primary-foreground);
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-2);
}

/* The page you're on, in the primary nav. */
.nav-links a[aria-current="page"]:not(.nav-cta) {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/* ---------- Utilities ---------- */
/* Read by screen readers, not shown, e.g. "(opens in new tab)". */
.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;
}

.text-center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

.not-found {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8) var(--space-5);
}
