.aem {
    --aem-text: #1d2327;
    --aem-muted: #50575e;
    --aem-line: #dcdcde;
    --aem-accent: #1a635b;
    max-inline-size: 1120px;
    margin: 24px auto 0;
    padding-inline: 16px;
    color: var(--aem-text);
}

.aem h1 {
    padding: 0;
    font-size: 27px;
    font-weight: 650;
    line-height: 1.4;
}

.aem h2 {
    margin: 0 0 16px;
    font-size: 19px;
    line-height: 1.5;
}

.aem-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-block: 13px 18px;
    border-block-end: 1px solid var(--aem-line);
}

.aem-setup-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-block-start: 10px;
}

.aem-tabs a {
    padding: 10px 14px;
    border-block-end: 3px solid transparent;
    color: var(--aem-muted);
    font-weight: 600;
    text-decoration: none;
}

.aem-tabs a[aria-current="page"] {
    border-block-end-color: var(--aem-accent);
    color: var(--aem-accent);
}

.aem-tabs a:hover {
    color: var(--aem-accent);
    background: #e5efed;
}

.aem-panel {
    padding: 20px;
    margin-block-end: 16px;
    border: 1px solid var(--aem-line);
    border-radius: 9px;
    background: #fff;
}

.aem-panel-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 16px;
}

.aem-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}

.aem-field-full {
    grid-column: 1 / -1;
}

.aem-field label {
    display: block;
    margin-block-end: 5px;
    font-weight: 600;
}

.aem-field :is(input, select, textarea) {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-height: 38px;
    margin: 0;
}

.aem-field textarea {
    resize: vertical;
}

.aem-field select {
    padding-inline: 8px 26px;
    background-position: left 6px center;
}

.aem-field input[readonly] {
    background: #f5f6f7;
}

.aem :is(.aem-help, .aem-optional, .aem-empty) {
    color: var(--aem-muted);
    font-weight: 400;
}

.aem-help {
    margin: 5px 0 0;
}

.aem-empty {
    margin: 0;
}

.aem-empty + .button {
    margin-block-start: 12px;
}

.aem-actions {
    margin-block-start: 15px;
}

.aem-actions .button-primary {
    min-height: 36px;
    padding-inline: 15px;
}

.aem-notice {
    margin-block-end: 14px;
    padding: 10px 12px;
    border: 1px solid;
    border-radius: 6px;
}

.aem-notice-success {
    color: #0f5132;
    background: #ecf8ef;
    border-color: #a6d5b3;
}

.aem-notice-error {
    color: #842029;
    background: #fff2f2;
    border-color: #efb1b5;
}

.aem-table-scroll {
    overflow-x: auto;
}

.aem-table {
    border: 0;
    box-shadow: none;
}

.aem .aem-table :is(th, td) {
    padding: 10px 12px;
    text-align: start;
    vertical-align: top;
}

.aem-table thead th {
    background: #f3f5f6;
    font-weight: 600;
    white-space: nowrap;
}

.aem-table tbody tr + tr :is(th, td) {
    border-block-start: 1px solid #f0f0f1;
}

.aem-table :is(time, bdi) {
    white-space: nowrap;
}

.aem-table .aem-note {
    min-inline-size: 140px;
    max-inline-size: 420px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.aem-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-block-start: 14px;
}

@media (max-width: 650px) {
    .aem {
        padding-inline: 10px;
    }

    .aem-panel {
        padding: 14px;
    }

    .aem-fields {
        grid-template-columns: 1fr;
    }
}
