/* Снабжение строек — оценка заявки, калькуляторы, «Кто мы». Палитра и переменные — из base.html. */
p.sub { color: var(--muted); margin: -6px 0 14px; }

/* переключатель вкладок */
.seg { display: flex; gap: 4px; background: #efede8; border-radius: 10px; padding: 4px; margin: 0 0 14px; }
.seg button { flex: 1 1 0; min-width: 0; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 14px;
              font-weight: 600; padding: 9px 8px; border-radius: 8px; cursor: pointer; line-height: 1.2; }
.seg button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(29,29,31,.15); }
.seg button:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.seg-wide { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.seg-wide button { flex: 1 0 auto; padding: 10px 14px; }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }

/* мгновенная оценка */
.est-card textarea { min-height: 116px; font-size: 15px; }
.est-go { margin: 10px 0 0; }
.btn.est-go { background: var(--ink); color: #fff; }
.btn.est-go:hover { background: var(--ink-2); }
.btn.est-go[disabled] { opacity: .7; cursor: default; }
.est-card .alert { margin: 12px 0 0; font-size: 14px; }
#est-out { margin-top: 14px; }
.est-table { table-layout: fixed; }
.est-table col.c-name { width: 38%; }
.est-table col.c-qty { width: 16%; }
.est-table td.num { white-space: normal; }
.est-table .rng { white-space: nowrap; }
.est-table td:first-child { overflow-wrap: anywhere; }
.est-table .tag { margin-top: 3px; }
.est-table .dash { color: var(--muted); }
.est-card .totals .rng { white-space: nowrap; }
.est-card .totals div > span:last-child { text-align: right; }
.est-kp { margin-top: 12px; }
#est-hint { margin-top: 10px; }
.est-card .btn.block { width: 100%; }

/* калькуляторы */
.card.calcs { padding: 16px; }
.calc .radios { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 12px; }
.calc .radios label { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: 15px; margin: 0; cursor: pointer; }
.calc .radios input { width: 18px; height: 18px; margin: 0; }
.calc .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calc .fields label { font-size: 13px; margin: 0; }
.calc .fields .u { font-weight: 400; color: var(--muted); }
.calc .fields input, .calc .fields select { display: block; width: 100%; margin-top: 4px; padding: 10px 11px; border: 1px solid #c4c0b8;
              border-radius: 8px; font: inherit; font-weight: 400; background: #fff; color: var(--text); }
.calc .fields select { appearance: none; -webkit-appearance: none; padding-right: 30px;
              background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235f636a' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 11px center; }
.calc .fields input:focus, .calc .fields select:focus { outline: 2px solid var(--link); outline-offset: 0; border-color: var(--link); }
.calc-hint { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.calc-res { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
            margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.calc-res output { font-size: 18px; font-weight: 700; color: var(--ink); min-height: 27px; }
.calc-res output:empty::before { content: "Введите размеры"; color: var(--muted); font-weight: 400; font-size: 15px; }
.calc-res .btn { padding: 11px 18px; }
.calc-res .btn[disabled] { opacity: .45; cursor: default; }
.calc-done { margin: 12px 0 0; color: var(--ok); font-size: 14px; }

/* кто мы */
.card.who { display: grid; gap: 18px; padding: 0; overflow: hidden; }
.who-photo { margin: 0; }
.who-photo img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 687; object-fit: cover; background: #e6e4df; }
.who-text { padding: 0 18px 18px; }
.who-text p { margin: 0 0 12px; }
.who-facts { margin: 0 0 14px; padding: 0 0 0 18px; color: var(--muted); font-size: 14px; }
.who-facts li { margin: 2px 0; }
.who-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 14px 0 0;
            border-top: 1px solid var(--line); }
.who-nums b { display: block; font-size: 22px; line-height: 1.15; color: var(--ink); }
.who-nums span { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: #e6e4df; }

@media (max-width: 400px) {
  .seg button { font-size: 13px; padding: 9px 4px; }
  .calc .fields { grid-template-columns: 1fr; }
  .who-nums b { font-size: 18px; }
  .card.calcs { padding: 14px 12px; }
}
@media (min-width: 720px) {
  .card.calcs { padding: 20px 24px; }
  .calc .fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card.who { grid-template-columns: 1.15fr 1fr; align-items: center; gap: 24px; }
  .who-photo img { height: 100%; min-height: 320px; aspect-ratio: auto; }
  .who-text { padding: 20px 22px 20px 0; }
  .gallery { grid-template-columns: repeat(4, 1fr); }
}

/* ---------------- инфографика (HTML/CSS, без библиотек) ---------------- */
.example, .card.calcs, .card.who { box-shadow: var(--shadow); }
.note-s { color: var(--muted); font-size: 13px; }

/* путь заявки: вертикально на телефоне, лентой на десктопе */
.path { list-style: none; margin: 0; padding: 0; display: grid; }
.path li { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 16px; padding: 0 0 24px; }
.path li::before { content: ""; position: absolute; left: 23px; top: 52px; bottom: 4px; width: 2px; background: var(--line); }
.path li:last-child { padding-bottom: 0; }
.path li:last-child::before { display: none; }
.path-ico { grid-row: 1 / span 2; width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: var(--yellow);
            display: flex; align-items: center; justify-content: center; }
.path-ico svg, .flow-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.path-t { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; color: var(--ink); padding-top: 3px; }
.path-d { display: block; color: var(--muted); font-size: 15px; margin-top: 2px; }

/* куда уходят деньги */
.money { padding: 22px 20px 18px; }
.mrow { display: grid; gap: 8px; margin-bottom: 26px; }
.mrow:first-child { margin-bottom: 38px; }
.mlab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; }
.mlab b { font-size: 16px; font-weight: 700; }
.mlab span { font-size: 18px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.mbar { position: relative; display: flex; height: 22px; background: var(--bg); border-radius: 6px; }
.mbar i { display: block; height: 100%; }
.m-base { background: var(--ink); border-radius: 6px 0 0 6px; }
.m-zone { background: repeating-linear-gradient(135deg, #a8a6a0 0 6px, #c4c2bc 6px 12px); border-radius: 0 6px 6px 0; }
.m-us { background: var(--yellow); border-radius: 6px; min-width: 12px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.mtick { position: absolute; top: 100%; margin-top: 5px; transform: translateX(-50%); font-size: 12px; color: var(--muted); white-space: nowrap; }
.mtick:last-child { transform: translateX(-100%); }
.money .note-s { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); }
.money + .why { margin-top: 16px; }

/* как это устроено */
.flow { margin: 0; }
.flow-grid { display: grid; gap: 8px; align-items: center; }
.flow-src, .flow-bot, .flow-dst { border-radius: var(--radius); padding: 18px; min-width: 0; }
.flow-src, .flow-dst { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.flow-h { display: block; font-weight: 800; margin-bottom: 10px; }
.flow-src ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.flow-src li { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 13px; line-height: 1.25; }
.flow-bot { background: var(--ink); color: #fff; text-align: center; box-shadow: var(--shadow-hi); padding: 22px 18px; }
.flow-bot b, .flow-dst b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.flow-bot > span:last-child { display: block; color: var(--on-ink); font-size: 15px; margin-top: 4px; }
.flow-ico { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; margin-bottom: 10px; }
.flow-ico svg { width: 26px; height: 26px; stroke-width: 1.7; }
.flow-bot .flow-ico { color: var(--yellow); border: 1.5px solid rgba(245,197,24,.45); }
.flow-dst { text-align: center; }
.flow-dst .flow-ico { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.flow-arrow { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 2px 0; }
.flow-arrow span { order: 2; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--card); border: 1px solid var(--line);
                   border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.ar { position: relative; display: block; width: 2px; height: 30px; background: var(--ink); }
.ar::after { content: ""; position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%);
             border: 6px solid transparent; border-top: 8px solid var(--ink); border-bottom: 0; }

/* живая база цен */
.live { display: grid; gap: 26px; padding: 22px 20px; }
.live-nums { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
.live-nums li { border-left: 3px solid var(--yellow); padding-left: 12px; min-width: 0; }
.live-nums b { display: block; font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; color: var(--ink);
               font-variant-numeric: tabular-nums; }
.live-nums span { display: block; font-size: 14px; color: var(--muted); margin-top: 4px; }
.live-chart h3 { font-size: 15px; margin: 0 0 12px; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; font-size: 14px; }
.bars .bn { overflow-wrap: anywhere; }
.bars .bn { grid-row: 1; grid-column: 1; }
.bars .bv { grid-row: 1; grid-column: 2; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.bars .bt { grid-column: 1 / -1; height: 10px; background: var(--bg); border-radius: 5px; overflow: hidden; }
.bars .bt i { display: block; height: 100%; background: var(--ink); border-radius: 5px; transform-origin: left center;
              transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.bars.anim .bt i { transform: scaleX(0); }
.bars.anim.in .bt i { transform: none; }

/* история и миссия */
.story { display: grid; gap: 20px; }
.story-text h2 { margin-top: 0; }
.story-text p { margin: 0 0 12px; font-size: 17px; }
.story-text .more, .about .more { font-weight: 700; }
.mission { margin: 0; background-color: var(--ink); color: #fff; border-radius: var(--radius); padding: 28px 24px; display: flex; flex-direction: column;
           justify-content: center; box-shadow: var(--shadow-hi);
           background-image: linear-gradient(rgba(255,255,255,.045) 1.5px, transparent 1.5px), linear-gradient(90deg, rgba(255,255,255,.045) 1.5px, transparent 1.5px);
           background-size: 34px 34px; }
.mission .eyebrow { color: var(--yellow); }
.mission p { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 800; letter-spacing: -.02em; }

@media (prefers-reduced-motion: reduce) {
  .bars .bt i { transition: none; }
}
@media (min-width: 720px) {
  .path { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .path li { grid-template-columns: 1fr; padding: 0; }
  .path li::before { left: 60px; right: -12px; top: 23px; bottom: auto; width: auto; height: 2px; }
  .path-ico { grid-row: auto; margin-bottom: 16px; }
  .path-t { font-size: 26px; }
  .money { padding: 28px 32px 22px; }
  .mlab span { font-size: 20px; }
  .live { padding: 28px 32px; }
  .live-nums b { font-size: 40px; }
}
@media (min-width: 900px) {
  .flow-grid { grid-template-columns: minmax(0, 1.05fr) 132px minmax(0, 1.1fr) 132px minmax(0, .75fr); gap: 0; }
  .flow-src ul { grid-template-columns: 1fr; }
  .flow-arrow { flex-direction: column; gap: 8px; padding: 0 8px; }
  .flow-arrow span { order: 0; }
  .ar { width: 100%; height: 2px; }
  .ar::after { left: auto; right: -2px; top: 50%; bottom: auto; transform: translateY(-50%);
               border: 6px solid transparent; border-left: 8px solid var(--ink); border-right: 0; }
  .flow-bot { padding: 30px 22px; }
  .live.has-chart { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
  .story { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: stretch; }
  .mission { padding: 36px 34px; }
  .mission p { font-size: 28px; }
}
