html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: #0e1218;
    color: #d8d4cc;
    font-family: system-ui, -apple-system, "Adwaita Sans", sans-serif;
}

#graph {
    position: absolute;
    inset: 0 0 96px 0;
}

#hud {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 96px;
    padding: 8px 16px;
    box-sizing: border-box;
    background: linear-gradient(to top, #11151c 0%, #11151ce6 80%, transparent);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#tick-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-variant-numeric: tabular-nums;
}

#tick-label {
    min-width: 8em;
    color: #f1c87c;
}

#counts {
    min-width: 14em;
    color: #8a8275;
    font-size: 12px;
}

#scrub {
    flex: 1;
    accent-color: #f1c87c;
}

#legend {
    display: flex;
    gap: 18px;
    font-size: 12px;
    color: #8a8275;
}

#legend .swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: -1px;
}

/* The toggle has to be visible against a near-black canvas, so it
   uses the same warm-gold accent the title bar uses for "selected"
   state. Solid background (not translucent) keeps the contrast even
   when a dark cluster of nodes drifts behind it. */
#info-toggle {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1a2030;
    color: #f1c87c;
    border: 2px solid #f1c87c;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: background 120ms ease-out, transform 120ms ease-out;
}

#info-toggle:hover {
    background: #f1c87c;
    color: #1a2030;
    transform: scale(1.05);
}

#info {
    position: absolute;
    top: 0; left: 0; bottom: 96px;
    width: 420px;
    padding: 18px 22px 22px;
    box-sizing: border-box;
    background: #181d26;
    border-right: 1px solid #2a3340;
    overflow-y: auto;
    transition: transform 180ms ease-out;
    z-index: 5;
}

#info.hidden {
    transform: translateX(-110%);
}

#info-close {
    position: absolute;
    top: 10px; right: 14px;
    background: transparent;
    border: 0;
    color: #8a8275;
    font-size: 22px;
    cursor: pointer;
}

#info-close:hover {
    color: #d8d4cc;
}

#info h2 {
    margin: 0 0 14px;
    font-size: 18px;
    color: #f1c87c;
    font-weight: 500;
}

#info p {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.6;
    color: #c4bfb4;
}

#info p strong {
    color: #e2d8c4;
    font-weight: 600;
}

#info p em {
    color: #d8d4cc;
}

#info p.info-meta {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid #232934;
    color: #8a8275;
    font-style: italic;
    font-size: 12px;
}

#bio {
    position: absolute;
    top: 0; right: 0; bottom: 96px;
    width: 420px;
    padding: 18px 22px 22px;
    box-sizing: border-box;
    background: #181d26;
    border-left: 1px solid #2a3340;
    overflow-y: auto;
    transition: transform 180ms ease-out;
    z-index: 5;
}

#bio.hidden {
    transform: translateX(110%);
}

#bio-close {
    position: absolute;
    top: 10px; right: 14px;
    background: transparent;
    border: 0;
    color: #8a8275;
    font-size: 22px;
    cursor: pointer;
}

#bio-close:hover {
    color: #d8d4cc;
}

#bio-title {
    margin: 0 0 14px;
    font-size: 18px;
    color: #f1c87c;
    font-weight: 500;
}

#bio-body {
    margin: 0;
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.55;
    color: #c4bfb4;
}
