@font-face {
  font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/plex-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("fonts/plex-sans-500.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("fonts/plex-sans-600.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("fonts/plex-sans-700.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/plex-sans-400-cyr.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("fonts/plex-sans-500-cyr.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("fonts/plex-sans-600-cyr.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Sans"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("fonts/plex-sans-700-cyr.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("fonts/plex-mono-500.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/plex-mono-400-cyr.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("fonts/plex-mono-500-cyr.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
:root {
  color-scheme: dark;
  --bg: #090d13;
  --bg-rgb: 9, 13, 19;
  --bg2: #0d131c;
  --surface: #121a25;
  --surface2: #182232;
  --line: #263244;
  --line2: #3a485e;
  --text: #edf2f8;
  --muted: #aeb8c7;
  --faint: #8793a5;
  --accent: #e8b56f;
  --accent-rgb: 232, 181, 111;
  --accent-dim: rgba(var(--accent-rgb), .15);
  --teal: #78d6c9;
  --teal-rgb: 120, 214, 201;
  --teal-dim: rgba(var(--teal-rgb), .13);
  --violet: #ada2ec;
  --violet-rgb: 173, 162, 236;
  --violet-dim: rgba(var(--violet-rgb), .13);
  --blue: #75bdf7;
  --blue-rgb: 117, 189, 247;
  --danger: #e38b8b;
  --chip-bg: rgba(255, 255, 255, .022);
  --sheen: rgba(255, 255, 255, .028);
  --road: rgba(139, 149, 165, .24);
  --code-bg: #080b10;
  --loc-time-bg: rgba(8, 11, 16, .84);
  --mock-me-bg: linear-gradient(90deg, rgb(5 150 105 / .86), rgb(4 120 87 / .86));
  --mock-me-border: rgb(16 185 129 / .28);
  --mock-me-color: #ffffff;
  --mock-tick: rgb(255 255 255 / .76);
  --mock-file-bg: rgb(255 255 255 / .13);
  --mock-file-border: rgb(255 255 255 / .18);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #e9edf3;
  --bg-rgb: 233, 237, 243;
  --bg2: #e5eaf1;
  --surface: #ffffff;
  --surface2: #e2e8f0;
  --line: #b9c4d2;
  --line2: #94a3b8;
  --text: #0f172a;
  --muted: #475569;
  --faint: #526378;
  --accent: #8f5f00;
  --accent-rgb: 143, 95, 0;
  --accent-dim: rgba(var(--accent-rgb), .13);
  --teal: #047857;
  --teal-rgb: 4, 120, 87;
  --teal-dim: rgba(var(--teal-rgb), .11);
  --violet: #6857c5;
  --violet-rgb: 104, 87, 197;
  --violet-dim: rgba(var(--violet-rgb), .11);
  --blue: #2563eb;
  --blue-rgb: 37, 99, 235;
  --danger: #ad3f3f;
  --chip-bg: rgba(23, 32, 44, .035);
  --sheen: rgba(23, 32, 44, .025);
  --road: rgba(78, 93, 110, .18);
  --code-bg: #f8fafc;
  --loc-time-bg: rgba(255, 255, 255, .9);
  --mock-me-bg: #efffde;
  --mock-me-border: #b9d897;
  --mock-me-color: var(--text);
  --mock-tick: var(--teal);
  --mock-file-bg: rgb(255 255 255 / .66);
  --mock-file-border: rgb(4 120 87 / .2);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgba(var(--accent-rgb),.25); }

/* ---------- progress ---------- */
#progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--accent); z-index: 60;
}

/* ---------- layout ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
section { padding: 110px 0 40px; }
.sec-label {
  font-family: var(--mono); font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
  display: flex; align-items: center; gap: 14px;
}
.sec-label::after { content: ""; height: 1px; flex: 0 0 60px; background: var(--line2); }
h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 18px; }
h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.lede { color: var(--muted); max-width: 720px; font-size: 17px; margin-bottom: 48px; }
.lede b, .lede strong { color: var(--text); font-weight: 500; }
p.small { font-size: 14px; color: var(--muted); }

/* ---------- reveal ---------- */
html.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
html.js .rv.on { opacity: 1; transform: none; }
.rv-d1 { transition-delay: .08s; } .rv-d2 { transition-delay: .16s; }
.rv-d3 { transition-delay: .24s; } .rv-d4 { transition-delay: .32s; }

.hero-sub, .lede, .feat .body p, .evo-step p, .data-note, .jstep p,
.e2e-note p, .callout span:nth-child(2), .svc li, .trust li, .hero-note {
  text-align: justify;
}

/* ---------- header ---------- */
header.site {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  background: rgba(var(--bg-rgb), .86); border-bottom: 1px solid var(--line);
  transition: border-color .3s;
}
header.site.scrolled { border-bottom-color: var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 54px; }
.brand { font-family: var(--mono); font-size: 13px; color: var(--muted); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.brand b { color: var(--text); font-weight: 500; }
.hdr-right { display: flex; align-items: center; gap: 18px; }
nav.top { display: flex; gap: 18px; }
nav.top a { font-family: var(--mono); font-size: 12px; color: var(--muted); text-decoration: none; transition: color .2s; }
nav.top a:hover { color: var(--accent); }
.lang { display: flex; gap: 2px; border: 1px solid var(--line2); border-radius: 999px; padding: 2px; }
.lang a, .lang button {
  font-family: var(--mono); font-size: 11px; background: none; border: none;
  color: var(--faint); padding: 5px 9px; line-height: 1; border-radius: 999px; cursor: pointer;
  transition: color .2s, background .2s; text-decoration: none;
}
.lang a:hover, .lang button:hover { color: var(--text); }
.lang a.on, .lang button.on { background: var(--surface2); color: var(--accent); }
.tag, .theme-toggle, .lang {
  border: 1px solid var(--line2); border-radius: 999px;
  background: var(--surface); color: var(--muted);
  font-family: var(--mono); font-size: 11px; line-height: 1;
}
.tag { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 12px; }
.lang { min-height: 28px; align-items: center; }
.theme-toggle {
  display: inline-flex; align-items: center; gap: 7px; min-height: 28px;
  padding: 4px 11px; cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }
.theme-toggle svg { width: 13px; height: 13px; display: block; }
@media (max-width: 520px) {
  .hdr-right { gap: 8px; }
  .theme-toggle { padding: 4px 8px; }
  .theme-toggle-text { display: none; }
}
@media (max-width: 380px) {
  .brand { font-size: 0; gap: 8px; }
  .brand b { font-size: 13px; }
}
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
@media (max-width: 760px) { nav.top { display: none; } }

/* ---------- hero ---------- */
.hero { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; padding: 120px 0 60px; position: relative; }
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 75%);
}
.hero-kicker { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: .14em; margin-bottom: 22px; }
.hero h1 {
  font-size: clamp(40px, 7vw, 72px); font-weight: 600; letter-spacing: -.035em;
  line-height: 1.04; margin-bottom: 24px; max-width: 840px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { color: var(--muted); font-size: clamp(16px, 2vw, 19px); max-width: 660px; margin-bottom: 40px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 64px; }
.hero-flow {
  display: flex; align-items: center; gap: 0; flex-wrap: wrap;
  font-family: var(--mono); font-size: 13px; color: var(--faint);
}
.hero-flow .node {
  border: 1px solid var(--line2); background: var(--surface);
  border-radius: 8px; padding: 10px 16px; color: var(--text);
}
.hero-flow .node.sealed { border-color: rgba(var(--teal-rgb),.5); color: var(--teal); }
.hero-flow .arr { padding: 0 12px; color: var(--faint); }
.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: .2em;
  animation: hint 2.4s ease-in-out infinite;
}
@keyframes hint { 0%,100% { transform: translate(-50%,0); opacity:.5 } 50% { transform: translate(-50%,6px); opacity:1 } }

/* ---------- generic diagram pieces ---------- */
.flow-col { display: flex; flex-direction: column; align-items: center; gap: 0; }
.fbox {
  border: 1px solid var(--line2); background: var(--surface); border-radius: 10px;
  padding: 12px 22px; font-family: var(--mono); font-size: 13px; text-align: center;
  min-width: 220px;
}
.fbox .sub { display: block; font-size: 11px; color: var(--faint); margin-top: 2px; }
.fbox.accent { border-color: rgba(var(--accent-rgb),.45); }
.fbox.teal { border-color: rgba(var(--teal-rgb),.4); }
.fbox.violet { border-color: rgba(var(--violet-rgb),.4); }
.conn { width: 1px; height: 30px; background: var(--line2); position: relative; }
.conn::after {
  content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  border: 4px solid transparent; border-top-color: var(--line2);
}

/* ---------- feature cards ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .feat-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .feat-grid { grid-template-columns: 1fr; } }
.feat {
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .3s, transform .3s;
}
.feat:hover { border-color: var(--line2); transform: translateY(-3px); }
.feat .shot { aspect-ratio: 16/10; overflow: hidden; background: var(--bg2); border-bottom: 1px solid var(--line); position: relative; }
.feat .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.feat .body { padding: 16px 18px 18px; }
.feat .body h3 { font-size: 15px; }
.feat .body p { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.feat .tech { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 10px; }
/* css-mock feature visuals */
.feat .mock { aspect-ratio: 16/10; overflow: hidden; background: var(--bg2); border-bottom: 1px solid var(--line); position: relative; padding: 14px; display: flex; flex-direction: column; justify-content: center; gap: 7px; }
.mock .bub { max-width: 78%; border-radius: 16px; padding: 7px 11px; font-size: 11.5px; line-height: 1.45; }
.mock .bub .ticks { font-family: var(--mono); font-size: 9px; color: var(--teal); margin-left: 6px; }
.mock .bub.me { align-self: flex-end; background: var(--mock-me-bg); border: 1px solid var(--mock-me-border); color: var(--mock-me-color); border-bottom-right-radius: 6px; }
.mock .bub.me .ticks { color: var(--mock-tick); }
.mock .bub.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--line2); color: var(--text); border-bottom-left-radius: 6px; }
.mock .bub-file {
  display: flex; align-items: center; gap: 6px; width: fit-content; max-width: 100%;
  margin-bottom: 5px; padding: 3px 7px 3px 4px; border-radius: 8px;
  background: var(--mock-file-bg); border: 1px solid var(--mock-file-border);
  font-family: var(--mono); font-size: 9px; line-height: 1.2;
}
.mock .bub-file-ext {
  width: 20px; height: 24px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line2); color: var(--teal);
  font-size: 7px; flex: 0 0 auto;
}
.mock .bub-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mock .bub .ct { font-family: var(--mono); font-size: 10px; color: var(--faint); word-break: break-all; }
.mock .lockline { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10px; color: var(--teal); padding: 0 2px; }
.mock .lockline::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.mock .callrow { display: flex; gap: 8px; align-items: center; justify-content: center; }
.mock .peer { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line2); background: var(--surface); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.mock .peer.live { border-color: rgba(var(--teal-rgb),.55); color: var(--teal); }
.mock .pin { width: 34px; height: 34px; margin: 0 auto; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--accent-dim); border: 1.5px solid var(--accent); position: relative; }
.mock .pin::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--accent); }
.mock .mapline { height: 1px; background: var(--line2); position: relative; margin-top: 8px; }
.mock .mapline::after { content: ""; position: absolute; right: 18%; top: -4px; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }

/* ---------- evolution ---------- */
.evo { display: flex; flex-direction: column; gap: 0; position: relative; padding-left: 40px; }
.evo::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 1px; background: var(--line2); }
.evo-step { position: relative; padding: 0 0 34px 10px; max-width: 640px; }
.evo-step::before {
  content: ""; position: absolute; left: -34px; top: 7px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--faint); transition: border-color .4s, background .4s;
}
.evo-step.on::before { border-color: var(--accent); background: var(--accent); }
.evo-num { font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: .1em; }
.evo-step h3 { font-size: 16px; margin: 2px 0 4px; }
.evo-step p { font-size: 14px; color: var(--muted); }

/* ---------- architecture diagram ---------- */
.arch { position: relative; margin: 20px 0 8px; padding-bottom: 44px; }
.arch svg.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.arch svg.wires path { stroke: var(--line2); stroke-width: 1.5; fill: none; opacity: 0; transition: opacity .8s ease; }
.arch.on svg.wires path { opacity: 1; }
.arch svg.wires path.live { stroke: var(--accent); stroke-dasharray: 4 6; animation: wireflow 1.4s linear infinite; }
.arch svg.wires path.flow { stroke: var(--teal); stroke-dasharray: 4 6; animation: wireflow 1.4s linear infinite; }
@keyframes wireflow { to { stroke-dashoffset: -10; } }
.arch-rows { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 64px; }
.arch-row { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; width: 100%; }
.node2 {
  border: 1px solid var(--line2); background: var(--surface); border-radius: 12px;
  padding: 14px 18px; min-width: 150px; text-align: center; position: relative;
}
.node2 .t { font-family: var(--mono); font-size: 13px; color: var(--text); }
.node2 .d { font-size: 11.5px; color: var(--faint); margin-top: 3px; line-height: 1.4; }
.node2.hub { border-color: rgba(var(--accent-rgb),.5); background: var(--surface2); min-width: 250px; }
.node2.ext { border-style: dashed; }
.node2 .badge {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  background: var(--bg); padding: 1px 8px; border: 1px solid var(--line2); border-radius: 999px;
  color: var(--faint); white-space: nowrap;
}
@media (max-width: 640px) {
  .arch-rows { gap: 40px; }
  .node2 { min-width: 130px; padding: 10px 12px; }
}

/* ---------- services ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 720px) { .svc-grid { grid-template-columns: 1fr; } }
.svc {
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  padding: 20px 22px; transition: border-color .3s;
}
.svc:hover { border-color: var(--line2); }
.svc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.svc-head h3 { font-size: 15px; font-family: var(--mono); font-weight: 500; }
.svc-head .pkg { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.svc ul { list-style: none; }
.svc li { font-size: 13.5px; color: var(--muted); padding: 3px 0 3px 16px; position: relative; }
.svc li::before { content: "·"; position: absolute; left: 4px; color: var(--accent); }
.svc .detail {
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--faint); font-family: var(--mono); line-height: 1.5;
}
.svc .detail b { color: var(--teal); font-weight: 500; }

/* ---------- data ---------- */
.data-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .data-cols { grid-template-columns: 1fr; } }
.data-box { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 22px; }
.data-box h3 { font-family: var(--mono); font-size: 14px; display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.data-box .env { font-size: 11px; color: var(--faint); font-family: var(--mono); margin-bottom: 14px; }
.ent { display: flex; gap: 10px; flex-wrap: wrap; }
.ent span {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  border: 1px solid var(--line2); border-radius: 6px; padding: 4px 9px;
}
.ent span.hot { color: var(--accent); border-color: rgba(var(--accent-rgb),.4); }
.ent span.sealed { color: var(--teal); border-color: rgba(var(--teal-rgb),.4); }
.data-note { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* ---------- journey ---------- */
.journey { position: relative; max-width: 720px; margin: 0 auto; padding-left: 56px; counter-reset: j; }
.journey::before { content: ""; position: absolute; left: 19px; top: 10px; bottom: 10px; width: 1px; background: var(--line2); }
.journey .jfill { position: absolute; left: 19px; top: 10px; width: 1px; height: 0; background: var(--accent); transition: height .12s linear; }
.journey .jpacket {
  position: absolute; left: 13px; top: 10px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px rgba(var(--accent-rgb),.8), 0 0 0 4px var(--accent-dim);
  opacity: 0; transition: opacity .3s; z-index: 2;
}
.journey .jpacket.show { opacity: 1; }
.jstep { position: relative; padding-bottom: 36px; counter-increment: j; }
.jstep::before {
  content: counter(j); position: absolute; left: -56px; top: 0;
  width: 39px; height: 39px; border-radius: 50%;
  border: 1px solid var(--line2); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px; color: var(--faint);
  transition: all .5s;
}
.jstep.on::before { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }
.jstep .who { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 3px; }
.jstep h3 { font-size: 15.5px; margin-bottom: 4px; }
.jstep p { font-size: 14px; color: var(--muted); max-width: 560px; }
.jstep code { font-family: var(--mono); font-size: 12px; color: var(--accent); background: var(--accent-dim); border-radius: 4px; padding: 1px 6px; white-space: normal; overflow-wrap: anywhere; }

/* ---------- e2e envelope ---------- */
.e2e-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 26px; align-items: start; }
@media (max-width: 860px) { .e2e-grid { grid-template-columns: 1fr; } }
.envelope {
  border: 1px solid var(--line); border-radius: 14px; background: var(--code-bg);
  padding: 20px 22px; font-family: var(--mono); font-size: 12.5px; line-height: 1.85;
}
.envelope .k { color: var(--faint); }
.envelope .v { color: var(--text); }
.envelope .ct { color: var(--accent); }
.envelope .wrapk { color: var(--violet); }
.envelope .tagln { color: var(--teal); }
.env-cap { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 10px; }
.e2e-steps { display: flex; flex-direction: column; gap: 14px; }
.e2e-step { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 14px 18px; }
.e2e-step .n { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; color: var(--accent); text-transform: uppercase; }
.e2e-step h4 { font-size: 14px; font-weight: 600; margin: 3px 0 4px; }
.e2e-step p { font-size: 13px; color: var(--muted); }
.e2e-step code { font-family: var(--mono); font-size: 11.5px; color: var(--teal); }
.scramble-line {
  font-family: var(--mono); font-size: 15px; color: var(--teal);
  min-height: 26px; letter-spacing: .02em;
}
.scramble-line .lbl { color: var(--faint); font-size: 11px; display: block; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; }

/* ---------- trust ---------- */
.trust-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
@media (max-width: 720px) { .trust-grid { grid-template-columns: 1fr; } }
.trust { border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; background: var(--surface); }
.trust h3 { font-size: 14px; font-family: var(--mono); margin-bottom: 10px; }
.trust h3 .mk { color: var(--faint); font-weight: 400; }
.trust.knows h3 { color: var(--teal); }
.trust.blind h3 { color: var(--accent); }
.trust li { font-size: 13.5px; color: var(--muted); list-style: none; padding: 3px 0 3px 18px; position: relative; }
.trust li::before { position: absolute; left: 0; font-family: var(--mono); }
.trust.knows li::before { content: "✓"; color: var(--teal); }
.trust.blind li::before { content: "✗"; color: var(--accent); }

/* ---------- war story ---------- */
.war {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 0 14px 14px 0; background: var(--surface);
  padding: 26px 30px; margin-top: 40px;
}
.war .wlabel { font-family: var(--mono); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.war h3 { font-size: 19px; margin-bottom: 10px; }
.war p { font-size: 14.5px; color: var(--muted); margin-bottom: 10px; max-width: 760px; }
.war p b { color: var(--text); font-weight: 500; }
.war .beforeafter { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
@media (max-width: 640px) { .war .beforeafter { grid-template-columns: 1fr; } }
.ba {
  border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  font-family: var(--mono); font-size: 12px; line-height: 1.7;
}
.ba .lbl { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.ba.bad .lbl { color: var(--danger); }
.ba.good .lbl { color: var(--teal); }
.ba .k { color: var(--faint); } .ba .v { color: var(--text); }

/* ---------- production ---------- */
.pipe { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.pstage {
  flex: 1 1 130px; border: 1px solid var(--line2); background: var(--surface);
  border-radius: 12px; padding: 14px 16px; text-align: center; position: relative;
}
.pstage .t { font-family: var(--mono); font-size: 12.5px; }
.pstage .d { font-size: 11px; color: var(--faint); margin-top: 3px; }
.parr { align-self: center; padding: 0 8px; color: var(--faint); font-family: var(--mono); }
@media (max-width: 900px) { .pipe { flex-direction: column; } .parr { transform: rotate(90deg); padding: 4px 0; } }

/* ---------- spec table ---------- */
.spec { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 28px; }
@media (max-width: 900px) { .spec { grid-template-columns: repeat(2,1fr); } }
.spec .k { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.spec .v { font-size: 14px; color: var(--text); }
.spec .v span { display: block; color: var(--muted); font-size: 12.5px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); margin-top: 100px; padding: 44px 0 60px; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
footer .who { font-size: 14px; }
footer .who b { font-weight: 600; }
footer .who span { display: block; font-size: 12.5px; color: var(--muted); }
footer .links { display: flex; gap: 20px; }
footer a { font-family: var(--mono); font-size: 12.5px; color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }

.callout {
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg2);
  padding: 16px 20px; font-size: 14px; color: var(--muted); margin-top: 28px;
  display: flex; gap: 12px;
}
.callout .ic { color: var(--accent); font-family: var(--mono); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .scroll-hint { animation: none; }
  .arch svg.wires path.live, .arch svg.wires path.flow { animation: none; }
  .journey .jpacket { display: none; }
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.mt-0 { margin-top: 0; }
.mt-18 { margin-top: 18px; }
.mt-22 { margin-top: 22px; }
.mt-26 { margin-top: 26px; }
.hero-note { max-width: 760px; margin-top: 42px; padding-top: 14px; border-top: 1px solid var(--line); }

body.messenger-case .hero { overflow: hidden; border-bottom: 1px solid var(--line); }
body.messenger-case .hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(700px 300px at 15% 0%, rgba(var(--accent-rgb),.07), transparent 60%),
    radial-gradient(600px 300px at 85% 20%, rgba(var(--teal-rgb),.05), transparent 60%);
}
body.messenger-case .hero-grid-bg { display: none; }
body.messenger-case .hero .wrap { position: relative; z-index: 1; }

body.messenger-case .feat .mock { padding: 12px; gap: 8px; }
.mock-top { width: 100%; display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); }
.mock-top .avatar {
  width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-dim); border: 1px solid rgba(var(--accent-rgb),.38); color: var(--accent);
  font-family: var(--mono); font-size: 10px; flex: 0 0 auto;
}
.mock-top img.avatar { object-fit: cover; border-color: var(--line2); background: var(--surface2); }
.mock-top .avatar.ai { background: var(--violet-dim); border-color: rgba(var(--violet-rgb),.4); color: var(--violet); }
.mock-top .avatar.bot { background: var(--teal-dim); border-color: rgba(var(--teal-rgb),.4); color: var(--teal); }
.mock-top .name { color: var(--text); font-weight: 500; }
.mock-top .status { margin-left: auto; font-family: var(--mono); font-size: 9.5px; color: var(--faint); }
.mock-tags { display: flex; gap: 5px; width: 100%; }
.mock-tags span {
  font-family: var(--mono); font-size: 9px; color: var(--faint); border: 1px solid var(--line2);
  border-radius: 999px; padding: 2px 7px; background: var(--chip-bg);
}
.bub.bot { align-self: flex-start; background: var(--teal-dim); border: 1px solid rgba(var(--teal-rgb),.34); color: var(--text); }

.mock-seal { justify-content: center; }
.seal-row { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.seal-side { min-width: 0; }
.seal-label { display: block; font-family: var(--mono); font-size: 9px; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.seal-plain, .seal-cipher {
  border-radius: 10px; padding: 8px 9px; font-size: 11px; line-height: 1.35; min-height: 36px;
  display: flex; align-items: center; overflow-wrap: anywhere;
}
.seal-plain {
  background: var(--mock-me-bg); border: 1px solid var(--mock-me-border); color: var(--mock-me-color);
  border-radius: 16px; border-bottom-right-radius: 6px; padding: 7px 11px; font-size: 11.5px;
}
.seal-cipher { background: var(--surface2); border: 1px solid rgba(var(--teal-rgb),.32); color: var(--teal); font-family: var(--mono); font-size: 10px; }
.seal-arrow { font-family: var(--mono); font-size: 9px; color: var(--accent); white-space: nowrap; }

.mock-call { justify-content: center; }
.video-grid { width: 100%; flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; }
.video {
  position: relative; border: 1px solid var(--line2); border-radius: 9px; min-height: 42px; overflow: hidden;
  background: linear-gradient(135deg, var(--sheen), rgba(255, 255, 255, 0)), var(--surface);
}
.video-face {
  position: absolute; z-index: 1; right: 7px; bottom: 6px; width: 26px; height: 26px;
  border-radius: 50%; object-fit: cover; border: 1px solid var(--line2);
  background: var(--surface2); box-shadow: 0 1px 5px rgb(0 0 0 / .18);
}
.video span {
  position: absolute; z-index: 1; left: 7px; bottom: 5px; font-family: var(--mono); font-size: 9.5px; color: var(--text);
  background: rgba(var(--bg-rgb), .68); border-radius: 5px; padding: 1px 5px;
}
.video.live { border-color: rgba(var(--teal-rgb),.55); }
.video.live::after { content: ""; position: absolute; z-index: 2; right: 7px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.video.dimmed { opacity: .62; border-style: dashed; }
.call-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px 9px; font-family: var(--mono); font-size: 9px; color: var(--faint); }

.mock-files { justify-content: center; }
.files-section { width: 100%; display: flex; flex-direction: column; gap: 5px; }
.files-section + .files-section { margin-top: 2px; padding-top: 7px; border-top: 1px solid var(--line); }
.files-label { font-family: var(--mono); font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.file-card {
  width: 100%; display: flex; align-items: center; gap: 9px; padding: 7px 9px;
  border: 1px solid var(--line2); border-radius: 10px; background: var(--surface);
}
.file-ext {
  width: 28px; height: 34px; border-radius: 5px; display: flex; align-items: center; justify-content: center;
  background: var(--accent-dim); border: 1px solid rgba(var(--accent-rgb),.35); color: var(--accent);
  font-family: var(--mono); font-size: 8px; flex: 0 0 auto;
}
.file-meta { min-width: 0; flex: 1; }
.file-meta b { display: block; font-size: 11px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta > span { display: block; font-family: var(--mono); font-size: 9px; color: var(--faint); margin-top: 2px; }
.chunks { width: 100%; display: flex; gap: 4px; }
.chunks i { flex: 1; height: 10px; border-radius: 4px; background: var(--teal-dim); border: 1px solid rgba(var(--teal-rgb),.3); }
.chunks i.hot { background: var(--accent-dim); border-color: rgba(var(--accent-rgb),.48); }
.chunks i.rest { flex: .55; background: transparent; border-style: dashed; border-color: var(--line2); }
.range-note { font-family: var(--mono); font-size: 9px; color: var(--teal); }
.voice-row { width: 100%; display: flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
.wave { display: flex; align-items: center; gap: 2px; height: 24px; }
.wave i { width: 3px; border-radius: 2px; background: var(--violet); opacity: .8; }
.wave i:nth-child(1) { height: 8px; } .wave i:nth-child(2) { height: 15px; } .wave i:nth-child(3) { height: 21px; }
.wave i:nth-child(4) { height: 12px; } .wave i:nth-child(5) { height: 18px; } .wave i:nth-child(6) { height: 9px; }
.wave i:nth-child(7) { height: 14px; }

.mock-map { justify-content: center; }
.locmap {
  position: relative; width: 100%; flex: 1; min-height: 94px; overflow: hidden;
  border: 1px solid var(--line2); border-radius: 10px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--bg2);
  background-size: 28px 28px, 28px 28px, auto;
}
.locmap.live-shot { background: var(--surface2); }
.locmap.live-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.locmap.live-shot .osm {
  position: absolute; right: 6px; bottom: 5px; z-index: 1;
  font-family: var(--mono); font-size: 8px; color: var(--muted);
  background: rgba(var(--bg-rgb), .72); border-radius: 4px; padding: 1px 4px;
}
.road { position: absolute; background: var(--road); border-radius: 999px; }
.road.r1 { width: 125%; height: 5px; left: -12%; top: 48%; transform: rotate(-12deg); }
.road.r2 { width: 5px; height: 130%; left: 63%; top: -15%; transform: rotate(14deg); }
.road.r3 { width: 82%; height: 3px; left: 18%; top: 24%; transform: rotate(18deg); opacity: .7; }
.locpath { position: absolute; width: 48%; height: 2px; left: 18%; top: 57%; transform: rotate(-13deg); background: var(--teal); opacity: .8; border-radius: 2px; }
.locpin { position: absolute; right: 25%; top: 35%; width: 13px; height: 13px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 5px rgba(var(--teal-rgb),.16), 0 0 14px rgba(var(--teal-rgb),.8); }
.loc-time {
  position: absolute; font-family: var(--mono); font-size: 8.5px; color: var(--faint);
  background: var(--loc-time-bg); border: 1px solid var(--line2); border-radius: 999px; padding: 1px 5px;
}
.loc-time.t1 { left: 10%; bottom: 12%; } .loc-time.t2 { right: 12%; top: 12%; }

@media (max-width: 600px) {
  body.messenger-case .hero-sub, body.messenger-case .lede, body.messenger-case .feat .body p,
  body.messenger-case .evo-step p, body.messenger-case .data-note, body.messenger-case .jstep p,
  body.messenger-case .e2e-note p, body.messenger-case .callout span:nth-child(2),
  body.messenger-case .svc li, body.messenger-case .trust li, body.messenger-case .hero-note {
    text-align: left;
  }
  body.messenger-case .seal-row { grid-template-columns: 1fr; gap: 5px; }
  body.messenger-case .seal-arrow { justify-self: center; }
}
body.messenger-case .feat .body p { text-align: left; }
/* footer link pills + icons */
footer .links{flex-wrap:wrap;gap:10px}
footer .links a{display:inline-flex;align-items:center;gap:7px;padding:6px 12px;border:1px solid var(--line);border-radius:999px;text-decoration:none}
footer .links a:hover{border-color:var(--accent)}
footer .links a svg{width:13px;height:13px;flex:none}
footer .links a img{width:14px;height:14px;border-radius:3px;flex:none}

/* compact legends for the messenger architecture/data visuals */
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-family: var(--mono); font-size: 10.5px; color: var(--faint); line-height: 1.4; }
.legend > span { display: inline-flex; align-items: center; gap: 7px; }
.legend .lg { display: inline-block; width: 22px; height: 0; border-top: 2px solid var(--line2); flex: 0 0 auto; }
.legend .lg.live { border-top-color: var(--accent); border-top-style: dashed; }
.legend .lg.flow { border-top-color: var(--teal); border-top-style: dashed; }
.legend .lg.box, .legend .lg.hotbox, .legend .lg.sealedbox, .legend .lg.neutralbox { width: 10px; height: 10px; border: 1px solid var(--line2); border-radius: 3px; }
.legend .lg.hotbox { border-color: rgba(var(--accent-rgb),.5); background: rgba(var(--accent-rgb),.12); }
.legend .lg.sealedbox { border-color: rgba(var(--teal-rgb),.5); background: rgba(var(--teal-rgb),.12); }
.legend .lg.neutralbox { background: var(--chip-bg); }
.trust-external { max-width: 900px; }

html[data-theme="light"] .feat,
html[data-theme="light"] .svc,
html[data-theme="light"] .data-box,
html[data-theme="light"] .trust,
html[data-theme="light"] .e2e-step,
html[data-theme="light"] .envelope,
html[data-theme="light"] .war {
  box-shadow: 0 12px 30px rgba(23, 32, 44, .045);
}

/* ---------- compact messenger case-study layout ---------- */
.summary-grid { align-items: stretch; }
.summary-grid .svc { min-height: 100%; }
.topo-full {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: #080b10; box-shadow: 0 18px 55px rgba(0,0,0,.16);
}
.topo-scroll { overflow-x: auto; scrollbar-color: var(--line2) transparent; }
.topo-scroll img { display: block; width: 100%; min-width: 980px; max-width: none; height: auto; }
.tech-details {
  margin-top: 24px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); overflow: hidden;
}
.tech-details summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px 18px; font-family: var(--mono); font-size: 12.5px; color: var(--accent);
  transition: background .2s, color .2s;
}
.tech-details summary::-webkit-details-marker { display: none; }
.tech-details summary:hover { background: var(--accent-dim); color: var(--text); }
.tech-details .details-plus {
  width: 24px; height: 24px; border: 1px solid var(--line2); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--faint); transition: transform .2s, border-color .2s;
}
.tech-details[open] .details-plus { transform: rotate(45deg); border-color: var(--accent); color: var(--accent); }
.tech-details-body { padding: 20px 18px 22px; border-top: 1px solid var(--line); }
.tech-details-body .tech-intro { max-width: 820px; margin-bottom: 22px; }
html[data-theme="light"] .topo-full { box-shadow: 0 14px 35px rgba(23, 32, 44, .08); }
@media (max-width: 640px) {
  .topo-scroll img { min-width: 900px; }
  .tech-details summary { align-items: flex-start; }
}
/* compact hero for the shortened messenger case study */
body.messenger-case .hero { min-height: auto; padding: 108px 0 54px; }
body.messenger-case .hero-sub { margin-bottom: 24px; }
body.messenger-case .hero-tags { margin-bottom: 28px; }
body.messenger-case .hero-note { margin-top: 24px; text-align: left; }
body.messenger-case .scroll-hint { display: none; }
.topo-embed { overflow-x: auto; scrollbar-color: var(--line2) transparent; padding-bottom: 4px; }
.topo-embed svg { min-width: 760px; }
.topo-link { display: block; }
.topo-link img { cursor: zoom-in; }
.tech-details .details-open { display: none; }
.tech-details[open] .details-open { display: inline; }
.tech-details[open] .details-closed { display: none; }
.diagram-title { font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 0; }
.diagram-title-gap { margin-top: 42px; }
