.mxn-page-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    gap: 12px;
    margin: 1.25rem 0;
}

.mxn-page-list.mxn-one-column {
    grid-template-columns: minmax(0, 1fr);
}

.mxn-page-list.mxn-two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 700px) {
    .mxn-page-list.mxn-two-columns {
        grid-template-columns: minmax(0, 1fr);
    }
}

.mxn-page-list > .mxn-card {
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: var(--color-api-card-background);
    transition: background-color .15s ease;
}

.mxn-page-list > .mxn-card:hover {
    background: color-mix(in srgb, var(--color-control-hover) 40%, var(--color-api-card-background));
}

.mxn-page-list > .mxn-card > p {
    margin: 0;
    height: 100%;
}

.mxn-page-list .mxn-card-link {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    grid-template-rows: min-content 1fr;
    column-gap: 14px;
    height: 100%;
    padding: 16px;
    color: var(--color-text);
    text-decoration: none;
}

.mxn-page-list .mxn-card-link:hover {
    color: var(--color-text);
}

.mxn-page-list .mxn-card-link:focus-visible {
    outline: 2px solid var(--color-link) !important;
    outline-offset: -2px;
}

.mxn-page-list .mxn-card-icon {
    grid-column: 1;
    grid-row: 1 / span 2;
    font-size: 2rem;
    line-height: 1.2;
    color: var(--color-link);
}

.mxn-page-list .mxn-card-link strong {
    grid-column: 2;
    color: var(--color-link);
}

.mxn-page-list .mxn-card-description {
    grid-column: 2;
    display: block;
    margin-top: 0.35rem;
    color: var(--color-text-muted);
}

/* Expandable plugin hook cards, see mxn_hook_table.js */

/* Docutils containers also get Bootstrap's .container padding and max-width, which must not apply here. */
.mxn-hook-list.container,
.mxn-hook-list .container {
    width: auto;
    max-width: none;
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
}

.mxn-hook-list {
    margin: 1.25rem 0;
}

.mxn-hook-list .mxn-hook-columns,
.mxn-hook-list .mxn-hook-header {
    display: grid;
    grid-template-columns: 13rem minmax(0, 1fr) 6rem 1.25rem;
    align-items: center;
    column-gap: 0.75rem;
    padding: 0 1rem;
}

.mxn-hook-header {
    min-height: 2.75rem;
}

.mxn-hook-list .mxn-hook-columns {
    padding-bottom: 0.4rem;
    border: 1px solid transparent;
    color: var(--color-text-muted);
    font-size: var(--font-size-small, 0.85rem);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.mxn-hook-columns > p,
.mxn-hook-header > p,
.mxn-hook-links > p {
    margin: 0;
}

.mxn-hook-group {
    margin: 1.25rem 0 0.5rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-size: 0.8em;
    letter-spacing: 0.03em;
}

.mxn-card.mxn-hook {
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.mxn-hook-header > p:first-child {
    font-weight: 600;
}

.mxn-hook-header > p:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mxn-hook-ready .mxn-hook-header {
    cursor: pointer;
}

.mxn-hook-ready .mxn-hook-header:hover {
    background-color: color-mix(in srgb, var(--color-control-hover) 40%, var(--color-api-card-background));
}

.mxn-hook-ready .mxn-hook-header:focus-visible {
    outline: 2px solid var(--color-link) !important;
    outline-offset: -2px;
}

.mxn-hook-count {
    color: var(--color-text-muted);
    font-size: var(--font-size-small, 0.85rem);
    text-align: right;
    white-space: nowrap;
}

.mxn-hook-chevron {
    color: var(--color-text-muted);
    transition: transform .15s;
}

.mxn-hook-header[aria-expanded="false"] .mxn-hook-chevron {
    transform: rotate(-90deg);
}

.mxn-hook-list .mxn-hook-body {
    padding: 0.75rem 1rem 1rem;
    border-top: 1px solid var(--color-border);
    background-color: var(--color-api-card-background);
    font-size: 0.9rem;
}

.mxn-hook-body[hidden] {
    display: none;
}

/* Two stacked columns: label (like col-2) and value (like col-10). */
.mxn-hook-links {
    display: grid;
    grid-template-columns: 8rem minmax(0, 1fr);
    gap: 0.35rem 0.75rem;
}

.mxn-hook-label {
    color: var(--color-text-muted);
}

.mxn-hook-body > table.docutils {
    width: 100%;
    table-layout: fixed;
    margin: 0.75rem 0 0;
}

.mxn-hook-body > table.docutils th:first-child,
.mxn-hook-body > table.docutils td:first-child {
    width: 38%;
}

.mxn-hook-body > p:last-child {
    margin-bottom: 0;
}

@media (max-width: 700px) {
    .mxn-hook-list .mxn-hook-columns {
        display: none;
    }

    .mxn-hook-list .mxn-hook-header {
        grid-template-columns: minmax(0, 1fr) 1.25rem;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .mxn-hook-header > p,
    .mxn-hook-count {
        grid-column: 1;
        text-align: left;
    }

    .mxn-hook-header > p:nth-child(2) {
        white-space: normal;
    }

    .mxn-hook-chevron {
        grid-column: 2;
        grid-row: 1;
    }

    .mxn-hook-links {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }
}