:root {
  --bg: #f4f7fb;
  --paper: #ffffff;
  --ink: #101827;
  --muted: #56657c;
  --muted-soft: #7c8ba1;
  --muted-strong: #26364f;
  --line: #d8e0eb;
  --line-strong: #cbd8eb;
  --brand: #635bff;
  --accent: #12b886;
  --warning: #f59f00;
  --dark: #101827;
  --surface-hover: #f3f7fc;
  --badge-green-bg: #e9fbf5;
  --badge-green-fg: #087f5b;
  --badge-blue-bg: #e8f1ff;
  --badge-blue-fg: #285ea8;
  --badge-warn-bg: #fff8e6;
  --badge-warn-fg: #805900;
  --mark-bg: #fff3bf;
  --mark-fg: #4d3600;
  --icon-chip-bg: #eef1ff;
  --warn-text: #97634a;
  --statement-before-bg: #fbfaf9;
  --statement-before-fg: #9a5b1f;
  --statement-after-bg: #f3fbf8;
  --shadow-card: 0 18px 36px rgb(32 46 72 / 6%);
  --danger: #e0334f;
  --danger-soft: #fdeaee;
  color-scheme: light;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  --bg: #0a0e18;
  --paper: #121a2c;
  --ink: #eef2f8;
  --muted: #9aa8c0;
  --muted-soft: #7686a0;
  --muted-strong: #c5d2e6;
  --line: #232f47;
  --line-strong: #2c3a56;
  /* Accent surfaces that are already dark-on-light by design (hero, brand
     chip, dark table header, ...) need to sit a step lighter than the new
     page background, or they stop reading as a raised panel and just merge
     into the page. */
  --dark: #182238;
  --surface-hover: #182238;
  --badge-green-bg: #113828;
  --badge-green-fg: #4fdba8;
  --badge-blue-bg: #18243f;
  --badge-blue-fg: #8fb4ff;
  --badge-warn-bg: #3a2c10;
  --badge-warn-fg: #f5c95c;
  --mark-bg: #4a3c12;
  --mark-fg: #ffe08a;
  --icon-chip-bg: #221f3d;
  --warn-text: #d9a880;
  --statement-before-bg: #241d16;
  --statement-before-fg: #d9a06b;
  --statement-after-bg: #10241d;
  --danger: #f0637a;
  --danger-soft: #341620;
  --shadow-card: 0 18px 36px rgb(0 0 0 / 28%);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  border-radius: 8px;
}

.site-header {
  position: static;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  padding: 14px clamp(18px, 5vw, 64px);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
}

.brand-logo {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--dark);
}

.brand-logo img {
  display: block;
  width: auto;
  height: 20px;
  border-radius: 0;
}

.brand-mark {
  display: block;
  width: 32px;
  height: 32px;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

nav a:hover {
  color: var(--ink);
}

.site-header__right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 22px;
  justify-content: flex-end;
}

.site-search {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  width: min(260px, 28vw);
  min-width: 210px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search:focus-within {
  border-color: #8cb8ff;
  box-shadow: 0 0 0 3px rgb(140 184 255 / 22%);
}

.site-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-search input {
  height: 100%;
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  outline: 0;
  padding: 0 11px;
}

.site-search input::placeholder {
  color: var(--muted-soft);
}

.site-search button {
  display: grid;
  width: 36px;
  height: 100%;
  flex: 0 0 36px;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--line-strong);
  border-radius: 0 7px 7px 0;
  background: var(--dark);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  transition: filter 0.15s ease;
}

.site-search button:hover {
  filter: brightness(1.25);
}

.site-search__suggestions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: min(520px, 88vw);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 24px 60px rgb(16 24 39 / 18%);
}

.site-search__suggestion,
.site-search__all,
.site-search__empty {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
}

.site-search__suggestion {
  border-bottom: 1px solid var(--line);
}

.site-search__suggestion:hover,
.site-search__suggestion.is-active,
.site-search__all:hover,
.site-search__all.is-active {
  background: var(--surface-hover);
}

.site-search__suggestion strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.site-search__suggestion span {
  color: var(--badge-green-fg);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.site-search__suggestion small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.site-search__empty {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.site-search__all {
  background: var(--dark);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.language-switch {
  display: inline-flex;
  height: 36px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
}

.language-switch a {
  display: grid;
  min-width: 42px;
  place-items: center;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.language-switch a + a {
  border-left: 1px solid var(--line-strong);
}

.language-switch a.is-active {
  background: var(--dark);
  color: #fff;
}

.theme-toggle {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.theme-toggle:hover {
  border-color: var(--muted-soft);
  color: var(--ink);
}

.theme-toggle__icon {
  width: 18px;
  height: 18px;
}

.theme-toggle__icon--moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle__icon--sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle__icon--moon {
  display: block;
}

/* Product screenshots: shot once against the light dashboard, once against
   the dark dashboard, paired in the markup as two <img> siblings so there's
   no JS and no flash -- only one is ever visible, driven by the same
   [data-theme] attribute the rest of the page reacts to. */
/* !important: several containers (.proof-shot__frame img, .ops-media img)
   set their own `display: block` on img with higher specificity than a
   single class selector -- this toggle has to win over all of them. */
.theme-shot--dark {
  display: none !important;
}

:root[data-theme="dark"] .theme-shot--light {
  display: none !important;
}

:root[data-theme="dark"] .theme-shot--dark {
  display: block !important;
}

/* Full-screen tap-to-zoom for the home page's dashboard screenshots on
   mobile, where the in-page size is too small to read anything in the UI.
   home-zoom.js creates and toggles .is-open; the overlay itself is a single
   shared element reused for whichever screenshot was tapped. */
@media (max-width: 620px) {
  .theme-shot {
    cursor: zoom-in;
  }
}

.home-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgb(6 10 20 / 94%);
  padding: 20px;
}

.home-zoom-overlay.is-open {
  display: flex;
}

.home-zoom-overlay img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  object-fit: contain;
}

.home-zoom-overlay__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgb(255 255 255 / 14%);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.page-content {
  padding: clamp(42px, 7vw, 86px) clamp(20px, 6vw, 76px);
}

.landing .page-content {
  padding-top: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  min-height: calc(100vh - 61px);
  margin: 0 calc(clamp(20px, 6vw, 76px) * -1);
  padding: clamp(54px, 8vw, 100px) clamp(20px, 6vw, 76px);
  background: var(--dark);
}

.hero__copy {
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: #8cb8ff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
li {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 4.2vw, 52px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin: 42px 0 14px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
  letter-spacing: 0;
}

/* Wiki articles: wiki-accordion.js groups each h2 + its following content
   into one of these at runtime, so a long technical article collapses to
   its section titles by default instead of dumping the whole page of text
   at once - the h2 itself moves inside .wiki-accordion__summary, still a
   real heading for accessibility/search, not replaced by plain text. */
.wiki-accordion {
  border-bottom: 1px solid var(--line);
}

.wiki-accordion:first-of-type {
  border-top: 1px solid var(--line);
  margin-top: 38px;
}

.wiki-accordion[open] {
  padding-bottom: 22px;
}

.wiki-accordion__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 18px 0;
  list-style: none;
  cursor: pointer;
}

.wiki-accordion__summary::-webkit-details-marker {
  display: none;
}

.wiki-accordion__summary h2 {
  margin: 0;
}

.wiki-accordion__summary::after {
  content: '';
  flex: none;
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2356657c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / 18px no-repeat;
  transition: transform 0.15s ease;
}

.wiki-accordion[open] > .wiki-accordion__summary::after {
  transform: rotate(180deg);
}

h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.2;
}

p,
li {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.lead {
  max-width: 720px;
  margin: 24px 0 0;
  color: #e9f2ff;
  font-size: clamp(18px, 2.1vw, 23px);
}

.landing h1 {
  font-size: clamp(36px, 5vw, 72px);
}

.landing h2 {
  font-size: clamp(26px, 3.4vw, 40px);
}

.landing h3 {
  font-size: 21px;
}

/* Mobile type scale: h1/h2 clamp() floors (34-36px body pages, 36px landing)
   were tuned for desktop and don't shrink further below ~620px, so a 3-5 line
   heading eats most of the first screen on a phone. Smaller floors here, plus
   slightly heavier body weight for legibility now that the real Inter font
   is actually loading instead of silently falling back to the OS font. */
@media (max-width: 620px) {
  h1 {
    font-size: clamp(26px, 7.5vw, 34px);
  }

  .landing h1 {
    font-size: clamp(27px, 8vw, 38px);
  }

  h2 {
    font-size: clamp(20px, 6vw, 26px);
    margin: 34px 0 12px;
  }

  .landing h2 {
    font-size: clamp(21px, 6.5vw, 28px);
  }

  h3,
  .landing h3 {
    font-size: 17px;
  }

  p,
  li {
    font-size: 14px;
    font-weight: 500;
  }

  .lead {
    font-size: clamp(15px, 4.2vw, 17px);
  }
}

.section-lead {
  max-width: 940px;
  margin-top: -4px;
  font-size: 18px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 900;
}

.button--primary {
  background: #fff;
  color: var(--dark);
}

.button--secondary {
  border: 1px solid rgb(255 255 255 / 42%);
  color: #fff;
}

.hero__media {
  margin: 0;
}

.hero__media img {
  border: 1px solid rgb(255 255 255 / 20%);
  box-shadow: 0 30px 70px rgb(0 0 0 / 35%);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 calc(clamp(20px, 6vw, 76px) * -1) 64px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.metrics div {
  min-height: 118px;
  border-right: 1px solid var(--line);
  padding: 24px clamp(18px, 3vw, 34px);
}

.metrics div:last-child {
  border-right: 0;
}

.metrics strong,
.metrics span {
  display: block;
}

.metrics strong {
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.08;
}

.metrics span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.feature-grid,
.use-case-grid,
.security-grid,
.scheme-grid,
.wiki-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0;
}

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

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

.security-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.feature-grid article,
.use-case-grid article,
.security-grid article,
.scheme-grid article,
.wiki-options article {
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.security-grid article {
  min-height: 190px;
}

.security-grid p {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.6;
}

.card-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  border-radius: 8px;
  background: var(--badge-green-bg);
  padding: 7px 10px;
  color: var(--badge-green-fg);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.wiki-options span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  border-radius: 8px;
  background: var(--badge-blue-bg);
  padding: 7px 10px;
  color: var(--badge-blue-fg);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.media-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  margin: 32px 0;
}

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

figure {
  margin: 0;
}

.media-grid figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.media-grid img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  object-position: top left;
  border-radius: 0;
}

figcaption {
  border-top: 1px solid var(--line);
  padding: 14px 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 48px;
}

.chips span {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
  padding: 11px 13px;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 850;
}

.process-accordion {
  display: flex;
  gap: 14px;
  min-height: 430px;
  margin: 28px 0 56px;
}

.process-accordion article {
  position: relative;
  display: flex;
  overflow: hidden;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--dark);
  padding: 22px;
  color: #fff;
  transition: flex 220ms ease, filter 220ms ease, opacity 220ms ease;
}

.process-accordion:hover article {
  flex: 0.78;
  opacity: 0.72;
  filter: saturate(0.75);
}

.process-accordion article:hover {
  flex: 1.9;
  opacity: 1;
  filter: none;
}

.process-accordion img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  object-position: top left;
  opacity: 0.28;
  transition: opacity 220ms ease, transform 220ms ease;
}

.process-accordion article:hover img {
  opacity: 0.48;
  transform: scale(1.03);
}

.process-accordion span,
.process-accordion h3,
.process-accordion p,
.process-accordion a {
  position: relative;
  z-index: 1;
}

.process-accordion span {
  width: fit-content;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #fff;
  padding: 7px 10px;
  color: #101827;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.process-accordion h3 {
  margin-bottom: 8px;
  color: #fff;
  font-size: clamp(22px, 3vw, 34px);
}

.process-accordion p {
  max-width: 520px;
  margin: 0;
  color: #e8eef8;
  font-size: 15px;
}

.scheme-flow {
  display: grid;
  grid-template-columns: 1fr 22px 1fr 22px 1fr 22px 1fr;
  align-items: center;
  gap: 8px;
  margin: 22px 0;
}

.scheme-flow span,
.scheme-stack span,
.scheme-stack strong {
  display: grid;
  min-height: 54px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  padding: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.scheme-flow b {
  display: block;
  height: 2px;
  background: #12b886;
}

.scheme-flow b::after {
  display: block;
  width: 8px;
  height: 8px;
  margin: -3px 0 0 auto;
  border-top: 2px solid #12b886;
  border-right: 2px solid #12b886;
  content: "";
  transform: rotate(45deg);
}

.scheme-flow--lan span:last-child {
  background: var(--badge-green-bg);
  color: var(--badge-green-fg);
}

.scheme-stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 22px 0;
}

.scheme-stack strong {
  grid-column: 1 / -1;
  background: var(--dark);
  color: #fff;
}

.scheme-stack span:last-child {
  grid-column: 1 / -1;
  background: var(--badge-warn-bg);
  color: var(--badge-warn-fg);
}

.scheme-result {
  margin-bottom: 0;
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  color: var(--muted-strong);
  font-weight: 800;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0 48px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 22px;
  counter-increment: step;
}

.steps li::before {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  place-items: center;
  border-radius: 8px;
  background: var(--warning);
  color: #101827;
  content: counter(step);
  font-size: 14px;
  font-weight: 950;
}

.steps strong,
.steps span {
  display: block;
}

.steps strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.steps span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.wiki .page-content,
body:not(.landing) .page-content {
  width: min(100%, 1480px);
  max-width: 1480px;
  margin: 0 auto;
}

.wiki h1,
body:not(.landing) .page-content > h1 {
  max-width: 960px;
  line-height: 1.05;
}

.wiki p,
.wiki li {
  font-size: 14px;
  line-height: 1.55;
}

.wiki-search {
  position: relative;
  z-index: 20;
  display: grid;
  gap: 8px;
  max-width: 680px;
  margin: 18px 0 24px;
}

.wiki-search label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.wiki-search__control {
  display: flex;
  height: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.wiki-search input {
  height: 100%;
  width: 100%;
  min-width: 0;
  border: 0;
  background: var(--paper);
  padding: 12px 14px;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.wiki-search__control:focus-within {
  border-color: #8cb8ff;
  box-shadow: 0 0 0 3px rgb(140 184 255 / 22%);
}

.wiki-search button {
  display: grid;
  width: 44px;
  height: 100%;
  flex: 0 0 44px;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 7px 7px 0;
  background: var(--dark);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
  transition: filter 0.15s ease;
}

.wiki-search button:hover {
  filter: brightness(1.25);
}

.wiki-search .site-search__suggestions {
  top: calc(100% + 8px);
  right: auto;
  left: 0;
  z-index: 60;
  width: 100%;
}

.wiki-search p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.wiki-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 42px;
}

.wiki-map__item {
  display: grid;
  align-content: start;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 18px;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-card);
}

.wiki-map__item:hover {
  border-color: var(--muted-soft);
  transform: translateY(-1px);
}

.wiki-map__item span {
  width: fit-content;
  margin-bottom: 12px;
  border-radius: 6px;
  background: var(--badge-green-bg);
  padding: 5px 8px;
  color: var(--badge-green-fg);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.wiki-map__item h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 18px;
}

.wiki-map__item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.search-page {
  width: min(100%, 1180px);
}

.search-page__header {
  max-width: 780px;
  margin-bottom: 26px;
}

.search-page__header h1 {
  font-size: clamp(34px, 4.2vw, 52px);
}

.search-page__header p:last-child {
  margin-bottom: 0;
  font-size: 16px;
}

.search-page__panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.search-page .tntsearch-form {
  display: grid;
  gap: 18px;
  margin: 0;
}

.search-page #tntsearch-wrapper,
.search-page .form-group {
  position: relative;
  display: flex;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
}

.search-page .tntsearch-field,
.search-page .form-control,
.search-page .form-input {
  width: 100%;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 750;
  outline: 0;
  padding: 0 132px 0 16px;
}

.search-page .tntsearch-clear {
  position: absolute;
  top: 50%;
  right: 100px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--muted-soft);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transform: translateY(-50%);
}

.search-page .tntsearch-submit {
  position: absolute;
  top: 5px;
  right: 5px;
  bottom: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: var(--dark);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  padding: 0 18px;
  transition: filter 0.15s ease;
}

.search-page .tntsearch-submit:hover {
  filter: brightness(1.25);
}

.search-page .tntsearch-results {
  display: grid;
  gap: 14px;
}

.search-page .tntsearch-results:empty {
  display: none;
}

.search-page .tntsearch-results > p:first-child,
.search-page .tntsearch-results .tntsearch-stats {
  margin: 0;
  border-radius: 8px;
  background: var(--surface-hover);
  padding: 11px 14px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 850;
}

.search-page .tntsearch-results h3,
.search-page .tntsearch-results h4,
.search-page .tntsearch-results h5 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.search-page .tntsearch-results h3 a,
.search-page .tntsearch-results h4 a,
.search-page .tntsearch-results h5 a,
.search-page .tntsearch-results > a {
  color: var(--ink);
}

.search-page .tntsearch-results h3 a:hover,
.search-page .tntsearch-results h4 a:hover,
.search-page .tntsearch-results h5 a:hover,
.search-page .tntsearch-results > a:hover {
  color: var(--brand);
}

.search-page .tntsearch-results p {
  margin: 0;
}

.search-page .tntsearch-results > h3,
.search-page .tntsearch-results > h4,
.search-page .tntsearch-results > h5,
.search-page .tntsearch-results > a,
.search-page .tntsearch-results > p:not(:first-child) {
  width: 100%;
}

.search-page .tntsearch-results > h3,
.search-page .tntsearch-results > h4,
.search-page .tntsearch-results > h5 {
  margin-top: 10px;
}

.search-page .tntsearch-message {
  border-radius: 8px;
  background: var(--badge-warn-bg);
  padding: 13px 14px;
  color: var(--badge-warn-fg);
  font-weight: 850;
}

.search-page .tntsearch-results em,
.search-page .tntsearch-results mark {
  border-radius: 4px;
  background: var(--mark-bg);
  color: var(--mark-fg);
  font-style: normal;
  font-weight: 900;
  padding: 0 3px;
}

.search-page .tntsearch-results .tntsearch-result,
.search-page .tntsearch-results article,
.search-page .tntsearch-results li {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 17px 18px;
}

.search-page .tntsearch-results ul,
.search-page .tntsearch-results ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.search-page .tntsearch-powered-by {
  margin: 0;
  color: var(--muted-soft);
  font-size: 12px;
}

.search-page .tntsearch-powered-by a {
  color: var(--muted);
  font-weight: 850;
}


.page-content > ul {
  max-width: 860px;
}
.page-content > p,
.page-content > ol {
 max-width: 100%;
}

.page-content > img,
.page-content p img {
  margin: 18px 0 30px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 36px rgb(32 46 72 / 8%);
}

code {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-hover);
  padding: 2px 6px;
  color: var(--muted-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

/* Fenced code blocks (```text ... ```) render as <pre><code>. Without this,
   the inline-pill `code` rule above painted the whole multi-line block as one
   chip and, with no white-space/overflow handling on <pre> at all, a long
   line ran straight off the edge of the page instead of wrapping or
   scrolling -- found on the config examples in "Организации и сети". The
   card styling now lives on <pre>; `pre code` strips the inline pill so the
   two don't stack. */
.page-content pre {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  margin: 18px 0 26px;
  padding: 14px 16px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
}

.page-content pre code {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
  white-space: pre;
}

/* Markdown tables (wiki content): zebra striping + hover row highlight,
   same idea as Bootstrap's .table-striped/.table-hover. Colors reuse the
   site's own palette rather than adding a new one: --dark for the header
   (matches .brand-mark/nav dark surfaces), the --bg-family stripe already
   used for the page background, and #f3f7fc for hover -- the same neutral
   highlight .site-search__suggestion:hover uses for row/item hover. */
.page-content table {
  width: 100%;
  margin: 22px 0 30px;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.5;
}

.page-content thead th {
  border-bottom: 2px solid var(--line);
  background: var(--dark);
  padding: 11px 14px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-align: left;
  text-transform: uppercase;
}

.page-content tbody td {
  border-top: 1px solid var(--line);
  padding: 11px 14px;
  color: var(--ink);
  vertical-align: top;
}

.page-content tbody td:first-child {
  font-weight: 700;
}

/* Zebra striping. */
.page-content tbody tr:nth-of-type(odd) {
  background: var(--paper);
}

.page-content tbody tr:nth-of-type(even) {
  background: var(--bg);
}

/* Hover wins over the stripe regardless of parity. */
.page-content tbody tr:hover {
  background: var(--surface-hover);
}

.page-content table code {
  white-space: nowrap;
}

.architecture-showcase {
  display: grid;
  gap: 18px;
  width: 100%;
  margin: 30px auto 54px;
}

.architecture-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

.diagram {
  display: block;
  width: calc(100% - 56px);
  height: auto;
  margin: 24px 28px 0;
  border-radius: 8px;
}

.diagram--topology {
  width: calc(100% - 40px);
  margin-right: 20px;
  margin-left: 20px;
}

.diagram-inline-legacy {
  display: none;
}

.diagram-image {
  /*border: 1px solid #293852;*/
  /*background: #090f19;*/
  object-fit: contain;
}

/* Wraps each diagram <img> so tapping it opens the source SVG directly
   (new tab) instead of only ever seeing it shrunk into the card - the
   dense topology/scheme diagrams are unreadable at mobile card width
   otherwise, and this needs no JS or lightbox markup. */
.diagram-zoom {
  position: relative;
  display: block;
  cursor: zoom-in;
}

.diagram-zoom::after {
  content: '⤢';
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgb(0 0 0 / 55%);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.diagram-zoom:hover::after,
.diagram-zoom:focus-visible::after {
  opacity: 1;
}

@media (max-width: 620px) {
  .diagram-zoom::after {
    opacity: 1;
  }
}

.diagram-image--topology {
  max-height: none;
}

.diagram-source {
  margin: 14px 28px 0;
  font-size: 14px;
  font-weight: 900;
}

.diagram-source a {
  color: #44d9e6;
}

.diagram-panel {
  fill: var(--bg);
  stroke: var(--line);
  stroke-width: 1.4;
}

.diagram--dark .diagram-panel {
  fill: #090f19;
  stroke: #293852;
}

.diagram-zone {
  fill: rgb(255 255 255 / 3%);
  stroke: #31445f;
  stroke-dasharray: 7 7;
}

.diagram--topology .diagram-zone {
  stroke-dasharray: none;
}

.diagram--topology .diagram-zone--controller {
  fill: #17232e;
  stroke: #4d8dff;
  stroke-width: 2;
}

.diagram--topology .diagram-zone--peers {
  fill: #302719;
  stroke: #f1b82d;
  stroke-width: 2;
}

.diagram-zone-label {
  fill: #8fa0b8;
  font-size: 14px;
  font-weight: 900;
}

.diagram--topology .diagram-zone-label {
  fill: #e7f0ff;
  font-size: 16px;
}

.diagram--topology .diagram-zone-label--peers {
  fill: #fff4d0;
}

.diagram-node rect {
  fill: var(--paper);
  stroke: var(--line-strong);
  stroke-width: 1.8;
}

.diagram--dark .diagram-node rect {
  fill: #111b2b;
  stroke: #3a4c69;
}

.diagram-node text {
  fill: var(--ink);
  font-size: 16px;
  font-weight: 900;
  text-anchor: middle;
}

.diagram--dark .diagram-node text {
  fill: #fff;
}

.diagram-node .small {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.diagram--dark .diagram-node .small {
  fill: #a8b7cc;
}

.diagram-node--server rect,
.diagram-node--hub rect {
  stroke: #44d9e6;
}

.diagram-node--router rect {
  stroke: #f1b82d;
}

.diagram-node--client rect {
  stroke: #8cb8ff;
}

.diagram-node--camera rect,
.diagram-node--api rect,
.diagram-node--site rect {
  stroke: #12b886;
}

.diagram-node--db rect {
  stroke: #8fa0b8;
}

.diagram-node--cylinder ellipse,
.diagram-node--cylinder path {
  fill: #2b3139;
  stroke: #8fa0b8;
  stroke-width: 1.8;
}

.diagram--topology .diagram-node--operator rect {
  fill: #2d2035;
  stroke: #f35cff;
  stroke-width: 2;
}

.diagram--topology .diagram-node--peer rect {
  fill: #3a2e1d;
  stroke: #f1b82d;
  stroke-width: 1.8;
}

.diagram--topology .diagram-node--static rect {
  fill: #2a3038;
  stroke: #8fa0b8;
  stroke-width: 1.8;
}

.topology-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.diagram--topology .diagram-node text {
  font-size: 15px;
}

.diagram--topology .diagram-node .small {
  font-size: 11px;
}

.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(-13px) scale(0.66);
  transform-box: fill-box;
  transform-origin: center;
}

.icon-stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transform: translateY(-13px) scale(0.66);
  transform-box: fill-box;
  transform-origin: center;
}

.diagram-node--server,
.diagram-node--hub {
  color: #44d9e6;
}

.diagram-node--router {
  color: #f1b82d;
}

.diagram-node--client {
  color: #8cb8ff;
}

.diagram-node--camera,
.diagram-node--api,
.diagram-node--site {
  color: #12b886;
}

.diagram-node--db {
  color: #8fa0b8;
}

.line {
  fill: none;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line--wg {
  stroke: #10b981;
}

.line--wss {
  stroke: #f59f00;
}

.line--http {
  stroke: #f35cff;
}

.line--lan {
  stroke: #8cb8ff;
}

.line--inside {
  stroke: #94a3b8;
}

.line--dashed {
  stroke-dasharray: 8 8;
}

.line-label {
  paint-order: stroke;
  stroke-width: 7px;
  font-size: 13px;
  font-weight: 900;
  text-anchor: middle;
}

.line-label--wg {
  fill: #10b981;
  stroke: #f8fbff;
}

.line-label--wss {
  fill: #f59f00;
  stroke: #f8fbff;
}

.line-label--http {
  fill: #f35cff;
  stroke: #f8fbff;
}

.line-label--lan {
  fill: #8cb8ff;
  stroke: #f8fbff;
}

.diagram--dark .line-label--lan,
.diagram--dark .line-label--inside {
  stroke: #090f19;
}

.line-label--inside {
  fill: #94a3b8;
  stroke: #f8fbff;
}

.diagram--dark .line-label--wg,
.diagram--dark .line-label--wss,
.diagram--dark .line-label--http,
.diagram--dark .line-label--inside {
  stroke: #090f19;
}

.architecture-card--dark {
  border-color: #263247;
  background: #0d1421;
}

.architecture-card__copy {
  display: grid;
  gap: 10px;
  padding: 28px 28px 0;
}

.architecture-card__copy h3 {
  max-width: 820px;
  font-size: clamp(22px, 2.3vw, 30px);
}

.architecture-card__copy p {
  max-width: 940px;
  margin: 0;
}

.architecture-card--dark .architecture-card__copy h3,
.architecture-card--dark .architecture-card__copy p {
  color: #fff;
}

.architecture-card--dark .architecture-card__copy p {
  color: #d8e2f1;
}

.network-map {
  position: relative;
  min-height: 460px;
  margin: 24px 28px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgb(99 91 255 / 5%) 1px, transparent 1px),
    linear-gradient(rgb(99 91 255 / 5%) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px;
}

.architecture-card--dark .network-map {
  border-color: #293852;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 4%) 1px, transparent 1px),
    linear-gradient(rgb(255 255 255 / 4%) 1px, transparent 1px),
    #090f19;
}

.node {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  min-width: 128px;
  min-height: 64px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
  padding: 12px 14px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 12px 24px rgb(16 24 39 / 10%);
}

.node::before {
  display: block;
  width: 28px;
  height: 28px;
  background: var(--muted);
  content: "";
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.node small {
  display: block;
  margin-top: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.architecture-card--dark .node {
  border-color: #3a4c69;
  background: #111b2b;
  color: #fff;
  box-shadow: 0 12px 24px rgb(0 0 0 / 28%);
}

.architecture-card--dark .node::before {
  background: #8cb8ff;
}

.architecture-card--dark .node--router::before,
.architecture-card--dark .node--agent::before {
  background: #f1b82d;
}

.architecture-card--dark .node--camera::before,
.architecture-card--dark .node--lan::before,
.architecture-card--dark .node--api::before,
.architecture-card--dark .node--site::before {
  background: #12b886;
}

.architecture-card--dark .node--control::before,
.architecture-card--dark .node--hub::before,
.architecture-card--dark .node--hub-wide::before,
.architecture-card--dark .node--server::before {
  background: #44d9e6;
}

.architecture-card--dark .node small {
  color: #a8b7cc;
}

.zone {
  position: absolute;
  z-index: 0;
  border: 1px dashed #31445f;
  border-radius: 8px;
  background: rgb(255 255 255 / 3%);
  padding: 14px;
  color: #8fa0b8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.node--control,
.node--hub {
  border-color: #635bff;
}

.node--control::before,
.node--hub::before,
.node--hub-wide::before,
.node--server::before {
  background: #635bff;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='6' rx='1.5'/%3E%3Crect x='3' y='14' width='18' height='6' rx='1.5'/%3E%3Cpath d='M7 7h.01M7 17h.01M11 7h6M11 17h6'/%3E%3C/svg%3E");
}

.node--server,
.node--ui,
.node--hub-wide {
  min-width: 250px;
}

.node--agent {
  min-width: 310px;
}

.node--router {
  border-color: #f59f00;
}

.node--router::before,
.node--agent::before {
  background: #f59f00;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='8' rx='2'/%3E%3Cpath d='M8 14h.01M12 14h.01M16 14h.01M7 10 5 5M17 10l2-5M12 18v3'/%3E%3C/svg%3E");
}

.node--lan,
.node--camera,
.node--api,
.node--site {
  border-color: #12b886;
}

.node--camera::before {
  background: #12b886;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h10a3 3 0 0 1 3 3v2a3 3 0 0 1-3 3H4z'/%3E%3Ccircle cx='9' cy='12' r='2'/%3E%3Cpath d='m17 11 4-2v6l-4-2M5 16l-2 4M13 16l2 4'/%3E%3C/svg%3E");
}

.node--lan::before,
.node--api::before,
.node--site::before {
  background: #12b886;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='8.5' y='14' width='7' height='7' rx='1'/%3E%3Cpath d='M10 6.5h4M6.5 10v2.5h5M17.5 10v2.5h-5M12 12.5V14'/%3E%3C/svg%3E");
}

.node--user,
.node--team {
  border-color: #8cb8ff;
}

.node--user::before,
.node--team::before,
.node--static::before,
.node--ui::before {
  background: #8cb8ff;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='12' rx='2'/%3E%3Cpath d='M8 20h8M12 16v4'/%3E%3C/svg%3E");
}

.node--db::before {
  background: #8fa0b8;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5' rx='8' ry='3'/%3E%3Cpath d='M4 5v6c0 1.7 3.6 3 8 3s8-1.3 8-3V5'/%3E%3Cpath d='M4 11v6c0 1.7 3.6 3 8 3s8-1.3 8-3v-6'/%3E%3C/svg%3E");
}

.link {
  position: absolute;
  z-index: 1;
  transform-origin: left center;
}

.link::before {
  display: block;
  height: 3px;
  border-radius: 999px;
  content: "";
}

.link::after {
  position: absolute;
  top: -4px;
  right: -1px;
  display: block;
  width: 11px;
  height: 11px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.link span {
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: max-content;
  max-width: 220px;
  transform: translateX(-50%);
  color: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.link--wss {
  color: #f59f00;
}

.link--wss::before {
  border-top: 3px dashed currentColor;
  background: transparent;
}

.link--wg {
  color: #12b886;
}

.link--wg::before {
  background: currentColor;
}

.link--lan,
.link--api {
  color: #8cb8ff;
}

.link--inside {
  color: #8fa0b8;
}

.link--inside::before {
  background: currentColor;
}

.link--mesh {
  color: #f59f00;
}

.link--mesh::before {
  border-top: 3px dashed currentColor;
  background: transparent;
}

.network-map--topology {
  min-height: 560px;
}

.network-map--topology .zone--controller {
  left: 4%;
  top: 11%;
  width: 40%;
  height: 75%;
}

.network-map--topology .node--ui {
  left: 7%;
  top: 5%;
}

.network-map--topology .node--server {
  left: 7%;
  top: 25%;
  border-color: #44d9e6;
}

.network-map--topology .node--db {
  left: 7%;
  top: 48%;
}

.network-map--topology .node--hub-wide {
  left: 7%;
  bottom: 9%;
  border-color: #f1b82d;
}

.network-map--topology .node--agent-a {
  right: 5%;
  top: 20%;
  border-color: #44d9e6;
}

.network-map--topology .node--agent-b {
  right: 5%;
  top: 47%;
  border-color: #44d9e6;
}

.network-map--topology .node--static {
  right: 5%;
  bottom: 9%;
  border-color: #f1b82d;
}

.link--ui-server {
  left: 18%;
  top: 17%;
  width: 105px;
  transform: rotate(90deg);
}

.link--server-db {
  left: 18%;
  top: 42%;
  width: 58px;
  transform: rotate(90deg);
}

.link--server-hub {
  left: 29%;
  top: 44%;
  width: 155px;
  transform: rotate(90deg);
}

.link--server-agent-a {
  left: 43%;
  top: 33%;
  width: 230px;
}

.link--server-agent-b {
  left: 43%;
  top: 50%;
  width: 230px;
}

.link--hub-agent-a {
  left: 43%;
  top: 70%;
  width: 250px;
  transform: rotate(-33deg);
}

.link--hub-agent-b {
  left: 43%;
  top: 72%;
  width: 250px;
  transform: rotate(-7deg);
}

.link--hub-static {
  left: 43%;
  top: 76%;
  width: 250px;
}

.link--agent-mesh {
  right: 21%;
  top: 42%;
  width: 165px;
  transform: rotate(90deg);
}

.link--lan::before,
.link--api::before {
  background: currentColor;
}

.network-map--sim .node--user {
  left: 5%;
  top: 48%;
}

.network-map--sim .node--control {
  left: 36%;
  top: 10%;
}

.network-map--sim .node--hub {
  left: 46%;
  top: 48%;
}

.network-map--sim .node--router {
  right: 13%;
  top: 48%;
}

.network-map--sim .node--lan {
  right: 7%;
  bottom: 12%;
}

.link--agent-control {
  left: 58%;
  top: 39%;
  width: 260px;
  transform: rotate(33deg);
}

.link--user-hub {
  left: 17%;
  top: 56%;
  width: 310px;
}

.link--hub-router {
  left: 58%;
  top: 56%;
  width: 220px;
}

.link--router-lan {
  right: 14%;
  top: 68%;
  width: 118px;
  transform: rotate(90deg);
}

.network-map--cameras .node--user {
  left: 5%;
  top: 14%;
}

.network-map--cameras .node--hub {
  left: 34%;
  top: 14%;
}

.network-map--cameras .node--router {
  right: 12%;
  top: 14%;
}

.network-map--cameras .node--camera-a {
  left: 12%;
  bottom: 13%;
}

.network-map--cameras .node--camera-b {
  left: 38%;
  bottom: 13%;
}

.network-map--cameras .node--camera-c {
  right: 24%;
  bottom: 13%;
}

.network-map--cameras .node--api {
  right: 6%;
  bottom: 13%;
}

.link--client-hub {
  left: 18%;
  top: 22%;
  width: 190px;
}

.link--camera-router {
  left: 48%;
  top: 22%;
  width: 230px;
}

.link--router-cameras {
  left: 24%;
  top: 64%;
  width: 460px;
}

.link--router-api {
  right: 11%;
  top: 40%;
  width: 210px;
  transform: rotate(78deg);
}

.network-map--fleet .node--control {
  left: 36%;
  top: 9%;
}

.network-map--fleet .node--hub {
  left: 43%;
  top: 43%;
}

.network-map--fleet .node--team {
  left: 6%;
  top: 43%;
}

.network-map--fleet .node--site-a {
  right: 27%;
  bottom: 11%;
}

.network-map--fleet .node--site-b {
  right: 14%;
  bottom: 28%;
}

.network-map--fleet .node--site-c {
  right: 5%;
  bottom: 11%;
}

.link--fleet-control {
  left: 47%;
  top: 25%;
  width: 118px;
  transform: rotate(90deg);
}

.link--team-hub {
  left: 19%;
  top: 51%;
  width: 260px;
}

.link--hub-sites {
  left: 55%;
  top: 58%;
  width: 330px;
  transform: rotate(18deg);
}

.architecture-result {
  margin: 0;
  /*border-top: 1px solid #d7e1ee;*/
  padding: 18px 28px 24px;
  color: #26364f;
  font-weight: 850;
}

.architecture-card--dark .architecture-result {
  /*border-top-color: #293852;*/
  color: #e8eef8;
}

.network-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 18px 20px;
}

.network-legend span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 800;
}

.legend-line {
  width: 46px;
  height: 0;
}

.legend-line--wss {
  border-top: 3px dashed #f59f00;
}

.legend-line--wg {
  border-top: 3px solid #12b886;
}

.legend-line--lan {
  border-top: 3px solid #8cb8ff;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 30px clamp(18px, 5vw, 64px);
}

.site-footer p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.site-footer__meta {
  display: grid;
  align-content: start;
  gap: 8px;
}

.site-footer__origin {
  color: var(--muted-strong);
  font-weight: 800;
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header__right {
    justify-content: flex-start;
  }

  nav {
    justify-content: flex-start;
  }

  .hero,
  .metrics,
  .feature-grid,
  .use-case-grid,
  .security-grid,
  .scheme-grid,
  .wiki-map,
  .wiki-options,
  .media-grid,
  .media-grid--narrow,
  .steps {
    grid-template-columns: 1fr;
  }

  .process-accordion {
    flex-direction: column;
    min-height: 0;
  }

  .process-accordion,
  .process-accordion:hover article,
  .process-accordion article:hover {
    flex: none;
  }

  .process-accordion article {
    min-height: 300px;
  }

  .scheme-flow {
    grid-template-columns: 1fr;
  }

  .scheme-flow b {
    width: 2px;
    height: 18px;
    margin: 0 auto;
  }

  .scheme-flow b::after {
    margin: 10px 0 0 -3px;
    transform: rotate(135deg);
  }

  .metrics div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  /* .hero__mockup is `width: fit-content` for the desktop 2-column layout,
     where it needs to shrink-wrap and right-align next to the copy column.
     Once .hero collapses to a single column above, fit-content keeps trying
     to size to the image's own intrinsic width (934px) instead of the
     narrower mobile column, so the screenshot overflows the viewport and
     renders oversized/blurry. Force it to the column's actual width instead. */
  .hero__mockup {
    width: 100%;
    margin-left: 0;
  }

  .hero__mockup img {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 1180px) and (min-width: 981px) {
  .wiki-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-header {
    position: static;
  }

  .hero__actions,
  nav {
    flex-direction: column;
  }

  .site-header__right,
  nav,
  .site-search,
  .language-switch {
    width: 100%;
  }

  .site-search {
    max-width: none;
  }

  .site-search__suggestions {
    right: auto;
    left: 0;
    width: 100%;
  }

  .language-switch a {
    flex: 1;
  }

  .button {
    width: 100%;
  }

  .media-grid img {
    height: 280px;
  }

  .architecture-card__copy {
    padding: 22px 18px 0;
  }

  .network-map {
    display: grid;
    min-height: 0;
    gap: 12px;
    margin: 20px 18px 0;
    padding: 18px;
  }

  .node,
  .link,
  .zone {
    position: static;
  }

  .node,
  .node--server,
  .node--ui,
  .node--hub-wide,
  .node--agent {
    min-width: 0;
    width: 100%;
  }

  .node::before {
    width: 24px;
    height: 24px;
  }

  .zone {
    width: auto !important;
    height: auto !important;
    order: -1;
  }

  .link {
    width: auto;
    transform: none !important;
  }

  .link::before {
    width: 3px;
    height: 24px;
    margin: 0 auto;
  }

  .link::after {
    position: static;
    margin: -11px auto 0;
    transform: rotate(135deg);
  }

  .link span {
    position: static;
    display: block;
    width: auto;
    max-width: none;
    margin-top: 8px;
    transform: none;
  }

  .network-map--sim,
  .network-map--cameras,
  .network-map--fleet {
    grid-template-columns: 1fr;
  }

  .architecture-result {
    padding: 16px 18px 20px;
  }

  .network-legend {
    margin: 0;
  }
}

/* Hardware vendor picker (Поддерживаемое оборудование): CSS-only tabs, no
   JS. Radios sit first, the tab bar (labels) second, panels last -- all as
   direct children of .hw-picker -- so `~` can reach from a checked radio to
   its matching panel by id regardless of how many other tabs sit between
   them. Two vendors today (Teltonika, MikroTik); adding another is one more
   radio + label + panel + the two :checked rules below, nothing else changes. */
.hw-picker {
  margin: 22px 0 30px;
}

.hw-picker__radio {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.hw-picker__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.hw-picker__tab {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  padding: 7px 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.hw-picker__tab:hover {
  border-color: #b8c9df;
  color: var(--ink);
}

/* Focus-visible on the radio (keyboard nav) highlights its label, since the
   input itself is visually hidden. */
.hw-picker__radio:focus-visible + .hw-picker__tabs .hw-picker__tab,
.hw-picker__radio:checked + .hw-picker__tabs .hw-picker__tab {
  outline: none;
}

.hw-picker__panel {
  display: none;
}

/* Each vendor repeats this pair. */
#hw-vendor-teltonika:checked ~ .hw-picker__tabs label[for="hw-vendor-teltonika"] {
  border-color: var(--dark);
  background: var(--dark);
  color: #fff;
}
#hw-vendor-teltonika:checked ~ #hw-panel-teltonika {
  display: block;
}
#hw-vendor-mikrotik:checked ~ .hw-picker__tabs label[for="hw-vendor-mikrotik"] {
  border-color: var(--dark);
  background: var(--dark);
  color: #fff;
}
#hw-vendor-mikrotik:checked ~ #hw-panel-mikrotik {
  display: block;
}

/* "Подробнее" links inside feature/security cards and process-accordion
   steps, pointing into the wiki. Two color variants: light cards (feature-
   grid, security-grid) use the brand color; process-accordion cards sit on
   a dark image background, so they reuse the same light blue the hero's
   .eyebrow already uses on that background for contrast. */
.card-link {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.card-link:hover {
  text-decoration: underline;
}

.process-accordion .card-link {
  margin-top: 10px;
  color: #8cb8ff;
}

/* Vertical alignment fix: the step badge/title/description group in each
   process-accordion card is bottom-anchored (article's justify-content:
   flex-end), so a taller title or description pushes the badge above it
   higher, and a shorter one leaves it lower -- "ШАГ 1" and "ШАГ 4" landed at
   different heights purely because their text wrapped to a different number
   of lines. Copy is now kept to one-line titles and same-length
   descriptions, and these min-heights keep it that way if either is edited
   again later without both being changed in lockstep.
   Line-height 1.2 at h3's own clamp(22px,3vw,34px) sizing, single line
   reserved; ~15px/1.55 paragraph, two lines reserved. */
.process-accordion h3 {
  min-height: 1.2em;
}

.process-accordion p {
  min-height: calc(15px * 1.55 * 2);
}

/* ============================================================
   Homepage redesign: section rhythm system
   ============================================================
   Every major landing block is wrapped in .lp-section so spacing between
   sections is one consistent value instead of each component owning its
   own ad-hoc margin. .lp-section sits inside .page-content's existing
   gutter and just caps width; .lp-section--dark bleeds full-width using
   the same negative-margin trick .hero already uses, so there's exactly
   one place that knows the gutter width. */
.lp-section {
  max-width: 1280px;
  margin: clamp(56px, 8vw, 96px) auto;
}

.lp-section:first-child {
  margin-top: 0;
}

.lp-section--tight {
  margin-top: clamp(32px, 5vw, 56px);
  margin-bottom: clamp(32px, 5vw, 56px);
}

.lp-section--dark {
  max-width: none;
  margin: clamp(56px, 8vw, 96px) calc(clamp(20px, 6vw, 76px) * -1);
  padding: clamp(56px, 8vw, 96px) clamp(20px, 6vw, 76px);
  background: var(--dark);
}

.lp-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.lp-kicker {
  display: inline-flex;
  margin: 0 0 12px;
  color: #8cb8ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.lp-kicker--light {
  color: var(--badge-green-fg);
}

/* ============================================================
   Hero: proof bullets + product mockup framing
   ============================================================ */
.hero__proof {
  display: grid;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.hero__proof li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #cfe0fb;
  font-size: 14px;
  font-weight: 700;
}

.hero__proof li::before {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: 50%;
  background: #12b886;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M6.2 11.3 3 8.1l1.1-1.1 2.1 2.1 4.7-4.7 1.1 1.1z'/%3E%3C/svg%3E") center/10px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M6.2 11.3 3 8.1l1.1-1.1 2.1 2.1 4.7-4.7 1.1 1.1z'/%3E%3C/svg%3E") center/10px no-repeat;
  background-color: #12b886;
}

.hero__mockup {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
}

.hero__mockup img {
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 10px;
  box-shadow: 0 40px 90px rgb(0 0 0 / 45%);
}

/* ============================================================
   Value strip (replaces the old flat metrics row)
   ============================================================ */
.value-strip {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: -48px auto 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 30px 60px rgb(16 24 39 / 18%);
}

.value-strip__row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.value-strip__row div {
  padding: 24px clamp(14px, 2vw, 28px);
  border-right: 1px solid var(--line);
  text-align: center;
}

.value-strip__row div::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: #12b886;
}

.value-strip__row div:last-child {
  border-right: 0;
}

.value-strip__row strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.3;
}

.value-strip__row--tech {
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.value-strip__row--tech strong {
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

/* ============================================================
   Statement split: До Qarvix / После Qarvix
   ============================================================ */
.statement-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.statement-split > div {
  padding: clamp(26px, 3vw, 40px);
}

.statement-split__before {
  background: var(--statement-before-bg);
}

.statement-split__after {
  background: var(--statement-after-bg);
}

.statement-split h3 {
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.statement-split__before h3 {
  color: var(--statement-before-fg);
}

.statement-split__after h3 {
  color: var(--badge-green-fg);
}

.statement-split ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.statement-split li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

.statement-split__before li::before {
  content: "—";
  color: var(--statement-before-fg);
  font-weight: 900;
}

.statement-split__after li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 900;
}

/* ============================================================
   Scenario grid ("Где Qarvix особенно полезен"): icon + pain + result
   ============================================================ */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.scenario-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s, transform 0.15s;
}

.scenario-card:hover {
  box-shadow: 0 22px 44px rgb(32 46 72 / 11%);
  transform: translateY(-2px);
}

.scenario-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--icon-chip-bg);
  color: var(--brand);
}

.scenario-card__icon svg {
  width: 22px;
  height: 22px;
}

.scenario-card h3 {
  margin: 2px 0 0;
  font-size: 17px;
}

.scenario-card__pain {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--warn-text);
  font-size: 14px;
  font-weight: 700;
}

.scenario-card__result {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================================
   Proof shots: screenshot paired with the claims it backs up
   ============================================================ */
.proof-shot {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.proof-shot + .proof-shot {
  margin-top: clamp(48px, 6vw, 72px);
}

.proof-shot--reverse .proof-shot__frame {
  order: 2;
}

.proof-shot__frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 24px 56px rgb(32 46 72 / 10%);
}

.proof-shot__chrome {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-hover);
  padding: 10px 14px;
}

.proof-shot__chrome span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}

.proof-shot__frame img {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: top;
  border-radius: 0;
}

.proof-shot__kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--badge-green-fg);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.proof-shot__claims {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.proof-shot__claims li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

.proof-shot__claims li::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--brand);
}

/* ============================================================
   Process flow ("Как это работает"): one connected line, not 4 cards
   ============================================================ */
.process-flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 44px;
}

.process-flow::before {
  content: "";
  position: absolute;
  top: 19px;
  right: calc(12.5% + 19px);
  left: calc(12.5% + 19px);
  height: 2px;
  background: repeating-linear-gradient(to right, var(--line) 0 8px, transparent 8px 14px);
}

.process-flow__step {
  position: relative;
  display: grid;
  gap: 10px;
}

.process-flow__marker {
  position: relative;
  z-index: 1;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.process-flow__step h3 {
  margin: 4px 0 0;
  font-size: 17px;
}

.process-flow__step p {
  margin: 0;
  font-size: 14px;
}

.process-flow__result {
  display: inline-flex;
  gap: 6px;
  color: var(--badge-green-fg);
  font-size: 13px;
  font-weight: 800;
}

.process-flow__media {
  overflow: hidden;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 16px 32px rgb(32 46 72 / 8%);
}

.process-flow__media img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  object-position: top;
}

/* ============================================================
   Architecture diagram section (dark, contained, standalone)
   ============================================================ */
.arch-section {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.arch-section__copy h2 {
  margin-top: 0;
  color: #fff;
}

.arch-section__copy p {
  color: #b9c6dc;
}

.arch-legend {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.arch-legend li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #dde6f5;
  font-size: 14px;
  line-height: 1.5;
}

.arch-legend b {
  flex: 0 0 auto;
  color: #fff;
}

.arch-legend__dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 2px;
}

.arch-legend__dot--wss {
  background: #f59f00;
}

.arch-legend__dot--wg {
  background: #12b886;
}

.arch-diagram-link {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 14%);
  transition: border-color 0.15s;
}

.arch-diagram-link:hover {
  border-color: rgb(255 255 255 / 32%);
}

.arch-diagram {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.3) brightness(0.92);
  transition: filter 0.2s;
}

.arch-diagram-link:hover .arch-diagram {
  filter: saturate(0.7) brightness(1);
}

/* ============================================================
   Security section: statement + grouped clusters, not 8 tiles
   ============================================================ */
.security-split {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(28px, 4vw, 64px);
}

.security-split__statement h2 {
  margin-top: 0;
  max-width: 420px;
}

.security-split__statement p {
  max-width: 380px;
}

.security-clusters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.security-cluster {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  padding: 22px;
}

.security-cluster h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.security-cluster__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 7px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--icon-chip-bg);
  color: var(--brand);
}

.security-cluster__icon svg {
  width: 16px;
  height: 16px;
}

.security-cluster ul {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.security-cluster li {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.security-cluster li:first-child {
  border-top: 0;
  padding-top: 0;
}

.security-cluster strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 15px;
}

.security-cluster span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================================
   Operations list ("Отчетность и эксплуатация")
   ============================================================ */
.ops-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.ops-list {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.ops-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--ink);
  font-size: 15px;
}

.ops-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.ops-list li span {
  color: var(--muted);
  font-weight: 400;
}

.ops-format {
  display: inline-flex;
  margin-top: 18px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 800;
}

.ops-media {
  display: grid;
  gap: 14px;
}

.ops-media figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

.ops-media img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top;
}

.ops-media figcaption {
  font-size: 13px;
}

/* ============================================================
   Connection-schemes preview strip
   ============================================================ */
.scheme-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.scheme-preview {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 14px 30px rgb(32 46 72 / 6%);
  transition: border-color 0.15s, transform 0.15s;
}

.scheme-preview:hover {
  border-color: var(--muted-soft);
  transform: translateY(-2px);
}

.scheme-preview img {
  width: 100%;
  height: 130px;
  object-fit: contain;
  background: var(--dark);
  padding: 10px;
  border-radius: 0;
}

.scheme-preview__caption strong {
  display: block;
  margin: 4px 0 0 10px;
  color: var(--ink);
  font-size: 14px;
}

.scheme-preview__caption span {
  display: block;
  margin: 0 0 4px 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.lp-cta {
  display: inline-flex;
  margin-top: 22px;
  color: var(--brand);
  font-weight: 800;
  font-size: 14px;
}

.lp-cta:hover {
  text-decoration: underline;
}

/* ============================================================
   Landing typography: brief calls for H1 <=60px, H2 <=38px, H3 20-22px
   ============================================================ */
.landing h1 {
  font-size: clamp(36px, 4.6vw, 60px);
}

.landing h2 {
  font-size: clamp(26px, 3.2vw, 38px);
}

.landing h3 {
  font-size: 22px;
}

/* Old per-component margins now live on .lp-section instead, so they'd
   otherwise double up the new rhythm. */
.metrics,
.feature-grid,
.use-case-grid,
.process-accordion,
.media-grid,
.security-grid {
  margin: 0;
}

@media (max-width: 980px) {
  .value-strip {
    margin-top: -24px;
    border-radius: 12px;
  }

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

  .value-strip__row div:nth-child(2n) {
    border-right: 0;
  }

  .statement-split,
  .arch-section,
  .security-split,
  .ops-layout {
    grid-template-columns: 1fr;
  }

  .arch-section__copy {
    order: 1;
  }

  .security-clusters {
    grid-template-columns: 1fr;
  }

  .proof-shot,
  .proof-shot--reverse {
    grid-template-columns: 1fr;
  }

  .proof-shot--reverse .proof-shot__frame {
    order: 0;
  }

  .process-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 32px;
  }

  .process-flow::before {
    display: none;
  }

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

@media (max-width: 620px) {
  .value-strip {
    margin-top: 0;
    border-radius: 0;
  }

  .value-strip__row {
    grid-template-columns: 1fr;
  }

  .value-strip__row div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .value-strip__row div:last-child {
    border-bottom: 0;
  }

  .process-flow {
    grid-template-columns: 1fr;
  }

  .scheme-preview-grid {
    grid-template-columns: 1fr;
  }

}

/* ============================================================
   Contact page
   ============================================================ */

.contact-hero {
  max-width: 1180px;
  margin: 0 auto clamp(36px, 5vw, 56px);
}

.contact-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
}

.contact-lead {
  margin: 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}

.contact-reasons h2 {
  margin: 0 0 18px;
  font-size: 20px;
}

.contact-reasons ul {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-reasons li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.contact-reasons li strong {
  font-size: 14px;
  color: var(--ink);
}

.contact-reasons li span {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.contact-reasons__wiki {
  margin: 18px 2px 0;
  color: var(--muted);
  font-size: 13.5px;
}

.contact-reasons__wiki a {
  color: var(--brand);
  font-weight: 700;
}

.contact-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  padding: clamp(24px, 3vw, 34px);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.contact-card__kicker {
  margin: 4px 0 20px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Grav Form plugin: default markup restyled to match the theme instead of
   the plugin's own built_in_css (disabled in plugins/form.yaml). Selectors
   target the fixed class names the plugin's default field layout emits. */
.form-wrapper .notices {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.5;
}

.form-wrapper .notices p {
  margin: 0;
}

.form-wrapper .notices.green {
  background: var(--badge-green-bg);
  color: var(--badge-green-fg);
}

.form-wrapper .notices.red {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Two-up layout by field position rather than Grav's `columns`/`column`
   field types: nesting fields that way left `form.message` empty after a
   successful submit (Form plugin's own field-tree walk vs. the flat
   `$form->value()` map processed at save/message time disagreed on nested
   fields). Field order from the page's `form.fields` is name, company,
   email, phone, topic, message - hidden/honeypot inputs render outside
   `.form-field` entirely, so nth-of-type on the div stays reliable. */
.contact-card form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-field:nth-of-type(5),
.form-field:nth-of-type(6) {
  grid-column: 1 / -1;
}

.buttons {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  .contact-card form {
    grid-template-columns: 1fr;
  }
}

.form-label {
  display: block;
}

.form-label label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.form-label .required {
  margin-left: 3px;
  color: var(--danger);
  font-weight: 700;
}

.form-input-wrapper,
.form-textarea-wrapper,
.form-select-wrapper {
  display: block;
}

/* No border at rest - fields are defined by the fill color alone until
   hover/focus draw an edge. `appearance: none` is the actual fix here:
   without it, the browser's native widget chrome (the OS-themed inset
   frame Firefox/Edge draw for text inputs) paints its own border-like
   edge regardless of what the `border` property says, since that frame
   comes from the native control rendering, not from CSS borders. */
.form-input,
.form-textarea,
.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--surface-hover);
  color: var(--ink);
  font: inherit;
  font-size: 14.5px;
  padding: 11px 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.form-select {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2356657c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  /* Without an explicit background-size, iOS Safari sometimes ignores
     background-repeat: no-repeat on a data-URI background paired with
     appearance: none on a <select> and tiles the icon at its own intrinsic
     16x16 size across the whole field instead of painting it once. */
  background-size: 16px 16px;
  cursor: pointer;
}

:root[data-theme="dark"] .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa8c0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.form-textarea {
  resize: vertical;
  min-height: 130px;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--muted-soft);
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
  border-color: var(--muted-soft);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--paper);
  box-shadow: inset 0 1px 2px rgb(16 24 39 / 5%), 0 0 0 3px rgb(99 91 255 / 18%);
}

.form-errors {
  color: var(--danger);
  font-size: 12.5px;
}

.form-errors .form-message {
  margin: 4px 0 0;
}

.form-honeybear {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

.contact-card .buttons {
  margin-top: 6px;
}

.contact-card .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
  font-size: 14.5px;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgb(99 91 255 / 55%);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.contact-card .button:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.contact-card .button:active {
  transform: translateY(0);
}

@media (max-width: 980px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Quick contact (WhatsApp / Telegram floating buttons)
   ============================================================ */

.quick-contact {
  position: fixed;
  z-index: 60;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-contact__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  opacity: 0.6;
  box-shadow: 0 10px 24px -8px rgb(16 24 39 / 35%);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.quick-contact__btn svg {
  width: 26px;
  height: 26px;
}

.quick-contact__btn:hover,
.quick-contact__btn:focus-visible {
  opacity: 1;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 14px 28px -8px rgb(16 24 39 / 42%);
}

.quick-contact__btn--whatsapp {
  background: #25d366;
}

.quick-contact__btn--telegram {
  background: #229ed9;
}

@media (max-width: 620px) {
  .quick-contact__btn {
    width: 46px;
    height: 46px;
  }

  .quick-contact__btn svg {
    width: 23px;
    height: 23px;
  }
}
