/*v2.09 2025-07-25T18:00:00Z*/

/*=============================================
=            IMPORTS & VARIABLES              =
=============================================*/

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Cinzel:wght@400..900&family=Great+Vibes&family=IM+Fell+English+SC&family=IM+Fell+English:ital@0;1&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    /* ── COLOR PALETTE ─────────────── */

    /* Main */
    --bright-gold: #F6CB75;
    --ancient-gold: #D4B55A;
    --pale-copper: #C99C5E;
    --pale-beige: #C6BCA9;
    --burnt-copper: #A07C44;
    --deep-charcoal: #161718;
    --brown-charcoal: #3D2E23;
    --accent: #8255b6;
    --rust-red: #8A3C30;
    --faded-jade: #7E9E85;
    --warm-stone: #6B6B61;
    --off-white: #F0F0F0;
    --text-muted: #bbbbbb;
    --dark-paper: #938663;
    --light-brown: #916339;

    /* Backgrounds */
    --background-site: #1e1e1e;
    --background-dark-1: #1e1e1e;
    --background-dark-2: #292929;
    --background-dark-3: #3b3b3b;

    /* Hovers */
    --hover-light-1: rgba(255, 255, 255, 0.1);

    /* Stances */
    --aggressive: #8B3A3A;
    --defensive: #4A5E6A;
    --evasive: #667054;
    --inquisitive: #B89B4B;
    --balanced: #5E7A78;
    --mystic: #735A84;

    /* RGB Color Conversions */
    --bright-gold-rgb: 246, 203, 117;
    --ancient-gold-rgb: 212, 181, 90;
    --pale-copper-rgb: 201, 156, 94;
    --pale-beige-rgb: 198, 188, 169;
    --burnt-copper-rgb: 160, 124, 68;
    --deep-charcoal-rgb: 22, 23, 24;
    --brown-charcoal-rgb: 61, 46, 35;
    --rust-red-rgb: 138, 60, 48;
    --faded-jade-rgb: 126, 158, 133;
    --warm-stone-rgb: 107, 107, 97;
    --off-white-rgb: 240, 240, 240;
    --dark-paper-rgb: 147, 134, 99;

    --background-site-rgb: 30, 30, 30;
    --background-dark-1-rgb: 30, 30, 30;
    --background-dark-2-rgb: 41, 41, 41;
    --background-dark-3-rgb: 59, 59, 59;

    /* ── FONTS ─────────────── */
    --font-default: 'Arial';
    --font-main: 'Montserrat', sans-serif;
    --font-special: 'Georgia', serif;
    --font-handwritten: 'Great Vibes', cursive;
    --font-title: 'Cinzel Decorative', serif;
    --font-antique: 'IM Fell English', serif;
}

/*=============================================
=                    MAIN                     =
=============================================*/

/* ── PAGE LAYOUTS ─────────── */

*,
*::before,
*::after {
    box-sizing: border-box;
}

.central-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;

    margin-left: auto;
    margin-right: auto;
    max-width: 800px;
    padding: 0 2rem;
}

.full-width {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;

    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

.dual-column {
    display: grid;
    grid-template-columns: minmax(0px, 200px) minmax(200px, 1000px) 400px;
    gap: 10px;

    justify-content: center;
    margin: 0 auto;
    width: 100%;
    padding: 5rem 0;
}

.left-column {
    grid-column: 2;
    width: 100%;
}

.right-column {
    position: sticky;
    right: 2rem;
    top: 5rem;
    align-self: start;
    height: calc(100vh - 5rem);
    overflow-y: auto;
    grid-column: 3;

    /* Scrollbar custom */
    scrollbar-width: thin;
    scrollbar-color: var(--ancient-gold, #D4B55A) transparent;
}

/* Scrollbar WebKit */
.right-column::-webkit-scrollbar {
    width: 8px;
}

.right-column::-webkit-scrollbar-track {
    background: #eee;
    border-radius: 4px;
}

.right-column::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 4px;
    border: 2px solid #eee;
}

.right-column::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

@media (max-width: 900px) {
    .dual-column {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: relative;
        margin-left: auto;
        margin-right: auto;
        max-width: 800px;
        padding: 2rem 2rem 0 2rem;
    }

    .left-column,
    .right-column {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        grid-column: auto;
        position: static;
        top: auto;
        height: auto;
        overflow: visible;
    }

    /* .right-column {
    display: none;
  } */
}

/* ── GENERAL ─────────────── */
/* Preload */
html.preload body {
    opacity: 0;
    transition: opacity 0.5s ease;
}

html:not(.preload) body {
    opacity: 1;
    transition: opacity 0.5s ease;
}

body.fade-out {
    opacity: 0 !important;
    transition: opacity 0.5s ease !important;
}

#main-content.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Cursors */

html,
body {
    cursor: url('/assets/cursor/cursor_24.png') 4 1, auto;
}

a,
button,
.button,
.clickable {
    cursor: url('/assets/cursor/cursor_pointer_24.png') 9 4, pointer;
}

input[type="text"],
textarea,
[contenteditable="true"] {
    cursor: url('/assets/cursor/cursor_text_24.png') 2 24, text;
}

.disabled,
[disabled],
[aria-disabled="true"],
.not-allowed {
    cursor: url('/assets/cursor/cursor_not-allowed_24.png') 4 1, not-allowed;
}

.loading {
    cursor: url('/assets/cursor/cursor_loading_24.png') 12 12, progress;
}

.waiting {
    cursor: url('/assets/cursor/cursor_loading_24.png') 12 12, wait;
}

.draggable {
    cursor: url('/assets/cursor/cursor_grab_24.png') 6 8, grab;
}

.draggable:active {
    cursor: url('/assets/cursor/cursor_grabbing_24.png') 6 8, grabbing;
}

p,
h1,
h2,
h3,
blockquote {
    cursor: url('/assets/cursor/cursor_text-2_24.png') 12 12, text;
}

/* Core */

html,
body {
    font-family: var(--font-default);
    margin: 0;
    padding: 0;
    height: auto;
    background-color: var(--background-site, #1E1E1E);
    color: var(--off-white);
    scrollbar-width: none;
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
}

body {
    position: relative;
    z-index: 0;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('/assets/images/banners/home-page.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.03;
    pointer-events: none;
    z-index: -1;
}

body.clean::before {
    content: none;
}

body.fade-out {
    opacity: 0;
}

@media (max-width: 767px) {

    html,
    body {
        overflow-x: hidden;
    }
}

p {
    line-height: 1.6;
    font-family: var(--font-main);
    font-weight: 400;
    color: var(--off-white);
    font-size: .9rem;
}

.container {
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.page {
    flex: 1;
    width: 100%;
    min-width: 0;
}

.page>div {
    min-width: 0;
}

.page-infobox {
    padding: 25px 10px 0 10px;
    margin: 0 auto;
}

.page-columns {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 80%;
    gap: 20px;
    padding: 1rem 2vw;
    box-sizing: border-box;
    margin: 0 auto;
}

/* Spacers */
.spacer.small {
    margin: 1rem 0;
}

.spacer.small-medium {
    margin: 2rem 0;
}

.spacer.medium {
    margin: 3rem 0;
}

.spacer.medium-large {
    margin: 4rem 0;
}

.spacer.large {
    margin: 5rem 0;
}

[id^="section"] {
    scroll-margin-top: 80px;
}

[id="section1"] {
    scroll-margin-top: 999px;
}

.section-wrapper[id^="section"] {
    margin-top: 6rem;
}

.section-wrapper[id="section1"] {
    margin-top: 4rem;
}

/* ── LISTS ─────────────── */

ul,
ol {
    padding-left: 25px;
    margin-top: 0;
}

ul {
    list-style-type: disc;
    margin-left: 20px;
    padding-left: 0;
    margin-top: 0;
    margin-bottom: 0;
}

li {
    position: relative;
    margin-bottom: 8px;
    line-height: 1.8;
    font-family: var(--font-main);
    font-weight: 400;
    color: var(--off-white);
    font-size: 0.9rem;
}

/* ── LINKS ─────────────── */

a:link {
    color: var(--ancient-gold);
    font-weight: normal;
}

a:visited {
    color: var(--burnt-copper);
}

a:hover {
    color: var(--bright-gold);
}

a:active {
    color: var(--pale-copper);
}

/* ── NAVBAR ─────────────── */

.main-navbar {
    display: flex;
    top: 0;
    left: 0;
    right: 0;
    justify-content: space-between;
    align-items: center;
    background-color: var(--background-dark-1, #1E1E1E);
    padding: .1rem 20vh 0rem 10%;
    font-family: var(--font-main, sans-serif);
    position: fixed;
    height: 60px;
    z-index: 9;
    opacity: 1 !important;
    border-bottom: 1px solid var(--ancient-gold, #D4B55A)
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.navbar-logo {
    padding: 1rem;
}

.navbar-logo img {
    vertical-align: middle;
}

.navbar-links {
    list-style: none;
    display: flex;
    gap: .2rem;
    margin: 0;
    padding: 0;
}

.navbar-links a {
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
    text-transform: uppercase;
    padding: 1rem 1rem;
    background: transparent;
    font-size: .8em;
}

.navbar-links li {
    margin-bottom: 0;
}

.navbar-links a:hover {
    color: var(--accent-color, var(--bright-gold, #F6CB75));
    background-color: var(--hover-light-1);
}

.nav-link.active {
    color: var(--ancient-gold, #D4B55A);
    background-color: rgba(255, 215, 0, 0.05);
    font-weight: bold;
}

.navbar-toggle {
    display: none;
    background: none;
    color: white;
    font-size: 1.8rem;
    border: none;
    cursor: pointer;
}

.navbar-links-mobile {
    display: none;
}

/* MOBILE STYLES */
@media (max-width: 768px) {
    .navbar-toggle {
        position: fixed;
        display: block;
        z-index: 8;
        bottom: 2rem;
        right: 2rem;
        background: linear-gradient(to right, rgba(var(--burnt-copper-rgb), 0.3), rgba(var(--ancient-gold-rgb), 0.5));
        height: 55px;
        width: 60px;
        border-radius: 0.6rem;
        box-shadow: 0 0 10px rgba(246, 203, 117, 0.4);
        backdrop-filter: blur(4px);
        color: var(--ancient-gold);
        font-size: 2.5rem;
        line-height: 1;
    }

    .main-navbar {
        display: none;
    }

    .navbar-links-mobile {
        position: fixed;
        inset: 0;
        display: flex;
        pointer-events: none;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        background: rgba(30, 30, 30, 0.9);
        backdrop-filter: blur(0px);
        opacity: 0;
        transition:
            opacity .4s ease,
            backdrop-filter 0.4s ease;
        z-index: 10;
        position: fixed;
        overflow: hidden;
        padding: 3rem;
    }

    .navbar-links-mobile::before {
        content: "";
        position: absolute;
        inset: 0;
        background: url("/assets/icons/svg/alchemy-5.svg") no-repeat center/100%;
        opacity: 0;
        transition:
            opacity 0.4s ease,
            transform 0.4s ease;
        pointer-events: none;
        transform: rotate(0deg) scale(1);
        margin-top: 5rem;
    }

    .navbar-links-mobile ul {
        list-style: none;
        padding: 0;
        margin: 0;
        text-align: left;
        width: 100%;
    }

    .navbar-links-mobile li {
        padding: 0.3rem 0;
        opacity: 0;
        transform: translateY(0);
        animation: none;
        animation-delay: 0s;
        border-bottom: 1px solid var(--background-dark-3);
        line-height: 1;
        margin: 1.5rem 0;
    }

    .navbar-links-mobile a {
        font-size: 1.3rem;
        color: var(--ancient-gold, #D4B55A);
        text-decoration: none;
        font-weight: 500;
        letter-spacing: 1px;
        transition: color 0.3s, transform 0.2s;
        text-transform: uppercase;
    }

    .navbar-links-mobile a:hover {
        color: var(--bright-gold, #F6CB75);
        transform: scale(1.05);
    }

    .navbar-links-mobile.fade-out {
        opacity: 0;
        animation: fadeOutBackground 0.4s forwards;
        backdrop-filter: blur(0px);
        pointer-events: none;
        transform: translateY(-100%);
    }

    .navbar-links-mobile.fade-out::before {
        opacity: 0;
        transform: rotate(25deg) scale(1.4);
    }

    .navbar-close {
        position: absolute;
        bottom: 1rem;
        right: 2rem;
        font-size: 4.5rem;
        background: none;
        border: none;
        color: var(--rust-red, #AA3B3B);
        cursor: pointer;
        transition: color 0.3s, transform 0.2s;
        z-index: 10;
    }

    .navbar-close:hover {
        color: #ff5555;
        transform: rotate(90deg);
    }

    .navbar-close.rotated {
        transform: rotate(90deg);
    }

    .navbar-links-mobile.show {
        transform: translateY(0);
        opacity: 1;
        animation: slideIn 0.4s forwards;
        backdrop-filter: blur(8px);
        pointer-events: auto;
    }

    .navbar-links-mobile.show::before {
        opacity: 0.05;
        transform: rotate(30deg) scale(1.5);
    }

    .navbar-links-mobile.show li:nth-child(1) {
        animation-delay: 0.3s;
    }

    .navbar-links-mobile.show li:nth-child(2) {
        animation-delay: 0.4s;
    }

    .navbar-links-mobile.show li:nth-child(3) {
        animation-delay: 0.5s;
    }

    .navbar-links-mobile.show li:nth-child(4) {
        animation-delay: 0.6s;
    }

    .navbar-links-mobile.show li:nth-child(5) {
        animation-delay: 0.7s;
    }

    .navbar-links-mobile.show li:nth-child(6) {
        animation-delay: 0.8s;
    }

    .navbar-links-mobile.show li:nth-child(7) {
        animation-delay: 0.9s;
    }

    .navbar-links-mobile.show li:nth-child(8) {
        animation-delay: 1s;
    }

    .navbar-links-mobile.show li:nth-child(9) {
        animation-delay: 1.1s;
    }
}

/* ── FOOTER ─────────────── */

.site-footer {
    border-top: 1px solid var(--ancient-gold);
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--text-light);
}

.site-footer a {
    color: var(--ancient-gold);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* ── BANNERS ─────────────── */

.banner-parallax,
.banner-parallax-secondary {
    position: relative;
    height: 500px;
    /* Mask */
    background-size: cover;
    background-position: center bottom;
    background-attachment: fixed;
    /* Parallax */
    background-repeat: no-repeat;
    width: 100%;
}

.banner-parallax {
    height: 650px;
}

.banner-parallax {
    margin-top: 70px;
}

@media (max-width: 767px) {
    .banner-parallax {
        height: 100dvh;
        background-position: left;
        margin-top: 30px;
    }

    .banner-parallax-secondary {
        height: 50dvh;
        background-position: left;
    }
}

.banner-mask {
    position: relative;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Overlay */
    color: white;
    text-align: center;
    padding: 1rem;
}

.banner-mask .border-top,
.banner-mask .border-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--burnt-copper), var(--ancient-gold));
    z-index: 1;
    pointer-events: none;
}

.banner-mask .border-top {
    top: calc(50% - 150px);
}

.banner-mask .border-bottom {
    bottom: calc(50% - 150px);
}

@media (max-width: 767px) {

    .banner-mask .border-top,
    .banner-mask .border-bottom {
        display: none;
    }
}

@media (max-width: 767px) {
    .banner-mask {
        height: 100dvh;
        display: flex;
        flex-direction: column;
        z-index: 7;
        background-color: rgba(0, 0, 0, 0);
    }
}

.banner-mask::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 300px;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 0;
    pointer-events: none;
}

@media (max-width: 767px) {
    .banner-mask::before {
        display: none;
    }

    .site-title-wrapper::before {
        content: '';
        position: absolute;
        left: 0;
        width: 100%;
        height: 320px;
        background: linear-gradient(to bottom,
                rgba(0, 0, 0, 0) 0%,
                rgba(0, 0, 0, 0.8) 30%,
                rgba(0, 0, 0, 0.8) 70%,
                rgba(0, 0, 0, 0) 100%);
        z-index: 0;
        pointer-events: none;
        margin-bottom: .2rem;
    }
}

/* Stains */
.banner-stain-top,
.banner-stain-bottom {
    background-image: url('../assets/images/banners/banner-stain.svg');
    background-repeat: repeat-x;
    background-size: cover;
    height: 70px;
    width: 100%;
    position: absolute;
    left: 0;
    pointer-events: none;
    z-index: 2;
}

.banner-stain-top {
    top: 0;
    transform: rotate(180deg);
}

.banner-stain-bottom {
    bottom: 0;
    transform: rotate(0deg);
}

@media (max-width: 767px) {
    .banner-stain-top {
        top: -10px;
    }

    .banner-stain-bottom {
        bottom: -2px;
    }
}

/* Seeker Logo */
.logo-container {
    height: clamp(150px, calc(10vh + 30vw), 550px);
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 16px rgba(0, 0, 0, 0.2));
    margin-bottom: 3rem;
    z-index: 9;
}

@media (max-width: 767px) {
    .logo-container {
        z-index: 0;
        height: clamp(350px, 30vh + 10vw, 450px);
        filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 16px rgba(0, 0, 0, 0.2));
        margin: -10vh 0 2rem;
    }
}

.logo-container img.logo {
    height: 110%;
    object-fit: cover;
}

/* ── CAROUSEL ─────────────── */

.feature-carousel-section {
    padding: 2rem 1rem;
    background-color: var(--background);
    position: relative;
}

.carousel-title {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.carousel-wrapper {
    position: relative;
    overflow: visible;
    max-width: 1400px;
    padding: 0 50px;

}

@media (max-width: 767px) {
    .carousel-wrapper {
        max-width: 100vw;
        box-sizing: content-box;
    }
}

.carousel-track {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: auto;
    padding: 1rem 2rem;
    scrollbar-width: none;
    cursor: url('/assets/cursor/cursor_grab_24.png') 12 12, grab;
}

.carousel-track.active {
    cursor: url('/assets/cursor/cursor_grabbing_24.png') 12 12, grabbing;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.feature-card-wrapper {
    border-radius: 1rem;
    padding: 2px;
    background: linear-gradient(to right, var(--burnt-copper), var(--ancient-gold));
    display: inline-block;
}

.feature-card {
    display: flex;
    position: relative;
    flex: 0 0 250px;
    height: 350px;
    width: 250px;
    border-radius: 1rem;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    transition: transform 0.3s ease;
    justify-content: flex-end;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
}

.card-content {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.9) 30%, transparent 100%);
    background-color: rgba(0, 0, 0, 0);
    color: white;
    transition: background 0.4s ease-in-out;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.feature-card:hover .card-content {
    background-color: rgba(0, 0, 0, 0.8);
}

.card-content h3 {
    font-size: 1.5rem;
    font-family: var(--font-antique);
    color: var(--ancient-gold, #D4B55A);
    text-align: center;
    margin-bottom: 0.25rem;
    cursor: url('/assets/cursor/cursor_grab_24.png') 12 12, grab;
}

.card-description.short {
    font-size: 0.9rem;
    text-align: center;
    padding: 0 1rem;
    cursor: url('/assets/cursor/cursor_grab_24.png') 12 12, grab;
}

.card-description.full {
    opacity: 0;
    visibility: hidden;
    position: relative;
    padding: 1.5rem 1.75rem;
    min-height: 175px;
    font-size: 0.9rem;
    text-align: center;
    z-index: 1;
    box-sizing: border-box;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: url('/assets/cursor/cursor_grab_24.png') 12 12, grab;
}

.feature-card:hover .card-description.full {
    opacity: 1;
    visibility: visible;
    cursor: url('/assets/cursor/cursor_grab_24.png') 12 12, grab;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    background: black;
    border: none;
    color: var(--ancient-gold);
    cursor: pointer;
    padding: 0.6rem;
    z-index: 2;
    border-radius: 0.5rem;
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.carousel-arrow:hover {
    color: var(--bright-gold);
}

.carousel-arrow.left {
    left: 0;
}

.carousel-arrow.right {
    right: 0;
}

.carousel-wrapper:hover .carousel-arrow {
    opacity: 1;
    pointer-events: auto;
}

.carousel-arrow.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ── SIDENAV ─────────────── */

.sidenav-wrapper {
    position: relative;
}

.sidenav-toggle-btn {
    position: fixed;
    top: 25%;
    left: 5px;
    z-index: 1001;
    background: var(--background-dark-2);
    color: #fff;
    border: none;
    font-size: 1.2em;
    border-radius: 10px;
    border: 2px solid var(--ancient-gold);
    transform: translate(0, 0);
    height: 3rem;
    width: 3rem;
}

.sidenav-toggle-btn:hover {
    font-size: 1.5rem;
    background: var(--background-dark-3);
}

.sidenav:not(.collapsed) + .sidenav-toggle-btn {
  left: 10px;
}

.sidenav-toggle-btn.animate-open {
  animation: sidenavOpen 0.6s ease forwards;
}

.sidenav-toggle-btn.animate-close {
  animation: sidenavClose 0.6s ease forwards;
}

@keyframes sidenavOpen {
  0% {
    transform: translate(0, 0);
  }
  /* 60% {
    transform: translate(370px, 0);
  } */
  100% {
    transform: translate(370px, 0);
  }
}

@keyframes sidenavClose {
  0% {
    transform: translate(370px, 0);
  }
  /* 60% {
    transform: translate(0, 80px);
  } */
  100% {
    transform: translate(0, 0);
  }
}

.sidenav {
    position: fixed;
    top: 50%;
    left: 0;
    width: 400px;
    background-color: #1f1f1fdd;
    color: #f0f0f0;
    padding: 1rem 1rem 1rem 3rem;
    overflow-y: auto;
    transition: transform 0.4s ease;
    z-index: 1000;
    backdrop-filter: blur(4px);
    border-radius: 0 1rem 1rem 0;
    transform: translateX(0) translateY(-50%);
    border-right: 2px solid var(--ancient-gold);
    border-left: none;
    min-height: 70vh;
}

.sidenav.collapsed {
    transform: translateX(-95%) translateY(-50%);
    padding-right: 2rem;
}

.sidenav-content h3 {
    margin-top: 1rem;
    font-size: 1.1em;
    border-bottom: 1px solid #555;
    padding-bottom: 0.3rem;
    color: #ddd;
}

.sidenav-content ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}

.sidenav-content li {
    margin: 0.4rem 0;
}

.sidenav-content a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    padding: .5rem;
}

.sidenav-content a:hover {
    color: #fff;
}

.sidenav-content a.active {
    color: #fff;
    border-left: 3px solid #fff;
    padding-left: 0.5rem;
    line-height: 2;
}

#sidenav-content a.active {
    color: var(--ancient-gold);
}

#chapter-sections a.active {
    font-weight: bold;
    border-left: 3px solid var(--ancient-gold, #D4B55A);
    background-color: rgba(255, 255, 255, 0.05);
    padding-left: 1rem;
}

#chapter-sections li.subsection a {
    font-size: 0.9em;
    color: var(--light-gray);
    padding-left: 1.5em;
    border-left: 2px solid var(--ancient-gold);
    margin-top: 0.25em;
    display: block;
}

/* ── GRID MENU ─────────────── */

.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    background: transparent;
}

@media (max-width: 767px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.menu-cell {
    position: relative;
    display: flex;
    min-height: 200px;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 3.5rem 1rem 0;
    background-color: var(--background-dark-2);
    border-top: 5px solid var(--ancient-gold);
    border-bottom: 5px solid var(--ancient-gold);
    border-radius: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    color: white;
    transition:
        background-color 0.3s ease,
        border-color 0.3s ease;
    user-select: none;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, .2));
    box-sizing: content-box;
}

@media (max-width: 767px) {
    .menu-cell {
        min-height: 240px;
    }
}

.menu-cell:hover,
.menu-cell:focus-visible {
    background-color: var(--background-dark-3);
    outline: none;
}

.menu-cell .symbol {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    opacity: 0.25;
    transition:
        opacity 0.3s ease-in-out,
        transform 0.3s ease-in-out;
    pointer-events: none;
    user-select: none;
}

.menu-cell:hover .symbol,
.menu-cell:focus-visible .symbol {
    opacity: 1;
}

.menu-cell:hover .symbol {
    transform: translateX(-50%) scale(1.1);
}

.menu-cell .text-content {
    text-align: center;
    z-index: 1;
    width: 100%;
}

.menu-cell h4 {
    font-size: .9rem;
    font-weight: bold;
    text-transform: uppercase;
    margin: 5rem 0 0.25rem 0;
    user-select: text;
}

.menu-cell p {
    font-size: 0.875rem;
    margin: 0;
    user-select: text;
    opacity: 0.85;
}

.menu-2-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    background: transparent;
}

.menu-2-cell {
    position: relative;
    display: flex;
    min-height: 200px;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 3.5rem 1rem 0;
    border-radius: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    color: white;
    transition:
        background-color 0.3s ease,
        border-color 0.3s ease;
    user-select: none;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, .2))
}

.menu-2-cell:hover,
.menu-2-cell:focus-visible {
    outline: none;
}

.menu-2-cell .symbol {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    opacity: 0.25;
    transition:
        opacity 0.3s ease-in-out,
        transform 0.3s ease-in-out;
    pointer-events: none;
    user-select: none;
}

.menu-2-cell:hover .symbol,
.menu-2-cell:focus-visible .symbol {
    opacity: 1;
}

.menu-2-cell:hover .symbol {
    transform: translateX(-50%) scale(1.1);
}

.menu-2-cell .text-content {
    text-align: center;
    z-index: 1;
    width: 100%;
}

.menu-2-cell h4 {
    font-size: .9rem;
    font-weight: bold;
    text-transform: uppercase;
    margin: 5rem 0 0.25rem 0;
    user-select: text;
}

.menu-2-cell p {
    font-size: 0.875rem;
    margin: 0;
    user-select: text;
    opacity: 0.85;
}

/* ── VSC EDITING ─────────────── */

html[data-env="vsc-mobile"] {
    background-color: rgba(48, 48, 48, 1);
    overflow: scroll !important;
    max-width: 390px;
    width: 390px;
    border: 1px dashed blue;
}

body::-webkit-scrollbar {
    display: none;
    width: 0px;
    background: transparent;
}

/*=============================================
=                  HEADINGS                   =
=============================================*/

h1 {
    padding: 10px 10px 8px 12px;
}

h2 {
    background-color: var(--warm-stone);
    padding: 10px 10px 8px 12px;
    margin: 40px 0px 20px 0px;
    border-radius: 10px;
    font-size: 2.5em;
    text-transform: uppercase;
    font-variant: small-caps;
    font-family: var(--font-main);
    color: var(--off-white);
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

h3 {
    border-bottom: 1px solid var(--ancient-gold);
    padding-bottom: 5px;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 28px;
    font-family: var(--font-main);
    color: var(--off-white);
    font-weight: 500;
}

h3.tagged {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

h4 {
    padding-bottom: 2px;
    margin-bottom: 10px;
    margin-top: 20px;
    font-size: 22px;
    font-family: var(--font-main);
    color: var(--ancient-gold);
    font-weight: 500;
}

.title {
    text-align: center;
    font-family: var(--font-antique);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title .title-container {
    width: clamp(250px, calc(10vh + 50vw), 850px);

    display: inline-flex;
    margin: 3rem 0 0 0;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    font-size: 4rem;
    line-height: 1;
    letter-spacing: 0.05em;
    position: relative;
    scroll-margin-top: 80px;
}

.title .title-container-sidebar {

    display: inline-flex;
    justify-content: left;
    gap: 1.5rem;
    font-size: 2.8rem;
    line-height: 1;
    letter-spacing: 0.05em;
    position: relative;
    scroll-margin-top: 80px;
}

.title .title-container-sidebar h1 {
    background: linear-gradient(to right, var(--burnt-copper), var(--ancient-gold));
    padding: 10px 0;
    font-weight: 100;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 767px) {
    .title-container img {
        max-width: 750px !important;
        width: 85vw !important;
    }
}

.title .title-container h1 {
    margin: 0;
    font-size: inherit;
    background: linear-gradient(to right, var(--burnt-copper), var(--ancient-gold));
    padding: 10px 0;
    font-weight: 100;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 767px) {
    .title .title-container h1 {
        width: 360px;
    }
}

.title .title-icon {
    font-size: 2.6rem;
    color: var(--burnt-copper);
    transform: rotate(90deg);
}

.title .title-icon.flipped {
    transform: rotate(-90deg);
}

.title .title-icon.notflipped {
    transform: rotate(0deg);
}

.title .title-icon.mobile {
    transform: rotate(0deg);
}

.title .subtitle {
    font-size: 1.2rem;
    font-family: var(--font-antique);
    color: var(--burnt-copper);
    letter-spacing: 0.03em;
    margin-top: -.2rem;
    color: var(--pale-beige);
}

@media (max-width: 600px) {
    .title .title-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: clamp(1rem, 10vw, 3rem);
        padding: 0;
        gap: .1rem;
    }

    .title .title-icon {
        font-size: 3rem;
        transform: rotate(0deg);
        margin: -1em 0 0 0;
    }

    .title .title-icon.flipped {
        display: none;
    }

    .title .title-icon.notflipped {
        display: none;
    }

    .title .title-icon.top {
        order: -1;
    }

    .title .title-icon.bottom {
        order: 1;
    }
}

/*=============================================
=               SECTION HEADINGS              =
=============================================*/

h2.section {
    position: relative;
    font-family: var(--font-main);
    font-size: 2.2em;
    line-height: 1.2;
    font-weight: 600;
    text-transform: uppercase;
    font-variant: small-caps;
    color: var(--ancient-gold, #d6b879);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    padding: 30px 12px 10px 12px;
    margin: 60px 0 30px 0;
    background: var(--background-dark-2);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
    text-align: center;
    margin-inline: -4rem;
}

h2.section::before,
h2.section::after {
    content: "";
    position: absolute;
    top: 0;
    width: 12px;
    height: 100%;
    background: linear-gradient(to bottom, var(--burnt-copper), var(--ancient-gold));
}

h2.section::before {
    left: 0;
    border-radius: 10px 0 0 10px;
}

h2.section::after {
    right: 0;
    border-radius: 0 10px 10px 0;
}

.section-ornament {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 0.6em;
    letter-spacing: 0.3em;
    color: var(--ancient-gold, #d6b879);
    position: relative;
    z-index: 1;
}

.section-wrapper {
    margin: 60px auto 30px auto;
    max-width: 800px;
    position: relative;
    padding-top: 0;
    background-color: rgba(var(--background-dark-2-rgb, 41, 41, 41), 0.5);
    padding: 0 2rem 2rem 2rem;
    border-radius: 0 0 1rem 1rem;
    border-right: 2px solid var(--background-dark-2);
    border-left: 2px solid var(--background-dark-2);
}

.section-number {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85em;
    font-weight: 500;
    background-color: var(--burnt-copper, #a86b32);
    color: var(--off-white, #f4f1ec);
    padding: 4px 30px;
    border-radius: 2px;
    text-transform: uppercase;
    font-variant: small-caps;
    font-family: var(--font-main, 'EB Garamond', serif);
    letter-spacing: 0.1em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.main-heading-line {
    display: block;
    text-transform: uppercase;
    font-variant: small-caps;
}

.sub-heading-line {
    display: block;
    font-size: 0.8em;
    margin-top: 5px;
    text-transform: capitalize;
    font-variant: normal;
    font-weight: normal;
}

/*=============================================
=                 POSITIONS                   =
=============================================*/

.centered,
.center-align {
    text-align: center !important;
}

.left-align {
    text-align: left !important;
}

/*=============================================
=                  FILTERS                    =
=============================================*/

.shadowed {
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.5));
}

/*=============================================
=                 BODY TEXT                   =
=============================================*/

b,
strong {
    font-weight: bold;
    color: var(--off-white);
}

.example-text {
    color: var(--off-white);
    font-family: var(--font-main);
    line-height: 1.6;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.text-icon {
    width: 1.5rem;
    height: 1.5rem;
    vertical-align: bottom;
}

/* Definitions */

dl {
    margin-top: 15px;
    margin-bottom: 15px;
    padding-left: 20px;
    color: var(--off-white);
    font-family: var(--font-main);
    line-height: 1.5;
    font-size: 0.9rem;
}

dt {
    display: list-item;
    list-style-type: none;
    font-weight: bold;
    margin-left: 0;
    margin-bottom: 5px;
    color: var(--off-white);
    font-size: 0.9rem;
}

dd {
    margin-left: 20px;
    margin-bottom: 10px;
    color: var(--off-white);
    font-weight: normal;
    font-size: 0.9rem;
}

dl dd b,
dl dd strong {
    font-weight: bold;
    font-size: 0.9rem;
}

.highlight {
    color: var(--ancient-gold, #D4B55A);
}

.page-lore ul li,
.page-main ul li {
    position: relative;
    padding-left: 1.4em;
}

ul li::before {
    position: absolute;
    left: 0;
    top: 0.2em;
    color: var(--ancient-gold);
    font-size: 0.8em;
    line-height: 1;
}

.page-lore ul,
.page-main ul {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

.page-lore ul li::before,
.page-main ul li::before {
    content: "◆";
    /* or ✦ ✧ ♦ ◊ ◆ ◇ ❖ */
    position: absolute;
    left: 0;
    top: 0.4em;
    color: var(--ancient-gold);
    font-size: 0.9em;
    line-height: 1;
}


/*=============================================
=                   TABLES                    =
=============================================*/

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: rgba(var(--burnt-copper-rgb), 0.06);
    border: 1px solid rgba(var(--ancient-gold-rgb), 0.15);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    font-family: var(--font-main);
    font-size: 0.85rem;
    color: var(--off-white);
}

thead th {
    background-color: rgba(var(--burnt-copper-rgb), 0.2);
    color: var(--off-white);
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: top;
}

tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.025);
}

tbody tr:hover {
    background-color: rgba(var(--ancient-gold-rgb), 0.08);
}

td:nth-child(n+2),
th:nth-child(n+2) {
    text-align: center;
}

td:first-child {
    font-weight: 600;
    color: var(--ancient-gold);
    border-top-left-radius: 6px;
}

thead th:last-child {
    border-top-right-radius: 6px;
}

/*=============================================
=               NOTE BLOCKS                   =
=============================================*/

.designer-note,
.example-block,
.quick-reference {
    background-color: #3a3a3a;
    border-left: 4px solid #777;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.designer-note p:first-child,
.example-block p:first-child,
.quick-reference p:first-child {
    margin-top: 0;
}

.designer-note p:last-child,
.example-block p:last-child,
.quick-reference p:last-child {
    margin-bottom: 0;
}

.designer-note strong,
.example-block strong {
    color: #ddd;
    font-variant: small-caps;
}


/*=============================================
=                 TOOLTIPS                    =
=============================================*/

.tooltip {
    position: relative;
    display: inline-block;
    border-bottom: 1px dotted #a0a0a0;
    cursor: help;
}

.tooltip-trigger {
    cursor: help;
    border-bottom: 1px dotted rgba(240, 240, 240, 0.21);
    transition: border-bottom 0.2s ease-in-out;
    padding-bottom: 1px;
}

.tooltip-trigger:hover {
    border-bottom: 1px dotted var(--bright-gold);
    color: var(--bright-gold);
}

.global-tooltip {
    position: absolute;
    background: linear-gradient(145deg, #2a2a2a, #3a3a3a);
    color: var(--off-white);
    padding: 12px 46px 12px 16px;
    border-radius: 6px;
    border: 1px solid var(--bright-gold);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
    z-index: 10;
    transition: opacity 0.3s ease-in-out;
    max-width: 280px;
    text-align: left;
    font-size: 0.75rem;
    line-height: 1.5;
    font-family: var(--gothic-serif, var(--font-main));
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* ───────── Tooltip Icon (Magnifying Glass) ───────── */
.tooltip-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    color: var(--bright-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.tooltip-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--bright-gold);
    opacity: 0.9;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 280px;
    background-color: #2a2a2a;
    color: var(--off-white);
    text-align: left;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -140px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 400;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* ───────── Tag + Tooltip Trigger Style ───────── */
.tag {
    display: inline-block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 6px;
    border-radius: 5px;
    font-weight: 600;
    vertical-align: middle;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    line-height: .9;
}

.tag:hover {
    color: var(--ancient-gold, #D4B55A);
    cursor: default;
}

.rule-tag.tooltip {
    cursor: help;
    background-color: #2e2e2e;
    border: 1px solid var(--bright-gold);
    border-radius: 4px;
    padding: 2px 6px;
    margin-left: 8px;
    font-size: 0.7rem;
    color: var(--bright-gold);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 500;
    position: relative;
    transition: background 0.2s, color 0.2s;
}

.rule-tag.tooltip:hover {
    background-color: var(--bright-gold);
    color: #1c1c1c;
}

/* Optional for fading tooltip entries smoother */
.tooltip-content-wrapper {
    animation: fadeIn 0.3s ease-in-out;
}

/*=============================================
=              ANIMATIONS                     =
=============================================*/

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

@keyframes fadeInBackground {
    from {
        background-color: rgba(30, 30, 30, 0);
        backdrop-filter: blur(0px);
    }

    to {
        background-color: rgba(30, 30, 30, 0.9);
        backdrop-filter: blur(8px);
    }
}

@keyframes fadeOutBackground {
    from {
        background-color: rgba(30, 30, 30, 0.9);
        backdrop-filter: blur(8px);
    }

    to {
        background-color: rgba(30, 30, 30, 0);
        backdrop-filter: blur(0px);
    }
}

/*=============================================
=              OUTCOME BOXES                  =
=============================================*/

.outcome-container {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.outcome-box {
    background-color: #484848;
    border-radius: 10px;
    padding: 20px;
    flex: 1;
    min-width: 250px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid transparent;
    transition: border-color 0.3s ease-in-out;
}

.outcome-box.success {
    border-color: var(--faded-jade);
}

.outcome-box.failure {
    border-color: var(--rust-red);
}

.outcome-box p {
    margin: 4px 0;
    color: var(--off-white);
    font-family: var(--font-main);
    line-height: 1.2;
}

.outcome-text-standard {
    font-size: 0.9em;
    font-weight: 400;
}

.outcome-text-emphasized {
    font-size: 1.4em;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--off-white);
}

.action-dice-label {
    font-weight: bold;
    color: var(--off-white);
}

.outcome-text-highlight {
    font-size: 1.4em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 10px;
}

.success-color {
    color: var(--faded-jade) !important;
}

.failure-color {
    color: var(--rust-red) !important;
}


/*=============================================
=             COLLAPSIBLE ITEMS               =
=============================================*/

.collapsible-item {
    background-color: #484848;
    border-radius: 10px;
    margin-top: 25px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    color: var(--off-white);
    font-family: var(--font-main);
    font-weight: bold;
    font-size: 1.2em;
    transition: background-color 0.2s ease-in-out;
}

.collapsible-header:hover {
    background-color: #555555;
}

.collapsible-title {
    flex-grow: 1;
}

.collapsible-icon {
    width: 24px;
    height: 24px;
    margin-left: 10px;
    transition: transform 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.collapsible-icon svg path {
    fill: var(--off-white);
}

.collapsible-item.expanded .collapsible-icon {
    transform: rotate(90deg);
}

.collapsible-content {
    height: 0;
    overflow: hidden;
    transition: height 0.5s ease-in-out, padding 0.5s ease-in-out;
    padding: 0 20px;
    color: var(--off-white);
    font-family: var(--font-main);
    box-sizing: border-box;
    font-size: 0.9rem;
}

.collapsible-content.expanded-content {
    padding: 15px 20px;
    padding-top: 0;
}

.collapsible-content ul {
    list-style-type: disc;
    margin-left: 20px;
    padding-left: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.collapsible-content li {
    color: var(--off-white);
    font-family: var(--font-main);
    line-height: 1.6;
    margin-bottom: 10px;
}

.collapsible-content li b {
    font-weight: bold;
}

/* Sidebar */
.collapsible-item-sb {
    background-color: #484848;
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.collapsible-header-sb {
    position: relative;
    z-index: 1;
    background: transparent;
    overflow: visible;
    display: flex;
    align-items: flex-end;
}

.collapsible-header-sb:hover {
    background: transparent !important;
}

.collapsible-header-sb::before {
    content: "";
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    background-color: rgba(255, 255, 255, .05);
    border-radius: 8px;
    z-index: 0;
    transition: background 0.3s ease;
    opacity: 0;
}

.collapsible-header-sb:hover::before {
    opacity: 1;
}

.collapsible-title-sb {
    flex-grow: 1;
}

.collapsible-icon-sb {
    width: 24px;
    height: 24px;
    margin-left: 10px;
    transition: transform 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.collapsible-icon-sb svg path {
    fill: var(--off-white);
}

.collapsible-item-sb.expanded .collapsible-icon-sb {
    transform: rotate(90deg);
}

.collapsible-content-sb {
    height: 0;
    overflow: hidden;
    transition: height 0.5s ease-in-out, padding 0.5s ease-in-out;
    padding: 0 20px;
    color: var(--off-white);
    font-family: var(--font-main);
    box-sizing: border-box;
    font-size: 0.9rem;
    margin-top: 1em;
}

.collapsible-content-sb.expanded-content-sb {
    padding: 15px 20px;
    padding-top: 0;
}

.collapsible-content-sb ul {
    list-style-type: none;

}

.collapsible-content-sb li {
    color: var(--off-white);
    font-family: var(--font-main);
    line-height: 1.6;
    margin-bottom: 10px;
}

.collapsible-content-sb li::before {
    content: "◆";
    color: var(--ancient-gold, #D4B55A);
    left: -1.5em;
    top: 0.5em;
}

.collapsible-content-sb li b {
    font-weight: bold;
}

.tldr-title {
    color: var(--ancient-gold, #D4B55A);
}

/*=============================================
=                RULE BOXES                   =
=============================================*/

.box-rule {
    background-color: #484848;
    border-radius: 10px;
    padding: 15px 20px;
    margin-top: 25px;
    color: var(--off-white);
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.box-rule h4 {
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 10px;
    font-family: var(--font-main);
    text-align: left;
}

.box-rule p {
    font-size: 0.9em;
    line-height: 1.5;
    margin-top: 0;
    margin-bottom: 0;
    font-family: var(--font-main);
}

.box-rule b,
.box-rule strong {
    font-weight: bold;
}

.box-rule-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    z-index: 10;
    display: block;
}

.dice-symbol {
    display: inline;
    align-items: center;
    gap: 0.4em;
    height: 1.5em;
    vertical-align: middle;
}

.dice-symbol-big {
    display: inline;
    align-items: center;
    gap: 0.4em;
    height: 2.5em;
    vertical-align: middle;
}

.dice-symbol-flex {
    display: flex;
    align-items: center;
    gap: 0.4em;
    height: 1.5em;
    vertical-align: middle;
}

/*=============================================
=              POLARITY BLOCKS                =
=============================================*/

.polarity-block {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-left: 20px;
}

.polarity-block .polarity-icon-wrapper {
    width: 128px;
    height: 128px;
    margin: 20px 20px 20px auto;
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background-color: #484848;
    border-radius: 10px;
    padding: 5px;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .2);
    color: var(--off-white);
}

.polarity-block .polarity-icon-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, .7));
}

.polarity-text-content {
    flex-grow: 1;
}


/*=============================================
=               BLOCKQUOTES                   =
=============================================*/

blockquote {
    margin: 1.5em 0;
    padding: 0.5em 1.5em;
    border-left: 4px solid var(--ancient-gold, #D4B55A);
    background-color: var(--background-grey-1, #3B3B3B);
    color: var(--off-white, #F0F0F0);
    font-size: .9rem;
}

blockquote footer {
    font-size: 0.9em;
    text-align: right;
    margin-top: 0.5em;
    color: black;
    z-index: 2;
}

.blockquote-medieval {
    background-image: url('https://www.transparenttextures.com/patterns/light-paper-fibers.png');
    background-color: rgba(var(--dark-paper-rgb), 0.9);
    background-repeat: repeat;
    border-left: 0;
    margin: 2em 0;
    padding: 1.5em 2em;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    font-family: var(--handwritten-font);
    line-height: 1.6;
    color: #3f3f3f;
    position: relative;
    border-radius: 0;
    position: relative;
    border-radius: 12px;
}

.blockquote-medieval p {
    font-size: 3em;
    margin-bottom: 0;
    margin-top: 0;
    text-indent: 0;
    color: var(--deep-charcoal);
    font-family: var(--handwritten-font);
    line-height: 1;
    z-index: 2;
}

.blockquote-medieval p:first-of-type::first-letter {
    font-family: 'Old English Text MT', 'UnifrakturMaguntia', serif;
    font-size: 2.5em;
    line-height: 1;
    display: inline-block;
    margin-right: -0.25em;
    padding-right: 0.3em;
    padding-top: 0.05em;
    vertical-align: bottom;
    margin-top: 0.05em;

    background: linear-gradient(to bottom, #8A3C30, #3D2E23);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.blockquote-medieval footer {
    text-align: right;
    font-family: var(--special-font);
    font-size: 0.95em;
    font-style: italic;
    color: black;
    margin-top: 1em;
}

.blockquote-medieval::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 100%;
    background: linear-gradient(to bottom, var(--rust-red), var(--brown-charcoal));
    border-radius: 10px 0 0 10px;
    z-index: 0;
}

.blockquote-medieval::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 100%;
    background: linear-gradient(to bottom, var(--rust-red), var(--brown-charcoal));
    border-radius: 0 10px 10px 0;
    z-index: 0;
}

.blockquote-medieval .quote-start,
.blockquote-medieval .quote-end {
    font-family: var(--special-font, 'Cinzel Decorative', serif);
    font-size: 4em;
    color: rgba(0, 0, 0, 0.08);
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.blockquote-medieval .quote-start {
    top: -0.4em;
    left: -0.2em;
    content: "❝";
}

.blockquote-medieval .quote-end {
    bottom: -0.4em;
    right: -0.2em;
    content: "❞";
}

blockquote.clean {
    background: none;
    border: none;
    font-family: var(--font-main);
    font-style: italic;
    font-weight: 300;
    max-width: 500px;
}

blockquote.clean p {
    font-size: 1.2rem;
}

@media (max-width: 767px) {
    blockquote.clean p {
        font-size: .9rem;
    }
}

.blockquote-clean-author {
    text-align: right;
    font-size: 1.1rem;
    color: var(--pale-beige);
}

/*=============================================
=                  CONTENTS                   =
=============================================*/

.contents-wrapper {
    margin: 30px auto 30px auto;
    max-width: 800px;
    position: relative;
    padding-top: 0;
}

.contents-collapsible {
    position: relative;
    max-width: 800px;
    margin: 0 auto 30px auto;
    background: rgba(var(--burnt-copper-rgb), 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    user-select: none;
    font-family: var(--font-main);
    font-weight: 600;
    font-variant: small-caps;
    text-transform: uppercase;
    color: var(--ancient-gold, #d6b879);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    letter-spacing: 1px;
    padding: 10px;
}

.contents-collapsible::before {
    left: 0;
}

.contents-collapsible::after {
    right: 0;
    border-radius: 0 10px 10px 0;
    left: auto;
}

.contents-header {
    position: relative;
    z-index: 2;
    font-size: 1em;
    line-height: 1.2;
}

.contents-ornament {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 0.6em;
    letter-spacing: 0.3em;
    color: var(--ancient-gold, #d6b879);
    position: relative;
    z-index: 2;
}

.toggle-arrow {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    font-size: 1.6em;
    color: var(--ancient-gold, #d6b879);
    transition: transform 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.contents-collapsible[aria-expanded="true"] .toggle-arrow {
    transform: translateY(-50%) rotate(90deg);
}

.contents-content {
    margin-top: 0.5em;
    padding-left: 12px;
    padding-right: 12px;
    font-weight: normal;
    text-transform: none;
    font-variant: normal;
    color: var(--ancient-gold);
    font-family: var(--font-main);
}

.contents-content ul {
    padding-left: 1.5em;
    margin: 0;
}

.contents-content ul li {
    margin-bottom: 0.4em;
}

.contents-content ul li a {
    color: var(--ancient-gold);
    text-decoration: none;
}

.contents-content ul li a:hover,
.contents-content ul li a:focus {
    text-decoration: underline;
    outline: none;
}

/*=============================================
=                  TIMELINE                   =
=============================================*/

.timeline-container {
    display: flex;
    gap: 20px;
    max-width: 1000px;
    margin: auto;
    padding: 40px 20px;
    color: #e0d7c2;
}

.timeline-nav {
    flex: 0 0 100px;
    position: sticky;
    top: 100px;
}

.timeline-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-nav li {
    margin: 8px 0;
    font-size: 0.9em;
    cursor: pointer;
    color: #d2b48c;
}

.timeline {
    flex-grow: 1;
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 4px;
    background-color: #3a3a3a;
    top: 0;
    bottom: 0;
    left: 12px;
}

.timeline-event {
    position: relative;
    margin-bottom: 30px;
    padding-left: 40px;
    transition: background 0.3s ease;
}

.timeline-event::before {
    content: attr(data-icon);
    position: absolute;
    left: -4px;
    top: 0;
    background-color: #1c1a16;
    color: #d2b48c;
    font-size: 1.2em;
    width: 24px;
    height: 24px;
    text-align: center;
    border: 2px solid #d2b48c;
    border-radius: 50%;
    line-height: 20px;
    font-weight: bold;
}

.timeline-event h3 {
    margin: 0;
    font-size: 1.1em;
    color: #f0e6c4;
    cursor: pointer;
}

.timeline-event p {
    margin: 5px 0 0;
    font-size: 0.95em;
    color: #c4b99b;
    line-height: 1.5;
    display: none;
    transition: opacity 0.3s ease;
}

.timeline-event.expanded p {
    display: block;
}

.timeline-event:hover {
    background-color: rgba(255, 255, 255, 0.03);
    padding-left: 42px;
}


/*=============================================
=              ADVANCEMENT GRID               =
=============================================*/

.advancement-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 15px 0;
}

.advancement-item {
    background-color: #3d3d3d;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid #555;
    min-height: 120px;
    transition: background-color 0.2s, transform 0.2s;
}

.advancement-item:hover {
    background-color: #4a4a4a;
    transform: translateY(-2px);
}

.advancement-symbol {
    width: 40px;
    height: 40px;
    border: 2px dashed #777;
    border-radius: 50%;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 1.5em;
}

.advancement-text {
    font-size: 0.9em;
    line-height: 1.4;
    flex-grow: 1;
    display: flex;
    align-items: center;
}


/*=============================================
=              DEFENSE SECTION                =
=============================================*/

.defense-layer-section {
    margin-top: 25px;
}

.defense-section-header-with-icon {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.defense-symbol {
    width: 128px;
    height: 128px;
    background-color: #393939;
    border-radius: 10px;
    margin-right: 20px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: none;
}

.defense-symbol img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.defense-header-text {
    flex-grow: 1;
}

.defense-header-text p {
    margin-top: 0 !important;
}

.defense-header-text h3 {
    margin-top: 0 !important;
}


/*=============================================
=               TURN ORDER LIST               =
=============================================*/

.turn-order-list {
    list-style: none;
    padding: 0;
    counter-reset: turn-order-counter;
}

.turn-order-list li {
    position: relative;
    padding-left: 40px;
    margin-bottom: 8px;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.turn-order-list li::before {
    counter-increment: turn-order-counter;
    content: counter(turn-order-counter);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #555;
    color: var(--off-white);
    font-weight: bold;
    font-size: 0.9em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}


/*=============================================
=                   INFOBOX                   =
=============================================*/

.infobox {
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
    font-family: var(--font-main, 'EB Garamond', serif);
    background: var(--dark-parchment, #2c2016);
    color: var(--off-white, #f4f1ec);
    border: 1px solid rgba(var(--ancient-gold-rgb), 0.3);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    margin: 0 auto;
}

.infobox-image {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 0.8rem;
    border-radius: 4px;
    padding: 4px;
    border: 2px solid var(--ancient-gold, #d6b879);
    background-color: var(--parchment, #f8f1e0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    filter: sepia(0.15) contrast(1.1);
    box-sizing: border-box;
}

.infobox-title {
    text-align: center;
    font-family: var(--title-font, 'Cinzel Decorative', serif);
    font-size: 1.4em;
    padding: 12px 10px;
    background: var(--warm-stone, #3b2a1e);
    color: var(--ancient-gold, #d6b879);
    font-variant: small-caps;
    border-bottom: 2px solid var(--ancient-gold, #d6b879);
    margin: 0;
}

.infobox-section {
    padding: 10px 12px;
    font-weight: 600;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    color: var(--ancient-gold, #d6b879);
    padding: 5px !important;
    position: relative;
}

details[open]>.infobox-section::after {
    transform: rotate(90deg);
}

.infobox details {
    margin-bottom: 8px;
    padding: 0;

    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.infobox details:last-of-type {
    margin-bottom: 0;
}

.infobox-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    border-radius: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 0.9em;
    margin: 6px 0 0 0;
    cursor: default
}

.infobox-table-wrapper {
    overflow-x: auto;
}

.infobox-table th,
.infobox-table td {
    padding: 6px 10px;
    vertical-align: top;
    word-wrap: break-word;
    white-space: normal;
    font-size: 0.85em;
}

.infobox-table th {
    width: 40%;
    font-weight: 600;
    color: var(--ancient-gold, #d6b879);
    text-align: left;
}

.infobox-table td {
    color: var(--off-white, #f4f1ec);
    font-weight: normal;
}

.infobox-table tr:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.infobox-collapse-button {
    background: var(--brown-charcoal);
    color: var(--ancient-gold);
    font-family: var(--font-main);
    padding: 6px 30px;
    border: 1px solid var(--ancient-gold);
    border-radius: 6px;
    margin: 15px auto 2px auto;
    display: block;
    cursor: pointer;
}

infobox-collapse-button:hover {
    background: var(--ancient-gold);
    color: var(--warm-stone);
}

details[open] .infobox-table {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/*=============================================
=              RULE BOXES                     =
=============================================*/

.rule-options-minimal {
    margin: 2rem 0 1rem 0;
    padding: 0.5rem 1rem;
    background: rgba(var(--burnt-copper-rgb), 0.05);
    border-radius: 6px;
}

.toggle-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    align-items: center;
}

.rule-switch {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-family: var(--font-main);
}

.rule-switch input {
    display: none;
}

.rule-switch .slider {
    width: 36px;
    height: 20px;
    background-color: rgba(var(--burnt-copper-rgb), 0.3);
    border-radius: 10px;
    position: relative;
    transition: background-color 0.3s ease;
}

.rule-switch .slider::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 2px;
    left: 2px;
    background-color: var(--off-white);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.rule-switch input:checked+.slider {
    background-color: var(--ancient-gold);
}

.rule-switch input:checked+.slider::after {
    transform: translateX(16px);
}

.rule-switch .label {
    color: var(--off-white);
    text-transform: uppercase;
}

.rule-tag {
    display: inline-block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    margin-left: 0.5rem;
    border-radius: 3px;
    font-weight: 600;
    vertical-align: middle;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--off-white);
}

.rule-tag.optional {
    background-color: rgba(var(--ancient-gold-rgb), 0.15);
    color: var(--ancient-gold);
}

.rule-tag.variant {
    background-color: rgba(var(--burnt-copper-rgb), 0.15);
    color: var(--burnt-copper);
}

.rule-tag.experimental {
    background-color: rgba(255, 80, 80, 0.15);
    color: #ff8080;
    border-color: rgba(255, 80, 80, 0.3);
}

.rule-options-box {
    background-color: #2d2d2d;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 1rem 1.5rem;
    margin: 1rem 0 2rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.rule-options-label {
    text-transform: uppercase;
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.no-bullet {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

.no-bullet>li {
    list-style: none;
}

.no-bullet>li::before {
    content: none;
}

.rule-highlight-box {
    background-color: var(--highlight-bg, #fff9e528);
    border-left: 5px solid var(--ancient-gold, #D4B55A);
    border-right: 5px solid var(--ancient-gold, #D4B55A);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    border-radius: 0.5rem;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.rule-highlight-box h4 {
    margin-top: 0;
    font-size: 1.1rem;
}

.centered-equation {
    text-align: center;
    font-size: 1.25rem;
    margin: 1rem 0;
    padding: 1em;
    background: var(--background-grey-1);
    border-radius: 1em;
}

/*=============================================
=                  SIDEBARS                   =
=============================================*/
/* ── SIDEBAR ─────────────── */

.sidebar-wrapper {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 300px;
    margin: 0 auto;
    align-self: flex-start;
}

.sidebar-block {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
}

.sidebar-block h3 {
    font-size: 1rem;
    color: var(--bright-gold, #e6c87c);
    margin: 0 0 .5rem 0;
    font-family: var(--font-main);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sidebar-link {
    display: block;
    margin: 0.35rem 0;
    color: var(--off-white, #eee);
    font-size: 0.85rem;
    text-decoration: underline;
}

/* Archives carousel */
.archives-carousel {
    display: flex;
    overflow-x: auto;
    gap: .75rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.25rem 0;
    box-sizing: border-box;
    width: 100%;
    scroll-behavior: smooth;
}

.archives-carousel-fade {
    position: relative;
    min-height: 100px;
}

.archive-item.show {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.archives-carousel::-webkit-scrollbar {
    display: none;
}

.archive-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out;
    z-index: 0;
}

.archive-item:focus {
    outline: none;
    scroll-margin: 0 !important;
}

.archive-author {
    text-align: right;
    font-size: 0.7rem;
    color: #aaa;
    margin-top: 0.4rem;
    font-style: normal;
}

/* Glossary */
.glossary-input {
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--brown-charcoal, #3D2E23);
    border-radius: 4px;
    background: var(--background-grey-2, #2c2c2c);
    color: var(--off-white);
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    box-sizing: border-box;
}

.glossary-result {
    font-size: 0.8rem;
    color: #ddd;
    line-height: 1.4;
}

.glossary-result a {
    color: var(--bright-gold);
    text-decoration: underline;
}

/*=============================================
=                  UTILITY                    =
=============================================*/

.version-box {
    margin-top: 2rem;
    padding: 0.75rem 1.2rem;
    border: 1px solid var(--brown-charcoal, #3D2E23);
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--off-white, #efefef);
    font-size: 0.85rem;
    font-family: var(--font-main, serif);
    text-align: center;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/*=============================================
=              MEDIA QUERIES                  =
=============================================*/

@media (max-width: 768px) {
    h2 {
        font-size: 1.8em;
        padding: 8px 10px;
    }

    h3 {
        font-size: 1.5em;
    }

    h4 {
        font-size: 1.2em;
    }

    .container {
        padding: 15px;
    }

    th,
    td {
        padding: 8px 10px;
        font-size: 0.9em;
    }

    .aptitude-grid-container {
        grid-template-columns: 1fr;
    }

    .polarity-block {
        flex-direction: column;
        align-items: center;
        padding-left: 0;
    }

    .polarity-block .polarity-icon-wrapper {
        margin: 0 auto 15px auto;
    }

    .aptitude-card .icon {
        margin: 15px auto 15px auto;
    }

    .tooltip .tooltiptext {
        width: 220px;
        margin-left: -110px;
    }

    .timeline-container {
        flex-direction: column;
    }

    .timeline-nav {
        display: none;
    }

    .timeline {
        padding-left: 20px;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-event {
        padding-left: 30px;
    }

    .timeline-event::before {
        left: -10px;
    }
}

@media (max-width: 600px) {
    .advancement-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 400px) {
    .infobox {
        width: 100%;
    }
}

@media screen and (max-width: 600px) {
    .page-columns {
        flex-direction: column;
        width: 100%;
    }

    .sidebar,
    .page-lore,
    .page-main {
        max-width: 100%;
        width: 100%;
        padding: 0;
    }

    .sidebar {
        order: 1;
        padding: 20px 0;
    }

    .page-lore,
    .page-main {
        order: 2;
    }
}

@media (max-width: 390px) {

    .defense-header {
        display: block;
    }

    .defense-icon-outer {
        float: left;
        margin: 0 1rem 1rem 0;
        width: 96px;
    }

    .defense-icon img {
        width: 100%;
        height: auto;
        display: block;
    }

    .stance-header {
        display: block;
    }

    .stance-icon-outer {
        float: left;
        margin: 0 1rem 1rem 0;
        width: 96px;
    }

    .stance-icon img {
        width: 100%;
        height: auto;
        display: block;
    }

    h2.section {
        font-size: 1.5rem;
    }
}

/*=============================================
=            DYNAMIC PAGES STYLES             =
=============================================*/

#twin-coil-system .narrative-table {
    border-collapse: collapse;
    width: 100%;
}

#twin-coil-system .narrative-table th,
#twin-coil-system .narrative-table td {
    padding: 0.75rem 1rem;
    border-bottom: 0px solid var(--ancient-gold, #D4B55A);
    vertical-align: middle;
}

#twin-coil-system .toggle-icon {
    cursor: pointer;
    font-size: 1.3rem;
    transition: transform 0.3s ease;
    user-select: none;
    text-align: center;
    color: var(--text-muted);
    width: 2rem;
}

#twin-coil-system .narrative-toggle.expanded .toggle-icon {
    transform: rotate(90deg);
}

#twin-coil-system .narrative-row .narrative-content {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition:
        max-height .4s ease,
        opacity 0.3s ease,
        visibility 0.3s ease;
    padding: 0 1.25rem;
    font-size: 0.85rem;
    font-weight: 200;
    font-family: var(--font-main, "Georgia", serif);
    line-height: 1.6;
    color: var(--off-white, #F0F0F0);
    background: var(--background-dark-1);
    border-top: 1px solid var(--ancient-gold, #D4B55A);
}

#twin-coil-system .narrative-toggle.expanded+.narrative-row .narrative-content {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
    padding: 1rem 1.25rem;
}

#twin-coil-system .narrative-toggle {
    cursor: pointer;
}

#twin-coil-system .narrative-row td {
    padding: 0;
    line-height: 0;
}

#twin-coil-system li .no-bullet {
    list-style: none;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

#twin-coil-system .no-bullet::before {
    display: none;
}

#twin-coil-system blockquote h3 {
    border-bottom: none;
    font-size: 1.3em;
    color: var(--ancient-gold, #D4B55A);
}

#twin-coil-system .grid-2x2-axes {
    display: grid;
    grid-template-columns: auto .15fr 1fr 1fr;
    grid-template-rows: auto .2fr 1fr 1fr;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 1.5rem;
    gap: 1px;
    background-color: none;
}

#twin-coil-system .axis-label,
#twin-coil-system .grid-label,
#twin-coil-system .grid-cell {
    background: var(--background-dark-2);
    color: var(--off-white);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-main);
}

#twin-coil-system .axis-label {
    background: none;
    color: var(--off-white);
    font-weight: bold;
    writing-mode: vertical-rl;
    grid-row: 2 / span 2;
}

#twin-coil-system .x-axis {
    writing-mode: horizontal-tb;
    grid-column: 3 / span 3;
    grid-row: 1;
    background: rgba(var(--rust-red-rgb, rgb(138, 60, 48)), .2);
    border-radius: 10px 10px 0 0;
}

#twin-coil-system .y-axis {
    background: rgba(var(--faded-jade-rgb, rgb(138, 60, 48)), .2);
    color: var(--text-muted);
    font-weight: bold;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 1;
    grid-row: 3 / span 3;
    border-radius: 0 10px 10px 0;
}

#twin-coil-system .grid-label {
    background: var(--deep-charcoal);
    font-weight: bold;
}

#twin-coil-system .grid-label.top-left {
    grid-column: 3;
    grid-row: 2;
}

#twin-coil-system .grid-label.top-right {
    grid-column: 4;
    grid-row: 2;
}

#twin-coil-system .grid-label.left-top {
    grid-column: 2;
    grid-row: 3;
}

#twin-coil-system .grid-label.left-bottom {
    grid-column: 2;
    grid-row: 4;
}

#twin-coil-system .grid-cell {
    flex-direction: column;
    line-height: 1.2rem;
    font-size: 0.85rem;
    text-align: center;
}

#twin-coil-system .grid-cell.top-left {
    grid-column: 3;
    grid-row: 3;
}

#twin-coil-system .grid-cell.top-right {
    grid-column: 4;
    grid-row: 3;
}

#twin-coil-system .grid-cell.bottom-left {
    grid-column: 3;
    grid-row: 4;
}

#twin-coil-system .grid-cell.bottom-right {
    grid-column: 4;
    grid-row: 4;
}

#twin-coil-system .grid-corner-image {
    grid-column: 1 / span 2;
    grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    justify-content: right;
    padding: 0;
    width: 90%;
    height: 90%;
}

#twin-coil-system .grid-corner-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

#twin-coil-system .risk-badges {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 1rem;
}

#twin-coil-system .risk-badge {
    background: var(--background-dark-1, #1c1c1c);
    border: 1px solid var(--border-color, #444);
    border-left: 0.5rem solid var(--risk-color);
    border-radius: 0.5rem;
    padding: 0;
    overflow: hidden;
    transition: background 0.3s ease;
}

#twin-coil-system .risk-badge .collapsible-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    gap: 1rem;
}

#twin-coil-system .risk-dice {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--ancient-gold, #D4B55A);
    min-width: 3rem;
    text-align: center;
}

#twin-coil-system .risk-info strong {
    display: block;
    color: var(--off-white, #f0f0f0);
    font-size: 1rem;
}

#twin-coil-system .risk-info span {
    color: var(--text-muted, #aaa);
    font-size: 0.9rem;
}

#twin-coil-system .risk-info p {
    margin: 0.3rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted, #888);
    line-height: 1.4;
}

#twin-coil-system .expanded .collapsible-content {
    max-height: 100vh;
    opacity: 1;
    visibility: visible;
    padding: 0 1rem 1rem;
}

/* Overrides */

#twin-coil-system table td {
    vertical-align: middle;
}

#twin-coil-system table td img,
#twin-coil-system .dice-symbol img {
    height: 2em;
    vertical-align: middle;
}