body {
            font-family: 'Segoe UI', Arial, sans-serif;
            background: #f6f8fa;
            margin: 0;
            color: #223142;
        }
        header {
            background: #223142;
            color: #fff;
            padding: 24px 0 12px 0;
            text-align: center;
            font-size: 2rem;
            font-weight: bold;
            letter-spacing: 1px;
        }
        nav {
            background: #1a2732;
            display: flex;
            justify-content: center;
            gap: 0.5rem;
            padding: 0.5rem 0;
        }
        .tab {
            color: #fff;
            background: none;
            border: none;
            padding: 0.7rem 1.5rem;
            font-size: 1rem;
            cursor: pointer;
            border-radius: 6px 6px 0 0;
            transition: background 0.2s, color 0.2s;
        }
        .tab.active, .tab:hover {
            background: #1ec3ff;
            color: #fff;
            font-weight: bold;
        }
        .tab-content {
            display: none;
            background: #fff;
            padding: 1.5rem;
            border-radius: 0 0 8px 8px;
            margin: 0 auto;
            max-width: 900px;
            box-shadow: 0 2px 8px rgba(34,49,66,0.07);
        }
        .tab-content.active {
            display: block;
        }
        .accordion-btn {
            width: 97%;
            text-align: left;
            background: #e9eef3;
            border: none;
            outline: none;
            padding: 0.8rem 1rem;
            font-size: 1.1rem;
            cursor: pointer;
            border-radius: 5px;
            margin-bottom: 0.3rem;
            transition: background 0.2s, color 0.2s;
        }
        .accordion-btn.active, .accordion-btn:hover {
            background: #1ec3ff;
            color: #fff;
        }
        .accordion-content {
            display: none;
            padding: 0.7rem 1.5rem;
            background: #f6f8fa;
            border-radius: 0 0 5px 5px;
            margin-bottom: 0.5rem;
        }
        .accordion-content.active {
            display: block;
        }
        .input-form, .grid-form, .two-cols-form {
            background: #fff;
            border-radius: 8px;
            box-shadow: 0 1px 4px rgba(34,49,66,0.06);
            font-size: 1rem;
            width: 100%;
        }
        .input-form label, .grid-form label, .two-cols-form label {
            color: #223142;
        }
        .input-form input, .input-form select, .grid-form input, .grid-form select, .two-cols-form input, .two-cols-form select {
            border: 1px solid #c2c9d6;
            border-radius: 4px;
            font-size: 1rem;
            padding: 0.3rem 0.4rem;
            margin-top: 0.2rem;
            background: #f6f8fa;
            color: #223142;
        }
        .input-form button, .grid-form button, .two-cols-form button {
            margin-top: 1rem;
            background: #1ec3ff;
            color: #fff;
            border: none;
            border-radius: 5px;
            padding: 0.7rem 1.5rem;
            font-size: 1rem;
            cursor: pointer;
            transition: background 0.2s;
        }
        .input-form button:hover, .grid-form button:hover, .two-cols-form button:hover {
            background: #009fd6;
        }
        .extra-info {
            margin-top: 1rem;
            font-size: 0.98rem;
            color: #223142;
            background: #e9eef3;
            border-radius: 6px;
            padding: 0.7rem 0.5rem;
        }
        .checkbox-row-center label.custom-checkbox .checkmark {
            border: 1.5px solid #1ec3ff;
        }
        .custom-checkbox input[type="checkbox"]:checked + .checkmark::after {
            border-color: #1ec3ff;
        }
        .accordion {
            margin-bottom: 1rem;
        }
        .calc-table th {
            background: #223142 !important;
            color: #fff !important;
        }
        .calc-table td {
            color: #223142;
        }
        .calc-table tr:nth-child(even) td {
            background: #f6f8fa;
        }
        /* Заглушка */
        .stub {
            color: #888;
            font-style: italic;
            padding: 2rem 0;
            text-align: center;
        }
        .flex-row {
            display: flex;
            flex-direction: row;
            gap: 2.5rem;
            align-items: flex-start;
            flex-wrap: nowrap;
            width: 100%;
            max-width: 1000px;
            /* border: 2px dashed #e0e0e0; */ /* Убрано для отладки */
            margin: 0 auto;
        }
        @media (max-width: 1100px) {
            .flex-row {
                flex-direction: column;
                gap: 1.2rem;
                max-width: 100%;
            }
            #val-form {
                margin-left: 0 !important;
            }
        }
        #val-form {
            min-width: 340px;
            max-width: 420px;
            width: 100%;
            margin-left: 32px;
        }
        .compact-flex {
            align-items: flex-start;
            gap: 1.2rem;
        }
        .compact-form {
            max-width: 420px;
            min-width: 320px;
            width: 100%;
            padding: 1rem 1.2rem;
        }
        .sketch-block {
            min-width: 200px;
            text-align: center;
        }
        .horizontal-form .form-row {
            display: flex;
            flex-wrap: wrap;
            gap: 1.2rem;
            margin-bottom: 1.2rem;
            overflow-x: unset;
        }
        .horizontal-form .form-row label, .horizontal-form .form-row .checkbox-row {
            min-width: 140px;
            flex: 1 1 140px;
            margin-bottom: 0;
        }
        .horizontal-form .second-row {
            align-items: flex-end;
        }
        .horizontal-form .end-row {
            justify-content: flex-end;
            display: flex;
            gap: 1.2rem;
            min-width: 180px;
            flex: 1 1 180px;
        }
        .horizontal-form .form-row input,
        .horizontal-form .form-row select {
            font-size: 0.98rem;
            padding: 0.2rem 0.3rem;
        }
        @media (max-width: 1100px) {
            .horizontal-form .form-row {
                flex-direction: column;
                gap: 0.5rem;
            }
        }
        .input-form label {
            display: block;
            margin-bottom: 0.7rem;
        }
        .input-form input, .input-form select {
            width: 100%;
            padding: 0.3rem 0.4rem;
            margin-top: 0.2rem;
            border-radius: 4px;
            border: 1px solid #c2c9d6;
            font-size: 1rem;
        }
        .input-form button {
            margin-top: 1rem;
            background: #223142;
            color: #fff;
            border: none;
            border-radius: 5px;
            padding: 0.7rem 1.5rem;
            font-size: 1rem;
            cursor: pointer;
            transition: background 0.2s;
        }
        .input-form button:hover {
            background: #1a2732;
        }
        .uzk-group {
            margin-top: 0.5rem;
        }
        .checkbox-row {
            display: flex;
            gap: 1.2rem;
            align-items: center;
        }
        .checkbox-item {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            min-width: 120px;
        }
        .checkbox-item label {
            display: flex;
            align-items: center;
            gap: 0.3em;
            margin-bottom: 0;
            font-weight: normal;
        }
        .two-cols-form {
            width: 100%;
            background: #f6f8fa;
            border-radius: 8px;
            padding: 1.2rem 1.5rem;
            box-shadow: 0 1px 4px rgba(34,49,66,0.06);
            font-size: 1rem;
        }
        .two-cols-row {
            display: flex;
            flex-direction: row;
            gap: 0.7rem;
            align-items: center;
            margin-bottom: 1rem;
        }
        .two-cols-row label {
            flex: 1 1 150px;
            min-width: 110px;
            margin-bottom: 0;
            white-space: nowrap;
        }
        .two-cols-row .checkbox-row {
            display: flex;
            gap: 1.2rem;
            align-items: center;
            min-width: 180px;
            margin-bottom: 0;
        }
        .two-cols-row button {
            padding: 0.7rem 1.5rem;
            background: #223142;
            color: #fff;
            border: none;
            border-radius: 5px;
            font-size: 1rem;
            cursor: pointer;
            transition: background 0.2s;
        }
        .two-cols-row button:hover {
            background: #1a2732;
        }
        @media (max-width: 900px) {
            .two-cols-row {
                flex-direction: column;
                gap: 0.5rem;
                align-items: stretch;
            }
        }
        .two-cols-row input, .two-cols-row select {
            font-size: 0.97rem;
            padding: 0.18rem 0.3rem;
            width: 150px;
            box-sizing: border-box;
        }
        .checkbox-col {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
        }
        .checkbox-row-wrap {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
        }
        .uzk-wrap {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 0.1em;
        }
        .uzk-group {
            margin-top: 0.4em;
            width: 100%;
        }
        .grid-form {
            max-width: 440px;
            min-width: 320px;
            width: 100%;
            padding: 1rem 1.2rem;
        }
        .form-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.1rem 1.2rem;
            margin-bottom: 1.2rem;
        }
        .form-grid label, .form-grid .checkbox-cell {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 0.2em;
        }
        .form-grid .checkbox-row {
            display: flex;
            gap: 1.2rem;
            align-items: center;
        }
        .form-grid .checkbox-item {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            min-width: 120px;
        }
        .form-grid .checkbox-item label {
            display: flex;
            align-items: center;
            gap: 0.3em;
            margin-bottom: 0;
            font-weight: normal;
        }
        .form-grid .uzk-group {
            margin-top: 0.4em;
            width: 100%;
        }
        .form-grid-btn {
            display: flex;
            justify-content: center;
        }
        .form-grid input,
        .form-grid select {
            width: 150px;
            box-sizing: border-box;
        }
        .form-grid.form-grid-fullwidth {
            grid-column: 1 / -1;
            margin-top: 0.5rem;
            margin-bottom: 0.5rem;
        }
        .form-grid.form-grid-fullwidth.align-left {
            justify-content: flex-start;
        }
        .checkbox-row.align-left {
            justify-content: flex-start;
        }
        .checkbox-row-grid {
            display: flex;
            flex-direction: row;
            gap: 0;
            justify-content: center;
            align-items: center;
            margin-left: 0;
            margin-top: 0 !important;
        }
        .checkbox-row-grid label {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 0;
            font-weight: normal;
            margin-bottom: 0;
            white-space: nowrap;
        }
        .checkbox-row-grid label:first-child {
            margin-right: 0.7em;
        }
        .checkbox-row-grid label,
        .checkbox-row-grid input[type="checkbox"] {
            padding: 0 !important;
            margin: 0 !important;
            gap: 0 !important;
            font-size: 1em !important;
            line-height: 1 !important;
            vertical-align: middle !important;
        }
        .checkbox-row-grid label {
            display: inline-flex !important;
            align-items: center !important;
            white-space: nowrap !important;
        }
        .checkbox-row-grid label:first-child {
            margin-right: 0.5em !important;
        }
        .checkbox-row-center {
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            gap: 1.5rem !important;
            margin: 1rem 0 !important;
            width: 100% !important;
            grid-column: 1 / -1 !important;
            grid-row: auto !important;
        }
        .checkbox-row-center label {
            display: flex !important;
            align-items: center !important;
            gap: 0.3em !important;
            margin: 0 !important;
            font-weight: normal !important;
            white-space: nowrap !important;
            flex-direction: row !important;
        }
        .checkbox-row-center .custom-checkbox {
            display: inline-flex !important;
            align-items: center !important;
            margin: 0 !important;
            padding: 0 !important;
            flex-direction: row !important;
        }
        .custom-checkbox {
            display: inline-flex;
            align-items: center;
            cursor: pointer;
            margin: 0;
            padding: 0;
            white-space: nowrap;
        }
        .custom-checkbox input[type="checkbox"] {
            display: none;
        }
        .custom-checkbox .checkmark {
            width: 16px;
            height: 16px;
            border: 1.5px solid #888;
            border-radius: 3px;
            background: #fff;
            margin-right: 0.1em;
            position: relative;
            display: inline-block;
        }
        .custom-checkbox input[type="checkbox"]:checked + .checkmark::after {
            content: '';
            position: absolute;
            left: 4px;
            top: 0px;
            width: 5px;
            height: 10px;
            border: solid #223142;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }
        .custom-checkbox span:last-child {
            margin-left: 0;
        }
        .custom-checkbox.uzk-parent {
            position: relative;
        }
        .custom-checkbox .uzk-group {
            display: none;
            position: absolute;
            left: 0;
            top: 1.7em;
            z-index: 2;
            background: #fff;
            box-shadow: 0 2px 8px rgba(34,49,66,0.07);
            border-radius: 4px;
            padding: 0.3em 0.7em 0.5em 0.7em;
        }
        .uzk-group-row {
            margin-top: 0;
        }
        .form-grid .checkbox-row-center {
            grid-column: 1 / -1 !important;
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            gap: 1.5rem !important;
            margin: 1rem 0 !important;
            width: 100% !important;
        }
        .grid-form .checkbox-row-center {
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            gap: 1.5rem !important;
            margin: 1rem 0 !important;
            width: 100% !important;
        }