/* ==========================================================================
   EmlyCode — main stylesheet
   Dark-first, monochrome premium UI with a subtle grid backdrop.
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL OFL 1.1 — see assets/fonts/OFL.txt) ---------- */
/* latin-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Design tokens ---------- */
:root {
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --bg: #0a0a0b;
  --bg-2: #0e0e10;
  --surface: #121214;
  --surface-2: #17171a;
  --surface-3: #1e1e22;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f4f5;
  --text-2: #c4c4c9;
  --muted: #a1a1aa;
  --subtle: #8b8b94;
  --grid-line: rgba(255, 255, 255, 0.035);

  --btn-bg: #f4f4f5;
  --btn-text: #0a0a0b;
  --btn-bg-hover: #ffffff;

  --pill-bg: #f4f4f5;
  --pill-text: #0a0a0b;

  --up: #4ade80;
  --down: #f87171;
  --focus: #93c5fd;
  --danger: #f87171;
  --success: #4ade80;

  --chart-line: #e4e4e7;
  --chart-fill-top: rgba(255, 255, 255, 0.16);
  --chart-fill-bottom: rgba(255, 255, 255, 0);

  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  --shadow-md: 0 12px 40px -12px rgba(0, 0, 0, 0.6);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --header-h: 76px;
  --gutter: 20px;
  --max: 1240px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="light"] {
  --bg: #fafafa;
  --bg-2: #f4f4f5;
  --surface: #ffffff;
  --surface-2: #f6f6f7;
  --surface-3: #ececee;
  --border: rgba(10, 10, 11, 0.09);
  --border-strong: rgba(10, 10, 11, 0.16);
  --text: #0a0a0b;
  --text-2: #3f3f46;
  --muted: #52525b;
  --subtle: #63636b;
  --grid-line: rgba(10, 10, 11, 0.045);

  --btn-bg: #0a0a0b;
  --btn-text: #fafafa;
  --btn-bg-hover: #26262a;

  --pill-bg: #0a0a0b;
  --pill-text: #fafafa;

  --up: #15803d;
  --down: #b91c1c;
  --focus: #2563eb;
  --danger: #b91c1c;
  --success: #15803d;

  --chart-line: #18181b;
  --chart-fill-top: rgba(10, 10, 11, 0.12);
  --chart-fill-bottom: rgba(10, 10, 11, 0);

  --shadow-lg: 0 30px 80px -24px rgba(10, 10, 11, 0.22);
  --shadow-md: 0 12px 40px -16px rgba(10, 10, 11, 0.2);
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}
@media (min-width: 1200px) {
  :root { --gutter: 44px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -0.03em; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
ul[class], ol[class] { list-style: none; }

::selection { background: var(--text); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

main:focus { outline: none; }

.icon { width: 1.15em; height: 1.15em; flex: none; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Grid backdrop ---------- */
.grid-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 60% 30%, #000 30%, transparent 85%);
          mask-image: radial-gradient(ellipse 90% 75% at 60% 30%, #000 30%, transparent 85%);
}
.grid-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 40% at 85% 10%, rgba(120, 120, 160, 0.09), transparent 70%);
}
:root[data-theme="light"] .grid-bg::after { background: radial-gradient(ellipse 50% 40% at 85% 10%, rgba(120, 120, 160, 0.08), transparent 70%); }

/* ---------- Buttons ---------- */
.btn {
  --h: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--h);
  padding: 0 26px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease);
}
.btn .icon { transition: transform 0.25s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: translateY(1px) scale(0.99); }

.btn--primary {
  background: var(--btn-bg);
  color: var(--btn-text);
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 8px 24px -10px rgba(255,255,255,0.25);
}
:root[data-theme="light"] .btn--primary { box-shadow: 0 8px 24px -12px rgba(10,10,11,0.45); }
.btn--primary:hover { background: var(--btn-bg-hover); }

.btn--ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border-strong);
  color: var(--text);
}
:root[data-theme="light"] .btn--ghost { background: rgba(255,255,255,0.6); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--text-2); }

.btn--sm { --h: 44px; padding: 0 18px; border-radius: 12px; font-size: 0.95rem; }
.btn--lg { --h: 60px; padding: 0 32px; font-size: 1.06rem; border-radius: 16px; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.icon-btn .icon { width: 20px; height: 20px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}
.link-arrow .icon { transition: transform 0.25s var(--ease); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
          backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.04em;
  flex: none;
}
.brand__mark {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 9px;
  box-shadow: 0 0 0 1px var(--border-strong);
}
/* Brand mark colours follow the theme */
.brand-mark__bg { fill: var(--btn-bg); }
.brand-mark__fg, .brand-mark__px { fill: var(--btn-text); }
.brand__mark, .chatbot__avatar, .brand-mark { display: block; }
.brand:hover .brand-mark__px { animation: markBlink 1s steps(2, start) 2; }
@keyframes markBlink { to { opacity: 0; } }

.nav { display: none; margin-left: 28px; }
.nav__list { display: flex; align-items: center; gap: 6px; }
.nav__item { position: relative; }
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 1.04rem;
  font-weight: 500;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav__link:hover, .nav__link[aria-current="page"], .nav__link[data-active="true"], .nav__trigger[aria-expanded="true"] { color: var(--text); }
.nav__link:hover { background: var(--surface); }
.nav__chev { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.nav__trigger[aria-expanded="true"] .nav__chev { transform: rotate(180deg); }

.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: -16px;
  width: min(560px, 90vw);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
}
.dropdown::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.nav__item--dropdown.is-open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.dropdown__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.dropdown__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--subtle);
  font-weight: 600;
  padding: 4px 10px 8px;
}
.dropdown__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 0.95rem;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.dropdown__link strong { font-weight: 600; }
.dropdown__link:hover { background: var(--surface-2); color: var(--text); }
.dropdown__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-2);
}
.dropdown__icon .icon { width: 17px; height: 17px; }
.dropdown__all {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding: 12px 12px;
  border-radius: 10px;
  border-top: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.95rem;
}
.dropdown__all:hover { background: var(--surface-2); }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.theme-toggle .theme-toggle__moon { display: none; }
:root[data-theme="light"] .theme-toggle .theme-toggle__sun { display: none; }
:root[data-theme="light"] .theme-toggle .theme-toggle__moon { display: block; }

.menu-toggle .menu-toggle__close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__close { display: block; }

.header-cta { display: none; }
@media (min-width: 360px) { .header-cta { display: inline-flex; } }
@media (max-width: 479px) {
  .site-header__inner { gap: 8px; }
  .site-header__actions { gap: 8px; }
  .brand { font-size: 1.25rem; }
  .header-cta { --h: 42px; padding: 0 14px; font-size: 0.9rem; }
  .site-header .icon-btn { width: 42px; height: 42px; }
}
@media (max-width: 479px) {
  .site-header .brand { gap: 7px; }
  .site-header .brand__mark { width: 26px; height: 26px; border-radius: 7px; }
  .site-header__actions { gap: 6px; }
}
@media (max-width: 379px) { .site-header .brand__mark { display: none; } }

@media (min-width: 980px) {
  .nav { display: block; }
  .menu-toggle { display: none; }
  .header-cta { --h: 48px; padding: 0 22px; font-size: 1rem; }
}

.mobile-menu {
  border-top: 1px solid var(--border);
  background: var(--bg);
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mobile-menu:not([hidden]) { animation: menuIn 0.28s var(--ease); }
@keyframes menuIn { from { opacity: 0; transform: translateY(-8px); } }
.mobile-menu__inner { padding-block: 18px 28px; display: grid; gap: 6px; }
.mobile-menu__label {
  margin-top: 10px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subtle);
  font-weight: 600;
}
.mobile-menu__list { display: grid; gap: 2px; }
.mobile-menu__list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
.mobile-menu__list a:hover { color: var(--text); }
.mobile-menu__list--main { margin: 12px 0 18px; }
.mobile-menu__list--main a { font-size: 1.15rem; font-weight: 600; color: var(--text); }
@media (min-width: 980px) { .mobile-menu { display: none !important; } }

/* ---------- Chips / eyebrows ---------- */
.chip {
  display: inline-flex;
  vertical-align: top;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 6px 18px 6px 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text-2);
  font-size: 0.95rem;
  font-weight: 500;
}
.chip__tag {
  flex: none;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--pill-bg);
  color: var(--pill-text);
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.1;
}
.chip__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip__text span { opacity: 0.55; padding-inline: 3px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--subtle);
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--text);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--text) 12%, transparent);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: 56px 72px;
  overflow: hidden;
}
@media (min-width: 980px) {
  .hero { padding-block: 120px 110px; min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; }
  .hero > .container { width: 100%; }
}

.hero__grid > *, .split > *, .svc-layout > *, .contact-layout > *, .faq-layout > * { min-width: 0; }
.hero__grid {
  display: grid;
  gap: 56px;
  align-items: center;
}
@media (min-width: 1080px) {
  .hero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; }
}

.hero__title {
  margin-top: 32px;
  font-size: clamp(2.75rem, 5.2vw + 1rem, 5rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 700;
}
.hero__title .muted-word { color: var(--muted); }
.hero__lead {
  margin-top: 30px;
  max-width: 36ch;
  font-size: clamp(1.12rem, 1.6vw, 1.5rem);
  line-height: 1.6;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: -0.01em;
}
@media (min-width: 640px) { .hero__lead { max-width: 40ch; } }
.hero__actions {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
@media (max-width: 539px) {
  .hero__actions .btn { width: 100%; }
}
.hero__meta {
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 0;
  color: var(--subtle);
  font-size: 0.98rem;
}
.hero__meta li { display: inline-flex; align-items: center; }
@media (max-width: 539px) {
  .hero__meta { gap: 8px 18px; }
  .hero__meta li + li::before { display: none !important; }
  .hero__meta li::after { content: ""; }
}
.hero__meta li + li::before {
  content: "";
  width: 1px;
  height: 22px;
  margin-inline: 22px;
  background: var(--border-strong);
}

/* ---------- Dashboard preview ---------- */
.dash {
  position: relative;
  border-radius: 22px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform-style: preserve-3d;
}
.dash__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.dash__dots { display: flex; gap: 7px; }
.dash__dots span { width: 11px; height: 11px; border-radius: 50%; background: var(--surface-3); }
.dash__name { font-size: 0.98rem; font-weight: 500; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash__badge {
  margin-left: auto;
  flex: none;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  font-size: 0.8rem;
  color: var(--text-2);
}
.dash__body { padding: 20px; display: grid; gap: 16px; }
.dash__kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 560px) { .dash__kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  min-width: 0;
}
.kpi__label { font-size: 0.82rem; color: var(--subtle); line-height: 1.35; min-height: 2.7em; }
.kpi__value { margin-top: 10px; font-size: 1.75rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi__delta { margin-top: 8px; font-size: 0.85rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.kpi__delta--up { color: var(--up); }
.kpi__delta--down { color: var(--down); }
.chart {
  padding: 22px 22px 0;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.chart__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chart__title { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; }
.chart__pill { padding: 4px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); font-size: 0.82rem; color: var(--text-2); }
.chart svg { width: 100%; height: auto; margin-top: 16px; overflow: visible; }
.chart__line { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1200; stroke-dashoffset: 1200; }
.chart__area { opacity: 0; }
.chart__dot { fill: var(--chart-line); opacity: 0; }
.chart__gridline { stroke: var(--border); stroke-width: 1; }
.is-drawn .chart__line { animation: draw 2.2s var(--ease) 0.3s forwards; }
.is-drawn .chart__area { animation: fadeIn 1.2s var(--ease) 1.1s forwards; }
.is-drawn .chart__dot { animation: fadeIn 0.4s var(--ease) 2.1s forwards, pulse 2.4s ease-in-out 2.5s infinite; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes pulse { 50% { r: 6; } }

.dash-wrap { position: relative; }
.dash-wrap__note { margin-top: 12px; font-size: 0.82rem; color: var(--subtle); text-align: right; }

/* ---------- Sections ---------- */
.section { position: relative; padding-block: 80px; }
@media (min-width: 980px) { .section { padding-block: 120px; } }
.section--tight { padding-block: 56px; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--border); }

.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--split {
  max-width: none;
  display: grid;
  gap: 20px;
  align-items: end;
}
@media (min-width: 900px) { .section-head--split { grid-template-columns: 1.1fr 1fr; gap: 48px; } }
.section-title {
  margin-top: 18px;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  letter-spacing: -0.045em;
  line-height: 1.04;
}
.section-lead { margin-top: 18px; font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.section-head--split .section-lead { margin-top: 0; }

/* ---------- Cards ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--text) 7%, transparent), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
a.card:hover, .card--hover:hover { border-color: var(--border-strong); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--bg-2);
  color: var(--text);
}
.card__icon .icon { width: 24px; height: 24px; }
.card__title { margin-top: 22px; font-size: 1.32rem; letter-spacing: -0.03em; }
.card__text { margin-top: 10px; color: var(--muted); font-size: 1rem; }
.card__foot { margin-top: auto; padding-top: 24px; }
.card__tag {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subtle);
  font-weight: 600;
}

.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid { gap: 20px; }
}

.cat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}
.cat-head + .grid { margin-bottom: 44px; }
.cat-head__title { font-size: 1.15rem; display: flex; align-items: center; gap: 12px; letter-spacing: -0.02em; }
.cat-head__num {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--pill-bg);
  color: var(--pill-text);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.cat-head__text { color: var(--muted); max-width: 60ch; }

/* ---------- Split feature ---------- */
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 980px) { .split { grid-template-columns: 1fr 1fr; gap: 72px; } }

.check-list { display: grid; gap: 14px; margin-top: 28px; }
.check-list li { display: flex; gap: 14px; align-items: flex-start; color: var(--text-2); }
.check-list .icon {
  width: 24px;
  height: 24px;
  padding: 4px;
  border-radius: 7px;
  background: var(--pill-bg);
  color: var(--pill-text);
  margin-top: 1px;
}

.stack {
  position: relative;
  display: grid;
  gap: 14px;
}
.stack__row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.stack__row .card__icon { width: 46px; height: 46px; }
.stack__label { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--subtle); font-weight: 600; }
.stack__title { font-weight: 600; font-size: 1.08rem; letter-spacing: -0.02em; }
.stack__connector { width: 1px; height: 22px; margin-left: 43px; background: linear-gradient(var(--border-strong), transparent); }

/* ---------- Markets ---------- */
.market {
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.market__code {
  position: absolute;
  right: 24px;
  top: 12px;
  font-size: clamp(4rem, 9vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px var(--border-strong);
  line-height: 1;
  user-select: none;
}
.market__title { font-size: 1.6rem; letter-spacing: -0.035em; }
.market__text { margin-top: 12px; color: var(--muted); max-width: 34ch; }
.market > :not(.market__code) { position: relative; z-index: 1; }
.market__list { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.market__list li {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  font-size: 0.88rem;
  color: var(--text-2);
}

/* ---------- Process ---------- */
.process {
  display: grid;
  gap: 16px;
  counter-reset: step;
}
@media (min-width: 720px) { .process { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .process { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.process__step {
  position: relative;
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}
.process__num {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--pill-bg);
  color: var(--pill-text);
  font-weight: 700;
  font-size: 0.95rem;
}
.process__title { margin-top: 20px; font-size: 1.18rem; }
.process__text { margin-top: 8px; color: var(--muted); font-size: 0.96rem; }

/* ---------- Segments ---------- */
.segments { display: grid; gap: 12px; }
@media (min-width: 640px) { .segments { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .segments { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.segment {
  display: flex;
  gap: 16px;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.segment .card__icon { width: 44px; height: 44px; border-radius: 12px; }
.segment__title { font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; }
.segment__text { margin-top: 4px; color: var(--muted); font-size: 0.94rem; }

.pain-list { display: grid; gap: 10px; }
@media (min-width: 720px) { .pain-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pain-list li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px dashed var(--border-strong);
  color: var(--text-2);
}
.pain-list .icon { color: var(--subtle); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq__item {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.25s var(--ease);
}
.faq__item[open] { border-color: var(--border-strong); }
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
  cursor: pointer;
  list-style: none;
  border-radius: 16px;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__icon { width: 22px; height: 22px; transition: transform 0.3s var(--ease); color: var(--muted); }
.faq__item[open] .faq__icon { transform: rotate(45deg); }
.faq__a { padding: 0 22px 22px; color: var(--muted); max-width: 72ch; }
.faq__item[open] .faq__a { animation: faqIn 0.35s var(--ease); }
@keyframes faqIn { from { opacity: 0; transform: translateY(-4px); } }

.faq-layout { display: grid; gap: 40px; }
@media (min-width: 980px) { .faq-layout { grid-template-columns: 0.8fr 1.2fr; gap: 72px; } }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: 32px;
  padding: 44px 28px;
  border-radius: 28px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(140deg, var(--surface) 0%, var(--bg-2) 100%);
}
@media (min-width: 900px) {
  .cta-band { grid-template-columns: 1.3fr auto; align-items: center; padding: 64px; }
}
.cta-band__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 100% 0%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse at 100% 0%, #000 0%, transparent 70%);
}
.cta-band__title { font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -0.045em; }
.cta-band__text { margin-top: 14px; color: var(--muted); font-size: 1.1rem; max-width: 52ch; }
.cta-band__actions { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 540px) and (max-width: 899px) { .cta-band__actions { flex-direction: row; flex-wrap: wrap; } }

/* ---------- Inner page hero ---------- */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: 56px 64px;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 980px) { .page-hero { padding-block: 96px 96px; } }
.page-hero__title {
  margin-top: 22px;
  font-size: clamp(2.3rem, 5.6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  max-width: 18ch;
}
.page-hero__lead { margin-top: 22px; font-size: clamp(1.08rem, 1.5vw, 1.3rem); color: var(--muted); max-width: 58ch; }
.page-hero__actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }
@media (max-width: 539px) { .page-hero__actions .btn { width: 100%; } }

.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.9rem; color: var(--subtle); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before { content: "/"; opacity: 0.5; }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs [aria-current] { color: var(--text-2); }

/* ---------- Service page ---------- */
.svc-layout { display: grid; gap: 48px; }
@media (min-width: 1180px) { .svc-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 64px; align-items: start; } }
@media (max-width: 1179px) { .aside-card { position: static; max-width: 640px; } }
.prose-lg p { font-size: 1.15rem; color: var(--text-2); line-height: 1.75; }
.prose-lg p + p { margin-top: 18px; }

.aside-card {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--surface);
}
.aside-card__title { font-size: 1.25rem; }
.aside-card__text { margin-top: 10px; color: var(--muted); font-size: 0.98rem; }
.aside-card .btn { margin-top: 22px; }
.aside-card__list { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--border); display: grid; gap: 10px; font-size: 0.95rem; color: var(--text-2); }
.aside-card__list li { display: flex; gap: 10px; align-items: center; }
.aside-card__list .icon { color: var(--muted); }

.included { display: grid; gap: 12px; }
@media (min-width: 640px) { .included { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.included__item {
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.25s var(--ease);
}
.included__item:hover { border-color: var(--border-strong); }
.included__title { display: flex; gap: 12px; align-items: center; font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; }
.included__title .icon { width: 22px; height: 22px; padding: 4px; border-radius: 6px; background: var(--pill-bg); color: var(--pill-text); }
.included__text { margin-top: 8px; color: var(--muted); font-size: 0.96rem; padding-left: 34px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-list li {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.95rem;
  color: var(--text-2);
}

.sub-title { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.035em; margin-bottom: 24px; }
.block { margin-top: 64px; }
.block:first-child { margin-top: 0; }

/* ---------- About ---------- */
.facts {
  display: grid;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}
.facts__row { display: grid; gap: 4px; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.facts__row:last-child { border-bottom: 0; }
@media (min-width: 640px) { .facts__row { grid-template-columns: minmax(110px, 150px) minmax(0, 1fr); gap: 20px; } }
.facts dt { color: var(--subtle); font-size: 0.92rem; }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.facts dd a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }

.pillar__num { font-size: 0.85rem; color: var(--subtle); font-weight: 600; letter-spacing: 0.08em; }

/* ---------- Legal prose ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.5rem; margin-top: 48px; margin-bottom: 14px; letter-spacing: -0.03em; }
.prose h3 { font-size: 1.15rem; margin-top: 28px; margin-bottom: 10px; }
.prose p, .prose li { color: var(--text-2); line-height: 1.75; }
.prose p + p { margin-top: 14px; }
.prose ul { padding-left: 1.25em; margin-top: 12px; display: grid; gap: 8px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose .updated { color: var(--subtle); font-size: 0.95rem; }
.prose .notice {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
}

/* ---------- Contact ---------- */
.contact-layout { display: grid; gap: 40px; }
@media (min-width: 1040px) { .contact-layout { grid-template-columns: 340px minmax(0, 1fr); gap: 56px; align-items: start; } }
.contact-info { display: grid; gap: 14px; }
.contact-card {
  display: flex;
  gap: 16px;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.contact-card .card__icon { width: 44px; height: 44px; border-radius: 12px; }
.contact-card__label { font-size: 0.85rem; color: var(--subtle); }
.contact-card__value { font-weight: 600; word-break: break-word; }
.contact-card__value a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Multi-step form ---------- */
.form-card {
  position: relative;
  border-radius: 26px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.form-card__head { padding: 26px 24px 0; }
@media (min-width: 640px) { .form-card__head { padding: 34px 40px 0; } }
.form-card__title { font-size: 1.6rem; letter-spacing: -0.035em; }
.form-card__sub { margin-top: 6px; color: var(--muted); }

.progress { margin-top: 26px; }
.progress__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.progress__step {
  display: grid;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--subtle);
  font-weight: 500;
}
.progress__bar {
  height: 4px;
  border-radius: 4px;
  background: var(--surface-3);
  overflow: hidden;
}
.progress__bar::after {
  content: "";
  display: block;
  height: 100%;
  width: 0;
  background: var(--text);
  border-radius: inherit;
  transition: width 0.45s var(--ease);
}
.progress__step.is-done .progress__bar::after,
.progress__step.is-current .progress__bar::after { width: 100%; }
.progress__step.is-current { color: var(--text); }
.progress__step.is-done { color: var(--text-2); }
.progress__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 479px) {
  .progress__label { display: none; }
  .progress__step.is-current .progress__label { display: block; position: absolute; }
  .progress { position: relative; padding-bottom: 22px; }
}
.progress__count { display: none; }

.form-body { padding: 26px 24px 28px; }
@media (min-width: 640px) { .form-body { padding: 34px 40px 40px; } }

.js .form-step { display: none; }
.js .form-step.is-active { display: block; animation: stepIn 0.4s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateX(12px); } }
.form-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.form-step + .form-step { margin-top: 40px; }
.js .form-step + .form-step { margin-top: 0; }
.form-step__legend { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.025em; padding: 0; }
.form-step__hint { margin-top: 6px; color: var(--muted); font-size: 0.96rem; margin-bottom: 22px; }

.svc-options { display: grid; gap: 10px; }
@media (min-width: 560px) { .svc-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.svc-option { position: relative; }
.svc-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.svc-option label {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: var(--bg-2);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.svc-option label:hover { border-color: var(--text-2); }
.svc-option .card__icon { width: 42px; height: 42px; border-radius: 11px; }
.svc-option__name { font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.svc-option__cat { font-size: 0.8rem; color: var(--subtle); }
.svc-option__check {
  margin-left: auto;
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  color: transparent;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.svc-option__check .icon { width: 15px; height: 15px; }
.svc-option input:checked + label { border-color: var(--text); background: var(--surface-2); box-shadow: 0 0 0 1px var(--text) inset; }
.svc-option input:checked + label .svc-option__check { background: var(--text); color: var(--bg); border-color: var(--text); }
.svc-option input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 3px; }

.field-grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .field-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field { display: grid; gap: 8px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field__label { font-weight: 600; font-size: 0.95rem; }
.field__label .opt { color: var(--subtle); font-weight: 400; font-size: 0.88rem; }
.field__label .req { color: var(--muted); }
.field__help { font-size: 0.86rem; color: var(--subtle); }
.input, .select, .textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--bg-2);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px;
}
.input::placeholder, .textarea::placeholder { color: var(--subtle); opacity: 0.85; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-2); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); }
.field__error { display: none; align-items: center; gap: 6px; color: var(--danger); font-size: 0.88rem; font-weight: 500; }
.field.has-error .field__error, .group-error.is-visible { display: flex; }
.group-error { display: none; margin-top: 12px; align-items: center; gap: 6px; color: var(--danger); font-size: 0.9rem; font-weight: 500; }

.radio-pills { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.radio-pills legend { margin-bottom: 8px; padding: 0; }
.radio-pill { position: relative; }
.radio-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio-pill label {
  display: inline-flex;
  align-items: center;
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-2);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s var(--ease);
}
.radio-pill label:hover { border-color: var(--text-2); }
.radio-pill input:checked + label { background: var(--text); color: var(--bg); border-color: var(--text); }
.radio-pill input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 3px; }

.consent {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--bg-2);
}
.consent input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--text);
}
.consent label { font-size: 0.94rem; color: var(--text-2); }
.consent a { text-decoration: underline; text-underline-offset: 3px; color: var(--text); }

.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.review {
  display: grid;
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.review__row { display: grid; gap: 4px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.review__row:last-child { border-bottom: 0; }
@media (min-width: 600px) { .review__row { grid-template-columns: 170px 1fr auto; gap: 16px; align-items: start; } }
.review__key { font-size: 0.88rem; color: var(--subtle); }
.review__val { font-weight: 500; white-space: pre-wrap; word-break: break-word; }
.review__val.is-empty { color: var(--subtle); font-weight: 400; font-style: italic; }
.review__edit {
  justify-self: start;
  border: 0;
  background: none;
  padding: 2px 0;
  color: var(--text-2);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.review__edit:hover { color: var(--text); }

.form-nav {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.form-nav .btn { min-width: 0; }
.form-nav__spacer { flex: 1; }
.no-js-submit { margin-top: 28px; }
.js .no-js-submit { display: none; }
html:not(.js) .form-nav { display: none; }

.form-alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  margin-bottom: 22px;
  border-radius: 14px;
  border: 1px solid;
  font-weight: 500;
}
.form-alert .icon { margin-top: 2px; }
.form-alert--error { border-color: color-mix(in srgb, var(--danger) 50%, transparent); background: color-mix(in srgb, var(--danger) 9%, transparent); color: var(--text); }
.form-alert--error .icon { color: var(--danger); }

.form-success { text-align: center; padding: 64px 24px; }
.form-success__icon {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: var(--pill-bg);
  color: var(--pill-text);
  animation: pop 0.6s var(--ease);
}
.form-success__icon .icon { width: 34px; height: 34px; }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } }
.form-success__title { margin-top: 24px; font-size: 1.9rem; letter-spacing: -0.04em; }
.form-success__text { margin: 12px auto 0; color: var(--muted); max-width: 46ch; }
.form-success .btn { margin-top: 28px; }

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 64px 36px;
  background: var(--bg);
}
.site-footer__grid { display: grid; gap: 40px; }
@media (min-width: 720px) { .site-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .site-footer__brand { grid-column: 1 / -1; } }
@media (min-width: 1040px) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } .site-footer__brand { grid-column: auto; } }
.site-footer__about { margin-top: 18px; color: var(--muted); max-width: 40ch; }
.site-footer__email, .site-footer__markets { margin-top: 16px; display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); font-weight: 500; }
.site-footer__markets { display: flex; margin-top: 10px; font-weight: 400; color: var(--muted); }
.site-footer__email:hover { color: var(--text); }
.site-footer__heading { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--subtle); font-weight: 600; margin-bottom: 18px; }
.site-footer__links { display: grid; gap: 12px; }
.site-footer__links a { color: var(--text-2); transition: color 0.2s var(--ease); }
.site-footer__links a:hover { color: var(--text); }
.site-footer__bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 0.9rem;
  color: var(--subtle);
}

/* ---------- Chatbot ---------- */
.chatbot { position: fixed; right: 18px; bottom: 18px; z-index: 150; }
@media (min-width: 768px) { .chatbot { right: 28px; bottom: 28px; } }
.chatbot__launcher {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--btn-bg);
  color: var(--btn-text);
  box-shadow: 0 16px 40px -10px rgba(0,0,0,0.55), 0 0 0 6px color-mix(in srgb, var(--bg) 60%, transparent);
  transition: transform 0.25s var(--ease), background-color 0.2s var(--ease);
}
.chatbot__launcher:hover { transform: translateY(-2px) scale(1.03); }
.chatbot__launcher .icon { width: 28px; height: 28px; }
.chatbot__launcher-close { display: none; }
.chatbot.is-open .chatbot__launcher-open { display: none; }
.chatbot.is-open .chatbot__launcher-close { display: block; }
.chatbot__launcher::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--up);
  border: 2px solid var(--btn-bg);
}
.chatbot.is-open .chatbot__launcher::after, .chatbot.was-opened .chatbot__launcher::after { display: none; }

.chatbot__panel {
  position: absolute;
  right: 0;
  bottom: 80px;
  width: min(390px, calc(100vw - 36px));
  height: min(600px, calc(100dvh - 130px));
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform-origin: bottom right;
}
.chatbot__panel:not([hidden]) { animation: chatIn 0.3s var(--ease); }
@keyframes chatIn { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
.chatbot__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.chatbot__avatar {
  width: 38px;
  height: 38px;
  flex: none;
}
.chatbot__meta { flex: 1; min-width: 0; }
.chatbot__title { font-size: 1rem; letter-spacing: -0.02em; }
.chatbot__sub { font-size: 0.8rem; color: var(--subtle); }
.chatbot__ctl {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: none;
  color: var(--muted);
}
.chatbot__ctl:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.chatbot__ctl .icon { width: 18px; height: 18px; }
.chatbot__log {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.msg {
  max-width: 88%;
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 0.94rem;
  line-height: 1.5;
  animation: msgIn 0.3s var(--ease);
}
.msg p + p { margin-top: 6px; }
.msg a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }
.msg--bot { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 6px; color: var(--text-2); }
.msg--user { align-self: flex-end; background: var(--btn-bg); color: var(--btn-text); border-bottom-right-radius: 6px; font-weight: 500; }
.msg--typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.msg--typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.msg--typing span:nth-child(2) { animation-delay: 0.15s; }
.msg--typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 50% { opacity: 0.25; } }
.chatbot__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--border);
  max-height: 46%;
  overflow-y: auto;
}
.chat-opt {
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-2);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  line-height: 1.3;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.chat-opt:hover { border-color: var(--text-2); background: var(--surface-2); }
.chat-opt--primary { background: var(--btn-bg); color: var(--btn-text); border-color: transparent; }
.chat-opt--primary:hover { background: var(--btn-bg-hover); }
.chatbot__foot { padding: 0 16px 12px; font-size: 0.75rem; color: var(--subtle); }
.chatbot__foot a { text-decoration: underline; }

@media (max-width: 480px) {
  .chatbot__panel {
    position: fixed;
    inset: auto 10px 92px 10px;
    width: auto;
    height: min(560px, calc(100dvh - 120px));
  }
}

/* ---------- 90s retro cursor ---------- */
/* Pixel-art arrow (classic desktop style) — only on precise pointers, enabled by cursor.js. */
html.retro-cursor,
html.retro-cursor body {
  cursor: url("../img/cursor-arrow.svg") 1 1, auto;
}
html.retro-cursor :is(a, button, summary, label[for], [role="button"], select, .svc-option label, .radio-pill label) {
  cursor: url("../img/cursor-hand.svg") 9 1, pointer;
}
html.retro-cursor :is(input:not([type="checkbox"]):not([type="radio"]), textarea) { cursor: text; }

.cursor-trail {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  contain: strict;
  width: 100vw;
  height: 100vh;
}
.cursor-trail__px {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 4px;
  background: var(--text);
  opacity: 0;
  will-change: transform, opacity;
  image-rendering: pixelated;
}

/* ---------- Reveal animations ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal-stagger > * { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal-stagger.is-visible > * { opacity: 1; transform: none; }
.js .reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.06s; }
.js .reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.12s; }
.js .reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.18s; }
.js .reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.24s; }
.js .reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.30s; }
.js .reveal-stagger.is-visible > *:nth-child(n+7) { transition-delay: 0.36s; }

.hero-in > * { animation: heroIn 0.9s var(--ease) both; }
.hero-in > *:nth-child(2) { animation-delay: 0.08s; }
.hero-in > *:nth-child(3) { animation-delay: 0.16s; }
.hero-in > *:nth-child(4) { animation-delay: 0.24s; }
.hero-in > *:nth-child(5) { animation-delay: 0.32s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(20px); } }
.dash-in { animation: dashIn 1.1s var(--ease) 0.25s both; }
@keyframes dashIn { from { opacity: 0; transform: translateY(28px) scale(0.98); } }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding-block: 120px; }
.notfound__code { font-size: clamp(6rem, 20vw, 12rem); font-weight: 800; letter-spacing: -0.07em; line-height: 0.9; color: transparent; -webkit-text-stroke: 1.5px var(--border-strong); }
.notfound .page-hero__lead { margin-inline: auto; }
.notfound .page-hero__actions { justify-content: center; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0 !important; }
.text-muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal, .js .reveal-stagger > * { opacity: 1; transform: none; }
  .chart__line { stroke-dashoffset: 0; }
  .chart__area, .chart__dot { opacity: 1; }
  .cursor-trail { display: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .chatbot, .cta-band, .site-footer, .cursor-trail { display: none !important; }
  body { background: #fff; color: #000; }
}

@media (min-width: 980px) { .page-hero--compact { padding-block: 72px 64px; } }

body.menu-open .chatbot { display: none; }
@media (max-width: 559px) {
  .svc-option label { padding: 12px 14px; gap: 12px; border-radius: 14px; }
  .svc-option .card__icon { width: 36px; height: 36px; border-radius: 10px; }
  .svc-option .card__icon .icon { width: 19px; height: 19px; }
  .svc-option__cat { display: none; }
  .chip { font-size: 0.88rem; }
}

/* ---------- Touch target sizing (audit) ---------- */
.brand { min-height: 44px; }
.site-footer__email,
.aside-card__list a,
.facts dd a,
.contact-card__value a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-footer__email { margin-top: 8px; }
.facts dd { display: flex; align-items: center; min-height: 24px; }
.site-footer__links a { display: inline-flex; align-items: center; min-height: 32px; }
@media (pointer: coarse), (max-width: 1024px) {
  .breadcrumbs a, .breadcrumbs [aria-current] { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  .site-footer__links { gap: 0; }
  .site-footer__links a { min-height: 44px; min-width: 44px; }
}

/* ---------- Tablet layout refinements (audit) ---------- */
/* Odd last card in a 2-column layout spans the full row instead of leaving a gap. */
@media (min-width: 640px) and (max-width: 979px) {
  .grid--3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
/* 4-up cards only when there is room; 2-up on tablets. */
@media (min-width: 980px) and (max-width: 1099px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Process: 3 + 2 on tablets rather than 2 + 2 + 1. */
@media (min-width: 720px) and (max-width: 1099px) {
  .process { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .process > * { grid-column: span 2; }
  .process > :nth-child(4), .process > :nth-child(5) { grid-column: span 3; }
}
/* Keep market text clear of the decorative country code: content sits below it. */
.market { padding-top: clamp(72px, 7vw, 96px); }
.market__code { top: 16px; font-size: clamp(3rem, 5.5vw, 5rem); }
.market__title, .market__text { max-width: 46ch; }
/* Service pages: process list inside the narrower main column (3 + 2). */
.process.process--compact { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) {
  .process.process--compact { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .process.process--compact > * { grid-column: span 2; }
  .process.process--compact > :nth-child(4), .process.process--compact > :nth-child(5) { grid-column: span 3; }
}

@media (max-width: 767px) {
  .chatbot__launcher { width: 56px; height: 56px; }
  .chatbot__launcher .icon { width: 24px; height: 24px; }
  .chatbot__panel { bottom: 70px; }
}

/* Icons never shrink inside flex rows (audit) */
.card__icon, .chatbot__avatar, .dropdown__icon { flex: none; }

/* Contact: form first on phones/tablets; info cards follow in a compact grid. */
@media (max-width: 1039px) {
  .contact-layout > .reveal { order: -1; }
  .contact-info { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
  .contact-info > p { grid-column: 1 / -1; }
}

/* ---------- Utility classes replacing inline styles (strict CSP) ---------- */
.breadcrumbs + .chip { margin-top: 28px; }
.split.split--top { align-items: start; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.check-list.check-list--compact { margin-top: 20px; gap: 10px; font-size: 0.95rem; }
.chart__stop-top { stop-color: var(--chart-fill-top); }
.chart__stop-bottom { stop-color: var(--chart-fill-bottom); }
.notfound .page-hero__title { margin-inline: auto; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; }
.contact-note { color: var(--muted); font-size: 0.9rem; padding: 4px 4px 0; }
.aside-card__title { margin-top: 18px; }

/* ---------- Form privacy notice ---------- */
.privacy-notice {
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  font-size: 0.9rem;
  color: var(--text-2);
}
.privacy-notice__title { display: flex; align-items: center; gap: 8px; font-size: 0.98rem; letter-spacing: -0.01em; margin-bottom: 10px; }
.privacy-notice__list { display: grid; gap: 8px; padding-left: 0; list-style: none; }
.privacy-notice a { text-decoration: underline; text-underline-offset: 3px; color: var(--text); }

/* ---------- Legal pages ---------- */
.legal-nav { margin-top: 28px; }
.legal-nav ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.legal-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: var(--radius-pill); border: 1px solid var(--border-strong);
  font-size: 0.92rem; color: var(--text-2);
}
.legal-nav a:hover { color: var(--text); border-color: var(--text-2); }
.legal-nav a[aria-current="page"] { background: var(--pill-bg); color: var(--pill-text); border-color: transparent; }
.prose table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; border: 1px solid var(--border); color: var(--text-2); }
.prose th { background: var(--surface); color: var(--text); font-weight: 600; }
.prose .table-wrap { overflow-x: auto; }
.prose h2 { scroll-margin-top: calc(var(--header-h) + 16px); }
.prose .toc { margin-top: 24px; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.prose .toc ol { margin: 8px 0 0; padding-left: 1.25em; display: grid; gap: 4px; }
@media (max-width: 639px) {
  .prose table, .prose thead, .prose tbody, .prose tr, .prose th, .prose td { display: block; width: 100%; }
  .prose thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .prose tr { margin-bottom: 12px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
  .prose td { border: 0; border-bottom: 1px solid var(--border); }
  .prose td:last-child { border-bottom: 0; }
  .prose td[data-label]::before { content: attr(data-label); display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--subtle); margin-bottom: 4px; }
}

.cursor-toggle { min-height: 44px; color: var(--subtle); font-size: 0.9rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cursor-toggle:hover { color: var(--text); }
@media (forced-colors: active) { html.retro-cursor, html.retro-cursor * { cursor: auto !important; } .cursor-trail { display: none; } }

.site-footer__legal { margin-top: 40px; }
.site-footer__legal ul { display: flex; flex-wrap: wrap; gap: 4px 22px; list-style: none; padding: 0; }
.site-footer__legal a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-2); font-size: 0.92rem; }
.site-footer__legal a:hover { color: var(--text); }

/* ---------- Insights & SEO pages ---------- */
.page-hero__title--article { max-width: 22ch; font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
.article-meta { margin-top: 18px; color: var(--subtle); font-size: 0.95rem; }
.prose--article { max-width: 720px; }
.prose--article p { font-size: 1.08rem; }
.prose--article h2:first-child { margin-top: 0; }
.dm-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.dm-links .link-arrow { min-height: 44px; }
.card__title a { color: inherit; display: inline-flex; align-items: center; min-height: 44px; }

.dropdown__locs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 12px 0; border-top: 1px solid var(--border); margin-top: 6px; }
.dropdown__locs a { display: inline-flex; align-items: center; min-height: 36px; font-size: 0.9rem; color: var(--text-2); }
.dropdown__locs a:hover { color: var(--text); }
@media (min-width: 1040px) { .site-footer__grid { grid-template-columns: 1.5fr repeat(4, 1fr); } }
.market__link { margin-top: 20px; min-height: 44px; }
.prose--article .faq { margin-top: 16px; }
.prose--article .faq__a p { font-size: 1rem; }

/* Analytics consent banner */
.cookie-banner {
  position: fixed; left: 18px; bottom: 18px; z-index: 160; width: min(440px, calc(100vw - 36px));
  padding: 20px; border: 1px solid var(--border-strong); border-radius: 18px;
  background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.cookie-banner__title { margin: 0 0 6px; font-size: 1.05rem; }
.cookie-banner__text { margin: 0 0 14px; color: var(--text-2); font-size: 0.92rem; line-height: 1.5; }
.cookie-banner__text a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.cookie-banner__actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) { .cookie-banner { left: 12px; right: 12px; bottom: 86px; width: auto; } }
