/* ============================================================================
   Smartentre Design System v2 — shared marketing-site stylesheet.
   Light-first. Dark is a deliberate surface (.surface-dark), not the default.
   Spec and rules: docs/SMARTENTRE_REDESIGN_PLAN.md §27 (R.2) and §28 (R.2.1).

   Cache note: .htaccess gives .css no explicit rule, so it inherits the
   1-week ExpiresDefault. Pages must reference this file with a version query
   (site.css?v=…) and bump it on every change.
   ========================================================================= */

/* ── 1. Tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Colour — light canvas */
  --site-bg: #F5F6F8;
  --site-surface: #FFFFFF;
  --site-surface-soft: #ECEFF3;
  --site-text: #0E1116;
  --site-text-secondary: #454C5A;
  --site-text-muted: #5F6676;
  /* Three line weights. Structure comes from lines, not from boxes:
     --site-line   major layout edges (header edge, intro band, frame bands)
     --site-border-strong   structure (frame rails, TOC rule, link-grid cells)
     --site-border          minor dividers (section rules inside an article) */
  --site-border: rgba(14, 17, 22, 0.10);
  --site-border-strong: rgba(14, 17, 22, 0.22);
  --site-line: #0E1116;

  /* Brand cyan is a mark/fill colour. On light it is NOT a text colour
     (≈1.7:1 on white); --site-accent-text is its text-safe partner. */
  --site-accent: #4FD8E8;
  --site-accent-text: #0A7B90;
  --site-accent-soft: rgba(79, 216, 232, 0.16);
  --site-on-accent: #06070A;

  /* Dark editorial surface */
  --site-dark: #0A0C10;
  --site-dark-surface: #13161C;
  --site-dark-text: #E8EBF0;
  --site-dark-muted: #9AA2B0;
  --site-dark-border: rgba(232, 235, 240, 0.12);

  --site-focus: #0A7B90;
  --site-error: #B42323;

  /* Type */
  --font-display: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Chivo Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --text-display: clamp(2.75rem, 2rem + 3.2vw, 4.5rem);    /* 44 → 72 */
  --text-h1: clamp(2rem, 1.45rem + 2.2vw, 3.5rem);          /* 32 → 56 */
  --text-h2: clamp(1.75rem, 1.45rem + 1.25vw, 2.5rem);      /* 28 → 40 */
  --text-h3: clamp(1.25rem, 1.18rem + 0.3vw, 1.375rem);     /* 20 → 22 */
  --text-body-lg: 1.125rem;                                 /* 18 */
  --text-body: 1rem;                                        /* 16 */
  --text-body-sm: 0.875rem;                                 /* 14 */
  --text-label: 0.8125rem;                                  /* 13 — functional minimum */
  --text-mono: 0.8125rem;                                   /* 13 */

  /* Space — 4px base */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Layout */
  --content-max: 1200px;
  --wide-max: 1360px;
  --prose-max: 68ch;
  --gutter: 16px;
  --grid-gap: 16px;
  --header-h: 56px;
  /* Denser than R.2: structure carries the page, not empty space. */
  --section-s: 40px;
  --section-m: 56px;
  --section-l: 80px;

  /* Shape — three radii only */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-pill: 999px;          /* dots and true status pills only */

  /* One elevation, for things that float above content (menus, frames) */
  --shadow-float: 0 1px 2px rgba(14, 17, 22, 0.06), 0 12px 32px -12px rgba(14, 17, 22, 0.18);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 120ms;
  --dur: 200ms;
  --dur-slow: 360ms;

  color-scheme: light;
}

@media (min-width: 640px) {
  :root { --gutter: 24px; --grid-gap: 24px; }
}
@media (min-width: 1024px) {
  :root {
    --gutter: 32px;
    --grid-gap: 32px;
    --header-h: 64px;
    --section-s: 56px;
    --section-m: 80px;
    --section-l: 112px;
  }
}

/* Dark surface: remaps the semantic tokens, so every component placed inside
   works without a dark variant of its own. */
.surface-dark {
  --site-bg: var(--site-dark);
  --site-surface: var(--site-dark-surface);
  --site-surface-soft: #1A1E26;
  --site-text: var(--site-dark-text);
  --site-text-secondary: #C3C9D4;
  --site-text-muted: var(--site-dark-muted);
  --site-border: var(--site-dark-border);
  --site-border-strong: rgba(232, 235, 240, 0.24);
  --site-line: rgba(232, 235, 240, 0.55);
  --site-accent-text: var(--site-accent);
  --site-focus: var(--site-accent);
  --site-error: #F09A9A;
  --shadow-float: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
  background: var(--site-bg);
  color: var(--site-text);
}

/* ── 2. Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  background: var(--site-bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--space-5));
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--site-bg);
  color: var(--site-text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
}
body > main, [data-lang-block] > main { flex: 1 0 auto; }
[data-lang-block] { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

::selection { background: var(--site-accent-soft); color: var(--site-text); }

/* Headings */
h1, h2, h3, .t-display, .t-h1, .t-h2, .t-h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--site-text);
  text-wrap: balance;
}
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }  /* long LV/RU words at 360px */
h1, .t-h1 { font-size: var(--text-h1); line-height: 1.06; letter-spacing: -0.028em; }
h2, .t-h2 { font-size: var(--text-h2); line-height: 1.12; letter-spacing: -0.022em; }
h3, .t-h3 { font-size: var(--text-h3); line-height: 1.3; letter-spacing: -0.012em; }
.t-display { font-size: var(--text-display); line-height: 1.02; letter-spacing: -0.03em; }

p { text-wrap: pretty; }
.t-body-lg { font-size: var(--text-body-lg); line-height: 1.6; color: var(--site-text-secondary); }
.t-body { font-size: var(--text-body); line-height: 1.6; }
.t-body-sm { font-size: var(--text-body-sm); line-height: 1.55; color: var(--site-text-secondary); }
.t-muted { color: var(--site-text-muted); }

/* Optional section label. Sentence case, never uppercase, not on every
   section. Use .label--tech only for genuinely technical metadata. */
.label {
  display: block;
  font-size: var(--text-label);
  font-weight: 500;
  line-height: 1.4;
  color: var(--site-text-muted);
}
.label--tech, .t-mono {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  font-weight: 400;
  letter-spacing: 0;
}
code, kbd, samp { font-family: var(--font-mono); font-size: 0.92em; }

/* ── 3. Focus ──────────────────────────────────────────────────────────── */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--site-focus);
  outline-offset: 2px;
  border-radius: 2px;
}
.btn:focus-visible, .site-nav__link:focus-visible, .menu-toggle:focus-visible { border-radius: var(--radius-sm); }

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: var(--space-3);
  z-index: 200;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--site-text);
  color: var(--site-bg);
  font-size: var(--text-body-sm);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(calc(-100% - var(--space-5)));
}
.skip-link:focus-visible { transform: none; }

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

/* ── 4. Layout ─────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: calc(var(--content-max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: calc(var(--wide-max) + 2 * var(--gutter)); }

/* Page frame: the content column drawn as a visible structure. From 768px
   two rails mark its edges top to bottom; bands inside span rail to rail.
   This is where the system's character comes from — geometry, not effects. */
.frame {
  width: 100%;
  max-width: calc(var(--content-max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 768px) {
  .frame { border-inline: 1px solid var(--site-border-strong); }
}
.frame__band {
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
}
.frame__band--rule { border-bottom: 1px solid var(--site-border-strong); }
.frame__band--line { border-bottom: 1px solid var(--site-line); }

/* Compact utility strip: breadcrumb, status, metadata. */
.utility-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-5);
  min-height: 48px;
  padding-block: var(--space-2);
  font-size: var(--text-label);
  color: var(--site-text-muted);
}

/* Sections are separated by space and surface, never by a default border. */
.section { padding-block: var(--section-m); }
.section--s { padding-block: var(--section-s); }
.section--l { padding-block: var(--section-l); }
.section--soft { background: var(--site-surface-soft); }

/* 12-column grid with named compositions. Below 900px everything stacks. */
.grid-12 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6) var(--grid-gap);
}
@media (min-width: 900px) {
  .grid-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .span-3 { grid-column: span 3; }
  .span-4 { grid-column: span 4; }
  .span-5 { grid-column: span 5; }
  .span-6 { grid-column: span 6; }
  .span-7 { grid-column: span 7; }
  .span-8 { grid-column: span 8; }
  .span-12 { grid-column: 1 / -1; }
  .split--5-7 > :first-child { grid-column: 1 / span 5; }
  .split--5-7 > :last-child  { grid-column: 6 / span 7; }
  .split--7-5 > :first-child { grid-column: 1 / span 7; }
  .split--7-5 > :last-child  { grid-column: 8 / span 5; }
  .split--4-8 > :first-child { grid-column: 1 / span 4; }
  .split--4-8 > :last-child  { grid-column: 5 / span 8; }
  .split--3-9 > :first-child { grid-column: 1 / span 3; }
  .split--3-9 > :last-child  { grid-column: 4 / span 9; }
}

.flow > * + * { margin-top: var(--flow-space, var(--space-4)); }
.measure { max-width: var(--prose-max); }

/* ── 5. Links ──────────────────────────────────────────────────────────── */
a { color: inherit; }

/* Inline link inside running text */
.link, .prose a {
  color: var(--site-accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  transition: text-decoration-color var(--dur-fast) var(--ease), text-decoration-thickness var(--dur-fast) var(--ease);
}
.link:hover, .prose a:hover {
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
}

/* ── 6. Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9375rem;              /* 15 */
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.btn--sm { min-height: 40px; padding: 0 var(--space-4); font-size: var(--text-body-sm); }

/* Primary: ink, with the brand square as its marker — the cyan here means
   "the main action", which is one of cyan's permitted jobs. */
.btn--primary { background: var(--site-text); color: var(--site-bg); }
.btn--primary::before {
  content: "";
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 1.5px;
  background: var(--site-accent);
}
.btn--sm.btn--primary::before { width: 6px; height: 6px; }
.btn--primary:hover { background: color-mix(in srgb, var(--site-text) 84%, var(--site-bg)); }
.btn--primary:active { background: color-mix(in srgb, var(--site-text) 72%, var(--site-bg)); }

.btn--secondary { background: transparent; color: var(--site-text); border-color: var(--site-line); }
.btn--secondary:hover { background: var(--site-surface); }
.btn--secondary:active { background: var(--site-surface-soft); }

/* Text CTA: a link that leads somewhere, with an arrow. */
.btn--text {
  min-height: 44px;
  padding: 0;
  color: var(--site-text);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}
.btn--text:hover { text-decoration-color: currentColor; }
.btn--text:active { color: var(--site-text-secondary); }
.btn__arrow { transition: transform var(--dur) var(--ease); }
.btn--text:hover .btn__arrow { transform: translateX(3px); }

/* Press-down primary (approved R.3.1, shared since R.3.2): ink button, 2px ink
   border, cyan hard offset shadow. Hover moves halfway into the shadow,
   active presses it flat. Token-driven, so on .surface-dark it inverts to a
   light button with the same cyan shadow. The cyan shadow carries the brand,
   so the inner square marker is dropped. --press-offset sets the size
   (3px compact, e.g. header; the homepage uses 4px). */
.btn--press {
  --press-offset: 3px;
  --press-half: calc(var(--press-offset) / 2);
  --press-color: var(--site-accent);
  border-width: 2px;
  border-color: var(--site-text);
  box-shadow: var(--press-offset) var(--press-offset) 0 var(--press-color);
  transition: transform var(--dur-fast) ease-out, box-shadow var(--dur-fast) ease-out;
}
.btn--press.btn--primary { background: var(--site-text); color: var(--site-bg); }
.btn--press.btn--primary::before { display: none; }
.btn--press:hover { transform: translate(var(--press-half), var(--press-half)); box-shadow: var(--press-half) var(--press-half) 0 var(--press-color); }
.btn--press.btn--primary:hover { background: var(--site-text); }
.btn--press:active { transform: translate(var(--press-offset), var(--press-offset)); box-shadow: 0 0 0 var(--press-color); }
.btn--press:focus-visible { outline-offset: calc(var(--press-offset) + 2px); }
@media (prefers-reduced-motion: reduce) {
  .btn--press:hover, .btn--press:active { transform: none; }
}

.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }

/* ── 7. Forms ──────────────────────────────────────────────────────────── */
.field { display: grid; gap: var(--space-2); }
.field__label { font-size: var(--text-body-sm); font-weight: 500; color: var(--site-text); }
.field__help { font-size: var(--text-label); color: var(--site-text-muted); }
.field__error { font-size: var(--text-label); font-weight: 500; color: var(--site-error); }

.input, .textarea, .select {
  width: 100%;
  min-height: 44px;
  padding: 10px var(--space-3);
  border: 1px solid var(--site-border-strong);
  border-radius: var(--radius-sm);
  background: var(--site-surface);
  color: var(--site-text);
  font-size: var(--text-body);        /* 16px keeps iOS from zooming */
  line-height: 1.4;
  transition: border-color var(--dur-fast) var(--ease);
}
.textarea { min-height: 120px; resize: vertical; }
.select {
  appearance: none;
  padding-right: var(--space-7);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235F6676' stroke-width='2.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 var(--space-3) center;
}
.input::placeholder, .textarea::placeholder { color: var(--site-text-muted); opacity: 1; }
.input:hover, .textarea:hover, .select:hover { border-color: var(--site-text-muted); }
.input:focus-visible, .textarea:focus-visible, .select:focus-visible {
  border-color: var(--site-focus);
  outline-offset: 1px;
  border-radius: var(--radius-sm);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--site-error); }
.input:disabled, .textarea:disabled, .select:disabled { background: var(--site-surface-soft); color: var(--site-text-muted); cursor: not-allowed; }

/* ── 8. Primitives (not a card system) ─────────────────────────────────── */
.surface { background: var(--site-surface); border-radius: var(--radius-md); padding: var(--space-6); }
.surface--bordered { border: 1px solid var(--site-border); }

/* Product frame: real screenshots, real workflow diagrams, real records.
   No fake browser chrome, no fake LIVE data. Illustrative content must carry
   a visible .tag ("Example"). */
.product-frame { margin: 0; }
.product-frame__media {
  overflow: hidden;
  border: 1px solid var(--site-border-strong);
  border-radius: var(--radius-md);
  background: var(--site-surface);
  box-shadow: var(--shadow-float);
}
.product-frame__media > img, .product-frame__media > video { width: 100%; }
.product-frame__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-3);
  margin-top: var(--space-3);
  font-size: var(--text-body-sm);
  color: var(--site-text-muted);
}
.product-frame--flat .product-frame__media { box-shadow: none; }

/* A small factual tag (e.g. "Example", a status). 6px radius, not a pill. */
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 var(--space-2);
  border: 1px solid var(--site-border-strong);
  border-radius: var(--radius-sm);
  font-size: var(--text-label);
  font-weight: 500;
  line-height: 1;
  color: var(--site-text-secondary);
}

/* ── 9. Brand mark ─────────────────────────────────────────────────────── */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--site-text);
  text-decoration: none;
}
.brand__mark { width: 10px; height: 10px; border-radius: 2px; background: var(--site-accent); flex-shrink: 0; }
.brand__name { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.025em; }

/* ── 10. Header v2 ─────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--site-bg);
  border-bottom: 1px solid var(--site-line);
}
.site-header__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: var(--header-h);
}
.site-header__bar > .brand { margin-right: auto; }

.site-nav__list, .site-nav__panel ul, .lang-switch ul {
  list-style: none;
  padding: 0;
}
.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 var(--space-2);
  border: 0;
  background: none;
  color: var(--site-text-secondary);
  font-size: var(--text-body-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease);
}
.site-nav__link:hover, .site-nav__link[aria-expanded="true"] { color: var(--site-text); }
.site-nav__link[aria-current="page"] {
  color: var(--site-text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}
.site-nav__chev { transition: transform var(--dur) var(--ease); }
.site-nav__link[aria-expanded="true"] .site-nav__chev { transform: rotate(180deg); }

.site-nav__panel a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--site-text);
  font-size: var(--text-body-sm);
  text-decoration: none;
}
.site-nav__panel a:hover { background: var(--site-surface-soft); }
.site-nav__panel a[aria-current="page"] { font-weight: 600; }

/* Language switch: three plain text links, current one underlined. */
.lang-switch ul { display: flex; gap: 2px; }
.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 36px;
  padding: 0 6px;
  color: var(--site-text-muted);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.lang-switch a:hover { color: var(--site-text); }
.lang-switch a[aria-current="true"] {
  color: var(--site-text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-3);
  margin-right: calc(-1 * var(--space-3));
  border: 0;
  background: none;
  color: var(--site-text);
  font-size: var(--text-body-sm);
  font-weight: 600;
  cursor: pointer;
}
.menu-toggle__icon { width: 18px; height: 12px; position: relative; }
.menu-toggle__icon::before, .menu-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), top var(--dur) var(--ease);
}
.menu-toggle__icon::before { top: 2px; }
.menu-toggle__icon::after { top: 8px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon::before { top: 5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon::after { top: 5px; transform: rotate(-45deg); }

/* Desktop. 1200px since P.2: six top-level items (RU "Кибербезопасность")
   need ~1060px; below that the disclosure menu is used. */
@media (min-width: 1200px) {
  .site-menu { display: flex; align-items: center; gap: var(--space-5); }
  .site-nav__list { display: flex; align-items: center; gap: var(--space-2); }
  .site-nav__item { position: relative; }
  .site-nav__panel {
    position: absolute;
    top: calc(100% + 10px);
    left: calc(-1 * var(--space-2));
    z-index: 110;
    min-width: 300px;
    padding: var(--space-2);
    border: 1px solid var(--site-border);
    border-radius: var(--radius-md);
    background: var(--site-surface);
    box-shadow: var(--shadow-float);
  }
  .site-menu__aside {
    display: flex;
    align-items: center;
    align-self: stretch;
    gap: var(--space-4);
    padding-left: var(--space-5);
    border-left: 1px solid var(--site-border-strong);
  }
}

/* Mobile and tablet: one disclosure menu. Without JS (no .js class) the menu
   simply renders open in the page flow, so navigation never depends on JS. */
@media (max-width: 1199.98px) {
  .js .menu-toggle { display: inline-flex; }
  .site-header__bar { flex-wrap: wrap; }
  .site-menu { width: 100%; padding-bottom: var(--space-4); }
  .js .site-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: var(--space-2) var(--gutter) var(--space-6);
    background: var(--site-bg);
    border-bottom: 1px solid var(--site-border);
  }
  .js .site-header[data-open="true"] .site-menu { display: block; }
  .site-nav__link {
    width: 100%;
    min-height: 48px;
    padding: 0;
    justify-content: space-between;
    border-bottom: 1px solid var(--site-border);
    color: var(--site-text);
    font-size: var(--text-body);
  }
  .site-nav__link[aria-current="page"] { text-decoration: none; font-weight: 600; }
  .site-nav__panel { padding: var(--space-1) 0 var(--space-3) var(--space-3); }
  .site-nav__panel a { min-height: 44px; padding: 0; color: var(--site-text-secondary); font-size: var(--text-body); }
  .site-nav__panel a:hover { background: none; color: var(--site-text); }
  .site-menu__aside {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-top: var(--space-5);
  }
  /* Header-bar language switch (Academy pages): always visible next to the
     menu button, so the language never hides behind the menu. Compact links
     (full bar height as touch target); the copy inside the menu is dropped. */
  .js .lang-switch--bar { display: block; }
  .js .site-header__bar:has(.lang-switch--bar) { column-gap: var(--space-2); }
  .lang-switch--bar a { min-width: 30px; min-height: 44px; padding: 0 4px; }
  .js .site-header__bar:has(.lang-switch--bar) .site-menu__aside .lang-switch { display: none; }
}
@media (max-width: 374.98px) {
  .lang-switch--bar a { min-width: 28px; padding: 0 3px; }
}
/* Very narrow phones: the menu button keeps its icon; its text stays as the
   accessible name. */
@media (max-width: 349.98px) {
  .js .site-header__bar:has(.lang-switch--bar) .menu-toggle { gap: 0; font-size: 0; }
}
.lang-switch--bar { display: none; }
@media (max-width: 1199.98px) { .site-menu .btn--sm { min-height: 44px; } }
.js .site-nav__panel:not(.is-open) { display: none; }

/* Breadcrumb */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  list-style: none;
  padding: 0;
  font-size: var(--text-label);
  color: var(--site-text-muted);
}
.breadcrumb li + li::before { content: "/"; margin-right: var(--space-2); color: var(--site-border-strong); }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 32px; color: var(--site-text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--site-text); text-decoration: underline; text-underline-offset: 0.2em; }

/* ── 11. Footer v2 (dark) + wordmark ───────────────────────────────────── */
.site-footer { padding-top: var(--space-8); overflow: hidden; }
.site-footer__top { row-gap: var(--space-6); }
/* Every footer column starts on one shared rule — visible grid logic. */
.site-footer__about,
.site-footer__cols > div { padding-top: var(--space-4); border-top: 1px solid var(--site-border-strong); }
.site-footer__about { max-width: 40ch; }
.site-footer__desc { margin-top: var(--space-3); font-size: var(--text-body-sm); line-height: 1.6; color: var(--site-text-muted); }
.site-footer__contact { margin-top: var(--space-4); display: grid; gap: 0; list-style: none; padding: 0; }
.site-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-6) var(--grid-gap); }
.site-footer__heading {
  margin-bottom: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--site-text);
}
.site-footer__links { display: grid; gap: 0; list-style: none; padding: 0; }
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--site-text-muted);
  font-size: var(--text-body-sm);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
.site-footer a:hover { color: var(--site-text); text-decoration: underline; text-underline-offset: 0.2em; }
.site-footer a.brand { min-height: 40px; color: var(--site-text); font-size: inherit; }
.site-footer a.brand:hover { text-decoration: none; }
/* Social: icon-only, a 40px tap target on the same strong rule as the
   columns. Cyan only on hover / focus, never at rest. */
.site-footer a.site-footer__social {
  justify-content: center;
  width: 40px;
  min-height: 40px;
  margin-top: var(--space-2);
  border: 1px solid var(--site-border-strong);
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.site-footer a.site-footer__social:hover,
.site-footer a.site-footer__social:focus-visible { color: var(--site-accent); border-color: var(--site-accent); text-decoration: none; }
.site-footer__social svg { display: block; }
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-5);
  margin-top: var(--space-7);
  padding-top: var(--space-4);
  border-top: 1px solid var(--site-border-strong);
  font-size: var(--text-label);
  color: var(--site-text-muted);
}

/* Smartentre signature (approved in R.2.1): the large outlined wordmark is the
   footer's final band — its own brand statement, never a watermark behind
   readable content. Decorative (aria-hidden), static, no glow. Sized with
   container units so "Smartentre" spans the content width at every
   breakpoint, and cropped at the bottom edge of the page. */
.site-footer__wordmark {
  container-type: inline-size;
  margin-top: var(--space-7);
  user-select: none;
  pointer-events: none;
}
.site-footer__wordmark span {
  display: block;
  height: 0.76em;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 18.7cqi;               /* measured: "Smartentre" at -0.035em = 5.33em wide */
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(232, 235, 240, 0.2);
}
@media (forced-colors: active) { .site-footer__wordmark { display: none; } }

/* ── 12. Long-form documents (legal, docs) ─────────────────────────────── */
/* Intro band: title left, summary right, closed by an ink line. */
.page-intro {
  display: grid;
  gap: var(--space-4) var(--grid-gap);
  padding-block: var(--space-7);
}
.page-intro .t-body-lg { max-width: 48ch; }
@media (min-width: 900px) {
  .page-intro { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; padding-block: var(--space-8) var(--space-7); }
  .page-intro > h1 { grid-column: 1 / span 7; }
  .page-intro > .t-body-lg { grid-column: 8 / span 5; }
}

/* Document: TOC rail | article, divided by a full-height rule. */
.doc__aside { border-bottom: 1px solid var(--site-border-strong); }
.doc__body { padding-block: var(--space-6) var(--section-m); }
@media (min-width: 1024px) {
  .doc { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .doc__aside {
    grid-column: 1 / span 3;
    padding: var(--space-6) var(--space-5) var(--section-m) 0;
    border-bottom: 0;
    border-right: 1px solid var(--site-border-strong);
  }
  .doc__body { grid-column: 4 / span 9; padding: var(--space-6) 0 var(--section-m) var(--space-7); }
}

.prose { font-size: 1.0625rem; line-height: 1.7; color: var(--site-text-secondary); }
.prose p, .prose ul, .prose ol { max-width: var(--prose-max); }
.prose:not(.prose--numbered) > section + section { margin-top: var(--space-7); }
.prose h2 {
  font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.018em;
}
.prose h2 + * { margin-top: var(--space-3); }
.prose p + p, .prose p + ul, .prose ul + p, .prose p + ol { margin-top: var(--space-4); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: var(--space-2); }
.prose ul li::marker { color: var(--site-text-muted); }
.prose strong { color: var(--site-text); font-weight: 600; }
.prose__date { color: var(--site-text-muted); }

/* Numbered document sections: the number is real structure (a sequence of
   clauses), rendered by CSS counters so the text itself is untouched. */
.prose--numbered { counter-reset: doc-section; }
.prose--numbered > section {
  counter-increment: doc-section;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  column-gap: var(--space-3);
  padding-block: var(--space-6);
  border-top: 1px solid var(--site-border);
}
.prose--numbered > section:first-child { padding-top: 0; border-top: 0; }
.prose--numbered > section:last-child { padding-bottom: 0; }
.prose--numbered > section::before {
  content: counter(doc-section, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1;
  padding-top: 0.55em;
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  line-height: 1;
  color: var(--site-text-muted);
}
.prose--numbered > section > * { grid-column: 2; }
@media (min-width: 768px) {
  .prose--numbered > section { grid-template-columns: 3.5rem minmax(0, 1fr); column-gap: var(--space-4); }
}
/* Phones: the number sits above the heading, so text keeps the full width. */
@media (max-width: 767.98px) {
  .prose--numbered > section { display: block; }
  .prose--numbered > section::before { display: block; padding-top: 0; margin-bottom: var(--space-2); }
}

/* Table of contents */
.toc { font-size: var(--text-body-sm); }
.toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--site-text);
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; font-weight: 400; font-size: 1.125rem; color: var(--site-text-muted); }
.toc[open] summary::after { content: "−"; }
.toc ol { list-style: none; padding: 0 0 var(--space-4); counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  position: relative;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  align-items: baseline;
  min-height: 36px;
  padding-block: 7px;
  color: var(--site-text-secondary);
  text-decoration: none;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  color: var(--site-text-muted);
}
.toc a:hover { color: var(--site-text); }
.toc a[aria-current="true"] { color: var(--site-text); font-weight: 600; }
@media (min-width: 1024px) {
  .toc { position: sticky; top: calc(var(--header-h) + var(--space-6)); }
  .toc summary { pointer-events: none; min-height: 0; margin-bottom: var(--space-3); font-size: var(--text-label); font-weight: 500; color: var(--site-text-muted); }
  .toc summary::after, .toc[open] summary::after { content: none; }
  .toc ol { padding-bottom: 0; }
  /* The current section is marked on the rail itself: a short cyan segment
     over the rule (selected state — one of cyan's permitted jobs). */
  .toc a[aria-current="true"]::after {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    right: calc(-1 * var(--space-5) - 1.5px);
    width: 2px;
    background: var(--site-accent);
  }
}

/* ── 13. Status / error pages ──────────────────────────────────────────── */
.status-strip__code { display: inline-flex; align-items: baseline; gap: var(--space-2); color: var(--site-text); }
.status-strip__path { overflow-wrap: anywhere; }
.status-strip__path .t-mono { color: var(--site-text-secondary); }
.status-page__intro { padding-block: var(--space-7) var(--space-8); }
.status-page__intro h1 { max-width: 15ch; }
.status-page__intro .t-body-lg { margin-top: var(--space-4); max-width: 52ch; }
.status-page__intro .actions { margin-top: var(--space-6); }
.status-page__routes { padding-block: var(--space-5) var(--section-m); border-top: 1px solid var(--site-line); }
.status-page__routes > .label { margin-bottom: var(--space-4); }

/* Link grid: destinations drawn as cells of one ruled grid (shared lines,
   no gaps, no shadows) — a site map, not a set of cards. */
.link-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--site-border-strong);
  border-left: 1px solid var(--site-border-strong);
}
@media (min-width: 600px) { .link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .link-grid, .link-grid--trio { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 600px) and (max-width: 899.98px) { .link-grid--trio { grid-template-columns: minmax(0, 1fr); } }
.link-grid > li { border-right: 1px solid var(--site-border-strong); border-bottom: 1px solid var(--site-border-strong); }
.link-grid a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  gap: var(--space-1) var(--space-4);
  height: 100%;
  min-height: 104px;
  padding: var(--space-4) var(--space-5) var(--space-5);
  color: var(--site-text);
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease);
}
.link-grid a:hover { background: var(--site-surface); }
.link-grid a:focus-visible { outline-offset: -2px; border-radius: 0; }
.link-grid__name {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.012em;
}
.link-grid__arrow { color: var(--site-text-muted); transition: transform var(--dur) var(--ease), color var(--dur-fast) var(--ease); }
.link-grid a:hover .link-grid__arrow { color: var(--site-text); transform: translateX(3px); }
.link-grid__path { grid-column: 1 / -1; font-family: var(--font-mono); font-size: var(--text-mono); color: var(--site-text-muted); overflow-wrap: anywhere; }
.link-grid__desc { grid-column: 1 / -1; margin-top: var(--space-1); font-size: var(--text-body-sm); color: var(--site-text-secondary); }
/* The recommended route carries the same cyan marker as the primary button. */
.link-grid__item--primary .link-grid__name::before {
  content: "";
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 1.5px;
  background: var(--site-accent);
}

/* ── 14. Shared product UI and page parts (P.2) ───────────────────────── */
/* Ported from the R.4 archive (archive/r4-broad-services) and shared by the
   homepage and the AI Assistants page.
   Demonstrative product UI: illustrations of what the system does. No LIVE
   label, no system statistics, and a visible "Example" tag on every one. */
.demo {
  overflow: hidden;
  border: 1px solid var(--site-border-strong);
  border-radius: var(--radius-md);
  background: var(--site-surface);
  box-shadow: var(--shadow-float);
}
.demo__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--site-border);
}
.demo__title { font-family: var(--font-mono); font-size: var(--text-mono); color: var(--site-text-muted); overflow-wrap: anywhere; }
.demo__body { padding: var(--space-5) var(--space-4); }
.demo__result {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--site-border);
  background: var(--site-surface-soft);
  font-size: var(--text-body-sm);
  font-weight: 600;
  line-height: 1.45;
  color: var(--site-text);
}
.demo__result .i-check { margin-top: 0; color: var(--site-accent-text); }

/* Status of a record. The filled square = done; hollow = in progress. */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  line-height: 1.3;
  color: var(--site-text-secondary);
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border: 1.5px solid currentColor;
  border-radius: 1.5px;
}
.status--ok::before { border-color: var(--site-text); background: var(--site-text); }

/* Chat transcript (A) */
.demo--chat .demo__body { display: grid; gap: var(--space-3); background: var(--site-bg); }
.msg {
  max-width: 86%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-body-sm);
  line-height: 1.5;
}
.msg--in { justify-self: start; border: 1px solid var(--site-border); background: var(--site-surface); color: var(--site-text); border-bottom-left-radius: var(--radius-sm); }
.msg--out { justify-self: end; background: var(--site-text); color: var(--site-bg); border-bottom-right-radius: var(--radius-sm); }

/* Record rows (A inbox, C app) */
.demo-rows { list-style: none; padding: 0; }
.demo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
  font-size: var(--text-body-sm);
  color: var(--site-text);
}
.demo-row + .demo-row { border-top: 1px solid var(--site-border); }
.demo-row__text { min-width: 0; }
.demo--inbox .demo-row { padding-block: var(--space-5); font-size: var(--text-body); }

/* Flow (B): sources → records / extraction → result, one column per stage */
.flow-steps { list-style: none; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.flow-step {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-5);
}
.flow-step + .flow-step { border-top: 1px solid var(--site-border); }
/* The connector is real structure: each stage feeds the next. */
.flow-step + .flow-step::before {
  content: "";
  position: absolute;
  top: -12px;
  left: var(--space-5);
  width: 24px;
  height: 24px;
  border: 1px solid var(--site-border-strong);
  border-radius: 50%;
  background: var(--site-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230E1116' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M6 13l6 6 6-6'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.flow-step__text {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--site-text);
}
.flow-step__sources { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; }
.flow-step__sources li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 var(--space-2);
  border: 1px solid var(--site-border-strong);
  border-radius: var(--radius-sm);
  font-size: var(--text-body-sm);
  color: var(--site-text);
}
.flow-step__sources li::before { content: ""; width: 6px; height: 6px; border-radius: 1.5px; background: var(--site-text); }
.flow-step__fields { width: 100%; font-size: var(--text-body-sm); }
.flow-step__fields > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-1) var(--space-4);
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--site-border);
}
.flow-step__fields > div:first-child { border-top: 1px solid var(--site-border); }
.flow-step__fields dt { color: var(--site-text-muted); }
.flow-step__fields dd { margin: 0; font-family: var(--font-mono); font-size: var(--text-mono); color: var(--site-text); }
.flow-step--result { grid-template-columns: 18px minmax(0, 1fr); align-items: start; background: var(--site-surface-soft); }
.flow-step--result .i-check { margin-top: 0.15em; color: var(--site-accent-text); }
@media (min-width: 768px) {
  .flow-steps { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none; }
  .flow-step + .flow-step { border-top: 0; border-left: 1px solid var(--site-border); }
  .flow-step + .flow-step::before {
    top: var(--space-6);
    left: -12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230E1116' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
  }
  .flow-step { padding-inline: var(--space-6); }
}

/* Checklist: what is included, what to prepare. The ink check marks an item;
   it is structure, not decoration. */
.check-list { list-style: none; padding: 0; }
.check-list li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: var(--space-3);
  padding-block: var(--space-4);
  border-top: 1px solid var(--site-border-strong);
  color: var(--site-text);
}
.i-check { flex-shrink: 0; margin-top: 0.2em; color: var(--site-text); }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-4); list-style: none; padding: 0; }

/* Closing band: the page's one remaining question and the press-down CTA.
   Opened by an ink line, light surface — the dark footer follows it. */
.cta-band {
  display: grid;
  gap: var(--space-5) var(--grid-gap);
  margin-inline: calc(-1 * var(--gutter));
  padding: var(--section-m) var(--gutter);
  border-top: 1px solid var(--site-line);
}
.cta-band h2 { max-width: 22ch; }
.cta-band p { margin-top: var(--space-3); max-width: 46ch; font-size: var(--text-body-lg); color: var(--site-text-secondary); }
@media (min-width: 900px) {
  .cta-band { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; }
  .cta-band__copy { grid-column: 1 / span 8; }
  .cta-band__action { grid-column: 9 / span 4; justify-self: end; }
}

/* Case record: sector, metric, title, text, tags. The metric is set at
   heading size, not as a hero number — the R.8 claim gate still applies. */
.case-record {
  padding: var(--space-5);
  border: 1px solid var(--site-border-strong);
  border-radius: var(--radius-md);
  background: var(--site-surface);
}
.case-record__metric {
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--site-text);
}
.case-record h3 { margin-top: var(--space-3); font-size: 1.125rem; }
.case-record > p:not([class]) { margin-top: var(--space-2); font-size: var(--text-body-sm); color: var(--site-text-secondary); }

/* Process steps: a real sequence, so the numbers are structure. */
.steps { display: grid; list-style: none; padding: 0; border-top: 1px solid var(--site-line); }
.step { padding-block: var(--space-5) var(--space-6); }
.step + .step { border-top: 1px solid var(--site-border-strong); }
.step__num { font-family: var(--font-mono); font-size: var(--text-mono); color: var(--site-text-muted); }
.step__title { margin-top: var(--space-3); font-size: 1.375rem; letter-spacing: -0.015em; }
.step__text { margin-top: var(--space-2); font-size: 0.9375rem; color: var(--site-text-secondary); max-width: 32ch; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .step { padding-right: var(--space-5); }
  .step + .step { padding-left: var(--space-5); border-top: 0; border-left: 1px solid var(--site-border-strong); }
}

/* Flow stages and actions (homepage systems story, AI Assistants hero). */
.flow-step__stage { font-size: var(--text-label); font-weight: 600; color: var(--site-text-muted); }
.flow-step--result .flow-step__stage { grid-column: 1 / -1; }
.flow-step__action { display: grid; gap: var(--space-1); justify-items: start; width: 100%; }
.flow-step__action + .flow-step__action { padding-top: var(--space-3); border-top: 1px solid var(--site-border); }
.flow-step__action .flow-step__text { font-size: 0.9375rem; }

/* Long LV/RU button labels wrap on small phones instead of widening the page. */
@media (max-width: 480px) {
  .home .btn:not(.btn--text),
  .ai-page .btn:not(.btn--text) { white-space: normal; text-align: center; padding-block: var(--space-2); }
}

/* ── 15. Shared page blocks (P.3) ──────────────────────────────────────── */
/* Moved from home.css: used by the homepage and by contact.html / academy/. */
/* Contact block (dark) + lead form */
.home-contact__grid { display: grid; gap: var(--space-7); padding-block: var(--section-l); }
.home-contact__title { font-size: clamp(2.25rem, 1.4rem + 3vw, 4rem); line-height: 1.02; letter-spacing: -0.035em; }
.home-contact__lead { margin-top: var(--space-5); font-size: var(--text-body-lg); color: var(--site-text-secondary); max-width: 40ch; }
.home-contact .actions { margin-top: var(--space-6); }
.home-contact .actions svg { flex-shrink: 0; }
.home-contact__note { margin-top: var(--space-3); font-size: var(--text-body-sm); color: var(--site-text-muted); }
.home-contact .actions + .home-contact__note { margin-top: var(--space-5); }
.home-contact__copy, .home-form { min-width: 0; }
@media (min-width: 1024px) {
  .home-contact__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); align-items: start; }
  .home-contact__copy { grid-column: 1 / span 5; }
  .home-form { grid-column: 7 / span 6; }
}

.home-form {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-6) var(--space-5);
  border: 1px solid var(--site-border-strong);
  border-radius: var(--radius-md);
  background: var(--site-surface);
}
@media (min-width: 640px) { .home-form { padding: var(--space-6); } }
.home-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.home-form legend { padding: 0; margin-bottom: var(--space-2); }
.need-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.need-option {
  min-height: 44px;
  padding: 0 var(--space-3);
  border: 1px solid var(--site-border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--site-text-secondary);
  font-size: var(--text-body-sm);
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.need-option:hover { color: var(--site-text); border-color: var(--site-text-muted); }
.need-option[aria-pressed="true"] { border-color: var(--site-accent); background: rgba(79, 216, 232, 0.10); color: var(--site-text); }
.home-form__submit { width: 100%; }
.home-form__privacy { font-size: var(--text-label); color: var(--site-text-muted); text-align: center; }
.home-form__status { font-size: var(--text-body-sm); text-align: center; color: var(--site-text); }
.home-form__status[data-state="error"] { color: var(--site-error); }

/* Academy tracks: two columns, honest status */
.tracks { display: grid; border-top: 1px solid var(--site-line); }
.track { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding-block: var(--space-6) var(--space-7); }
.track + .track { border-top: 1px solid var(--site-border-strong); }
.track__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.track__name { font-size: clamp(1.5rem, 1.25rem + 0.9vw, 2rem); letter-spacing: -0.02em; }
.track__course { margin-top: var(--space-5); font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.track__text { margin-top: var(--space-2); color: var(--site-text-secondary); max-width: 44ch; }
.track .btn { margin-top: var(--space-6); }
/* Long LV/RU link labels may wrap on phones instead of widening the page. */
.track .btn--text { white-space: normal; }
.tag--on { gap: 6px; border-color: var(--site-text); color: var(--site-text); }
.tag--on::before { content: ""; width: 6px; height: 6px; border-radius: 1.5px; background: var(--site-accent); }
@media (min-width: 900px) {
  .tracks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .track { padding-right: var(--space-7); }
  .track + .track { padding-left: var(--space-7); padding-right: 0; border-top: 0; border-left: 1px solid var(--site-border-strong); }
}

/* Secondary press-down button: surface fill, ink shadow (muted on dark). */
.btn--press.btn--secondary { --press-color: var(--site-text); background: var(--site-surface); color: var(--site-text); border-color: var(--site-text); }
.surface-dark .btn--press.btn--secondary { --press-color: var(--site-text-muted); }
.btn--press.btn--secondary:hover { background: var(--site-surface); }

/* ── 16. Motion ────────────────────────────────────────────────────────── */
/* Allowed: state transitions, expand/collapse, interaction feedback.
   Not allowed: endless loops, parallax, reveal-on-scroll, pulsing decoration. */
@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;
  }
}

/* ── WhatsApp quick contact (restored, P.7) ───────────────────────────── */
/* Floating link to Smartentre's WhatsApp (the historical wa.me destination,
   see git a3f6ed4 / 2b323e8). Adapted from the last approved redesign version:
   ink circle with the white glyph; a crisp cyan ring and a small label on
   hover / keyboard focus — opacity only, no motion, no pulsing. Below the
   header (z 100) and the mobile menu (z 110). Public marketing pages only. */
.wa-float {
  position: fixed;
  right: max(var(--space-4), env(safe-area-inset-right));
  bottom: max(var(--space-4), env(safe-area-inset-bottom));
  z-index: 90;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(232, 235, 240, 0.18);
  border-radius: 50%;
  background: var(--site-text);
  color: var(--site-bg);
  box-shadow: var(--shadow-float);
  transition: box-shadow var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.wa-float__icon { width: 22px; height: 22px; }
.wa-float__label {
  position: absolute;
  top: 50%;
  right: calc(100% + var(--space-2));
  padding: 4px var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--site-text);
  color: var(--site-bg);
  font-size: var(--text-label);
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease);
}
@media (hover: hover) {
  .wa-float:hover { box-shadow: 0 0 0 2px var(--site-accent), var(--shadow-float); }
  .wa-float:hover .wa-float__label { opacity: 1; }
}
.wa-float:focus-visible { outline: 2px solid var(--site-focus); outline-offset: 3px; box-shadow: 0 0 0 2px var(--site-accent), var(--shadow-float); }
.wa-float:focus-visible .wa-float__label { opacity: 1; }
.wa-float:active { background: color-mix(in srgb, var(--site-text) 84%, var(--site-bg)); }
@media (max-width: 480px) { .wa-float { width: 48px; height: 48px; } }
@media print { .wa-float { display: none; } }

/* ── 17. Cookie consent (assets/js/consent.js) ────────────────────────── */
/* Compact, non-modal card fixed to the bottom edge: full width on phones,
   a 520px card at the bottom-left from 640px, clear of the WhatsApp button.
   Above the WhatsApp float (z 90), below the header (z 100) and the mobile
   menu (z 110). Accept and Reject share one style — equal prominence. */
.consent {
  position: fixed;
  left: max(var(--space-3), env(safe-area-inset-left));
  right: max(var(--space-3), env(safe-area-inset-right));
  bottom: max(var(--space-3), env(safe-area-inset-bottom));
  z-index: 95;
  display: grid;
  gap: var(--space-3);
  max-height: calc(100dvh - 2 * var(--space-3));
  overflow-y: auto;
  padding: var(--space-4);
  border: 1px solid var(--site-border-strong);
  border-radius: var(--radius-md);
  background: var(--site-surface);
  color: var(--site-text);
  box-shadow: var(--shadow-float);
}
.consent[hidden] { display: none; }
.consent__title { font-size: var(--text-body-sm); font-weight: 600; line-height: 1.4; }
.consent__text {
  margin-top: var(--space-1);
  color: var(--site-text-secondary);
  font-size: var(--text-body-sm);
  line-height: 1.5;
}
.consent__text a { color: var(--site-text); text-decoration: underline; text-underline-offset: 0.2em; }
.consent__text a:hover { text-decoration-thickness: 2px; }
.consent__status { margin-top: var(--space-2); color: var(--site-text-muted); font-size: var(--text-label); }
.consent__status[hidden] { display: none; }
.consent__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.consent__btn { width: 100%; }
@media (max-width: 639.98px) {
  /* Phones: tighter card, so the first screen stays readable. */
  .consent { gap: var(--space-2); padding: var(--space-3); }
  .consent__text { line-height: 1.45; }
}
@media (min-width: 640px) {
  /* Text and buttons side by side: a low card instead of a tall one. */
  .consent {
    left: max(var(--space-5), env(safe-area-inset-left));
    right: auto;
    bottom: max(var(--space-5), env(safe-area-inset-bottom));
    width: min(680px, calc(100% - 2 * var(--space-5)));
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: var(--space-4);
  }
  .consent__actions { grid-template-columns: 1fr; min-width: 140px; }
}
@media print { .consent { display: none; } }

/* Footer "Cookie settings": a button (it opens the banner, it goes nowhere)
   dressed as a footer link. Ships `hidden`; consent.js reveals it. */
.site-footer__button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--site-text-muted);
  font-size: var(--text-body-sm);
  line-height: inherit;
  text-align: left;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease);
}
.site-footer__button:hover { color: var(--site-text); text-decoration: underline; text-underline-offset: 0.2em; }
.site-footer__button[hidden] { display: none; }
