<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="https://www.pandoraburo.ru/" xml:lang="ru">
  <id>https://www.pandoraburo.ru/izlozhnitcy-alternativnyy-koeff-0-15</id>
  <link href="https://www.pandoraburo.ru/izlozhnitcy-alternativnyy-koeff-0-15.xml" rel="self"/>
  <title>Изложницы альтернативный коэфф 0,15</title>
  <subtitle type="html">
&lt;html lang="ru"&gt;
&lt;head&gt;
&lt;meta charset="UTF-8"&gt;
&lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
&lt;title&gt;Калькулятор изложниц — масштабирование по массе — Арсенал-Деталь&lt;/title&gt;
&lt;style&gt;
  :root {
    --bg: #0a0a0a; --bg2: #111111; --line: #d4af37; --gold: #d4af37;
    --goldB: #f0d060; --red: #e74c3c; --green: #2ecc71; --orange: #ffb060;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg); color: var(--gold); line-height: 1.5; padding: 20px 14px;
  }
  .wrap { max-width: 1400px; margin: 0 auto; }

  .ticker-block {
    display: flex; align-items: stretch; background: var(--bg);
    border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
    margin-bottom: 14px; height: 44px;
  }
  .ticker-label {
    background: var(--gold); color: #0a0a0a; font-weight: 800; font-size: 12px;
    letter-spacing: 1.5px; padding: 0 16px; display: flex; align-items: center; white-space: nowrap;
  }
  .ticker-viewport { flex: 1; overflow: hidden; position: relative; }
  .ticker-track {
    display: inline-flex; align-items: center; height: 100%; white-space: nowrap;
    animation: tickerScroll 40s linear infinite; padding-left: 20px;
  }
  .ticker-item { color: var(--gold); font-size: 13px; padding: 0 10px; letter-spacing: .3px; }
  .ticker-item b { color: var(--goldB); font-weight: 700; }
  .ticker-dot { color: var(--gold); font-size: 10px; }
  @keyframes tickerScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

  header {
    background: radial-gradient(120% 120% at 20% 0%, rgba(255,215,0,.18), transparent 55%),
                linear-gradient(135deg, #1a1408, #0a0a0a);
    border: 2px solid var(--gold); border-radius: 12px;
    padding: 30px 25px; text-align: center; margin-bottom: 14px;
    box-shadow: 0 0 40px rgba(255,215,0,.2);
  }
  .banner-line {
    display: inline-block; background: var(--gold); color: #0a0a0a;
    font-size: 11px; font-weight: 800; letter-spacing: 2px; padding: 4px 14px;
    border-radius: 999px; margin-bottom: 14px; box-shadow: 0 0 16px rgba(255,215,0,.7);
  }
  header h1 {
    margin: 0 0 12px 0; font-size: 28px; color: var(--gold);
    text-transform: uppercase; letter-spacing: 3px; font-weight: 900;
    text-shadow: 0 0 10px rgba(255,215,0,.95), 0 0 25px rgba(255,199,0,.8);
  }
  header p { margin: 0; color: var(--goldB); font-size: 15px; opacity: .95; }

  .calc-block {
    background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
    padding: 20px; margin-bottom: 14px;
  }
  .calc-title {
    color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: 2px;
    text-transform: uppercase; padding-bottom: 12px; margin-bottom: 16px;
    border-bottom: 1px solid var(--line); text-align: center;
  }

  .highlight-block {
    background: linear-gradient(135deg, rgba(255,215,0,.15), rgba(255,140,0,.06));
    border: 3px solid var(--gold); border-radius: 14px; padding: 22px 20px;
    margin-bottom: 16px; position: relative;
    box-shadow: 0 0 40px rgba(255,215,0,.3), inset 0 0 30px rgba(255,215,0,.05);
  }
  .highlight-block::before {
    content: '★ БАЗОВАЯ ПОЗИЦИЯ ★';
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    background: #0a0a0a; color: var(--gold); padding: 4px 22px;
    border: 2px solid var(--gold); border-radius: 999px;
    font-size: 12px; font-weight: 900; letter-spacing: 3px;
    text-shadow: 0 0 15px rgba(255,215,0,1); white-space: nowrap;
    box-shadow: 0 0 20px rgba(255,215,0,.6);
    animation: pulse 2s ease-in-out infinite;
  }
  @keyframes pulse {
    0%,100% { box-shadow: 0 0 20px rgba(255,215,0,.6); }
    50% { box-shadow: 0 0 35px rgba(255,215,0,1), 0 0 60px rgba(255,140,0,.6); }
  }

  .highlight-header {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
    padding-bottom: 14px; border-bottom: 1px solid rgba(212,175,55,.3);
  }
  .highlight-name {
    font-size: 22px; font-weight: 900; color: var(--gold);
    letter-spacing: 2px; text-transform: uppercase;
    text-shadow: 0 0 12px rgba(255,215,0,.6);
  }
  .highlight-price {
    font-size: 32px; font-weight: 900; color: var(--goldB);
    font-variant-numeric: tabular-nums; line-height: 1;
    text-shadow: 0 0 20px rgba(255,215,0,.7);
  }
  .highlight-price small {
    font-size: 14px; color: var(--gold); opacity: .8;
    font-weight: 700; display: block; margin-bottom: 4px;
    letter-spacing: 1px;
  }

  .spec-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
    margin-bottom: 16px;
  }
  @media (max-width: 900px) { .spec-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 500px) { .spec-grid { grid-template-columns: 1fr; } }
  .spec-item {
    background: rgba(0,0,0,.5); border: 1px solid rgba(212,175,55,.4);
    border-radius: 9px; padding: 10px 12px; text-align: center;
  }
  .spec-label {
    font-size: 10px; font-weight: 700; letter-spacing: 1px;
    text-transform: uppercase; color: var(--gold); opacity: .7; margin-bottom: 4px;
  }
  .spec-value {
    font-size: 16px; font-weight: 800; color: var(--goldB);
    font-variant-numeric: tabular-nums;
  }

  .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
  .field label {
    font-size: 11px; font-weight: 700; color: var(--gold);
    text-transform: uppercase; letter-spacing: 1px; opacity: .8;
  }
  .field input, .field select {
    padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px;
    font-size: 14px; background: var(--bg); color: var(--gold);
    outline: none; transition: .15s; font-family: inherit; font-variant-numeric: tabular-nums;
  }
  .field input:focus, .field select:focus {
    border-color: var(--goldB); box-shadow: 0 0 0 3px rgba(212,175,55,.2);
  }
  .field-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
  @media (max-width: 800px) { .field-row { grid-template-columns: 1fr; } }
  .field-row-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; }
  @media (max-width: 900px) { .field-row-4 { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 500px) { .field-row-4 { grid-template-columns: 1fr; } }

  .auto-calc {
    background: rgba(212,175,55,.08); border: 1px dashed var(--gold);
    border-radius: 9px; padding: 12px 14px; margin-bottom: 14px;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  }
  @media (max-width: 900px) { .auto-calc { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 500px) { .auto-calc { grid-template-columns: 1fr; } }
  .auto-item { text-align: center; }
  .auto-label { font-size: 10px; color: var(--gold); opacity: .7; text-transform: uppercase; font-weight: 700; }
  .auto-value { font-size: 18px; font-weight: 800; color: var(--goldB); font-variant-numeric: tabular-nums; }

  .result-block {
    background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 14px;
  }
  .result-main {
    text-align: center; padding: 16px 0 20px; border-bottom: 1px solid rgba(212,175,55,.3); margin-bottom: 16px;
  }
  .result-main-label {
    font-size: 11px; font-weight: 800; letter-spacing: 2px;
    text-transform: uppercase; color: var(--gold); opacity: .8; margin-bottom: 8px;
  }
  .result-main-value {
    font-size: 48px; font-weight: 800; color: var(--goldB);
    line-height: 1; font-variant-numeric: tabular-nums; margin-bottom: 6px;
  }
  .result-main-unit { font-size: 16px; color: var(--gold); opacity: .8; }
  .result-main-note { font-size: 12px; color: var(--gold); opacity: .7; margin-top: 8px; }

  .result-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px;
  }
  @media (max-width: 900px) { .result-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 500px) { .result-grid { grid-template-columns: 1fr; } }
  .result-item {
    background: #0a0a0a; border: 1px solid rgba(212,175,55,.3); border-radius: 9px; padding: 12px; text-align: center;
  }
  .result-label {
    font-size: 10px; font-weight: 700; letter-spacing: 1px;
    text-transform: uppercase; color: var(--gold); opacity: .7; margin-bottom: 6px;
  }
  .result-value { font-size: 18px; font-weight: 800; color: var(--goldB); line-height: 1.1; font-variant-numeric: tabular-nums; }
  .result-value.small { font-size: 15px; }
  .result-value.profit { color: var(--green); }
  .result-value.neg { color: var(--red); }

  .scale-table {
    width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px;
    background: #0a0a0a; border-radius: 9px; overflow: hidden;
    border: 1px solid var(--line);
  }
  .scale-table th, .scale-table td {
    padding: 10px 12px; text-align: right; border-bottom: 1px solid rgba(212,175,55,.2);
    color: var(--gold); font-variant-numeric: tabular-nums;
  }
  .scale-table th {
    background: #1a1408; color: var(--gold); font-weight: 800;
    text-transform: uppercase; font-size: 10px; letter-spacing: 1px;
    border-bottom: 1px solid var(--gold);
  }
  .scale-table th:first-child, .scale-table td:first-child { text-align: left; }
  .scale-table tr:hover { background: #1a1408; }
  .scale-table tr.base-row { background: rgba(255,215,0,.12); box-shadow: inset 3px 0 0 var(--gold); }
  .scale-table tr.active-row { background: rgba(46,204,113,.12); box-shadow: inset 3px 0 0 var(--green); }
  .scale-table td.price-kg { color: var(--goldB); font-weight: 700; }
  .scale-table td.total { color: var(--goldB); font-weight: 800; }

  .actions { display: flex; gap: 10px; flex-wrap: wrap; }
  .promo-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 12px 16px; border-radius: 9px; border: 1px solid var(--gold);
    background: transparent; color: var(--gold); font-size: 13px; font-weight: 700;
    cursor: pointer; transition: .15s; font-family: inherit; letter-spacing: .3px; flex: 1; min-width: 140px;
  }
  .promo-btn:hover { background: var(--gold); color: #0a0a0a; }
  .promo-btn.primary { background: var(--gold); color: #0a0a0a; }
  .promo-btn.primary:hover { background: var(--goldB); }

  .pricing-info {
    background: rgba(46, 204, 113, 0.08); border: 1px solid var(--green);
    border-radius: 10px; padding: 14px 18px; margin-top: 14px; text-align: center;
  }
  .pricing-info-title {
    font-size: 12px; font-weight: 800; color: var(--green);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px;
  }
  .pricing-info-text { font-size: 13px; color: var(--gold); opacity: .85; line-height: 1.6; }
  .pricing-info-text b { color: var(--goldB); }

  ::-webkit-scrollbar { width: 14px; height: 14px; }
  ::-webkit-scrollbar-track { background: #050505; border: 1px solid #2a2210; border-radius: 9px; }
  ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ffd700 0%, #ff8c00 50%, #ffd700 100%);
    border: 1px solid #ffd700; border-radius: 9px; box-shadow: 0 0 10px rgba(255,215,0,.6);
  }

  @media print {
    body { background: #fff; color: #000; padding: 0; }
    .ticker-block, .promo-btn { display: none !important; }
    .calc-block, .result-block, .highlight-block { background: #fff !important; border: 1px solid #999 !important; box-shadow: none !important; }
    .field input, .field select { background: #fff !important; color: #000 !important; border-color: #999 !important; }
    .result-main-value, .result-value, .highlight-price { color: #000 !important; }
    .highlight-block::before { background: #fff !important; color: #000 !important; border-color: #999 !important; }
    .scale-table th { background: #000 !important; color: #FFD700 !important; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
    .scale-table td { color: #000 !important; border-color: #ccc !important; }
  }
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class="wrap"&gt;

  &lt;div class="ticker-block"&gt;
    &lt;div class="ticker-label"&gt;АКТУАЛЬНО 2024&lt;/div&gt;
    &lt;div class="ticker-viewport"&gt;
      &lt;div class="ticker-track"&gt;
        &lt;span class="ticker-item"&gt;Чугун СЧ20: &lt;b&gt;от 95 ₽/кг&lt;/b&gt;&lt;/span&gt;
        &lt;span class="ticker-dot"&gt;◆&lt;/span&gt;
        &lt;span class="ticker-item"&gt;Золото: &lt;b&gt;~7 500 ₽/г&lt;/b&gt;&lt;/span&gt;
        &lt;span class="ticker-dot"&gt;◆&lt;/span&gt;
        &lt;span class="ticker-item"&gt;Показатель масштаба: &lt;b&gt;0.15&lt;/b&gt;&lt;/span&gt;
        &lt;span class="ticker-dot"&gt;◆&lt;/span&gt;
        &lt;span class="ticker-item"&gt;База: &lt;b&gt;15.25 кг → 68 000 ₽&lt;/b&gt;&lt;/span&gt;
        &lt;span class="ticker-dot"&gt;◆&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;

  &lt;header&gt;
    &lt;div class="banner-line"&gt;★ МАСШТАБИРОВАНИЕ ПО МАССЕ ★&lt;/div&gt;
    &lt;h1&gt;Изложницы для золота · цена от массы&lt;/h1&gt;
    &lt;p&gt;Коэффициент (база / масса)^0.15 · плавное снижение цены за кг · защита маржи&lt;/p&gt;
  &lt;/header&gt;

  
  &lt;div class="highlight-block"&gt;
    &lt;div class="highlight-header"&gt;
      &lt;div class="highlight-name"&gt;Изложница ИЗ-12 (чугун СЧ20)&lt;/div&gt;
      &lt;div class="highlight-price"&gt;
        &lt;small&gt;Базовая цена&lt;/small&gt;
        68 000 ₽
      &lt;/div&gt;
    &lt;/div&gt;

    &lt;div class="spec-grid"&gt;
      &lt;div class="spec-item"&gt;
        &lt;div class="spec-label"&gt;Материал&lt;/div&gt;
        &lt;div class="spec-value"&gt;Чугун СЧ20&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="spec-item"&gt;
        &lt;div class="spec-label"&gt;Вес формы&lt;/div&gt;
        &lt;div class="spec-value"&gt;15.25 кг&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="spec-item"&gt;
        &lt;div class="spec-label"&gt;Вес слитка&lt;/div&gt;
        &lt;div class="spec-value"&gt;~12 кг&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="spec-item"&gt;
        &lt;div class="spec-label"&gt;Габариты&lt;/div&gt;
        &lt;div class="spec-value"&gt;330×130×65&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="spec-item"&gt;
        &lt;div class="spec-label"&gt;Полость&lt;/div&gt;
        &lt;div class="spec-value"&gt;260×90×35&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="spec-item"&gt;
        &lt;div class="spec-label"&gt;Дно&lt;/div&gt;
        &lt;div class="spec-value"&gt;300×130&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="spec-item"&gt;
        &lt;div class="spec-label"&gt;Цена за кг&lt;/div&gt;
        &lt;div class="spec-value"&gt;4 459 ₽&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="spec-item"&gt;
        &lt;div class="spec-label"&gt;Показатель&lt;/div&gt;
        &lt;div class="spec-value"&gt;0.15&lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;

  &lt;div class="calc-block"&gt;
    &lt;div class="calc-title"&gt;Параметры расчёта&lt;/div&gt;

    &lt;div class="field-row-4"&gt;
      &lt;div class="field"&gt;
        &lt;label&gt;Масса формы, кг&lt;/label&gt;
        &lt;input type="number" id="formWeight" value="15.25" min="0.1" max="5000" step="0.01" /&gt;
      &lt;/div&gt;
      &lt;div class="field"&gt;
        &lt;label&gt;Базовая масса, кг&lt;/label&gt;
        &lt;input type="number" id="baseWeight" value="15.25" min="0.1" max="5000" step="0.01" /&gt;
      &lt;/div&gt;
      &lt;div class="field"&gt;
        &lt;label&gt;Базовая цена, ₽&lt;/label&gt;
        &lt;input type="number" id="basePrice" value="68000" min="0" max="10000000" step="100" /&gt;
      &lt;/div&gt;
      &lt;div class="field"&gt;
        &lt;label&gt;Показатель масштаба&lt;/label&gt;
        &lt;input type="number" id="scaleExp" value="0.15" min="0.01" max="0.50" step="0.01" /&gt;
      &lt;/div&gt;
    &lt;/div&gt;

    &lt;div class="field-row-4"&gt;
      &lt;div class="field"&gt;
        &lt;label&gt;Материал&lt;/label&gt;
        &lt;select id="material"&gt;
          &lt;option value="sch20" selected="selected"&gt;Чугун СЧ20 · ~95 ₽/кг&lt;/option&gt;
          &lt;option value="sch25"&gt;Чугун СЧ25 · ~110 ₽/кг&lt;/option&gt;
          &lt;option value="st20"&gt;Сталь 20 · ~110 ₽/кг&lt;/option&gt;
          &lt;option value="09g2s"&gt;Сталь 09Г2С · ~125 ₽/кг&lt;/option&gt;
        &lt;/select&gt;
      &lt;/div&gt;
      &lt;div class="field"&gt;
        &lt;label&gt;Количество, шт&lt;/label&gt;
        &lt;input type="number" id="qty" value="1" min="1" max="1000" step="1" /&gt;
      &lt;/div&gt;
      &lt;div class="field"&gt;
        &lt;label&gt;Индекс удорожания (к 2022 г.)&lt;/label&gt;
        &lt;input type="number" id="inflationIdx" value="1.35" min="1.0" max="2.0" step="0.05" /&gt;
        &lt;div style="font-size:10px; color:var(--gold); opacity:0.6; margin-top:4px;"&gt;1.35 = +35% к работам&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="field"&gt;
        &lt;label&gt;Целевая рентабельность, %&lt;/label&gt;
        &lt;input type="number" id="margin" value="55" min="0" max="200" step="1" /&gt;
      &lt;/div&gt;
    &lt;/div&gt;

    &lt;div class="auto-calc"&gt;
      &lt;div class="auto-item"&gt;
        &lt;div class="auto-label"&gt;Коэффициент масштаба&lt;/div&gt;
        &lt;div class="auto-value" id="autoK"&gt;1.000&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="auto-item"&gt;
        &lt;div class="auto-label"&gt;Цена за кг (с НДС)&lt;/div&gt;
        &lt;div class="auto-value" id="autoPriceKg"&gt;0 ₽&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="auto-item"&gt;
        &lt;div class="auto-label"&gt;Себестоимость 1 шт&lt;/div&gt;
        &lt;div class="auto-value" id="autoCostUnit"&gt;0 ₽&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="auto-item"&gt;
        &lt;div class="auto-label"&gt;Маржа 1 шт&lt;/div&gt;
        &lt;div class="auto-value" id="autoMarginUnit"&gt;0 ₽&lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;

  &lt;div class="result-block"&gt;
    &lt;div class="calc-title"&gt;Результат расчёта&lt;/div&gt;

    &lt;div class="result-main"&gt;
      &lt;div class="result-main-label"&gt;Итого с НДС 20% (за 1 шт)&lt;/div&gt;
      &lt;div class="result-main-value" id="rPrice"&gt;68 000&lt;/div&gt;
      &lt;div class="result-main-unit"&gt;рублей&lt;/div&gt;
      &lt;div class="result-main-note" id="rNote"&gt;—&lt;/div&gt;
    &lt;/div&gt;

    &lt;div class="result-grid"&gt;
      &lt;div class="result-item"&gt;&lt;div class="result-label"&gt;Цена за кг (с НДС)&lt;/div&gt;&lt;div class="result-value small" id="rPriceKg"&gt;0 ₽&lt;/div&gt;&lt;/div&gt;
      &lt;div class="result-item"&gt;&lt;div class="result-label"&gt;Себестоимость (без НДС)&lt;/div&gt;&lt;div class="result-value small" id="rCost"&gt;0 ₽&lt;/div&gt;&lt;/div&gt;
      &lt;div class="result-item"&gt;&lt;div class="result-label"&gt;Прибыль (без НДС)&lt;/div&gt;&lt;div class="result-value small profit" id="rProfit"&gt;0 ₽&lt;/div&gt;&lt;/div&gt;
      &lt;div class="result-item"&gt;&lt;div class="result-label"&gt;Реальная маржа, %&lt;/div&gt;&lt;div class="result-value small" id="rMargin"&gt;0%&lt;/div&gt;&lt;/div&gt;
    &lt;/div&gt;

    &lt;div class="calc-title" style="margin-top:20px;"&gt;Сетка масштабирования&lt;/div&gt;
    &lt;table class="scale-table" id="scaleTable"&gt;
      &lt;thead&gt;
        &lt;tr&gt;
          &lt;th&gt;Масса формы&lt;/th&gt;
          &lt;th&gt;Коэфф. масштаба&lt;/th&gt;
          &lt;th&gt;Цена за кг (с НДС)&lt;/th&gt;
          &lt;th&gt;Итого с НДС&lt;/th&gt;
          &lt;th&gt;Себест. (без НДС)&lt;/th&gt;
          &lt;th&gt;Маржа, %&lt;/th&gt;
        &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody id="scaleBody"&gt;&lt;/tbody&gt;
    &lt;/table&gt;

    &lt;div class="pricing-info"&gt;
      &lt;div class="pricing-info-title"&gt;? Логика ценообразования&lt;/div&gt;
      &lt;div class="pricing-info-text"&gt;
        &lt;b&gt;Коэффициент = (базовая масса / масса)^показатель&lt;/b&gt;&lt;br /&gt;
        При показателе &lt;b id="expDisplay"&gt;0.15&lt;/b&gt; цена за кг падает плавно: чем крупнее отливка, тем ниже цена за кг, но маржа не рушится.&lt;br /&gt;
        &lt;i&gt;Базовая точка: 15.25 кг → 68 000 ₽ → 4 459 ₽/кг с НДС.&lt;/i&gt;
      &lt;/div&gt;
    &lt;/div&gt;

    &lt;div class="actions"&gt;
      &lt;button class="promo-btn primary" onclick="downloadCSV()"&gt;⬇ CSV&lt;/button&gt;
      &lt;button class="promo-btn primary" onclick="downloadExcel()"&gt;⬇ Excel&lt;/button&gt;
      &lt;button class="promo-btn" onclick="window.print()"&gt;? Печать&lt;/button&gt;
      &lt;button class="promo-btn" onclick="resetAll()"&gt;✕ Сброс&lt;/button&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;script&gt;
/* ==================== ДАННЫЕ ==================== */
const MATERIALS = [
  {key:'sch20', name:'Чугун СЧ20',   price:95,  density:7200},
  {key:'sch25', name:'Чугун СЧ25',   price:110, density:7200},
  {key:'st20',  name:'Сталь 20',     price:110, density:7850},
  {key:'09g2s', name:'Сталь 09Г2С',  price:125, density:7850}
];

const SCALE_POINTS = [15.25, 30, 50, 100, 200, 500];

/* ==================== УТИЛИТЫ ==================== */
const fmt = n =&gt; (n === null || n === undefined || isNaN(n)) ? '0' : n.toLocaleString('ru-RU', {maximumFractionDigits: 0});
const fmt2 = n =&gt; (n === null || n === undefined || isNaN(n)) ? '0' : n.toLocaleString('ru-RU', {maximumFractionDigits: 2});
const fmt3 = n =&gt; (n === null || n === undefined || isNaN(n)) ? '0.000' : n.toLocaleString('ru-RU', {minimumFractionDigits: 3, maximumFractionDigits: 3});
const num = id =&gt; { const el = document.getElementById(id); if (!el) return 0; const v = parseFloat(el.value); return isNaN(v) ? 0 : v; };
const getMaterial = key =&gt; MATERIALS.find(m =&gt; m.key === key) || MATERIALS[0];

/* ==================== РАСЧЁТ ==================== */
function calcScale(weight, baseWeight, basePrice, exp) {
  if (weight &lt;= 0 || baseWeight &lt;= 0) return { k: 1, priceKg: 0, total: 0 };
  const k = Math.pow(baseWeight / weight, exp);
  const basePriceKg = basePrice / baseWeight;
  const priceKg = basePriceKg * k;
  const total = priceKg * weight;
  return { k: k, priceKg: priceKg, total: total };
}

function calcCost(weight, material, inflationIdx) {
  const matCost = weight * material.price;
  const baseWorkRate = 1800 + (350 * weight);
  const workCost = baseWorkRate * inflationIdx;
  return { matCost: matCost, workCost: workCost, total: matCost + workCost };
}

function calculate() {
  const mat = getMaterial(document.getElementById('material').value);
  const formWeight = num('formWeight');
  const baseWeight = num('baseWeight');
  const basePrice = num('basePrice');
  const scaleExp = num('scaleExp');
  const qty = Math.max(1, num('qty'));
  const inflationIdx = num('inflationIdx');
  const marginPct = num('margin');

  if (formWeight &lt;= 0 || baseWeight &lt;= 0) {
    document.getElementById('rPrice').textContent = '0';
    return;
  }

  const scale = calcScale(formWeight, baseWeight, basePrice, scaleExp);
  const cost = calcCost(formWeight, mat, inflationIdx);

  const priceUnit = scale.total;
  const priceTotal = priceUnit * qty;
  const priceNoVat = priceUnit / 1.2;
  const realProfitUnit = priceNoVat - cost.total;
  const realMarginPct = cost.total &gt; 0 ? (realProfitUnit / cost.total * 100) : 0;

  // Минимальная цена при заданной рентабельности
  const minPriceUnit = cost.total * (1 + marginPct / 100) * 1.2;

  // Вывод
  document.getElementById('autoK').textContent = fmt3(scale.k);
  document.getElementById('autoPriceKg').textContent = fmt(scale.priceKg) + ' ₽';
  document.getElementById('autoCostUnit').textContent = fmt(cost.total) + ' ₽';
  document.getElementById('autoMarginUnit').textContent = fmt(realProfitUnit) + ' ₽';

  document.getElementById('rPrice').textContent = fmt(priceUnit);
  document.getElementById('rPriceKg').textContent = fmt(scale.priceKg) + ' ₽';
  document.getElementById('rCost').textContent = fmt(cost.total) + ' ₽';

  const profitEl = document.getElementById('rProfit');
  if (realProfitUnit &lt; 0) {
    profitEl.classList.add('neg');
    profitEl.classList.remove('profit');
  } else {
    profitEl.classList.remove('neg');
    profitEl.classList.add('profit');
  }
  profitEl.textContent = fmt(realProfitUnit) + ' ₽';

  const marginEl = document.getElementById('rMargin');
  if (realMarginPct &lt; 0) {
    marginEl.classList.add('neg');
    marginEl.classList.remove('profit');
  } else {
    marginEl.classList.remove('neg');
  }
  marginEl.textContent = realMarginPct.toFixed(1) + '%';

  document.getElementById('expDisplay').textContent = scaleExp;

  let note = `Материал: ${fmt(mat.price)} ₽/кг · Работа: ${fmt(cost.workCost)} ₽ · Коэфф: ${fmt3(scale.k)}`;
  if (priceUnit &lt; minPriceUnit) {
    note += ` · ⚠️ Ниже минимальной (${fmt(minPriceUnit)} ₽ при ${marginPct}%)`;
  }
  document.getElementById('rNote').textContent = note;

  // Сетка масштабирования
  renderScaleTable(mat, baseWeight, basePrice, scaleExp, inflationIdx, formWeight);

  state.result = {
    material: mat.name,
    formWeight: formWeight,
    baseWeight: baseWeight,
    basePrice: basePrice,
    scaleExp: scaleExp,
    qty: qty,
    k: scale.k,
    priceKg: scale.priceKg,
    priceUnit: priceUnit,
    priceTotal: priceTotal,
    matCost: cost.matCost,
    workCost: cost.workCost,
    costUnit: cost.total,
    realProfitUnit: realProfitUnit,
    realMarginPct: realMarginPct,
    idx: inflationIdx,
    margin: marginPct
  };
}

function renderScaleTable(mat, baseWeight, basePrice, scaleExp, inflationIdx, activeWeight) {
  const tbody = document.getElementById('scaleBody');
  tbody.innerHTML = '';
  SCALE_POINTS.forEach(w =&gt; {
    const scale = calcScale(w, baseWeight, basePrice, scaleExp);
    const cost = calcCost(w, mat, inflationIdx);
    const priceNoVat = scale.total / 1.2;
    const profit = priceNoVat - cost.total;
    const marginPct = cost.total &gt; 0 ? (profit / cost.total * 100) : 0;
    const tr = document.createElement('tr');
    const isBase = Math.abs(w - baseWeight) &lt; 0.01;
    const isActive = Math.abs(w - activeWeight) &lt; 0.01;
    if (isBase) tr.classList.add('base-row');
    if (isActive &amp;&amp; !isBase) tr.classList.add('active-row');
    tr.innerHTML =
      '&lt;td&gt;' + w + ' кг' + (isBase ? ' ★' : '') + '&lt;/td&gt;' +
      '&lt;td&gt;' + fmt3(scale.k) + '&lt;/td&gt;' +
      '&lt;td class="price-kg"&gt;' + fmt(scale.priceKg) + ' ₽&lt;/td&gt;' +
      '&lt;td class="total"&gt;' + fmt(scale.total) + ' ₽&lt;/td&gt;' +
      '&lt;td&gt;' + fmt(cost.total) + ' ₽&lt;/td&gt;' +
      '&lt;td style="color:' + (marginPct &lt; 0 ? 'var(--red)' : 'var(--green)') + '"&gt;' + marginPct.toFixed(1) + '%&lt;/td&gt;';
    tbody.appendChild(tr);
  });
}

/* ==================== СОБЫТИЯ ==================== */
document.getElementById('material').addEventListener('change', calculate);
['formWeight', 'baseWeight', 'basePrice', 'scaleExp', 'qty', 'inflationIdx', 'margin'].forEach(id =&gt; {
  document.getElementById(id).addEventListener('input', calculate);
});

/* ==================== СБРОС ==================== */
function resetAll() {
  document.getElementById('material').value = 'sch20';
  document.getElementById('formWeight').value = 15.25;
  document.getElementById('baseWeight').value = 15.25;
  document.getElementById('basePrice').value = 68000;
  document.getElementById('scaleExp').value = 0.15;
  document.getElementById('qty').value = 1;
  document.getElementById('inflationIdx').value = 1.35;
  document.getElementById('margin').value = 55;
  calculate();
}

/* ==================== ЭКСПОРТ ==================== */
function downloadBlob(blob, filename) {
  const url = URL.createObjectURL(blob);
  const a = document.createElement('a');
  a.href = url; a.download = filename;
  document.body.appendChild(a); a.click(); a.remove();
  setTimeout(() =&gt; URL.revokeObjectURL(url), 500);
}
function today() { const d = new Date(), p = n =&gt; String(n).padStart(2,'0'); return `${d.getFullYear()}-${p(d.getMonth()+1)}-${p(d.getDate())}`; }

function buildScaleRows() {
  const mat = getMaterial(document.getElementById('material').value);
  const baseWeight = num('baseWeight');
  const basePrice = num('basePrice');
  const scaleExp = num('scaleExp');
  const inflationIdx = num('inflationIdx');
  return SCALE_POINTS.map(w =&gt; {
    const scale = calcScale(w, baseWeight, basePrice, scaleExp);
    const cost = calcCost(w, mat, inflationIdx);
    const priceNoVat = scale.total / 1.2;
    const profit = priceNoVat - cost.total;
    const marginPct = cost.total &gt; 0 ? (profit / cost.total * 100) : 0;
    return {
      weight: w,
      k: scale.k,
      priceKg: scale.priceKg,
      total: scale.total,
      cost: cost.total,
      marginPct: marginPct
    };
  });
}

function downloadCSV() {
  const rows = buildScaleRows();
  const header = ['Масса формы, кг','Коэфф. масштаба','Цена за кг (с НДС), ₽','Итого с НДС, ₽','Себестоимость (без НДС), ₽','Маржа, %'];
  const body = rows.map(r =&gt; [
    r.weight, r.k.toFixed(3), Math.round(r.priceKg), Math.round(r.total), Math.round(r.cost), r.marginPct.toFixed(1)
  ]);
  const esc = v =&gt; `"${String(v).replace(/"/g,'""')}"`;
  const csv = [header, ...body].map(row =&gt; row.map(esc).join(';')).join('\r\n');
  downloadBlob(new Blob(['\uFEFF' + csv], {type:'text/csv;charset=utf-8;'}), 'izlozhnitsy_scale_' + today() + '.csv');
}

function downloadExcel() {
  const rows = buildScaleRows();
  const header = ['Масса формы, кг','Коэфф. масштаба','Цена за кг (с НДС), ₽','Итого с НДС, ₽','Себестоимость (без НДС), ₽','Маржа, %'];
  const body = rows.map(r =&gt; [
    r.weight, r.k.toFixed(3), Math.round(r.priceKg), Math.round(r.total), Math.round(r.cost), r.marginPct.toFixed(1)
  ]);
  const esc = v =&gt; String(v ?? '').replace(/&amp;/g,'&amp;amp;').replace(/&lt;/g,'&amp;lt;').replace(/&gt;/g,'&amp;gt;');
  const table = `&lt;table border="1" cellspacing="0" cellpadding="4"&gt;
    &lt;thead style="background:#000;color:#ffd700;"&gt;&lt;tr&gt;${header.map(h=&gt;`&lt;th&gt;${esc(h)}&lt;/th&gt;`).join('')}&lt;/tr&gt;&lt;/thead&gt;
    &lt;tbody&gt;${body.map(row=&gt;`&lt;tr&gt;${row.map(c=&gt;`&lt;td&gt;${esc(c)}&lt;/td&gt;`).join('')}&lt;/tr&gt;`).join('')}&lt;/tbody&gt;&lt;/table&gt;`;
  const html = `&lt;html xmlns:x="urn:schemas-microsoft-com:office:excel"&gt;&lt;head&gt;&lt;meta charset="UTF-8"&gt;
    &lt;style&gt;td,th{font-family:Arial;font-size:12px;}&lt;/style&gt;&lt;/head&gt;
    &lt;body&gt;&lt;h2&gt;Изложницы — сетка масштабирования — ${today()}&lt;/h2&gt;
    &lt;p&gt;ООО «Арсенал-Деталь» · 8 (992) 017-49-73&lt;/p&gt;
    &lt;p&gt;&lt;b&gt;База:&lt;/b&gt; 15.25 кг → 68 000 ₽ → показатель ${num('scaleExp')}&lt;/p&gt;
    ${table}
    &lt;/body&gt;&lt;/html&gt;`;
  downloadBlob(new Blob(['\uFEFF' + html], {type:'application/vnd.ms-excel;charset=utf-8;'}), 'izlozhnitsy_scale_' + today() + '.xls');
}

/* ==================== СТАРТ ==================== */
let state = { result: null };
calculate();
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</subtitle>
  <updated>2026-10-12T10:12:03Z</updated>
  <logo>https://pandoraburo.ru/ssl/u/pic/07/26436cc3c611f19d9efcd8c4a10874/-/0c723f71762611f1b3964aaba1665535.jpg</logo>
  <author>
    <name>1592962</name>
    <uri>https://www.pandoraburo.ru/</uri>
  </author>
</feed>
