/* Сальдо — «Слиток»: матовый фарфор, стеклянные торцы потерь, сырой фарфор, трещина, скобка и золото маржи.
   Только токены. Длины задаёт разметка (доли данных) — здесь нет ни одной «декоративной» длины. */

.ingot {
  --ingot-h: 40px;
  --seam: 3px;        /* шов между долями (вырезается симметрично, пропорции не меняются) */
  --r: 7px;
  --r-in: 2px;
  position: relative;
  width: var(--len, 100%);
  max-width: 100%;
}
.ingot--hero { --ingot-h: clamp(56px, 8vw, 128px); --seam: 4px; --r: 12px; --r-in: 3px; }
.ingot--shelf { --ingot-h: 40px; --seam: 3px; --r: 7px; }
.ingot--mini { --ingot-h: 12px; --seam: 2px; --r: 3px; --r-in: 1px; }

.ingot-track { position: relative; height: var(--ingot-h); isolation: isolate; }
/* Тень объекта на «полу» студии */
.ingot-track::before {
  content: ""; position: absolute; z-index: -1; left: 1.5%; right: 1.5%; bottom: calc(var(--ingot-h) * -0.16);
  height: calc(var(--ingot-h) * 0.42);
  background: radial-gradient(50% 50% at 50% 50%, color-mix(in srgb, var(--fg) 16%, transparent), transparent 72%);
  filter: blur(calc(var(--ingot-h) * 0.08));
  pointer-events: none;
}
.ingot--mini .ingot-track::before { display: none; }

/* ───────── Доля исполнителя: тело (фарфор) + стеклянный торец (потери) ───────── */
.ingot-seg {
  position: absolute; top: 0; bottom: 0;
  display: flex; gap: 1px; padding: 0 calc(var(--seam) / 2);
  margin: 0; border: 0; background: none; color: inherit; font: inherit;
  transform-origin: left center;
}
button.ingot-seg { cursor: pointer; }
button.ingot-seg:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: calc(var(--r) + 3px); }
.ingot-body, .ingot-glass { position: relative; min-width: 0; flex: 0 1 auto; height: 100%; }
.ingot-body {
  border-radius: var(--r) var(--r-in) var(--r-in) var(--r);
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--surface) 46%, var(--c)) 0%,
      color-mix(in srgb, var(--surface) 16%, var(--c)) 10%,
      var(--c) 48%,
      color-mix(in srgb, var(--fg) 8%, var(--c)) 100%);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--surface) 75%, transparent),
    inset 0 -1px 0 color-mix(in srgb, var(--fg) 12%, transparent),
    inset 1px 0 0 color-mix(in srgb, var(--surface) 28%, transparent),
    inset -1px 0 0 color-mix(in srgb, var(--fg) 6%, transparent),
    var(--shadow-object);
  transition: filter var(--duration-fast) var(--ease), transform var(--duration-base) var(--ease-out);
}
.ingot-body:only-child { border-radius: var(--r); }
/* Матовая фактура фарфора (векторный шум, без растров) — только у героя */
.ingot--hero .ingot-body::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .5; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Верхний блик — мягкая полоса света по ребру */
.ingot--hero .ingot-body::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 40%; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 90% at 30% 0%, color-mix(in srgb, var(--surface) 22%, transparent), transparent 70%);
}

.ingot-glass {
  --tint: color-mix(in srgb, var(--p1) 62%, var(--c));
  border-radius: var(--r-in) var(--r) var(--r) var(--r-in);
  background:
    linear-gradient(90deg, transparent 12%, color-mix(in srgb, var(--surface) 55%, transparent) 22%, transparent 40%, transparent 78%, color-mix(in srgb, var(--surface) 30%, transparent) 88%, transparent),
    linear-gradient(180deg,
      color-mix(in srgb, var(--surface) 82%, var(--tint)) 0%,
      color-mix(in srgb, var(--surface) 60%, var(--tint)) 14%,
      color-mix(in srgb, var(--surface) 52%, var(--tint)) 60%,
      color-mix(in srgb, var(--surface) 40%, var(--tint)) 100%);
  opacity: .9;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--surface) 70%, transparent),
    inset 0 1px 0 var(--surface),
    inset 0 -10px 14px -10px color-mix(in srgb, var(--tint) 80%, transparent),
    var(--shadow-object);
}
.ingot--mini .ingot-glass { background: color-mix(in srgb, var(--c) 30%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 6%, transparent); }
.ingot--mini .ingot-body { box-shadow: inset 0 1px 0 color-mix(in srgb, var(--surface) 50%, transparent); }

/* Трещина опоздания */
.ingot-crack { position: absolute; top: 0; left: 42%; height: 100%; width: calc(var(--ingot-h) * .72); overflow: visible; pointer-events: none; }
.ingot-crack path { fill: none; stroke: color-mix(in srgb, var(--danger) 72%, var(--fg)); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.ingot-crack path.is-thin { stroke-width: .9; opacity: .8; }
.ingot--shelf .ingot-crack path { stroke-width: 1.1; }
.ingot--mini .ingot-crack { display: none; }
.ingot--mini .ingot-seg.is-late .ingot-body { box-shadow: inset 0 -2px 0 var(--danger); }

/* Наведение на долю (только у интерактивного героя) */
button.ingot-seg:hover .ingot-body { filter: brightness(1.04); }
button.ingot-seg:hover .ingot-body, button.ingot-seg:hover .ingot-glass { transform: translateY(-2px); }

/* ───────── Сырой фарфор: нераспределённый объём ───────── */
.ingot-raw {
  position: absolute; top: 0; bottom: 0; padding: 0 calc(var(--seam) / 2);
  transform-origin: left center;
}
.ingot-raw::before {
  content: ""; position: absolute; inset: 0 calc(var(--seam) / 2); border-radius: var(--r);
  background:
    repeating-linear-gradient(118deg, transparent 0 7px, color-mix(in srgb, var(--fg) 2.5%, transparent) 7px 8px),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 80%, var(--raw)) 0%, var(--raw) 28%, color-mix(in srgb, var(--fg) 4%, var(--raw)) 100%);
  box-shadow:
    inset 0 0 0 1px var(--border),
    inset 0 1px 0 var(--surface),
    var(--shadow-object);
}
.ingot--mini .ingot-raw::before { box-shadow: inset 0 0 0 1px var(--border-strong); }
.ingot-raw.is-drop::before { box-shadow: inset 0 0 0 2px var(--accent-bright), var(--shadow-object); }

/* Разрез (интерактивный герой) */
.ingot.is-interactive .ingot-raw { cursor: ew-resize; touch-action: pan-y; }
.ingot-cut {
  position: absolute; top: 0; bottom: 0; left: calc(var(--seam) / 2);
  width: calc((100% - var(--seam)) * var(--cut, 0));
  border-radius: var(--r) 0 0 var(--r);
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--surface) 50%, var(--c)) 0%,
      color-mix(in srgb, var(--surface) 22%, var(--c)) 12%,
      color-mix(in srgb, var(--raw) 22%, var(--c)) 52%,
      color-mix(in srgb, var(--fg) 6%, var(--c)) 100%);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--surface) 70%, transparent);
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease);
}
.ingot.has-cut .ingot-cut { opacity: .92; }
.ingot-seam {
  position: absolute; top: -6px; bottom: -6px; width: 2px; margin-left: -1px;
  left: calc(var(--seam) / 2 + (100% - var(--seam)) * var(--cut, 0));
  border-radius: 2px;
  background: linear-gradient(180deg, transparent, var(--surface) 18%, var(--surface) 82%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--fg) 10%, transparent), 0 0 14px 3px color-mix(in srgb, var(--surface) 90%, transparent);
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease);
}
.ingot.has-cut .ingot-seam, .ingot.is-dragging .ingot-seam { opacity: 1; }
.ingot-handle {
  position: absolute; top: 50%; z-index: 3;
  left: calc(var(--seam) / 2 + (100% - var(--seam)) * var(--cut, 0));
  width: 48px; height: 48px; margin: -24px 0 0 -24px; padding: 0;
  border-radius: 50%; border: 1px solid color-mix(in srgb, var(--fg) 10%, transparent);
  background: color-mix(in srgb, var(--surface) 38%, transparent);
  backdrop-filter: blur(3px);
  display: grid; place-items: center; cursor: ew-resize; touch-action: none;
  transition: transform var(--duration-fast) var(--ease);
}
.ingot-handle i {
  width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 40% 32%, var(--surface), color-mix(in srgb, var(--fg) 5%, var(--surface)));
  box-shadow: var(--shadow-2), inset 0 0 0 1px var(--border);
}
.ingot-handle:hover { transform: scale(1.06); }
.ingot-handle:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 50%; }
.ingot.is-dragging .ingot-handle { transform: scale(1.1); }
.ingot.is-dragging .ingot-cut, .ingot.is-dragging .ingot-seam, .ingot.is-dragging .ingot-handle { transition: opacity var(--duration-fast) var(--ease); }
/* Пружинный «щелчок» разреза */
.ingot.is-snap .ingot-cut { animation: ingot-snap var(--duration-slow) var(--ease-spring); }
.ingot.is-snap .ingot-seam { animation: ingot-seam var(--duration-slow) var(--ease-out); }
@keyframes ingot-snap { 0% { transform: scaleY(.94); } 60% { transform: scaleY(1.02); } 100% { transform: none; } }
@keyframes ingot-seam { 0% { box-shadow: 0 0 0 1px transparent, 0 0 28px 8px var(--surface); } 100% { } }

/* Перебор: распределено больше, чем поступило */
.ingot-over { position: absolute; top: -10px; bottom: -10px; width: 0; border-left: 1.5px dashed var(--danger); z-index: 2; }
.ingot-over b { position: absolute; bottom: 100%; left: 0; transform: translateX(-50%); font-size: var(--text-xs); font-weight: 500; color: var(--danger); white-space: nowrap; }
.ingot-void { position: absolute; inset: 0; display: grid; place-items: center; border-radius: var(--r); border: 1px dashed var(--border-strong); color: var(--fg-muted); font-size: var(--text-sm); }

/* ───────── Подписи над героем ───────── */
.ingot-labels { position: relative; height: calc(var(--levels, 1) * var(--row-h, 56px)); margin-bottom: 12px; }
.ingot-label {
  position: absolute; bottom: calc(var(--lv, 0) * var(--row-h, 56px)); left: 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  font-size: var(--text-sm); line-height: 1.35; white-space: nowrap; color: var(--fg);
  transition: opacity var(--duration-fast) var(--ease);
}
.ingot--hero:not(.is-laid) .ingot-label { visibility: hidden; }
.ingot-label b { font-weight: 500; font-size: var(--text-md); }
.ingot-label .num { color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.ingot-label em { font-style: normal; color: var(--danger); font-weight: 500; }
.ingot-label em::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.ingot-label i { font-style: normal; color: var(--fg-muted); font-size: var(--text-xs); }
.ingot-label.is-raw b { font-weight: 400; color: var(--fg-muted); }
.ingot-label.is-raw .num { color: var(--fg); }
.ingot-leader { position: absolute; top: calc(100% + 3px); width: 1px; height: calc(var(--lv, 0) * var(--row-h, 56px) + 6px); background: var(--border-strong); display: none; }
.ingot-label.is-out .ingot-leader { display: block; }
.ingot-label.is-out .ingot-leader::after { content: ""; position: absolute; bottom: -2px; left: -2px; width: 5px; height: 5px; border-radius: 50%; background: var(--fg-muted); }

/* На тесной шкале подробные подписи переходят в список под слитком. */
.ingot--hero.is-dense { padding-top: var(--space-3); }
.ingot-part-balance { color: var(--fg-muted); margin-bottom: var(--space-2); overflow-wrap: anywhere; }
.ingot-part-balance b { color: var(--fg); font-weight: 500; }
.ingot-parts { border-block: 1px solid var(--border); margin-bottom: var(--space-4); }
.ingot-parts summary {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-3);
  min-height: var(--tap); padding: var(--space-2) 0; list-style: none; cursor: pointer; font-weight: 500;
}
.ingot-parts summary::-webkit-details-marker { display: none; }
.ingot-parts[open] summary .ic { transform: rotate(180deg); }
.ingot-parts ul { list-style: none; margin: 0; padding: 0; }
.ingot-parts li { border-top: 1px solid var(--border); }
.ingot-part {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center;
  gap: var(--space-2); width: 100%; min-height: var(--tap); padding: var(--space-2) 0;
  border: 0; background: none; text-align: left; overflow-wrap: anywhere;
}
.ingot-part i { width: 10px; height: 8px; border-radius: 2px; background: var(--c); }
.ingot-part small { display: block; font-size: var(--text-xs); color: var(--fg-muted); }
.ingot-part .num { max-width: min(40vw, 12rem); text-align: right; }
.ingot-part .ic { width: 16px; color: var(--fg-muted); }

/* ───────── Под героем: скобка «вернуть», золото маржи ───────── */
.ingot-under { position: relative; height: 120px; margin-top: 20px; }
.ingot-bracket {
  position: absolute; left: 0; top: 0; height: 12px;
  border: 1.5px solid var(--fg-muted); border-top: 0; border-radius: 0 0 3px 3px;
  transform-origin: left center;
}
.ingot-bracket::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1.5px; height: 8px; margin-left: -.75px; background: var(--fg-muted); }
.ingot-bracket > span {
  position: absolute; left: 50%; top: calc(100% + 14px);
  transform: translateX(calc(-50% + var(--label-shift, 0px)));
  width: max-content; max-width: var(--track-width, none); overflow-wrap: anywhere;
  text-align: center; font-size: var(--text-md); color: var(--fg-muted);
}
.ingot-bracket > span .num { color: var(--fg); font-weight: 500; font-variant-numeric: tabular-nums; }
.ingot-gold {
  position: absolute; top: 7px; height: 9px; border-radius: var(--radius-pill);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 45%, var(--gold-glow)) 0%, var(--gold-glow) 55%, color-mix(in srgb, var(--gold) 45%, var(--gold-glow)) 100%);
  box-shadow: 0 0 22px 4px color-mix(in srgb, var(--gold-glow) 50%, transparent), 0 0 6px 1px color-mix(in srgb, var(--gold-glow) 70%, transparent);
  transform-origin: left center;
}
.ingot-gold.is-neg {
  top: 3px; height: 0; border-radius: 0; background: none; box-shadow: none;
  border-top: 2px dashed var(--fg-muted);
}
.ingot-gold.is-neg::before, .ingot-gold.is-neg::after { content: ""; position: absolute; top: -5px; width: 1.5px; height: 8px; background: var(--fg-muted); }
.ingot-gold.is-neg::before { left: 0; }
.ingot-gold.is-neg::after { right: 0; }
.ingot-margin {
  position: absolute; top: 34px; transform: translateX(calc(var(--tx, 0px) + var(--label-shift, 0px)));
  width: max-content; max-width: var(--track-width, 100%);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  overflow-wrap: anywhere;
}
.ingot-margin b {
  font: 300 var(--text-3xl)/1 var(--font-display); letter-spacing: -0.03em; color: var(--gold);
  max-width: 100%; font-variant-numeric: tabular-nums;
}
.ingot-margin small { margin-top: 4px; font-size: var(--text-sm); color: var(--fg-muted); }
.ingot-margin.is-neg { top: 44px; }
.ingot-margin.is-pending { top: 28px; align-items: flex-end; max-width: 50%; }
.ingot-margin.is-pending small { margin: 0; text-align: right; white-space: normal; }
.ingot-margin.is-neg b { color: var(--fg); }
.ingot-margin.is-loss b { color: var(--danger); }

/* Полка и мини: тонкая линия маржи под слитком (те же доли, что у героя) */
.ingot--shelf > .ingot-gold, .ingot--mini > .ingot-gold { top: calc(100% + 7px); height: 4px; box-shadow: 0 0 10px 2px color-mix(in srgb, var(--gold-glow) 45%, transparent); }
.ingot--mini > .ingot-gold { top: calc(100% + 4px); height: 3px; box-shadow: 0 0 6px 1px color-mix(in srgb, var(--gold-glow) 40%, transparent); }
.ingot--shelf > .ingot-gold.is-neg, .ingot--mini > .ingot-gold.is-neg { top: calc(100% + 10px); height: 0; border-top-width: 1.5px; box-shadow: none; }
.ingot--shelf > .ingot-gold.is-neg::before, .ingot--shelf > .ingot-gold.is-neg::after { top: -4px; height: 7px; width: 1px; }
.ingot--mini > .ingot-gold.is-neg::before, .ingot--mini > .ingot-gold.is-neg::after { display: none; }

/* ───────── Рост слитка при появлении: по долям слева направо ───────── */
.ingot.is-grow .ingot-seg, .ingot.is-grow .ingot-raw { animation: ingot-grow var(--duration-slow) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 110ms); }
.ingot.is-grow .ingot-bracket { animation: ingot-draw 800ms var(--ease-out) both; animation-delay: 240ms; }
@keyframes ingot-draw { from { clip-path: inset(-20px 100% -80px 0); } to { clip-path: inset(-20px -400px -80px -400px); } }
.ingot.is-grow .ingot-gold:not(.is-neg) { animation: ingot-glow 1100ms var(--ease-out) both; animation-delay: 520ms; }
.ingot.is-grow .ingot-gold.is-neg, .ingot.is-grow .ingot-margin, .ingot.is-grow .ingot-label { animation: fade var(--duration-slow) var(--ease-out) both; animation-delay: 480ms; }
@keyframes ingot-grow { from { transform: scaleX(0); opacity: 0; } 25% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes ingot-glow {
  0% { transform: scaleX(0); opacity: 0; box-shadow: none; }
  45% { transform: none; opacity: 1; }
  70% { box-shadow: 0 0 34px 8px color-mix(in srgb, var(--gold-glow) 70%, transparent), 0 0 8px 2px var(--gold-glow); }
  100% { transform: none; opacity: 1; }
}
.ingot-seg.is-fresh { animation: ingot-fresh 640ms var(--ease-out) both; }
@keyframes ingot-fresh { 0% { transform: scaleX(.82); filter: brightness(1.25); } 100% { transform: none; filter: none; } }

/* ───────── Подсказка ───────── */
.ingot-tip {
  position: fixed; z-index: 75; pointer-events: none;
  padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--fg); color: var(--bg); box-shadow: var(--shadow-2);
  font-size: var(--text-sm); font-variant-numeric: tabular-nums; white-space: nowrap;
  opacity: 0; transform: translateY(4px);
  transition: opacity var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease);
}
.ingot-tip.is-on { opacity: 1; transform: none; }

/* ───────── Полка ───────── */
.ingot-shelf { container-type: inline-size; display: flex; flex-direction: column; }
.ingot-row {
  --ingot-h: 40px;
  position: relative;
  display: grid; grid-template-columns: minmax(120px, min(14rem, 20%)) minmax(0, 1fr) minmax(104px, min(10rem, 16%));
  grid-template-areas: "name obj end";
  align-items: end; column-gap: var(--space-8);
  padding: var(--space-6) 0 var(--space-8);
  color: var(--fg); text-decoration: none; border-radius: var(--radius-md);
}
/* Полка-ступенька под слитками */
.ingot-row::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: calc(var(--space-8) - 4px); height: 3px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(180deg, var(--surface), var(--surface-3));
  box-shadow: 0 1px 0 var(--border), 0 14px 18px -14px color-mix(in srgb, var(--fg) 26%, transparent);
}
.ingot-row-name { grid-area: name; display: flex; flex-direction: column; min-width: 0; padding-bottom: 6px; }
.ingot-row-name b { font: 400 var(--text-xl)/1.15 var(--font-display); letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ingot-row-name .num { color: var(--fg-muted); font-size: var(--text-md); }
.ingot-row-obj { grid-area: obj; position: relative; height: 40px; min-width: 0; }
.ingot-row-obj .ingot { transition: transform var(--duration-base) var(--ease-out); }
.ingot-row:hover .ingot-row-obj .ingot { transform: translateY(-3px); }
.ingot-row:focus-visible { outline-offset: 6px; border-radius: var(--radius-md); }
.ingot-row-raw {
  display: block; max-width: 100%; text-align: right; overflow-wrap: anywhere;
  margin-top: var(--space-2);
  font-size: var(--text-xs); color: var(--fg-muted); line-height: 1.2;
}
.ingot-row-end { grid-area: end; container-type: inline-size; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; text-align: right; padding-bottom: 6px; }
.ingot-row-m { font: 300 var(--text-2xl)/1.1 var(--font-display); letter-spacing: -0.02em; color: var(--gold); overflow-wrap: anywhere; }
.ingot-row-m { font-size: clamp(var(--text-md), 13cqi, var(--text-2xl)); }
.ingot-row-m.is-neg { color: var(--fg-muted); }
.ingot-state { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); color: var(--fg-muted); white-space: nowrap; }
.ingot-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ingot-state.is-ok { color: var(--success); }
.ingot-state.is-warn { color: var(--warning); }
.ingot-state.is-bad { color: var(--danger); }
.ingot-state.is-neutral::before { background: var(--fg-subtle); }
.ingot-shelf-more {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--tap); margin-top: var(--space-2);
  color: var(--fg); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.ingot-shelf-more .ic { width: 18px; height: 18px; }

@container (max-width: 760px) {
  .ingot-row {
    --ingot-h: 32px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 44%); grid-template-areas: "name end" "obj obj";
    row-gap: var(--space-3); padding: var(--space-4) 0 var(--space-8);
  }
  .ingot-row::after { bottom: calc(var(--space-8) - 4px); }
  .ingot-row-name, .ingot-row-end { align-self: center; padding-bottom: 0; }
  .ingot-row-obj { height: 32px; }
  .ingot-row-obj .ingot { --ingot-h: 32px; --r: 6px; }
  .ingot-row-name b { font-size: var(--text-lg); white-space: normal; overflow-wrap: anywhere; }
  .ingot-state { white-space: normal; text-align: right; }
  .ingot-state::before { flex: none; }
  .ingot-row-raw { top: calc(100% + 12px); right: 0; white-space: normal; text-align: right; }
}

/* Подписи уровня 0 перекрывают выносные линии соседей */
.ingot-label { z-index: 1; }
.ingot-label.is-out { z-index: 0; }
.ingot-label > b, .ingot-label > .num, .ingot-label > em { background: var(--bg); padding: 0 4px; border-radius: 4px; }
