/* ─────────────────────────────────────────────────────────────
   Components — hero, feature blocks, cards, principles, services
───────────────────────────────────────────────────────────── */

/* ─────────  HERO  ───────── */
.hero {
  padding: 160px 0 100px;
  text-align: center;
  position: relative;
}
@media (max-width: 720px) { .hero { padding: 120px 0 60px; } }

.hero .eyebrow {
  margin: 0 auto 28px;
}
.hero h1.display {
  max-width: min(14ch, 100%);
  margin: 0 auto 22px;
}
.hero .lede {
  margin: 0 auto;
  max-width: 560px;
  text-align: center;
}
.hero .ctas {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hero .product-frame {
  margin: 80px auto 0;
  max-width: 1080px;
  position: relative;
}
@media (max-width: 720px) { .hero .product-frame { margin-top: 56px; } }


/* Hero terminal — animated deploy showcase */
.hero-terminal-wrap {
  margin: 56px auto 0;
  max-width: 780px;
  perspective: 900px;
  position: relative;
}
.hero-terminal-wrap::before {
  content: '';
  position: absolute;
  inset: -30% -15%;
  background: radial-gradient(ellipse 60% 50% at 50% 50%,
    rgba(224,122,65,0.18), transparent 70%);
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
  transition: opacity 0.4s;
}
.hero-terminal {
  background: #1a1816;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 40px 100px -30px rgba(0,0,0,0.6),
    0 0 80px -20px rgba(224,122,65,0.12),
    0 1px 0 rgba(255,255,255,0.04) inset;
  text-align: left;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  will-change: transform;
  position: relative;
}
.hero-terminal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.008) 2px,
    rgba(255,255,255,0.008) 4px
  );
  pointer-events: none;
  z-index: 10;
  border-radius: inherit;
}
[data-theme="light"] .hero-terminal {
  background: #1a1816;
  border-color: rgba(0,0,0,0.15);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,0.35), 0 0 0 1px rgba(0,0,0,0.08);
}
[data-theme="light"] .hero-terminal-wrap::before {
  opacity: 0.4;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.term-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
}
.term-dot.r { background: #ff5f57; }
.term-dot.y { background: #febc2e; }
.term-dot.g { background: #28c840; }
.term-title {
  color: #8a8f98;
  font-size: 0.72rem;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0.02em;
}
.term-body {
  padding: 1.6rem 1.8rem;
  font-size: 0.85rem;
  line-height: 2.1;
  min-height: 260px;
}
@media (max-width: 600px) {
  .term-body {
    padding: 1.2rem 1rem;
    font-size: 0.75rem;
    line-height: 2;
  }
}

.term-line {
  opacity: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 900px) {
  .term-body { font-size: 0.78rem; }
  .term-line {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}
@media (max-width: 600px) {
  .term-line { white-space: normal; }
  .term-body { min-height: 0; }
  .t-link { font-size: 0.95em; padding: 4px 2px; }
}
.term-line.t-visible { opacity: 1; }
.term-line.t-typing { opacity: 1; }
/* Без JS набор текста не запускается — показываем строки терминала статикой. */
html:not(.js) .term-line { opacity: 1; }

.t-prompt {
  color: #4ade80;
  margin-right: 0.6em;
  font-weight: 600;
}
.t-cmd { color: #e5e5e5; }
.t-flag {
  color: #60a5fa;
  margin-left: 0.4em;
}
.t-val {
  color: var(--accent);
  margin-left: 0.4em;
}
.t-output {
  padding-left: 1.6em;
  color: #8a8f98;
}
.t-ok {
  color: #4ade80;
  margin-right: 0.3em;
}
.t-metric {
  color: var(--accent);
  font-weight: 600;
}
.t-link {
  color: #8a8f98;
  text-decoration: none;
  margin-left: 0.8em;
  font-size: 0.85em;
  border-bottom: 1px dashed #555;
  transition: color 0.2s, border-color 0.2s;
}
.t-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.t-cursor {
  display: inline-block;
  width: 9px;
  height: 1.2em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 4px;
  animation: t-blink 1s step-end infinite;
  box-shadow: 0 0 8px rgba(224,122,65,0.5);
}
@keyframes t-blink { 50% { opacity: 0; } }

.t-typed-cursor {
  display: inline-block;
  width: 9px;
  height: 1.2em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: t-blink 0.6s step-end infinite;
  box-shadow: 0 0 8px rgba(224,122,65,0.5);
}

.hero .product-frame::before {
  content: '';
  position: absolute;
  inset: -10% -5% 50% -5%;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(224,122,65,0.35), transparent 60%);
  filter: blur(40px);
  z-index: -1;
}

/* ─────────  Credit Assistant — pipeline diagram (engineering visual)  ───────── */
.pipeline {
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow:
    0 30px 80px -20px rgba(0,0,0,0.5),
    0 1px 0 rgba(255,255,255,0.04) inset;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.pipeline .pipe-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.pipeline .pipe-head .title-row {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pipeline .pipe-head .title-row::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(76,183,130,0.16);
}
.pipeline .pipe-head .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pipe-stage {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  position: relative;
}
.pipe-stage .ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-text);
}
.pipe-stage .ico svg { width: 16px; height: 16px; }
.pipe-stage .ico.score {
  background: linear-gradient(135deg, #4cb782, #2f8559);
  border-color: rgba(76,183,130,0.4);
  color: #fff;
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 14px -2px rgba(76,183,130,0.4);
}
.pipe-stage .meta {
  min-width: 0;
}
.pipe-stage .meta .name {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 3px;
}
.pipe-stage .meta .sub {
  font-size: 12px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.pipe-stage .stamp {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  text-align: right;
  white-space: nowrap;
}
.pipe-stage .stamp .step {
  display: block;
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}
.pipe-stage .stamp .t {
  color: var(--accent-text);
}

.pipe-link {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px;
  align-items: center;
  height: 18px;
  padding: 0;
}
.pipe-link .vline {
  width: 36px;
  display: flex;
  justify-content: center;
}
.pipe-link .vline::before {
  content: '';
  width: 1px;
  height: 18px;
  background: linear-gradient(180deg, var(--line-emph), var(--line-strong));
}

.pipeline .pipe-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pipeline .pipe-footer .cell .v {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent-text);
  display: block;
  line-height: 1;
}
.pipeline .pipe-footer .cell .v em {
  color: inherit;
  font-style: normal;
}
.pipeline .pipe-footer .cell:nth-child(2) .v { color: var(--accent-green-text); }
.pipeline .pipe-footer .cell:last-child .v { color: var(--accent-green-text); }
.pipeline .pipe-footer .cell .l {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 6px;
}
@media (max-width: 600px) {
  .pipeline { padding: 18px; }
  .pipe-footer { gap: 12px; }
  .pipe-stage { gap: 10px; }
  .pipe-stage .stamp .step { display: none; }
  .pipe-stage .ico { width: 30px; height: 30px; }
}

/* ─────────  PIPELINE RUN — one-shot reveal on scroll  ───────── */
/* Armed only when JS adds .anim (and motion is allowed). Without JS or with
   prefers-reduced-motion the pipeline shows in full immediately. Hidden via
   opacity/transform only — no layout shift. */
.pipeline.anim .pipe-stage { opacity: 0; transform: translateY(8px); }
.pipeline.anim .pipe-footer { opacity: 0; }
.pipeline.anim .pipe-link .vline { transform: scaleY(0); transform-origin: top; }

.pipeline.anim.run .pipe-stage {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.pipeline.anim.run .pipe-footer {
  opacity: 1;
  transition: opacity 0.5s ease;
}
.pipeline.anim.run .pipe-link .vline {
  transform: scaleY(1);
  transition: transform 0.35s ease;
}
.pipeline.anim.run .ico.score { animation: scoreFlare 0.7s ease; }
@keyframes scoreFlare {
  0%   { box-shadow: 0 0 0 0 rgba(76, 183, 130, 0); }
  45%  { box-shadow: 0 0 0 7px rgba(76, 183, 130, 0.28); }
  100% { box-shadow: 0 0 0 0 rgba(76, 183, 130, 0); }
}

/* ─────────  FEATURED WORK BLOCK  ───────── */
.feature-block {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 64px;
  align-items: center;
  padding: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  border: 1px solid var(--line);
  border-radius: 24px;
}
[data-theme="light"] .feature-block {
  background: linear-gradient(180deg, rgba(0,0,0,0.01), rgba(0,0,0,0));
}
@media (max-width: 960px) {
  .feature-block { grid-template-columns: 1fr; gap: 36px; padding: 24px; }
}
.feature-block .copy h3 {
  font-size: clamp(22px, 3.4vw, 36px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 14px 0 14px;
  text-wrap: balance;
}
.feature-block .copy p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.55;
  margin-bottom: 14px;
  max-width: 44ch;
}
.feature-block .copy .meta-row {
  margin-top: 22px;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.feature-block .copy .meta-row .stat .v {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: block;
}
.feature-block .copy .meta-row .stat .v {
  color: var(--accent-text);
}
.feature-block .copy .meta-row .stat .v em {
  color: inherit;
  font-style: normal;
}
.feature-block .copy .meta-row .stat .l {
  font-size: 11.5px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  margin-top: 2px;
}
.feature-block .copy .cta-row {
  margin-top: 28px;
  display: flex;
  gap: 10px;
}
/* Проверяемые пруфы рядом с «8.5/10»: открытый код + тесты репозитория (B1). */
.feature-block .copy .feature-proof {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.feature-block .copy .feature-proof .fp-sep { color: var(--line-emph); }
.feature-block .visual {
  position: relative;
}

/* ─────────  WORKSTATION — CLI project browser  ───────── */
.workstation {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,0.6);
}

/* Фолбэк без JS: дерево и детали генерятся скриптом, поэтому при отключённом JS
   показываем простой список ссылок на кейсы. */
.ws-noscript { padding: 24px; }
.ws-noscript p { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 12px; }
.ws-noscript ul { list-style: none; display: grid; gap: 10px; }
.ws-noscript a { color: var(--accent-text); }

/* Title bar */
.ws-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  user-select: none;
}
.ws-dots {
  display: flex;
  gap: 6px;
}
.ws-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.ws-dots span:nth-child(1) { background: #ff5f57; }
.ws-dots span:nth-child(2) { background: #febc2e; }
.ws-dots span:nth-child(3) { background: #28c840; }
.ws-title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* Split pane */
.ws-split {
  display: flex;
  flex: 1;
  min-height: 520px;
}

/* Left panel: file tree */
.ws-tree {
  width: 280px;
  min-width: 280px;
  border-right: 1px solid var(--line);
  background: var(--bg);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.ws-tree-header {
  padding: 0 16px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}
.ws-tree-header::before {
  content: '/ ';
  color: var(--accent-text);
}
.ws-tree-root {
  padding: 0 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.ws-tree-list {
  list-style: none;
  padding: 0 0 0 16px;
  margin: 0;
}
.ws-tree-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
  padding: 6px 16px 6px 0;
  border-radius: 0;
  transition: background 0.15s;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}
.ws-tree-item:hover {
  background: var(--accent-soft);
  color: var(--text);
}
.ws-tree-item.active {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.ws-branch {
  color: var(--text-faint);
  width: 28px;
  flex-shrink: 0;
  text-align: right;
  padding-right: 8px;
  font-size: 13px;
  user-select: none;
}
.ws-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 8px;
}
.ws-dot.live { background: var(--green, #4ade80); box-shadow: 0 0 6px rgba(74,222,128,0.4); }
.ws-dot.ref  { background: var(--text-dim); }
.ws-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right panel: project detail */
.ws-detail {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg-elev);
}
.ws-view {
  position: absolute;
  inset: 0;
  padding: 28px 32px 24px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  overflow-y: auto;
}
.ws-view.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.ws-view .ws-proj-name,
.ws-view .ws-proj-desc,
.ws-view .ws-proj-result,
.ws-view .ws-stack,
.ws-view .ws-case-link {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.ws-view.active .ws-proj-name   { opacity: 1; transform: translateY(0); transition-delay: 0s; }
.ws-view.active .ws-proj-desc   { opacity: 1; transform: translateY(0); transition-delay: 0.06s; }
.ws-view.active .ws-proj-result { opacity: 1; transform: translateY(0); transition-delay: 0.12s; }
.ws-view.active .ws-stack       { opacity: 1; transform: translateY(0); transition-delay: 0.25s; }
.ws-view.active .ws-case-link   { opacity: 1; transform: translateY(0); transition-delay: 0.3s; }

/* Project header */
.ws-proj-header {
  margin-bottom: 16px;
}
.ws-proj-name {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 8px;
}
.ws-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 500;
}
.ws-badge.live {
  background: rgba(74,222,128,0.12);
  color: var(--accent-green-text);
}
.ws-badge.ref {
  background: rgba(136,136,136,0.12);
  color: var(--text-muted);
}
.ws-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.ws-badge.live .ws-badge-dot { background: var(--green, #4ade80); }
.ws-badge.ref .ws-badge-dot  { background: var(--text-muted); }
.ws-proj-domain {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 8px;
  letter-spacing: 0.04em;
}

/* Description */
.ws-proj-desc {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 8px;
  max-width: 560px;
}
.ws-proj-result {
  font-size: 12px;
  line-height: 1.5;
  color: var(--accent-text);
  margin-bottom: 16px;
  max-width: 560px;
  opacity: 0.8;
}
.ws-proj-result::before {
  content: '→ ';
  opacity: 0.6;
}

/* Metrics grid */
.ws-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.ws-metric {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  transition: border-color 0.2s, transform 0.3s, opacity 0.3s;
}
.ws-view .ws-metric {
  opacity: 0;
  transform: translateY(6px);
}
.ws-view.active .ws-metric {
  opacity: 1;
  transform: translateY(0);
}
.ws-view.active .ws-metric:nth-child(1) { transition-delay: 0.05s; }
.ws-view.active .ws-metric:nth-child(2) { transition-delay: 0.1s; }
.ws-view.active .ws-metric:nth-child(3) { transition-delay: 0.15s; }
.ws-view.active .ws-metric:nth-child(4) { transition-delay: 0.2s; }
.ws-metric:hover {
  border-color: var(--accent-line);
}
.ws-metric-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-text);
  line-height: 1.2;
  margin-bottom: 2px;
}
.ws-metric-label {
  font-size: 9px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Stack pills */
.ws-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.ws-pill {
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Read case link */
.ws-case-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-text);
  text-decoration: none;
  padding: 10px 20px;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  transition: background 0.2s, border-color 0.2s;
  margin-top: 8px;
}
.ws-case-link:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.ws-case-link .arrow {
  transition: transform 0.2s;
}
.ws-case-link:hover .arrow {
  transform: translateX(3px);
}

/* Project meta row (badge + year) */
.ws-proj-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.ws-proj-year {
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

/* Status bar */
.ws-statusbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  font-size: 11px;
  color: var(--text-dim);
  min-height: 28px;
}
.ws-sb-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ws-sb-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.ws-sb-right {
  margin-left: auto;
  color: var(--text-faint);
}

/* Scrollbar styling */
.ws-tree::-webkit-scrollbar,
.ws-view::-webkit-scrollbar {
  width: 4px;
}
.ws-tree::-webkit-scrollbar-track,
.ws-view::-webkit-scrollbar-track {
  background: transparent;
}
.ws-tree::-webkit-scrollbar-thumb,
.ws-view::-webkit-scrollbar-thumb {
  background: var(--text-faint);
  border-radius: 4px;
}

/* Responsive */
@media (max-width: 720px) {
  .ws-split {
    flex-direction: column;
    min-height: auto;
  }
  .ws-tree {
    width: 100%;
    min-width: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
    max-height: 200px;
    overflow-y: auto;
  }
  .ws-view {
    position: relative;
    padding: 24px 20px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .ws-view:not(.active) {
    display: none;
  }
  .ws-detail {
    min-height: 420px;
  }
  .ws-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─────────  PRINCIPLES (3-col)  ───────── */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 860px) { .principles-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .principles-grid { grid-template-columns: 1fr; } }

.principle-cell {
  padding: 28px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.principle-cell .icon {
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-text);
  margin-bottom: 8px;
}
.principle-cell .icon svg { width: 14px; height: 14px; }
.principle-cell h3 {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.principle-cell p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  text-wrap: pretty;
}

/* ─── Interactive principle cells (luxury hover + click expand) ─── */
.principle-cell {
  cursor: pointer;
  transition: transform .3s cubic-bezier(0.2,0.8,0.2,1), background .3s;
  position: relative;
  overflow: hidden;
  --mx: 50%;
  --my: 50%;
  user-select: none;
  display: flex;
  flex-direction: column;
}
.principle-cell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 320px at var(--mx) var(--my), rgba(224,122,65,0.18), transparent 50%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
  z-index: 0;
}
.principle-cell::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent-pink) 70%, transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .4s cubic-bezier(0.2,0.8,0.2,1);
}
.principle-cell:hover {
  transform: translateY(-3px);
  background: var(--bg-elev-2);
}
.principle-cell:hover::before { opacity: 1; }
.principle-cell:hover::after { transform: scaleX(1); }
.principle-cell:hover .icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-pink));
  border-color: transparent;
  color: #fff;
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 10px 24px -6px rgba(224,122,65,0.6);
}
.principle-cell .icon { transition: all .3s cubic-bezier(0.2,0.8,0.2,1); }
.principle-cell h3, .principle-cell p, .principle-cell .pc-demo, .principle-cell .pc-cta { position: relative; z-index: 1; }

.principle-cell .pc-demo {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition: max-height .5s cubic-bezier(0.2,0.8,0.2,1), opacity .4s, margin-top .4s;
}
.principle-cell .pc-demo-inner {
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
  text-wrap: pretty;
}
.principle-cell .pc-demo-inner strong { color: var(--text); font-weight: 500; }
.principle-cell.open .pc-demo {
  max-height: 280px;
  opacity: 1;
  margin-top: 14px;
}
.principle-cell .pc-cta {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--text-dim);
  transition: color .2s;
}
.principle-cell:hover .pc-cta { color: var(--accent-text); }
.principle-cell .pc-cta .arr {
  display: inline-block;
  transition: transform .3s cubic-bezier(0.2,0.8,0.2,1);
}
.principle-cell.open .pc-cta { color: var(--accent-text); }
.principle-cell.open .pc-cta .arr { transform: rotate(90deg); }

/* ─── Process timeline (zigzag vertical with big serif numbers) ─── */
.process-timeline {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 0 24px;
}
.process-timeline::before {
  content: '';
  position: absolute;
  top: 80px;
  bottom: 80px;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, var(--line-emph) 6%, var(--line-emph) 94%, transparent 100%);
  z-index: 0;
}
/* Линия-прогресс: заливается акцентом по мере прокрутки секции (JS задаёт --pt-progress 0→1) */
.process-timeline .pt-progress {
  content: '';
  position: absolute;
  top: 80px;
  bottom: 80px;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, var(--accent) 6%, var(--accent) 94%, transparent 100%);
  transform: scaleY(var(--pt-progress, 0));
  transform-origin: top center;
  z-index: 1;
  pointer-events: none;
  will-change: transform;
}
.process-timeline .pt-line { display: none; }
.process-timeline .pt-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.process-timeline .pt-step {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  align-items: center;
  gap: 36px;
  padding: 36px 0;
  cursor: default;
  transition: opacity .55s cubic-bezier(0.4,0,0.2,1), transform .7s cubic-bezier(0.2,0.8,0.2,1);
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  will-change: opacity, transform;
}
.process-timeline .pt-step.in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Big mono number */
.process-timeline .pt-num-big {
  font-family: 'JetBrains Mono', monospace;
  font-style: normal;
  font-weight: 600;
  font-size: clamp(56px, 6vw, 80px);
  line-height: 0.9;
  color: var(--text-faint);
  letter-spacing: -0.01em;
  grid-column: 1;
  justify-self: end;
  text-align: right;
  transition: color .35s ease;
  user-select: none;
}
.process-timeline .pt-step.active .pt-num-big {
  color: var(--text);
}
.process-timeline .pt-step:hover .pt-num-big {
  color: var(--text-muted);
}

/* Dot on center */
.process-timeline .pt-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--text-faint);
  position: relative;
  z-index: 2;
  grid-column: 2;
  justify-self: center;
  transition: all .35s cubic-bezier(0.2,0.8,0.2,1);
  margin: 0;
}
.process-timeline .pt-step:hover .pt-dot,
.process-timeline .pt-step.active .pt-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow:
    0 0 0 5px rgba(224,122,65,0.18),
    0 0 18px var(--accent);
}

/* Content card — right side by default */
.process-timeline .pt-content {
  grid-column: 3;
  justify-self: start;
  text-align: left;
  max-width: 420px;
  padding-bottom: 0;
}
.process-timeline .pt-time,
.process-timeline .pt-num {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.process-timeline .pt-content h3 {
  font-family: 'JetBrains Mono', monospace;
  font-style: normal;
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.005em;
  line-height: 1.1;
  margin-bottom: 12px;
  color: var(--text);
}
.process-timeline .pt-content p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
  text-wrap: pretty;
}
.process-timeline .pt-status,
.process-timeline .pt-when {
  display: inline-block;
  padding: 5px 11px;
  border: 1px solid var(--line-emph);
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  background: transparent;
}
.process-timeline .pt-status.done {
  color: var(--accent-green-text);
  border-color: rgba(76,183,130,0.4);
  background: rgba(76,183,130,0.05);
}
.process-timeline .pt-status.now {
  color: var(--accent-text);
  border-color: rgba(224,144,96,0.45);
  background: rgba(224,144,96,0.06);
}
.process-timeline .pt-status.future {
  color: var(--text-faint);
}
.process-timeline .pt-when::before { display: none; }

/* Zigzag — even rows mirrored */
.process-timeline .pt-step:nth-child(even) .pt-num-big {
  grid-column: 3;
  justify-self: start;
  text-align: left;
}
.process-timeline .pt-step:nth-child(even) .pt-content {
  grid-column: 1;
  justify-self: end;
  text-align: right;
}

/* Mobile — collapse to single column */
@media (max-width: 760px) {
  .process-timeline::before {
    left: 20px;
  }
  .process-timeline .pt-step,
  .process-timeline .pt-step:nth-child(even) {
    grid-template-columns: 40px 1fr;
    gap: 18px;
    padding: 22px 0;
  }
  .process-timeline .pt-step .pt-num-big,
  .process-timeline .pt-step:nth-child(even) .pt-num-big {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
    text-align: left;
    font-size: 56px;
    margin-bottom: -10px;
  }
  .process-timeline .pt-step .pt-dot,
  .process-timeline .pt-step:nth-child(even) .pt-dot {
    grid-column: 1;
    grid-row: 1 / span 2;
    justify-self: center;
    align-self: start;
    margin-top: 24px;
  }
  .process-timeline .pt-step .pt-content,
  .process-timeline .pt-step:nth-child(even) .pt-content {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    text-align: left;
    max-width: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .process-timeline .pt-step { opacity: 1; transform: none; }
}


/* ─────────  CTA section  ───────── */
.cta {
  padding: 140px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(224,122,65,0.06), transparent 60%);
  pointer-events: none;
}
.cta h2 {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: clamp(28px, 5.5vw, 64px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: min(16ch, 100%);
  margin: 0 auto 22px;
}
.cta p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 32px;
  text-wrap: pretty;
}
.cta .ctas {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.cta .signature {
  margin-top: 56px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─────────  Footer  ───────── */
.site-footer {
  padding: 56px 0 36px;
  border-top: 1px solid var(--line);
  margin-top: 0;
}
.site-footer .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: var(--text-dim);
}
.site-footer .row .brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.site-footer .row .brand .logo-mark {
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.site-footer .links {
  display: inline-flex;
  gap: 18px;
}
.site-footer .links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s;
}
.site-footer .links a:hover { color: var(--text); }
.site-footer .colophon {
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-dim);
}

/* ─────────  Page head (for sub pages)  ───────── */
.page-head {
  padding: 140px 0 60px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 720px) { .page-head { padding: 110px 0 40px; } }
.page-head .breadcrumb {
  display: inline-flex;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 22px;
}
.page-head .breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.page-head .breadcrumb a:hover { color: var(--text); }
.page-head .breadcrumb .sep { color: var(--line-emph); }
.page-head h1 {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: clamp(26px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
  max-width: min(20ch, 100%);
  margin-bottom: 20px;
}
.page-head .lede {
  max-width: 580px;
}

/* ─────────  Pricing tier cards  ───────── */
.tier-section { padding-top: 160px; }
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 960px) { .tier-grid { grid-template-columns: 1fr; } }

.tier {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent-green);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.tier:nth-child(2) { border-top-color: var(--accent); }
.tier:nth-child(3) { border-top-color: #e09060; }
.tier::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(224,122,65,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224,122,65,0.02) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: 0;
}
.tier::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 28px;
  right: 28px;
  height: 2px;
  border-radius: 1px 1px 0 0;
  background: var(--accent-green);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.2,0.8,0.2,1);
  box-shadow: 0 0 12px rgba(76,183,130,0.4);
  z-index: 1;
}
.tier:nth-child(2)::after {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(224,122,65,0.4);
}
.tier:nth-child(3)::after {
  background: #e09060;
  box-shadow: 0 0 12px rgba(224,144,96,0.4);
}
.tier:hover {
  border-color: var(--line-emph);
  transform: translateY(-3px);
  box-shadow: 0 24px 64px -16px rgba(0,0,0,0.45);
}
.tier:hover::before { opacity: 1; }
.tier:hover::after { transform: scaleX(1); }
.tier:hover .tier-name { color: var(--accent-text); }
.tier.featured {
  border-color: var(--accent-line);
  border-top-color: var(--accent);
  background: var(--bg-elev);
  transform: scale(1.02);
  z-index: 2;
  box-shadow: 0 20px 60px -20px rgba(224,122,65,0.15);
}
.tier.featured:hover {
  transform: scale(1.02) translateY(-3px);
  box-shadow: 0 30px 80px -20px rgba(224,122,65,0.25);
}
@media (max-width: 960px) {
  .tier.featured { transform: none; }
  .tier.featured:hover { transform: translateY(-3px); }
}
.tier.featured::before {
  all: unset;
  content: 'Recommended';
  position: absolute;
  top: 14px;
  right: 20px;
  font-size: 10.5px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-text);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  z-index: 1;
  pointer-events: none;
}
.tier .tier-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.tier h3 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 12px;
}
.tier .one-liner {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 22px;
  min-height: 4.5em;
}
.tier .price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}
.tier .price {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}
.tier .price-suffix {
  font-size: 14px;
  color: var(--text-dim);
}
.tier .price-meta {
  font-size: 12px;
  color: var(--text-faint);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 22px;
}
.tier .btn { width: 100%; justify-content: center; }
.tier .features-head {
  margin: 24px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.tier ul {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}
.tier ul li {
  padding: 7px 0;
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.tier ul li svg {
  width: 14px; height: 14px;
  flex-shrink: 0;
  margin-top: 4px;
  color: var(--accent-text);
}
.tier ul li.no { color: var(--text-faint); }
.tier ul li.no svg { color: var(--text-faint); }
.tier .timeline-row {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-dim);
}
.tier .timeline-row .v { color: var(--text); }


/* ─────────  Workflow timeline  ───────── */
.workflow {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}
.workflow .step {
  display: grid;
  grid-template-columns: 80px 1fr 220px;
  gap: 32px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition: background 0.25s, padding-left 0.25s;
  border-radius: 8px;
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
}
.workflow .step:hover {
  background: var(--bg-elev);
  padding-left: 18px;
}
@media (max-width: 720px) {
  .workflow .step { grid-template-columns: 60px 1fr; }
  .workflow .step .duration { grid-column: 2; }
}
.workflow .step .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent-text);
  letter-spacing: 0.04em;
}
.workflow .step .content h3 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.step-ico {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  flex-shrink: 0;
  transition: all 0.25s;
}
.step-ico.active {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent-text);
}
.workflow .step:hover .step-ico {
  border-color: var(--accent-line);
  color: var(--accent-text);
}
.workflow .step .content p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 56ch;
}
.workflow .step .duration {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
  text-align: right;
}
@media (max-width: 720px) {
  .workflow .step .duration { text-align: left; }
}

/* One-shot run on scroll: steps fade up in sequence. Armed only when JS adds
   .anim (motion allowed); without JS or with reduced-motion the timeline shows
   in full. (No spine line — it collided with the body text, because the icon
   shares its column with the paragraph.) */
.workflow.anim .step { opacity: 0; transform: translateY(10px); }
.workflow.anim.run .step {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* ─────────  FAQ  ───────── */
.faq {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  counter-reset: faq;
}
@media (max-width: 760px) { .faq { grid-template-columns: 1fr; } }
.faq details {
  counter-increment: faq;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s, background 0.25s;
  position: relative;
  overflow: hidden;
}
.faq details::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.25s;
}
.faq details[open] {
  border-color: var(--line-emph);
  background: var(--bg-elev-2);
}
.faq details[open]::before {
  opacity: 1;
}
.faq details:hover {
  border-color: var(--line-strong);
}
.faq details summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text);
  transition: color 0.15s;
}
.faq details summary::-webkit-details-marker { display: none; }
.faq details summary::before {
  content: counter(faq, decimal-leading-zero);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent-text);
  letter-spacing: 0.04em;
  flex-shrink: 0;
  width: 24px;
}
.faq details summary::after {
  content: '+';
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 300;
  color: var(--text-dim);
  transition: transform 0.25s, color 0.15s;
  flex-shrink: 0;
  margin-left: auto;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
  color: var(--accent-text);
}
.faq details summary:hover { color: var(--accent-text); }
.faq details .a {
  padding: 0 24px 20px 24px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  text-wrap: pretty;
}
.faq details .a p { margin-bottom: 10px; }
.faq details .a code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
  padding: 1px 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
}

/* FAQ cards stagger up on scroll — same run feel as the timeline. Armed only
   when JS adds .anim (motion allowed); else cards show in full. */
.faq.anim details { opacity: 0; transform: translateY(10px); }
.faq.anim.run details {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.25s, background 0.25s;
}

/* ─────────  Inline link style  ───────── */
.inline-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line-emph);
  transition: color .15s, border-color .15s;
}
.inline-link:hover {
  color: var(--accent-text);
  border-bottom-color: currentColor;
}

/* ─────────  Case anatomy  ───────── */
.case-meta-row {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.case-meta-row .dot { color: var(--accent-green-text); }
.case-meta-row .sep { color: var(--line-emph); }

.case-spec {
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 0;
  font-size: 13px;
  position: sticky;
  top: 80px;
  overflow: hidden;
}
.case-spec .head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  justify-content: space-between;
  background: rgba(255,255,255,0.015);
}
.case-spec dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
}
.case-spec dt,
.case-spec dd {
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}
.case-spec dt { color: var(--text-dim); }
.case-spec dd {
  color: var(--text);
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  font-weight: 500;
}
.case-spec dt:hover,
.case-spec dt:hover + dd,
.case-spec dd:hover,
.case-spec dd:hover + dt {
  background: rgba(224,122,65,0.04);
}
.case-spec dd:hover {
  color: var(--accent-text);
}
.case-spec dt:last-of-type,
.case-spec dd:last-of-type {
  border-bottom: none;
}
.case-spec .note {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--text-faint);
  line-height: 1.5;
  background: rgba(255,255,255,0.01);
}

.case-hero-row {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 56px;
  align-items: start;
}
.case-hero-row > * { min-width: 0; }
@media (max-width: 960px) {
  .case-hero-row { grid-template-columns: 1fr; gap: 24px; }
}

.case-layout {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 56px;
  padding: 48px 0 32px;
  align-items: start;
  min-width: 0;
  overflow: hidden;
}
@media (max-width: 960px) {
  .case-layout { grid-template-columns: 1fr; gap: 32px; }
}

.case-toc {
  position: sticky;
  top: 90px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
@media (max-width: 960px) { .case-toc { position: static; } }
.case-toc .head {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.case-toc ol {
  list-style: none;
  counter-reset: tc;
  padding: 0; margin: 0;
}
.case-toc li { counter-increment: tc; }
.case-toc li a {
  color: var(--text-dim);
  text-decoration: none;
  display: flex;
  gap: 10px;
  padding: 6px 8px;
  margin: 0 -8px;
  line-height: 1.4;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.case-toc li a::before {
  content: counter(tc, decimal-leading-zero);
  color: var(--text-faint);
  width: 22px;
  flex-shrink: 0;
}
.case-toc li a:hover {
  color: var(--accent-text);
  background: var(--accent-soft);
}

.case-body {
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  overflow-wrap: break-word;
  min-width: 0;
}
.case-body h2 {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 40px 0 14px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  color: var(--text);
}
.case-body h2:first-child { border-top: none; padding-top: 0; }
.case-body h2 .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--accent-text);
  margin-right: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 400;
}
.case-body h3 {
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 32px 0 12px;
  color: var(--text);
}
.case-body p { margin-bottom: 14px; text-wrap: pretty; }
.case-body p strong { color: var(--text); font-weight: 500; }
.case-body ul, .case-body ol { margin: 0 0 18px 22px; }
.case-body li { margin-bottom: 6px; }
.case-body .code-card { margin: 22px 0; }
.case-body .pullquote {
  margin: 32px 0;
  padding: 24px 28px 24px 48px;
  background: linear-gradient(135deg, rgba(224,122,65,0.06), transparent 60%);
  border: 1px solid rgba(224,122,65,0.15);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
  font-style: italic;
  position: relative;
}
.case-body .pullquote::before {
  content: '"';
  position: absolute;
  left: 16px;
  top: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  color: var(--accent);
  opacity: 0.4;
  font-style: normal;
  line-height: 1;
}
.case-body .figure {
  margin: 36px 0;
  padding: 0;
  background: #1f1d1b;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 30px 80px -20px rgba(0,0,0,0.55),
    0 0 60px -15px rgba(224,122,65,0.08),
    0 1px 0 rgba(255,255,255,0.04) inset;
}
.case-body .figure::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.006) 2px,
    rgba(255,255,255,0.006) 4px
  );
  pointer-events: none;
  z-index: 2;
  border-radius: inherit;
}
[data-theme="light"] .case-body .figure {
  background: #f5f3f0;
  border-color: rgba(0,0,0,0.10);
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.12);
}
[data-theme="light"] .case-body .figure::after { display: none; }
.case-body .figure .fig-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
[data-theme="light"] .case-body .figure .fig-bar {
  background: #eceae6;
  border-bottom-color: rgba(0,0,0,0.06);
}
.case-body .figure .fig-title {
  color: #8a8f98;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}
/* Светлая тема: плашка фигуры светлеет (#eceae6) — подпись делаем тёмной (AA). */
[data-theme="light"] .case-body .figure .fig-title { color: #555555; }
.case-body .figure pre {
  margin: 0;
  padding: 28px;
  white-space: pre;
  overflow-x: auto;
  color: var(--text-faint);
  background-image:
    linear-gradient(rgba(224,122,65,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224,122,65,0.025) 1px, transparent 1px);
  background-size: 24px 24px;
}
[data-theme="light"] .case-body .figure pre {
  color: rgba(26,26,26,0.3);
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
}
.case-body .figure .caption {
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.015);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
  position: relative;
  z-index: 3;
}
[data-theme="light"] .case-body .figure .caption {
  border-top-color: rgba(0,0,0,0.06);
  background: rgba(0,0,0,0.02);
}
.case-body .figure .fl { color: var(--accent-text); font-weight: 600; }
.case-body .figure .ft { color: #a3c585; }
.case-body .figure .fc { color: #e5e5e5; font-weight: 500; }
.case-body .figure .fw { color: #d4a93a; }
.case-body .figure .fm { color: var(--text-dim); font-style: italic; }
[data-theme="light"] .case-body .figure .fc { color: #1a1a1a; }
[data-theme="light"] .case-body .figure pre { color: rgba(26,26,26,0.25); }
@media (max-width: 600px) {
  .case-body .figure { font-size: 10.5px; }
  .case-body .figure pre { padding: 18px 14px; }
}
/* ─── Case metrics — console dashboard ─── */
.case-body .metric-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 36px 0;
  background: #1f1d1b;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow:
    0 24px 64px -16px rgba(0,0,0,0.5),
    0 0 40px -10px rgba(224,122,65,0.06),
    0 1px 0 rgba(255,255,255,0.04) inset;
}
.case-body .metric-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(224,122,65,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224,122,65,0.02) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] .case-body .metric-row {
  background: #f5f3f0;
  border-color: rgba(0,0,0,0.10);
  box-shadow: 0 16px 48px -12px rgba(0,0,0,0.12);
}
[data-theme="light"] .case-body .metric-row::before {
  background:
    linear-gradient(rgba(0,0,0,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.025) 1px, transparent 1px);
}
@media (max-width: 720px) {
  .case-body .metric-row { grid-template-columns: 1fr 1fr; }
}
.case-body .metric {
  padding: 28px 24px 24px;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(255,255,255,0.06);
  border-radius: 0;
  border-top: none;
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: background 0.3s;
}
.case-body .metric:last-child { border-right: none; }
/* Метрика-ссылка «1 310 тестов» → tests/ в репозитории (B1): без подчёркивания, цвет наследуется. */
.case-body a.metric { text-decoration: none; color: inherit; cursor: pointer; }
.case-body a.metric:hover .l { color: var(--accent-text); }
@media (max-width: 720px) {
  .case-body .metric:nth-child(2) { border-right: none; }
  .case-body .metric:nth-child(3),
  .case-body .metric:nth-child(4) { border-top: 1px solid rgba(255,255,255,0.06); }
}
.case-body .metric:hover {
  background: rgba(224,122,65,0.04);
  transform: none;
}
[data-theme="light"] .case-body .metric {
  border-right-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .case-body .metric:hover {
  background: rgba(224,122,65,0.06);
}
.case-body .metric::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 24px;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: var(--accent-green);
  width: 0;
  transition: width 1s cubic-bezier(0.2,0.8,0.2,1);
  box-shadow: 0 0 12px rgba(76,183,130,0.4);
}
.case-body .metric:nth-child(2)::after {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(224,122,65,0.4);
}
.case-body .metric:nth-child(3)::after {
  background: #e09060;
  box-shadow: 0 0 12px rgba(224,144,96,0.4);
}
.case-body .metric:nth-child(4)::after {
  background: var(--accent-green);
  box-shadow: 0 0 12px rgba(76,183,130,0.4);
}
.case-body .metric.in-view::after { width: calc(100% - 48px); }
.case-body .metric:nth-child(2).in-view::after { width: calc(75% - 24px); }
.case-body .metric:nth-child(3).in-view::after { width: calc(55% - 24px); }
.case-body .metric:nth-child(4).in-view::after { width: calc(85% - 24px); }

.case-body .metric .v {
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.04em;
  display: block;
  line-height: 1;
}
.case-body .metric .v em {
  font-style: normal;
}
.case-body .metric:nth-child(1) .v em { color: var(--accent-green-text); }
.case-body .metric:nth-child(2) .v em { color: var(--accent-text); }
.case-body .metric:nth-child(3) .v em { color: #e09060; }
.case-body .metric:nth-child(4) .v em { color: var(--accent-green-text); }
.case-body .metric .l {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
/* Scroll-triggered reveal */
.case-body .metric .v {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2,0.8,0.2,1);
}
.case-body .metric.in-view .v {
  opacity: 1;
  transform: translateY(0);
}
.case-body .metric:nth-child(2) .v { transition-delay: 0.1s; }
.case-body .metric:nth-child(3) .v { transition-delay: 0.2s; }
.case-body .metric:nth-child(4) .v { transition-delay: 0.3s; }
.case-body .metric:nth-child(2)::after { transition-delay: 0.12s; }
.case-body .metric:nth-child(3)::after { transition-delay: 0.24s; }
.case-body .metric:nth-child(4)::after { transition-delay: 0.36s; }
.case-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
  padding: 1px 6px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
}

/* ── Social proof: карусель отзывов на scroll-snap (3 карточки в ряд) ──
   Нативный горизонтальный скролл со снапом: свайп/трекпад/клавиши работают
   без JS. JS лишь добавляет точки-индикаторы и автопрокрутку поверх. */
.testimonials { position: relative; }
.t-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * 22px) / 3);
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;            /* Firefox */
  padding: 6px 2px 10px;            /* воздух под тень карточек */
  align-items: stretch;             /* все карточки одной высоты */
}
.t-track::-webkit-scrollbar { display: none; }  /* WebKit */
.t-track > .proof-quote { scroll-snap-align: start; }
@media (max-width: 900px) {
  .t-track { grid-auto-columns: calc((100% - 22px) / 2); }
}
@media (max-width: 620px) {
  .t-track { grid-auto-columns: 88%; }
}

.proof-quote {
  position: relative;
  margin: 0;
  padding: 22px 20px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(224,122,65,0.05), transparent 40%),
    var(--bg-elev);
  box-shadow: 0 14px 40px -26px rgba(0,0,0,0.7);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
/* Верхняя акцент-кромка — «загорается» на ховер. */
.proof-quote::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.5;
  transition: opacity 0.3s ease;
}
/* Крупная декоративная кавычка-водяной знак. */
.proof-quote::after {
  content: '\201C';
  position: absolute;
  top: 6px;
  right: 16px;
  font-size: 64px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.08;
  pointer-events: none;
}
.proof-quote:hover {
  transform: translateY(-4px);
  border-color: var(--accent-line);
  box-shadow: 0 24px 50px -24px rgba(0,0,0,0.8), 0 0 0 1px var(--accent-line);
}
.proof-quote:hover::before { opacity: 1; }

.proof-quote .t-stars {
  color: var(--accent-text);
  font-size: 13px;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.proof-quote blockquote {
  margin: 0;
  flex: 1;                          /* тянет подпись к низу — высота ровная */
  display: flex;
  align-items: center;             /* короткий текст центрируется — нет провала снизу */
  font-size: clamp(12.5px, 1.1vw, 13.5px);
  line-height: 1.6;
  color: var(--text);
}
.proof-quote figcaption {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 11px;
  align-items: center;
}
.proof-avatar {
  grid-row: span 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #b85020);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  box-shadow: 0 4px 14px -4px rgba(224,122,65,0.6);
}
.proof-author { font-weight: 600; font-size: 0.9rem; align-self: end; }
.proof-meta { color: var(--text-dim); font-size: 0.74rem; align-self: start; line-height: 1.5; }
.proof-meta a { color: var(--accent-text); text-decoration: none; }
.proof-meta a:hover { text-decoration: underline; }

.t-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
}
.t-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--line-emph);
  cursor: pointer;
  transition: background 0.25s ease, width 0.25s ease;
}
.t-dots button.active {
  background: var(--accent);
  width: 16px;
  border-radius: 4px;
}
/* Без JS точки не нужны — карусель листается нативным скроллом. */
html:not(.js) .t-dots { display: none; }

/* Конверсионный блок в конце кейса — мост «убедился → заказал». */
.case-cta {
  position: relative;
  margin: 64px 0 8px;
  padding: 26px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title cta"
    "sub   cta";
  align-items: center;
  column-gap: 36px;
  row-gap: 4px;
  overflow: hidden;
  transition: border-color .3s ease;
}
.case-cta:hover { border-color: var(--line-emph); }
/* тонкая акцентная кромка слева */
.case-cta::before {
  content: '';
  position: absolute; top: 0; bottom: 0; left: 0; width: 3px;
  background: var(--accent); opacity: .85;
}
.case-cta h2 {
  grid-area: title;
  font-size: clamp(18px, 2.3vw, 22px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.case-cta p {
  grid-area: sub;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.case-cta .ctas {
  grid-area: cta;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .case-cta {
    grid-template-columns: 1fr;
    grid-template-areas: "title" "sub" "cta";
    row-gap: 14px;
    padding: 24px 24px;
    align-items: start;
  }
}

.case-nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
}
@media (max-width: 720px) {
  .case-nav {
    flex-direction: column;
    gap: 0;
    padding: 24px 0 32px;
  }
  .case-nav a {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    width: 100%;
  }
  .case-nav a:last-child { border-bottom: 0; }
  .case-nav a.next { text-align: left; align-items: flex-start; }
  .case-nav a .title-line { font-size: 17px; }
}
.case-nav a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0;
  position: relative;
}
.case-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.case-nav a:hover::after { width: 100%; }
.case-nav a.next::after { left: auto; right: 0; }
.case-nav a .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.case-nav a:hover .label { color: var(--accent-text); }
.case-nav a .title-line {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: color 0.2s;
}
.case-nav a:hover .title-line { color: var(--accent-text); }
.case-nav a.next { text-align: right; align-items: flex-end; }

/* ─────────  404  ───────── */
.error-page {
  min-height: 80vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 100px 24px 60px;
}
.error-page .glyph {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 30px;
  padding: 18px 22px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: inline-block;
  text-align: left;
}
.error-page .glyph .num { color: var(--accent-text); font-size: 36px; display: block; line-height: 1; margin-bottom: 4px; }
.error-page h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.0;
  margin: 0 auto 18px;
  max-width: min(22ch, 100%);
  text-wrap: balance;
}
.error-page p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 44ch;
  margin: 0 auto 28px;
}
.error-page .actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}



/* ─── Integrations · нод-граф «карта системы» ─── */
/* Секция шириной .shell: заголовок и копирайт по левому краю страницы (ритм соседних
   секций, hairline-divider не рассинхронится). Граф уводим вправо в свободное поле через
   capped negative margin (суммарно до ~1340px, запас 24px — без горизонтального скролла). */
.int-grid {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 48px;
  align-items: center;
  margin-right: calc(-1 * clamp(0px, (100vw - 1152px) / 2 - 24px, 188px));
}
/* 2 колонки только когда graph-ячейка вмещает min-width сцены (700px); ниже — 1 колонка,
   граф на всю ширину (без обрезки на ноутбуках). */
@media (max-width: 1180px) {
  .int-grid { grid-template-columns: 1fr; gap: 28px; margin-right: 0; }
}
.int-grid .int-copy { font-size: 16px; line-height: 1.6; color: var(--text-muted); max-width: 46ch; }
.int-grid .int-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.int-grid .int-list li { display: flex; align-items: flex-start; gap: 12px; padding: 6px 0; font-size: 15px; color: var(--text-muted); line-height: 1.5; }
.int-grid .int-list li svg { flex-shrink: 0; margin-top: 4px; }

/* Граф «парит» — без коробки, прозрачный фон */
.netmap { position: relative; padding: 0; }

.netmap .nm-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.netmap .nm-bar .live { display: inline-flex; align-items: center; gap: 7px; color: var(--accent-green-text); }
.netmap .nm-bar .live::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(76,183,130,0.16);
}
.netmap .nm-bar .right { margin-left: auto; color: var(--text-faint); }

/* overflow:hidden — 3D-наклон не выдаёт полосы прокрутки на десктопе */
.nm-stage-scroll { overflow: hidden; perspective: 1400px; }
.nm-stage {
  position: relative;
  width: 100%;
  min-width: 700px;
  aspect-ratio: 1000 / 560;
  transform-style: preserve-3d;
  transition: transform .18s ease-out;
}
.nm-edges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Провода — герой графа: тёплый «кабель» в покое (не серый — связь читается сразу) */
path.nm-edge {
  fill: none;
  stroke: rgba(224,122,65,0.20);
  stroke-width: 1.1;
  transition: stroke .25s ease, stroke-width .25s ease, opacity .25s ease;
}
[data-theme="light"] path.nm-edge { stroke: rgba(176,77,30,0.28); }
path.nm-edge.lit { stroke: var(--accent); stroke-width: 2; filter: drop-shadow(0 0 4px rgba(224,122,65,0.55)); }
.nm-stage.tracing path.nm-edge:not(.lit) { opacity: 0.4; }
.nm-stage.tracing path.nm-flow:not(.f-lit) { opacity: 0.28; }

/* Поток энергии по проводу: видимый, со свечением — это «разговор систем» */
path.nm-flow {
  fill: none;
  stroke: url(#nm-grad);
  stroke-width: 1.7;
  stroke-dasharray: 4 7;
  filter: drop-shadow(0 0 2.5px rgba(224,122,65,0.45));
  animation: nmdash 3.6s linear infinite;
}
.nm-flow.s2 { animation-duration: 4.4s; }
.nm-flow.s3 { animation-duration: 4.0s; }
.nm-flow.s4 { animation-duration: 4.8s; animation-direction: reverse; }
@keyframes nmdash { to { stroke-dashoffset: -120; } }
/* Пакеты — кометы со свечением, чтобы «данные едут» было видно */
.nm-packet { fill: var(--accent); filter: drop-shadow(0 0 3px rgba(224,122,65,0.8)); }

/* Событие лога физически бежит по своей связи: провод вспыхивает синхронно со вспышкой узла */
path.nm-edge.epulse { animation: edgePulse 1.7s ease; }
@keyframes edgePulse {
  20% { stroke: var(--accent); stroke-width: 2.6; filter: drop-shadow(0 0 6px rgba(224,122,65,0.75)); }
}

/* Прорисовка структуры на старте (JS вешает .armed → .run) */
.netmap.armed path.nm-edge { stroke-dasharray: 1; stroke-dashoffset: 1; }
.netmap.armed.run path.nm-edge { stroke-dashoffset: 0; transition: stroke-dashoffset .95s cubic-bezier(.2,.8,.2,1); }
.netmap.armed path.nm-flow, .netmap.armed .nm-packet { opacity: 0; }
.netmap.armed.run path.nm-flow { opacity: 1; transition: opacity .5s ease .65s; }
.netmap.armed.run .nm-packet { opacity: 1; transition: opacity .5s ease .9s; }

/* Пауза анимаций вне экрана — экономия CPU/батареи */
.netmap.nm-paused path.nm-flow,
.netmap.nm-paused .nm-core .nm-run,
.netmap.nm-paused .nm-core::before { animation-play-state: paused; }

.nm-node {
  position: absolute;
  transform: translate(-50%, -50%);
  background: var(--bg-elev-2);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 9px 13px;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
  z-index: 2;
}
[data-theme="light"] .nm-node { background: #ffffff; border-color: rgba(0,0,0,0.08); box-shadow: 0 8px 20px -12px rgba(0,0,0,0.22); }
.nm-node:hover {
  border-color: var(--accent-line);
  transform: translate(-50%, -50%) translateY(-2px);
  box-shadow: 0 16px 34px -16px rgba(0,0,0,0.6);
}
[data-theme="light"] .nm-node:hover { box-shadow: 0 18px 36px -16px rgba(224,122,65,0.28); }
.nm-node .nm-top { display: flex; align-items: center; gap: 8px; }
.nm-node .nm-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; transition: box-shadow .25s ease; }
.nm-node .nm-dot.in  { background: var(--accent); box-shadow: 0 0 5px rgba(224,122,65,0.6); }
.nm-node .nm-dot.out { background: var(--accent-green); box-shadow: 0 0 5px rgba(76,183,130,0.55); }
.nm-node.act .nm-dot.in  { box-shadow: 0 0 0 4px var(--accent-soft); }
.nm-node.act .nm-dot.out { box-shadow: 0 0 0 4px rgba(76,183,130,0.18); }
.nm-node .nm-name { font-weight: 500; font-size: 13px; letter-spacing: -0.01em; color: var(--text); }
.nm-node .nm-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  padding-left: 15px;
}
/* Вспышка-результат у узла */
.nm-flash {
  position: absolute;
  top: -10px; right: -6px;
  z-index: 5;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.02em;
  color: var(--accent-text);
  background: var(--bg-elev);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-pill);
  padding: 1px 7px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(5px);
  pointer-events: none;
}
[data-theme="light"] .nm-flash { background: #ffffff; }
.nm-node.flash .nm-flash { animation: flashpop 1.7s ease; }
@keyframes flashpop {
  0% { opacity: 0; transform: translateY(5px); }
  14% { opacity: 1; transform: translateY(0); }
  74% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-3px); }
}
.nm-node.flash .nm-dot { animation: dotPing 1.7s ease; }
@keyframes dotPing { 0% { box-shadow: 0 0 0 0 var(--accent-soft); } 22% { box-shadow: 0 0 0 6px var(--accent-soft); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Ядро-герой: плотная непрозрачная карточка (провода уходят ЗА него, не просвечивают).
   Глубина — нейтральной тенью + тонким акцентным контуром, без светящегося «орба». */
.nm-node.nm-core {
  min-width: 178px;
  padding: 14px 18px;
  z-index: 3;
  border-color: var(--accent-line);
  background: linear-gradient(180deg, rgba(224,122,65,0.13), rgba(224,122,65,0)), var(--bg-elev-2);
  box-shadow: 0 16px 36px -18px rgba(0,0,0,0.7), 0 0 0 1px rgba(224,122,65,0.12);
}
[data-theme="light"] .nm-node.nm-core {
  background: linear-gradient(180deg, rgba(224,122,65,0.15), rgba(224,122,65,0.03)), #ffffff;
  box-shadow: 0 16px 34px -16px rgba(0,0,0,0.22), 0 0 0 1px rgba(224,122,65,0.14);
}
.nm-core .nm-name { font-size: 15px; }
.nm-core .nm-krow { display: flex; align-items: center; gap: 8px; }
.nm-core .nm-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.nm-core .nm-run { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-green); margin-left: auto; animation: nmrun 2.4s ease-in-out infinite; }
@keyframes nmrun { 0%,100% { box-shadow: 0 0 0 0 rgba(76,183,130,.4); } 50% { box-shadow: 0 0 0 4px rgba(76,183,130,0); } }
.nm-core .nm-meta { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-dim); margin-top: 4px; }
.nm-core .nm-meta em { color: var(--accent-text); font-style: normal; }
.nm-core::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px solid var(--accent-line);
  border-radius: 14px;
  opacity: 0;
  pointer-events: none;
  animation: nmpulse 3.4s ease-out infinite;
}
@keyframes nmpulse { 0% { opacity: .5; transform: scale(0.97); } 100% { opacity: 0; transform: scale(1.13); } }

/* Чипы протоколов — скрыты в покое, всплывают на hover-трассировке */
.nm-tag {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  background: var(--bg-elev);
  border: 1px solid var(--accent-line);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  z-index: 1;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .25s ease;
}
[data-theme="light"] .nm-tag { background: #ffffff; }
.nm-tag.show { opacity: 1; }

/* Живой лог событий снизу */
.nm-log {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 18px;
}
.nm-log .p { color: var(--accent-green-text); flex-shrink: 0; }
.nm-log-text .ok { color: var(--accent-green-text); }
.nm-log-text.swap { animation: logSwap .45s ease; }
@keyframes logSwap { 0% { opacity: 0; transform: translateY(3px); } 100% { opacity: 1; transform: none; } }

/* Узкие экраны: граф можно смахнуть по горизонтали, ничего не обрезается
   (3D-наклон тут выключен через pointer:coarse — вертикального оверфлоу нет). */
@media (max-width: 760px) {
  .nm-stage-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
}

@media (prefers-reduced-motion: reduce) {
  .nm-flow, .nm-core .nm-run, .nm-core::before { animation: none; }
  .nm-core .nm-run { box-shadow: none; }
  .nm-node.flash .nm-flash, .nm-node.flash .nm-dot, .nm-log-text.swap, .nm-edge.epulse { animation: none !important; }
  .nm-packet { display: none; }
  .nm-stage { transform: none !important; }
}


/* ─── Section opener (centered head for product page) ─── */
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  align-items: center;
}
.section-head.center .kicker {
  align-self: center;
}
.section-head.center .kicker::before { display: none; }

/* ═══════════════════════════════════════════════════════════
   ENGINEERING POLISH — spec-sheet principles (rules table)
═══════════════════════════════════════════════════════════ */

/* ─── Rules table (engineering spec-sheet principles) ─── */
.rules-table {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.012), transparent);
}
.rule-row {
  display: grid;
  grid-template-columns: 180px 1fr 220px;
  gap: 40px;
  padding: 28px 32px;
  border-bottom: 1px solid var(--line);
  align-items: start;
  transition: background .2s;
  position: relative;
}
.rule-row:last-child { border-bottom: 0; }
.rule-row:hover { background: rgba(255,255,255,0.015); }

.rule-row .rule-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.rule-row .rule-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent-text);
  letter-spacing: 0.05em;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rule-row .rule-id::before {
  content: '';
  width: 14px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}
.rule-row .rule-cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-left: 22px;
}

.rule-row .rule-body h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 8px;
  color: var(--text);
}
.rule-row .rule-body p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 56ch;
  text-wrap: pretty;
}

.rule-row .rule-impl {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
  padding-top: 4px;
}
.rule-row .impl-tag {
  padding: 4px 11px;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.rule-row .impl-tag.accent {
  border-color: var(--accent-line);
  color: var(--accent-text);
  background: var(--accent-soft);
}

@media (max-width: 960px) {
  .rule-row { grid-template-columns: 1fr; gap: 14px; padding: 22px 22px; }
  .rule-row .rule-meta { flex-direction: row; gap: 14px; align-items: baseline; }
  .rule-row .rule-cat { padding-left: 0; }
}

/* ─── Engineering contact panel ─── */
.contact-panel {
  max-width: 880px;
  margin: 0 auto;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(224,122,65,0.06), transparent 70%),
    var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 30px 100px -20px rgba(0,0,0,0.65);
  position: relative;
  z-index: 1;
}
.contact-panel .cp-head {
  padding: 14px 18px;
  background: rgba(255,255,255,0.025);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.contact-panel .cp-head .left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.contact-panel .cp-head .left::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(76,183,130,0.16);
  animation: pulse 2s ease-in-out infinite;
}
.contact-panel .cp-head .right { color: var(--text-faint); }
@media (max-width: 560px) {
  .contact-panel .cp-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}

.contact-panel .cp-body { padding: 36px 36px 32px; }
@media (max-width: 560px) { .contact-panel .cp-body { padding: 24px; } }
.contact-panel .cp-title {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin-bottom: 14px;
  color: var(--text);
}
.contact-panel .cp-sub {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 56ch;
  margin-bottom: 28px;
  text-wrap: pretty;
}

.contact-panel .cp-channels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
@media (max-width: 560px) { .contact-panel .cp-channels { grid-template-columns: 1fr; } }
.contact-panel .cp-ch {
  display: grid;
  grid-template-columns: 36px 1fr 20px;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color .25s, background .25s, transform .25s;
  position: relative;
  overflow: hidden;
}
.contact-panel .cp-ch::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(224,122,65,0.10), transparent 60%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.contact-panel .cp-ch:hover {
  border-color: var(--accent-line);
  background: rgba(224,122,65,0.04);
  transform: translateY(-1px);
}
.contact-panel .cp-ch:hover::after { opacity: 1; }
.contact-panel .cp-ch:hover .cp-arr { transform: translateX(3px); color: var(--accent-text); }
.contact-panel .cp-ico {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.contact-panel .cp-ico svg { width: 16px; height: 16px; }
.contact-panel .cp-ch-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.contact-panel .cp-ch-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.contact-panel .cp-ch-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--text);
  letter-spacing: -0.005em;
}
.contact-panel .cp-arr {
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  transition: transform .25s, color .2s;
}

.contact-panel .cp-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
@media (max-width: 720px) { .contact-panel .cp-meta { grid-template-columns: 1fr 1fr; gap: 20px; } }
.contact-panel .cp-meta .cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-right: 1px solid var(--line);
  padding-right: 18px;
}
.contact-panel .cp-meta .cell:last-child { border-right: 0; }
@media (max-width: 720px) {
  .contact-panel .cp-meta .cell { border-right: 0; padding-right: 0; }
}
.contact-panel .cp-meta .k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.contact-panel .cp-meta .v {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text);
  letter-spacing: -0.005em;
}
.contact-panel .cp-meta .v em { color: var(--accent-text); font-style: normal; }

/* Tweak surrounding CTA section when in engineering mode */
.cta.engineering { padding: 96px 0; text-align: left; }
.cta.engineering::before {
  background: radial-gradient(ellipse 60% 40% at 50% 50%, rgba(224,122,65,0.10), transparent 70%);
}

/* ─────────  Audit page  ───────── */
.page-head .kicker { margin-bottom: 18px; }
.page-head .ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.audit-report-row {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 960px) {
  .audit-report-row { grid-template-columns: 1fr; gap: 36px; }
}
.audit-report-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.audit-report-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  transition: border-color .25s, background .25s;
}
.audit-report-list li:hover {
  border-color: var(--accent-line);
  background: rgba(224,122,65,0.04);
}
.audit-report-list .r-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent-text);
  letter-spacing: 0.04em;
  padding-top: 3px;
}
.audit-report-list strong { color: var(--text); font-weight: 500; }
.audit-caption {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 14px;
  text-align: center;
  line-height: 1.5;
}

.audit-price-grid {
  display: grid;
  grid-template-columns: minmax(380px, 480px) 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 960px) {
  .audit-price-grid { grid-template-columns: 1fr; gap: 28px; }
  .audit-price-grid .tier { max-width: 100% !important; }
}
.audit-price-grid .tier {
  border-top-color: var(--accent);
}
.audit-price-grid .tier::after {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(224,122,65,0.4);
}
.audit-price-grid .tier:hover { border-color: var(--accent-line); }
.audit-price-grid .tier:hover .tier-name { color: var(--accent-text); }

.audit-price-aside {
  padding: 28px 4px 0;
}
.audit-price-aside h4 {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}
.audit-price-aside dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  border-top: 1px solid var(--line);
}
.audit-price-aside dt {
  padding: 12px 0 4px;
  color: var(--text);
  font-weight: 500;
}
.audit-price-aside dd {
  margin: 0;
  padding: 0 0 14px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
}
.audit-price-aside .note {
  margin-top: 22px;
  padding: 14px 16px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text);
  line-height: 1.55;
}

/* ─────────  Audit form  ───────── */
.audit-form-wrap {
  max-width: 720px;
  margin: 0 auto;
}
.audit-form {
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
@media (max-width: 560px) { .audit-form { padding: 22px; } }
.audit-form .af-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.audit-form label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.audit-form input[type="text"],
.audit-form textarea {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 12px 14px;
  outline: 0;
  transition: border-color .2s, background .2s;
  width: 100%;
  resize: vertical;
  line-height: 1.55;
}
.audit-form input[type="text"]::placeholder,
.audit-form textarea::placeholder {
  color: var(--text-faint);
}
.audit-form input[type="text"]:hover,
.audit-form textarea:hover {
  border-color: var(--line-emph);
}
.audit-form input[type="text"]:focus,
.audit-form textarea:focus {
  border-color: var(--accent-line);
  background: rgba(224,122,65,0.04);
  box-shadow: 0 0 0 3px rgba(224,122,65,0.10);
}
.audit-form input[type="text"]:invalid:not(:placeholder-shown),
.audit-form textarea:invalid:not(:placeholder-shown) {
  border-color: rgba(255,100,80,0.45);
}
.audit-form .af-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.audit-form .af-actions .btn { height: 42px; padding: 0 22px; font-size: 13.5px; }
.audit-form .af-note {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 42ch;
}
.audit-alt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.audit-alt .alt-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

/* ─────────  Scan-anchor: highlight key numbers inside case body  ───────── */
.case-body strong.num {
  color: var(--accent-text);
  font-weight: 600;
  white-space: nowrap;
}

/* ─────────  Case artefacts: inline SVG figures, PDF mock, test list  ───────── */
.case-body .figure .svg-stage {
  padding: 28px 28px 24px;
  overflow-x: auto;
  position: relative;
  z-index: 3;
}
@media (max-width: 600px) {
  .case-body .figure .svg-stage { padding: 18px 14px 14px; }
}
.case-body .figure svg.arch-flow,
.case-body .figure svg.latency-bars {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}
.case-body .figure svg.arch-flow { min-width: 540px; }
.case-body .figure svg.latency-bars { min-width: 480px; max-width: 560px; margin: 0 auto; }

/* SVG palette tokens reused below as CSS vars on the stage */
.case-body .figure .svg-stage {
  --sv-stroke: rgba(255,255,255,0.35);
  --sv-text: #d8d8d8;
  --sv-text-dim: #8a8f98;
  --sv-fill: rgba(255,255,255,0.04);
  --sv-fill-strong: rgba(255,255,255,0.08);
  background-image:
    linear-gradient(rgba(224,122,65,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224,122,65,0.025) 1px, transparent 1px);
  background-size: 24px 24px;
}
[data-theme="light"] .case-body .figure .svg-stage {
  --sv-stroke: rgba(0,0,0,0.35);
  --sv-text: #1a1a1a;
  --sv-text-dim: #555;
  --sv-fill: rgba(0,0,0,0.03);
  --sv-fill-strong: rgba(0,0,0,0.06);
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
}
.case-body .figure svg .nd-rect {
  fill: var(--sv-fill);
  stroke: var(--sv-stroke);
  stroke-width: 1;
}
.case-body .figure svg .nd-rect.accent {
  fill: rgba(224,122,65,0.10);
  stroke: var(--accent);
}
.case-body .figure svg .nd-label {
  fill: var(--sv-text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
}
.case-body .figure svg .nd-sub {
  fill: var(--sv-text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}
.case-body .figure svg .nd-kicker {
  fill: var(--accent-text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.case-body .figure svg .nd-line {
  stroke: var(--sv-stroke);
  stroke-width: 1.2;
  fill: none;
}
.case-body .figure svg .nd-arrow { fill: var(--sv-stroke); }
.case-body .figure svg .nd-stack {
  fill: var(--sv-fill);
  stroke: var(--sv-stroke);
  stroke-width: 0.8;
}

/* Latency bars */
.case-body .figure svg .lt-bar-p50 { fill: var(--accent); }
.case-body .figure svg .lt-bar-p95 { fill: var(--accent-pink); }
.case-body .figure svg .lt-bar-p99 { fill: var(--text-dim); }
.case-body .figure svg .lt-axis {
  stroke: var(--sv-stroke);
  stroke-width: 1;
}
.case-body .figure svg .lt-tick {
  fill: var(--sv-text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}
.case-body .figure svg .lt-val {
  fill: var(--sv-text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
}

/* ────────── PDF preview — banking-grade mock (replicates real product) ──────────
   TODO: replace .pdf-mock block in HTML with <img src="../og/credit-assistant-pdf-masked.png">
   once a real masked screenshot is available. Styles below imitate the real PDF's
   blue brand + traffic-light gauge + severity-stripped signal cards.                       */
.case-body .figure .pdf-mock-wrap {
  padding: 36px 28px 32px;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 3;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(38,93,189,0.06), transparent 70%);
}
.case-body .figure .pdf-mock {
  position: relative;
  width: min(620px, 92%);
  aspect-ratio: 1 / 1.414;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 3px;
  box-shadow:
    0 30px 60px -16px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.04) inset;
  overflow: hidden;
  color: #1a1a1a;
  font-family: 'JetBrains Mono', monospace;
}
.pdf-mock-page {
  --ca-blue: #265dbd;
  --ca-orange: #d97706;
  --ca-red: #c74848;
  --ca-green: #228b4d;
  padding: 24px 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  font-size: 9px;
  line-height: 1.45;
  color: #1a1a1a;
}
.pm-top {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 2px solid #1a1a1a;
}
.pm-logo {
  width: 32px; height: 32px;
  background: var(--ca-blue);
  border-radius: 3px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.04em;
}
.pm-brand-name { font-size: 14px; font-weight: 700; color: #1a1a1a; line-height: 1.1; }
.pm-brand-sub { font-size: 8.5px; color: #777; line-height: 1.3; margin-top: 1px; }
.pm-id { font-size: 11px; font-weight: 700; color: #1a1a1a; text-align: right; line-height: 1.2; letter-spacing: 0.02em; }
.pm-id-date { font-size: 8px; color: #999; text-align: right; margin-top: 2px; }

.pm-h-section {
  font-size: 9px;
  color: var(--ca-blue);
  letter-spacing: 0.10em;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 6px;
}
.pm-borrower { font-size: 18px; font-weight: 700; color: #1a1a1a; letter-spacing: -0.01em; margin-top: 0; }
.pm-borrower-meta { font-size: 8.5px; color: #555; }
.pm-borrower-meta strong { font-weight: 700; letter-spacing: 0.02em; }

.pm-score-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 6px 0 10px;
  align-items: center;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.pm-gauge { width: 140px; height: 110px; position: relative; }
.pm-gauge svg { width: 100%; height: 80px; display: block; }
.pm-gauge-score {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1;
  margin-top: 4px;
}
.pm-gauge-score-sfx { font-size: 12px; color: #888; font-weight: 400; }
.pm-gauge-cap { display: block; font-size: 7px; color: #999; letter-spacing: 0.10em; text-transform: uppercase; margin-top: 3px; font-weight: 600; }

.pm-recommendation {
  font-size: 26px;
  font-weight: 700;
  color: var(--ca-orange);
  line-height: 1;
  letter-spacing: -0.01em;
}
.pm-signals-meta { font-size: 9px; color: #555; margin-top: 8px; line-height: 1.4; }
.pm-signals-meta strong { color: var(--ca-orange); font-weight: 700; }

.pm-detail-rows { display: flex; flex-direction: column; padding: 4px 0 6px; gap: 1px; }
.pm-row-2 {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  padding: 3px 0;
  font-size: 9px;
  line-height: 1.4;
}
.pm-row-2 .pm-k { font-size: 8px; color: #888; letter-spacing: 0.10em; text-transform: uppercase; font-weight: 600; }
.pm-row-2 .pm-v { color: #1a1a1a; }
.pm-row-2 .pm-v strong { font-weight: 700; }

/* Two-column key observations (replicates real PDF page 1 bottom) */
.pm-observations {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 6px;
}
.pm-obs-col {
  padding-left: 10px;
  border-left: 3px solid #ccc;
}
.pm-obs-col.good { border-left-color: var(--ca-green); }
.pm-obs-col.risk { border-left-color: var(--ca-red); }
.pm-obs-h {
  font-size: 8.5px;
  letter-spacing: 0.10em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.pm-obs-col.good .pm-obs-h { color: var(--ca-green); }
.pm-obs-col.risk .pm-obs-h { color: var(--ca-red); }
.pm-obs-item { margin-bottom: 10px; }
.pm-obs-name { font-size: 9px; font-weight: 600; color: #1a1a1a; line-height: 1.35; }
.pm-obs-detail { font-size: 8px; color: #777; margin-top: 2px; line-height: 1.35; }

.pm-mask {
  display: inline-block;
  background: #d8d8d8;
  color: transparent;
  border-radius: 2px;
  padding: 0 12px;
  user-select: none;
  vertical-align: middle;
}

.pm-foot {
  margin-top: auto;
  font-size: 7px;
  color: #999;
  text-align: right;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.06);
  letter-spacing: 0.04em;
}

@media (max-width: 720px) {
  .case-body .figure .pdf-mock { width: 95%; }
  .pdf-mock-page { padding: 16px 14px 12px; gap: 9px; font-size: 7.5px; }
  .pm-logo { width: 24px; height: 24px; font-size: 10px; }
  .pm-brand-name { font-size: 11px; }
  .pm-brand-sub { font-size: 7px; }
  .pm-id { font-size: 9px; }
  .pm-borrower { font-size: 14px; }
  .pm-recommendation { font-size: 20px; }
  .pm-gauge { width: 110px; height: 90px; }
  .pm-gauge-score { font-size: 19px; }
  .pm-score-row { grid-template-columns: 110px 1fr; gap: 14px; }
  .pm-row-2 { grid-template-columns: 100px 1fr; gap: 8px; font-size: 7.5px; }
  .pm-row-2 .pm-k { font-size: 6.5px; }
  .pm-obs-h { font-size: 7px; }
  .pm-obs-name { font-size: 7.5px; }
  .pm-obs-detail { font-size: 6.5px; }
}


/* ── Блок «Кто я» (#16) — инженерная whois-карточка ─── */
.about-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 44px;
  align-items: center;
  padding: 40px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
/* верхняя акцентная кромка */
.about-panel::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  opacity: .85;
}
/* брендовый watermark [><] */
.about-panel::after {
  content: '[><]';
  position: absolute; right: 22px; bottom: 16px;
  font-size: 13px; letter-spacing: .1em;
  color: var(--accent);
  opacity: .12;
  pointer-events: none;
}

/* портрет */
.about-portrait {
  margin: 0;
  position: relative;
  aspect-ratio: 3 / 4;                 /* совпадает с файлом — кадр без обрезки */
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-emph);
  background: var(--bg);
  box-shadow: var(--shadow-card);
  transition: box-shadow .45s ease, transform .45s ease;
}
.about-portrait picture { display: block; width: 100%; height: 100%; }
.about-portrait img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  transition: transform .6s cubic-bezier(.22,.61,.36,1);
}
/* уголок-скобка в духе [><] */
.about-portrait::after {
  content: '';
  position: absolute; left: 10px; top: 10px;
  width: 18px; height: 18px;
  border-left: 2px solid var(--accent);
  border-top: 2px solid var(--accent);
  opacity: .7;
}
.about-panel:hover .about-portrait {
  box-shadow: 0 24px 60px -22px rgba(224,122,65,.4);
  transform: translateY(-3px);
}
.about-portrait:hover img { transform: scale(1.045); }

/* текстовая часть */
.about-body { min-width: 0; }
.about-name {
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}
/* терминальная сигнатура */
.about-sig {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 10px 0 0;
}
.about-sig .atp { color: var(--accent-text); font-weight: 600; }
.about-sig .ato {
  color: var(--text);
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
}
/* typing-эффект на сигнатуре при появлении (JS-гейт, no-JS видит сразу) */
html.js .about-panel:not(.in-view) .about-sig .ato { max-width: 0; }
.about-panel.in-view .about-sig .ato { animation: aboutType 1s steps(26) both; }
@keyframes aboutType { from { max-width: 0; } to { max-width: 26ch; } }
@media (prefers-reduced-motion: reduce) {
  html.js .about-panel:not(.in-view) .about-sig .ato { max-width: 100%; }
  .about-panel.in-view .about-sig .ato { animation: none; }
}
.about-bio {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 18px 0 0;
  max-width: 56ch;
}
/* чипы-факты */
.about-facts {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 20px 0 24px; padding: 0;
}
.about-fact {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 6px 13px;
  background: var(--bg);
  transition: border-color .25s ease, color .25s ease;
}
.about-fact::before { content: '· '; color: var(--accent-text); font-weight: 600; }
.about-panel:hover .about-fact { border-color: var(--line-emph); }

/* контакты как терминальные команды */
.about-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 22px;
  align-items: flex-start;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}
.about-cmd {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 10px;
  margin-left: -10px;
  border-radius: 8px;
  color: var(--text-dim);
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
.about-cmd .atp { color: var(--accent-text); font-weight: 600; }
.about-cmd .cmd-key { color: var(--text); min-width: 8.5ch; }
.about-cmd .cmd-arrow { color: var(--text-faint); }
.about-cmd .cmd-val { color: var(--text-dim); }
.about-cmd .ext { color: var(--text-faint); transition: transform .2s ease, color .2s ease; }
.about-cmd:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.about-cmd:hover .cmd-val { color: var(--accent-text); }
.about-cmd:hover .ext { color: var(--accent-text); transform: translate(2px, -2px); }
.about-cmd:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
[data-theme="light"] .about-cmd:hover { background: rgba(0,0,0,0.04); }
@media (max-width: 760px) { .about-cmd { padding: 11px 12px; margin-left: -12px; } }

@media (max-width: 760px) {
  .about-panel {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 28px 22px;
    justify-items: start;
  }
  .about-portrait { max-width: 230px; }
  .about-name { font-size: 26px; }
}

/* ─────────  Форма захвата (services, контакт)  ───────── */
.cform {
  background: var(--bg-elev); border: 1px solid var(--line); border-top: 1px solid var(--accent-line);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card);
  text-align: left; max-width: 680px; margin: 28px auto 0;
}
.cform-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 26px; border-bottom: 1px solid var(--line); font-size: 12px; letter-spacing: .5px;
}
.cform-head .ttl { display: inline-flex; align-items: center; gap: 9px; color: var(--text-dim); text-transform: uppercase; }
.cform-head .ttl .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-green); }
.cform-head .reply { color: var(--text-faint); white-space: nowrap; }
@media (max-width: 560px) { .cform-head { flex-direction: column; align-items: flex-start; gap: 6px; } }
.cform-body { padding: 26px; display: grid; gap: 20px; }
.cf2-field { display: flex; flex-direction: column; gap: 9px; }
.cf2-field > label { font-size: 12.5px; color: var(--text-dim); display: flex; align-items: center; gap: 7px; }
.cf2-field > label .atp { color: var(--accent-text); font-weight: 600; }
.cf2-field textarea, .cf2-field input {
  background: var(--bg-input); border: 1px solid var(--line-strong); border-radius: 11px;
  color: var(--text); font-family: inherit; font-size: 14.5px; padding: 14px 16px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.cf2-field textarea { resize: vertical; min-height: 104px; line-height: 1.6; }
.cf2-field textarea:focus, .cf2-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cf2-field ::placeholder { color: var(--text-faint); }
.cf2-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .cf2-row { grid-template-columns: 1fr; } }
.bchips { display: flex; gap: 8px; flex-wrap: wrap; }
.bchip {
  background: var(--bg-input); border: 1px solid var(--line-strong); color: var(--text-dim);
  font-family: inherit; font-size: 13px; padding: 9px 14px; border-radius: 9px; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.bchip:hover { border-color: var(--line-emph); color: var(--text); }
.bchip.active { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.cform-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 4px 26px 22px; }
.cf2-send {
  display: inline-flex; align-items: center; gap: 9px; background: var(--accent); color: #1a1a1a;
  border: 0; border-radius: 10px; font-family: inherit; font-size: 14.5px; font-weight: 600;
  padding: 13px 26px; cursor: pointer; transition: filter .15s;
}
.cf2-send:hover { filter: brightness(1.06); }
.cf2-send .arrow { transition: transform .15s; }
.cf2-send:hover .arrow { transform: translate(2px, -2px); }
.cf2-hint { font-size: 12px; color: var(--text-faint); }
.cf2-alt { padding: 0 26px 22px; font-size: 13px; color: var(--text-faint); }
.cf2-alt a { color: var(--accent-text); text-decoration: none; }
.cf2-alt a:hover { text-decoration: underline; }
.cf2-status { font-size: 13px; color: var(--text-faint); }
.cf2-status.ok { color: var(--accent-green-text); font-weight: 500; }
/* honeypot — ловушка для ботов, скрыта от людей и скринридеров */
.cf2-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ─────────  Строка-перевод в кейсах (biz-translate)  ───────── */
.biz-translate {
  display: flex; gap: 13px; align-items: flex-start; margin: 18px 0;
  padding: 14px 18px; background: var(--accent-soft);
  border-left: 2px solid var(--accent); border-radius: 0 10px 10px 0;
}
.biz-translate .bt-ico { color: var(--accent); flex: none; margin-top: 1px; font-weight: 700; }
.biz-translate p { font-size: 14px; line-height: 1.65; color: var(--text); margin: 0; }
.biz-translate strong { color: var(--accent-text); font-weight: 600; }

/* ─────────  404 «возможно, вы искали»  ───────── */
.nf-suggest { margin: 34px auto 0; max-width: 520px; text-align: left; }
.nf-suggest .nf-h { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 12px; }
.nf-links { display: grid; gap: 8px; }
.nf-link {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 10px; text-decoration: none;
  color: var(--text); background: var(--bg-elev); transition: border-color .15s, transform .15s;
}
.nf-link:hover { border-color: var(--accent-line); transform: translateX(3px); }
.nf-link .nf-tag { font-size: 12px; color: var(--accent-text); flex: none; }
.nf-link .nf-name { font-size: 14px; }
.nf-link .nf-sub { font-size: 12px; color: var(--text-faint); margin-left: auto; }
.nf-link .nf-arr { color: var(--text-faint); }
@media (max-width: 480px) { .nf-link .nf-sub { display: none; } }
