/* ive labled this so i dont have to kms later */

/* ================= SPELL UI PALETTE =================
   Ported 1:1 from the mod's in-game Nightmare Spell UI:
   SpellPalette.java / AbstractSpellScreen.java / SpellUiTheme.java */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&display=swap');

:root {
    --void:        #0b0e17;
    --panel:       16, 20, 32;
    --panel-a:     0.82;
    --border:      #39415e;
    --border-in:   rgba(57, 65, 94, 0.45);
    --gold:        #c9ae6a;
    --gold-soft:   #efe0b4;
    --label:       #8e9bba;
    --value:       #e8eef7;
    --bar-bg:      #141a28;
    --accent:      #6f7cb4;
    --glow:        #a3aede;

    /* shared soul-rank ladder — aspects & memories (SoulRank / MemoryTier) */
    --tier-dormant:      #8a93a6;
    --tier-awakened:     #3fcf8e;
    --tier-ascended:     #5b9bf0;
    --tier-transcendent: var(--glow);
    --tier-supreme:      #e0555a;
    --tier-sacred:       #d1477a;
    --tier-divine:       var(--gold);
    /* off-ladder: a punishment rank, deliberately the dimmest thing on the page */
    --tier-below-mundane: #5a5f6b;

    /* creature ladder — same 7 levels, monster-flavored names & hues */
    --c-dormant:   #8a93a6;
    --c-awakened:  #7a9b5c;
    --c-fallen:    #c08a3e;
    --c-corrupted: #a3aede;
    --c-great:     #e0555a;
    --c-cursed:    #d1477a;
    --c-unholy:    #ff4568;

    --font-display: 'Cinzel', Georgia, 'Times New Roman', serif;
    --font-body: Palatino, 'Palatino Linotype', 'Iowan Old Style', Georgia, serif;
    --font-mono: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Consolas, 'SFMono-Regular', monospace;

    /* hover-transition easing — smooth deceleration, no snap, no bounce */
    --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ================= UNIVERSAL RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background-color: var(--void);
    color: var(--value);
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
}

body {
    background-image:
        radial-gradient(ellipse 900px 520px at 50% -8%, rgba(111, 124, 180, 0.14), transparent 60%),
        linear-gradient(180deg, rgba(11, 14, 23, 0.74) 0%, rgba(11, 14, 23, 0.62) 45%, rgba(11, 14, 23, 0.90) 100%),
        url('images/mountains.background.webp');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center top;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

::selection { background: rgba(111, 124, 180, 0.45); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; border: 2px solid var(--void); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Static "+" corner ticks, used on every panel-like surface — a calmer,
   terminal-frame treatment (two pseudo-elements only get us two corners:
   top-left / bottom-right) replacing the old pulsing rune-diamond look. */
.wiki-navbar, .navbar, .wiki-card, .info-block, .modpack-card, .feature-card,
.atlas-map-panel, .team-member, .entry-card, .trial-card, .qa-item, .loop-step, .recipe-panel {
    position: relative;
}
.wiki-navbar::before, .wiki-navbar::after,
.wiki-card::before, .wiki-card::after,
.info-block::before, .info-block::after,
.modpack-card::before, .modpack-card::after,
.feature-card::before, .feature-card::after,
.atlas-map-panel::before, .atlas-map-panel::after,
.team-member::before, .team-member::after,
.entry-card::before, .entry-card::after,
.trial-card::before, .trial-card::after,
.qa-item::before, .qa-item::after,
.loop-step::before, .loop-step::after,
.recipe-panel::before, .recipe-panel::after {
    content: '+';
    position: absolute;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1;
    color: var(--label);
    opacity: 0.55;
    pointer-events: none;
    transition: color 0.4s var(--ease), opacity 0.4s var(--ease);
}
.wiki-navbar::before, .wiki-card::before, .info-block::before, .modpack-card::before,
.feature-card::before, .atlas-map-panel::before, .team-member::before, .entry-card::before,
.trial-card::before, .qa-item::before, .loop-step::before, .recipe-panel::before {
    top: 6px; left: 8px;
}
.wiki-navbar::after, .wiki-card::after, .info-block::after, .modpack-card::after,
.feature-card::after, .atlas-map-panel::after, .team-member::after, .entry-card::after,
.trial-card::after, .qa-item::after, .loop-step::after, .recipe-panel::after {
    bottom: 6px; right: 8px;
}
.wiki-card:hover::before, .wiki-card:hover::after,
.info-block:hover::before, .info-block:hover::after,
.feature-card:hover::before, .feature-card:hover::after,
.team-member:hover::before, .team-member:hover::after,
.entry-card:hover::before, .entry-card:hover::after,
.trial-card:hover::before, .trial-card:hover::after,
.loop-step:hover::before, .loop-step:hover::after,
.recipe-panel:hover::before, .recipe-panel:hover::after {
    color: var(--gold);
    opacity: 1;
}

/* Wave-wrapped, pulsing-glow title treatment — matches AbstractSpellScreen's
   drawGlowingTitle "≈ Title ≈" convention, applied via generated content so no
   markup changes are needed on any page. */
.content h1, .section-header h2, .article-title, .atlas-map-title {
    font-family: var(--font-display);
    color: var(--gold);
    animation: titleGlow 3.2s ease-in-out infinite;
}
.content h1::before, .content h1::after,
.section-header h2::before, .section-header h2::after,
.article-title::before, .article-title::after {
    content: '\2248';
    color: var(--glow);
    opacity: 0.75;
    padding: 0 0.35em;
}
@keyframes titleGlow {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(163, 174, 222, 0.35)) drop-shadow(0 0 12px rgba(163, 174, 222, 0.18)); }
    50%      { filter: drop-shadow(0 0 10px rgba(163, 174, 222, 0.8)) drop-shadow(0 0 26px rgba(163, 174, 222, 0.45)); }
}

/* ================= HERO SECTION ================= */

.main {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    background-image:
        radial-gradient(ellipse 900px 520px at 50% -8%, rgba(111, 124, 180, 0.16), transparent 60%),
        linear-gradient(180deg, rgba(11, 14, 23, 0.62) 0%, rgba(11, 14, 23, 0.48) 40%, rgba(11, 14, 23, 0.88) 100%),
        url('images/mountains.background.webp');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    z-index: 1;
    margin-top: 0 !important;
    padding-top: 0 !important;
}


/* ================= NAVBAR SECTION ================= */

.navbar {
    width: 100%;
    height: 80px;
    padding: 0 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(var(--panel), var(--panel-a));
    border-bottom: 2px solid var(--border);
    box-shadow: inset 0 0 0 3px var(--border-in);
    margin: 0;
    position: relative;
    top: 0;
    z-index: 10;
}

.icon {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.navbar .quicklinks-grid {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin: 0;
}

.navbar .quick-tile {
    flex-direction: row;
    padding: 6px 10px;
    gap: 6px;
}

.logo-text {
    color: var(--gold);
    font-size: 24px;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 1.5px;
}

.menu {
    display: flex;
    align-items: center;
}

.navbar ul {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar ul li a {
    text-decoration: none;
    color: var(--label);
    font-size: 13px;
    font-family: var(--font-mono);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    transition: color 0.3s var(--ease), text-shadow 0.3s var(--ease);
}

.navbar ul li a:hover,
.navbar ul li a.active {
    color: var(--gold);
    text-shadow:
        0 0 8px rgba(168, 85, 247, 0.7),
        0 0 16px rgba(168, 85, 247, 0.4);
}

.login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.08em;
    color: var(--value);
    background-color: rgba(var(--panel), 0.85);
    border: 1px solid #4a3a8a;
    border-radius: 2px;
    text-decoration: none;
    transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.login-btn .discord-icon {
    font-size: 14px;
    color: var(--glow);
    transition: color 0.3s var(--ease);
}

.login-btn:hover {
    background-color: #2a1f4d;
    border-color: #8577e0;
    color: #cfc4ff;
}

.login-btn:hover .discord-icon {
    color: var(--gold);
}


/* ================= MAIN HERO CONTENT ================= */

.content {
    max-width: 1400px;
    width: 95%;
    min-height: calc(100vh - 80px);
    padding: 60px 20px 100px 20px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

.content h1 {
    font-size: clamp(42px, 8vw, 110px);
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 20px;
}

.content p {
    font-size: 16px;
    color: #c4cce6;
    line-height: 1.5;
    letter-spacing: 1px;
    max-width: 600px;
    margin: 0 auto 12px auto;
    text-transform: uppercase;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--value);
    background-color: rgba(var(--panel), 0.86);
    border: 1px solid var(--border);
    border-radius: 2px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease);
}

.btn:hover {
    background-color: var(--border);
    color: var(--gold);
    border-color: var(--gold);
}

.discord-btn {
    color: var(--value);
    border-color: #464f78;
}

.discord-btn:hover {
    background-color: #232a3f;
    border-color: #8b95c9;
    color: #d5dcf2;
}

.ip-btn {
    gap: 12px;
    min-width: 260px;
}

.ip-btn-icon {
    font-size: 15px;
    opacity: 0.75;
    transition: opacity 0.35s var(--ease);
}

.ip-btn:hover .ip-btn-icon {
    opacity: 1;
}

.ip-btn.copied {
    background-color: rgba(63, 207, 142, 0.12);
    border-color: var(--tier-awakened);
    color: var(--tier-awakened);
}

.stats-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 18px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--label);
    background-color: rgba(var(--panel), 0.55);
    border: 1px solid var(--border-in);
    border-radius: 20px;
}

.stat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #68718a;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.stat-dot.online {
    background-color: var(--tier-awakened);
    box-shadow: 0 0 8px rgba(63, 207, 142, 0.85);
}

.stat-dot.offline {
    background-color: var(--tier-supreme);
    box-shadow: 0 0 8px rgba(224, 85, 90, 0.7);
}

/* ================= TERMINAL / CORE PANEL (hero) ================= */

.terminal-tag {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--label);
    margin-bottom: 18px;
}

.terminal-tag .cursor {
    color: var(--glow);
    animation: cursorBlink 1.1s step-end infinite;
}

@keyframes cursorBlink { 50% { opacity: 0; } }

.hero-grid {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 50px;
    align-items: center;
    text-align: left;
}

.hero-text { min-width: 0; }
.hero-text .content-inner { max-width: 560px; }

.hero-grid h1 {
    text-align: left;
    font-size: clamp(28px, 3.6vw, 52px);
    white-space: nowrap;
}
.hero-grid p { margin-left: 0; }
.hero-grid .button-container { justify-content: flex-start; flex-wrap: wrap; }
.hero-grid .stats-bar { justify-content: flex-start; }

.core-panel-col {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    justify-self: center;
    min-width: 0;
    width: 100%;
    max-width: 380px;
}

.hero-support-btn {
    align-self: flex-end;
    padding: 10px 22px;
    font-size: 11px;
    color: var(--value);
    border-color: #464f78;
}

.hero-support-btn:hover {
    background-color: #232a3f;
    border-color: #8b95c9;
    color: #d5dcf2;
}

.core-panel {
    position: relative;
    min-width: 0;
    border: 1px solid var(--border);
    background: rgba(var(--panel), 0.6);
    padding: 26px 26px 22px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--value);
    width: 100%;
}

.corner-tick {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--label);
    opacity: 0.6;
    pointer-events: none;
}
.corner-tick.tl { top: -7px; left: -7px; }
.corner-tick.tr { top: -7px; right: -7px; }
.corner-tick.bl { bottom: -7px; left: -7px; }
.corner-tick.br { bottom: -7px; right: -7px; }

.core-panel-head {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--gold);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.core-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--glow);
    box-shadow: 0 0 8px rgba(163, 174, 222, 0.85);
    flex-shrink: 0;
}

.core-panel-divider {
    height: 1px;
    background: var(--border-in);
    margin: 12px 0;
}

.core-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
    font-size: 11.5px;
    letter-spacing: 0.02em;
}

.core-key {
    color: var(--label);
    letter-spacing: 0.1em;
}

.core-val {
    color: var(--value);
    text-align: right;
}

.core-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--label);
}

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-text .content-inner { max-width: 100%; margin: 0 auto; }
    .hero-grid .content h1 { text-align: center; }
    .hero-grid .button-container,
    .hero-grid .stats-bar { justify-content: center; }
    .core-panel-col { max-width: 380px; margin: 0 auto; align-items: center; }
    .hero-support-btn { align-self: center; }
}

/* ================= QUICK LINKS (Conifer-style tile grid) ================= */

.quicklinks-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); 
    gap: 10px;
    margin: 16px 0 24px 0;
}

.title-quicklinks {
    margin-top: 18px;
    margin-bottom: 24px;
}

.quick-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px; 
    border: 1px solid var(--border-in);
    background: rgba(var(--panel), 0.4);
    text-decoration: none;
    font-family: var(--font-mono);
    border-radius: 2px;
    transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.quick-tile:hover {
    border-color: var(--gold);
    background: rgba(var(--panel), 0.75);
    transform: translateY(-2px);
}

.quick-glyph {
    font-size: 16px;
    color: var(--glow);
    transition: color 0.3s var(--ease);
}

.quick-tile:hover .quick-glyph { 
    color: var(--gold); 
}

.quick-label {
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--label);
    transition: color 0.3s var(--ease);
}

.quick-tile:hover .quick-label { 
    color: var(--gold-soft); 
}

/* ================= TRANSITION ================= */

.divider {
    width: 100%;
    height: 160px;
    margin-top: -80px;
    margin-bottom: -80px;
    position: relative;
    z-index: 10;
    pointer-events: none;

    background: linear-gradient(
        to bottom,
        rgba(11, 14, 23, 0) 0%,
        rgba(11, 14, 23, 0.85) 50%,
        rgba(11, 14, 23, 0) 100%
    );
}

/* ================= ANNOUNCEMENTS ================= */
.section-two {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px 20px;
    background-image:
        linear-gradient(to top, rgba(11, 14, 23, 0.86), rgba(11, 14, 23, 0.74)),
        url('/images/mountains.background.webp');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    z-index: 2;
}

.announcements-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 42px;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.section-header p {
    font-size: 16px;
    color: #b3bdd2;
    letter-spacing: 0.5px;
}

.modpack-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(var(--panel), var(--panel-a));
    border: 2px solid var(--border);
    box-shadow: inset 0 0 0 3px var(--border-in);
    border-radius: 2px;
    padding: 24px 32px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
    transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

.modpack-card:hover {
    border-color: #4e5a80;
    transform: translateY(-2px);
}

.modpack-info h3 {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--gold);
    margin-bottom: 6px;
}

.modpack-info p {
    color: var(--label);
    font-size: 14px;
    font-family: var(--font-mono);
}

.download-btn {
    padding: 12px 28px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--value);
    background-color: rgba(var(--panel), 0.86);
    border: 1px solid var(--border);
    border-radius: 2px;
    text-decoration: none;
    transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease), transform 0.35s var(--ease);
}

.download-btn:hover {
    background-color: var(--border);
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-2px);
}

.announcements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
}

.announcement-card {
    background: rgba(var(--panel), 0.75);
    border: 1px solid var(--border-in);
    border-radius: 2px;
    overflow: hidden;
    transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.announcement-card:hover {
    border-color: var(--glow);
    transform: translateY(-5px);
    box-shadow: 0 0 20px -6px rgba(163, 174, 222, 0.4);
}

.card-media {
    width: 100%;
    background-color: #000000;
    overflow: hidden;
    position: relative;
}

.video-wrapper {
    height: 220px;
}

.video-wrapper video,
.video-wrapper iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

.card-content {
    padding: 20px;
}

.card-tag {
    display: inline-block;
    padding: 4px 10px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    font-weight: bold;
    text-transform: uppercase;
    background-color: rgba(163, 174, 222, 0.15);
    color: var(--glow);
    border-radius: 10px;
    margin-bottom: 10px;
}

.card-content h3 {
    font-family: var(--font-display);
    font-size: 19px;
    color: var(--value);
    margin-bottom: 6px;
}

.card-date {
    font-size: 12px;
    color: #79839f;
    margin-bottom: 12px;
}

.card-content p {
    font-size: 14px;
    color: #c2cbdd;
    line-height: 1.5;
}

/* ================= FEATURES SECTION ================= */

.section-features {
    width: 100%;
    padding: 100px 20px;
    background-image:
        linear-gradient(to top, rgba(11, 14, 23, 0.86), rgba(11, 14, 23, 0.74)),
        url('images/mountains.background.webp');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    z-index: 2;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature-card {
    background-color: rgba(var(--panel), var(--panel-a));
    border: 2px solid var(--border);
    box-shadow: inset 0 0 0 3px var(--border-in);
    border-radius: 2px;
    padding: 25px 20px;
    text-align: center;
    transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: #4e5a80;
    box-shadow: inset 0 0 0 3px var(--border-in), 0 16px 34px -18px rgba(111, 124, 180, 0.4);
}

.feature-icon {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--glow);
}

.feature-card h3 {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.feature-card p {
    color: #bdc5d9;
    font-size: 0.92rem;
    line-height: 1.5;
}

/* ================= Footer ================= */
.site-footer {
    background-color: var(--void);
    border-top: 1px solid var(--border-in);
    color: #a3accb;
    margin-top: 0 !important;
    padding: 50px 20px 20px 20px;
    flex-shrink: 0;
    position: relative;
    z-index: 3;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr repeat(2, 1fr);
    gap: 40px;
}

.footer-brand .wiki-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-brand img {
    width: 32px;
    height: 32px;
}

.footer-brand span {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold);
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #8892b4;
}

.footer-col h4 {
    color: var(--label);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: #a3accb;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s var(--ease), padding-left 0.3s var(--ease);
}

.footer-col ul li a:hover {
    color: var(--gold-soft);
    padding-left: 4px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0 auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-in);
    text-align: center;
    font-size: 0.85rem;
    color: #6b7590;
}

.footer-bottom .disclaimer {
    margin-top: 5px;
    font-size: 0.75rem;
    color: #59637c;
}

/* RESPONSIVE LAYOUT FOR MOBILE */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

/* ================= WIKI ================= */
body {
    background:
        radial-gradient(ellipse 900px 520px at 50% -8%, rgba(111, 124, 180, 0.14), transparent 60%),
        linear-gradient(180deg, rgba(11, 14, 23, 0.72) 0%, rgba(11, 14, 23, 0.60) 45%, rgba(11, 14, 23, 0.90) 100%),
        url('images/mountains.background.webp') no-repeat center center fixed;
    background-size: cover;
    color: var(--value);
    font-family: var(--font-body);
    margin: 0;
    padding-top: 0;
}

.wiki-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: center;
}

.article-title {
    text-align: center;
    font-size: 30px;
    margin-bottom: 8px;
}

.intro-text {
    text-align: center;
    color: #a9b4cc;
    max-width: 700px;
    margin: 0 auto 30px auto;
}

.wiki-navbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(var(--panel), 0.92);
    backdrop-filter: blur(8px);
    padding: 0 30px;
    height: 70px;
    max-height: 70px;
    border-bottom: 2px solid var(--border);
    box-shadow: inset 0 0 0 3px var(--border-in);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
}
.wiki-logo {
    display: flex;
    align-items: center;
}

.wiki-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--gold);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
}

.wiki-logo img {
    height: 40px !important;
    width: auto;
    max-height: 40px;
    object-fit: contain;
}

.wiki-nav-menu {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-support-btn {
    padding: 9px 20px;
    font-size: 11px;
    color: var(--value);
    border-color: #464f78;
    flex-shrink: 0;
}

.nav-support-btn:hover {
    background-color: #232a3f;
    border-color: #8b95c9;
    color: #d5dcf2;
}

.wiki-nav-menu ul {
    list-style: none;
    display: flex;
    gap: 22px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.wiki-nav-menu a {
    color: var(--label);
    text-decoration: none;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 11.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.3s var(--ease);
}

.wiki-nav-menu a:hover,
.wiki-nav-menu a.active {
    color: var(--gold);
}

/* ================= WIKI SIDEBAR ================= */
.wiki-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 220px;
    height: 100vh;
    background: rgba(var(--panel), 0.95);
    border-right: 2px solid var(--border);
    box-shadow: inset -3px 0 0 var(--border-in);
    z-index: 999;
    padding: 20px 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.wiki-sidebar-content {
    flex: 1;
    padding: 0 15px;
}

.wiki-sidebar-home {
    padding: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.wiki-sidebar-home a {
    display: inline-block;
    padding: 10px 16px;
    background: rgba(163, 174, 222, 0.1);
    border: 1px solid var(--glow);
    color: var(--gold);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 3px;
    transition: all 0.3s var(--ease);
}

.wiki-sidebar-home a:hover {
    background: rgba(163, 174, 222, 0.2);
    border-color: var(--gold);
    box-shadow: 0 0 8px rgba(163, 174, 222, 0.4);
}

.wiki-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wiki-sidebar-menu li {
    margin-bottom: 8px;
}

.wiki-sidebar-menu a {
    display: block;
    padding: 10px 12px;
    color: var(--label);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-left: 3px solid transparent;
    transition: all 0.3s var(--ease);
}

.wiki-sidebar-menu a:hover,
.wiki-sidebar-menu a.active {
    color: var(--gold);
    border-left-color: var(--gold);
    background: rgba(201, 174, 106, 0.08);
    padding-left: 16px;
}

.wiki-main-content {
    margin-left: 220px;
    padding-top: 20px;
}

@media (max-width: 900px) {
    .wiki-sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 2px solid var(--border);
        box-shadow: inset 0 -3px 0 var(--border-in);
        padding: 14px 0;
    }
    .wiki-sidebar-content {
        padding: 0 12px;
    }
    .wiki-sidebar-home {
        padding: 0 0 12px 0;
        margin-bottom: 12px;
    }
    .wiki-sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }
    .wiki-sidebar-menu li {
        margin-bottom: 0;
    }
    .wiki-sidebar-menu a {
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 8px 10px;
    }
    .wiki-sidebar-menu a:hover,
    .wiki-sidebar-menu a.active {
        border-left-color: transparent;
        border-bottom-color: var(--gold);
        padding-left: 10px;
    }
    .wiki-main-content {
        margin-left: 0;
        padding-top: 12px;
    }
    .wiki-grid-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .wiki-sidebar-menu a {
        font-size: 10px;
        padding: 7px 8px;
    }
}

.search-form {
    display: flex;
    align-items: center;
    background: rgba(var(--panel), 0.7);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 10px;
}

.search-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--value);
    padding: 6px 8px;
}

.wiki-grid-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 25px;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.wiki-infobox {
    background: rgba(var(--panel), var(--panel-a));
    border: 1px solid var(--border-in);
    border-radius: 2px;
    padding: 15px;
}

.lore-quote {
    font-style: italic;
    background: rgba(163, 174, 222, 0.05);
    border-left: 4px solid var(--glow);
    padding: 12px 18px;
}

.wiki-category-section {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-in);
}

.category-header {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 22px;
    margin-bottom: 6px;
}

.category-desc {
    color: #a9b4cc;
    font-size: 14px;
    margin-bottom: 20px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    justify-content: center;
    margin-top: 30px;
}

.wiki-card {
    background: rgba(var(--panel), var(--panel-a));
    backdrop-filter: blur(4px);
    border: 1px solid var(--border);
    box-shadow: inset 0 0 0 3px var(--border-in);
    border-radius: 2px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.wiki-card:hover {
    transform: translateY(-4px);
    border-color: #4e5a80;
    box-shadow: inset 0 0 0 3px var(--border-in), 0 12px 30px -14px rgba(163, 174, 222, 0.4);
}

.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 0.06em;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.rank-dormant      { background: rgba(138, 147, 166, 0.12); color: var(--tier-dormant); border: 1px solid var(--tier-dormant); }
.rank-awakened      { background: rgba(63, 207, 142, 0.12); color: var(--tier-awakened); border: 1px solid var(--tier-awakened); }
.rank-ascended      { background: rgba(91, 155, 240, 0.12); color: var(--tier-ascended); border: 1px solid var(--tier-ascended); }
.rank-transcendent  { background: rgba(163, 174, 222, 0.12); color: var(--tier-transcendent); border: 1px solid var(--tier-transcendent); }
.rank-supreme       { background: rgba(224, 85, 90, 0.12); color: var(--tier-supreme); border: 1px solid var(--tier-supreme); }
.rank-sacred        { background: rgba(209, 71, 122, 0.12); color: var(--tier-sacred); border: 1px solid var(--tier-sacred); }
.rank-divine        { background: rgba(201, 174, 106, 0.12); color: var(--tier-divine); border: 1px solid var(--tier-divine); box-shadow: 0 0 8px -2px rgba(201, 174, 106, 0.5); }

.card-image {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 4px;
}

.card-image img {
    max-height: 90px;
    max-width: 90px;
    object-fit: contain;
}

.card-info h3 {
    margin: 0 0 4px 0;
    font-family: var(--font-display);
    font-size: 15px;
    color: var(--value);
}

.card-type {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--glow);
    margin: 0 0 8px 0;
    font-weight: 500;
}

.card-snippet {
    font-size: 12px;
    color: #a9b4cc;
    margin: 0;
    line-height: 1.4;
}

/* ================= INDIVIDUAL PAGE HELPER STYLES ================= */

.back-link {
    display: inline-block;
    color: var(--glow);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 15px;
    transition: opacity 0.3s var(--ease);
}

.back-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.ability-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.ability-list li {
    background: rgba(163, 174, 222, 0.04);
    border-left: 3px solid var(--glow);
    padding: 10px 14px;
    margin-bottom: 10px;
    border-radius: 0 4px 4px 0;
}

.ability-list strong {
    color: var(--glow);
}

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

.filter-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.filter-btn {
    background: rgba(var(--panel), 0.4);
    color: #bcc4da;
    font-family: var(--font-mono);
    border: 1px solid var(--border-in);
    padding: 7px 16px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 11px;
    letter-spacing: 0.05em;
    font-weight: 500;
    transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.filter-btn:hover {
    border-color: var(--label);
    color: var(--value);
}

.filter-btn.active {
    background: rgba(201, 174, 106, 0.08);
    color: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 0 10px -2px rgba(201, 174, 106, 0.5);
    font-weight: bold;
}

.filter-group {
    margin-bottom: 20px;
    text-align: center;
}

.filter-label {
    display: block;
    color: var(--label);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.wiki-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.info-block {
    background: rgba(var(--panel), var(--panel-a));
    backdrop-filter: blur(4px);
    border: 1px solid var(--border);
    box-shadow: inset 0 0 0 3px var(--border-in);
    border-radius: 2px;
    padding: 24px;
    text-align: center;
}

.info-block h2 {
    font-family: var(--font-display);
    color: var(--gold);
    margin-top: 0;
    margin-bottom: 12px;
}

.info-block p {
    color: #c2cbdd;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.team-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.team-member {
    background: rgba(57, 65, 94, 0.15);
    border: 1px solid var(--border-in);
    border-radius: 3px;
    padding: 16px;
    min-width: 180px;
    transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
}

.team-member:hover {
    border-color: var(--label);
    transform: translateY(-2px);
}

.team-member h4 {
    margin: 8px 0 4px 0;
    color: var(--value);
}

.team-member p {
    font-size: 13px;
    color: #a9b4cc;
}

.role-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 8px;
    border-radius: 10px;
    background: rgba(163, 174, 222, 0.15);
    color: var(--glow);
}

.role-badge.leader {
    background: rgba(201, 174, 106, 0.15);
    color: var(--gold-soft);
}

.directory-heading {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 10px;
}

.search-container {
    margin: 20px auto 30px auto;
    max-width: 500px;
    width: 100%;
}

#search-input {
    width: 100%;
    padding: 12px 20px;
    background: rgba(var(--panel), 0.7);
    border: 1px solid var(--border);
    border-radius: 25px;
    color: var(--value);
    font-family: var(--font-body);
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
    text-align: center;
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s var(--ease);
}

#search-input:focus {
    border-color: var(--glow);
    box-shadow: 0 0 0 3px rgba(163, 174, 222, 0.15);
    background: rgba(var(--panel), 0.95);
}

#search-input::placeholder {
    color: #666f88;
}

/* ================= DREAM REALM ATLAS MAP ================= */

.atlas-map-section {
    margin: 10px auto 40px auto;
    max-width: 1000px;
}

.atlas-map-panel {
    background: rgba(var(--panel), var(--panel-a));
    backdrop-filter: blur(4px);
    border: 1px solid var(--border);
    box-shadow: inset 0 0 0 3px var(--border-in);
    border-radius: 2px;
    padding: 24px 24px 16px 24px;
}

.atlas-map-title {
    font-size: 22px;
    margin: 0 0 4px 0;
    letter-spacing: 1px;
}

.atlas-map-sub {
    color: #a9b4cc;
    font-size: 14px;
    margin: 0 0 18px 0;
}

.atlas-map-frame {
    width: 100%;
    height: 72vh;
    min-height: 420px;
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    background: var(--void);
}

.atlas-map-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.atlas-map-frame.map-locked {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse 500px 300px at 50% 50%, rgba(111, 124, 180, 0.1), transparent 70%),
        var(--void);
}

.map-locked-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.map-locked-icon {
    font-size: 40px;
    opacity: 0.8;
    filter: drop-shadow(0 0 12px rgba(163, 174, 222, 0.4));
}

.map-locked-label {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--label);
}

.atlas-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
}

.legend-chip {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: 10px;
}

.legend-complete { background: rgba(63, 207, 142, 0.12); color: var(--tier-awakened); border: 1px solid var(--tier-awakened); }
.legend-progress { background: rgba(201, 174, 106, 0.12); color: var(--gold); border: 1px solid var(--gold); }
.legend-planned  { background: rgba(138, 147, 166, 0.1); color: var(--tier-dormant); border: 1px solid var(--tier-dormant); }

.atlas-footnote {
    color: #666f88;
    font-size: 12px;
    font-style: italic;
    text-align: center;
    margin: 14px 0 4px 0;
}

/* ================= ARCHIVE CARDS (Aspects / Memories / Creatures) =================
   Data-driven pages (aspects.html, memories.html, creatures.html) render into
   #*-grid containers via a small inline script — see each page's own <script>. */

.search-shell { position: relative; margin: 20px auto 24px auto; max-width: 560px; width: 100%; }
.search-shell input {
    width: 100%;
    background: rgba(var(--panel), 0.7);
    border: 1px solid var(--border);
    color: var(--value);
    padding: 12px 16px 12px 38px;
    font-family: var(--font-body);
    font-size: 14px;
    border-radius: 3px;
    outline: none;
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.search-shell input:focus { border-color: var(--glow); box-shadow: 0 0 0 3px rgba(163, 174, 222, 0.15); }
.search-shell input::placeholder { color: #666f88; }
.search-shell .glyph { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--label); font-size: 14px; }

.entry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 20px; }
.entry-card {
    padding: 18px 18px 16px;
    text-align: left;
    align-items: flex-start;
    transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.entry-card:hover {
    transform: translateY(-3px);
    border-color: #4e5a80;
    box-shadow: inset 0 0 0 3px var(--border-in), 0 12px 30px -14px rgba(163, 174, 222, 0.4);
}
.rank-pill {
    position: absolute;
    top: 14px;
    right: 14px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 10px;
    border: 1px solid;
    background: rgba(0, 0, 0, 0.3);
}
.rank-pill.tier-dormant      { color: var(--tier-dormant); border-color: var(--tier-dormant); }
.rank-pill.tier-awakened     { color: var(--tier-awakened); border-color: var(--tier-awakened); }
.rank-pill.tier-ascended     { color: var(--tier-ascended); border-color: var(--tier-ascended); }
.rank-pill.tier-transcendent { color: var(--tier-transcendent); border-color: var(--tier-transcendent); }
.rank-pill.tier-supreme      { color: var(--tier-supreme); border-color: var(--tier-supreme); }
.rank-pill.tier-sacred       { color: var(--tier-sacred); border-color: var(--tier-sacred); }
.rank-pill.tier-divine       { color: var(--tier-divine); border-color: var(--tier-divine); box-shadow: 0 0 8px -2px rgba(201, 174, 106, 0.6); }
.rank-pill.tier-below-mundane { color: var(--tier-below-mundane); border-color: var(--tier-below-mundane); }
.rank-pill.tier-cursed       { color: var(--c-cursed); border-color: var(--c-cursed); }
.rank-pill.c-dormant   { color: var(--c-dormant); border-color: var(--c-dormant); }
.rank-pill.c-awakened  { color: var(--c-awakened); border-color: var(--c-awakened); }
.rank-pill.c-fallen    { color: var(--c-fallen); border-color: var(--c-fallen); }
.rank-pill.c-corrupted { color: var(--c-corrupted); border-color: var(--c-corrupted); }
.rank-pill.c-great     { color: var(--c-great); border-color: var(--c-great); }
.rank-pill.c-cursed    { color: var(--c-cursed); border-color: var(--c-cursed); }
.rank-pill.c-unholy    { color: var(--c-unholy); border-color: var(--c-unholy); box-shadow: 0 0 8px -2px rgba(255, 69, 104, 0.6); }

.entry-card h3 { font-family: var(--font-display); color: var(--value); font-size: 15px; margin: 4px 0 4px; padding-right: 78px; line-height: 1.3; }
.entry-card .type { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--glow); margin-bottom: 8px; display: block; }
.entry-card p.desc { font-size: 12.5px; color: #a9b4cc; line-height: 1.55; }
.empty-result { grid-column: 1 / -1; text-align: center; padding: 30px; color: #666f88; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.05em; }

.archive-count { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: #79839f; text-align: center; margin-top: 16px; }

.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 24px; }
.pager-btn {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 7px 16px;
    border: 1px solid var(--border-in);
    background: rgba(var(--panel), 0.4);
    color: #bcc4da;
    cursor: pointer;
    border-radius: 3px;
    transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.pager-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); transform: translateY(-1px); }
.pager-btn:disabled { opacity: 0.3; cursor: default; }
.pager-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--label); min-width: 84px; text-align: center; }

/* ================= ARCHIVE TEASER (homepage) ================= */

.section-teaser {
    width: 100%;
    padding: 60px 20px;
    background-image: linear-gradient(to top, rgba(11, 14, 23, 0.88), rgba(11, 14, 23, 0.78)), url('images/mountains.background.webp');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    z-index: 2;
}

.archive-teaser {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 22px 28px;
    flex-wrap: wrap;
    background: rgba(var(--panel), var(--panel-a));
    border: 2px solid var(--border);
    box-shadow: inset 0 0 0 3px var(--border-in);
    border-radius: 2px;
    transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.archive-teaser:hover { border-color: #4e5a80; transform: translateY(-2px); }
.archive-teaser .glyph-cluster { display: flex; flex-shrink: 0; }
.archive-teaser .glyph-cluster span {
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
    box-shadow: inset 0 0 0 2px var(--border-in), 0 0 0 4px var(--void);
    display: flex; align-items: center; justify-content: center; font-size: 17px; background: rgba(var(--panel), 0.95);
}
.archive-teaser .glyph-cluster span:not(:first-child) { margin-left: -14px; }
.archive-teaser .glyph-cluster span:nth-child(1) { color: var(--glow); }
.archive-teaser .glyph-cluster span:nth-child(2) { color: var(--gold-soft); }
.archive-teaser .glyph-cluster span:nth-child(3) { color: var(--value); }
.archive-teaser .body { flex: 1; min-width: 220px; }
.archive-teaser .eyebrow { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--label); margin-bottom: 6px; }
.archive-teaser h3 { font-family: var(--font-display); color: var(--gold); font-size: 21px; margin-bottom: 4px; }
.archive-teaser p { font-size: 13px; color: #b0bad6; }
.archive-teaser .open-link {
    display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--gold); text-decoration: none; flex-shrink: 0;
    transition: gap 0.35s var(--ease), color 0.35s var(--ease);
}
.archive-teaser .open-link:hover { gap: 14px; color: var(--gold-soft); }
.archive-teaser .open-link .arrow-ring {
    width: 26px; height: 26px; border: 1px solid var(--gold); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; transition: border-color 0.35s var(--ease);
}
.archive-teaser .open-link:hover .arrow-ring { border-color: var(--gold-soft); }

@media (max-width: 640px) {
    .archive-teaser { text-align: center; justify-content: center; }
}

/* ================= RULES: table of contents + numbered thread ================= */

.rules-layout { display: grid; grid-template-columns: 240px 1fr; gap: 26px; align-items: start; max-width: 1000px; margin: 0 auto; }
.toc-panel {
    background: rgba(var(--panel), var(--panel-a));
    border: 1px solid var(--border);
    box-shadow: inset 0 0 0 3px var(--border-in);
    border-radius: 2px;
    padding: 20px 22px;
    position: sticky;
    top: 20px;
    text-align: left;
}
.toc-panel h4 { font-family: var(--font-display); color: var(--gold); font-size: 14px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border-in); }
.toc-list { display: flex; flex-direction: column; gap: 11px; }
.toc-list a { display: flex; gap: 10px; font-size: 12.5px; color: #bcc4da; text-decoration: none; transition: color 0.3s var(--ease); }
.toc-list a:hover, .toc-list a.active { color: var(--gold); }
.toc-list .num { font-family: var(--font-mono); color: var(--label); flex-shrink: 0; width: 14px; }

.rules-thread { display: flex; flex-direction: column; text-align: left; }
.rule-item { display: flex; gap: 20px; padding-bottom: 30px; position: relative; }
.rule-item::before { content: ''; position: absolute; left: 20px; top: 46px; bottom: -4px; width: 1px; background: var(--border-in); }
.rule-item:last-child::before { display: none; }
.rule-item .num-box {
    flex-shrink: 0; width: 42px; height: 42px; border: 1px solid var(--border); box-shadow: inset 0 0 0 2px var(--border-in);
    display: flex; align-items: center; justify-content: center; font-family: var(--font-display); color: var(--gold);
    font-size: 16px; z-index: 1; background: rgba(var(--panel), 0.95);
}
.rule-item .rule-content { padding-top: 6px; }
.rule-item .rule-content h2 { font-family: var(--font-display); color: var(--value); font-size: 16px; margin-bottom: 6px; }
.rule-item .rule-content p { font-size: 13px; color: #a9b4cc; line-height: 1.6; }

@media (max-width: 780px) {
    .rules-layout { grid-template-columns: 1fr; }
    .toc-panel { position: static; }
}

/* ================= CHANGELOG FEED ================= */

.changelog-feed {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: rgba(var(--panel), var(--panel-a));
    border: 1px solid var(--border);
    box-shadow: inset 0 0 0 3px var(--border-in);
    border-radius: 2px;
    padding: 8px 26px 4px;
}
.changelog-entry { padding: 18px 6px; border-bottom: 1px solid var(--border-in); display: flex; flex-direction: column; gap: 5px; text-align: left; }
.changelog-entry:first-child { padding-top: 18px; }
.changelog-entry:last-child { border-bottom: none; }
.changelog-entry .date { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); }
.changelog-entry h2 { font-family: var(--font-display); color: var(--value); font-size: 17px; }
.changelog-entry p { font-size: 13px; color: #a9b4cc; }
.changelog-entry .read-more {
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--glow);
    text-decoration: none; margin-top: 2px; display: inline-block; width: fit-content; transition: color 0.3s var(--ease);
}
.changelog-entry .read-more:hover { color: var(--gold-soft); }
.show-more-wrap { text-align: center; margin: 24px 0 4px; }

/* ================= 404 ERROR PAGE ================= */

.error-panel {
    max-width: 700px;
    margin: 40px auto;
    padding: 70px 32px;
    text-align: center;
    background: rgba(var(--panel), var(--panel-a));
    border: 2px solid var(--border);
    box-shadow: inset 0 0 0 3px var(--border-in);
    border-radius: 2px;
}
.error-num {
    font-family: var(--font-display); font-weight: 700; font-size: 120px; line-height: 1;
    color: var(--border); opacity: 0.65; margin-bottom: 4px;
    filter: drop-shadow(0 0 18px rgba(111, 124, 180, 0.35));
}
.error-rule { width: 60px; height: 1px; background: var(--border-in); margin: 20px auto 26px; }
.error-panel h1 { margin-bottom: 12px; }
.error-panel p.lede { max-width: 46ch; margin: 0 auto 24px; color: #cbd3ea; line-height: 1.65; font-size: 14.5px; }

/* ================= FAQ PAGE ================= */

.loop-flow { display: flex; flex-direction: column; margin: 16px 0 6px; text-align: left; }
.loop-step {
    display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: start;
    background: rgba(var(--panel), 0.55); border: 1px solid var(--border-in); border-radius: 2px;
    padding: 14px 18px; margin-bottom: 10px;
    transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.loop-step:hover { border-color: var(--glow); transform: translateX(3px); }
.step-num {
    width: 32px; height: 32px; border: 1px solid var(--gold); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); color: var(--gold); font-size: 13px; font-weight: 700;
    background: rgba(201, 174, 106, 0.08); flex-shrink: 0;
}
.step-body h3 { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--value); margin-bottom: 4px; }
.step-body p { font-size: 13.5px; color: #a9b4cc; line-height: 1.55; }

.trial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 18px 0; text-align: left; }
.trial-card {
    background: rgba(var(--panel), var(--panel-a)); border: 1px solid var(--border);
    box-shadow: inset 0 0 0 3px var(--border-in); border-radius: 2px; padding: 20px 18px;
    transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.trial-card:hover { transform: translateY(-3px); border-color: #4e5a80; }
.trial-glyph { font-size: 20px; color: var(--glow); margin-bottom: 10px; display: block; }
.trial-card h3 { font-family: var(--font-display); color: var(--gold); font-size: 16px; margin-bottom: 6px; }
.trial-tag { display: inline-block; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--glow); background: rgba(163, 174, 222, 0.12); border-radius: 10px; padding: 3px 9px; margin-bottom: 10px; }
.trial-card p { font-size: 13px; color: #bdc5d9; line-height: 1.6; }

.recipe-wrap { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; margin: 18px 0; text-align: left; }
.recipe-panel {
    background: rgba(var(--panel), var(--panel-a)); border: 1px solid var(--border);
    box-shadow: inset 0 0 0 3px var(--border-in); border-radius: 2px; padding: 22px;
}
.recipe-grid { display: grid; grid-template-columns: repeat(3, 52px); grid-template-rows: repeat(3, 52px); gap: 4px; }
.recipe-cell { display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 10px; text-align: center; border: 1px solid var(--border-in); border-radius: 2px; background: rgba(0,0,0,0.25); color: var(--label); line-height: 1.15; padding: 2px; }
.recipe-cell.iron { color: #ccd3e0; border-color: #69728a; background: rgba(138, 147, 173, 0.12); }
.recipe-cell.glass { color: #9fd6e8; border-color: #3d6b78; background: rgba(63, 150, 175, 0.1); }
.recipe-cell.wool { color: var(--gold-soft); border-color: var(--gold); background: rgba(201, 174, 106, 0.1); }
.recipe-key { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: #c2cbdd; min-width: 200px; }
.recipe-key li { list-style: none; display: flex; gap: 8px; align-items: center; }
.recipe-swatch { width: 12px; height: 12px; border-radius: 2px; flex-shrink: 0; }
.recipe-swatch.iron { background: #8a93ad; }
.recipe-swatch.glass { background: #3f96af; }
.recipe-swatch.wool { background: var(--gold); }
.recipe-note { font-size: 12.5px; color: #79839f; font-family: var(--font-mono); margin-top: 12px; max-width: 60ch; }

.rank-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13px; text-align: left; }
.rank-table th, .rank-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border-in); }
.rank-table th { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--label); }
.rank-name { font-family: var(--font-display); font-weight: 700; }
.rank-name.r-dreamer { color: var(--tier-dormant); }
.rank-name.r-awakened { color: var(--tier-awakened); }
.rank-name.r-ascended { color: var(--tier-ascended); }
.rank-name.r-transcendent { color: var(--tier-transcendent); }
.rank-name.r-supreme { color: var(--tier-supreme); }
.rank-name.r-sacred { color: var(--tier-sacred); }
.rank-name.r-divine { color: var(--tier-divine); }
.rank-table td:last-child { color: #a9b4cc; }

.key-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 16px 0; text-align: left; }
.key-row { display: flex; justify-content: space-between; gap: 14px; background: rgba(var(--panel), 0.5); border: 1px solid var(--border-in); border-radius: 2px; padding: 10px 14px; font-size: 12.5px; }
.key-row .k-name { color: var(--value); }
.key-row .k-hint { font-family: var(--font-mono); font-size: 10.5px; color: var(--label); text-transform: uppercase; letter-spacing: 0.04em; }

.qa-list { display: flex; flex-direction: column; gap: 14px; margin: 16px 0; text-align: left; }
.qa-item { background: rgba(163, 174, 222, 0.04); border-left: 3px solid var(--glow); border-radius: 0 4px 4px 0; padding: 14px 18px; }
.qa-item h3 { font-size: 14px; color: var(--glow); margin-bottom: 5px; }
.qa-item p { font-size: 13.5px; color: #c2cbdd; line-height: 1.6; }


/* ================= ASPECT ABILITY ARCHIVE =================
   /aspects/<slug> — one page per Aspect, its abilities laid out along the
   soul-rank ladder from Dreamer to Transcended. Rank colour is carried by a
   single --step custom property set on .ladder-step, so the spine node, the
   rank heading and every ability card tint from one declaration. */

/* The whole page reads down the ability column: heading, meta and blurb sit
   flush-left with the ladder rather than centred over the full width. */
.aspect-page { text-align: left; }
.aspect-page .article-title {
    text-align: left;
    font-size: 27px;
    margin-bottom: 12px;
}
/* The site-wide "≈ Title ≈" wrap only reads as a wrap when it is centred. */
.aspect-page .article-title::before,
.aspect-page .article-title::after { content: none; }
.aspect-page .intro-text {
    text-align: left;
    max-width: 68ch;
    margin: 0 0 26px;
    line-height: 1.65;
}

.aspect-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.aspect-meta .rank-pill { position: static; top: auto; right: auto; }
.aspect-meta-type {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--glow);
}
.aspect-meta-theme {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--label);
}

.aspect-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 26px;
    align-items: start;
    margin-top: 14px;
}

.ladder-title {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 19px;
    letter-spacing: 0.04em;
    padding-top: 20px;
    border-top: 1px solid var(--border-in);
}
.ladder-intro {
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.03em;
    color: #79839f;
    max-width: 62ch;
    margin: 6px 0 22px;
    line-height: 1.6;
}

/* A pre-template Aspect kept registered for existing bearers. */
.aspect-note {
    font-size: 12.5px;
    line-height: 1.6;
    color: #a9b4cc;
    max-width: 68ch;
    margin: 0 0 26px;
    padding: 11px 14px;
    background: rgba(201, 174, 106, 0.06);
    border-left: 3px solid var(--gold);
    border-radius: 0 3px 3px 0;
}

/* ---- innate abilities: Divine-only, held outside the rank ladder ---- */
.innate-block {
    --step: var(--gold);
    margin-bottom: 30px;
}
.innate-title {
    font-family: var(--font-display);
    font-size: 17px;
    letter-spacing: 0.08em;
    color: var(--gold);
    margin-bottom: 3px;
}
.innate-note {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--label);
    margin-bottom: 13px;
}

/* ---- the ladder spine ---- */
.ability-ladder { position: relative; }
.ability-ladder::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg,
        var(--tier-dormant) 0%,
        var(--tier-awakened) 33%,
        var(--tier-ascended) 66%,
        var(--tier-transcendent) 100%);
    opacity: 0.45;
}

.ladder-step {
    position: relative;
    padding-left: 32px;
    margin-bottom: 30px;
    scroll-margin-top: 20px;
}
.ladder-step:last-child { margin-bottom: 0; }
.ladder-step.t-dormant      { --step: var(--tier-dormant); }
.ladder-step.t-awakened     { --step: var(--tier-awakened); }
.ladder-step.t-ascended     { --step: var(--tier-ascended); }
.ladder-step.t-transcendent { --step: var(--tier-transcendent); }

.ladder-mark {
    position: absolute;
    left: 0;
    top: 4px;
    width: 16px;
    height: 16px;
    transform: rotate(45deg);
    background: var(--void);
    border: 2px solid var(--step);
    box-shadow: 0 0 10px -3px var(--step);
}

.ladder-rank {
    font-family: var(--font-display);
    font-size: 17px;
    letter-spacing: 0.08em;
    color: var(--step);
    margin-bottom: 3px;
}
.ladder-note {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--label);
    margin-bottom: 13px;
}
.ladder-empty {
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.05em;
    color: #666f88;
    padding: 12px 0;
}

/* ---- one ability ---- */
.ability-entry {
    background: rgba(var(--panel), var(--panel-a));
    border: 1px solid var(--border-in);
    border-left: 3px solid var(--step);
    border-radius: 0 3px 3px 0;
    padding: 15px 17px;
    margin-bottom: 11px;
    transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.ability-entry:last-child { margin-bottom: 0; }
.ability-entry:hover {
    transform: translateX(4px);
    border-color: #4e5a80;
    border-left-color: var(--step);
    box-shadow: 0 14px 30px -18px rgba(163, 174, 222, 0.55);
}
.ability-entry h3 {
    font-family: var(--font-display);
    font-size: 15.5px;
    color: var(--value);
    line-height: 1.3;
    margin-bottom: 7px;
}
.ability-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 9px;
}
.ability-tag {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--label);
    border: 1px solid var(--border-in);
    border-radius: 2px;
    padding: 2px 7px;
    background: rgba(0, 0, 0, 0.25);
}
.ability-entry p {
    font-size: 13px;
    color: #a9b4cc;
    line-height: 1.62;
}
.ability-evo {
    margin-top: 9px;
    font-family: var(--font-mono);
    font-size: 10.5px !important;
    letter-spacing: 0.04em;
    color: var(--gold) !important;
}

/* ---- infobox ---- */
.aspect-infobox {
    position: sticky;
    top: 20px;
    border: 1px solid var(--border);
    box-shadow: inset 0 0 0 3px var(--border-in);
    padding: 18px;
}
.infobox-header {
    border-bottom: 1px solid var(--border-in);
    padding-bottom: 11px;
    margin-bottom: 12px;
}
.infobox-header h3 {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 16px;
    line-height: 1.3;
}
.infobox-subtitle {
    display: block;
    margin-top: 3px;
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--label);
}
.infobox-table { width: 100%; border-collapse: collapse; }
.infobox-table th {
    text-align: left;
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 400;
    color: var(--label);
    padding: 8px 8px 8px 0;
    width: 46%;
    vertical-align: middle;
}
.infobox-table td {
    text-align: right;
    font-size: 12.5px;
    color: var(--value);
    padding: 8px 0;
    vertical-align: middle;
}
.infobox-table td .rank-pill { position: static; top: auto; right: auto; }
.infobox-table tr + tr th,
.infobox-table tr + tr td { border-top: 1px solid rgba(57, 65, 94, 0.32); }

.infobox-jump {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 15px;
    padding-top: 13px;
    border-top: 1px solid var(--border-in);
}
.infobox-jump-label {
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--label);
    margin-bottom: 2px;
}
.infobox-jump a {
    font-size: 12.5px;
    text-decoration: none;
    padding: 6px 10px;
    border: 1px solid var(--border-in);
    border-left-width: 3px;
    border-radius: 0 2px 2px 0;
    transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.infobox-jump a:hover { background: rgba(163, 174, 222, 0.09); border-color: #4e5a80; }
.infobox-jump a.t-dormant      { color: var(--tier-dormant);      border-left-color: var(--tier-dormant); }
.infobox-jump a.t-awakened     { color: var(--tier-awakened);     border-left-color: var(--tier-awakened); }
.infobox-jump a.t-ascended     { color: var(--tier-ascended);     border-left-color: var(--tier-ascended); }
.infobox-jump a.t-transcendent { color: var(--tier-transcendent); border-left-color: var(--tier-transcendent); }
.infobox-jump a.t-dormant:hover      { border-color: var(--tier-dormant); }
.infobox-jump a.t-awakened:hover     { border-color: var(--tier-awakened); }
.infobox-jump a.t-ascended:hover     { border-color: var(--tier-ascended); }
.infobox-jump a.t-transcendent:hover { border-color: var(--tier-transcendent); }

/* ---- prev / next ---- */
.aspect-page-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid var(--border-in);
}
.aspect-page-nav a {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--glow);
    text-decoration: none;
    transition: color 0.3s var(--ease);
}
.aspect-page-nav a:hover { color: var(--gold); }

/* ---- archive cards link through to the ability pages ---- */
a.entry-card {
    display: block;
    text-decoration: none;
    color: inherit;
}
.entry-card .card-more {
    display: block;
    margin-top: 11px;
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--label);
    transition: color 0.4s var(--ease);
}
a.entry-card:hover .card-more { color: var(--gold); }

@media (max-width: 900px) {
    .aspect-layout { grid-template-columns: 1fr; }
    .aspect-infobox { position: static; }
    .infobox-jump { display: none; }
}

@media (max-width: 480px) {
    .ladder-step { padding-left: 26px; }
    .ability-entry { padding: 13px 14px; }
    .aspect-page-nav { flex-direction: column; align-items: flex-start; }
}
