/* ========================================================================
   SOMERSET CEMETERIES PROJECT - UNIFIED PAGE COMPATIBILITY
   Version: 2026-09-02b

   This stylesheet bridges the older SCP cemetery-page markup to the
   contributor-approved white-card design used by the new cemetery pages.
   It is loaded from the shared SCP header, so the older pages do not need
   to be edited one by one.
   ======================================================================== */

/* ------------------------------------------------------------------------
   TIME-LIMITED NEW BADGES
   ------------------------------------------------------------------------ */
.content-badge {
    display: none;
    align-items: center;
    margin-left: 0.42rem;
    padding: 0.18rem 0.48rem 0.16rem;
    border: 1px solid #8a5b22;
    border-radius: 0.28rem;
    background: #9b6530;
    color: #ffffff;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.04em;
    vertical-align: 0.12em;
    white-space: nowrap;
}
.content-badge.is-current { display: inline-flex; }

/* ------------------------------------------------------------------------
   EXISTING / LEGACY SCP CEMETERY PAGES

   These pages have body.scp-page plus:
     .scp-back-link
     .scp-interior-heading
     .scp-interior-logo
     .scp-interior-title-block
     .cemetery-meta
     .cemetery-document

   The SCP home page is excluded, as are the new .scp-record-page pages.
   ------------------------------------------------------------------------ */

body.scp-page:not(.scp-home-page):not(.scp-record-page) .site-main {
    width: min(calc(100% - 32px), 1120px);
    margin: 1.75rem auto 3rem;
}

body.scp-page:not(.scp-home-page):not(.scp-record-page) .scp-back-link {
    margin: 0 0 1rem;
    font-size: 0.93rem;
    font-weight: 700;
}

/* Title portion of the first white card. */
body.scp-page:not(.scp-home-page):not(.scp-record-page) .scp-interior-heading {
    display: block;
    margin: 0;
    padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2rem) 0.8rem;
    background: #ffffff;
    border: 1px solid #c7d9de;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 8px 24px rgba(35, 72, 83, 0.10);
}

/* The project logo now appears once in the shared masthead. */
body.scp-page:not(.scp-home-page):not(.scp-record-page) .scp-interior-logo {
    display: none !important;
}

body.scp-page:not(.scp-home-page):not(.scp-record-page) .scp-interior-title-block {
    min-width: 0;
}

body.scp-page:not(.scp-home-page):not(.scp-record-page) .scp-kicker {
    margin: 0 0 0.3rem;
    color: #9b6530;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.13em;
}

body.scp-page:not(.scp-home-page):not(.scp-record-page) .scp-interior-heading h1 {
    margin: 0;
    color: #244d59;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.2;
}

/* Location/detail portion visually continues the same first card. */
body.scp-page:not(.scp-home-page):not(.scp-record-page) .cemetery-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.5rem;
    margin: 0 0 1.5rem;
    padding: 0.25rem clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 1.75rem);
    background: #ffffff;
    border: 1px solid #c7d9de;
    border-top: 0;
    border-left: 1px solid #c7d9de;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 12px 24px rgba(35, 72, 83, 0.10);
}

body.scp-page:not(.scp-home-page):not(.scp-record-page) .cemetery-meta p {
    margin: 0;
    padding: 0.65rem 0.8rem;
    background: #f4fafb;
    border: 1px solid #c7d9de;
    border-radius: 7px;
}

body.scp-page:not(.scp-home-page):not(.scp-record-page) .cemetery-meta strong {
    color: #244d59;
}

/* The transcription/history itself becomes a second white card, matching
   the new pages' content-card treatment. */
body.scp-page:not(.scp-home-page):not(.scp-record-page) .cemetery-document {
    margin: 0;
    padding: clamp(1.15rem, 3vw, 1.8rem);
    background: #ffffff;
    border: 1px solid #c7d9de;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(35, 72, 83, 0.10);
}

body.scp-page:not(.scp-home-page):not(.scp-record-page) .cemetery-document > :first-child {
    margin-top: 0;
}

body.scp-page:not(.scp-home-page):not(.scp-record-page) .cemetery-document h2,
body.scp-page:not(.scp-home-page):not(.scp-record-page) .cemetery-document h3 {
    color: #244d59;
}

body.scp-page:not(.scp-home-page):not(.scp-record-page) .cemetery-document img {
    max-width: 100%;
    height: auto;
    border-radius: 7px;
}

body.scp-page:not(.scp-home-page):not(.scp-record-page) .cemetery-document blockquote {
    margin-left: 0;
    margin-right: 0;
    padding: 0.75rem 1rem;
    background: #f4fafb;
    border-left: 4px solid #376c7a;
}

/* Compatibility with any previously converted record-page markup. */
body.record-page .record-main,
.record-page .record-main {
    width: min(calc(100% - 32px), 1120px);
    margin: 1.75rem auto 3rem;
}
.record-page .record-page-header,
.record-page .transcription,
.record-page .record-content {
    padding: clamp(1.15rem, 3vw, 1.8rem);
    background: #ffffff;
    border: 1px solid #c7d9de;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(35, 72, 83, 0.10);
}
.record-page .record-page-header .record-emblem,
.record-page .record-page-header > img.record-emblem {
    display: none !important;
}

/* Footer links remain readable after visits. */
.scp-site-footer a:visited,
.scp-footer-links a:visited {
    color: inherit !important;
}

@media (max-width: 620px) {
    body.scp-page:not(.scp-home-page):not(.scp-record-page) .site-main,
    body.record-page .record-main,
    .record-page .record-main {
        width: min(calc(100% - 20px), 1120px);
    }
}
