.hgi-index {
    --hgi-ink: #241f22;
    --hgi-muted: #6b6266;
    --hgi-ivory: #f5f0e8;
    --hgi-paper: #fffdf9;
    --hgi-mulberry: #672f4b;
    --hgi-pink: #e98fc1;
    --hgi-green: #54db83;
    --hgi-line: rgba(36, 31, 34, 0.18);
    container: hgi-index / inline-size;
    box-sizing: border-box;
    width: min(100%, 1400px);
    margin: 0 auto;
    padding: clamp(20px, 2.8vw, 40px);
    border: 1px solid var(--hgi-line);
    background: var(--hgi-ivory);
    color: var(--hgi-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

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

.hgi-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: end;
    margin-bottom: 22px;
}

.hgi-index .hgi-eyebrow {
    margin: 0 0 7px !important;
    color: var(--hgi-mulberry);
    font-size: 0.72rem !important;
    font-weight: 750;
    letter-spacing: 0.16em;
    line-height: 1.35 !important;
    text-transform: uppercase;
}

.hgi-index .hgi-header h2 {
    margin: 0 !important;
    color: var(--hgi-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.2rem, 4vw, 4.2rem) !important;
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1 !important;
}

.hgi-index .hgi-intro {
    max-width: 720px;
    margin: 10px 0 0 !important;
    color: var(--hgi-muted);
    font-size: 1rem !important;
    line-height: 1.55 !important;
}

.hgi-summary {
    flex: 0 0 auto;
    min-width: 145px;
    padding: 12px 15px;
    border-left: 3px solid var(--hgi-mulberry);
    background: rgba(255, 255, 255, 0.58);
}

.hgi-summary strong,
.hgi-summary span {
    display: block;
}

.hgi-summary strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    font-weight: 500;
    line-height: 1;
}

.hgi-summary span {
    margin-top: 4px;
    color: var(--hgi-muted);
    font-size: 0.75rem;
}

.hgi-controls {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) minmax(190px, 0.7fr) minmax(150px, 0.5fr) auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid var(--hgi-line);
    background: rgba(255, 255, 255, 0.62);
}

.hgi-field {
    display: grid;
    gap: 5px;
}

.hgi-field > span {
    color: #5f555a;
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hgi-field input,
.hgi-field select,
.hgi-clear,
.hgi-more {
    min-height: 44px;
    border: 1px solid rgba(36, 31, 34, 0.28);
    border-radius: 0;
    background: var(--hgi-paper);
    color: var(--hgi-ink);
    font: inherit;
}

.hgi-field input,
.hgi-field select {
    width: 100%;
    padding: 8px 11px;
}

.hgi-clear,
.hgi-more {
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.hgi-clear:hover,
.hgi-more:hover {
    border-color: var(--hgi-mulberry);
    color: var(--hgi-mulberry);
}

.hgi-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.38fr);
    gap: 14px;
    align-items: stretch;
}

.hgi-map-panel,
.hgi-results-panel {
    min-width: 0;
    margin: 0;
    border: 1px solid var(--hgi-line);
    background: var(--hgi-paper);
}

.hgi-map-stage {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1335 / 1178;
    background: #fff;
}

.hgi-map-stage > img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: contain;
    user-select: none;
}

.hgi-markers {
    position: absolute;
    z-index: 2;
    inset: 0;
}

.hgi-marker {
    position: absolute;
    left: var(--hgi-x);
    top: var(--hgi-y);
    width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid rgba(34, 27, 31, 0.58);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    color: transparent;
    font-size: 0;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: transform 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.hgi-marker--coe {
    box-shadow: inset 0 0 0 4px rgba(233, 143, 193, 0.62);
}

.hgi-marker--rc {
    box-shadow: inset 0 0 0 4px rgba(84, 219, 131, 0.72);
}

.hgi-marker::after {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    padding: 4px 7px;
    border: 1px solid rgba(36, 31, 34, 0.24);
    background: #fff;
    color: var(--hgi-ink);
    content: attr(data-hgi-marker);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%);
    transition: opacity 120ms ease;
    white-space: nowrap;
}

.hgi-marker:hover,
.hgi-marker:focus-visible,
.hgi-marker[aria-pressed="true"] {
    z-index: 3;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(103, 47, 75, 0.26);
    transform: translate(-50%, -50%) scale(1.35);
}

.hgi-marker:hover::after,
.hgi-marker:focus-visible::after,
.hgi-marker[aria-pressed="true"]::after {
    opacity: 1;
}

.hgi-marker:focus-visible,
.hgi-field input:focus-visible,
.hgi-field select:focus-visible,
.hgi-record:focus-visible,
.hgi-clear:focus-visible,
.hgi-more:focus-visible {
    outline: 3px solid var(--hgi-mulberry);
    outline-offset: 2px;
}

.hgi-map-panel figcaption {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 10px 12px;
    border-top: 1px solid var(--hgi-line);
    color: var(--hgi-muted);
    font-size: 0.73rem;
}

.hgi-map-panel figcaption span {
    display: inline-flex;
    gap: 7px;
    align-items: center;
}

.hgi-key {
    width: 11px;
    height: 11px;
    border: 1px solid rgba(36, 31, 34, 0.28);
}

.hgi-key--coe { background: var(--hgi-pink); }
.hgi-key--rc { background: var(--hgi-green); }

.hgi-results-panel {
    display: flex;
    flex-direction: column;
    max-height: 760px;
}

.hgi-results-heading {
    padding: 14px 16px;
    border-bottom: 1px solid var(--hgi-line);
    background: rgba(103, 47, 75, 0.05);
}

.hgi-index .hgi-results-heading p {
    margin: 0 !important;
}

.hgi-results-heading [data-hgi-status] {
    color: var(--hgi-mulberry);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hgi-selection {
    margin-top: 5px !important;
    color: var(--hgi-muted);
    font-size: 0.76rem;
}

.hgi-results {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.hgi-record {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid rgba(36, 31, 34, 0.1);
    background: transparent;
    color: var(--hgi-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.hgi-record:hover,
.hgi-record.is-selected {
    background: rgba(103, 47, 75, 0.06);
    box-shadow: inset 3px 0 0 var(--hgi-mulberry);
}

.hgi-record.is-selected {
    position: relative;
    z-index: 1;
    background: rgba(233, 143, 193, 0.24);
    box-shadow: inset 5px 0 0 var(--hgi-mulberry), inset 0 0 0 1px rgba(103, 47, 75, 0.2);
}

.hgi-record.is-selected[data-section="rc"] {
    background: rgba(84, 219, 131, 0.2);
}

.hgi-record.is-selected .hgi-record__name {
    color: var(--hgi-ink);
}

.hgi-record__name {
    color: #3e363a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.94rem;
    line-height: 1.25;
}

.hgi-record__meta {
    display: grid;
    justify-items: end;
    color: var(--hgi-muted);
    font-size: 0.69rem;
    white-space: nowrap;
}

.hgi-record__meta b {
    color: var(--hgi-mulberry);
    font-size: 0.78rem;
}

.hgi-empty {
    margin: 0 !important;
    padding: 24px 16px;
    color: var(--hgi-muted);
    text-align: center;
}

.hgi-more {
    margin: 10px 14px 14px;
}

.hgi-note {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--hgi-line);
}

.hgi-index .hgi-note p {
    margin: 0 !important;
    color: var(--hgi-muted);
    font-size: 0.72rem !important;
    line-height: 1.5 !important;
}

@container hgi-index (max-width: 900px) {
    .hgi-controls {
        grid-template-columns: 1fr 1fr;
    }

    .hgi-field--search {
        grid-column: 1 / -1;
    }

    .hgi-layout {
        grid-template-columns: 1fr;
    }

    .hgi-results-panel {
        max-height: 560px;
    }
}

@container hgi-index (max-width: 560px) {
    .hgi-header {
        display: grid;
    }

    .hgi-summary {
        min-width: 0;
    }

    .hgi-controls {
        grid-template-columns: 1fr;
    }

    .hgi-field--search {
        grid-column: auto;
    }

    .hgi-map-panel {
        overflow-x: auto;
    }

    .hgi-map-stage {
        min-width: 620px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hgi-index *,
    .hgi-index *::before,
    .hgi-index *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
