/* ==========================================================================
   Lens — INS Data Observatory
   Dark-theme, modern data exploration UI
   ========================================================================== */

/* --- Variables --- */
:root {
    --bg-0: #09090b;
    --bg-1: #111114;
    --bg-2: #18181c;
    --bg-3: #222228;
    --bg-hover: #28282f;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);
    --text-0: #fafafa;
    --text-1: #a1a1aa;
    --text-2: #62626b;
    --text-3: #42424a;
    --accent: #818cf8;
    --accent-dim: rgba(129,140,248,0.15);
    --accent-hover: #6366f1;
    --green: #4ade80;
    --green-dim: rgba(74,222,128,0.12);
    --amber: #fbbf24;
    --amber-dim: rgba(251,191,36,0.12);
    --red: #f87171;
    --red-dim: rgba(248,113,113,0.12);
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 0 0 1px var(--border);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --topbar-h: 52px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Light theme overrides --- */
[data-theme="light"] {
    --bg-0: #f8f9fb;
    --bg-1: #ffffff;
    --bg-2: #f1f3f5;
    --bg-3: #e4e7eb;
    --bg-hover: #dde0e5;
    --border: rgba(0,0,0,0.08);
    --border-hover: rgba(0,0,0,0.15);
    --text-0: #111118;
    --text-1: #4a4a55;
    --text-2: #8a8a99;
    --text-3: #b0b0bb;
    --accent: #6366f1;
    --accent-dim: rgba(99,102,241,0.1);
    --accent-hover: #4f46e5;
    --green: #16a34a;
    --green-dim: rgba(22,163,74,0.1);
    --amber: #d97706;
    --amber-dim: rgba(217,119,6,0.1);
    --red: #dc2626;
    --red-dim: rgba(220,38,38,0.1);
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 0 0 1px var(--border);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12), 0 0 0 1px var(--border);
}

[data-theme="light"] .topbar {
    background: rgba(248,249,251,0.85);
}

[data-theme="light"] .search-backdrop {
    background: rgba(255,255,255,0.5);
}

[data-theme="light"] ::-webkit-scrollbar-thumb { background: var(--bg-3); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: var(--text-2); }

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
    font-family: var(--font);
    background: var(--bg-0);
    color: var(--text-0);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text-0); }

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border-radius: 5px;
    background: var(--bg-3);
    border: 1px solid var(--border-hover);
    color: var(--text-2);
    font-family: var(--font);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
}

.hidden { display: none !important; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 99px;
    background: var(--bg-3);
    color: var(--text-1);
    font-size: 12px;
    font-weight: 500;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-2); }

/* --- Topbar --- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--topbar-h);
    padding: 0 20px;
    background: rgba(9,9,11,0.8);
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    border-bottom: 1px solid var(--border);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-0);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.02em;
}
.logo:hover { color: var(--text-0); }

.logo-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.back-btn {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-1);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition);
}
.back-btn:hover { background: var(--bg-3); color: var(--text-0); }

.search-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-2);
    font-size: 14px;
    transition: all var(--transition);
    min-width: 300px;
}
.search-trigger:hover { border-color: var(--border-hover); color: var(--text-1); }
.search-trigger svg { opacity: 0.5; }
.search-trigger span { flex: 1; text-align: left; }

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    transition: all var(--transition);
}
.toggle-btn:hover { color: var(--text-0); background: var(--bg-3); }
.about-btn {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: var(--text-3);
}

.lang-toggle {
    width: auto;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 5px;
}
.lang-flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
    display: block;
}

/* --- Search Overlay --- */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    animation: fadeIn 0.15s ease;
}

.search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.search-modal {
    position: relative;
    width: 560px;
    max-width: 90vw;
    max-height: 60vh;
    background: var(--bg-2);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-hover);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideDown 0.2s ease;
}

.search-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
.search-input-row svg { color: var(--text-2); flex-shrink: 0; }

#search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-0);
    font-family: var(--font);
    font-size: 15px;
}
#search-input::placeholder { color: var(--text-2); }

.search-results {
    overflow-y: auto;
    padding: 6px;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
}
.search-item:hover, .search-item.active { background: var(--bg-3); }

.search-item-code {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    min-width: 80px;
    font-variant-numeric: tabular-nums;
}
.search-item-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-item-meta {
    font-size: 11px;
    color: var(--text-2);
    white-space: nowrap;
}

.search-footer {
    display: flex;
    gap: 16px;
    padding: 8px 16px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-2);
}
.search-footer kbd { font-size: 10px; min-width: 18px; height: 18px; }

.search-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-2);
    font-size: 13px;
}

/* --- Browse View --- */
.browse-view {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Notice Bar (above everything) --- */
.notice-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 24px;
    background: rgba(250, 204, 21, 0.12);
    border-bottom: 1px solid rgba(250, 204, 21, 0.2);
    font-size: 12px;
    color: var(--text-1);
}
.notice-bar a { color: var(--accent); text-decoration: underline; }
.notice-icon { font-size: 13px; opacity: 0.8; }
.notice-text { flex: 1; }
.notice-close {
    background: none; border: none; color: var(--text-3); cursor: pointer;
    font-size: 16px; padding: 0 4px; line-height: 1;
}
.notice-close:hover { color: var(--text-0); }
[data-theme="light"] .notice-bar {
    background: #fef9c3;
    border-bottom-color: #fde68a;
    color: #78350f;
}
[data-theme="light"] .notice-bar a { color: #92400e; }

/* --- Browse Header (compact) --- */
.browse-header {
    padding: 24px 0 12px;
    animation: fadeIn 0.6s ease;
}
.browse-title {
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-0);
}
.browse-subtitle {
    margin-top: 2px;
    font-size: 13px;
    color: var(--text-2);
}
.browse-dims-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
}
.browse-dims-link:hover { text-decoration: underline; }
.browse-tagline {
    margin-top: 6px;
    font-size: 18px;
    color: var(--text-3); margin-top: -1ex;
    /* font-style: italic; */
}

/* --- Section Labels --- */
.section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-2);
    margin: 20px 0 10px;
    font-weight: 600;
}

/* --- Headlines Section — inline-block themes, shrink-wrapped --- */
.headlines-section { margin-bottom: 12px; }
.headlines-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1ex 20px;
    align-items: flex-start;
}
@media (max-width: 860px) {
    .headlines-grid { flex-direction: column; }
}

/* Theme block: shrink-wrap to content, never stretch */
.headline-theme {
    flex: 0 0 auto;
    margin-top: 12px;
}

.headline-theme-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: color 0.15s;
}
.headline-theme-header:hover { color: var(--accent); }
.headline-theme-header:hover .headline-theme-label { color: var(--accent); }
.headline-theme-icon {
    font-size: 25px;
    line-height: 1;
    flex-shrink: 0;
}
.headline-theme-label {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-1);
    flex: 1;
}
.headline-theme-arrow {
    font-size: 15px;
    color: var(--text-3);
    transition: transform 0.15s;
}
.headline-theme-header:hover .headline-theme-arrow { transform: translateX(3px); }

/* Cards row: wrap on narrow screens */
.headline-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Card: fixed width on desktop, fluid on mobile */
.headline-card {
    position: relative;
    overflow: hidden;
    flex: 0 0 205px;
    height: 110px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: var(--bg-1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.headline-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-2);
}
.headline-card-info {
    position: relative;
    z-index: 1;
    min-width: 0;
}
.headline-label {
    font-size: 12px;
    color: var(--text-1);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.headline-value-row {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-top: 4px;
}
.headline-value {
    font-size: 1.35rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-0);
    line-height: 1.15;
    white-space: nowrap;
}
.headline-unit {
    font-size: 11px;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.headline-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}
.headline-period { font-size: 11.5px; color: var(--text-2); }
.headline-change { font-size: 11.5px; font-weight: 600; }
.headline-change.up { color: var(--green); }
.headline-change.down { color: var(--red); }
.headline-change.neutral { color: var(--text-3); }

/* Sparkline — bottom-aligned background watermark */
.headline-sparkline {
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 50%;
    z-index: 0;
    opacity: 0.25;
}
.headline-card:hover .headline-sparkline { opacity: 0.40; }
.headline-sparkline polyline {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke: var(--text-1);
}
.headline-sparkline polygon { opacity: 0.3; }

/* --- Recently Updated Section (below KPI grid) --- */
.recent-section { margin-top: 8px; margin-bottom: 8px; }
#recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 8px;
}
@media (max-width: 600px) {
    #recent-grid { grid-template-columns: 1fr; }
}
.recent-card {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: 7px;
}
.recent-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-2);
}
.recent-card-top {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 3px;
}
.recent-info { flex: 1; min-width: 0; }
.recent-name {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-0);
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.recent-meta {
    font-size: 10.5px;
    color: var(--text-3);
    margin-top: 2px;
}
.recent-excerpt {
    font-size: 11px;
    color: var(--text-2);
    line-height: 1.4;
    margin-top: 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.recent-trend {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.recent-trend.up { color: var(--green); }
.recent-trend.down { color: var(--red); }
.recent-trend.flat { color: var(--text-3); }

/* --- Theme Stats (category drill-down) --- */
.theme-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}
.theme-stat-card {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    text-align: center;
}
.theme-stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-0);
    font-variant-numeric: tabular-nums;
}
.theme-stat-label {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
}

/* --- Theme Headlines (KPI teaser in category drill-down) --- */
.theme-headlines {
    margin-bottom: 20px;
}
.theme-headlines .headline-cards {
    flex-wrap: wrap;
}

/* Legacy compat — hide old hero if still referenced */
.browse-hero { display: none; }
.hero-title, .hero-accent, .hero-sub { display: none; }

/* Category grid */
.category-grid {
    columns: 3;
    column-gap: 32px;
    padding-bottom: 80px;
}

/* Top-level category section */
.cat-section {
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
    margin-bottom: 16px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
}
.cat-section:last-child { border-bottom: none; margin-bottom: 0; }

.cat-section-header {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: color 0.15s;
    overflow: visible;
}
.cat-section-header:hover .cat-section-name { color: var(--accent); }
.cat-section-img {
    flex-shrink: 0;
    margin-left: auto;
    height: 77px;
    width: auto;
    object-fit: contain;
    pointer-events: none;
    opacity: 0.9;
    user-select: none;
}
.cat-section-title {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.cat-section-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-0);
    letter-spacing: -0.01em;
    line-height: 1.2;
    transition: color 0.15s;
}
.cat-section-meta {
    font-size: 11.5px;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
}
.cat-section-meta strong {
    font-weight: 600;
    color: var(--text-1);
}

/* Subcategory list — inline flow with middot separators */
.cat-subcats {
    margin-left: 0;
    line-height: 1.45;
}

.cat-subcat {
    display: inline;
    cursor: pointer;
    transition: color 0.15s;
}
.cat-subcat:hover { color: var(--accent); }
.cat-subcat:hover .cat-subcat-name { color: var(--accent); }
.cat-subcat-name {
    font-size: 12.5px;
    color: var(--text-1);
    display: inline;
}
.cat-subcat-count {
    font-size: 11.5px;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
}
.cat-subcat-sep {
    color: var(--text-3);
    margin: 0 4px;
    font-size: 10px;
}

/* Dataset panel (replaces category grid when drilled in) */
.dataset-panel {
    padding-bottom: 80px;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.panel-header h2 {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.panel-back {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
    transition: all var(--transition);
}
.panel-back:hover { background: var(--bg-3); color: var(--text-0); }

/* Facet bar — sort pills + filter chips above dataset list */
.facet-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 10px 0 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.facet-group {
    display: flex;
    gap: 3px;
    align-items: center;
}
.facet-label {
    font-size: 11px;
    color: var(--text-2);
    margin-right: 2px;
    white-space: nowrap;
}
.facet-sep {
    width: 1px;
    height: 16px;
    background: var(--border);
    margin: 0 4px;
    flex-shrink: 0;
}
.sort-pill, .facet-chip {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-1);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.sort-pill:hover, .facet-chip:hover {
    border-color: var(--border-hover);
    color: var(--text-0);
    background: var(--bg-3);
}
.sort-pill.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.facet-chip.active {
    background: var(--bg-3);
    color: var(--accent);
    border-color: var(--accent);
    font-weight: 500;
}
.facet-clear {
    font-size: 11px;
    color: var(--text-2);
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 4px;
    transition: all var(--transition);
}
.facet-clear:hover { color: var(--text-0); background: var(--bg-3); }

/* Breadcrumbs */
.breadcrumb-trail {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    font-size: 13px;
    flex-wrap: wrap;
}
.breadcrumb-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}
.breadcrumb-link {
    color: var(--text-2);
    cursor: pointer;
    transition: color var(--transition);
}
.breadcrumb-link:hover { color: var(--accent); }
.breadcrumb-current { color: var(--text-0); font-weight: 600; }
.breadcrumb-sep { color: var(--text-2); font-size: 14px; user-select: none; }

/* Dashboard breadcrumbs (dataset view) */
.dash-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 13px;
    flex-wrap: wrap;
}
.dash-crumb-link {
    color: var(--text-2);
    cursor: pointer;
    transition: color var(--transition);
    white-space: nowrap;
}
.dash-crumb-link:hover { color: var(--accent); }
.dash-crumb-current { color: var(--text-1); white-space: nowrap; }
.dash-crumb-sep { color: var(--text-2); font-size: 14px; user-select: none; }

/* Subcategory card grid */
.subcat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}
.subcat-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: var(--bg-1);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
}
.subcat-card:hover { border-color: var(--border-hover); background: var(--bg-2); }
.subcat-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-0);
    line-height: 1.3;
}
.subcat-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.subcat-count {
    font-size: 11px;
    color: var(--text-2);
}
.subcat-trend {
    font-size: 11px;
    font-weight: 600;
}
.subcat-trend.up { color: var(--green); }
.subcat-trend.down { color: var(--red); }

/* View toggle button */
.view-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    transition: all var(--transition);
    margin-left: auto;
}
.view-toggle:hover { color: var(--text-0); background: var(--bg-2); }

.dataset-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ds-row {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
}
.ds-row:hover { background: var(--bg-2); }

.ds-code {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.ds-name {
    font-size: 13px;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ds-name:hover { color: var(--text-0); }

.ds-badges {
    display: flex;
    gap: 6px;
    align-items: center;
}
.ds-badge {
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-2);
    background: var(--bg-3);
    white-space: nowrap;
}

/* Dataset grid view */
.ds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}
.ds-grid-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: var(--bg-1);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
}
.ds-grid-card:hover { border-color: var(--border-hover); background: var(--bg-2); }
.ds-grid-code {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.ds-grid-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-0);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ds-grid-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}

/* --- Dashboard View --- */
.dashboard-view {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 80px;
    animation: fadeIn 0.3s ease;
}

.dash-header {
    padding: 32px 0 8px;
}



.dash-download {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    padding-top: 2px;
}

.dl-btn {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-2);
    background: var(--bg-1);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.dl-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-1);
    background: var(--bg-2);
}

.dash-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.dash-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.meta-pill {
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 500;
}

.meta-pill.archetype { background: var(--accent-dim); color: var(--accent); }
.meta-pill.time { background: var(--bg-3); color: var(--text-1); }
.meta-pill.rows { background: var(--bg-3); color: var(--text-2); }
.meta-pill.updated { background: var(--green-dim); color: var(--green); }

.dash-code {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 1px 7px;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
    letter-spacing: 0.02em;
}

/* Info panel (definition / methodology) */
.info-panel {
    margin-bottom: 4px;
}
.info-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-2);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: color var(--transition);
}
.info-toggle:hover { color: var(--text-0); }
.info-chevron { transition: transform 0.2s; flex-shrink: 0; }
.info-lang-note {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-3);
    background: var(--bg-3);
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
}
.info-body {
    margin-top: 12px;
    border-left: 2px solid var(--border);
    padding-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.info-section strong {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-2);
    margin-bottom: 4px;
}
.info-section p {
    font-size: 13px;
    color: var(--text-1);
    line-height: 1.6;
    margin: 0;
}

/* Insights row */
.insights-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.insight-card {
    padding: 18px 20px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition);
}
.insight-card:hover { border-color: var(--border-hover); }

.insight-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.insight-value {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--text-0);
}

.insight-sub {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 2px;
}

/* Chart panels */
.chart-panel {
    margin: 24px 0 8px;
    animation: fadeInUp 0.3s ease backwards;
}
.chart-panel + .chart-panel {
    margin-top: 16px;
}

.panel-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.panel-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-2);
    flex-shrink: 0;
}

.panel-png-btn {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-3);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition);
    margin-left: auto;
    flex-shrink: 0;
}
.panel-png-btn:hover { color: var(--text-1); border-color: var(--border-hover); }

.panel-pills {
    display: flex;
    align-items: center;
    gap: 4px;
}

.chart-container {
    width: 100%;
    height: 420px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.chart-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    font-size: 13px;
}

/* Panel pill toggle buttons */
.ct-btn {
    padding: 5px 12px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
    border: 1px solid transparent;
    transition: all var(--transition);
}
.ct-btn:hover { color: var(--text-1); background: var(--bg-2); }
.ct-btn.active {
    color: var(--accent);
    background: var(--accent-dim);
    border-color: rgba(129,140,248,0.2);
}
.ct-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Transform mode toggles (Index / YoY) — subtle style distinction */
.ct-btn.transform-btn {
    font-family: monospace;
    font-size: 11px;
    letter-spacing: 0.03em;
}
.ct-btn.transform-btn.active {
    color: var(--green, #22c55e);
    background: rgba(34,197,94,0.12);
    border-color: rgba(34,197,94,0.25);
}

/* Separator dot between chart type pills and transform toggles */
.ct-sep {
    color: var(--text-3, var(--text-2));
    font-size: 12px;
    opacity: 0.5;
    padding: 0 2px;
    pointer-events: none;
    user-select: none;
}

/* Distribution strip below choropleth */
.distribution-strip {
    border-top: 1px solid var(--border);
    padding: 4px 0 0;
    background: var(--bg-1);
}
.distribution-strip.hidden { display: none; }

/* Dimension pickers (inline with panel pills) */
.dim-picker {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}
.dim-picker-label {
    font-size: 11px;
    color: var(--text-2);
    white-space: nowrap;
}
.dim-picker-select {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 99px;
    background: var(--bg-2);
    color: var(--text-1);
    border: 1px solid var(--border);
    cursor: pointer;
    max-width: 180px;
    outline: none;
    transition: border-color var(--transition);
}
.dim-picker-select:hover,
.dim-picker-select:focus {
    border-color: var(--accent);
}
.dim-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 16px 0;
}

/* Period navigator */
.period-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.period-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 14px;
    transition: all var(--transition);
}
.period-btn:hover { color: var(--text-0); background: var(--bg-3); }
.period-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.period-label {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-2);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-0);
    font-variant-numeric: tabular-nums;
    min-width: 60px;
    text-align: center;
}

.period-play {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--accent);
    border: 1px solid var(--accent-dim);
    font-size: 12px;
    transition: all var(--transition);
    margin-left: 4px;
}
.period-play:hover { background: var(--accent-dim); }
.period-play.playing {
    color: var(--text-0);
    background: var(--accent);
    border-color: var(--accent);
}

/* Filter strip */
.filter-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filter-select {
    height: 30px;
    padding: 0 28px 0 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-2) url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2371717a' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 8px center;
    color: var(--text-1);
    font-family: var(--font);
    font-size: 12px;
    appearance: none;
    cursor: pointer;
    transition: border-color var(--transition);
    max-width: 200px;
}
.filter-select:hover { border-color: var(--border-hover); }
.filter-select:focus { outline: none; border-color: var(--accent); }

.filter-sep {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 4px;
}

/* Large dataset notice */
.large-dataset-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin: 12px 0;
    border-radius: var(--radius);
    background: rgba(251,191,36,0.08);
    border: 1px solid rgba(251,191,36,0.2);
    color: var(--amber);
    font-size: 13px;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}
.notice-icon { font-size: 16px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Panel "not available" message */
.panel-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    color: var(--text-2);
    font-size: 13px;
    font-style: italic;
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease infinite;
    border-radius: var(--radius-sm);
}

/* Staggered entrance for category sections */
.cat-section {
    animation: fadeInUp 0.4s ease backwards;
}
.cat-section:nth-child(1) { animation-delay: 0.03s; }
.cat-section:nth-child(2) { animation-delay: 0.06s; }
.cat-section:nth-child(3) { animation-delay: 0.09s; }
.cat-section:nth-child(4) { animation-delay: 0.12s; }
.cat-section:nth-child(5) { animation-delay: 0.15s; }
.cat-section:nth-child(6) { animation-delay: 0.18s; }
.cat-section:nth-child(7) { animation-delay: 0.21s; }
.cat-section:nth-child(8) { animation-delay: 0.24s; }

/* Staggered entrance for insight cards */
.insight-card {
    animation: fadeInUp 0.3s ease backwards;
}
.insight-card:nth-child(1) { animation-delay: 0.05s; }
.insight-card:nth-child(2) { animation-delay: 0.10s; }
.insight-card:nth-child(3) { animation-delay: 0.15s; }
.insight-card:nth-child(4) { animation-delay: 0.20s; }

/* Staggered entrance for dataset rows/cards */
.ds-row, .ds-grid-card {
    animation: fadeInUp 0.25s ease backwards;
}

/* Trend indicators */
.insight-up { color: var(--green); font-weight: 600; font-size: 13px; }
.insight-down { color: var(--red); font-weight: 600; font-size: 13px; }

/* --- Sidebar toggle button (in topbar) --- */
.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    transition: all var(--transition);
    flex-shrink: 0;
}
.sidebar-toggle:hover { color: var(--text-0); background: var(--bg-3); }
.sidebar-toggle.active { color: var(--accent); background: var(--bg-3); }

/* --- Sidebar + main layout --- */
body { display: flex; flex-direction: column; }

.lens-sidebar {
    position: fixed;
    top: 52px;
    left: 0;
    bottom: 0;
    width: 260px;
    background: var(--bg-1);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 80;
    overflow: hidden;
    transition: transform 0.2s ease;
}
.lens-sidebar.hidden {
    transform: translateX(-100%);
    pointer-events: none;
}

/* Push main content when sidebar is open */
body.sidebar-open #app {
    margin-left: 260px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 10px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.sidebar-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-2);
}
.sidebar-close {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.sidebar-close:hover { color: var(--text-0); background: var(--bg-3); }

.sidebar-search {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.sidebar-search input {
    width: 100%;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    font-size: 12px;
    color: var(--text-0);
    outline: none;
    transition: border-color var(--transition);
}
.sidebar-search input:focus { border-color: var(--accent); }
.sidebar-search input::placeholder { color: var(--text-3); }

.sidebar-tree {
    overflow-y: auto;
    flex: 1;
    padding: 6px 0;
}

/* Sidebar dimensions link shortcut */
.sb-dims-link {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 14px; font-size: 12px; font-weight: 500;
    color: var(--text-2); text-decoration: none;
    border-bottom: 1px solid var(--border); margin-bottom: 4px;
    transition: color var(--transition), background var(--transition);
}
.sb-dims-link:hover { color: var(--accent); background: var(--bg-2); }

/* Sidebar tree items */
.sb-section {
    padding: 10px 14px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
    cursor: default;
}
.sb-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px 5px 14px;
    font-size: 12px;
    color: var(--text-1);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    line-height: 1.4;
    user-select: none;
}
.sb-item:hover { background: var(--bg-2); color: var(--text-0); }
.sb-item.active {
    background: var(--bg-3);
    color: var(--accent);
    font-weight: 600;
    border-left: 2px solid var(--accent);
    padding-left: 12px;
}
.sb-item[data-level="2"] { padding-left: 14px; }
.sb-item[data-level="3"] { padding-left: 26px; font-size: 11.5px; }
.sb-item[data-level="4"] {
    padding-left: 36px;
    font-size: 11px;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sb-item[data-level="4"]:hover { color: var(--text-0); }
.sb-item[data-level="4"].active { color: var(--accent); }

.sb-arrow {
    flex-shrink: 0;
    font-size: 9px;
    color: var(--text-3);
    width: 10px;
    transition: transform 0.15s ease;
}
.sb-arrow.open { transform: rotate(90deg); }
.sb-count {
    margin-left: auto;
    font-size: 10px;
    color: var(--text-3);
    flex-shrink: 0;
}
.sb-children { display: none; }
.sb-children.open { display: block; }
.sb-loading {
    padding: 4px 36px 4px;
    font-size: 11px;
    color: var(--text-3);
    font-style: italic;
}
.sb-code {
    font-family: monospace;
    font-size: 9.5px;
    color: var(--text-3);
    flex-shrink: 0;
    margin-left: auto;
}

/* Transition for main content push */
#app { transition: margin-left 0.2s ease; }

/* --- Table toggle row --- */
.table-toggle-row {
    display: none;  /* shown via JS after dashboard loads */
    padding: 0 0 8px;
}
.table-toggle-row.visible { display: flex; }
.table-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 12px;
    color: var(--text-2);
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}
.table-toggle-btn:hover { color: var(--text-0); border-color: var(--accent); }
.table-toggle-btn.active { color: var(--accent); border-color: var(--accent); background: var(--bg-3); }

/* --- Data table panel --- */
.table-panel {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 24px;
    overflow: hidden;
}
.table-scroll {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 440px;
}
.table-row-count {
    font-size: 12px;
    color: var(--text-3);
}
.table-close-btn {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-2);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.table-close-btn:hover { color: var(--text-0); background: var(--bg-3); }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    white-space: nowrap;
}
.data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg-2);
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-2);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    user-select: none;
}
.data-table th:hover { color: var(--text-0); }
.data-table th .sort-arrow { margin-left: 4px; color: var(--accent); }

/* Filter row */
.data-table .filter-row td {
    position: sticky;
    top: 33px;
    z-index: 1;
    background: var(--bg-2);
    padding: 3px 6px 6px;
    border-bottom: 1px solid var(--border);
}
.col-filter {
    width: 100%;
    padding: 3px 6px;
    font-size: 11px;
    font-family: var(--font);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-1);
    color: var(--text-1);
    cursor: pointer;
    appearance: auto;
}
.col-filter:focus { outline: none; border-color: var(--accent); }
.col-filter.active { border-color: var(--accent); background: var(--accent-dim); color: var(--text-0); font-weight: 600; }

.data-table td {
    padding: 6px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-1);
}
.data-table td.num { text-align: right; color: var(--text-0); font-variant-numeric: tabular-nums; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg-hover); }
.data-table tbody tr:nth-child(even) td { background: var(--bg-2); }
.data-table tbody tr:nth-child(even):hover td { background: var(--bg-hover); }
.table-truncated {
    padding: 8px 14px;
    font-size: 11px;
    color: var(--text-3);
    text-align: center;
    border-top: 1px solid var(--border);
}

/* --- Responsive --- */
@media (min-width: 1000px) {
    .dash-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
}
@media (max-width: 1000px) {
    .category-grid { columns: 2; }
}

@media (max-width: 780px) {
    .search-trigger span { display: none; }
    .search-trigger kbd { display: none; }
    .search-trigger { min-width: auto; }
    .hero-title { font-size: 2rem; }
    .category-grid { columns: 2; }
    .cat-subcats { margin-left: 0; /* already 0 */ }
    .insights-row { grid-template-columns: repeat(2, 1fr); }
    .chart-container { height: 320px; }
    .ds-row { grid-template-columns: 80px 1fr; }
    .ds-badges { display: none; }
    .period-nav { margin-left: 0; margin-top: 4px; }
}

@media (max-width: 600px) {
    .headline-card { flex: 1 1 140px; height: auto; min-height: 100px; }
}

@media (max-width: 480px) {
    .insights-row { grid-template-columns: 1fr; }
    .browse-hero { padding: 48px 0 32px; }
    .category-grid { columns: 1; }
    .cat-subcats { margin-left: 0; /* already 0 */ }
}

/* --- Footer --- */
/* --- About Page --- */
.about-page {
    max-width: 720px;
    padding: 32px 0 64px;
    color: var(--text-1);
    line-height: 1.7;
}
.about-page h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-0);
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}
.about-page h3 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-2);
    margin: 28px 0 8px;
}
.about-page p {
    font-size: 14px;
    margin: 0 0 12px;
}
.about-page a { color: var(--accent); text-decoration: underline; }
.about-page a:hover { opacity: 0.8; }

.site-footer {
    margin-top: 48px;
    border-top: 1px solid var(--border);
    padding: 20px 24px;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-notice {
    flex: 1;
    font-size: 11.5px;
    color: var(--text-2);
    line-height: 1.5;
}
.footer-notice a { color: var(--text-2); text-decoration: underline; }
.footer-notice a:hover { color: var(--text-1); }
.footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.footer-link {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-2);
    text-decoration: none;
    transition: color 0.15s;
}
.footer-link:hover { color: var(--text-0); }
