/* E564: bridge the original laboratory card visuals to real WordPress output.
 * Activated only with the opt-in Super Site theme flag.
 */
body.p63-super-theme .super-hero-card,
body.p63-super-theme .super-secondary-card,
body.p63-super-theme .super-story-card {
    min-width: 0; padding: 0;
}
body.p63-super-theme .super-story-card {
    background: var(--surface); border: 1px solid var(--p63-line);
}
body.p63-super-theme .super-visual {
    display: block; min-width: 0; overflow: hidden;
    text-decoration: none; position: relative;
}
body.p63-super-theme .super-visual img {
    display: block; width: 100%; height: 100%;
    object-fit: cover; position: relative; z-index: 1;
}
body.p63-super-theme .super-visual.has-photo::before,
body.p63-super-theme .super-visual.has-photo::after {
    display: none;
}
body.p63-super-theme .super-hero-card .visual { min-height: 320px; }
body.p63-super-theme .super-hero-card .hero-copy h2,
body.p63-super-theme .super-hero-card .hero-copy h3 {
    margin: 12px 0;
    font-family: Georgia,serif;
    font-size: clamp(29px,3.3vw,43px);
    line-height: 1.08;
    letter-spacing: -.04em;
    color: var(--p63-ink);
}
body.p63-super-theme .super-story-card .story-body h2,
body.p63-super-theme .super-story-card .story-body h3 {
    margin: 7px 0 6px; color: var(--p63-ink);
    font-family: Georgia,serif; font-size: 19px; line-height: 1.2;
}
body.p63-super-theme .super-secondary-card .super-secondary-copy h2,
body.p63-super-theme .super-secondary-card .super-secondary-copy h3 {
    margin: 4px 0; color: var(--p63-ink);
    font-family: Georgia,serif; font-size: 16px; line-height: 1.2;
}
body.p63-super-theme .super-card--text-only.hero-main { grid-template-columns: minmax(0,1fr); }
body.p63-super-theme .super-card--text-only.home-secondary { display: block; }
body.p63-super-theme .super-secondary-card .visual { min-height: 82px; }
body.p63-super-theme .super-story-title a { color: inherit; text-decoration: none; }
body.p63-super-theme .super-story-title a:hover { text-decoration: underline; }
body.p63-super-theme .story-meta { display: flex; flex-wrap: wrap; gap: 7px; }
body.p63-super-theme .byline { display: flex; flex-wrap: wrap; gap: 8px; }
body.p63-super-theme .super-card--text-only .story-body { padding-top: 20px; }
@media (max-width: 760px) {
    body.p63-super-theme .super-hero-card { grid-template-columns: minmax(0,1fr); }
    body.p63-super-theme .super-hero-card .visual { min-height: 180px; aspect-ratio: 16/9; }
    body.p63-super-theme .super-secondary-card { grid-template-columns: 100px minmax(0,1fr); }
    body.p63-super-theme .super-secondary-card.super-card--text-only { display: block; }
}

/*
 * E567. Archive, category, search and author templates retain native WP
 * pagination and Editorial/Core records. Scope visual integration to the
 * existing WordPress body classes; never create demo routes or placeholder
 * results. Search results and empty states keep real counts and normal forms.
 */
body.p63-super-theme:is(.archive,.search) .p63-main,
body.p63-super-theme.error404 .p63-main {
    width: min(var(--max), calc(100% - 36px));
    max-width: 100%;
    min-width: 0;
    margin-inline: auto;
    padding-top: 22px;
    padding-bottom: 46px;
}
body.p63-super-theme:is(.archive,.search) .p63-commercial-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    align-items: start;
    gap: 28px;
}
body.p63-super-theme:is(.archive,.search) .p63-commercial-main,
body.p63-super-theme:is(.archive,.search) .p63-commercial-rail {
    min-width: 0;
}
body.p63-super-theme:is(.archive,.search) .p63-archive-heading {
    margin: 15px 0 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--p63-ink);
}
body.p63-super-theme:is(.archive,.search) .p63-archive-heading h1 {
    margin: 5px 0 10px;
    color: var(--p63-ink);
    font-family: Georgia, serif;
    font-size: clamp(28px,3.5vw,43px);
    line-height: 1.1;
    letter-spacing: -.035em;
}
body.p63-super-theme:is(.archive,.search) .p63-archive-description,
body.p63-super-theme:is(.archive,.search) .p63-search-intro,
body.p63-super-theme:is(.archive,.search) .p63-author-biography {
    max-width: 72ch;
    color: var(--p63-muted);
    line-height: 1.62;
}
body.p63-super-theme:is(.archive,.search) .p63-cards-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 20px;
}
body.p63-super-theme:is(.archive,.search) .p63-cards-grid .super-story-card {
    min-width: 0;
    box-shadow: 0 3px 14px rgba(18,49,61,.04);
    transition: transform .18s ease, box-shadow .18s ease;
}
body.p63-super-theme:is(.archive,.search) .p63-cards-grid .super-story-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
body.p63-super-theme:is(.archive,.search) .p63-cards-grid .super-story-card .story-body {
    padding: 15px;
}
body.p63-super-theme:is(.archive,.search) .p63-section-index {
    margin-block: 18px 28px;
    border: 1px solid var(--p63-line);
    border-radius: var(--radius);
    padding: 13px 16px;
    background: var(--surface);
}
body.p63-super-theme:is(.archive,.search) .p63-section-index-list {
    display: flex;
    gap: 9px 17px;
    flex-wrap: wrap;
    padding: 0;
    margin: 8px 0 0;
    list-style: none;
}
body.p63-super-theme:is(.archive,.search) .p63-section-index-list a {
    display: inline-flex;
    padding: 5px 7px;
    color: var(--p63-brand);
    font-size: 12px;
    font-weight: 800;
}
body.p63-super-theme:is(.archive,.search) .p63-search-summary,
body.p63-super-theme:is(.archive,.search) .p63-search-empty,
body.p63-super-theme:is(.archive,.search) .p63-empty {
    margin-block: 14px 25px;
    padding: 14px 17px;
    border: 1px solid var(--p63-line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--p63-text);
}
body.p63-super-theme.author .p63-author-heading {
    border-bottom: 2px solid var(--p63-ink);
}
body.p63-super-theme.author .p63-author-disclosure {
    margin-top: 22px;
    color: var(--p63-muted);
    font-size: 12px;
}
body.p63-super-theme.error404 .p63-not-found {
    padding: clamp(24px,5vw,60px);
    background: var(--surface);
    border: 1px solid var(--p63-line);
    border-radius: var(--radius);
}
body.p63-super-theme:is(.archive,.search) .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 24px 0;
}
body.p63-super-theme:is(.archive,.search) .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    border: 1px solid var(--p63-line);
    border-radius: 6px;
    padding: 5px 9px;
}
body.p63-super-theme:is(.archive,.search) .page-numbers.current {
    color: #fff;
    background: var(--p63-brand);
    border-color: var(--p63-brand);
}
@media (max-width: 1100px) {
    body.p63-super-theme:is(.archive,.search) .p63-commercial-layout {
        grid-template-columns: minmax(0,1fr) 260px;
        gap: 18px;
    }
    body.p63-super-theme:is(.archive,.search) .p63-cards-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}
@media (max-width: 760px) {
    body.p63-super-theme:is(.archive,.search) .p63-commercial-layout {
        grid-template-columns: minmax(0,1fr);
    }
    body.p63-super-theme:is(.archive,.search) .p63-commercial-rail {
        grid-row: auto;
    }
}
@media (max-width: 520px) {
    body.p63-super-theme:is(.archive,.search) .p63-cards-grid {
        grid-template-columns: minmax(0,1fr);
    }
    body.p63-super-theme:is(.archive,.search) .p63-archive-heading h1 {
        font-size: 27px;
    }
}
@media (prefers-reduced-motion: reduce) {
    body.p63-super-theme:is(.archive,.search) .p63-cards-grid .super-story-card {
        transition: none;
        transform: none;
    }
}
