.rh-guide {
    --rh-base: #131521;
    --rh-panel: #1b1e2d;
    --rh-line: #363a50;
    --rh-ink: #f9f4e8;
    --rh-muted: #c3c6d6;
    --rh-gold: #f1cd89;
    width: min(1190px, calc(100% - 48px));
    margin: 30px auto 68px;
    color: var(--rh-ink);
    font: 16px/1.65 "Segoe UI", system-ui, sans-serif;
}

.rh-guide a { color: inherit; }
.rh-guide a:focus-visible { outline: 2px solid #fff0b5; outline-offset: 4px; }
.rh-guide h1, .rh-guide h2, .rh-guide p, .rh-guide dl, .rh-guide dd { margin: 0; }
.rh-cover {
    isolation: isolate;
    overflow: hidden;
    position: relative;
    display: grid;
    align-items: end;
    min-height: 430px;
    padding: clamp(24px, 5vw, 68px);
    border: 1px solid #44435b;
    border-radius: 22px;
    background: #23253a;
    background-image:
        linear-gradient(90deg, #121423 0%, #131525dc 26%, #15172957 70%, #15172919),
        linear-gradient(0deg, #141625 0%, transparent 42%),
        url("/runehold/runehold-keep.webp");
    background-size: cover;
    background-position: center, center, center 54%;
}
.rh-cover-copy { max-width: 670px; }
.rh-guide .rh-kicker {
    color: var(--rh-gold);
    font-size: .79rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.rh-guide h1, .rh-guide h2 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.025em; color: var(--rh-ink); }
.rh-guide h1 { font-size: clamp(2.9rem, 6.7vw, 5.35rem); line-height: .96; font-weight: 500; }
.rh-guide h1 span { color: var(--rh-gold); display: block; font-size: .61em; margin-top: .13em; }
.rh-cover-copy > p:not(.rh-kicker) { max-width: 480px; margin-top: 21px; color: #e2e0eb; font-size: clamp(.95rem, 2vw, 1.16rem); }
.rh-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.rh-actions a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .62rem 1rem;
    border: 1px solid #aeb0d25e;
    border-radius: 8px;
    background: #17192bc6;
    font-size: .93rem;
    font-weight: 700;
    text-decoration: none;
}
.rh-actions a:hover { background: #2a2c43; }
.rh-actions a.rh-primary { background: var(--rh-gold); color: #221805; border-color: var(--rh-gold); }
.rh-actions a.rh-primary:hover { background: #ffdfa3; }
.rh-layout { display: grid; grid-template-columns: minmax(160px, 212px) minmax(0, 1fr); gap: 28px; margin-top: 26px; align-items: start; }
.rh-toc { position: sticky; top: 98px; display: grid; padding: 18px; border: 1px solid var(--rh-line); border-radius: 14px; background: var(--rh-base); }
.rh-toc p { margin: 0 0 8px 8px; color: var(--rh-gold); font-weight: 700; font-size: .87rem; }
.rh-toc a { padding: .35rem .5rem; border-radius: 5px; font-size: .92rem; color: var(--rh-muted); text-decoration: none; }
.rh-toc a:hover { color: var(--rh-ink); background: var(--rh-panel); }
.rh-content { display: grid; gap: 16px; }
.rh-section { scroll-margin-top: 105px; padding: clamp(18px, 3vw, 31px); background: var(--rh-base); border: 1px solid var(--rh-line); border-radius: 15px; }
.rh-guide h2 { margin: 0 0 14px; font-size: clamp(1.55rem, 3vw, 2.12rem); line-height: 1.2; }
.rh-section > p, .rh-cards span, .rh-entries dd, .rh-levels dd { color: var(--rh-muted); }
.rh-section p + .rh-levels, .rh-levels + p { margin-top: 16px; }
.rh-cards, .rh-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.rh-levels { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rh-cards a, .rh-levels > div {
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 14px;
    background: var(--rh-panel);
    border: 1px solid var(--rh-line);
    border-radius: 9px;
    text-decoration: none;
}
.rh-cards a:hover { border-color: var(--rh-gold); }
.rh-cards strong, .rh-levels dt { color: var(--rh-gold); font-weight: 700; line-height: 1.25; }
.rh-cards span, .rh-levels dd, .rh-note { font-size: .91rem; }
.rh-levels dt { font-size: 1.13rem; }
.rh-table-wrap { border: 1px solid var(--rh-line); overflow: auto; border-radius: 9px; }
.rh-guide table { width: 100%; margin: 0; border-collapse: collapse; font-variant-numeric: tabular-nums; background: var(--rh-panel); }
.rh-guide th, .rh-guide td { padding: .55rem .85rem; text-align: left; border: 0; vertical-align: middle; }
.rh-guide thead th { color: var(--rh-gold); background: #25283a; font-size: .88rem; }
.rh-guide tbody td, .rh-guide tbody th { border-top: 1px solid var(--rh-line); }
.rh-guide tbody th { font-weight: 500; }
.rh-guide td { white-space: nowrap; }
.rh-guide .rh-note { margin: 12px 0 0; }
.rh-entries > div { padding: 11px 0; border-top: 1px solid var(--rh-line); }
.rh-entries dt { font-weight: 700; color: var(--rh-gold); }

@media (max-width: 850px) {
    .rh-guide { width: calc(100% - 32px); }
    .rh-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .rh-toc { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 6px; }
    .rh-toc p { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
    .rh-guide { width: calc(100% - 20px); margin-top: 12px; }
    .rh-cover { min-height: 380px; border-radius: 15px; background-position: center, center, 65% center; }
    .rh-toc, .rh-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rh-cards { grid-template-columns: minmax(0, 1fr); }
    .rh-guide th, .rh-guide td { padding: .45rem .49rem; font-size: .86rem; }
}
