.edsi-schema {
    --edsi-text: #111111;
    --edsi-muted: #687078;
    --edsi-border: #c8cdd1;
    --edsi-floor-top: #e8e8e5;
    --edsi-floor-front: #b9bdc0;
    --edsi-floor-side: #d0d2d2;
    --edsi-opening-face: #a9afb3;
    --edsi-steel-top: #485159;
    --edsi-steel-front: #30373c;
    --edsi-steel-side: #20262a;
    --edsi-measure: #315b9d;
    --edsi-background: #ffffff;
    color: var(--edsi-text);
    display: grid;
    gap: 8px;
    width: min(1342px, calc(100vw - 48px));
    margin: 2rem 0 2.5rem 50% !important;
    transform: translateX(-50%);
}

.edsi-schema h3,
.edsi-schema p {
    margin-top: 0;
}

.edsi-schema h3 {
    margin-bottom: 0 !important;
    text-align: center;
}

.edsi-intro {
    color: var(--edsi-muted);
    margin-bottom: 2px !important;
    text-align: center;
}

.edsi-camera-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 12px;
}

.edsi-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 338px;
    gap: clamp(1.25rem, 2.5vw, 2.25rem);
    align-items: start;
}

.edsi-visual,
.edsi-side {
    min-width: 0;
}

.edsi-camera-control,
.edsi-field {
    display: grid;
    gap: 5px;
    margin: 0;
}

.edsi-camera-control > span,
.edsi-field > span:first-child {
    font-size: 0.82rem;
    line-height: 1.25;
}

.edsi-camera-control input[type="range"] {
    width: 100%;
}

.edsi-stage {
    width: 100%;
    border-radius: 12px;
    background: radial-gradient(circle at 52% 46%, #eef0f1 0, rgba(238, 240, 241, 0) 60%);
}

.edsi-drawing {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.edsi-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: end;
}

.edsi-field strong {
    font-weight: 600;
}

.edsi-field .wpcf7-form-control-wrap {
    display: block;
}

.edsi-field .wpcf7-number {
    box-sizing: border-box;
    display: block;
    width: 100% !important;
    min-height: 42px;
    margin: 0 !important;
}

.edsi-units {
    color: var(--edsi-muted);
    font-size: 0.78rem;
    margin: -3px 0 0 !important;
    text-align: right;
}

.edsi-one-page-form {
    color: #111111;
    display: grid;
    gap: clamp(2.5rem, 5vw, 4.5rem);
    width: min(1342px, calc(100vw - 48px));
    margin: 1.5rem 0 2.5rem 50%;
    transform: translateX(-50%);
}

.edsi-one-page-form .edsi-schema {
    width: 100%;
    margin: 0 !important;
    transform: none;
}

.edsi-form-section {
    min-width: 0;
    scroll-margin-top: 32px;
}

.edsi-contact-section,
.edsi-project-section {
    width: min(100%, 1040px);
    margin-inline: auto;
}

.edsi-contact-section > h3,
.edsi-project-section > h3 {
    margin: 0 0 1rem;
    text-align: left;
}

.edsi-contact-grid,
.edsi-project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.edsi-contact-grid > p,
.edsi-project-grid > p {
    min-width: 0;
    margin: 0;
}

.edsi-contact-grid label,
.edsi-project-grid label {
    display: block;
    margin: 0;
}

.edsi-contact-grid .wpcf7-form-control-wrap,
.edsi-project-grid .wpcf7-form-control-wrap {
    display: block;
    margin-top: 5px;
}

.edsi-contact-grid input:not([type="file"]),
.edsi-contact-grid select,
.edsi-project-grid textarea,
.edsi-project-grid input[type="file"] {
    box-sizing: border-box;
    width: 100%;
}

.edsi-project-grid textarea {
    min-height: 105px;
    resize: vertical;
}

.edsi-project-file .wpcf7-form-control-wrap {
    overflow: hidden;
}

.edsi-privacy {
    grid-column: 1 / -1;
    color: #687078;
    font-size: 0.78rem;
    line-height: 1.45;
}

.edsi-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
}

.edsi-button,
.edsi-form-actions .wpcf7-submit {
    appearance: none;
    border: 1px solid #111111;
    border-radius: 4px;
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    line-height: 1.2;
    min-height: 42px;
    padding: 0.65rem 1rem;
}

.edsi-button-primary,
.edsi-form-actions .wpcf7-submit {
    background: #111111;
    color: #ffffff;
}

.edsi-button-secondary {
    background: #ffffff;
    color: #111111;
}

.edsi-side > .edsi-button {
    width: 100%;
    margin-top: 0.75rem;
}

.edsi-button:focus-visible,
.edsi-form-actions .wpcf7-submit:focus-visible {
    outline: 3px solid rgba(49, 91, 157, 0.35);
    outline-offset: 2px;
}

.edsi-floor-top {
    fill: var(--edsi-floor-top);
    stroke: var(--edsi-border);
    stroke-width: 1;
}

.edsi-floor-front {
    fill: var(--edsi-floor-front);
    stroke: #9da2a5;
    stroke-width: 1;
}

.edsi-floor-side {
    fill: var(--edsi-floor-side);
    stroke: #aeb3b6;
    stroke-width: 1;
}

.edsi-opening-face {
    fill: var(--edsi-opening-face);
    stroke: #8f969a;
    stroke-width: 1;
}

.edsi-opening-outline {
    fill: none;
    stroke: var(--edsi-measure);
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.edsi-stringer-side {
    fill: var(--edsi-steel-side);
    stroke: #171b1e;
    stroke-width: 1;
}

.edsi-stringer-top {
    fill: var(--edsi-steel-front);
    stroke: #22292e;
    stroke-width: 1;
}

.edsi-tread-top {
    fill: var(--edsi-steel-top);
    stroke: #282f34;
    stroke-width: 0.9;
}

.edsi-tread-front {
    fill: var(--edsi-steel-front);
    stroke: #23292d;
    stroke-width: 0.8;
}

.edsi-tread-side {
    fill: var(--edsi-steel-side);
    stroke: #171c1f;
    stroke-width: 0.8;
}

.edsi-measure {
    fill: none;
    marker-end: url(#edsi-arrow-end);
    marker-start: url(#edsi-arrow-start);
    stroke: var(--edsi-measure);
    stroke-width: 2;
}

.edsi-arrow-head {
    fill: var(--edsi-measure);
}

.edsi-extension {
    fill: none;
    stroke: rgba(49, 91, 157, 0.52);
    stroke-dasharray: 4 4;
    stroke-width: 1;
}

.edsi-label-box {
    fill: var(--edsi-background);
    stroke: #7d97bf;
    stroke-width: 1;
}

.edsi-label {
    dominant-baseline: central;
    fill: var(--edsi-text);
    font-size: 13px;
    font-weight: 600;
    text-anchor: middle;
}

.edsi-level {
    fill: var(--edsi-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.edsi-shadow {
    filter: url(#edsi-soft-shadow);
}

.edsi-measure-item {
    transition: opacity 160ms ease, stroke-width 160ms ease, fill 160ms ease;
}

.edsi-schema.edsi-has-active-measure .edsi-measure-item {
    opacity: 0.16;
}

.edsi-schema.edsi-has-active-measure .edsi-measure-item.edsi-is-active {
    opacity: 1;
}

.edsi-schema.edsi-has-active-measure .edsi-measure.edsi-is-active {
    stroke-width: 3.6;
}

.edsi-schema.edsi-has-active-measure .edsi-label-box.edsi-is-active {
    fill: #edf3fb;
    stroke-width: 2;
}

@media (max-width: 980px) {
    .edsi-one-page-form {
        width: 100%;
        margin: 1.5rem 0 2.5rem;
        transform: none;
    }

    .wpcf7 .edsi-schema {
        width: 100%;
        margin: 2rem 0 2.5rem !important;
        transform: none;
    }

    .edsi-main {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .edsi-fields {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .edsi-contact-grid,
    .edsi-project-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .edsi-privacy {
        grid-column: auto;
    }

    .edsi-form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .edsi-form-actions .edsi-button,
    .edsi-form-actions .wpcf7-submit {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .edsi-camera-controls {
        grid-template-columns: 1fr;
    }

    .edsi-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wpcf7 .edsi-schema {
        margin: 1.25rem 0 !important;
    }
}
