:root {
    --bg-void: #07060a;
    --bg-page: #0c0b10;
    --bg-panel: rgba(16, 14, 22, 0.78);
    --bg-panel-2: rgba(24, 20, 30, 0.88);
    --bg-inset: rgba(24, 20, 30, 0.62);
    --bg-inset-hover: rgba(36, 30, 42, 0.82);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.1);
    --border-gold: rgba(201, 164, 76, 0.45);
    --gold: #c9a44c;
    --gold-bright: #e6d08a;
    --gold-dim: #7a6540;
    --text: #f3eee4;
    --text-muted: #cbbfa8;
    --text-dim: #9a8f7d;
    --crimson: #8e3b34;
    --focus: #e6d08a;
    --shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    --shadow-hover: 0 18px 40px rgba(0, 0, 0, 0.42);
    --radius: 0.9rem;
    --radius-sm: 0.65rem;
    --header-h: 4.6rem;
    --font-display: "Cinzel", "Palatino Linotype", Palatino, "Times New Roman", serif;
    --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

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

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    background: var(--bg-page);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color-scheme: dark;
}

.site-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: url("../images/backgrounds/world.jpg") center / cover no-repeat;
}

.site-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8, 7, 12, 0.28) 0%, rgba(8, 7, 12, 0.58) 32%, rgba(8, 7, 12, 0.82) 100%),
        radial-gradient(120% 80% at 50% 0%, rgba(8, 7, 12, 0.15), rgba(8, 7, 12, 0.55));
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--gold);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--gold-bright);
}

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

h1,
h2,
.footer-brand {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    color: var(--gold-bright) !important;
}

h3 {
    color: var(--text);
}

.eyebrow {
    margin: 0 0 0.7rem;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: var(--header-h);
    background: rgba(8, 7, 12, 0.62);
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.header-inner {
    width: min(calc(100% - 2rem), 80rem);
    min-height: var(--header-h);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.85rem;
    padding-bottom: 0.35rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--gold-bright);
    text-decoration: none;
    font-family: var(--font-display);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.92rem;
}

.brand:hover {
    color: var(--gold-bright);
}

.brand img {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

.brand__text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.brand__sub {
    font-family: var(--font-body);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.nav-toggle {
    display: none;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    border: 1px solid var(--border);
    background: rgba(16, 14, 22, 0.7);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 1.1rem;
    height: 1px;
    margin: 0.28rem auto;
    background: var(--gold-bright);
}

.site-search {
    display: flex;
    min-width: 16rem;
}

.site-search input,
.search-field {
    flex: 1;
    min-height: 2.6rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--border);
    border-right: 0;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background: rgba(16, 14, 22, 0.78);
    color: var(--text);
    font-family: var(--font-body);
}

.site-search input::placeholder,
.search-field::placeholder {
    color: var(--text-dim);
}

.site-search button {
    min-height: 2.6rem;
    padding: 0 0.95rem;
    border: 1px solid var(--border-gold);
    border-radius: 0 0.65rem 0.65rem 0;
    background: rgba(28, 22, 16, 0.72);
    color: var(--gold-bright);
    font-weight: 600;
    cursor: pointer;
}

.site-search button:hover,
.mobile-search button:hover {
    background: rgba(44, 36, 22, 0.92);
    color: #fff8dc;
}

.mobile-search {
    display: none;
    gap: 0;
    padding: 0 1rem 0.85rem;
}

.mobile-search input {
    flex: 1;
    min-height: 2.5rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--border);
    border-right: 0;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background: rgba(16, 14, 22, 0.78);
    color: var(--text);
    font-family: var(--font-body);
}

.mobile-search button {
    min-height: 2.5rem;
    padding: 0 0.85rem;
    border: 1px solid var(--border-gold);
    border-radius: 0 0.65rem 0.65rem 0;
    background: rgba(28, 22, 16, 0.72);
    color: var(--gold-bright);
    font-weight: 600;
    cursor: pointer;
}

.page-shell {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 2rem), 80rem);
    margin: 1.5rem auto 0;
}

.tile,
.side-nav {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.side-nav {
    padding: 1.15rem 0.9rem 1.25rem;
}

.side-nav h2 {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
}

.nav-link {
    display: block;
    padding: 0.55rem 0.75rem;
    border-radius: 0.55rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link:focus-visible {
    color: var(--gold-bright);
    background: var(--bg-inset);
}

.nav-section {
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--border-subtle);
}

.nav-label {
    padding: 0.35rem 0.75rem 0.45rem;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(4, 3, 6, 0.62);
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    width: 17.5rem;
    height: 100%;
    overflow-y: auto;
    padding: 1.1rem;
    background: rgba(8, 7, 12, 0.96);
    border-right: 1px solid var(--border-subtle);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-sidebar.is-open {
    transform: translateX(0);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.75rem;
    padding: 0.5rem 1.15rem;
    border: 1px solid var(--border-gold);
    border-radius: 0.7rem;
    background: rgba(28, 22, 16, 0.72);
    color: var(--gold-bright);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover,
.btn:focus-visible {
    color: #fff8dc;
    background: rgba(44, 36, 22, 0.92);
    border-color: var(--gold-bright);
}

.btn-primary {
    background: #8e3b34;
    border-color: #a24a42;
    color: #fff8f0;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: #a3473f;
    border-color: #c9a44c;
    color: #fff;
}

.hero-panel {
    padding: 0.35rem 1.5rem 1.6rem;
    text-align: center;
    overflow: visible;
}

.hero-panel img {
    width: min(350px, 80vw);
    max-width: 100%;
    height: auto;
    margin: -1.4rem auto 0.35rem;
    filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.55));
}

.hero-panel h1 {
    margin: 0 0 0.7rem;
    font-size: clamp(2rem, 5vw, 3.1rem);
}

.hero-panel p {
    margin: 0 auto;
    max-width: 38rem;
    color: var(--text-muted);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.admin-banner {
    position: relative;
    z-index: 20;
    padding: 0.55rem 1rem;
    background: rgba(201, 164, 76, 0.18);
    border-bottom: 1px solid var(--border-gold);
    color: var(--gold-bright);
    text-align: center;
    font-weight: 600;
}

.admin-banner a {
    color: var(--gold-bright);
}

.site-footer {
    position: relative;
    z-index: 1;
    margin-top: 3rem;
    padding: 3rem 0 1.5rem;
    background: rgba(7, 6, 10, 0.72);
    border-top: 1px solid var(--border-subtle);
    color: var(--text-muted);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.footer-inner {
    width: min(calc(100% - 2rem), 80rem);
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    text-transform: uppercase;
}

.prose,
.prose p,
.prose li {
    color: var(--text-muted);
}

.prose a {
    color: var(--gold);
}

/* Convert existing light Tailwind cards/text to Hub dark surfaces */
.bg-white,
.bg-gray-50,
.bg-gray-100,
.bg-gray-200 {
    background: var(--bg-panel) !important;
    border-color: var(--border) !important;
    color: var(--text);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.hover\:bg-gray-50:hover,
.hover\:bg-gray-100:hover,
.hover\:bg-gray-200:hover,
.hover\:bg-gray-300:hover,
.hover\:bg-red-50:hover,
.hover\:bg-blue-100:hover {
    background: var(--bg-inset-hover) !important;
    color: var(--gold-bright) !important;
    border-color: var(--border-gold) !important;
}

.bg-blue-50,
.bg-green-50,
.bg-purple-50,
.bg-yellow-50,
.bg-orange-50,
.bg-red-50,
.bg-amber-50,
.bg-blue-100,
.bg-green-100,
.bg-purple-100,
.bg-yellow-100,
.bg-orange-100,
.bg-red-100,
.bg-amber-100 {
    background: var(--bg-inset) !important;
    border-color: var(--border) !important;
    color: var(--text);
}

.text-gray-900,
.text-gray-800,
.text-gray-700,
.text-gray-600,
.font-medium.text-gray-800,
.font-bold.text-gray-800,
.font-semibold.text-gray-800 {
    color: var(--text) !important;
}

.text-gray-500,
.text-gray-400,
.text-gray-300 {
    color: var(--text-muted) !important;
}

.text-blue-600,
.text-blue-700,
.text-blue-800,
.text-green-600,
.text-green-700,
.text-green-800,
.text-purple-600,
.text-purple-700,
.text-purple-800,
.text-orange-600,
.text-orange-700,
.text-yellow-600,
.text-yellow-700,
.text-red-600,
.text-red-700,
.text-red-800 {
    color: var(--gold) !important;
}

.hover\:text-red-600:hover,
.hover\:text-red-700:hover,
.hover\:text-red-800:hover,
.hover\:text-blue-600:hover,
.hover\:text-blue-800:hover,
.hover\:text-gray-700:hover,
.hover\:text-gray-800:hover {
    color: var(--gold-bright) !important;
}

.bg-red-600,
.bg-blue-600,
.bg-green-600,
.bg-purple-600,
.from-red-600,
.to-red-700 {
    background: #8e3b34 !important;
    background-image: none !important;
    color: #fff8f0 !important;
    border-color: #a24a42 !important;
}

.bg-gradient-to-r.from-red-600,
.bg-gradient-to-r {
    background-image: none !important;
}

.hover\:bg-red-700:hover,
.hover\:bg-blue-700:hover,
.hover\:bg-green-700:hover,
.hover\:bg-purple-700:hover,
.hover\:bg-red-800:hover,
.hover\:bg-red-900:hover {
    background: #a3473f !important;
    border-color: var(--gold) !important;
    color: #fff !important;
}

.border,
.border-t,
.border-b,
.border-gray-200,
.border-gray-300,
.divide-gray-200 > :not([hidden]) ~ :not([hidden]),
.border-green-200,
.border-blue-200,
.border-red-200,
.border-amber-200,
.border-l-4 {
    border-color: var(--border) !important;
}

.border-blue-500,
.border-yellow-500,
.border-l-4.border-blue-500,
.border-l-4.border-yellow-500,
.border-gray-300,
.border-gray-400 {
    border-color: var(--border-gold) !important;
}

.bg-gray-800 {
    background: rgba(7, 6, 10, 0.72) !important;
}

.text-white,
.text-red-100 {
    color: var(--text) !important;
}

input[type="text"],
input:not([type]),
textarea,
select {
    background: rgba(16, 14, 22, 0.85) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

input::placeholder {
    color: var(--text-dim) !important;
}

.shadow,
.shadow-md,
.shadow-lg,
.shadow-sm {
    box-shadow: var(--shadow) !important;
}

.hover\:shadow-md:hover,
.hover\:shadow-lg:hover,
.hover\:shadow-xl:hover {
    box-shadow: var(--shadow-hover) !important;
    border-color: var(--border-gold);
    transform: translateY(-2px);
}

nav.text-sm a,
nav.text-sm span {
    color: var(--text-muted);
}

nav.text-sm a:hover {
    color: var(--gold-bright);
}

nav.text-sm .text-gray-800,
nav.text-sm .text-gray-900 {
    color: var(--gold-bright) !important;
}

table thead {
    background: rgba(16, 14, 22, 0.72) !important;
    border-bottom: 1px solid var(--border) !important;
}

table tbody tr:hover {
    background: var(--bg-inset) !important;
}

@media (max-width: 1023px) {
    .nav-toggle {
        display: inline-block;
    }

    .site-search {
        display: none;
    }

    .mobile-search {
        display: flex;
    }
}

.view-switch {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--border-gold);
    border-radius: 0.7rem;
    overflow: hidden;
    background: rgba(28, 22, 16, 0.72);
}

.view-switch__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.75rem;
    padding: 0.5rem 1rem;
    border: 0;
    background: transparent;
    color: var(--gold-bright);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
}

.view-switch__btn + .view-switch__btn {
    border-left: 1px solid var(--border);
}

.view-switch__btn:hover,
.view-switch__btn:focus-visible {
    color: var(--gold-bright);
    background: var(--bg-inset);
}

.view-switch__btn[aria-pressed="true"] {
    color: var(--gold-bright);
    background: rgba(28, 22, 16, 0.92);
}

.items-list {
    display: none;
}

html.items-view-list .items-grid {
    display: none;
}

html.items-view-list .items-list {
    display: block;
}

.items-compare-table th,
.items-compare-table td {
    white-space: nowrap;
}

.items-compare-table th:first-child,
.items-compare-table td:first-child {
    white-space: normal;
}

.items-compare-table .tabular-nums,
.tabular-nums {
    font-variant-numeric: tabular-nums;
}

.loc-filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.loc-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.loc-filter-row:has(.loc-filter-chips) {
    flex-wrap: nowrap;
    align-items: flex-start;
}

.loc-filter-chips {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 0;
}

.loc-filter-row:has(.loc-filter-chips) .loc-filter-label {
    padding-top: 0.55rem;
}

.loc-filter-label {
    width: 5.5rem;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
}

a.loc-filter,
button.loc-filter {
    display: inline-block;
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
    background: #07060a;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

a.loc-filter:hover,
a.loc-filter:focus-visible,
button.loc-filter:hover,
button.loc-filter:focus-visible {
    text-decoration: none;
}

a.loc-filter:hover:not(.is-active),
button.loc-filter:hover:not(.is-active) {
    background: var(--bg-inset-hover);
    color: var(--gold-bright);
}

a.loc-filter.is-active,
button.loc-filter.is-active,
a.loc-filter.is-active:visited {
    background: #8e3b34;
    color: #fff8f0;
}

a.loc-filter[hidden],
button.loc-filter[hidden] {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
