/* ============================================================
   PRODUCT PAGES · /karkas/ /yadro/ /echo/
   Использует токены и компоненты главной (styles.css + method-card, stages).
   ============================================================ */
.p-hero {
  min-height: auto !important;
  padding-top: clamp(140px, 20vh, 220px) !important;
  padding-bottom: clamp(60px, 10vh, 120px) !important;
}
.p-back {
  display: inline-block;
  margin-bottom: clamp(24px, 4vh, 40px);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.3s ease;
}
.p-back:hover { color: var(--accent); }
.p-hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(64px, 13vw, 200px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin: 12px 0 clamp(28px, 5vh, 48px);
  color: var(--text);
}
.p-hero .hero-sub { max-width: 720px; }
.p-hero .hero-cta { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); flex-wrap: wrap; }
.p-link {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 2px;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.p-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

.p-section .section-head { margin-bottom: clamp(28px, 5vh, 56px); }
.p-lead {
  max-width: 820px;
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.5;
  color: var(--text);
  margin-bottom: clamp(24px, 4vh, 40px);
}
.p-lead a { color: var(--accent); border-bottom: 1px solid rgba(var(--accent-rgb), 0.4); }
.p-note {
  margin-top: clamp(20px, 3vh, 32px);
  max-width: 900px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
}
.p-note::before { content: '// '; color: var(--accent); transition: color 0.4s ease; }

/* cards grid */
.p-cards { display: grid; gap: clamp(8px, 1vw, 16px); }
.p-cards + .p-cards { margin-top: clamp(8px, 1vw, 16px); }
.p-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.p-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p-cards .method-card p { font-size: 15px; }
.p-badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid currentColor;
}
.p-badge-crit { color: #FF5A4E; }
.p-badge-mid { color: #F2B33D; }
.p-badge + .method-card-tag { display: block; }

/* before → after */
.p-compare { border-top: 1px solid var(--line); }
.p-compare-head, .p-compare-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.p-compare-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 12px 0; }
.p-compare-head span { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.p-compare-head span:first-child { color: #FF5A4E; }
.p-compare-head span:last-child { color: var(--accent); transition: color 0.4s ease; padding-left: 56px; }
.p-was { color: var(--text-dim); font-size: 16px; }
.p-now { color: var(--text); font-size: 16px; }
.p-arrow { color: var(--accent); text-align: center; transition: color 0.4s ease; }

/* scope */
.p-scope { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(8px, 1vw, 16px); }
.p-scope-col { border: 1px solid var(--line); background: var(--bg-card); padding: clamp(24px, 3vw, 40px); }
.p-scope-col ul { list-style: none; margin-top: 18px; }
.p-scope-col li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; padding: 8px 0; font-size: 15px; line-height: 1.5; color: var(--text); }
.p-scope-col li i { font-style: normal; color: var(--accent); transition: color 0.4s ease; }
.p-scope-col:last-child li { color: var(--text-dim); }

/* timeline: дорожка с бегущим огоньком, узлы-ромбы, карточки шагов */
.p-timeline {
  list-style: none;
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  padding: 40px 0 8px;
  overflow: hidden;
}
.p-timeline::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 13px;
  height: 2px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.15), rgba(var(--accent-rgb), 0.6), rgba(var(--accent-rgb), 0.15));
}
.p-timeline::after {
  content: '';
  position: absolute;
  top: 9px; left: -160px;
  width: 160px; height: 10px;
  background: radial-gradient(ellipse at center, var(--accent), transparent 70%);
  filter: blur(2px);
  animation: tlRun 4.5s linear infinite;
}
@keyframes tlRun { from { left: -160px; } to { left: 100%; } }
.p-timeline li { position: relative; }
.p-tl-node {
  position: absolute;
  top: -34px; left: 20px;
  width: 14px; height: 14px;
  transform: rotate(45deg);
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: tlNode 3.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.45s);
}
.p-tl-node::after {
  content: '';
  position: absolute;
  left: 50%; top: 100%;
  width: 2px; height: 14px;
  background: rgba(var(--accent-rgb), 0.5);
  transform: translate(-50%, 2px) rotate(-45deg);
  transform-origin: top center;
}
@keyframes tlNode { 0%, 70%, 100% { background: var(--bg); } 20% { background: var(--accent); } }
.p-tl-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 18px 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.08), transparent 55%), var(--bg-card);
  clip-path: polygon(0 10px, 10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px));
  transition: transform 0.35s cubic-bezier(.19,1,.22,1), border-color 0.3s ease;
}
.p-timeline li:hover .p-tl-card { transform: translateY(-4px); border-color: var(--accent); }
.p-timeline b {
  font-family: 'Russo One', var(--font-mono);
  font-weight: 400;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.55);
  margin-bottom: 6px;
  transition: color 0.4s ease;
}
.p-tl-title {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.15vw, 17px);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text);
}
.p-tl-text { font-size: 13px; line-height: 1.45; color: var(--text-dim); }
.p-tl-out {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed rgba(var(--accent-rgb), 0.3);
  font-size: 12px;
  line-height: 1.45;
  color: var(--text);
}
.p-tl-out::before { content: '→ '; color: var(--accent); }
@media (max-width: 720px) {
  .p-timeline { grid-template-columns: 1fr; padding: 0 0 0 34px; }
  .p-timeline::before { left: 6px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.15), rgba(var(--accent-rgb), 0.6), rgba(var(--accent-rgb), 0.15)); }
  .p-timeline::after { display: none; }
  .p-tl-node { top: 22px; left: -34px; }
  .p-tl-node::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .p-timeline::after, .p-tl-node { animation: none; }
}

/* tariffs */
.p-tariffs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 1vw, 16px); }
.p-tariff { border: 1px solid var(--line); background: var(--bg-card); padding: clamp(24px, 3vw, 40px); }
.p-tariff.is-main { border-color: rgba(var(--accent-rgb), 0.5); }
.p-tariff-sub { display: block; margin-top: 6px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mute); }
.p-price {
  display: block;
  margin: 22px 0 6px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1;
  color: var(--text);
}
.p-monthly { display: block; font-size: 14px; color: var(--accent); transition: color 0.4s ease; }
.p-tariff ul { list-style: none; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.p-tariff li { padding: 5px 0; font-size: 14px; color: var(--text-dim); }
.p-tariff li::before { content: '├ '; color: var(--text-mute); }

/* case */
.p-case { border: 1px solid var(--line); background: var(--bg-card); padding: clamp(24px, 3vw, 44px); }
.p-case + .p-cards, .p-case + .p-list { margin-top: clamp(8px, 1vw, 16px); }
.p-case-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 20px; margin-bottom: 18px; }
.p-case-head .case-niche { font-family: var(--font-display); font-size: clamp(20px, 2vw, 30px); text-transform: uppercase; color: var(--text); }
.p-case-head .case-industry { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); transition: color 0.4s ease; }
.p-case-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute); border: 1px solid var(--line-2); padding: 3px 8px; }
.p-case > p { max-width: 900px; font-size: 15px; line-height: 1.6; color: var(--text-dim); }
.p-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.p-metrics span { font-size: 13px; line-height: 1.45; color: var(--text-dim); }
.p-metrics b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 48px);
  line-height: 1;
  color: var(--accent);
  margin-bottom: 8px;
  transition: color 0.4s ease;
}

/* list */
.p-list { list-style: none; border: 1px solid var(--line); background: var(--bg-card); padding: clamp(20px, 3vw, 36px); }
.p-list li { position: relative; padding: 10px 0 10px 24px; font-size: 15px; line-height: 1.55; color: var(--text-dim); border-bottom: 1px solid var(--line); }
.p-list li:last-child { border-bottom: none; }
.p-list li::before { content: '→'; position: absolute; left: 0; color: var(--accent); transition: color 0.4s ease; }
.p-list b { color: var(--text); font-weight: 600; }

/* final cta */
.p-final-box {
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  padding: clamp(32px, 5vw, 72px);
  text-align: left;
}
.p-final-box h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 64px);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 20px;
}
.p-final-box p { max-width: 640px; font-size: 16px; line-height: 1.6; color: var(--text-dim); margin-bottom: 32px; }

@media (max-width: 960px) {
  .p-cols-3, .p-tariffs { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .p-cols-2, .p-scope, .p-metrics { grid-template-columns: 1fr; }
  .p-compare-head { display: none; }
  .p-compare-row { grid-template-columns: 1fr; gap: 6px; }
  .p-arrow { text-align: left; }
  .p-hero-title { font-size: clamp(56px, 18vw, 96px); }
}

/* длинные заголовки разделов и шагов на страницах продуктов */
.p-section .section-title {
  font-size: clamp(28px, 4.4vw, 72px) !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
  hyphens: manual;
}
.p-section .stage h3 {
  font-size: clamp(18px, 1.7vw, 26px) !important;
  overflow-wrap: normal;
  word-break: keep-all;
}
.p-section .stage h3 { white-space: normal !important; }
.p-section .stage { min-width: 0; }
@media (max-width: 880px) {
  .p-section .stages { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 720px) {
  .p-hero-title { font-size: clamp(48px, 14vw, 88px) !important; }
}

/* карточки на страницах продуктов: номер на фоне, акцентная полоса, срезанные углы */
.p-cards { counter-reset: pc; }
.p-cards .method-card {
  counter-increment: pc;
  position: relative;
  overflow: hidden;
  border-color: rgba(var(--accent-rgb), 0.22);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(var(--accent-rgb), 0.14), transparent 55%),
    var(--bg-card);
  padding-top: clamp(28px, 3vw, 40px);
  clip-path: polygon(0 12px, 12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px));
  transition: transform 0.35s cubic-bezier(.19,1,.22,1), border-color 0.3s ease;
}
.p-cards .method-card::before {
  content: counter(pc, decimal-leading-zero);
  position: absolute;
  right: 18px; top: 8px;
  font-family: 'Russo One', var(--font-mono);
  font-size: clamp(48px, 4.6vw, 72px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(var(--accent-rgb), 0.28);
  pointer-events: none;
  transition: -webkit-text-stroke-color 0.3s ease;
}
.p-cards .method-card::after {
  content: '';
  position: absolute;
  left: 0; top: 0;
  height: 2px; width: 34%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  transition: width 0.45s cubic-bezier(.19,1,.22,1), background 0.4s ease;
}
.p-cards .method-card:hover { transform: translateY(-4px); border-color: rgba(var(--accent-rgb), 0.6); }
.p-cards .method-card:hover::after { width: 100%; }
.p-cards .method-card:hover::before { -webkit-text-stroke-color: var(--accent); }
.p-cards .method-card h3 { font-size: clamp(18px, 1.6vw, 24px); padding-right: 64px; }
.p-cards .method-card p { color: var(--text-dim); line-height: 1.6; }

/* карточка с деньгами внизу */
.p-money-card { display: flex; flex-direction: column; }
.p-money {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px dashed rgba(var(--accent-rgb), 0.3);
  display: flex; flex-direction: column; gap: 6px;
}
.p-money strong {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 16px rgba(var(--accent-rgb), 0.45);
  transition: color 0.4s ease;
}
.p-money span { font-size: 13px; line-height: 1.45; color: var(--text-dim); }
.p-money-card p { margin-bottom: 18px; }

/* меню страницы продукта: текущий продукт подсвечен */
.nav-link.is-current span, .mobile-link.is-current span { color: var(--accent); }
.nav-link.is-current { position: relative; }
.nav-link.is-current::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* ----- кейс: история слева, деньги справа ----- */
.p-case {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 1fr);
  gap: clamp(20px, 3vw, 48px);
  align-items: center;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  background:
    radial-gradient(ellipse at 100% 50%, rgba(var(--accent-rgb), 0.16), transparent 60%),
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.06), transparent 50%),
    var(--bg-card);
  padding: clamp(28px, 3.4vw, 52px);
  clip-path: polygon(0 14px, 14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px));
}
.p-case::before {
  content: '';
  position: absolute; left: 0; top: 0;
  width: 38%; height: 2px;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}
.p-case-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 14px; }
.p-case-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 36px);
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 16px;
}
.p-case-main > p { font-size: 15px; line-height: 1.65; color: var(--text-dim); max-width: 640px; }
.p-case .p-metrics {
  display: grid; grid-template-columns: 1fr; gap: 1px;
  margin: 0; padding: 0; border: 1px solid rgba(var(--accent-rgb), 0.25);
  background: rgba(var(--accent-rgb), 0.25);
}
.p-metric { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 16px 20px; background: rgba(0, 0, 0, 0.65); }
.p-metric b {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.5);
  white-space: nowrap;
  transition: color 0.4s ease;
}
.p-metric span { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); text-align: right; }
.p-case + .p-case, .p-case + .p-findings, .p-case + .p-cards { margin-top: clamp(10px, 1.2vw, 18px); }
@media (max-width: 880px) { .p-case { grid-template-columns: minmax(0, 1fr); } }

/* ----- находки плитками ----- */
.p-findings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 1vw, 16px); }
.p-finding {
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px 22px 20px;
  border: 1px solid var(--line-2);
  background: var(--bg-card);
  transition: transform 0.35s cubic-bezier(.19,1,.22,1), border-color 0.3s ease;
}
.p-finding:hover { transform: translateY(-4px); border-color: rgba(var(--accent-rgb), 0.6); }
.p-finding-n { font-family: 'Russo One', var(--font-mono); font-size: 13px; color: var(--text-mute); }
.p-finding h4 { font-family: var(--font-display); font-size: 16px; text-transform: uppercase; color: var(--text); }
.p-finding strong { font-family: var(--font-display); font-size: clamp(22px, 2vw, 30px); line-height: 1; color: var(--text-dim); }
.p-finding.is-loss { border-color: rgba(255, 77, 94, 0.35); background: linear-gradient(160deg, rgba(255, 77, 94, 0.08), transparent 55%), var(--bg-card); }
.p-finding.is-loss strong { color: #FF5A6A; text-shadow: 0 0 14px rgba(255, 90, 106, 0.45); }
.p-finding p { font-size: 13px; line-height: 1.55; color: var(--text-dim); }
@media (max-width: 960px) { .p-findings { grid-template-columns: 1fr; } }

/* ----- финальный блок ----- */
.p-final-box {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  background:
    radial-gradient(ellipse at 90% 10%, rgba(var(--accent-rgb), 0.28), transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(var(--accent-rgb), 0.12), transparent 50%),
    var(--bg-card);
  padding: clamp(32px, 5vw, 80px);
  text-align: left;
  clip-path: polygon(0 18px, 18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px));
}
.p-final-box::before {
  content: '';
  position: absolute; top: 0; left: -30%;
  width: 30%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 16px var(--accent);
  animation: finalRun 4s linear infinite;
}
@keyframes finalRun { to { left: 100%; } }
.p-final-box::after {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(var(--accent-rgb), 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--accent-rgb), 0.07) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(ellipse at 80% 30%, #000, transparent 65%);
  mask-image: radial-gradient(ellipse at 80% 30%, #000, transparent 65%);
  pointer-events: none;
}
.p-final-main, .p-final-steps { position: relative; z-index: 1; }
.p-final-box h2 { font-family: var(--font-display); font-size: clamp(30px, 4vw, 60px); text-transform: uppercase; line-height: 1; margin: 14px 0 20px; }
.p-final-box p { max-width: 560px; font-size: 16px; line-height: 1.6; color: var(--text-dim); margin-bottom: 32px; }
.p-final-steps { list-style: none; display: grid; gap: 10px; }
.p-final-steps li {
  display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; column-gap: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  background: rgba(0, 0, 0, 0.55);
}
.p-final-steps b { grid-row: span 2; align-self: center; font-family: 'Russo One', var(--font-mono); font-weight: 400; font-size: 28px; color: var(--accent); text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.5); }
.p-final-step { font-family: var(--font-display); font-size: 15px; text-transform: uppercase; color: var(--text); }
.p-final-text { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
@media (max-width: 880px) { .p-final-box { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .p-final-box::before { animation: none; } }

/* ----- таймлайн: узел и черта по одной оси, отступы вокруг примечаний ----- */
.p-tl-node::after { display: none; }
.p-timeline li::before {
  content: '';
  position: absolute;
  left: 26px; top: -20px;
  width: 2px; height: 20px;
  background: rgba(var(--accent-rgb), 0.55);
}
.p-section .p-note { margin: 24px 0 36px; }
.p-timeline + .p-note + .p-cards { margin-top: 0; }
@media (max-width: 720px) { .p-timeline li::before { display: none; } }
.p-case-main { min-width: 0; }
@media (max-width: 720px) {
  .p-case-title { font-size: clamp(17px, 5vw, 24px); overflow-wrap: break-word; hyphens: auto; }
  .p-metric { flex-direction: column; align-items: flex-start; gap: 6px; }
  .p-metric span { text-align: left; }
}
/* заголовки шагов таймлайна помещаются в карточку */
.p-tl-card { min-width: 0; }
.p-tl-title { font-size: clamp(12px, 0.95vw, 15px); overflow-wrap: break-word; hyphens: auto; }

/* ============================================================
   Экран продукта: схема на вымышленных данных (без анимаций и фильтров)
   ============================================================ */
.p-screen { margin: 0 0 clamp(12px, 1.4vw, 20px); border: 1px solid rgba(var(--accent-rgb), 0.35); background: rgba(0, 0, 0, 0.72); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03); }
.p-screen-bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.p-screen-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(var(--accent-rgb), 0.5); flex: none; }
.p-screen-bar span { margin-left: 8px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-screen-bar em { margin-left: auto; font-style: normal; color: var(--text-mute); white-space: nowrap; }
.p-screen-body { padding: clamp(16px, 2.4vw, 32px); display: grid; gap: clamp(16px, 2vw, 24px); }
.p-screen-foot { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--accent); border-top: 1px dashed rgba(var(--accent-rgb), 0.35); padding-top: 14px; }

.p-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.p-kpi { border: 1px solid var(--line); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.p-kpi b { font-family: 'Russo One', var(--font-display); font-weight: 400; font-size: clamp(22px, 2.2vw, 32px); color: var(--text); white-space: nowrap; }
.p-kpi span { font-size: 12px; color: var(--text-dim); }
.p-kpi.is-bad { border-color: rgba(255, 90, 78, 0.6); }
.p-kpi.is-bad b { color: #FF5A4E; }

.p-rows { display: grid; gap: 6px; }
.p-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.p-row-head { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mute); padding-top: 0; }
.p-row-name { color: var(--text); }
.p-row-note { color: var(--text-dim); }
.p-row.is-bad .p-row-note { color: #FF5A4E; }
.p-bar { position: relative; height: 10px; background: rgba(255, 255, 255, 0.07); }
.p-bar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.p-row.is-bad .p-bar i { background: rgba(var(--accent-rgb), 0.55); }
.p-bar s { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #fff; text-decoration: none; }
.p-row.is-bad .p-bar s { background: #FF5A4E; }

.p-wf { display: grid; gap: 8px; }
.p-wf-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) 90px; gap: 16px; align-items: center; font-size: 13px; color: var(--text); }
.p-wf-bar { height: 14px; background: rgba(255, 255, 255, 0.05); }
.p-wf-bar i { display: block; height: 100%; background: var(--accent); }
.p-wf-row.is-loss .p-wf-bar i { background: #FF5A4E; }
.p-wf-row.is-loss b { color: #FF5A4E; }
.p-wf-row.is-total { padding-top: 8px; border-top: 1px solid var(--line); }
.p-wf-row b { font-family: 'Russo One', var(--font-display); font-weight: 400; font-size: 16px; text-align: right; white-space: nowrap; }

.p-chat { display: grid; gap: 10px; }
.p-msg { max-width: 82%; padding: 12px 16px; font-size: 14px; line-height: 1.5; border: 1px solid var(--line); }
.p-msg.is-q { justify-self: end; background: rgba(var(--accent-rgb), 0.12); border-color: rgba(var(--accent-rgb), 0.4); }
.p-msg.is-a { justify-self: start; background: rgba(255, 255, 255, 0.03); }
.p-src { display: inline-block; margin: 10px 8px 0 0; padding: 3px 8px; font-family: var(--font-mono); font-size: 11px; color: var(--accent); border: 1px solid rgba(var(--accent-rgb), 0.45); }

.p-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.p-bcol { display: grid; gap: 8px; align-content: start; padding: 12px; background: rgba(255, 255, 255, 0.02); border: 1px solid var(--line); }
.p-bcol-head { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute); }
.p-bcard { padding: 10px 12px; font-size: 13px; color: var(--text); border: 1px solid var(--line); border-left: 3px solid rgba(var(--accent-rgb), 0.6); background: rgba(0, 0, 0, 0.5); }
.p-bcard.is-check { border-left-color: var(--accent); }
.p-bcard.is-late { border-left-color: #FF5A4E; }
.p-bcard.is-ok { border-left-color: #00FF66; color: var(--text-dim); }

/* Вкладки по нишам */
.p-tab-btns { margin-bottom: clamp(14px, 1.6vw, 22px); }
.p-tab-panel { display: grid; gap: clamp(12px, 1.4vw, 20px); }
.p-tab-panel[hidden] { display: none !important; }

@media (max-width: 720px) {
  .p-screen-bar em { display: none; }
  .p-kpis { grid-template-columns: 1fr; }
  .p-row { grid-template-columns: 1fr; gap: 6px; }
  .p-row-head { display: none; }
  .p-wf-row { grid-template-columns: minmax(0, 1fr) 80px; }
  .p-wf-bar { grid-column: 1 / -1; grid-row: 2; }
  .p-msg { max-width: 100%; }
  .p-board { grid-template-columns: 1fr; }
}

/* ============================================================
   Интерактив: каскад маржи, чат Эхо, расшифровка, функции Штаба
   ============================================================ */
.p-hint { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); }
.p-screen .p-tabs .cs-chips button { font-size: 11px; }
@keyframes pGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.p-tab-panel:not([hidden]) .p-wf-bar i { transform-origin: left center; animation: pGrow 0.7s cubic-bezier(.19,1,.22,1) both; }
.p-tab-panel:not([hidden]) .p-wf-row:nth-child(2) .p-wf-bar i { animation-delay: 0.15s; }
.p-tab-panel:not([hidden]) .p-wf-row:nth-child(3) .p-wf-bar i { animation-delay: 0.3s; }
.p-tab-panel:not([hidden]) .p-wf-row:nth-child(4) .p-wf-bar i { animation-delay: 0.45s; }
.p-tab-panel:not([hidden]) .p-wf-row:nth-child(5) .p-wf-bar i { animation-delay: 0.6s; }
details.p-wf-row { display: block; }
details.p-wf-row > summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) 90px; gap: 16px; align-items: center; cursor: pointer; list-style: none; padding: 4px 0; }
details.p-wf-row > summary::-webkit-details-marker { display: none; }
details.p-wf-row > summary .p-wf-label::after { content: " +"; color: #FF5A4E; }
details.p-wf-row[open] > summary .p-wf-label::after { content: " −"; }
details.p-wf-row > summary:hover .p-wf-label { color: #FF5A4E; }
.p-wf-detail { margin: 6px 0 4px; padding: 10px 14px; font-size: 13px; color: var(--text); border-left: 2px solid #FF5A4E; background: rgba(255, 90, 78, 0.08); }

.p-chatbox { display: grid; gap: 14px; }
.p-chat { min-height: 150px; align-content: start; }
.p-qs { display: flex; flex-wrap: wrap; gap: 8px; }
.p-q { font: inherit; font-size: 13px; text-align: left; color: var(--text); background: transparent; border: 1px solid rgba(var(--accent-rgb), 0.45); padding: 10px 14px; cursor: pointer; }
.p-q:hover, .p-q.is-active { background: rgba(var(--accent-rgb), 0.16); border-color: var(--accent); }
.p-msg small { display: block; margin-bottom: 4px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); }
.p-typing { display: inline-flex; gap: 4px; }
.p-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.3; animation: pDot 1s infinite; }
.p-typing i:nth-child(2) { animation-delay: 0.2s; } .p-typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes pDot { 50% { opacity: 1; } }

.p-tr { margin-top: clamp(16px, 2vw, 24px); }
.p-tr-top { display: flex; align-items: center; gap: 16px; }
.p-tr-play { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: #000; background: var(--accent); border: 0; padding: 12px 18px; cursor: pointer; white-space: nowrap; }
.p-tr-play:disabled { opacity: 0.5; cursor: default; }
.p-tr-prog { flex: 1; height: 6px; background: rgba(255, 255, 255, 0.08); }
.p-tr-prog i { display: block; height: 100%; width: 0; background: var(--accent); }
.p-tr-lines { display: grid; gap: 8px; min-height: 40px; }
.p-tr-line { display: grid; grid-template-columns: 48px 120px minmax(0, 1fr); gap: 12px; font-size: 14px; }
.p-tr-line time { font-family: var(--font-mono); font-size: 12px; color: var(--text-mute); }
.p-tr-line b { font-weight: 500; color: var(--accent); }
.p-tr-proto { display: grid; gap: 6px; padding: 16px; border: 1px solid rgba(var(--accent-rgb), 0.5); background: rgba(var(--accent-rgb), 0.08); font-size: 14px; }
.p-tr-proto b { color: var(--accent); font-weight: 500; }

.p-tabs-side { display: grid; grid-template-columns: minmax(220px, 0.8fr) minmax(0, 2fr); gap: clamp(12px, 1.6vw, 24px); align-items: start; }
.p-tabs-side .p-tab-btns { flex-direction: column; flex-wrap: nowrap; margin: 0; }
.p-tabs-side .p-tab-btns button { text-align: left; padding: 14px 16px; font-size: 13px; }
.p-tabs-side .p-tab-panel { grid-column: 2; grid-row: 1; }
.p-mini { display: grid; gap: 12px; padding: clamp(16px, 2.4vw, 28px); border: 1px solid rgba(var(--accent-rgb), 0.35); background: rgba(0, 0, 0, 0.72); min-height: 260px; align-content: start; }
.p-arrow-down { color: var(--accent); font-size: 20px; text-align: center; }
.p-relay { list-style: none; display: grid; gap: 8px; margin-top: 12px; }
.p-relay-step { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 10px 14px; border: 1px solid var(--line); opacity: 0.35; font-size: 13px; }
.p-relay-step b { font-weight: 500; }
.p-relay-step.is-done { opacity: 1; border-color: rgba(var(--accent-rgb), 0.6); }
.p-relay-step.is-done.is-warn { border-color: #FF5A4E; color: #FF5A4E; }
.p-relay-step.is-done:last-child { background: rgba(var(--accent-rgb), 0.14); }

/* Телефон: крупнее и без простыни карточек — группы листаются вбок */
@media (max-width: 720px) {
  .p-cards { display: flex !important; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin-right: calc(-1 * var(--pad-x)); padding-right: var(--pad-x); scrollbar-width: none; }
  .p-cards::-webkit-scrollbar { display: none; }
  .p-cards > .method-card { flex: 0 0 84%; scroll-snap-align: start; }
  .p-screen-body, .p-mini { font-size: 15px; }
  .p-row, .p-wf-row, .p-bcard, .p-relay-step, .p-tr-line, .p-msg, .p-q { font-size: 15px; }
  details.p-wf-row > summary { grid-template-columns: minmax(0, 1fr) 80px; }
  details.p-wf-row > summary .p-wf-bar { grid-column: 1 / -1; grid-row: 2; }
  .p-tr-line { grid-template-columns: 44px minmax(0, 1fr); }
  .p-tr-line span { grid-column: 1 / -1; }
  .p-tabs-side { grid-template-columns: 1fr; }
  .p-tabs-side .p-tab-btns { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .p-tabs-side .p-tab-btns button { flex: none; }
  .p-tabs-side .p-tab-panel { grid-column: 1; grid-row: auto; }
  .p-relay-step { grid-template-columns: 1fr; gap: 2px; }
}

/* Кнопка действия на экране: значения «до / после» */
.p-sw .v1 { display: none; }
.is-acted .p-sw .v0 { display: none; }
.is-acted .p-sw .v1 { display: inline; }
.p-bar i[style*="--w0"] { width: var(--w0); transition: width 0.7s cubic-bezier(.19,1,.22,1); }
.is-acted .p-bar i[style*="--w1"] { width: var(--w1); }
.is-acted .p-row.is-fix .p-row-note { color: #00FF66; }
.is-acted .p-row.is-fix .p-bar i { background: var(--accent); }
.is-acted .p-row.is-fix .p-bar s { background: #fff; }
.is-acted .p-kpi.is-fix { border-color: rgba(0, 255, 102, 0.6); }
.is-acted .p-kpi.is-fix b { color: #00FF66; }
.p-act-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }

/* Панель проверки / подключения: продуктовый вид, шаги появляются по очереди */
.p-term { margin-top: clamp(16px, 2vw, 24px); border: 1px solid rgba(var(--accent-rgb), 0.35); background: rgba(0, 0, 0, 0.72); }
.p-term-body { padding: clamp(16px, 2.4vw, 28px); display: grid; gap: 10px; min-height: 260px; align-content: start; }
.p-term-line { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 16px; font-size: 15px; color: var(--text); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); overflow: hidden; }
.p-term .p-term-line { opacity: 0; transform: translateY(6px); transition: opacity 0.35s ease, transform 0.35s ease; }
.p-term .p-term-line.is-on { opacity: 1; transform: none; }
.p-term-line i { display: grid; place-items: center; width: 32px; height: 32px; font-style: normal; font-weight: 700; border: 1px solid rgba(var(--accent-rgb), 0.5); color: var(--accent); }
.p-term-line u { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.p-term-line.is-on u { transform: scaleX(1); transition: transform 0.6s ease; }
.p-term-line.is-file { color: var(--text-dim); }
.p-term-line.is-ok i { color: #00FF66; border-color: rgba(0, 255, 102, 0.6); }
.p-term-line.is-warn { border-color: rgba(255, 90, 78, 0.45); background: rgba(255, 90, 78, 0.07); }
.p-term-line.is-warn i { color: #FF5A4E; border-color: #FF5A4E; }
.p-term-line.is-done { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.14); font-weight: 500; }
.p-term-line.is-done i { color: #000; background: var(--accent); border-color: var(--accent); }

/* Калькулятор потерь */
.p-calc { margin-top: clamp(16px, 2vw, 24px); padding: clamp(20px, 3vw, 36px); border: 1px solid rgba(var(--accent-rgb), 0.45); background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.10), rgba(0, 0, 0, 0.6) 60%); }
.p-calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(16px, 2vw, 28px); align-items: end; margin-top: 14px; }
.p-calc-in { display: grid; grid-template-columns: 1fr auto; gap: 10px; font-size: 14px; color: var(--text-dim); }
.p-calc-in output { font-family: 'Russo One', var(--font-display); font-size: 20px; color: var(--text); }
.p-calc-in input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); height: 28px; }
.p-calc-out { display: grid; gap: 4px; }
.p-calc-out b { font-family: 'Russo One', var(--font-display); font-weight: 400; font-size: clamp(30px, 3.4vw, 48px); color: var(--accent); line-height: 1; white-space: nowrap; }
.p-calc-out span { font-size: 13px; color: var(--text-dim); }
.p-calc-note { margin-top: 16px; font-size: 12px; color: var(--text-mute); }
@media (max-width: 720px) { .p-term-body { font-size: 13px; } .p-calc-in { font-size: 15px; } }

/* Выбор отрасли на первом экране */
.p-ind { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: clamp(24px, 3vw, 36px); padding: 14px 16px; border: 1px solid rgba(var(--accent-rgb), 0.35); background: rgba(var(--accent-rgb), 0.06); max-width: 860px; }
.p-ind-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); }
.p-ind .cs-chips button { padding: 10px 16px; }
.p-ind-sub { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--text-dim); margin-bottom: 4px; }
.p-ind-panel[hidden] { display: none !important; }
@media (max-width: 720px) { .p-ind { padding: 12px; } .p-ind .cs-chips { display: grid; grid-template-columns: 1fr 1fr; width: 100%; } .p-ind .cs-chips button { padding: 12px 8px; text-align: center; } }
