/* Макет 2.0: общие классы поверх настоящего app.css (body.v5). SPEC 7.2 + оболочка (.acct, .acct-menu).
   Слой 1 — переменные. Слой 2 — детали из шаблона кабинета, которых нет в app.css (значения те же, что в шаблоне).
   Слой 3 — новые классы 7.2 (.src .fnd .cnt .frm .stp .fh-st .fold) и модификаторы. Слой 4 — оболочка (панель макета убрана). Слой 5 — телефон. */

/* ───────────────────────── 1. Переменные ───────────────────────── */
:root {
  --m2-red: #DC2626; --m2-red-bg: #FEF2F2; --m2-red-line: #FECACA; --m2-red-ink: #991B1B;
  --m2-green: #0B7A6D; --m2-green-bg: #E7F7F4;
  --m2-violet: #5B3FD1; --m2-violet-bg: #F1EEFF;
  --m2-gray: #475569; --m2-gray-bg: #F1F5F9;
  --m2-a1-bg: #E4ECFD; --m2-a1: #1A45C0;
  --m2-a2-bg: #EFEAFE; --m2-a2: #5B3FD1;
  --m2-a3-bg: #E3F5EF; --m2-a3: #0B7A6D;
  --m2-a4-bg: #FFF1E5; --m2-a4: #B45309;
  --m2-a5-bg: #E0F3F7; --m2-a5: #0E6F85;
  --m2-a6-bg: #F1F5F9; --m2-a6: #475569;
}
/* Окна видны на любом месте фона (10.10, основатель: «окошко сливается с фоном там, где преобладает белый»). У стекла была
   белая рамка и 54 % белого: на светлых местах авроры край пропадал, контур и глубина были только на цветном. Теперь рамка —
   тонкая тёмная линия (как в запасном виде app.css без размытия), окно почти белое, тень и сверху, и снизу, а светлая
   подложка авроры на тон темнее (#e8f0fe → #e0e7f6). Та же рамка у полей ввода, поиска, кнопок «призрак» и полосы
   вкладок — они тоже берут --glass-brd. */
body.v5 {
  --glass: rgba(255,255,255,.74); --glass-2: rgba(255,255,255,.88);
  --glass-brd: rgba(28,52,110,.12);
  --sh: 0 1px 3px rgba(28,52,110,.08), 0 10px 28px rgba(28,52,110,.10);
}
body.v5 .aurora {
  background:
    radial-gradient(40% 44% at 18% 14%, rgba(29,78,216,.50), transparent 58%),
    radial-gradient(42% 46% at 84% 14%, rgba(255,122,77,.46), transparent 58%),
    radial-gradient(48% 52% at 74% 84%, rgba(124,92,255,.42), transparent 58%),
    radial-gradient(46% 50% at 20% 90%, rgba(18,165,148,.32), transparent 58%),
    linear-gradient(180deg, #e0e7f6, #d9e1f3);
}
/* полоса вкладок остаётся полупрозрачной: на плотном белом белая активная вкладка терялась */
body.v5 .wtabs { background: rgba(255,255,255,.45); }

/* ───────────────────────── 2. Детали шаблона (нет в app.css) ───────────────────────── */
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.cap { font-size: 11.5px; color: var(--muted); }
.block { margin-bottom: 28px; }
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn .i { width: 16px; height: 16px; }
.gl { width: 16px; height: 16px; flex: none; fill: currentColor; }
.gl.st { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.c-tg { color: #26A5E4; } .c-vk { color: #0077FF; } .c-max { color: #2E5397; } .c-av { color: #00A0E8; } .c-pg { color: #5B6B85; } .c-dz { color: #000; } .c-wp { color: #21759B; }

.pill { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill.ok { background: #F0FDF4; color: #15803D; }
.pill.warn { background: #FFF7ED; color: #C2410C; }
.pill.err { background: #FEF2F2; color: #DC2626; }
.pill.mut { background: #F1F5F9; color: #64748B; }
.pill.bo { background: #FFF3EC; color: #C2410C; }
.pill.info { background: var(--blue-soft); color: var(--blue-ink); }
.topbar .pill { flex: none; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px; }
.tile { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 16px 17px; box-shadow: 0 1px 3px rgba(16, 24, 40, .05); }
.tile .n { font-family: var(--font-head); font-weight: 800; font-size: 28px; line-height: 1; color: #0F172A; }
.tile .l { font-size: 12.5px; color: var(--muted); margin-top: 7px; }
.tile .s { font-size: 11.5px; color: #94A3B8; margin-top: 3px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; text-align: right; }
.meter { height: 8px; border-radius: 999px; background: #EEF1F6; overflow: hidden; margin: 8px 0 2px; }
.meter > i { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.meter.full > i { background: var(--m2-red); }

.t3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); gap: 12px; }
.tc { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; padding: 14px 15px; background: var(--surface); }
body.v5 .tc { background: var(--glass-2); border: 1px solid var(--glass-brd); box-shadow: var(--hi), var(--sh); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.tc.cur, body.v5 .tc.cur { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue) inset; }
.tc .tn { font-family: var(--font-head); font-weight: 700; font-size: 15px; }
.tc .tp { font-weight: 800; font-size: 24px; letter-spacing: -.02em; margin: 4px 0 2px; }
.tc .tp i { font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); }
.tc .td { font-size: 11.5px; color: var(--ink); line-height: 1.4; margin: 6px 0 0; }
.tc .tm { flex: 1; font-size: 11.5px; color: var(--muted); line-height: 1.45; margin: 6px 0 11px; min-height: 34px; }
.tc .pw { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.tc .pw .btn { white-space: normal; text-align: center; line-height: 1.3; }

.pc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 20px; } /* auto-fit: две площадки — на всю ширину, без пустой колонки */
.pc-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--card, #fff); display: flex; flex-direction: column; gap: 10px; }
.pc-top { display: flex; align-items: center; gap: 10px; }
.pc-top .pc-t { flex: 1; min-width: 0; }
.pc-top h3 { margin: 0; font-size: 15px; }
.pc-sub { font-size: 12.5px; color: var(--muted); word-break: normal; overflow-wrap: anywhere; }
.pc-badge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.pc-badge.on { background: #ECFDF5; color: #047857; }
.pc-badge.off { background: #F1F3F7; color: #5B6B85; }
.pc-badge.err { background: var(--m2-red-bg); color: var(--m2-red); }
.pc-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.pc-acts .btn { font-size: 13px; }
.pc-tip { font-size: 12px; color: var(--muted); margin: 0; }
.fmt-lab { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.fmts { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.fmts label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); cursor: pointer; }
.fmts label.off { color: var(--faint); cursor: not-allowed; }

body.v5 .card .btn-ghost, body.v5 .pc-card .btn-ghost, body.v5 .tc .btn-ghost, body.v5 .card .icon-btn { border-color: #C9D6EE; }
body.v5 .btn-ghost.btn-danger { color: #DC2626; border-color: #FECACA; }
.card-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.stack-18 { display: flex; flex-direction: column; gap: 18px; }
.rad { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid rgba(28, 52, 110, .16); border-radius: 12px; background: rgba(255, 255, 255, .55); font-size: 13.5px; font-weight: 500; color: var(--body-ink); cursor: pointer; }
.rad input { accent-color: var(--blue); width: 16px; height: 16px; margin: 0; flex: none; }
.rad.on { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-ink); font-weight: 600; }
.rads { display: flex; flex-direction: column; gap: 8px; }
.rads.row { flex-direction: row; flex-wrap: wrap; }
.addcard { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 140px; border: 1.5px dashed rgba(28, 52, 110, .22); border-radius: var(--r-lg); background: rgba(255, 255, 255, .35); color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: border-color .15s, color .15s; }
.addcard:hover { border-color: var(--blue); color: var(--blue); }
.addcard .i { width: 18px; height: 18px; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 12px; font-weight: 500; color: var(--body-ink); }
.pchip .gl, .pchip .i { width: 14px; height: 14px; }
.chip-pick .cp { cursor: default; }
.chip-pick .cp .i { width: 15px; height: 15px; }

/* Завод: шапка, строки плана */
.fcard-x { margin-bottom: 18px; }
.fh { display: flex; gap: 16px 24px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.fh-l { flex: 1 1 320px; min-width: 0; }
.fh-nm { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fh-nm h2 { font-size: 20px; font-weight: 800; color: var(--ink); }
.fh-nm .icon-btn { width: 30px; height: 30px; border-radius: 9px; }
.fh-nm .icon-btn .i { width: 14px; height: 14px; }
.fh-cnt { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.fh-btns { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.fh-run { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pl-top { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 14px; }
body.v5 .pl-top { padding: 14px 18px; }
.pl-top p { margin: 0; font-size: 14px; color: var(--muted); }
.pl-top p b { color: var(--ink); font-weight: 700; }
.pl-top .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pl-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--muted); margin: 0 2px 10px; }
.pl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ld { width: 8px; height: 8px; border-radius: 50%; background: #94A3B8; flex: none; }
.ld.w { background: var(--blue); } .ld.d { background: #16A34A; } .ld.e { background: #DC2626; }
.pl-list { list-style: none; margin: 0; padding: 0; }
.pl-row { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto auto; gap: 6px 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.pl-row:first-child { border-top: 0; padding-top: 2px; }
.pl-bd { min-width: 0; }
.pl-dt b { display: block; font-size: 13px; color: var(--ink); font-weight: 600; }
.pl-dt span { font-size: 12px; font-weight: 700; color: var(--blue); }
.pl-tp { font-weight: 600; color: var(--ink); font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.pl-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 5px; font-size: 12px; color: var(--muted); }
.pl-q { display: inline-flex; align-items: center; gap: 5px; }
.pl-q .i { width: 13px; height: 13px; color: var(--faint); }
.pl-marks { display: flex; gap: 10px; min-width: 110px; padding-right: 4px; }
.pmk { position: relative; width: 30px; height: 30px; border: 1px solid #C9D6EE; border-radius: 9px; display: inline-grid; place-items: center; background: #fff; }
.pmk .gl { width: 16px; height: 16px; }
.sdot { position: absolute; right: -4px; top: -4px; width: 11px; height: 11px; border-radius: 50%; background: #94A3B8; border: 2px solid #fff; }
.s-p .sdot { background: #94A3B8; } .s-w .sdot { background: var(--blue); } .s-d .sdot { background: #16A34A; } .s-e .sdot { background: #DC2626; }
.pl-go .btn .i { width: 14px; height: 14px; }
.pl-foot { margin: 12px 2px 0; font-size: 12px; color: var(--muted); }
.q-card { display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; margin-top: 18px; }
.q-card h3 { font-size: 15px; margin-bottom: 4px; }
.q-card p { margin: 0; color: var(--body-ink); font-size: 14px; }
.q-card .btns { display: flex; gap: 8px; }

/* Вышло: таблица и красная строка */
body.v5 .tcard { padding: 10px 8px 6px; }
.tscroll { position: relative; overflow-x: auto; }
.tcard .table a { color: var(--blue); font-weight: 600; }
.pf-cell { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.table .errrow td, .table .errrow:hover td { background: var(--m2-red-bg); }
.errin { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; color: var(--m2-red-ink); font-size: 13px; }
.errin b { font-weight: 600; }
.errin > .i { width: 17px; height: 17px; color: var(--m2-red); }
.errin .cap { color: #B91C1C; }

/* О деле */
.facts { list-style: none; margin: 0; padding: 0; }
.fact { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr) 112px 34px; gap: 6px 14px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.fact:first-child { border-top: 0; padding-top: 2px; }
.fq { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.fa { font-size: 13.5px; color: var(--body-ink); overflow-wrap: anywhere; }
.fa.empty { color: var(--faint); }
.fact .pill, .fact .src { justify-self: start; }
.fact > .btn { grid-column: 3 / -1; justify-self: end; }
.mats-note { margin: 14px 0 0; }

/* Как пишем, Площадки, Тариф, Главная */
.field.sm textarea { min-height: 60px; }
.field.sm { margin-bottom: 10px; }
.tone-seg { margin-top: 14px; }
.voice-sum { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
body.v5 .voice-sum { padding: 14px 18px; }
.voice-sum p { margin: 0; font-size: 14px; color: var(--body-ink); }
.voice-sum b { color: var(--ink); font-weight: 600; }
.auto-note { margin: 2px 2px 0; }
.rhythm-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--body-ink); }
.rhythm-row b { color: var(--ink); font-weight: 600; }
.rhythm-row a { color: var(--blue); font-weight: 600; }
.usage + .usage { margin-top: 14px; }
.usage .kv { border-bottom: 0; padding-bottom: 0; }
.usage .meter { margin-top: 6px; }
.pay-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; }
.pay-row p { margin: 0; }
.pay-row .btn-sm { flex: none; }
.t-head { margin-top: 2px; }
.t-note { margin: 12px 2px 0; font-size: 12.5px; color: var(--muted); }
.danger-zone { display: flex; justify-content: flex-end; margin-top: 4px; }
ul.acts { list-style: none; margin: 0; padding: 0; }
.act-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.act-row:first-child { border-top: 0; padding-top: 0; }
.act-row:last-child { padding-bottom: 0; }
.act-row .ai { width: 34px; height: 34px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; flex: none; }
.act-row .ai.bad { background: var(--m2-red-bg); color: var(--m2-red); }
.act-row .ai .i { width: 17px; height: 17px; }
.act-row .at { flex: 1; min-width: 0; font-weight: 600; color: var(--ink); font-size: 14px; }
.units { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
a.ucard { display: flex; flex-direction: column; gap: 10px; transition: border-color .15s; }
a.ucard:hover { border-color: rgba(29, 78, 216, .35); }
.ucard .kind { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--muted); }
.ucard .kind svg { width: 15px; height: 15px; }
.ucard .nm { font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.ucard .line-st { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 12.5px; color: var(--muted); }
.ucard .nx { font-size: 12.5px; color: var(--body-ink); }
.ucard .meter { margin: 0; }
.ulink { display: inline-flex; align-items: center; gap: 4px; color: var(--blue); font-weight: 600; font-size: 13px; }
.ulink .i { width: 14px; height: 14px; }

/* ───────────────────────── 3. Новые классы (SPEC 7.2) ───────────────────────── */

/* .src: пометка происхождения факта (1.5.1) */
/* базовые правила только при наличии пометки: у content-analysis.html свой безымянный .src */
.src.you, .src.site, .src.file, .src.ok, .src.guess, .src.net, .src.news, .src.nn { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; line-height: 1.4; white-space: nowrap; background: var(--m2-gray-bg); color: var(--m2-gray); }
.src.you, .src.site, .src.file { background: var(--blue-soft); color: var(--blue-ink); }
.src.ok { background: var(--m2-green-bg); color: var(--m2-green); }
.src.guess { background: var(--m2-violet-bg); color: var(--m2-violet); }
.src.net, .src.news { background: var(--m2-gray-bg); color: var(--m2-gray); }
.src.nn { background: transparent; border: 1px dashed var(--ghost); color: var(--muted); }

/* .mtag: метка угла и тип источника; цвет угла по data-a (1.5.3) */
.mtag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; line-height: 1.5; padding: 1px 8px; border-radius: 999px; background: var(--m2-gray-bg); color: var(--m2-gray); white-space: nowrap; }
.mtag[data-a="1"] { background: var(--m2-a1-bg); color: var(--m2-a1); }
.mtag[data-a="2"] { background: var(--m2-a2-bg); color: var(--m2-a2); }
.mtag[data-a="3"] { background: var(--m2-a3-bg); color: var(--m2-a3); }
.mtag[data-a="4"] { background: var(--m2-a4-bg); color: var(--m2-a4); }
.mtag[data-a="5"] { background: var(--m2-a5-bg); color: var(--m2-a5); }
.mtag[data-a="6"] { background: var(--m2-a6-bg); color: var(--m2-a6); }

/* .fnd: карточка находки (2.8.2) */
.fnd { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 0 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.fnd:first-child { border-top: 0; padding-top: 2px; }
.fnd .tp-cb { margin-top: 1px; }
.fnd-b { min-width: 0; }
.fnd-use { display: block; margin: 0 0 4px; cursor: pointer; }
.fnd-t { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.fnd-m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; }
.fnd-link { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--blue); text-decoration: none; }
.fnd-link + .fnd-link { margin-left: 0; }
.fnd-link:hover { text-decoration: underline; }
.fnd-link .i { width: 12px; height: 12px; }
.fnd-nolink { margin-left: auto; }
.fnd-off { margin: 6px 0 0; }
.fnd.off .fnd-t, .fnd.off .fnd-m { opacity: .55; }

/* .cnt: счётчик знаков (1.5.6) */
span.cnt { display: inline-flex; align-items: baseline; gap: 8px; padding: 2px 8px; border-radius: 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.cnt-n { font-weight: 700; font-variant-numeric: tabular-nums; }
.cnt-st { font-size: 12px; font-weight: 600; }
span.cnt.ok { color: var(--muted); }
span.cnt.fixed { color: var(--blue-ink); }
span.cnt.over { color: var(--m2-red); background: var(--m2-red-bg); }
.cnt-note { display: flex; align-items: flex-start; gap: 6px; margin: 6px 0 0; font-size: 13px; line-height: 1.45; }
.cnt-note .i { width: 15px; height: 15px; margin-top: 2px; }
.cnt-note.fixed { color: var(--blue-ink); }
.cnt-note.over { color: var(--m2-red); }
.cnt-link { color: var(--blue); font-weight: 600; text-decoration: underline; }

/* .frm: кадр с подписью и пятью строками; пара «Ваше фото → Наш кадр» (3.9) */
.frm { margin: 0; min-width: 0; }
.frm-pic { position: relative; border-radius: 14px; overflow: hidden; background: var(--blue-soft2); border: 1px solid var(--line); }
.frm.r11 .frm-pic { aspect-ratio: 1 / 1; }
.frm.r45 .frm-pic { aspect-ratio: 4 / 5; }
.frm .frm-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; border-radius: 14px; }
.frm-fb { display: none; }
.frm.nf .frm-img { display: none; }
.frm.nf .frm-pic { aspect-ratio: auto; background: var(--blue-soft2); border: 1px dashed var(--ghost); }
.frm.nf .frm-fb { display: block; padding: 12px 14px 14px; }
.frm-type { margin-bottom: 2px; }
.frm figcaption.cap { margin-top: 6px; }
.frm-mk { margin: 2px 0 0; }
.frm-lines { margin: 8px 0 0; padding: 0; }
.frm-lines dt { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.frm-lines dt:first-child { margin-top: 0; }
.frm-lines dd { margin: 0; font-size: 13.5px; color: var(--body-ink); overflow-wrap: anywhere; }
.frm.nf > .frm-lines-below { display: none; }
.frm-pair { display: flex; gap: 12px; align-items: center; }
.frm-pair > .frm { flex: 1 1 0; min-width: 0; }
.frm-pair > .i { width: 20px; height: 20px; color: var(--muted); }
.frm-pair-wrap > .cap { margin: 0 0 6px; }
.frm-pair-wrap > .frm-pair + .cap { margin: 6px 0 0; }

/* .stp: строки хода (чтение, сборка, написание) */
.stp { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.stp li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--faint); }
.stp .stp-i { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ghost); box-sizing: border-box; display: grid; place-items: center; }
.stp .stp-t { flex: 1; min-width: 0; }
.stp .stp-c { margin-left: auto; }
.stp li.done, .stp li.run { color: var(--ink); }
.stp li.done .stp-i { background: var(--blue); border-color: var(--blue); color: #fff; }
.stp li.done .stp-i .i { width: 12px; height: 12px; stroke-width: 3; }
.stp li.run .stp-i { border-color: var(--blue-soft); border-top-color: var(--blue); animation: m2-spin 1s linear infinite; }
@keyframes m2-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .stp li.run .stp-i { animation: none; } }

/* .fh-st: строка-статус в шапке завода */
.fh-st { font-size: 14px; color: var(--body-ink); max-width: 64ch; margin: 4px 0 0; }
.fh-auto { margin-left: 2px; }

/* .fold: сворачиваемая карточка */
details.fold.card { padding: 0; }
details.fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; font-weight: 600; color: var(--ink); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary .cap::before { content: "показать"; }
details.fold[open] > summary .cap::before { content: "скрыть"; }
details.fold[open] > summary { border-bottom: 1px solid var(--line); }
details.fold > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; border-radius: 12px; }
.fold-b { padding: 16px; }

/* модификаторы: баннер и стоп (.card.errin) */
body.v5 .card.errin { background: var(--m2-red-bg); border: 1px solid var(--m2-red-line); box-shadow: none; padding: 14px 16px; align-items: flex-start; flex-wrap: nowrap; gap: 12px; }
.card.errin > .i { margin-top: 2px; }
.errin-t { flex: 1 1 280px; min-width: 0; font-size: 13.5px; line-height: 1.45; }
.errin-b { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; flex: 0 1 auto; }
.errin-r { display: inline-flex; align-items: center; gap: 8px; }
.errin-ph { display: none; }
.errin.mut { color: var(--body-ink); }
.errin.mut > .i { color: var(--muted); }
body.v5 .card.errin.mut { background: var(--sink); border-color: var(--line); }

/* ───────────────────────── 4. Оболочка и панель макета ───────────────────────── */
.acct { position: relative; }
.acct-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--body-ink); font: inherit; font-size: 13.5px; font-weight: 500; text-align: left; cursor: pointer; }
.acct-btn:hover { background: rgba(29, 78, 216, .07); color: var(--ink); }
.acct-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.acct-ava { width: 32px; height: 32px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-ink); font-weight: 700; font-size: 12px; display: grid; place-items: center; flex: none; }
.acct-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-chev { width: 16px; height: 16px; flex: none; color: var(--muted); transition: transform .15s; }
.acct-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 70; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-lg); }
.acct-item { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 500; text-align: left; cursor: pointer; text-decoration: none; }
.acct-item:hover, .acct-item:focus-visible { background: var(--blue-soft); color: var(--blue-ink); outline: none; }
.acct-item[aria-current="page"] { font-weight: 700; color: var(--blue-ink); }
/* видимая кнопка «Тарифы и оплата» над строкой аккаунта (круг 5, 08.10: «не увидел кнопки тарифы»); чип «предложение» — вопрос 42 */
.side-foot .side-pay { margin-bottom: 4px; }
.side-pay .i { width: 18px; height: 18px; }
.side-pay .pill { margin-left: 4px; font-size: 10px; padding: 1px 7px; vertical-align: 1px; }
/* Пока shell.js не узнал у сервера, вошёл ли человек, кабинет скрыт; без входа он так и не мелькнёт перед переходом на login.html */
body.shell-wait .app { visibility: hidden; }

.aira-toasts { bottom: 72px; }

/* ───────────────────────── 5. Телефон 390 px ───────────────────────── */
@media (max-width: 820px) {
  .pl-row { grid-template-columns: 70px minmax(0, 1fr); }
  .pl-marks, .pl-go { grid-column: 2; }
}
@media (max-width: 760px) {
  .fact { grid-template-columns: minmax(0, 1fr) auto auto; }
  .fq { grid-column: 1 / -1; }
  .fact > .btn { grid-column: 2 / -1; }
}
@media (max-width: 720px) {
  .aira-toasts { left: 16px; right: 16px; bottom: 100px; max-width: none; }
}
@media (max-width: 680px) {
  .content { padding-left: 16px; padding-right: 16px; }
  body.v5 .topbar, .topbar { padding-left: 16px; padding-right: 16px; }
  .tiles { gap: 12px; }
  .pill { white-space: normal; }
}
@media (max-width: 560px) {
  .aira-modal-back { padding: 0; align-items: stretch; }
  .aira-modal, .aira-modal.sm, .aira-modal.lg { max-width: none; width: 100%; height: 100%; max-height: 100dvh; border-radius: 0; }
  .aira-modal-b { flex: 1 1 auto; min-height: 0; }
  .aira-modal-f { padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px)); } /* выше фиксированной плашки «МАКЕТ» внизу экрана */
}
@media (max-width: 520px) {
  .fh-btns, .fh-run { width: 100%; }
  .fh-run .btn, .fh-btns > .btn { width: 100%; justify-content: center; }
  body.v5 .card.errin { flex-wrap: wrap; }
  .errin-b { width: 100%; }
}
@media (max-width: 400px) {
  .t3 { grid-template-columns: minmax(0, 1fr); }
}

/* вкладки завода и полоса ВКонтакте на телефоне; режим «чипы предложение скрыты» */
@media (max-width: 640px) {
  .wtabs.m2-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
  .wtabs.m2-l { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); }
  .wtabs.m2-l.m2-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 40px), transparent); }
  body.v5 .card.errin { flex-wrap: wrap; align-items: center; row-gap: 10px; }
  .errin-full, .errin-r, .errin-free { display: none; }
  .errin-ph { display: inline; }
  .errin-t { flex: 1 1 0; }
  .errin-b { width: 100%; }
  .errin-b > .btn { width: 100%; justify-content: center; }
}
.m2-nochips .m2-prop, .m2-nochips .x59-prop { display: none; }

/* окно «В продукте эта кнопка: …» (круг 3): список из 1–3 строк, мелкая подпись, ссылка при необходимости */
.will-l { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 8px; color: var(--ink); }
.will-l li { line-height: 1.5; }
.will-more { margin: 0 0 12px; }
.will-c { margin: 0; }
