.pas-guided {
    background: var(--surface, #fff);
    padding: clamp(1rem, 3vw, 2rem);
    box-shadow: 0 8px 30px #162b4610
}

.pas-form-heading {
    border-bottom: 1px solid var(--line, #d9e1e8);
    padding-bottom: 1rem;
    margin-bottom: 1rem
}

.pas-form-heading h3 {
    margin: .3rem 0 !important
}

.pas-form-heading p {
    margin: .5rem 0
}

.pas-form-options {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--line, #d9e1e8);
    border-radius: 9px;
    background: var(--surface-soft, #f7f9fb)
}

.pas-form-options summary {
    font-weight: 650;
    cursor: pointer
}

.pas-editor .pas-reuse {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    font-weight: 400;
    line-height: 1.6
}

.pas-editor .pas-reuse input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-top: .3rem
}

.pas-clear {
    padding: .4rem 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-decoration: underline;
    font: inherit
}

.pas-form-stages {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .6rem;
    margin-top: 1.7rem
}

.pas-form-stages button {
    border: 1px solid var(--line, #c5d2dd);
    background: var(--surface-soft, #f7f9fb);
    color: inherit;
    padding: .8rem .6rem;
    border-radius: 8px;
    min-height: 54px;
    white-space: normal;
    line-height: 1.4;
    font: inherit;
    text-align: left
}

.pas-form-stages button.is-current {
    background: #087c72;
    color: #fff;
    border-color: #087c72;
    font-weight: 650
}

.pas-form-section {
    min-width: 0 !important;
    border: 1px solid var(--line, #d9e1e8) !important;
    border-radius: 10px;
    padding: 1.15rem !important;
    margin: 1.3rem 0 !important
}

.pas-form-section legend {
    font-weight: 700;
    padding: 0 .5rem
}

.pas-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem
}

.pas-form-field {
    min-width: 0
}

.pas-form-wide {
    grid-column: 1/-1
}

.pas-editor .pas-form-field label {
    margin: 0 0 .45rem;
    font-weight: 600
}

.pas-editor .pas-form-field :is(input, select, textarea) {
    min-height: 46px;
    min-width: 0;
    max-width: 100%;
    background: var(--surface, #fff);
    color: inherit;
    border: 1px solid var(--line, #aab9c5);
    padding: .75rem
}

.pas-editor .pas-form-field :is(input, select, textarea):focus-visible {
    outline: 3px solid #16a39455;
    outline-offset: 2px;
    border-color: #087c72
}

.pas-editor .pas-form-field textarea {
    min-height: 115px;
    resize: vertical;
    line-height: 1.6
}

.pas-form-check label {
    display: flex;
    gap: .7rem;
    align-items: flex-start;
    line-height: 1.6
}

.pas-editor .pas-form-check input {
    width: 19px;
    min-height: 19px;
    height: 19px;
    flex: 0 0 19px;
    margin-top: .2rem
}

.pas-repeat-list {
    display: block
}

.pas-repeat-item {
    min-width: 0;
    border: 0;
    border-left: 3px solid #087c72;
    border-radius: 0;
    background: var(--surface-soft, #f7f9fb);
    padding: 1rem;
    margin: .7rem 0 1.5rem
}

.pas-repeat-item legend {
    padding: 0 .4rem;
    font-weight: 650
}

.pas-repeat-item .pas-form-wide {
    grid-column: auto
}

.pas-repeat-item>.button {
    margin-top: 1rem
}

.pas-review {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(0, 2fr);
    margin: 1.5rem 0;
    border-top: 1px solid var(--line, #d9e1e8)
}

.pas-review :is(dt, dd) {
    margin: 0;
    padding: .8rem;
    border-bottom: 1px solid var(--line, #d9e1e8);
    overflow-wrap: anywhere;
    white-space: pre-wrap
}

.pas-review dt {
    font-weight: 650
}

.pas-review dd p {
    margin: .25rem 0
}

.pas-form-navigation {
    border-top: 1px solid var(--line, #d9e1e8);
    padding-top: 1rem;
    justify-content: space-between
}

.pas-editor button:disabled {
    opacity: .55;
    cursor: default
}

.pas-editor [data-pas-stage-title] {
    scroll-margin-top: 7rem
}

.pas-editor [data-pas-stage-title]:focus {
    outline: none
}

.pas-editor .button {
    white-space: normal !important;
    line-height: 1.5;
    text-align: center
}

.pas-editor a:not([class]) {
    line-height: 1.6
}

html[data-theme=dark] .pas-guided {
    background: #142131;
    color: #e5edf7
}

html[data-theme=dark] :is(.pas-form-options, .pas-repeat-item, .pas-form-stages button:not(.is-current)) {
    background: #1b2b3d;
    border-color: #35485e;
    color: #e5edf7
}

html[data-theme=dark] .pas-editor .pas-form-field :is(input, select, textarea) {
    background: #0f1b2a;
    border-color: #43566c;
    color: #edf4fd
}

@media(max-width:700px) {
    .pas-form-stages {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .pas-form-grid {
        grid-template-columns: minmax(0, 1fr)
    }

    .pas-form-section {
        padding: .8rem !important
    }

    .pas-review {
        display: block
    }

    .pas-review dt {
        border-bottom: 0;
        padding-bottom: 0
    }

    .pas-review dd {
        padding-top: .4rem
    }

    .pas-repeat-item {
        padding: .75rem
    }

    .pas-editor .form-actions {
        gap: .85rem
    }
}

@media print {
    .pas-guided {
        display: none !important
    }
}
