:root {
    --text: #070b16;
    --text-secondary: #5f6878;
    --text-light: #ffffff;
    --muted: #8f99a8;
    --accent: #0B8F9D;
    --accent-dark: #086F79;
    --accent-soft: #E8F7F9;
    --accent-wash: rgba(11, 143, 157, 0.08);
    --accent-border: rgba(11, 143, 157, 0.28);
    --live-background: #F1FBFA;
    --panel: rgba(255, 255, 255, 0.78);
    --panel-solid: #ffffff;
    --border: rgba(5, 15, 35, 0.10);
    --shadow: 0 14px 36px rgba(3, 42, 48, 0.08);
    --shadow-soft: 0 8px 22px rgba(3, 42, 48, 0.07);
    --sidebar-width: 276px;
    --topbar-height: 58px;
    --radius: .9rem;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    font-size: 14px;
}

body {
    margin: 0;
    overflow: hidden;
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #ffffff;
}

/* Bootstrap 5.0 / 5.1 */
.modal-backdrop {
    background-color: oklab(0.129 -0.0038832 -0.0418201 / 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

    .modal-backdrop.show {
        opacity: 1;
    }

a {
    color: inherit;
    text-decoration: none;
}

button, .btn, .form-select, .form-control {
    font-weight: 500;
}

.btn {
    --bs-btn-padding-y: .34rem;
    --bs-btn-padding-x: .72rem;
    --bs-btn-font-size: .92rem;
}

.btn-sm {
    --bs-btn-padding-y: .24rem;
    --bs-btn-padding-x: .58rem;
    --bs-btn-font-size: .84rem;
}

.form-control,
.form-select {
    min-height: 38px;
    padding-top: .42rem;
    padding-bottom: .42rem;
    font-size: .92rem;
}

.app-shell {
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    width: var(--sidebar-width);
    height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 1rem .875rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    background: rgba(255, 255, 255, 0.56);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(22px);
}

.app-sidebar > *,
.app-mobile-sidebar .offcanvas-body > * {
    flex-shrink: 0;
}

.app-sidebar .mb-4 {
    margin-bottom: 1rem !important;
}

.app-sidebar .mb-3 {
    margin-bottom: .65rem !important;
}

.app-sidebar .btn-livelm,
.app-sidebar .new-workspace-menu .btn-livelm,
.app-mobile-sidebar .btn-livelm {
    padding-top: .868rem !important;
    padding-bottom: .868rem !important;
}

.btw-logo {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

img.btw-icon {
    border-radius: 0.7rem;
    background-color: #555;
    opacity: 0.5;
}

.btw-logo {
    display: flex;
    gap: 12px;
    align-items: center;
}

    .btw-logo img {
        height:48px;
    }

        .btw-logo img.btw-icon {
            
        }

        .btw-icon {
            border-radius: 6px;
        }

.livelm-logo {
    padding: 6px 6px 0 !important;
}

.avatar-dot,
.feature-icon,
.send-circle {
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background-color: var(--accent);
    background-color: var(--accent);
    color: var(--text-light);
    box-shadow: 0 6px 16px rgba(11, 143, 157, 0.16);
}

.avatar-dot {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    flex: 0 0 34px;
    font-weight: 700;
    line-height: 1;
}

.feature-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    font-size: 1.1rem;
}

.send-circle {
    width: 36px;
    height: 36px;
    border: 0;
}

.lucide,
.icon-inline {
    width: 1rem;
    height: 1rem;
    stroke-width: 2;
}

.icon-inline {
    flex: 0 0 auto;
}

.send-circle .lucide {
    width: 1.15rem;
    height: 1.15rem;
}

.btn.btn-livelm,
.btn.btn-livelm:active,
.btn.btn-livelm:hover,
.btn.btn-livelm:focus {
    border: 0;
    border-radius: .7rem;
    color: var(--text-light);
    background-color: var(--accent);
    box-shadow: 0 8px 18px rgba(11, 143, 157, 0.16);
}

.new-workspace-menu .btn.btn-livelm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.new-workspace-dropdown {
    min-width: 100%;
    padding: .35rem;
    border: 1px solid var(--border);
    border-radius: .75rem;
    box-shadow: var(--shadow-soft);
}

.new-workspace-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .45rem .55rem;
    border-radius: .55rem;
    color: var(--text);
    font-weight: 600;
}

.new-workspace-dropdown .dropdown-item .lucide {
    width: 1rem;
    height: 1rem;
    color: var(--text-secondary);
}

.new-workspace-dropdown .dropdown-item:hover,
.new-workspace-dropdown .dropdown-item:focus {
    background: var(--live-background);
}

.btn-pill,
.btn-pill:hover,
.btn-pill:focus {
    border-radius: .7rem;
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
}

.sidebar-link,
.history-item {
    padding: .42rem .72rem !important;
    border: 1px solid transparent;
    border-radius: .7rem;
    color: var(--text);
    background: transparent;
    /*transition: background-color .16s ease, border-color .16s ease, transform .16s ease;*/
}

    .sidebar-link:hover,
    .history-item:hover {
        background: oklch(98.4% 0.003 247.858);
        /*border-color: var(--border);*/
        /*transform: translateY(-1px);*/
    }

    .history-item.active {
        background: oklch(96.8% 0.007 247.896);
        /*border-color: var(--border);*/
        /*transform: translateY(-1px);*/
    }

.js-new-workflow.active,
.js-new-chat.active {
    border-color: var(--accent-border);
    background: var(--accent-wash);
}

.tool-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    border-radius: .7rem;
}

.tool-item > i,
.tool-item > .lucide {
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1;
}

.tool-copy {
    display: grid;
    gap: .08rem;
    min-width: 0;
}

.tool-title {
    color: var(--text);
    font-weight: 500;
    line-height: 1.15;
}

.tool-subtitle {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: .82rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 400;
}

.chat-history-section {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
}

#desktopChatHistory,
#mobileChatHistory {
    overflow: visible;
}

.sidebar-footer-links {
    flex: 0 0 auto;
}

.workflow-history-section {
    flex: 0 0 auto;
}

.history-view-all {
    color: var(--text-secondary);
}

    .history-view-all:hover {
        color: var(--text);
    }

.history-empty {
    color: var(--text-secondary);
    font-size: .88rem;
}

.chat-history-row {
    display: flex;
    align-items: center;
    gap: .25rem;
    min-width: 0;
}

.chat-history-row .history-item {
    flex: 1 1 auto;
    width: auto;
}

.chat-history-delete,
.chat-history-cancel {
    display: none;
    place-items: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border: 1px solid transparent;
    border-radius: .7rem;
    color: var(--text-secondary);
    background: transparent;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.chat-history-row.is-showing-actions .chat-history-delete,
.chat-history-row.is-showing-actions .chat-history-cancel {
    display: inline-grid;
}

    .chat-history-delete:hover,
    .chat-history-delete:focus-visible {
        color: #b42318;
        border-color: rgba(180, 35, 24, .18);
        background: rgba(180, 35, 24, .08);
    }

    .chat-history-cancel:hover,
    .chat-history-cancel:focus-visible {
        color: var(--accent);
        border-color: rgba(11, 143, 157, .18);
        background: rgba(11, 143, 157, .08);
    }

.chat-history-item,
.workflow-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .45rem;
    min-width: 0;
    max-width: 100%;
}

.chat-history-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.chat-history-badge {
    flex: 0 0 auto;
    border-radius: .7rem;
    padding: .1rem .38rem;
    color: var(--text-secondary);
    background: var(--live-background);
    font-size: .7rem;
    line-height: 1.2;
}

.app-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    z-index: 1030;
    min-height: var(--topbar-height);
    padding-right: calc(1rem + 15px) !important;
    background: rgba(255, 255, 255, 0.74);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
}

.topbar-content {
    width: min(100%, 1140px);
    margin-inline: auto;
}

.auth-actions {
    min-width: 0;
}

.auth-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    white-space: nowrap;
}

.member-state {
    --member-state-accent: var(--accent);
    --member-state-accent-soft: rgba(11, 143, 157, 0.14);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    max-width: min(34vw, 340px);
    min-height: 2rem;
    padding: 0.2rem 0.62rem 0.2rem 0.24rem;
    color: var(--text);
    background: var(--live-background);
    border: 1px solid var(--border);
    border-radius: .7rem;
    box-shadow: 0 8px 18px rgba(3, 42, 48, 0.06);
}

.account-avatar-button {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: 0;
    border: 0;
    color: var(--accent-dark);
    background: transparent;
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
}

.account-avatar-initial {
    display: inline-grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border: 1px solid var(--accent);
    border-radius: 50%;
    color: #fff;
    background: var(--accent);
    font-size: .78rem;
    font-weight: 800;
}

.account-avatar-chevron {
    width: .9rem;
    height: .9rem;
    stroke-width: 2;
    transition: transform 160ms ease;
}

.account-avatar-button:hover,
.account-avatar-button:focus-visible,
.account-avatar-button[aria-expanded="true"] {
    outline: none;
}

.account-avatar-button:hover .account-avatar-initial,
.account-avatar-button:focus-visible .account-avatar-initial,
.account-avatar-button[aria-expanded="true"] .account-avatar-initial {
    border-color: var(--accent-dark);
    background: var(--accent-dark);
    box-shadow: 0 0 0 3px var(--member-state-accent-soft);
}

.account-avatar-button[aria-expanded="true"] .account-avatar-chevron {
    transform: rotate(180deg);
}

.account-avatar-button.dropdown-toggle::after {
    display: none;
}

.account-menu-dropdown {
    min-width: 230px;
    padding: .35rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.account-menu-identity {
    display: grid;
    gap: .12rem;
    min-width: 0;
    padding: .55rem .65rem .45rem;
}

.account-menu-identity small {
    color: var(--text-secondary);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.account-menu-identity span {
    overflow: hidden;
    color: var(--text);
    font-size: .82rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-menu-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    padding: .52rem .65rem;
    border-radius: 6px;
    color: var(--text);
    font-size: .85rem;
}

.account-menu-dropdown .dropdown-item:hover,
.account-menu-dropdown .dropdown-item:focus {
    color: var(--accent-dark);
    background: var(--live-background);
}

.account-menu-dropdown .dropdown-item .lucide {
    width: .95rem;
    height: .95rem;
    color: currentColor;
}

.member-state-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.58rem;
    height: 1.58rem;
    border-radius: .7rem;
    color: #ffffff;
    background: var(--member-state-accent);
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
}

.member-state-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-size: 0.83rem;
    font-weight: 750;
    letter-spacing: 0;
}

.workspace-wave-field {
    position: fixed;
    top: var(--topbar-height);
    right: 0;
    bottom: 0;
    left: var(--sidebar-width);
    z-index: 0;
    width: calc(100vw - var(--sidebar-width));
    height: calc(100vh - var(--topbar-height));
    pointer-events: none;
    opacity: .82;
    background:
        radial-gradient(circle at 70% 12%, rgba(11, 143, 157, 0.13), transparent 22rem),
        linear-gradient(180deg, #f0f8f9 0%, #ffffff 54%, #f7fbff 100%);
}

.top-nav .dropdown {
    display: flex;
    align-items: center;
    margin: 0;
}

    .app-main {
        position: relative;
        z-index: 1;
        margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
    min-height: 100vh;
}

.chat-scroll {
    height: calc(100vh - var(--topbar-height));
    overflow-y: auto;
    scrollbar-gutter: stable;
    /*padding: 1rem 1rem 10rem;*/
    padding: 1rem 1rem calc(var(--topbar-height) + 70px);
}

.chat-container {
    width: min(100%, 1140px);
    margin: 0 auto;
    padding-bottom: 24px;
}

.welcome-card,
.live-topics-panel,
.deep-research-card,
.composer,
.message-bubble {
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.welcome-card {
    border-radius: 1rem;
    padding: 1.15rem;
}

.welcome-card.welcome-card-flat {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.tool-welcome-card {
    display: block;
}

.tool-intro-kicker {
    color: var(--text);
    font-size: 1rem;
    font-weight: 750;
}

.trending-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .45rem;
}

.trending-updated-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    white-space: nowrap;
    color: var(--accent-dark);
    background: transparent;
    font-size: 1rem;
    padding: .35rem .5rem;
    font-weight: 600;
    line-height: 1.5;
}

.trending-updated-badge::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-dark);
    content: "";
}

.trending-updated-badge.is-refreshed::before {
    animation: trending-status-pulse .8s ease-out;
}

@keyframes trending-status-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(11, 143, 157, .35);
    }

    100% {
        box-shadow: 0 0 0 7px rgba(11, 143, 157, 0);
    }
}

.trending-topics-shell {
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.trending-table-wrap {
    border-top: 1px solid var(--border);
    overflow-x: auto;
}

.trending-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    table-layout: fixed;
}

.trending-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: .48rem .75rem;
    background: rgba(248, 251, 252, .92);
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    text-align: left;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-wrap: nowrap;
}

.trending-table th:nth-child(1),
.trending-table td:nth-child(1) {
    width: 4rem;
}

.trending-table th:nth-child(2),
.trending-table td:nth-child(2) {
    width: 18%;
}

.trending-table th:nth-child(3),
.trending-table td:nth-child(3) {
    width: 16rem;
}

.trending-table th:nth-child(4),
.trending-table td:nth-child(4) {
    width: 6.5rem;
}

.trending-table th:nth-child(5),
.trending-table td:nth-child(5),
.trending-table th:nth-child(6),
.trending-table td:nth-child(6),
.trending-table th:nth-child(7),
.trending-table td:nth-child(7) {
    width: 6rem;
}

.trending-table th:nth-child(8),
.trending-table td:nth-child(8) {
    width: 16rem;
}

.trending-table th:nth-child(9),
.trending-table td:nth-child(9) {
    width: 5rem;
}

    .trending-table td {
        padding: .48rem .75rem;
        border-bottom: 1px solid rgba(5, 15, 35, 0.06);
        color: var(--text);
        font-size: .88rem;
        vertical-align: middle;
        min-width: 0;
        /*overflow: hidden;*/
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .trending-topic-row[hidden] {
        display: none !important;
    }

    .trending-topic-row:last-child td {
        border-bottom: 0;
    }

.trending-topic-rank,
.trending-topic-meta {
    color: var(--text-secondary);
}

.trending-topic-title {
    font-weight: 600;
}

.trending-topic-title-button {
    max-width: 100%;
    border: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    font-weight: 600;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trending-topic-title-button:hover,
.trending-topic-title-button:focus {
    color: var(--accent-dark);
    text-decoration: underline;
    text-underline-offset: .18rem;
}

.trending-topic-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    min-height: 1.5rem;
    padding: .16rem .45rem;
    border-radius: .38rem;
    color: var(--text-secondary);
    background: var(--live-background);
    font-size: .78rem;
}

.trending-pin-btn {
    min-height: 1.72rem;
    padding: .12rem .52rem;
    border-color: var(--accent-border);
    border-radius: .55rem;
    color: var(--accent-dark);
    background: rgba(255, 255, 255, .86);
    font-size: .8rem;
}

    .trending-pin-btn:hover,
    .trending-pin-btn:focus {
        border-color: rgba(11, 143, 157, .46);
        color: var(--accent-dark);
        background: var(--accent-wash);
    }

.topic-action-dropdown {
    display: inline-flex;
    justify-content: flex-end;
}

.topic-action-menu {
    min-width: 190px;
    padding: .35rem;
    border: 1px solid var(--border);
    border-radius: .7rem;
    box-shadow: var(--shadow-soft);
}

.topic-action-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: .45rem;
    border-radius: .5rem;
    padding: .42rem .52rem;
    color: var(--text);
    font-size: .86rem;
}

.topic-action-menu .dropdown-item .lucide {
    width: .92rem;
    height: .92rem;
    color: var(--text-secondary);
}

.topic-action-menu .dropdown-item:hover,
.topic-action-menu .dropdown-item:focus {
    background: var(--live-background);
}

.trending-empty {
    padding: 1rem;
    color: var(--text-secondary);
    font-size: .9rem;
}

.workflow-builder-card {
    padding-bottom: 1rem;
}

.trending-topic-context {
    overflow: hidden;
    text-overflow: ellipsis;
}

.trending-topic-context-button {
    display: block;
    max-width: 100%;
    overflow: hidden;
    border: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trending-topic-context-button + .trending-topic-context-button {
    margin-top: .16rem;
}

.trending-topic-context-button:hover,
.trending-topic-context-button:focus-visible {
    color: var(--accent-dark);
    text-decoration: underline;
    text-underline-offset: .18rem;
    outline: 0;
}

.trending-topic-context-empty {
    color: var(--text-secondary);
}

.topbar-menu-button {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
}

.topbar-menu-button .lucide {
    width: 20px;
    height: 20px;
}

.workflow-run-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.workflow-timezone-field {
    max-width: 420px;
}

.workflow-run-dashboard {
    border-top: 1px solid #dce5e8;
    padding: 22px 24px 26px;
    background: #fbfcfc;
}

.workflow-run-status {
    color: #153d43;
    font-size: 1rem;
    font-weight: 650;
}

.workflow-run-timing,
.workflow-run-history-empty,
.workflow-run-empty {
    color: #718086;
    font-size: 0.82rem;
}

.workflow-run-empty {
    padding: 20px 0 4px;
}

.workflow-run-section {
    margin-top: 20px;
}

.workflow-run-sources {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.workflow-run-source {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 9px 11px;
    border: 1px solid #dce5e8;
    border-radius: 6px;
    background: #fff;
}

.workflow-run-source span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85rem;
}

.workflow-run-source small {
    color: #75858a;
    white-space: nowrap;
}

.workflow-run-output {
    max-height: 560px;
    overflow: auto;
    padding: 16px;
    border: 1px solid #dce5e8;
    border-radius: 6px;
    background: #fbfcfc;
    font-size: 0.9rem;
    line-height: 1.55;
}

.workflow-run-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding: 10px 12px;
    border-left: 3px solid #b54848;
    background: #fff6f6;
    color: #7b2e2e;
    font-size: 0.84rem;
}

.workflow-delivery-error {
    border-left-color: #9a7b2f;
    background: #fffaf0;
    color: #70581d;
}

.workflow-run-history {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    overflow-x: auto;
}

.workflow-run-history-heading {
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: .72rem;
    font-weight: 750;
    text-transform: uppercase;
}

.workflow-run-history-item {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-start;
    min-width: 150px;
    padding: 8px 10px;
    border: 1px solid #dce5e8;
    border-radius: 6px;
    background: #fff;
    color: #30464b;
}

.workflow-run-history-item.active,
.workflow-run-history-item:hover {
    border-color: #0b8f9d;
    background: #eefafa;
}

.workflow-run-history-item small {
    margin-top: 2px;
    color: #7a888c;
    font-size: 0.72rem;
}

@media (max-width: 700px) {
    .workflow-run-dashboard-header,
    .workflow-saved-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .workflow-saved-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .workflow-run-sources {
        grid-template-columns: 1fr;
    }
}

.workflow-builder-card.is-saved-workflow .workflow-form-shell {
    margin-top: 1.2rem;
}

.workflow-builder-header {
    margin-top: 0;
    margin-bottom: 1.35rem;
}

.workflow-mode-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    width: 100%;
    min-height: 80px;
    box-sizing: border-box;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(11, 143, 157, .22);
    border-left: 3px solid var(--accent-dark);
    border-radius: 8px;
    background: #e8f7f9;
    box-shadow: none;
}

.workflow-mode-heading {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
}

.workflow-mode-heading > div {
    min-width: 0;
}

.workflow-mode-description {
    margin: 0;
    color: var(--text-secondary);
    font-size: .88rem;
    line-height: 1.45;
}

.workflow-mode-icon {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(11, 143, 157, .22);
    border-radius: 8px;
    color: var(--accent-dark);
    background: #fff;
    box-shadow: none;
}

.workflow-mode-icon .lucide {
    width: 20px;
    height: 20px;
}

.workflow-mode-eyebrow {
    margin-bottom: .12rem;
    color: var(--accent-dark);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.mode-header-action {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: .35rem;
    padding: .35rem .5rem;
    border: 0;
    color: var(--accent-dark);
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
}

.mode-header-action .lucide {
    width: .9rem;
    height: .9rem;
}

.mode-header-action:hover,
.mode-header-action:focus-visible {
    border-color: transparent;
    color: var(--accent);
    background: transparent;
    text-decoration: underline;
    text-underline-offset: .18rem;
}

.workflow-intro {
    padding: 1.5rem;
}

.workflow-intro-copy {
    width: 100%;
}

.workflow-intro-copy h2 {
    margin: .2rem 0 .45rem;
    font-size: 1.5rem;
    font-weight: 760;
}

.workflow-intro-copy p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.55;
}

.workflow-intro-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.workflow-intro-steps > div {
    min-width: 0;
    padding-top: .9rem;
    border-top: 2px solid rgba(11, 143, 157, .22);
}

.workflow-intro-steps span,
.workflow-intro-steps strong,
.workflow-intro-steps small {
    display: block;
}

.workflow-intro-steps span {
    margin-bottom: .45rem;
    color: var(--accent-dark);
    font-size: .72rem;
    font-weight: 800;
}

.workflow-intro-steps strong {
    margin-bottom: .25rem;
    font-size: .9rem;
}

.workflow-intro-steps small {
    color: var(--text-secondary);
    font-size: .78rem;
    line-height: 1.45;
}

.workflow-intake {
    padding: 1.25rem;
}

.workflow-intake-copy {
    min-width: 0;
    max-width: 650px;
    margin-bottom: 1rem;
}

.workflow-intake-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.workflow-intake-header .workflow-intake-copy {
    margin-bottom: 0;
}

.workflow-intake-name {
    max-width: 520px;
    margin-bottom: 1rem;
}

.workflow-intake-copy h2,
.workflow-definition-header h2 {
    margin: 0 0 .35rem;
    font-size: 1.3rem;
    font-weight: 750;
}

.workflow-intake-copy p,
.workflow-definition-header p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.55;
}

.workflow-prompt-shell {
    max-width: 860px;
    border: 1px solid rgba(11, 143, 157, .36);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(5, 15, 35, .08);
}

.workflow-prompt {
    min-height: 150px;
    padding: 1rem 1.05rem .75rem;
    border: 0;
    border-radius: 8px;
    resize: vertical;
    box-shadow: none !important;
    font-size: 1rem;
    line-height: 1.55;
}

.workflow-intake-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    margin: 1.25rem -1.25rem -1.25rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
}

.workflow-intake-actions .btn,
.workflow-text-button {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.workflow-intake-actions .lucide,
.workflow-text-button .lucide {
    width: 1rem;
    height: 1rem;
}

.workflow-intro-actions {
    justify-content: center;
    margin: 1.5rem 0 0;
    padding: 1.35rem 0 0;
}

.workflow-intro-actions .js-start-workflow {
    min-height: 46px;
    padding-right: 1.5rem !important;
    padding-left: 1.5rem !important;
    font-weight: 700;
}

.workflow-advanced-menu,
.js-back-to-guided-setup {
    margin-right: auto;
}

.workflow-advanced-menu .dropdown-menu {
    min-width: 240px;
    padding: .35rem;
    border-color: var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.workflow-advanced-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .65rem;
    border-radius: 6px;
    color: var(--text);
    font-size: .875rem;
}

.workflow-advanced-menu .dropdown-item:hover,
.workflow-advanced-menu .dropdown-item:focus {
    color: var(--accent-dark);
    background: var(--live-background);
}

.workflow-advanced-menu .dropdown-item .lucide {
    width: 1rem;
    height: 1rem;
}

.workflow-starters-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.1rem 0 .35rem;
    color: var(--text-secondary);
    font-size: .72rem;
    font-weight: 650;
}

.workflow-starters-optional {
    color: #8a9699;
    font-size: .64rem;
    font-weight: 650;
    text-transform: uppercase;
}

.workflow-starter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .35rem;
}

.workflow-starter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-width: 0;
    min-height: 38px;
    padding: .4rem .55rem;
    border: 1px solid #e1e7e8;
    border-radius: 5px;
    color: var(--text);
    background: rgba(255, 255, 255, .62);
    text-align: left;
    transition: border-color .16s ease, background-color .16s ease;
}

.workflow-starter:hover,
.workflow-starter:focus-visible,
.workflow-starter.active {
    border-color: rgba(11, 143, 157, .34);
    background: var(--accent-wash);
    outline: 0;
}

.workflow-starter-icon {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 16px;
    height: 16px;
    color: var(--accent-dark);
    background: transparent;
}

.workflow-starter-icon .lucide {
    width: .8rem;
    height: .8rem;
}

.workflow-starter strong,
.workflow-starter small {
    display: block;
}

.workflow-starter strong {
    font-size: .74rem;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
}

.workflow-starter small {
    display: none;
}

.workflow-form-shell {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}

.workflow-definition {
    display: flex;
    flex-direction: column;
}

.workflow-saved-editor {
    display: flex;
    flex-direction: column;
}

.workflow-success {
    display: flex;
    min-height: 360px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.25rem;
    text-align: center;
}

.workflow-success-icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    border: 1px solid rgba(11, 143, 157, .28);
    border-radius: 8px;
    color: #fff;
    background: var(--accent-dark);
}

.workflow-success-icon .lucide {
    width: 24px;
    height: 24px;
    stroke-width: 2.4;
}

.workflow-success-copy h2 {
    margin: 0 0 .4rem;
    font-size: 1.35rem;
    font-weight: 750;
}

.workflow-success-copy p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.55;
}

.workflow-success-copy strong {
    color: var(--text);
    font-weight: 650;
}

.workflow-success-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    margin-top: 1.5rem;
}

.workflow-success-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.workflow-success-actions .lucide {
    width: 1rem;
    height: 1rem;
}

.workflow-saved-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1rem;
}

.workflow-saved-header h2 {
    margin: 0 0 .35rem;
    font-size: 1.3rem;
    font-weight: 750;
}

.workflow-saved-header p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.55;
}

.workflow-saved-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem .85rem;
    color: var(--text-secondary);
    font-size: .8rem;
}

.workflow-saved-meta span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.workflow-saved-meta strong {
    color: var(--text);
    font-weight: 650;
}

.workflow-saved-meta .lucide {
    width: .9rem;
    height: .9rem;
    color: var(--accent-dark);
}

.workflow-saved-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .75rem;
}

.workflow-saved-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.workflow-saved-actions .lucide {
    width: 1rem;
    height: 1rem;
}

.workflow-edit-menu .dropdown-menu {
    min-width: 210px;
    padding: .35rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.workflow-edit-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .65rem;
    border-radius: 6px;
    color: var(--text);
    font-size: .875rem;
}

.workflow-edit-menu .dropdown-item:hover,
.workflow-edit-menu .dropdown-item:focus {
    color: var(--accent-dark);
    background: var(--live-background);
}

.workflow-edit-menu .dropdown-item .lucide {
    width: 1rem;
    height: 1rem;
    color: currentColor;
}

.workflow-edit-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .65rem 1.25rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    background: #f8faf9;
    font-size: .8rem;
}

.workflow-edit-navigation .workflow-text-button {
    padding-left: 0;
    color: var(--accent-dark);
    font-weight: 650;
}

.workflow-prompt-editor-content {
    padding: 0 1.25rem 1.25rem;
}

.workflow-saved-status {
    flex: 0 0 auto;
    padding: .28rem .5rem;
    border: 1px solid rgba(11, 143, 157, .2);
    border-radius: 6px;
    color: var(--accent-dark);
    background: var(--accent-wash);
    font-size: .68rem;
    font-weight: 750;
    text-transform: uppercase;
}

.workflow-saved-status.is-muted {
    border-color: #d7dfe1;
    color: #69777b;
    background: #f5f7f7;
}

.workflow-master-prompt {
    min-height: 300px;
    font-family: inherit;
    line-height: 1.6;
}

.trending-topic-categories {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    white-space: normal;
}

.workflow-manual-name {
    max-width: 520px;
    margin-bottom: 1rem;
}

.workflow-definition-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    order: 0;
    padding: 1.25rem 1.25rem 1rem;
    background: transparent;
}

.workflow-definition-header > div:first-child {
    min-width: 0;
}

.workflow-progress-note {
    flex: 0 0 auto;
    padding-top: .25rem;
    color: var(--text-secondary);
    font-size: .74rem;
    text-align: right;
    white-space: nowrap;
}

.workflow-progress-note strong {
    color: var(--text);
    font-weight: 700;
}

.workflow-definition .workflow-form-section[data-workflow-step] {
    display: none;
}

.workflow-definition[data-active-step="watch"] [data-workflow-step="watch"],
.workflow-definition[data-active-step="create"] [data-workflow-step="create"],
.workflow-definition[data-active-step="deliver"] [data-workflow-step="deliver"],
.workflow-definition[data-active-step="review"] [data-workflow-step="review"] {
    display: block;
}

.workflow-text-button {
    flex: 0 0 auto;
    padding: .4rem .6rem;
    border: 0;
    color: var(--accent-dark);
    background: transparent;
    font-size: .84rem;
    font-weight: 700;
}

.workflow-watch-section { order: 2; }
.workflow-shape-section { order: 3; }
.workflow-deliver-schedule-section { order: 4; padding-bottom: .45rem !important; border-bottom: 0 !important; }
.workflow-deliver-targets-section { order: 5; padding-top: .45rem !important; }
.workflow-review-section { order: 6; }
.workflow-footer-actions { order: 7; }

.workflow-review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .4rem;
}

.workflow-review-item {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
}

.workflow-review-item summary {
    display: grid;
    grid-template-columns: 5.8rem minmax(0, 1fr) 1rem;
    align-items: center;
    gap: .55rem;
    min-height: 42px;
    padding: .5rem .65rem;
    cursor: pointer;
    list-style: none;
}

.workflow-review-item summary::-webkit-details-marker {
    display: none;
}

.workflow-review-label {
    color: var(--text-secondary);
    font-size: .66rem;
    font-weight: 600;
    text-transform: uppercase;
}

.workflow-review-preview {
    overflow: hidden;
    color: var(--text);
    font-size: .78rem;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workflow-review-item summary .lucide {
    width: .85rem;
    height: .85rem;
    color: var(--text-secondary);
    transition: transform .16s ease;
}

.workflow-review-item[open] summary .lucide {
    transform: rotate(180deg);
}

.workflow-review-full {
    padding: .55rem .65rem .65rem;
    border-top: 1px solid var(--border);
    color: var(--text);
    font-size: .78rem;
    font-weight: 400;
    line-height: 1.5;
}

.workflow-review-prompt {
    width: fit-content;
    margin: .45rem 0 0 auto;
}

.workflow-review-prompt summary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .3rem;
    padding: .3rem 0;
    cursor: pointer;
    list-style: none;
    color: var(--text-secondary);
    font-size: .7rem;
    font-weight: 500;
}

.workflow-review-prompt summary::-webkit-details-marker {
    display: none;
}

.workflow-review-prompt summary .lucide {
    width: .8rem;
    height: .8rem;
    transition: transform .16s ease;
}

.workflow-review-prompt[open] {
    width: 100%;
}

.workflow-review-prompt[open] summary .lucide {
    transform: rotate(180deg);
}

.workflow-review-prompt pre {
    max-height: 320px;
    margin: 0;
    padding: .75rem;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    background: #fbfcfc;
    font: inherit;
    font-size: .8rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.workflow-manual-review {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.workflow-manual-review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem .85rem;
    border-bottom: 1px solid var(--border);
}

.workflow-manual-review-header .workflow-option-label {
    margin-bottom: .1rem;
}

.workflow-manual-review-header h3 {
    margin: 0;
    font-size: .9rem;
    font-weight: 600;
}

.workflow-manual-review-header .btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .35rem;
    padding: .3rem .45rem;
    font-size: .72rem;
}

.workflow-manual-review-header .lucide {
    width: .85rem;
    height: .85rem;
}

.workflow-manual-review pre {
    max-height: 360px;
    margin: 0;
    padding: .85rem;
    overflow: auto;
    color: var(--text);
    background: #fbfcfc;
    font: inherit;
    font-size: .8rem;
    font-weight: 400;
    line-height: 1.55;
    white-space: pre-wrap;
}

.workflow-manual-run-settings {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem .85rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: .7rem;
}

.workflow-manual-run-settings > span {
    flex: 0 0 auto;
    font-weight: 650;
    text-transform: uppercase;
}

.workflow-manual-run-settings > div {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem .65rem;
}

.workflow-manual-run-settings > div span {
    position: relative;
}

.workflow-manual-run-settings > div span + span::before {
    margin-right: .65rem;
    color: #a6b0b2;
    content: "\00b7";
}

.workflow-test-result {
    position: relative;
    margin-top: 1rem;
    padding: 1rem;
    overflow: hidden;
    border: 1px solid rgba(11, 143, 157, .25);
    border-radius: 8px;
    background: #f8fcfb;
}

.workflow-test-result.is-loading {
    border-color: rgba(11, 143, 157, .42);
    background: #f3fbfa;
    box-shadow: 0 6px 18px rgba(8, 103, 111, .08);
}

.workflow-test-result.is-loading::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 34%;
    height: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--accent-dark);
    content: "";
    animation: workflow-test-progress 1.35s ease-in-out infinite;
}

.workflow-test-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.workflow-test-status-line {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 1.4rem;
}

.workflow-test-status-line strong {
    font-size: .92rem;
    font-weight: 650;
}

.workflow-test-loader {
    display: inline-grid;
    place-items: center;
    width: 1.15rem;
    height: 1.15rem;
    color: var(--accent-dark);
}

.workflow-test-loader .lucide {
    width: 1rem;
    height: 1rem;
    animation: workflow-test-spin .8s linear infinite;
}

@keyframes workflow-test-spin {
    to { transform: rotate(360deg); }
}

@keyframes workflow-test-progress {
    0% { transform: translateX(-105%); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(300%); }
}

@media (prefers-reduced-motion: reduce) {
    .workflow-test-loader .lucide,
    .workflow-test-result.is-loading::before {
        animation: none;
    }
}

.workflow-secondary-action {
    border: 1px solid rgba(11, 143, 157, .34);
    color: var(--accent-dark);
    background: #fff;
    font-weight: 700;
}

.workflow-section-heading {
    margin-bottom: .9rem;
}

.workflow-section-heading h2 {
    margin: 0 0 .12rem;
    font-size: .95rem;
    font-weight: 780;
}

.workflow-section-heading p {
    margin: 0;
    color: var(--text-secondary);
    font-size: .82rem;
    line-height: 1.4;
}

.workflow-form-section {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

    .workflow-form-section:last-child {
        border-bottom: 0;
    }

.workflow-label,
.workflow-section-title {
    display: block;
    margin-bottom: .45rem;
    color: var(--text);
    font-size: .9rem;
    font-weight: 750;
}

.workflow-input,
.workflow-textarea {
    border-color: var(--border);
    border-radius: .7rem;
    background: rgba(255, 255, 255, .82);
}

    .workflow-input {
        min-height: 38px;
    }

    .workflow-textarea {
        min-height: 128px;
        resize: vertical;
    }

    .workflow-shape-textarea {
        min-height: 150px;
    }

.workflow-continuity-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.workflow-continuity-title {
    display: block;
    margin-bottom: .2rem;
    color: var(--text);
    font-size: .9rem;
    font-weight: 750;
}

.workflow-continuity-setting p {
    margin: 0;
    color: var(--text-secondary);
    font-size: .82rem;
    line-height: 1.45;
}

.workflow-continuity-setting .form-check-input {
    width: 2.35rem;
    height: 1.25rem;
    margin: 0;
    cursor: pointer;
}

.workflow-continuity-setting .form-check-input:checked {
    border-color: var(--accent-dark);
    background-color: var(--accent-dark);
}

        .workflow-textarea.compact {
            min-height: 88px;
        }

.workflow-chip-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
}

.workflow-chip {
    min-height: 30px;
    padding: .28rem .62rem;
    border: 1px solid var(--border);
    border-radius: .55rem;
    color: var(--text);
    background: rgba(255, 255, 255, .72);
    font-size: .88rem;
}

.workflow-chip .lucide {
    width: .88rem;
    height: .88rem;
    margin-right: .28rem;
}

    .workflow-chip:hover,
    .workflow-chip:focus,
    .workflow-chip.active {
        color: var(--accent-dark);
        border-color: rgba(11, 143, 157, .46);
        background: var(--accent-wash);
    }

.workflow-option-group {
    margin-bottom: .75rem;
}

.workflow-focus-stack {
    display: grid;
    gap: .65rem;
}

.workflow-focus-option {
    border: 1px solid var(--border);
    border-radius: .5rem;
    background: rgba(255, 255, 255, .62);
    transition: border-color .16s ease, background-color .16s ease;
}

.workflow-focus-option.is-enabled {
    border-color: rgba(11, 143, 157, .4);
    background: rgba(240, 251, 251, .7);
}

.workflow-focus-stack.is-invalid .workflow-focus-option {
    border-color: var(--bs-danger);
    color: var(--bs-danger);
}

.workflow-focus-toggle {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .8rem .9rem;
    cursor: pointer;
}

.workflow-focus-toggle .form-check-input {
    flex: 0 0 auto;
    margin: .15rem 0 0;
    cursor: pointer;
}

.workflow-focus-toggle .form-check-input:checked {
    border-color: var(--accent-dark);
    background-color: var(--accent-dark);
}

.workflow-focus-toggle span {
    display: grid;
    gap: .12rem;
}

.workflow-focus-toggle strong {
    color: var(--text);
    font-size: .93rem;
    font-weight: 650;
}

.workflow-focus-toggle small {
    color: var(--text-secondary);
    font-size: .82rem;
    line-height: 1.4;
}

.workflow-focus-fields {
    margin: 0 .9rem;
    padding: .8rem 0 .9rem;
    border-top: 1px solid rgba(15, 23, 42, .08);
}

.workflow-specific-interest-note {
    margin: .28rem 0 .7rem;
    color: var(--text-secondary);
    font-size: .8rem;
    line-height: 1.45;
}

.workflow-number-field {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.workflow-number-field .workflow-input {
    width: 104px;
    flex: 0 0 104px;
}

.workflow-number-field span {
    color: var(--text-secondary);
    font-size: .88rem;
}

.workflow-option-label {
    margin-bottom: .5rem;
    color: var(--text-secondary);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.workflow-category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .42rem;
}

.workflow-input-row,
.workflow-delivery-fields {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .42rem;
}

.workflow-conditional-fields {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .55rem;
}

.workflow-conditional-fields.d-none {
    display: none !important;
}

.workflow-schedule-subfield {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .55rem;
    width: 100%;
}

.workflow-month-day-picker {
    position: relative;
    width: 100%;
    flex: 1 1 100%;
}

.workflow-month-day-toggle {
    width: 100%;
    text-align: left;
}

.workflow-month-day-menu {
    position: absolute;
    z-index: 1080;
    top: calc(100% + 4px);
    right: 0;
    bottom: auto;
    left: 0;
    max-height: 208px;
    overflow-y: auto;
    padding: .3rem;
    border: 1px solid var(--border);
    border-radius: .65rem;
    background: #fff;
    box-shadow: 0 12px 28px rgba(25, 38, 55, .14);
}

.workflow-month-day-option {
    display: block;
    width: 100%;
    min-height: 32px;
    padding: .25rem .55rem;
    border: 0;
    border-radius: .4rem;
    color: var(--text);
    background: transparent;
    text-align: left;
}

.workflow-month-day-option:hover,
.workflow-month-day-option:focus,
.workflow-month-day-option[aria-selected="true"] {
    color: var(--accent-dark);
    background: var(--accent-wash);
    outline: 0;
}

.workflow-input-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 32px;
    padding: .28rem .62rem;
    border: 1px solid rgba(11, 143, 157, .46);
    border-radius: .55rem;
    color: var(--accent-dark);
    background: var(--live-background);
    font-size: .88rem;
    white-space: nowrap;
}

.workflow-keyword-chips {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .42rem;
}

.workflow-chip-remove {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, .72);
}

    .workflow-chip-remove:hover,
    .workflow-chip-remove:focus-visible {
        color: var(--text);
        background: rgba(11, 143, 157, .12);
    }

.workflow-chip-remove .lucide {
    width: .78rem;
    height: .78rem;
}

.workflow-keyword-input {
    flex: 1 1 220px;
    max-width: 320px;
}

.workflow-add-input-btn {
    display: inline-grid;
    place-items: center;
    width: 38px;
    min-height: 38px;
    padding: 0;
    border: 1px solid var(--border);
    color: var(--accent-dark);
    background: #fff;
}

.workflow-add-input-btn .lucide {
    width: 1rem;
    height: 1rem;
}

.workflow-delivery-fields {
    align-items: stretch;
    flex-direction: column;
}

.workflow-delivery-fields .workflow-input {
    width: 100%;
}

.workflow-email-recipient-field {
    width: min(100%, 560px);
}

.workflow-email-recipient-control {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: .55rem;
}

.workflow-email-recipient-list {
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
}

.workflow-email-recipient-list.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 .15rem rgba(220, 53, 69, .12);
}

.workflow-email-recipient-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem;
    min-height: 42px;
    margin: 0;
    padding: .58rem .72rem;
    color: var(--text-primary);
    cursor: pointer;
}

.workflow-email-recipient-option + .workflow-email-recipient-option {
    border-top: 1px solid var(--border-color);
}

.workflow-email-recipient-option:hover {
    background: var(--accent-soft);
}

.workflow-email-recipient-option .form-check-input {
    margin: 0;
}

.workflow-email-recipient-option span {
    min-width: 0;
    overflow: hidden;
    font-size: .9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workflow-email-recipient-option small {
    color: var(--text-secondary);
    font-size: .75rem;
}

.workflow-email-recipient-loading {
    display: block;
    padding: .68rem .75rem;
    color: var(--text-secondary);
    font-size: .86rem;
}

.workflow-add-recipient {
    align-self: flex-start;
    flex: 0 0 auto;
    border: 0;
    padding: 0;
    color: var(--accent-dark);
    background: transparent;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
}

.workflow-add-recipient:hover,
.workflow-add-recipient:focus-visible {
    color: var(--accent);
    text-decoration: underline;
}

.settings-page {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding: 56px 0 80px;
}

.settings-header {
    margin-bottom: 32px;
}

.settings-back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: 22px;
    color: var(--accent-dark);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
}

.settings-back .lucide {
    width: 16px;
    height: 16px;
}

.settings-header h1 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 2rem;
    font-weight: 700;
}

.settings-header p,
.settings-section-heading p,
.settings-form-heading p {
    margin: 0;
    color: var(--text-secondary);
}

.settings-section {
    border-top: 1px solid var(--border);
    padding-top: 28px;
}

.settings-section-heading {
    margin-bottom: 20px;
}

.settings-section-heading h2,
.settings-form-heading h3 {
    margin: 0 0 6px;
    color: var(--text);
    font-weight: 700;
}

.settings-section-heading h2 {
    font-size: 1.2rem;
}

.settings-form-heading h3 {
    font-size: 1rem;
}

.settings-recipient-list {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.settings-recipient {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 68px;
    padding: 14px 16px;
}

.settings-recipient + .settings-recipient {
    border-top: 1px solid var(--border);
}

.settings-recipient-main,
.settings-recipient-actions {
    display: flex;
    align-items: center;
}

.settings-recipient-main {
    min-width: 0;
    gap: 12px;
}

.settings-recipient-main div {
    display: grid;
    min-width: 0;
}

.settings-recipient-main strong {
    overflow: hidden;
    color: var(--text);
    font-size: .94rem;
    font-weight: 600;
    text-overflow: ellipsis;
}

.settings-recipient-main span:not(.settings-recipient-icon) {
    color: var(--text-secondary);
    font-size: .82rem;
}

.settings-recipient-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 6px;
    color: var(--accent-dark);
    background: var(--accent-wash);
}

.settings-recipient-icon .lucide {
    width: 16px;
    height: 16px;
}

.settings-recipient-actions {
    justify-content: flex-end;
    gap: 10px;
}

.settings-recipient-type,
.settings-recipient-state {
    color: var(--text-secondary);
    font-size: .78rem;
    white-space: nowrap;
}

.settings-recipient-state.is-verified {
    color: var(--accent-dark);
}

.settings-icon-button {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    color: var(--text-secondary);
    background: transparent;
}

.settings-icon-button:hover {
    color: #b42318;
    background: #fff1f0;
}

.settings-icon-button .lucide {
    width: 15px;
    height: 15px;
}

.settings-recipient-form {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 14px;
    margin-top: 18px;
}

.settings-form-grid label {
    display: grid;
    gap: 6px;
    color: var(--text);
    font-size: .84rem;
    font-weight: 600;
}

.settings-form-grid small {
    color: var(--text-secondary);
    font-weight: 400;
}

.settings-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
}

.settings-form-status,
.settings-loading,
.settings-empty {
    color: var(--text-secondary);
    font-size: .86rem;
}

.settings-loading,
.settings-empty {
    padding: 20px;
}

.settings-verification {
    display: grid;
    justify-items: center;
    width: min(520px, calc(100% - 32px));
    margin: 15vh auto 0;
    text-align: center;
}

.settings-verification-icon {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 20px;
    border-radius: 50%;
}

.settings-verification-icon.is-success {
    color: var(--accent-dark);
    background: var(--accent-wash);
}

.settings-verification-icon.is-error {
    color: #b42318;
    background: #fff1f0;
}

.settings-verification-icon.is-pending {
    color: var(--accent-dark);
    background: var(--live-background);
}

.settings-verification h1 {
    margin-bottom: 8px;
    font-size: 1.65rem;
}

.settings-verification p {
    margin-bottom: 24px;
    color: var(--text-secondary);
}

.account-verification-email {
    display: block;
    margin: -10px 0 12px;
    color: var(--text);
    font-size: .95rem;
}

.settings-verification .account-verification-note {
    margin-bottom: 14px;
    font-size: .86rem;
}

@media (max-width: 640px) {
    .workflow-email-recipient-control,
    .settings-recipient,
    .settings-recipient-actions,
    .settings-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .workflow-add-recipient {
        align-self: flex-start;
    }

    .settings-form-grid {
        grid-template-columns: 1fr;
    }

    .settings-recipient-actions {
        align-self: stretch;
    }
}

.workflow-schedule-fields {
    display: grid;
    gap: .7rem;
}

.workflow-mini-label {
    color: var(--text-secondary);
    font-size: .82rem;
    font-weight: 700;
}

.workflow-footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.workflow-output-format,
.workflow-action-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}

.live-topics-panel {
    --live-topic-accent: var(--accent);
    --live-topic-accent-dark: var(--accent-dark);
    --live-topic-background: #e8f7f9;
    --live-topic-surface: #F6FCFC;
    --live-topic-card: #FFFFFF;
    --live-topic-border: rgba(11, 143, 157, .16);
    --live-topic-border-strong: rgba(11, 143, 157, .30);
    --live-topic-muted: #8B98B3;
    --live-topic-shadow: none;
    border-color: var(--live-topic-border-strong);
    border-radius: 1rem;
    padding: 1rem;
    background: var(--live-topic-background);
    box-shadow: var(--live-topic-shadow);
}

.live-topics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .9rem;
}

.live-topics-icon {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    color: var(--live-topic-accent);
    background: rgba(11, 143, 157, .10);
}

.live-topics-header h2 {
    color: var(--text);
}

.live-topics-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .48rem;
}

.live-topic-filter {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 34px;
    padding-inline: .68rem;
}

.live-topic-select {
    width: auto;
    min-width: 9.5rem;
    min-height: 34px;
    border-radius: .7rem;
    border-color: var(--live-topic-border-strong);
    background-color: rgba(255, 255, 255, .92);
    color: var(--text);
    box-shadow: 0 5px 14px rgba(78, 47, 142, .05);
}

.live-topics-panel .live-topic-select:focus {
    border-color: rgba(11, 143, 157, .44);
    box-shadow: 0 0 0 3px rgba(11, 143, 157, .11);
}

.chat-empty-state {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 3.6vh, 2.4rem);
    min-height: calc(100vh - var(--topbar-height) - 12rem);
    text-align: center;
}

.chat-empty-state .live-topics-panel {
    position: sticky;
    top: 0;
    z-index: 2;
    flex: 0 0 auto;
    text-align: left;
}

.chat-empty-copy {
    display: flex;
    flex: 1 1 auto;
    min-height: 7rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(.5rem, 2vh, 1.35rem) 1rem clamp(1rem, 3vh, 2.5rem);
}

.chat-empty-copy h1 {
    color: var(--text);
}

.live-topic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .62rem;
}

.feed-loading {
    grid-column: 1 / -1;
    color: var(--text-secondary);
    font-size: .95rem;
}

.trending-controls {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    padding: .85rem;
}

.trending-search-input {
    flex: 1 1 22rem;
}

.trending-time-filter {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    min-height: 34px;
    white-space: nowrap;
}

.knowledge-search-shell {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1rem;
    padding: .75rem;
    border: 1px solid var(--border);
    border-radius: .8rem;
    background: rgba(255, 255, 255, .74);
    box-shadow: var(--shadow);
}

.knowledge-search-shell .workflow-input {
    flex: 1 1 auto;
}

.knowledge-search-shell .workflow-input::-webkit-search-cancel-button,
.knowledge-search-shell .workflow-input::-webkit-search-decoration {
    appearance: none;
    -webkit-appearance: none;
}

.knowledge-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 38px;
    padding-inline: .95rem;
}

.knowledge-results {
    display: grid;
    gap: .9rem;
}

.knowledge-section {
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.knowledge-section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.knowledge-topic-card {
    padding: .9rem;
    border: 1px solid var(--accent-border);
    border-radius: .9rem;
    background: rgba(248, 251, 252, .74);
}

.knowledge-stat-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: .28rem .65rem;
    border: 1px solid var(--accent-border);
    border-radius: .45rem;
    color: var(--text);
    background: var(--live-background);
    font-size: .82rem;
    white-space: nowrap;
}

.knowledge-open-btn {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    color: var(--text-secondary);
    background: transparent;
}

    .knowledge-open-btn:hover,
    .knowledge-open-btn:focus {
        color: var(--accent-dark);
    }

.knowledge-list-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: .9rem;
    background: rgba(255, 255, 255, .72);
}

.knowledge-list-heading {
    padding: .6rem .8rem;
    background: rgba(246, 248, 252, .86);
    border-bottom: 1px solid var(--border);
}

.knowledge-list,
.knowledge-grid {
    display: grid;
}

.knowledge-list-row,
.knowledge-grid-item {
    display: grid;
    align-items: center;
    width: 100%;
    min-width: 0;
    border: 0;
    border-bottom: 1px solid rgba(5, 15, 35, .06);
    color: var(--text);
    background: rgba(255, 255, 255, .56);
    text-align: left;
    font-size: .9rem;
}

.knowledge-list-row {
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    gap: .5rem;
    min-height: 38px;
    padding: .42rem .8rem;
}

.knowledge-list-row span {
    color: var(--text-secondary);
}

.knowledge-list-row strong,
.knowledge-grid-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.knowledge-list-row i,
.knowledge-list-row .lucide,
.knowledge-grid-item i,
.knowledge-grid-item .lucide {
    color: var(--muted);
}

.knowledge-list-row:hover,
.knowledge-list-row:focus,
.knowledge-grid-item:hover,
.knowledge-grid-item:focus {
    background: var(--accent-wash);
}

.knowledge-list-row:last-child,
.knowledge-grid-item:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.knowledge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.knowledge-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.knowledge-grid-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .5rem;
    min-height: 42px;
    padding: .55rem .8rem;
    border-right: 1px solid rgba(5, 15, 35, .06);
}

.knowledge-grid-item:nth-child(2n),
.knowledge-grid.three .knowledge-grid-item:nth-child(3n) {
    border-right: 0;
}

.knowledge-grid.three .knowledge-grid-item:nth-child(2n) {
    border-right: 1px solid rgba(5, 15, 35, .06);
}

.knowledge-grid.three .knowledge-grid-item:nth-last-child(-n + 3) {
    border-bottom: 0;
}

.knowledge-show-all {
    flex: 0 0 auto;
    min-height: 34px;
    padding-inline: .85rem;
    font-size: .86rem;
}

.knowledge-entity-model {
    min-width: 0;
}

.knowledge-attribute-grid {
    display: grid;
    gap: .45rem;
}

.knowledge-attribute {
    display: grid;
    gap: .12rem;
    padding: .45rem .55rem;
    border: 1px solid var(--border);
    border-radius: .55rem;
    background: rgba(255, 255, 255, .58);
}

.knowledge-attribute span,
.knowledge-score-panel span {
    color: var(--text-secondary);
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
}

.knowledge-attribute strong {
    color: var(--text);
    font-size: .84rem;
    font-weight: 600;
}

.knowledge-topic-accordion {
    border-top: 1px solid var(--border);
}

.knowledge-topic-accordion-item {
    border: 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
}

.knowledge-topic-accordion-item:last-child {
    border-bottom: 0;
}

.knowledge-topic-accordion .accordion-button {
    gap: .65rem;
    padding: .85rem 1rem;
    color: var(--text);
    background: rgba(255, 255, 255, .78);
    box-shadow: none;
}

.knowledge-topic-accordion .accordion-button:not(.collapsed) {
    color: var(--text);
    background: var(--live-background);
    box-shadow: inset 0 -1px 0 var(--border);
}

.knowledge-topic-rank {
    color: var(--text-secondary);
    font-weight: 700;
}

.knowledge-topic-heading-main {
    display: grid;
    gap: .12rem;
    min-width: 0;
}

.knowledge-topic-heading-main > span:first-child {
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.knowledge-topic-heading-meta {
    color: var(--text-secondary);
    font-size: .78rem;
    font-weight: 500;
}

.knowledge-topic-accordion-body {
    padding: 1rem;
    background: rgba(255, 255, 255, .54);
}

.knowledge-score-panel {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .55rem;
    margin-bottom: .9rem;
}

.knowledge-score-panel div {
    display: grid;
    gap: .12rem;
    padding: .58rem .65rem;
    border: 1px solid var(--border);
    border-radius: .65rem;
    background: rgba(255, 255, 255, .72);
}

.knowledge-score-panel strong {
    color: var(--text);
    font-size: .95rem;
}

.knowledge-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem 1rem;
}

.knowledge-detail-list {
    display: grid;
    gap: .45rem;
    margin: 0;
    padding-left: 1.15rem;
}

.knowledge-date-table {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: .7rem;
}

.knowledge-date-row {
    display: grid;
    grid-template-columns: minmax(8rem, .28fr) minmax(0, 1fr);
    gap: .75rem;
    padding: .58rem .7rem;
    border-bottom: 1px solid rgba(5, 15, 35, .06);
    background: rgba(255, 255, 255, .58);
}

.knowledge-date-row:last-child {
    border-bottom: 0;
}

.knowledge-date-row span {
    color: var(--text-secondary);
    font-weight: 700;
}

.knowledge-date-row strong {
    color: var(--text);
    font-weight: 600;
}

.knowledge-fact-row {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: start;
    padding: .8rem .9rem;
    border-bottom: 1px solid rgba(5, 15, 35, .06);
    background: rgba(255, 255, 255, .56);
}

.knowledge-fact-row:last-child {
    border-bottom: 0;
}

.knowledge-fact-rank {
    color: var(--text-secondary);
    font-weight: 700;
}

.live-topic-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: .7rem;
    min-width: 0;
    min-height: 66px;
    padding: .68rem .78rem;
    border: 1px solid var(--live-topic-border);
    border-radius: .75rem;
    color: var(--text);
    background: var(--live-topic-card);
    text-align: left;
    cursor: grab;
    box-shadow: 0 6px 16px rgba(8, 111, 121, .07);
    /*transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;*/
}

    .live-topic-card:hover,
    .live-topic-card:focus-visible {
        border-color: var(--live-topic-border-strong);
        box-shadow: 0 10px 24px rgba(8, 111, 121, .12);
        /*transform: translateY(-2px);*/
        outline: 0;
    }

    .live-topic-card:active {
        cursor: grabbing;
    }

.live-topic-rank {
    color: var(--live-topic-muted);
    font-weight: 700;
}

.live-topic-content {
    display: grid;
    gap: .35rem;
    min-width: 0;
}

.live-topic-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.live-topic-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    color: var(--live-topic-muted);
    font-size: .88rem;
}

.live-topic-meta-dot {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: rgba(139, 152, 179, .42);
}

.live-topic-momentum {
    display: inline-flex;
    align-items: center;
    gap: .18rem;
    white-space: nowrap;
}

.knowledge-data-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: .22rem .55rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    background: rgba(255, 255, 255, .72);
    font-size: .82rem;
}

.live-topic-momentum .lucide {
    width: .72rem;
    height: .72rem;
}

.live-topic-momentum.rising .lucide {
    color: #d64045;
}

.live-topic-momentum.cooling .lucide {
    color: #2563eb;
}

.live-topic-momentum.rising,
.live-topic-momentum.cooling,
.live-topic-momentum.steady {
    color: inherit;
}

.live-topic-pin {
    display: inline-grid;
    place-items: center;
    align-self: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: .6rem;
    color: var(--live-topic-muted);
    background: transparent;
}

.live-topic-pin .lucide {
    width: .95rem;
    height: .95rem;
}

.live-topic-pin:hover,
.live-topic-pin:focus-visible {
    color: var(--live-topic-accent);
    background: rgba(11, 143, 157, .09);
    outline: 0;
}

.live-topic-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    margin-top: .75rem;
    color: var(--live-topic-muted);
    font-size: .88rem;
}

    .live-topic-hint i {
        color: var(--live-topic-muted);
        font-size: 1.4rem;
    }

.feature-card {
    height: 100%;
    border: 1px solid var(--border);
    border-radius: .8rem;
    background: rgba(255, 255, 255, 0.74);
    /*transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;*/
    cursor: pointer;
}

.feature-card.p-4 {
    padding: 1rem !important;
}

    .feature-card:hover {
        /*transform: translateY(-2px);*/
        border-color: rgba(0, 0, 0, .16);
        box-shadow: var(--shadow-soft);
    }

.message-row {
    display: flex;
    gap: .65rem;
    margin-bottom: .8rem;
}

    .message-row.user {
        justify-content: flex-end;
    }

.message-bubble {
    max-width: min(78%, 720px);
    padding: .75rem .9rem;
    border-radius: 1rem;
    line-height: 1.55;
    color: var(--text);
    overflow-wrap: anywhere;
}

.message-row.user .message-bubble {
    background: #ffffff;
    border-bottom-right-radius: .4rem;
}

.message-row.assistant .message-bubble {
    border-bottom-left-radius: .4rem;
}

.message-row.user .message-bubble {
    white-space: pre-wrap;
}

.message-footer {
    margin-top: .65rem;
    padding-top: .5rem;
    border-top: 1px solid var(--border-soft);
}

.message-citations {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .25rem .45rem;
    margin-bottom: .3rem;
    color: var(--accent);
    font-size: .84rem;
    line-height: 1.4;
}

.message-citation {
    display: inline-flex;
    align-items: center;
    gap: .18rem;
    min-width: 0;
    max-width: 100%;
    padding: 0;
    border: 0;
    color: var(--accent);
    background: transparent;
    font: inherit;
    font-weight: 700;
    text-align: left;
}

.message-citation:hover,
.message-citation:focus-visible {
    color: var(--accent-dark);
    text-decoration: underline;
    outline: none;
}

.message-citation .lucide {
    width: .82rem;
    height: .82rem;
    flex: 0 0 auto;
}

.message-citation-separator {
    color: var(--border-strong);
}

.message-debug {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .65rem;
    color: var(--text-secondary);
    font-size: .74rem;
    line-height: 1.35;
}

.message-debug a {
    color: var(--text-secondary);
    text-decoration: none;
}

    .message-debug a:hover {
        color: var(--text-secondary);
        text-decoration: underline;
    }

.assistant-loading {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    min-height: 1.5rem;
    padding: .15rem 0;
}

.assistant-loading-dot {
    width: .36rem;
    height: .36rem;
    flex: 0 0 .36rem;
    border-radius: 50%;
    background: var(--text-secondary);
    opacity: .24;
    transform: scale(.82);
    animation: assistant-loading-wave 1.2s ease-in-out infinite both;
    will-change: opacity, transform;
}

.assistant-loading-dot.dot-1 {
    animation-delay: 0s;
}

.assistant-loading-dot.dot-2 {
    animation-delay: .2s;
}

.assistant-loading-dot.dot-3 {
    animation-delay: .4s;
}

@keyframes assistant-loading-wave {
    0%, 66%, 100% {
        opacity: .24;
        transform: scale(.82);
    }

    18% {
        opacity: .88;
        transform: scale(1.08);
    }

    36% {
        opacity: .4;
        transform: scale(.9);
    }
}

.composer-wrap {
    position: fixed;
    right: 0;
    bottom: 0;
    left: var(--sidebar-width);
    z-index: 1020;
    padding: .75rem .9rem 1rem;
    background: linear-gradient(180deg, rgba(247, 251, 255, 0), rgba(247, 251, 255, .90) 42%);
}

.composer {
    position: relative;
    width: min(100%, 1140px);
    margin: 0 auto;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, .92);
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.composer-tiny-button {
    display: none;
}

.composer-mode-large .composer {
    padding: 1.25rem 1.35rem !important;
}

.composer-mode-large .composer-inner {
    gap: 1rem;
}

.composer-toggle-size-btn {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 999px;
}

.composer-toggle-size-btn {
    border: 1px solid transparent;
    color: var(--text-secondary);
    background: transparent;
}

    .composer-toggle-size-btn:hover,
    .composer-toggle-size-btn:focus-visible {
        color: var(--text);
        border-color: var(--border);
        background: rgba(255, 255, 255, .72);
    }

.composer-right-actions {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    flex: 0 0 auto;
}

.composer.p-4 {
    padding: 1rem !important;
}

    .composer.drag-over {
        border-color: rgba(11, 143, 157, .5);
        background: rgba(248, 251, 252, .96);
        box-shadow: 0 14px 36px rgba(11, 143, 157, .14);
    }

.composer-inner {
    display: grid;
    gap: .65rem;
}

.composer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
}

.composer-action-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}

.composer-action-btn,
.composer-action-btn:hover,
.composer-action-btn:focus {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 32px;
    padding: .32rem .68rem;
    border: 1px solid var(--accent-border);
    border-radius: .6rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, .72);
    box-shadow: none;
}

    .composer-action-btn:hover,
    .composer-action-btn:focus {
        color: var(--text);
        border-color: rgba(11, 143, 157, .46);
        background: var(--accent-wash);
    }

.chat-input {
    min-height: 56px;
    max-height: 170px;
    resize: none;
    border: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--text) !important;
    font-size: 1.3rem;
    line-height: 1.55;
    font-weight: 400;
}

    .chat-input::placeholder {
        color: var(--text-secondary);
    }

.alias-suggest {
    position: absolute;
    right: 1rem;
    bottom: calc(100% + .55rem);
    left: 1rem;
    z-index: 1080;
    overflow: hidden;
    max-height: min(340px, 48vh);
    border: 1px solid var(--border);
    border-radius: .9rem;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 18px 42px rgba(16, 24, 40, .16);
}

.alias-suggest-item {
    display: grid;
    width: 100%;
    gap: .12rem;
    padding: .68rem .85rem;
    border: 0;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text);
    text-align: left;
    background: transparent;
}

    .alias-suggest-item:last-child {
        border-bottom: 0;
    }

    .alias-suggest-item:hover,
    .alias-suggest-item.active {
        background: var(--live-background);
    }

.alias-suggest-token {
    font-weight: 700;
    line-height: 1.2;
}

.alias-suggest-detail {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: .82rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.send-circle:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.suggestion-chip {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--live-background);
    box-shadow: 0 8px 18px rgba(3, 42, 48, 0.06);
    color: var(--text);
}

.offcanvas.app-mobile-sidebar {
    height: 100dvh;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(20px);
}

.app-mobile-sidebar .offcanvas-body {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.auth-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 1rem;
    background:
        radial-gradient(circle at 70% 12%, rgba(11, 143, 157, 0.13), transparent 22rem),
        linear-gradient(180deg, #f0f8f9 0%, #ffffff 54%, #f7fbff 100%);
}

.auth-card {
    width: min(100%, 420px);
    padding: 1.2rem;
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, .86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.auth-brand {
    position: fixed;
    top: 1rem;
    left: .875rem;
    z-index: 10;
}

.auth-mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .25rem;
    margin-bottom: 1.25rem;
    padding: .25rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(241, 251, 250, .78);
}

.auth-mode-switch a,
.auth-mode-switch button {
    display: inline-flex;
    min-height: 2.35rem;
    align-items: center;
    justify-content: center;
    padding: 0 .75rem;
    border: 0;
    border-radius: 6px;
    color: var(--text-secondary);
    background: transparent;
    font-size: .88rem;
    font-weight: 600;
    transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.auth-mode-switch a:hover,
.auth-mode-switch a:focus-visible,
.auth-mode-switch button:hover,
.auth-mode-switch button:focus-visible {
    color: var(--accent-dark);
    outline: none;
}

.auth-mode-switch a.active,
.auth-mode-switch button.active {
    color: var(--accent-dark);
    background: #fff;
    box-shadow: 0 1px 4px rgba(3, 42, 48, .1);
}

.auth-input {
    min-height: 40px;
    border-color: var(--border);
    border-radius: .85rem;
    background: rgba(255, 255, 255, .84);
}

.auth-password-field {
    position: relative;
}

.auth-password-field .auth-input {
    padding-right: 3rem;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: .45rem;
    display: inline-flex;
    width: 2.15rem;
    height: 2.15rem;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 6px;
    color: var(--text-secondary);
    background: transparent;
    transform: translateY(-50%);
    transition: color 150ms ease, background-color 150ms ease;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    color: var(--accent-dark);
    background: rgba(11, 143, 157, .08);
}

.auth-password-toggle:focus-visible {
    outline: 2px solid rgba(11, 143, 157, .28);
    outline-offset: 1px;
}

.auth-password-toggle .lucide {
    width: 1.05rem;
    height: 1.05rem;
}

.auth-error {
    margin-bottom: 1rem;
    padding: .72rem .8rem;
    border: 1px solid #fecdca;
    border-radius: 6px;
    color: #b42318;
    background: #fff1f0;
    font-size: .88rem;
    line-height: 1.45;
}

.auth-success {
    margin-bottom: 1rem;
    padding: .72rem .8rem;
    border: 1px solid rgba(11, 143, 157, .22);
    border-radius: 6px;
    color: var(--accent-dark);
    background: rgba(241, 251, 250, .92);
    font-size: .88rem;
    line-height: 1.45;
}

.auth-card-copy {
    margin: -.35rem 0 1.2rem;
    color: var(--text-secondary);
    font-size: .92rem;
    line-height: 1.55;
}

.auth-forgot-link,
.auth-back-link {
    width: fit-content;
    color: var(--accent-dark);
    font-size: .88rem;
    font-weight: 600;
}

.auth-forgot-link {
    justify-self: center;
    margin-top: -.15rem;
    font-weight: 400;
}

.auth-forgot-link:hover,
.auth-back-link:hover {
    color: var(--accent);
}

.auth-submit-button[aria-busy="true"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

.auth-submit-spinner {
    width: 1rem;
    height: 1rem;
    animation: auth-submit-spin .8s linear infinite;
}

@keyframes auth-submit-spin {
    to {
        transform: rotate(360deg);
    }
}

.account-gate-modal .modal-dialog {
    max-width: 440px;
}

.account-gate-modal .modal-content {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(3, 42, 48, .2);
}

.account-gate-modal .modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 1.4rem 1rem;
    border-bottom: 0;
}

.account-gate-modal .modal-header > div {
    min-width: 0;
}

.account-gate-modal .modal-header .knowledge-icon-btn {
    flex: 0 0 auto;
    margin-left: auto;
}

.account-gate-modal .modal-title {
    margin: 0;
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 700;
}

.account-gate-modal .modal-header p {
    margin: .35rem 1rem 0 0;
    color: var(--text-secondary);
    font-size: .9rem;
    line-height: 1.5;
}

.account-gate-modal .modal-body {
    min-height: 338px;
    padding: 0 1.4rem 1.4rem;
}

.account-gate-switch {
    margin-bottom: 1.15rem;
}

.account-gate-modal .form-text {
    color: var(--text-secondary);
    font-size: .78rem;
}

.account-gate-submit[disabled] {
    cursor: wait;
}

    .auth-input:focus {
        border-color: rgba(11, 143, 157, .46);
        box-shadow: 0 0 0 .16rem rgba(11, 143, 157, .12);
    }

.auth-alt {
    margin-top: 1.1rem;
    font-size: .94rem;
}

    .auth-alt a {
        color: var(--text);
        font-weight: 700;
    }

@media (max-width: 991.98px) {
    .app-sidebar {
        display: none;
    }

    .app-topbar,
    .composer-wrap {
        left: 0;
    }

    .app-main {
        margin-left: 0;
    }

    .workspace-wave-field {
        left: 0;
        width: 100vw;
    }

    .chat-scroll {
        padding-top: 1.5rem;
    }

    .welcome-card {
        padding: 1.25rem 1rem;
    }

    .live-topics-panel {
        padding: .9rem;
    }

    .live-topics-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .live-topic-grid {
        grid-template-columns: 1fr;
    }

    .workflow-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workflow-starter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .workflow-intro-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workflow-footer-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .knowledge-grid,
    .knowledge-grid.three {
        grid-template-columns: 1fr;
    }

    .knowledge-grid-item,
    .knowledge-grid.three .knowledge-grid-item:nth-child(2n),
    .knowledge-grid.three .knowledge-grid-item:nth-child(3n) {
        border-right: 0;
    }

    .knowledge-grid-item:nth-last-child(-n + 2),
    .knowledge-grid.three .knowledge-grid-item:nth-last-child(-n + 3) {
        border-bottom: 1px solid rgba(5, 15, 35, .06);
    }

    .knowledge-grid-item:last-child,
    .knowledge-grid.three .knowledge-grid-item:last-child {
        border-bottom: 0;
    }

    .message-bubble {
        max-width: 86%;
    }
}

@media (max-width: 575.98px) {
    body {
        overflow: hidden;
    }

    .workflow-intake {
        padding-top: .75rem;
    }

    .workflow-mode-header {
        align-items: stretch;
        flex-direction: column;
        gap: .85rem;
        padding: .9rem;
    }

    .workflow-mode-heading {
        align-items: flex-start;
    }

    .workflow-intake-actions .btn {
        justify-content: center;
        width: 100%;
    }

    .workflow-intake-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .workflow-starter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workflow-intro-steps,
    .workflow-review-grid {
        grid-template-columns: 1fr;
    }

    .workflow-review-item:nth-child(odd) {
        border-right: 1px solid var(--border);
    }

    .workflow-manual-review-header,
    .workflow-manual-run-settings {
        align-items: flex-start;
        flex-direction: column;
    }

    .workflow-footer-primary {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .workflow-footer-primary .btn {
        justify-content: center;
        width: 100%;
    }

    .chat-scroll {
        padding-inline: .75rem;
        padding-bottom: 12rem;
    }

    .auth-actions .btn {
        padding-inline: .65rem;
    }

    .member-state {
        max-width: 42vw;
        padding-right: 0.55rem;
    }

    .member-state-dot {
        width: 1.5rem;
        height: 1.5rem;
        box-shadow: 0 0 0 3px var(--member-state-accent-soft);
    }

    .welcome-card {
        border-radius: 1rem;
    }

    .live-topics-panel {
        border-radius: 1rem;
    }

    .live-topics-actions {
        align-items: stretch;
        width: 100%;
    }

    .live-topic-filter,
    .live-topics-actions .mode-header-action {
        flex: 1 1 100%;
        justify-content: space-between;
    }

    .feature-card {
        border-radius: .9rem;
    }

    .knowledge-search-shell {
        align-items: stretch;
        flex-direction: column;
    }

    .knowledge-search-shell-compact {
        padding: .55rem .65rem .65rem 2.35rem;
    }

    .knowledge-search-shell-compact .workflow-input {
        padding-right: 2.45rem;
    }

    .knowledge-search-shell-compact .knowledge-search-clear {
        right: 1rem;
        top: 1.65rem;
    }

    .knowledge-search-btn {
        width: 100%;
    }

    .knowledge-topic-card {
        padding: .8rem;
    }

    .composer-wrap {
        padding-inline: .75rem;
    }

    .composer-actions {
        align-items: flex-end;
    }

    .composer-action-group {
        gap: .5rem;
    }

    .composer-action-btn {
        min-height: 34px;
        padding-inline: .65rem;
        font-size: .85rem;
    }

    .suggestions {
        overflow-x: auto;
        padding-bottom: .25rem;
    }
}

.composer-mode-compact .composer {
    padding: .5rem .55rem .5rem .9rem !important;
    border-radius: 999px;
}

.composer-mode-compact .composer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .55rem;
}

.composer-mode-compact .composer-actions {
    display: contents;
}

.composer-mode-compact .composer-action-group {
    display: none;
}

.composer-mode-compact .chat-input {
    min-height: 30px;
    max-height: 30px;
    height: 30px !important;
    overflow-y: hidden;
    font-size: .95rem;
    line-height: 1.45;
}

.composer-mode-tiny .composer {
    display: flex;
    justify-content: flex-end;
    padding: .5rem .55rem !important;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.composer-mode-tiny .composer-inner {
    display: none;
}

.composer-mode-tiny .composer-tiny-button {
    display: inline-grid;
}

.composer-mode-tiny .composer-tiny-button .lucide {
    width: 1.08rem;
    height: 1.08rem;
}

.add-topics-dialog {
    max-width: 680px;
}

.add-topics-modal {
    --live-topic-accent: var(--accent);
    --live-topic-accent-dark: var(--accent-dark);
    --live-topic-background: #e8f7f9;
    --live-topic-surface: #F6FCFC;
    --live-topic-card: #FFFFFF;
    --live-topic-border: rgba(11, 143, 157, .16);
    --live-topic-border-strong: rgba(11, 143, 157, .30);
    --live-topic-muted: #8B98B3;
    --live-topic-shadow: 0 18px 48px rgba(8, 111, 121, .15);
    overflow: hidden;
    border: 1px solid var(--live-topic-border-strong);
    border-radius: 1rem;
    background: var(--live-topic-background);
    box-shadow: var(--live-topic-shadow);
}

.add-topics-header {
    display: grid;
    gap: .85rem;
    align-items: stretch;
    padding: 1.05rem 1.2rem 1rem;
    border-bottom: 1px solid rgba(11, 143, 157, .14);
    background: var(--live-topic-background);
}

.add-topics-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.add-topics-kicker {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--live-topic-accent);
    letter-spacing: .18em;
}

.add-topics-header .btn-close {
    margin-top: .1rem;
}

.add-topics-body {
    max-height: min(62vh, 520px);
    padding: 1rem;
    overflow-y: auto;
    background: var(--live-topic-background);
}

.add-topics-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .6rem;
}

.add-topics-search {
    border-color: var(--live-topic-border-strong);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 6px 16px rgba(8, 111, 121, .07);
}

.add-topics-modal .live-topic-select {
    min-width: 10rem;
}

.add-topics-list {
    display: grid;
    gap: .72rem;
}

.add-topic-row.live-topic-card {
    width: 100%;
    cursor: pointer;
}

@media (max-width: 575.98px) {
    .add-topics-controls {
        grid-template-columns: 1fr;
    }
}

.trending-topic-dialog {
    max-width: 860px;
}

.trending-topic-modal {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: rgba(255, 255, 255, .97);
    box-shadow: var(--shadow);
}

.trending-topic-modal-header {
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.15rem;
}

.trending-topic-modal-body {
    max-height: min(70vh, 680px);
    padding: 1.1rem;
    overflow-y: auto;
}

.trending-topic-modal-footer {
    padding: .85rem 1.1rem;
    border-top: 1px solid var(--border);
}

.trending-topic-detail {
    display: grid;
    gap: 1rem;
}

.trending-topic-detail-hero {
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
    align-items: stretch;
    gap: 1rem;
}

.trending-topic-detail-hero.without-image {
    grid-template-columns: 1fr;
}

.trending-topic-detail-image {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: .85rem;
    background: var(--live-background);
    aspect-ratio: 1 / 1;
    align-self: start;
}

.trending-topic-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}







.image-special-effect {
    position: relative;
    display: inline-block;
    overflow: hidden;
    isolation: isolate;
}

    .image-special-effect img {
        display: block;
        width: 100%;
        height: auto;
    }

    .image-special-effect::after {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient( 0deg, rgba(0, 33, 89, 0.40) 0%, rgba(0, 33, 89, 0.40) 100% ), rgba(178, 36, 178, 0.40);
        mix-blend-mode: multiply;
    }





.trending-topic-detail-intro {
    display: grid;
    align-content: start;
    gap: .75rem;
    min-width: 0;
}

.trending-topic-detail-summary {
    padding: .9rem 1rem;
    border: 1px solid rgba(11, 143, 157, .16);
    border-radius: .85rem;
    background: var(--live-background);
}

.trending-topic-detail-summary p {
    margin: 0;
    color: var(--text);
    line-height: 1.55;
}

.trending-topic-detail-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.trending-topic-detail-chip {
    border: 1px solid rgba(11, 143, 157, .18);
    border-radius: 999px;
    padding: .18rem .52rem;
    color: var(--text-secondary);
    background: var(--live-background);
    font-size: .78rem;
    font-weight: 600;
}

.trending-topic-detail-chip.is-hot {
    color: var(--accent);
    border-color: rgba(11, 143, 157, .28);
    background: rgba(11, 143, 157, .1);
}

.trending-topic-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--border);
    border-radius: .85rem;
    overflow: hidden;
}

.trending-topic-detail-grid div {
    display: grid;
    gap: .18rem;
    min-width: 0;
    padding: .7rem .85rem;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.trending-topic-detail-grid div:nth-child(2n) {
    border-right: 0;
}

.trending-topic-detail-grid div:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.trending-topic-detail-grid span {
    color: var(--text-secondary);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.trending-topic-detail-grid strong {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: .9rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trending-topic-detail-section {
    display: grid;
    gap: .45rem;
}

.trending-reference-list {
    display: grid;
    border: 1px solid var(--border);
    border-radius: .85rem;
    overflow: hidden;
}

.trending-reference-row {
    display: grid;
    grid-template-columns: 2.3rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem;
    min-height: 44px;
    padding: .55rem .75rem;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}

.trending-reference-row:last-child {
    border-bottom: 0;
}

.trending-reference-row:hover,
.trending-reference-row:focus-visible {
    background: var(--live-background);
}

.trending-reference-index {
    color: var(--text-secondary);
    font-weight: 700;
}

.trending-reference-copy {
    display: grid;
    gap: .12rem;
    min-width: 0;
}

.trending-reference-copy strong,
.trending-reference-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .trending-reference-copy strong {
        font-weight: 500;
    }

.trending-reference-copy span {
    color: var(--text-secondary);
    font-size: .78rem;
}

.trending-reference-row .lucide {
    width: .95rem;
    height: .95rem;
    color: var(--text-secondary);
}

.trending-topic-detail-empty {
    padding: .85rem;
    color: var(--text-secondary);
}

.knowledge-hero {
    display: grid;
    gap: 1.35rem;
    max-width: 1180px;
    margin: 0 auto;
}

.knowledge-hero .workflow-mode-header {
    margin-bottom: 0;
}

.knowledge-hero-results {
    grid-template-columns: minmax(220px, 1fr) minmax(360px, 520px);
    align-items: center;
    gap: 1rem;
}

.knowledge-hero-results .knowledge-hero-copy {
    min-width: 0;
}

.knowledge-search-shell-lg {
    position: relative;
    align-items: center;
    gap: .75rem;
    padding: .65rem .8rem .65rem 2.6rem;
    border-radius: 1rem;
}

.knowledge-search-shell-compact {
    position: relative;
    width: min(520px, 100%);
    justify-self: end;
    margin-bottom: 0;
    padding: .35rem .45rem .35rem 2.25rem;
    border-radius: .72rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}

.knowledge-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    width: 1rem;
    height: 1rem;
    color: var(--text-secondary);
    transform: translateY(-50%);
}

.knowledge-search-shell-lg .workflow-input {
    min-height: 44px;
    border: 0;
    box-shadow: none;
}

.knowledge-search-shell-compact .workflow-input {
    min-height: 32px;
    padding-right: 3.2rem;
    border: 0;
    border-radius: .55rem;
    font-size: .92rem;
    box-shadow: none;
}

.knowledge-search-shell-compact .knowledge-search-btn {
    min-width: 96px;
    min-height: 32px;
    padding-inline: .7rem;
    border-radius: .62rem;
    font-size: .9rem;
}

.knowledge-search-clear {
    position: absolute;
    right: calc(96px + 2.05rem);
    top: 50%;
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 999px;
    color: var(--text-secondary);
    background: transparent;
    font-size: 1.15rem;
    line-height: 1;
    transform: translateY(-50%);
}

.knowledge-search-clear:hover,
.knowledge-search-clear:focus-visible {
    color: var(--accent-dark);
    background: rgba(11, 143, 157, .1);
    outline: none;
}

.knowledge-suggestion-row {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.knowledge-explorer-section {
    max-width: 1180px;
    margin: 0 auto 1.15rem;
}

.knowledge-results-section {
    width: 100%;
    max-width: none;
    margin: 0 0 1.15rem;
    justify-self: stretch;
}

.knowledge-results-section .knowledge-object-grid {
    justify-items: stretch;
}

.knowledge-section-empty {
    color: var(--text-secondary);
    font-size: .92rem;
    padding: .25rem 0 .5rem;
}

.knowledge-best-entry-card,
.knowledge-best-entry-card .knowledge-object-card {
    width: 100%;
}

.knowledge-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .75rem;
}

@media (max-width: 991.98px) {
    .knowledge-hero-results {
        grid-template-columns: 1fr;
    }

    .knowledge-search-shell-compact {
        justify-self: stretch;
        width: 100%;
    }
}

.knowledge-object-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.knowledge-object-grid.compact {
    gap: .7rem;
}

.knowledge-object-card {
    position: relative;
    min-height: 176px;
    padding: 1.1rem 4.35rem 1.05rem 1.15rem;
    border: 1px solid var(--border);
    border-left: 5px solid #E7EDF5;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, border-left-color .16s ease, box-shadow .16s ease;
}

.knowledge-object-card-accent {
    border-color: rgba(11, 143, 157, .32);
    border-left-color: #59E8D5;
    background: linear-gradient(180deg, rgba(231, 255, 250, .78), rgba(255, 255, 255, .95));
}

.knowledge-object-card:hover,
.knowledge-object-card:focus-visible {
    border-color: rgba(11, 143, 157, .42);
    border-left-color: var(--accent-dark);
    background: linear-gradient(180deg, rgba(231, 255, 250, .88), rgba(246, 255, 252, .98));
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
    outline: none;
}

.knowledge-object-card:hover .js-open-knowledge-object,
.knowledge-object-card:focus-visible .js-open-knowledge-object {
    border-color: var(--accent-dark);
    color: #fff;
    background: var(--accent-dark);
}

.knowledge-object-card-compact {
    min-height: 176px;
    padding: .82rem 4rem .78rem 1rem;
}

.knowledge-object-card-compact .knowledge-object-card-main {
    display: flex;
    flex-direction: column;
    min-height: 148px;
}

.knowledge-object-card-compact .knowledge-card-actions {
    top: .78rem;
    right: .78rem;
}

.knowledge-object-card-compact .knowledge-object-card-kicker {
    gap: .4rem;
    margin-bottom: .4rem;
    font-size: .72rem;
}

.knowledge-object-card-compact .knowledge-object-badge {
    min-height: 24px;
    padding: .18rem .58rem;
}

.knowledge-object-card-compact .knowledge-object-card-title {
    margin-bottom: .25rem;
    font-size: .98rem;
}

.knowledge-object-card-compact .knowledge-object-date-line {
    font-size: .74rem;
    letter-spacing: .1em;
}

.knowledge-object-card-compact .knowledge-object-card-description {
    display: -webkit-box;
    overflow: hidden;
    margin: .38rem -3rem 0 0;
    padding-right: 0;
    font-size: .92rem;
    line-height: 1.4;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.knowledge-object-card-compact .knowledge-object-counts {
    position: static;
    margin: auto -3rem 0 0;
    padding-top: .62rem;
    font-size: .76rem;
    text-align: right;
}

.knowledge-object-card-kicker {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .55rem;
    margin-bottom: .7rem;
    color: var(--text-secondary);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.knowledge-object-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: .25rem .7rem;
    border: 1px solid rgba(11, 143, 157, .22);
    border-radius: 999px;
    color: var(--accent-dark);
    background: var(--live-background);
}

.knowledge-object-badge-live {
    border-color: rgba(11, 143, 157, .28);
    color: var(--accent-dark);
    background: var(--live-background);
}

.knowledge-object-badge-archived {
    border-color: rgba(148, 163, 184, .34);
    color: #64748b;
    background: #f6f8fa;
}

.knowledge-object-card-title {
    margin: 0 0 .45rem;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
}

.knowledge-object-date-line,
.knowledge-object-date {
    color: var(--accent-dark);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .14em;
}

.knowledge-object-card-description {
    display: -webkit-box;
    overflow: hidden;
    margin: .75rem 0 0;
    color: var(--text-secondary);
    font-size: .92rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.knowledge-object-counts {
    margin-top: .75rem;
    color: var(--text-secondary);
    font-size: .84rem;
    font-weight: 700;
}

.knowledge-card-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: .45rem;
}

.knowledge-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: .7rem;
    color: var(--text-secondary);
    background: #fff;
    text-decoration: none;
}

.knowledge-icon-btn:hover,
.knowledge-icon-btn:focus-visible {
    border-color: rgba(11, 143, 157, .36);
    color: var(--accent-dark);
    background: var(--live-background);
}

.knowledge-icon-btn .lucide {
    width: 16px;
    height: 16px;
}

.knowledge-object-dialog {
    max-width: min(1380px, calc(100vw - 2rem));
    height: min(860px, calc(100vh - 2rem));
}

.knowledge-object-modal {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 1.1rem;
    color: var(--text);
    font-size: .94rem;
    line-height: 1.55;
}

.knowledge-object-modal-header {
    display: block;
    padding: 1rem 1.5rem;
}

.knowledge-object-header-main {
    min-width: 0;
}

.knowledge-object-header-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 34px;
    margin-bottom: .65rem;
}

.knowledge-object-title-block {
    min-width: 0;
}

.knowledge-object-type-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem .7rem;
}

.knowledge-modal-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0 .65rem;
    border: 1px solid var(--border);
    border-radius: .55rem;
    color: var(--text-secondary);
    background-color: #fff;
    font-size: .82rem;
    font-weight: 800;
    opacity: .72;
}

.knowledge-modal-nav-btn:hover {
    color: var(--accent-dark);
    opacity: 1;
    background-color: var(--live-background);
}

.knowledge-modal-nav-btn .lucide {
    width: 15px;
    height: 15px;
}

.knowledge-modal-nav-btn.js-knowledge-back {
    width: auto;
}

.knowledge-object-modal-header .btn-close {
    flex: 0 0 34px;
    padding: 0;
    background-size: 12px;
}

.knowledge-object-breadcrumb {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: .35rem;
    min-width: 0;
    min-height: 26px;
    color: var(--accent-dark);
    font-size: .78rem;
    font-weight: 500;
}

.knowledge-breadcrumb-trail {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: .32rem;
    overflow: hidden;
    white-space: nowrap;
}

.knowledge-breadcrumb-marker {
    flex: 0 0 auto;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 7px solid var(--accent-dark);
    opacity: .9;
}

.knowledge-breadcrumb-item {
    overflow: hidden;
    max-width: 220px;
    text-overflow: ellipsis;
}

.knowledge-breadcrumb-item.current {
    color: var(--accent-dark);
    font-weight: 700;
}

.knowledge-breadcrumb-separator,
.knowledge-breadcrumb-ellipsis {
    flex: 0 0 auto;
    color: var(--text-secondary);
}

.knowledge-object-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 1.2rem 1.5rem 6.5rem;
}

.knowledge-object-modal-footer {
    flex: 0 0 auto;
    z-index: 2;
    padding: .9rem 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
}

.knowledge-object-intro {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 1.2rem;
    align-items: start;
    margin-bottom: 1rem;
}

.knowledge-object-identity {
    position: relative;
    display: grid;
    overflow: hidden;
    height: 180px;
    min-height: 0;
    border: 1px solid var(--border);
    border-radius: .85rem;
    background: #F8FAFC;
}

.knowledge-object-identity img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
}

.knowledge-object-identity-placeholder {
    display: grid;
    gap: .35rem;
    height: 100%;
    min-height: 0;
    padding: 1rem;
    color: #fff;
    background: linear-gradient(135deg, #334155, #0B5F66);
}

.knowledge-object-intro-copy {
    display: flex;
    flex-direction: column;
    min-height: 180px;
}

.knowledge-object-identity-placeholder span {
    color: rgba(255, 255, 255, .72);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .18em;
}

.knowledge-object-identity-placeholder strong {
    align-self: end;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.knowledge-object-identity-placeholder em {
    font-style: normal;
    font-weight: 700;
    opacity: .78;
}

.knowledge-object-summary {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    margin: 0;
    color: var(--text);
    font-size: 17px;
    line-height: 1.55;
}

.knowledge-object-context-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .75rem;
    color: var(--text-secondary);
    font-size: .88rem;
    font-weight: 700;
}

.knowledge-inline-object {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: 0;
    border: 0;
    color: var(--accent-dark);
    background: transparent;
    font-weight: 900;
}

.knowledge-inline-object .lucide {
    width: 14px;
    height: 14px;
}

.knowledge-jump-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: .45rem;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    margin-top: 1rem;
    padding-bottom: .15rem;
    scrollbar-width: thin;
}

.knowledge-context-nav {
    margin-top: 1rem;
}

.knowledge-object-intro-copy .knowledge-context-nav {
    margin-top: 1rem;
    padding-top: 0;
}

.knowledge-object-intro-copy.has-two-row-jumps .knowledge-context-nav {
    margin-top: auto;
    padding-top: .75rem;
}

.knowledge-context-nav-label {
    color: var(--text-secondary);
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.knowledge-context-nav .knowledge-jump-row {
    margin-top: .45rem;
}

.knowledge-jump-row-cloud {
    flex-wrap: wrap;
    align-content: flex-start;
    max-height: 71px;
    padding-bottom: 0;
    overflow: hidden;
}

.knowledge-jump-chip {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .35rem;
    max-width: 230px;
    min-height: 32px;
    padding: .35rem .8rem .35rem .65rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--accent-dark);
    background: #fff;
    font-size: .82rem;
    font-weight: 650;
    line-height: 1.1;
    white-space: nowrap;
    transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}

.knowledge-jump-chip-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.knowledge-jump-chip .lucide {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.knowledge-jump-chip:hover,
.knowledge-jump-chip:focus-visible {
    border-color: var(--accent-dark);
    color: #fff;
    background: var(--accent-dark);
    outline: none;
}

.knowledge-jump-chip-cloud,
.knowledge-jump-chip-topic {
    border-color: rgba(11, 95, 102, .32);
    color: var(--accent-dark);
    background: rgba(207, 250, 254, .5);
}

.knowledge-members-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .8rem;
}

.knowledge-member-status {
    margin-top: .25rem;
    color: var(--text-secondary);
    font-size: .78rem;
}

.knowledge-members-grid {
    align-items: stretch;
}

.knowledge-members-actions {
    display: flex;
    justify-content: center;
    padding-top: 1rem;
}

.knowledge-object-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
}

.knowledge-object-metrics:has(div:nth-child(4):last-child) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.knowledge-object-metrics div {
    display: grid;
    gap: .3rem;
    padding: .9rem 1rem;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.knowledge-object-metrics div:nth-child(3n) {
    border-right: 0;
}

.knowledge-object-metrics:has(div:nth-child(4):last-child) div:nth-child(3n) {
    border-right: 1px solid var(--border);
}

.knowledge-object-metrics:has(div:nth-child(4):last-child) div:nth-child(4n) {
    border-right: 0;
}

.knowledge-object-metrics span {
    color: var(--text-secondary);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.knowledge-object-metrics strong {
    color: var(--text);
    font-size: .92rem;
    font-weight: 750;
    line-height: 1.35;
}

.knowledge-object-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: .35rem;
    margin: 1rem 0 1.1rem;
    padding: 0 0 .75rem;
    border-bottom: 1px solid #e8eef5;
    scrollbar-width: thin;
}

.knowledge-object-tabs .nav-link {
    white-space: nowrap;
    min-height: 36px;
    padding: .45rem .8rem;
    border: 1px solid transparent;
    border-radius: .75rem;
    color: var(--text-secondary);
    background: transparent;
    font-size: .88rem;
    font-weight: 720;
    line-height: 1;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.knowledge-object-tabs .nav-link:hover,
.knowledge-object-tabs .nav-link:focus-visible {
    border-color: #dfe7f1;
    color: var(--text);
    background: #f8fafc;
}

.knowledge-object-tabs .nav-link.active {
    color: var(--accent-dark);
    border-color: rgba(8, 111, 121, .22);
    background: var(--accent-wash);
}

.knowledge-object-tab-content {
    min-width: 0;
}

.knowledge-object-tab-panel {
    display: grid;
    gap: 1rem;
}

.workflow-footer-primary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
}

.workflow-footer-primary .btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.workflow-footer-primary .lucide {
    width: 1rem;
    height: 1rem;
}

.knowledge-detail-panel {
    margin: 0;
    padding: 1.05rem 1.15rem;
    border: 1px solid #dfe7f1;
    border-radius: 1.15rem;
    background: #fff;
}

.knowledge-section-title {
    margin-bottom: .85rem;
    color: #9aa8bd;
    font-size: .74rem;
    font-weight: 850;
    letter-spacing: .18em;
    line-height: 1.2;
    text-transform: uppercase;
}

.knowledge-point-list {
    margin: 0;
    padding-left: 1.05rem;
    color: #2d3b50;
    font-size: .94rem;
    font-weight: 500;
    line-height: 1.62;
}

.knowledge-point-list li {
    padding-left: .25rem;
    margin-bottom: .45rem;
}

.knowledge-point-list li:last-child {
    margin-bottom: 0;
}

.knowledge-point-list li::marker {
    color: var(--accent-dark);
    font-size: .72em;
}

.knowledge-fact-list span {
    color: #8da0ba;
    font-size: .9em;
}

.knowledge-fact-status {
    margin: 0 0 .8rem;
    color: #8da0ba;
    font-size: .82rem;
}

.knowledge-object-error {
    padding: 1rem 1.1rem;
    border: 1px solid #dfe7f1;
    border-radius: .5rem;
    background: #f8fafc;
    color: #2d3b50;
}

.knowledge-object-error strong {
    display: block;
    margin-bottom: .3rem;
}

.knowledge-object-error p {
    margin: 0;
    color: var(--text-secondary);
}

.knowledge-evidence-list {
    display: grid;
    gap: .65rem;
}

.knowledge-evidence-list p {
    margin: 0;
    color: #2d3b50;
    font-size: .94rem;
    line-height: 1.6;
}

.knowledge-evidence-list span {
    color: #8da0ba;
    font-size: .9em;
}

.knowledge-article-feed {
    display: grid;
    gap: 1rem;
}

.knowledge-article-feed-status,
.knowledge-article-load-state {
    color: var(--text-secondary);
    font-size: .82rem;
    font-weight: 400;
}

.knowledge-article-feed-status {
    justify-self: end;
}

.knowledge-article-load-state {
    width: 100%;
    border: 1px solid #dfe7f1;
    border-radius: .75rem;
    background: #fff;
    padding: .55rem .75rem;
    text-align: center;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.knowledge-article-load-state:not(:disabled):hover {
    border-color: rgba(8, 111, 121, .28);
    color: var(--accent-dark);
    background: var(--accent-wash);
}

.knowledge-article-load-state:disabled {
    cursor: default;
    opacity: .75;
}

.knowledge-article-scroll {
    max-height: min(52vh, 560px);
    overflow-y: auto;
    padding-right: .15rem;
}

.knowledge-article-table {
    overflow: hidden;
    margin-bottom: .85rem;
    border: 1px solid #dfe7f1;
    border-radius: 1.15rem;
    background: #fff;
}

.knowledge-article-header,
.knowledge-article-row {
    display: grid;
    grid-template-columns: 3.4rem minmax(0, 1.8fr) minmax(8.5rem, .45fr) minmax(8.5rem, .35fr) 3.8rem;
    align-items: center;
    gap: 1.45rem;
}

.knowledge-article-header {
    min-height: 48px;
    padding: 0 1rem;
    border-bottom: 1px solid #e8eef5;
    color: #9aa8bd;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.knowledge-article-header span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.knowledge-article-header .lucide {
    width: .82rem;
    height: .82rem;
    color: var(--text);
    stroke-width: 2.5;
}

.knowledge-article-row {
    min-height: 82px;
    padding: .78rem 1rem;
    border-bottom: 1px solid rgba(226, 232, 240, .76);
    transition: background .15s ease;
}

.knowledge-article-row:last-child {
    border-bottom: 0;
}

.knowledge-article-row:hover {
    background: #F8FAFC;
}

.knowledge-article-headline {
    min-width: 0;
    padding-right: 1.35rem;
}

.knowledge-article-headline a {
    display: block;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .98rem;
    font-weight: 600;
    line-height: 1.32;
    text-decoration: none;
}

.knowledge-article-headline a:hover {
    color: var(--accent-dark);
}

.knowledge-article-headline p {
    margin: .32rem 0 0;
    color: #66758d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .88rem;
    font-weight: 400;
    line-height: 1.35;
}

.knowledge-article-source,
.knowledge-article-date {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .9rem;
}

.knowledge-article-source {
    color: #56647a;
    font-weight: 500;
}

.knowledge-article-date {
    color: #8da0ba;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

.knowledge-article-rank {
    color: #c4cfdd;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.knowledge-article-open {
    display: inline-grid;
    place-items: center;
    justify-self: end;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: .8rem;
    color: #91a2ba;
    background: #fff;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.knowledge-article-open .lucide {
    width: .95rem;
    height: .95rem;
    color: currentColor;
    stroke: currentColor;
}

.knowledge-article-open svg,
.knowledge-article-open svg * {
    color: currentColor;
    stroke: currentColor !important;
}

.knowledge-article-row:hover .knowledge-article-open,
.knowledge-article-open:hover,
.knowledge-article-open:focus-visible {
    border-color: var(--accent-dark) !important;
    color: #fff !important;
    background: var(--accent-dark) !important;
    box-shadow: none;
    outline: 0;
}

.knowledge-article-row:hover .knowledge-article-open svg,
.knowledge-article-open:hover svg,
.knowledge-article-open:focus-visible svg,
.knowledge-article-row:hover .knowledge-article-open svg *,
.knowledge-article-open:hover svg *,
.knowledge-article-open:focus-visible svg * {
    color: #fff !important;
    stroke: #fff !important;
}

.knowledge-metadata-layout {
    display: grid;
    gap: 1rem;
}

.knowledge-metadata-card {
    display: grid;
    gap: 0;
    padding: 1.05rem 1.15rem;
    border: 1px solid #dfe7f1;
    border-radius: 1.15rem;
    background: #fff;
}

.knowledge-classification-card {
    padding: .9rem 1rem;
    border-radius: 1rem;
}

.knowledge-classification-card h4 {
    margin-bottom: .6rem;
}

.knowledge-classification-card .knowledge-metadata-row {
    grid-template-columns: minmax(9rem, .24fr) minmax(0, 1fr);
    gap: 1rem;
    padding: .58rem 0;
}

.knowledge-metadata-card h4 {
    margin: 0 0 .85rem;
    color: #9aa8bd;
    font-size: .74rem;
    font-weight: 850;
    letter-spacing: .18em;
    line-height: 1.2;
    text-transform: uppercase;
}

.knowledge-metadata-row {
    display: grid;
    grid-template-columns: minmax(12rem, .34fr) minmax(0, 1fr);
    gap: 1.25rem;
    padding: .75rem 0;
    border-bottom: 1px solid #edf2f7;
}

.knowledge-metadata-row:last-child {
    border-bottom: 0;
}

.knowledge-metadata-row > span {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    color: #95a6bd;
    font-size: .86rem;
    font-weight: 650;
    line-height: 1.45;
}

.knowledge-metadata-value {
    min-width: 0;
    color: #2d3b50;
    font-size: .94rem;
    font-weight: 520;
    line-height: 1.55;
}

.knowledge-metadata-value strong {
    color: inherit;
    font: inherit;
}

.knowledge-metadata-asset {
    display: inline-flex;
    align-items: center;
    width: max-content;
    min-height: 1.25rem;
    padding: .12rem .42rem;
    border: 1px solid #dfe7f1;
    border-radius: 999px;
    color: #9aa8bd;
    background: #f8fafc;
    font-size: .62rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: .1em;
    line-height: 1;
    text-transform: uppercase;
}

.knowledge-metadata-inline-list {
    display: flex;
    flex-wrap: wrap;
    gap: .16rem .42rem;
}

.knowledge-metadata-inline-list span {
    color: #2d3b50;
    border-bottom: 1px solid #cfd8e5;
    line-height: 1.25;
}

.knowledge-classification-card .knowledge-metadata-inline-list span {
    border-bottom: 0;
}

.knowledge-metadata-stack {
    display: grid;
    gap: .36rem;
}

@media (max-width: 700px) {
    .trending-topic-detail-hero {
        grid-template-columns: 1fr;
    }

    .trending-topic-detail-image {
        width: min(220px, 100%);
    }

    .knowledge-object-grid,
    .knowledge-object-intro {
        grid-template-columns: 1fr;
    }

    .knowledge-object-identity {
        width: min(220px, 100%);
        height: 180px;
    }

    .knowledge-object-intro-copy {
        min-height: 0;
    }

    .knowledge-object-intro-copy .knowledge-context-nav,
    .knowledge-object-intro-copy.has-two-row-jumps .knowledge-context-nav {
        margin-top: 1rem;
        padding-top: 0;
    }

    .knowledge-object-card {
        padding-right: 1rem;
    }

    .knowledge-card-actions {
        position: static;
        justify-content: flex-end;
        margin-bottom: .65rem;
    }

    .knowledge-object-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .knowledge-object-metrics div:nth-child(3n) {
        border-right: 1px solid var(--border);
    }

    .knowledge-object-metrics div:nth-child(2n) {
        border-right: 0;
    }

    .knowledge-article-feed-status {
        justify-self: start;
    }

    .knowledge-article-header {
        display: none;
    }

    .knowledge-article-row {
        grid-template-columns: 2.4rem minmax(0, 1fr) 2.8rem;
        gap: .45rem .7rem;
        min-height: 0;
    }

    .knowledge-article-source,
    .knowledge-article-date {
        grid-column: 2;
        font-size: .82rem;
    }

    .knowledge-article-open {
        grid-column: 3;
        grid-row: 1 / span 3;
    }

    .knowledge-breadcrumb-item {
        max-width: 150px;
    }

    .knowledge-metadata-card {
        padding: 1.05rem;
        border-radius: 1.1rem;
    }

    .knowledge-metadata-row {
        grid-template-columns: 1fr;
        gap: .2rem;
    }

    .knowledge-classification-card .knowledge-metadata-row {
        grid-template-columns: 1fr;
        gap: .2rem;
    }

}

.model-select {
    min-width: 160px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    line-height: 1;
    margin: 0;
}

    .model-select.dropdown-toggle::after {
        margin-left: 0.75rem;
    }

.topbar-menu-button img {
    width: 1.25rem;
    height: 1.25rem;
}


#messageThread {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

.deep-research-view {
    max-width: 960px;
    margin: 1rem auto 1.1rem;
}

.deep-research-inline {
    display: grid;
    gap: .75rem;
    margin: .95rem 0 .8rem;
}

.deep-research-items {
    display: grid;
    gap: .75rem;
}

.deep-research-card {
    position: relative;
    overflow: hidden;
    border-left: 4px solid #7B3CFF;
    border-radius: .9rem;
    background: #ffffff;
}

.deep-research-card-error {
    border-left-color: #C2410C;
}

.deep-research-card-error .deep-research-eyebrow {
    color: #C2410C;
}

.deep-research-card-error .deep-research-intro {
    padding-top: .8rem;
    padding-bottom: .8rem;
}

.deep-research-intro {
    display: grid;
    gap: .45rem;
    padding: 1rem 1.25rem .95rem;
}

.deep-research-eyebrow {
    color: #6D21FF;
    letter-spacing: .14em;
}

.deep-research-intro h3 {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
    font-weight: 800;
}

.deep-research-intro p {
    margin: 0;
    color: var(--text-secondary);
    font-size: .9rem;
}

.deep-research-dismiss {
    position: absolute;
    top: .8rem;
    right: .9rem;
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 0;
    color: var(--text-secondary);
    background: transparent;
    opacity: .75;
}

.deep-research-dismiss:not(:disabled):hover {
    color: var(--accent-dark);
    opacity: 1;
}

.deep-research-dismiss svg {
    width: 16px;
    height: 16px;
}

.deep-research-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(248, 250, 252, .78);
}

.deep-research-metric {
    display: grid;
    gap: .24rem;
    min-width: 0;
    padding: .8rem 1.25rem;
}

.deep-research-metric span {
    color: var(--text-secondary);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.deep-research-metric strong {
    overflow: hidden;
    color: var(--text);
    font-size: .88rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.deep-research-suggested {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .75rem 1.25rem;
}

.deep-research-suggested > span {
    color: var(--text-secondary);
    font-size: .88rem;
}

.deep-research-chip {
    min-height: 32px;
    padding: .3rem .7rem;
    border: 1px solid var(--border);
    border-radius: .45rem;
    color: var(--text);
    background: #ffffff;
    font-size: .82rem;
    font-weight: 600;
    opacity: 1;
}

.deep-research-chip:disabled {
    color: var(--text);
    background: #ffffff;
    opacity: 1;
}

@media (max-width: 760px) {
    .deep-research-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .deep-research-intro,
    .deep-research-metric,
    .deep-research-suggested {
        padding-left: .9rem;
        padding-right: .9rem;
    }
}
