/* ============================================================
   Vector — design system
   ============================================================ */
/* Inter variable font, self-hosted (SIL Open Font License). */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/inter.woff2') format('woff2');
}

:root {
    --brand: #5b56e0;
    --brand-hover: #4b46cf;
    --brand-soft: #eef0ff;
    --brand-soft-2: #e3e6ff;
    --brand-contrast: #ffffff;
    --accent: #7c5cff;

    --bg: #f4f5f8;
    --surface: #ffffff;
    --surface-2: #f7f8fa;
    --surface-3: #f0f2f6;
    --border: #e8eaef;
    --border-strong: #d6d9e0;

    --text: #14161d;
    --text-muted: #626878;
    --text-faint: #9aa0af;

    --sidebar-bg: #10131f;
    --sidebar-bg-2: #161a2b;
    --sidebar-text: #c4cad8;
    --sidebar-text-muted: #757d92;
    --sidebar-active: #5b56e0;
    --sidebar-hover: rgba(255, 255, 255, 0.06);

    --danger: #e5484d;
    --danger-soft: #fef1f1;
    --success: #30a46c;
    --warning: #d97706;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 18px;
    --shadow-xs: 0 1px 2px rgba(20, 22, 29, 0.05);
    --shadow-sm: 0 1px 2px rgba(20, 22, 29, 0.04), 0 2px 6px rgba(20, 22, 29, 0.06);
    --shadow-md: 0 4px 14px rgba(20, 22, 29, 0.09);
    --shadow-lg: 0 18px 40px rgba(20, 22, 29, 0.16);

    --sidebar-w: 264px;
    --topbar-h: 62px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Dark theme — toggled by the topbar button, persisted in localStorage,
   applied as data-theme on <html> before first paint. */
:root[data-theme="dark"] {
    --brand: #7b76f0;
    --brand-hover: #8f8bf4;
    --brand-soft: rgba(123, 118, 240, 0.14);
    --brand-soft-2: rgba(123, 118, 240, 0.30);

    --bg: #0d0f16;
    --surface: #151823;
    --surface-2: #1a1e2c;
    --surface-3: #212637;
    --border: #262b3d;
    --border-strong: #384060;

    --text: #e9ebf4;
    --text-muted: #9ba3ba;
    --text-faint: #5f6780;

    --sidebar-bg: #0a0c12;
    --sidebar-bg-2: #10131d;
    --sidebar-text: #c4cad8;
    --sidebar-text-muted: #6d7590;
    --sidebar-hover: rgba(255, 255, 255, 0.06);

    --danger-soft: rgba(229, 72, 77, 0.12);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.6);
}

:root[data-theme="dark"] .chip-type-bug { color: #f28b8b; background: rgba(229, 72, 77, 0.12); border-color: rgba(229, 72, 77, 0.3); }
:root[data-theme="dark"] .chip-type-task { color: #86aefa; background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.3); }
:root[data-theme="dark"] .chip-type-story { color: #6fd398; background: rgba(48, 164, 108, 0.14); border-color: rgba(48, 164, 108, 0.32); }
:root[data-theme="dark"] .chip-prio-urgent { color: #f28b8b; background: rgba(229, 72, 77, 0.12); border-color: rgba(229, 72, 77, 0.3); }
:root[data-theme="dark"] .chip-prio-high { color: #f5a97a; background: rgba(217, 119, 6, 0.14); border-color: rgba(217, 119, 6, 0.32); }
:root[data-theme="dark"] .chip-prio-medium { color: #86aefa; background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.3); }
:root[data-theme="dark"] .chip-prio-low { color: #9ba3ba; background: rgba(155, 163, 186, 0.1); border-color: rgba(155, 163, 186, 0.24); }
:root[data-theme="dark"] .alert-danger { background: rgba(229, 72, 77, 0.12); border-color: rgba(229, 72, 77, 0.32); color: #f2a0a3; }
:root[data-theme="dark"] .alert-warning { background: rgba(217, 119, 6, 0.12); border-color: rgba(217, 119, 6, 0.32); color: #f0bd7e; }
:root[data-theme="dark"] .alert-info { background: var(--brand-soft); border-color: rgba(123, 118, 240, 0.35); color: #b3b0f7; }

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    background-color: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* Inter's contextual alternates + tabular-friendly defaults */
    font-feature-settings: 'calt' 1, 'cv05' 1, 'cv11' 1;
}

.stat-value, .plan-price, .velocity-value, .hbar-count {
    font-variant-numeric: tabular-nums;
}

h1, h2, h3, h4, h5 {
    color: var(--text);
    font-weight: 680;
    letter-spacing: -0.018em;
    line-height: 1.2;
}

::selection {
    background: var(--brand-soft-2);
}

button, input, select, textarea {
    font-family: inherit;
}

/* Inline icons used inside chips/labels */
.ico {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    vertical-align: -1px;
}

/* Smooth the light/dark switch */
body,
.app-sidebar,
.app-topbar,
.panel,
.board-column,
.issue-card,
.filter-bar {
    transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

/* Topbar search button (opens the command palette) */
.topbar-search {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    height: 34px;
    padding: 0 0.7rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 0.83rem;
    cursor: pointer;
    margin-right: 0.5rem;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.topbar-search:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

/* Theme toggle (topbar) */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    margin-right: 0.5rem;
    transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.theme-toggle:hover {
    color: var(--text);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

:root:not([data-theme="dark"]) .theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-moon { display: none; }

/* Entry animation for page content */
@keyframes v-fade-up {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.app-content > * {
    animation: v-fade-up 0.28s ease both;
}

@media (prefers-reduced-motion: reduce) {
    .app-content > * { animation: none; }
    body, .app-sidebar, .app-topbar, .panel, .board-column, .issue-card, .filter-bar { transition: none; }
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1:focus {
    outline: none;
}

code {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0.08rem 0.35rem;
    font-size: 0.85em;
    color: var(--brand-hover);
}

/* ============================================================
   App shell / layout
   ============================================================ */
.app-shell {
    min-height: 100vh;
}

.nav-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: transform 0.22s ease;
    overflow-y: auto;
}

.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 40;
}

.app-main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar-title {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.topbar-spacer {
    flex: 1;
}

.topbar-user {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.nav-hamburger {
    display: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    color: var(--text);
    border: 1px solid var(--border);
}

.nav-hamburger:hover {
    background: var(--surface-2);
}

.app-content {
    flex: 1;
    padding: 1.75rem;
    max-width: 1240px;
    width: 100%;
}

/* ============================================================
   Sidebar nav
   ============================================================ */
.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.15rem 1.25rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.brand:hover {
    text-decoration: none;
    color: #fff;
}

.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand) 0%, #7c3aed 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.45);
}

.nav-section {
    padding: 0.5rem 0.75rem;
}

.nav-section-label {
    padding: 0.75rem 0.75rem 0.35rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sidebar-text-muted);
    font-weight: 600;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.75rem;
    margin: 0.1rem 0;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
    text-decoration: none;
}

.nav-link.active {
    background: var(--sidebar-active);
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.nav-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sidebar-footer {
    margin-top: auto;
    padding: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Org switcher */
.org-switcher {
    padding: 0.75rem;
}

.org-switcher select {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.6rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.org-switcher select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.35);
}

.org-switcher option {
    color: #111827;
}

.org-new {
    display: inline-block;
    margin-top: 0.45rem;
    font-size: 0.8rem;
    color: var(--sidebar-text-muted);
}

.org-new:hover {
    color: #fff;
}

.role-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--sidebar-text);
    margin-top: 0.55rem;
}

/* ============================================================
   Page header
   ============================================================ */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.page-header h1 {
    margin: 0;
    font-size: 1.6rem;
}

.page-header .subtitle {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-top: 0.2rem;
}

.page-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 550;
    font-size: 0.9rem;
    padding: 0.5rem 0.95rem;
    border: 1px solid transparent;
    transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn-primary,
.btn-primary:visited {
    color: #fff;
    background-color: var(--brand);
    border-color: var(--brand);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--brand-hover);
    border-color: var(--brand-hover);
    color: #fff;
}

.btn-outline-primary {
    color: var(--brand);
    border-color: var(--border-strong);
    background: var(--surface);
}

.btn-outline-primary:hover {
    background: var(--brand-soft);
    border-color: var(--brand);
    color: var(--brand-hover);
}

.btn-secondary {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--surface-2);
    color: var(--text);
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.btn:focus, .btn:active:focus, .form-control:focus, .form-select:focus, .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
}

.btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.5rem;
    line-height: 1;
}

/* ============================================================
   Cards / panels
   ============================================================ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.card-body {
    padding: 1.1rem 1.25rem;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem 1.4rem;
    margin-bottom: 1.25rem;
}

.panel h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem 1.5rem;
}

.detail-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.detail-value {
    font-size: 0.92rem;
}

.detail-person {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.92rem;
    font-weight: 500;
}

/* Project cards grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.project-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.15rem;
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
    color: inherit;
}

.project-card:hover {
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--border-strong);
}

.project-card .project-key {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 6px;
    padding: 0.15rem 0.5rem;
    margin-bottom: 0.6rem;
}

.project-card h3 {
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
}

.project-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* ============================================================
   Chips / badges / avatars
   ============================================================ */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.16rem 0.55rem;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    line-height: 1.45;
    white-space: nowrap;
}

.chip .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.chip-type-bug { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.chip-type-task { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.chip-type-story { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }

.chip-prio-urgent { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.chip-prio-high { color: #c2410c; background: #fff7ed; border-color: #fed7aa; }
.chip-prio-medium { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.chip-prio-low { color: #4b5563; background: #f3f4f6; border-color: #e5e7eb; }

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    color: #fff;
}

.avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand) 0%, #7c3aed 100%);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
}

/* Uploaded picture: fill the circle without distorting the image. */
.avatar-img {
    object-fit: cover;
    background: var(--surface-2);
}

/* Emoji reads better on a neutral chip than on the brand gradient. */
.avatar-emoji {
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 0.95rem;
    line-height: 1;
    text-transform: none;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
}

.avatar-lg.avatar-emoji {
    font-size: 2rem;
}

.profile-picture-row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.profile-picture-controls {
    flex: 1;
    min-width: 0;
}

.emoji-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.15rem;
}

.emoji-choice input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.emoji-choice span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 1.05rem;
    cursor: pointer;
}

.emoji-choice span:hover {
    border-color: var(--border-strong);
}

.emoji-choice.selected span {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent);
}

.emoji-none {
    color: var(--text-faint);
}

.role-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-hover);
}

/* ============================================================
   Filter / toolbar
   ============================================================ */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    padding: 0.6rem 0.75rem;
    margin-bottom: 1.1rem;
}

.filter-search {
    position: relative;
    flex: 1 1 220px;
    min-width: 180px;
}

.filter-search svg {
    position: absolute;
    left: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-faint);
    pointer-events: none;
}

.filter-search input {
    width: 100%;
    padding-left: 2rem;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    font-size: 0.88rem;
}

.filter-bar select {
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    font-size: 0.85rem;
    padding: 0 1.9rem 0 0.65rem;
    color: var(--text);
}

.filter-bar .filter-clear {
    margin-left: auto;
    font-size: 0.82rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-sm);
}

.filter-bar .filter-clear:hover {
    background: var(--surface-2);
    color: var(--text);
}

/* ============================================================
   Kanban board
   ============================================================ */
.board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    align-items: flex-start;
}

.board-column {
    flex: 0 0 290px;
    width: 290px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 220px);
}

.board-column-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid var(--border);
    font-weight: 650;
    font-size: 0.85rem;
    position: sticky;
    top: 0;
}

.board-column-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.board-column-header .count {
    margin-left: auto;
    color: var(--text-faint);
    font-weight: 600;
    font-size: 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 0.5rem;
}

.board-column-body {
    padding: 0.65rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.issue-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    padding: 0.7rem 0.75rem;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.issue-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

/* Label chips (color comes inline from the Label entity) */
.label-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    color: #fff;
    line-height: 1.5;
    white-space: nowrap;
}

.label-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
    align-items: center;
}

.label-toggle {
    border: none;
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.12s ease;
}

.label-toggle:hover {
    transform: translateY(-1px);
}

.label-toggle.label-off {
    opacity: 0.85;
}

/* Due date + points chips */
.due-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.due-chip.overdue {
    color: var(--danger);
}

.points-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--surface-3);
    border: 1px solid var(--border);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* WIP limit indicator on column headers */
.board-column-header .count.over-wip {
    background: var(--danger);
    color: #fff;
}

.wip-note {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--danger);
    margin-left: auto;
}

/* ============================================================
   Landing page (marketing)
   ============================================================ */
.landing {
    min-height: 100vh;
    background:
        radial-gradient(1100px 500px at 70% -10%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%),
        var(--bg);
    color: var(--text);
}

.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.1rem 1.5rem;
}

.landing-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.landing-nav-links > a:not(.btn) {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 550;
}

.landing-nav-links > a:not(.btn):hover {
    color: var(--text);
}

.landing-hero {
    max-width: 1080px;
    margin: 0 auto;
    padding: 4rem 1.5rem 3rem;
    text-align: center;
}

.landing-hero h1 {
    font-size: clamp(2rem, 5.5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin: 0 0 1.1rem;
}

.landing-hero .grad {
    background: linear-gradient(90deg, var(--brand), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.landing-hero p {
    max-width: 560px;
    margin: 0 auto 1.6rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.landing-cta {
    display: flex;
    gap: 0.7rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn-lg {
    padding: 0.7rem 1.4rem !important;
    font-size: 0.98rem !important;
}

/* CSS product mock (always crisp, theme-aware) */
.landing-mock {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    max-width: 860px;
    margin: 0 auto;
    padding: 1.2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: left;
}

.mock-col {
    flex: 1;
    min-width: 0;
    background: var(--surface-2);
    border-radius: var(--radius);
    padding: 0.7rem;
}

.mock-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--text-muted);
}

.mock-head .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.mock-count {
    margin-left: auto;
    font-weight: 600;
    color: var(--text-faint);
}

.mock-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xs);
    padding: 0.55rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.mock-card.lift {
    transform: rotate(-1.6deg) translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand);
}

.mock-key {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-faint);
    letter-spacing: 0.03em;
}

.mock-chips {
    display: flex;
    gap: 0.3rem;
}

.mock-chips i {
    display: block;
    width: 26px;
    height: 7px;
    border-radius: 999px;
}

.mock-chips .c1 { background: #4f83f1; opacity: 0.75; }
.mock-chips .c2 { background: #e8863a; opacity: 0.75; }
.mock-chips .c3 { background: #30a46c; opacity: 0.75; }
.mock-chips .c4 { background: #7c5cff; opacity: 0.75; }

.landing-features,
.landing-pricing {
    max-width: 1080px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.landing-features h2,
.landing-pricing h2 {
    text-align: center;
    font-size: clamp(1.4rem, 3vw, 2rem);
    letter-spacing: -0.025em;
    margin: 0 0 2rem;
}

.landing-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.landing-section-sub {
    text-align: center;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 2rem;
    font-size: 0.95rem;
}

/* Differentiator cards: bigger, with a result-style badge instead of an icon. */
.landing-diff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1rem;
}

.landing-diff {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    box-shadow: var(--shadow-xs);
}

.landing-diff h3 {
    font-size: 1.05rem;
    margin: 0 0 0.4rem;
    letter-spacing: -0.015em;
}

.landing-diff p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.landing-diff em {
    color: var(--text);
    font-style: normal;
    font-weight: 600;
}

.diff-badge {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    background: var(--brand-soft);
    color: var(--brand);
}

.diff-badge.score {
    background: color-mix(in srgb, var(--success) 14%, transparent);
    color: var(--success);
}

.diff-badge.warn {
    background: color-mix(in srgb, #e8863a 16%, transparent);
    color: #e8863a;
}

.diff-badge.danger {
    background: var(--danger-soft);
    color: var(--danger);
}

@media (max-width: 560px) {
    .landing-diff-grid { grid-template-columns: 1fr; }
    .landing-diff { flex-direction: column; gap: 0.7rem; }
}

.landing-feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.3rem 1.3rem 1.1rem;
    box-shadow: var(--shadow-xs);
}

.landing-feature h3 {
    font-size: 1rem;
    margin: 0 0 0.4rem;
}

.landing-feature p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.landing-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.landing-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 1080px;
    margin: 0 auto;
    padding: 2rem 1.5rem 2.5rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 720px) {
    .landing-mock { flex-direction: column; }
    .landing-nav-links > a:not(.btn) { display: none; }
}

/* ============================================================
   Auth pages (sign in / create workspace)
   ============================================================ */
.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
    padding: 2rem 1rem;
    background:
        radial-gradient(900px 420px at 50% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
        var(--bg);
}

.auth-logo {
    color: var(--text);
    text-decoration: none;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem 1.8rem 1.6rem;
    animation: fade-up 0.25s ease;
}

.auth-title {
    font-size: 1.45rem;
    margin: 0 0 0.25rem;
    text-align: center;
}

.auth-sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 1.4rem;
}

.auth-minor {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    cursor: pointer;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1.1rem 0;
    color: var(--text-faint);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-switch {
    text-align: center;
    margin: 1.3rem 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-switch a {
    font-weight: 650;
}

.auth-foot {
    color: var(--text-faint);
    font-size: 0.82rem;
}

.auth-foot a {
    color: var(--text-muted);
}

/* ============================================================
   Upgrade gates (plan-locked features)
   ============================================================ */
.upgrade-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    padding: 2.4rem 1.5rem;
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

.upgrade-gate svg {
    width: 34px;
    height: 34px;
    color: var(--brand);
}

.upgrade-gate h3 {
    margin: 0.2rem 0 0;
    font-size: 1.05rem;
}

.upgrade-gate p {
    margin: 0 0 0.6rem;
    max-width: 420px;
}

.upgrade-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    border: 1px solid var(--brand-soft-2);
    text-decoration: none;
    white-space: nowrap;
}

.upgrade-chip:hover {
    background: var(--brand-soft-2);
    color: var(--brand);
}

/* Billing plan comparison */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.plan-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.3rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    box-shadow: var(--shadow-xs);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.plan-card.current {
    border-color: var(--brand);
    box-shadow: 0 0 0 1px var(--brand);
}

.plan-card.popular {
    border-color: var(--brand);
    box-shadow: 0 0 0 1px var(--brand), 0 16px 38px color-mix(in srgb, var(--brand) 18%, transparent);
}

.plan-ribbon {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--brand), var(--accent));
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.22rem 0.7rem;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.plan-card .plan-name {
    font-weight: 700;
    font-size: 1.02rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.plan-price-block {
    margin: 0.1rem 0 0.35rem;
}

.plan-card .plan-price {
    font-size: 2.05rem;
    font-weight: 780;
    letter-spacing: -0.03em;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
}

.plan-price-per {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0;
}

.plan-price-unit {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.plan-price-annual {
    display: block;
    color: var(--text-faint);
}

/* Monthly / annual toggle */
.billing-toggle {
    display: flex;
    width: fit-content;
    margin: 0 auto 1.6rem;
    padding: 0.25rem;
    gap: 0.2rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.billing-toggle button {
    border: none;
    background: none;
    padding: 0.42rem 1.1rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.billing-toggle button.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-xs);
}

.save-badge {
    font-size: 0.66rem;
    font-weight: 700;
    padding: 0.1rem 0.42rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--success) 18%, transparent);
    color: var(--success);
}

.billing-note,
.landing-pricing-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.83rem;
    margin-top: 1.1rem;
}

.plan-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.86rem;
    color: var(--text-muted);
}

.plan-card ul li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.plan-card ul li svg {
    width: 14px;
    height: 14px;
    color: var(--success);
    flex-shrink: 0;
}

.plan-card .plan-cta {
    margin-top: auto;
}

/* ============================================================
   Notification bell
   ============================================================ */
.bell-wrap {
    position: relative;
    margin-right: 0.5rem;
}

.bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.bell-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1090;
}

.bell-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    max-width: 90vw;
    max-height: 420px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1100;
    animation: fade-up 0.15s ease;
}

.bell-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.bell-empty {
    padding: 1.4rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.bell-item {
    display: flex;
    gap: 0.6rem;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 0.65rem 0.9rem;
    cursor: pointer;
    align-items: flex-start;
}

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

.bell-item:hover {
    background: var(--surface-2);
}

.bell-item.unread {
    background: var(--brand-soft);
}

.bell-item.unread:hover {
    background: var(--brand-soft-2);
}

.bell-item-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.bell-item-title {
    font-size: 0.84rem;
    color: var(--text);
}

.bell-item-preview {
    font-size: 0.8rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.bell-item-time {
    font-size: 0.72rem;
    color: var(--text-faint);
}

/* ============================================================
   Saved filter presets
   ============================================================ */
.preset-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin: -0.5rem 0 1rem;
}

.preset-chip {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    overflow: hidden;
    background: var(--surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.preset-chip.active {
    border-color: var(--brand);
    box-shadow: 0 0 0 1px var(--brand);
}

.preset-apply {
    border: none;
    background: none;
    padding: 0.28rem 0.3rem 0.28rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}

.preset-delete {
    border: none;
    background: none;
    color: var(--text-faint);
    padding: 0 0.5rem 0 0.15rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.preset-delete:hover {
    color: var(--danger);
}

.preset-name-input {
    height: 30px;
    width: 130px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 0.8rem;
    padding: 0 0.55rem;
}

/* ============================================================
   Sprints & velocity
   ============================================================ */
.sprint-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.sprint-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.sprint-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sprint-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.sprint-actions {
    display: flex;
    gap: 0.4rem;
}

.sprint-chip-planned {
    background: var(--surface-2);
}

.sprint-chip-active {
    background: var(--brand-soft);
    border-color: var(--brand);
    color: var(--brand);
}

.sprint-chip-completed {
    background: color-mix(in srgb, var(--success) 12%, transparent);
    border-color: var(--success);
    color: var(--success);
}

.velocity-chart {
    display: flex;
    align-items: flex-end;
    gap: 1.2rem;
    height: 170px;
    padding: 0.5rem 0.25rem 0;
}

.velocity-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    flex: 0 0 auto;
    height: 100%;
    justify-content: flex-end;
}

.velocity-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 100%;
}

.velocity-bar {
    width: 22px;
    border-radius: 5px 5px 0 0;
    min-height: 3px;
}

.velocity-bar.committed {
    background: var(--border-strong);
}

.velocity-bar.completed {
    background: var(--brand);
}

.velocity-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    max-width: 76px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.velocity-value {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text);
}

.velocity-legend {
    display: flex;
    gap: 1.1rem;
    margin-top: 0.7rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    align-items: center;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 0.3rem;
    vertical-align: -1px;
}

.legend-dot.committed {
    background: var(--border-strong);
}

.legend-dot.completed {
    background: var(--brand);
}

/* ============================================================
   Subtasks, attachments, time tracking, epics
   ============================================================ */
.subtask-row,
.attachment-row,
.worklog-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.subtask-row:last-of-type,
.attachment-row:last-of-type,
.worklog-row:last-of-type {
    border-bottom: none;
}

.subtask-done {
    text-decoration: line-through;
    color: var(--text-faint);
}

.attachment-row a {
    font-weight: 600;
}

.time-summary {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.epic-progress {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.7rem;
}

.epic-progress-track {
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: var(--surface-3);
    overflow: hidden;
    min-width: 120px;
}

.epic-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--success);
    transition: width 0.3s ease;
}

.epic-progress-fill.over {
    background: var(--danger);
}

.epic-children {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.epic-children li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.9rem;
}

.epic-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.14rem 0.5rem;
    border-radius: 6px;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent);
    white-space: nowrap;
}

.subtask-chip {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
}

/* ============================================================
   Roadmap, burndown, My Work, inline title edit
   ============================================================ */
.roadmap-scale,
.roadmap-row {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 0.8rem;
    align-items: center;
}

.roadmap-scale {
    margin-bottom: 0.5rem;
}

.roadmap-scale-track {
    position: relative;
    height: 20px;
    font-size: 0.7rem;
    color: var(--text-faint);
}

.roadmap-tick {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    white-space: nowrap;
}

.roadmap-today {
    position: absolute;
    top: 14px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--danger);
    transform: translateX(-50%);
}

.roadmap-row {
    padding: 0.3rem 0;
    border-top: 1px solid var(--border);
}

.roadmap-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    font-weight: 550;
    color: var(--text);
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.roadmap-label:hover {
    color: var(--brand);
}

.roadmap-track {
    position: relative;
    height: 22px;
    background: var(--surface-2);
    border-radius: 6px;
    overflow: hidden;
}

.roadmap-today-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: color-mix(in srgb, var(--danger) 45%, transparent);
}

.roadmap-bar {
    position: absolute;
    top: 4px;
    bottom: 4px;
    border-radius: 5px;
    background: #8b93a8;
    overflow: hidden;
}

.roadmap-bar.active { background: #e8863a; }
.roadmap-bar.done { background: var(--success); }
.roadmap-bar.epic { background: color-mix(in srgb, var(--accent) 30%, transparent); }

.roadmap-bar-progress {
    display: block;
    height: 100%;
    background: var(--accent);
    border-radius: 5px 0 0 5px;
}

.burndown-chart {
    width: 100%;
    height: 230px;
    display: block;
}

.mywork-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

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

.title-edit {
    background: none;
    border: none;
    color: var(--text-faint);
    cursor: pointer;
    padding: 0.15rem;
    vertical-align: 2px;
}

.title-edit:hover {
    color: var(--brand);
}

/* ============================================================
   Customer request portal
   ============================================================ */
.portal-panel {
    border-left: 3px solid var(--success);
}

.portal-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.portal-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.portal-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.8rem;
    padding: 0.55rem 0.7rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
}

.portal-link code {
    flex: 1;
    min-width: 200px;
    font-size: 0.82rem;
    user-select: all;
    word-break: break-all;
}

.request-card {
    padding: 1rem 1.2rem;
}

.request-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.request-title {
    font-size: 0.98rem;
}

.request-status {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--text-muted);
}

.request-status.status-new { background: var(--brand-soft); color: var(--brand); }
.request-status.status-triaged { background: color-mix(in srgb, #e8863a 16%, transparent); color: #e8863a; }
.request-status.status-closed { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }

.request-from {
    font-size: 0.82rem;
    margin-top: 0.25rem;
}

.request-body {
    margin: 0.6rem 0 0.8rem;
    font-size: 0.9rem;
    white-space: pre-wrap;
}

.request-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.portal-done {
    text-align: center;
}

.portal-done svg {
    width: 42px;
    height: 42px;
    color: var(--success);
    margin-bottom: 0.5rem;
}

/* ============================================================
   Blocker & workload radar
   ============================================================ */
.radar-row {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.radar-row:last-of-type {
    border-bottom: none;
}

.radar-impact,
.radar-wait {
    flex-shrink: 0;
    min-width: 38px;
    text-align: center;
    font-weight: 800;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
    padding: 0.25rem 0.4rem;
    border-radius: var(--radius-sm);
    background: var(--surface-3);
    color: var(--text-muted);
}

.radar-impact.high,
.radar-wait.high {
    background: var(--danger-soft);
    color: var(--danger);
}

.radar-wait small {
    font-size: 0.62rem;
    font-weight: 700;
}

.radar-body {
    flex: 1;
    min-width: 0;
}

.radar-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.radar-detail {
    font-size: 0.78rem;
    margin-top: 0.1rem;
}

.workload-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    flex-wrap: wrap;
}

.workload-row:last-of-type {
    border-bottom: none;
}

.workload-name {
    font-weight: 600;
    min-width: 130px;
}

.workload-track {
    flex: 1;
    min-width: 100px;
    height: 8px;
    border-radius: 999px;
    background: var(--surface-3);
    overflow: hidden;
}

.workload-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--brand);
}

.workload-fill.over {
    background: var(--danger);
}

.workload-stats {
    font-size: 0.78rem;
    white-space: nowrap;
}

.overload-chip {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: transparent;
}

/* ============================================================
   Sprint forecast
   ============================================================ */
.forecast-panel {
    border-left: 3px solid var(--accent);
}

.forecast-verdict {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius);
    margin-bottom: 0.9rem;
    font-size: 0.9rem;
    background: var(--surface-2);
}

.forecast-verdict.good { background: color-mix(in srgb, var(--success) 12%, transparent); }
.forecast-verdict.warn { background: color-mix(in srgb, #e8863a 14%, transparent); }
.forecast-verdict.bad { background: var(--danger-soft); }

.forecast-verdict span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.commitment-meter {
    position: relative;
    display: flex;
    height: 12px;
    border-radius: 999px;
    background: var(--surface-3);
    overflow: hidden;
}

.commitment-fill {
    height: 100%;
    background: var(--success);
}

.commitment-fill.warn { background: #e8863a; }
.commitment-fill.bad { background: var(--danger); }

.commitment-over {
    height: 100%;
    background: repeating-linear-gradient(45deg, var(--danger), var(--danger) 4px, transparent 4px, transparent 8px);
}

/* Marks 100% of average velocity so overcommitment is visible at a glance. */
.commitment-marker {
    position: absolute;
    left: 100%;
    top: -3px;
    bottom: -3px;
    width: 2px;
    background: var(--text);
    opacity: 0.45;
}

.commitment-legend {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.78rem;
    margin-top: 0.35rem;
    flex-wrap: wrap;
}

.forecast-stats {
    margin: 1rem 0 0;
}

.forecast-note {
    font-size: 0.83rem;
    margin: 0.8rem 0 0;
}

/* ============================================================
   Standup & digest
   ============================================================ */
.digest-panel {
    border-left: 3px solid var(--brand);
}

.digest-since {
    font-size: 0.82rem;
    margin: 0 0 0.6rem;
}

.digest-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}

.digest-row:last-of-type {
    border-bottom: none;
}

.digest-text {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.standup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.standup-card {
    margin-bottom: 0;
}

.standup-person {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding-bottom: 0.7rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.standup-section {
    margin-bottom: 0.8rem;
}

.standup-label {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.3rem;
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
}

.standup-label.done { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); }
.standup-label.doing { background: color-mix(in srgb, #e8863a 18%, transparent); color: #e8863a; }
.standup-label.blocked { background: var(--danger-soft); color: var(--danger); }

.standup-item {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    font-size: 0.86rem;
    padding: 0.2rem 0;
    flex-wrap: wrap;
}

.standup-detail {
    font-size: 0.76rem;
    margin-left: auto;
    white-space: nowrap;
}

.blocked-detail {
    color: var(--danger);
    font-weight: 600;
}

.standup-empty {
    font-size: 0.82rem;
    margin: 0;
}

/* ============================================================
   Backlog health
   ============================================================ */
.health-hero {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
}

.health-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 6px solid var(--border);
}

.health-score.good { border-color: var(--success); }
.health-score.warn { border-color: #e8863a; }
.health-score.bad { border-color: var(--danger); }

.health-score-value {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.health-score-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
}

.health-summary {
    flex: 1;
    min-width: 220px;
}

.health-summary h3 {
    margin: 0 0 0.2rem;
    font-size: 1.15rem;
}

.health-summary p {
    margin: 0 0 0.7rem;
    font-size: 0.9rem;
}

.health-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--surface-3);
    overflow: hidden;
}

.health-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--success);
    transition: width 0.4s ease;
}

.health-bar-fill.warn { background: #e8863a; }
.health-bar-fill.bad { background: var(--danger); }

.health-check-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.health-check-head h4 {
    margin: 0;
}

.health-count {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--surface-3);
    border-radius: 999px;
    padding: 0.05rem 0.45rem;
    margin-left: 0.3rem;
}

.health-advice {
    font-size: 0.84rem;
    margin: 0.2rem 0 0.7rem;
}

.health-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    flex-wrap: wrap;
}

.health-row:last-of-type {
    border-bottom: none;
}

.health-detail {
    margin-left: auto;
    font-size: 0.78rem;
    white-space: nowrap;
}

/* ============================================================
   Swimlanes, quick-add and card selection
   ============================================================ */
.swimlane-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.4rem 0 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
}

.swimlane-title {
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
}

.swimlane-count {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--surface-3);
    border-radius: 999px;
    padding: 0.05rem 0.45rem;
}

.quick-add-btn {
    width: 100%;
    border: 1px dashed var(--border-strong);
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    padding: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.35rem;
}

.quick-add-btn:hover {
    color: var(--brand);
    border-color: var(--brand);
    background: var(--brand-soft);
}

.quick-add-input {
    width: 100%;
    margin-top: 0.35rem;
    border: 1px solid var(--brand);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    padding: 0.45rem 0.55rem;
    font-size: 0.85rem;
}

.card-select {
    margin-right: 0.35rem;
    vertical-align: -1px;
}

.issue-card.selected {
    border-color: var(--brand);
    box-shadow: 0 0 0 1px var(--brand);
}

.bulk-bar {
    position: sticky;
    top: 0.5rem;
    z-index: 20;
}

/* ============================================================
   Links, watchers, comment actions & reactions
   ============================================================ */
.link-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.89rem;
    flex-wrap: wrap;
}

.link-row:last-of-type {
    border-bottom: none;
}

.link-phrase {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: var(--surface-3);
    border-radius: 999px;
    padding: 0.12rem 0.5rem;
    white-space: nowrap;
}

.watch-count {
    background: color-mix(in srgb, currentColor 18%, transparent);
    border-radius: 999px;
    padding: 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    margin-left: 0.15rem;
}

.comment-actions {
    margin-left: auto;
    display: inline-flex;
    gap: 0.4rem;
}

.comment-actions button {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.76rem;
    color: var(--text-faint);
    cursor: pointer;
}

.comment-actions button:hover {
    color: var(--brand);
    text-decoration: underline;
}

.reaction-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.4rem;
    flex-wrap: wrap;
}

.reaction-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid var(--border);
    background: var(--surface-2);
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
    font-size: 0.82rem;
    cursor: pointer;
    line-height: 1.5;
}

.reaction-chip span {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
}

.reaction-chip.mine {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.reaction-chip.mine span {
    color: var(--brand);
}

.reaction-chip:disabled {
    cursor: default;
}

/* The palette only appears on hover so resting comments stay clean. */
.reaction-add {
    display: inline-flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.comment:hover .reaction-add,
.reaction-add:focus-within {
    opacity: 1;
}

.reaction-chip.ghost {
    border-style: dashed;
    background: transparent;
}

/* ============================================================
   Audit log
   ============================================================ */
.audit-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}

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

.audit-cat {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.audit-cat.cat-member { background: color-mix(in srgb, #4f83f1 16%, transparent); color: #4f83f1; }
.audit-cat.cat-project { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.audit-cat.cat-api { background: color-mix(in srgb, #e8863a 18%, transparent); color: #e8863a; }
.audit-cat.cat-security { background: var(--danger-soft); color: var(--danger); }

.audit-text {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.audit-when {
    font-size: 0.78rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================================
   Automation rules
   ============================================================ */
.rule-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
}

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

.rule-toggle {
    display: inline-flex;
    align-items: center;
}

.rule-body {
    flex: 1;
    min-width: 0;
}

.rule-name {
    font-weight: 650;
    font-size: 0.92rem;
}

.rule-desc {
    font-size: 0.83rem;
}

.rule-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    max-width: 720px;
}

.rule-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-width: 340px;
}

.rule-clause {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.rule-clause .form-select {
    width: auto;
    min-width: 150px;
}

.rule-word {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Backlog table */
.v-table th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.v-table th.sortable:hover {
    color: var(--brand);
}

.backlog-table td {
    vertical-align: middle;
}

/* ============================================================
   Command palette (Ctrl+K)
   ============================================================ */
.palette-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 12, 18, 0.55);
    backdrop-filter: blur(3px);
    z-index: 1400;
    animation: v-fade-up 0.15s ease both;
}

.palette {
    position: fixed;
    top: 14vh;
    left: 50%;
    transform: translateX(-50%);
    width: min(620px, calc(100vw - 2rem));
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1401;
    overflow: hidden;
    animation: v-fade-up 0.18s ease both;
}

.palette-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 1.02rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--border);
}

.palette-list {
    max-height: 46vh;
    overflow-y: auto;
    padding: 0.4rem;
}

.palette-section {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-faint);
    padding: 0.55rem 0.7rem 0.25rem;
}

.palette-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.7rem;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
}

.palette-item.active,
.palette-item:hover {
    background: var(--brand-soft);
}

.palette-item .ico {
    width: 15px;
    height: 15px;
    color: var(--text-muted);
}

.palette-item-key {
    color: var(--text-faint);
    font-size: 0.78rem;
    font-weight: 600;
    min-width: 54px;
}

.palette-empty {
    color: var(--text-faint);
    text-align: center;
    padding: 1.2rem;
    font-size: 0.88rem;
}

.palette-hint {
    display: flex;
    gap: 0.9rem;
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-faint);
    font-size: 0.72rem;
}

.kbd {
    display: inline-block;
    padding: 0.05rem 0.35rem;
    border: 1px solid var(--border-strong);
    border-bottom-width: 2px;
    border-radius: 5px;
    background: var(--surface-2);
    font-family: inherit;
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ============================================================
   Activity timeline
   ============================================================ */
.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.timeline li {
    position: relative;
    padding: 0 0 0.9rem 1.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.timeline li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
}

.timeline li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 16px;
    bottom: -2px;
    width: 1px;
    background: var(--border);
}

.timeline .who {
    color: var(--text);
    font-weight: 600;
}

.timeline .when {
    color: var(--text-faint);
    font-size: 0.75rem;
    margin-left: 0.4rem;
}

/* @mentions in comments */
.mention {
    color: var(--brand);
    font-weight: 600;
    background: var(--brand-soft);
    border-radius: 5px;
    padding: 0 0.25rem;
}

/* ============================================================
   Dashboard charts (hand-rolled SVG / CSS bars)
   ============================================================ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.1rem;
}

.stat-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    padding: 0.9rem 1rem;
}

.stat-value {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.2rem;
}

.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.1rem;
}

.hbar-row {
    display: grid;
    grid-template-columns: 110px 1fr 34px;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.55rem;
    font-size: 0.82rem;
}

.hbar-name {
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

.hbar-track {
    height: 10px;
    border-radius: 999px;
    background: var(--surface-3);
    overflow: hidden;
}

.hbar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.hbar-count {
    font-weight: 600;
    color: var(--text);
    font-size: 0.8rem;
}

.spark-chart {
    width: 100%;
    height: auto;
}

.issue-card .issue-key {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-faint);
    letter-spacing: 0.03em;
}

.issue-card .issue-title {
    display: block;
    color: var(--text);
    font-weight: 550;
    font-size: 0.9rem;
    margin: 0.2rem 0 0.55rem;
    line-height: 1.35;
}

.issue-card .issue-title:hover {
    color: var(--brand);
    text-decoration: none;
}

.issue-card-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.issue-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.avatar-sm {
    width: 22px;
    height: 22px;
    font-size: 0.64rem;
    border-radius: 50%;
}

.avatar-placeholder {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px dashed var(--border-strong);
}

.issue-card-move {
    margin-top: 0.55rem;
}

.board-empty {
    color: var(--text-faint);
    font-size: 0.82rem;
    text-align: center;
    padding: 0.75rem 0;
}

/* Drag & drop (pointer-based: mouse + touch) */
.issue-card.is-draggable {
    cursor: grab;
    touch-action: pan-y;
}

.issue-card.is-draggable:active {
    cursor: grabbing;
}

.issue-card.dragging {
    opacity: 0.4;
}

body.is-dragging {
    cursor: grabbing;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.drag-ghost {
    position: fixed;
    transform: translate(-50%, -52%) rotate(2.5deg);
    pointer-events: none;
    z-index: 2000;
    box-shadow: var(--shadow-lg);
    opacity: 0.97;
    margin: 0;
}

.board-column.drag-over {
    background: var(--brand-soft);
    box-shadow: inset 0 0 0 2px var(--brand);
}

.board-column.drag-over .board-column-body {
    outline: 2px dashed var(--brand);
    outline-offset: -6px;
    border-radius: var(--radius-sm);
}

/* ============================================================
   Forms
   ============================================================ */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    padding: 0.5rem 0.7rem;
    font-size: 0.9rem;
    color: var(--text);
    /* Bootstrap defaults these to white, which leaves light text unreadable in dark mode. */
    background-color: var(--surface);
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand);
}

.form-label {
    font-weight: 550;
    font-size: 0.85rem;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.form-text {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.form-narrow {
    max-width: 560px;
}

.validation-message, .text-danger {
    color: var(--danger) !important;
    font-size: 0.83rem;
}

.valid.modified:not([type=checkbox]) {
    outline: none;
    border-color: var(--success);
}

.invalid {
    border-color: var(--danger);
}

/* ============================================================
   Tables
   ============================================================ */
.v-table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

table.v-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

table.v-table th {
    text-align: left;
    padding: 0.7rem 1rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

table.v-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

table.v-table tr:hover td {
    background: var(--surface-2);
}

/* ============================================================
   Alerts
   ============================================================ */
.alert {
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.alert-danger {
    background: var(--danger-soft);
    border-color: #fecaca;
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.alert-info {
    background: var(--brand-soft);
    border-color: #c7d2fe;
    color: #3730a3;
}

/* ============================================================
   Comments
   ============================================================ */
.comment {
    display: flex;
    gap: 0.7rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.comment:last-of-type {
    border-bottom: none;
}

.comment-body {
    flex: 1;
}

.comment-head {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.15rem;
}

.comment-author {
    font-weight: 600;
    font-size: 0.88rem;
}

.comment-time {
    color: var(--text-faint);
    font-size: 0.76rem;
}

.comment-text {
    font-size: 0.9rem;
    color: var(--text);
    white-space: pre-wrap;
}

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

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state h3 {
    color: var(--text);
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.25rem 0;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .nav-toggle:checked ~ .app-sidebar {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .nav-toggle:checked ~ .nav-backdrop {
        display: block;
    }

    .app-main {
        margin-left: 0;
    }

    .nav-hamburger {
        display: inline-flex;
    }

    .app-content {
        padding: 1.1rem;
    }
}

@media (max-width: 560px) {
    .page-header h1 {
        font-size: 1.35rem;
    }

    .app-topbar {
        padding: 0 1rem;
    }
}

/* Blazor error UI */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
    border-radius: var(--radius-sm);
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* ---------------------------------------------------------------- API docs */

.docs {
    min-height: 100vh;
    background: var(--bg);
}

.docs-shell {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 2.5rem;
    max-width: 1080px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.docs-sidebar {
    position: sticky;
    top: 1.5rem;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.88rem;
}

.docs-sidebar a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    border-left: 2px solid transparent;
}

.docs-sidebar a:hover {
    color: var(--text);
    background: var(--surface-2);
}

.docs-sidebar-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    margin: 1.1rem 0 0.35rem 0.6rem;
}

.docs-sidebar-title:first-child {
    margin-top: 0;
}

.docs-body {
    min-width: 0;
}

.docs-body h1 {
    margin-bottom: 0.5rem;
}

.docs-body h2 {
    margin-top: 2.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    scroll-margin-top: 1rem;
}

.docs-body h3 {
    margin-top: 1.75rem;
    font-size: 1.02rem;
}

.docs-lead {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 62ch;
}

.docs-muted {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.docs-callout {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--brand);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1rem;
    margin: 1.1rem 0;
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.docs-callout-warn {
    border-left-color: #d97706;
    display: block;
}

.docs-code {
    background: #0f1220;
    color: #e6e8f0;
    border-radius: var(--radius-sm);
    padding: 0.9rem 1rem;
    overflow-x: auto;
    font-size: 0.83rem;
    line-height: 1.55;
    margin: 0.75rem 0 1.1rem;
}

.docs-code code {
    color: inherit;
    background: none;
    padding: 0;
    white-space: pre;
}

.docs-inline {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.05rem 0.32rem;
    font-size: 0.85em;
    color: var(--text);
    white-space: nowrap;
}

.docs-steps {
    padding-left: 1.15rem;
    color: var(--text-muted);
    line-height: 1.85;
    max-width: 68ch;
}

.docs-steps strong {
    color: var(--text);
}

.docs-table-wrap {
    overflow-x: auto;
    margin: 0.75rem 0 1.1rem;
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.docs-table th,
.docs-table td {
    text-align: left;
    padding: 0.5rem 0.7rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.docs-table th {
    color: var(--text-faint);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.endpoint {
    margin: 1.4rem 0 0.5rem;
}

.endpoint-line {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.endpoint-method {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    color: #fff;
    flex-shrink: 0;
}

.method-get { background: #2563eb; }
.method-post { background: #16a34a; }
.method-patch { background: #d97706; }
.method-delete { background: #dc2626; }

.endpoint-path {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-all;
}

.endpoint-summary {
    margin: 0.4rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 68ch;
}

.docs-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.docs-footer p {
    margin: 0;
    color: var(--text-muted);
    max-width: 46ch;
}

@media (max-width: 820px) {
    .docs-shell {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .docs-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .docs-sidebar-title {
        display: none;
    }

    .docs-sidebar a {
        border: 1px solid var(--border);
        font-size: 0.82rem;
    }
}

/* ------------------------------------------------- landing: new sections */

.hero-eyebrow {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1.4rem;
    margin-top: 1.4rem;
    color: var(--text-muted);
    font-size: 0.86rem;
}

/* Live-looking insight strip under the mock board. The mock is a flex row, so the strip
   opts out onto its own line with flex-basis rather than a grid span. */
.mock-insight {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.9rem;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.mock-insight strong {
    color: var(--text);
}

.mock-insight-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    flex-shrink: 0;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.82); }
}

@media (prefers-reduced-motion: reduce) {
    .mock-insight-dot { animation: none; }
}

/* Problems → solutions */

.landing-problems {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 1.5rem 1rem;
    text-align: center;
}

.problem-grid {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 2.25rem;
    text-align: left;
}

.problem-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    gap: 0.9rem;
}

.problem-before,
.problem-after {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
}

.problem-after {
    border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
    background: color-mix(in srgb, var(--brand) 4%, var(--surface));
}

.problem-before p,
.problem-after p {
    margin: 0.4rem 0 0;
    font-size: 0.94rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.problem-after p {
    color: var(--text);
}

.problem-tag {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.problem-tag.good {
    color: var(--brand);
}

.problem-arrow {
    display: flex;
    align-items: center;
    color: var(--text-faint);
    font-size: 1.15rem;
}

/* Customer portal */

.landing-portal {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: center;
    max-width: 1080px;
    margin: 0 auto;
    padding: 4.5rem 1.5rem;
}

.portal-copy h2 {
    margin-bottom: 0.6rem;
}

.portal-copy > p {
    color: var(--text-muted);
    line-height: 1.65;
}

.portal-points {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.portal-points li {
    position: relative;
    padding-left: 1.6rem;
    color: var(--text-muted);
    font-size: 0.94rem;
}

.portal-points li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--brand);
    font-weight: 700;
}

.portal-points strong {
    color: var(--text);
}

.portal-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.portal-form {
    width: 100%;
    max-width: 340px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg, 0 18px 40px rgba(15, 18, 32, 0.12));
    padding: 1.1rem;
}

.portal-form-head {
    font-weight: 650;
    margin-bottom: 0.8rem;
}

.portal-field {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.7rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.portal-field.tall { padding-bottom: 1.6rem; }
.portal-field.small { font-size: 0.8rem; }

.portal-send {
    background: var(--brand);
    color: #fff;
    text-align: center;
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.portal-arrow {
    color: var(--text-faint);
    font-size: 1.3rem;
}

.portal-ticket {
    width: 100%;
    max-width: 340px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--brand);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.85rem;
    font-size: 0.88rem;
}

.portal-badge {
    margin-left: auto;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 12%, transparent);
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

/* Time saved */

.landing-time {
    max-width: 1080px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem;
    text-align: center;
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    text-align: left;
}

.time-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
}

.time-head {
    font-weight: 650;
    margin-bottom: 0.35rem;
}

.time-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* API strip */

.landing-api {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1080px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem;
}

.api-copy h2 { margin-bottom: 0.6rem; }

.api-copy p {
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.api-code {
    background: #0f1220;
    color: #e6e8f0;
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
    font-size: 0.82rem;
    line-height: 1.6;
    overflow-x: auto;
    margin: 0;
}

.api-code code {
    background: none;
    color: inherit;
    padding: 0;
    white-space: pre;
}

/* FAQ */

.landing-faq {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem;
    text-align: center;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.1rem 2rem;
    margin-top: 2rem;
    text-align: left;
}

.faq-item h3 {
    font-size: 0.98rem;
    margin-bottom: 0.3rem;
}

.faq-item p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* Final CTA */

.landing-final-cta {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 4rem 1.5rem 4.5rem;
}

.landing-final-cta p {
    color: var(--text-muted);
    margin: 0.6rem 0 1.6rem;
    font-size: 1.02rem;
}

.nowrap { white-space: nowrap; }

@media (max-width: 860px) {
    .landing-portal,
    .landing-api {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .problem-row {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .problem-arrow {
        justify-content: center;
        transform: rotate(90deg);
    }
}

/* ---------------------------------------------------------------- blog */

.blog-index,
.blog-article {
    max-width: 760px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 1rem;
}

.blog-index { max-width: 1000px; }

.blog-index-head {
    text-align: center;
    margin-bottom: 2.5rem;
}

.blog-index-head p {
    color: var(--text-muted);
    max-width: 56ch;
    margin: 0.6rem auto 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.1rem;
}

.blog-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.blog-card:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
}

.blog-card h2,
.blog-card h3 {
    font-size: 1.04rem;
    line-height: 1.4;
    margin: 0.5rem 0;
}

.blog-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0 0 0.75rem;
}

.blog-card-cat {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--brand);
}

.blog-card-meta {
    font-size: 0.8rem;
    color: var(--text-faint);
}

.blog-crumbs {
    font-size: 0.84rem;
    color: var(--text-faint);
    margin-bottom: 1rem;
}

.blog-crumbs a { color: var(--text-muted); }
.blog-crumbs span { margin: 0 0.25rem; }

.blog-article h1 {
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.blog-lead {
    font-size: 1.08rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.blog-meta {
    font-size: 0.84rem;
    color: var(--text-faint);
    padding-bottom: 1.5rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--border);
}

/* Long-form reading column: generous line height, comfortable measure. */
.blog-body {
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--text);
}

.blog-body h2 {
    margin: 2.25rem 0 0.75rem;
    font-size: 1.35rem;
}

.blog-body h3 {
    margin: 1.75rem 0 0.5rem;
    font-size: 1.08rem;
}

.blog-body p { margin: 0 0 1.1rem; }

.blog-body ul {
    margin: 0 0 1.2rem;
    padding-left: 1.3rem;
}

.blog-body li { margin-bottom: 0.55rem; }

.blog-body blockquote {
    margin: 1.4rem 0;
    padding: 0.9rem 1.2rem;
    border-left: 3px solid var(--brand);
    background: var(--surface-2);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-muted);
    font-size: 0.97rem;
}

.blog-body code {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.05rem 0.32rem;
    font-size: 0.88em;
}

.blog-inline-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin: 2.5rem 0;
    padding: 1.25rem 1.4rem;
    background: color-mix(in srgb, var(--brand) 6%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border));
    border-radius: var(--radius);
}

.blog-inline-cta span {
    display: block;
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-top: 0.2rem;
}

.blog-faq {
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
}

.blog-faq-item { margin-bottom: 1.4rem; }

.blog-faq-item h3 {
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.blog-faq-item p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.65;
}

.blog-related {
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
}

.blog-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.blog-cta {
    max-width: 700px;
    margin: 3rem auto 0;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.blog-cta p {
    color: var(--text-muted);
    margin: 0.6rem 0 1.5rem;
}

/* -------------------------------------------------- smart suggestions */

.smart-icon {
    width: 15px;
    height: 15px;
    color: var(--brand);
    flex-shrink: 0;
}

.smart-panel {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--border));
    border-left: 3px solid var(--brand);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--brand) 5%, var(--surface));
    animation: smart-in 0.18s ease-out;
}

.smart-panel.smart-warn {
    border-color: color-mix(in srgb, #d97706 35%, var(--border));
    border-left-color: #d97706;
    background: color-mix(in srgb, #d97706 6%, var(--surface));
}

.smart-warn .smart-icon { color: #d97706; }

@keyframes smart-in {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .smart-panel { animation: none; }
}

.smart-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 650;
    font-size: 0.9rem;
}

.smart-badge {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 14%, transparent);
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
}

.smart-sub {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.smart-match {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    font-size: 0.86rem;
}

.smart-match:hover { border-color: var(--brand); }

.smart-score {
    font-weight: 700;
    font-size: 0.74rem;
    color: #d97706;
    background: color-mix(in srgb, #d97706 12%, transparent);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.smart-match-key {
    font-weight: 650;
    color: var(--brand);
    flex-shrink: 0;
}

.smart-match-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.smart-match-status {
    font-size: 0.76rem;
    color: var(--text-faint);
    flex-shrink: 0;
}

.smart-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.6rem;
}

.smart-chip {
    background: var(--surface);
    border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border));
    color: var(--text);
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.12s ease;
}

.smart-chip:hover {
    background: color-mix(in srgb, var(--brand) 12%, var(--surface));
}

.smart-hints {
    margin: 0.6rem 0 0;
    padding-left: 1.1rem;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.smart-hints li { margin-bottom: 0.25rem; }

/* ------------------------------------------------- landing: intelligence */

.landing-intel {
    max-width: 1080px;
    margin: 0 auto;
    padding: 4.5rem 1.5rem 3.5rem;
}

.intel-head {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.intel-head h2 {
    line-height: 1.25;
    margin-bottom: 0.6rem;
}


/* The one capability that earns a demo: showing it beats describing it. */
.intel-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.1rem;
}

.intel-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 0.6rem;
}

.intel-feature-copy h3 {
    font-size: 1.3rem;
    line-height: 1.3;
    margin-bottom: 0.6rem;
}

.intel-feature-copy p {
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
}

.intel-feature-visual {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.intel-mock-field {
    background: var(--surface-2);
    border: 1px solid var(--brand);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.75rem;
    font-size: 0.88rem;
}

.intel-mock-panel {
    border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--border));
    border-left: 3px solid var(--brand);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--brand) 5%, var(--surface));
    padding: 0.65rem 0.8rem;
}

.intel-mock-panel.warn {
    border-color: color-mix(in srgb, #d97706 35%, var(--border));
    border-left-color: #d97706;
    background: color-mix(in srgb, #d97706 6%, var(--surface));
}

.intel-mock-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.84rem;
    font-weight: 650;
}

.intel-spark { color: var(--brand); }
.intel-mock-panel.warn .intel-spark { color: #d97706; }

.intel-mock-badge {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 14%, transparent);
    padding: 0.1rem 0.36rem;
    border-radius: 999px;
}

.intel-mock-match {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.4rem 0.55rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
}

.intel-mock-score {
    font-weight: 700;
    font-size: 0.72rem;
    color: #d97706;
    background: color-mix(in srgb, #d97706 12%, transparent);
    padding: 0.08rem 0.32rem;
    border-radius: 4px;
}

.intel-mock-key {
    font-weight: 650;
    color: var(--brand);
}

.intel-mock-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.55rem;
}

.intel-mock-chip {
    background: var(--surface);
    border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border));
    border-radius: 999px;
    padding: 0.24rem 0.62rem;
    font-size: 0.78rem;
}

/* Two-by-two on desktop: four equal cards under the featured block read as a set,
   where an auto-fit grid wraps to an unbalanced 3 + 1. */
.intel-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.1rem;
}

@media (max-width: 700px) {
    .intel-grid { grid-template-columns: 1fr; }
}

.intel-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.intel-card:hover {
    border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
    transform: translateY(-2px);
}

.intel-card h3 {
    font-size: 1.02rem;
    line-height: 1.35;
    margin: 0.75rem 0 0.5rem;
}

.intel-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.intel-badge {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 750;
    font-size: 1rem;
    background: color-mix(in srgb, var(--brand) 12%, transparent);
    color: var(--brand);
}

.intel-badge.score { background: color-mix(in srgb, #16a34a 14%, transparent); color: #16a34a; }
.intel-badge.warn { background: color-mix(in srgb, #d97706 14%, transparent); color: #d97706; }
.intel-badge.danger { background: color-mix(in srgb, #dc2626 14%, transparent); color: #dc2626; }

.intel-footnote {
    text-align: center;
    margin: 2rem auto 0;
    max-width: 60ch;
    font-size: 0.9rem;
    color: var(--text-muted);
}

@media (max-width: 860px) {
    .intel-feature {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.4rem;
    }
}

/* People who've worked on similar issues, shown under the suggestion chips. */
.smart-person {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-right: 0.75rem;
}

.smart-person .muted { font-size: 0.8rem; }

.smart-related h4 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ---------------------------------------------------------------- integrations */

.integration-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.9rem;
    align-items: end;
}

.integration-form-wide { grid-column: 1 / -1; }

.integration-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
}

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

.integration-main { flex: 1; min-width: 240px; }

.integration-kind {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    margin-right: 0.45rem;
    color: #fff;
}

.kind-slack { background: #4a154b; }
.kind-github { background: #24292f; }
.kind-webhook { background: var(--brand); }

.integration-error {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: #dc2626;
}

.integration-hook {
    margin-top: 0.5rem;
    font-size: 0.82rem;
}

.integration-hook code {
    display: block;
    margin-top: 0.25rem;
    padding: 0.35rem 0.5rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    word-break: break-all;
}

.integration-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* ---------------------------------------------- customer request tracking */

.track-link {
    margin: 1rem 0;
    padding: 0.8rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    text-align: left;
}

.track-link code {
    display: block;
    margin: 0.35rem 0 0.6rem;
    word-break: break-all;
    font-size: 0.8rem;
}

.track-request {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.track-request p {
    margin: 0.4rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.track-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.track-steps li {
    display: flex;
    gap: 0.75rem;
    padding-bottom: 1.1rem;
    position: relative;
}

/* Connector between the step dots. */
.track-steps li:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 16px;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.track-steps li.done:not(:last-child)::before { background: var(--brand); }

.track-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
    margin-top: 2px;
    z-index: 1;
}

.track-steps li.done .track-dot {
    background: var(--brand);
    border-color: var(--brand);
}

.track-steps strong { display: block; font-size: 0.94rem; }

.track-steps span {
    color: var(--text-muted);
    font-size: 0.86rem;
}

/* ---------------------------------------------------------------- invoicing */

.invoice-form,
.invoice-rate-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
    align-items: end;
}

.invoice-rate-row { margin-top: 0.9rem; }

.invoice-status {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    display: inline-block;
}

.status-draft { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.status-sent { background: color-mix(in srgb, #2563eb 15%, transparent); color: #2563eb; }
.status-paid { background: color-mix(in srgb, #16a34a 15%, transparent); color: #16a34a; }
.status-void { background: color-mix(in srgb, #dc2626 12%, transparent); color: #dc2626; }

.invoice-actions {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.v-table .num, .invoice-table .num { text-align: right; }

/* The printable document */

.invoice-toolbar {
    max-width: 780px;
    margin: 1.5rem auto 0.75rem;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.invoice-sheet {
    max-width: 780px;
    margin: 0 auto 3rem;
    padding: 2.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.invoice-head {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.invoice-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
}

.invoice-meta { text-align: right; font-size: 0.9rem; }
.invoice-meta h1 { margin: 0 0 0.4rem; font-size: 1.5rem; }

.invoice-parties {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
    font-size: 0.92rem;
}

.invoice-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 0.25rem;
}

.invoice-client-details { white-space: pre-line; font-size: 0.86rem; }

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.92rem;
}

.invoice-table th,
.invoice-table td {
    text-align: left;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid var(--border);
}

.invoice-table thead th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-faint);
}

.invoice-table tfoot td { border-bottom: none; border-top: 2px solid var(--border); }
.invoice-total { font-size: 1.15rem; font-weight: 700; }

.invoice-foot {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
}

@media print {
    .no-print, .landing-nav, .landing-footer { display: none !important; }
    .invoice-sheet { border: none; margin: 0; padding: 0; max-width: none; }
    body { background: #fff; }
}

/* -------------------------------------------------- landing: the three-tool argument */

.landing-stack {
    max-width: 1080px;
    margin: 0 auto;
    padding: 4rem 1.5rem 3rem;
    text-align: center;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.1rem;
    margin-top: 2.25rem;
    text-align: left;
}

.stack-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
}

.stack-role {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 0.5rem;
}

.stack-card h3 {
    font-size: 1.02rem;
    line-height: 1.35;
    margin: 0 0 0.5rem;
}

.stack-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.stack-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
    margin-top: 1.75rem;
    text-align: left;
}

.stack-compare-side {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.4rem;
    background: var(--surface);
}

.stack-compare-side.good {
    border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
    background: color-mix(in srgb, var(--brand) 5%, var(--surface));
}

.stack-compare-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 0.6rem;
}

.stack-compare-side.good .stack-compare-label { color: var(--brand); }

.stack-compare ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stack-compare li {
    font-size: 0.92rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stack-compare-side.good li { color: var(--text); }
.stack-compare li span { color: var(--text-faint); font-size: 0.86rem; }
.stack-compare-side.good li span { color: var(--brand); }

@media (max-width: 700px) {
    .stack-compare { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- help centre */

.help-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.help-list { display: flex; flex-direction: column; gap: 0.5rem; }

.help-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    background: var(--surface);
}

.help-item:hover { border-color: var(--brand); }

.help-item p {
    margin: 0.2rem 0 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.help-mins {
    font-size: 0.78rem;
    color: var(--text-faint);
    white-space: nowrap;
}

.help-crumb {
    font-size: 0.82rem;
    color: var(--text-faint);
    margin-bottom: 0.3rem;
}

.help-article .blog-body { font-size: 0.97rem; }
.help-article .blog-body h2 { margin-top: 1.8rem; font-size: 1.18rem; }
.help-article .blog-body h3 { margin-top: 1.3rem; font-size: 1rem; }

.help-ticket {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border);
}

.help-ticket:last-child { border-bottom: none; }

.help-ticket-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.help-ticket-head .muted { font-size: 0.8rem; margin-left: auto; }

.help-reply {
    margin-top: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    font-size: 0.87rem;
}

.help-reply p { margin: 0.2rem 0 0; }

.support-status {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
}

.status-open { background: color-mix(in srgb, #2563eb 15%, transparent); color: #2563eb; }
.status-answered { background: color-mix(in srgb, #16a34a 15%, transparent); color: #16a34a; }
.status-closed { background: var(--surface-2); color: var(--text-muted); }

@media (max-width: 900px) {
    .help-layout { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- payments */

.checkout-order {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.payment-status {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
}

.status-created { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.status-pending { background: color-mix(in srgb, #d97706 15%, transparent); color: #d97706; }
.status-captured { background: color-mix(in srgb, #16a34a 15%, transparent); color: #16a34a; }
.status-failed { background: color-mix(in srgb, #dc2626 12%, transparent); color: #dc2626; }
.status-refunded { background: color-mix(in srgb, #6366f1 14%, transparent); color: #6366f1; }
