:root {
  --bg: #12110e;
  --bg-2: #1a1814;
  --paper: #211f1a;
  --line: #34312a;
  --text: #ece7dc;
  --muted: #9a9284;
  --amber: #e8a317;
  --amber-2: #f3c56b;
  --ok: #8fbf7a;
  --warn: #d97b4a;
  --sale: #c45c5c;
  --orig: #6aa7c9;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --radius: 16px;
  --rail: 220px;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { scroll-padding-top: 76px; }
body {
  font-family: var(--sans);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(232, 163, 23, 0.08), transparent 50%),
    var(--bg);
  color: var(--text);
  letter-spacing: 0.01em;
}
a { color: var(--amber-2); text-decoration: none; }
a:hover { color: var(--amber); }
code, .art {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--amber-2);
}
img { max-width: 100%; display: block; }

.shell {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  min-height: 100vh;
}
.rail {
  position: sticky; top: 0; align-self: start;
  height: 100vh;
  display: flex; flex-direction: column; gap: 18px;
  padding: 16px 14px 20px;
  background: linear-gradient(180deg, #171510 0%, #12100c 100%);
  border-right: 1px solid var(--line);
  overflow: auto;
}
.rail .brand { color: var(--text); margin-bottom: 4px; }
.rail-nav { display: flex; flex-direction: column; gap: 2px; }
.rail-nav a, .rail-foot a {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); padding: 8px 10px; border-radius: 10px;
  font-size: 14px;
}
.rail-nav a.is-on, .rail-nav a:hover,
.rail-foot a.is-on, .rail-foot a:hover {
  color: var(--text); background: var(--paper);
}
.rail-nav a.is-on { border: 1px solid #4a4336; }
.rail-ico {
  width: 1.25em; text-align: center; opacity: 0.7; font-size: 13px;
}
.rail-foot {
  margin-top: auto; display: flex; flex-direction: column; gap: 2px;
  padding-top: 12px; border-top: 1px solid var(--line);
}
.rail-label {
  display: block; color: var(--muted); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0 10px 6px;
}
.rail-toggle {
  display: none; font: inherit; font-size: 18px; line-height: 1;
  color: var(--text); background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; width: 40px; height: 40px; cursor: pointer;
}
.workspace { min-width: 0; display: flex; flex-direction: column; }

.top {
  position: sticky; top: 0; z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 22px;
  background: rgba(18, 17, 14, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand {
  display: flex; gap: 10px; align-items: center; color: var(--text);
}
.brand-mark { width: 28px; height: 28px; color: var(--amber); }
.brand strong { display: block; font-size: 15px; line-height: 1; }
.brand em {
  font-style: normal; color: var(--muted); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.search { display: flex; gap: 8px; position: relative; min-width: 0; }
.search input, .filter input, .filter-input, .search button, .filter button {
  font: inherit; border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--text); padding: 10px 16px;
}
.search input, .filter input, .filter-input { width: 100%; outline: none; }
.search input:focus, .filter input:focus, .filter-input:focus {
  border-color: var(--amber);
}
.search button, .filter button {
  background: var(--amber); color: #1a1406; font-weight: 650; cursor: pointer;
  flex: none;
}
.top-meta {
  display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px;
}
.kbd-hint {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px;
  background: var(--bg-2);
}
.suggest {
  position: absolute; left: 0; right: 48px; top: calc(100% + 6px); z-index: 40;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 6px; max-height: 360px; overflow: auto;
}
.suggest[hidden] { display: none; }
.suggest-item {
  display: grid; grid-template-columns: 64px 1fr; gap: 8px 12px;
  align-items: baseline; padding: 8px 10px; border-radius: 10px;
  color: var(--text); cursor: pointer;
}
.suggest-item:hover, .suggest-item.is-on { background: #2a271f; }
.suggest-kind {
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); font-family: var(--mono);
}
.suggest-label { font-weight: 600; font-size: 14px; }
.suggest-sub { grid-column: 2; color: var(--muted); font-size: 12px; margin-top: -4px; }

.page { width: min(1280px, calc(100% - 40px)); margin: 28px auto 80px; }
body.nav-browse .page { width: min(1600px, calc(100% - 28px)); }

.hub { margin-bottom: 36px; }
.hub-lead h1 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 8px; letter-spacing: -0.03em; }
.hub-lead p { color: var(--muted); margin: 0 0 22px; max-width: 56ch; }
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.hub-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; color: var(--text);
  transition: border-color .15s ease, transform .15s ease;
}
.hub-card:hover { border-color: var(--amber); color: var(--text); transform: translateY(-2px); }
.hub-card strong { font-size: 16px; }
.hub-card span { color: var(--muted); font-size: 13px; line-height: 1.35; }
.hub-card-muted { opacity: 0.85; }

.code-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin: 0 0 18px; padding: 8px 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  font-size: 13px;
}
.code-nav-mid {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono);
}
.code-nav-mid strong code { color: var(--amber); font-size: 15px; }
.code-nav-jump form { display: flex; gap: 6px; }
.code-nav-jump input {
  width: 96px; font: inherit; font-family: var(--mono); font-size: 13px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-2); color: var(--text); padding: 6px 12px; outline: none;
}
.code-nav-jump input:focus { border-color: var(--amber); }
.code-nav-jump button {
  font: inherit; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--amber); color: #1a1406; font-weight: 700; padding: 6px 12px;
}

.hero {
  display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 28px;
  margin-bottom: 36px; align-items: end;
}
.hero h1, h1 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 8px; letter-spacing: -0.03em; }
.hero p, .lead { color: var(--muted); margin: 0; max-width: 46ch; }
.section-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin: 8px 0 16px; flex-wrap: wrap;
}
.section-head h2, h2 { margin: 0; font-size: 22px; }
h2 em, h3 em { font-style: normal; color: var(--muted); font-weight: 500; font-size: 0.7em; }
.hint { color: var(--muted); font-size: 13px; }

.kpis {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.kpi {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px;
}
.kpi-label {
  display: block; color: var(--muted); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.kpi strong { font-size: 26px; letter-spacing: -0.04em; }
.kpi em { color: var(--muted); font-style: normal; font-size: 12px; margin-left: 6px; }
.progress {
  position: relative; margin-top: 12px; height: 28px;
  border-radius: 999px; background: #2a271f; overflow: hidden;
}
.progress-bar {
  height: 100%; background: linear-gradient(90deg, #b47a0c, var(--amber));
  width: 0; transition: width .6s ease;
}
.progress span {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: 12px; color: #fff6e0; font-weight: 500;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.card {
  position: relative;
  display: flex; flex-direction: column; color: var(--text);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); border-color: #534c3d; color: var(--text); }
.card-hit {
  position: absolute; inset: 0; z-index: 0;
}
.card-pic {
  aspect-ratio: 1; background: #161410; display: grid; place-items: center;
  pointer-events: none; position: relative; z-index: 0;
}
.card-pic img { width: 100%; height: 100%; object-fit: contain; }
.card-empty { color: var(--muted); font-size: 13px; }
.card-body {
  padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1;
  position: relative; z-index: 1; pointer-events: none;
}
.card-body a, .card-body button { pointer-events: auto; }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-meta-right { display: flex; align-items: center; gap: 8px; }
.card-title {
  font-size: 14px; line-height: 1.35; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 3.9em;
}
.card-title:hover { color: var(--amber-2); }
.card-art { font-family: var(--mono); font-size: 13px; color: var(--amber); }
.card-cat, .card-marks { font-size: 12px; color: var(--muted); }
.card .peek, .listing-table .peek {
  border-bottom: 1px dashed rgba(243, 197, 107, 0.35);
}
.card .mfr.peek { color: var(--muted); }
.listing-table .peek { color: inherit; }
.demand-link { color: inherit; border-bottom: 0; }
.demand-link:hover .demand i.on { background: var(--amber-2); }
.card-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; }
.mfr { color: var(--muted); font-size: 12px; }
.price { font-size: 15px; }

.demand { display: inline-flex; gap: 3px; }
.demand i {
  width: 7px; height: 11px; border-radius: 2px; background: #3a362e; display: block;
}
.demand i.on { background: var(--amber); }
.tag {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: #2d2a24; color: var(--muted);
}
.tag-orig { color: var(--orig); background: #1c2a32; }
.tag-sale { color: #f0b4b4; background: #3a2222; }
.tag-new { color: var(--ok); background: #22301c; }
.tag-error, .tag-captcha { color: #f0b4b4; background: #3a2222; }
.tag-invalid { color: var(--amber-2); background: #3a3018; }

body.page-log .page { width: min(1440px, calc(100% - 32px)); }
.log-view {
  display: block;
  margin: 0 0 32px;
  padding: 12px 14px;
  height: calc(100vh - 240px);
  min-height: 320px;
  overflow: auto;
  background: #0e0d0b;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.log-line { display: block; color: #d8d1c4; }
.log-line.is-ok { color: var(--ok); }
.log-line.is-err { color: #f0b4b4; }
.log-line.is-miss { color: var(--muted); }
.log-line.is-file { color: var(--amber-2); }
.log-line.is-hl { color: var(--amber); font-weight: 650; }
.log-line a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.log-line[hidden] { display: none; }
.log-empty { display: block; padding: 12px 0; }
body.page-log .filter-input { max-width: none; margin: 0 0 12px; }
.product {
  display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: 20px 28px;
  margin-bottom: 18px; align-items: start;
}
.product.product-solo { grid-template-columns: 1fr; }
.pinfo { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.gallery, .pinfo, .psec, .rich-bar { scroll-margin-top: 80px; }
.gallery-main {
  display: grid; place-items: center; width: 100%; min-height: 400px; height: 400px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: inherit; padding: 0; cursor: zoom-in; font: inherit;
}
.gallery-main img {
  width: 100%; height: 100%; max-width: none; object-fit: contain;
}
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.thumb {
  position: relative; width: 64px; height: 64px; padding: 0; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper); cursor: pointer; overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-on { border-color: var(--amber); }
.thumb i {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-style: normal; font-size: 9px; letter-spacing: 0.02em;
  text-align: center; color: #eee; background: rgba(10, 8, 6, 0.72); padding: 1px 0;
}
.pinfo h1 { font-size: 26px; margin: 0 0 2px; }
.pinfo-head, .pinfo-row, .crumbs {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.pinfo-head { justify-content: space-between; align-items: flex-start; gap: 12px; }
.crumbs { margin: 0; }
.mfr-badge {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  color: var(--text); background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 6px 10px 6px 6px; max-width: 42%;
}
.mfr-badge:hover { border-color: #534c3d; color: var(--text); }
.mfr-badge span { font-weight: 650; font-size: 14px; }
.mfr-logo { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; background: #fff; }
.price-main {
  position: relative; margin-left: auto; cursor: default;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 6px 12px;
}
.price-main strong { font-size: 18px; }
.price-tip {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 8;
  min-width: 180px; padding: 8px 10px;
  background: #18160f; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow);
}
.price-main:hover .price-tip, .price-main:focus-within .price-tip { display: grid; gap: 4px; }
.price-tip div { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; }
.price-tip span { color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }
.copy-val {
  font: inherit; color: inherit; background: none; border: 0; padding: 0;
  cursor: copy; border-bottom: 1px dashed rgba(243, 197, 107, 0.4);
  text-align: inherit;
}
h1 .copy-val { border-bottom: 0; font: inherit; }
.chip.copy-val {
  cursor: copy; font-family: var(--mono); font-size: 12px;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px;
  color: var(--text); background: var(--paper);
}
.chip.copy-val:hover { border-color: var(--amber); color: var(--text); }
.copy-val:hover { color: var(--amber); }
.copy-val.is-copied { color: var(--ok); border-bottom-color: var(--ok); }
.chip.copy-val.is-copied { border-color: var(--ok); color: var(--ok); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding: 4px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; }
.facts dd.wrap { text-align: left; word-break: break-all; }
.cats { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.appl-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; }
.pinfo .chip { padding: 4px 8px; font-size: 11px; }

.psec { margin: 0 0 26px; }
.psec h2 { font-size: 18px; margin: 0 0 10px; }
.product-split {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 28px;
  align-items: start; margin-bottom: 8px;
}
.product-split-solo { grid-template-columns: 1fr; }
.product-side { min-width: 0; }
.props {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px;
}
.prop {
  display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 1fr) auto;
  gap: 8px; align-items: baseline;
  border-bottom: 1px dashed var(--line); padding: 3px 0; font-size: 13px;
}
.prop-k { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.prop-v { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.table-scroll { overflow-x: auto; }
.analog-table { min-width: 860px; font-size: 12px; }
.analog-table tr.out { opacity: 0.72; }
.analog-table .demand { gap: 2px; }
.analog-table .demand i { width: 5px; height: 8px; }

.cert-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px;
}
.cert-card {
  display: flex; gap: 10px; align-items: center; color: var(--text);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 10px;
}
.cert-card:hover { border-color: #534c3d; color: var(--text); }
.cert-card strong { display: block; font-size: 13px; font-weight: 600; }
.cert-card em { display: block; color: var(--muted); font-style: normal; font-size: 12px; }
.cert-thumb-empty {
  width: 40px; height: 40px; border-radius: 4px; background: #161410;
  display: grid; place-items: center; font-size: 9px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}

.rich-bar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin: 0 0 22px; padding: 8px 10px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
}
.rich-bar-copy { display: flex; flex-direction: column; gap: 2px; min-width: 7rem; }
.rich-bar .rich-facets {
  flex: 1; display: flex; flex-wrap: wrap; gap: 4px;
  grid-template-columns: none;
}
.rich-bar .rich-facets li {
  padding: 3px 8px; font-size: 11px; background: #18160f;
}
.rich-bar .rich-facets a { color: inherit; }

.appl-preview {
  color: var(--muted); font-size: 12px; font-weight: 400;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1;
}
.flink {
  color: inherit;
  border-bottom: 1px dashed rgba(243, 197, 107, 0.4);
}
.flink:hover { color: var(--amber); }
h1 .flink { border-bottom: 0; }
a.tag { color: inherit; }
.analog .flink, .analog .chip, .analog code a { position: relative; z-index: 1; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px;
  color: var(--text); font-family: var(--mono); font-size: 12px; background: var(--paper);
}
.chip:hover { border-color: var(--amber); color: var(--text); }
.chip.dim { color: var(--muted); }

.prose { color: #d8d1c4; line-height: 1.55; }
.table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.25; }
.table th, .table td {
  text-align: left; padding: 3px 7px;
  border-bottom: 1px solid var(--line); vertical-align: middle;
}
.table.tight th, .table.tight td { padding: 2px 6px; }
.table.tight th { color: var(--muted); font-weight: 500; width: 34%; }
.table code { font-size: 0.92em; }
.table thead a { color: inherit; text-decoration: none; white-space: nowrap; }
.table thead a:hover { color: var(--amber-2); }
.table td.clip, .table td.clip-wide {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.table td.clip { max-width: 160px; }
.table td.clip-wide { max-width: 280px; }
.muted { color: var(--muted); }
.wrap { word-break: break-word; }
.empty { color: var(--muted); padding: 24px 0; }

.filter, .filter-input { margin: 0 0 16px; }
.filter { display: flex; gap: 8px; max-width: 420px; }
.listing-bar {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px 8px;
  margin: 0 0 18px;
}
.listing-refine {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin: 0 0 12px;
}
.listing-refine .filter-input { flex: 1; min-width: 200px; margin: 0; width: auto; }
.listing-refine .price-input {
  width: 112px; font: inherit; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-2); color: var(--text); padding: 10px 14px; outline: none;
}
.listing-refine .price-input:focus { border-color: var(--amber); }
.listing-refine button {
  font: inherit; border: 0; border-radius: 999px;
  background: var(--amber); color: #1a1406; font-weight: 650; cursor: pointer;
  padding: 10px 16px;
}
.listing-row {
  display: grid; grid-template-columns: 92px 1fr; gap: 6px 12px;
  align-items: start; margin: 0 0 10px;
}
.listing-label {
  color: var(--muted); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; padding-top: 7px;
}
.chips.tight { gap: 6px; margin-bottom: 0; }
.chips.tight .chip { padding: 4px 9px; }
.brand-facet { min-width: 0; }
.brand-facet .filter-input { margin: 0 0 8px; max-width: 280px; padding: 7px 12px; }
.brand-chips { max-height: 9.2em; overflow: auto; padding-bottom: 2px; }

.peek-box {
  position: fixed; z-index: 70;
  width: min(380px, calc(100vw - 24px));
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow);
  padding: 12px 14px; pointer-events: auto;
}
.peek-box[hidden] { display: none; }
.peek-kicker {
  display: block; color: var(--muted); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 2px;
}
.peek-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.peek-logo {
  width: 44px; height: 44px; border-radius: 8px; background: #f3efe4;
  object-fit: contain; flex: none;
}
.peek-head strong { font-size: 16px; line-height: 1.25; }
.peek-text {
  color: #d8d1c4; font-size: 13px; line-height: 1.45;
  margin: 0 0 10px; max-height: 6.2em; overflow: hidden;
}
.peek-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px;
  margin: 0 0 8px; font-size: 12px;
}
.peek-stats div { display: flex; justify-content: space-between; gap: 8px; }
.peek-stats dt { color: var(--muted); }
.peek-stats dd { margin: 0; font-weight: 650; }
.peek-bars { display: flex; gap: 5px; align-items: flex-end; height: 32px; margin: 6px 0 8px; }
.peek-bars span {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--muted); font-size: 10px;
}
.peek-bars i {
  display: block; width: 100%; border-radius: 2px 2px 0 0; background: #3a362e; min-height: 2px;
}
.peek-bars i.on { background: var(--amber); }
.peek-top { margin: 0; padding: 0; list-style: none; font-size: 12px; }
.peek-top li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.peek-top a { color: inherit; }
.peek-top em { color: var(--muted); font-style: normal; }
.peek-more { display: inline-block; margin-top: 8px; font-size: 13px; }

.brands {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px;
}
.brand-card {
  display: flex; gap: 12px; align-items: center; color: var(--text);
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px;
}
.brand-card:hover { border-color: #534c3d; color: var(--text); }
.brand-card em { display: block; color: var(--muted); font-style: normal; font-size: 12px; }
.brand-logo {
  width: 48px; height: 48px; border-radius: 10px; background: #f3efe4; color: #1a1814;
  display: grid; place-items: center; overflow: hidden; flex: none; font-weight: 700;
}
.brand-logo.lg { width: 88px; height: 88px; font-size: 32px; }
.brand-logo.sm { width: 28px; height: 28px; font-size: 12px; border-radius: 6px; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-inline {
  display: inline-flex; align-items: center; gap: 8px; color: inherit;
}
.subnav {
  display: flex; gap: 4px; margin: 0 0 14px;
}
.subnav a {
  padding: 4px 10px; border-radius: 999px; color: var(--muted);
  border: 1px solid transparent;
}
.subnav a.is-on, .subnav a:hover {
  color: var(--text); border-color: var(--line); background: var(--paper);
}
.cert-thumb {
  width: 40px; height: 40px; object-fit: contain; background: #fff;
  border-radius: 4px; display: block;
}
.cert-preview {
  display: block; max-width: min(720px, 100%); max-height: 480px;
  object-fit: contain; background: #fff; border-radius: 10px;
  padding: 8px; margin: 0 0 16px;
}
.brand-hero { display: flex; gap: 18px; align-items: center; margin-bottom: 24px; }
.brand-preview {
  display: block; max-width: min(420px, 100%); max-height: 180px;
  object-fit: contain; background: #fff; border-radius: 12px; margin: 0 0 20px; padding: 8px;
}
.lead { color: #d8d1c4; line-height: 1.5; margin: 0 0 20px; }
.part-box {
  width: 100%; background: #161410; border: 1px solid var(--line);
  border-radius: 10px; padding: 4px 10px;
}
.part-box summary {
  cursor: pointer; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
}
.part-box .table { margin-top: 6px; }
.part-index { margin: 8px 0 24px; }
.part-index h2 { font-size: 18px; margin: 0 0 4px; }

.appl-type { margin-bottom: 18px; }
.appl-type h3 { margin: 0 0 8px; font-size: 16px; }
.appl-mark {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 12px; margin-bottom: 6px;
}
.appl-mark[hidden] { display: none; }
.appl-mark summary {
  cursor: pointer; display: flex; gap: 10px; align-items: baseline; flex-wrap: nowrap;
}
.appl-mark .chips { margin: 10px 0 4px; }

.analog {
  display: grid; grid-template-columns: 72px 1fr; gap: 12px; color: var(--text);
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 8px;
}
.analog:hover { border-color: #534c3d; color: var(--text); }
.analog.out { opacity: 0.78; }
.analog-pic {
  width: 72px; height: 72px; border-radius: 10px; background: #161410; overflow: hidden;
}
.analog-pic img { width: 100%; height: 100%; object-fit: contain; }
.analog code { margin-right: 8px; }
.analog span { display: block; color: var(--muted); font-size: 13px; }

.files { list-style: none; padding: 0; }
.files li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; flex-wrap: wrap; }

.pager {
  display: flex; gap: 16px; align-items: center; justify-content: center;
  margin: 28px 0 0; color: var(--muted);
}
.pager a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); }

.card-cat, .card-marks {
  color: var(--muted); font-size: 12px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.card-chips {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.card-chips a, .card-chips span {
  font-family: var(--mono); font-size: 10px; color: var(--amber-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 6px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chip.is-on { border-color: var(--amber); color: var(--amber-2); }
.chips.wrap { margin-bottom: 16px; }
.split {
  display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start;
}
.side {
  position: sticky; top: 84px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px 18px;
  max-height: calc(100vh - 120px); overflow: auto;
}
.side h1 { font-size: 22px; }
.cat-tree { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.cat-tree ul { list-style: none; padding: 4px 0 4px 12px; margin: 0; border-left: 1px solid var(--line); }
.cat-tree li { margin: 3px 0; }
.cat-tree a { color: var(--muted); }
.cat-tree a.is-on, .cat-tree a:hover { color: var(--amber-2); }
.appl-mark summary a { color: var(--text); font-weight: 650; }

.live-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pause-btn {
  font: inherit; font-size: 13px; font-weight: 650; cursor: pointer;
  color: var(--text); background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 14px;
}
.pause-btn:hover { border-color: var(--amber); }
.pause-btn[aria-pressed="true"] {
  background: var(--amber); color: #1a1406; border-color: var(--amber);
}
body.live-paused .card-stream,
body.live-paused .hero-live {
  opacity: 0.78;
  filter: saturate(0.85);
}
body.live-paused .card-stream {
  outline: 1px dashed var(--line);
}
.view-toggle button {
  font: inherit; font-size: 13px; color: var(--muted); background: transparent;
  border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer;
}
.view-toggle button.is-on { background: var(--amber); color: #1a1406; font-weight: 650; }

body.view-table .listing-grid { display: none; }
body:not(.view-table) .listing-table-wrap { display: none; }
body.view-table .page { width: min(1600px, calc(100% - 28px)); }

.listing-table-wrap { overflow-x: auto; }
.listing-table { min-width: 1080px; font-size: 11.5px; }
.listing-table th {
  color: var(--muted); font-weight: 500; font-size: 10px;
  letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 6px;
}
.listing-table td { padding: 2px 6px; }
.listing-table td, .listing-table th { vertical-align: middle; }
.listing-table .fill-ring { width: 22px; height: 22px; }
.listing-table .fill-ring > span { width: 16px; height: 16px; font-size: 8px; }
.listing-table .demand { gap: 2px; }
.listing-table .demand i { width: 5px; height: 8px; }
.listing-table .tag { font-size: 9px; padding: 0 5px; }
.listing-table strong { font-size: 11.5px; }
.td-pic { width: 36px; }
.td-pic .pic-open {
  display: grid; place-items: center; width: 28px; height: 28px; padding: 0;
  border: 1px solid var(--line); border-radius: 6px; background: #161410; cursor: zoom-in;
  overflow: hidden;
}
.td-pic .pic-open img { width: 100%; height: 100%; object-fit: contain; }
.gallery-main.pic-open { width: 100%; height: 400px; border-radius: var(--radius); }
.mono { font-family: var(--mono); font-size: 12px; }
.nowrap { white-space: nowrap; }

.lightbox {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(8, 7, 5, 0.88);
  display: grid; grid-template-columns: 56px 1fr 56px; grid-template-rows: 1fr auto;
  align-items: center; justify-items: center;
  padding: 48px 12px 24px;
}
.lightbox[hidden] { display: none; }
.lightbox figure {
  grid-column: 2; grid-row: 1;
  margin: 0; width: 100%; height: 100%; min-width: 0; min-height: 0;
  display: grid; place-items: center;
}
.lightbox img {
  width: 100%; height: 100%;
  max-width: 100%; max-height: calc(100vh - 96px);
  object-fit: contain;
}
.lightbox figcaption {
  grid-column: 1 / -1; grid-row: 2;
  color: var(--muted); font-size: 13px;
}
.lb-close, .lb-prev, .lb-next {
  font: inherit; font-size: 32px; line-height: 1; color: var(--text);
  background: transparent; border: 0; cursor: pointer; width: 48px; height: 48px;
}
.lb-prev { grid-column: 1; grid-row: 1; }
.lb-next { grid-column: 3; grid-row: 1; }
.lb-close { position: absolute; top: 12px; right: 16px; font-size: 36px; }
.lightbox.is-single .lb-prev, .lightbox.is-single .lb-next { visibility: hidden; }
body.lb-open { overflow: hidden; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: fixed; left: 0; top: 0; z-index: 50;
    width: min(280px, 86vw); transform: translateX(-105%);
    transition: transform .2s ease; box-shadow: var(--shadow);
  }
  body.rail-open .rail { transform: none; }
  body.rail-open::after {
    content: ""; position: fixed; inset: 0; z-index: 45;
    background: rgba(0,0,0,0.45);
  }
  .rail-toggle { display: inline-grid; place-items: center; }
  .top { grid-template-columns: auto 1fr auto; }
  .kbd-hint { display: none; }
  .hero, .product, .facts, .kpis, .split, .product-split, .props {
    grid-template-columns: 1fr;
  }
  .price-main { margin-left: 0; }
  .mfr-badge { max-width: 100%; }
  .side { position: static; max-height: 240px; }
  .listing-row { grid-template-columns: 1fr; }
  .listing-label { padding-top: 0; }
  .page, body.page-product .page { width: min(100% - 24px, 1280px); }
  .gallery-main, .gallery-main.pic-open { min-height: 280px; height: 280px; }
  .appl-mark summary { flex-wrap: wrap; }
}

.fill-ring {
  --ring: var(--muted);
  width: 34px; height: 34px; flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--ring) calc(var(--p) * 1%), #2c2923 0);
  display: grid; place-items: center;
}
.fill-ring > span {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--paper);
  font-size: 10px; font-weight: 700;
  display: grid; place-items: center;
  font-variant-numeric: tabular-nums;
}
.fill-ring.md { width: 42px; height: 42px; }
.fill-ring.md > span { width: 30px; height: 30px; font-size: 11px; }
.fill-ring.lg { width: 88px; height: 88px; }
.fill-ring.lg > span { width: 64px; height: 64px; font-size: 22px; }
.grade-S, .fill-ring.grade-S { --ring: var(--ok); color: var(--ok); }
.grade-A, .fill-ring.grade-A { --ring: #9dcc7e; color: #9dcc7e; }
.grade-B, .fill-ring.grade-B { --ring: var(--amber); color: var(--amber-2); }
.grade-C, .fill-ring.grade-C { --ring: #c4a36a; color: #c4a36a; }
.grade-D, .fill-ring.grade-D { --ring: var(--warn); color: var(--warn); }

.richness { margin: 0; }
.rich-head { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; }
.rich-head h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.03em; text-transform: none; color: var(--text); }
.rich-head p { margin: 0 0 4px; }
.rich-facets a { color: inherit; }
.rich-facets {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px;
}
.rich-facets li {
  display: flex; gap: 8px; align-items: baseline; justify-content: space-between;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 7px 10px; font-size: 13px;
}
.rich-facets li.on { border-color: #3d4a32; }
.rich-facets li.off { opacity: 0.62; }
.rich-facets em { color: var(--muted); font-style: normal; font-size: 11px; margin-left: auto; padding: 0 8px; }
.rich-facets b { font-weight: 650; font-size: 12px; }
.rich-facets li.on b { color: var(--ok); }
.rich-facets li.off b { color: var(--muted); font-weight: 500; }

.card-stream {
  overflow: hidden;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #18160f;
  padding: 10px 0;
  mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 36px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 36px), transparent);
}
.stream-track {
  display: flex;
  gap: 10px;
  padding: 0 14px;
  min-height: 68px;
  align-items: center;
}
.stream-card {
  flex: none;
  width: 228px;
  height: 64px;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 8px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 10px 4px 4px;
  color: var(--text);
  overflow: hidden;
}
.stream-card:hover { border-color: var(--amber); color: var(--text); }
.stream-pic {
  width: 56px; height: 56px; border-radius: 8px; background: #161410;
  overflow: hidden; display: grid; place-items: center;
}
.stream-pic img { width: 100%; height: 100%; object-fit: contain; }
.stream-card code { display: block; font-size: 11px; }
.stream-card strong {
  display: block; font-size: 12px; font-weight: 600; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.arrive-now {
  margin: 0 0 12px; color: var(--amber-2); font-size: 13px; font-weight: 600;
  min-height: 1.2em;
}
.arrive-now.is-on { animation: arrive-flash 1.4s ease; }

@keyframes arrive-flash {
  0% { opacity: 0; transform: translateY(-6px); }
  20% { opacity: 1; transform: none; }
  100% { opacity: 0.7; }
}

@keyframes card-enter {
  0% {
    opacity: 0;
    transform: translateY(-22px) scale(0.96);
    filter: brightness(1.35);
  }
  55% {
    opacity: 1;
    transform: translateY(0) scale(1.01);
    filter: brightness(1.08);
  }
  100% {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
.card.is-flowing, tr.is-flowing { transition: none; }
.card.is-new {
  animation: card-enter 0.72s cubic-bezier(.2,.8,.2,1) both;
  animation-delay: var(--enter-delay, 0ms);
  border-color: var(--amber);
  box-shadow: 0 0 0 1px rgba(232, 163, 23, 0.45), 0 14px 28px rgba(232, 163, 23, 0.18);
  z-index: 1;
}
.card.is-new::after, .card.is-fresh::after {
  content: "новая";
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: #1a1406; background: var(--amber); border-radius: 999px; padding: 3px 8px;
}
@keyframes row-enter {
  from { background: rgba(232, 163, 23, 0.22); }
  to { background: transparent; }
}
tr.is-new {
  animation: row-enter 1.1s ease both;
  animation-delay: var(--enter-delay, 0ms);
}
@keyframes kpi-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.08); color: var(--amber-2); }
  100% { transform: scale(1); }
}
.kpi-bump strong { display: inline-block; animation: kpi-bump 0.55s ease; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .card.is-new::after, .card.is-fresh::after { display: none; }
}
