.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.hg-map-page { width: min(1100px, 100%); }
.hg-map-page > p:not(.hg-kicker):not(.hg-stamp):not(.hg-updated) { max-width: 44rem; }
.hg-map-board,
.hg-map-ledger { margin-top: 2.4rem; scroll-margin-top: 96px; }
.hg-map {
    margin-top: 1.1rem;
    padding: 1.1rem 0.85rem 1.2rem;
    border: 1px dashed var(--hg-line);
    background:
        linear-gradient(180deg, rgba(212, 175, 55, 0.05), transparent 28%),
        var(--input-bg);
}
.hg-map-tier { display: grid; justify-items: center; gap: 0.55rem; }
.hg-map-arms,
.hg-map-leaves,
.hg-map-rise-split {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
}
.hg-map-col,
.hg-map-arm {
    display: grid;
    gap: 0.45rem;
    justify-items: center;
    min-width: 0;
    width: 100%;
}
.hg-wire {
    display: grid;
    justify-items: center;
    gap: 0.15rem;
    width: min(100%, 240px);
    min-height: 52px;
    padding: 0.55rem 0.7rem 0.6rem;
    border: 1px solid var(--hg-border);
    background: var(--hg-surface);
    color: var(--text);
    font: inherit;
    text-align: center;
    cursor: pointer;
    position: relative;
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.35),
        4px 4px 0 rgba(212, 175, 55, 0.08);
}
.hg-wire::before,
.hg-wire::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 7px;
    border: 1px solid var(--hg-accent);
}
.hg-wire::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hg-wire::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.hg-wire img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    background: #f6f0e4;
    border-radius: 4px;
}
.hg-wire span { font-family: var(--font-display); font-size: 0.92rem; }
.hg-wire small { color: var(--text-faint); font-size: 0.72rem; letter-spacing: 0.04em; }
.hg-wire .hg-labels { justify-content: center; margin-top: 0.2rem; }
.hg-wire-house { width: min(100%, 280px); border-color: var(--hg-accent); }
.hg-wire.is-on,
.hg-wire:hover {
    border-color: var(--hg-accent);
    background: var(--primary-soft);
    color: var(--primary-hover);
}
.hg-wire.is-path { box-shadow: 0 0 0 1px var(--hg-accent), 4px 4px 0 rgba(212, 175, 55, 0.14); }
.hg-map-rise {
    display: grid;
    justify-items: center;
    gap: 0.25rem;
    margin: 0.55rem 0 0.7rem;
    color: var(--text-faint);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.hg-rise-line {
    width: 1px;
    height: 28px;
    background: linear-gradient(180deg, var(--hg-accent), transparent);
    animation: hg-rise 1.6s var(--ease) infinite;
}
.hg-rise-label {
    position: relative;
    padding-top: 0.7rem;
}
.hg-rise-label::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 7px solid var(--hg-accent);
    transform: translateX(-50%);
}
.hg-map-detail { margin-top: 1rem; }
.hg-map-detail h3 { margin: 0.15rem 0 0.4rem; }
.hg-map-path { font-size: 0.86rem; color: var(--text-soft); }
.hg-map-page .hg-map-legend { padding-left: 0; color: var(--text-faint); }
.hg-map-page .hg-map-legend li { margin: 0; }
.hg-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem 1.1rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.82rem;
}
.hg-map-legend li { display: flex; align-items: center; gap: 0.4rem; min-height: 32px; }
.hg-swatch {
    width: 12px;
    height: 12px;
    border: 1px solid var(--hg-border);
    background: var(--hg-surface);
}
.hg-swatch-media { border-color: #f3b4c4; background: rgba(139, 21, 56, 0.35); }
.hg-swatch-venture { border-color: var(--hg-accent); background: var(--primary-soft); }
.hg-map .hg-table-wrap { margin-top: 0.4rem; }
.hg-map-page .hg-table { min-width: 520px; }

@media (min-width: 768px) {
    .hg-map-arms,
    .hg-map-leaves,
    .hg-map-rise-split {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
    .hg-map-board {
        display: grid;
        grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.7fr);
        gap: 1rem;
        align-items: start;
    }
    .hg-map-board > .hg-kicker,
    .hg-map-board > h2,
    .hg-map-board > p { grid-column: 1 / -1; }
    .hg-map-detail { margin-top: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .hg-rise-line { animation: none; }
}
@keyframes hg-rise {
    0% { opacity: 0.25; transform: translateY(6px); }
    55% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0.25; transform: translateY(-4px); }
}
