.explorer-body { display: block; padding: 2rem; }
.explorer-page { width: min(100%, 78rem); margin: 0 auto; padding: 0; overflow-wrap: anywhere; }
.explorer-page a { color: #dfc88f; text-underline-offset: .2em; }
.explorer-page h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); overflow-wrap: anywhere; }
.explorer-page p { line-height: 1.65; }
.explorer-page .detail { max-width: 46rem; }
.explorer-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-bottom: 1.5rem; border-bottom: 1px solid #466354; }
.settlement-name { font: 2rem Georgia, serif; text-decoration: none; }
.explorer-header .detail { margin-bottom: 0; }
.settings-link { flex-shrink: 0; padding: .8rem 0; }
.explorer-layout { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 3rem; margin-top: 2rem; }
.explorer-sidebar nav { display: grid; gap: .3rem; }
.explorer-sidebar nav a { display: flex; justify-content: space-between; gap: .7rem; padding: .7rem .8rem; border-radius: .35rem; text-decoration: none; color: #d5ded7; }
.explorer-sidebar nav a:hover, .explorer-sidebar nav a[aria-current=page] { background: #29483e; color: #f1eee4; }
.nav-count { color: #d5ba79; font-variant-numeric: tabular-nums; }
.explorer-search { margin-top: 1.8rem; }
.explorer-search label { font-size: .9rem; }
.explorer-search button { margin-top: .7rem; width: 100%; }
.sidebar-note { font-size: .85rem; }
.explorer-content { min-width: 0; }
.explorer-content > .eyebrow { margin-top: .5rem; }
.explorer-content .intro { max-width: 44rem; }
.overview-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: 2rem 0; }
.overview-counts a { display: flex; flex-direction: column; gap: .4rem; border: 1px solid #466354; border-radius: .5rem; padding: 1rem; text-decoration: none; background: #152c27; }
.overview-counts a:hover, .result-link:hover { background: #29483e; }
.overview-counts strong { font: 2rem Georgia, serif; }
.overview-counts span { color: #d5ded7; font-size: .9rem; }
.overview-section { margin: 2.8rem 0; }
.npc-grid, .connection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.npc-card { padding: 1.3rem; background: #152c27; border: 1px solid #466354; border-radius: .5rem; }
.npc-card .eyebrow { font-size: .7rem; margin-top: 0; }
.npc-card h3 { font: 1.4rem Georgia, serif; margin: 0 0 .7rem; }
.npc-card p { font-size: .95rem; }
.npc-concern { border-left: 2px solid #d5ba79; padding-left: .8rem; color: #dfc88f; }
.entity-list, .result-list, .livelihood-list { padding: 0; margin: 0; list-style: none; }
.entity-list li { padding: .8rem 0; border-bottom: 1px solid #355345; overflow-wrap: anywhere; }
.business-starts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; margin-bottom: 1.2rem; }
.connection-section { margin-top: 1.8rem; }
.connection-section h2 { font-size: 1.35rem; margin-bottom: .4rem; }
.entity-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 2rem 0; }
.entity-facts dt, .explanation-list dt { color: #b2c4ba; font-size: .9rem; margin-bottom: .4rem; }
.entity-facts dd, .explanation-list dd { margin: 0; line-height: 1.6; overflow-wrap: anywhere; }
.portrayal p, .gm-notes p { white-space: pre-wrap; }
.explanations { margin-top: 2rem; border-top: 1px solid #466354; padding-top: 1rem; }
.explanation-list > div { margin: 1.2rem 0; }
.explanation-list dd { font-size: .9rem; }
.collection-filter { margin: 1.8rem 0; }
.business-mix { margin: 1.8rem 0; }
.business-mix h2 { font-size: 1.35rem; margin-bottom: .4rem; }
.business-type-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .6rem; margin: 1rem 0; padding: 0; list-style: none; }
.business-type-counts a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; height: 100%; padding: .8rem 1rem; border: 1px solid #466354; border-radius: .5rem; background: #152c27; text-decoration: none; }
.business-type-counts a:hover, .business-type-counts a[aria-current="true"] { border-color: #dfc88f; background: #294238; }
.business-type-counts a:focus-visible { outline: 3px solid #dfc88f; outline-offset: 3px; }
.business-type-counts span { color: #d5ded7; }
.business-type-counts strong { color: #dfc88f; font-variant-numeric: tabular-nums; }
.search-row { display: flex; align-items: stretch; gap: .7rem; }
.search-row input { margin: 0; min-width: 0; }
.result-list { display: grid; gap: .6rem; margin: 1.5rem 0; }
.result-link { display: flex; flex-direction: column; gap: .45rem; padding: 1rem 1.2rem; border: 1px solid #466354; border-radius: .5rem; background: #152c27; text-decoration: none; overflow-wrap: anywhere; }
.result-name { font: 1.35rem Georgia, serif; }
.result-description { color: #d5ded7; font-size: .95rem; }
.result-origin { color: #b2c4ba; font-size: .8rem; }
.pagination { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin: 2rem 0; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .7rem .5rem; border-bottom: 1px solid #466354; }
thead th { color: #b2c4ba; font-weight: 500; }
.livelihood-list li { padding: 1rem 0; border-bottom: 1px solid #355345; }
.explorer-footer { display: flex; gap: 3rem; justify-content: space-between; border-top: 1px solid #466354; padding: 1rem 0; margin-top: 3rem; color: #b2c4ba; font-size: .8rem; }
.explorer-footer p:first-child { max-width: 44rem; }
.button-link { display: inline-block; padding: .8rem 1.1rem; border: 1px solid #d5ba79; border-radius: .35rem; }
.skip-link { position: absolute; top: -6rem; left: 1rem; padding: 1rem; background: #122321; color: #dfc88f; z-index: 1; }
.skip-link:focus { top: 1rem; }
@media (max-width: 850px) {
    .explorer-layout { grid-template-columns: 11rem minmax(0, 1fr); gap: 1.5rem; }
    .npc-grid, .connection-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
    .explorer-body { padding: 1rem; }
    .explorer-header { align-items: flex-start; flex-direction: column; gap: .5rem; }
    .explorer-layout { display: block; margin-top: 1rem; }
    .explorer-sidebar nav { display: flex; flex-wrap: wrap; gap: .3rem; }
    .explorer-sidebar nav a { font-size: .85rem; padding: .6rem; }
    .explorer-search { margin: 1rem 0 1.8rem; }
    .explorer-search button { width: auto; }
    .sidebar-note { display: none; }
    .overview-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .business-type-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .business-starts, .entity-facts { grid-template-columns: 1fr; }
    .explorer-footer { flex-direction: column; gap: 0; }
}
