:root {
  --ink: #253943;
  --muted: #617783;
  --line: #dce5e9;
  --paper: #f0f4f6;
  --accent: #ba492b;
  --steel: #486a7e;
  --font: 'Golos Text', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.5 var(--font); }
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #7497ac; outline-offset: 3px; }
button:active { transform: translateY(1px); }
button, .calculator-start-btn { transition: background-color 160ms ease, border-color 160ms ease; }
.hidden { display: none !important; }
.skip-link { position: fixed; top: -60px; left: 20px; padding: 12px 18px; background: #fff; z-index: 3; }
.skip-link:focus { top: 10px; }
.site-header { height: 80px; max-width: 1380px; margin: auto; padding: 0 48px; display: flex; align-items: center; gap: 25px; border-bottom: 1px solid var(--line); }
.brand { font-size: 22px; font-weight: 600; letter-spacing: -.8px; display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 31px; height: 34px; display: grid; place-items: center; background: var(--steel); color: #fff; font-size: 23px; font-weight: 500; }
.header-caption { color: var(--muted); font-size: 12px; border-left: 1px solid #c4d2d9; padding-left: 25px; }
.header-link { margin-left: auto; font-size: 12px; border-bottom: 1px solid var(--steel); }
.page { max-width: 1380px; padding: 0 48px; margin: auto; }
.intro { display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 44px 0 37px; gap: 40px; }
h1 { font-size: clamp(42px, 4.4vw, 62px); font-weight: 500; letter-spacing: -2.6px; line-height: 1.02; margin: 0 0 18px; }
.intro-text { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 0; max-width: 50ch; }
.fence-scheme { margin: 0 12px 0 0; max-width: 430px; justify-self: end; width: 100%; }
.fence-scheme svg { width: 100%; height: auto; display: block; }
.fence-scheme text { fill: var(--steel); font: 11px var(--font); font-variant-numeric: tabular-nums; }
.fence-scheme figcaption { text-align: center; color: var(--muted); font-size: 10px; margin-top: 5px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 35px; align-items: start; }
.section-heading { display: flex; gap: 12px; align-items: center; margin: 0 0 17px; }
.section-heading h2 { font-size: 19px; letter-spacing: -.5px; font-weight: 500; margin: 0; }
.type-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-bottom: 33px; background: #d4e0e6; border: 1px solid #d4e0e6; }
.type-card { position: relative; text-align: left; background: #fff; border: 0; border-bottom: 3px solid transparent; padding: 15px 12px 12px; color: var(--ink); min-height: 113px; }
.type-card:hover { background: #f6fafc; }
.type-card.selected { border-bottom-color: var(--accent); background: #f9fbfc; }
.type-card svg { width: 36px; height: 36px; display: block; margin-bottom: 10px; color: var(--steel); }
.type-card.selected svg { color: var(--accent); }
.type-card strong { display: block; font-size: 11px; font-weight: 500; line-height: 1.5; }
.type-card small { display: block; font-size: 9px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.type-check { display: none; position: absolute; right: 10px; top: 12px; color: var(--accent); font-size: 12px; }
.selected .type-check { display: block; }
.summary-card { position: sticky; top: 25px; padding: 28px 25px 23px; border-top: 4px solid var(--steel); background: #e4ecf0; margin-top: 45px; }
.summary-top { font-size: 11px; color: var(--muted); }
.summary-card h2 { font-size: 25px; font-weight: 500; letter-spacing: -.8px; margin: 8px 0 25px; }
.summary-specs { font-size: 11px; color: var(--muted); }
.summary-specs > div { display: flex; justify-content: space-between; gap: 8px; padding: 11px 0; border-top: 1px solid #cad7df; }
.summary-specs strong { color: var(--ink); font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.summary-price { border-top: 1px solid #cad7df; margin-top: 3px; padding-top: 23px; }
.summary-price > span { font-size: 11px; color: var(--muted); }
.summary-price > strong { display: block; font-size: 35px; font-weight: 500; letter-spacing: -1.5px; line-height: 1.3; margin-top: 8px; font-variant-numeric: tabular-nums; }
.summary-price small { font-size: 25px; font-weight: 400; }
.summary-price p { font-size: 11px; line-height: 1.65; color: var(--muted); min-height: 36px; margin: 12px 0 22px; }
.summary-card button { width: 100%; border: 0; border-radius: 4px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 500; padding: 15px 10px; }
.summary-card button:hover { background: #a63c20; }
.summary-footnote { font-size: 10px; color: var(--muted); line-height: 1.7; margin: 15px 0 0; }
#calculator { font: inherit; margin: 0; }
.calc_params > .row, .calc_left, .calc_right, .calc_inner, .col-md-6.calc_left, .col-md-6.calc_right { display: contents; }
.calc_forms { min-height: 220px; background: #fff; padding: 24px 27px 28px; }
.calc-section, .calc-section + .calc-section { margin: 0; padding: 0; background: transparent; border: 0; min-width: 0; }
.calc-section + .calc-section, .calc-section.section-following { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.calc-section__head { background: none; color: var(--ink); border: 0; border-radius: 0; font: 500 14px/1.4 var(--font); padding: 0; margin: 0 0 20px; text-align: left; }
.calc-section__content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px 23px; align-items: start; }
.row_Calculator, .row_Calculator + .row_Calculator { height: auto; min-height: 0; border: 0; border-radius: 0; margin: 0; display: block; background: none; }
.row_Label { width: 100% !important; float: none !important; padding: 0 !important; height: auto !important; display: block !important; font: 11px/1.5 var(--font) !important; color: var(--muted); margin-bottom: 7px; }
.row_Label label { font: inherit !important; display: block; cursor: pointer; }
.row_Label::before, .row_Label::after { display: none !important; }
.sel_wrap, .row_Label + .input, .row_Calculator .ui-input-text { width: 100% !important; float: none; display: block; padding: 0; margin: 0; background: none; }
.sel_wrap .sel_imul { display: none !important; }
.sel_wrap select.parameter-select { display: block; }
.parameter-select, .row_Calculator .input input, .row_Calculator input[type=text] { appearance: auto; width: 100%; height: 44px; border: 1px solid #cbd8df; border-radius: 3px; background: #fff; padding: 0 10px; color: var(--ink); font: 12px/1.4 var(--font); box-shadow: none; min-width: 0; font-variant-numeric: tabular-nums; }
.parameter-select:hover, .row_Calculator input[type=text]:hover { border-color: #6d90a4; }
.row_Calculator input.error { border-color: var(--accent); background: #fff8f5; }
.row_Calculator label.error { display: block; color: #a63c20; font: 11px/1.5 var(--font); padding-top: 5px; }
.loading { padding: 35px 0; color: var(--muted); }
#calculator .gbtn__wrap { padding: 0; margin: 15px 0 0; background: none; }
#calculator .gbtn { max-width: none; background: none; border-radius: 0; padding: 0; }
#calculator .calculator-start-btn { background: var(--accent); color: #fff; border: 0; border-radius: 4px; text-transform: none; padding: 17px 22px; text-align: center; font: 500 14px/1.4 var(--font); display: block; }
#calculator .calculator-start-btn:hover { background: #a63c20; }
.disabled { pointer-events: none; opacity: .55; }
.calculator_total { display: none; padding: 26px; border-top: 3px solid var(--steel); background: #fff; margin-top: 30px; scroll-margin-top: 20px; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 17px; }
.result-heading h2 { font-size: 29px; line-height: 1.3; font-weight: 500; letter-spacing: -1px; margin: 0; }
.print-button { border: 1px solid #c8d7df; padding: 9px 12px; background: #f0f5f8; color: var(--ink); font-size: 11px; border-radius: 3px; }
.print-button:hover { background: #e1ebf0; }
.calc_header { padding: 0 0 18px; }
.calc_header h3 { font: 400 11px/1.7 var(--font); margin: 0; color: var(--muted); background: none; text-align: left; }
.calc_header b { font-weight: 500; }
.calculator_results { max-width: 100%; overflow: auto; }
.calc_box, .calc_box--active { margin: 0 0 18px; border: 0; padding: 0; min-width: 550px; background: none; }
.calculator_total table { font: 11px/1.5 var(--font); color: var(--ink); border-collapse: collapse; font-variant-numeric: tabular-nums; }
.calculator_total table th, .calculator_total table td { border-bottom: 1px solid #e6edf0; background: none; text-align: right; padding: 10px 6px; }
.calculator_total table th { background: #eaf1f5; font-size: 10px; font-weight: 500; }
.calculator_total table .left, .calculator_total table .name { text-align: left; }
.calculator_total table td span, .calculator_total table th span { font: inherit; padding: 0 !important; margin: 0 !important; color: inherit !important; white-space: normal; }
.calculator_total table tfoot td { background: #f1f6f8; color: var(--ink); font-weight: 600; }
.calculator_total table tfoot td.summ { font-size: 13px; white-space: nowrap; }
.calculator_total .red { color: var(--ink) !important; }
.calculator_total .plus { float: left; margin-right: 8px; }
.calculator_total .plus button { width: 20px; height: 20px; background: var(--steel); color: #fff; border: 0; border-radius: 3px; }
.calculator_total table input { width: 100%; min-width: 40px; font-size: 11px; padding: 5px; border: 1px solid var(--line); border-radius: 3px; }
.result-note { font-size: 11px; line-height: 1.7; color: var(--muted); margin: 15px 0 0; max-width: 65ch; }
.site-footer { display: flex; justify-content: space-between; padding: 25px 0; border-top: 1px solid var(--line); margin-top: 45px; font-size: 10px; color: var(--muted); }
@media (max-width: 1150px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 270px; gap: 24px; }
  .page, .site-header { padding-left: 30px; padding-right: 30px; }
  .type-card { padding: 13px 9px 12px; }
  .type-card small { display: none; }
  .type-card strong { font-size: 10px; }
  .calc_forms { padding: 22px; }
  .calc-section__content { gap: 18px; }
}
@media (max-width: 850px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 245px; gap: 20px; }
  .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .type-card { display: flex; gap: 9px; align-items: center; min-height: 70px; }
  .type-card svg { margin: 0; flex-shrink: 0; width: 30px; }
  .calc-section__content { grid-template-columns: 1fr; }
  .summary-card { padding: 23px 18px; }
  .intro { gap: 10px; }
}
@media (max-width: 650px) {
  .site-header { height: 66px; padding: 0 18px; gap: 17px; }
  .brand { font-size: 20px; }
  .brand-mark { height: 28px; width: 27px; font-size: 21px; }
  .header-caption { font-size: 10px; padding-left: 17px; }
  .header-link { display: none; }
  .page { padding: 0 16px; }
  .intro { display: block; padding: 29px 0 27px; }
  h1 { font-size: 45px; letter-spacing: -2px; margin-bottom: 13px; }
  h1 br { display: initial; }
  .intro-text { font-size: 12px; }
  .fence-scheme { width: 240px; margin: 13px 0 0 auto; }
  .fence-scheme figcaption { display: none; }
  .workspace { display: flex; flex-direction: column; gap: 0; }
  .configurator { width: 100%; }
  .section-heading { margin-bottom: 14px; }
  .section-heading h2 { font-size: 18px; }
  .type-grid { margin-bottom: 26px; }
  .type-card { min-height: 72px; padding: 12px; }
  .type-card strong { font-size: 11px; }
  .type-check { top: 5px; right: 7px; font-size: 10px; }
  .type-card svg { width: 34px; }
  .calc_forms { padding: 22px 18px; }
  .calc-section__head { font-size: 14px; }
  .row_Label { font-size: 12px !important; }
  .parameter-select, .row_Calculator .input input { font-size: 16px; height: 47px; }
  .summary-card { position: static; width: 100%; margin: 24px 0 0; padding: 22px; }
  .summary-card h2 { margin: 7px 0 18px; }
  .summary-specs { display: flex; gap: 18px; }
  .summary-specs > div { flex: 1; display: block; }
  .summary-specs strong { display: block; margin-top: 4px; }
  .summary-price { padding-top: 17px; }
  .summary-price p { min-height: 0; }
  .calculator_total { padding: 20px 15px; }
  .result-heading h2 { font-size: 27px; }
  .site-footer { gap: 15px; flex-direction: column; margin-top: 30px; padding: 20px 0; font-size: 10px; }
  .site-footer span + span { margin-top: -10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  button, .calculator-start-btn { transition: none; }
}
@media print {
  body { background: #fff; }
  .site-header, .intro, .type-section, .parameters-section > .section-heading, #calculator_form, .summary-card, .site-footer, .print-button, .result-note, .plus, .skip-link { display: none !important; }
  .page { padding: 0; max-width: none; }
  .workspace, .configurator { display: block; }
  .calculator_total { display: block !important; border: 0; margin: 0; padding: 0; }
  .calculator_results { overflow: visible; }
  .calc_box { min-width: 0; break-inside: avoid; }
  #calculator .calculator_total table { font-size: 10px; }
  .result-heading { margin-bottom: 10px; }
}
