/* Концепт 18 «Цифровой двойник линий маркировки»: интерактивная проверка правил (marking-twin.js) */
.tw-sim{display:none;margin-top:18px;border:1px solid var(--line);border-radius:var(--r);background:#fff;box-shadow:var(--sh);overflow:hidden}
.tw-sim.is-on{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.tw-in{padding:22px 24px;display:flex;flex-direction:column;gap:18px;border-right:1px solid var(--line)}
.tw-in label{display:flex;flex-direction:column;gap:8px;font-size:15px;color:var(--ink-2)}
.tw-in .tw-l{display:flex;justify-content:space-between;gap:12px}
.tw-in output{font-family:var(--f-m);font-weight:600;color:var(--ink)}
.tw-in input[type=range]{width:100%;accent-color:var(--brand);margin:0;min-height:28px}
.tw-out{padding:22px 24px;background:var(--bg);display:flex;flex-direction:column;gap:12px}
.tw-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.tw-head h3{margin:0;font-size:20px}
.tw-st{font-size:13.5px;font-weight:600;border-radius:999px;padding:4px 12px;background:var(--green);color:#fff}
.tw-st[data-s=warn]{background:var(--yellow);color:var(--ink)}
.tw-st[data-s=bad]{background:var(--red)}
.tw-big{font-size:15px;color:var(--muted)}
.tw-big b{font-family:var(--f-m);font-size:22px;color:var(--ink);display:block;margin-top:2px}
.tw-rules{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.tw-rules li{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:start;background:#fff;border:1px solid var(--line);border-radius:8px;padding:10px 12px;font-size:14.5px;line-height:1.45}
.tw-rules li::before{content:"";width:12px;height:12px;border-radius:50%;margin-top:4px;background:var(--line-2)}
.tw-rules li.is-hit{border-color:var(--brand)}
.tw-rules li.is-hit::before{background:var(--brand)}
.tw-rules li b{display:block}
.tw-note{font-size:13.5px;color:var(--muted);margin:0}
@media (max-width:760px){.tw-sim.is-on{grid-template-columns:1fr}.tw-in{border-right:0;border-bottom:1px solid var(--line)}}
.tw-fig{margin:20px 0 0;max-width:1040px}
.tw-fig img{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:var(--r);background:#fff}
.tw-fig figcaption{margin-top:8px;font-size:13.5px;color:var(--muted)}
.tw-fig--narrow{max-width:820px}
.tw-try{margin:26px 0 0;font-size:20px}
.tw-fig{margin-bottom:22px}
.cp-hero-img .tw-cap{font-size:12.5px;color:var(--muted);margin-top:6px;text-align:right}
.cp-hero-img--photo{flex-direction:column;align-items:stretch}
.tw-in input[type=range]{min-height:44px}
.tw-chip{display:none;align-self:flex-start;font-size:13px;font-weight:600;color:#fff;background:var(--brand-d);border-radius:999px;padding:3px 10px;margin-top:-6px}
.tw-chip.is-hit{display:inline-block}
.tw-rules li.is-hit{background:var(--brand-soft)}
.tw-rules li.is-hit b::after{content:" · сработало";color:var(--brand-d)}
.tw-out.is-stale .tw-big b{color:var(--muted)}
.tw-out.is-stale .tw-big::after{content:"последние известные данные";display:block;font-size:12.5px;color:var(--muted)}
.tw-st[data-s=off]{background:var(--muted)}
