.ra-child-pages {
    --ra-child-bg: #ffffff;
    --ra-child-surface: #ffffff;
    --ra-child-ink: #242428;
    --ra-child-muted: #60646b;
    --ra-child-border: #e3e4e7;
    --ra-child-accent: #a0272d;
    --ra-child-action: #8b1c1c;
    --ra-child-action-ink: #ffffff;
    background: var(--ra-child-bg);
    color: var(--ra-child-ink);
}

.ra-child-pages--dark {
    --ra-child-bg: #131315;
    --ra-child-surface: #1e1e21;
    --ra-child-ink: #f5f5f5;
    --ra-child-muted: #bfc1c8;
    --ra-child-border: #39393f;
    --ra-child-accent: #c62828;
}

.ra-child-pages__header {
    padding: 48px 0 32px;
}

.ra-child-pages__header h1 {
    color: var(--ra-child-ink);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 56px;
    line-height: 1.08;
    font-weight: 600;
    letter-spacing: 0;
    overflow-wrap: anywhere;
    margin: 0;
}

.ra-child-pages__rule {
    width: 64px;
    height: 3px;
    margin-top: 20px;
    background: var(--ra-child-accent);
}

.ra-child-pages__subtitle {
    max-width: 740px;
    margin-top: 20px;
    color: var(--ra-child-muted);
    font-size: 18px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.ra-child-pages__grid {
    padding-bottom: 64px;
}

.ra-child-pages__filters {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--ra-child-border);
}

.ra-child-pages__filters .form-label {
    color: var(--ra-child-ink);
    font-size: 14px;
    font-weight: 600;
}

.ra-child-pages__filters .form-control,
.ra-child-pages__filters .form-select {
    min-height: 40px;
    border-color: var(--ra-child-border);
    background-color: var(--ra-child-surface);
    color: var(--ra-child-ink);
}

.ra-child-pages__filters .form-control:focus,
.ra-child-pages__filters .form-select:focus {
    border-color: var(--ra-child-accent);
    outline: 2px solid var(--ra-child-accent);
    outline-offset: 2px;
    box-shadow: none;
}

.ra-child-pages__toolbar {
    padding-block: 20px;
}

.ra-child-pages__count {
    color: var(--ra-child-muted);
}

.ra-child-pages__search-button,
.ra-child-pages__view-button {
    --bs-btn-active-bg: var(--ra-child-action);
    --bs-btn-active-border-color: var(--ra-child-action);
    --bs-btn-active-color: var(--ra-child-action-ink);
    min-height: 40px;
    border: 1px solid var(--ra-child-border);
    border-radius: 4px;
}

.ra-child-pages__view-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    flex-shrink: 0;
    background: var(--ra-child-surface);
    color: var(--ra-child-ink);
}

.ra-child-pages__search-button,
.ra-child-pages__view-button.active {
    background: var(--ra-child-action);
    border-color: var(--ra-child-action);
    color: var(--ra-child-action-ink);
}

.ra-child-pages__search-button:hover,
.ra-child-pages__view-button:hover {
    background: var(--ra-child-ink);
    border-color: var(--ra-child-ink);
    color: var(--ra-child-surface);
}

.ra-child-pages__search-button:focus-visible,
.ra-child-pages__view-button:focus-visible,
.ra-child-pages__table-wrap:focus-visible,
.ra-child-pages__table a:focus-visible {
    outline: 3px solid var(--ra-child-accent);
    outline-offset: 3px;
}

.ra-child-pages__table-wrap {
    position: relative;
    border: 1px solid var(--ra-child-border);
    border-radius: 4px;
}

.ra-child-pages__table {
    --bs-table-bg: var(--ra-child-surface);
    --bs-table-color: var(--ra-child-ink);
    --bs-table-border-color: var(--ra-child-border);
    --bs-table-hover-bg: var(--bs-tertiary-bg);
    --bs-table-hover-color: var(--ra-child-ink);
    width: 100%;
    min-width: 800px;
    table-layout: fixed;
    font-size: 14px;
}

.ra-child-pages__image-col { width: 112px; }
.ra-child-pages__author-col { width: 21%; }
.ra-child-pages__categories-col { width: 25%; }
.ra-child-pages__action-col { width: 68px; }

.ra-child-pages__table > :not(caption) > * > * {
    padding: 16px;
    overflow-wrap: anywhere;
}

.ra-child-pages__table thead th {
    color: var(--ra-child-muted);
    font-size: 13px;
    font-weight: 600;
}

.ra-child-pages__table tbody tr:last-child > * {
    border-bottom: 0;
}

.ra-child-pages__thumbnail {
    display: block;
    width: 80px;
    height: 60px;
    object-fit: contain;
}

.ra-child-pages__table-title {
    color: var(--ra-child-ink);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.ra-child-pages__table-title:hover {
    color: var(--ra-child-accent);
}

.ra-child-pages__table-subtitle {
    margin-top: 8px;
    color: var(--ra-child-muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

.ra-child-card {
    overflow: hidden;
    min-width: 0;
    border: 1px solid var(--ra-child-border);
    border-radius: 6px;
    background: var(--ra-child-surface);
    color: var(--ra-child-ink);
    text-decoration: none;
    box-shadow: 0 4px 16px rgb(0 0 0 / 4%);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.ra-child-card__media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    flex-shrink: 0;
}

.ra-child-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .35s ease;
}

.ra-child-card__media--placeholder {
    background: #ffffff;
}

.ra-child-card__media--placeholder img {
    object-fit: contain;
    padding: 24px;
}

.ra-child-card__body {
    min-height: 100px;
    padding: 22px;
    border-top: 3px solid var(--ra-child-accent);
}

.ra-child-card__title {
    min-width: 0;
    color: var(--ra-child-ink);
    font-family: var(--heading-font, "Nunito", Arial, sans-serif);
    font-size: 23px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.ra-child-card__author,
.ra-child-card__subtitle {
    max-width: 100%;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.ra-child-card__author {
    color: var(--ra-child-accent);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.ra-child-pages--dark .ra-child-card__author,
.ra-child-pages--dark .ra-child-card__arrow {
    color: var(--ra-child-ink);
}

.ra-child-card__subtitle {
    color: var(--ra-child-muted);
    font-size: 16px;
    line-height: 1.5;
}

.ra-child-card__categories {
    min-width: 0;
}

.ra-child-card__category {
    max-width: 100%;
    padding: 3px 8px;
    border: 1px solid var(--ra-child-border);
    border-radius: 4px;
    color: var(--ra-child-ink);
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.ra-child-card__arrow {
    width: 36px;
    height: 36px;
    border: 1px solid var(--ra-child-border);
    border-radius: 50%;
    color: var(--ra-child-accent);
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.ra-child-card:hover,
.ra-child-card:focus-visible {
    border-color: var(--ra-child-accent);
    color: var(--ra-child-ink);
    box-shadow: 0 12px 28px rgb(0 0 0 / 10%);
    text-decoration: none;
}

.ra-child-card:focus-visible {
    outline: 3px solid var(--ra-child-accent);
    outline-offset: 4px;
}

.ra-child-card:hover .ra-child-card__media img {
    transform: scale(1.035);
}

.ra-child-card:hover .ra-child-card__arrow,
.ra-child-card:focus-visible .ra-child-card__arrow {
    background: var(--ra-child-action);
    border-color: var(--ra-child-action);
    color: var(--ra-child-action-ink);
}

.ra-child-pages__empty {
    padding-block: 24px;
    color: var(--ra-child-muted);
}

@media (max-width: 575.98px) {
    .ra-child-pages__header { padding-top: 32px; }
    .ra-child-pages__header h1 { font-size: 42px; }
    .ra-child-card__title { font-size: 22px; }
    .ra-child-pages__grid { padding-bottom: 40px; }
}

@media (prefers-reduced-motion: reduce) {
    .ra-child-card,
    .ra-child-card__media img,
    .ra-child-card__arrow { transition: none; }
    .ra-child-card:hover .ra-child-card__media img { transform: none; }
}
