.ar-card-grid,
.ar-card-grid-editor > .block-editor-inner-blocks > .block-editor-block-list__layout {
    --ar-card-grid-column-gap: 36px;
    --ar-card-grid-row-gap: 40px;
    --ar-card-min-width: 280px;
    --ar-card-grid-max-column-width: calc((100% - 72px) / 3);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, max(var(--ar-card-min-width), var(--ar-card-grid-max-column-width))), 1fr));
    column-gap: var(--ar-card-grid-column-gap);
    row-gap: var(--ar-card-grid-row-gap);
}

.ar-card-grid-columns-1,
.ar-card-grid-editor-wrap.ar-card-grid-columns-1 .ar-card-grid-editor > .block-editor-inner-blocks > .block-editor-block-list__layout {
    --ar-card-grid-max-column-width: 100%;
}

.ar-card-grid-columns-2,
.ar-card-grid-editor-wrap.ar-card-grid-columns-2 .ar-card-grid-editor > .block-editor-inner-blocks > .block-editor-block-list__layout {
    --ar-card-grid-max-column-width: calc((100% - 36px) / 2);
}

.ar-card-grid-columns-3,
.ar-card-grid-editor-wrap.ar-card-grid-columns-3 .ar-card-grid-editor > .block-editor-inner-blocks > .block-editor-block-list__layout {
    --ar-card-grid-max-column-width: calc((100% - 72px) / 3);
}

.ar-card-grid-columns-4,
.ar-card-grid-editor-wrap.ar-card-grid-columns-4 .ar-card-grid-editor > .block-editor-inner-blocks > .block-editor-block-list__layout {
    --ar-card-grid-max-column-width: calc((100% - 108px) / 4);
}

.ar-card-grid {
    margin: 0 0 36px;
}

.ar-card,
.ar-card * {
    box-sizing: border-box;
}

.ar-card {
    position: relative;
    min-height: 430px;
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd8cf;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.ar-card-top {
    height: 155px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ar-card-icon {
    width: 82px;
    height: 82px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ar-card-icon::before {
    content: "";
    width: 42px;
    height: 42px;
    display: block;
    background: #fff;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
}

.ar-icon-atom::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='4'%3E%3Cellipse cx='32' cy='32' rx='26' ry='10'/%3E%3Cellipse cx='32' cy='32' rx='26' ry='10' transform='rotate(60 32 32)'/%3E%3Cellipse cx='32' cy='32' rx='26' ry='10' transform='rotate(120 32 32)'/%3E%3Ccircle cx='32' cy='32' r='4' fill='black'/%3E%3C/g%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='4'%3E%3Cellipse cx='32' cy='32' rx='26' ry='10'/%3E%3Cellipse cx='32' cy='32' rx='26' ry='10' transform='rotate(60 32 32)'/%3E%3Cellipse cx='32' cy='32' rx='26' ry='10' transform='rotate(120 32 32)'/%3E%3Ccircle cx='32' cy='32' r='4' fill='black'/%3E%3C/g%3E%3C/svg%3E");
}

.ar-icon-leaf::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M32 56V14'/%3E%3Cpath d='M32 32C48 30 54 18 54 8C42 9 32 18 32 32Z'/%3E%3Cpath d='M31 40C19 38 11 28 10 17C23 18 31 27 31 40Z'/%3E%3C/g%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M32 56V14'/%3E%3Cpath d='M32 32C48 30 54 18 54 8C42 9 32 18 32 32Z'/%3E%3Cpath d='M31 40C19 38 11 28 10 17C23 18 31 27 31 40Z'/%3E%3C/g%3E%3C/svg%3E");
}

.ar-icon-chart::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 52h48'/%3E%3Cpath d='M13 44l13-18 10 10 16-25'/%3E%3C/g%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 52h48'/%3E%3Cpath d='M13 44l13-18 10 10 16-25'/%3E%3C/g%3E%3C/svg%3E");
}

.ar-icon-document::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M14 6h25l11 11v41H14V6zm22 3v12h11L36 9zM22 30h20v4H22v-4zm0 10h20v4H22v-4z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M14 6h25l11 11v41H14V6zm22 3v12h11L36 9zM22 30h20v4H22v-4zm0 10h20v4H22v-4z'/%3E%3C/svg%3E");
}

.ar-icon-calendar::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 10h8V4h5v6h14V4h5v6h8v48H12V10zm5 18v25h30V28H17zm0-13v8h30v-8H17z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 10h8V4h5v6h14V4h5v6h8v48H12V10zm5 18v25h30V28H17zm0-13v8h30v-8H17z'/%3E%3C/svg%3E");
}

.ar-icon-building::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M10 58V20l22-12 22 12v38H38V42H26v16H10zm8-8h6v-6h-6v6zm0-14h6v-6h-6v6zm11 0h6v-6h-6v6zm11 0h6v-6h-6v6zm0 14h6v-6h-6v6zM29 22h6v-6h-6v6z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M10 58V20l22-12 22 12v38H38V42H26v16H10zm8-8h6v-6h-6v6zm0-14h6v-6h-6v6zm11 0h6v-6h-6v6zm11 0h6v-6h-6v6zm0 14h6v-6h-6v6zM29 22h6v-6h-6v6z'/%3E%3C/svg%3E");
}

.ar-icon-water::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M32 6s18 20 18 34c0 10-8 18-18 18s-18-8-18-18C14 26 32 6 32 6zm-14 35c4 3 8 3 13 0s9-3 15 0v5c-6-3-10-3-15 0s-9 3-13 0v-5z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M32 6s18 20 18 34c0 10-8 18-18 18s-18-8-18-18C14 26 32 6 32 6zm-14 35c4 3 8 3 13 0s9-3 15 0v5c-6-3-10-3-15 0s-9 3-13 0v-5z'/%3E%3C/svg%3E");
}

.ar-icon-megaphone::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M8 28h10l30-14v36L18 36H8v-8zm15 10l8 16h-8l-7-16h7zm31-20c5 3 8 8 8 14s-3 11-8 14v-8c2-1 3-4 3-6s-1-5-3-6v-8z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M8 28h10l30-14v36L18 36H8v-8zm15 10l8 16h-8l-7-16h7zm31-20c5 3 8 8 8 14s-3 11-8 14v-8c2-1 3-4 3-6s-1-5-3-6v-8z'/%3E%3C/svg%3E");
}

.ar-icon-map::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M8 12l16-6 16 6 16-6v46l-16 6-16-6-16 6V12zm20 1v34l8 3V16l-8-3zM14 17v31l8-3V14l-8 3zm28 2v31l8-3V16l-8 3z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M8 12l16-6 16 6 16-6v46l-16 6-16-6-16 6V12zm20 1v34l8 3V16l-8-3zM14 17v31l8-3V14l-8 3zm28 2v31l8-3V16l-8 3z'/%3E%3C/svg%3E");
}

.ar-icon-users::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M32 32c7 0 12-5 12-12S39 8 32 8 20 13 20 20s5 12 12 12zm0 6c-12 0-22 6-22 14v4h44v-4c0-8-10-14-22-14zm18-5c5 1 9 5 9 10v4h-8c-1-5-4-9-9-12 3 0 6-1 8-2zM14 33c2 1 5 2 8 2-5 3-8 7-9 12H5v-4c0-5 4-9 9-10z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M32 32c7 0 12-5 12-12S39 8 32 8 20 13 20 20s5 12 12 12zm0 6c-12 0-22 6-22 14v4h44v-4c0-8-10-14-22-14zm18-5c5 1 9 5 9 10v4h-8c-1-5-4-9-9-12 3 0 6-1 8-2zM14 33c2 1 5 2 8 2-5 3-8 7-9 12H5v-4c0-5 4-9 9-10z'/%3E%3C/svg%3E");
}

.ar-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 36px 34px 32px;
}

.ar-card-title,
.ar-card-meta,
.ar-card-description,
.ar-card-button {
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
}

.ar-card-title {
    margin: 0 0 16px;
    color: #353535;
    font-size: 24px;
    line-height: 1.45;
    font-weight: 800;
}

.ar-card-meta,
.ar-card-description {
    margin: 0;
    color: #3f3f3f;
    font-size: 16px;
    line-height: 1.6;
}

.ar-card-description > *:first-child {
    margin-top: 0;
}

.ar-card-description > *:last-child {
    margin-bottom: 0;
}

/* Keep card-style blocks comfortably separated when editors stack them
   inside a Card description. Their own outer margins are normalised here
   so spacing is predictable and does not double up. */
.ar-card-description > .wp-block-annapolis-royal-simple-motion,
.ar-card-description > .wp-block-municipal-download-card,
.ar-card-description > .wp-block-ar-payment-links,
.ar-card-description > .ar-payment-links {
    margin-block: 0;
}

.ar-card-description > * + .wp-block-annapolis-royal-simple-motion,
.ar-card-description > * + .wp-block-municipal-download-card,
.ar-card-description > * + .wp-block-ar-payment-links,
.ar-card-description > * + .ar-payment-links {
    margin-top: 20px;
}

/* Mirror the same visual separation in the block editor, where Gutenberg
   wraps each inner block in its own editor container. */
.ar-card-description .block-editor-block-list__layout > .block-editor-block-list__block + .block-editor-block-list__block {
    margin-top: 20px;
}

.ar-card-description .wp-block-paragraph,
.ar-card-description p,
.ar-card-description ul,
.ar-card-description ol {
    line-height: inherit;
}

/* Description list spacing/indentation
   Keeps ordered and unordered lists readable inside cards in both the editor and front end. */
.ar-card-description ul,
.ar-card-description ol,
.ar-card-description .wp-block-list {
    margin: 0.75em 0;
    padding-left: 1.55em;
    padding-inline-start: 1.55em;
    list-style-position: outside;
}

.ar-card-description ul {
    list-style-type: disc;
}

.ar-card-description ol {
    list-style-type: decimal;
}

.ar-card-description li {
    margin: 0 0 0.35em;
    padding-left: 0.15em;
}

.ar-card-description li:last-child {
    margin-bottom: 0;
}

.ar-card-description li > ul,
.ar-card-description li > ol {
    margin-top: 0.35em;
    margin-bottom: 0.35em;
    padding-left: 1.45em;
    padding-inline-start: 1.45em;
}

.ar-card-description > ul:first-child,
.ar-card-description > ol:first-child,
.ar-card-description > .wp-block-list:first-child {
    margin-top: 0;
}

.ar-card-description > ul:last-child,
.ar-card-description > ol:last-child,
.ar-card-description > .wp-block-list:last-child {
    margin-bottom: 0;
}

.ar-card-button-wrap {
    margin-top: auto;
    padding-top: 32px;
    text-align: center;
}

.ar-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 185px;
    min-height: 35px;
    padding: 8px 24px;
    border-radius: 999px;
    background: #90001f;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
}

.ar-card-button:hover,
.ar-card-button:focus {
    background: #6f0018;
    color: #fff;
}

.ar-card-grid-editor-wrap {
    width: 100%;
}

.ar-card-grid-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 12px;
    border: 1px dashed #c9c9c9;
    border-radius: 8px;
    background: #f8f8f8;
}

.ar-card-grid-editor-note {
    color: #555;
    font-size: 13px;
}

.ar-card-grid-editor .wp-block-ar-card {
    margin: 0;
}

@media (max-width: 700px) {
    .ar-card-grid,
    .ar-card-grid-editor > .block-editor-inner-blocks > .block-editor-block-list__layout {
        grid-template-columns: 1fr;
        column-gap: 24px;
        row-gap: 32px;
    }

    .ar-card {
        min-height: 380px;
    }

    .ar-card-top {
        height: 130px;
    }


    .ar-card-body {
        padding: 28px 26px;
    }

    .ar-card-title {
        font-size: 21px;
    }

    .ar-card-grid-editor-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Editor-only card controls */
.ar-card-editor-actions {
    display: none;
    gap: 8px;
    padding: 10px;
    border-bottom: 1px solid #e4e4e4;
    background: #f7f7f7;
    flex-wrap: wrap;
}

.block-editor-block-list__block.is-selected > .ar-card-editor-actions,
.block-editor-block-list__block.has-child-selected > .ar-card-editor-actions,
.wp-block-ar-card.is-selected .ar-card-editor-actions,
.wp-block-ar-card.has-child-selected .ar-card-editor-actions {
    display: flex;
}

.ar-card-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Image option for card top */
.ar-card-top-has-image {
    padding: 0;
    background: #f1f1f1;
    overflow: hidden;
}

.ar-card-top-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.ar-card-image-control {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 8px 0 18px;
}

.ar-card-image-preview {
    display: block;
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    border: 1px solid #dcdcde;
    border-radius: 6px;
}

/* Final polish options */
.ar-card-grid-equal-height,
.ar-card-grid-editor-wrap.ar-card-grid-equal-height .ar-card-grid-editor > .block-editor-inner-blocks > .block-editor-block-list__layout {
    align-items: stretch;
}

.ar-card-grid-natural-height,
.ar-card-grid-editor-wrap.ar-card-grid-natural-height .ar-card-grid-editor > .block-editor-inner-blocks > .block-editor-block-list__layout {
    align-items: start;
}

.ar-card-grid-natural-height .ar-card,
.ar-card-grid-editor-wrap.ar-card-grid-natural-height .ar-card {
    min-height: 0;
    align-self: start;
}

.ar-card-top-height-small .ar-card-top {
    height: 120px;
}

.ar-card-top-height-medium .ar-card-top {
    height: 155px;
}

.ar-card-top-height-large .ar-card-top {
    height: 220px;
}

.ar-card-top-none .ar-card-body {
    padding-top: 34px;
}

.ar-card-link-all {
    color: inherit;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.ar-card-link-all:hover,
.ar-card-link-all:focus {
    color: inherit;
    text-decoration: none;
    border-color: rgba(144, 0, 31, 0.35);
    box-shadow: 0 8px 22px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}

.ar-card-link-all:focus-visible,
.ar-card-button:focus-visible {
    outline: 3px solid #90001f;
    outline-offset: 4px;
}

.ar-card-link-all .ar-card-title,
.ar-card-link-all .ar-card-meta {
    text-decoration: none;
}


.ar-card-full-link {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    text-decoration: none;
}

.ar-card-full-link:focus-visible {
    outline: 3px solid #90001f;
    outline-offset: 4px;
}


.ar-card-button-outline {
    background: transparent;
    color: #90001f;
    border: 2px solid #90001f;
}

.ar-card-button-outline:hover,
.ar-card-button-outline:focus {
    background: #90001f;
    color: #fff;
}

.ar-card-button-text {
    min-width: 0;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #90001f;
    text-transform: none;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.ar-card-button-text:hover,
.ar-card-button-text:focus {
    background: transparent;
    color: #6f0018;
}

.ar-card-style-minimal {
    border-color: #e7e2d9;
    box-shadow: none;
}

.ar-card-style-minimal .ar-card-body {
    padding: 30px 28px;
}

.ar-card-style-featured {
    border-color: rgba(144, 0, 31, 0.24);
    box-shadow: 0 10px 26px rgba(0,0,0,0.10);
}

.ar-card-style-featured .ar-card-title {
    font-size: 26px;
}

.ar-card-meta p {
    margin: 0 0 0.85em;
}

.ar-card-meta p:last-child {
    margin-bottom: 0;
}

.ar-card-meta ul,
.ar-card-meta ol {
    margin: 0.75em 0;
    padding-left: 1.45em;
    padding-inline-start: 1.45em;
    list-style-position: outside;
}

.ar-card-meta ul {
    list-style-type: disc;
}

.ar-card-meta ol {
    list-style-type: decimal;
}

.ar-card-meta li {
    margin: 0 0 0.3em;
}

.ar-card-meta li:last-child,
.ar-card-meta > ul:last-child,
.ar-card-meta > ol:last-child {
    margin-bottom: 0;
}

@media (max-width: 700px) {
    .ar-card-top-height-small .ar-card-top {
        height: 110px;
    }

    .ar-card-top-height-medium .ar-card-top {
        height: 130px;
    }

    .ar-card-top-height-large .ar-card-top {
        height: 180px;
    }

    .ar-card-style-featured .ar-card-title {
        font-size: 22px;
    }
}

/* Editor description field */
.ar-card-meta-editor {
    width: 100%;
    min-height: 120px;
    padding: 10px 12px;
    border: 1px dashed transparent;
    border-radius: 8px;
}

.ar-card-meta-editor:focus,
.ar-card-meta-editor:focus-within {
    border-color: #90001f;
    box-shadow: 0 0 0 2px rgba(144, 0, 31, 0.16);
    outline: none;
}

.ar-card-meta-editor.is-selected,
.ar-card-meta-editor.has-focus {
    border-color: #d6d6d6;
}

.ar-card-meta-editor p {
    margin: 0 0 0.85em;
}

.ar-card-meta-editor p:last-child {
    margin-bottom: 0;
}

.ar-card-meta-editor:empty::before {
    color: #646970;
}


/* Editor description blocks */
.ar-card-description {
    position: relative;
}

.ar-card-description .block-editor-inner-blocks,
.ar-card-description .block-editor-block-list__layout {
    display: block;
    width: 100%;
}

.ar-card-description .wp-block {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* Keep the Gutenberg add-block plus available, but force it into its own row. */
.ar-card-description-appender,
.ar-card-description .block-list-appender {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    display: block;
    clear: both;
    width: 100%;
    min-height: 38px;
    margin: 14px 0 0 !important;
    padding: 0;
    z-index: 1;
}

.ar-card-description-appender .block-editor-button-block-appender,
.ar-card-description .block-editor-button-block-appender {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 38px;
    margin: 0;
    border: 1px dashed #d6d6d6;
    border-radius: 8px;
}

.ar-card-description-appender .block-editor-button-block-appender:hover,
.ar-card-description-appender .block-editor-button-block-appender:focus,
.ar-card-description .block-editor-button-block-appender:hover,
.ar-card-description .block-editor-button-block-appender:focus {
    border-color: #90001f;
    box-shadow: 0 0 0 2px rgba(144, 0, 31, 0.12);
}

.ar-card-legacy-description {
    margin-bottom: 14px;
    padding: 12px;
    border: 1px dashed #d6d6d6;
    border-radius: 8px;
    background: #fafafa;
}

.ar-card-legacy-description .components-button {
    margin-top: 10px;
}

/* Editor-only: keep the main Card Grid add-card button below the grid, not over the last row. */
.ar-card-grid-editor > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-list-appender,
.ar-card-grid-editor > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-editor-button-block-appender {
    grid-column: 1 / -1;
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 46px;
    margin: 0 !important;
    padding: 0;
    z-index: 2;
}

.ar-card-grid-editor > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-list-appender .block-editor-button-block-appender,
.ar-card-grid-editor > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-editor-button-block-appender {
    width: 100% !important;
    min-height: 46px;
    border: 1px dashed #d6d6d6;
    border-radius: 8px;
    background: #fff;
}

.ar-card-grid-editor > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-list-appender .block-editor-button-block-appender:hover,
.ar-card-grid-editor > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-list-appender .block-editor-button-block-appender:focus,
.ar-card-grid-editor > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-editor-button-block-appender:hover,
.ar-card-grid-editor > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-editor-button-block-appender:focus {
    border-color: #90001f;
    box-shadow: 0 0 0 2px rgba(144, 0, 31, 0.12);
}

/* Automatic Subpage Grid */
.ar-subpage-grid-nav {
    display: block;
}

.ar-subpage-grid {
    margin-top: 0;
    padding: 0;
    list-style: none;
}

.ar-subpage-card .ar-card-top {
    height: 128px;
    background: #f1f1f1;
}

.ar-card-top-picture {
    display: block;
    width: 100%;
    height: 100%;
}

.ar-subpage-card-default-image {
    object-position: center;
}

.ar-subpage-card .ar-card-title {
    color: #353535;
}

.ar-subpage-card-button {
    position: relative;
    z-index: 2;
}

.ar-card-screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.ar-subpage-grid-editor {
    width: 100%;
}

.ar-subpage-grid-editor-header {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #f6f7f7;
}

.ar-subpage-grid-editor-header span {
    color: #50575e;
    font-size: 13px;
}

.ar-subpage-grid-editor-preview {
    pointer-events: none;
}

.ar-subpage-grid-editor-preview .components-placeholder,
.ar-subpage-grid-empty {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 1px dashed #c3c4c7;
    border-radius: 8px;
    background: #fff;
    color: #50575e;
    text-align: center;
}

.ar-subpage-grid-empty p {
    margin: 0;
}


@media (max-width: 700px) {
    .ar-subpage-card .ar-card-top {
        height: 108px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ar-card-link-all,
    .ar-card-button {
        transition: none;
    }

    .ar-card-link-all:hover,
    .ar-card-link-all:focus {
        transform: none;
    }
}

@media (forced-colors: active) {
    .ar-card,
    .ar-card-button,
    .ar-card-button-outline,
    .ar-card-grid-editor-toolbar,
    .ar-subpage-grid-editor-header,
    .ar-subpage-grid-empty {
        border: 1px solid CanvasText;
    }

    .ar-card-link-all:focus-visible,
    .ar-card-full-link:focus-visible,
    .ar-card-button:focus-visible {
        outline: 3px solid Highlight;
    }
}
