/*
=========================================================
THE CRIMSON COURT — HUB & SESSION ARTICLE
=========================================================

The gothic-encyclopedia treatment for the two pages built around long-form
reading: the hub at /crimson-court and the session template behind
/the-story/<number>.

The shell those pages share with the rest of the court — masthead, heraldic
banner, reading surface, footer — lives in court-chrome.css and loads first.
This file only retunes what is specific to the hub's sections and the session
article. Colours come from the :root block in crimson-court.css.
*/

/*
=========================================================
HUB — SECTION RHYTHM
=========================================================
*/
.hub-section {
    padding: 38px 0;
    border-color: var(--court-line);
}

.hub-glance-section { padding-top: 20px; }

/* Gold rule down the left with a diamond at its head: the section mark. */
.hub-head {
    position: relative;
    margin-bottom: 24px;
    padding-left: 18px;
    border-left: 1px solid var(--court-border);
}

.hub-head::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 2px;
    width: 7px;
    height: 7px;
    background: var(--royal-gold);
    transform: rotate(45deg);
}

.hub-head h2 { font-size: 29px; }

.hub-lede {
    color: var(--muted);
    font-size: 19px;
}

.hub-eyebrow,
.hub-premise .hub-eyebrow {
    font-family: 'Cinzel', Georgia, serif !important;
    font-size: 12px !important;
    line-height: 1.4;
    letter-spacing: .16em !important;
    color: var(--crimson-light) !important;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hub-more {
    font: 12px 'Cinzel', Georgia, serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--royal-gold);
    border-color: var(--line);
}

.hub-more:hover { color: var(--royal-gold-light) !important; }

/*
=========================================================
HUB — THE REALM AT A GLANCE
=========================================================
*/
.hub-glance {
    grid-template-columns: 1.4fr 1fr;
    gap: 28px 44px;
}

.hub-premise {
    background: none;
    border: 0;
    padding: 0;
}

.hub-premise h2 {
    font-size: 25px;
    margin-bottom: 16px;
}

.hub-premise p {
    font: 20px/1.65 'EB Garamond', Georgia, serif;
    color: var(--ink);
}

/* The one Uncial Antiqua on the page. */
.hub-drop::first-letter {
    font-family: 'Uncial Antiqua', serif;
    font-size: 2.8rem;
    line-height: .9;
    float: left;
    padding: 6px 8px 0 0;
    color: var(--royal-gold);
}

.hub-latest {
    position: relative;
    background: var(--court-raised);
    border: 1px solid var(--line);
    border-top: 2px solid var(--royal-gold);
}

/* A pennant rather than a full-width band. */
.hub-latest-flag {
    width: max-content;
    max-width: 100%;
    padding: 13px 26px 13px 18px;
    background: var(--crimson-dark);
    color: var(--parchment);
    font: 11px 'Cinzel', Georgia, serif;
    letter-spacing: .15em;
    clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 50%, 100% 100%, 0 100%);
}

.hub-latest-img { height: 146px; }

.hub-latest-body { padding: 14px 18px 0; }

.hub-latest-meta {
    font: 11px 'Cinzel', Georgia, serif;
    letter-spacing: .12em;
    color: var(--crimson-light);
}

.hub-latest h3 { font-size: 21px; }

.hub-latest-when {
    font-size: 16px;
    color: var(--muted);
}

.hub-latest-actions { padding: 12px 18px 18px; }

.hub-btn {
    font: 12px 'Cinzel', Georgia, serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    background: var(--crimson-dark);
    color: var(--parchment);
    border: 1px solid var(--crimson-blood);
    border-radius: 2px;
}

.hub-btn:hover,
.hub-btn:focus-visible {
    background: var(--crimson-blood);
    color: var(--parchment);
}

.hub-stats {
    background: transparent !important;
    border: 0;
    border-top: 1px solid var(--court-line);
    border-bottom: 1px solid var(--court-line);
    padding: 20px 0;
    gap: 0;
}

.hub-stat { border-color: var(--line); }

.hub-stat b {
    font: 27px 'Cinzel', Georgia, serif;
    color: var(--royal-gold-light);
    text-shadow: none;
}

.hub-stat span {
    font: 11px 'Cinzel', Georgia, serif;
    letter-spacing: .12em;
    color: var(--muted);
}

/*
=========================================================
HUB — THE HEIRS
=========================================================
Each portrait sits in an arched niche; the nameplate below it carries the
heir's own colour as a top rule. Identity accents are never a section colour.
*/
.hub-heirs { gap: 20px; }

.hub-heir {
    background: none;
    border: 0;
    overflow: visible;
}

.hub-heir::after { display: none; }

.hub-heir-portrait {
    width: 100%;
    height: 218px;
    aspect-ratio: auto;
    border: 1px solid var(--court-border);
    border-bottom: 0;
    border-radius: 50% 50% 0 0 / 30% 30% 0 0;
    box-shadow: inset 0 0 0 5px var(--royal-black);
    isolation: isolate;
}

.hub-heir-portrait::after {
    content: '';
    position: absolute;
    inset: 7px;
    border: 1px solid var(--court-border);
    border-bottom: 0;
    border-radius: 50% 50% 0 0 / 30% 30% 0 0;
    pointer-events: none;
    z-index: 2;
}

.hub-heir-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.hub-heir-portrait .is-base {
    opacity: 1 !important;
    filter: none !important;
}

.hub-heir-portrait .is-silhouette { display: none; }

.hub-heir-plate {
    position: static;
    min-height: 116px;
    padding: 16px 12px;
    text-align: left;
    background: var(--court-raised);
    border: 1px solid var(--court-border);
    border-top: 2px solid var(--heir-color);
}

.hub-heir-rule { display: none !important; }

.hub-heir h3 { font-size: 16px; }

.hub-heir em {
    font-size: 16px;
    line-height: 1.4;
    margin-top: 6px;
    color: var(--heir-color);
}

.hub-heir:hover,
.hub-heir:focus-visible {
    transform: translateY(-4px);
    box-shadow: none;
}

.hub-heir:hover .hub-heir-portrait,
.hub-heir:focus-visible .hub-heir-portrait { border-color: var(--heir-color); }

/*
=========================================================
HUB — THE GREAT HOUSES
=========================================================
*/
.hub-houses {
    background: var(--court-raised) !important;
    border: 1px solid var(--line) !important;
}

.hub-house { border-color: var(--line); }

.hub-house img { filter: none; }

.hub-house h3 { font-size: 16px; }

.hub-house em {
    font-size: 16px;
    color: var(--muted);
}

.hub-house:hover,
.hub-house:focus-visible {
    background: var(--court-hover) !important;
    box-shadow: inset 0 -2px var(--house-color);
}

/*
=========================================================
HUB — THE CHRONICLE
=========================================================
*/
.hub-act-btn,
.hub-mf {
    font: 12px 'Cinzel', Georgia, serif;
    letter-spacing: .12em;
    color: var(--ink);
    background: transparent;
    border-color: var(--line);
}

.hub-act-btn[aria-pressed="true"] {
    background: var(--crimson-dark);
    color: var(--parchment);
}

.hub-act-band h3,
.hub-act-band em { color: var(--ink); }

.hub-session,
.hub-arch {
    background: var(--court-raised);
    border: 1px solid var(--line);
    box-shadow: none;
}

.hub-session h4,
.hub-arch h3 { font-size: 21px; }

.hub-session-teaser,
.hub-arch p {
    color: var(--ink);
    font-size: 19px;
}

.hub-session-when {
    color: var(--muted);
    font-size: 16px;
}

.hub-chip {
    color: var(--muted);
    border-color: var(--line);
    background: none;
    font-size: 15px;
}

.hub-session-num {
    background: var(--crimson-dark);
    color: var(--parchment);
    font: 11px 'Cinzel', Georgia, serif;
    letter-spacing: .12em;
}

/*
=========================================================
HUB — THE REALM & THE ARCHIVES
=========================================================
*/
.hub-map-caption,
.hub-map-frame {
    background: var(--court-raised);
    border-color: var(--line);
}

.hub-arch-ico { color: var(--gold); }

.hub-arch-count {
    color: var(--muted);
    font-size: 13px;
}

/*
=========================================================
SESSION ARTICLE
=========================================================
*/
.session-main {
    position: relative;
    max-width: 1000px;
    margin: 32px auto 0;
    padding: 0 !important;
    background: var(--court-surface);
    border: 1px solid var(--court-border);
    border-top: 3px double var(--royal-gold);
}

.session-main::before,
.session-main::after {
    content: '';
    position: absolute;
    top: 11px;
    width: 27px;
    height: 44px;
    border-top: 1px solid var(--court-border);
    pointer-events: none;
}

.session-main::before {
    left: 11px;
    border-left: 1px solid var(--court-border);
}

.session-main::after {
    right: 11px;
    border-right: 1px solid var(--court-border);
}

.session { padding: 30px 100px 48px; }

.session-header {
    position: relative;
    text-align: left;
    margin-bottom: 30px;
    padding-right: 84px;
    background: none;
}

/* The court's mark in an arched niche, mirroring the hub banner's crest. */
.session-header::after {
    content: '';
    position: absolute;
    right: 0;
    top: 7px;
    width: 53px;
    height: 78px;
    background: var(--royal-black) url('/assets/images/cc-icon-nb.png') center/36px auto no-repeat;
    border: 1px solid var(--court-border);
    border-radius: 50% 50% 0 0 / 28% 28% 0 0;
    box-shadow: 0 0 0 4px var(--court-surface), 0 0 0 5px var(--court-line);
    pointer-events: none;
}

.session-eyebrow {
    font: 12px 'Cinzel', Georgia, serif;
    letter-spacing: .15em;
    color: var(--oxblood);
}

.session-number {
    font: 13px 'Cinzel', Georgia, serif;
    letter-spacing: .12em;
    color: var(--muted);
    margin: 15px 0 8px;
}

.session-title {
    font-size: 43px;
    background: none;
    color: var(--royal-gold-light);
    -webkit-text-fill-color: var(--royal-gold-light);
}

.session-dates {
    font: italic 19px 'EB Garamond', Georgia, serif;
    color: var(--muted);
}

.session-rule {
    position: relative;
    width: 100%;
    margin: 30px 0 0;
    background: var(--line);
}

.session-rule::after {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    transform: translateY(-50%) rotate(45deg);
    background: var(--royal-gold);
    box-shadow: none;
}

.session-body {
    color: var(--ink);
    font: 21px/1.8 'EB Garamond', Georgia, serif;
}

.session-body > p:first-of-type::first-letter {
    font: 3.1rem/.85 'Uncial Antiqua', serif;
    color: var(--royal-gold);
    float: left;
    padding: 8px 10px 0 0;
}

.session-body a { color: var(--royal-gold); }

.session-body blockquote {
    color: var(--muted);
    border-color: var(--royal-gold);
}

.session-figure {
    background: var(--court-raised);
    border-color: var(--line);
}

.session-figure figcaption {
    color: var(--muted);
    font-size: 17px;
}

.session-meta { border-color: var(--line); }

.session-meta-title {
    font: 12px 'Cinzel', Georgia, serif;
    letter-spacing: .15em;
    color: var(--royal-gold);
}

.session-chip {
    color: var(--ink);
    border-color: var(--line);
    font: 17px 'EB Garamond', Georgia, serif;
}

/* A location chip whose tag has a pin on the realm map links to it. One
   without - an abstract tag, or a place not yet placed - stays plain text, so
   the difference is visible before you click rather than after. */
.session-chip-link {
    color: var(--royal-gold);
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.session-chip-link:hover,
.session-chip-link:focus-visible {
    background: var(--court-hover);
    border-color: var(--royal-gold);
    color: var(--royal-gold-light);
}

.session-nav-link {
    border-color: var(--line);
    background: var(--court-raised);
}

.session-nav-label {
    font: 12px 'Cinzel', Georgia, serif;
    color: var(--oxblood);
}

.session-nav-title {
    font: 19px 'Cinzel', Georgia, serif;
    color: var(--royal-gold-light);
}

.session-nav-link.is-disabled:not(a) {
    color: var(--muted);
    font: 12px 'Cinzel', Georgia, serif;
}

.session-back a,
.session-watch-link {
    font: 12px 'Cinzel', Georgia, serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--royal-gold);
}

/*
=========================================================
RESPONSIVE
=========================================================
*/
@media (max-width: 1200px) {
    .session-main { width: calc(100% - 48px); }
}

@media (max-width: 700px) {
    .session-main {
        width: calc(100% - 24px);
        margin-top: 16px;
    }

    .hub-glance {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .hub-premise p { font-size: 19px; }

    .hub-premise h2,
    .hub-head h2 { font-size: 25px; }

    .hub-head { padding-left: 14px; }

    .hub-stats {
        grid-template-columns: repeat(3, 1fr);
        row-gap: 20px;
    }

    .hub-stat { border: 0; }

    .hub-stat b { font-size: 22px; }

    .hub-heirs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .hub-heir-portrait { height: 180px; }

    .hub-heir-plate { min-height: 118px; }

    .hub-heir h3 { font-size: 14px; }

    .hub-heir em { font-size: 15px; }

    .hub-houses { grid-template-columns: repeat(2, 1fr); }

    .hub-house { border: 0; }

    .hub-chronicle,
    .hub-archives { grid-template-columns: 1fr; }

    .hub-more { white-space: normal; }

    .session { padding: 25px 24px; }

    .session-title { font-size: 33px; }

    .session-body { font-size: 20px; }

    .session-header { padding-right: 0; }

    .session-header::after { display: none; }

    .session-nav { grid-template-columns: 1fr; }
}
