.is-hidden { display: none !important; }

:root {
    color-scheme: dark;
    --glass-blur: 12px;
    --radius-full: 9999px;

    /* Transitions */
    --ease-out: cubic-bezier(0.2, 0, 0, 1);
    --layout-offset: max(0px, calc((100vw - 2560px) / 2));
    --sidebar-transition: 0.2s ease;
    /* The demo strip's height, and the band chrome reserves under it, which adds the canvas gap so surfaces do not touch. */
    --demo-strip-h: 40px;
    --demo-banner-h: calc(var(--demo-strip-h) + var(--jb-island-gap));
    --progress-from: 0%;
    --progress-to: 0%;
    --cx: 40px;
    --cy: -80px;
    --cr: 180deg;

    /* Status colors */
    --status-suggested: #5AC8FA;
    --status-planned: #FFD60A;
    --status-in-progress: #BF5AF2;
    --status-done: #30D158;
    --status-denied: #FF453A;
    --status-pending: #FF9F0A;
    --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
}

/* ===== Animation Utilities ===== */

/* enter-fade-up: generic component enter animation */
@keyframes enter-fade-up {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.anim-enter {
    animation: enter-fade-up var(--duration-fast) var(--ease-out) both;
}

/* Consolidated prefers-reduced-motion block covering the animation utilities, skeleton loaders and chart elements. */
@media (prefers-reduced-motion: reduce) {
    /* Animation utilities */
    .anim-enter,
    .settings-section-enter,
    .activity-item-enter,
    .card-entering {
        animation: none;
    }
    /* Staggered list items */
    .activity-item,
    .voter-row,
    .feature-card-roadmap {
        animation: none;
    }
    /* Skeleton loaders */
    .skeleton-block {
        animation: none;
    }
    /* Chart and insight interactive elements */
    .wv-chart-card { animation: none; transition: none; }
    .insights-donut-segment { transition: none; animation: none; }
    .efficiency-bar-fill { transition: none; }
    /* General layout and interactive elements */
    .main-content,
    .card-progress-fill,
    .toast,
    .modal-overlay .modal-content,
    .modal-overlay .modal-container,
    .card-guide-panel {
        animation: none;
        transition-duration: 0.01s;
    }
    .detail-panel {
        transition: none;
    }
}

[data-theme="light"] {
    color-scheme: light;
}

[data-theme="light"] .kanban-column {
}

html {
    overscroll-behavior: none;
}

html, body {
    margin: 0;
    padding: 0;
}
html {
    overflow-x: hidden;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--jb-font);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    position: relative;
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

::selection {
    background: var(--accent-muted);
    color: var(--text-primary);
}

/* Unified focus-visible */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: none;
}

/* Tabular nums for numeric content */
.tabular-nums,
.card-progress-text,
.feature-card-votes,
.kpi-value,
.stat-value,
.pricing-amount {
    font-variant-numeric: tabular-nums;
}

.toast {
    display: none;
    position: fixed;
    top: 65px;
    width: 380px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: var(--radius-lg);
    padding: 16px;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 12px 32px rgba(0, 0, 0, 0.2);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    overflow: hidden;
    animation: toastSlideIn var(--duration-slow) var(--ease-spring);
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--error); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--info); }
[data-theme="light"] .toast { color: var(--text-primary); }

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.toast.success .toast-progress-bar { background: var(--success); }
.toast.error .toast-progress-bar { background: var(--error); }
.toast.warning .toast-progress-bar { background: var(--warning); }
.toast.info .toast-progress-bar { background: var(--info); }

@keyframes toast-progress-shrink {
    from { width: 100%; }
    to { width: 0%; }
}

.content { flex: 1; }
.title { font-weight: 600; font-size: 16px; margin-bottom: 2px; }
.message { font-size: 14px; }

.close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
}

.close:hover {
    color: var(--text-primary);
}

a.animated-underline {
    position: relative;
    color: inherit;
    text-decoration: none;
}

a.animated-underline::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width var(--duration-normal) cubic-bezier(.4,0,.2,1);
}

a.animated-underline:hover::after,
a.animated-underline:focus::after {
    width: 100%;
}

/* Mobile header: visible only on small screens */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 600;
    height: 48px;
    padding: 0 12px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
}
.mobile-header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
}
.mobile-header .logo-icon {
    width: 22px;
    height: 22px;
}
.mobile-header .logo-text {
    font-size: 14px;
    font-weight: 600;
}
.mobile-header .hamburger-btn {
    display: flex;
}

.top-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 500;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    color: var(--jb-fg-on-accent);
    font-size: 14px;
    font-weight: 500;
}

.logo-text {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    min-width: 200px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 12px 32px rgba(0, 0, 0, 0.16);
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: opacity var(--duration-fast) var(--ease-out), visibility var(--duration-fast) var(--ease-out), transform var(--duration-normal) var(--ease-spring);
    margin-top: 8px;
}

.dropdown-menu a, .dropdown-menu button {
    color: var(--text-primary) !important;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-menu a,
.dropdown-menu button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 400;
    cursor: pointer;
    font-family: inherit;
    transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
    gap: 8px;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
    background-color: var(--accent-muted);
    color: var(--accent);
}

.dropdown-menu a:first-child,
.dropdown-menu button:first-child {
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.dropdown-menu a:last-child,
.dropdown-menu button:last-child {
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-subtle);
    margin: 8px 0;
}

.dropdown-menu svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.button-group {
    display: flex;
    gap: 8px;
    flex-direction: row;
    align-items: center;
}

.button-group-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    height: 40px;
    padding: 0 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    background: none;
    border: none;
    white-space: nowrap;
    border-radius: var(--radius-md);
    transition: background-color var(--duration-xfast) var(--ease-out), color var(--duration-xfast) var(--ease-out);
    font-family: inherit;
}

select.button-group-button {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 4px center;
    background-repeat: no-repeat;
    background-size: 18px;
    padding-right: 24px;
}

.button-group-button svg {
    display: block;
    flex-shrink: 0;
}

.date-picker-wrapper {
    position: relative;
    cursor: pointer;
    gap: 8px;
}

.date-picker-wrapper input[type="date"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.button-group-button:hover { background-color: var(--accent-muted); }

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-right: 1px solid var(--sidebar-border);
    padding: 0;
    height: 100vh;
    position: fixed;
    left: var(--layout-offset);
    top: 0;
    overflow-y: auto;
    z-index: 500;
    transition: width var(--sidebar-transition);
    box-shadow:
        inset 0 0 0 0.5px rgba(59, 130, 246, 0.12),
        0 0 0 0.5px rgba(0, 0, 0, 0.3),
        4px 0 24px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .sidebar {
    box-shadow:
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.60),
        0 0 0 0.5px rgba(0, 0, 0, 0.06),
        4px 0 24px rgba(0, 0, 0, 0.04);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 0;
    background: none;
    border: none;
    height: 100%;
}

/* Sidebar logo */
.sidebar-logo {
    padding: 12px 12px 8px;
    border-bottom: 1px solid var(--sidebar-border);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
}
.sidebar-logo-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
}
.sidebar-logo .logo-icon {
    width: 24px;
    height: 24px;
}

/* Project switcher */
.sidebar-project-switcher {
    position: relative;
    padding: 4px;
    margin-bottom: 0;
}

.project-switcher-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 8px;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--jb-font);
    font-size: 14px;
    font-weight: 600;
    transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
    text-align: left;
    min-width: 0;
}

.project-switcher-trigger:hover {
    background: var(--accent-muted);
    border-color: var(--border-subtle);
}

.project-item-avatar {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--jb-fg-on-accent);
    flex-shrink: 0;
}

.project-trigger-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.project-chevron-icon {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    color: var(--text-secondary);
    transition: transform var(--duration-fast) var(--ease-out);
}

.sidebar-project-switcher:has(.project-switcher-dropdown.active) .project-chevron-icon {
    transform: rotate(180deg);
}

/* Project switcher dropdown */
.project-switcher-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 4px;
    right: 4px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px;
    box-shadow: var(--shadow-md);
    z-index: 600;
    flex-direction: column;
    gap: 4px;
    max-height: 320px;
    overflow-y: auto;
}
.project-switcher-dropdown.active {
    display: flex;
}
.project-search-input {
    width: 100%;
    padding: 8px 8px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--jb-font);
    font-size: 13px;
    outline: none;
    margin-bottom: 4px;
}
.project-search-input:focus {
    border-color: var(--accent);
    background: var(--input-focus-bg);
}
.project-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 8px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--jb-font);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background-color 0.12s var(--ease-out), color 0.12s var(--ease-out);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.project-list-item:hover {
    background: var(--accent-muted);
    color: var(--text-primary);
}
.project-list-item.active {
    background: var(--accent-muted);
    color: var(--accent);
    font-weight: 600;
}
.project-list-item .project-item-avatar {
    width: 20px;
    height: 20px;
    font-size: 11px;
}
.project-switcher-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}
.project-create-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px;
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background-color 0.12s var(--ease-out), color 0.12s var(--ease-out);
}
.project-create-link:hover {
    background: var(--accent-muted);
    color: var(--accent);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--sidebar-text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
    font-size: 14px;
    font-weight: 400;
    margin: 0 4px;
}

.nav-item:hover {
    background: var(--sidebar-item-hover);
    color: var(--sidebar-text-primary) !important;
}

.nav-item.active {
    background: var(--sidebar-item-active);
    color: var(--sidebar-text-primary);
    font-weight: 500;
}

.nav-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sidebar-text-tertiary);
    flex-shrink: 0;
    transition: color var(--duration-fast) var(--ease-out);
}

.nav-icon svg {
    width: 100%;
    height: 100%;
}

.nav-item.active .nav-icon { color: var(--accent); }
.nav-item:hover .nav-icon { color: var(--sidebar-text-primary); }

/* Sidebar section labels */
.nav-section-label {
    padding: 8px 12px 4px;
    margin-top: 8px;
}
.nav-section-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--sidebar-text-tertiary);
}
.main-content {
    margin-left: calc(var(--sidebar-width) + var(--layout-offset));
    margin-top: 0;
    margin-right: var(--layout-offset);
    border-radius: 0;
    padding: 16px;
    overflow-y: visible;
    overflow-x: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    min-height: 100vh;
}

.main-content-public { margin-left: 8px; }

.nav-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar spacer + footer */
.sidebar-spacer {
    flex: 1;
}
.sidebar-footer {
    border-top: 1px solid var(--sidebar-border);
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sidebar-footer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--sidebar-text-secondary);
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    background: none;
    border: none;
    font-family: var(--jb-font);
    transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
    width: 100%;
    text-align: left;
    margin: 0 4px;
}
.sidebar-footer-item:hover {
    background: var(--sidebar-item-hover);
    color: var(--sidebar-text-primary);
}
.sidebar-footer-item svg {
    flex-shrink: 0;
}
.sidebar-upgrade {
    color: var(--accent);
    font-weight: 500;
}
.sidebar-upgrade:hover {
    color: var(--accent);
    background: var(--accent-muted);
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--duration-fast) var(--ease-out);
}
.sidebar-user:hover {
    background: var(--sidebar-item-hover);
}
.sidebar-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--jb-fg-on-accent);
    flex-shrink: 0;
}
.sidebar-user-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: var(--sidebar-text-secondary);
}
.sidebar-logout:hover {
    color: var(--danger-color);
}

/* Sidebar collapse button */
.sidebar-collapse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--sidebar-text-tertiary);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: color var(--duration-xfast) var(--ease-out), background var(--duration-xfast) var(--ease-out);
    flex-shrink: 0;
}
.sidebar-collapse-btn:hover {
    color: var(--sidebar-text-primary);
    background: var(--sidebar-item-hover);
}

/* Sidebar compact mode */
html:not([data-sidebar-ready]) .sidebar,
html:not([data-sidebar-ready]) .main-content { transition: none !important; }

[data-sidebar="compact"] .sidebar {
    width: var(--sidebar-compact-width);
    overflow: visible;
}
[data-sidebar="compact"] .main-content {
    margin-left: calc(var(--sidebar-compact-width) + var(--layout-offset));
}
[data-sidebar="compact"] .nav-label,
[data-sidebar="compact"] .logo-text,
[data-sidebar="compact"] .project-trigger-name,
[data-sidebar="compact"] .project-chevron-icon,
[data-sidebar="compact"] .sidebar-user-name,
[data-sidebar="compact"] .nav-section-text {
    display: none;
}
[data-sidebar="compact"] .nav-item {
    justify-content: center;
    gap: 0;
    padding: var(--jb-sp-2);
    margin: 0 var(--jb-sp-1);
}
[data-sidebar="compact"] .sidebar-logo-link {
    display: none;
}
[data-sidebar="compact"] .sidebar-logo {
    justify-content: center;
    padding: var(--jb-sp-3) var(--jb-sp-2) var(--jb-sp-2);
    min-height: 44px;
}
[data-sidebar="compact"] .project-switcher-trigger {
    justify-content: center;
    padding: 0.4rem;
}
[data-sidebar="compact"] .project-switcher-dropdown {
    left: calc(var(--sidebar-compact-width) + 4px);
    right: auto;
    top: 0;
    width: 220px;
}
[data-sidebar="compact"] .sidebar-footer-item {
    justify-content: center;
    gap: 0;
    padding: var(--jb-sp-2);
    margin: 0;
    width: auto;
    align-self: center;
}
[data-sidebar="compact"] .sidebar-user {
    justify-content: center;
}
[data-sidebar="compact"] .sidebar-collapse-btn svg {
    transform: rotate(180deg);
}
[data-sidebar="compact"] .nav-section-label {
    height: 0;
    padding: 0;
    margin: var(--jb-sp-1) 0;
    border-bottom: 1px solid var(--sidebar-border);
    overflow: hidden;
}

/* Sidebar tooltip (compact mode) */
.sidebar-tooltip {
    position: fixed;
    left: 0;
    top: 0;
    background: var(--bg-surface);
    color: var(--sidebar-text-primary);
    font-size: 0.78rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--sidebar-border);
    box-shadow: var(--shadow-md);
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.12s var(--ease-out);
}
.sidebar-tooltip.visible { opacity: 1; }

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--jb-sp-4);
    padding-bottom: var(--jb-sp-4);
    border-bottom: 1px solid var(--border);
    height: 36px;
}

.top-bar h1 {
    font-size: 24px;
    line-height: 1.2;
    font-weight: 600;
    color: var(--text-primary);
}

.top-bar-left { display: flex; align-items: center; gap: var(--jb-sp-3); }
.top-bar-right { display: flex; align-items: center; gap: var(--jb-sp-3); }

.settings-tabs {
    display: flex;
    gap: var(--jb-sp-1);
    margin-bottom: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--jb-sp-1);
    overflow-x: auto;
    scrollbar-width: none;
}

.settings-tabs::-webkit-scrollbar { display: none; }

.settings-tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: var(--jb-sp-2) var(--jb-sp-3);
    cursor: pointer;
    font-size: var(--text-sm);
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: var(--jb-sp-2);
    transition: color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
    position: relative;
}

.settings-tab:hover { color: var(--text-primary); background: var(--accent-subtle); }

.settings-tab.active {
    background: var(--accent-muted);
    color: var(--accent);
    font-weight: 600;
}

.settings-tab-icon { width: 14px; height: 14px; opacity: 0.7; fill: currentColor; flex-shrink: 0; }
.settings-tab.active .settings-tab-icon { opacity: 1; }

.settings-section-enter { animation: enter-fade-up 0.25s ease both; }

.pricing-table {
    display: flex;
    flex-direction: row;
    gap: var(--jb-sp-5);
    max-width: 800px;
    margin: var(--jb-sp-7) auto 0 auto;
}

.pricing-card {
    width: 100%;
    max-width: 400px;
    background: var(--gradient-glass);
    border: 1px solid var(--border);
    padding: var(--jb-sp-5);
    border-radius: var(--radius-lg);
    text-align: left;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 550px;
}

.billing-toggle {
    text-align: center;
    margin: 96px auto 0 auto;
    max-width: 400px;
}

.project-table {
    display: flex;
    flex-direction: row;
    gap: var(--jb-sp-5);
    max-width: 800px;
    margin: var(--jb-sp-7) auto 0 auto;
    flex-wrap: wrap;
}

.section-content {
    text-align: left;
    margin: 80px auto;
    max-width: 800px;
}

.section-content h2 {
    font-weight: 600;
    font-size: 32px;
    line-height: 1.5;
}

.project-card {
    flex: 1 1 calc(50% - var(--jb-sp-3));
    background: var(--gradient-glass);
    border: 1px solid var(--border);
    padding: var(--jb-sp-5);
    border-radius: var(--radius-lg);
    text-align: left;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 175px;
    cursor: pointer;
    transition: transform var(--duration-normal) var(--ease-out), border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-normal) var(--ease-out);
    box-shadow: var(--shadow-sm);
}
.project-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.project-card-clickable {
    background: var(--gradient-glass);
}

.project-card-content { flex: 1; }

.role-badge {
    display: inline-block;
    padding: var(--jb-sp-1) 0.625rem;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
}

.role-badge-owner {
    background: var(--accent-muted);
    color: var(--accent);
    border: 1px solid var(--border);
}

.role-badge-editor {
    background: var(--info-muted);
    color: var(--info);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.role-badge-viewer {
    background: rgba(156, 163, 175, 0.15);
    color: var(--text-secondary);
    border: 1px solid rgba(156, 163, 175, 0.3);
}

.project-card-new {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-subtle);
    background: transparent;
}

.project-card-new-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--jb-sp-4);
    text-align: center;
}

.project-card-new:hover .plus-icon, .feature-card-new:hover .plus-icon-feature {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    transform: rotate(90deg);
}

.project-card-new h3, .feature-card-new h3 {
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
}

.feature-card-new {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-subtle);
    background: transparent;
    min-height: 80px !important;
    padding: var(--jb-sp-3) !important;
    max-height: 80px !important;
}

.feature-card-new-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.plus-icon-feature {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    color: var(--text-tertiary);
    transition: transform var(--duration-xfast) var(--ease-out), background-color var(--duration-xfast) var(--ease-out);
    margin-bottom: var(--jb-sp-1);
}

.plus-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    background: var(--accent-muted);
    color: var(--accent);
    transition: transform var(--duration-xfast) var(--ease-out), background-color var(--duration-xfast) var(--ease-out);
}

.trial-text {
    color: var(--text-secondary);
    font-size: 16px;
    margin: 0 0 var(--jb-sp-5) 0;
    opacity: 0.9;
}

.toggle-container {
    position: relative;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 4px;
    display: flex;
    align-items: center;
    max-width: 350px;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.toggle-btn {
    color: var(--text-primary);
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 24px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1), background var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    border-radius: var(--radius-lg) !important;
    position: relative;
    z-index: 2;
}

.toggle-btn:not(.active):hover {
    color: var(--accent);
    background: var(--accent-subtle);
}

.toggle-btn.active {
    color: var(--jb-fg-on-accent);
}

.toggle-container .toggle-switch {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: var(--accent-hover);
    border-radius: var(--radius-lg);
    transition: left var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1), width var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.toggle-container::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 6px;
    border-radius: var(--radius-lg);
    opacity: 0.5;
}

.price span { font-size: 1.1rem; }

.price {
    text-align: left !important;
    margin: var(--jb-sp-1) 0 var(--jb-sp-4) 0 !important;
    line-height: initial !important;
}

.pricing-card-featured {
    transform: scale(1.05);
    position: relative;
    box-shadow: 0 16px 40px var(--accent-glow);
    border-color: var(--accent);
}

.best-value-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: var(--jb-fg-on-accent);
    font-size: 12px;
    padding: var(--jb-sp-2) 20px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.pricing-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}


.pricing-link {
    margin: auto auto 0 auto;
    color: var(--text-secondary);
    text-align: center;
    background: transparent;
    display: block;
    padding: var(--jb-sp-3) 20px;
    border-radius: var(--radius-md);
    font-weight: inherit;
    font-size: 14px;
    text-decoration: none;
    transition: border-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
    border: 1px solid var(--border);
    cursor: pointer;
    width: 100%;
}

.pricing-button {
    position: relative;
    background-color: var(--accent);
    color: var(--jb-fg-on-accent);
    padding: var(--jb-sp-3) 20px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    border: var(--border);
    cursor: pointer;
    transition: background-color var(--duration-xfast) var(--ease-out), color var(--duration-xfast) var(--ease-out), transform var(--duration-xfast) var(--ease-out);
    margin: auto auto 0 auto !important;
    width: 100%;
}

.pricing-link {
    margin-top: var(--jb-sp-4) !important;
}

.pricing-button:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 12px 32px var(--accent-glow);
    transform: translateY(-2px);
    color: var(--jb-fg-on-accent);
}

.pricing-button a {
    text-decoration: none;
    color: var(--jb-fg-on-accent);
}

.pricing-features {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: var(--jb-sp-2);
}

.pricing-features span {
    display: flex;
    align-items: center;
    gap: var(--jb-sp-1);
}

.pricing-features span::before {
    content: '\2713';
    color: var(--success);
    font-weight: bold;
    font-size: 16px;
    margin-bottom: var(--jb-sp-1);
    margin-right: var(--jb-sp-1);
}

/* ── Choose Plan page ── */
.choose-plan-page { padding: 0 var(--jb-sp-6) var(--jb-sp-8); }

.choose-plan-header {
    text-align: center;
    padding-top: 80px;
    margin-bottom: var(--jb-sp-6);
    max-height: 300px;
    overflow: hidden;
    transition: opacity var(--duration-normal) var(--ease-out), max-height var(--duration-normal) var(--ease-out), margin-bottom var(--duration-normal) var(--ease-out), padding-top var(--duration-normal) var(--ease-out);
}
.choose-plan-header.header-hidden {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    padding-top: var(--jb-sp-5);
    pointer-events: none;
}
.choose-plan-title { font-size: 32px; font-weight: 600; margin: 0 0 var(--jb-sp-5); color: var(--text-primary); }
.choose-plan-header .billing-toggle { margin: 0 auto; }

/* Layout container */
.choose-plan-layout {
    max-width: 960px;
    margin: 0 auto;
    position: relative;
}

/* Plan selector - 3 cards side by side */
.plan-selector {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: stretch;
    transition: opacity var(--duration-normal) var(--ease-out);
}

/* Cards: equal width in row layout, height driven by tallest card */
.plan-selector .pricing-card {
    flex: 1;
    height: auto;
    min-height: 0;
    max-width: 100%;
    transition: opacity var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.plan-selector .pricing-card-featured { transform: none; }
/* Features grow to fill card height; button always pinned to bottom with gap */
.plan-selector .pricing-features { flex: 1; }
.plan-selector .pricing-link,
.plan-selector .pricing-link-free { margin-top: var(--jb-sp-5); }

/* FREE card - muted to de-emphasize vs paid plans */
.pricing-card-free {
    opacity: 0.75;
    transition: opacity var(--duration-fast) var(--ease-out);
}
.pricing-card-free:hover { opacity: 1; }

.pricing-link-free {
    display: block;
    text-align: center;
    text-decoration: none;
    margin-top: 20px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    padding: var(--jb-sp-3) 20px;
    font-size: 14px;
    font-family: inherit;
    line-height: normal;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}
.pricing-link-free:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Checkout panel - centered, hidden until plan chosen */
.checkout-panel {
    display: none;
    opacity: 0;
    transform: translateY(var(--jb-sp-2));
    transition: opacity var(--duration-normal) var(--ease-out), transform var(--duration-normal) var(--ease-out);
    padding: 0 0 var(--jb-sp-8);
    max-width: 600px;
    margin: 0 auto;
}
.checkout-panel.panel-visible {
    opacity: 1;
    transform: translateY(0);
}
/* display:block enabled when layout-active */
.choose-plan-layout.layout-active .checkout-panel {
    display: block;
}

.back-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    margin-bottom: var(--jb-sp-5);
    display: block;
}
.back-btn:hover { color: var(--accent-hover); }

/* Skeleton shimmer */
.checkout-skeleton { padding-top: 0; }
.skeleton-block {
    background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-surface) 50%, var(--bg-elevated) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s infinite;
    border-radius: var(--radius-md);
    height: var(--jb-sp-6);
    margin-bottom: var(--jb-sp-4);
}
.skeleton-block.short { width: 60%; height: var(--jb-sp-5); }
@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

#checkout-embed { border-radius: var(--radius-lg); overflow: hidden; }

@media (max-width: 768px) {
    .plan-selector { flex-direction: column; }
    .checkout-panel { max-width: 100%; }
}

.section {
    position: relative;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: calc(100vh - 100px);
}

input, textarea, select {
    width: 100%;
    padding: 0.625rem var(--jb-sp-3);
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: var(--text-base);
    transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
    box-sizing: border-box;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--input-focus-ring);
    background: var(--input-focus-bg);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-primary, .btn-secondary, .btn-danger {
    padding: 0.625rem 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: var(--text-base);
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.btn-primary:active, .btn-secondary:active, .btn-danger:active {
    transform: scale(0.98);
}

.btn-danger { background: var(--error); color: white; border-color: var(--error); }
.btn-danger:hover { background: var(--error); border-color: var(--error); }

.btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-1px);
}
.btn-sm {
    padding: 0.4rem var(--jb-sp-3);
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-secondary { background: transparent; color: var(--text-primary); border-color: var(--border); }
.btn-secondary:hover {
    background: var(--accent-muted);
    border-color: var(--accent);
    color: var(--text-primary);
}

.modal-overlay .modal-content {
    min-width: 500px;
    max-width: 600px;
    max-height: 90vh;
    background: var(--solid-bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 24px 48px rgba(0, 0, 0, 0.24);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95) translateY(12px);
    opacity: 0;
    transition: transform var(--duration-normal) var(--ease-spring), opacity var(--duration-normal) var(--ease-out);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-container {
    border: 1px solid var(--border);
    background: var(--solid-bg-card);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    touch-action: auto;
    transform: scale(0.95) translateY(12px);
    opacity: 0;
    transition: transform var(--duration-normal) var(--ease-spring), opacity var(--duration-normal) var(--ease-out);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 24px 48px rgba(0, 0, 0, 0.24);
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
    opacity: 1;
    animation: modalFormFadeUp 200ms var(--ease-out, cubic-bezier(0.2, 0, 0, 1)) forwards;
}

.modal-container-large { max-width: 800px; }

.modal-content {
    background: var(--solid-bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 600px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 24px 48px rgba(0, 0, 0, 0.24);
    animation: slideUp var(--duration-normal) var(--ease-spring);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px var(--jb-sp-5);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: var(--text-primary);
}

.modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--duration-xfast) var(--ease-out), transform var(--duration-fast) cubic-bezier(0.2, 0, 0, 1), background-color var(--duration-xfast) var(--ease-out);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.modal-close:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
    background: var(--accent-muted);
}

.modal-body {
    padding: var(--jb-sp-4) var(--jb-sp-5) var(--jb-sp-5);
    display: flex;
    flex-direction: column;
    gap: var(--jb-sp-4);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
    transition: opacity var(--duration-xfast) var(--ease-out);
}

.modal-body.loading {
    opacity: 0;
}

.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-body::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: var(--radius-sm); }
.modal-body::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }

.modal-input {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.625rem var(--jb-sp-3);
    color: var(--text-primary);
    font-size: var(--text-base);
    font-family: inherit;
    transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.modal-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--input-focus-ring);
    background: var(--input-focus-bg);
}

.modal-textarea {
    resize: vertical;
    min-height: 120px;
    max-height: 300px;
}

.modal-footer {
    display: flex;
    gap: var(--jb-sp-3);
    justify-content: flex-end;
    padding: var(--jb-sp-5);
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.modal-footer .btn,
.modal-footer .share-btn { transition: transform var(--duration-xfast) var(--ease-out), background-color var(--duration-xfast) var(--ease-out), border-color var(--duration-xfast) var(--ease-out), color var(--duration-xfast) var(--ease-out); }
.modal-footer .btn:hover,
.modal-footer .share-btn:hover { transform: translateY(-1px); }
.modal-footer .btn:active,
.modal-footer .share-btn:active { transform: translateY(0); }

.modal-actions {
    display: flex;
    gap: var(--jb-sp-4);
    padding: var(--jb-sp-4);
    border-top: 1px solid var(--border);
    justify-content: flex-end;
}

/* Modal info box (promote/approve notices) */
.modal-info-box { background: var(--info-muted); border-left: 4px solid var(--info); border-radius: 0 var(--radius-md) var(--radius-md) 0; padding: var(--jb-sp-3) var(--jb-sp-4); margin-bottom: var(--jb-sp-4); }
.modal-info-box p { margin: 0; font-size: 0.85rem; line-height: 1.5; color: var(--info); }
.modal-info-box strong { color: var(--text-primary); }
.modal-info-box--warning { background: rgba(245, 158, 11, 0.08); border-left-color: var(--warning); }
.modal-info-box--warning p { color: var(--warning); }
.modal-info-box--warning strong { color: var(--text-primary); }

.form-group:first-child { padding-top: var(--jb-sp-4); }

.form-group { padding: 0 var(--jb-sp-4) var(--jb-sp-4); }

/* A label names its value, so it is set exactly like its value: 13px, weight 400, primary foreground. */
.form-group label,
.form-group-roadmap label {
    display: flex;
    align-items: center;
    gap: var(--jb-sp-2);
    margin-bottom: var(--jb-sp-2);
    font-size: 13px;
    font-weight: var(--jb-w-normal);
    color: var(--jb-fg);
}

.form-group-roadmap {
    margin-top: var(--jb-sp-3);
    color: var(--text-primary);
    margin-bottom: var(--jb-sp-3);
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: var(--jb-w-normal);
    color: var(--jb-fg);
    margin-bottom: 8px;
}

.form-label .required { color: var(--error); }

.form-textarea { resize: vertical; min-height: 120px; }

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 40px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 1.125rem }

.form-help { font-size: 13px; color: var(--text-primary); margin-top: var(--jb-sp-4); }

.help-icon {
    width: 18px;
    height: 18px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    cursor: help;
    position: relative;
    flex-shrink: 0;
}

.help-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    background: var(--solid-bg-card);
    color: var(--text-primary);
    padding: var(--jb-sp-3) var(--jb-sp-4);
    border-radius: var(--radius-md);
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    max-width: 280px;
    width: 280px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    z-index: 10;
    margin-left: var(--jb-sp-3);
    line-height: 1.4;
    text-align: left;
}

.roadmap-scroll-wrapper {
    position: relative;
}

.roadmap-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    min-height: 300px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    scroll-behavior: smooth;
}
.roadmap-container::-webkit-scrollbar { display: none; }

.roadmap-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}
.roadmap-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-tertiary);
    opacity: 0.3;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: opacity var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
}
.roadmap-dot.active { background: var(--text-primary); opacity: 1; transform: none; box-shadow: none; }

.roadmap-bottom-bar {
    position: fixed;
    bottom: var(--jb-sp-3);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--jb-sp-4);
    padding: var(--jb-sp-2) 20px;
    background: rgba(15, 15, 25, 0.85);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: var(--radius-md);
    width: fit-content;
    margin: 0;
}

[data-theme="light"] .roadmap-bottom-bar {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(37, 99, 235, 0.12);
}

.roadmap-bottom-nav {
    display: flex;
    align-items: center;
    gap: var(--jb-sp-2);
}

.roadmap-nav-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--duration-xfast) var(--ease-out), color var(--duration-xfast) var(--ease-out), border-color var(--duration-xfast) var(--ease-out);
}

.roadmap-nav-btn:hover {
    background: var(--accent-muted);
    color: var(--accent);
    border-color: var(--accent);
}

[data-theme="light"] .roadmap-nav-btn {
    background: rgba(37, 99, 235, 0.06);
    border-color: rgba(37, 99, 235, 0.1);
}

.roadmap-bottom-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .roadmap-bottom-divider {
    background: rgba(37, 99, 235, 0.15);
}

.roadmap-bottom-hints {
    display: flex;
    align-items: center;
    gap: var(--jb-sp-3);
    font-size: 11px;
    color: var(--text-tertiary);
}

.roadmap-bottom-hints kbd {
    display: inline-block;
    padding: 1px 5px;
    font-size: 10px;
    font-family: inherit;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    margin-right: 3px;
}

body.bulk-active .roadmap-bottom-bar {
    bottom: 72px;
}

.kanban-column {
    /* The starting width, a width rather than a flex basis so the board's script can overwrite it inline. */
    flex: 0 0 auto;
    width: 360px;
    min-width: 360px;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    transition: background var(--duration-xfast) var(--ease-out);
}

.kanban-column:hover {
}

.kanban-column:not(:last-child) { position: relative; }
.kanban-column:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 0;
    right: calc(-0.625rem - 0.5px);
    width: 1px;
    height: 100%;
    background: var(--border-subtle);
}

.kanban-column.drag-over {
    background: var(--accent-subtle);
    box-shadow: 0 0 24px var(--accent-glow);
}

.column-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.column-header-top {
    display: flex;
    align-items: center;
    gap: var(--jb-sp-2);
}

.column-status-dot {
    display: none;
}

.column-header h3 {
    font-size: 13px;
    font-weight: 600;
}


.column-count,
.section-count {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 var(--jb-sp-2);
    background: rgba(59, 130, 246, 0.10);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
}

.column-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-height: 400px;
    border-radius: var(--radius-md);
    transition: background-color var(--duration-xfast) var(--ease-out);
}

.column-content.drag-over-active {
    background: var(--accent-subtle);
    border-radius: var(--radius-md);
}

.feature-card-roadmap.dragging {
    opacity: 0.6;
    transform: scale(1.02) rotate(1deg);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.2);
    border-color: var(--accent);
    z-index: 100;
}

.drop-indicator {
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    margin: 4px 0;
    box-shadow: 0 0 8px var(--accent-glow);
    animation: dropIndicatorPulse 1.5s ease-in-out infinite;
}

@keyframes dropIndicatorPulse {
    0%, 100% { box-shadow: 0 0 4px var(--accent-glow); }
    50% { box-shadow: 0 0 12px var(--accent-glow); }
}

.kanban-column.drag-over .column-status-dot {
    transform: scale(1.3);
    box-shadow: 0 0 8px currentColor;
}

@keyframes cardSettle {
    0% { transform: scale(1.03); }
    50% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

.card-settling {
    animation: cardSettle 400ms var(--ease-spring) forwards;
}

.feature-card-roadmap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    cursor: grab;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform var(--duration-fast) var(--ease-spring), box-shadow var(--duration-fast) var(--ease-spring), border-color var(--duration-fast) var(--ease-spring), background var(--duration-fast) var(--ease-spring);
    user-select: none;
    flex-shrink: 0;
}

.feature-card-roadmap.denied {
    background: linear-gradient(135deg, var(--error-muted) 0%, rgba(220, 38, 38, 0.04) 100%);
    border-color: rgba(239, 68, 68, 0.2);
}

.feature-card-roadmap.denied:hover {
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.feature-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px var(--accent-glow), 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.feature-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    margin: 0 0 var(--jb-sp-2) 0;
    word-wrap: break-word;
}

.feature-card-tags {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin: var(--jb-sp-2) 0;
}

.card-description {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-tertiary);
    margin: 0 0 var(--jb-sp-2) 0;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem var(--jb-sp-2);
    border-radius: var(--radius-sm);
    background: rgba(100, 100, 100, 0.1);
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
    transition: background var(--duration-xfast) var(--ease-out), color var(--duration-xfast) var(--ease-out);
    flex-shrink: 0;
    margin-left: auto;
}
.card-help-btn:hover {
    color: var(--accent);
    background: var(--accent-muted);
}

.guide-section {
    padding: var(--jb-sp-2) 0;
    border-bottom: 1px solid var(--border-subtle);
}
.guide-section:last-child {
    border-bottom: none;
}
.guide-section h4 {
    display: flex;
    align-items: center;
    gap: var(--jb-sp-2);
    font-size: 16px;
    margin: 0 0 var(--jb-sp-1) 0;
}
.guide-section p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.guide-example {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    margin-bottom: 0.4rem;
}
.guide-example--wrap {
    flex-wrap: wrap;
}
.guide-example [class*="feature-tag"],
.guide-example [class*="card-score-badge"],
.guide-example [class*="weighted-vote"],
.guide-example .feature-card-votes,
.guide-example .card-progress-bar {
    pointer-events: none;
}

.title-external-link {
    color: var(--text-secondary);
    margin-left: var(--jb-sp-2);
    vertical-align: middle;
}
.title-external-link svg {
    width: 22px;
    height: 22px;
    margin-bottom: var(--jb-sp-1);
    fill: currentColor;
}

.detail-field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.detail-field-row {
    color: var(--text-primary);
}
.detail-field-row + .detail-field-row {
    margin-top: var(--jb-sp-2);
}

.modal-body-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}
.modal-body-text--spaced {
    margin: 0 0 12px 0;
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    border: 1px solid var(--accent);
    color: var(--jb-fg-on-accent);
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
}

.feature-tag.feature-tag--mrr {
    background: var(--success-muted);
    border-color: var(--success-muted);
    color: var(--success);
}

.feature-card-meta {
    display: flex;
    flex-direction: column;
    gap: var(--jb-sp-2);
    padding-top: var(--jb-sp-3);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 11px;
    font-weight: 400;
    color: var(--text-secondary);
}

.feature-card-votes {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem var(--jb-sp-2);
    border-radius: var(--radius-sm);
    line-height: 1;
    white-space: nowrap;
    background: rgba(59, 130, 246, 0.18);
    color: var(--accent);
    cursor: default;
}

.feature-card-votes-number {
    font-variant-numeric: tabular-nums;
}

.feature-card-votes .vote-icon {
    width: 12px;
    height: 12px;
    fill: currentColor;
    flex-shrink: 0;
}

.feature-card-left {
    display: flex;
    flex-wrap: wrap;
    gap: var(--jb-sp-2);
    align-items: center;
}

.feature-card-actions {
    display: flex;
    gap: var(--jb-sp-1);
    align-items: center;
    position: relative;
}

.action-icon {
    width: var(--jb-sp-4);
    height: var(--jb-sp-4);
    fill: currentColor;
    transition: transform var(--duration-xfast) var(--ease-out);
}

.vote-icon, .activity-icon {
    width: var(--jb-sp-4);
    height: var(--jb-sp-4);
    fill: currentColor;
}

.feature-card-action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--jb-sp-1);
    border-radius: var(--radius-lg);
    font-size: 16px;
    transition: color 0.12s var(--ease-out), background-color 0.12s var(--ease-out);
}

.feature-card-action-btn:hover .action-icon { transform: scale(1.3); }

/* Simplified card header */
.feature-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--jb-sp-2);
}

.feature-card-header .feature-card-title {
    flex: 1;
    min-width: 0;
}

.feature-card-header-actions {
    display: flex;
    gap: 0.125rem;
    align-items: center;
    flex-shrink: 0;
}

/* Progress bar on feature cards */
.card-progress-bar { display: flex; align-items: center; gap: var(--jb-sp-2); margin-top: var(--jb-sp-2); }
.card-progress-track { flex: 1; height: 6px; background: var(--bg-surface); border-radius: var(--radius-sm); overflow: hidden; }
.card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 50%, var(--accent) 100%);
    background-size: 200% 100%;
    border-radius: var(--radius-sm);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: progressShimmer 2s ease-in-out infinite;
}
@keyframes progressShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.card-progress-text { font-size: 0.65rem; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }

/* Overflow menu */
.card-overflow-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    right: 0;
    top: 2.25rem;
    z-index: 100;
    min-width: 140px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--jb-sp-1) 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.16);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px) scale(0.97);
    transition: opacity var(--duration-fast) var(--ease-out), transform var(--duration-normal) var(--ease-spring);
}

.card-overflow-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.card-overflow-menu.flip-up {
    top: auto;
    bottom: 2.25rem;
}

/* Elevate card when its overflow menu is open */
.feature-card-roadmap.card-overflow-open {
    z-index: 101;
}

.card-overflow-item {
    background: none;
    border: none;
    color: var(--text-primary);
    padding: var(--jb-sp-2) var(--jb-sp-3);
    font-size: 0.8rem;
    cursor: pointer;
    text-align: left;
    transition: background var(--duration-xfast) var(--ease-out);
    font-family: inherit;
}

.card-overflow-item:hover {
    background: var(--accent-subtle);
}

.card-overflow-danger {
    color: var(--error);
}

.card-overflow-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.card-overflow-divider {
    height: 1px;
    background: var(--border);
    margin: var(--jb-sp-1) 0;
}

/* Card needs relative positioning for overflow menu */
.feature-card-roadmap {
    position: relative;
    overflow: visible;
}

.column-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--text-secondary);
    text-align: center;
    opacity: 0.5;
    gap: var(--jb-sp-2);
}

.column-empty-icon {
    font-size: 32px;
    opacity: 0.3;
    margin-bottom: var(--jb-sp-2);
}

.column-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--jb-sp-6) var(--jb-sp-4);
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    color: var(--text-tertiary);
    font-size: 13px;
    text-align: center;
    transition: border-color var(--duration-fast), color var(--duration-fast);
    cursor: default;
}

.column-empty-state:hover,
.kanban-column.drag-over .column-empty-state {
    border-color: var(--accent);
    color: var(--accent);
}

.column-empty-state-text {
    margin-bottom: var(--jb-sp-2);
}

.column-empty-state-add {
    font-size: 12px;
    color: var(--accent);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-weight: 500;
}

.column-empty-state-add:hover {
    text-decoration: underline;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideDown {
    from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@keyframes unsaved-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

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

@keyframes modalFormFadeUp {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-overlay.active .modal-body > form > * { animation: modalFormFadeUp 0.18s cubic-bezier(0.2, 0, 0, 1) both; }
.modal-overlay.active .modal-body > form > :nth-child(1) { animation-delay: 0.02s; }
.modal-overlay.active .modal-body > form > :nth-child(2) { animation-delay: 0.04s; }
.modal-overlay.active .modal-body > form > :nth-child(3) { animation-delay: 0.06s; }
.modal-overlay.active .modal-body > form > :nth-child(4) { animation-delay: 0.08s; }
.modal-overlay.active .modal-body > form > :nth-child(5) { animation-delay: 0.10s; }
.modal-overlay.active .modal-body > form > :nth-child(6) { animation-delay: 0.12s; }
.modal-overlay.active .modal-body > form > :nth-child(7) { animation-delay: 0.14s; }
.modal-overlay.active .modal-body > form > :nth-child(8) { animation-delay: 0.16s; }
.modal-overlay.active .modal-body > form > :nth-child(9) { animation-delay: 0.18s; }
.modal-overlay.active .modal-body > form > :nth-child(10) { animation-delay: 0.20s; }

.detail-header-section { margin: 20px var(--jb-sp-1) 0 var(--jb-sp-1); padding-bottom: var(--jb-sp-3); }

.detail-badges-row {
    display: flex;
    align-items: center;
    gap: var(--jb-sp-2);
    flex-wrap: wrap;
    margin-bottom: var(--jb-sp-2);
}

.detail-status-badge {
    display: inline-block;
    padding: var(--jb-sp-1) var(--jb-sp-3);
    border-radius: var(--radius-md);
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

.detail-heading {
    font-size: 32px;
    padding-bottom: var(--jb-sp-1);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
    word-wrap: break-word;
}

.detail-tag {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    border: 1px solid var(--accent);
    color: var(--jb-fg-on-accent);
    padding: 0.35rem var(--jb-sp-3);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 500;
}

.detail-tag-date { gap: 0.375rem; color: var(--jb-fg-on-accent); background: var(--info); }
.detail-tag-date svg { fill: currentColor; flex-shrink: 0; }
.detail-tag-date.overdue { color: var(--jb-fg-on-accent); background: var(--error); border-color: var(--error); }

.detail-stats {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 0 !important;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    padding: var(--space-3) var(--space-4);
}

.detail-stat {
    display: flex;
    align-items: center;
    gap: var(--jb-sp-2);
    padding: var(--jb-sp-2) var(--jb-sp-4);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    transition: background-color var(--duration-fast) var(--ease-out);
}

.detail-stat:hover { background: var(--accent-subtle); }
.detail-stat-clickable { cursor: pointer; }
.detail-stat-clickable:hover { background: var(--accent-muted); }
.detail-stat:first-child { padding-left: var(--jb-sp-1); }
.detail-stat:last-child { border-right: none; }

.detail-stat-icon { width: 14px; height: 14px; fill: var(--text-primary); flex-shrink: 0; }
.detail-stat-value { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.detail-stat-label { font-size: 12px; color: var(--text-primary); }

.detail-progress-section {
    border-radius: var(--radius-md);
}

.detail-progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--jb-sp-3); }
.detail-progress-label { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.detail-progress-value { font-size: 20px; font-weight: 600; color: var(--accent); }

.detail-progress-bar {
    height: 8px;
    border: none;
    background: var(--border-subtle);
    border-radius: 999px;
    overflow: hidden;
}

.detail-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: var(--radius-md);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px var(--accent-glow);
}

.detail-section {
    border-radius: var(--radius-md);
}

.detail-sections { margin: 0; padding: var(--jb-sp-3) 0; }
.detail-sections:first-child { margin-top: 0; }
.detail-sections:last-child { margin-bottom: 0; }

.detail-section-title {
    display: flex;
    align-items: center;
    gap: var(--jb-sp-2);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--jb-sp-3);
    padding-bottom: var(--jb-sp-2);
    border-bottom: 1px solid var(--border-subtle);
}

.detail-icon { width: 20px; height: 20px; fill: var(--accent); }

.detail-description {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.detail-description-section {
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--jb-sp-3) var(--jb-sp-4) var(--jb-sp-4) var(--jb-sp-4);
}

.detail-linked-feature {
    display: inline-flex;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    background: var(--accent-subtle);
    border: 1px solid var(--accent-muted);
    border-radius: var(--radius-md);
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}

.detail-linked-feature:hover {
    background: var(--accent-muted);
    border-color: var(--accent-glow);
    transform: translateX(4px);
}

.detail-comments-list { display: flex; flex-direction: column; gap: var(--jb-sp-4); }

.detail-comment {
    padding: var(--space-4) var(--space-5);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.detail-comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--jb-sp-3); }
.detail-comment-author { font-weight: 600; color: var(--text-primary); }
.detail-comment-date { font-size: 13px; color: var(--text-tertiary); }
.detail-comment-text { font-size: 16px; line-height: 1.6; color: var(--text-primary); word-wrap: break-word; }

.detail-no-comments {
    text-align: center;
    padding: var(--jb-sp-6);
    color: var(--text-tertiary);
    font-size: 14px;
    font-style: italic;
}

/* Detail modal action footer (positioned between header and body) */
.detail-action-footer {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
    flex-shrink: 0;
}

.detail-move-wrapper {
    position: relative;
}

.detail-move-wrapper .move-popover {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: var(--jb-sp-1);
}

.detail-action-footer .btn-sm {
    padding: 0.375rem var(--jb-sp-3);
    font-size: 13px;
    border-radius: var(--radius-md);
}

.detail-action-footer .btn-danger {
    margin-left: auto;
}

.tags-list-section { padding: var(--jb-sp-5) 0; border-bottom: 1px solid var(--border); }
.tags-section-title { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: var(--jb-sp-4); }

.tags-list {
    display: flex;
    flex-direction: column;
    gap: var(--jb-sp-3);
    max-height: 300px;
    overflow-y: auto;
}

.tags-list::-webkit-scrollbar { width: 4px; }
.tags-list::-webkit-scrollbar-track { background: var(--accent-subtle); border-radius: var(--radius-sm); }
.tags-list::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: var(--radius-sm); }
.tags-list::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }

.tag-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem var(--jb-sp-4);
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color var(--duration-xfast) var(--ease-out), background-color var(--duration-xfast) var(--ease-out);
}

.tag-item:hover {
    background: var(--accent-muted);
    border-color: var(--border);
}

.tag-item-name { font-size: 0.95rem; color: var(--text-primary); font-weight: 500; }

.tag-delete-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--jb-sp-1);
    border-radius: var(--radius-md);
    transition: color 0.12s var(--ease-out), background-color 0.12s var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tag-delete-btn:hover { background: var(--error-muted); color: var(--error); }
.tag-delete-btn .action-icon { width: 1.125rem; height: 1.125rem; }

.no-tags { text-align: center; padding: var(--jb-sp-6); color: var(--text-secondary); font-style: italic; font-size: 0.95rem; }
.new-tag-section { padding-top: var(--jb-sp-5); }

/* Shared avatar circle */
.avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--jb-fg-on-accent);
    font-weight: 600;
    line-height: 1;
    flex-shrink: 0;
    user-select: none;
}

.comment-sort-bar {
    display: inline-flex;
    gap: 2px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 3px;
    margin-bottom: var(--space-3);
}

.comment-sort-btn {
    padding: var(--jb-sp-1) var(--jb-sp-3);
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.12s var(--ease-out), border-color 0.12s var(--ease-out), background-color 0.12s var(--ease-out);
}

.comment-sort-btn:hover {
    color: var(--text-primary);
}

.comment-sort-btn.active {
    background: var(--accent);
    color: var(--jb-fg-on-accent);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Instagram/TikTok style — borderless, dense */
.comment-item {
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 0;
    padding: var(--space-3) 0;
    margin-bottom: 0;
}
.comment-item:hover { background: none; }
.comment-item:last-child { border-bottom: none; }
.comment-item--reply { padding: var(--space-2) 0; }

.comment-item-row { display: flex; gap: var(--space-3); align-items: flex-start; }
.comment-item-body { flex: 1; min-width: 0; }

.comment-item p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-secondary); }
.comment-item p strong { color: var(--text-primary); font-weight: 600; margin-right: 0.25em; }
.comment-item-you { font-size: 0.5625rem; font-weight: 600; color: var(--jb-fg-on-accent); background: var(--accent); padding: 0.1rem 0.35rem; border-radius: 999px; line-height: 1.2; vertical-align: middle; margin-right: 0.2em; }
.comment-item-date { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; }

.comment-item-meta { display: flex; align-items: center; gap: var(--jb-sp-2); margin-top: var(--jb-sp-1); }
.comment-like-count { font-size: 11px; color: var(--text-tertiary); font-weight: 500; }

.comment-like-btn,
.comment-reply-btn,
.comment-edit-btn,
.comment-delete-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--jb-sp-1);
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    border-radius: 0;
    transition: color var(--duration-xfast);
}
.comment-like-btn:hover,
.comment-reply-btn:hover { color: var(--accent); }
.comment-edit-btn:hover { color: var(--accent); }
.comment-delete-btn:hover { color: var(--error); }
.comment-like-btn.liked { color: var(--accent); }
.comment-like-btn svg { width: 14px; height: 14px; transition: transform var(--duration-xfast); }
.comment-like-btn.liked svg { animation: likePop 0.3s ease; }
@keyframes likePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.comment-item-reply {
    position: relative;
    margin-left: var(--jb-sp-4);
    padding-left: 20px;
    margin-top: var(--space-2);
}
.comment-thread-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: var(--jb-sp-3);
    width: 2px;
    background: var(--accent-muted);
    border-radius: 1px;
}
.comment-reply-list { display: flex; flex-direction: column; }

.comment-role-badge { display: inline-block; padding: 0.125rem 0.45rem; border-radius: 999px; font-size: 0.5625rem; font-weight: 600; vertical-align: middle; }
.comment-role-owner { background: var(--accent-muted); color: var(--accent); }
.comment-role-editor { background: var(--info-muted); color: var(--info); }

.comment-reply-form { display: flex; gap: var(--jb-sp-2); margin-top: var(--jb-sp-2); align-items: center; }
.comment-reply-input { flex: 1; padding: 6px 10px; background: var(--input-bg); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); color: var(--text-primary); font-family: inherit; font-size: 13px; }
.comment-reply-input:focus { outline: none; border-color: var(--accent); }

/* Comment composer */
.comment-composer {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0 0 var(--space-3) 0;
    margin-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-subtle);
}
.comment-composer-row { display: flex; gap: var(--space-3); align-items: flex-start; }
.comment-composer-avatar { flex-shrink: 0; margin-top: 2px; }
.comment-composer-input-wrap { flex: 1; position: relative; }
.comment-composer-footer { display: flex; justify-content: flex-end; margin-top: var(--space-2); }

.dashboard-comment-form { display: flex; flex-direction: column; gap: 0; }
.dashboard-comment-input { width: 100%; background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); color: var(--text-primary); padding: var(--space-3); font-family: inherit; font-size: var(--text-sm); resize: vertical; min-height: 64px; box-sizing: border-box; }
.dashboard-comment-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1); }
.dashboard-comment-submit { background: var(--accent); color: var(--jb-fg-on-accent); border: none; padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 600; cursor: pointer; transition: opacity var(--duration-fast); }
.dashboard-comment-submit:hover { opacity: 0.85; }

.progress-input-group { display: flex; align-items: center; gap: 12px; padding: var(--jb-sp-3) 0; }

.progress-input-group input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated) !important;
    outline: none;
    cursor: pointer;
    border: none !important;
    padding: 0 !important;
}

.progress-input-group input[type="range"]:focus {
    box-shadow: none !important;
    background: var(--bg-elevated) !important;
}

.progress-input-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    transition: transform 0.12s var(--ease-out);
}

.progress-input-group input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.progress-input-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
    transition: transform 0.12s var(--ease-out);
}

.progress-input-group input[type="range"]::-moz-range-thumb:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.progress-input-group input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--jb-sp-5);
    padding-bottom: var(--jb-sp-4);
    border-bottom: 1px solid var(--border);
}

.section-header h2 { margin: 0; font-size: 24px; font-weight: 600; color: var(--text-primary); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--jb-sp-3);
    min-height: 200px;
}

.feature-card-roadmap:hover {
    transform: translateY(-1px);
    border-color: var(--accent);
    box-shadow: 0 2px 8px var(--accent-glow);
}

.vote-arrow { width: 20px; height: 20px; fill: var(--accent); transition: transform var(--duration-fast) var(--ease-out); }
.vote-count { font-size: 14px; font-weight: 600; color: var(--accent); }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--text-secondary);
    text-align: center;
    gap: var(--jb-sp-3);
}

.empty-state-icon { font-size: 32px; opacity: 0.3; }
.empty-state-text { font-size: 16px; opacity: 0.7; }

.duplicate-feature-item {
    background: var(--accent-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--jb-sp-4);
    transition: border-color var(--duration-xfast) var(--ease-out), background-color var(--duration-xfast) var(--ease-out);
}

.duplicate-feature-item:hover {
    background: var(--accent-muted);
    border-color: var(--border);
}

.duplicate-feature-item label { display: flex; align-items: flex-start; cursor: pointer; gap: var(--jb-sp-3); }

.duplicate-feature-item input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: var(--jb-sp-1);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--input-bg);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: background-color var(--duration-xfast) var(--ease-out), border-color var(--duration-xfast) var(--ease-out);
    padding: 0;
}

.duplicate-feature-item input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 7px;
    border: solid var(--jb-fg-on-accent);
    border-width: 0 1.5px 1.5px 0;
    transform: translate(-50%, -60%) rotate(45deg) scale(0);
    transition: transform var(--duration-xfast) cubic-bezier(0.4, 0, 0.2, 1);
}

.duplicate-feature-item input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.duplicate-feature-item input[type="checkbox"]:checked::after {
    transform: translate(-50%, -60%) rotate(45deg) scale(1);
}

.duplicate-feature-item input[type="checkbox"]:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--input-focus-ring);
}

.duplicate-feature-content { flex: 1; }
.duplicate-feature-title { font-weight: 600; color: var(--text-primary); margin-bottom: var(--jb-sp-1); font-size: 16px; line-height: 1.3; }
.duplicate-feature-stats { font-size: 13px; color: var(--text-secondary); display: flex; gap: var(--jb-sp-4); margin-top: var(--jb-sp-1); }
.duplicate-feature-stats span { display: flex; align-items: center; gap: var(--jb-sp-1); }

.checkbox-group {
    margin: 10px 0;
    padding: 10px 12px;
    background: var(--accent-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color var(--duration-xfast) var(--ease-out), background-color var(--duration-xfast) var(--ease-out);
}

.checkbox-group:hover {
    background: var(--accent-muted);
    border-color: var(--border);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    gap: var(--jb-sp-3);
    user-select: none;
}

.checkbox-group input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--input-bg);
    cursor: pointer;
    position: relative;
    transition: background-color var(--duration-xfast) var(--ease-out), border-color var(--duration-xfast) var(--ease-out);
    margin: 0;
    padding: 0;
}

.checkbox-group input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 7px;
    border: solid var(--jb-fg-on-accent);
    border-width: 0 1.5px 1.5px 0;
    transform: translate(-50%, -60%) rotate(45deg) scale(0);
    transition: transform var(--duration-xfast) cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-group input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.checkbox-group input[type="checkbox"]:checked::after {
    transform: translate(-50%, -60%) rotate(45deg) scale(1);
}

.checkbox-group input[type="checkbox"]:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--input-focus-ring);
}

.activity-summary-bar { display: flex; gap: var(--jb-sp-2); flex-wrap: wrap; margin-bottom: var(--jb-sp-4); }

.activity-summary-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--jb-sp-1);
    padding: var(--jb-sp-2) var(--jb-sp-3);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
    font-family: inherit;
    font-size: 14px;
    animation: enter-fade-up 0.25s ease both;
}

.activity-summary-item:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--accent-subtle);
}

.activity-summary-item.active { border-color: var(--accent); background: var(--accent-muted); color: var(--text-primary); }

.activity-summary-item.activity-badge-feature.active { border-color: var(--badge-feature); background: var(--badge-feature-bg); color: var(--badge-feature); }
.activity-summary-item.activity-badge-comment.active { border-color: var(--badge-comment); background: var(--badge-comment-bg); color: var(--badge-comment); }
.activity-summary-item.activity-badge-vote.active { border-color: var(--badge-vote); background: var(--badge-vote-bg); color: var(--badge-vote); }
.activity-summary-item.activity-badge-view.active { border-color: var(--badge-view); background: var(--badge-view-bg); color: var(--badge-view); }
.activity-summary-item.activity-badge-vote-removed.active { border-color: var(--badge-vote-removed); background: var(--badge-vote-removed-bg); color: var(--badge-vote-removed); }
.activity-summary-item.activity-badge-deleted.active { border-color: var(--badge-deleted); background: var(--badge-deleted-bg); color: var(--badge-deleted); }
.activity-summary-item.activity-badge-moved.active { border-color: var(--badge-moved); background: var(--badge-moved-bg); color: var(--badge-moved); }
.activity-summary-item.activity-badge-denied.active { border-color: var(--badge-denied); background: var(--badge-denied-bg); color: var(--badge-denied); }
.activity-summary-item.activity-badge-undenied.active { border-color: var(--badge-undenied); background: var(--badge-undenied-bg); color: var(--badge-undenied); }
.activity-summary-item.activity-badge-merged.active { border-color: var(--badge-merged); background: var(--badge-merged-bg); color: var(--badge-merged); }
.activity-summary-item.activity-badge-approved.active { border-color: var(--badge-approved); background: var(--badge-approved-bg); color: var(--badge-approved); }
.activity-summary-item.activity-badge-archived.active { border-color: var(--badge-archived); background: var(--badge-archived-bg); color: var(--badge-archived); }
.activity-summary-item.activity-badge-unarchived.active { border-color: var(--badge-unarchived); background: var(--badge-unarchived-bg); color: var(--badge-unarchived); }
.activity-summary-item.activity-badge-team.active { border-color: var(--badge-team); background: var(--badge-team-bg); color: var(--badge-team); }

.activity-summary-item:nth-child(1) { animation-delay: 0s; }
.activity-summary-item:nth-child(2) { animation-delay: 0.02s; }
.activity-summary-item:nth-child(3) { animation-delay: 0.04s; }
.activity-summary-item:nth-child(4) { animation-delay: 0.06s; }
.activity-summary-item:nth-child(5) { animation-delay: 0.08s; }
.activity-summary-item:nth-child(6) { animation-delay: 0.10s; }
.activity-summary-item:nth-child(7) { animation-delay: 0.12s; }
.activity-summary-item:nth-child(8) { animation-delay: 0.14s; }
.activity-summary-item:nth-child(9) { animation-delay: 0.16s; }
.activity-summary-item:nth-child(10) { animation-delay: 0.18s; }
.activity-summary-item:nth-child(11) { animation-delay: 0.20s; }
.activity-summary-item:nth-child(12) { animation-delay: 0.22s; }
.activity-summary-item:nth-child(13) { animation-delay: 0.24s; }
.activity-summary-item:nth-child(14) { animation-delay: 0.26s; }
.activity-summary-item:nth-child(15) { animation-delay: 0.28s; }

.activity-summary-count { font-weight: 600; font-size: 18px; font-variant-numeric: tabular-nums; }
.activity-summary-label { font-weight: 400; font-size: 12px; color: var(--text-tertiary); }
.activity-summary-toggle { display: none; }

/* The feed is one island of hairline separated rows, shared by the voters and release lists, and single column so reading order is clear. */
#activity-timeline,
#voters-list,
#releases-list,
#messages-list {
    display: flex;
    flex-direction: column;
    background: var(--jb-bg-island);
    border: 1px solid var(--jb-border-island);
    border-radius: var(--jb-r-panel);
    overflow: hidden;
}

/* A row is 44px around a 24px marker, which leaves ten clear pixels above and below it. */
.activity-item {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--jb-sp-3);
    height: 44px;
    padding: 0 var(--jb-sp-4);
    transition: background-color var(--jb-dur-in) ease-out;
}
/* The separator is inset from both ends, so the list reads as rows with air rather than meeting cells. */
.activity-item + .activity-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--jb-sp-4);
    right: var(--jb-sp-4);
    height: 1px;
    background: var(--jb-border-island);
}

.activity-item-clickable { cursor: pointer; }
/* A row answers the pointer with a fill. It does not lift, glow or move. */
.activity-item:hover { background: var(--jb-bg-hover); }
.activity-item-actor { font-size: 13px; color: var(--jb-fg-secondary); white-space: nowrap; flex: 0 0 auto; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
/* The subject takes the slack, so a wide row has text across it rather than a stranded timestamp. */
.activity-item-title { font-size: 13px; font-weight: 400; color: var(--jb-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
.activity-item-time { font-size: 12px; color: var(--jb-fg-tertiary); white-space: nowrap; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.activity-item-title.clickable { color: var(--text-primary); cursor: pointer; }
.activity-item-title.clickable:hover { text-decoration: none; }
.activity-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--jb-sp-1); }

.activity-icon-wrapper {
    width: 24px;
    height: 24px;
    border-radius: var(--jb-r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.activity-icon-wrapper svg { width: 14px; height: 14px; }

.activity-icon-wrapper.activity-badge-feature { background: var(--badge-feature-bg); color: var(--badge-feature); }
.activity-icon-wrapper.activity-badge-comment { background: var(--badge-comment-bg); color: var(--badge-comment); }
.activity-icon-wrapper.activity-badge-vote { background: var(--badge-vote-bg); color: var(--badge-vote); }
.activity-icon-wrapper.activity-badge-view { background: var(--badge-view-bg); color: var(--badge-view); }
.activity-icon-wrapper.activity-badge-vote-removed { background: var(--badge-vote-removed-bg); color: var(--badge-vote-removed); }
.activity-icon-wrapper.activity-badge-deleted { background: var(--badge-deleted-bg); color: var(--badge-deleted); }
.activity-icon-wrapper.activity-badge-moved { background: var(--badge-moved-bg); color: var(--badge-moved); }
.activity-icon-wrapper.activity-badge-denied { background: var(--badge-denied-bg); color: var(--badge-denied); }
.activity-icon-wrapper.activity-badge-undenied { background: var(--badge-undenied-bg); color: var(--badge-undenied); }
.activity-icon-wrapper.activity-badge-merged { background: var(--badge-merged-bg); color: var(--badge-merged); }
.activity-icon-wrapper.activity-badge-approved { background: var(--badge-approved-bg); color: var(--badge-approved); }
.activity-icon-wrapper.activity-badge-archived { background: var(--badge-archived-bg); color: var(--badge-archived); }
.activity-icon-wrapper.activity-badge-unarchived { background: var(--badge-unarchived-bg); color: var(--badge-unarchived); }
.activity-icon-wrapper.activity-badge-team { background: var(--badge-team-bg); color: var(--badge-team); }

.activity-content { flex: 1; min-width: 0; display: none; }
.activity-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--jb-sp-1); }
.activity-header-left { display: flex; align-items: center; gap: var(--jb-sp-2); min-width: 0; }
.activity-header-actor { font-size: 13px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Badges in a list row are labels: one height, one radius, one weight, so four of them stay a quiet band. */
.activity-badge,
.voter-type-badge,
.voter-lifecycle-badge,
.voter-ban-badge,
.release-row-badge {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 var(--jb-sp-2);
    border-radius: var(--jb-r-sm);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.activity-badge.activity-badge-feature { background: var(--badge-feature-bg); color: var(--badge-feature); }
.activity-badge.activity-badge-comment { background: var(--badge-comment-bg); color: var(--badge-comment); }
.activity-badge.activity-badge-vote { background: var(--badge-vote-bg); color: var(--badge-vote); }
.activity-badge.activity-badge-view { background: var(--badge-view-bg); color: var(--badge-view); }
.activity-badge.activity-badge-vote-removed { background: var(--badge-vote-removed-bg); color: var(--badge-vote-removed); }
.activity-badge.activity-badge-deleted { background: var(--badge-deleted-bg); color: var(--badge-deleted); }
.activity-badge.activity-badge-moved { background: var(--badge-moved-bg); color: var(--badge-moved); }
.activity-badge.activity-badge-denied { background: var(--badge-denied-bg); color: var(--badge-denied); }
.activity-badge.activity-badge-undenied { background: var(--badge-undenied-bg); color: var(--badge-undenied); }
.activity-badge.activity-badge-merged { background: var(--badge-merged-bg); color: var(--badge-merged); }
.activity-badge.activity-badge-approved { background: var(--badge-approved-bg); color: var(--badge-approved); }
.activity-badge.activity-badge-archived { background: var(--badge-archived-bg); color: var(--badge-archived); }
.activity-badge.activity-badge-unarchived { background: var(--badge-unarchived-bg); color: var(--badge-unarchived); }
.activity-badge.activity-badge-team { background: var(--badge-team-bg); color: var(--badge-team); }

.activity-time { font-size: 13px; color: var(--text-secondary); opacity: 0.7; white-space: nowrap; }
.activity-title { font-weight: 600; font-size: 16px; color: var(--text-primary); margin-bottom: var(--jb-sp-1); word-wrap: break-word; }
.activity-description { font-size: 14px; color: var(--text-secondary); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.activity-stats { display: flex; gap: var(--jb-sp-4); margin-top: var(--jb-sp-1); font-size: 13px; color: var(--text-secondary); }
.activity-stat { display: flex; align-items: center; gap: var(--jb-sp-1); }
.activity-actor { font-size: 13px; color: var(--text-secondary); opacity: 0.6; margin-top: var(--jb-sp-1); }

.activity-title-link {
    font-weight: 600; font-size: 16px; color: var(--accent); text-decoration: none;
    display: block; margin-bottom: var(--jb-sp-1); word-wrap: break-word; cursor: pointer;
}
/* A titled separator: 12px medium tertiary and a hairline, sticking with the island's own fill rather than a backdrop blur. */
.activity-date-header {
    display: flex; align-items: center; gap: var(--jb-sp-3);
    font-size: 12px; font-weight: 500; color: var(--jb-fg-tertiary);
    padding: var(--jb-sp-3) var(--jb-sp-4);
    background: var(--jb-bg-island);
    position: sticky; top: 0; z-index: 2;
}
.activity-date-header::after { content: ''; flex: 1; height: 1px; background: var(--jb-border-island); }
.activity-item + .activity-date-header { border-top: 1px solid var(--jb-border-island); }

.activity-empty-state {
    grid-column: 1 / -1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 320px; border: 1px dashed var(--border); border-radius: var(--radius-md);
    color: var(--text-secondary); text-align: center; padding: var(--jb-sp-6);
}
.activity-empty-icon {
    width: 64px; height: 64px; border-radius: var(--radius-lg);
    background: var(--accent-subtle); display: flex; align-items: center; justify-content: center;
    margin-bottom: var(--jb-sp-4); color: var(--text-secondary);
}
.activity-empty-title { font-size: 18px; font-weight: 600; color: var(--text-primary); margin-bottom: var(--jb-sp-2); }
.activity-empty-desc { font-size: 14px; color: var(--text-tertiary); max-width: 320px; line-height: 1.5; }
.activity-empty-state-compact { min-height: 120px; border: none; }

/* Paging is a footnote: two 24px icon buttons and a position label instead of an outlined run of numbers. */
.list-pager { display: flex; align-items: center; justify-content: center; gap: var(--jb-sp-2); padding: var(--jb-sp-3) 0 0; }
.list-pager-btn {
    width: 24px; height: 24px; padding: 0;
    display: grid; place-items: center;
    background: transparent; border: none; border-radius: var(--jb-r-sm);
    color: var(--jb-fg-icon); cursor: default;
    transition: background-color var(--jb-dur-in) ease-out, color var(--jb-dur-in) ease-out;
}
.list-pager-btn:hover:not(:disabled) { background: var(--jb-bg-hover); color: var(--jb-fg); }
.list-pager-btn:disabled { color: var(--jb-fg-disabled); }
.list-pager-info { font-size: 12px; color: var(--jb-fg-tertiary); font-variant-numeric: tabular-nums; }


/* Activity Analytics Section */
.activity-analytics-section {
    background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: var(--jb-sp-4) 20px; margin-bottom: var(--jb-sp-4);
}
.analytics-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--jb-sp-3); }
.analytics-header h3 { margin: 0; font-size: 16px; font-weight: 600; color: var(--text-primary); }
.analytics-controls { display: flex; gap: var(--jb-sp-2); align-items: center; }
.analytics-period-btn {
    padding: var(--jb-sp-1) var(--jb-sp-2); font-size: 12px; border-radius: var(--radius-sm); cursor: pointer;
    background: transparent; border: 1px solid var(--border); color: var(--text-secondary); font-family: inherit;
    transition: border-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
}
.analytics-period-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.analytics-period-btn.active { background: var(--accent-muted); border-color: var(--accent); color: var(--accent); }
.analytics-toggle-btn {
    padding: var(--jb-sp-1) var(--jb-sp-2); background: transparent; border: 1px solid var(--border);
    border-radius: var(--radius-sm); cursor: pointer; color: var(--text-secondary); display: flex; align-items: center;
    transition: border-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}
.analytics-toggle-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.analytics-chart-container { height: 250px; position: relative; }
.analytics-chart-container.collapsed { display: none; }

/* Activity Team Badge */
.activity-team-badge {
    display: inline-block; padding: var(--jb-sp-1) var(--jb-sp-2); border-radius: var(--radius-sm);
    font-size: 11px; font-weight: 600;
    background: var(--accent-muted); color: var(--accent); margin-left: var(--jb-sp-1);
}

/* Activity Flash Animation (SSE) */
@keyframes activity-flash {
    0% { box-shadow: inset 0 0 0 1px var(--accent), 0 0 16px var(--accent-subtle); }
    100% { box-shadow: none; }
}
.activity-item-new { animation: activity-flash 2s ease-out; }

/* Screen-reader only utility */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Focus-visible outlines for activity page elements */
.activity-summary-item:focus-visible,
.activity-item:focus-visible,
.list-pager-btn:focus-visible,
.chart-range-btn:focus-visible,
.activity-chart-toggle:focus-visible,
.insights-section-toggle:focus-visible,
.activity-title-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Keyframes for activity animations (Batches 1–2) */
/* enter-fade-up keyframe is defined in the Animation Utilities block above */

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

.activity-item-enter { animation: activityItemIn 0.35s ease both; }

.hamburger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.375rem;
    border-radius: var(--radius-sm);
    transition: background var(--duration-fast) var(--ease-out);
}
.hamburger-btn:hover { background: var(--accent-muted); }


.toolbar-search {
    display: flex;
    align-items: center;
    gap: var(--jb-sp-2);
    flex: 1;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 0 var(--jb-sp-3);
    height: 40px;
    box-sizing: border-box;
    transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
    position: relative;
}

.toolbar-search-kbd {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 1px 5px;
    pointer-events: none;
    line-height: 1.4;
}

[data-theme="light"] .toolbar-search,
[data-theme="light"] .toolbar-filter-toggle {
    background: rgba(37, 99, 235, 0.04);
    border-color: rgba(37, 99, 235, 0.12);
}
[data-theme="light"] .toolbar-search-kbd {
    background: rgba(37, 99, 235, 0.06);
    border-color: rgba(37, 99, 235, 0.1);
    color: var(--text-secondary);
}

.toolbar-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--input-focus-ring); }
.toolbar-search-icon { width: 16px; height: 16px; fill: var(--text-secondary); flex-shrink: 0; }

.toolbar-input {
    flex: 1;
    background: none !important;
    border: none !important;
    color: var(--text-primary);
    font-size: 0.9rem;
    padding: 0 !important;
    height: 100%;
    outline: none;
    box-shadow: none !important;
}

.toolbar-input:focus { box-shadow: none !important; border: none !important; }

.toolbar-filters { display: flex; gap: var(--jb-sp-2); align-items: center; position: relative; }

/* Filter popover */
.toolbar-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--jb-sp-2);
    height: 40px;
    padding: 0 var(--jb-sp-3);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
    font-family: inherit;
    white-space: nowrap;
}
.toolbar-filter-toggle:hover {
    border-color: var(--border);
    color: var(--text-primary);
}
.toolbar-filter-toggle.active {
    border-color: var(--accent);
    background: var(--accent-subtle);
    color: var(--accent);
}
.toolbar-filter-toggle .filter-active-dot {
    display: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}
.toolbar-filter-toggle.active .filter-active-dot {
    display: block;
}
.toolbar-filter-popover {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: var(--jb-sp-2);
    z-index: var(--jb-z-popover);
    min-width: 220px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.375rem;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: var(--jb-sp-1);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity var(--duration-fast) var(--ease-out), visibility var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}
.toolbar-filter-popover.active {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.filter-popover-group {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}
.filter-popover-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.filter-popover-divider {
    height: 1px;
    background: var(--border);
    margin: var(--jb-sp-1) 0;
}
#filter-type-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--jb-sp-1);
}
#filter-type-list .filter-checkbox-item {
    padding: 0; gap: var(--jb-sp-1);
}
#filter-type-list .filter-checkbox-item input[type="checkbox"] {
    display: none;
}
#filter-type-list .filter-checkbox-item .activity-badge {
    cursor: pointer;
    opacity: 0.45;
    transition: opacity var(--duration-xfast) var(--ease-out);
}
#filter-type-list .filter-checkbox-item input[type="checkbox"]:checked + .activity-badge {
    opacity: 1;
    font-weight: 600;
}
#filter-type-list .filter-item-count {
    display: none;
}
.filter-popover-link {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    padding: var(--jb-sp-1) 0;
}
.filter-popover-link:hover {
    text-decoration: underline;
}

.toolbar-select {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 0 var(--jb-sp-6) 0 var(--jb-sp-3);
    height: 40px;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right var(--jb-sp-2) center;
    background-repeat: no-repeat;
    background-size: 18px;
    transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
    font-family: inherit;
}

.toolbar-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--input-focus-ring); }

button.toolbar-select {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap;
    padding: 0.55rem var(--jb-sp-3);
    background-image: none;
}

/* Date range dropdown */
.date-range-container { position: relative; }
.date-range-btn { min-width: 136px; }
.date-range-dropdown { display: none; position: absolute; top: calc(100% + var(--jb-sp-2)); right: 0; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--jb-sp-4); z-index: 100; min-width: 240px; box-shadow: var(--shadow-md); }
.date-range-dropdown.active { display: block; }
.date-range-field { margin-bottom: var(--jb-sp-3); }
.date-range-field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: var(--jb-sp-1); }
.date-range-input { width: 100%; padding: var(--jb-sp-2) var(--jb-sp-2); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-card); color: var(--text-primary); font-size: 13px; font-family: inherit; }
.date-range-actions { display: flex; gap: var(--jb-sp-2); justify-content: flex-end; }
.date-range-apply { padding: var(--jb-sp-2) var(--jb-sp-4); }
.date-range-clear { padding: var(--jb-sp-2) var(--jb-sp-4); }

/* Live indicator */
.live-indicator { display: inline-flex; align-items: center; gap: var(--jb-sp-2); font-size: 12px; font-weight: 600; color: var(--success); padding: var(--jb-sp-1) var(--jb-sp-2); border-radius: var(--radius-lg); background: rgba(16, 185, 129, 0.1); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: live-pulse 2s infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Filter dropdown */
.filter-dropdown-container { position: relative; }
.filter-dropdown-btn { gap: var(--jb-sp-2); }
#voter-type-filter-btn { height: 30px; }
.filter-dropdown-btn .filter-badge-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; background: var(--accent); color: var(--jb-fg-on-accent);
    font-size: 11px; font-weight: 600; line-height: 1;
}
.filter-dropdown-panel {
    position: absolute; top: 100%; right: 0; margin-top: var(--jb-sp-2);
    background: var(--bg-base);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: var(--jb-sp-2); min-width: 220px; max-height: 400px; overflow-y: auto;
    box-shadow: var(--shadow-md); z-index: var(--jb-z-popover);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity var(--duration-fast) var(--ease-out), visibility var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}
.filter-dropdown-panel.active { opacity: 1; visibility: visible; transform: translateY(0); }
.filter-dropdown-panel::-webkit-scrollbar { width: 4px; }
.filter-dropdown-panel::-webkit-scrollbar-track { background: transparent; }
.filter-dropdown-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.filter-checkbox-item {
    display: flex; align-items: center; gap: var(--jb-sp-1);
    padding: var(--jb-sp-1) var(--jb-sp-1); border-radius: var(--radius-sm);
    cursor: pointer; transition: background var(--duration-xfast) var(--ease-out);
    font-size: 13px; color: var(--text-secondary);
}
.filter-checkbox-item:hover { background: var(--accent-subtle); }
.filter-checkbox-item input[type="checkbox"] {
    -webkit-appearance: none; appearance: none;
    width: 14px; height: 14px; min-width: 14px;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    background: var(--input-bg);
    cursor: pointer; position: relative;
    transition: background-color var(--duration-xfast) var(--ease-out), border-color var(--duration-xfast) var(--ease-out);
    margin: 0; padding: 0; flex-shrink: 0;
}
.filter-checkbox-item input[type="checkbox"]::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 4px; height: 7px;
    border: solid var(--jb-fg-on-accent); border-width: 0 1.5px 1.5px 0;
    transform: translate(-50%, -60%) rotate(45deg) scale(0);
    transition: transform var(--duration-xfast) cubic-bezier(0.4, 0, 0.2, 1);
}
.filter-checkbox-item input[type="checkbox"]:checked {
    background: var(--accent); border-color: var(--accent);
}
.filter-checkbox-item input[type="checkbox"]:checked::after {
    transform: translate(-50%, -60%) rotate(45deg) scale(1);
}
.filter-checkbox-item .activity-badge { font-size: 11px; padding: var(--jb-sp-1) var(--jb-sp-2); flex-shrink: 0; }
.filter-checkbox-item .filter-item-count {
    margin-left: auto; font-size: 12px; color: var(--text-tertiary); font-variant-numeric: tabular-nums;
}

/* The list and the numbers describing it sit side by side, since insights that have to be asked for are never read. */
.page-with-rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: var(--jb-island-gap);
    align-items: start;
}
.page-rail-main { min-width: 0; display: flex; flex-direction: column; gap: var(--jb-island-gap); }

.insights-rail { min-width: 0; display: flex; flex-direction: column; gap: var(--jb-island-gap); }
.insights-rail-body { min-width: 0; display: flex; flex-direction: column; gap: var(--jb-island-gap); }
.insights-rail-body > :empty { display: none; }

/* Below this width the rail moves under the list; one number covers both sidebar states, with the real floor near 900. */
@media (max-width: 900px) {
    .page-with-rail { grid-template-columns: minmax(0, 1fr); }
}

/* A figure in the rail is a row in an island, the same shape as a row in the list beside it. */
.rail-stat-list {
    display: flex; flex-direction: column;
    background: var(--jb-bg-island);
    border: 1px solid var(--jb-border-island);
    border-radius: var(--jb-r-panel);
    overflow: hidden;
}
/* A figure is one 44px line of name, number and change; the rail's own chart carries the trend instead of sparklines. */
.rail-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--jb-sp-1);
    min-height: 44px;
    padding: var(--jb-sp-2) var(--jb-sp-4);
    cursor: default;
    transition: background-color var(--jb-dur-in) ease-out;
}
.rail-stat:hover { background: var(--jb-bg-hover); }
.rail-stat + .rail-stat::before {
    content: '';
    position: absolute;
    top: 0; left: var(--jb-sp-4); right: var(--jb-sp-4);
    height: 1px;
    background: var(--jb-border-island);
}
.rail-stat-head { display: flex; align-items: baseline; gap: var(--jb-sp-2); }
.rail-stat-label { flex: 1 1 auto; min-width: 0; font-size: 12px; color: var(--jb-fg-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-stat-value { flex: 0 0 auto; font-size: 16px; color: var(--jb-fg); font-variant-numeric: tabular-nums; }
.rail-stat-delta { flex: 0 0 auto; font-size: 11px; font-variant-numeric: tabular-nums; }
.rail-stat-delta.positive { color: var(--success); }
.rail-stat-delta.negative { color: var(--error); }
.rail-stat-delta.neutral { color: var(--jb-fg-secondary); }

.rail-section {
    background: var(--jb-bg-island);
    border: 1px solid var(--jb-border-island);
    border-radius: var(--jb-r-panel);
    padding: var(--jb-sp-3) var(--jb-sp-4) var(--jb-sp-4);
}
/* A stat list inside a titled section keeps its separators and gives up the island frame. */
.rail-section > .rail-stat-list { background: none; border: none; border-radius: 0; overflow: visible; }
.rail-section > .rail-stat-list .rail-stat { padding-left: 0; padding-right: 0; }
.rail-section > .rail-stat-list .rail-stat + .rail-stat::before { left: 0; right: 0; }

.rail-section-title { display: block; margin: 0 0 var(--jb-sp-3); font-size: 12px; font-weight: 500; color: var(--jb-fg-secondary); }
.rail-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--jb-sp-2); min-height: 26px; margin-bottom: var(--jb-sp-2); }
.rail-section-head .rail-section-title { margin: 0; }
.rail-bar-list, .rail-rank-list { display: flex; flex-direction: column; gap: var(--jb-sp-3); }
.rail-bar-row, .rail-rank-row { display: flex; align-items: center; gap: var(--jb-sp-3); }
.rail-bar-label { flex: 0 0 34%; }
.rail-rank-name { flex: 1 1 auto; }
.rail-bar-label, .rail-rank-name { min-width: 0; font-size: 12px; color: var(--jb-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-bar-value, .rail-rank-value { flex: 0 0 auto; font-size: 12px; color: var(--jb-fg-secondary); font-variant-numeric: tabular-nums; }
.rail-bar-track { flex: 1 1 auto; height: 4px; border-radius: 2px; background: var(--jb-bg-inset); overflow: hidden; }
.rail-bar-fill { height: 100%; border-radius: 2px; background: var(--jb-accent); }
.rail-bar-track-stacked { display: flex; }
.rail-bar-segment { height: 100%; min-width: 2px; }
.rail-tier-legend { display: flex; flex-wrap: wrap; gap: var(--jb-sp-2) var(--jb-sp-3); margin-bottom: var(--jb-sp-3); }
.rail-tier-legend-item { display: inline-flex; align-items: center; gap: var(--jb-sp-1); font-size: 12px; color: var(--jb-fg-secondary); }
.rail-empty { font-size: 12px; color: var(--jb-fg-tertiary); }

.insights-rail .activity-chart-body { min-height: 140px; max-height: 180px; }

/* The range picker is one segmented control everywhere it appears, rather than three separately outlined buttons. */
.chart-range-btns { display: flex; gap: 2px; padding: 2px; background: var(--jb-bg-inset); border: 1px solid var(--jb-border-control); border-radius: var(--jb-r-md); }
.chart-range-btn { background: transparent; border: none; border-radius: var(--jb-r-sm); padding: 0 8px; height: 22px; font-size: 12px; color: var(--jb-fg-secondary); transition: color var(--jb-dur-in) ease-out, background-color var(--jb-dur-in) ease-out; }
.chart-range-btn:hover { color: var(--jb-fg); background: var(--jb-bg-hover); }
.chart-range-btn.active { background: var(--jb-bg-selected-muted); color: var(--jb-accent); }
.activity-chart-container { background: var(--jb-bg-island); border: 1px solid var(--jb-border-island); border-radius: var(--jb-r-panel); overflow: hidden; }
.activity-chart-body { min-height: 250px; padding: var(--jb-sp-3); overflow: hidden; background: var(--jb-bg-island); border: 1px solid var(--jb-border-island); border-radius: var(--jb-r-panel); }

/* Insights collapsible sections */
.insights-section-toggle.collapsed .insights-section-chevron {
    transform: rotate(180deg); color: var(--text-tertiary); background: var(--accent-subtle);
}
.insights-section-body.collapsed { height: 0; opacity: 0; overflow: hidden; }


.activity-kpi-card {
    background: var(--jb-bg-island);
    border: 1px solid var(--jb-border-island);
    border-radius: var(--jb-r-panel);
    padding: var(--jb-sp-3) var(--jb-sp-4);
    display: flex;
    flex-direction: column;
    gap: var(--jb-sp-2);
    cursor: pointer;
    transition: background-color var(--jb-dur-in) ease-out, border-color var(--jb-dur-in) ease-out;
    animation: enter-fade-up 0.25s ease both;
}

.activity-kpi-card:nth-child(2) { animation-delay: 0.06s; }
.activity-kpi-card:nth-child(3) { animation-delay: 0.12s; }
.activity-kpi-card:nth-child(4) { animation-delay: 0.18s; }

.activity-kpi-card:hover {
    background: var(--jb-bg-hover);
    border-color: var(--jb-border-control);
}

.activity-kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.activity-kpi-value {
    font-size: 24px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--jb-fg);
    line-height: 1.2;
}

.activity-kpi-delta {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.activity-kpi-delta.positive { color: var(--success); }
.activity-kpi-delta.negative { color: var(--error); }
.activity-kpi-delta.neutral { color: var(--jb-fg-tertiary); }

.activity-kpi-sparkline {
    overflow: hidden;
    border-radius: var(--radius-sm);
    margin-top: auto;
    opacity: 0.7;
    transition: opacity var(--duration-fast) var(--ease-out);
}
.activity-kpi-card:hover .activity-kpi-sparkline { opacity: 1; }

.activity-kpi-sparkline canvas {
    width: 100%;
    height: 48px;
    display: block;
}

.activity-kpi-label {
    font-size: 12px;
    color: var(--jb-fg-secondary);
    margin-bottom: var(--jb-sp-1);
}


/* KPI Detail Modal */
.kpi-detail-value { font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-primary); line-height: 1.2; }
.kpi-detail-delta { display: inline-block; margin-left: var(--jb-sp-2); vertical-align: middle; }
.kpi-detail-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--jb-sp-3); margin-top: var(--jb-sp-4); }
.kpi-detail-stat { text-align: center; padding: var(--jb-sp-2); background: var(--bg-surface); border-radius: var(--radius-md); }
.kpi-detail-stat-value { font-size: 18px; font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.kpi-detail-stat-label { font-size: 11px; color: var(--text-tertiary); margin-top: var(--jb-sp-1); }
.kpi-detail-bars { margin-top: var(--jb-sp-4); display: flex; flex-direction: column; gap: var(--jb-sp-2); }
.kpi-detail-bar-row { display: flex; align-items: center; gap: var(--jb-sp-2); font-size: 13px; }
.kpi-detail-bar-label { width: var(--jb-sp-7); color: var(--text-secondary); font-weight: 500; flex-shrink: 0; }
.kpi-detail-bar-track { flex: 1; height: 6px; background: var(--bg-surface); border-radius: var(--radius-sm); overflow: hidden; }
.kpi-detail-bar-fill { height: 100%; border-radius: var(--radius-sm); transition: width var(--duration-slow) var(--ease-out); }
.kpi-detail-bar-value { width: var(--jb-sp-6); text-align: right; font-variant-numeric: tabular-nums; color: var(--text-primary); font-weight: 600; }
.kpi-detail-description { font-size: 13px; color: var(--text-tertiary); font-style: italic; margin-top: var(--jb-sp-3); }
.kpi-detail-sparkline { margin-top: var(--jb-sp-4); }
.kpi-detail-sparkline canvas { width: 100%; height: 120px; display: block; border-radius: var(--radius-sm); }

@media (max-width: 768px) {
    .insights-top-row { grid-template-columns: 1fr; }
    .wv-chart-card-hero .wv-chart-card-body { height: 280px; }
    .wv-tier-impact-row { grid-template-columns: 1fr; }
    .wv-charts-grid-3 { grid-template-columns: 1fr; }    .activity-kpi-value {
        font-size: 20px;
    }
}

#voter-insights-container {
    margin-bottom: var(--jb-sp-3);
}
#voter-insights-container .activity-insights-body { padding-bottom: var(--jb-sp-1); }
.voter-insights-row {
    display: flex;
    gap: var(--jb-sp-4);
    padding: var(--jb-sp-4);
}
.voter-insights-kpi {
    flex: 1 1 50%;
    min-width: 0;
}
.voter-insights-composition {
    flex: 1 1 50%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--jb-sp-4) 20px;
}
.voter-composition-bars {
    display: flex;
    flex-direction: column;
    gap: var(--jb-sp-2);
    justify-content: center;
    flex: 1;
}
@media (max-width: 768px) {
    .voter-insights-row { flex-direction: column; }
}

/* Team activity badge */
.activity-team-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: var(--jb-sp-1) var(--jb-sp-2); border-radius: var(--radius-sm); background: rgba(139, 92, 246, 0.15); color: var(--accent); vertical-align: middle; margin-right: var(--jb-sp-1); }
.activity-badge-team .activity-icon { fill: var(--badge-team); }

.toast-undo-btn {
    display: inline-block;
    margin-top: var(--jb-sp-2);
    padding: 0.35rem 0.85rem;
    background: var(--info-muted);
    border: 1px solid rgba(6, 182, 212, 0.4);
    border-radius: var(--radius-md);
    color: var(--info);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
    font-family: inherit;
}
.toast-undo-btn:hover { background: rgba(6, 182, 212, 0.25); border-color: rgba(6, 182, 212, 0.6); }

.move-popover {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: var(--jb-sp-1);
    background: var(--solid-bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    min-width: 160px;
    box-shadow: var(--shadow-md);
    z-index: var(--jb-z-popover);
    overflow: hidden;
}

.move-popover-option {
    display: block;
    width: 100%;
    padding: 0.6rem var(--jb-sp-4);
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
    font-family: inherit;
}

.move-popover-option:hover:not(.current-column) { background: var(--accent-muted); color: var(--accent); }
.move-popover-option.current-column { color: var(--text-secondary); opacity: 0.5; cursor: not-allowed; }

.merge-explanation { padding: var(--jb-sp-3) var(--jb-sp-4); color: var(--text-secondary); font-size: 0.85rem; line-height: 1.5; background: var(--accent-subtle); border-radius: var(--radius-md); border: 1px solid var(--border); }
.merge-explanation p { margin: 0 0 0.4rem 0; }
.merge-explanation p:last-child { margin-bottom: 0; }
.merge-explanation strong { color: var(--text-primary); }

.merge-source-info { padding: var(--jb-sp-4); margin-bottom: var(--jb-sp-2); border-bottom: 1px solid var(--border); border-left: 4px solid var(--error); background: rgba(239,68,68,0.04); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.merge-source-label { font-size: 0.7rem; color: var(--error); margin-bottom: var(--jb-sp-1); }
.merge-source-heading { font-size: 1.05rem; font-weight: 600; color: var(--text-primary); }
.merge-source-votes { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.15rem; }

.merge-target-list { max-height: 240px; overflow-y: auto; margin-top: var(--jb-sp-2); border-radius: var(--radius-lg); border: 1px solid var(--border); }

.merge-target-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem var(--jb-sp-3);
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background var(--duration-xfast);
}

.merge-target-item:last-child { border-bottom: none; }
.merge-target-item:hover { background: var(--bg-card); }
.merge-target-item.selected { background: var(--accent-muted); border-left: 3px solid var(--accent); }

.merge-target-heading { font-size: 0.9rem; color: var(--text-primary); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: var(--jb-sp-3); }
.merge-target-type { display: block; font-size: 12px; color: var(--text-secondary); }
.merge-target-empty { padding: var(--jb-sp-5); text-align: center; color: var(--text-secondary); font-size: 0.9rem; }

.bulk-checkbox {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    margin-bottom: var(--jb-sp-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--input-bg);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: border-color var(--duration-fast) cubic-bezier(0.4, 0, 0.2, 1), background var(--duration-fast) cubic-bezier(0.4, 0, 0.2, 1), box-shadow var(--duration-fast) cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 !important;
}

.bulk-checkbox::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3.5px;
    height: 6px;
    border: solid var(--jb-fg-on-accent);
    border-width: 0 1.5px 1.5px 0;
    transform: translate(-50%, -60%) rotate(45deg) scale(0);
    transition: transform var(--duration-xfast) cubic-bezier(0.4, 0, 0.2, 1);
}

.bulk-checkbox:checked { background: var(--accent) !important; border-color: var(--accent) !important; box-shadow: 0 0 8px var(--accent-glow); }
.bulk-checkbox:checked::after { transform: translate(-50%, -60%) rotate(45deg) scale(1); }
.bulk-checkbox:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--input-focus-ring); }

.bulk-mode-card { cursor: pointer !important; }
.bulk-selected { border-color: var(--accent) !important; box-shadow: 0 0 0 2px var(--accent-glow) !important; background: var(--accent-muted) !important; }

.bulk-action-bar {
    position: fixed;
    bottom: var(--jb-sp-5);
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(calc(100% + var(--jb-sp-6)));
    background: rgba(15, 15, 25, 0.92);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: var(--jb-sp-2) var(--jb-sp-4);
    display: flex;
    align-items: center;
    gap: var(--jb-sp-2);
    z-index: 800;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 0 0 0.5px rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-lg);
    max-width: calc(100vw - var(--jb-sp-6));
    opacity: 0;
    pointer-events: none;
    transition: transform var(--duration-normal) var(--ease-out), opacity var(--duration-normal) var(--ease-out);
}

.bulk-action-bar.active { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }

[data-theme="light"] .bulk-action-bar {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(37, 99, 235, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), inset 0 0 0 0.5px rgba(37, 99, 235, 0.08);
}

.bulk-deselect-mobile { display: none; }

.bulk-count-label { font-size: 0.85rem; font-weight: 600; color: var(--accent); background: var(--accent-muted); padding: 0.3rem 0.65rem; border-radius: var(--radius-md); display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.bulk-count-label span { font-weight: 600; }

.bulk-action-bar .toolbar-select { padding: 0 var(--jb-sp-6) 0 var(--jb-sp-3); height: 34px; font-size: 0.85rem; flex-shrink: 1; min-width: 0; }

.bulk-action-bar .btn-primary,
.bulk-action-bar .btn-secondary,
.bulk-action-bar .btn-danger {
    padding: 0 var(--jb-sp-4);
    height: 34px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-md);
    white-space: nowrap;
}

.bulk-action-bar .btn-danger { margin-left: auto; }

.app-section { margin-bottom: var(--jb-sp-4); padding: var(--jb-sp-5); background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
.app-section:hover { border-color: var(--glass-border); box-shadow: 0 2px 12px var(--accent-subtle); }
.app-section:last-child {margin-bottom: 0;}
.app-section-title { font-size: 20px; font-weight: 600; margin-bottom: var(--jb-sp-1); display: flex; align-items: center; gap: 0.35rem; }
.section-icon { width: 16px; height: 16px; fill: currentColor; vertical-align: middle; margin-right: 0.4rem; flex-shrink: 0; padding: 6px; background: var(--accent-muted); border-radius: var(--radius-sm); box-sizing: content-box; color: var(--accent); }
.danger-zone .section-icon { background: var(--error-muted); color: var(--error); }

.member-count-badge { font-size: 12px; font-weight: 600; background: var(--accent-muted); color: var(--accent); padding: 0.1rem var(--jb-sp-2); border-radius: var(--radius-md); margin-left: 0.4rem; }

.app-section-description { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 20px; }

#tab-settings .checkbox-group { margin: 0 0 var(--jb-sp-4); padding: 0; background: none; border: none; }
#tab-settings .checkbox-group:hover { background: none; }
#tab-settings .checkbox-group label { font-size: 13px; font-weight: 400; color: var(--jb-fg); }
#tab-settings .checkbox-group .help-text-indent { color: var(--jb-fg-tertiary); opacity: 1; }
.app-section a { color: var(--accent); }
.app-section a.share-btn { color: inherit; text-decoration: none; }
.app-section a.share-btn-primary { color: var(--jb-fg-on-accent); }
.app-section a:hover { text-decoration: underline; }
.app-section a.share-btn:hover { text-decoration: none; }


/* No bottom margin: this page declares vertical space once, on the top of whatever needs it. */
.share-table { width: 100%; border-collapse: collapse; font-size: var(--jb-t-2); }
.share-table th {
    text-align: left;
    font-weight: var(--jb-w-medium);
    color: var(--jb-fg-tertiary);
    padding: var(--jb-sp-2) var(--jb-sp-3) var(--jb-sp-2) 0;
    border-bottom: 1px solid var(--jb-border);
}
.share-table td {
    padding: var(--jb-sp-2) var(--jb-sp-3) var(--jb-sp-2) 0;
    border-bottom: 1px solid var(--jb-border);
    color: var(--jb-fg-secondary);
    vertical-align: top;
    line-height: var(--jb-lh-ui);
}
.share-table td:first-child { color: var(--jb-fg); white-space: nowrap; }
/* The last column has nothing to separate and holds the row actions, so its gutter is zeroed. */
.share-table th:last-child,
.share-table td:last-child { padding-right: 0; }
/* No chip: a padded background puts a gap in front of every comma, and the mono face already says these are values. */
.share-table code { background: none; padding: 0; color: var(--jb-fg); }

@media (max-width: 768px) {
    .share-table td:first-child { white-space: normal; }
}

/* Tab badge counts */
.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 var(--jb-sp-1);
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    background: var(--accent-subtle);
    color: var(--accent);
    margin-left: var(--jb-sp-1);
    line-height: 1;
}
.tab-badge-pro {
    background: var(--jb-warning-bg);
    color: var(--warning);
}


/* Panel form styling */
.panel-form { padding: 0; }
.panel-form .checkbox-group { margin-top: var(--jb-sp-3); }

.section-actions { margin-top: var(--jb-sp-4); display: flex; gap: var(--jb-sp-2); align-items: center; flex-wrap: wrap; }
.section-actions-row { margin-top: var(--jb-sp-4); display: flex; gap: var(--jb-sp-2); flex-wrap: wrap; }

.help-text { margin-top: var(--jb-sp-2); font-size: 0.8rem; color: var(--text-secondary); }
.help-text-indent { margin: var(--jb-sp-1) 0 0 var(--jb-sp-5); font-size: 0.78rem; color: var(--text-secondary); opacity: 0.6; }
.checkbox-group .help-text-indent { margin-left: calc(20px + var(--jb-sp-3)); }

.subsection-heading { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: var(--jb-sp-2); margin-top: 0; }
.subsection-heading-spaced { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: var(--jb-sp-2); margin-top: var(--jb-sp-4); padding-top: var(--jb-sp-4); border-top: 1px solid var(--border); }

.input-disabled { opacity: 0.6; cursor: not-allowed; }
.link-button { text-decoration: none; text-align: center; }
.danger-text { color: var(--error); }
.code-inline { background: var(--bg-card); padding: 0.15rem 0.4rem; border-radius: var(--radius-sm); }

.unsaved-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; margin-left: 0.4rem; animation: unsaved-pulse 2s ease-in-out infinite; }

.invite-link-generator { display: flex; gap: var(--jb-sp-3); align-items: center; margin-bottom: 20px; }

/* The app's one button: 28 tall, 72 wide minimum, 8px radius, 13px normal, a background hover and the arrow cursor. */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--jb-sp-1);
    height: var(--jb-h-control);
    min-width: var(--jb-w-button-min);
    padding: 0 14px;
    background: var(--jb-bg-raised);
    border: 1px solid var(--jb-border-control);
    border-radius: var(--jb-r-md);
    color: var(--jb-fg);
    font-family: inherit;
    font-size: var(--jb-t-3);
    font-weight: var(--jb-w-normal);
    white-space: nowrap;
    cursor: default;
    transition: background-color var(--jb-dur-in) var(--jb-ease-in),
                border-color var(--jb-dur-in) var(--jb-ease-in),
                color var(--jb-dur-in) var(--jb-ease-in);
}
.share-btn svg { width: var(--jb-icon); height: var(--jb-icon); }
/* Wide enough for Copied, which this button says for two seconds, so the row does not move under the pointer. */
.share-copy-btn { min-width: 80px; }
a.share-btn { text-decoration: none; }
/* The hover and pressed tokens are alpha overlays, layered as a gradient over the fill rather than replacing it. */
.share-btn:hover {
    background: linear-gradient(var(--jb-bg-hover), var(--jb-bg-hover)), var(--jb-bg-raised);
    border-color: var(--jb-border-raised);
}
.share-btn:active {
    background: linear-gradient(var(--jb-bg-pressed), var(--jb-bg-pressed)), var(--jb-bg-raised);
}
.share-btn:focus-visible {
    outline: 2px solid var(--jb-focus);
    outline-offset: -1px;
}
/* Disabled is a colour, never a veil. */
.share-btn:disabled,
.share-btn[aria-disabled="true"] {
    background: transparent;
    border-color: var(--jb-border);
    color: var(--jb-fg-disabled);
    opacity: 1;
}
.share-btn-primary {
    background: var(--jb-accent);
    border-color: var(--jb-accent);
    color: var(--jb-fg-on-accent);
}
.share-btn-primary:hover:not(:disabled) {
    background: var(--jb-accent-hover);
    border-color: var(--jb-accent-hover);
}
.share-btn-secondary {
    background: var(--jb-bg-raised);
    border-color: var(--jb-border-control);
    color: var(--jb-fg);
}

.share-btn.saving { pointer-events: none; opacity: 0.7; }
.share-btn.saving::after {
    content: '';
    width: 14px; height: 14px;
    border: 2px solid var(--jb-border);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
    margin-left: var(--jb-sp-2);
    flex-shrink: 0;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

.share-btn-danger {
    background: transparent;
    border-color: var(--jb-error);
    color: var(--jb-error);
}
/* :not(:disabled) is load bearing: this rule ties the disabled one on specificity and is declared after it. */
.share-btn-danger:hover:not(:disabled) {
    background: var(--jb-error);
    border-color: var(--jb-error);
    color: var(--jb-fg-on-accent);
}
.share-btn-danger:active:not(:disabled) {
    background: var(--jb-error-solid);
    border-color: var(--jb-error-solid);
    color: var(--jb-fg-on-accent);
}
/* The dense variant, for a button inside a row rather than beside a field. */
.share-btn-sm {
    height: var(--jb-h-dense);
    min-width: 0;
    padding: 0 var(--jb-sp-2);
    font-size: var(--jb-t-2);
}

.invite-link-card { display: flex; flex-direction: column; gap: var(--jb-sp-2); padding: var(--jb-sp-4); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-card); transition: border-color var(--duration-xfast); animation: enter-fade-up var(--duration-fast) var(--ease-out) both; }
.invite-link-card:nth-child(1) { animation-delay: 0s; }
.invite-link-card:nth-child(2) { animation-delay: 0.03s; }
.invite-link-card:nth-child(3) { animation-delay: 0.06s; }
.invite-link-card:nth-child(4) { animation-delay: 0.09s; }
.invite-link-card:nth-child(5) { animation-delay: 0.12s; }
.invite-link-card:nth-child(6) { animation-delay: 0.15s; }
.invite-link-card:nth-child(7) { animation-delay: 0.18s; }
.invite-link-card:nth-child(8) { animation-delay: 0.21s; }
.copy-link-btn { width: 30px; height: 30px; padding: 0; background: none; border: 1px solid var(--border); border-radius: var(--radius-md); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; color: var(--text-secondary); }
.copy-link-btn:hover { background: var(--accent-muted); }
.copy-link-btn .check-icon { display: none; }
.copy-link-btn.copied .copy-icon { display: none; }
.copy-link-btn.copied .check-icon { display: inline; }
.copy-link-btn.copied { border-color: var(--success); background: var(--success-muted); }
.invite-link-url-row { display: flex; gap: var(--jb-sp-2); align-items: center; }
.invite-link-url { flex: 1; background: rgba(0, 0, 0, 0.03); border-radius: var(--radius-md); padding: 0.4rem var(--jb-sp-3); color: var(--text-primary); font-size: 0.85rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all; }
.invite-link-meta { display: flex; align-items: center; gap: var(--jb-sp-3); font-size: 0.8rem; }
.invite-link-date { color: var(--text-secondary); }
.revoke-link-btn { height: 30px; padding: 0 var(--jb-sp-2); border-radius: var(--radius-md); font-size: 0.8rem; flex-shrink: 0; }
.revoke-link-btn:hover { background: var(--error-muted); color: var(--error); }

.role-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: var(--radius-md); font-size: 12px; font-weight: 600; text-transform: capitalize; }
.role-owner { background: rgba(210, 153, 34, 0.15); color: var(--warning); }
.role-editor { background: var(--accent-muted); color: var(--accent); }
.role-viewer { background: rgba(139, 148, 158, 0.15); color: var(--text-secondary); }

.member-card { display: flex; align-items: center; justify-content: space-between; gap: var(--jb-sp-4); padding: var(--jb-sp-4); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-card); transition: border-color var(--duration-xfast), transform var(--duration-xfast), box-shadow var(--duration-xfast); animation: enter-fade-up var(--duration-fast) var(--ease-out) both; }
.member-card:hover { transform: translateY(-1px); border-color: var(--accent); box-shadow: 0 2px 8px var(--accent-glow); }
.member-card:nth-child(1) { animation-delay: 0s; }
.member-card:nth-child(2) { animation-delay: 0.03s; }
.member-card:nth-child(3) { animation-delay: 0.06s; }
.member-card:nth-child(4) { animation-delay: 0.09s; }
.member-card:nth-child(5) { animation-delay: 0.12s; }
.member-card:nth-child(6) { animation-delay: 0.15s; }
.member-card:nth-child(7) { animation-delay: 0.18s; }
.member-card:nth-child(8) { animation-delay: 0.21s; }
.member-card-left { display: flex; align-items: center; gap: var(--jb-sp-3); flex: 1; min-width: 0; }
.member-avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; line-height: 1; font-weight: 600; color: var(--jb-fg-on-accent); flex-shrink: 0; }
.member-you-badge { font-size: 0.65rem; font-weight: 600; color: var(--accent); background: var(--accent-muted); padding: 0.1rem 0.4rem; border-radius: var(--radius-sm); margin-left: 0.35rem; }
.member-info { flex: 1; min-width: 0; }
.member-name { font-weight: 600; font-size: 0.95rem; }
.member-email { color: var(--text-secondary); font-size: 0.85rem; }
.member-meta { font-size: 0.8rem; color: var(--text-secondary); margin-top: var(--jb-sp-1); }
.member-actions { display: flex; align-items: center; gap: var(--jb-sp-2); flex-shrink: 0; }
.member-role-select { min-width: 100px; }
.share-empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--jb-sp-6) var(--jb-sp-4); border: 1px dashed var(--border); border-radius: var(--radius-md); color: var(--text-secondary); font-size: 0.9rem; gap: var(--jb-sp-2); }
.share-empty-state-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--accent-muted); border-radius: var(--radius-md); color: var(--accent); margin-bottom: var(--jb-sp-1); }
.share-empty-state-icon svg { width: 18px; height: 18px; }
.share-empty-state-title { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }
.share-empty-state-desc { font-size: 0.8rem; color: var(--text-secondary); max-width: 280px; }

/* API keys. The wh- prefix is left from the webhook interface this list was built on. */
.dl-card-header { display: flex; align-items: center; justify-content: space-between; gap: var(--jb-sp-2); margin-bottom: var(--jb-sp-2); }
.dl-card-event { font-family: monospace; font-size: 13px; color: var(--text-primary); }
.dl-card-detail { overflow: hidden; transition: max-height var(--duration-fast) cubic-bezier(0.2, 0, 0, 1), padding var(--duration-fast) cubic-bezier(0.2, 0, 0, 1); }
.dl-card-detail pre { margin: var(--jb-sp-1) 0 var(--jb-sp-3); font-size: 13px; white-space: pre-wrap; word-break: break-all; color: var(--text-secondary); }

/* Tier card - display mode (redesigned) */
.voting-tier-action-btn.delete:hover { color: var(--error); }

/* Tier card - edit mode (expand-in-place) */
.voting-tier-edit-panel.open { grid-template-rows: 1fr; }
.voting-tier-edit-panel.open .voting-tier-edit-panel-inner { animation: collapsible-fade-in 0.15s cubic-bezier(0.2, 0, 0, 1) 40ms both; }
.voting-tier-multiplier-wrap .tier-multiplier-input::-webkit-inner-spin-button,
.wv-impact-cell-value.positive { color: var(--success); }
.wv-impact-cell-value.negative { color: var(--error); }

/* Add-tier collapsible panel */
.add-tier-trigger { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: var(--jb-sp-2); padding: var(--jb-sp-2) var(--jb-sp-4); border: 2px dashed var(--border); border-radius: var(--radius-md); color: var(--text-tertiary); font-size: 13px; font-weight: 600; background: none; transition: border-color var(--duration-fast), color var(--duration-fast), background var(--duration-fast); }
.add-tier-trigger:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-subtle); }
.add-tier-trigger::-webkit-details-marker { display: none; }
.add-tier-trigger svg { width: 14px; height: 14px; fill: currentColor; }
.add-tier-panel[open].closing > .collapsible-content { grid-template-rows: 0fr; visibility: hidden; }
.add-tier-panel[open].closing .collapsible-inner { animation: collapsible-fade-out 0.12s ease both; padding: 0; }
.tier-color-picker-row { display: flex; align-items: center; gap: var(--jb-sp-2); }
.tier-color-picker-row .help-text { margin: 0; }
.tier-color-swatch { width: 28px; height: 28px; border-radius: var(--radius-md); border: 2px solid var(--border); flex-shrink: 0; cursor: pointer; transition: border-color var(--duration-xfast); }
.tier-color-swatch:hover { border-color: var(--text-secondary); }
.tier-color-input { width: 0; height: 0; padding: 0; border: 0; opacity: 0; position: absolute; pointer-events: none; }
.tier-input-with-suffix { position: relative; display: flex; align-items: center; }
.tier-input-with-suffix .app-text-input { padding-right: var(--jb-sp-6); width: 100%; }
.tier-input-with-suffix input[type="number"]::-webkit-inner-spin-button,
.tier-input-with-suffix input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tier-input-with-suffix input[type="number"] { -moz-appearance: textfield; }
.tier-input-suffix { position: absolute; right: var(--jb-sp-2); font-size: var(--jb-t-2); font-weight: 600; color: var(--jb-fg-tertiary); pointer-events: none; }

/* Weighted Voting Page */
.wv-charts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--jb-sp-5); margin-bottom: 0; }
.activity-insights-body .wv-charts-grid { padding: var(--jb-sp-3) var(--jb-sp-4) var(--jb-sp-4); }
.wv-chart-card { display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--jb-sp-3); overflow: hidden; transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
.wv-chart-card:hover { border-color: var(--accent); box-shadow: 0 4px 20px var(--accent-glow); }
.wv-chart-card-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin: 0 0 var(--jb-sp-2) 0; }
.wv-chart-card-body { height: 250px; position: relative; }
@keyframes chartFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.wv-chart-card { animation: chartFadeIn 0.4s ease-out both; }
.wv-chart-card:nth-child(1) { animation-delay: 0s; }
.wv-chart-card:nth-child(2) { animation-delay: 0.1s; }
.wv-chart-card:nth-child(3) { animation-delay: 0.2s; }
.wv-chart-card:nth-child(4) { animation-delay: 0.3s; }
.wv-chart-card-body-auto { height: auto; min-height: 60px; flex: 1; }


/* Hero chart section */
.wv-chart-card-hero .wv-chart-card-body { height: 380px; }
.wv-chart-card-subtitle { font-size: 12px; color: var(--text-tertiary); margin: calc(-1 * var(--jb-sp-2)) 0 var(--jb-sp-3) 0; }


/* Priority Cards */
.wv-priority-bar { height: 100%; border-radius: var(--jb-r-sm); transition: width var(--duration-slow) var(--ease-out); background: linear-gradient(90deg, var(--accent), var(--accent-hover)); }
.wv-priority-bar[data-rank="1"] { background: linear-gradient(90deg, var(--accent), var(--jb-blue-90)); }
.wv-priority-bar[data-rank="2"] { background: linear-gradient(90deg, var(--jb-green-90), var(--jb-green-110)); }
.wv-priority-bar[data-rank="3"] { background: linear-gradient(90deg, var(--jb-yellow-110), var(--jb-yellow-120)); }


/* MRR badge + input on tier cards */
.voting-tier-mrr-prefix, .voting-tier-mrr-suffix { font-size: 12px; font-weight: 600; color: var(--text-tertiary); padding: var(--jb-sp-1) var(--jb-sp-2); background: var(--bg-elevated); white-space: nowrap; display: flex; align-items: center; line-height: 1; border-right: 1px solid var(--border); }

/* Voter card layout */
.wv-voter-mrr-prefix, .wv-voter-mrr-suffix { font-size: 12px; font-weight: 600; color: var(--text-tertiary); padding: var(--jb-sp-1) var(--jb-sp-2); background: var(--bg-elevated); white-space: nowrap; display: flex; align-items: center; line-height: 1; }
.wv-voter-mrr-prefix { border-right: 1px solid var(--border); }

/* Revenue Comparison */
.wv-rc-delta.positive { color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); }
.wv-rc-delta.negative { color: var(--error); background: color-mix(in srgb, var(--error) 12%, transparent); }


/* Value Score HTML stacked bars */
.vs-filter-bar { display: flex; gap: var(--jb-sp-1); padding-bottom: var(--jb-sp-2); border-bottom: 1px solid var(--border-subtle); margin-bottom: var(--jb-sp-2); }
.vs-filter-active { background: color-mix(in srgb, var(--accent) 15%, transparent); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.vs-list { display: flex; flex-direction: column; gap: var(--jb-sp-2); }
.vs-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--jb-sp-2) var(--jb-sp-2); transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
.vs-item:hover { border-color: var(--glass-border); box-shadow: 0 2px 8px var(--accent-glow); }
.vs-item-highlight { border-color: var(--accent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); }
.vs-item-highlight:hover { border-color: var(--accent); box-shadow: 0 2px 12px var(--accent-glow); }
.vs-item-header { display: flex; align-items: baseline; gap: var(--jb-sp-2); margin-bottom: var(--jb-sp-1); flex-wrap: nowrap; }
.vs-item-rank { font-size: 12px; font-weight: 600; color: var(--text-tertiary); min-width: 18px; flex-shrink: 0; }
.vs-item-name { font-size: 12px; font-weight: 600; color: var(--text-primary); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-item-score { font-size: 12px; font-weight: 600; color: var(--success); font-variant-numeric: tabular-nums; flex-shrink: 0; white-space: nowrap; }
.vs-bar-track { display: flex; height: 18px; border-radius: var(--radius-sm); overflow: hidden; gap: 1px; margin-bottom: var(--jb-sp-1); }
.vs-bar-segment { display: flex; align-items: center; padding: 0 var(--jb-sp-1); min-width: 0; overflow: hidden; }
.vs-bar-label { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-top-segment { font-size: 11px; color: var(--text-tertiary); font-weight: 500; }


/* 3-column chart grid */
.wv-charts-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--jb-sp-3); padding: var(--jb-sp-2) var(--jb-sp-3) var(--jb-sp-3); }
.wv-charts-grid-3.wv-grid-2col { grid-template-columns: 1fr 1fr; }
.wv-charts-grid-3.wv-grid-stacked { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto 1fr; }
.wv-charts-grid-3.wv-grid-stacked .wv-chart-card-tall { grid-row: 1 / 4; }


/* The weighted voting tab is islands of hairline rows, like every other list in the app. */
.wv-stack { display: flex; flex-direction: column; gap: var(--jb-island-gap); }
.wv-panel {
    background: var(--jb-bg-island);
    border: 1px solid var(--jb-border-island);
    border-radius: var(--jb-r-panel);
    overflow: hidden;
}
.wv-panel-head { padding: var(--jb-sp-3) var(--jb-sp-4); }
.wv-panel-title { margin: 0; font-size: 13px; font-weight: 500; color: var(--jb-fg); }
.wv-panel-desc { margin: var(--jb-sp-1) 0 0; font-size: 12px; color: var(--jb-fg-secondary); }
.wv-panel-foot {
    display: flex;
    align-items: center;
    gap: var(--jb-sp-2);
    padding: var(--jb-sp-3) var(--jb-sp-4);
    border-top: 1px solid var(--jb-border-island);
}
.wv-panel-status { font-size: 12px; color: var(--jb-fg-secondary); }

.wv-row {
    display: flex;
    align-items: center;
    gap: var(--jb-sp-3);
    min-height: 44px;
    padding: var(--jb-sp-2) var(--jb-sp-4);
    border-top: 1px solid var(--jb-border-island);
    transition: background-color var(--jb-dur-in) ease-out;
}
.wv-row:hover { background: var(--jb-bg-hover); }
.wv-row.is-soon { opacity: 0.55; }
.wv-row-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.wv-row-logo { display: grid; place-items: center; width: 20px; height: 20px; flex-shrink: 0; color: var(--jb-fg-icon); }
.wv-row-logo svg { width: 20px; height: 20px; }
.wv-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--jb-sp-1); }
.wv-row-title { font-size: 13px; color: var(--jb-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wv-row-desc { font-size: 12px; color: var(--jb-fg-secondary); overflow: hidden; text-overflow: ellipsis; }
.wv-row-aside { display: flex; align-items: center; gap: var(--jb-sp-2); flex-shrink: 0; }
.wv-row-badge {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 var(--jb-sp-2);
    border-radius: var(--jb-r-sm);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}
.wv-row-badge-mult { color: var(--jb-fg); background: var(--jb-bg-inset); }
.wv-row-badge-mrr { color: var(--success); background: var(--success-muted); }
.wv-row-badge-soon { color: var(--jb-fg-tertiary); background: var(--jb-bg-inset); }
.wv-row-badge-on { color: var(--success); background: var(--success-muted); }
.wv-row-note { font-size: 12px; color: var(--jb-fg-secondary); white-space: nowrap; }
.wv-row-icon-btn {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: var(--jb-r-sm);
    font-size: 13px;
    color: var(--jb-fg-icon);
    cursor: default;
    transition: background-color var(--jb-dur-in) ease-out, color var(--jb-dur-in) ease-out;
}
.wv-row-icon-btn:hover { background: var(--jb-bg-hover); color: var(--jb-fg); }
.wv-row-icon-btn.tier-delete-btn:hover { color: var(--error); }
.wv-row-icon-btn svg { width: 14px; height: 14px; }
.wv-row-action {
    width: 100%;
    background: none;
    border: none;
    border-top: 1px solid var(--jb-border-island);
    text-align: left;
    color: var(--jb-fg-secondary);
    font-size: 13px;
    cursor: default;
}
.wv-row-action:hover { color: var(--jb-fg); }
.wv-row-action svg { width: 14px; height: 14px; }

/* Add tier button + drawer */


/* Light theme overrides */
[data-theme="light"] .add-tier-trigger { border-color: var(--border); }
[data-theme="light"] .add-tier-trigger:hover { border-color: var(--accent); }

/* ── SVG Donut Chart ── */
@keyframes donutDraw { from { stroke-dashoffset: 500; opacity: 0; } to { stroke-dashoffset: 0; opacity: 1; } }

/* ── Premium Ranked List, a row is a row ── */

/* ── Revenue Tier Breakdown ── */

/* ── Weight Efficiency Dual Bars ── */
.efficiency-bar-fill.raw { background: linear-gradient(90deg, rgba(148,163,184,0.35), rgba(148,163,184,0.75)); }
.efficiency-bar-fill.weighted { background: linear-gradient(90deg, rgba(59,130,246,0.45), rgba(59,130,246,0.85)); }
[data-theme="light"] .efficiency-bar-fill.raw { background: linear-gradient(90deg, rgba(100,116,139,0.4), rgba(100,116,139,0.8)); }
[data-theme="light"] .efficiency-bar-fill.weighted { background: linear-gradient(90deg, rgba(59,130,246,0.5), rgba(59,130,246,0.9)); }


/* ── Voter Composition stacked bar ── */

[data-theme="light"] .wv-chart-card { background: var(--bg-card); box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
[data-theme="light"] .wv-chart-card:hover { box-shadow: 0 4px 16px rgba(59,130,246,0.12); }

[data-theme="light"] .invite-link-url { background: rgba(0, 0, 0, 0.03); }
.wv-voter-cards { display: flex; flex-direction: column; gap: var(--space-3); }
.wv-voter-card { display: flex; align-items: center; gap: var(--jb-sp-3); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-card); padding: var(--jb-sp-3) var(--jb-sp-4); transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); animation: enter-fade-up var(--duration-fast) var(--ease-out) both; }
.wv-voter-card:hover { border-color: var(--accent); box-shadow: 0 2px 8px var(--accent-glow); }
.wv-voter-card-left { flex: 1; min-width: 0; display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: var(--jb-sp-2); }
.wv-voter-card-name { font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wv-voter-card-meta { display: flex; align-items: center; gap: var(--jb-sp-2); font-size: 12px; color: var(--text-tertiary); }
.wv-voter-card-right { display: flex; align-items: center; gap: var(--jb-sp-2); flex-shrink: 0; }
.wv-voter-card-votes { font-size: 12px; font-weight: 600; color: var(--text-secondary); padding: var(--jb-sp-1) var(--jb-sp-2); background: var(--bg-surface); border-radius: var(--radius-md); white-space: nowrap; }
.wv-voter-card .wv-tier-select { max-width: 140px; min-width: 100px; height: auto; padding: var(--jb-sp-1) var(--jb-sp-6) var(--jb-sp-1) var(--jb-sp-2); font-size: 12px; border-radius: var(--radius-md); }
.wv-tier-select { width: 100%; padding: var(--jb-sp-1) var(--jb-sp-2); font-size: 13px; }
.wv-voter-card-checkbox,
.wv-voter-card-checkbox::after,
.wv-voter-card-checkbox:checked,
.wv-voter-card-checkbox:checked::after,
.wv-voter-card-checkbox:hover,
.wv-voter-card.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--bg-card)); }
@keyframes bulkBarSlideUp { from { opacity: 0; transform: translateX(-50%) translateY(var(--jb-sp-4)); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.wv-bulk-mrr-wrap .wv-voter-mrr-prefix,
.wv-bulk-mrr-wrap .wv-voter-mrr-suffix { background: var(--bg-base); padding: 0 var(--jb-sp-2); }
[data-theme="light"] .wv-voter-card.selected { background: color-mix(in srgb, var(--accent) 8%, var(--bg-card)); }
.pagination { display: flex; align-items: center; justify-content: center; gap: var(--jb-sp-4); padding: var(--jb-sp-4) 0; }

/* A well sunk into the card, which is what this system calls an inset. */
.share-code-block {
    position: relative;
    background: var(--jb-bg-inset);
    border: 1px solid var(--jb-border-control);
    border-radius: var(--jb-r-md);
    margin-bottom: var(--jb-sp-4);
}
.share-code-block pre {
    padding: var(--jb-sp-3);
    margin: 0;
    overflow-x: auto;
    font-family: var(--jb-font-mono);
    font-size: var(--jb-t-2);
    line-height: var(--jb-lh-prose);
    color: var(--jb-fg);
    /* A code block scrolls rather than wraps, or a URL breaks mid word and stops looking like an address. */
    white-space: pre;
}
/* The app's icon button: nothing until the pointer arrives, rather than a near white chip sitting on the code. */
.share-code-block .copy-btn {
    position: absolute;
    top: var(--jb-sp-2);
    right: var(--jb-sp-2);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--jb-h-control);
    height: var(--jb-h-control);
    padding: 0;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--jb-r-md);
    color: var(--jb-fg-secondary);
    cursor: default;
}
.share-code-block .copy-btn:hover { background: var(--jb-bg-hover); color: var(--jb-fg); }
.share-code-block .copy-btn:active { background: var(--jb-bg-pressed); }


.color-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--jb-sp-4); }
.color-picker-item label { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.35rem; }
.color-input-wrapper { display: flex; align-items: center; gap: var(--jb-sp-2); }
.color-input-wrapper input[type="color"] { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 2px; background: transparent; cursor: pointer; flex-shrink: 0; }
.color-text-input { flex: 1; background: var(--input-bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0.4rem var(--jb-sp-3); color: var(--text-primary); font-size: 0.85rem; font-family: monospace; min-width: 0; }
.field-reset-btn { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-secondary); cursor: pointer; opacity: 0.6; flex-shrink: 0; padding: 0; transition: opacity var(--duration-xfast), color var(--duration-xfast), border-color var(--duration-xfast); }
.field-reset-btn:hover { opacity: 1; color: var(--accent); border-color: var(--accent); }
@keyframes reset-spin { to { transform: rotate(-360deg); } }
.field-reset-btn.resetting svg { animation: reset-spin 0.4s ease; }

.appearance-target-bar { display: flex; gap: var(--jb-sp-2); flex-wrap: wrap; margin-top: var(--jb-sp-4); margin-bottom: var(--jb-sp-4); }
.appearance-target-pill { padding: 0.4rem var(--jb-sp-4); border-radius: var(--radius-md); border: 1px solid var(--border); background: transparent; color: var(--text-secondary); font-size: 0.85rem; cursor: pointer; transition: border-color 0.12s var(--ease-out), color 0.12s var(--ease-out), background-color 0.12s var(--ease-out); }
.appearance-target-pill:hover { border-color: var(--accent); color: var(--text-primary); }
.appearance-target-pill.active { background: var(--accent); border-color: var(--accent); color: var(--jb-fg-on-accent); }

.appearance-preview { margin-top: 20px; }
.appearance-preview-label { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: var(--jb-sp-2); }
.preview-container { padding: var(--jb-sp-5); border-radius: var(--radius-md); border: 1px solid var(--border); display: flex; justify-content: center; }
.preview-card { max-width: 360px; width: 100%; padding: var(--jb-sp-4); transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
.preview-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.preview-card-title { font-size: 0.95rem; font-weight: 600; margin: 0 0 0.4rem 0; }
.preview-card-description { font-size: 0.8rem; margin: 0 0 var(--jb-sp-3) 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.preview-card-tags { display: flex; gap: 0.4rem; margin-bottom: var(--jb-sp-3); }
.preview-tag { font-size: 0.7rem; padding: 0.2rem var(--jb-sp-2); border-radius: var(--radius-sm); font-weight: 500; }
.preview-card-meta { display: flex; align-items: center; justify-content: space-between; padding-top: 0.6rem; }
.preview-vote-btn { display: flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; font-weight: 600; }
.preview-meta-stats { display: flex; align-items: center; gap: var(--jb-sp-3); }
.preview-meta-item { display: flex; align-items: center; gap: var(--jb-sp-1); font-size: 0.8rem; }

.activity-summary-item.voter-type-registered.active { border-color: var(--success); background: var(--success-muted); color: var(--success); }
.activity-summary-item.voter-type-anonymous.active { border-color: var(--warning); background: var(--warning-muted); color: var(--warning); }
.activity-summary-item.voter-type-api.active { border-color: var(--badge-comment); background: var(--badge-comment-bg); color: var(--badge-comment); }

/* A voter row is the activity row with different content, so only the parts unique to a voter live here. */
/* The name hugs its text so the address sits beside it, and the engagement summary takes the slack. */
.voter-row .activity-item-title { flex: 0 1 auto; }
.voter-email { font-size: 12px; color: var(--jb-fg-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.voter-row-meta { flex: 1 1 auto; text-align: right; font-size: 12px; color: var(--jb-fg-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voter-mrr-badge { background: var(--success-muted); color: var(--success); }
.voter-type-badge.voter-type-registered { background: var(--success-muted); color: var(--success); }
.voter-type-badge.voter-type-anonymous { background: var(--warning-muted); color: var(--warning); }
.voter-type-badge.voter-type-api { background: var(--badge-comment-bg); color: var(--badge-comment); }
.voter-lifecycle-badge.voter-lifecycle-active { background: var(--info-muted, rgba(59,130,246,0.12)); color: var(--info); }
.voter-lifecycle-badge.voter-lifecycle-churned { background: var(--error-muted); color: var(--error); }
.voter-lifecycle-badge.voter-lifecycle-expanding { background: var(--success-muted); color: var(--success); }
.voter-ban-badge { background: var(--error-muted); color: var(--error); }
.voter-tier-badge { background: var(--accent-muted); color: var(--accent); display: inline-flex; align-items: center; }
.voter-tier-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; flex-shrink: 0; }

/* Detail panel meta — uniform badge height */
#voter-detail-panel .detail-panel-meta .voter-type-badge {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    padding: var(--jb-sp-1) var(--jb-sp-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs, 12px);
    font-weight: 600;
}

/* Filter popover — range row */
.filter-popover-range-row { display: flex; align-items: center; gap: var(--jb-sp-1); }
.filter-range-input { flex: 1; min-width: 0; height: 32px; padding: 0 var(--jb-sp-2); font-size: 13px; font-family: inherit; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--input-bg); color: var(--text-primary); text-align: center; }
.filter-range-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-muted); }
.filter-range-input::placeholder { color: var(--text-tertiary); }
.filter-range-sep { font-size: 12px; color: var(--text-tertiary); }
.filter-range-input[type="date"] { text-align: left; padding: 0 var(--jb-sp-1); font-size: 13px; }

/* Voter tier list, a row is a row */
.voter-tier-list { border: 1px solid var(--jb-border-island); border-radius: var(--jb-r-md); overflow: hidden; }
.voter-tier-row {
    display: flex; align-items: center; gap: var(--jb-sp-3);
    min-height: 44px; padding: var(--jb-sp-2) var(--jb-sp-4);
    transition: background-color var(--jb-dur-in) ease-out;
}
.voter-tier-row + .voter-tier-row { border-top: 1px solid var(--jb-border-island); }
.voter-tier-row:hover { background: var(--jb-bg-hover); }
.voter-tier-row.selected { background: var(--jb-bg-selected-muted); }
.voter-tier-row-none .voter-tier-row-name { color: var(--text-tertiary); }
.voter-tier-row-check {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid var(--border); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: border-color var(--duration-xfast);
}
.voter-tier-row.selected .voter-tier-row-check { border-color: var(--accent); }
.voter-tier-row-check-inner {
    width: 8px; height: 8px; border-radius: 50%;
    background: transparent; transition: background var(--duration-xfast);
}
.voter-tier-row.selected .voter-tier-row-check-inner { background: var(--accent); }
.voter-tier-row-body { flex: 1; min-width: 0; }
.voter-tier-row-name { font-size: 13px; color: var(--jb-fg); }
.voter-tier-row-desc { font-size: 12px; color: var(--jb-fg-secondary); margin-top: var(--jb-sp-1); }
.voter-tier-row-badges { display: flex; align-items: center; gap: var(--jb-sp-1); flex-shrink: 0; }
.voter-tier-row-badge {
    display: inline-flex; align-items: center; height: 20px;
    padding: 0 var(--jb-sp-2);
    font-size: 11px; font-weight: 500;
    border-radius: var(--jb-r-sm); white-space: nowrap;
}
.voter-tier-row-badge.badge-multiplier { background: var(--accent-muted); color: var(--accent); }
.voter-tier-row-badge.badge-mrr { background: var(--success-muted); color: var(--success); }


.voter-panel-save-row { display: flex; align-items: center; gap: var(--jb-sp-3); margin-top: var(--jb-sp-2); }
#voter-churn-btn { display: inline-flex; align-items: center; gap: var(--jb-sp-1); }
.voter-profile-status { font-size: 13px; color: var(--success); }


.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-3); }

.theme-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: visible; display: flex; flex-direction: column; transition: transform var(--duration-fast), box-shadow var(--duration-fast), border-color var(--duration-fast); }
.theme-card:hover { transform: translateY(-1px); border-color: var(--accent); box-shadow: 0 2px 8px var(--accent-glow); }
.theme-preview { height: 100px; padding: 16px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.theme-preview-card { padding: 10px 14px; width: 80%; max-width: 200px; }
.theme-card-body { padding: var(--jb-sp-3) var(--jb-sp-4) var(--jb-sp-4); display: flex; flex-direction: column; gap: var(--jb-sp-1); flex: 1; }
.theme-card-header { display: flex; align-items: center; justify-content: space-between; gap: var(--jb-sp-2); }
.theme-card-name { font-size: 16px; font-weight: 600; color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-card-description { font-size: 13px; color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-card-author { font-size: 12px; color: inherit; }
.theme-category-badge { font-size: 11px; padding: var(--jb-sp-1) var(--jb-sp-2); border-radius: var(--radius-full); background: var(--accent-muted); color: inherit; white-space: nowrap; text-transform: capitalize; }
.theme-card-meta { display: flex; gap: var(--jb-sp-3); align-items: center; margin-top: var(--jb-sp-1); }
.theme-card-stat { display: flex; align-items: center; gap: var(--jb-sp-1); font-size: 12px; color: inherit; }

.theme-card-actions { display: flex; gap: var(--jb-sp-1); margin-top: var(--jb-sp-2); flex-wrap: wrap; }
.theme-action-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-md); border: 1px solid var(--border); background: transparent; color: inherit; cursor: pointer; transition: background var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast); text-decoration: none; }
.theme-action-btn:hover { background: var(--accent-muted); color: var(--accent); border-color: var(--accent); }
.theme-action-btn-danger:hover { background: var(--error-muted); color: var(--error); border-color: var(--error); }
.like-btn-active { color: var(--jb-red-90); border-color: var(--jb-red-90); }
.like-btn-active:hover { color: var(--jb-red-90); border-color: var(--jb-red-90); background: rgba(255, 77, 106, 0.1); }

.apply-dropdown-panel { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: 0 4px 16px rgba(0,0,0,0.25); padding: var(--jb-sp-1) 0; display: none; z-index: 20; min-width: 170px; }
.apply-dropdown-panel.active { display: block; }
.apply-dropdown-item { display: block; width: 100%; padding: var(--jb-sp-2) var(--jb-sp-3); background: none; border: none; color: var(--text-primary); font-size: 13px; font-family: inherit; cursor: pointer; text-align: left; white-space: nowrap; transition: background var(--duration-fast), color var(--duration-fast); }
.apply-dropdown-item:hover { background: var(--accent-muted); color: var(--accent); }

.theme-skeleton-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }

.app-form-group { margin-bottom: 20px; }
.app-form-group label { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.4rem; }
.app-text-input { width: 100%; padding: var(--jb-sp-2) var(--jb-sp-3); background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-primary); font-size: 0.9rem; font-family: inherit; transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
.app-text-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--input-focus-ring); background: var(--input-focus-bg); }
.settings-textarea { width: 100%; padding: var(--jb-sp-2) var(--jb-sp-3); background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-primary); font-size: 0.9rem; font-family: inherit; resize: vertical; min-height: 60px; transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
.settings-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--input-focus-ring); background: var(--input-focus-bg); }
.app-form-group-spaced { margin-top: var(--jb-sp-5); }
.field-error { margin-top: var(--jb-sp-2); font-size: 0.8rem; color: var(--error); }
/* Checkbox rows that apply only while their parent is checked, indented under the parent's text rather than its box. */
.checkbox-subgroup { margin: var(--jb-sp-1) 0 var(--jb-sp-2) 28px; }
.appearance-preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--jb-sp-4); }
.preview-mode-label { margin-bottom: 0.4rem; font-size: 12px; color: var(--text-secondary); text-align: center; }


.export-buttons { display: flex; gap: var(--jb-sp-2); flex-wrap: wrap; }

.billing-plan-card { display: flex; align-items: center; gap: var(--jb-sp-4); padding: var(--jb-sp-4); background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); }
.billing-plan-details { flex: 1; min-width: 0; }
.billing-plan-name { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); }
.billing-plan-desc { font-size: 0.8rem; color: var(--text-secondary); }
.billing-plan-status { font-size: 0.8rem; color: var(--text-tertiary); margin-top: var(--jb-sp-1); }
.billing-plan-status.billing-status-warning { color: var(--warning); }
.billing-plan-badge-area { flex-shrink: 0; }
.billing-plan-badge { display: inline-block; padding: var(--jb-sp-1) var(--jb-sp-3); border-radius: var(--radius-lg); font-size: 0.8rem; font-weight: 600; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-primary); }
.billing-plan-badge.plan-pro { background: var(--accent-muted); border-color: var(--accent); color: var(--accent); }
.billing-plan-badge.plan-lite { background: var(--success-muted); border-color: var(--success); color: var(--success); }

.danger-zone { border-color: rgba(239, 68, 68, 0.4); }
.app-text-input.delete-input-valid { border-color: var(--error); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15); }

.comment-edit-form { margin: 8px 0; }
.comment-edit-textarea { width: 100%; min-height: 60px; padding: 8px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-primary); font-family: inherit; font-size: 13px; resize: vertical; }
.comment-edit-textarea:focus { outline: none; border-color: var(--accent); }
.comment-edit-btn-row { display: flex; gap: 8px; margin-top: 6px; }
.comment-edit-save, .comment-edit-cancel { padding: 4px 12px; border-radius: var(--radius-sm); border: none; cursor: pointer; font-size: 12px; transition: background var(--duration-xfast); }
.comment-edit-save { background: var(--accent); color: var(--jb-fg-on-accent); }
.comment-edit-save:hover { opacity: 0.9; }
.comment-edit-cancel { background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border); }
.comment-edit-cancel:hover { color: var(--text-primary); }

/* Demand & Effort on cards */
.demand-metric { display: inline-flex; align-items: center; gap: var(--jb-sp-1); color: var(--warning); }
.demand-metric .vote-icon { fill: var(--warning); }
.priority-metric { display: inline-flex; align-items: center; gap: var(--jb-sp-1); color: var(--accent); }
.priority-metric .vote-icon { fill: var(--accent); }
.feature-card-priority-number { font-size: 0.8rem; font-weight: 600; }
.feature-card-demand-number { font-size: 0.8rem; font-weight: 600; }

.card-score-badge { font-size: 0.7rem; font-weight: 600; padding: 0.2rem var(--jb-sp-2); border-radius: var(--radius-md); line-height: 1; white-space: nowrap; flex-shrink: 0; display: inline-flex; align-items: center; gap: 3px; cursor: default; }
.card-score-badge-demand { background: rgba(245, 158, 11, 0.15); color: var(--jb-yellow-110); }
.card-score-badge-priority { background: rgba(139, 92, 246, 0.15); color: var(--jb-purple-100); }
.card-score-badge-comments { background: rgba(59, 130, 246, 0.15); color: var(--jb-blue-90); }
.card-score-badge-effort { background: rgba(34, 197, 94, 0.15); color: var(--jb-green-100); }
.card-score-badge-neutral { background: transparent; color: var(--text-secondary); }
.card-score-badge.is-unset { background: transparent; color: var(--text-tertiary); }
.card-score-badge svg { width: 12px; height: 12px; fill: currentColor; flex-shrink: 0; }
/* A stroked icon carries its own fill none on the root, so filling it from here turns an outline into a blob. */
.card-score-badge svg[fill="none"] { fill: none; }
.card-score-badge-demand svg { fill: none; }
.weighted-vote-inline { display: inline-flex; align-items: center; gap: 3px; font-size: 0.7rem; font-weight: 600; padding: 0.2rem var(--jb-sp-2); border-radius: var(--radius-sm); line-height: 1; white-space: nowrap; background: rgba(139, 92, 246, 0.22); color: var(--jb-purple-100); cursor: default; }
.weighted-vote-inline svg { width: 12px; height: 12px; fill: currentColor; flex-shrink: 0; }
.card-meta-count { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--text-secondary); }
.card-meta-count svg { width: 10px; height: 10px; fill: currentColor; flex-shrink: 0; }

/* Detail modal prioritization section */
.prioritization-sub-heading { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: var(--jb-sp-3); }

/* Legacy prioritization rows (activity, voters pages) */
.prioritization-intro { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: var(--jb-sp-1); }
.detail-demand-row, .detail-effort-row, .detail-priority-row { display: flex; align-items: center; gap: var(--jb-sp-2); padding: var(--jb-sp-1) 0; flex-wrap: wrap; }
.detail-demand-label, .detail-effort-label, .detail-priority-label { font-size: 16px; font-weight: 600; color: var(--text-primary); min-width: 68px; display: inline-flex; align-items: center; gap: 4px; }
.detail-demand-value { font-size: 20px; font-weight: 600; color: var(--warning); }
.detail-demand-breakdown { font-size: 13px; color: var(--text-primary); }
.detail-priority-value { font-size: 20px; font-weight: 600; color: var(--accent); }
.detail-metric-hint { font-size: 13px; color: var(--text-primary); width: 100%; line-height: 1.3; }

/* Effort read-only display */
.effort-display { display: flex; align-items: center; gap: var(--jb-sp-2); }

/* Edit/Create modal effort selector */
.effort-selector-edit { display: flex; gap: 0.375rem; flex-wrap: nowrap; }
.effort-btn-edit { flex: 1; background: transparent; border: 1px solid var(--border); color: var(--text-secondary); padding: 0.4rem 0.85rem; border-radius: var(--radius-md); cursor: pointer; font-size: 0.8rem; font-weight: 600; font-family: inherit; transition: background var(--duration-xfast), color var(--duration-xfast), border-color var(--duration-xfast); text-align: center; }
.effort-btn-edit:hover { border-color: var(--accent); color: var(--accent); }
.effort-btn-edit.active { background: var(--accent); color: var(--jb-fg-on-accent); border-color: var(--accent); }

/* Edit/Create modal progress presets */
.progress-presets { display: flex; gap: 0.375rem; flex-wrap: nowrap; margin-top: var(--jb-sp-2); }
.progress-preset-btn { flex: 1; background: transparent; border: 1px solid var(--border); color: var(--text-secondary); padding: 0.4rem 0.85rem; border-radius: var(--radius-md); cursor: pointer; font-size: 0.8rem; font-weight: 600; font-family: inherit; transition: background var(--duration-xfast), color var(--duration-xfast), border-color var(--duration-xfast); text-align: center; }
.progress-preset-btn:hover { border-color: var(--accent); color: var(--accent); }
.progress-preset-btn.active { background: var(--accent); color: var(--jb-fg-on-accent); border-color: var(--accent); }

/* Feature form modal - expanded layout */
.modal-container-feature { max-width: 860px; }
.modal-container-feature .modal-body { gap: 0; }
.modal-container-feature .form-group-roadmap { margin-top: 0; margin-bottom: 1.125rem; }
.modal-container-feature .form-group-roadmap:last-child { margin-bottom: 0; }
.modal-container-feature .form-label { font-size: 0.8rem; color: var(--text-secondary); }

.wizard-step2-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--jb-sp-4) var(--jb-sp-5);
}
@media (max-width: 600px) {
    .wizard-step2-grid {
        grid-template-columns: 1fr;
    }
}

/* Input hover */
.modal-container-feature input:hover,
.modal-container-feature textarea:hover,
.modal-container-feature select:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }

/* Effort chip buttons in feature modals */
.modal-container-feature .effort-btn-edit { background: var(--input-bg); transition: background-color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
.modal-container-feature .effort-btn-edit:hover { background: var(--accent-subtle); transform: translateY(-1px); }
.modal-container-feature .effort-btn-edit.active { background: var(--accent); color: var(--jb-fg-on-accent); border-color: var(--accent); box-shadow: 0 2px 8px var(--accent-glow); }

/* Progress preset chips in feature modals */
.modal-container-feature .progress-preset-btn { background: var(--input-bg); transition: background-color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
.modal-container-feature .progress-preset-btn:hover { background: var(--accent-subtle); transform: translateY(-1px); }
.modal-container-feature .progress-preset-btn.active { background: var(--accent); color: var(--jb-fg-on-accent); border-color: var(--accent); box-shadow: 0 2px 8px var(--accent-glow); }

/* Progress number input */
.progress-input { width: 100%; text-align: center; padding: var(--jb-sp-1) 0.375rem; font-weight: 600; border-radius: var(--radius-sm); display: block; }
.progress-input::-webkit-inner-spin-button,
.progress-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.progress-input[type=number] { -moz-appearance: textfield; }

/* Form section labels */
.form-section-label { font-size: 0.65rem; font-weight: 600; color: var(--text-tertiary); margin-top: var(--jb-sp-4); margin-bottom: var(--jb-sp-2); padding-top: var(--jb-sp-3); border-top: 1px solid var(--border); }
.collapsible-section > .collapsible-toggle.form-section-label,
.team-note-area > .collapsible-toggle.form-section-label { font-size: 0.8rem; color: var(--text-primary); margin-top: 0; margin-bottom: 0; }

/* Collapsible sections in modals (Categorization, Planning) */
.detail-collapsible::details-content { display: block !important; }
.collapsible-section:not([open]) > .collapsible-content,
.team-note-area:not([open]) > .collapsible-content { display: grid !important; grid-template-rows: 0fr; visibility: hidden; }
.collapsible-section > .collapsible-content,
.team-note-area > .collapsible-content { display: grid !important; grid-template-rows: 0fr; transition: grid-template-rows var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1), visibility var(--duration-normal); visibility: hidden; }
.collapsible-section[open] > .collapsible-content,
.team-note-area[open] > .collapsible-content { grid-template-rows: 1fr; visibility: visible; }
.collapsible-section[open].closing > .collapsible-content,
.team-note-area[open].closing > .collapsible-content { grid-template-rows: 0fr; visibility: hidden; }
.collapsible-section .collapsible-inner,
.team-note-area .collapsible-inner { overflow: hidden; padding: var(--jb-sp-2) 0 0 0; opacity: 0; transform: translateY(-6px); }
.collapsible-section[open] .collapsible-inner,
.team-note-area[open] .collapsible-inner { animation: collapsible-fade-in 0.15s cubic-bezier(0.2, 0, 0, 1) 30ms both; }
.collapsible-section[open].closing .collapsible-inner,
.team-note-area[open].closing .collapsible-inner { animation: collapsible-fade-out 0.12s ease both; padding: 0; }
.collapsible-section { margin-top: 0; border-bottom: 1px solid var(--border); padding: var(--jb-sp-3) 0; }
.collapsible-section > .collapsible-toggle { cursor: pointer; display: flex; align-items: center; padding: var(--jb-sp-3) var(--jb-sp-4); border-radius: var(--radius-md); background: var(--bg-elevated); border: 1px solid var(--border); transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), transform 0.1s var(--ease-out); }
.collapsible-section > .collapsible-toggle:hover,
.team-note-area > .collapsible-toggle:hover { background: var(--accent-muted); border-color: var(--accent); }
.collapsible-section > .collapsible-toggle:active,
.team-note-area > .collapsible-toggle:active { transform: scale(0.985); }
.collapsible-chevron { width: 14px; height: 14px; margin-left: auto; flex-shrink: 0; transition: transform var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); color: var(--text-tertiary); padding: 4px; box-sizing: content-box; background: var(--accent-subtle); border-radius: 50%; }
.collapsible-section[open] > .collapsible-toggle .collapsible-chevron { transform: rotate(180deg); color: var(--accent); background: var(--accent-muted); }
.collapsible-section[open].closing > .collapsible-toggle .collapsible-chevron,
.team-note-area[open].closing > .collapsible-toggle .collapsible-chevron { transform: rotate(0deg); color: var(--text-tertiary); background: var(--accent-subtle); }
.collapsible-section[open] > .collapsible-toggle { margin-bottom: 0; }

/* Animated collapsible content (grid-template-rows technique) - detail modal only */
.collapsible-inner { overflow: hidden; }

/* Footer inside form inside modal-body - break out of double padding */
.modal-body > form > .modal-footer { margin: var(--jb-sp-4) calc(-1 * var(--jb-sp-5)) calc(-1 * var(--jb-sp-5)); }

/* Team note area (collapsible <details>) */
.team-note-area { margin-top: 0; padding: var(--jb-sp-3) 0; border-bottom: 1px solid var(--border); border-top: none; margin-bottom: 0; }
.team-note-area > .collapsible-toggle { cursor: pointer; padding: var(--jb-sp-3) var(--jb-sp-4); border-radius: var(--radius-md); background: var(--bg-elevated); border: 1px solid var(--border); transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), transform 0.1s var(--ease-out); }
.team-note-area > .collapsible-toggle.form-section-label { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0; }
.team-note-area[open] > .collapsible-toggle.form-section-label { margin-bottom: 0; }
.team-note-area[open] > .collapsible-toggle .collapsible-chevron { transform: rotate(180deg); color: var(--accent); background: var(--accent-muted); }
.team-note-badge { font-size: 0.6rem; font-weight: 600; color: var(--info); background: var(--info-muted); padding: 0.15rem 0.4rem; border-radius: var(--radius-sm); }
.team-note-area .form-label { display: flex; align-items: center; gap: 0.4rem; }
.team-note-area .form-textarea { min-height: 80px; }

/* Detail modal collapsible sections */
.detail-collapsible { border-bottom: 1px solid var(--border-subtle); padding: var(--jb-sp-3) 0;}
.detail-collapsible > summary { list-style: none; cursor: pointer; display: flex; align-items: center; padding: var(--jb-sp-3) var(--jb-sp-4); margin: 0; border-radius: var(--radius-md); transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), transform 0.1s var(--ease-out); background: var(--bg-elevated); border: 1px solid var(--border-subtle); }
.detail-collapsible > summary:hover { background: var(--accent-muted); border-color: var(--accent); }
.detail-collapsible > summary:active { transform: scale(0.985); }
.detail-collapsible > summary::-webkit-details-marker { display: none; }
.detail-collapsible > summary .detail-section-title { margin-bottom: 0; padding-bottom: 0; border-bottom: none; pointer-events: none; }
.detail-collapsible > summary .collapsible-chevron { width: 14px; height: 14px; margin-left: auto; flex-shrink: 0; transition: transform var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); color: var(--text-tertiary); padding: 4px; box-sizing: content-box; background: var(--accent-subtle); border-radius: 50%; }
.detail-collapsible[open] > summary .collapsible-chevron { transform: rotate(180deg); color: var(--accent); background: var(--accent-muted); }
.detail-collapsible > .collapsible-content { display: grid !important; grid-template-rows: 0fr; transition: grid-template-rows var(--duration-fast) cubic-bezier(0.2, 0, 0, 1), visibility var(--duration-fast); visibility: hidden; }
.detail-collapsible[open] > .collapsible-content { grid-template-rows: 1fr; visibility: visible; }
.detail-collapsible .collapsible-inner { overflow: hidden; padding: var(--jb-sp-3) 0 var(--jb-sp-4) 0 ; opacity: 0; transform: translateY(-6px); }
.detail-collapsible[open] .collapsible-inner { animation: collapsible-fade-in 0.15s cubic-bezier(0.2, 0, 0, 1) 40ms both; }
.detail-collapsible[open].closing .collapsible-inner { animation: collapsible-fade-out 0.12s ease both; padding: 0; }
.detail-collapsible[open].closing > .collapsible-content { grid-template-rows: 0fr; visibility: hidden; }
.detail-collapsible[open].closing > summary .collapsible-chevron { transform: rotate(0deg); color: var(--text-tertiary); background: var(--accent-subtle); }
@keyframes collapsible-fade-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes collapsible-fade-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-6px); } }
.detail-collapsible .detail-sections { margin: 0; padding: 0; }
.detail-collapsible .detail-section { margin: 0; padding: 0; }
.detail-collapsible .detail-progress-section { margin: 0; padding: 0; }
.detail-collapsible .team-note-badge { font-size: 0.6rem; font-weight: 600; color: var(--info); background: var(--info-muted); padding: 0.15rem 0.4rem; border-radius: var(--radius-sm); }
/* Sub-section headings inside collapsible panels */
.votes-sub-heading { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: var(--jb-sp-2); }
/* Tier breakdown inside votes collapsible - keep card styling */
.detail-collapsible .tier-breakdown-section { margin: 0 0 var(--jb-sp-4) 0; }

/* Detail modal staggered section entrance */
#feature-detail-modal.active .modal-body > div > * {
    animation: detailFadeUp 0.2s cubic-bezier(0.2, 0, 0, 1) both;
}
#feature-detail-modal.active .modal-body > div > :nth-child(1) { animation-delay: 0.02s; }
#feature-detail-modal.active .modal-body > div > :nth-child(2) { animation-delay: 0.04s; }
#feature-detail-modal.active .modal-body > div > :nth-child(3) { animation-delay: 0.06s; }
#feature-detail-modal.active .modal-body > div > :nth-child(4) { animation-delay: 0.08s; }
#feature-detail-modal.active .modal-body > div > :nth-child(5) { animation-delay: 0.10s; }
#feature-detail-modal.active .modal-body > div > :nth-child(6) { animation-delay: 0.12s; }
#feature-detail-modal.active .modal-body > div > :nth-child(7) { animation-delay: 0.14s; }
#feature-detail-modal.active .modal-body > div > :nth-child(8) { animation-delay: 0.16s; }
#feature-detail-modal.active .modal-body > div > :nth-child(9) { animation-delay: 0.18s; }
#feature-detail-modal.active .modal-body > div > :nth-child(10) { animation-delay: 0.20s; }

/* Voter detail modal staggered entrance */
#voter-detail-modal.active .modal-body > * {
    animation: detailFadeUp 0.2s cubic-bezier(0.2, 0, 0, 1) both;
}
#voter-detail-modal.active .modal-body > :nth-child(1) { animation-delay: 0.02s; }
#voter-detail-modal.active .modal-body > :nth-child(2) { animation-delay: 0.04s; }
#voter-detail-modal.active .modal-body > :nth-child(3) { animation-delay: 0.06s; }
#voter-detail-modal.active .modal-body > :nth-child(4) { animation-delay: 0.08s; }
#voter-detail-modal.active .modal-body > :nth-child(5) { animation-delay: 0.10s; }
#voter-detail-modal.active .modal-body > :nth-child(6) { animation-delay: 0.12s; }

/* Detail action footer button hover lift */
.detail-action-footer .btn-sm { transition: transform var(--duration-xfast) var(--ease-out), background-color var(--duration-xfast) var(--ease-out), border-color var(--duration-xfast) var(--ease-out), color var(--duration-xfast) var(--ease-out); }
.detail-action-footer .btn-sm:hover { transform: translateY(-1px); }
.detail-action-footer .btn-sm:active { transform: translateY(0); }

/* Help text in feature modals */
.modal-container-feature .form-help { font-size: 0.7rem; color: var(--text-tertiary); margin-top: 0.375rem; }

/* Pinned features */
.pinned-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    max-width: fit-content;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-bottom: 4px;
    line-height: 1;
}
.pinned-indicator svg { width: 11px; height: 11px; flex-shrink: 0;}
.pinned-indicator svg path { fill: var(--text-tertiary); }
.feature-card-roadmap.pinned,
.feature-card-action-btn.pin-feature.active { color: var(--accent); }
.feature-card-roadmap.archived { background: var(--bg-elevated); }
.feature-card-roadmap.archived .feature-card-title { text-decoration: line-through; color: var(--text-secondary); }
.feature-card-roadmap.archived .card-description,
.feature-card-roadmap.archived .feature-card-meta { color: var(--text-tertiary); }
.feature-card-action-btn.archive-feature.active .action-icon { color: var(--accent); }

@media (max-width: 768px) {
    .mobile-header { display: flex; }
    body { padding-top: var(--jb-sp-7); }
    .sidebar { width: 280px; transform: translateX(-110%); transition: transform var(--duration-normal) var(--ease-out); z-index: 1000; overflow-y: auto !important; }
    .sidebar-logo { display: none; }
    .sidebar.active { transform: translateX(0); }
    .sidebar-collapse-btn { display: none !important; }
    [data-sidebar="compact"] .sidebar { width: 280px; }
    [data-sidebar="compact"] .nav-label,
    [data-sidebar="compact"] .logo-text,
    [data-sidebar="compact"] .project-trigger-name,
    [data-sidebar="compact"] .project-chevron-icon,
    [data-sidebar="compact"] .sidebar-user-name,
    [data-sidebar="compact"] .sidebar-logout-btn,
    [data-sidebar="compact"] .nav-section-text { display: revert; }
    [data-sidebar="compact"] .nav-item { justify-content: flex-start; gap: 0.6rem; padding: 0.4rem var(--jb-sp-3); }
    [data-sidebar="compact"] .sidebar-footer-item { justify-content: flex-start; gap: 0.6rem; padding: var(--jb-sp-2) var(--jb-sp-3); }
    .main-content { margin-left: 0 !important; margin-right: 0; padding: var(--jb-sp-3); border-left: none; border-right: none; }
    .nav-section-label { margin-top: 0; }
    .top-bar { height: auto; padding: 0 0 0.625rem; margin-bottom: 0.625rem; gap: var(--jb-sp-2); }
    .top-bar h1 { font-size: 20px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
    .top-bar h1 .title-external-link { display: none; }
    .top-bar-left { min-width: 0; align-items: center; gap: var(--jb-sp-2); }
    .top-bar-left:has(.board-tabs:not([style*="display"])) h1 { display: none; }
    .top-bar-left .board-tabs { max-width: 100%; }
    .board-tab, .page-tab { padding: 0.35rem 0.6rem; font-size: 12px; }
    .board-tab-add { padding: 0.35rem 0.6rem; }
    .board-tab-upgrade { padding: 0.35rem 0.6rem; font-size: 0.7rem; }
    .top-bar .button-group { flex-shrink: 0; max-height: none; }
    .top-bar .button-group-button { height: 34px; padding: 0 var(--jb-sp-2); }
    .top-bar .live-indicator { flex-shrink: 0; }
    .settings-tab { padding: var(--jb-sp-2) var(--jb-sp-2); font-size: 13px; }
    .settings-tab-icon { width: 12px; height: 12px; }

    .features-grid { grid-template-columns: 1fr; }
    .section-header h2 { font-size: 20px; }

    .modal-content { min-width: 95vw; margin: var(--jb-sp-4); }
    .modal-container-large { max-width: 95vw; }
    .detail-heading { font-size: 24px; }
    .detail-stats { flex-direction: row; flex-wrap: wrap; gap: 0; }
    .detail-stat { flex: 1; min-width: 0; padding: var(--jb-sp-2) var(--jb-sp-3); justify-content: center; text-align: center; }
    .detail-stat-value { font-size: 14px; }
    .detail-action-footer { padding: var(--jb-sp-2) var(--jb-sp-3); gap: var(--jb-sp-1); }
    .detail-action-footer .btn-sm { padding: var(--jb-sp-1) 0.4rem; font-size: 0.7rem; }

    .help-icon:hover::after { left: auto; right: 100%; margin-left: 0; margin-right: var(--jb-sp-3); max-width: 200px; width: 200px; font-size: 13px; }

    .pricing-table, .project-table { flex-direction: column; gap: var(--jb-sp-5); max-width: 100%; margin: var(--jb-sp-6) auto 0; }
    .section-content { margin: 0 auto; }
    .pricing-card { max-width: 100%; min-height: auto; padding: var(--jb-sp-5); }
    .pricing-card-featured { transform: scale(1) !important; }
    .billing-toggle { max-width: 100%; margin: var(--jb-sp-6) auto 0; }
    .toggle-container { max-width: 100%; }
    .price { text-align: left !important; font-size: 24px; }
    .section { padding: 2.5rem var(--jb-sp-3); min-height: auto; }
    .pricing-link { margin-top: var(--jb-sp-6) !important; }

    .activity-item { min-width: 0; overflow: hidden; }

    .toolbar-search { min-width: unset; height: 44px; min-height: 44px; flex: 1 1 0; min-width: 0; }
    .toolbar-search-kbd { display: none; }
    .toolbar-filters { width: auto; }
    .toolbar-filter-toggle span { display: none; }
    .toolbar-filter-toggle { height: 44px; width: 44px; justify-content: center; padding: 0; }
    .bulk-select-btn { height: 44px; width: 44px; padding: 0; justify-content: center; }
    .toolbar-filter-popover { min-width: 200px; right: auto; left: 0; }
    .roadmap-bottom-hints { display: none; }
    .roadmap-bottom-divider { display: none; }

    .bulk-action-bar { left: 0; padding: 0.625rem; gap: 0.375rem; flex-wrap: wrap; }
    .bulk-deselect-mobile { display: inline-flex; }
    .bulk-action-bar .btn-secondary { margin-left: auto; }
    .bulk-action-bar .toolbar-select { flex: 1; min-width: 0; }
    .bulk-action-bar .btn-danger { margin-left: 0; flex: 0 0 100%; }

    .app-section { padding: var(--jb-sp-2) var(--jb-sp-3); }
    .member-card { flex-direction: column; align-items: stretch; }
    .member-actions { margin-top: var(--jb-sp-3); }
    .voting-tier-body { padding: var(--jb-sp-2) var(--jb-sp-3); }
    .voting-tier-top { flex-wrap: wrap; }
    .voting-tier-bottom { flex-wrap: wrap; }
    .voting-tier-edit-row { flex-direction: column; align-items: stretch; }
    .voting-tier-edit-row .tier-name-input,
    .voting-tier-edit-row .tier-desc-input { width: 100%; }
    .voting-tier-multiplier-wrap { align-self: flex-start; }
    .voting-tier-edit-actions { flex-wrap: wrap; gap: var(--jb-sp-1); }
    .voting-tier-edit-actions .btn-sm { flex: 1; min-width: 0; }
    .wv-impact-grid { grid-template-columns: 1fr; gap: var(--jb-sp-1); }
    .wv-impact-totals { flex-direction: column; gap: var(--jb-sp-1); }
    .wv-revenue-comparison { grid-template-columns: 1fr; gap: var(--jb-sp-4); }
    .wv-voter-mrr-wrap { margin-top: 0; }
    .wv-priority-table th, .wv-priority-table td { padding: var(--jb-sp-1) var(--jb-sp-2); font-size: 12px; }
    .wv-pt-title { max-width: 120px; }
    .invite-link-generator { flex-direction: column; align-items: stretch; }
    .wv-charts-grid { grid-template-columns: 1fr; }
    .wv-voter-card { padding: var(--jb-sp-2) var(--jb-sp-3); flex-wrap: wrap; }
    .wv-voter-card-left { flex-basis: 100%; }
    .wv-voter-card-right { flex-wrap: wrap; width: 100%; padding-left: var(--jb-sp-5); }
    .wv-voter-card .wv-tier-select { max-width: none; flex: 1; }
    .wv-bulk-bar { left: var(--jb-sp-4); right: var(--jb-sp-4); transform: none; flex-wrap: wrap; justify-content: center; }
    @keyframes bulkBarSlideUp { from { opacity: 0; transform: translateY(var(--jb-sp-4)); } to { opacity: 1; transform: translateY(0); } }

    #voter-modal-stats { flex-wrap: wrap; }

    .theme-grid { grid-template-columns: 1fr; }

    #voters-csv-btn,
    #voters-refresh-btn { display: none; }
    #voter-type-filter-label { display: none; }
    #voter-type-filter-btn { height: 44px; width: 44px; padding: 0; justify-content: center; }
}

@media (max-width: 640px) {
    .modal-container { width: 95%; max-height: 95vh; }
    .modal-header { padding: var(--jb-sp-4) 20px; }
    .modal-body { padding: var(--jb-sp-3) 20px 20px; }
    .modal-footer { padding: var(--jb-sp-4) 20px; flex-direction: column; }
    .modal-body > form > .modal-footer { margin: var(--jb-sp-4) -20px -20px; }
    .form-row { grid-template-columns: 1fr; }
    .modal-container-feature .modal-body { padding: 12px; }
    .modal-container-feature > .wizard-footer { padding: var(--jb-sp-3) 12px; }
    .detail-action-footer { padding: var(--jb-sp-2) var(--jb-sp-3); }
    .effort-selector-edit { flex-wrap: wrap; }
    .progress-presets { flex-wrap: wrap; }

    html.is-demo { --demo-strip-h: 34px; }
    .demo-banner { padding: 0 12px; }
    .demo-banner-content { gap: 8px; }
    .demo-banner-label { display: none; }
    .demo-banner-subtext { display: none; }
}

@media (max-width: 480px) {
    .sidebar { width: min(320px, 90vw); }
    [data-sidebar="compact"] .sidebar { width: min(320px, 90vw); }
    .top-bar h1 { font-size: 1.1rem; }
    .board-tab, .page-tab { padding: 0.3rem var(--jb-sp-2); font-size: 0.7rem; }
    .bulk-action-bar { padding: var(--jb-sp-2); }
    .bulk-count-label { font-size: 12px; padding: var(--jb-sp-1) var(--jb-sp-2); }
    .bulk-action-bar .toolbar-select { height: 32px; font-size: 0.8rem; }
    .bulk-action-bar .btn-primary,
    .bulk-action-bar .btn-secondary,
    .bulk-action-bar .btn-danger { height: 32px; font-size: 0.8rem; }
    .wv-voter-card-meta { flex-wrap: wrap; }
    .wv-bulk-bar { padding: var(--jb-sp-2) var(--jb-sp-3); gap: var(--jb-sp-2); }
    .wv-bulk-tier-select { max-width: none; flex: 1; }
    .modal-content { width: 95%; max-width: 100%; }
}

/* Weighted voting tier breakdown — legacy layout (activity, voters, custom board pages) */
.tier-breakdown-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--jb-r-md);
    padding: var(--jb-sp-3) var(--jb-sp-4);
    margin: var(--jb-sp-4) 0;
}
.tier-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--jb-sp-2) 0;
    font-size: 13px;
    border-bottom: 1px solid var(--border-subtle);
}
.tier-breakdown-item:last-child { border-bottom: none; }

/* Detail panel tier chart */
.tier-chart {
    margin: var(--jb-sp-3) 0;
}
.tier-chart-row {
    display: flex;
    align-items: center;
    gap: var(--jb-sp-3);
    padding: var(--jb-sp-1) 0;
}
.tier-chart-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 90px;
    flex-shrink: 0;
    white-space: nowrap;
}
.tier-chart-mult {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-subtle);
    padding: var(--jb-sp-1) var(--jb-sp-1);
    border-radius: 999px;
    margin-left: var(--jb-sp-1);
}
.tier-chart-bar-track {
    flex: 1;
    height: 8px;
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.tier-chart-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: var(--radius-full);
    transition: width var(--duration-slow) var(--ease-out);
    min-width: 2px;
}
.tier-chart-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    min-width: 28px;
    text-align: right;
}
.tier-chart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--jb-sp-2) 0 0;
    margin-top: var(--jb-sp-2);
    font-size: 13px;
    font-weight: 600;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-primary);
}
.tier-breakdown-name { color: var(--text-primary); }
.tier-breakdown-counts { color: var(--accent); font-variant-numeric: tabular-nums; }

/* Target date on feature cards (standalone - used in detail modal) */
.feature-card-target-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.feature-card-target-date.overdue {
    color: var(--error);
    font-weight: 600;
}
.feature-card-target-date svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.voter-load-more { display: flex; align-items: center; justify-content: center; padding: var(--jb-sp-2); margin-top: var(--space-2); background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); color: var(--text-secondary); font-size: 12px; cursor: pointer; transition: border-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
.voter-load-more:hover { border-color: var(--border); color: var(--text-primary); }
.voter-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 13px;
    transition: background-color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}
.voter-item:hover { background: var(--accent-subtle); border-color: var(--accent-muted); transform: translateY(-1px); }
.voter-item-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.voter-item-name { font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voter-item-meta { font-size: 11px; color: var(--text-tertiary); margin-top: var(--jb-sp-1); }
.voter-weight-badge {
    font-size: 11px;
    padding: 2px 8px;
    background: var(--accent);
    color: white;
    border-radius: 999px;
    flex-shrink: 0;
}

/* Bulk approve checkbox on pending cards */
.bulk-approve-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
    flex-shrink: 0;
    align-self: center;
    margin-right: 4px;
}

/* Release items in Releases modal */
.release-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--jb-sp-2);
}
.release-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
    width: 100%;
}
.release-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 4px;
}
/* Release action buttons - match roadmap detail-action-footer style */
.release-item-actions .btn-sm {
    padding: 0.375rem var(--jb-sp-3);
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    transition: transform var(--duration-xfast) var(--ease-out), background-color var(--duration-xfast) var(--ease-out), border-color var(--duration-xfast) var(--ease-out), color var(--duration-xfast) var(--ease-out);
}
.release-item-actions .btn-sm:hover {
    transform: translateY(-1px);
}
.release-item-actions .btn-sm:active {
    transform: translateY(0);
}
.release-item-status {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    align-self: flex-start;
}
.release-status-planned { background: rgba(99, 102, 241, 0.12); color: var(--jb-chart-4); }
.release-status-in-progress { background: rgba(245, 158, 11, 0.12); color: var(--warning); }
.release-status-released { background: rgba(16, 185, 129, 0.12); color: var(--success); }
/* These three carry colour only; height, padding, radius and weight come from the shared badge rule. */
.release-published-badge { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.release-draft-badge { background: rgba(234, 179, 8, 0.15); color: var(--badge-moved); }
.release-featured-badge { background: rgba(139, 92, 246, 0.15); color: var(--jb-accent); }

/* Four figures about the changelog are context, so they read as one quiet strip rather than four bordered cards. */
.changelog-stat-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--jb-sp-3) var(--jb-sp-5);
    padding: var(--jb-sp-3) var(--jb-sp-4);
    margin-bottom: var(--jb-island-gap);
    background: var(--jb-bg-island);
    border: 1px solid var(--jb-border-island);
    border-radius: var(--jb-r-panel);
}
.changelog-stat { display: flex; align-items: baseline; gap: var(--jb-sp-2); }
.changelog-stat-label { font-size: 13px; color: var(--jb-fg-secondary); }
.changelog-stat-value { font-size: 18px; color: var(--jb-fg); font-variant-numeric: tabular-nums; }

/* Changelog card grid */
.changelog-add-release-card {
    cursor: pointer;
    border-radius: var(--radius-md);
    margin-bottom: var(--jb-sp-3);
    border-style: dashed;
    max-height: none !important;
    min-height: 72px !important;
    display: none !important;
}
.changelog-add-release-card.hidden { display: none !important; }
@media (max-width: 768px) {
    .changelog-add-release-card { display: flex !important; }
    .changelog-add-release-card.hidden { display: none !important; }
    #changelog-toolbar #create-release-btn { display: none !important; }
}
/* An entry is given height to say something: version and title, two clamped lines of notes, then the counts and date. */
.release-row {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--jb-sp-3);
    padding: var(--jb-sp-4);
    cursor: default;
    transition: background-color var(--jb-dur-in) ease-out;
}
.release-row:hover { background: var(--jb-bg-hover); }
.release-row + .release-row::before {
    content: '';
    position: absolute;
    top: 0; left: var(--jb-sp-4); right: var(--jb-sp-4);
    height: 1px;
    background: var(--jb-border-island);
}
.release-row-head { display: flex; align-items: center; justify-content: space-between; gap: var(--jb-sp-3); }
.release-row-title { min-width: 0; font-size: 14px; font-weight: 500; color: var(--jb-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.release-row-preview {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-size: 13px;
    line-height: var(--jb-lh-prose);
    color: var(--jb-fg-secondary);
}
/* A release row carries its counts the way a roadmap card does: a small icon and a figure. */
.release-row-meta { display: flex; align-items: center; gap: var(--jb-sp-4); }
.release-row-date { margin-left: auto; font-size: 12px; color: var(--jb-fg-secondary); white-space: nowrap; font-variant-numeric: tabular-nums; }
.release-row-stats { display: flex; align-items: center; gap: var(--jb-sp-3); flex: 0 0 auto; }
.release-row-stat { display: inline-flex; align-items: center; gap: var(--jb-sp-1); font-size: 12px; color: var(--jb-fg-secondary); font-variant-numeric: tabular-nums; }
.release-row-stat svg { width: 14px; height: 14px; }
.release-row-badges { display: flex; align-items: center; gap: var(--jb-sp-1); flex: 0 0 auto; }

/* A message row is a release row with a switch on it, so it borrows the whole family and adds only what it says differently. */
.message-row-audience { font-size: 12px; color: var(--jb-fg-secondary); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-state-live { background: color-mix(in srgb, var(--jb-success) 18%, transparent); color: var(--jb-success); }
.message-state-scheduled { background: color-mix(in srgb, var(--jb-accent) 18%, transparent); color: var(--jb-accent); }
.message-state-draft { background: color-mix(in srgb, var(--jb-fg-secondary) 16%, transparent); color: var(--jb-fg-secondary); }
.message-state-ended { background: color-mix(in srgb, var(--jb-fg-tertiary) 16%, transparent); color: var(--jb-fg-tertiary); }
.message-kind-warning { background: color-mix(in srgb, var(--jb-warning) 18%, transparent); color: var(--jb-warning); }
.message-kind-critical { background: color-mix(in srgb, var(--jb-error) 18%, transparent); color: var(--jb-error); }
.message-live-toggle { margin-left: var(--jb-sp-2); }

.message-tiers { display: flex; flex-wrap: wrap; align-items: center; gap: var(--jb-sp-2) var(--jb-sp-4); }
.message-tier-choice { display: inline-flex; align-items: center; gap: var(--jb-sp-2); font-size: 13px; color: var(--jb-fg); }
.message-tiers-empty { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--jb-fg-secondary); }

/* Eleven fields in one drawer, so the rows carry a single gap and the stacked margins that used to sit between them are gone. */
.message-modal-container .modal-body { gap: var(--jb-sp-3); }
.message-form .form-group-roadmap { margin: 0; }
.message-form .form-group-roadmap label { margin-bottom: var(--jb-sp-1); }
.message-form .form-row { margin-bottom: 0; gap: var(--jb-sp-3); }
.message-form .form-textarea { min-height: 68px; }
.message-form .message-form-trio { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.message-form-section {
    display: flex;
    flex-direction: column;
    gap: var(--jb-sp-3);
    padding-top: var(--jb-sp-3);
    border-top: 1px solid var(--jb-border);
}
.message-form-section-title { margin: 0; font-size: 12px; font-weight: var(--jb-w-medium); color: var(--jb-fg-tertiary); }
.message-form-switches { gap: var(--jb-sp-2); }
.message-switch { display: flex; align-items: flex-start; gap: var(--jb-sp-3); }
.message-switch-text { font-size: 13px; line-height: var(--jb-lh-ui); color: var(--jb-fg); }
.message-switch-text em { display: block; font-style: normal; font-size: 12px; color: var(--jb-fg-secondary); }
@media (max-width: 640px) {
    .message-form .form-row,
    .message-form .message-form-trio { grid-template-columns: minmax(0, 1fr); }
}

/* The author cannot see their own app from here, so the phone is drawn beside the words. */
.message-preview-frame {
    display: flex;
    justify-content: center;
    padding: var(--jb-sp-3);
    background: var(--jb-bg-inset);
    border: 1px solid var(--jb-border);
    border-radius: var(--jb-r-panel);
}
.message-preview-card {
    width: 288px;
    max-width: 100%;
    padding: var(--jb-sp-3);
    background: color-mix(in srgb, var(--jb-info-bg) 70%, var(--jb-bg-island));
    border: 1px solid var(--jb-info-border);
    border-radius: var(--jb-r-md);
}
.message-preview-card[data-kind="warning"] {
    background: color-mix(in srgb, var(--jb-warning-bg) 70%, var(--jb-bg-island));
    border-color: var(--jb-warning-border);
}
.message-preview-card[data-kind="critical"] {
    background: color-mix(in srgb, var(--jb-error-bg) 70%, var(--jb-bg-island));
    border-color: var(--jb-error-border);
}
/* An alert interrupts, so it is drawn centred and a little taller than the banner it replaces. */
.message-preview-card[data-presentation="alert"] { padding: var(--jb-sp-4); text-align: center; }
.message-preview-title { display: block; font-size: 13px; font-weight: var(--jb-w-semi); color: var(--jb-fg); }
.message-preview-body { margin: var(--jb-sp-1) 0 0; font-size: 12px; line-height: var(--jb-lh-prose); color: var(--jb-fg-secondary); }
.message-preview-action {
    display: inline-block;
    margin-top: var(--jb-sp-2);
    padding: 0 var(--jb-sp-3);
    height: 24px;
    line-height: 24px;
    background: var(--jb-accent);
    border-radius: var(--jb-r-sm);
    font-size: 12px;
    color: var(--jb-fg-on-accent);
}
.message-preview-action[hidden] { display: none; }

.message-footer-delete { margin-right: auto; }
.changelog-card-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
    flex: 1;
}
.changelog-card-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}
.changelog-mrr-badge { background: var(--success-muted); color: var(--success); }
.release-modal-container .form-group-roadmap { margin: 0; }
.release-modal-container .checkbox-group { margin: 0; }
.changelog-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--jb-sp-4);
    padding: var(--jb-sp-6);
    text-align: center;
    color: var(--jb-fg-secondary);
    font-size: 13px;
}
.changelog-empty-state p { margin: 0; }

/* Changelog detail panel body (rendered markdown) */
.changelog-panel-notes { font-size: 13px; color: var(--jb-fg); line-height: var(--jb-lh-prose); }
.changelog-panel-notes h1, .changelog-panel-notes h2, .changelog-panel-notes h3 { color: var(--jb-fg); margin: var(--jb-sp-4) 0 var(--jb-sp-2); font-size: 13px; font-weight: 500; }
.changelog-panel-notes h1:first-child, .changelog-panel-notes h2:first-child, .changelog-panel-notes h3:first-child { margin-top: 0; }
.changelog-panel-notes p { margin: var(--jb-sp-2) 0; }
.changelog-panel-notes ul { margin: var(--jb-sp-2) 0; padding-left: 16px; }
.changelog-panel-notes li { margin: var(--jb-sp-1) 0; }
.changelog-panel-notes code { background: var(--jb-bg-inset); padding: 0 var(--jb-sp-1); border-radius: var(--jb-r-sm); font-size: 12px; }
.changelog-panel-notes pre { background: var(--jb-bg-inset); padding: var(--jb-sp-3); border-radius: var(--jb-r-md); overflow-x: auto; margin: var(--jb-sp-3) 0; }

/* Changelog panel feature list */
.changelog-feature-item {
    display: flex;
    align-items: center;
    gap: var(--jb-sp-2);
    padding: var(--jb-sp-2) 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 13px;
    color: var(--text-primary);
}
.changelog-feature-item:last-child { border-bottom: none; }
.changelog-feature-type {
    font-size: 11px;
    padding: 1px 5px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-tertiary);
    font-weight: 600;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .changelog-stat-strip { gap: var(--jb-sp-3) var(--jb-sp-4); }
}
.release-detail-body pre code { background: none; padding: 0; }
.release-detail-body a { color: var(--jb-accent); }
.release-detail-empty { color: var(--jb-fg-tertiary); font-size: 13px; }
/* Every window except Settings opens as a right edge panel, so the editor gets one column rather than two 247px ones. */
.modal-container-release .modal-body { gap: var(--jb-sp-3); }
.release-split-editor { display: flex; flex-direction: column; gap: var(--jb-sp-3); }
.release-split-editor textarea { min-height: 200px; resize: vertical; width: 100%; }
.release-split-col { display: flex; flex-direction: column; }
.release-checkboxes { display: flex; gap: var(--jb-sp-3); }
.release-checkboxes > .form-group-roadmap { flex: 1; margin: 0; min-width: 0; }
.release-checkboxes .checkbox-group { margin: 0; }
.modal-container-release .wizard-footer { padding: var(--jb-sp-4) var(--jb-sp-5); margin-top: 0; justify-content: flex-end; gap: var(--jb-sp-2); }
@media (max-width: 600px) { .release-checkboxes { flex-direction: column; } }
.md-preview-panel { min-height: 120px; border: 1px solid var(--jb-border-control); border-radius: var(--jb-r-md); padding: var(--jb-sp-3) var(--jb-sp-4); background: var(--jb-bg-inset); color: var(--jb-fg); font-size: 13px; line-height: var(--jb-lh-prose); }
.md-preview-panel p { margin: 0 0 var(--jb-sp-2); }
.md-preview-panel ul, .md-preview-panel ol { padding-left: var(--jb-sp-4); margin-bottom: var(--jb-sp-2); }
.md-preview-panel h1, .md-preview-panel h2, .md-preview-panel h3 { margin: var(--jb-sp-4) 0 var(--jb-sp-2); font-size: 13px; font-weight: 500; }
.md-preview-panel h1:first-child, .md-preview-panel h2:first-child, .md-preview-panel h3:first-child { margin-top: 0; }
.md-preview-panel code { background: var(--jb-bg-hover); padding: 0 var(--jb-sp-1); border-radius: var(--jb-r-sm); font-size: 12px; }
.md-preview-panel pre { background: var(--jb-bg-hover); padding: var(--jb-sp-3); border-radius: var(--jb-r-md); overflow-x: auto; }
.md-preview-panel a { color: var(--jb-accent); }

/* Card animations */
@keyframes cardSpawnIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.card-entering { animation: cardSpawnIn 0.2s cubic-bezier(0.2, 0, 0, 1) both; }
.feature-card-roadmap.card-hiding { opacity: 0; transform: translateY(-4px) scale(0.98); transition: opacity var(--duration-xfast) var(--ease-out), transform var(--duration-xfast) var(--ease-out); }
.feature-card-roadmap.card-showing { opacity: 1; transform: translateY(0) scale(1); transition: opacity var(--duration-xfast) cubic-bezier(0.2, 0, 0, 1), transform var(--duration-xfast) cubic-bezier(0.2, 0, 0, 1); }

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .modal-container { transition: none; transform: none; }
    .detail-collapsible > .collapsible-content { transition: none; }
    .detail-collapsible > summary { transition: none; }
    .detail-collapsible .collapsible-inner { animation: none; opacity: 1; transform: none; }
    .detail-stat { transition: none; }
    .detail-action-footer .btn-sm { transition: none; }
    .detail-action-footer .btn-sm:hover { transform: none; }
    .release-item-actions .btn-sm { transition: none; }
    .release-item-actions .btn-sm:hover { transform: none; }
    #feature-detail-modal.active .modal-body > div > * { animation: none; }
    #voter-detail-modal.active .modal-body > * { animation: none; }
    .detail-progress-fill { transition: none; }
    .collapsible-chevron { transition: none; }
    .modal-container-feature .effort-btn-edit,
    .modal-container-feature .progress-preset-btn { transition: none; }
    .modal-container-feature .effort-btn-edit:hover,
    .modal-container-feature .progress-preset-btn:hover { transform: none; }
    .card-entering { animation: none; opacity: 1; transform: none; }
    .voter-engagement-fill { transition: none; }
    .wv-voter-card { animation: none; opacity: 1; }
    .wv-priority-item { animation: none; transition: none; }
    .wv-priority-bar { transition: none; }
    .wv-bulk-bar { animation: none; }
    .voting-tier-edit-panel { transition: none; }
    .voting-tier-edit-panel-inner { animation: none; opacity: 1; transform: none; }
    .add-tier-panel > .collapsible-content { transition: none; }
    .add-tier-panel .collapsible-inner { animation: none; opacity: 1; transform: none; }
    .feature-card-roadmap.card-hiding { transition: none; opacity: 0; transform: none; }
    .feature-card-roadmap.card-showing { transition: none; opacity: 1; transform: none; }
    .collapsible-section > .collapsible-content,
    .team-note-area > .collapsible-content { transition: none; }
    .collapsible-section .collapsible-inner,
    .team-note-area .collapsible-inner { animation: none; opacity: 1; transform: none; }
    .collapsible-section > .collapsible-toggle,
    .team-note-area > .collapsible-toggle { transition: none; }
    .collapsible-section > .collapsible-toggle:active,
    .team-note-area > .collapsible-toggle:active { transform: none; }
    .modal-overlay.active .modal-body > form > * { animation: none; }
    .modal-footer .btn,
    .modal-footer .share-btn { transition: none; }
    .modal-footer .btn:hover,
    .modal-footer .share-btn:hover { transform: none; }
    .activity-item-new { animation: none; }
    .activity-summary-item { animation: none; opacity: 1; transform: none; }
    .activity-item-enter { animation: none; opacity: 1; transform: none; }
    .live-dot { animation: none; }
    .activity-insights-body { transition: none; }
    .activity-chart-toggle { transition: none; }
    .date-range-dropdown { transition: none; }
    .activity-summary-item { transition: none; }
    .activity-summary-item:hover { transform: none; }
    .activity-item { transition: none; }
    .insights-section-chevron { transition: none; }
    .insights-section-body { transition: none; }
    .settings-section-enter { animation: none; opacity: 1; transform: none; }
    .app-section { transition: none; }
    .app-section:hover { box-shadow: none; }
    .share-btn.saving::after { animation: none; }
    .preview-card { transition: none; }
    .preview-card:hover { transform: none; box-shadow: none; }
    .field-reset-btn.resetting svg { animation: none; }
    .invite-link-card { animation: none; transition: none; }
    .member-card { animation: none; transition: none; }
    .member-card:hover { transform: none; box-shadow: none; }
    .copy-link-btn { transition: none; }
    .danger-collapsible > .collapsible-content { transition: none; }
    .danger-collapsible .collapsible-inner { animation: none; opacity: 1; transform: none; }
}

/* ===== DEMO MODE ===== */

/* The demo strip is chrome, drawn as the design system's notification strip: tinted, one hairline, no gradient and no shadow. */
.demo-banner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--demo-strip-h, 40px);
    /* Above the overlay layer, so the countdown and the way out stay readable when a dialog opens. */
    z-index: 1002;
    background: var(--jb-info-bg);
    color: var(--jb-fg);
    font-size: 13px;
    padding: 0 var(--jb-sp-4);
    overflow: hidden;
}

html.is-demo .demo-banner {
    display: block;
}

.demo-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
}

.demo-banner-text-group {
    text-align: center;
}

.demo-banner-text {
    opacity: 0.95;
}

.demo-banner-cta {
    display: inline-flex;
    align-items: center;
    height: var(--jb-h-control);
    background: var(--jb-accent);
    color: var(--jb-fg-on-accent);
    padding: 0 var(--jb-sp-4);
    border-radius: var(--jb-r-md);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: background var(--jb-dur-in) ease-out, visibility 0s linear var(--jb-dur-out);
    white-space: nowrap;
}

.demo-banner-cta:hover {
    background: var(--jb-accent-hover);
}

.demo-banner-subtext {
    display: block;
    font-size: 11px;
    color: var(--jb-fg-tertiary);
    margin-top: 1px;
}

html.is-demo body {
    padding-top: var(--demo-banner-h, 40px);
}

html.is-demo .sidebar {
    top: var(--demo-banner-h, 40px);
    height: calc(100vh - var(--demo-banner-h, 40px));
}

html.is-demo .mobile-header {
    top: var(--demo-banner-h, 40px);
}

html.is-demo #logout-button {
    display: none;
}

/* Sidebar CTA */
.demo-cta-sidebar {
    padding: 8px 12px;
    margin-top: auto;
    border-top: 1px solid var(--border);
}

.demo-cta-sidebar-inner {
    padding: 8px 4px;
    text-align: center;
}

.demo-cta-sidebar-title {
    font-weight: 500;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.demo-cta-sidebar-btn {
    display: block;
    background: var(--accent);
    color: var(--jb-fg-on-accent);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    transition: background var(--duration-fast);
}

.demo-cta-sidebar-btn:hover {
    background: var(--accent-hover);
}

.demo-cta-sidebar-note {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 4px;
}


/* Embed Veil */
.demo-embed-veil {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 17, 23, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    z-index: 5;
}

.demo-embed-veil-content {
    text-align: center;
}

.demo-embed-veil-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.demo-embed-veil-sub {
    font-size: 13px;
    color: var(--text-tertiary);
}

.demo-restriction-modal-content {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.demo-restriction-modal-icon {
    margin-bottom: 16px;
}

.demo-restriction-modal-content h3 {
    color: var(--text-primary);
    font-size: 20px;
    margin: 0 0 8px;
}

.demo-restriction-modal-content p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 20px;
}

.demo-restriction-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.demo-restriction-modal-close {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px 20px;
    font-size: 13px;
    cursor: pointer;
    transition: background var(--duration-fast);
}

.demo-restriction-modal-close:hover {
    background: var(--bg-elevated);
}

.demo-restriction-modal-cta {
    background: var(--accent);
    color: var(--jb-fg-on-accent);
    border-radius: var(--radius-md);
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--duration-fast);
}

.demo-restriction-modal-cta:hover {
    background: var(--accent-hover);
}

.demo-public-divider-label {
    font-size: 11px;
    color: var(--text-secondary);
    padding: var(--jb-sp-4) var(--jb-sp-4) var(--jb-sp-1);
    margin-top: var(--jb-sp-2);
    border-top: 1px solid var(--border);
}

/* Custom Board Tabs */
.board-tabs, .page-tabs {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
    overflow-x: auto;
    scrollbar-width: none;
}
.board-tabs::-webkit-scrollbar, .page-tabs::-webkit-scrollbar { display: none; }

.board-tab, .page-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    border-radius: calc(var(--radius-md) - 2px);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.12s var(--ease-out), background-color 0.12s var(--ease-out), box-shadow 0.12s var(--ease-out);
    cursor: pointer;
}
.board-tab:hover, .page-tab:hover {
    color: var(--text-primary);
    background: var(--accent-muted);
}
.board-tab.active, .page-tab.active {
    color: var(--jb-fg-on-accent);
    background: var(--accent);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.3);
}

.board-tab-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.85rem;
    border-radius: calc(var(--radius-md) - 2px);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px dashed rgba(59, 130, 246, 0.3);
    cursor: pointer;
    transition: color 0.12s var(--ease-out), border-color 0.12s var(--ease-out), background-color 0.12s var(--ease-out);
    flex-shrink: 0;
}
.board-tab-add:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-muted);
}
.board-tab-upgrade {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    background: transparent;
    border: 1px dashed var(--accent);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.12s var(--ease-out), border-color 0.12s var(--ease-out), background-color 0.12s var(--ease-out);
    flex-shrink: 0;
}
.board-tab-upgrade:hover {
    color: var(--accent);
    background: var(--accent-muted);
}

/* Column header actions */
.column-header-actions {
    display: flex;
    align-items: center;
    gap: var(--jb-sp-1);
}
.column-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color 0.12s var(--ease-out), color 0.12s var(--ease-out);
}
.column-action-btn:hover {
    background: var(--accent-muted);
    color: var(--accent);
}
.column-action-btn.delete-column-btn:hover {
    background: var(--error-muted);
    color: var(--error);
}

/* Board drag indicator */
.drop-indicator {
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    margin: 4px 0;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border);
    border-radius: var(--radius-lg);
    transition: var(--duration-fast);
}
.toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--duration-fast);
}
.toggle-switch input:checked + .toggle-slider {
    background: var(--accent);
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* ===== Cross-document View Transitions ===== */
@view-transition {
    navigation: auto;
}

.main-content {
    view-transition-name: main-content;
}

/* Hide old root instantly, show new root instantly (no ghosting) */
::view-transition-old(root) {
    animation: none;
    opacity: 0;
}
::view-transition-new(root) {
    animation: none;
}
::view-transition-group(root) {
    animation: none;
}

@keyframes vt-fade-out {
    to { opacity: 0; }
}
@keyframes vt-fade-in {
    from { opacity: 0; }
}

/* The chrome swaps instantly and only the page under it crosses over, 150ms out and 130ms in, with nothing moving. */
::view-transition-old(main-content) {
    animation: vt-fade-out var(--jb-dur-out) var(--jb-ease-out) both;
}
::view-transition-new(main-content) {
    animation: vt-fade-in var(--jb-dur-in) var(--jb-ease-in) both;
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(main-content),
    ::view-transition-new(main-content) { animation: none; }
}

/* Disable user link when no project exists */
.sidebar-user.no-project {
    pointer-events: none;
    opacity: 0.5;
}


/* Onboarding system, ob- prefix. */

/* --- Tour Overlay & Highlight --- */
.ob-tour-highlight {
    position: fixed; z-index: 10001;
    border-radius: var(--jb-r-md);
    box-shadow: 0 0 0 4000px rgba(0,0,0,0.55), 0 0 0 3px var(--accent), 0 0 30px rgba(59,130,246,0.3);
    transition: top var(--duration-slow) cubic-bezier(0.4, 0, 0.2, 1), left var(--duration-slow) cubic-bezier(0.4, 0, 0.2, 1), width var(--duration-slow) cubic-bezier(0.4, 0, 0.2, 1), height var(--duration-slow) cubic-bezier(0.4, 0, 0.2, 1), box-shadow var(--duration-slow) cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.ob-tour-tooltip {
    position: fixed; z-index: 10002;
    background: var(--jb-bg-raised); border: 1px solid var(--border, rgba(255,255,255,0.1));
    border-radius: var(--jb-r-md); padding: var(--jb-sp-5);
    max-width: 380px; width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    opacity: 0; transform: translateY(10px);
    transition: opacity var(--duration-normal) var(--ease-out), transform var(--duration-normal) var(--ease-out);
}
.ob-tour-tooltip.active { opacity: 1; transform: translateY(0); }
.ob-tour-tooltip h3 { margin: 0 0 var(--jb-sp-2); font-size: 18px; color: var(--jb-fg); }
.ob-tour-tooltip p { margin: 0 0 var(--jb-sp-4); font-size: 14px; color: var(--text-secondary); line-height: 1.5; }

.ob-tour-tooltip-actions {
    display: flex; justify-content: space-between; align-items: center; gap: var(--jb-sp-3);
}
.ob-tour-btn-skip {
    background: none; border: none; color: var(--text-secondary);
    cursor: pointer; font-size: 13px; padding: var(--jb-sp-2) var(--jb-sp-3);
}
.ob-tour-btn-skip:hover { color: var(--jb-fg); }
.ob-tour-btn-next {
    background: var(--accent); color: var(--jb-fg-on-accent); border: none;
    padding: var(--jb-sp-2) 20px; border-radius: 8px; cursor: pointer;
    font-weight: 600; font-size: 14px;
    transition: transform var(--duration-xfast), box-shadow var(--duration-xfast);
}
.ob-tour-btn-next:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59,130,246,0.4); }
.ob-tour-btn-tryit {
    background: none; border: 1px solid var(--accent); color: var(--accent);
    padding: var(--jb-sp-2) var(--jb-sp-4); border-radius: 8px; cursor: pointer; font-size: 13px;
    transition: background var(--duration-xfast);
}
.ob-tour-btn-tryit:hover { background: rgba(59,130,246,0.1); }

.ob-tour-progress {
    display: flex; gap: 4px; justify-content: center; margin-top: var(--jb-sp-4);
}
.ob-tour-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--border, rgba(255,255,255,0.15));
    transition: background var(--duration-normal), transform var(--duration-normal);
}
.ob-tour-dot.active { background: var(--accent); transform: scale(1.3); }
.ob-tour-dot.completed { background: var(--accent); opacity: 0.5; }

.ob-tour-arrow {
    position: fixed; z-index: 10002; width: 16px; height: 16px;
    background: var(--jb-bg-raised); border: 1px solid var(--border, rgba(255,255,255,0.1));
    transform: rotate(45deg);
    transition: top var(--duration-normal) var(--ease-out), left var(--duration-normal) var(--ease-out);
}

/* --- Tour Mockup Containers --- */
.ob-mockup {
    width: 100%; height: 180px; margin: var(--jb-sp-3) 0;
    background: var(--bg-surface); border: 1px solid var(--border, rgba(255,255,255,0.1));
    border-radius: var(--jb-r-md); overflow: hidden; position: relative;
}

/* Step 1: Sidebar mockup */
.ob-mockup-sidebar {
    position: absolute; left: 0; top: 0; bottom: 0; width: 88px;
    background: var(--bg-card, rgba(255,255,255,0.03)); border-right: 1px solid var(--border, rgba(255,255,255,0.08));
    display: flex; flex-direction: column; gap: 1px; padding: 8px 5px;
}
.ob-mockup-nav-row {
    display: flex; align-items: center; gap: 6px;
    padding: 4px 5px; border-radius: var(--jb-r-sm);
    transition: background var(--duration-normal), color var(--duration-normal);
    font-size: 6.5px; color: var(--text-tertiary);
}
.ob-mockup-nav-row.ob-active {
    background: var(--accent-muted, rgba(59,130,246,0.15));
    color: var(--text-primary);
}
.ob-mockup-nav-icon {
    width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
    background: var(--border, rgba(255,255,255,0.12));
    transition: background var(--duration-normal), box-shadow var(--duration-normal);
}
.ob-mockup-nav-row.ob-active .ob-mockup-nav-icon {
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent-glow, rgba(59,130,246,0.3));
}
.ob-mockup-main-placeholder {
    position: absolute; left: 96px; top: 14px; right: 14px;
    display: flex; flex-direction: column; gap: 10px;
}
.ob-mockup-main-bar {
    height: 6px; border-radius: var(--jb-r-sm);
    background: var(--border-subtle, rgba(255,255,255,0.05));
}
.ob-mockup-main-bar.short { width: 55%; }

/* Step 2: Kanban mockup */
.ob-mockup-columns {
    position: absolute; inset: 8px; display: flex; gap: 6px;
}
.ob-mockup-column {
    flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.ob-mockup-col-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 2px 4px; border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
    margin-bottom: 2px;
}
.ob-mockup-col-header span:first-child {
    font-size: 6px; font-weight: 600; color: var(--text-primary);
}
.ob-mockup-count {
    font-size: 5.5px; font-weight: 600; color: var(--accent);
    background: var(--accent-muted, rgba(59,130,246,0.15));
    padding: 1px 3px; border-radius: var(--jb-r-sm);
}
.ob-mockup-feature-card {
    background: var(--gradient-subtle, rgba(255,255,255,0.03));
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: var(--jb-r-sm); padding: 4px 5px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), box-shadow var(--duration-normal), border-color var(--duration-normal);
}
.ob-mockup-feature-card.ob-dragging {
    transform: translateX(110%) translateY(-4px) scale(1.04);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    border-color: var(--accent);
    z-index: 2; position: relative;
}
.ob-mockup-card-title {
    font-size: 6.5px; font-weight: 600; color: var(--text-primary);
    margin-bottom: 2px; line-height: 1.2;
}
.ob-mockup-card-meta {
    display: flex; align-items: center; gap: 4px; font-size: 5.5px;
    color: var(--text-secondary);
}
.ob-mockup-vote-icon {
    color: var(--accent); font-size: 6px; line-height: 1;
}
.ob-mockup-tag {
    display: inline-block; font-size: 5px; font-weight: 500;
    padding: 1px 3px; border-radius: var(--jb-r-sm);
    background: var(--accent-muted, rgba(59,130,246,0.15));
    color: var(--accent);
}
.ob-mockup-progress {
    height: 2px; background: var(--border, rgba(255,255,255,0.08));
    border-radius: 1px; margin-top: 3px; overflow: hidden;
}
.ob-mockup-progress-fill {
    height: 100%; background: var(--accent); border-radius: 1px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.ob-mockup-progress-lg { height: 3px; margin-top: 6px; }

/* Step 3: Modal mockup */
.ob-mockup-modal {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 200px; background: var(--bg-elevated);
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    border-radius: 8px; overflow: hidden;
    opacity: 0; transition: opacity var(--duration-normal);
}
.ob-mockup-modal.ob-animating { opacity: 1; }
.ob-mockup-modal-header {
    font-size: 8px; font-weight: 600; color: var(--text-primary);
    padding: 7px 10px 5px; border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
}
.ob-mockup-input-group { padding: 4px 10px; }
.ob-mockup-input-label {
    font-size: 5px; font-weight: 600; color: var(--text-tertiary);
    margin-bottom: 2px;
}
.ob-mockup-input-field {
    width: 100%; height: 14px;
    background: var(--input-bg, rgba(255,255,255,0.04));
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    border-radius: var(--jb-r-sm); position: relative; overflow: hidden;
}
.ob-mockup-textarea {
    width: 100%; height: 22px;
    background: var(--input-bg, rgba(255,255,255,0.04));
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    border-radius: var(--jb-r-sm);
}
.ob-mockup-typing {
    position: absolute; left: 4px; top: 2px; font-size: 7px;
    color: var(--text-primary); white-space: nowrap;
}
.ob-mockup-modal-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 5px 10px 7px;
}
.ob-mockup-tag-pill {
    display: inline-block; font-size: 5.5px; padding: 2px 5px;
    background: var(--accent-muted, rgba(59,130,246,0.15));
    color: var(--accent);
    border-radius: 3px; opacity: 0; transform: translateX(-5px);
    transition: opacity var(--duration-normal), transform var(--duration-normal);
}
.ob-mockup-tag-pill.ob-animating { opacity: 1; transform: translateX(0); }
.ob-mockup-btn-accent {
    font-size: 6px; font-weight: 600;
    background: var(--accent); color: var(--jb-fg-on-accent);
    border: none; border-radius: 4px; padding: 3px 8px;
}
.ob-mockup-btn-accent.ob-pulsing { animation: obBtnPulse 1s ease infinite; }

/* Step 4: Feature detail mockup */
.ob-mockup-detail {
    position: absolute; inset: 10px;
    display: flex; flex-direction: column; gap: 5px;
    opacity: 0; transition: opacity var(--duration-slow);
}
.ob-mockup-detail.ob-animating { opacity: 1; }
.ob-mockup-detail-title {
    font-size: 10px; font-weight: 600; color: var(--text-primary);
}
.ob-mockup-detail-desc {
    font-size: 6.5px; color: var(--text-secondary); line-height: 1.5;
}
.ob-mockup-detail-stats {
    display: flex; gap: 14px; font-size: 6.5px; color: var(--text-secondary);
    padding: 5px 0; border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.05));
}
.ob-mockup-stat { display: flex; align-items: center; gap: 3px; }
.ob-mockup-stat-val { font-weight: 600; color: var(--accent); }
.ob-mockup-stat-val.ob-incrementing { animation: obVoteBounce 0.4s ease; }
.ob-mockup-detail-tags { display: flex; gap: 4px; }
.ob-mockup-comment {
    display: flex; align-items: flex-start; gap: 6px; margin-top: auto;
    opacity: 0; transform: translateY(6px);
    transition: opacity var(--duration-slow), transform var(--duration-slow);
}
.ob-mockup-comment.ob-animating { opacity: 1; transform: translateY(0); }
.ob-mockup-comment-avatar {
    width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
    background: var(--accent-muted, rgba(59,130,246,0.2));
}
.ob-mockup-comment-text {
    font-size: 6.5px; color: var(--text-secondary);
    background: var(--bg-card, rgba(255,255,255,0.03));
    border: 1px solid var(--border, rgba(255,255,255,0.06));
    border-radius: 4px; padding: 4px 6px; line-height: 1.4;
}

/* Step 5: Browser share mockup */
.ob-mockup-browser {
    position: absolute; inset: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    border-radius: var(--jb-r-md); overflow: hidden;
    opacity: 0; transition: opacity var(--duration-normal);
}
.ob-mockup-browser.ob-animating { opacity: 1; }
.ob-mockup-browser-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 8px; background: var(--bg-card, rgba(255,255,255,0.03));
    border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
}
.ob-mockup-browser-dots { display: flex; gap: 3px; }
.ob-mockup-browser-dots span { width: 5px; height: 5px; border-radius: 50%; }
.ob-mockup-browser-dots span:nth-child(1) { background: var(--error); }
.ob-mockup-browser-dots span:nth-child(2) { background: var(--warning); }
.ob-mockup-browser-dots span:nth-child(3) { background: var(--badge-approved); }
.ob-mockup-url-bar {
    flex: 1; display: flex; align-items: center; gap: 4px;
    background: var(--input-bg, rgba(255,255,255,0.04));
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 4px; padding: 2px 5px;
}
.ob-mockup-url-text {
    flex: 1; font-size: 6px; color: var(--text-tertiary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ob-mockup-copy-btn {
    font-size: 5.5px; font-weight: 600;
    background: var(--accent); color: var(--jb-fg-on-accent);
    border: none; border-radius: var(--jb-r-sm); padding: 2px 5px;
}
.ob-mockup-copy-btn.ob-clicked { animation: obCopyFlash 0.6s ease; }
.ob-mockup-browser-content {
    padding: 8px;
    opacity: 0; transform: translateY(8px);
    transition: opacity var(--duration-slow) var(--duration-slow), transform var(--duration-slow) var(--duration-slow);
}
.ob-mockup-browser-content.ob-animating { opacity: 1; transform: translateY(0); }
.ob-mockup-mini-columns { display: flex; gap: 5px; }
.ob-mockup-mini-col {
    flex: 1; display: flex; flex-direction: column; gap: 3px;
}
.ob-mockup-mini-col-header {
    font-size: 5px; font-weight: 600; color: var(--text-tertiary);
    padding-bottom: 3px; border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.05));
}
.ob-mockup-mini-card {
    height: 18px;
    background: var(--bg-card, rgba(255,255,255,0.03));
    border: 1px solid var(--border, rgba(255,255,255,0.06));
    border-radius: var(--jb-r-sm);
}

/* --- Tour Confetti --- */
.ob-tour-confetti {
    position: fixed; inset: 0; z-index: 10003; pointer-events: none;
}
.ob-tour-confetti-particle {
    position: absolute; width: 8px; height: 8px;
    animation: obConfettiFall 1.5s ease-out forwards;
}
@keyframes obConfettiFall {
    0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
@keyframes obVoteBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.5); }
}
@keyframes obBtnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.4); }
    50% { box-shadow: 0 0 0 4px rgba(59,130,246,0); }
}
@keyframes obCopyFlash {
    0% { background: var(--badge-approved); }
    100% { background: var(--accent); }
}

/* --- Welcome Modal --- */
.ob-welcome-modal {
    background: var(--jb-bg-raised);
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    border-radius: var(--jb-island-radius-spacious); padding: var(--jb-sp-6); max-width: 440px; width: 90vw;
    text-align: center;
    transform: scale(0.95); transition: transform var(--duration-normal) var(--ease-out);
}
.ob-welcome-overlay.active .ob-welcome-modal { transform: scale(1); }
.ob-welcome-modal h2 {
    margin: 0 0 var(--jb-sp-2); font-size: 24px; color: var(--jb-fg);
}
.ob-welcome-modal .ob-welcome-subtitle {
    margin: 0 0 var(--jb-sp-5); color: var(--text-secondary); font-size: 16px;
}
.ob-welcome-steps {
    text-align: left; margin: var(--jb-sp-5) 0; display: flex; flex-direction: column; gap: var(--jb-sp-3);
}
.ob-welcome-step {
    display: flex; align-items: center; gap: var(--jb-sp-3);
    padding: var(--jb-sp-3); background: rgba(255,255,255,0.03);
    border-radius: var(--jb-r-md); border: 1px solid var(--border, rgba(255,255,255,0.06));
}
.ob-welcome-step-num {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--accent); color: var(--jb-fg-on-accent);
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 13px; flex-shrink: 0;
}
.ob-welcome-step-text { font-size: 14px; color: var(--jb-fg); }
.ob-welcome-actions {
    display: flex; gap: var(--jb-sp-3); justify-content: center; margin-top: var(--jb-sp-5);
}
.ob-welcome-btn-tour {
    background: var(--accent); color: var(--jb-fg-on-accent); border: none;
    padding: var(--jb-sp-3) var(--jb-sp-5); border-radius: var(--jb-r-md); cursor: pointer;
    font-weight: 600; font-size: 16px;
    transition: transform var(--duration-xfast), box-shadow var(--duration-xfast);
}
.ob-welcome-btn-tour:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(59,130,246,0.4); }
.ob-welcome-btn-skip {
    background: none; border: 1px solid var(--border, rgba(255,255,255,0.15));
    color: var(--text-secondary); padding: var(--jb-sp-3) var(--jb-sp-5);
    border-radius: var(--jb-r-md); cursor: pointer; font-size: 16px;
}
.ob-welcome-btn-skip:hover { border-color: var(--text-secondary); }

/* --- Onboarding Checklist in Sidebar --- */
.ob-checklist {
    margin: var(--jb-sp-3) 0; padding: var(--jb-sp-3);
    background: rgba(59,130,246,0.04);
    border: 1px solid rgba(59,130,246,0.12);
    border-radius: var(--jb-r-md);
}
/* The header, the bar and the rows share one content column, so the counter sits above the skip controls. */
.ob-checklist-toggle {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 var(--jb-sp-2);
    cursor: pointer; user-select: none;
}
.ob-checklist-label {
    font-size: 13px; font-weight: 600; color: var(--text-primary);
}
.ob-checklist-count {
    font-size: 12px; color: var(--accent); font-weight: 600;
}
.ob-checklist-progress {
    height: 4px; background: var(--border, rgba(255,255,255,0.1));
    border-radius: 2px; margin: var(--jb-sp-2) var(--jb-sp-2); overflow: hidden;
}
.ob-checklist-progress-fill {
    height: 100%; background: var(--accent);
    border-radius: 2px; transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}
.ob-checklist-items {
    display: flex; flex-direction: column; gap: 4px; margin-top: var(--jb-sp-2);
}
/* The label shares its line with the skip control, but the hint below runs the full width of the row. */
.ob-checklist-item {
    display: grid; grid-template-columns: auto 1fr auto;
    align-items: start; column-gap: var(--jb-sp-2);
    padding: var(--jb-sp-1) var(--jb-sp-2); border-radius: var(--jb-r-md);
    font-size: 12px; color: var(--text-secondary);
    cursor: pointer; transition: background var(--duration-xfast);
}
.ob-checklist-item em {
    grid-column: 2 / -1;
    font-style: normal; font-size: 12px; color: var(--text-tertiary);
}
.ob-checklist-item:hover { background: rgba(255,255,255,0.04); }
.ob-checklist-item.completed { color: var(--accent); }
.ob-checklist-check {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid var(--border, rgba(255,255,255,0.15));
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: border-color var(--duration-fast), background var(--duration-fast);
}
.ob-checklist-item.completed .ob-checklist-check {
    border-color: var(--accent);
    background: var(--accent);
}
.ob-checklist-check svg { width: 10px; height: 10px; opacity: 0; }
.ob-checklist-item.completed .ob-checklist-check svg { opacity: 1; }
.ob-checklist-dismiss {
    background: none; border: none; color: var(--text-secondary);
    font-size: 12px; cursor: pointer; margin: var(--jb-sp-2) 0 0 var(--jb-sp-2);
    padding: var(--jb-sp-1) 0; opacity: 0.6;
}
.ob-checklist-dismiss:hover { opacity: 1; }

/* Skip, and Undo once a step is set aside, share one control beside the label and stay visible without hovering. */
.ob-checklist-skip {
    position: relative;
    flex-shrink: 0;
    /* Pulled out by its own padding so the label lines up with the counter in the header. */
    margin: 0 calc(-1 * var(--jb-sp-2)) 0 auto;
    padding: var(--jb-sp-1) var(--jb-sp-2);
    font-size: 12px;
    font-weight: 400;
    color: var(--text-tertiary);
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: color var(--duration-xfast) var(--ease-out), background var(--duration-xfast) var(--ease-out);
}
.ob-checklist-skip:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.08);
}
/* Touch targets grow without the button growing with them. */
@media (pointer: coarse) {
    .ob-checklist-skip::after {
        content: '';
        position: absolute;
        inset: calc(-1 * var(--jb-sp-3)) calc(-1 * var(--jb-sp-2));
    }
}

/* Skipped state -- set aside, not finished, and still legible enough to undo */
.ob-checklist-item.skipped .ob-checklist-check {
    border-color: var(--border);
    background: transparent;
}
.ob-checklist-item.skipped span {
    color: var(--text-tertiary);
}

/* Focal point -- first incomplete step gets full emphasis */
.ob-checklist-item.focal {
    opacity: 1;
}
.ob-checklist-item.focal .ob-checklist-check {
    border-color: var(--accent);
}

/* Dimmed -- subsequent incomplete steps */
.ob-checklist-item.dimmed {
    opacity: 0.65;
}

/* Float checklist beside sidebar when compact */
[data-sidebar="compact"] .ob-checklist {
    position: fixed;
    left: calc(var(--sidebar-compact-width) + 8px);
    bottom: var(--jb-sp-4);
    width: 220px;
    z-index: 501;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg, 0 4px 24px rgba(0,0,0,0.15));
    border-radius: var(--jb-r-md);
    padding: var(--jb-sp-3);
    margin: 0;
}

/* --- Template Selector Grid --- */
.ob-template-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--jb-sp-3); margin-top: var(--jb-sp-2);
}
.ob-template-card {
    cursor: pointer; border: 2px solid var(--border, rgba(255,255,255,0.1));
    border-radius: var(--jb-r-md); transition: border-color var(--duration-fast), background var(--duration-fast), transform var(--duration-xfast);
}
.ob-template-card:hover { border-color: var(--text-secondary); transform: translateY(-1px); }
.ob-template-card.selected {
    border-color: var(--accent);
    background: rgba(59,130,246,0.06);
}
.ob-template-card-inner { padding: var(--jb-sp-4); }
.ob-template-card-inner h4 {
    margin: 0 0 var(--jb-sp-1); font-size: 14px; color: var(--jb-fg);
}
.ob-template-card-inner p {
    margin: 0 0 var(--jb-sp-2); font-size: 12px; color: var(--text-secondary);
    line-height: 1.4;
}
.ob-template-preview { display: flex; flex-wrap: wrap; gap: 4px; }
.ob-template-tag {
    font-size: 11px; padding: 2px 6px;
    background: rgba(59,130,246,0.1); color: var(--accent);
    border-radius: 4px;
}

/* --- Empty States --- */
.ob-empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 400px; padding: var(--jb-sp-7) var(--jb-sp-6); text-align: center;
    position: relative; overflow: hidden;
}
.ob-empty-illustration {
    width: 120px; height: 120px; margin-bottom: var(--jb-sp-5);
    position: relative;
}
.ob-empty-state h3 {
    margin: 0 0 var(--jb-sp-2); font-size: 20px; color: var(--text-primary);
}
.ob-empty-state p {
    margin: 0 0 var(--jb-sp-5); color: var(--text-secondary);
    max-width: 400px; line-height: 1.6; font-size: 16px;
}
.ob-empty-btn {
    background: var(--accent); color: var(--jb-fg-on-accent); border: none;
    padding: var(--jb-sp-3) var(--jb-sp-5); border-radius: var(--jb-r-md); cursor: pointer;
    font-weight: 600; font-size: 16px; text-decoration: none;
    transition: transform var(--duration-xfast), box-shadow var(--duration-xfast);
}
.ob-empty-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(59,130,246,0.3); }
.ob-empty-hint {
    margin-top: var(--jb-sp-4); font-size: 13px; color: var(--text-secondary); opacity: 0.7;
}

/* Empty state mockup overlay (D-09, D-10) */
.ob-empty-mockup {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.14;
    mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.6) 30%, transparent 90%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.6) 30%, transparent 90%);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    align-items: center;
    justify-content: center;
}

/* Message content floats above mockup */
.ob-empty-message {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--jb-sp-1);
}

/* Mockup row elements */
.ob-mockup-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--bg-elevated);
    border-radius: 8px;
    width: 100%;
    max-width: 480px;
}

.ob-mockup-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--border);
    flex-shrink: 0;
}

.ob-mockup-bar {
    height: 12px;
    border-radius: var(--jb-r-md);
    background: var(--border);
}

.ob-mockup-bar-sm {
    height: 8px;
    border-radius: 4px;
    background: var(--border);
    opacity: 0.6;
}

.ob-mockup-stat {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    margin-left: auto;
    flex-shrink: 0;
}

.ob-mockup-stat-val {
    height: 10px;
    width: 24px;
    border-radius: 4px;
    background: var(--accent);
    opacity: 0.5;
}

.ob-mockup-col-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-4);
    width: 100%;
    max-width: 480px;
}

.ob-mockup-col-header .ob-mockup-bar {
    width: 80px;
    height: 10px;
    opacity: 0.5;
}

.ob-mockup-badge {
    height: 8px;
    width: 40px;
    border-radius: 4px;
    background: var(--accent);
    opacity: 0.3;
}

/* Timeline mockup for activity page */
.ob-mockup-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    width: 100%;
    max-width: 480px;
}

.ob-mockup-timeline-entry {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    padding: var(--space-2) 0;
}

.ob-mockup-timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.4;
    flex-shrink: 0;
    margin-top: 4px;
}

.ob-mockup-timeline-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

/* Empty state illustrations */
.ob-illust-megaphone {
    width: 60px; height: 60px; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: var(--accent); border-radius: 8px 20px 20px 8px;
    opacity: 0.8;
}
.ob-illust-megaphone::before, .ob-illust-megaphone::after {
    content: ''; position: absolute; border-radius: 50%;
    border: 2px solid var(--accent); opacity: 0.3;
}
.ob-illust-megaphone::before { width: 80px; height: 80px; right: -20px; top: -10px; animation: obRipple 2s ease infinite; }
.ob-illust-megaphone::after { width: 100px; height: 100px; right: -30px; top: -20px; animation: obRipple 2s ease 0.5s infinite; }

.ob-illust-chart {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    width: 80px; height: 50px;
}
.ob-illust-chart-bar {
    position: absolute; bottom: 0; width: 12px; border-radius: var(--jb-r-sm) var(--jb-r-sm) 0 0;
    background: var(--accent); opacity: 0.6;
    animation: obBarGrow 1.5s ease infinite alternate;
}
.ob-illust-chart-bar:nth-child(1) { left: 0; height: 20px; animation-delay: 0s; }
.ob-illust-chart-bar:nth-child(2) { left: 16px; height: 35px; animation-delay: 0.2s; }
.ob-illust-chart-bar:nth-child(3) { left: 32px; height: 25px; animation-delay: 0.4s; }
.ob-illust-chart-bar:nth-child(4) { left: 48px; height: 45px; animation-delay: 0.6s; }
.ob-illust-chart-bar:nth-child(5) { left: 64px; height: 30px; animation-delay: 0.8s; }

.ob-illust-avatars {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    display: flex;
}
.ob-illust-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    border: 3px solid var(--jb-bg-canvas);
    background: var(--accent); opacity: 0.7;
}
.ob-illust-avatar:nth-child(2) { margin-left: -12px; background: var(--badge-comment); }
.ob-illust-avatar:nth-child(3) { margin-left: -12px; background: var(--badge-approved); }

.ob-illust-scale {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 80px; height: 60px;
}
.ob-illust-scale-beam {
    position: absolute; top: 20px; left: 0; right: 0; height: 4px;
    background: var(--text-secondary); border-radius: var(--jb-r-sm);
    transform: rotate(-8deg);
    animation: obScaleTilt 2s ease infinite alternate;
}
.ob-illust-scale-pan {
    position: absolute; width: 24px; height: 16px;
    border: 2px solid var(--accent); border-top: none;
    border-radius: 0 0 8px 8px;
}
.ob-illust-scale-pan:first-of-type { left: 4px; top: 22px; }
.ob-illust-scale-pan:last-of-type { right: 4px; top: 14px; }
.ob-illust-scale-base {
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 6px; height: 30px; background: var(--text-secondary); border-radius: var(--jb-r-sm);
}

.ob-illust-kanban {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    display: flex; gap: 6px;
}
.ob-illust-kanban-col {
    width: 28px; background: rgba(255,255,255,0.05);
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    border-radius: 4px; padding: 3px; display: flex; flex-direction: column; gap: 3px;
}
.ob-illust-kanban-card {
    height: 10px; background: var(--accent); opacity: 0.4;
    border-radius: var(--jb-r-sm);
}
.ob-illust-kanban-col:nth-child(2) .ob-illust-kanban-card { background: var(--badge-comment); }
.ob-illust-kanban-col:nth-child(3) .ob-illust-kanban-card { background: var(--badge-approved); }

@keyframes obRipple {
    0% { transform: scale(0.8); opacity: 0.3; }
    100% { transform: scale(1.2); opacity: 0; }
}
@keyframes obBarGrow {
    0% { transform: scaleY(0.7); }
    100% { transform: scaleY(1); }
}
@keyframes obScaleTilt {
    0% { transform: rotate(-8deg); }
    100% { transform: rotate(8deg); }
}

/* --- Celebration Toast --- */
.toast.celebration {
    border-left: 4px solid var(--badge-approved);
}
.toast.celebration .title { color: var(--badge-approved); }

/* --- Pulsing Indicators --- */
.ob-pulse-dot {
    position: absolute; top: 4px; right: 4px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--accent);
    z-index: 100;
    animation: obPulse 2s ease infinite;
}
.ob-pulse-dot::after {
    content: ''; position: absolute; inset: -3px;
    border-radius: 50%; border: 2px solid var(--accent);
    animation: obPulseRing 2s ease infinite;
}
@keyframes obPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
@keyframes obPulseRing {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.8); opacity: 0; }
}

.ob-pulse-tooltip {
    position: absolute; z-index: 101;
    background: var(--jb-bg-raised); border: 1px solid var(--border, rgba(255,255,255,0.1));
    border-radius: var(--jb-r-md); padding: var(--jb-sp-3) var(--jb-sp-4);
    font-size: 13px; color: var(--jb-fg);
    max-width: 220px; box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    opacity: 0; transform: translateY(4px);
    transition: opacity var(--duration-fast), transform var(--duration-fast);
    pointer-events: none;
}
.ob-pulse-tooltip.active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.ob-pulse-tooltip-dismiss {
    display: block; margin-top: var(--jb-sp-2); font-size: 12px;
    color: var(--accent); background: none; border: none;
    cursor: pointer; padding: 0;
}

/* --- Help Panel --- */
.ob-help-btn {
    position: fixed; bottom: var(--jb-sp-5); right: var(--jb-sp-5); z-index: 9000;
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--accent); color: var(--jb-fg-on-accent);
    border: none; cursor: pointer; font-size: 20px; font-weight: 600;
    box-shadow: 0 4px 16px rgba(59,130,246,0.3);
    transition: transform var(--duration-fast), box-shadow var(--duration-fast);
    display: flex; align-items: center; justify-content: center;
}
.ob-help-btn:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(59,130,246,0.4); }

.ob-help-panel {
    position: fixed; top: 0; right: -340px; bottom: 0; z-index: 9001;
    width: 320px; background: var(--jb-bg-raised);
    border-left: 1px solid var(--border, rgba(255,255,255,0.1));
    box-shadow: -4px 0 24px rgba(0,0,0,0.3);
    transition: right var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column; overflow-y: auto;
}
.ob-help-panel.active { right: 0; }
.ob-help-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px; border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
}
.ob-help-panel-header h3 { margin: 0; font-size: 18px; color: var(--jb-fg); }
.ob-help-panel-close {
    background: none; border: none; color: var(--text-secondary);
    font-size: 20px; cursor: pointer; padding: var(--jb-sp-1);
}
.ob-help-panel-body { padding: 20px; display: flex; flex-direction: column; gap: var(--jb-sp-4); }
.ob-help-link {
    display: flex; align-items: center; gap: var(--jb-sp-3);
    padding: var(--jb-sp-3); border-radius: 8px;
    color: var(--jb-fg); text-decoration: none;
    font-size: 14px; transition: background var(--duration-xfast);
    cursor: pointer; border: none; background: none; width: 100%; text-align: left;
}
.ob-help-link:hover { background: rgba(255,255,255,0.04); }
.ob-help-link-icon {
    width: 32px; height: 32px; border-radius: 8px;
    background: rgba(59,130,246,0.1); color: var(--accent);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .ob-template-grid { grid-template-columns: 1fr 1fr; }
    .ob-tour-tooltip { max-width: 320px; }
    .ob-welcome-modal { padding: var(--jb-sp-5); }
    .ob-help-panel { width: 100%; right: -100%; }
}
@media (max-width: 480px) {
    .ob-template-grid { grid-template-columns: 1fr; }
    .ob-tour-tooltip { max-width: 280px; padding: var(--jb-sp-4); }
    .ob-mockup { height: 140px; }
}

/* Upgrade page */
.upgrade-page { max-width: 800px; margin: 0 auto; padding: var(--jb-sp-6) var(--jb-sp-5); }
.upgrade-header { text-align: center; margin-bottom: 20px; }
.upgrade-heading { font-size: 24px; font-weight: 600; color: var(--text-primary); margin: 0 0 var(--jb-sp-2); }
.upgrade-subheading { font-size: 16px; color: var(--text-secondary); margin: 0; }

.upgrade-page .billing-toggle { display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.upgrade-toggle {
    display: inline-flex; align-items: center;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 3px; gap: 2px;
}
.upgrade-toggle-btn {
    background: transparent; border: none; color: var(--text-secondary);
    padding: var(--jb-sp-2) 20px; font-size: 14px; font-weight: 500;
    border-radius: calc(var(--radius-lg) - 2px); cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
    white-space: nowrap; position: relative;
}
.upgrade-toggle-btn:hover:not(.active) { color: var(--text-primary); background: var(--bg-hover); }
.upgrade-toggle-btn.active { background: var(--accent); color: var(--jb-fg-on-accent); font-weight: 600; }
.annual-savings-pill { display: inline-flex; align-items: center; background: var(--success-muted); color: var(--success); font-size: 11px; font-weight: 600; padding: var(--jb-sp-1) var(--jb-sp-2); border-radius: var(--radius-full); margin-left: var(--jb-sp-1); line-height: 1; }
.upgrade-toggle-btn.active .annual-savings-pill { background: rgba(255,255,255,0.2); color: var(--jb-fg-on-accent); }
[data-theme="light"] .annual-savings-pill { background: rgba(5, 150, 105, 0.1); color: var(--success); }
[data-theme="light"] .upgrade-toggle-btn.active .annual-savings-pill { background: rgba(255,255,255,0.25); color: var(--jb-fg-on-accent); }

.plan-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--jb-sp-5); margin-top: var(--jb-sp-4); }
.plan-cards-single { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
.plan-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: var(--jb-sp-6);
    position: relative;
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
    transition: transform var(--duration-slow) cubic-bezier(0.4, 0, 0.2, 1), box-shadow var(--duration-slow) cubic-bezier(0.4, 0, 0.2, 1), border-color var(--duration-slow) cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), 0 1px 4px rgba(0, 0, 0, 0.1);
}
.plan-card:hover { transform: translateY(-8px) rotateX(1deg); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), 0 8px 16px rgba(0, 0, 0, 0.15); border-color: rgba(59, 130, 246, 0.2); }
.plan-card-featured {
    z-index: 2;
    border: 1px solid rgba(59, 130, 246, 0.25);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.15), 0 4px 16px rgba(0, 0, 0, 0.2);
}
.plan-card-featured:hover { transform: translateY(-8px) rotateX(1.5deg); box-shadow: 0 20px 48px rgba(59, 130, 246, 0.2), 0 8px 24px rgba(0, 0, 0, 0.25); }
.plan-card-badge {
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    background: var(--accent);
    color: var(--jb-fg-on-accent); font-size: 11px; font-weight: 600; padding: var(--jb-sp-2) var(--jb-sp-5); border-radius: var(--radius-full);
    white-space: nowrap; box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}
.plan-card-header { margin-bottom: var(--jb-sp-4); }
.plan-name { font-size: 20px; font-weight: 600; color: var(--text-primary); margin: 0 0 var(--jb-sp-2); }
.plan-price { display: flex; align-items: baseline; gap: var(--jb-sp-1); }
.plan-amount { font-size: 32px; font-weight: 600; color: var(--text-primary); }
.plan-period { font-size: 16px; color: var(--text-tertiary); font-weight: 500; }
.plan-features { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: var(--jb-sp-2); }
.plan-features li { position: relative; padding-left: var(--jb-sp-6); font-size: 14px; color: var(--text-secondary); }
.plan-features li::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; min-width: 18px; border-radius: 50%;
    background-color: var(--success-muted);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px 10px;
}
.plan-card-featured .plan-features li::before {
    background-color: rgba(59, 130, 246, 0.15);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

/* CTA buttons */
.plan-cta {
    width: 100%; padding: var(--jb-sp-3) var(--jb-sp-6); font-size: 16px; font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.2); border-radius: var(--radius-lg);
    background: var(--accent-muted); color: var(--accent-lighter); cursor: pointer;
    margin-top: auto;
    transition: transform var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1), box-shadow var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1), background var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1), border-color var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1), color var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
}
.plan-cta:hover { background: var(--accent-hover); color: var(--jb-fg-on-accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3); }
.plan-cta:disabled { opacity: 0.6; cursor: not-allowed; }
.plan-cta-featured {
    position: relative; overflow: hidden;
    background: var(--accent); color: var(--jb-fg-on-accent); border: none;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35), 0 0 40px rgba(59, 130, 246, 0.1);
}
.plan-cta-featured:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(59, 130, 246, 0.5), 0 0 60px rgba(59, 130, 246, 0.15); }
.plan-cta-featured::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: cta-shimmer 3s ease-in-out infinite;
}
@keyframes cta-shimmer { 0% { left: -100%; } 40%, 100% { left: 100%; } }


@media (max-width: 640px) {
    .plan-cards { grid-template-columns: 1fr; }
    .upgrade-heading { font-size: 20px; }
    .plan-amount { font-size: 32px; }
    .plan-card:hover { transform: translateY(-4px); }
    .plan-card-featured { transform: none !important; order: -1; }
    .plan-card-featured:hover { transform: translateY(-4px) !important; }
}

/* Upgrade page: light theme overrides */
[data-theme="light"] .plan-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(37, 99, 235, 0.1);
    border-top-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .plan-card:hover {
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.2);
}
[data-theme="light"] .plan-card-featured {
    border-color: rgba(37, 99, 235, 0.25);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .plan-card-featured:hover {
    box-shadow: 0 20px 48px rgba(37, 99, 235, 0.18), 0 8px 24px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .plan-features li::before {
    background-color: rgba(5, 150, 105, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}
[data-theme="light"] .plan-card-featured .plan-features li::before {
    background-color: rgba(37, 99, 235, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}
[data-theme="light"] .plan-cta-featured { color: var(--jb-fg-on-accent); }

/* Settings form row - side-by-side inputs */
.settings-form-row {
    display: flex;
    gap: var(--space-4);
}
.settings-form-row > * {
    flex: 1;
    min-width: 0;
}

/* Account settings page */
.settings-sections {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.settings-section {
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--jb-sp-2);
    margin-bottom: var(--jb-sp-2);
}
.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.settings-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    padding: var(--jb-sp-2) var(--jb-sp-4) 0;
}

/* The page entrance fill is backwards, never forwards: a lasting transform makes the element the containing block for fixed descendants. */
.main-content {
    animation: pageEnter var(--duration-slow) var(--ease-out) backwards;
}
@keyframes pageEnter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Staggered list items */
.activity-item,
.voter-row,
.feature-card-roadmap {
    animation: enter-fade-up var(--duration-normal) var(--ease-out) both;
}

/* Detail Panel - Slide-in from right */
.detail-panel {
    position: fixed;
    right: 0;
    top: 0;
    height: 100dvh;
    width: 460px;
    max-width: 100vw;
    background: var(--bg-surface);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 350ms var(--ease-spring, cubic-bezier(0.32, 0.72, 0, 1));
    z-index: 1000;
    box-shadow: -1px 0 0 var(--border-subtle), -4px 0 16px rgba(0,0,0,0.2), -16px 0 48px rgba(0,0,0,0.15);
}

.detail-panel.active {
    transform: translateX(0);
}

[data-theme="light"] .detail-panel {
    background: var(--bg-surface);
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: -1px 0 0 rgba(0,0,0,0.04), -4px 0 16px rgba(0,0,0,0.06), -16px 0 48px rgba(0,0,0,0.04);
}

/* Header & actions */
[data-theme="light"] .detail-panel-close:hover { background: rgba(0, 0, 0, 0.04); }
[data-theme="light"] .detail-panel-actions-btn { border-color: rgba(0, 0, 0, 0.08); background: rgba(0, 0, 0, 0.03); }
[data-theme="light"] .detail-panel-actions-btn:hover { border-color: var(--border); background: var(--accent-subtle); }
[data-theme="light"] .detail-panel-actions-menu { background: var(--bg-surface); border-color: rgba(0, 0, 0, 0.08); box-shadow: 0 0 0 0.5px rgba(0,0,0,0.06), var(--shadow-md); }
[data-theme="light"] .panel-action-item:hover { background: rgba(0, 0, 0, 0.04); }
[data-theme="light"] .detail-action-footer { border-bottom-color: var(--border-subtle); }

/* Stats & tabs */
[data-theme="light"] .detail-panel-tabs { border-bottom-color: var(--border-subtle); }
[data-theme="light"] .tab-count { background: rgba(0, 0, 0, 0.04); }

/* Overview & planning */
[data-theme="light"] .detail-stats { background: var(--bg-card); border-color: var(--border-subtle); }
[data-theme="light"] .detail-stat { border-right-color: var(--border-subtle); }
[data-theme="light"] .detail-progress-bar { background: rgba(0, 0, 0, 0.06); }

/* Comments & voters */
[data-theme="light"] .comment-reply-input { background: var(--input-bg); }
[data-theme="light"] .detail-comment { background: var(--bg-card); }
[data-theme="light"] .comment-item { background: none; }
[data-theme="light"] .voter-item { background: var(--bg-card); }

.detail-panel-header {
    padding: var(--space-6) var(--space-6) 0;
    flex-shrink: 0;
    border-bottom: none;
}

.detail-panel-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: var(--jb-sp-1);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
    flex-shrink: 0;
}

.detail-panel-close:hover {
    color: var(--text-primary);
    background: var(--border-subtle);
}

.detail-panel-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.detail-panel-heading {
    font-size: var(--text-xl);
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.detail-panel-edit-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    transition: color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
    flex-shrink: 0;
}

.detail-panel-edit-btn:hover {
    color: var(--accent);
    background: var(--accent-subtle);
}

.detail-panel-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: var(--space-5);
}

.detail-panel-status-badge,
.detail-panel-meta .detail-tag,
.detail-panel-actions-btn {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
}

.detail-panel-status-badge {
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    color: var(--jb-fg-on-accent);
    background: var(--accent);
}

.detail-panel-tags {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.detail-panel-actions-wrapper {
    position: relative;
    margin-left: auto;
}

.detail-panel-actions-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.35rem var(--space-3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
}

.detail-panel-actions-btn:hover {
    border-color: var(--border);
    background: var(--accent-subtle);
}

.detail-panel-actions-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--space-2);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: 0 0 0 0.5px var(--border-subtle), var(--shadow-md);
    min-width: 160px;
    padding: var(--space-2);
    z-index: 10;
    display: none;
}

.detail-panel-actions-menu.active {
    display: block;
}

.detail-panel-actions-wrapper .move-popover {
    left: auto;
    right: 0;
    background: var(--bg-surface);
    border-color: var(--border-subtle);
    box-shadow: 0 0 0 0.5px var(--border-subtle), var(--shadow-md);
    overflow: visible;
    padding: var(--space-2);
}

.detail-panel-actions-wrapper .move-popover-option {
    padding: var(--space-2) var(--space-3);
    font-size: 13px;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
}

.detail-panel-actions-wrapper .move-popover-option:hover:not(.current-column) {
    background: var(--border-subtle);
    color: var(--text-primary);
}

.panel-action-item {
    display: block;
    width: 100%;
    padding: var(--space-2) var(--space-3);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

.panel-action-item:hover {
    background: var(--border-subtle);
    color: var(--text-primary);
}

.panel-action-danger {
    color: var(--error);
}

.panel-action-danger:hover {
    background: var(--error-muted);
    color: var(--error);
}

.panel-action-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 4px 0;
}


.detail-panel-tabs {
    display: flex;
    gap: 0;
    padding: 0 var(--space-6);
    margin-top: 0;
    background: none;
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 0;
}

.detail-panel-tab {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    border-radius: 0;
    color: var(--text-tertiary);
    font-size: var(--text-xs);
    font-weight: 500;
    cursor: pointer;
    transition: color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
    text-align: center;
    white-space: nowrap;
}

.detail-panel-tab:hover {
    color: var(--text-primary);
    background: none;
}

.detail-panel-tab.active {
    color: var(--text-primary);
    font-weight: 600;
    border-bottom-color: var(--accent);
}

.detail-panel-tab.disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: default;
}

.tab-count {
    font-size: 0.625rem;
    background: var(--bg-card);
    padding: 2px var(--space-2);
    border-radius: 999px;
    margin-left: 4px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.detail-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-6) var(--space-6);
}

.detail-panel-tabcontent {
    display: none;
}

.detail-panel-tabcontent.active {
    display: block;
    animation: panelTabFade var(--duration-fast) var(--ease-out);
}

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

.panel-section {
    margin-bottom: var(--space-8);
}

.panel-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    margin: 0 0 var(--space-3) 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.panel-description {
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0 0 var(--space-6);
}

.panel-field-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: var(--space-10);
    padding: var(--space-3) 0;
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--border-subtle);
}

.panel-field-row:last-child {
    border-bottom: none;
}

.panel-field-label {
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}

/* The label and value list the feature detail panel uses, with two content sized columns keeping the value beside its label. */
.panel-kv {
    display: grid;
    grid-template-columns: max-content minmax(0, max-content);
    column-gap: var(--space-6);
    align-items: center;
    margin: 0;
}

.panel-kv-row { display: contents; }
.panel-kv-row.is-hidden { display: none; }

.panel-kv-row dt {
    display: flex;
    align-items: center;
    min-height: var(--space-6);
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

.panel-kv-row dd {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: var(--space-6);
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

/* The prioritization and engagement groups stand side by side, each laying its pairs two to a line. */
.panel-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-6);
    align-items: start;
    margin: 0 0 var(--space-6);
}

/* One metric per line with the badge pinned right, so every value lines up under the one above it. */
.panel-kv--split {
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: var(--space-4);
}

@media (max-width: 420px) {
    .panel-cols { grid-template-columns: minmax(0, 1fr); }
}

.panel-prose {
    margin: 0;
    font-size: var(--text-sm);
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
}

/* Date chips */
.panel-dates-section { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.panel-date-row { display: contents; }
.panel-date-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--jb-sp-1);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--jb-sp-2) var(--jb-sp-3);
    font-size: 13px;
    color: var(--text-primary);
}
.panel-date-chip svg { color: var(--accent); flex-shrink: 0; }
.panel-date-chip--start svg { color: var(--success); }
.panel-date-label { font-weight: 600; color: var(--text-tertiary); font-size: 11px; }
.panel-date-value { font-weight: 500; }

.panel-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
}
.panel-progress-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
}
.panel-progress-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}
.panel-progress-bar {
    height: 6px;
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.panel-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: var(--radius-full);
    transition: width var(--duration-slow) var(--ease-out);
}

@media (max-width: 600px) {
    .detail-panel {
        width: 100vw;
    }
    .detail-panel-header {
        padding: var(--space-4) var(--space-3) 0;
    }
    .detail-panel-heading {
        font-size: var(--text-lg);
    }
    .detail-panel-body {
        padding: var(--space-4) var(--space-3);
    }
    .detail-panel-tabs {
        padding: 0 var(--space-3) 0 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .detail-panel-tabs::-webkit-scrollbar {
        display: none;
    }
    .detail-panel-tab {
        flex: 0 0 auto;
        padding: var(--space-3) var(--space-3);
    }
    .detail-panel-meta {
        margin-bottom: var(--space-3);
    }
}

/* Mobile: horizontal swipe columns */
@media (max-width: 768px) {
    .roadmap-container {
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .kanban-column {
        min-width: 100% !important;
        width: 100% !important;
        scroll-snap-align: start;
    }

    .bulk-action-bar {
        left: var(--jb-sp-2);
        right: var(--jb-sp-2);
        transform: translateX(0) translateY(calc(100% + var(--jb-sp-6)));
        max-width: none;
    }
    .bulk-action-bar.active {
        transform: translateX(0) translateY(0);
    }
}

/* Wizard Modal */
.wizard-progress {
    height: 3px;
    background: var(--border-subtle);
    margin: 0 calc(-1 * var(--jb-sp-5));
    padding: 0;
}

.wizard-progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width 350ms cubic-bezier(0.32, 0.72, 0, 1);
    width: 33.33%;
    border-radius: 0 2px 2px 0;
}

.wizard-steps {
    display: flex;
    justify-content: center;
    gap: var(--jb-sp-5);
    padding: var(--jb-sp-3) 0 var(--jb-sp-2);
}

.wizard-step-dot {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: var(--jb-sp-1) 0;
    transition: color var(--duration-fast);
}

.wizard-step-dot:hover {
    color: var(--text-secondary);
}

.wizard-step-dot.active {
    color: var(--accent);
}

.wizard-step-dot.completed {
    color: var(--success);
}

.wizard-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid currentColor;
    font-size: 11px;
    font-weight: 600;
    transition: background var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast);
}

.wizard-step-dot.active .wizard-step-num {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--jb-fg-on-accent);
}

.wizard-step-dot.completed .wizard-step-num {
    background: var(--success);
    border-color: var(--success);
    color: var(--jb-fg-on-accent);
}

.wizard-step-panel {
    display: none;
}

.wizard-step-panel.active {
    display: block;
    animation: wizardStepIn 250ms ease;
}

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

.wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--jb-sp-3) var(--jb-sp-5);
    border-top: 1px solid var(--border-subtle);
    margin-top: 0;
    flex-shrink: 0;
}

.wizard-footer-right {
    display: flex;
    gap: var(--jb-sp-2);
    margin-left: auto;
}

.wizard-footer .show-mobile {
    display: none;
}

@media (max-width: 600px) {
    .wizard-footer {
        gap: 0.375rem;
    }
    .wizard-footer .btn-primary,
    .wizard-footer .btn-secondary {
        padding: var(--jb-sp-2) 0.625rem;
        font-size: var(--text-sm);
        white-space: nowrap;
    }
    .wizard-footer .btn-secondary:has(.show-mobile) {
        width: 2.25rem;
        height: 2.25rem;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    .wizard-footer .hide-mobile {
        display: none;
    }
    .wizard-footer .show-mobile {
        display: inline;
        font-size: 20px;
        line-height: 1;
    }
}

/* Card guide slide-in panel */
.card-guide-panel {
    position: fixed;
    right: 0;
    top: 0;
    height: 100dvh;
    width: 420px;
    max-width: 90vw;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform 350ms cubic-bezier(0.2, 0, 0, 1);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: var(--jb-sp-5);
}
.card-guide-panel.active {
    transform: translateX(0);
}
.card-guide-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.card-guide-panel-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* ═══════════════════ PAGE TABS ═══════════════════ */
.page-tab svg { width: 14px; height: 14px; opacity: 0.7; fill: currentColor; flex-shrink: 0; }
.page-tab.active svg { opacity: 1; }
.page-tab-content { display: none; }
.page-tab-content.active { display: block; }

/* ═══════════════════ SECTION HEADER ROW ═══════════════════ */
.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--jb-sp-4);
}
.section-header-row h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* ═══════════════════ REVENUE ANALYTICS ═══════════════════ */

/* ═══════════════════ IMPORT CARDS ═══════════════════ */
.import-preview-stats { margin-bottom: var(--jb-sp-4); }
.import-preview-stat .stat-value { font-size: 20px; font-weight: 600; color: var(--text-primary); }
.import-preview-stat .stat-label { font-size: 12px; color: var(--text-secondary); }
.import-preview-list { max-height: 300px; overflow-y: auto; }
.import-preview-row .preview-mrr { color: var(--success); font-weight: 600; }
.import-inline-error { background: var(--error-muted); border: 1px solid var(--error); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); color: var(--text-primary); font-size: var(--text-sm); margin-top: var(--space-3); word-break: break-word; overflow-wrap: break-word; }
.import-inline-error a { color: var(--accent); text-decoration: none; cursor: default; }
.import-inline-error a:hover { text-decoration: underline; cursor: pointer; }
.import-progress-bar-wrap { height: 4px; background: var(--border); border-radius: var(--jb-r-sm); overflow: hidden; margin: var(--space-4) 0; }
.import-progress-bar { height: 100%; background: var(--accent); border-radius: var(--jb-r-sm); transition: width 150ms ease; width: 0%; }
.import-progress-label { font-weight: 500; margin-bottom: var(--space-2); }
.import-progress-counter { font-size: var(--text-sm); color: var(--text-secondary); }
.import-progress-text { text-align: center; color: var(--text-secondary); font-size: 13px; }
.import-done-stats { text-align: center; padding: var(--jb-sp-4) 0; }
.import-done-stats .done-count { font-size: 32px; font-weight: 600; color: var(--success); }
.import-done-stats .done-label { color: var(--text-secondary); font-size: 13px; }
.import-done-errors { font-size: var(--text-sm); color: var(--error); margin-top: var(--space-2); }

/* Voter tier current card, a row is a row */

/* Tier history, a row is a row */
.tier-history-arrow { color: var(--text-tertiary); margin: 0 var(--jb-sp-1); }
.tier-history-source { font-size: 11px; font-weight: 600; color: var(--text-tertiary); }
.tier-history-empty { font-size: 13px; color: var(--jb-fg-tertiary); padding: var(--jb-sp-2) 0; }
@media (max-width: 600px) {}

.panel-chart-wrap canvas,

/* Light mode share/embed page fixes */
[data-theme="light"] .panel-form input,
[data-theme="light"] .panel-form select,
[data-theme="light"] .panel-form textarea { background: var(--input-bg); color: var(--text-primary); }

/* New Project page grid */
.np-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.np-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    cursor: pointer;
    transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.np-card:hover { border-color: var(--accent); box-shadow: 0 2px 8px var(--accent-glow); }
.np-card-name { margin: 0 0 var(--space-1) 0; font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); }
.np-card-new {
    border: 2px dashed var(--border);
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    color: var(--text-tertiary);
    min-height: 80px;
}
.np-card-new:hover { border-color: var(--accent); color: var(--accent); }
.np-card-new span { font-size: var(--text-sm); font-weight: 500; }
.np-upgrade-banner {
    display: flex;
    align-items: center;
    gap: var(--jb-sp-3);
    margin: 0 var(--jb-sp-4) var(--jb-sp-4);
    padding: var(--jb-sp-3) var(--jb-sp-4);
    background: var(--jb-success-bg);
    border: 1px solid var(--jb-success-border);
    border-radius: var(--jb-r-md);
}
.np-upgrade-banner-icon { flex-shrink: 0; color: var(--jb-success); }
.np-upgrade-banner-text h3 { margin: 0 0 var(--jb-sp-1); font-size: var(--jb-t-4); font-weight: var(--jb-w-semi); color: var(--jb-fg); }
.np-upgrade-banner-text p { margin: 0; font-size: var(--jb-t-3); color: var(--jb-fg-secondary); }

@media (max-width: 900px) { .np-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .np-grid { grid-template-columns: repeat(2, 1fr); } }

/* Sample data notice: one line strip above the content on every authenticated surface that can render seeded rows. */
.sample-notice {
    display: flex;
    align-items: center;
    gap: var(--jb-sp-3);
    min-height: var(--jb-h-large);
    margin: var(--jb-sp-4) 0;
    padding: var(--jb-sp-2) var(--jb-sp-3);
    background: var(--jb-bg-raised);
    border: 1px solid var(--jb-border);
    border-radius: var(--jb-r-panel);
    font-size: var(--jb-t-3);
    line-height: var(--jb-lh-ui);
    color: var(--jb-fg-secondary);
}
.sample-notice svg {
    flex-shrink: 0;
    color: var(--jb-fg-tertiary);
}
