.embed-builder-page {
    background: #eef2f5;
    color: #17212a;
}

.embed-builder-page .site-header {
    background: rgba(238, 242, 245, 0.92);
}

.embed-builder-page .embed-builder-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(54px, 7vw, 90px) 0 clamp(46px, 6vw, 72px);
    color: #f5f7fa;
    background:
        radial-gradient(circle at 78% 30%, rgba(29, 128, 190, 0.32), transparent 28%),
        linear-gradient(135deg, #07111f 0%, #0b2542 54%, #07131f 100%);
}

.embed-builder-page .embed-builder-hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -120px 28%;
    height: 220px;
    border-top: 2px solid rgba(31, 192, 248, 0.5);
    border-radius: 50%;
    box-shadow: 0 -8px 40px rgba(25, 186, 247, 0.18);
    pointer-events: none;
}

.embed-builder-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.45fr);
    align-items: end;
    gap: 48px;
}

.embed-builder-hero h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(42px, 5.5vw, 74px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.embed-builder-lead {
    max-width: 780px;
    margin: 18px 0 0;
    color: #c6d7e4;
    font-size: clamp(18px, 1.7vw, 22px);
    line-height: 1.5;
}

.embed-builder-benefits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.embed-builder-benefits span {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px solid rgba(126, 209, 240, 0.22);
    border-radius: 14px;
    background: rgba(4, 17, 31, 0.48);
    color: #e9f7fc;
    font-size: 13px;
    font-weight: 750;
    text-align: center;
}

.embed-builder-section {
    padding: clamp(58px, 7vw, 90px) 0;
}

.embed-builder-heading {
    display: block;
    max-width: 820px;
    margin-bottom: 32px;
}

.embed-builder-heading .eyebrow {
    margin-bottom: 10px;
    color: #2583a9;
}

.embed-builder-heading h2 {
    max-width: 760px;
}

.embed-builder-heading > p:last-child {
    max-width: 680px;
    margin: 14px 0 0;
    line-height: 1.6;
}

.embed-builder-heading h2,
.embed-code-section h2,
.embed-info-section h2 {
    color: #17212a;
}

.embed-builder-heading p:last-child,
.embed-code-section > div:first-child > p:last-child {
    color: #596875;
}

.embed-builder-noscript {
    margin-bottom: 22px;
    padding: 14px 16px;
    border: 1px solid #d7a25f;
    border-radius: 12px;
    background: #fff7ed;
    color: #6b4219;
}

.embed-builder-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    align-items: start;
    gap: 30px;
}

.embed-config {
    display: grid;
    gap: 18px;
}

.embed-config fieldset,
.embed-code-box,
.embed-preview-sticky {
    min-width: 0;
    margin: 0;
    padding: 22px;
    border: 1px solid #c9d3db;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(23, 33, 42, 0.08);
}

.embed-config legend {
    padding: 0 7px;
    color: #17212a;
    font-size: 15px;
    font-weight: 800;
}

.embed-field {
    display: grid;
    gap: 7px;
    margin-top: 14px;
}

.embed-field > span,
.embed-color-field > label,
.embed-code-box > label {
    color: #394955;
    font-size: 13px;
    font-weight: 760;
}

.embed-field select,
.embed-field input[type="text"],
.embed-color-field input[type="text"],
.embed-width-control input[type="number"],
.embed-code-box textarea {
    width: 100%;
    border: 1px solid #b8c5ce;
    border-radius: 10px;
    background: #fff;
    color: #17212a;
}

.embed-field select,
.embed-field input[type="text"],
.embed-color-field input[type="text"],
.embed-width-control input[type="number"] {
    min-height: 46px;
    padding: 9px 11px;
}

.embed-choice-grid {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.embed-choice-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.embed-choice-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.embed-choice {
    position: relative;
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 3px;
    min-height: 86px;
    padding: 14px 13px 12px 38px;
    border: 1px solid #c9d3db;
    border-radius: 12px;
    background: #f8fafb;
    cursor: pointer;
}

.embed-choice input {
    position: absolute;
    top: 15px;
    left: 14px;
}

.embed-choice:has(input:checked) {
    border-color: #2583a9;
    background: #eef9fd;
    box-shadow: inset 0 0 0 1px #2583a9;
}

.embed-choice strong {
    color: #17212a;
    font-size: 14px;
}

.embed-choice span {
    color: #667783;
    font-size: 11px;
    line-height: 1.35;
}

.embed-color-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.embed-color-field {
    min-width: 0;
}

.embed-color-field > div {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 7px;
    margin-top: 7px;
}

.embed-color-field input[type="color"] {
    width: 48px;
    height: 46px;
    padding: 3px;
    border: 1px solid #b8c5ce;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.embed-field-help,
.embed-contrast,
.embed-validation {
    margin: 9px 0 0;
    color: #667783;
    font-size: 12px;
}


.embed-validation {
    min-height: 18px;
    margin: -5px 2px 0;
    color: #8b3f25;
    font-size: 12px;
    font-weight: 700;
}

.embed-code-actions .button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.embed-contrast.is-warning {
    color: #8b4c16;
    font-weight: 700;
}

.embed-contrast.is-ok {
    color: #276c49;
    font-weight: 700;
}

.embed-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 14px;
    color: #394955;
    font-size: 13px;
    font-weight: 700;
}

.embed-check input {
    width: 18px;
    height: 18px;
}

.embed-width-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px auto;
    align-items: center;
    gap: 10px;
}

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

.embed-preview-sticky {
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.embed-preview-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}

.embed-preview-heading h3 {
    margin: 0;
    color: #17212a;
    font-size: 18px;
}

.embed-preview-heading span {
    color: #667783;
    font-size: 12px;
    font-weight: 700;
}

.embed-preview-stage {
    min-height: 330px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    padding: 26px 14px;
    border: 1px dashed #b8c5ce;
    border-radius: 14px;
    background:
        linear-gradient(45deg, #f1f5f7 25%, transparent 25%),
        linear-gradient(-45deg, #f1f5f7 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f1f5f7 75%),
        linear-gradient(-45deg, transparent 75%, #f1f5f7 75%),
        #fff;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
}

.embed-preview-stage iframe {
    display: block;
    width: 100%;
    max-width: 520px;
    border: 0;
    overflow: hidden;
}

.embed-code-section {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    gap: 30px;
    margin-top: 54px;
    padding-top: 48px;
    border-top: 1px solid #c9d3db;
}

.embed-code-section h2 {
    margin-top: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1;
    letter-spacing: -0.045em;
}

.embed-code-box textarea {
    min-height: 310px;
    padding: 14px;
    resize: vertical;
    background: #0d1721;
    color: #e8f3f8;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.55;
    tab-size: 4;
}

.embed-code-actions {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
}

.embed-code-actions p {
    margin: 0;
    color: #4f6270;
    font-size: 12px;
}

.embed-info-section {
    padding: 62px 0 74px;
    border-top: 1px solid #d3dce3;
    background: #f7f9fa;
}

.embed-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.embed-info-grid article {
    padding: 24px;
    border: 1px solid #d3dce3;
    border-radius: 16px;
    background: #fff;
}

.embed-info-grid h2 {
    margin: 0;
    font-size: 21px;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.embed-info-grid p {
    margin: 11px 0 0;
    color: #596875;
    font-size: 14px;
}

.embed-color-field input[aria-invalid="true"],
.embed-width-control input[aria-invalid="true"] {
    border-color: #b2572e;
    box-shadow: 0 0 0 2px rgba(178, 87, 46, 0.14);
}

.embed-color-field.is-disabled {
    opacity: 0.55;
}

@media (max-width: 940px) {
    .embed-builder-hero-inner,
    .embed-builder-grid,
    .embed-code-section {
        grid-template-columns: 1fr;
    }

    .embed-builder-benefits {
        max-width: 620px;
    }

    .embed-preview-sticky {
        position: static;
    }

    .embed-preview-stage {
        min-height: 300px;
    }
}

@media (max-width: 680px) {
    .embed-choice-grid-three,
    .embed-color-grid,
    .embed-info-grid {
        grid-template-columns: 1fr;
    }

    .embed-builder-benefits,
    .embed-choice-grid-two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .embed-color-field > div {
        grid-template-columns: 54px minmax(0, 1fr);
    }

    .embed-preview-stage {
        padding-inline: 8px;
    }
}

@media (max-width: 430px) {
    .embed-builder-benefits,
    .embed-choice-grid-two {
        grid-template-columns: 1fr;
    }

    .embed-config fieldset,
    .embed-code-box,
    .embed-preview-sticky,
    .embed-info-grid article {
        padding: 17px;
    }

    .embed-width-control {
        grid-template-columns: 1fr 80px auto;
    }
}

@media print {
    .embed-config,
    .embed-preview-column,
    .embed-code-actions {
        display: none !important;
    }

    .embed-code-section {
        display: block;
    }
}
