@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@500;700&display=swap');

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    font-family: 'Cinzel', serif;
    background: #1a110a;
}

body {
    overflow-x: hidden;
}

/* ===== Full-page layout ===== */
.page {
    width: 100vw;
    min-height: 100vh;
    background-image: url('assets/main-bg.png');
    background-size: 70% auto;
    background-position: center top;
    background-repeat: no-repeat;
    background-color: #1a110a;
    position: relative;
}

/* ===== Info box grid =====
   Two flanking columns stack their own cards independently with a
   constant gap; the Republic card is dropped below the ellipse. */
.info-grid {
    position: relative;
    width: 100%;
    /* Reserve enough vertical room for columns + bc card below the ellipse. */
    min-height: calc(33vw + 26rem);
}

.info-box {
    position: relative;
    width: 100%;
    min-height: 0;
    padding: 1.2rem 1.4rem;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.62)),
        url('assets/box-bg.jpeg');
    background-size: cover;
    background-position: center;
    border: 2px solid #6b4a1c;
    border-radius: 8px;
    box-shadow:
        0 0 0 1px rgba(212, 168, 73, 0.35) inset,
        0 12px 28px rgba(0, 0, 0, 0.75),
        0 4px 10px rgba(0, 0, 0, 0.6);
    text-decoration: none;
    color: #f3e2b5;
    font-family: 'Cinzel', serif;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}



.info-box .era-num {
    position: absolute;
    bottom: 0.6rem;
    right: 0.7rem;
    width: clamp(34px, 3.4vw, 52px);
    height: clamp(34px, 3.4vw, 52px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel Decorative', serif;
    font-weight: 900;
    font-size: clamp(0.85rem, 1.2vw, 1.3rem);
    color: #2a1a08;
    background: radial-gradient(circle at 35% 30%, #fbe28a 0%, #d4a849 55%, #8a6420 100%);
    border: 2px solid #6b4a1c;
    border-radius: 50%;
    box-shadow:
        0 0 0 2px rgba(40, 25, 10, 0.85),
        0 6px 14px rgba(0, 0, 0, 0.7),
        inset 0 1px 2px rgba(255, 240, 180, 0.6),
        inset 0 -2px 3px rgba(80, 50, 15, 0.6);
    text-shadow: 0 1px 1px rgba(255, 230, 160, 0.4);
    letter-spacing: 0.02em;
    z-index: 2;
}

.info-box .era-flag {
    position: absolute;
    top: 0.7rem;
    right: 0.8rem;
    width: clamp(28px, 3.2vw, 52px);
    height: auto;
    border: 1px solid rgba(0, 0, 0, 0.6);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
    background: rgba(255, 255, 255, 0.05);
}

.info-box h2 {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 900;
    font-size: clamp(1.1rem, 1.8vw, 1.8rem);
    color: #ffe9a3;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.95),
        0 0 14px rgba(0, 0, 0, 0.8),
        0 0 2px rgba(0, 0, 0, 1);
    margin-bottom: 0.25rem;
    line-height: 1.1;
    padding-right: clamp(34px, 3.8vw, 60px);
}

.info-box .era-dates {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: clamp(0.65rem, 0.85vw, 0.9rem);
    font-weight: 700;
    color: #f0c870;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    margin-bottom: 0.55rem;
}

.info-box p {
    font-size: clamp(0.75rem, 0.95vw, 1rem);
    line-height: 1.55;
    color: #fbf2d8;
    text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.9),
        0 0 8px rgba(0, 0, 0, 0.6);
}

.info-box .era-fact {
    margin-top: 0.6rem;
    padding-top: 0.55rem;
    padding-right: clamp(40px, 4vw, 60px);
    border-top: 1px solid rgba(212, 168, 73, 0.4);
    font-size: clamp(0.68rem, 0.85vw, 0.9rem);
    font-style: italic;
    color: #ead7a0;
    line-height: 1.45;
}

/* Info eye toggle — hidden on desktop, shown on small screens */
.fact-toggle {
    display: none;
    position: absolute;
    bottom: 0.6rem;
    left: 0.7rem;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 2px solid #6b4a1c;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fbe28a 0%, #d4a849 55%, #8a6420 100%);
    color: #2a1a08;
    cursor: pointer;
    z-index: 4;
    box-shadow:
        0 0 0 2px rgba(40, 25, 10, 0.85),
        0 4px 10px rgba(0, 0, 0, 0.6),
        inset 0 1px 2px rgba(255, 240, 180, 0.6);
    outline: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fact-toggle svg {
    width: 60%;
    height: 60%;
    fill: currentColor;
    pointer-events: none;
}

.fact-toggle:hover,
.fact-toggle:focus-visible,
.fact-toggle.is-open {
    transform: scale(1.08);
    box-shadow:
        0 0 0 2px rgba(40, 25, 10, 0.85),
        0 0 14px rgba(240, 200, 112, 0.7),
        0 4px 12px rgba(0, 0, 0, 0.7),
        inset 0 1px 2px rgba(255, 240, 180, 0.7);
}

.info-box .era-fact strong {
    font-style: normal;
    font-weight: 700;
    color: #f0c870;
    letter-spacing: 0.04em;
    margin-right: 0.25em;
}

/* Two flanking columns: each stacks its cards vertically with a constant
   gap. Columns are independent — left and right rows don't have to align. */
.col {
    position: absolute;
    /* Start below the heading printed in the background image.
       The bg "History of the Castle" banner occupies roughly the
       top 12% of the image, which translates to ~6vw in the layout. */
    top: 7vw;
    width: 28%;
    display: flex;
    flex-direction: column;
    gap: clamp(0.8rem, 1.4vw, 1.4rem);
}

.col--left {
    left: 1%;
}

.col--right {
    right: 1%;
}

/* The Republic card sits just below the ellipse oval (which ends at
   roughly 33vw from the top), not below the leather frame surrounding it. */
.info-box--bc {
    position: relative;
    width: 100%;
    border-color: #f0c870;
    box-shadow:
        0 0 0 1px rgba(255, 230, 150, 0.55) inset,
        0 0 22px rgba(240, 200, 112, 0.55),
        0 0 48px rgba(240, 200, 112, 0.35),
        0 0 90px rgba(240, 200, 112, 0.18);
    animation: currentEraPulse 4s ease-in-out infinite;
}

@keyframes currentEraPulse {

    0%,
    100% {
        box-shadow:
            0 0 0 1px rgba(255, 230, 150, 0.55) inset,
            0 0 22px rgba(240, 200, 112, 0.55),
            0 0 48px rgba(240, 200, 112, 0.35),
            0 0 90px rgba(240, 200, 112, 0.18);
    }

    50% {
        box-shadow:
            0 0 0 1px rgba(255, 240, 180, 0.7) inset,
            0 0 30px rgba(240, 200, 112, 0.75),
            0 0 64px rgba(240, 200, 112, 0.5),
            0 0 120px rgba(240, 200, 112, 0.28);
    }
}

.info-box--bc h2 {
    color: #fff3c0;
}

/* The bc card and the bottom banner are stacked together so the banner
   always sits directly below the centre card and shares its width. */
.bc-stack {
    position: absolute;
    top: 27vw;
    left: 50%;
    transform: translateX(-50%);
    width: 32%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* "Join us on a tour" call-to-action sits between the bc card and the
   banner. Designed to draw the eye with a warm gold gradient and a
   gentle pulsing glow. */
.tour-cta {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    margin-top: 1.1rem;
    padding: 0.85rem 1.4rem;
    text-decoration: none;
    text-align: left;
    background: linear-gradient(180deg, #f6cd6e 0%, #d4a849 45%, #a87a28 100%);
    color: #2a1a08;
    border: 2px solid #6b4a1c;
    border-radius: 8px;
    box-shadow:
        0 0 0 1px rgba(255, 240, 180, 0.55) inset,
        0 0 18px rgba(240, 200, 112, 0.45),
        0 6px 14px rgba(0, 0, 0, 0.65);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: tourCtaPulse 2.6s ease-in-out infinite;
    z-index: 5;
}

.tour-cta::before {
    /* Soft shimmer that sweeps across the button */
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg,
            transparent 35%,
            rgba(255, 250, 220, 0.55) 50%,
            transparent 65%);
    transform: translateX(-100%);
    animation: tourCtaShimmer 3.4s ease-in-out infinite;
    pointer-events: none;
}

.tour-cta__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.tour-cta__label {
    flex: 1;
    font-family: 'Cinzel Decorative', serif;
    font-weight: 900;
    font-size: clamp(0.95rem, 1.3vw, 1.25rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.1;
    text-shadow: 0 1px 0 rgba(255, 240, 180, 0.5);
    position: relative;
    z-index: 1;
}

.tour-cta__sub {
    display: block;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: clamp(0.65rem, 0.78vw, 0.8rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #4a2f10;
    margin-top: 0.25rem;
}

.tour-cta__label,
.tour-cta__sub {
    position: relative;
    z-index: 1;
}

.tour-cta__label-wrap {
    flex: 1;
}

.tour-cta__arrow {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.4rem, 2vw, 2rem);
    font-weight: 700;
    line-height: 1;
    color: #2a1a08;
    text-shadow: 0 1px 0 rgba(255, 240, 180, 0.6);
    position: relative;
    z-index: 1;
    transition: transform 0.25s ease;
}

.tour-cta:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 0 1px rgba(255, 250, 200, 0.7) inset,
        0 0 28px rgba(240, 200, 112, 0.75),
        0 0 56px rgba(240, 200, 112, 0.4),
        0 8px 18px rgba(0, 0, 0, 0.7);
}

.tour-cta:hover .tour-cta__arrow {
    transform: translateX(4px);
}

@keyframes tourCtaPulse {

    0%,
    100% {
        box-shadow:
            0 0 0 1px rgba(255, 240, 180, 0.55) inset,
            0 0 18px rgba(240, 200, 112, 0.45),
            0 6px 14px rgba(0, 0, 0, 0.65);
    }

    50% {
        box-shadow:
            0 0 0 1px rgba(255, 248, 200, 0.7) inset,
            0 0 28px rgba(240, 200, 112, 0.75),
            0 0 50px rgba(240, 200, 112, 0.35),
            0 6px 14px rgba(0, 0, 0, 0.65);
    }
}

@keyframes tourCtaShimmer {
    0% {
        transform: translateX(-100%);
    }

    55% {
        transform: translateX(120%);
    }

    100% {
        transform: translateX(120%);
    }
}

.bottom-banner {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 1rem;
    /* Soft-fade all edges so the banner blends into the leather bg
       instead of cutting against it with a hard rectangle. */
    -webkit-mask-image: radial-gradient(ellipse 85% 70% at center, black 25%, transparent 95%);
    mask-image: radial-gradient(ellipse 85% 70% at center, black 25%, transparent 95%);
}

.info-box--bc::before {
    content: "Current Era";
    position: absolute;
    top: -0.65rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #f0c870 0%, #c89738 100%);
    color: #2a1a08;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: clamp(0.55rem, 0.7vw, 0.75rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 3px 12px;
    border: 1px solid #6b4a1c;
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    z-index: 3;
}


/* ===== Responsive: collapse "Did you know" into an eye-icon tooltip
   below 1000px so cards stay compact while keeping the poster layout. */
@media (max-width: 1400px) {
    .fact-toggle {
        display: inline-flex;
    }

    .info-box .era-fact {
        position: absolute;
        left: 0.6rem;
        right: 0.6rem;
        bottom: calc(34px + 1rem);
        z-index: 12;
        margin: 0;
        padding: 0.85rem 1rem;
        padding-right: 1rem;
        border: 2px solid #6b4a1c;
        border-radius: 8px;
        background-image:
            linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.9)),
            url('assets/box-bg.jpeg');
        background-size: cover;
        background-position: center;
        box-shadow:
            0 0 0 1px rgba(212, 168, 73, 0.45) inset,
            0 12px 28px rgba(0, 0, 0, 0.85),
            0 0 18px rgba(240, 200, 112, 0.25);
        opacity: 0;
        pointer-events: none;
        transform: translateY(6px);
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .fact-toggle:hover+.era-fact,
    .fact-toggle:focus-visible+.era-fact,
    .fact-toggle.is-open+.era-fact {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Reserve room at the bottom of the card for the eye row */
    .info-box {
        padding-bottom: calc(34px + 1.2rem);
    }
}

/* ===== Title ===== */
.title {
    position: absolute;
    top: 3%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    font-size: clamp(1rem, 2.2vw, 2.6rem);
    color: #d4a849;
    text-shadow:
        0 0 12px rgba(212, 168, 73, 0.35),
        0 2px 4px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    z-index: 10;
    user-select: none;
}

/* ===== Detail page styles ===== */
.detail-page {
    width: 100vw;
    height: 100vh;
    background-image: url('../assets/table-mountain-back.png');
    background-size: cover;
    background-position: center top;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-card {
    position: relative;
    width: 70%;
    max-width: 800px;
    max-height: 80vh;
    background: rgba(25, 15, 5, 0.88);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(160, 120, 40, 0.5);
    border-radius: 12px;
    padding: 3rem 3.5rem;
    box-shadow:
        0 0 0 4px rgba(40, 25, 10, 0.6),
        0 16px 48px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(212, 168, 73, 0.1);
    overflow-y: auto;
}

.detail-card h1 {
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(1.4rem, 2.5vw, 2.4rem);
    color: #d4a849;
    text-shadow: 0 0 10px rgba(212, 168, 73, 0.3);
    margin-bottom: 0.5rem;
    letter-spacing: 0.12em;
}

.detail-card .subtitle {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    color: #a08050;
    margin-bottom: 2rem;
    letter-spacing: 0.06em;
}

.detail-card .divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4a849, transparent);
    margin: 0 0 1.5rem 0;
}

.detail-card p {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.8rem, 1vw, 1rem);
    color: #c8b898;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.back-link {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    font-family: 'Cinzel', serif;
    font-size: clamp(0.7rem, 0.9vw, 0.9rem);
    color: #a08050;
    text-decoration: none;
    letter-spacing: 0.08em;
    padding: 6px 16px;
    border: 1px solid rgba(160, 120, 40, 0.3);
    border-radius: 4px;
    background: rgba(30, 18, 8, 0.7);
    transition: all 0.3s ease;
    z-index: 20;
}

.back-link:hover {
    color: #d4a849;
    border-color: rgba(212, 168, 73, 0.6);
    background: rgba(40, 25, 12, 0.9);
}

/* ===== Shared site header (used on inner pages) ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(180deg, rgba(20, 12, 5, 0.96) 0%, rgba(20, 12, 5, 0.85) 100%);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(212, 168, 73, 0.4);
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.7);
    padding: 0.9rem clamp(0.8rem, 3vw, 2.5rem);
}

.site-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

.site-header__title {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 900;
    font-size: clamp(1.1rem, 2.2vw, 1.7rem);
    color: #d4a849;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    text-shadow:
        0 0 14px rgba(212, 168, 73, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.7);
    transition: color 0.25s ease;
    text-align: center;
}

.site-header__title:hover {
    color: #ffe9a3;
}

.site-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem 0.55rem;
}

.site-nav--chapters {
    margin-top: 0.55rem;
}

.site-nav--chapters a {
    font-size: clamp(0.65rem, 0.78vw, 0.8rem);
    padding: 0.32rem 0.7rem;
    color: #a08050;
    background: rgba(30, 18, 8, 0.4);
    border-color: rgba(160, 120, 40, 0.25);
}

/* Dropdown ("The Story" menu) */
.site-nav .has-dropdown {
    position: relative;
}

.dropdown-caret {
    display: inline-block;
    margin-left: 0.3em;
    font-size: 0.8em;
    transition: transform 0.2s ease;
}

.has-dropdown:hover .dropdown-caret,
.has-dropdown:focus-within .dropdown-caret {
    transform: rotate(-180deg);
}

.site-nav__dropdown {
    list-style: none;
    margin: 0;
    padding: 0.4rem;
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    min-width: 11rem;
    background: linear-gradient(180deg, rgba(28, 18, 8, 0.98) 0%, rgba(20, 12, 5, 0.98) 100%);
    border: 1px solid rgba(160, 120, 40, 0.5);
    border-radius: 6px;
    box-shadow:
        0 0 0 1px rgba(212, 168, 73, 0.25) inset,
        0 14px 28px rgba(0, 0, 0, 0.7),
        0 4px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 100;
}

/* Invisible bridge so cursor moving from trigger to dropdown doesn't lose hover */
.site-nav__dropdown::before {
    content: "";
    position: absolute;
    top: -0.6rem;
    left: 0;
    right: 0;
    height: 0.7rem;
}

.has-dropdown:hover .site-nav__dropdown,
.has-dropdown:focus-within .site-nav__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.site-nav__dropdown li {
    list-style: none;
}

.site-nav__dropdown a {
    display: block;
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    padding: 0.4rem 0.85rem;
    text-align: left;
    font-size: clamp(0.7rem, 0.85vw, 0.88rem);
}

.site-nav__dropdown a:hover {
    color: #ffe9a3;
    border-color: rgba(212, 168, 73, 0.55);
    background: rgba(50, 30, 12, 0.7);
    box-shadow: none;
}

.site-nav__dropdown .is-active a {
    color: #2a1a08;
    background: linear-gradient(180deg, #f6cd6e 0%, #d4a849 100%);
    border-color: #6b4a1c;
    box-shadow:
        0 0 0 1px rgba(255, 240, 180, 0.55) inset,
        0 0 14px rgba(240, 200, 112, 0.45);
}

.site-nav a {
    display: inline-block;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: clamp(0.7rem, 0.85vw, 0.88rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #c8a868;
    text-decoration: none;
    padding: 0.42rem 0.85rem;
    border: 1px solid rgba(160, 120, 40, 0.35);
    border-radius: 4px;
    background: rgba(30, 18, 8, 0.55);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.site-nav a:hover {
    color: #ffe9a3;
    border-color: rgba(212, 168, 73, 0.75);
    background: rgba(50, 30, 12, 0.75);
    box-shadow: 0 0 12px rgba(212, 168, 73, 0.3);
}

.site-nav > li.is-active > a,
.site-nav__dropdown > li.is-active > a {
    color: #2a1a08;
    background: linear-gradient(180deg, #f6cd6e 0%, #d4a849 100%);
    border-color: #6b4a1c;
    box-shadow:
        0 0 0 1px rgba(255, 240, 180, 0.55) inset,
        0 0 14px rgba(240, 200, 112, 0.45);
}

/* ===== "Castle at a Glance" page ===== */
.glance-grid {
    max-width: 1100px;
    margin: 0 auto 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.1rem;
}

.glance-card {
    padding: 1.4rem 1.3rem;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
        url('../assets/box-bg.jpeg');
    background-size: cover;
    background-position: center;
    border: 2px solid #6b4a1c;
    border-radius: 8px;
    box-shadow:
        0 0 0 1px rgba(212, 168, 73, 0.35) inset,
        0 10px 22px rgba(0, 0, 0, 0.65),
        0 3px 8px rgba(0, 0, 0, 0.5);
    color: #f3e2b5;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: center;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.glance-card:hover {
    transform: translateY(-3px);
    border-color: #d4a849;
    box-shadow:
        0 0 0 1px rgba(240, 208, 96, 0.55) inset,
        0 14px 28px rgba(0, 0, 0, 0.8),
        0 0 22px rgba(212, 168, 73, 0.25);
}

.glance-card__label {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: clamp(0.7rem, 0.85vw, 0.85rem);
    color: #d4a849;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    margin-bottom: 0.6rem;
}

.glance-card__value {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 900;
    font-size: clamp(1.05rem, 1.4vw, 1.4rem);
    color: #ffe9a3;
    line-height: 1.15;
    letter-spacing: 0.04em;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.9),
        0 0 12px rgba(0, 0, 0, 0.7);
    margin-bottom: 0.5rem;
}

.glance-card__big {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 900;
    font-size: clamp(2.6rem, 4.2vw, 3.8rem);
    color: #ffe9a3;
    line-height: 1;
    text-shadow:
        0 3px 6px rgba(0, 0, 0, 0.95),
        0 0 22px rgba(240, 200, 112, 0.35);
    margin: 0.35rem 0 0.55rem;
}

.glance-card__unit {
    font-size: 0.45em;
    font-weight: 700;
    color: #f0c870;
    margin-left: 0.15em;
    vertical-align: super;
    letter-spacing: 0;
}

.glance-card__sub {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.75rem, 0.9vw, 0.92rem);
    color: #ead7a0;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.glance-card__sub em {
    color: #ead7a0;
    font-style: italic;
}

/* The labelled map figure */
.castle-map {
    max-width: 1000px;
    margin: 0 auto 2.5rem;
}

.castle-map__figure {
    margin: 0 auto;
    max-width: 100%;
    background: linear-gradient(180deg, #f5ede0 0%, #ebdfca 100%);
    transform: rotate(-0.4deg);
}

.castle-map__figure img {
    width: 100%;
    height: auto;
}

/* The legend */
.castle-legend {
    max-width: 1000px;
    margin: 0 auto 2rem;
    padding: 2rem clamp(1.4rem, 2.5vw, 2.4rem);
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url('../assets/box-bg.jpeg');
    background-size: cover;
    background-position: center;
    border: 2px solid #6b4a1c;
    border-radius: 10px;
    box-shadow:
        0 0 0 1px rgba(212, 168, 73, 0.35) inset,
        0 14px 32px rgba(0, 0, 0, 0.75);
    color: #f3e2b5;
}

.castle-legend__title {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 900;
    font-size: clamp(1.3rem, 2vw, 1.9rem);
    color: #ffe9a3;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.95),
        0 0 14px rgba(0, 0, 0, 0.8);
    margin-bottom: 1.4rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(212, 168, 73, 0.4);
}

.castle-legend__list {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 3;
    column-gap: 1.8rem;
}

.castle-legend__list li {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.78rem, 0.92vw, 0.95rem);
    color: #fbf2d8;
    line-height: 1.5;
    padding: 0.32rem 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    break-inside: avoid;
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
}

.castle-legend__list li em {
    color: #ead7a0;
    font-style: italic;
    font-size: 0.92em;
}

.castle-legend__num {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.9rem;
    height: 1.9rem;
    padding: 0 0.4rem;
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    font-size: 0.8em;
    color: #2a1a08;
    background: radial-gradient(circle at 35% 30%, #fbe28a 0%, #d4a849 55%, #8a6420 100%);
    border: 1.5px solid #6b4a1c;
    border-radius: 50%;
    box-shadow:
        0 0 0 1px rgba(40, 25, 10, 0.7),
        0 2px 4px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 240, 180, 0.5);
}

@media (max-width: 900px) {
    .castle-legend__list { columns: 2; }
}

@media (max-width: 560px) {
    .castle-legend__list { columns: 1; }
}

/* ===== Download CTA at the bottom of the Reflection page ===== */
.download-cta {
    display: inline-flex;
    align-items: center;
    gap: 1.1rem;
    margin: 2.5rem auto 0;
    padding: 1.1rem 1.8rem;
    text-decoration: none;
    background: linear-gradient(180deg, #f6cd6e 0%, #d4a849 45%, #a87a28 100%);
    color: #2a1a08;
    border: 2px solid #6b4a1c;
    border-radius: 10px;
    box-shadow:
        0 0 0 1px rgba(255, 240, 180, 0.55) inset,
        0 0 22px rgba(240, 200, 112, 0.5),
        0 8px 20px rgba(0, 0, 0, 0.7);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: downloadCtaPulse 2.8s ease-in-out infinite;
}

@keyframes downloadCtaPulse {
    0%, 100% {
        box-shadow:
            0 0 0 1px rgba(255, 240, 180, 0.55) inset,
            0 0 22px rgba(240, 200, 112, 0.5),
            0 8px 20px rgba(0, 0, 0, 0.7);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(255, 248, 200, 0.7) inset,
            0 0 32px rgba(240, 200, 112, 0.8),
            0 0 60px rgba(240, 200, 112, 0.4),
            0 8px 20px rgba(0, 0, 0, 0.7);
    }
}

.download-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        100deg,
        transparent 35%,
        rgba(255, 250, 220, 0.55) 50%,
        transparent 65%
    );
    transform: translateX(-100%);
    animation: downloadCtaShimmer 3.6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes downloadCtaShimmer {
    0%   { transform: translateX(-100%); }
    55%  { transform: translateX(120%); }
    100% { transform: translateX(120%); }
}

.download-cta:hover {
    transform: translateY(-3px);
    box-shadow:
        0 0 0 1px rgba(255, 250, 200, 0.7) inset,
        0 0 36px rgba(240, 200, 112, 0.85),
        0 0 72px rgba(240, 200, 112, 0.45),
        0 12px 26px rgba(0, 0, 0, 0.8);
}

.download-cta__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(40, 25, 10, 0.18);
    border: 1px solid rgba(60, 40, 20, 0.35);
    color: #2a1a08;
    position: relative;
    z-index: 1;
}

.download-cta__text {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.download-cta__title {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 900;
    font-size: clamp(1.1rem, 1.5vw, 1.5rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.1;
    text-shadow: 0 1px 0 rgba(255, 240, 180, 0.5);
}

.download-cta__sub {
    display: block;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: clamp(0.7rem, 0.82vw, 0.85rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #4a2f10;
    margin-top: 0.3rem;
}

.download-cta__arrow {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 2vw, 2.1rem);
    line-height: 1;
    color: #2a1a08;
    text-shadow: 0 1px 0 rgba(255, 240, 180, 0.6);
    position: relative;
    z-index: 1;
    transition: transform 0.25s ease;
}

.download-cta:hover .download-cta__arrow {
    transform: translateX(4px);
}

/* Center the download button under the page-end italic block */
.page-end {
    text-align: center;
}

.page-end .download-cta {
    display: inline-flex;
}

/* ===== Chapter timeline (top of each chapter page) ===== */
.chapter-timeline {
    max-width: 720px;
    margin: 0 auto 2.5rem;
    padding: 0 0.5rem;
}

.chapter-timeline ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
}

.chapter-timeline li {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.chapter-timeline a {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(28px, 3vw, 36px);
    height: clamp(28px, 3vw, 36px);
    border-radius: 50%;
    background: rgba(40, 28, 14, 0.85);
    border: 2px solid rgba(212, 168, 73, 0.55);
    color: #8a7a55;
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    font-size: clamp(0.78rem, 1vw, 0.95rem);
    text-decoration: none;
    line-height: 1;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.chapter-timeline a:hover {
    color: #ffe9a3;
    border-color: rgba(255, 233, 163, 0.8);
    background: rgba(60, 40, 18, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 16px rgba(212, 168, 73, 0.35);
}

.chapter-timeline li.is-current a {
    color: #2a1a08;
    background: linear-gradient(180deg, #f6cd6e 0%, #d4a849 100%);
    border-color: #f0c870;
    box-shadow:
        0 0 0 3px rgba(40, 25, 10, 0.5),
        0 0 0 5px rgba(240, 200, 112, 0.6),
        0 0 24px rgba(240, 200, 112, 0.5);
    transform: scale(1.08);
}

.chapter-timeline li.chapter-timeline__line {
    flex: 1 1 0;
    height: 2px;
    background: rgba(160, 120, 40, 0.4);
    min-width: 1rem;
    margin: 0;
    transition: background 0.2s ease;
}

.chapter-timeline__line.is-past,
.chapter-timeline__line.is-current {
    background: rgba(212, 168, 73, 0.85);
    box-shadow: 0 0 8px rgba(240, 200, 112, 0.45);
}

/* ===== Chapter pager (bottom of each chapter page) ===== */
.chapter-pager {
    max-width: 880px;
    margin: 2.5rem auto 1rem;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 1rem;
    flex-wrap: wrap;
}

.chapter-pager a {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 220px;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.4rem;
    text-decoration: none;
    color: #f3e2b5;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
        url('../assets/box-bg.jpeg');
    background-size: cover;
    background-position: center;
    border: 2px solid #6b4a1c;
    border-radius: 8px;
    box-shadow:
        0 0 0 1px rgba(212, 168, 73, 0.3) inset,
        0 6px 14px rgba(0, 0, 0, 0.6);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.chapter-pager a:hover {
    transform: translateY(-2px);
    border-color: #d4a849;
    box-shadow:
        0 0 0 1px rgba(240, 208, 96, 0.55) inset,
        0 10px 22px rgba(0, 0, 0, 0.7),
        0 0 18px rgba(212, 168, 73, 0.25);
}

.chapter-pager__label {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.7rem, 0.85vw, 0.85rem);
    font-weight: 700;
    color: #d4a849;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    margin-bottom: 0.25rem;
}

.chapter-pager__title {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 900;
    font-size: clamp(0.95rem, 1.2vw, 1.2rem);
    color: #ffe9a3;
    letter-spacing: 0.06em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
    line-height: 1.15;
}

.chapter-pager__prev .chapter-pager__label::before {
    content: "\2039";
    margin-right: 0.4em;
    font-size: 1.2em;
}

.chapter-pager__next {
    text-align: right;
    margin-left: auto;
}

.chapter-pager__next .chapter-pager__label::after {
    content: "\203A";
    margin-left: 0.4em;
    font-size: 1.2em;
}

/* When only one button (chapter 1 or 6), keep it on its natural side */
.chapter-pager--first {
    justify-content: flex-end;
}

.chapter-pager--last {
    justify-content: flex-start;
}

/* ===== The 5 R's page ===== */
.inner-page {
    width: 100%;
    min-height: 100vh;
    background-image: url('assets/page-bg-semi.jpeg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #1a110a;
    position: relative;
    padding: 2.5rem clamp(1rem, 5vw, 4rem) 3rem;
}

.inner-page::before {
    /* Subtle dark wash so text reads cleanly without hiding the bg texture */
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(15, 10, 5, 0.18) 0%,
            rgba(15, 10, 5, 0.28) 100%);
    pointer-events: none;
    z-index: 0;
}

.inner-page>* {
    position: relative;
    z-index: 1;
}

.page-intro {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 3rem;
}

.page-eyebrow {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.7rem, 0.9vw, 0.95rem);
    font-weight: 700;
    color: #d4a849;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.page-intro h1 {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 900;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    color: #ffe9a3;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.95),
        0 0 18px rgba(240, 200, 112, 0.35);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.page-lead {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.85rem, 1.05vw, 1.05rem);
    color: #f0e0b5;
    line-height: 1.7;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.page-lead strong {
    color: #f0c870;
    font-weight: 700;
}

.page-lead em {
    color: #ead7a0;
    font-style: italic;
}

/* Each R card mirrors the visual language of the era cards */
.content-card {
    max-width: 880px;
    margin: 0 auto 2rem;
    padding: 2rem clamp(1.5rem, 3vw, 2.5rem);
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.62)),
        url('assets/box-bg.jpeg');
    background-size: cover;
    background-position: center;
    border: 2px solid #6b4a1c;
    border-radius: 10px;
    box-shadow:
        0 0 0 1px rgba(212, 168, 73, 0.35) inset,
        0 14px 32px rgba(0, 0, 0, 0.75),
        0 4px 10px rgba(0, 0, 0, 0.6);
    color: #f3e2b5;
    position: relative;
}

.content-card__num {
    position: absolute;
    top: -1rem;
    left: -1rem;
    width: clamp(40px, 4vw, 56px);
    height: clamp(40px, 4vw, 56px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel Decorative', serif;
    font-weight: 900;
    font-size: clamp(0.95rem, 1.3vw, 1.4rem);
    color: #2a1a08;
    background: radial-gradient(circle at 35% 30%, #fbe28a 0%, #d4a849 55%, #8a6420 100%);
    border: 2px solid #6b4a1c;
    border-radius: 50%;
    box-shadow:
        0 0 0 2px rgba(40, 25, 10, 0.85),
        0 6px 14px rgba(0, 0, 0, 0.7),
        inset 0 1px 2px rgba(255, 240, 180, 0.6),
        inset 0 -2px 3px rgba(80, 50, 15, 0.6);
}

.content-card header {
    margin-bottom: 1.2rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(212, 168, 73, 0.4);
}

.content-card h2 {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 900;
    font-size: clamp(1.3rem, 2.2vw, 2rem);
    color: #ffe9a3;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.95),
        0 0 14px rgba(0, 0, 0, 0.8);
    margin-bottom: 0.4rem;
    line-height: 1.1;
}

.content-card__tagline {
    font-family: 'Cinzel', serif;
    font-style: italic;
    font-size: clamp(0.8rem, 1vw, 1rem);
    color: #f0c870;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    margin: 0;
}

.content-card p {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.85rem, 1vw, 1rem);
    color: #fbf2d8;
    line-height: 1.75;
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.content-card p:last-child {
    margin-bottom: 0;
}

.content-card p strong {
    color: #f0c870;
    font-weight: 700;
}

.content-card p em {
    color: #ead7a0;
    font-style: italic;
}

.page-end {
    max-width: 820px;
    margin: 3rem auto 0;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(212, 168, 73, 0.3);
}

.page-end p {
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(0.95rem, 1.3vw, 1.25rem);
    color: #f0c870;
    line-height: 1.8;
    letter-spacing: 0.04em;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.9),
        0 0 14px rgba(240, 200, 112, 0.25);
    margin-bottom: 2rem;
}

/* Source list used on the Sources page */
.source-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.source-list li {
    padding: 0.85rem 0;
    border-bottom: 1px dashed rgba(212, 168, 73, 0.3);
}

.source-list li:last-child {
    border-bottom: none;
}

.source-list__title {
    display: block;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: clamp(0.88rem, 1.05vw, 1.05rem);
    color: #f0c870;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    margin-bottom: 0.2rem;
}

.source-list__sub {
    display: block;
    font-family: 'Cinzel', serif;
    font-style: italic;
    font-size: clamp(0.78rem, 0.92vw, 0.92rem);
    color: #ead7a0;
    line-height: 1.5;
    margin-bottom: 0.25rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.source-list__link {
    display: inline-block;
    font-family: 'Cinzel', serif;
    font-size: clamp(0.78rem, 0.9vw, 0.9rem);
    color: #c8a868;
    text-decoration: none;
    letter-spacing: 0.04em;
    word-break: break-all;
    border-bottom: 1px dotted rgba(200, 168, 104, 0.5);
    padding-bottom: 1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.source-list__link:hover {
    color: #ffe9a3;
    border-bottom-color: rgba(255, 233, 163, 0.85);
}

/* Bullet list used in the Reflection page */
.reflection-list {
    margin: 0.6rem 0 1rem 1.6rem;
    padding: 0;
    list-style: disc;
}

.reflection-list li {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.85rem, 1vw, 1rem);
    color: #fbf2d8;
    line-height: 1.75;
    margin-bottom: 0.35rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.reflection-list li::marker {
    color: #f0c870;
}

/* "Human Story" post-it note cards — breaking away from the main typography
   to mark them visually as extras stuck onto the page rather than part of the
   primary narrative. */
.content-card--note {
    background-image: none;
    background: linear-gradient(135deg, #fff5b8 0%, #ffe27a 100%);
    color: #2a1a08;
    border: 1px solid rgba(150, 110, 30, 0.35);
    border-radius: 4px;
    box-shadow:
        0 16px 32px rgba(0, 0, 0, 0.6),
        0 4px 10px rgba(0, 0, 0, 0.35),
        inset 0 -10px 18px rgba(180, 130, 30, 0.16),
        inset 0 1px 0 rgba(255, 255, 230, 0.7);
    transform: rotate(-9deg);
    transition: transform 0.35s ease;
    padding: 1.6rem 1.4rem 1.4rem;
    margin: 4rem auto;
    width: 75%;
    max-width: 660px;
    position: relative;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.content-card--note + .content-card--note,
.inner-page .content-card--note:nth-of-type(even) {
    transform: rotate(11deg);
}

.content-card--note:hover {
    transform: rotate(0deg) translateY(-2px);
}

/* Bit of tape across the top, mimicking a sticky note pinned in place */
.content-card--note::before {
    content: "";
    position: absolute;
    top: -0.7rem;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: clamp(80px, 14%, 140px);
    height: 1.4rem;
    background: linear-gradient(180deg, rgba(255, 250, 230, 0.65) 0%, rgba(220, 200, 150, 0.55) 100%);
    border: 1px solid rgba(150, 110, 30, 0.18);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-radius: 1px;
}

.content-card--note > header {
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed rgba(120, 80, 20, 0.3);
}

.content-card--note h2 {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 700;
    font-size: clamp(1rem, 1.5vw, 1.35rem);
    color: #3a2510;
    letter-spacing: 0;
    text-transform: none;
    text-shadow: none;
    line-height: 1.25;
    padding-right: 0;
    margin-bottom: 0.25rem;
}

.content-card--note .content-card__tagline {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-style: italic;
    font-size: clamp(0.78rem, 0.92vw, 0.95rem);
    color: #6b4a1c;
    letter-spacing: 0;
    text-shadow: none;
    margin: 0;
}

.content-card--note p {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-style: italic;
    font-size: clamp(0.88rem, 1.02vw, 1.02rem);
    line-height: 1.65;
    color: #2a1a08;
    text-shadow: none;
    margin-bottom: 0.85rem;
}

/* Words already in <em> within the note read better non-italic so they
   stand out against the italicised body text. */
.content-card--note p em {
    font-style: normal;
    color: #5a3818;
}

.content-card--note p:last-child {
    margin-bottom: 0;
}

.content-card--note p strong {
    color: #4a2f10;
}

.content-card--note p em {
    color: #5a3818;
}

/* Polaroid frames inside a post-it note fill the body of the note, sitting
   beneath the text rather than floating beside it. */
.content-card--note .content-card__figure {
    background: rgba(255, 255, 255, 0.7);
    transform: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    margin: 1rem auto 0;
    max-width: 100%;
    width: 100%;
    padding: 0.5rem 0.5rem 0.3rem;
}

.content-card--note .content-card__figure img {
    width: 100%;
    max-width: 100%;
}

.content-card--note .content-card__figure figcaption {
    margin-top: 0.5rem;
    font-size: clamp(1.17rem, 1.35vw, 1.43rem);
    color: #3a2510;
}

.content-card--note .content-card__figure:hover {
    transform: translateY(-2px);
}

/* Polaroid-style framed images inside content cards */
.content-card__figure {
    margin: 1.5rem auto 0.8rem;
    max-width: 90%;
    background: linear-gradient(180deg, #f5ede0 0%, #ebdfca 100%);
    padding: 0.9rem 0.9rem 0.4rem;
    border-radius: 3px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 12px 28px rgba(0, 0, 0, 0.7),
        0 4px 10px rgba(0, 0, 0, 0.5);
    text-align: center;
    transform: rotate(-0.4deg);
    transition: transform 0.3s ease;
}

.content-card__figure:nth-of-type(even) {
    transform: rotate(0.5deg);
}

.content-card__figure:hover {
    transform: rotate(0deg) translateY(-3px);
}

.content-card__figure img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    border: 1px solid rgba(60, 40, 20, 0.25);
    box-shadow:
        inset 0 0 14px rgba(0, 0, 0, 0.18),
        0 1px 2px rgba(0, 0, 0, 0.25);
}

.content-card__figure figcaption {
    margin-top: 0.85rem;
    padding: 0.2rem 0.4rem 0.45rem;
    font-family: 'Dancing Script', 'Cinzel', cursive;
    font-weight: 700;
    font-style: normal;
    font-size: clamp(1.15rem, 1.5vw, 1.55rem);
    color: #2c4a6b;
    text-shadow: none;
    letter-spacing: 0;
    line-height: 1.2;
}

.content-card__figure--pair {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
    background: none;
    box-shadow: none;
    padding: 0;
    transform: none;
    max-width: 100%;
}

.content-card__figure--pair:hover {
    transform: none;
}

.content-card__figure--portrait img {
    max-width: 320px;
}

/* Flag images for each FLAG section in Chapter 6 — uniform width so they
   read as a consistent era-label below each section. */
.content-card__figure--flag {
    width: 440px;
    max-width: 90%;
}

.content-card__figure--flag img {
    width: 100%;
    height: auto;
    display: block;
}

/* Table within content cards (used in Chapter 4 for the bastion roster) */
.bastion-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    font-family: 'Cinzel', serif;
    font-size: clamp(0.78rem, 0.92vw, 0.95rem);
    color: #fbf2d8;
}

.bastion-table th,
.bastion-table td {
    text-align: left;
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid rgba(212, 168, 73, 0.25);
    vertical-align: top;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.bastion-table th {
    color: #f0c870;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: clamp(0.7rem, 0.82vw, 0.85rem);
    border-bottom: 1px solid rgba(212, 168, 73, 0.5);
}

.bastion-table tbody tr:last-child td {
    border-bottom: none;
}

.bastion-table tbody tr:nth-child(even) td {
    background: rgba(40, 25, 10, 0.35);
}

.back-link--inline {
    position: relative;
    top: auto;
    left: auto;
    display: inline-block;
}