/*
 * Bug Tracker - styles
 * Visual identity: "Control Deck" - a telemetry console for game-server communities.
 * Three switchable themes: midnight (default), daybreak, ember.
 * https://github.com/Yamiru
 * https://builtbybit.com/resources/nebula-teamdesk.113704/
 * Commercial license - (c) 2026 Yamiru (https://yamiru.com). Resale or redistribution prohibited. See LICENSE.
 */

/* ===========================================================================
 * Theme tokens
 * ========================================================================= */

:root,
:root[data-theme="midnight"] {
    --bg: #0a0d14;
    --bg-spot-1: rgba(99, 102, 241, .20);
    --bg-spot-2: rgba(34, 211, 238, .14);
    --surface: rgba(20, 25, 37, .72);
    --surface-solid: #141925;
    --surface-2: #1a2030;
    --surface-3: #20283a;
    --ink: #e9edf6;
    --ink-soft: #aab4c8;
    --muted: #6b7488;
    --border: rgba(255, 255, 255, .08);
    --border-strong: rgba(255, 255, 255, .16);

    --accent: #6366f1;
    --accent-2: #22d3ee;
    --accent-ink: #ffffff;
    --accent-grad: linear-gradient(135deg, #6366f1 0%, #818cf8 45%, #22d3ee 100%);
    --accent-soft: rgba(99, 102, 241, .16);
    --accent-line: rgba(129, 140, 248, .5);

    --bar: rgba(12, 15, 23, .72);
    --bar-ink: #e9edf6;

    --type-bug: #fb7185;
    --type-idea: #fbbf24;
    --type-suggestion: #60a5fa;
    --type-other: #94a3b8;

    --st-open: #60a5fa;
    --st-in_progress: #fbbf24;
    --st-closed: #64748b;

    --pr-low: #64748b;
    --pr-medium: #60a5fa;
    --pr-high: #fb923c;
    --pr-critical: #f43f5e;

    --danger: #fb7185;
    --danger-soft: rgba(244, 63, 94, .14);

    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 7px;
    --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 18px 40px -22px rgba(0, 0, 0, .8);
    --glow: 0 0 0 1px var(--accent-line), 0 10px 40px -12px rgba(99, 102, 241, .55);
    --ring: rgba(255, 255, 255, .06);

    --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
    --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    color-scheme: dark;
}

:root[data-theme="ember"] {
    --bg: #120c0e;
    --bg-spot-1: rgba(251, 113, 133, .20);
    --bg-spot-2: rgba(245, 158, 11, .15);
    --surface: rgba(28, 19, 22, .74);
    --surface-solid: #1b1316;
    --surface-2: #23181b;
    --surface-3: #2c1e22;
    --ink: #f7eae6;
    --ink-soft: #dcc0b8;
    --muted: #9a7e78;
    --border: rgba(255, 220, 210, .09);
    --border-strong: rgba(255, 220, 210, .18);

    --accent: #fb7185;
    --accent-2: #f59e0b;
    --accent-ink: #2a0e10;
    --accent-grad: linear-gradient(135deg, #fb7185 0%, #fb923c 50%, #f59e0b 100%);
    --accent-soft: rgba(251, 113, 133, .16);
    --accent-line: rgba(251, 146, 60, .5);

    --bar: rgba(18, 12, 14, .74);
    --bar-ink: #f7eae6;

    --type-bug: #fb7185;
    --type-idea: #fbbf24;
    --type-suggestion: #f59e0b;
    --type-other: #b59a93;

    --st-open: #fbbf24;
    --st-in_progress: #fb923c;
    --st-closed: #8a6f69;

    --pr-low: #8a6f69;
    --pr-medium: #fbbf24;
    --pr-high: #fb923c;
    --pr-critical: #f43f5e;

    --danger: #f43f5e;
    --danger-soft: rgba(244, 63, 94, .16);

    --shadow: 0 1px 0 rgba(255, 220, 210, .05) inset, 0 18px 40px -22px rgba(0, 0, 0, .85);
    --glow: 0 0 0 1px var(--accent-line), 0 10px 40px -12px rgba(251, 113, 133, .5);
    --ring: rgba(255, 220, 210, .06);
    color-scheme: dark;
}

:root[data-theme="daybreak"] {
    --bg: #eceef5;
    --bg-spot-1: rgba(99, 102, 241, .14);
    --bg-spot-2: rgba(14, 165, 233, .10);
    --surface: rgba(255, 255, 255, .82);
    --surface-solid: #ffffff;
    --surface-2: #f3f5fb;
    --surface-3: #e9edf7;
    --ink: #111420;
    --ink-soft: #3c4660;
    --muted: #6b7488;
    --border: #e3e7f1;
    --border-strong: #cdd4e4;

    --accent: #4f46e5;
    --accent-2: #0ea5e9;
    --accent-ink: #ffffff;
    --accent-grad: linear-gradient(135deg, #4f46e5 0%, #6366f1 45%, #0ea5e9 100%);
    --accent-soft: rgba(79, 70, 229, .12);
    --accent-line: rgba(79, 70, 229, .35);

    --bar: rgba(255, 255, 255, .8);
    --bar-ink: #111420;

    --type-bug: #dc2626;
    --type-idea: #d97706;
    --type-suggestion: #2563eb;
    --type-other: #64748b;

    --st-open: #2563eb;
    --st-in_progress: #d97706;
    --st-closed: #94a3b8;

    --pr-low: #94a3b8;
    --pr-medium: #2563eb;
    --pr-high: #ea580c;
    --pr-critical: #dc2626;

    --danger: #dc2626;
    --danger-soft: #fdecec;

    --shadow: 0 1px 2px rgba(20, 22, 28, .05), 0 16px 38px -22px rgba(20, 22, 28, .35);
    --glow: 0 0 0 1px var(--accent-line), 0 12px 34px -14px rgba(79, 70, 229, .4);
    --ring: rgba(17, 20, 32, .05);
    color-scheme: light;
}

/* ===========================================================================
 * Base
 * ========================================================================= */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    max-width: 100%;
    overflow-x: clip;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    background-color: var(--bg);
    background-image:
        radial-gradient(1100px 620px at 12% -8%, var(--bg-spot-1), transparent 60%),
        radial-gradient(900px 560px at 100% 0%, var(--bg-spot-2), transparent 55%);
    background-attachment: fixed;
    position: relative;
}

/* Fine grain texture - the quiet signature that gives the deck its tactility. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: .04;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#login, #app { position: relative; z-index: 1; }

[hidden] { display: none !important; }
button { font-family: inherit; }
::selection { background: var(--accent-soft); }

a { color: inherit; }

/* ===========================================================================
 * Buttons
 * ========================================================================= */

.btn {
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 9px 15px;
    font-size: 13.5px;
    font-weight: 650;
    letter-spacing: -.005em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: transform .12s cubic-bezier(.2, .8, .2, 1), box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn--accent {
    background-image: var(--accent-grad);
    color: var(--accent-ink);
    box-shadow: 0 8px 22px -12px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn--accent:hover { box-shadow: var(--glow); transform: translateY(-1px); }

.btn--ghost {
    background: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--ink-soft);
}
.btn--ghost:hover { background: var(--surface-3); color: var(--ink); border-color: var(--accent-line); }

.btn--danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn--danger:hover { background: color-mix(in srgb, var(--danger) 18%, transparent); }

.btn--block { width: 100%; }
.btn--mini { padding: 6px 11px; font-size: 12.5px; border-radius: var(--radius-xs); }

.btn--icon { padding: 9px; width: 38px; height: 38px; }
.btn--icon svg { width: 18px; height: 18px; display: block; }

/* ===========================================================================
 * Login - the "handshake" panel
 * ========================================================================= */

.login {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
    overflow: hidden;
}
.login::after {
    content: "";
    position: absolute;
    width: 720px;
    height: 720px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent));
    filter: blur(120px);
    opacity: .28;
    animation: spin 22s linear infinite;
}
.login__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid var(--border-strong);
    border-radius: 22px;
    padding: 34px 30px;
    box-shadow: var(--shadow), 0 40px 90px -40px rgba(0, 0, 0, .8);
}
.login__mark {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 19px;
    letter-spacing: -.02em;
}
.login__dot, .topbar__dot {
    position: relative;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--accent-grad);
    box-shadow: 0 0 0 4px var(--accent-soft), 0 0 16px 2px var(--accent);
}
.login__lead { color: var(--ink-soft); font-size: 14px; margin: 16px 0 20px; }
.login__note {
    font-size: 13px;
    margin: 0 0 18px;
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--ink);
    border: 1px solid var(--accent-line);
}
.login__note--error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }

.board-note-wrap { max-width: 940px; margin: 0 auto; padding: 18px 22px 0; }
.board-note {
    font-size: 13px;
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--ink);
    border: 1px solid var(--accent-line);
}
.board-note--error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.login__foot {
    margin: 22px 0 0;
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: .04em;
    color: var(--muted);
    text-align: center;
}

.btn--discord {
    background: #5865f2;
    color: #fff;
    padding: 12px 16px;
    font-size: 14.5px;
    box-shadow: 0 10px 26px -14px #5865f2;
}
.btn--discord:hover { background: #4954d6; transform: translateY(-1px); box-shadow: 0 14px 30px -12px #5865f2; }
.discord-ico { width: 21px; height: 21px; flex-shrink: 0; }

/* ===========================================================================
 * Topbar
 * ========================================================================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: var(--bar);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    color: var(--bar-ink);
    padding: 12px max(22px, env(safe-area-inset-right)) 12px max(22px, env(safe-area-inset-left));
    border-bottom: 1px solid var(--border);
}
.topbar__brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.topbar__name { font-weight: 800; letter-spacing: -.02em; font-size: 16px; color: inherit; text-decoration: none; cursor: pointer; transition: color .15s ease; }
a.topbar__name:hover { color: var(--accent); }
.topbar__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.topbar__me { font-size: 13px; color: var(--ink-soft); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__avatar { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 1px solid var(--border-strong); display: block; }
.topbar__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.rolebadge {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--ink-soft);
    border: 1px solid var(--border);
}
.rolebadge[data-role="admin"] { background-image: var(--accent-grad); color: var(--accent-ink); border-color: transparent; }
.rolebadge[data-role="moderator"] { background: color-mix(in srgb, var(--accent-2) 22%, transparent); color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 40%, transparent); }

/* ===========================================================================
 * Board layout
 * ========================================================================= */

.board {
    display: grid;
    grid-template-columns: 264px 1fr;
    gap: 22px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 22px 48px;
    align-items: start;
}

.filters {
    position: sticky;
    top: 82px;
    background: var(--surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}
.filters__head { display: none; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.filters__head h2 { margin: 0; font-size: 15px; }
.filters__close { background: none; border: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.filters__search input {
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 10px 13px;
    font-size: 14px;
    background: var(--surface-2);
    color: var(--ink);
}
.filters__group { margin-top: 20px; }
.filters__title {
    margin: 0 0 9px;
    font-family: var(--mono);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--muted);
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    color: var(--ink-soft);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip:hover { border-color: var(--accent-line); color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }

.select {
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 9px 11px;
    font-size: 13.5px;
    background: var(--surface-2);
    color: var(--ink);
    cursor: pointer;
}
.select--inline { width: auto; }
.select--mini { width: auto; padding: 6px 9px; font-size: 12.5px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.filters .btn--block { margin-top: 20px; }

.filters-toggle { display: none; }
.drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(2, 4, 9, .55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

/* ===========================================================================
 * Content + stats
 * ========================================================================= */

.content__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .02em;
    color: var(--muted);
}
.stats b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 700; }

/* ===========================================================================
 * Issue cards - "telemetry channels"
 * ========================================================================= */

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

.card {
    position: relative;
    background: var(--surface);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px 17px 15px 21px;
    box-shadow: var(--shadow);
    cursor: pointer;
    overflow: hidden;
    transition: transform .14s cubic-bezier(.2, .8, .2, 1), border-color .16s ease, box-shadow .2s ease;
}
/* Left signal rail, colored by issue type. */
.card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--type-other);
    box-shadow: 0 0 14px 0 var(--type-other);
    opacity: .9;
}
/* Hover sheen sweeping across the channel. */
.card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, var(--ring) 50%, transparent 70%);
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent-line); box-shadow: var(--shadow), var(--glow); }
.card:hover::after { opacity: 1; }
.card[data-type="bug"]::before { background: var(--type-bug); box-shadow: 0 0 14px 0 var(--type-bug); }
.card[data-type="idea"]::before { background: var(--type-idea); box-shadow: 0 0 14px 0 var(--type-idea); }
.card[data-type="suggestion"]::before { background: var(--type-suggestion); box-shadow: 0 0 14px 0 var(--type-suggestion); }
.card[data-type="other"]::before { background: var(--type-other); box-shadow: 0 0 14px 0 var(--type-other); }

.card__top { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.card__id { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.card__title { font-weight: 700; font-size: 15.5px; flex: 1; min-width: 0; letter-spacing: -.015em; }
.card__lock {
    font-family: var(--mono);
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: 2px 8px;
}
.card__desc { color: var(--ink-soft); font-size: 13.5px; margin: 3px 0 11px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--type-bug { color: var(--type-bug); background: color-mix(in srgb, var(--type-bug) 16%, transparent); }
.badge--type-idea { color: var(--type-idea); background: color-mix(in srgb, var(--type-idea) 16%, transparent); }
.badge--type-suggestion { color: var(--type-suggestion); background: color-mix(in srgb, var(--type-suggestion) 16%, transparent); }
.badge--type-other { color: var(--type-other); background: color-mix(in srgb, var(--type-other) 16%, transparent); }

.status {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    color: #fff;
}
.status--open { background: var(--st-open); }
.status--in_progress { background: var(--st-in_progress); color: #1a1206; }
.status--closed { background: var(--st-closed); }

.prio { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; color: var(--ink-soft); }
.prio .dot { width: 9px; height: 9px; border-radius: 3px; }
.prio--low .dot { background: var(--pr-low); }
.prio--medium .dot { background: var(--pr-medium); }
.prio--high .dot { background: var(--pr-high); }
.prio--critical .dot { background: var(--pr-critical); box-shadow: 0 0 8px var(--pr-critical); }

.pill { font-size: 11px; font-weight: 650; padding: 3px 9px; border-radius: 999px; color: #fff; }
.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: -.01em;
    padding: 3px 11px 3px 8px;
    border-radius: 999px;
}
.cat-chip__ico { display: inline-flex; }
.cat-chip__ico svg { width: 13px; height: 13px; display: block; opacity: .95; }

.tag-wrap {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding-left: 9px;
    margin-left: 1px;
    border-left: 1px solid var(--border-strong);
}
.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--ink-soft);
    background: transparent;
}
.tag .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.card__author { margin-left: auto; font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.card__date { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.empty {
    text-align: center;
    padding: 64px 20px;
    color: var(--muted);
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
}
.empty p { margin: 0 0 16px; font-size: 14px; }

/* ===========================================================================
 * Modals
 * ========================================================================= */

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(2, 4, 9, .6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal__panel {
    position: relative;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow: auto;
    background: var(--surface-solid);
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .7);
    animation: pop .16s cubic-bezier(.2, .8, .2, 1);
}
.modal__panel--wide { max-width: 780px; }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 19px 22px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface-solid); z-index: 2; }
.modal__head h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.modal__x { background: none; border: none; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.modal__x:hover { color: var(--ink); }
.modal__body { padding: 22px; }
.modal__foot { display: flex; align-items: center; gap: 8px; padding: 16px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 20px 20px; position: sticky; bottom: 0; }
.modal__spacer { flex: 1; }

.field { margin-bottom: 17px; }
.field > label { display: block; font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--muted); margin-bottom: 7px; text-transform: uppercase; letter-spacing: .1em; }
.field input[type="text"], .field input[type="password"], .field textarea {
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 11px 13px;
    font-size: 14.5px;
    font-family: inherit;
    background: var(--surface-2);
    color: var(--ink);
    resize: vertical;
}
.field input:disabled, .field textarea:disabled, .segmented button:disabled, .tagpick button:disabled { opacity: .55; cursor: not-allowed; }
.field-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.segmented { display: flex; gap: 7px; flex-wrap: wrap; }
.segmented button {
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    padding: 9px 13px;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    color: var(--ink-soft);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: border-color .15s ease, background .15s ease;
}
.segmented button .dot { width: 8px; height: 8px; border-radius: 50%; }
.segmented button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }

.tagpick { display: flex; flex-wrap: wrap; gap: 7px; }
.tagpick button {
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    color: var(--ink-soft);
}
.tagpick button[aria-pressed="true"] { color: #fff; border-color: transparent; }

.form-error { color: var(--danger); font-size: 13px; margin: 0; }
.issue-owner { font-size: 12.5px; color: var(--muted); margin: 0 0 13px; font-family: var(--mono); }

/* ===========================================================================
 * Tabs + admin
 * ========================================================================= */

.tabs { display: flex; gap: 2px; padding: 0 22px; border-bottom: 1px solid var(--border); background: var(--surface-solid); overflow-x: auto; }
.tab { -webkit-appearance: none; appearance: none; border: none; background: none; padding: 13px 15px; font-size: 14px; font-weight: 650; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--ink-soft); }
.tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }

.admin { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.admin__col h3 { margin: 0 0 13px; font-size: 15px; }
.admin__list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.admin__item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.admin__item input[type="text"] { flex: 1; border: 1px solid transparent; background: transparent; font-size: 14px; padding: 5px 7px; border-radius: var(--radius-xs); color: var(--ink); }
.admin__item input[type="text"]:hover { border-color: var(--border-strong); }
.admin__item input[type="color"] { width: 28px; height: 28px; border: none; background: none; padding: 0; cursor: pointer; }
.admin__del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 6px; }
.admin__del:hover { color: var(--danger); }
.admin__add { display: flex; gap: 8px; align-items: center; }
.admin__add input[type="text"] { flex: 1; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 9px 11px; font-size: 14px; background: var(--surface-2); color: var(--ink); }
.admin__add input[type="color"] { width: 40px; height: 40px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: none; padding: 2px; cursor: pointer; }

/* ===========================================================================
 * Users + settings
 * ========================================================================= */

.users { display: flex; flex-direction: column; gap: 24px; }
.users__section h3 { margin: 0 0 12px; font-size: 15px; }
.users__list { display: flex; flex-direction: column; gap: 8px; }
.user { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.user__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.user__name { font-weight: 650; font-size: 14px; }
.user__id { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.user__actions { display: flex; gap: 6px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; border: 1px solid var(--border); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.users__add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.users__add input[type="text"] { flex: 1; min-width: 180px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 9px 11px; font-size: 14px; background: var(--surface-2); color: var(--ink); }
.users__hint { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

.settings { display: flex; flex-direction: column; }
.settings__hint { display: block; font-size: 12px; color: var(--muted); margin-top: 7px; }
.settings__hint code { font-family: var(--mono); font-size: 11.5px; background: var(--surface-3); padding: 2px 6px; border-radius: var(--radius-xs); word-break: break-all; color: var(--ink-soft); }
.settings__foot { display: flex; justify-content: flex-end; margin-top: 8px; }

/* ===========================================================================
 * Toast
 * ========================================================================= */

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface-solid);
    color: var(--ink);
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    font-size: 14px;
    font-weight: 650;
    box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .7);
    z-index: 90;
    animation: pop .16s ease;
}
.toast--error { border-color: color-mix(in srgb, var(--danger) 50%, transparent); color: var(--danger); }

/* ===========================================================================
 * Motion
 * ========================================================================= */

@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===========================================================================
 * Responsive
 * ========================================================================= */

@media (max-width: 920px) {
    .board { grid-template-columns: 1fr; padding: 18px 16px 40px; }
    .board-note-wrap { padding: 14px 16px 0; }
    .filters-toggle { display: inline-flex; }
    .filters {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: min(86vw, 320px);
        border-radius: 0;
        z-index: 26;
        transform: translateX(-100%);
        transition: transform .26s cubic-bezier(.2, .8, .2, 1);
        overflow-y: auto;
        box-shadow: 0 0 60px rgba(0, 0, 0, .6);
    }
    .filters.is-open { transform: translateX(0); }
    .filters__head { display: flex; }
}

@media (max-width: 640px) {
    .field-row { grid-template-columns: 1fr; }
    .admin { grid-template-columns: 1fr; }
    .modal { padding: 0; place-items: end stretch; }
    .modal__panel { max-width: 100%; max-height: 94vh; border-radius: 20px 20px 0 0; border-bottom: none; }
    .modal__foot { border-radius: 0; }
    .topbar { padding: 11px 14px; flex-wrap: wrap; gap: 10px; }
    .topbar__name { max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar__me { display: none; }
    /* Brand stays on the first row; the actions drop to a full-width second row
       and wrap onto more lines instead of overflowing the screen. */
    .topbar__brand { flex: 1 1 auto; min-width: 0; }
    .topbar__actions { flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
    .topbar__actions .btn { flex: 0 1 auto; }
    .content__head { flex-wrap: wrap; }
    .user { flex-wrap: wrap; }
    .user__actions { width: 100%; }
}

@media (max-width: 380px) {
    .btn { padding: 9px 12px; }
    .topbar__actions { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .login::after { animation: none; }
}

/* ===========================================================================
 * v5 - unified taxonomy, status workflow, scope, public board
 * ========================================================================= */

/* Extra status colours per theme */
:root, :root[data-theme="midnight"] { --st-needs_test: #a78bfa; --st-hidden: #64748b; --st-archived: #475569; }
:root[data-theme="ember"]   { --st-needs_test: #c084fc; --st-hidden: #8a6f69; --st-archived: #6b524c; }
:root[data-theme="daybreak"]{ --st-needs_test: #7c3aed; --st-hidden: #94a3b8; --st-archived: #64748b; }

/* Card signal rail now reflects the workflow status */
.card[data-status="open"]::before { background: var(--st-open); box-shadow: 0 0 14px 0 var(--st-open); }
.card[data-status="in_progress"]::before { background: var(--st-in_progress); box-shadow: 0 0 14px 0 var(--st-in_progress); }
.card[data-status="needs_test"]::before { background: var(--st-needs_test); box-shadow: 0 0 14px 0 var(--st-needs_test); }
.card[data-status="closed"]::before { background: var(--st-closed); box-shadow: none; opacity: .7; }
.card[data-status="hidden"]::before { background: var(--st-hidden); box-shadow: none; opacity: .7; }
.card[data-status="archived"]::before { background: var(--st-archived); box-shadow: none; opacity: .6; }

.status--needs_test { background: var(--st-needs_test); color: #fff; }
.status--hidden { background: var(--st-hidden); color: #fff; }
.status--archived { background: var(--st-archived); color: #fff; }

/* Scope switcher */
.scope { display: inline-flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.scope__btn { border: none; background: none; padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 650; color: var(--ink-soft); cursor: pointer; transition: background .15s ease, color .15s ease; }
.scope__btn:hover { color: var(--ink); }
.scope__btn[aria-selected="true"] { background-image: var(--accent-grad); color: var(--accent-ink); }

/* Clickable category picker in the editor */
.chip-picker { display: flex; flex-wrap: wrap; gap: 7px; }

/* Admin note + toggles + public link */
.admin__note { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.settings__section { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 18px; }
.settings__section h3 { margin: 0 0 13px; font-size: 14px; letter-spacing: -.01em; }
.settings__section .field:last-child { margin-bottom: 0; }
.toggle { display: flex; align-items: center; gap: 11px; font-size: 14px; cursor: pointer; color: var(--ink); }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.settings__public { display: flex; gap: 8px; align-items: center; margin-top: 13px; flex-wrap: wrap; }
.settings__public input { flex: 1; min-width: 220px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 9px 11px; font-size: 12.5px; background: var(--surface-2); color: var(--ink-soft); font-family: var(--mono); }
.settings__data { font-size: 13px; color: var(--ink-soft); margin: 0; line-height: 1.65; }

/* Login tagline + privacy */
.login__tagline { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-2); margin: 12px 0 0; }
.login__privacy { font-size: 11.5px; color: var(--muted); margin: 16px 0 0; line-height: 1.55; }
.login__lang { margin: 18px 0 0; display: flex; align-items: center; justify-content: center; gap: 8px; }
.login__lang label { font-size: 11.5px; color: var(--muted); }
.login__foot a, .public-foot a { color: var(--muted); text-decoration: none; }
.login__foot a:hover, .public-foot a:hover { color: var(--ink-soft); }
.login__copy { margin: 6px 0 0; font-size: 11px; color: var(--muted); opacity: .8; }
.login__copy a { color: var(--muted); text-decoration: none; }
.login__copy a:hover { color: var(--ink-soft); }

/* Public read-only board */
.board--public { grid-template-columns: 1fr; max-width: 940px; }
.card--static { cursor: default; }
.card--static:hover { transform: none; border-color: var(--border); box-shadow: var(--shadow); }
.card--static:hover::after { opacity: 0; }

/* Public board: clickable cards open the full report */
.card--open { cursor: pointer; }
.card--open:hover { transform: translateY(-1px); border-color: var(--accent-line); }
.card--open .card__top { display: flex; align-items: center; gap: 9px; }
.card__open-ico { margin-left: auto; color: var(--muted); display: inline-flex; flex: none; transition: color .16s ease, transform .16s ease; }
.card__open-ico svg { width: 18px; height: 18px; }
.card--open:hover .card__open-ico { color: var(--accent); transform: translateX(2px); }
.card--open:hover .card__title { color: var(--accent); }
.card__by { color: var(--muted); font-size: 12.5px; margin: 2px 0 0; }
.card-count--signin { text-decoration: none; cursor: pointer; }
.public-intro__hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

/* Public board: full report modal */
.pub-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 28px 16px; overflow-y: auto; }
.pub-modal[hidden] { display: none; }
.pub-modal__overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.pub-modal__panel {
    position: relative;
    width: 100%;
    max-width: 640px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 22px 24px;
    margin: auto;
}
.pub-modal__close {
    position: absolute; top: 12px; right: 14px;
    background: none; border: none; color: var(--muted);
    font-size: 26px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: var(--radius-xs);
}
.pub-modal__close:hover { color: var(--ink); background: var(--surface-3); }

.pub-doc__head { display: flex; align-items: baseline; gap: 10px; margin: 0 28px 12px 0; }
.pub-doc__title { margin: 0; font-size: 19px; line-height: 1.3; color: var(--ink); }
.pub-doc__by { color: var(--muted); font-size: 13px; margin: -6px 0 12px; }
.pub-doc__by strong { color: var(--ink-soft); font-weight: 600; }
.pub-doc__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.pub-doc__desc { color: var(--ink-soft); font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; margin-bottom: 18px; }
.pub-doc__desc a, .pub-comment__text a { color: var(--accent); }

.pub-doc__comments { border-top: 1px solid var(--border); padding-top: 14px; }
.pub-doc__chead { margin: 0 0 12px; font-size: 13px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.pub-doc__ccount { background: var(--surface-3); color: var(--ink-soft); border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.pub-doc__empty { color: var(--muted); font-size: 13.5px; margin: 0; }
.pub-comment { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 13px; margin-bottom: 9px; }
.pub-comment:last-child { margin-bottom: 0; }
.pub-comment__who { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pub-comment__avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: none; }
.pub-comment__name { color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.pub-comment__text { color: var(--ink-soft); font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.pub-comment__date { color: var(--muted); font-size: 11.5px; margin-top: 5px; }
.public-intro { margin-bottom: 24px; }
.public-intro__title { margin: 0 0 6px; font-size: 27px; letter-spacing: -.025em; }
.public-intro__lead { margin: 0; color: var(--ink-soft); font-size: 14px; max-width: 680px; }
.public-foot { margin: 36px 0 0; text-align: center; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

@media (max-width: 640px) {
    .content__head { flex-wrap: wrap; gap: 10px; }
    .scope { order: 3; }
    .stats { order: 4; }
}

/* ===========================================================================
 * v6 - votes, comments, deep links
 * ========================================================================= */

/* At-a-glance counts on cards */
.card__social { display: inline-flex; align-items: center; gap: 10px; margin-left: 4px; }
.card-count { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 650; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.card-count__ico { display: inline-flex; }
.card-count__ico svg { width: 13px; height: 13px; display: block; opacity: .8; }

/* Social block inside the report editor */
.issue-social { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 18px; }
.vote-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.vote-btn { gap: 8px; }
.vote-btn svg { transition: transform .15s ease; }
.vote-btn.is-voted { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.vote-btn.is-voted svg { transform: translateY(-1px); color: var(--accent); }
.vote-count { font-variant-numeric: tabular-nums; font-weight: 800; min-width: 14px; text-align: center; }
.vote-btn.is-voted .vote-count { color: var(--accent); }
.vote-hint { font-size: 12px; color: var(--muted); }

.comments__title { margin: 0 0 14px; font-size: 14px; letter-spacing: -.01em; }
.comments__list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.comments__empty { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.comment { display: flex; gap: 11px; align-items: flex-start; }
.comment__body {
    flex: 1;
    min-width: 0;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 13px;
}
.comment__head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 4px; flex-wrap: wrap; }
.comment__name { font-weight: 700; font-size: 13px; }
.comment__time { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.comment__text { font-size: 13.5px; color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.comment__del { background: none; border: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; align-self: flex-start; }
.comment__del:hover { color: var(--danger); }
.avatar--fallback { font-size: 14px; }

.comments__add { display: flex; flex-direction: column; gap: 9px; }
.comments__add textarea {
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    background: var(--surface-2);
    color: var(--ink);
    resize: vertical;
}
.comments__add button { align-self: flex-end; }

/* ===========================================================================
 * v8 - languages
 * ========================================================================= */

.select--mini { padding: 7px 26px 7px 10px; font-size: 12.5px; height: 34px; }
.lang-select { max-width: 130px; }

.langs { display: flex; flex-direction: column; gap: 4px; }
.langs__add { display: flex; gap: 8px; flex-wrap: wrap; }
.langs__add input { flex: 1; min-width: 120px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 14px; background: var(--surface-2); color: var(--ink); }
.langs__edit-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.langs__edit-head .select { flex: 1; min-width: 160px; }

.lang-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 48vh;
    overflow-y: auto;
    padding: 4px 4px 4px 0;
    margin-bottom: 14px;
}
.lang-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; align-items: center; }
.lang-row__ref { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lang-row__key { font-family: var(--mono); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.lang-row__en { font-size: 13px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-row__input {
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 8px 11px;
    font-size: 13.5px;
    font-family: inherit;
    background: var(--surface-2);
    color: var(--ink);
}
.lang-row__input:focus { outline: none; border-color: var(--accent); }

@media (max-width: 620px) {
    .lang-row { grid-template-columns: 1fr; gap: 4px; }
    .lang-select { max-width: 96px; }
}

/* ===========================================================================
 * v9 - public voting + statistics
 * ========================================================================= */

/* Vote button on the public board */
.pub-vote {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    color: var(--ink-soft);
    border-radius: 999px;
    padding: 4px 11px 4px 9px;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease, transform .1s ease;
}
.pub-vote .card-count__ico svg { width: 13px; height: 13px; display: block; }
.pub-vote__count { font-variant-numeric: tabular-nums; }
.pub-vote:hover { border-color: var(--accent); color: var(--ink); }
.pub-vote:active { transform: scale(.96); }
.pub-vote:disabled { opacity: .55; cursor: default; }
.pub-vote.is-voted { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* Statistics */
.stats-view { display: flex; flex-direction: column; gap: 4px; }
.statbars { display: flex; flex-direction: column; gap: 11px; }
.statbar__head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.statbar__dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.statbar__label { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statbar__count { margin-left: auto; font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.statbar__track { height: 7px; border-radius: 99px; background: var(--surface-3, rgba(127,127,127,.16)); overflow: hidden; }
.statbar__fill { height: 100%; border-radius: 99px; background: var(--accent); min-width: 3px; transition: width .3s ease; }

.statpeople { display: flex; flex-direction: column; gap: 13px; }
.statperson__top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 5px; }
.statperson__name { font-size: 13.5px; font-weight: 650; color: var(--ink); }
.statperson__count { margin-left: auto; font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.statperson__sub { margin-top: 5px; font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.stat-empty { font-size: 13px; color: var(--muted); margin: 0; }

/* ===========================================================================
 * v10 - links, scope counts, export, copy link
 * ========================================================================= */

/* Auto-linked URLs in descriptions and comments */
.card__desc a, .comment__text a { color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); word-break: break-word; }
.card__desc a:hover, .comment__text a:hover { border-bottom-color: var(--accent); }

/* Count badge on the Active / Archive / Hidden tabs */
.scope__count {
    display: inline-block;
    margin-left: 7px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    background: var(--surface-3, rgba(127, 127, 127, .16));
    color: var(--ink-soft);
}
.scope__count:empty { display: none; }
.scope__btn[aria-selected="true"] .scope__count { background: var(--accent-soft); color: var(--accent); }

/* Copy-link button sits to the right of the vote row */
.vote-row__link { margin-left: auto; }

/* Export buttons */
.stats-export { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===========================================================================
 * v11 - vote button on the card
 * ========================================================================= */

/* Right-aligned cluster: author, date, comment count, vote button */
.card__right { display: inline-flex; align-items: center; gap: 9px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.card__right .card__author { margin-left: 0; }

/* Interactive vote button on each card */
.card-vote {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    color: var(--ink-soft);
    border-radius: 999px;
    padding: 4px 11px 4px 9px;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease, transform .1s ease;
}
.card-vote__ico { display: inline-flex; }
.card-vote__ico svg { width: 14px; height: 14px; display: block; }
.card-vote__count { font-variant-numeric: tabular-nums; }
.card-vote:hover { border-color: var(--accent); color: var(--ink); }
.card-vote:active { transform: scale(.95); }
.card-vote:disabled { opacity: .55; cursor: default; }
.card-vote.is-voted { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.card-vote.is-voted .card-vote__ico svg { transform: translateY(-1px); }

/* ===========================================================================
 * v13 - version chip + update notice in the top bar
 * ========================================================================= */

.topbar__ver {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
    padding: 2px 7px;
    border: 1px solid var(--border);
    border-radius: 999px;
    line-height: 1.4;
    transition: color .15s ease, border-color .15s ease;
}
.topbar__ver:hover { color: var(--ink); border-color: var(--accent); }

.topbar__gh {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
    line-height: 1.4;
    transition: color .15s ease;
}
.topbar__gh:hover { color: var(--ink); }

.topbar__update {
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
    border-radius: 999px;
    padding: 2px 9px;
    line-height: 1.4;
    white-space: nowrap;
}
.topbar__update:hover { filter: brightness(1.08); }

@media (max-width: 640px) {
    .topbar__ver { display: none; }
    .topbar__gh { display: none; }
    .topbar__update { font-size: 10px; padding: 2px 7px; }
}

/* ---------- Pager ---------- */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.pager__btn {
    appearance: none;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 7px 14px;
    transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}
.pager__btn:hover:not(:disabled) {
    background: var(--surface-3);
    border-color: var(--border-strong);
}
.pager__btn:disabled {
    opacity: .42;
    cursor: default;
}
.pager__info {
    font-size: 13px;
    color: var(--muted);
    min-width: 90px;
    text-align: center;
}
