@font-face {
    font-family: "Maple Mono";
    font-style: normal;
    font-display: swap;
    font-weight: 400;
    /* Kev, I hope you don't mind me piggybacking off your CDN to serve Maple Mono 😬 */
    src: url("https://cdn.kevquirk.com/maple/MapleMono-Regular.woff2") format("woff2"),
        url("https://cdn.kevquirk.com/maple/MapleMono-Regular.woff") format("woff");
}

@font-face {
    font-family: "Maple Mono";
    font-style: normal;
    font-display: swap;
    font-weight: 700;
    src: url("https://cdn.kevquirk.com/maple/MapleMono-Bold.woff2") format("woff2"),
        url("https://cdn.kevquirk.com/maple/MapleMono-Bold.woff") format("woff");
}

@font-face {
    font-family: "Maple Mono";
    font-style: italic;
    font-display: swap;
    font-weight: 400;
    src: url("https://cdn.kevquirk.com/maple/MapleMono-Italic.woff2") format("woff2"),
        url("https://cdn.kevquirk.com/maple/MapleMono-Italic.woff") format("woff");
}

@font-face {
    font-family: "Maple Mono";
    font-style: italic;
    font-display: swap;
    font-weight: 700;
    src: url("https://cdn.kevquirk.com/maple/MapleMono-BoldItalic.woff2") format("woff2"),
        url("https://cdn.kevquirk.com/maple/MapleMono-BoldItalic.woff") format("woff");
}

:root {
    --measure: 42rem;
    --bg: #ffffff;
    --fg: #1a1a1a;
    --muted: #666666;
    --accent: #0a58ca;
    --border: #dddddd;
    --surface: #f5f5f5;
    --surface-2: #eaeaea;
    --code-bg: #f6f8fa;
    --mark-bg: #fff2a8;
    --mark-fg: #000000;
    --danger: #b00020;

    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121212;
        --fg: #e8e8e8;
        --muted: #9aa0a6;
        --accent: #7aa2f7;
        --border: #333333;
        --surface: #1c1c1c;
        --surface-2: #262626;
        --code-bg: #1a1a1a;
        --mark-bg: #5c4d00;
        --mark-fg: #ffffff;
        --danger: #ff6b6b;
    }
}

* {
    box-sizing: border-box;
    font-family: "Maple Mono", ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
}

body {
    font-family: system-ui, sans-serif;
    line-height: 1.6;
    color: var(--fg);
    background-color: var(--bg);
    margin: 0;
    padding: 0 1rem;
}

.site-header,
main,
.comments,
#townsquare-root,
.site-footer {
    max-width: var(--measure);
    margin-inline: auto;
}

.site-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.site-title { font-weight: 700; text-decoration: none; color: inherit; }
.site-header nav a { /* margin-left: 1rem; */ margin: .2rem; }

main { padding: 2rem 0; }

main {
    overflow-wrap: break-word;
    word-break: break-word;
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 1rem 0;
    color: var(--muted);
    font-size: 0.9rem;
}

a { color: var(--accent); }

.external-favicon {
    width: 1em;
    height: 1em;
    margin-right: 0.3em;
    vertical-align: -0.15em;
    border-radius: 2px;
}
.external-link::after {
    content: "↗";
    margin-left: 0.15em;
    font-size: 0.8em;
    line-height: 0;
    color: var(--muted);
    text-decoration: none;
}

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

pre {
    overflow-x: auto;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background-color: var(--code-bg);
}
code { font-family: ui-monospace, monospace; }
:not(pre) > code {
    background-color: var(--surface);
    padding: 0.1em 0.35em;
    border-radius: 3px;
    font-size: 0.9em;
}

blockquote {
    margin-inline: 0;
    padding-left: 1rem;
    border-left: 3px solid var(--border);
    color: var(--muted);
}

.meta { color: var(--muted); font-size: 0.9rem; }
.meta .tag { margin-right: 0.5rem; }

.post-list { list-style: none; padding: 0; }
.post-list li { margin-bottom: 1rem; }
.post-list time { color: var(--muted); font-size: 0.85rem; margin-left: 0.5rem; }
.post-list .preview { color: var(--muted); margin: 0.25rem 0 0; }

/* ---- {{ recent }} / <recent> recent-posts blocks ---- */
ul.recent { list-style: none; padding: 0; }
ul.recent li { margin-bottom: 0.4rem; }
ul.recent time { color: var(--muted); font-size: 0.85rem; margin-left: 0.5rem; }

.recent-posts {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}
.recent-post time { color: var(--muted); font-size: 0.85rem; margin-left: 0.5rem; }
.recent-post .excerpt {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.broken-link { color: var(--danger); border-bottom: 1px dashed var(--danger); }

.callout {
    border: 1px solid var(--border);
    border-left-width: 4px;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    background-color: var(--surface);
}
.callout-title { font-weight: 700; }
.callout-note, .callout-info { border-left-color: #0a58ca; }
.callout-tip { border-left-color: #198754; }
.callout-important { border-left-color: #8250df; }
.callout-warning { border-left-color: #ffc107; }
.callout-caution, .callout-danger { border-left-color: #d1242f; }

/* ---- content tabs (=== "Tab" syntax) ---- */
.tabbed-set {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    margin: 1rem 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}
.tabbed-set > input[type="radio"] { display: none; }
.tabbed-set > label {
    order: -1;
    flex: 1 1 0;
    min-width: 0;
    padding: 0.5rem 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    background: var(--surface);
    border-bottom: 2px solid transparent;
    transition: background 0.15s, border-color 0.15s;
    user-select: none;
}
.tabbed-set > label:hover { background: var(--surface-2); }
.tabbed-set > .tabbed-content {
    order: 0;
    display: none;
    width: 100%;
    padding: 1rem;
    overflow-x: auto;
}
.tabbed-set > input[type="radio"]:checked + label {
    background: var(--bg);
    border-bottom-color: var(--accent);
}
.tabbed-set > input[type="radio"]:checked + label + .tabbed-content {
    display: block;
}
.tabbed-set .tabbed-content pre { margin: 0; }
.tabbed-set .tabbed-content pre code { background: none; padding: 0; }

#folium-q {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background-color: var(--surface);
    color: var(--fg);
}
mark { background: var(--mark-bg); color: var(--mark-fg); }

/* ---- GFM task lists ---- */
.contains-task-list { list-style: none; padding-left: 1.2rem; }
.contains-task-list .contains-task-list { padding-left: 1.4rem; }
.task-list-item { list-style: none; }
.task-list-item-checkbox {
    margin: 0 0.45rem 0 -1.4rem;
    vertical-align: middle;
}

/* ---- footnotes: bottom section (fallback), sidenotes, and popup ---- */
sup.footnote-ref { line-height: 0; }
sup.footnote-ref a { text-decoration: none; }
.footnotes { font-size: 0.9rem; color: var(--muted); }
.sidenote-num { color: var(--accent); font-weight: 700; margin-right: 0.35em; }

/* Hidden by default (narrow screens use the popup instead). */
.sidenote { display: none; }

.footnote-popup {
    position: absolute;
    z-index: 1100;
    max-width: min(22rem, calc(100vw - 1rem));
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    font-size: 0.9rem;
    line-height: 1.5;
}
.footnote-popup-body { padding-right: 1rem; }
.footnote-popup-body p { margin: 0.25rem 0; }
.footnote-popup-body :last-child { margin-bottom: 0; }
.footnote-popup-close {
    position: absolute;
    top: 0;
    right: 4px;
    background: none;
    border: none;
    font-size: 1.2rem;
    line-height: 1.4;
    cursor: pointer;
    color: var(--muted);
}

@media (min-width: 78rem) {
    .sidenote {
        display: block;
        position: absolute;
        left: 100%;
        width: 14rem;
        margin-left: 1.5rem;
        font-size: 0.8rem;
        line-height: 1.45;
        color: var(--muted);
    }
    .sidenote p { margin: 0 0 0.4rem; }
    .sidenote :last-child { margin-bottom: 0; }
    .sidenote-flash {
        outline: 2px solid var(--accent);
        outline-offset: 3px;
        border-radius: 2px;
    }
    /* When sidenotes are shown, drop the duplicated bottom section. */
    .footnotes-enhanced .footnotes,
    .footnotes-enhanced .footnotes-sep { display: none; }
}

/* ---- search popup overlay ---- */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 10vh 1rem 2rem;
    background: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}
.search-overlay[hidden] { display: none; }

.search-modal {
    width: 100%;
    max-width: var(--measure);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.search-modal-q {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background-color: var(--surface);
    color: var(--fg);
}

.search-modal-results {
    margin-top: 1rem;
    max-height: 60vh;
    overflow-y: auto;
}

body.search-open { overflow: hidden; }

table { border-collapse: collapse; }
th, td { border: 1px solid var(--border); padding: 0.3rem 0.6rem; }
th { background-color: var(--surface); }

/* ---- Lanyard Discord presence widget ({{ lanyard_status(id) }}) ---- */
.presencecontainer {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-sizing: border-box;
    justify-content: space-between;
    max-width: fit-content;
    width: 100%;
    align-items: center;
    display: flex;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 20px;
}

.presence {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    height: 100%;
    padding: 15px;
    width: 320px;
}

.presence .pfp {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.presence .pfp img {
    border-radius: 50%;
    height: 48px;
    width: 48px;
    display: block;
}

.presence .pfp .status-icon {
    height: 14px;
    width: 14px;
    position: absolute;
    bottom: 0;
    right: 0;
    border-radius: 50%;
    box-sizing: border-box;
    border: 2px solid var(--surface);
    z-index: 999;
}

.presence .pfp .avatar-deco {
    height: 54px;
    width: 54px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
}

.presence .usernamecontainer {
    color: var(--fg);
    max-width: 100%;
    min-width: 0;
}

.presence .usernamecontainer h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    overflow-x: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--fg);
    font-size: 1rem;
}

.presence .guild-tag {
    background-color: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2px 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    font-size: 12px;
    color: var(--muted);
}

.presence .guild-tag img {
    height: 12px;
    width: 12px;
}

.presence .activity {
    font-size: 12px;
    max-width: 70%;
    overflow-x: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: block;
    flex: 1;
    min-width: 0;
    color: var(--muted);
}

.presence h1,
.presence h3,
.presence h4 {
    margin: 0;
}

.presence h3 a {
    color: var(--fg);
}



/* ==========================================================================
   SCROLL PROGRESS INDICATOR (LessWrong Design Layout)
   ========================================================================== */
#scroll-container {
    display: none; /* Blocked in JS, shown only when DOM is ready */
    position: fixed;
    left: 2rem; /* Floating elegantly on the left side of the screen */
    top: 4rem;
    height: calc(100vh - 8rem);
    width: 30px; /* Generous transparent interactive hover hitbox target */
    background-color: transparent;
    z-index: 1000;
    cursor: pointer;
}

/* Central vertical track line */
#scroll-container::before {
    content: "";
    position: absolute;
    left: 14px; /* Centered perfectly inside the 30px target space */
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: light-dark(var(--surface-2), var(--border));
    z-index: 1001;
}

/* Growing Progress Bar Thumb [xxxxxx  ] */
#scroll-container #indicator {
    position: absolute;
    left: 13.5px; /* Aligned over central track line */
    width: 3px;
    background-color: var(--accent);
    z-index: 1002;
    transition: height 0.1s ease-out; /* Keeps transitions silky when scrolling */
}

/* Gap containers for heading markers */
#scroll-container .heading-marker-container {
    position: absolute;
    left: 0;
    right: 0;
    text-decoration: none;
    z-index: 1003; /* High layering so gaps slice through both track and progress bar */
}

/* Tick line breaks */
#scroll-container .heading-indicator {
    display: block;
    margin-left: 13.5px; /* Aligned over track line */
    width: 3px;
    height: 4px;
    background-color: var(--bg); /* Set to body background to clip line visual */
}

/* Hover-expanded heading labels */
#scroll-container .heading-label {
    display: block;
    opacity: 0;
    visibility: hidden;
    width: 12rem;
    margin-left: 2.5rem; /* Safely pushed to the right of the indicator line */
    line-height: 1.1;
    font-size: 0.8rem;
    transform: translateY(-50%);
    transition: opacity 0.25s ease, visibility 0.25s;
    color: var(--muted);
    pointer-events: none;
}

/* Expanding label list on wide tracker hover */
#scroll-container:hover .heading-label {
    opacity: 1;
    visibility: visible;
}

/* Horizontal progress bar for smaller viewport layouts */
@media (max-width: 45rem) {
    #scroll-container {
        position: fixed;
        inset: 0 0 auto;
        height: 4px;
        width: 100%;
        left: 0;
        top: 0;
    }

    #scroll-container::before {
        display: none; /* Hide vertical track backgrounds on narrow layouts */
    }

    #scroll-container #indicator {
        left: 0;
        top: 0;
        height: 100% !important;
    }
}


#townsquare-root#townsquare-root {
    --scene: #e4e2dd;
    --ground-fill: #efede9;
    --page: #efede9;
    --action-zone-fill: #efede9;
    --surface: #fdf8f4;
    --ink: #2a2926;
    --you: #c8641f;
    --tree-trunk: color-mix(in oklab, var(--text) 58%, var(--muted) 42%);
    --tree-canopy: color-mix(in oklab, var(--text) 58%, var(--muted) 42%);
    --other: #26241f;
    --ground-line: rgba(42, 41, 38, 0.16);
    --ground: rgba(42, 41, 38, 0.16);
    --you-deep: var(--you);
    --text: var(--ink);
    --muted: var(--ink);
}

#townsquare-root#townsquare-root[data-townsquare-theme="dark"] {
    --scene: #242521;
    --ground-fill: #181917;
    --page: #181917;
    --action-zone-fill: #181917;
    --surface: #24231f;
    --ink: #f2eee6;
    --you: #df8a43;
    --tree-trunk: color-mix(in oklab, var(--text) 58%, var(--muted) 42%);
    --tree-canopy: color-mix(in oklab, var(--text) 58%, var(--muted) 42%);
    --other: #ddd7cc;
    --ground-line: rgba(242, 238, 230, 0.18);
    --ground: rgba(242, 238, 230, 0.18);
    --you-deep: var(--you);
    --text: var(--ink);
    --muted: var(--ink);
}

@media (prefers-color-scheme: dark) {
    #townsquare-root#townsquare-root,
    #townsquare-root#townsquare-root[data-townsquare-theme="auto"] {
        --scene: #242521;
        --ground-fill: #181917;
        --page: #181917;
        --action-zone-fill: #181917;
        --surface: #24231f;
        --ink: #f2eee6;
        --you: #df8a43;
        --tree-trunk: color-mix(in oklab, var(--text) 58%, var(--muted) 42%);
        --tree-canopy: color-mix(in oklab, var(--text) 58%, var(--muted) 42%);
        --other: #ddd7cc;
        --ground-line: rgba(242, 238, 230, 0.18);
        --ground: rgba(242, 238, 230, 0.18);
        --you-deep: var(--you);
        --text: var(--ink);
        --muted: var(--ink);
    }
}

/* ===========
   WIDGETS AND SHIT // yh im trying to act like an LLM comments
   ===========
*/

.muted {
    color: var(--muted);
}
 
.eyebrow {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 4px;
}
 
/* ================================
   shared widget card
   ================================ */
 
.presencecontainer,
.current-weather,
.now-playing,
.recent-tracks,
.discord-account {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-sizing: border-box;
}
 
/* ================================
   discord presence (as given)
   ================================ */
 
.presencecontainer {
    justify-content: space-between;
    max-width: fit-content;
    width: 100%;
    align-items: center;
    display: flex;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 20px;
}
 
.presence {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    height: 100%;
    padding: 15px;
    width: 320px;
}
 
.presence .pfp {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}
 
.presence .pfp img {
    border-radius: 50%;
    height: 48px;
    width: 48px;
    display: block;
}
 
.presence .pfp .status-icon {
    height: 14px;
    width: 14px;
    position: absolute;
    bottom: 0;
    right: 0;
    border-radius: 50%;
    box-sizing: border-box;
    border: 2px solid var(--surface);
    z-index: 999;
}
 
.presence .pfp .avatar-deco {
    height: 54px;
    width: 54px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
}
 
.presence .usernamecontainer {
    color: var(--fg);
    max-width: 100%;
    min-width: 0;
}
 
.presence .usernamecontainer h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    overflow-x: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--fg);
    font-size: 1rem;
}
 
.presence .guild-tag,
.discord-account .guild {
    background-color: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2px 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    font-size: 12px;
    color: var(--muted);
}
 
.presence .guild-tag img,
.discord-account .guild img {
    height: 12px;
    width: 12px;
}
 
.presence .activity {
    font-size: 12px;
    max-width: 70%;
    overflow-x: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: block;
    flex: 1;
    min-width: 0;
    color: var(--muted);
}
 
.presence h1,
.presence h3,
.presence h4 {
    margin: 0;
}
 
.presence h3 a {
    color: var(--fg);
}
 
/* ================================
   full discord profile
   ================================ */
 
.discord-account {
    padding: 0 0 16px;
    width: 320px;
    max-width: 100%;
    overflow: hidden;
}
 
.discord-account .banner {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
    background-color: var(--surface-2);
}
 
.discord-account .profile-image {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid var(--surface);
    margin: -36px 0 0 16px;
    display: block;
    background-color: var(--surface-2);
}
 
.discord-account .badges {
    display: flex;
    gap: 4px;
    padding: 8px 16px 0;
}
 
.discord-account .badge {
    width: 20px;
    height: 20px;
}
 
.discord-account .global_name {
    padding: 8px 16px 0;
}
 
.discord-account .global_name p {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    display: inline-block;
    margin-right: 6px;
}
 
.discord-account .username {
    padding: 0 16px;
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
}
 
.discord-account .about-me {
    padding: 0 16px;
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
}
 
.discord-account .connections {
    padding: 4px 16px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
 
.discord-account .connection {
    display: flex;
    justify-content: space-between;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
}
 
.discord-account .connection .name {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
}
 
.discord-account .connection .type {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}
 
/* ================================
   weather
   ================================ */
 
.current-weather {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    width: fit-content;
    max-width: 100%;
}
 
.current-weather .local-time,
.current-weather .local-weather {
    display: flex;
    flex-direction: column;
    min-width: 140px;
}
 
.current-weather .datime {
    font-variant-numeric: tabular-nums;
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.1;
}
 
.current-weather .date {
    margin: 2px 0 0;
    font-size: 10px;
    color: var(--muted);
}
 
.current-weather .local-weather {
    border-left: 1px solid var(--border);
    padding-left: 1.5rem;
}
 
.current-weather .temp {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    color: var(--accent);
    line-height: 1.1;
}
 
.current-weather .weather-stats {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}
 
.current-weather .weather-stats p {
    margin: 0;
    font-size: 10px;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2px 8px;
}
 
/* ================================
   listenbrainz: now playing
   ================================ */
 
.now-playing {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 15px;
    width: 320px;
    max-width: 100%;
    box-sizing: border-box;
}
 
.now-playing .np-art {
    position: relative;
    flex-shrink: 0;
}
 
.now-playing .np-art img,
.now-playing .np-art-fallback {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: block;
    object-fit: cover;
}
 
.now-playing .np-art-fallback {
    background: var(--surface-2);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
 
.now-playing .live-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: var(--danger);
    border: 2px solid var(--surface);
    box-sizing: border-box;
    animation: pulse 1.6s ease-in-out infinite;
}
 
.now-playing .np-info {
    min-width: 0;
    flex: 1;
}
 
.now-playing .np-track,
.now-playing .np-artist {
    margin: 0;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
 
.now-playing .np-track {
    font-size: 14px;
    font-weight: 600;
}
 
.now-playing .np-artist {
    font-size: 12px;
    color: var(--muted);
    margin-top: 1px;
}
 
.now-playing .eq {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
    margin-top: 6px;
}
 
.now-playing .eq span {
    width: 3px;
    background: var(--accent);
    border-radius: 2px;
    animation: eq 1s ease-in-out infinite;
}
 
.now-playing .eq span:nth-child(1) { animation-delay: 0s; }
.now-playing .eq span:nth-child(2) { animation-delay: 0.2s; }
.now-playing .eq span:nth-child(3) { animation-delay: 0.4s; }
.now-playing .eq span:nth-child(4) { animation-delay: 0.1s; }
 
@keyframes eq {
    0%, 100% { height: 3px; }
    50% { height: 12px; }
}
 
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
 
/* ================================
   listenbrainz: recent tracks
   ================================ */
 
.recent-tracks {
    padding: 15px;
    width: 320px;
    max-width: 100%;
    box-sizing: border-box;
}
 
.recent-tracks .track-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}
 
.recent-tracks .track-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
 
.recent-tracks .track-art img,
.recent-tracks .track-art-fallback {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    flex-shrink: 0;
    object-fit: cover;
}
 
.recent-tracks .track-art-fallback {
    background: var(--surface-2);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
 
.recent-tracks .track-info {
    min-width: 0;
    flex: 1;
}
 
.recent-tracks .track-name,
.recent-tracks .track-artist {
    margin: 0;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
 
.recent-tracks .track-name {
    font-size: 13px;
    font-weight: 500;
}
 
.recent-tracks .track-artist {
    font-size: 12px;
    color: var(--muted);
}
 
.recent-tracks .track-time {
    font-size: 11px;
    color: var(--muted);
    flex-shrink: 0;
    white-space: nowrap;
}
 
/* ================================
   reduced motion
   ================================ */
 
@media (prefers-reduced-motion: reduce) {
    .now-playing .eq span,
    .now-playing .live-dot {
        animation: none;
    }
}
 
/* ================================
   optional wrapper to lay widgets
   out in a responsive grid — apply
   to whatever contains your cards
   ================================ */
 
.widgets-grid {
    columns: 280px;
    column-gap: 20px;
}

.widgets-grid > * {
    /* display: inline-block; */
    width: 100%;
    margin-bottom: 20px;
    break-inside: avoid;
}

.pulse {
    display: block;
    
    background: #00b100;
    box-shadow: 0 0 10px #00d900;
    animation: pulse 2s infinite;

    aspect-ratio: 1 / 1;
    border-radius: 1000px;

    width: 12px;
    height: 12px;
}

/* ==========================================================================
   UNIFIED DISCORD PROFILE CARD WIDGET
   ========================================================================== */
.discord-account {
    padding: 0 0 16px;
    width: 320px;
    max-width: 100%;
    overflow: hidden;
}

.discord-account .banner {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
    background-color: var(--surface-2);
}

.discord-account .profile-avatar-wrapper {
    position: relative;
    margin: -36px 0 0 12px;
    display: inline-block;
}

.discord-account .pfp {
    position: relative;
    display: inline-block;
}

.pfp .activity-box {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;

    position: absolute;

    width: max-content;
    height: min-content;

    max-width: 200%;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    top: 0px;
    left: 100px;
}

.discord-account .profile-image {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid var(--surface);
    display: block;
    background-color: var(--surface-2);
}

.discord-account .pfp .status-icon {
    height: 20px;
    width: 20px;
    position: absolute;
    bottom: 0;
    right: 0;
    border-radius: 50%;
    box-sizing: border-box;
    border: 3px solid var(--surface);
    z-index: 99;
}

.discord-account .pfp .avatar-deco {
    height: 80px;
    width: 80px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    pointer-events: none;
}

.discord-account .badges {
    display: flex;
    gap: 4px;
    padding: 8px 16px 0;
}

.discord-account .badge {
    width: 20px;
    height: 20px;
}

.discord-account .global_name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 16px 0;
}

.discord-account .global_name p {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    display: inline-block;
}

.discord-account .guild {
    background-color: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2px 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    font-size: 11px;
    color: var(--muted);
}

.discord-account .guild img {
    height: 12px;
    width: 12px;
}

.discord-account .username {
    padding: 0 16px;
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
}

/* Unified component labels left padding/margin */
.discord-account .eyebrow {
    padding: 0 16px;
    margin-top: 12px;
    margin-bottom: 4px;
}

.discord-account .about-me {
    padding: 0 16px;
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.discord-account .connections {
    padding: 4px 16px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.discord-account .connection {
    display: flex;
    justify-content: space-between;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
}

.discord-account .connection .name {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
}

.discord-account .connection .type {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

/* ==========================================================================
   LISTENBRAINZ: NOW PLAYING WIDGET (WITH LYRIC SUB-BOX)
   ========================================================================== */
.now-playing-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 320px;
    max-width: 100%;
}

.now-playing {
    width: 100%;
    transition: border-radius 0.2s ease;
}

/* Lyrics sub-box card hanging underneath */
.np-lyrics-subbox {
    width: 90%;
    background-color: var(--surface-2);
    border: 1px solid var(--border);
    border-top: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    padding: 8px 12px;
    font-size: 11px;
    text-align: center;
    color: var(--fg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    z-index: 10;
}