/* Data Hub reuses library.css for the catalogue heading, search and categories. */
:root[data-theme] .library-page.hub-page.hub-home {
    --sport-text: var(--library-text);
    --hub-surface: var(--library-surface);
    --hub-raised: var(--library-soft);
    --hub-input: var(--library-soft);
    --hub-focus: var(--library-accent);
    --hub-ring: transparent;
    --sport-text-soft: var(--library-muted);
    --sport-line: var(--library-border);
    --sport-accent-2: var(--library-accent);
    width: 100%;
    color: var(--library-text);
    background: transparent;
    padding-top: 18px;
    padding-bottom: 64px;
}

:root[data-theme] .library-page.hub-home :is(h1,h2,h3,h4,h5,h6) {
    color: var(--library-text);
    letter-spacing: -.03em;
}

:root[data-theme] .library-page.hub-home .hub-search-results {
    margin-top: 4px;
}

:root[data-theme] .library-page.hub-home .hub-reference-section {
    margin: 32px 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
:root[data-theme] .library-page.hub-home .hub-reference-heading { max-width: none; margin-bottom: 22px; }
:root[data-theme] .library-page.hub-home .hub-reference-category { margin-top: 28px; }
:root[data-theme] .library-page.hub-home .hub-reference-category-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}
:root[data-theme] .library-page.hub-home .hub-reference-category-heading :is(h3,h4) {
    margin: 0;
    font-size: clamp(1.35rem, 1.15vw, 1.8rem);
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -.03em;
}
:root[data-theme] .library-page.hub-home .hub-reference-category-heading a { color: var(--library-text); text-decoration: none; }
:root[data-theme] .library-page.hub-home .hub-reference-category-heading a:hover { color: var(--library-accent); }
:root[data-theme] .library-page.hub-home .hub-reference-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
}
:root[data-theme] .library-page.hub-home .hub-reference-grid > article {
    width: auto;
    min-width: 0;
    padding: 0;
    margin: 0;
}
:root[data-theme] .library-page.hub-home .card {
    border: 1px solid var(--library-border);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.015) 100%);
    color: var(--library-text);
    box-shadow: 0 12px 28px rgba(10, 22, 27, 0.08);
}
:root[data-theme] .library-page.hub-home .hub-reference-card {
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
    min-height: 100%;
}
:root[data-theme] .library-page.hub-home .hub-reference-card:hover {
    border-color: rgba(119,226,205,.8);
    box-shadow: 0 16px 32px rgba(10, 22, 27, 0.1);
    transform: translateY(-1px);
}
:root[data-theme] .library-page.hub-home .hub-reference-card .card-body {
    display: flex;
    flex-direction: column;
    padding: 18px 18px 16px;
    min-height: 100%;
}
:root[data-theme] .library-page.hub-home .hub-reference-card :is(h3,h4,h5) {
    font-size: clamp(1.06rem, 0.9vw, 1.3rem);
    font-weight: 650;
    line-height: 1.36;
    letter-spacing: -.02em;
    margin: 12px 0 0;
}
:root[data-theme] .library-page.hub-home .hub-reference-card-top {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 0;
}
:root[data-theme] .library-page.hub-home :is(.hub-reference-type,.hub-reference-count,.hub-reference-status) {
    padding: 4px 8px;
    border: 1px solid var(--library-border);
    border-radius: 99px;
    background: rgba(119,226,205,.06);
    color: var(--library-muted);
    font-size: 10px;
    line-height: 1.5;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}
:root[data-theme] .library-page.hub-home .hub-reference-status:is(.is-identified,.is-admin-verified) {
    color: var(--library-accent);
    background: rgba(119,226,205,.08);
    border-color: rgba(119,226,205,.22);
}
:root[data-theme] .library-page.hub-home .hub-reference-status.is-pending {
    color: var(--library-text);
    background: rgba(255,202,44,.12);
    border-color: rgba(255,202,44,.34);
}
:root[data-theme] .library-page.hub-home .hub-reference-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
}
:root[data-theme] .library-page.hub-home .hub-reference-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid var(--library-border);
    border-radius: 99px;
    background: var(--library-soft);
    color: var(--library-accent);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}
:root[data-theme] .library-page.hub-home .hub-reference-link:hover {
    border-color: var(--library-accent);
    background: var(--library-surface);
}
:root[data-theme] .library-page.hub-home :is(.hub-reference-details,.hub-reference-filters) {
    padding: 14px 16px;
    margin-top: 14px;
    border: 1px solid var(--library-border);
    border-radius: 12px;
    background: var(--library-soft);
    color: var(--library-muted);
    font-size: 12px;
}
:root[data-theme] .library-page.hub-home details summary { color: var(--library-text); }
:root[data-theme] .library-page.hub-home :is(.hub-reference-date,.hub-reference-notice,.hub-search-query,[data-hub-search-status],[data-hub-local-count]) {
    color: var(--library-muted);
    font-size: 12px;
    line-height: 1.7;
}
:root[data-theme] .library-page.hub-home .hub-reference-tools { padding: 16px 0 0; }
:root[data-theme] .library-page.hub-home .hub-discovery-search > label { font-size: 12px; color: var(--library-muted); }
:root[data-theme] .library-page.hub-home .hub-search-controls { display: flex; gap: 10px; flex-wrap: wrap; }
:root[data-theme] .library-page.hub-home .hub-search-controls input { flex: 1 1 220px; min-width: 0; }
:root[data-theme] .library-page.hub-home :is(.hub-search-controls input,.hub-reference-filter-grid select) {
    background-color: var(--library-soft);
    color: var(--library-text);
    border: 1px solid var(--library-border);
    border-radius: 10px;
    min-height: 42px;
    font-size: 13px;
}
:root[data-theme] .library-page.hub-home .hub-search-controls .btn { border-radius: 99px; min-height: 42px; font-size: 13px; }
:root[data-theme] .library-page.hub-home .hub-search-controls .btn-primary {
    background: var(--library-accent);
    border-color: var(--library-accent);
    color: #103b35;
}
:root[data-theme] .library-page.hub-home .hub-search-controls .btn-primary:hover { background: #a3eddf; }
:root[data-theme] .library-page.hub-home [data-hub-search-navigation] a { color: var(--library-text); }
:root[data-theme] .library-page.hub-home .hub-reference-nav a {
    background: var(--library-surface);
    border-color: var(--library-border);
    color: var(--library-text);
    border-radius: 99px;
    font-size: 12px;
}
:root[data-theme] .library-page.hub-home .hub-reference-nav a:hover { border-color: var(--library-accent); }

@media (max-width: 1199.98px) {
    :root[data-theme] .library-page.hub-home .hub-reference-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 575.98px) {
    :root[data-theme] .library-page.hub-home .hub-reference-grid {
        grid-template-columns: minmax(0,1fr);
        gap: 12px;
    }
    :root[data-theme] .library-page.hub-home .hub-reference-category-heading :is(h3,h4) { font-size: 1.2rem; }
    :root[data-theme] .library-page.hub-page.hub-home { padding-inline: 18px; }
}

:root[data-theme] .library-page.hub-home .hub-reference-card { min-height: 0; }
:root[data-theme] .library-page.hub-home .hub-reference-card .hub-reference-details { padding: 8px; margin-top: 10px; font-size: 11px; }
:root[data-theme] .library-page.hub-home .hub-reference-card .hub-reference-date { margin-top: 10px !important; font-size: 11px; }
