/* ---------- шрифт: Onest (SIL OFL), переменный, свой хостинг ---------- */
@font-face { font-family: "Onest"; font-weight: 100 900; font-display: swap; src: url(/fonts/onest-cyrillic-wght-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 100 900; font-display: swap; src: url(/fonts/onest-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- токены ---------- */
:root {
  --bg: #f5f6f8; --surface: #ffffff; --ink: #0f1728; --muted: #667085; --line: #e6e9ef; --line-strong: #d3d8e0;
  --accent: #0f766e; --accent-hover: #0b5f58; --accent-soft: #e1f3f0; --accent-ink: #ffffff;
  --mark: #f5c518; --mark-ink: #2b2300;
  --ok: #067647; --ok-soft: #dcf5e7; --warn: #8a5300; --warn-soft: #fdf0cf; --err: #b42318; --err-soft: #fde7e4;
  --mk-ozon: #2563eb; --mk-wb: #9333ea; --mk-ym: #e0a100;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px;
  --sh-card: 0 1px 2px rgba(16, 24, 40, .04); --sh-pop: 0 12px 40px rgba(16, 24, 40, .16);
  --gutter: clamp(16px, 4vw, 32px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117; --surface: #151b23; --ink: #e9edf2; --muted: #98a2b3; --line: #232b36; --line-strong: #323c4a;
    --accent: #2dd4bf; --accent-hover: #5eead4; --accent-soft: #11332f; --accent-ink: #04201d;
    --ok: #5ee0a0; --ok-soft: #12291f; --warn: #f2c14e; --warn-soft: #2e2511; --err: #ff8f84; --err-soft: #371a1a;
    --mk-ozon: #6ea0ff; --mk-wb: #c58cf5; --mk-ym: #f5c518; --sh-card: none; --sh-pop: 0 12px 40px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.55 var(--font); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-weight: 650; line-height: 1.15; letter-spacing: -.022em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.7rem); letter-spacing: -.035em; font-weight: 700; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); } h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; text-wrap: pretty; max-width: 68ch; } a { color: var(--accent); text-underline-offset: 3px; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .nowrap { white-space: nowrap; }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }
.num, .qty, .big { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.num { text-align: right; font-weight: 550; }

/* ---------- кнопки и поля ---------- */
.btn, button { font: 550 .93rem/1.2 var(--font); cursor: pointer; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); padding: .6rem 1rem; min-height: 40px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; box-shadow: var(--sh-card); }
.btn:hover, button:hover { border-color: var(--muted); }
.btn.primary, button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: none; }
.btn.primary:hover, button.primary:hover { background: var(--accent-hover); }
.btn.danger, button.danger { color: var(--err); background: transparent; box-shadow: none; } .btn.danger:hover, button.danger:hover { border-color: var(--err); }
button:disabled { opacity: .5; cursor: not-allowed; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: .55rem .75rem; min-height: 40px; min-width: 0; max-width: 100%; }
input:focus, select:focus { outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent); border-color: var(--accent); }
input[type=checkbox] { min-height: 0; width: 18px; height: 18px; accent-color: var(--accent); }
input[type=number] { width: 6rem; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field { margin-bottom: 14px; } .field input, .field select { width: 100%; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; } .row.end { justify-content: flex-end; } .grow { flex: 1 1 200px; }

/* ---------- маркетплейсы ---------- */
.mk { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; white-space: nowrap; }
.mk::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; }
[data-mk=ozon] { --c: var(--mk-ozon); } [data-mk=wildberries] { --c: var(--mk-wb); } [data-mk=yandex_market] { --c: var(--mk-ym); }
.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--bg); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; } .badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.err { background: var(--err-soft); color: var(--err); border-color: transparent; } .badge.info { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* ---------- публичные страницы ---------- */
.topbar { background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.topbar .wrap { display: flex; align-items: center; gap: 8px 28px; min-height: 66px; padding-block: 8px; flex-wrap: wrap; }
.topbar .brand, .side .brand { white-space: nowrap; font-weight: 650; font-size: 1.08rem; letter-spacing: -.01em; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand svg { width: 30px; height: 30px; flex: none; }
.topbar nav { display: flex; gap: 6px 24px; margin-left: auto; flex-wrap: wrap; align-items: center; }
.topbar nav a:not(.btn) { color: var(--muted); text-decoration: none; padding-block: 6px; font-weight: 500; } .topbar nav a:not(.btn):hover { color: var(--ink); }

.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 6vw, 88px); align-items: center; padding-block: clamp(40px, 8vw, 110px); }
.hero h1 { max-width: 14ch; }
.hero .lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: var(--muted); max-width: 50ch; margin-bottom: 1.8em; }
.hero .assure { margin: 1.4em 0 0; color: var(--muted); font-size: .9rem; }
.btn.lg { min-height: 48px; padding-inline: 1.4rem; font-size: 1rem; border-radius: 12px; }

/* демо механики — главный акцент страницы */
.demo { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--sh-pop); overflow: hidden; }
.demo-cap { display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: .9rem; color: var(--muted); min-height: 3.6rem; align-items: center; }
.demo-cap b { color: var(--ink); font-weight: 650; }
.demo-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); transition: background-color .35s; }
.demo-row:last-child { border-bottom: 0; }
.demo-row .role { grid-column: 1; font-size: .82rem; color: var(--muted); }
.demo-row .qty { grid-row: 1 / span 2; grid-column: 2; font-size: clamp(2.1rem, 1.5rem + 2vw, 3rem); font-weight: 700; letter-spacing: -.03em; line-height: 1; padding: 4px 12px; border-radius: 10px; transition: background-color .3s; }
.demo-row.flash .qty { background: var(--mark); color: var(--mark-ink); }
.demo-row.order { background: var(--warn-soft); }

section.block { padding-block: clamp(36px, 6vw, 80px); }
section.block > .wrap > h2 { max-width: 24ch; margin-bottom: 1em; }
.seq { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.seq > div { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-card); }
.seq .step-num { font-weight: 700; width: 2rem; height: 2rem; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); border-radius: 50%; margin-bottom: 14px; }
.seq h3 { margin-bottom: .4em; }
.facts { margin: 0; } .facts > div { display: grid; grid-template-columns: minmax(160px, 1fr) 2fr; gap: 8px 32px; padding: 22px 0; border-top: 1px solid var(--line); } .facts > div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 650; font-size: 1.05rem; } .facts dd { margin: 0; color: var(--muted); max-width: 62ch; }
table.plain { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
table.plain th, table.plain td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: baseline; }
table.plain th { font-size: .85rem; color: var(--muted); font-weight: 550; background: var(--bg); } table.plain tr:last-child td { border-bottom: 0; }
details.faq { border-top: 1px solid var(--line); } details.faq:last-of-type { border-bottom: 1px solid var(--line); }
details.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; } details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--muted); } details.faq[open] summary::after { content: "–"; }
details.faq p { color: var(--muted); padding-bottom: 8px; }
footer.site { border-top: 1px solid var(--line); padding-block: 32px 48px; color: var(--muted); font-size: .9rem; background: var(--surface); }
footer.site .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px 32px; }
footer.site a { color: var(--muted); } footer.site a:hover { color: var(--ink); }
.doc { max-width: 760px; padding-block: clamp(28px, 5vw, 56px) 72px; } .doc h2 { margin-top: 1.8em; } .doc ul { padding-left: 1.2em; } .doc li { margin-bottom: .4em; }
.center-card { max-width: 480px; margin: 12vh auto; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-pop); }
.callout { background: var(--accent-soft); border-radius: var(--r-md); padding: 12px 16px; margin: 0 0 1em; max-width: 72ch; }
.callout.warn { background: var(--warn-soft); color: var(--ink); } .callout.err { background: var(--err-soft); } .callout.ok { background: var(--ok-soft); }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(16px, 3vw, 24px); box-shadow: var(--sh-card); }
.box > h3:first-child { margin-bottom: .7em; }

/* ---------- кабинет ---------- */
.app { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.side .brand { padding: 2px 10px 22px; }
.side a.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 550; }
.side a.nav svg { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.side a.nav:hover { background: var(--bg); color: var(--ink); } .side a.nav.active { background: var(--accent-soft); color: var(--accent); }
.side .foot { margin-top: auto; font-size: .82rem; color: var(--muted); padding: 12px 10px 0; border-top: 1px solid var(--line); }
main.content { padding: clamp(18px, 3vw, 40px); max-width: 1180px; width: 100%; min-width: 0; outline: none; }
.page-head { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { margin: 0; font-size: clamp(1.6rem, 1.3rem + 1.1vw, 2.1rem); letter-spacing: -.03em; } .page-head .row { margin-left: auto; }
.lede { color: var(--muted); margin: -10px 0 22px; max-width: 70ch; }
.cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); align-items: start; }
.scroll-x { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-card); }
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-size: .8rem; font-weight: 550; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: color-mix(in srgb, var(--bg) 50%, var(--surface)); } table.data th.num { text-align: right; }
table.data td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; } table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: color-mix(in srgb, var(--bg) 55%, transparent); }
.delta-minus { color: var(--err); } .delta-plus { color: var(--ok); }
.checklist { list-style: none; padding: 0; margin: 0; } .checklist li { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: center; } .checklist li:last-child { border: 0; }
.dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); display: inline-grid; place-items: center; flex: none; font-size: .75rem; font-weight: 650; color: var(--muted); }
.dot.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; box-shadow: none; border-radius: 9px; min-height: 36px; color: var(--muted); } .seg button:hover { color: var(--ink); } .seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.big { font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.3rem); font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.stat { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 16px; } .stat .small { display: block; color: var(--muted); margin-top: 6px; }
.toast-host { position: fixed; right: 16px; bottom: 16px; left: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 80; pointer-events: none; }
.toast { background: var(--ink); color: var(--surface); padding: 11px 16px; border-radius: 12px; max-width: 380px; box-shadow: var(--sh-pop); } .toast.err { background: var(--err); color: #fff; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.stack { display: grid; gap: 16px; max-width: 760px; }
details.box > summary { cursor: pointer; font-weight: 600; } details.box[open] > summary { margin-bottom: 14px; } details.box { margin-bottom: 18px; }

/* ---------- список товаров ---------- */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; } .search svg { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 1.8; stroke-linecap: round; } .search input { width: 100%; padding-left: 38px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; } .chips button { border-radius: 999px; min-height: 36px; padding: .35rem .9rem; box-shadow: none; color: var(--muted); } .chips button.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.plist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-card); overflow: hidden; }
.plist-head, .prow { display: grid; grid-template-columns: minmax(230px, 1.25fr) repeat(3, minmax(150px, 1fr)) 44px; gap: 12px; align-items: center; padding: 12px 18px; }
.plist-head { font-size: .8rem; font-weight: 550; color: var(--muted); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 50%, var(--surface)); }
.prow { border-bottom: 1px solid var(--line); } .prow:last-child { border-bottom: 0; } .prow:hover { background: color-mix(in srgb, var(--bg) 45%, transparent); }
.pinfo { display: flex; gap: 12px; align-items: center; min-width: 0; }
.thumb { width: 44px; height: 44px; border-radius: 10px; flex: none; background: var(--bg); border: 1px solid var(--line); object-fit: cover; display: grid; place-items: center; color: var(--muted); font-weight: 650; }
.pname { font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.psub { font-size: .8rem; color: var(--muted); }
.slot { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 8px 6px 12px; border: 1px solid var(--line); border-radius: 11px; min-width: 0; background: var(--surface); }
.slot .art { font-weight: 600; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.slot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; }
.slot.empty { border-style: dashed; border-color: var(--line-strong); background: transparent; padding: 0; } .slot.empty::before { content: none; }
.slot.empty button { width: 100%; min-height: 42px; border: 0; background: transparent; box-shadow: none; color: var(--muted); font-weight: 500; justify-content: flex-start; padding-inline: 12px; border-radius: 10px; } .slot.empty button:hover { color: var(--accent); background: var(--accent-soft); }
.slot.main { background: var(--accent-soft); border-color: transparent; }
.mult-wrap { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .8rem; } input.mult { width: 3.6rem; padding: 3px 6px; min-height: 30px; text-align: center; border-radius: 8px; }
.icon-btn { padding: 0; width: 30px; min-height: 30px; border-radius: 8px; border: 0; background: transparent; box-shadow: none; color: var(--muted); line-height: 1; } .icon-btn:hover { background: var(--err-soft); color: var(--err); }
.slot .icon-btn { opacity: 0; } .slot:hover .icon-btn, .slot:focus-within .icon-btn { opacity: 1; }
.slot-label { display: none; }
dialog { border: 0; border-radius: var(--r-lg); padding: 0; width: min(480px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: var(--sh-pop); }
dialog::backdrop { background: rgba(15, 23, 40, .45); backdrop-filter: blur(3px); }
dialog form { padding: 24px; } dialog h3 { margin-bottom: 4px; } dialog .pick-list { max-height: 300px; overflow: auto; margin: 12px -8px 16px; display: grid; gap: 2px; }
.pick { display: flex; gap: 10px; align-items: center; text-align: left; justify-content: flex-start; border: 0; box-shadow: none; background: transparent; padding: 8px; border-radius: 10px; width: 100%; font-weight: 500; } .pick:hover, .pick.on { background: var(--accent-soft); } .pick .psub { margin-left: auto; }

/* ---------- адаптив ---------- */
/* Раскладка строки зависит от ширины самого списка, а не окна (в кабинете слева ещё меню). */
.plist-wrap { container-type: inline-size; }
@container (max-width: 939px) {
  /* узко: каждый товар — отдельная карточка с промежутком, а не строка общей таблицы */
  .plist { background: transparent; border: 0; box-shadow: none; overflow: visible; display: grid; gap: 14px; }
  .plist-head { display: none; }
  .prow { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-card); grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; padding: 18px; }
  .prow:last-child { border-bottom: 1px solid var(--line); } .prow:hover { background: var(--surface); }
  .prow .pinfo { grid-column: 1 / -1; padding-right: 44px; }
  .prow .menu-cell { position: absolute; top: 14px; right: 14px; }
  .slot-label { display: block; font-size: .75rem; color: var(--muted); margin: 0 0 6px 2px; } .slot .icon-btn { opacity: 1; }
}
@container (max-width: 639px) {
  .prow { grid-template-columns: minmax(0, 1fr); padding: 16px; }
}
@media (max-width: 960px) { .hero { grid-template-columns: 1fr; } .hero h1 { max-width: 18ch; } .cols { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; gap: 2px; padding: 8px var(--gutter); border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .side .brand { padding: 0 10px 0 0; } .side .brand span { display: none; } .side .foot { display: none; }
  .side a.nav { white-space: nowrap; padding: 9px 12px; } .side a.nav svg { display: none; }
  .seq { grid-template-columns: 1fr; } .facts > div { grid-template-columns: 1fr; }
  .page-head .row { margin-left: 0; width: 100%; }
  .toast-host { align-items: stretch; } .toast { max-width: none; }
}
@media (max-width: 760px) {
  table.data thead { position: absolute; left: -9999px; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  .scroll-x { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  table.data tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 12px; padding: 4px 0; box-shadow: var(--sh-card); }
  table.data td { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 16px; border: 0; text-align: right; }
  table.data td::before { content: attr(data-label); color: var(--muted); font-size: .85rem; font-weight: 400; text-align: left; flex: none; }
  table.data td.first { font-weight: 600; text-align: left; border-bottom: 1px solid var(--line); padding-block: 12px; justify-content: flex-start; } table.data td.first::before { content: none; }
  table.data td[colspan] { display: block; text-align: left; }
}
@media (max-width: 520px) {
  body { font-size: .95rem; }
  .btn, button { min-height: 44px; } input, select { min-height: 44px; } .row > .btn, .row > button { flex: 1 1 auto; }
  .demo-row { padding: 14px 16px; } .demo-cap { padding: 12px 16px; }
  .toolbar .search { max-width: none; }
}
@media (min-width: 1500px) { :root { font-size: 17px; } .wrap { max-width: 1320px; } main.content { max-width: 1320px; } .app { grid-template-columns: 264px minmax(0, 1fr); } }
@media (prefers-reduced-motion: no-preference) { .btn, button, .slot, .prow { transition: border-color .15s, background-color .15s, color .15s, opacity .15s; } }
@media print { .topbar, .side, footer.site, .toast-host { display: none; } body { background: #fff; } }
main.content h2 { margin-top: 2em; font-size: 1.25rem; }

/* ---------- карточка подключения ---------- */
.conn { display: flex; flex-direction: column; gap: 0; }
.conn-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; } .conn-head h3 { margin: 0; font-size: 1.15rem; }
.conn > .muted { margin-bottom: 4px; }
.conn-sec { padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); }
.conn-sec-title { font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.conn-sec select, .conn-sec input { width: 100%; } .conn-sec .small { margin: 8px 0 0; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; } .inline-form input { flex: 1 1 180px; width: auto; } .inline-form button { flex: 0 0 auto; }
.stack-form .field:last-of-type { margin-bottom: 16px; }
.conn-foot { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); }

/* ---------- правки после обзора всех страниц ---------- */
main.content .callout { max-width: none; }
section.block { padding-block: clamp(28px, 5vw, 64px); }
section.block .small.muted { margin-top: 12px; }
.seq p:last-child { margin-bottom: 0; }
.box .row + .field { margin-top: 18px; }
.field input[type=number] { width: 8rem; }
@media (max-width: 520px) {
  .seg { display: flex; } .seg button { flex: 1 1 0; padding-inline: .4rem; font-size: .85rem; }
}
.plist-wrap, .empty { margin-bottom: 18px; }
.box > p:last-child { margin-bottom: 0; }

/* ---------- таблица остатков: три площадки равноправно, главная выделена ---------- */
table.stocks th, table.stocks td.mcell { text-align: left; }
table.stocks th.main, table.stocks td.main { background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); }
table.stocks tbody tr:hover td.main { background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); }
.mcell .vals { display: block; } .mcell .qty { display: block; font-size: 1.2rem; font-weight: 650; line-height: 1.2; }
.mcell .sub { display: block; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.mcell.none { vertical-align: middle; }
@media (max-width: 760px) {
  table.stocks td.mcell { align-items: flex-start; } .mcell .vals { text-align: right; } .mcell .qty { font-size: 1.1rem; }
  table.stocks td.main { border-radius: 0; margin: 2px 0; }
}

/* ---------- единый склад ---------- */
table.stocks th.own, table.stocks td.own { text-align: right; }
input.onhand { width: 5.6rem; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
table.stocks td.avail b { font-size: 1.15rem; }
table.stocks td.mcell { text-align: left; }
.note { margin-top: 14px; max-width: 72ch; }
