/* Lore Archive: the block under a deck page's banner, as wide as the sections below it.
   Title, quote and intro on the left; the story, roster or art trail (lore-reel.js) on
   the right. A page without one has its text on the right instead.

   <section class="lore-archive mb-12">
     <div class="lore-archive-card" style="--lore-accent: #06b6d4">
       <div class="lore-archive-side">
         <h2>Lore Archive</h2>
         <p class="lore-archive-quote">"…"</p>                                  with a reel only
         <div class="lore-archive-intro" data-pcs-scope="lore-trail">…</div>    roster or trail intro
       </div>
       <div class="lore-archive-note"><p>…</p></div>                            optional: longer text, below both columns
       <div class="lore-reel" …>…</div>   or   <div class="lore-archive-text"><p class="lore-archive-quote">…</p></div>
       <div class="lore-archive-more">…</div>                                   optional: side stories, videos
     </div>
   </section>

   --lore-accent colours the title. --lore-bg and --lore-ink recolour the card (Toon, Melffy). */

.lore-archive {
    max-width: 75rem;
    margin-left: auto;
    margin-right: auto;
}

.lore-archive-card {
    --lore-accent: #a3a3a3;
    --lore-bg: rgba(17, 17, 17, .8);
    --lore-ink: #e7e5e4;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    padding: 2rem;
    border-radius: .75rem;
    background: var(--lore-bg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .4);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: var(--lore-ink);
}

.lore-archive h2 {
    margin: 0;
    padding: 0;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.01em;
    text-align: left;
    text-transform: none;
    color: var(--lore-accent);
}

/* "Lore Archive: The Covenant of the Four Sages" */
.lore-archive-sub {
    display: block;
    margin-top: .5rem;
    font-size: 1.0625rem;
    line-height: 1.35;
    letter-spacing: 0;
    color: var(--lore-ink);
}

.lore-archive-quote {
    font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.6;
    color: var(--lore-ink);
}

.lore-archive-quote + .lore-archive-quote {
    margin-top: 1rem;
}

.lore-archive-quote cite,
.lore-archive-source {
    display: block;
    margin-top: .625rem;
    font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
    font-size: .8125rem;
    font-style: normal;
    line-height: 1.6;
    color: var(--lore-ink);
    opacity: .75;
}

.lore-archive-side .lore-archive-quote {
    margin-top: 1.125rem;
    font-size: 1.125rem;
}

.lore-archive-body {
    margin-top: 1.125rem;
    font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
    font-size: .9375rem;
    line-height: 1.65;
    color: var(--lore-ink);
}

/* Text the edit tool has wrapped (page-sections.js): its links take the gap */
.lore-archive-side > .cms-section {
    margin-top: .875rem;
}

.lore-archive-side .pcs-content > div > :first-child {
    margin-top: .25rem;
}

.lore-archive-intro {
    margin-top: 1.125rem;
    font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
    font-size: .9375rem;
    line-height: 1.65;
    color: var(--lore-ink);
    opacity: .85;
}

.lore-archive-intro .lore-roster-intro {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.lore-archive-note {
    line-height: 1.65;
    color: var(--lore-ink);
}

.lore-archive-note > p + p {
    margin-top: .75rem;
}

.lore-archive-card > .lore-reel {
    margin-top: 0;
    padding-top: 0;
    font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
    color: #d1d5db;
}

.lore-archive .pcs-tool-toolbar {
    margin-bottom: .5rem;
}

@media (min-width: 1024px) {
    .lore-archive-card {
        grid-template-columns: 18rem minmax(0, 1fr);
        gap: 2.25rem 2.5rem;
        padding: 2.25rem;
        align-items: start;
    }

    .lore-archive-card > .lore-reel {
        grid-area: 1 / 2;
    }

    .lore-archive-note,
    .lore-archive-more {
        grid-column: 1 / -1;
    }

    /* A story's Who's who, moved under both columns by lore-reel.js */
    .lore-archive-card > .lore-reel-cast {
        grid-column: 1 / -1;
        margin-top: -.5rem;
        padding-top: 1.25rem;
    }
}

/* Phones: lore-reel.js folds the quote behind an Epigraph chip beside the title, and
   page-sections.js clamps a quote-only archive to three lines. */
@media (max-width: 639px) {
    .lore-archive-card {
        gap: .5rem;
    }

    .lore-archive.lore-archive h2 {
        margin: 0 !important;
        font-size: 1.1875rem !important;
        line-height: 1.2 !important;
    }

    .lore-archive-sub {
        margin-top: .2rem;
        font-size: .8125rem;
    }

    .lore-archive .lore-reel-epigraph-item {
        padding: 0;
        border: 0;
    }

    .lore-archive .lore-reel-epigraph-btn {
        border-color: color-mix(in srgb, var(--lore-ink) 25%, transparent);
        color: var(--lore-ink);
    }

    .lore-archive-side > .lore-archive-intro {
        margin-top: .25rem;
        font-size: .86rem;
        line-height: 1.5;
    }
}
