/* ============================================================
   INFO PAGE (info-*)
   ============================================================ */

.info-page {
    margin-bottom: 32px;
}

/* One continuous document shell (TOC + all chapters) */
.info-doc {
    border: 1px solid var(--dh-border);
    border-radius: 12px;
    background: var(--dh-bg-card);
    overflow: hidden;
    margin-bottom: 28px;
    box-sizing: border-box;
}
html.dark-mode .info-doc {
    background: var(--ark-bg-1);
    border-color: var(--ark-bg-1);
}

.info-doc > .info-toc {
    margin: 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--dh-border);
    background: var(--dh-bg-secondary);
}
html.dark-mode .info-doc > .info-toc {
    background: var(--ark-bg-1);
    border-color: var(--ark-bg-1);
}

.info-doc > .info-section {
    margin: 0;
    padding: 22px 24px 24px;
    border-bottom: 1px solid var(--dh-border);
}
.info-doc > .info-section:last-of-type {
    border-bottom: none;
}

.info-doc > .info-section--hero {
    padding: 20px 24px 22px;
}
.info-doc .info-hero {
    margin-bottom: 0;
}

.info-doc > .info-page__guides-anchor {
    margin: 0;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--dh-border);
}

.info-doc .info-guide {
    margin-bottom: 20px;
}
.info-doc .info-guide:last-child {
    margin-bottom: 0;
}
.info-doc .info-guide .info-section-title {
    margin-top: 0;
}
.info-doc .info-guide + .info-guide .info-section-title {
    margin-top: 4px;
}

.info-doc > .info-section > .info-section-title:first-child {
    margin-top: 0;
}

.info-page__guides-anchor {
    scroll-margin-top: 72px;
}

.info-section {
    scroll-margin-top: 72px;
}
.info-section--hero {
    scroll-margin-top: 64px;
}
.info-section--last {
    margin-bottom: 0;
}

/* In-page navigation */
.info-toc {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin: 0 0 22px;
    padding: 12px 16px;
    background: var(--dh-bg-card);
    border: 1px solid var(--dh-border);
    border-radius: 10px;
}
html.dark-mode .info-toc {
    background: var(--ark-bg-1);
    border-color: var(--ark-bg-1);
}
.info-toc-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.45px;
    color: var(--dh-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.info-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.info-toc-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 600;
    color: var(--dh-text);
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid var(--dh-border);
    background: var(--dh-bg-secondary);
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.info-toc-link:hover {
    border-color: var(--dh-accent);
    color: var(--dh-accent);
}
.info-toc-link:focus-visible {
    outline: 2px solid var(--dh-accent);
    outline-offset: 2px;
}
html.dark-mode .info-toc-link {
    background: var(--ark-bg-1);
    border-color: var(--ark-bg-1);
}

.info-section-lead {
    margin: -8px 0 18px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--dh-text-muted);
    max-width: 62ch;
}

.info-hero {
    background: linear-gradient(135deg, var(--ark-bg-1) 0%, rgba(87, 182, 230, .18) 100%);
    border-radius: 10px;
    padding: 40px 36px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.info-hero-text { flex: 1; }
.info-hero-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    font-family: 'Cinzel', serif;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.info-hero-sub {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    max-width: 700px;
    margin: 0;
}

.info-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.info-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
}
.info-hero-badge .bi {
    font-size: 13px;
    opacity: 0.85;
}

.info-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dh-accent);
    margin: 28px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--dh-border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.info-section > .info-section-title:first-child {
    margin-top: 0;
}
html.dark-mode .info-section-title { border-color: var(--ark-bg-1); }

/* Server Rates Grid */
.info-rates-grid {
    display: grid;
    width: 100%;
    align-items: stretch;
    /* auto-fit collapses empty tracks so the row fills the width (auto-fill leaves gaps) */
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.info-rate-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100%;
    box-sizing: border-box;
    background: var(--dh-bg-card);
    border: 1px solid var(--dh-border);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    transition: border-color .2s, transform .15s;
}
.info-rate-card:hover { border-color: var(--dh-accent); transform: translateY(-2px); }
html.dark-mode .info-rate-card { background: var(--ark-bg-1); border-color: var(--ark-bg-1); }
.info-rate-icon { font-size: 22px; margin-bottom: 6px; }
.info-rate-label { font-size: 11px; color: var(--dh-text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .4px; }
.info-rate-value { font-size: 20px; font-weight: 700; color: var(--dh-gold); }
.info-rate-value--sm { font-size: 14px; line-height: 1.3; }
.info-rates-footnote {
    margin: 0 0 24px;
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 400;
    color: var(--dh-text-muted);
    line-height: 1.5;
    background: var(--dh-bg-secondary);
    border: 1px solid var(--dh-border);
    border-radius: 8px;
    border-left: 3px solid var(--dh-accent);
}
html.dark-mode .info-rates-footnote {
    background: var(--ark-bg-1);
    border-color: var(--ark-bg-1);
}

/* Server guide / economy — unified panel (see .info-guide-panel) */
.info-guide {
    margin-bottom: 8px;
}

/* Long-form guide chapters inside one card */
.info-guide-panel {
    width: 100%;
    border: 1px solid var(--dh-border);
    border-radius: 10px;
    background: var(--dh-bg-secondary);
    padding: 2px 18px 14px;
    box-sizing: border-box;
}
html.dark-mode .info-guide-panel {
    background: var(--ark-bg-1);
    border-color: var(--ark-bg-1);
}

.info-guide-panel__section {
    padding: 16px 0;
    border-bottom: 1px solid var(--dh-border);
}
.info-guide-panel__section--last,
.info-guide-panel__section:last-of-type {
    border-bottom: none;
    padding-bottom: 6px;
}

.info-guide-panel__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--dh-text);
    line-height: 1.25;
    text-transform: none;
    letter-spacing: 0.02em;
    font-family: inherit;
}
.info-guide-panel__icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.info-guide-panel__body .info-guide-footnote {
    margin-top: 12px;
}
.info-guide-span-full {
    grid-column: 1 / -1;
}
@media (max-width: 600px) {
    .info-guide-span-full {
        grid-column: auto;
    }
}
.info-guide-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 20px;
    margin-top: 4px;
}
@media (max-width: 640px) {
    .info-guide-split {
        grid-template-columns: 1fr;
    }
}
.info-guide-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--dh-accent);
    text-transform: uppercase;
    letter-spacing: 0.45px;
    margin: 10px 0 6px 0;
}
.info-guide-label:first-child {
    margin-top: 0;
}
.info-guide-split p {
    margin: 0 0 8px 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--dh-text-muted);
}
.info-guide-ul {
    margin: 0;
    padding-left: 1.1em;
    font-size: 12px;
    line-height: 1.5;
    color: var(--dh-text-muted);
}
.info-guide-ul li {
    margin-bottom: 6px;
}
.info-guide-ul li:last-child {
    margin-bottom: 0;
}
.info-guide-ul--compact li {
    margin-bottom: 4px;
}
.info-guide-lead {
    margin: 0 0 10px 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--dh-text-muted);
}
.info-guide-p {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
    color: var(--dh-text-muted);
}
.info-guide-p + .info-guide-p {
    margin-top: 10px;
}
.info-guide-footnote {
    margin: 12px 0 0 0;
    padding-top: 10px;
    border-top: 1px solid var(--dh-border);
    font-size: 11px;
    line-height: 1.45;
    color: var(--dh-text-muted);
    font-style: italic;
}
html.dark-mode .info-guide-footnote {
    border-color: var(--ark-bg-1);
}
.info-guide-link {
    color: var(--dh-accent);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid var(--dh-accent);
    margin-left: 4px;
}
.info-guide-link:hover {
    color: var(--dh-accent-hover);
    border-bottom-color: var(--dh-accent-hover);
}

/* Economy: one panel with sub-sections (gifts, jewels, special drops) */
.info-loot-panel {
    width: 100%;
    background: var(--dh-bg-card);
    border: 1px solid var(--dh-border);
    border-radius: 8px;
    padding: 4px 18px 16px;
    box-sizing: border-box;
}
/* Nested inside .info-guide-panel (economy): inset block, no double outer shell */
.info-loot-panel--embedded {
    background: rgba(0, 0, 0, 0.14);
    border-radius: 8px;
    border: 1px solid var(--dh-border);
    padding: 4px 14px 12px;
    margin: 4px 0 16px;
}
html.dark-mode .info-loot-panel--embedded {
    background: rgba(0, 0, 0, 0.22);
    border-color: var(--ark-bg-1);
}
html.dark-mode .info-loot-panel {
    background: var(--ark-bg-1);
    border-color: var(--ark-bg-1);
}

.info-loot-panel__section {
    padding: 16px 0;
    border-bottom: 1px solid var(--dh-border);
}
.info-loot-panel__section--last,
.info-loot-panel__section:last-of-type {
    border-bottom: none;
    padding-bottom: 4px;
}

.info-loot-panel__section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--dh-text);
    line-height: 1.25;
    text-transform: none;
    letter-spacing: 0.02em;
    font-family: inherit;
}
.info-loot-panel__icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.info-loot-tier-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.info-loot-tier-tile {
    background: var(--dh-bg-secondary);
    border: 1px solid var(--dh-border);
    border-radius: 8px;
    padding: 12px 12px 10px;
    transition: border-color 0.2s ease;
}
.info-loot-tier-tile:hover {
    border-color: var(--dh-accent);
}
html.dark-mode .info-loot-tier-tile {
    background: var(--ark-bg-1);
    border-color: var(--ark-bg-1);
}

.info-loot-tier-tile-icon {
    font-size: 18px;
    line-height: 1;
    margin-bottom: 6px;
}
.info-loot-tier-tile-name {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.35px;
    color: var(--dh-accent);
    margin-bottom: 8px;
}

.info-loot-panel .info-guide-p {
    font-size: 12px;
}
.info-loot-panel .info-loot-panel__section .info-guide-split {
    margin-top: 0;
}

@media (max-width: 600px) {
    .info-loot-panel {
        padding: 2px 14px 12px;
    }
    .info-loot-panel__section-title {
        font-size: 14px;
    }
}

/* Character Classes Grid */
.info-classes-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
@media (min-width: 900px) {
    .info-classes-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (min-width: 1400px) {
    .info-classes-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
.info-classes-7 { /* legacy hook — column count from breakpoints above */ }

.info-class-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    border: 1px solid var(--dh-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--dh-bg-card);
    transition: border-color .2s, transform .15s;
}
.info-class-card:hover { border-color: var(--dh-accent); transform: translateY(-2px); }
html.dark-mode .info-class-card { background: var(--ark-bg-1); border-color: var(--ark-bg-1); }

.info-class-header {
    padding: 14px 16px;
    font-weight: 700;
    color: #fff;
    background: var(--ark-bg-1);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.info-class-header.dk  { background: linear-gradient(135deg, #2a1a1a, #5a2020); }
.info-class-header.dw  { background: linear-gradient(135deg, #1a1a3a, #203070); }
.info-class-header.elf { background: linear-gradient(135deg, #1a2a1a, #2a5a20); }
.info-class-header.mg  { background: linear-gradient(135deg, #2a1a2a, #5a2060); }
.info-class-header.dl  { background: linear-gradient(135deg, #2a2010, #705020); }
.info-class-header.sum { background: linear-gradient(135deg, #201a2a, #402060); }
.info-class-header.rf  { background: linear-gradient(135deg, #2a1010, #702020); }
.info-class-header.gl  { background: linear-gradient(135deg, #0f2a1a, #1a5a3a); }
.info-class-header.rw  { background: linear-gradient(135deg, #0f1a30, #1a3a60); }
.info-class-header.sl  { background: linear-gradient(135deg, #1a0f2a, #3a1060); }

.info-class-name { font-size: 15px; }
.info-class-role { font-size: 11px; color: rgba(255,255,255,0.6); font-weight: 400; }
.info-class-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    font-size: 13px;
    color: var(--dh-text);
}
.info-class-body p { margin: 0 0 10px 0; line-height: 1.5; color: var(--dh-text); flex-shrink: 0; }
.info-class-stats {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: auto;
    padding-top: 4px;
}

/* Stat Bar (used in info page class stats) */
.stat-bar-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
}
.stat-name {
    width: 60px;
    flex-shrink: 0;
    color: var(--dh-text-muted);
    font-size: 11px;
}
.stat-bar {
    flex: 1;
    height: 6px;
    background: var(--dh-bg-secondary);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--dh-border);
}
html.dark-mode .stat-bar { background: var(--ark-bg-1); border-color: var(--ark-bg-1); }
.stat-bar span {
    display: block;
    height: 100%;
    background: var(--dh-accent);
    border-radius: 3px;
}

/* Features — flex + centered wrap so the last row is not stuck to the left with empty space */
.info-features-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    width: 100%;
}
.info-feature-card {
    flex: 0 1 280px;
    width: 280px;
    max-width: 100%;
    box-sizing: border-box;
    background: var(--dh-bg-card);
    border: 1px solid var(--dh-border);
    border-radius: 8px;
    padding: 16px;
    transition: border-color .2s, transform .15s;
    display: flex;
    flex-direction: column;
}
.info-feature-card:hover { border-color: var(--dh-accent); transform: translateY(-2px); }
html.dark-mode .info-feature-card { background: var(--ark-bg-1); border-color: var(--ark-bg-1); }
.info-feature-icon { font-size: 24px; margin-bottom: 8px; }
.info-feature-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--dh-text);
    margin: 0 0 6px;
    line-height: 1.25;
}
h3.info-feature-name {
    font-size: 14px;
    font-weight: 700;
}
.info-feature-desc {
    font-size: 12px;
    color: var(--dh-text-muted);
    line-height: 1.5;
    flex: 1 1 auto;
}

/* Maps Grid */
.info-maps-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
    margin-bottom: 24px;
}
.info-map-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    background: var(--dh-bg-card);
    border: 1px solid var(--dh-border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--dh-text);
}
html.dark-mode .info-map-item { background: var(--ark-bg-1); border-color: var(--ark-bg-1); }
.info-map-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--dh-gold);
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .info-classes-grid { grid-template-columns: 1fr; }
    .info-rates-grid   { grid-template-columns: repeat(2, 1fr); }
    .info-feature-card { flex: 1 1 100%; width: 100%; }
    .info-maps-grid    { grid-template-columns: repeat(2, 1fr); }
    .info-hero { padding: 24px 18px; }
    .info-hero-title { font-size: 20px; }
    .info-toc {
        flex-direction: column;
        align-items: stretch;
    }
    .info-toc-list {
        gap: 6px;
    }
    .info-toc-link {
        justify-content: flex-start;
    }
}

@media (max-width: 420px) {
    .info-rates-grid,
    .info-maps-grid {
        grid-template-columns: 1fr;
    }

    .info-hero {
        padding: 18px 12px;
    }

    .info-section-title {
        font-size: 14px;
    }
}

