/* ═══════════════════════════════════════════════════════════════
   WIGA — Art Market Analytics  |  Design System 2025
   Editorial × Quantitative  ·  Warm Black · Cream · Gold · Data
   Fonts: Cormorant Garamond (display) · JetBrains Mono (data) · Lato (body)
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=JetBrains+Mono:wght@300;400;500&family=Lato:ital,wght@0,300;0,400;1,300&display=swap');

:root {
    /* ── Backgrounds ── */
    --bg-deep:        #000000;
    --bg-base:        #080808;
    --bg-surface:     #111111;
    --bg-lifted:      #1a1a1a;
    --bg-input:       #0a0a0a;

    /* ── Borders ── */
    --border-faint:   rgba(201, 168, 76, 0.09);
    --border-mid:     rgba(201, 168, 76, 0.18);
    --border-bright:  rgba(201, 168, 76, 0.38);

    /* ── Text ── */
    --text-bright:    #f4f0e8;
    --text-primary:   #d8d0bc;
    --text-secondary: #c0b8a8;
    --text-muted:     #968e80;
    --text-dim:       #6a6258;

    /* ── Accents ── */
    --gold:           #e8cc7a;
    --gold-glow:      rgba(232, 204, 122, 0.18);
    --gold-faint:     rgba(232, 204, 122, 0.07);
    --data:           #5a9af0;
    --data-faint:     rgba(90, 154, 240, 0.07);
    --green:          #5ecba1;
    --red:            #d96b6b;

    /* ── Typography ── */
    --font-display:   'Cormorant Garamond', Georgia, serif;
    --font-body:      'Lato', system-ui, sans-serif;
    --font-mono:      'JetBrains Mono', 'Fira Code', monospace;

    /* ── Layout ── */
    --sidebar-w:      240px;
    --radius:         7px;
    --radius-lg:      12px;
}

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

html, body {
    font-family: var(--font-body);
    font-weight: 300;
    background: var(--bg-deep);
    color: var(--text-primary);
    height: 100%;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Monospace for all numeric/data elements */
td,
.netchanges-stat-num,
.methodology-stat-number,
.explain-stat-number,
.step-num,
.network-era,
.selected-count,
.cv-year {
    font-family: var(--font-mono);
}

/* Selection */
::selection {
    background: var(--gold-faint);
    color: var(--text-bright);
}

/* Thin scrollbars globally */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 168, 76, 0.2) transparent;
}
*::-webkit-scrollbar { width: 4px; height: 4px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, 0.2);
    border-radius: 2px;
}

/* ══════════════════════════════════════════════
   GLOBAL LOGO
   ══════════════════════════════════════════════ */

.global-logo {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    display: block;
    line-height: 0;
}

.global-logo img {
    height: 56px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    transition: opacity 0.25s;
    opacity: 0.9;
    mix-blend-mode: screen;
}

.global-logo img:hover { opacity: 1; }

.sidebar-logo { position: static; }
.sidebar-logo img { height: 48px; }
.mobile-logo { display: none; }

/* ══════════════════════════════════════════════
   TOP-RIGHT BUTTONS
   ══════════════════════════════════════════════ */

.top-right-buttons {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-mid);
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.about-btn:hover {
    border-color: var(--border-bright);
    color: var(--gold);
}

/* ── Contact Button ── */
.contact-wrapper {
    position: relative;
    z-index: 200;
}

.contact-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-mid);
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.contact-btn:hover {
    border-color: var(--border-bright);
    color: var(--gold);
}

.contact-dropdown {
    display: none;
    position: absolute;
    top: 48px;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    min-width: 320px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
}

.contact-wrapper.open .contact-dropdown { display: block; }

.contact-dropdown p {
    font-size: 0.87rem;
    color: var(--text-secondary);
    line-height: 2.1;
    font-weight: 300;
}

.contact-name {
    font-family: var(--font-display);
    font-size: 1.05rem !important;
    font-weight: 400;
    color: var(--text-bright) !important;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

/* ══════════════════════════════════════════════
   LANDING PAGE
   ══════════════════════════════════════════════ */

.landing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
    overflow: auto;
}

.landing-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 300;
    color: var(--text-bright);
    margin-bottom: 14px;
    letter-spacing: 0.04em;
    text-align: center;
    line-height: 1.2;
}

.landing-rule {
    width: 48px;
    height: 1px;
    background: var(--gold);
    margin: 0 auto 20px;
    opacity: 0.55;
}

.landing-subtitle {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 52px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-align: center;
}

.app-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.app-box {
    width: 300px;
    height: 210px;
    background: var(--bg-surface);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.app-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gold-faint) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.app-box:hover::before { opacity: 1; }

.app-box:hover {
    transform: translateY(-4px);
    border-color: var(--border-bright);
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.5), 0 0 32px var(--gold-faint);
}

.app-box-icon {
    font-size: 2.2rem;
    margin-bottom: 16px;
    opacity: 0.75;
}

.app-box-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-bright);
    margin-bottom: 8px;
    text-align: center;
    padding: 0 16px;
    letter-spacing: 0.02em;
}

.app-box-desc {
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--text-muted);
    text-align: center;
    padding: 0 24px;
    line-height: 1.65;
}

.app-box.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.app-box.disabled:hover {
    transform: none;
    border-color: var(--border-mid);
    box-shadow: none;
}

.app-box.disabled:hover::before { opacity: 0; }

/* ══════════════════════════════════════════════
   SIDEBAR + NAVIGATION
   ══════════════════════════════════════════════ */

.attention-container,
.network-container {
    display: flex;
    height: 100%;
}

/* Both apps have no sidebar — main content fills full width */
.attention-container > .main-content,
.network-container > .main-content {
    width: 100%;
    padding-top: 84px; /* clear fixed logo (20px top + 56px height + breathing room) */
}

.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    background: var(--bg-deep);
    border-right: 1px solid var(--border-faint);
    display: flex;
    flex-direction: column;
    padding: 24px 14px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.back-btn {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.3rem;
    transition: color 0.2s;
}

.back-btn:hover { color: var(--gold); }

.sidebar-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-bright);
}

.section-label {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-bright);
    margin-bottom: 4px;
    margin-top: 24px;
    padding: 0 10px;
}

.section-label:first-of-type { margin-top: 0; }

.mode-option {
    padding: 9px 10px;
    border-radius: 5px;
    font-size: 0.93rem;
    font-weight: 400;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.18s;
    margin-bottom: 1px;
    letter-spacing: 0.01em;
    border-left: 2px solid transparent;
}

.mode-option:hover {
    background: var(--bg-surface);
    color: var(--text-bright);
}

.mode-option.active {
    background: var(--bg-lifted);
    color: var(--text-bright);
    border-left: 2px solid var(--gold);
    font-weight: 400;
}

.sidebar-divider {
    border-top: 1px solid var(--border-faint);
    margin: 10px 0 4px;
}

.disabled-option {
    color: var(--text-dim) !important;
    cursor: not-allowed !important;
    font-style: italic;
}

.disabled-option:hover {
    background: none !important;
    color: var(--text-dim) !important;
}

/* ══════════════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════════════ */

.main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow: hidden;
}

.chart-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
}

.chart-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-bright);
    letter-spacing: 0.02em;
}

/* ── Browse Toggle ── */
.browse-toggle {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.browse-btn {
    flex: 1;
    padding: 9px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-mid);
    border-radius: 5px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.94rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.18s;
}

.browse-btn:hover {
    border-color: var(--border-mid);
    color: var(--text-primary);
}

.browse-btn.active {
    background: var(--bg-lifted);
    border-color: var(--border-bright);
    color: var(--gold);
}

/* ── Analysis Area ── */
.analysis-area {
    flex: 1;
    min-height: 0;
    display: flex;
    gap: 16px;
}

.chart-zone {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.chart-wrapper {
    flex: 1;
    min-height: 0;
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.placeholder-msg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-dim);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.02em;
    text-align: center;
    width: 80%;
    line-height: 1.6;
}

/* ── Gallery Group ── */
.gallery-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    cursor: pointer;
    font-size: 0.81rem;
    font-weight: 400;
    color: var(--text-primary);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-faint);
    transition: background 0.15s;
    position: sticky;
    top: 0;
    z-index: 1;
    letter-spacing: 0.02em;
}

.gallery-header:hover { background: var(--bg-lifted); }

.gallery-header .arrow {
    font-size: 0.6rem;
    transition: transform 0.2s;
    color: var(--text-dim);
}

.gallery-header.open .arrow { transform: rotate(90deg); }

.gallery-artists { display: none; }
.gallery-artists.open { display: block; }
.gallery-artists .artist-item { padding-left: 28px; }

/* ══════════════════════════════════════════════
   SHARED DESKTOP TAB STRIP (attention + network)
   ══════════════════════════════════════════════ */

.attention-tabs,
.network-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-mid);
    margin-bottom: 20px;
    flex-shrink: 0;
}

.attention-tab,
.network-tab {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 14px 40px;
    cursor: pointer;
    letter-spacing: 0.04em;
    margin-bottom: -1px;
    transition: color 0.18s, border-color 0.18s;
    -webkit-tap-highlight-color: transparent;
}

.attention-tab:hover,
.network-tab:hover { color: var(--text-primary); }

.attention-tab.active,
.network-tab.active {
    color: var(--text-bright);
    border-bottom-color: var(--gold);
}

/* ══════════════════════════════════════════════
   RISERS VIEW
   ══════════════════════════════════════════════ */

.risers-view {
    flex: 1;
    display: flex;
    gap: 16px;
    min-height: 0;
}

.risers-left {
    flex: 1.3;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.risers-right {
    flex: 1.2;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-deep);
    border-radius: var(--radius-lg);
    padding: 16px;
    min-height: 0;
}

.risers-table-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--text-bright);
    margin-bottom: 12px;
    flex-shrink: 0;
    letter-spacing: 0.02em;
    padding-left: 13px; /* aligns with first column (1px border + 12px th padding) */
}

.risers-table-wrap {
    flex: 1;
    overflow-y: auto;
    border: 1px solid var(--border-faint);
    border-radius: var(--radius);
    background: var(--bg-deep);
}

.risers-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

.risers-table thead th {
    position: sticky;
    top: 0;
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 400;
    padding: 12px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-mid);
}

.risers-table thead th:first-child {
    padding-right: 4px;
}

.risers-table thead th:nth-child(2),
.risers-table thead th:nth-child(3) {
    text-align: center;
}

.risers-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-faint);
    color: var(--text-primary);
    font-weight: 300;
}

.risers-table tbody td:first-child {
    padding-right: 4px;
}

.risers-table tbody td:nth-child(2),
.risers-table tbody td:nth-child(3) {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
}

.risers-table tbody tr:last-child td { border-bottom: none; }

.risers-table tbody tr:hover { background: var(--bg-surface); }

.risers-table .median-up {
    color: var(--green);
    font-weight: 500;
}

.median-down {
    color: var(--red);
    font-weight: 500;
}

.risers-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-dim);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-style: italic;
}

.risers-svg {
    width: 100%;
    height: 100%;
    max-width: 900px;
    max-height: 680px;
}

/* ── SVG Ring Styles ── */
.ring {
    stroke-width: 1.5;
    transition: stroke-opacity 0.4s;
}

.ring-5 { stroke: #e8cc7a; stroke-opacity: 0.18; }
.ring-4 { stroke: #e8cc7a; stroke-opacity: 0.32; }
.ring-3 { stroke: #e8cc7a; stroke-opacity: 0.50; }
.ring-2 { stroke: #e8cc7a; stroke-opacity: 0.70; }

.center-dot { filter: url(#ringGlow); }

.center-pulse {
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.12; }
    50%       { opacity: 0.28; }
}

.ring-label {
    fill: #a89060;
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 1.5px;
    font-family: 'Lato', sans-serif;
}

.ring-range {
    fill: #b09868;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.5px;
    font-family: 'JetBrains Mono', monospace;
}

.range-inner {
    fill: #e8cc7a;
    font-weight: 400;
}

.ring-periphery {
    fill: #907850;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: 'Lato', sans-serif;
}

/* ── Risers Controls ── */
.risers-controls {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

.risers-select-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.risers-select {
    padding: 14px 22px;
    background: var(--bg-input);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius);
    color: var(--text-bright);
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    cursor: pointer;
    outline: none;
    min-width: 260px;
    transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
}

.risers-select:hover,
.risers-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 16px var(--gold-faint);
    color: var(--gold);
}

.risers-select option {
    background: var(--bg-surface);
    color: var(--text-bright);
    font-size: 1rem;
}

/* Info icon + tooltip */
.risers-info-wrap {
    position: relative;
}

.risers-info-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-mid);
    background: var(--bg-surface);
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.risers-info-btn:hover {
    color: var(--gold);
    border-color: var(--gold);
}

.risers-info-tooltip {
    display: none;
    position: absolute;
    left: 42px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-surface);
    border: 1px solid var(--border-mid);
    border-radius: 8px;
    padding: 16px 18px;
    width: 300px;
    font-family: var(--font-body);
    font-size: 0.84rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.7;
    z-index: 200;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.risers-info-tooltip strong {
    color: var(--text-bright);
    font-weight: 500;
}

.risers-info-wrap:hover .risers-info-tooltip {
    display: block;
}

/* ── Riser Arrows ── */
.riser-arrow {
    fill: none;
    stroke: #e8cc7a;
    stroke-width: 2;
    stroke-dasharray: 7 4;
    opacity: 0.8;
    animation: dashFlow 1.5s linear infinite;
}

.riser-arrow-down {
    stroke: #d96b6b !important;
}

@keyframes dashFlow {
    to { stroke-dashoffset: -22; }
}

/* ── Rank Toggle ── */
.rank-toggle {
    flex-shrink: 0;
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

/* ── Chart Controls ── */
.chart-controls {
    flex-shrink: 0;
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.chart-givers-note {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    margin: 8px 0 0;
    padding-left: 2px;
}

/* ── Chart Info Tooltips (* / **) ── */
.chart-info-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-info-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--border-mid);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.18s, border-color 0.18s;
}

.chart-info-btn:hover {
    color: var(--gold);
    border-color: var(--gold);
}

.chart-info-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    background: var(--bg-surface);
    border: 1px solid var(--border-mid);
    border-radius: 6px;
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.55;
    z-index: 400;
    pointer-events: none;
    white-space: normal;
    box-shadow: 0 4px 18px rgba(0,0,0,0.45);
}

.chart-info-wrap:hover .chart-info-tooltip {
    display: block;
}

/* Shared base for rank select + trendline buttons */
.rank-select,
.trendline-btn {
    padding: 14px 28px;
    background: var(--bg-input);
    border: 1px solid var(--border-mid);
    border-radius: 5px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: border-color 0.18s, color 0.18s, background 0.18s;
    outline: none;
}

.rank-select {
    appearance: none;
    -webkit-appearance: none;
    /* chevron arrow */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23968e80' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    color: var(--text-bright);
    border-color: var(--border-mid);
    min-width: 280px;
}

.rank-select option {
    background: var(--bg-surface);
    color: var(--text-bright);
}

.rank-select:hover,
.rank-select:focus {
    border-color: var(--border-bright);
    color: var(--gold);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23e8cc7a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

.trendline-btn:hover {
    border-color: var(--border-bright);
    color: var(--text-bright);
}

.trendline-btn.active {
    background: var(--bg-lifted);
    border-color: var(--border-bright);
    color: var(--gold);
}

/* ── Custom Tooltip ── */
.custom-tooltip {
    position: absolute;
    z-index: 300;
    background: var(--bg-surface);
    border: 1px solid var(--border-mid);
    border-radius: 10px;
    padding: 12px 14px;
    pointer-events: none;
    transition: opacity 0.15s;
    opacity: 0;
    min-width: 200px;
    max-width: 380px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(14px);
}

.tt-title {
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 7px;
    opacity: 0.85;
}

.tt-givers-header {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-bright);
    letter-spacing: 0.03em;
    margin-bottom: 8px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--border-mid);
}

.tt-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding: 2px 0;
}

.tt-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tt-val {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.79rem;
    font-weight: 500;
    color: var(--text-bright);
}

.tt-artist strong {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--text-bright);
    font-weight: 400;
}

.tt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.77rem;
    margin-bottom: 4px;
}

.tt-table tr { border-bottom: 1px solid var(--border-faint); }
.tt-table tr:last-child { border-bottom: none; }

.tt-thead td {
    color: var(--text-dim);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding-bottom: 4px;
    font-weight: 400;
}

.tt-name {
    color: var(--text-secondary);
    padding: 3px 10px 3px 0;
    text-align: left;
}

.tt-name a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.tt-name a:hover {
    color: var(--text-bright);
    text-decoration: underline;
}

.tt-amis {
    color: var(--gold);
    padding: 3px 0;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 500;
    white-space: nowrap;
}

.tt-empty {
    font-size: 0.74rem;
    color: var(--text-dim);
    font-style: italic;
    padding: 2px 0;
}

.tt-footnote {
    font-size: 0.67rem;
    color: var(--text-dim);
    margin-top: 6px;
    font-style: italic;
}

.chart-legend {
    flex-shrink: 0;
    margin-top: 6px;
    font-size: 0.74rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Mobile Artist Toggle & Back Buttons ── */
.mobile-artist-toggle { display: none; }

.mobile-back-btn {
    display: none;
    width: 100%;
    padding: 10px 16px;
    margin-bottom: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-faint);
    border-radius: 5px;
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.18s;
    text-align: left;
}

.mobile-back-btn:hover { border-color: var(--border-mid); }

/* ── Artist Panel ── */
.artist-panel {
    width: 340px;
    min-width: 340px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.artist-search {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius);
    color: var(--text-bright);
    font-family: var(--font-body);
    font-size: 0.96rem;
    font-weight: 300;
    margin-bottom: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.artist-search::placeholder { color: var(--text-muted); }

.artist-search:focus {
    border-color: var(--border-mid);
    box-shadow: 0 0 12px var(--gold-faint);
}

.artist-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.artist-actions button {
    background: none;
    border: none;
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 300;
    cursor: pointer;
    padding: 4px 0;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.artist-actions button:hover {
    opacity: 1;
    text-decoration: underline;
}

.selected-count {
    font-size: 0.84rem;
    color: var(--text-muted);
}

.artist-list {
    flex: 1;
    overflow-y: auto;
    border: 1px solid var(--border-faint);
    border-radius: var(--radius);
    background: var(--bg-deep);
}

.artist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.12s;
    font-size: 1.08rem;
    font-weight: 400;
    border-bottom: 1px solid var(--border-faint);
    color: var(--text-primary);
}

.artist-item:last-child { border-bottom: none; }

.artist-item:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.artist-item.selected {
    background: var(--bg-lifted);
    color: var(--text-bright);
}

.artist-item input[type="checkbox"] {
    accent-color: var(--gold);
    flex-shrink: 0;
}

.gallery-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-family: var(--font-display);
    font-size: 1rem;
    font-style: italic;
}

/* ══════════════════════════════════════════════
   ABOUT PAGE
   ══════════════════════════════════════════════ */

.about-topbar { display: none; }

.about-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    padding: 40px;
    padding-top: 80px;
    overflow-y: auto;
}

.about-hero {
    text-align: center;
    margin-bottom: 48px;
}

.about-photo {
    width: 148px;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-mid);
    margin-bottom: 20px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.about-name {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-bright);
    margin-bottom: 10px;
    letter-spacing: 0.04em;
}

.about-tagline {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--gold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.85;
}

.about-content {
    max-width: 740px;
    width: 100%;
    padding-bottom: 80px;
}

.about-section { margin-bottom: 40px; }

.about-section h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-bright);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-faint);
    letter-spacing: 0.02em;
}

.about-section p {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.88;
    margin-bottom: 14px;
}

.about-section strong {
    color: var(--text-primary);
    font-weight: 400;
}

.about-section em {
    color: var(--gold);
    font-style: italic;
}

.about-cite {
    margin-top: 20px;
    padding: 14px 16px;
    background: var(--gold-faint);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius);
    font-size: 0.84rem !important;
    color: var(--text-muted) !important;
}

.about-cv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.87rem;
}

.about-cv-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border-faint);
    color: var(--text-secondary);
    vertical-align: top;
    line-height: 1.65;
    font-weight: 300;
}

.about-cv-table tr:last-child td { border-bottom: none; }

.about-cv-table strong {
    color: var(--text-bright);
    font-weight: 400;
}

.cv-year {
    white-space: nowrap;
    color: var(--gold);
    font-size: 0.76rem;
    width: 140px;
    min-width: 140px;
    padding-top: 14px;
    opacity: 0.85;
}

.about-download {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.about-download-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-lg);
    transition: border-color 0.2s;
}

.about-download-item:hover { border-color: var(--border-mid); }

.about-download-item strong {
    color: var(--text-bright);
    font-size: 0.9rem;
    font-weight: 400;
}

.about-download-item p {
    font-size: 0.82rem !important;
    color: var(--text-muted) !important;
    margin-top: 6px;
    margin-bottom: 0 !important;
    font-weight: 300 !important;
}

.download-btn {
    flex-shrink: 0;
    padding: 8px 18px;
    background: transparent;
    border: 1px solid var(--border-bright);
    border-radius: 5px;
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    align-self: center;
}

.download-btn:hover {
    background: var(--gold-faint);
    border-color: var(--gold);
}

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */

.footer {
    position: fixed;
    bottom: 16px;
    right: 24px;
    z-index: 100;
}

.footer a {
    color: var(--text-dim);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.2s, border-color 0.2s;
    background: rgba(9, 8, 6, 0.88);
    padding: 6px 12px;
    border-radius: 5px;
    border: 1px solid var(--border-faint);
}

.footer a:hover {
    color: var(--text-secondary);
    border-color: var(--border-mid);
}

/* ══════════════════════════════════════════════
   IMPRESSUM PAGE
   ══════════════════════════════════════════════ */

.impressum-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 60px 40px;
    overflow: auto;
}

.impressum-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--text-bright);
    margin-bottom: 40px;
    letter-spacing: 0.04em;
}

.impressum-content {
    max-width: 500px;
    width: 100%;
}

.impressum-section h2 {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 16px;
}

.impressum-section p {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.95;
}

.impressum-link {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.2s;
}

.impressum-link:hover { color: #d4b96a; }

.impressum-back {
    margin-top: 40px;
    display: inline-block;
    color: var(--gold);
    text-decoration: none;
    font-size: 0.83rem;
    font-weight: 300;
    letter-spacing: 0.06em;
    transition: color 0.2s;
}

.impressum-back:hover { color: #d4b96a; }

/* ══════════════════════════════════════════════
   EXPLAIN METHODOLOGY BUTTON + MODAL
   ══════════════════════════════════════════════ */

.explain-btn {
    padding: 7px 15px;
    background: transparent;
    border: 1px solid var(--border-mid);
    border-radius: 5px;
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 300;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
    white-space: nowrap;
    opacity: 0.8;
}

.explain-btn:hover {
    background: var(--gold-faint);
    border-color: var(--border-bright);
    opacity: 1;
}

.risers-explain-btn {
    flex-shrink: 0;
    margin-top: 10px;
    margin-left: 0;
    align-self: flex-start;
}

.explain-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    z-index: 600;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}

.explain-overlay.open { display: flex; }

.explain-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-mid);
    border-radius: 16px;
    padding: 36px 40px;
    max-width: 640px;
    width: 90%;
    max-height: 82vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.75);
}

.explain-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.explain-modal-close:hover { color: var(--text-bright); }

.explain-modal h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-bright);
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

.explain-modal h3 {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--gold);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin: 22px 0 8px;
    opacity: 0.85;
}

.explain-modal p {
    font-size: 0.87rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 10px;
}

.explain-modal strong {
    color: var(--text-primary);
    font-weight: 400;
}

.explain-modal ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 12px;
}

.explain-modal ul li {
    font-size: 0.87rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.75;
    padding-left: 16px;
    position: relative;
}

.explain-modal ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0.55;
}

.explain-stats {
    display: flex;
    gap: 12px;
    margin: 20px 0;
}

.explain-stat {
    flex: 1;
    background: var(--bg-lifted);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius);
    padding: 14px 10px;
    text-align: center;
}

.explain-stat-number {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--gold);
    display: block;
}

.explain-stat-label {
    font-size: 0.63rem;
    font-weight: 400;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
    display: block;
}

/* ══════════════════════════════════════════════
   METHODOLOGY VIEW
   ══════════════════════════════════════════════ */

.methodology-view {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 20px;
}

.methodology-hero {
    text-align: center;
    padding: 52px 20px 40px;
    margin-bottom: 10px;
}

.methodology-hero h2 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--text-bright);
    margin-bottom: 12px;
    letter-spacing: 0.04em;
}

.methodology-hero p {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--gold);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.8;
}

.methodology-stats {
    display: flex;
    gap: 16px;
    max-width: 700px;
    margin: 0 auto 40px;
}

.methodology-stat {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-lg);
    padding: 22px 16px;
    text-align: center;
    transition: border-color 0.2s;
}

.methodology-stat:hover { border-color: var(--border-mid); }

.methodology-stat-number {
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--gold);
    display: block;
}

.methodology-stat-label {
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 8px;
    display: block;
}

.methodology-content {
    max-width: 740px;
    margin: 0 auto;
    padding-bottom: 60px;
}

.methodology-section { margin-bottom: 36px; }

.methodology-section h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--text-bright);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-faint);
    letter-spacing: 0.02em;
}

.methodology-section p {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.88;
    margin-bottom: 12px;
}

.methodology-section strong {
    color: var(--text-primary);
    font-weight: 400;
}

.methodology-section em {
    color: var(--gold);
    font-style: italic;
}

.methodology-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 16px;
}

.methodology-list li {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.88;
    padding-left: 18px;
    position: relative;
}

.methodology-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0.45;
}

.methodology-steps {
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.methodology-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 14px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius);
    border-left: 2px solid var(--border-bright);
}

.step-num {
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--gold);
    min-width: 28px;
    opacity: 0.75;
    padding-top: 1px;
}

.methodology-step div {
    font-size: 0.87rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.7;
}

.methodology-step strong {
    color: var(--text-primary);
    font-weight: 400;
}

.methodology-author {
    text-align: center;
    margin-top: 50px;
    padding: 30px 20px 10px;
    border-top: 1px solid var(--border-faint);
}

.methodology-author h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--text-bright);
    margin-bottom: 14px;
    border-bottom: none;
}

.methodology-author p {
    font-size: 0.88rem;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.82;
    margin-bottom: 10px;
}

.methodology-author strong {
    color: var(--text-primary);
    font-weight: 400;
}

.methodology-copyright {
    margin-top: 20px;
    font-size: 0.72rem !important;
    color: var(--text-dim) !important;
}

/* ══════════════════════════════════════════════
   MOBILE SIDEBAR TOGGLE
   ══════════════════════════════════════════════ */

.sidebar-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 501;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.sidebar-toggle:hover {
    border-color: var(--border-bright);
    color: var(--gold);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 499;
    backdrop-filter: blur(3px);
}

.sidebar-overlay.open { display: block; }

/* ══════════════════════════════════════════════
   RESPONSIVE — Stack risers at 1100px
   ══════════════════════════════════════════════ */

@media (max-width: 1100px) {
    .risers-view { flex-direction: column; }

    .risers-left {
        flex: none;
        height: 45vh;
        min-height: 260px;
        max-height: 400px;
    }

    .risers-controls {
        position: relative;
        margin-bottom: 8px;
    }

    .risers-right { flex: 1; }

    .main-content { overflow-y: auto; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Tablet modal/methodology 960px
   ══════════════════════════════════════════════ */

@media (max-width: 960px) {
    .explain-modal {
        padding: 28px 24px;
        width: 94%;
    }

    .explain-stats {
        flex-direction: column;
        gap: 8px;
    }

    .methodology-stats {
        flex-direction: column;
        gap: 10px;
    }

    .methodology-hero h2 { font-size: 1.65rem; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Stack analysis area 900px
   ══════════════════════════════════════════════ */

@media (max-width: 900px) {
    .analysis-area {
        flex-direction: column;
        flex: none;
    }

    .chart-zone {
        flex: none;
        height: 350px;
        min-height: 300px;
    }

    .artist-panel {
        width: 100%;
        min-width: 0;
        flex: none;
        height: 260px;
    }

    .chart-controls { flex-wrap: wrap; }
    .rank-toggle { flex-wrap: wrap; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Mobile 768px: sidebar collapse
   ══════════════════════════════════════════════ */

@media (max-width: 768px) {

    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100%;
        z-index: 500;
        transition: left 0.3s ease;
        padding-top: 70px;
    }

    .sidebar.open { left: 0; }

    .sidebar-toggle { display: flex; }

    /* Opaque top bar behind hamburger & logo */
    .attention-container::before,
    .network-container::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: var(--bg-deep);
        z-index: 450;
        border-bottom: 1px solid var(--border-faint);
    }

    .global-logo.mobile-logo {
        display: block;
        position: fixed;
        top: 14px;
        left: 66px;
        z-index: 501;
    }

    /* No hamburger on attention page — move logo to left edge */
    .page-attention .global-logo.mobile-logo {
        left: 16px;
    }

    .global-logo.mobile-logo img { height: 36px; }

    .sidebar-header { display: none; }

    .main-content {
        padding: 12px;
        padding-top: 72px;
        padding-bottom: 48px;
        overflow-y: auto;
    }

    .chart-header { display: none; }

    .analysis-area { order: 1; }

    .risers-view { margin-top: 0; }

    /* Mobile: show artist toggle button prominently */
    .mobile-artist-toggle {
        display: block;
        width: 100%;
        padding: 12px 16px;
        margin-bottom: 8px;
        font-size: 0.9rem;
        font-weight: 300;
        text-align: center;
        background: var(--bg-lifted);
        border-color: var(--border-bright);
        color: var(--gold);
    }

    .artist-panel {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 400;
        width: 100%;
        height: 100%;
        border-radius: 0;
        border: none;
        padding: 10px 16px;
        padding-top: 72px;
        background: var(--bg-deep);
    }

    .artist-panel.mobile-open { display: flex; }

    .artist-panel.mobile-open .mobile-back-btn {
        display: block;
        padding: 6px 12px;
        margin-bottom: 4px;
        font-size: 0.8rem;
    }

    .chart-zone {
        flex: 1;
        height: auto;
    }

    .custom-tooltip { max-width: calc(100vw - 20px); }

    /* Hide methodology/impressum on mobile */
    .explain-btn { display: none; }
    .footer { display: none; }

    .risers-select { font-size: 1rem; padding: 10px 16px; }

    .risers-left {
        height: 55vw;
        max-height: 320px;
        min-height: 200px;
    }

    .top-right-buttons {
        top: 24px;
        right: 12px;
        gap: 6px;
        z-index: 510;
    }

    /* About page: keep logo above the opaque header bar */
    .global-logo { z-index: 510; }

    .about-btn,
    .contact-btn {
        padding: 6px 12px;
        font-size: 0.72rem;
        background: rgba(9, 8, 6, 0.92);
    }

    /* About page mobile */
    .about-topbar {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: var(--bg-deep);
        border-bottom: 1px solid var(--border-faint);
        z-index: 505;
    }

    .about-container {
        padding: 20px 16px;
        padding-top: 76px;
    }

    .about-photo { width: 110px; }

    .about-name { font-size: 1.4rem; }

    .cv-year {
        width: 100px;
        min-width: 100px;
        font-size: 0.7rem;
    }

    .about-cv-table td {
        font-size: 0.8rem;
        padding: 10px 8px;
    }

    .about-download-item { flex-direction: column; }
    .download-btn { align-self: flex-start; }

    .contact-dropdown {
        min-width: 0;
        width: 280px;
        max-width: calc(100vw - 24px);
    }

    /* Landing page mobile */
    .global-logo { top: 14px; left: 14px; }
    .global-logo img { height: 38px; }

    .landing-container {
        justify-content: flex-start;
        padding: 20px 16px;
        padding-top: 82px;
    }

    .landing-title {
        font-size: 1.75rem;
        margin-bottom: 8px;
    }

    .landing-rule { margin: 14px auto 16px; }

    .landing-subtitle {
        font-size: 0.72rem;
        margin-bottom: 28px;
    }

    .app-grid {
        gap: 14px;
        width: 100%;
    }

    .app-box {
        width: 100%;
        height: 150px;
    }

    .app-box-title { font-size: 1.05rem; }

    .app-box-icon {
        font-size: 1.9rem;
        margin-bottom: 10px;
    }

    /* Impressum mobile */
    .impressum-container {
        justify-content: flex-start;
        padding: 20px 16px;
        padding-top: 72px;
    }

    .impressum-title {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }

    /* Footer mobile */
    .footer { bottom: 8px; right: 12px; }
}

/* ══════════════════════════════════════════════
   PORTRAIT PHONE — tall chart for attention plot
   Chart fills most of the viewport so time-series
   data is actually readable; controls scroll below.
   ══════════════════════════════════════════════ */

@media (max-width: 768px) and (orientation: portrait) {
    .chart-zone {
        flex: none !important;
        height: 58svh;
        min-height: 300px;
    }

    .chart-wrapper {
        min-height: 0;
    }

    /* Let the full artist-attention page scroll vertically */
    .main-content {
        overflow-y: auto;
    }

}

/* ── Close button for givers tooltip on mobile ── */
.tt-close-btn {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 6px;
    background: var(--gold-faint);
    border: 1px solid var(--border-bright);
    color: var(--gold);
    border-radius: 5px;
    font-size: 0.77rem;
    font-weight: 300;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s;
}

.tt-close-btn:active { background: var(--gold-glow); }

/* ══════════════════════════════════════════════
   MOBILE FULL-SCREEN GIVERS PANEL
   ══════════════════════════════════════════════ */

.givers-panel {
    display: none; /* desktop: never shown */
}

@media (max-width: 768px) {
    .givers-panel {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 72px; /* clear logo + top bar */
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-base);
        z-index: 600;
        transform: translateY(100%);
        transition: transform 0.28s ease;
        overflow: hidden;
    }

    .givers-panel.open {
        transform: translateY(0);
    }

    .givers-panel-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 18px 14px;
        border-bottom: 1px solid var(--border-mid);
        flex-shrink: 0;
    }

    .givers-panel-title {
        font-family: var(--font-display);
        font-size: 1.2rem;
        font-weight: 500;
        color: var(--text-bright);
        letter-spacing: 0.03em;
    }

    .givers-panel-close {
        font-size: 1.6rem;
        line-height: 1;
        color: var(--text-muted);
        background: none;
        border: none;
        cursor: pointer;
        padding: 4px 8px;
        margin: -4px -8px;
    }

    .givers-panel-body {
        flex: 1;
        overflow-y: auto;
        padding: 16px 18px 32px;
        -webkit-overflow-scrolling: touch;
    }

    /* Reuse tooltip table styles inside panel */
    .givers-panel-body .tt-artist {
        margin: 16px 0 8px;
    }

    .givers-panel-body .tt-table {
        width: 100%;
        font-size: 0.95rem;
    }

    .givers-panel-body .tt-name,
    .givers-panel-body .tt-amis {
        font-size: 0.95rem;
        padding: 6px 4px;
    }

    .givers-panel-body .tt-footnote {
        font-size: 0.8rem;
        margin-top: 20px;
    }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Small mobile 480px
   ══════════════════════════════════════════════ */

@media (max-width: 480px) {
    .main-content {
        padding: 10px;
        padding-top: 70px;
        padding-bottom: 44px;
    }

    .chart-title { font-size: 1rem; }

    .risers-table { font-size: 0.72rem; }

    .risers-table thead th {
        font-size: 0.6rem;
        padding: 8px 6px;
    }

    .risers-table tbody td { padding: 6px; }

    .rank-select,
    .trendline-btn {
        font-size: 0.82rem;
        padding: 8px 14px;
    }

    .landing-title { font-size: 1.4rem; }

    .app-box { height: 132px; }

    .impressum-title { font-size: 1.3rem; }

    .methodology-hero { padding: 30px 10px 20px; }
    .methodology-hero h2 { font-size: 1.4rem; }
    .methodology-content { padding-bottom: 40px; }
    .methodology-step { padding: 10px 12px; }
}

/* ══════════════════════════════════════════════
   NETWORK CHANGES VIEWS
   ══════════════════════════════════════════════ */

.netchanges-view {
    flex: 1;
    display: flex;
    gap: 16px;
    min-height: 0;
}

.netchanges-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.netchanges-right {
    flex: 1.2;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-deep);
    border-radius: var(--radius-lg);
    padding: 16px;
    min-height: 0;
}

.netchanges-table-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 4px 0;
}

.netchanges-header {
    margin-bottom: 16px;
    flex-shrink: 0;
}

.netchanges-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-bright);
    letter-spacing: 0.02em;
    margin-bottom: 6px;
}

.netchanges-subtitle {
    font-size: 0.83rem;
    font-weight: 300;
    color: var(--text-muted);
}

.netchanges-subtitle--bright {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-bright);
    letter-spacing: 0.02em;
}

.netchanges-controls {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

.netchanges-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.netchanges-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.netchanges-stat-num {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--gold);
}

.netchanges-stat-label {
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* Table links */
.risers-table a {
    color: var(--data);
    text-decoration: none;
    transition: color 0.2s;
}

.risers-table a:hover {
    color: #85b4f5;
    text-decoration: underline;
}

/* ══════════════════════════════════════════════
   NETWORK EVOLUTION PAGE
   ══════════════════════════════════════════════ */

.network-view {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.network-canvas-wrap {
    flex: 1;
    min-height: 0;
    position: relative;
    display: flex;
    background: var(--bg-surface);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.network-canvas-wrap canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.network-label {
    position: absolute;
    top: 20px;
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 500;
    color: var(--text-bright);
    letter-spacing: 0.04em;
    pointer-events: none;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.9);
}

.network-label-center {
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.network-era {
    position: absolute;
    bottom: 20px;
    left: 24px;
    font-size: 4.5rem;
    font-weight: 300;
    color: rgba(240, 234, 216, 0.5);
    letter-spacing: 0.12em;
    pointer-events: none;
    text-shadow: 0 0 48px rgba(201, 168, 76, 0.18);
}

.network-legend {
    position: absolute;
    bottom: 18px;
    right: 18px;
    background: rgba(9, 8, 6, 0.84);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius);
    padding: 12px 16px;
    pointer-events: none;
    backdrop-filter: blur(10px);
}

.network-legend-title {
    font-size: 0.62rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.network-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.77rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.9;
}

.network-legend-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.network-tooltip {
    display: none;
    position: absolute;
    z-index: 300;
    background: var(--bg-surface);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius);
    padding: 10px 14px;
    pointer-events: none;
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.65;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    max-width: 220px;
}

.network-tooltip strong {
    color: var(--text-bright);
    font-weight: 400;
}

/* ══════════════════════════════════════════════
   WHO TO WATCH VIEW
   ══════════════════════════════════════════════ */

.watch-view {
    flex: 1;
    overflow-y: auto;
    padding: 0 4px 32px;
}

.watch-intro {
    margin-bottom: 28px;
}

.watch-intro-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-bright);
    letter-spacing: 0.04em;
    margin: 0 0 8px;
}

.watch-intro-text {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.4;
    white-space: nowrap;
    margin: 0;
}

.watch-group-switch {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border: 1px solid var(--border-mid);
    border-radius: 5px;
    overflow: hidden;
    width: fit-content;
}

.watch-group-btn {
    font-family: var(--font-body);
    font-size: 1.0rem;
    font-weight: 400;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    padding: 10px 24px;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: color 0.18s, background 0.18s;
    white-space: nowrap;
}

.watch-group-btn + .watch-group-btn {
    border-left: 1px solid var(--border-mid);
}

.watch-group-btn.active {
    color: var(--text-bright);
    background: var(--bg-lifted);
}

.watch-group-btn:hover:not(.active) {
    color: var(--text-primary);
    background: var(--bg-surface);
}

.watch-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.watch-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-faint);
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
    overflow: hidden;
}

.watch-card:hover {
    border-color: var(--border-mid);
    background: var(--bg-lifted);
}

.watch-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    background: var(--gold);
    opacity: 0;
    transition: opacity 0.2s;
}

.watch-card:hover::before { opacity: 1; }

.watch-card-num {
    position: absolute;
    top: 12px;
    right: 14px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.08em;
}

.watch-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border-faint);
    background: var(--bg-lifted);
    transition: opacity 0.3s;
}

.watch-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.watch-card-top {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.watch-username {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.watch-type-badge {
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.watch-bio {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}


.watch-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.watch-followers {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--text-muted);
}

.watch-gain {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--gold);
    font-weight: 500;
}

.watch-rank-new {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--data);
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Network Changes + Mobile
   ══════════════════════════════════════════════ */

/* Mobile bottom nav — hidden by default, shown via 768px breakpoint */
.mobile-bottom-nav { display: none; }
.mobile-nav-item { display: none; }

@media (max-width: 1100px) {
    .netchanges-view { flex-direction: column; }

    .netchanges-left {
        min-height: 300px;
        max-height: 350px;
    }

    .netchanges-controls {
        position: static;
        width: 100%;
        box-sizing: border-box;
        padding: 0 16px;
        margin-bottom: 8px;
    }

    .netchanges-controls .risers-select {
        width: 100%;
    }
}

@media (max-width: 768px) {
    /* Compact username column — half width, allow wrap */
    #netTiersTable th:first-child,
    #netTiersTable td:first-child {
        width: 28%;
        max-width: 90px;
        white-space: normal;
        word-break: break-all;
    }

    #netEmergingTable th:nth-child(2),
    #netEmergingTable td:nth-child(2) {
        width: 36%;
        max-width: 110px;
        white-space: normal;
        word-break: break-all;
    }

    .netchanges-title { font-size: 1.1rem; }

    .netchanges-stats { gap: 16px; }

    .netchanges-stat-num { font-size: 1rem; }

    .netchanges-view { flex-direction: column; }

    .netchanges-left {
        min-height: 0;
        max-height: none;
        justify-content: flex-start;
    }

    /* Controls (title + dropdown) above SVG on mobile */
    .netchanges-controls {
        position: static;
        order: -1;
        width: 100%;
        box-sizing: border-box;
        padding: 0 16px 2px;
        margin-bottom: 0;
    }

    .netchanges-controls .netchanges-title {
        margin-bottom: 2px;
    }

    .netchanges-controls .risers-select {
        width: 100%;
        padding: 6px 12px;
    }

    .risers-svg {
        order: 1;
        max-height: 180px;
        padding-top: 0;
        margin-top: 18px;
    }

    .network-label {
        font-size: 0.85rem;
        top: 10px;
        letter-spacing: 0.02em;
    }

    .network-label-center {
        white-space: normal;
        text-align: center;
        left: 10px;
        right: 10px;
        transform: none;
        width: auto;
    }

    .network-era {
        font-size: 2rem;
        bottom: 12px;
        left: 12px;
    }

    .network-legend {
        bottom: 10px;
        right: 10px;
        padding: 8px 12px;
    }

    .network-legend-item { font-size: 0.7rem; }

    .network-container .main-content {
        padding: 84px 10px 10px;
    }

    .network-tooltip {
        max-width: 180px;
        font-size: 0.76rem;
    }


    /* Hide desktop tab strips on mobile — bottom nav takes over */
    .page-attention .attention-tabs { display: none; }
    .page-network .network-tabs { display: none; }

    /* Extra bottom padding so content isn't hidden behind tab bar */
    .attention-container .main-content,
    .network-container .main-content {
        padding-bottom: 72px;
    }

    .watch-intro-title { font-size: 1.2rem; }

    /* Who to Watch — mobile adjustments */
    .watch-view {
        display: flex;
        flex-direction: column;
    }

    .watch-group-switch {
        order: 1;
        width: 100%;
        position: sticky;
        top: 0;
        z-index: 10;
        background: var(--bg-base);
        margin-bottom: 8px;
        padding-bottom: 8px;
        flex-shrink: 0;
    }
    .watch-group-btn {
        white-space: normal;
        text-align: center;
        flex: 1;
        line-height: 1.35;
        padding: 10px 12px;
    }
    .watch-intro {
        order: 2;
        margin-bottom: 10px;
        flex-shrink: 0;
    }
    .watch-intro-text { white-space: normal; }
    .watch-grid {
        order: 3;
    }
    /* Bottom tab bar */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-surface);
        border-top: 1px solid var(--border-mid);
        z-index: 502;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 11px 8px 13px;
        cursor: pointer;
        color: var(--text-secondary);
        font-family: var(--font-display);
        letter-spacing: 0.02em;
        border-top: 2px solid transparent;
        transition: color 0.2s, border-color 0.2s, background 0.15s;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-nav-item.active {
        color: var(--text-bright);
        border-top-color: var(--gold);
    }

    .mobile-nav-item:active { background: var(--bg-lifted); }

    .mobile-nav-icon {
        font-size: 1.15rem;
        line-height: 1;
    }

    .mobile-nav-label {
        font-size: 0.78rem;
        font-weight: 400;
        text-align: center;
    }

    /* Extra bottom padding so content isn't hidden behind tab bar */
    .network-container .main-content {
        padding-bottom: 72px;
    }
}

@media (max-width: 480px) {
    .netchanges-title { font-size: 0.95rem; }
    .netchanges-subtitle { font-size: 0.76rem; }
    .netchanges-stats { gap: 12px; }
    .netchanges-stat-num { font-size: 0.85rem; }
    .netchanges-stat-label { font-size: 0.6rem; }

    .network-era {
        font-size: 1.5rem;
        bottom: 8px;
        left: 8px;
        letter-spacing: 0.06em;
    }

    .network-label { font-size: 0.75rem; }

    .network-legend { padding: 6px 10px; }
    .network-legend-title { font-size: 0.56rem; }
    .network-legend-item { font-size: 0.64rem; gap: 5px; }
    .network-legend-dot { width: 6px; height: 6px; }
}
