/* =========================================================================
   Общие блоки трёх страниц разработки (лендинг, сайт услуг, магазин).
   Мотив — чертёж: пунктирный каркас, линейки, отметки приёмки.
   Без JS и при prefers-reduced-motion все блоки показаны в конечном состоянии.
   Класс .is-armed ставит скрипт scenes/devkit.js, когда берёт анимацию на себя.
   ========================================================================= */

.stage-note { margin: 14px 0 0; color: var(--fg-dim); font-size: var(--step--1); }
.example-tag { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-dim); font-size: var(--step--1); }
.example-tag::before { content: ""; width: 10px; height: 10px; border-radius: 3px; border: 1.5px dashed currentColor; }

/* ---------- кто что делает ---------- */
.roles { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 20px; margin-top: 28px; }
.role { padding: clamp(20px, 2.6vw, 28px); border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); }
.role h3 { font-size: var(--step-1); font-weight: 650; margin-bottom: 14px; }
.role ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.role li { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.92rem; line-height: 1.35; }
.role--me li { border-color: rgba(255, 176, 32, 0.55); background: rgba(255, 176, 32, 0.08); }
.role p { margin: 14px 0 0; color: var(--fg-soft); font-size: 0.95rem; }
.scope .roles { grid-template-columns: 1fr; }
.price .cost .num.num--range { font-size: clamp(1.7rem, 1.35rem + 1.3vw, 2.4rem); white-space: nowrap; }

/* ---------- паспорт передачи ---------- */
.handover { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.passport { position: relative; padding: clamp(18px, 2.4vw, 28px); border-radius: var(--radius-lg); background: var(--night); color: #eef2fb; border: 1px solid var(--night-line); box-shadow: 0 40px 80px -40px rgba(11, 19, 36, 0.55); }
.pp-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.pp-head b { display: block; font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.pp-head small { color: var(--fog); font-size: 0.86rem; }
.pp-lock { width: 104px; height: 56px; flex: none; overflow: visible; }
.pp-plate { fill: var(--night-3); stroke: var(--ok); stroke-width: 2; transition: fill .4s, stroke .4s; }
.pp-hole { fill: var(--night); }
.pp-keyg { fill: none; stroke: var(--signal); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.pp-keyg .pp-bow { fill: rgba(255, 176, 32, 0.14); }
.passport.is-armed:not(.is-open) .pp-plate { stroke: var(--night-line); }
.pp-rows { list-style: none; display: grid; gap: 8px; }
.pp-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; border-radius: 12px; background: var(--night-2); border: 1px solid transparent; transition: border-color .35s; }
.pp-row b { display: block; font-weight: 600; line-height: 1.3; }
.pp-row small { display: block; color: var(--fog); font-size: 0.84rem; line-height: 1.35; }
.pp-key { width: 22px; height: 22px; color: var(--ok); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .55s var(--ease-out), color .3s; }
.pp-tag { padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; background: rgba(47, 191, 138, 0.15); color: #7fe0bb; transition: background-color .3s, color .3s; }
.pp-tag .w { display: none; }
.passport.is-armed .pp-row:not(.is-done) .pp-key { color: var(--fog-dim); transform: rotate(-90deg); }
.passport.is-armed .pp-row:not(.is-done) .pp-tag { background: rgba(255, 255, 255, 0.05); color: #8a96b4; }
.passport.is-armed .pp-row:not(.is-done) .pp-tag .d { display: none; }
.passport.is-armed .pp-row:not(.is-done) .pp-tag .w { display: inline; }
.passport.is-armed .pp-row.is-done { border-color: rgba(47, 191, 138, 0.3); }
.pp-foot { margin: 16px 0 0; color: var(--fog); font-size: 0.86rem; }

/* ---------- карточка кода ---------- */
.codewrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.codecard { margin: 0; border-radius: var(--radius-lg); background: #070d1a; color: #cdd6ea; border: 1px solid var(--night-line); overflow: hidden; box-shadow: 0 40px 80px -44px rgba(11, 19, 36, 0.6); }
.codecard-top { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--night-2); color: var(--fog); font-size: 0.8rem; }
.codecard-top i { width: 9px; height: 9px; border-radius: 50%; background: var(--night-line); }
.codecard-top span { margin-left: 8px; }
.codecard pre { margin: 0; padding: 14px 0 16px; font: 500 0.8rem/1.7 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.codecard code { display: block; }
.cl { display: block; padding: 0 16px 0 13px; border-left: 3px solid transparent; white-space: pre-wrap; overflow-wrap: anywhere; transition: background-color .35s, border-color .35s; }
.cl.is-on { background: rgba(255, 176, 32, 0.1); border-left-color: var(--signal); }
.cl .t { color: #8eabff; }
.cl .a { color: #aab5cf; }
.cl .s { color: #ffd38a; }
.cl .k { color: #7fe0bb; }
.cl .c { color: #7d89a8; }
.codecard figcaption { padding: 10px 16px 14px; color: var(--fog-dim); font-size: 0.8rem; border-top: 1px solid var(--night-line); }
.cc-notes { list-style: none; display: grid; gap: 10px; }
.cc-notes li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); transition: border-color .35s, opacity .35s, transform .35s var(--ease-out); }
.cc-notes .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 0.82rem; font-weight: 700; }
.cc-notes b { display: block; font-weight: 600; line-height: 1.35; }
.cc-notes span { color: var(--fg-soft); font-size: 0.95rem; }
[data-codecard].is-armed .cc-notes li { opacity: 0.82; }
[data-codecard].is-armed .cc-notes li.is-on { opacity: 1; border-color: var(--signal); transform: translateX(4px); }
[data-codecard].is-armed .cc-notes li.is-on .n { background: var(--signal); color: var(--ink); }

/* ---------- замер скорости с датой ---------- */
.speed { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.speed .checks { margin-top: 26px; }
.act { position: relative; display: grid; gap: 20px; padding: clamp(20px, 3vw, 32px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.act-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: baseline; }
.act-top b { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); letter-spacing: -0.02em; }
.act-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 0.9rem; }
.act-meta dt { color: var(--fg-dim); }
.act-meta dd { margin: 0; font-weight: 600; }
.act-meta .date { display: inline-flex; padding: 1px 8px; border-radius: 6px; background: rgba(255, 176, 32, 0.16); }
.scale-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.scale-top b { font-weight: 600; }
.scale-top small { display: block; color: var(--fg-dim); font-size: 0.82rem; }
.scale-top .num { font-size: var(--step-2); white-space: nowrap; }
.scale-bar { position: relative; display: flex; height: 12px; }
.scale-bar > i { height: 100%; }
.scale-bar > i:first-child { border-radius: 6px 0 0 6px; }
.scale-bar > i:nth-child(3) { border-radius: 0 6px 6px 0; }
.z-good { background: rgba(47, 191, 138, 0.6); }
.z-mid { background: rgba(255, 176, 32, 0.55); }
.z-bad { background: rgba(255, 107, 91, 0.5); }
.scale-limit { position: absolute; top: -7px; bottom: -7px; width: 2px; background: var(--fg); border-radius: 1px; }
.scale-mark { --v: 0%; position: absolute; top: 50%; left: var(--v); width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: var(--surface); border: 4px solid var(--fg); box-shadow: 0 6px 14px -6px rgba(11, 19, 36, 0.5); }
.scale-legend { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; color: var(--fg-dim); font-size: 0.78rem; }
.act-stamp { position: absolute; right: clamp(14px, 2vw, 28px); top: clamp(76px, 7vw, 96px); padding: 6px 12px; border-radius: 10px; border: 2px solid var(--ok); color: #1d7d59; font-weight: 700; font-size: 0.82rem; transform: rotate(-6deg); }
.zone-night .act-stamp { color: #7fe0bb; }
.act-note { margin: 0; color: var(--fg-dim); font-size: var(--step--1); }

/* ---------- план работ по дням и неделям ---------- */
.plan { --cols: 10; position: relative; }
.plan .gantt-days, .plan .gantt-track { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
.plan .gantt-track::before { background: repeating-linear-gradient(90deg, var(--surface-2) 0 calc(100% / var(--cols) - 4px), transparent calc(100% / var(--cols) - 4px) calc(100% / var(--cols))); }
.plan .gantt-track > * { grid-row: 1; }
.plan .gantt-bar { transform-origin: left center; }
.plan .gantt-bar.extra { background: repeating-linear-gradient(135deg, rgba(76, 125, 255, 0.35) 0 7px, transparent 7px 13px); box-shadow: inset 0 0 0 1.5px var(--flow); }
.plan-gate { position: relative; z-index: 2; align-self: center; justify-self: end; width: 18px; height: 18px; margin-right: -11px; }
.plan-gate::before { content: ""; position: absolute; inset: 1px; background: var(--signal); border: 3px solid var(--bg); transform: rotate(45deg); box-shadow: 0 0 0 1.5px var(--signal); }
.plan-gate.ok::before { background: var(--ok); box-shadow: 0 0 0 1.5px var(--ok); }
.plan-head { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--signal); box-shadow: 0 0 12px rgba(255, 176, 32, 0.7); pointer-events: none; opacity: 0; }
.plan-head::before { content: ""; position: absolute; left: -5px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--signal); }
.plan-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; color: var(--fg-soft); font-size: 0.93rem; }
.plan-legend li { display: inline-flex; align-items: center; gap: 10px; }
.plan-legend i { display: inline-block; width: 22px; height: 12px; border-radius: 4px; background: var(--flow); }
.plan-legend i.l-launch { background: var(--signal); }
.plan-legend i.l-extra { background: repeating-linear-gradient(135deg, rgba(76, 125, 255, 0.35) 0 5px, transparent 5px 9px); box-shadow: inset 0 0 0 1.5px var(--flow); }
.plan-legend i.l-gate { width: 12px; height: 12px; border-radius: 0; margin: 0 5px; background: var(--signal); transform: rotate(45deg); }
.plan-legend i.l-ok { width: 12px; height: 12px; border-radius: 0; margin: 0 5px; background: var(--ok); transform: rotate(45deg); }
.plan-note { margin-top: 14px; color: var(--fg-dim); font-size: var(--step--1); }

/* ---------- последовательные отметки списка ---------- */
[data-checkseq].is-armed li svg { opacity: 0.25; transform: scale(0.6); transition: opacity .3s, transform .45s var(--ease-out); }
[data-checkseq].is-armed li.is-on svg { opacity: 1; transform: none; }

@media (max-width: 1080px) {
  .handover, .codewrap, .speed, .roles { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .plan-head { display: none; }
  .pp-row { grid-template-columns: 22px minmax(0, 1fr); }
  .pp-tag { grid-column: 2; justify-self: start; }
  .pp-lock { width: 84px; height: 46px; }
  .act-stamp { position: static; justify-self: start; }
}
