@import url('https://fonts.googleapis.com/css2?family=Schoolbell&display=swap');

/**
 * GroundSignal — Custom Styles (Light theme)
 *
 * All colors flow through --gs-* CSS custom properties on :root.
 */

/* ── Theme ───────────────────────────────────────────────────────── */

:root {
    --gs-bg: #f2f2f2;
    --gs-bg-card: #ffffff;
    --gs-bg-hover: #e9edf4;
    --gs-bg-selected: #dbeafe;
    --gs-border: #d1d5db;
    --gs-text: #1f2937;
    --gs-text-muted: #6b7280;
    --gs-text-bright: #111827;
    --gs-accent: #2563eb;
    --gs-accent-hover: #1d4ed8;
    --gs-success: #16a34a;
    --gs-info: #0891b2;
    --gs-warning: #d97706;
    --gs-danger: #dc2626;

    --gs-footer-bg: #e5e7eb;
    --gs-navbar-bg: #ffffff;
    --gs-pane-header-bg: #f9fafb;
    --gs-pane-header-hover-bg: #f0f2f5;
    --gs-collapsed-bg: #f3f4f6;
    --gs-card-header-bg: #f9fafb;
    --gs-transcript-bg: rgba(0, 0, 0, 0.03);
    --gs-person-bg: rgba(37, 99, 235, 0.06);
    --gs-tag-bg: rgba(37, 99, 235, 0.1);
    --gs-tag-content-bg: rgba(37, 99, 235, 0.10);
    --gs-tag-content-color: #2563eb;
    --gs-tag-people-bg: rgba(124, 58, 237, 0.10);
    --gs-tag-people-color: #7c3aed;
    --gs-tag-geo-bg: rgba(22, 163, 74, 0.10);
    --gs-tag-geo-color: #16a34a;
    --gs-tag-overflow-bg: rgba(107, 114, 128, 0.08);
    --gs-tag-overflow-color: #6b7280;
    --gs-new-item-bg: rgba(37, 99, 235, 0.06);
    --gs-scrollbar-thumb: #c4c4c4;
    --gs-scrollbar-thumb-hover: #a0a0a0;

    /* ntelioUI2 pane overrides */
    --nui-pane-bg: var(--gs-bg-card);
    --nui-pane-border-color: var(--gs-border);
    --nui-pane-header-bg: var(--gs-pane-header-bg);
    --nui-pane-header-hover-bg: var(--gs-pane-header-hover-bg);
    --nui-pane-title-color: var(--gs-text-muted);
    --nui-pane-icon-color: var(--gs-text-muted);
    --nui-pane-handle-active-color: var(--gs-accent);
}

/* ── Global overrides ────────────────────────────────────────────── */

html, body {
    background-color: var(--gs-bg) !important;
    color: var(--gs-text);
}

.ntelioApp {
    background-color: var(--gs-bg) !important;
}

#content-wrapper {
    padding: 0 !important;
    margin-bottom: 0 !important;
    gap: 0;
    overflow: hidden;
}

#footer {
    background-color: var(--gs-footer-bg) !important;
    border-top-color: var(--gs-border) !important;
    height: 1.8em;
}

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

#footer .footer-text a {
    color: var(--gs-accent);
}

#navbar {
    background-color: var(--gs-navbar-bg);
    z-index: 2000;
}

#breadcrumbs {
    display: none;
}

/* ── Vintage LCD Navbar Theme ───────────────────────────────────── */
/* Grey LCD panel with dark segment ink — calculator / comm gear look */

:root {
    --gs-lcd-bg: #2a2a2a;
    --gs-lcd-bg-alpha: rgba(42, 42, 42, 0.92);
    --gs-lcd-panel: #242424;
    --gs-lcd-ink: #c8c8c8;
    --gs-lcd-ink-dim: #8a8a8a;
    --gs-lcd-ink-ghost: #555555;
    --gs-lcd-separator: #3a3a3a;
    --gs-lcd-active-bg: rgba(200, 200, 200, 0.10);
    --gs-lcd-hover-bg: rgba(200, 200, 200, 0.07);
}

.vertical-navbar {
    background-color: var(--gs-lcd-bg) !important;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.12) !important;
}

.vertical-navbar:hover {
    background-color: var(--gs-lcd-bg-alpha) !important;
    width: 250px !important;
}

/* Subtle scanline texture */
.vertical-navbar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1;
}

/* Menu items — dark ink on grey LCD */
.vertical-navbar .menu-item {
    color: var(--gs-lcd-ink-dim) !important;
    transition: all 0.15s ease !important;
}

.vertical-navbar .menu-item:hover {
    background-color: var(--gs-lcd-hover-bg) !important;
    color: var(--gs-lcd-ink) !important;
}

.vertical-navbar .menu-item:hover .menu-label {
    color: var(--gs-lcd-ink) !important;
}

.vertical-navbar .menu-item.active {
    background-color: var(--gs-lcd-active-bg) !important;
    border-left: 3px solid var(--gs-lcd-ink) !important;
    color: var(--gs-lcd-ink) !important;
}

.vertical-navbar .menu-item.active .menu-label {
    color: var(--gs-lcd-ink) !important;
}

.vertical-navbar .menu-item.active:hover {
    background-color: rgba(200, 200, 200, 0.14) !important;
    color: var(--gs-lcd-ink) !important;
}

.vertical-navbar .menu-item.active:hover .menu-label {
    color: var(--gs-lcd-ink) !important;
}

/* Icons — dark ink */
.vertical-navbar .menu-icon svg {
    stroke: var(--gs-lcd-ink-dim);
    transition: stroke 0.15s ease;
}

.vertical-navbar .menu-item:hover .menu-icon svg {
    stroke: var(--gs-lcd-ink);
}

.vertical-navbar .menu-item.active .menu-icon svg {
    stroke: var(--gs-lcd-ink);
}

/* Labels */
.vertical-navbar .menu-label {
    font-family: "Bitcount Single", "Courier New", monospace !important;
    font-weight: 400;
    font-size: 16px;
    color: var(--gs-lcd-ink-dim) !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Separators & borders */
.vertical-navbar .menu-separator {
    border-top-color: var(--gs-lcd-separator) !important;
}

.vertical-navbar .sidebar-bottom {
    border-top-color: var(--gs-lcd-separator) !important;
}

.vertical-navbar .sidebar-header {
    border-bottom-color: var(--gs-lcd-separator) !important;
}

/* ── Sidebar logo — LCD panel look ──────────────────────────────── */

.vertical-navbar .sidebar-header {
    padding: 15px 5px;
    height: 140px;
    min-height: 140px;
    overflow: hidden;
    background: var(--gs-lcd-panel);
    border-bottom: 1px solid var(--gs-lcd-separator) !important;
}

.gs-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    perspective: 200px;
}

.gs-logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    transition: width 0.3s ease, height 0.3s ease;
    filter: brightness(0) invert(80%) brightness(100%);
}

.vertical-navbar:hover .gs-logo-img {
    width: 90px;
    height: 90px;
    filter: brightness(0) invert(85%) brightness(105%);
}

.gs-logo-text {
    font-family: "Bitcount Single", "Courier New", monospace;
    font-optical-sizing: auto;
    font-weight: 300;
    font-variation-settings: "slnt" 0, "CRSV" 0.5, "ELSH" 0, "ELXP" 0;
    color: var(--gs-lcd-ink);
    white-space: nowrap;
}

.gs-logo-short {
    display: inline-block;
    font-size: 30px;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.gs-logo-full {
    display: none;
    font-size: 22px;
    letter-spacing: 0.05em;
    margin-top: 6px;
    opacity: 0;
}

.vertical-navbar:hover .gs-logo-short {
    display: none;
}

.vertical-navbar:hover .gs-logo-full {
    display: inline-block;
    animation: gs-marquee-flash 0.6s ease-out forwards;
}

@keyframes gs-marquee-flash {
    0%   { opacity: 0; transform: rotateX(90deg);  color: var(--gs-lcd-ink-ghost); text-shadow: none; }
    30%  { opacity: 1; transform: rotateX(-10deg);  color: var(--gs-lcd-ink-dim); text-shadow: none; }
    50%  { opacity: 1; transform: rotateX(5deg);    color: var(--gs-lcd-ink); text-shadow: none; }
    70%  { opacity: 1; transform: rotateX(-2deg);   color: var(--gs-lcd-ink); text-shadow: none; }
    100% { opacity: 1; transform: rotateX(0deg);    color: var(--gs-lcd-ink); text-shadow: none; }
}

/* ── Feed page layout ────────────────────────────────────────────── */

.gs-feed-page {
    display: flex;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

/* ── Pane header styling ─────────────────────────────────────────── */

.nui-pane-header {
    border-bottom-color: var(--gs-border) !important;
}

.nui-pane-title {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem !important;
    color: var(--gs-text-muted) !important;
}

.nui-collapsible-pane.collapsed {
    background: var(--gs-collapsed-bg);
}

.nui-collapsible-pane.collapsed .nui-pane-header {
    border-right-color: var(--gs-border) !important;
}

.nui-collapsible-pane[data-dir="right"].collapsed .nui-pane-header {
    border-left-color: var(--gs-border) !important;
}

/* ── Raw Feed items ──────────────────────────────────────────────── */

.gs-raw-feed {
    height: 100%;
    overflow: hidden;
}

.gs-feed-items {
    height: 100%;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ── Feed item card ──────────────────────────────────────────────── */

.gs-feed-item {
    background: var(--gs-bg-hover);
    border-radius: 10px;
    border: none;
    padding: 0.75rem 0.85rem;
    cursor: default;
    transition: box-shadow 0.15s, background-color 0.15s;
}

.gs-feed-item-clickable {
    cursor: pointer;
}

.gs-feed-item-clickable.gs-selected {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.gs-feed-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.gs-feed-item.gs-item-new {
    animation: gs-slide-in 0.4s ease-out;
    background-color: var(--gs-new-item-bg);
}

@keyframes gs-slide-in {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Card body: content left, platform logo right */

.gs-item-card-body {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.gs-item-content {
    flex: 1;
    min-width: 0;
}

.gs-item-platform-logo {
    flex-shrink: 0;
    width: 28px;
    font-size: 1.3rem;
    text-align: center;
    padding-top: 0.1rem;
    opacity: 0.8;
}

.gs-item-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

.gs-item-author {
    font-weight: 600;
    color: var(--gs-text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gs-item-time {
    flex-shrink: 0;
    color: var(--gs-text-muted);
    font-size: 0.75rem;
}

.gs-item-source-link {
    flex-shrink: 0;
    margin-left: auto;
    color: var(--gs-text-muted);
    opacity: 0.5;
    transition: opacity 0.15s, color 0.15s;
    display: flex;
    align-items: center;
}

.gs-item-source-link:hover {
    opacity: 1;
    color: var(--gs-accent);
}

.gs-icon-external {
    width: 14px;
    height: 14px;
}

.gs-item-rt {
    font-size: 0.72rem;
    color: #1da1f2;
    margin-bottom: 0.15rem;
}
.gs-item-rt i { margin-right: 0.2rem; }

.gs-item-title {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--gs-accent);
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.gs-item-preview {
    font-size: 0.78rem;
    color: var(--gs-text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Synthesis items ─────────────────────────────────────────────── */

.gs-synthesis {
    height: 100%;
    overflow: hidden;
}

.gs-synthesis-items {
    height: 100%;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gs-synthesis-item {
    background: var(--gs-bg-hover);
    border-radius: 10px;
    border: none;
    padding: 0.75rem 0.85rem;
    cursor: pointer;
    transition: box-shadow 0.15s, background-color 0.15s;
    /* margin-bottom: 10px; */
}

.gs-synthesis-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.gs-synthesis-item.gs-selected {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.gs-synthesis-item.gs-synthesis-new {
    animation: gs-pulse-new 2s ease-out;
}

@keyframes gs-pulse-new {
    0%   { background-color: rgba(34, 197, 94, 0.15); }
    100% { background-color: transparent; }
}

.gs-synthesis-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.gs-synthesis-badges {
    display: flex;
    gap: 0.3rem;
}

.gs-badge-new {
    font-size: 0.65rem;
    padding: 0.15em 0.5em;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.gs-badge-updated {
    font-size: 0.65rem;
    padding: 0.15em 0.5em;
    font-weight: 700;
    letter-spacing: 0.05em;
    background-color: var(--gs-info) !important;
}

.gs-synthesis-time {
    font-size: 0.72rem;
    color: var(--gs-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.3;
    padding-top: 0.15em;
}

.gs-synthesis-headline {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--gs-text-bright);
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.gs-synthesis-subheadline {
    font-size: 0.78rem;
    color: var(--gs-text-muted);
    font-style: italic;
    margin-top: -0.1rem;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.gs-synthesis-summary {
    font-size: 0.78rem;
    color: var(--gs-text-muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.gs-synthesis-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.gs-synthesis-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.gs-topic-tag {
    display: inline-block;
    font-size: 0.68rem;
    padding: 0.1em 0.45em;
    border-radius: 3px;
    background-color: var(--gs-tag-bg);
    color: var(--gs-accent);
    font-weight: 500;
    white-space: nowrap;
}

.gs-source-count {
    font-size: 0.75rem;
    color: var(--gs-text-muted);
    white-space: nowrap;
}

.gs-source-count i {
    margin-right: 0.2rem;
}

/* ── Source attribution pills ──────────────────────────────────── */

.gs-synthesis-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
    margin-bottom: 6px;
}

.gs-source-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--gs-bg-card, rgba(0,0,0,0.03));
    color: var(--gs-text-muted, #6c757d);
    white-space: nowrap;
}

.gs-source-pill i {
    font-size: 0.65rem;
}

.gs-source-pill-overflow {
    opacity: 0.6;
}

/* ── Detail source rows ──────────────────────────────────────────── */

.gs-detail-sources {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gs-detail-source-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    background: var(--gs-bg-card, rgba(0,0,0,0.02));
    font-size: 0.8rem;
}

.gs-detail-source-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.gs-detail-source-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.gs-detail-source-author {
    font-weight: 500;
    color: var(--gs-text, #212529);
}

.gs-detail-source-headline {
    font-size: 0.75rem;
    color: var(--gs-text-muted, #6c757d);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gs-detail-source-time {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: var(--gs-text-muted, #6c757d);
    margin-top: 2px;
}

/* ── Sources widget ──────────────────────────────────────────────── */

.gs-sources {
    height: 100%;
    overflow: hidden;
}

.gs-sources-empty,
.gs-content-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gs-text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 2rem;
}

.gs-sources-empty i,
.gs-content-empty i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.4;
}

.gs-sources-list {
    height: 100%;
    overflow-y: auto;
    padding: 0.15rem 0;
}

/* ── Source cards (rounded rectangle style) ──────────────────────── */
.gs-source-card {
    display: flex;
    align-items: stretch;
    background: var(--gs-bg-hover);
    border-radius: 8px;
    cursor: pointer;
    margin: 0.35rem 0.5rem;
    transition: box-shadow 0.15s, background-color 0.15s;
}
.gs-source-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.gs-source-card.gs-expanded {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
    background: var(--gs-bg-selected);
}
.gs-source-card-stripe {
    width: 3px;
    flex-shrink: 0;
    border-radius: 8px 0 0 8px;
}
.gs-source-card-body {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.75rem 0.6rem 0.5rem;
}

.gs-source-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
    font-size: 0.8rem;
}

.gs-source-platform {
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.gs-source-author {
    font-weight: 600;
    color: var(--gs-text-bright);
}

.gs-source-time {
    margin-left: auto;
    color: var(--gs-text-muted);
    font-size: 0.72rem;
}

.gs-source-title {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--gs-accent);
    margin-bottom: 0.15rem;
}

.gs-source-excerpt {
    font-size: 0.75rem;
    color: var(--gs-text-muted);
    line-height: 1.35;
}

/* Extraction headlines under grouped sources */
.gs-source-extractions {
    margin-top: 0.35rem;
    padding-top: 0.3rem;
    border-top: 1px solid var(--gs-border);
}
.gs-source-extractions-label {
    font-size: 0.65rem;
    color: var(--gs-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.15rem;
}
.gs-source-extractions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.gs-source-extractions li {
    font-size: 0.72rem;
    color: var(--gs-text-secondary, var(--gs-text-muted));
    line-height: 1.35;
    padding: 0.1rem 0;
    padding-left: 0.6rem;
    position: relative;
}
.gs-source-extractions li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: var(--gs-text-muted);
}

/* Expanded source content */
.gs-source-expanded {
    margin-top: 0.5rem;
    border-top: 1px solid var(--gs-border);
    padding-top: 0.5rem;
}
.gs-source-fulltext {
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--gs-text);
    margin-bottom: 0.5rem;
    word-break: break-word;
}
.gs-source-video-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}
.gs-source-video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 6px;
}
.gs-source-link-row {
    margin-top: 0.4rem;
}
.gs-source-link-row a {
    font-size: 0.75rem;
    color: var(--gs-accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.gs-source-link-row a:hover {
    text-decoration: underline;
}

/* ── Right pane split ────────────────────────────────────────────── */

.gs-right-split {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.gs-right-sources {
    flex: 1 1 45%;
    min-height: 120px;
    overflow-y: auto;
    overflow-x: hidden;
}

.gs-right-divider {
    flex-shrink: 0;
    height: 3px;
    background: var(--gs-border);
    cursor: ns-resize;
}

.gs-right-divider:hover {
    background: var(--gs-accent);
    opacity: 0.5;
}

.gs-right-content {
    flex: 1 1 55%;
    min-height: 120px;
    overflow: hidden;
}

/* ── Content widget ──────────────────────────────────────────────── */

.gs-content {
    height: 100%;
    overflow: hidden;
}

.gs-content-body {
    height: 100%;
    overflow-y: auto;
    padding: 0.75rem;
}

.gs-content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gs-border);
}

.gs-content-meta {
    font-size: 0.82rem;
    color: var(--gs-text);
}

.gs-original-link {
    font-size: 0.75rem;
    color: var(--gs-accent) !important;
    border-color: var(--gs-border) !important;
    white-space: nowrap;
}

.gs-original-link:hover {
    background-color: var(--gs-bg-hover) !important;
    color: var(--gs-accent-hover) !important;
}

.gs-content-title {
    color: var(--gs-text-bright);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.gs-content-section {
    margin-bottom: 0.75rem;
}

.gs-content-section h6 {
    color: var(--gs-text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.4rem;
}

.gs-content-section h6 i {
    margin-right: 0.3rem;
    width: 14px;
    text-align: center;
}

.gs-content-section p {
    font-size: 0.82rem;
    color: var(--gs-text);
    line-height: 1.55;
    margin-bottom: 0.5rem;
}

.gs-content-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
}

/* People section */
.gs-people-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gs-person {
    padding: 0.4rem 0.6rem;
    background: var(--gs-person-bg);
    border-radius: 4px;
    border-left: 2px solid var(--gs-accent);
}

.gs-person strong {
    font-size: 0.82rem;
    color: var(--gs-text-bright);
}

.gs-person-role {
    font-size: 0.72rem;
    color: var(--gs-text-muted);
    margin-left: 0.3rem;
}

.gs-person-context {
    font-size: 0.75rem;
    color: var(--gs-text-muted);
    margin-top: 0.15rem;
}

/* Signals list */
.gs-signals-list {
    margin: 0;
    padding-left: 1.2rem;
}

.gs-signals-list li {
    font-size: 0.8rem;
    color: var(--gs-text);
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.gs-signals-list li::marker {
    color: var(--gs-warning);
}

/* Video embed (fixed height so transcript is visible) */
.gs-content-video {
    margin-bottom: 0.75rem;
}

.gs-video-embed {
    position: relative;
    width: 100%;
    height: 220px;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}

.gs-video-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Transcript */
.gs-transcript {
    font-size: 0.78rem;
    color: var(--gs-text-muted);
    line-height: 1.6;
    font-style: italic;
    padding: 0.5rem 0.75rem;
    background: var(--gs-transcript-bg);
    border-radius: 4px;
    border-left: 2px solid var(--gs-text-muted);
    max-height: 300px;
    overflow-y: auto;
}

/* ── Custom scrollbars ───────────────────────────────────────────── */

.gs-feed-items::-webkit-scrollbar,
.gs-synthesis-items::-webkit-scrollbar,
.gs-sources-list::-webkit-scrollbar,
.gs-content-body::-webkit-scrollbar,
.gs-transcript::-webkit-scrollbar {
    width: 6px;
}

.gs-feed-items::-webkit-scrollbar-track,
.gs-synthesis-items::-webkit-scrollbar-track,
.gs-sources-list::-webkit-scrollbar-track,
.gs-content-body::-webkit-scrollbar-track,
.gs-transcript::-webkit-scrollbar-track {
    background: transparent;
}

.gs-feed-items::-webkit-scrollbar-thumb,
.gs-synthesis-items::-webkit-scrollbar-thumb,
.gs-sources-list::-webkit-scrollbar-thumb,
.gs-content-body::-webkit-scrollbar-thumb,
.gs-transcript::-webkit-scrollbar-thumb {
    background: var(--gs-scrollbar-thumb);
    border-radius: 3px;
}

.gs-feed-items::-webkit-scrollbar-thumb:hover,
.gs-synthesis-items::-webkit-scrollbar-thumb:hover,
.gs-sources-list::-webkit-scrollbar-thumb:hover,
.gs-content-body::-webkit-scrollbar-thumb:hover,
.gs-transcript::-webkit-scrollbar-thumb:hover {
    background: var(--gs-scrollbar-thumb-hover);
}

/* ── Settings page overrides ─────────────────────────────────────── */

.page h2 {
    color: var(--gs-text-bright);
}

.page .text-muted {
    color: var(--gs-text-muted) !important;
}

.page .card {
    background-color: var(--gs-bg-card);
    border-color: var(--gs-border);
    color: var(--gs-text);
}

.page .card-header {
    background-color: var(--gs-card-header-bg);
    border-bottom-color: var(--gs-border);
    color: var(--gs-text);
}

.page .form-control,
.page .form-select {
    background-color: var(--gs-bg);
    border-color: var(--gs-border);
    color: var(--gs-text);
}

.page .form-control:focus,
.page .form-select:focus {
    background-color: var(--gs-bg);
    border-color: var(--gs-accent);
    color: var(--gs-text);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.page .form-control::placeholder {
    color: var(--gs-text-muted);
}

.page .form-label {
    color: var(--gs-text);
}

/* ── Sources page (SourceAssignmentBoard) ─────────────────────────── */

.gs-sources-toolbar {
    border-bottom: 1px solid var(--gs-border);
    background: var(--gs-bg-card);
}

.gs-sources-toolbar h5 {
    color: var(--gs-text-bright);
    font-size: 1rem;
}

/* Source card inner layout */
.gs-source-card-inner {
    padding: 2px 0;
}

.gs-source-card-title {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--gs-text-bright);
    line-height: 1.3;
    margin-bottom: 2px;
}

.gs-source-card-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.72rem;
    color: var(--gs-text-muted);
    margin-bottom: 4px;
}

.gs-source-card-handle {
    font-family: monospace;
    font-size: 0.7rem;
    opacity: 0.8;
}

.gs-source-card-lean {
    font-style: italic;
}

.gs-source-card-lang {
    opacity: 0.7;
}

.gs-source-card-platforms {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Platform badge — brand-colored icon inline with card title */
.gs-platform-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 16px;
    margin-right: 2px;
    vertical-align: middle;
    color: var(--gs-text-muted);
}

.gs-platform-badge[data-platform="youtube"]  { color: #FF0000; }
.gs-platform-badge[data-platform="telegram"] { color: #26A5E4; }
.gs-platform-badge[data-platform="x"]        { color: #14171A; }

/* Assignment board overrides for GroundSignal theme */
.nui-assignment-board {
    --nui-assignment-card-bg: var(--gs-bg-card);
    --nui-assignment-card-border: var(--gs-border);
}

.nui-assignment-source-header,
.nui-assignment-lane-header {
    border-bottom-color: var(--gs-border);
}

.nui-assignment-search-input {
    background-color: var(--gs-bg) !important;
    border-color: var(--gs-border) !important;
    color: var(--gs-text) !important;
}

.nui-assignment-search-input:focus {
    border-color: var(--gs-accent) !important;
    box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.2) !important;
}

.nui-assignment-group-label {
    color: var(--gs-text);
}

.nui-assignment-group-count,
.nui-assignment-source-count,
.nui-assignment-lane-count {
    color: var(--gs-text-muted);
}

.nui-assignment-lane-empty {
    color: var(--gs-text-muted) !important;
}

/* ── Categorized tag pills ──────────────────────────────────────── */

.gs-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.68rem;
    padding: 0.12em 0.5em;
    border-radius: 3px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.4;
}

.gs-tag i,
.gs-tag svg {
    font-size: 0.6rem;
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

.gs-tag-content {
    background-color: var(--gs-tag-content-bg);
    color: var(--gs-tag-content-color);
}

.gs-tag-people {
    background-color: var(--gs-tag-people-bg);
    color: var(--gs-tag-people-color);
}

.gs-tag-geo {
    background-color: var(--gs-tag-geo-bg);
    color: var(--gs-tag-geo-color);
}

.gs-tag-overflow {
    background-color: var(--gs-tag-overflow-bg);
    color: var(--gs-tag-overflow-color);
    font-style: italic;
}

/* ── Updated item animation ─────────────────────────────────────── */

.gs-synthesis-updated {
    animation: gs-bubble-up 1.5s ease-out;
}

@keyframes gs-bubble-up {
    0%   { background-color: rgba(8, 145, 178, 0.18); transform: translateY(6px); }
    30%  { background-color: rgba(8, 145, 178, 0.10); transform: translateY(0); }
    100% { background-color: transparent; transform: translateY(0); }
}

/* ── Right panel (scrollable column — SynthesisModePage) ──────────── */

.gs-right-panel {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.gs-right-section-header {
    padding: 0.5rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gs-text-muted);
    border-top: 1px solid var(--gs-border);
    border-bottom: 1px solid var(--gs-border);
    background: var(--gs-pane-header-bg);
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Inside scrollable right-panel, nested widgets flow naturally */
.gs-right-panel .gs-sources,
.gs-right-panel .gs-sources-list,
.gs-right-panel .gs-content,
.gs-right-panel .gs-content-body {
    height: auto;
    overflow: visible;
}

/* ── Split right panel (Graph/Geography: signals top, sources bottom) ── */

.gs-right-panel-split {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.gs-right-panel-split .gs-right-signals {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.gs-right-panel-split .gs-right-section-header {
    flex-shrink: 0;
    position: static;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gs-sources-close {
    background: none;
    border: none;
    color: var(--gs-text-muted);
    cursor: pointer;
    padding: 0 0.25rem;
    font-size: 0.7rem;
    line-height: 1;
}
.gs-sources-close:hover {
    color: var(--gs-text);
}

.gs-sources-drawer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 60%;
    display: flex;
    flex-direction: column;
    background: var(--gs-pane-bg, #fff);
    transform: translateY(100%);
    transition: transform 0.25s ease-out;
    z-index: 3;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
}
.gs-sources-drawer.open {
    transform: translateY(0);
}

.gs-sources-drawer .gs-right-sources {
    flex: 0 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
}

.gs-sources-drawer .gs-right-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ── Sources sub-panel (slides up inside signals panel) ───────── */

.gs-sources-subpanel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    background: var(--gs-pane-bg, #fff);
    transform: translateY(100%);
    transition: transform 0.25s ease-out;
    z-index: 10;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
    border-top: 1px solid var(--gs-border);
}
.gs-sources-subpanel.dragging {
    transition: none;
}

.gs-sources-subpanel-handle {
    flex-shrink: 0;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: ns-resize;
    user-select: none;
    -webkit-user-select: none;
}
.gs-sources-subpanel-handle::after {
    content: '';
    width: 32px;
    height: 3px;
    border-radius: 2px;
    background: var(--gs-text-muted, #999);
    opacity: 0.4;
    transition: opacity 0.15s;
}
.gs-sources-subpanel-handle:hover::after {
    opacity: 0.7;
}
.gs-sources-subpanel.open {
    transform: translateY(0);
}

.gs-sources-subpanel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--gs-border);
    flex-shrink: 0;
    cursor: default;
}
.gs-sources-subpanel-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gs-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.gs-subpanel-count {
    font-weight: 400;
    color: var(--gs-text-muted);
    margin-left: 0.4rem;
    font-size: 0.75rem;
}
.gs-sources-subpanel-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--gs-text-muted);
    cursor: pointer;
    padding: 0 0.25rem;
    margin-left: 0.5rem;
    flex-shrink: 0;
}
.gs-sources-subpanel-close:hover {
    color: var(--gs-text);
}

.gs-sources-subpanel-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

/* ── Synthesis detail widget ────────────────────────────────────── */

.gs-synthesis-detail {
    padding: 1rem;
    border-bottom: 1px solid var(--gs-border);
}

.gs-synthesis-detail-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--gs-text-muted);
    font-size: 0.85rem;
}

.gs-detail-headline {
    font-weight: 700;
    font-size: 1rem;
    color: var(--gs-text-bright);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.gs-detail-subheadline {
    font-size: 0.85rem;
    color: var(--gs-text-muted);
    font-style: italic;
    margin: -0.2rem 0 0.5rem;
    line-height: 1.35;
}

.gs-detail-summary {
    font-size: 0.84rem;
    color: var(--gs-text);
    line-height: 1.55;
    margin-bottom: 0.75rem;
}

/* ── Report an Issue (debug feedback) ─────────────────────────── */

.gs-report-issue {
    margin-bottom: 0.75rem;
}

.gs-report-issue-btn {
    font-size: 0.75rem;
    color: var(--gs-text-muted);
    text-decoration: none;
    cursor: pointer;
}

.gs-report-issue-btn:hover {
    color: var(--gs-accent, #d9534f);
}

.gs-report-issue-btn i {
    margin-right: 0.25rem;
}

.gs-report-issue-form {
    margin-top: 0.4rem;
}

.gs-report-comment {
    width: 100%;
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--gs-border, #dee2e6);
    border-radius: 4px;
    background: var(--gs-bg, #fff);
    color: var(--gs-text);
    resize: vertical;
}

.gs-report-actions {
    margin-top: 0.3rem;
}

.gs-report-confirmation {
    font-size: 0.75rem;
    color: #28a745;
    margin-top: 0.3rem;
}

.gs-detail-tag-group {
    margin-bottom: 0.5rem;
}

.gs-detail-tag-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gs-text-muted);
    margin-bottom: 0.25rem;
}

.gs-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.gs-detail-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--gs-text-muted);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gs-border);
}

/* Right panel scrollbar */
.gs-right-panel::-webkit-scrollbar {
    width: 6px;
}

.gs-right-panel::-webkit-scrollbar-track {
    background: transparent;
}

.gs-right-panel::-webkit-scrollbar-thumb {
    background: var(--gs-scrollbar-thumb);
    border-radius: 3px;
}

.gs-right-panel::-webkit-scrollbar-thumb:hover {
    background: var(--gs-scrollbar-thumb-hover);
}

/* ── Geography page ────────────────────────────────────────────── */

.gs-geography-page {
    display: flex;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.gs-geography-page .nui-globe-map {
    height: 100%;
}

/* Signal list widget */
.gs-signal-list {
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.gs-signal-list-filter {
    flex-shrink: 0;
}

.gs-signal-list-items {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gs-signal-list-items::-webkit-scrollbar {
    width: 6px;
}

.gs-signal-list-items::-webkit-scrollbar-track {
    background: transparent;
}

.gs-signal-list-items::-webkit-scrollbar-thumb {
    background: var(--gs-scrollbar-thumb);
    border-radius: 3px;
}

.gs-signal-list-items::-webkit-scrollbar-thumb:hover {
    background: var(--gs-scrollbar-thumb-hover);
}

/* Filter badge */
.gs-filter-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--gs-tag-geo-bg);
    border-bottom: 1px solid var(--gs-border);
    font-size: 0.82rem;
    color: var(--gs-tag-geo-color);
}

.gs-filter-badge .gs-filter-clear {
    cursor: pointer;
    opacity: 0.6;
    font-size: 1.1rem;
    line-height: 1;
    margin-left: auto;
}

.gs-filter-badge .gs-filter-clear:hover {
    opacity: 1;
}

/* Globe zoom controls */
.gs-globe-zoom {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 10;
}

.gs-globe-egg {
    width: 22px;
    height: 28px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--gs-border, #d1d5db);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    cursor: pointer;
    align-self: center;
    margin-bottom: 6px;
    transition: background 0.2s, transform 0.2s;
}

.gs-globe-egg:hover {
    background: rgba(245, 235, 210, 1);
    transform: scale(1.1);
}

.gs-globe-egg:active {
    background: #e8dcc8;
    transform: scale(0.95);
}

.gs-north-pole-egg {
    width: 18px;
    height: 24px;
    background: radial-gradient(ellipse at 40% 35%, #fdf6e3, #e8d5a8 60%, #c4a96a);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.gs-globe-zoom-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--gs-border, #d1d5db);
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.gs-globe-zoom-btn:first-child {
    border-radius: 4px 4px 0 0;
}

.gs-globe-zoom-btn:last-child {
    border-radius: 0 0 4px 4px;
    border-top: none;
}

.gs-globe-zoom-btn:hover {
    background: rgba(245, 245, 245, 1);
    color: #111827;
}

.gs-globe-zoom-btn:active {
    background: #e5e7eb;
}

/* ── Pale Blue Dot Easter Egg ───────────────────────────────────── */

.gs-globe-shrunk .globe-viz canvas {
    transform: scale(0.12);
    transition: transform 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.gs-globe-shrunk {
    overflow: hidden !important;
}

.gs-globe-shrunk .globe-viz {
    background: #000 !important;
    transition: background 1.5s ease;
}

.gs-pale-blue-dot {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: calc(18% - 40px);
    z-index: 20;
    pointer-events: none;
    animation: gs-pbd-fadein 2.5s ease forwards;
}

.gs-pale-blue-dot .gs-pbd-quote {
    font-family: 'Schoolbell', cursive;
    font-size: 1.4rem;
    font-style: italic;
    color: rgba(180, 200, 230, 0.9);
    letter-spacing: 0.08em;
    text-align: center;
    line-height: 1.8;
    text-shadow: 0 0 20px rgba(100, 140, 200, 0.3);
    max-width: 480px;
}

.gs-pale-blue-dot .gs-pbd-author {
    font-family: 'Schoolbell', cursive;
    font-size: 0.85rem;
    color: rgba(140, 160, 190, 0.6);
    letter-spacing: 0.15em;
    margin-top: 1rem;
    text-transform: uppercase;
}

.gs-pale-blue-dot.gs-pbd-fadeout {
    animation: gs-pbd-fadeout 1s ease forwards;
}

@keyframes gs-pbd-fadein {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes gs-pbd-fadeout {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* ── Globe Signal Markers ────────────────────────────────────────── */

.gs-globe-marker {
    position: relative;
    pointer-events: none;
}

.gs-marker-dot {
    width: var(--dot-size);
    height: var(--dot-size);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    position: absolute;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px 3px rgba(255, 255, 255, 0.2);
}

.gs-marker-ring {
    position: absolute;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.gs-ring-thick {
    width: var(--dot-size);
    height: var(--dot-size);
    border: 3px solid rgba(0, 0, 0, 0.4);
    animation: gs-pulse-thick var(--pulse-duration) ease-out infinite;
}

.gs-ring-thin {
    width: var(--dot-size);
    height: var(--dot-size);
    border: 1.5px solid rgba(0, 0, 0, 0.25);
    animation: gs-pulse-thin var(--pulse-duration) ease-out infinite;
    animation-delay: calc(var(--pulse-duration) * 0.35);
}

@keyframes gs-pulse-thick {
    0% {
        width: var(--dot-size);
        height: var(--dot-size);
        border-width: 3px;
        opacity: 0.5;
    }
    70% {
        width: calc(var(--dot-size) * 3);
        height: calc(var(--dot-size) * 3);
        border-width: 2.5px;
        opacity: 0.2;
    }
    100% {
        width: calc(var(--dot-size) * 3.5);
        height: calc(var(--dot-size) * 3.5);
        border-width: 2px;
        opacity: 0;
    }
}

@keyframes gs-pulse-thin {
    0% {
        width: calc(var(--dot-size) * 2);
        height: calc(var(--dot-size) * 2);
        border-width: 1.5px;
        opacity: 0.35;
    }
    80% {
        width: calc(var(--dot-size) * 5);
        height: calc(var(--dot-size) * 5);
        border-width: 1px;
        opacity: 0.1;
    }
    100% {
        width: calc(var(--dot-size) * 6);
        height: calc(var(--dot-size) * 6);
        border-width: 0.5px;
        opacity: 0;
    }
}

/* ── Graph Page ──────────────────────────────────────────────────── */

.gs-graph-page {
    display: flex;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.gs-graph-page .nui-force-graph {
    height: 100%;
}

.gs-graph-fullscreen {
    background: var(--tm-bg, #fff);
}

.gs-graph-fullscreen .gs-signals-panel.nui-panel-open {
    flex-basis: 40% !important;
}

/* ── Graph toolbar — unified vertical panel ──────────────────── */
/* ─── Graph Toolbar (compact vertical, Apple-style) ─────────── */
.gs-graph-toolbar {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    width: 50px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ── Graph search bar (floating, top-center) ────────────── */
.gs-graph-search {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 280px;
}

.gs-graph-search-icon {
    position: absolute;
    left: 10px;
    top: 9px;
    pointer-events: none;
}

.gs-graph-search-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 10px;
    padding: 8px 14px 8px 32px;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    color: #333;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gs-graph-search-input::placeholder {
    color: #aaa;
}

.gs-graph-search-input:focus {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.1);
}

.gs-graph-search-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    max-height: 280px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    z-index: 20;
    padding: 4px 0;
}

.gs-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    transition: background 0.1s;
}

.gs-search-item:hover,
.gs-search-item.active {
    background: rgba(0, 0, 0, 0.05);
}

.gs-search-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.gs-search-name {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Toggle group (label + micro switch) ─────────────────── */
.gs-toggle-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.gs-toggle-group + .gs-toggle-group {
    margin-top: 5px;
}

/* ── Apple micro toggle ──────────────────────────────────── */
.gs-apple-toggle {
    position: relative;
    width: 22px;
    height: 13px;
    cursor: pointer;
    display: block;
}

.gs-apple-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.gs-apple-toggle .gs-toggle-track {
    position: absolute;
    inset: 0;
    border-radius: 13px;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.35;
}

.gs-apple-toggle input:checked + .gs-toggle-track {
    opacity: 1;
}

.gs-apple-toggle .gs-toggle-knob {
    position: absolute;
    top: 1.5px;
    left: 1.5px;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.15s ease,
                box-shadow 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25),
                0 0 1px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.gs-apple-toggle input:checked ~ .gs-toggle-knob {
    transform: translateX(9px);
}

.gs-apple-toggle:active .gs-toggle-knob {
    width: 13px;
}

.gs-apple-toggle:active input:checked ~ .gs-toggle-knob {
    width: 13px;
    transform: translateX(6px);
}

/* ── Toggle label ────────────────────────────────────────── */
.gs-toggle-label {
    font-size: 7px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #333;
    text-transform: uppercase;
    transition: color 0.3s ease;
    user-select: none;
}

/* ── Divider ─────────────────────────────────────────────── */
.gs-tb-divider {
    width: 34px;
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 10px 0;
}

/* ── Slider section (fat vertical fill slider) ───────────── */
.gs-slider-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.gs-slider-label {
    font-size: 7px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #333;
    text-transform: uppercase;
    user-select: none;
}

.gs-slider-wrapper {
    position: relative;
    width: 16px;
    height: 90px;
    background: #d1d1d6;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.gs-slider-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    border-radius: 8px;
    transition: height 0.05s linear;
    pointer-events: none;
}

.gs-slider-value {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    font-weight: 600;
    color: #333;
    pointer-events: none;
    z-index: 2;
    transition: color 0.15s ease;
}

/* ── Toolbar circular buttons ────────────────────────────── */
.gs-tb-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    padding: 0;
    color: #333;
}

.gs-tb-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.gs-tb-btn:active {
    background: rgba(0, 0, 0, 0.14);
}

.gs-tb-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.gs-tb-btn svg {
    pointer-events: none;
}

.gs-reorder-btn:active {
    transform: rotate(-45deg);
}

/* ── Nav buttons (focus mode) ────────────────────────────── */
.gs-tb-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.gs-tb-nav-btns {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* ── Corroboration Bar ─────────────────────────────────────────── */

.gs-corroboration-bar {
    margin: 0.35rem 0 0.15rem;
}

.gs-corroboration-bar-compact {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.3rem 0 0.1rem;
}

.gs-corr-track {
    display: flex;
    height: 5px;
    border-radius: 3px;
    overflow: hidden;
    background: #e5e7eb;
    flex: 1;
}

.gs-corroboration-bar:not(.gs-corroboration-bar-compact) .gs-corr-track {
    margin-bottom: 0.25rem;
}

.gs-corr-seg {
    transition: width 0.3s ease;
}

.gs-corr-ok {
    background: var(--gs-success, #16a34a);
}

.gs-corr-bad {
    background: var(--gs-danger, #dc2626);
}

.gs-corr-unk {
    background: #d1d5db;
}

.gs-corr-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gs-corr-label {
    font-size: 0.7rem;
    color: var(--gs-text-muted);
    white-space: nowrap;
}

.gs-corr-claims {
    font-size: 0.68rem;
    color: var(--gs-text-muted);
    opacity: 0.7;
}

.gs-corr-stale {
    color: var(--gs-warning, #d97706);
    margin-left: 0.2rem;
    font-size: 0.65rem;
}

/* ── Claim Analysis Widget ──────────────────────────────────────── */

.gs-claim-analysis {
    border-bottom: 1px solid var(--gs-border);
}

.gs-claim-analysis-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--gs-pane-header-bg);
    border-bottom: 1px solid var(--gs-border);
}

.gs-claim-tabs {
    display: flex;
    gap: 2px;
}

.gs-claim-tab {
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid var(--gs-border);
    background: transparent;
    color: var(--gs-text-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.gs-claim-tab:first-child {
    border-radius: 3px 0 0 3px;
}

.gs-claim-tab:last-child {
    border-radius: 0 3px 3px 0;
}

.gs-claim-tab-active {
    background: var(--gs-accent);
    border-color: var(--gs-accent);
    color: #fff;
}

.gs-claim-analysis-body {
    max-height: 300px;
    overflow-y: auto;
}

.gs-claim-analysis-body::-webkit-scrollbar {
    width: 6px;
}

.gs-claim-analysis-body::-webkit-scrollbar-track {
    background: transparent;
}

.gs-claim-analysis-body::-webkit-scrollbar-thumb {
    background: var(--gs-scrollbar-thumb);
    border-radius: 3px;
}

/* ── Pipeline progress animation ──────────────────────────────── */

.gs-claim-progress {
    padding: 1.2rem 1rem 1rem;
}

.gs-pipeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 0.8rem;
}

.gs-pipeline-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}

.gs-pipeline-node {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--gs-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    color: var(--gs-text-muted);
    opacity: 0.4;
    transition: all 0.4s ease;
    position: relative;
}

.gs-pipeline-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gs-text-muted);
    opacity: 0.5;
    transition: opacity 0.3s;
    font-weight: 600;
}

/* Active stage */
.gs-pipeline-stage.active .gs-pipeline-node {
    border-color: var(--gs-accent, #2563eb);
    opacity: 1;
    color: var(--gs-accent, #2563eb);
    animation: gs-node-pulse 2s ease-in-out infinite;
}
.gs-pipeline-stage.active .gs-pipeline-label {
    opacity: 1;
    color: var(--gs-accent, #2563eb);
}

/* Complete stage */
.gs-pipeline-stage.complete .gs-pipeline-node {
    border-color: var(--gs-success, #16a34a);
    background: var(--gs-success, #16a34a);
    opacity: 1;
    color: #fff;
    animation: none;
}
.gs-pipeline-stage.complete .gs-pipeline-label {
    opacity: 0.7;
    color: var(--gs-success, #16a34a);
}

/* Error stage */
.gs-pipeline-stage.error .gs-pipeline-node {
    border-color: var(--gs-danger, #dc3545);
    opacity: 1;
    color: var(--gs-danger, #dc3545);
    animation: none;
}
.gs-pipeline-stage.error .gs-pipeline-label {
    opacity: 1;
    color: var(--gs-danger, #dc3545);
}

/* Connector between stages */
.gs-pipeline-connector {
    flex: 1;
    height: 2px;
    background: var(--gs-border);
    position: relative;
    min-width: 30px;
    max-width: 80px;
    margin: 0 0.15rem;
    margin-bottom: 1.2rem; /* align with node center, not label */
    overflow: hidden;
}

.gs-pipeline-connector.active {
    background: color-mix(in srgb, var(--gs-accent, #2563eb) 30%, transparent);
}

/* Animated particles */
.gs-pipeline-particle {
    position: absolute;
    top: -1px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gs-accent, #2563eb);
    opacity: 0;
}

.gs-pipeline-connector.active .gs-pipeline-particle {
    animation: gs-particle-flow 1.8s linear infinite;
}
.gs-pipeline-connector.active .gs-pipeline-particle:nth-child(2) {
    animation-delay: 0.6s;
}
.gs-pipeline-connector.active .gs-pipeline-particle:nth-child(3) {
    animation-delay: 1.2s;
}

@keyframes gs-particle-flow {
    0%   { left: -4px; opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { left: calc(100% + 4px); opacity: 0; }
}

@keyframes gs-node-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.3); }
    50%      { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0); }
}

/* Progress bar */
.gs-progress-track {
    height: 3px;
    background: var(--gs-border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.gs-progress-fill {
    height: 100%;
    background: var(--gs-accent, #2563eb);
    border-radius: 2px;
    width: 0%;
    transition: width 0.5s ease;
}

.gs-progress-fill.error {
    background: var(--gs-danger, #dc3545);
}

/* Progress info row */
.gs-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    color: var(--gs-text-muted);
    margin-bottom: 0.5rem;
    min-height: 1.2em;
}

.gs-progress-pct {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 2.5em;
}

.gs-progress-detail {
    flex: 1;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: 0.5rem;
}

.gs-cancel-analysis {
    display: block;
    margin: 0 auto;
    font-size: 0.72rem !important;
    padding: 0.2rem 0.8rem !important;
}

/* Cancelled state */
.gs-claim-progress.cancelled .gs-pipeline-node {
    animation: none;
}
.gs-claim-progress.cancelled .gs-pipeline-particle {
    animation: none;
    opacity: 0;
}
.gs-claim-progress.cancelled .gs-progress-fill {
    opacity: 0.4;
}

/* Transition from progress to results */
.gs-claim-analysis-body {
    max-height: 300px;
    overflow-y: auto;
    transition: opacity 0.3s ease;
}

/* ── Claim Matrix ──────────────────────────────────────────────── */

.gs-matrix-scroll {
    overflow-x: auto;
}

.gs-matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.gs-matrix-table thead th {
    position: sticky;
    top: 0;
    background: var(--gs-pane-header-bg);
    padding: 0.4rem 0.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.72rem;
    color: var(--gs-text-muted);
    border-bottom: 2px solid var(--gs-border);
    white-space: nowrap;
}

.gs-matrix-claim-header {
    text-align: left !important;
    min-width: 180px;
}

.gs-matrix-source {
    min-width: 70px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gs-matrix-row {
    border-bottom: 1px solid var(--gs-border);
}

.gs-matrix-row:hover {
    background: var(--gs-bg-hover);
}

.gs-matrix-claim {
    padding: 0.4rem 0.5rem;
    font-size: 0.76rem;
    color: var(--gs-text);
    line-height: 1.35;
    max-width: 250px;
}

.gs-matrix-claim-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gs-matrix-cell {
    padding: 0.3rem;
    text-align: center;
    vertical-align: middle;
}

/* Specificity indicators */
.gs-spec-high {
    border-left: 2px solid var(--gs-accent);
}

.gs-spec-medium {
    border-left: 2px solid #d1d5db;
}

.gs-spec-low {
    border-left: 2px solid transparent;
}

/* Type icons */
.gs-type-icon {
    font-size: 0.65rem;
    color: var(--gs-text-muted);
    margin-right: 0.3rem;
    width: 12px;
    text-align: center;
    opacity: 0.6;
}

/* Stance indicators — colored circles */
.gs-stance {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: default;
}

.gs-stance-origin {
    border: 2px solid var(--gs-accent);
    background: transparent;
}

.gs-stance-supports {
    background: var(--gs-success, #16a34a);
}

.gs-stance-contradicts {
    background: var(--gs-danger, #dc2626);
}

.gs-stance-neutral {
    background: #d1d5db;
}

.gs-stance-none {
    background: transparent;
}

.gs-matrix-empty {
    padding: 1.5rem;
    text-align: center;
    color: var(--gs-text-muted);
    font-size: 0.82rem;
}

/* ── Detail corroboration section ─────────────────────────────── */

.gs-detail-corroboration {
    margin: 0.5rem 0;
}

.gs-detail-corroboration .gs-corroboration-bar {
    margin-bottom: 0.3rem;
}

.gs-detail-corroboration .btn {
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

.gs-analyze-claims,
.gs-reanalyze-claims {
    font-size: 0.75rem !important;
}

/* ── Sankey container ─────────────────────────────────────────── */

.gs-sankey-container {
    padding: 0.5rem;
    min-height: 200px;
}

.gs-sankey-container svg {
    width: 100%;
    height: auto;
}

/* ── Dashboard ─────────────────────────────────────────────────── */

.gs-dashboard {
    padding: 1.5rem;
    overflow-y: auto;
    height: 100%;
}

.gs-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.gs-dashboard-header h5 {
    margin: 0;
    font-weight: 600;
}

.gs-dashboard-month-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.gs-dashboard-month-nav button {
    background: none;
    border: 1px solid var(--gs-border);
    border-radius: 4px;
    padding: 0.2rem 0.6rem;
    cursor: pointer;
    color: var(--gs-text);
    font-size: 0.85rem;
    transition: background-color 0.15s;
}

.gs-dashboard-month-nav button:hover {
    background-color: var(--gs-bg-hover, #e5e7eb);
}

/* Metric summary cards */
.gs-metrics-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gs-metric-card {
    background: var(--gs-bg-card);
    border: 1px solid var(--gs-border);
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
}

.gs-metric-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gs-text-muted);
    margin-bottom: 0.25rem;
}

.gs-metric-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gs-accent);
    line-height: 1.2;
}

.gs-metric-sub {
    font-size: 0.68rem;
    color: var(--gs-text-muted);
    margin-top: 0.25rem;
}

/* Chart sections */
.gs-chart-section {
    background: var(--gs-bg-card);
    border: 1px solid var(--gs-border);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.gs-chart-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gs-text);
}

.gs-chart-container {
    position: relative;
    width: 100%;
    height: 160px;
}

/* Entity distribution */
.gs-entity-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.gs-entity-card {
    background: var(--gs-bg-card);
    border: 1px solid var(--gs-border);
    border-radius: 6px;
    padding: 1rem;
}

.gs-entity-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.gs-entity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0;
    font-size: 0.8rem;
}

.gs-entity-name {
    color: var(--gs-text);
}

.gs-entity-count {
    color: var(--gs-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 2rem;
    text-align: right;
}

.gs-entity-bar {
    height: 3px;
    border-radius: 2px;
    margin-bottom: 0.35rem;
    transition: width 0.3s ease;
}

.gs-entity-empty {
    font-size: 0.8rem;
    color: var(--gs-text-muted);
    font-style: italic;
    padding: 0.5rem 0;
}

/* ── Pipeline Performance Section ─────────────────────────────────── */

.gs-perf-section {
    margin-top: 1.5rem;
    background: var(--gs-surface, #fff);
    border: 1px solid var(--gs-border, #e5e7eb);
    border-radius: 10px;
    padding: 1.25rem;
}

.gs-perf-header {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gs-text, #111);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gs-perf-header i {
    color: var(--gs-primary, #2563eb);
}

.gs-perf-session-label {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--gs-text-muted, #9ca3af);
}

.gs-perf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

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

.gs-perf-table-wrap {
    overflow-x: auto;
}

.gs-perf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.gs-perf-table thead th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--gs-text-muted, #6b7280);
    border-bottom: 2px solid var(--gs-border, #e5e7eb);
}

.gs-perf-table tbody td {
    padding: 0.45rem 0.75rem;
    color: var(--gs-text, #111);
    border-bottom: 1px solid var(--gs-border-light, #f3f4f6);
}

.gs-perf-table tbody td:first-child {
    font-weight: 500;
}

.gs-perf-table tbody td:not(:first-child) {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.gs-perf-table thead th:not(:first-child) {
    text-align: right;
}

.gs-perf-chart-wrap {
    display: flex;
    flex-direction: column;
}

.gs-perf-chart-wrap .gs-chart-container {
    flex: 1;
    min-height: 200px;
}

/* ── Claim Timeline ──────────────────────────────────────────────── */

.gs-claim-timeline {
    height: 100%;
    overflow: hidden;
}

.gs-claim-timeline-items {
    height: 100%;
    overflow-y: auto;
    padding: 0;
}

.gs-tclaim-item {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--gs-border);
    cursor: pointer;
    transition: background-color 0.15s;
    overflow: hidden;
}

.gs-tclaim-item:hover {
    background-color: var(--gs-bg-hover);
}

.gs-tclaim-item.gs-selected {
    background-color: var(--gs-bg-selected);
    border-left: 3px solid var(--gs-accent);
}

.gs-tclaim-item.gs-tclaim-new {
    animation: gs-slide-in 0.4s ease-out;
    background-color: var(--gs-new-item-bg);
}

/* Reuse the feed header layout */
.gs-tclaim-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
}

.gs-tclaim-text {
    font-size: 0.82rem;
    color: var(--gs-text);
    line-height: 1.4;
    margin-bottom: 0.3rem;
}

.gs-tclaim-footer {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
}

.gs-tclaim-subject {
    color: var(--gs-accent);
    font-weight: 600;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gs-tclaim-topic {
    color: var(--gs-text-muted);
    font-weight: 500;
    font-size: 0.7rem;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Type badges */
.gs-tclaim-badge {
    display: inline-block;
    padding: 0.05rem 0.4rem;
    border-radius: 3px;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.gs-tclaim-type-event {
    background: rgba(37, 99, 235, 0.10);
    color: #2563eb;
}

.gs-tclaim-type-attribution {
    background: rgba(124, 58, 237, 0.10);
    color: #7c3aed;
}

.gs-tclaim-type-quantity {
    background: rgba(22, 163, 74, 0.10);
    color: #16a34a;
}

.gs-tclaim-type-prediction {
    background: rgba(217, 119, 6, 0.10);
    color: #d97706;
}

.gs-tclaim-type-opinion {
    background: rgba(107, 114, 128, 0.10);
    color: #6b7280;
}

/* Specificity dots */
.gs-tclaim-spec {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-left: 0.15rem;
}

.gs-tclaim-spec-high { background: var(--gs-success); }
.gs-tclaim-spec-med  { background: var(--gs-warning); }
.gs-tclaim-spec-low  { background: var(--gs-text-muted); }

/* Status message */
.gs-tclaim-status {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--gs-text-muted);
    font-size: 0.82rem;
}

/* Detail panel for selected claim */
.gs-tclaim-detail {
    padding: 1rem;
}

.gs-tclaim-detail-claim {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--gs-text);
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: var(--gs-bg-hover);
    border-radius: 6px;
    border-left: 3px solid var(--gs-accent);
}

.gs-tclaim-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--gs-text-muted);
    margin-bottom: 0.75rem;
}

.gs-tclaim-detail-meta strong {
    color: var(--gs-text);
}

.gs-tclaim-detail-signal {
    border-top: 1px solid var(--gs-border);
    padding-top: 0.75rem;
}

.gs-tclaim-detail-signal-title {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--gs-text-bright);
    margin-bottom: 0.25rem;
}

.gs-tclaim-detail-signal-summary {
    font-size: 0.78rem;
    color: var(--gs-text-muted);
    line-height: 1.4;
}

.gs-tclaim-detail-siblings {
    margin-top: 0.75rem;
    border-top: 1px solid var(--gs-border);
    padding-top: 0.75rem;
}

.gs-tclaim-detail-siblings-title {
    font-size: 0.72rem;
    color: var(--gs-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.gs-tclaim-sibling {
    font-size: 0.78rem;
    color: var(--gs-text);
    padding: 0.3rem 0;
    border-bottom: 1px dotted var(--gs-border);
}

.gs-tclaim-sibling:last-child {
    border-bottom: none;
}

.gs-tclaim-sibling.gs-tclaim-sibling-active {
    color: var(--gs-accent);
    font-weight: 600;
}

/* Scrollbar */
.gs-claim-timeline-items::-webkit-scrollbar {
    width: 6px;
}
.gs-claim-timeline-items::-webkit-scrollbar-track {
    background: transparent;
}
.gs-claim-timeline-items::-webkit-scrollbar-thumb {
    background: var(--gs-scrollbar-thumb);
    border-radius: 3px;
}
.gs-claim-timeline-items::-webkit-scrollbar-thumb:hover {
    background: var(--gs-scrollbar-thumb-hover);
}

/* ── Claims List Page ────────────────────────────────────────────── */

.gs-claims-list-page {
    height: 100%;
    overflow: hidden;
}

.gs-claimlist-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* ── Toolbar ─────────────────────────────────────────────────────── */

.gs-claimlist-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-bottom: 1px solid var(--gs-border, rgba(255,255,255,0.08));
    background: var(--gs-panel-header-bg, rgba(0,0,0,0.15));
    flex-shrink: 0;
}

.gs-claimlist-search {
    width: 180px;
    padding: 5px 10px;
    border: 1px solid var(--gs-border, rgba(255,255,255,0.12));
    border-radius: 4px;
    background: var(--gs-input-bg, rgba(255,255,255,0.06));
    color: var(--gs-text, #e0e0e0);
    font-size: 12px;
    outline: none;
}
.gs-claimlist-search:focus {
    border-color: var(--gs-accent, #5b9cf6);
}

.gs-claimlist-sep {
    width: 1px;
    height: 22px;
    background: var(--gs-border, rgba(255,255,255,0.1));
    flex-shrink: 0;
}

/* Toggle button group */
.gs-claimlist-toggles {
    display: flex;
    gap: 4px;
}

.gs-claimlist-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: var(--gs-text-muted, #888);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    opacity: 0.35;
    white-space: nowrap;
}
.gs-claimlist-toggle:hover {
    opacity: 0.7;
    background: rgba(255,255,255,0.04);
}
.gs-claimlist-toggle.active {
    opacity: 1;
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.08);
}

/* Type toggle dot */
.gs-toggle-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Platform toggle icon */
.gs-toggle-icon {
    font-size: 18px;
    line-height: 1;
}
.gs-claimlist-platform-toggle {
    padding: 4px 8px;
}

.gs-claimlist-count {
    font-size: 13px;
    color: var(--gs-text-muted, #888);
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Claim cards list ────────────────────────────────────────────── */

.gs-claimlist-items {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.gs-claimlist-items::-webkit-scrollbar { width: 6px; }
.gs-claimlist-items::-webkit-scrollbar-track { background: transparent; }
.gs-claimlist-items::-webkit-scrollbar-thumb {
    background: var(--gs-scrollbar-thumb, rgba(255,255,255,0.1));
    border-radius: 3px;
}

.gs-claimlist-card {
    display: flex;
    align-items: stretch;
    background: var(--gs-bg-hover);
    border-radius: 8px;
    cursor: pointer;
    transition: box-shadow 0.15s, background-color 0.15s;
}

/* Stripe rounds to match card corners */
.gs-claimlist-type-stripe {
    border-radius: 8px 0 0 8px;
}
.gs-claimlist-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.gs-claimlist-card.gs-selected {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

/* Colored left stripe — width + border-radius set above with .gs-claimlist-card */
.gs-claimlist-type-stripe {
    width: 3px;
    flex-shrink: 0;
    align-self: stretch;
}

/* Type label column */
.gs-claimlist-type-col {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    flex-shrink: 0;
    padding: 0.5rem 0;
}
.gs-claimlist-type-label {
    font-size: 0.52rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    writing-mode: horizontal-tb;
}

/* Platform logo in card */
.gs-claimlist-card .gs-item-platform-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    flex-shrink: 0;
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Card body */
.gs-claimlist-body {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.75rem 0.6rem 0.5rem;
}
.gs-claimlist-body .gs-item-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
    font-size: 0.78rem;
}
.gs-claimlist-body .gs-item-preview {
    font-size: 0.78rem;
    color: var(--gs-text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Subject & topic pills in header */
.gs-claimlist-subject {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--gs-accent, #5b9cf6);
    background: rgba(91, 156, 246, 0.08);
    padding: 1px 6px;
    border-radius: 3px;
}
.gs-claimlist-topic {
    font-size: 0.68rem;
    color: var(--gs-text-muted, #888);
    background: rgba(255,255,255,0.05);
    padding: 1px 5px;
    border-radius: 3px;
}

.gs-claimlist-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gs-text-muted, #888);
    font-size: 0.85rem;
}

/* ── Timeline Explorer (3-zone layout) ───────────────────────────── */

.gs-timeline-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.gs-timeline-top {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.gs-timeline-bottom {
    height: 320px;
    min-height: 200px;
    max-height: 450px;
    border-top: 1px solid var(--gs-border);
    flex-shrink: 0;
    resize: vertical;
    overflow: hidden;
}

/* ── Timeline Strip Widget ───────────────────────────────────────── */

.gs-tstrip {
    display: flex;
    height: 100%;
    position: relative;
    background: #f8f9fa;
}

/* Left controls column — TimelineJS3 style */
.gs-tstrip-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1px;
    padding: 6px 3px;
    flex-shrink: 0;
    width: 36px;
}

.gs-tstrip-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ccc;
    border-radius: 2px;
    background: #f8f8f8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: background 0.12s, color 0.12s;
}

.gs-tstrip-btn:hover {
    background: #eee;
    color: #333;
}

.gs-tstrip-btn:active {
    background: #ddd;
}

.gs-tstrip-canvas-wrap {
    flex: 1;
    position: relative;
    min-height: 0;
}

.gs-tstrip-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.gs-tstrip-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% - 8px);
    background: #1f2937;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    line-height: 1.4;
    max-width: 260px;
    pointer-events: none;
    z-index: 20;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.gs-tstrip-tooltip strong {
    color: #93c5fd;
}

/* ── Siblings Widget ─────────────────────────────────────────────── */

.gs-siblings {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.gs-siblings-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gs-border);
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    background: var(--gs-bg-card);
}

.gs-siblings-author {
    font-weight: 600;
    color: var(--gs-text);
}

.gs-siblings-time {
    color: var(--gs-text-muted);
    font-size: 0.75rem;
}

.gs-siblings-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.gs-siblings-item {
    padding: 10px 16px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background 0.12s, border-color 0.12s;
}

.gs-siblings-item:hover {
    background: var(--gs-bg-hover);
}

.gs-siblings-item.gs-siblings-active {
    background: var(--gs-bg-selected);
    border-left-color: var(--gs-accent);
}

.gs-siblings-text {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--gs-text);
    margin-bottom: 4px;
}

.gs-siblings-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.gs-siblings-subject {
    font-size: 0.72rem;
    color: var(--gs-text-muted);
    background: rgba(0,0,0,0.04);
    padding: 1px 6px;
    border-radius: 3px;
}

.gs-siblings-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--gs-text-muted);
    font-size: 0.82rem;
}

.gs-siblings-list::-webkit-scrollbar { width: 6px; }
.gs-siblings-list::-webkit-scrollbar-track { background: transparent; }
.gs-siblings-list::-webkit-scrollbar-thumb { background: var(--gs-scrollbar-thumb); border-radius: 3px; }

/* ── Source Content Widget ───────────────────────────────────────── */

.gs-source-content {
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.gs-source-inner {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
}

.gs-source-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    font-size: 0.82rem;
}

/* Platform badge — pill with inline SVG icon (TimelineJS slide style) */
.gs-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.gs-source-badge svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.gs-source-badge--youtube  { background: #fee2e2; color: #dc2626; }
.gs-source-badge--x        { background: var(--gs-bg-hover); color: var(--gs-text); }
.gs-source-badge--telegram  { background: #dbeafe; color: #2563eb; }

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

.gs-source-author {
    font-weight: 600;
    color: var(--gs-text);
}

.gs-source-time {
    color: var(--gs-text-muted);
    font-size: 0.75rem;
    margin-left: auto;
}

.gs-source-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gs-text-bright);
    line-height: 1.35;
    margin-bottom: 16px;
}

.gs-source-body {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--gs-text);
    white-space: pre-wrap;
    word-break: break-word;
}

.gs-source-link {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--gs-border);
}

.gs-source-link a {
    color: var(--gs-accent);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
}

.gs-source-link a:hover {
    text-decoration: underline;
}

.gs-source-empty,
.gs-source-loading {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--gs-text-muted);
    font-size: 0.82rem;
}

.gs-source-inner::-webkit-scrollbar { width: 6px; }
.gs-source-inner::-webkit-scrollbar-track { background: transparent; }
.gs-source-inner::-webkit-scrollbar-thumb { background: var(--gs-scrollbar-thumb); border-radius: 3px; }

/* ── Server Health Page ───────────────────────────────────────────── */

.gs-health {
    padding: 24px 32px;
}

.gs-health-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.gs-health-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--gs-text, #1e293b);
}

.gs-health-reset-btn {
    margin-left: auto;
}

.gs-health-uptime {
    margin-left: auto;
    font-size: 13px;
    color: var(--gs-muted, #94a3b8);
}

.gs-health-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.gs-health-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.gs-health-badge--ok {
    background: #dcfce7;
    color: #166534;
}
.gs-health-badge--ok::before { background: #16a34a; }

.gs-health-badge--active {
    background: #dbeafe;
    color: #1e40af;
}
.gs-health-badge--active::before {
    background: #3b82f6;
    animation: gs-health-pulse 1.5s ease-in-out infinite;
}

.gs-health-badge--error {
    background: #fee2e2;
    color: #991b1b;
}
.gs-health-badge--error::before { background: #ef4444; }

@keyframes gs-health-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.gs-health-progress {
    margin-bottom: 20px;
}

.gs-health-progress__bar {
    height: 8px;
    background: var(--gs-border, #e2e8f0);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.gs-health-progress__fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.gs-health-progress__label {
    font-size: 13px;
    color: var(--gs-muted, #64748b);
}

.gs-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.gs-health-card {
    background: var(--gs-surface, #ffffff);
    border: 1px solid var(--gs-border, #e2e8f0);
    border-radius: 8px;
    padding: 16px;
}

.gs-health-card h3 {
    margin: 0 0 12px 0;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gs-muted, #64748b);
}

.gs-health-table {
    width: 100%;
    border-collapse: collapse;
}

.gs-health-table tr + tr {
    border-top: 1px solid var(--gs-border-light, #f1f5f9);
}

.gs-health-table td {
    padding: 5px 0;
    font-size: 13px;
}

.gs-health-label {
    color: var(--gs-muted, #64748b);
    width: 45%;
}

.gs-health-value {
    color: var(--gs-text, #1e293b);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.gs-health-value code {
    font-size: 11px;
    background: var(--gs-border-light, #f1f5f9);
    padding: 2px 5px;
    border-radius: 3px;
    word-break: break-all;
}

.gs-health-offline {
    padding: 40px;
    text-align: center;
    color: var(--gs-muted, #64748b);
}

.gs-health-offline code {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #ef4444;
}

/* ── Reporter Page ───────────────────────────────────────────────── */

.gs-reporter-page {
    height: 100%;
    overflow: hidden;
}

.gs-reporter-layout {
    display: flex;
    height: 100%;
}

/* ── Sidebar (calendar + controls) ───────────────────────────────── */

.gs-reporter-sidebar {
    width: 280px;
    flex-shrink: 0;
    border-right: 1px solid var(--gs-border, #e2e8f0);
    background: var(--gs-bg-card, #fff);
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 14px;
    overflow-y: auto;
}

/* Calendar header — month nav */
.gs-reporter-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
}

.gs-cal-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gs-text, #1e293b);
}

.gs-cal-prev,
.gs-cal-next {
    width: 28px;
    height: 28px;
    border: 1px solid var(--gs-border, #e2e8f0);
    border-radius: 5px;
    background: none;
    color: var(--gs-text-muted, #64748b);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, color 0.12s;
}
.gs-cal-prev:hover,
.gs-cal-next:hover {
    background: var(--gs-bg-hover, #f1f5f9);
    color: var(--gs-text, #1e293b);
}

/* Calendar grid */
.gs-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}

.gs-cal-dow {
    text-align: center;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--gs-text-muted, #94a3b8);
    padding: 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.gs-cal-cell {
    /* empty spacer */
    aspect-ratio: 1;
}

.gs-cal-day {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    font-size: 0.78rem;
    color: var(--gs-text, #1e293b);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
    user-select: none;
    position: relative;
}

.gs-cal-day:hover:not(.gs-cal-disabled) {
    background: var(--gs-bg-hover, #f1f5f9);
}

.gs-cal-today {
    font-weight: 700;
    color: var(--gs-accent, #3b82f6);
}

.gs-cal-today::after {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gs-accent, #3b82f6);
}

/* Range selection */
.gs-cal-start,
.gs-cal-end {
    background: var(--gs-accent, #3b82f6) !important;
    color: #fff !important;
    font-weight: 600;
    border-radius: 6px;
}

.gs-cal-start::after,
.gs-cal-end::after {
    display: none;
}

.gs-cal-in-range {
    background: rgba(59, 130, 246, 0.1);
    color: var(--gs-accent, #3b82f6);
    font-weight: 500;
    border-radius: 2px;
}

.gs-cal-disabled {
    color: var(--gs-text-muted, #ccc);
    opacity: 0.4;
    cursor: default;
}

/* ── Hours section ───────────────────────────────────────────────── */

.gs-reporter-hours {
    display: flex;
    gap: 12px;
    padding: 10px 0 0;
    border-top: 1px solid var(--gs-border, #e2e8f0);
}

.gs-reporter-hour-field {
    flex: 1;
}

.gs-reporter-hour-field label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gs-text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.gs-reporter-hour-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gs-reporter-date-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--gs-text, #1e293b);
    white-space: nowrap;
    min-width: 44px;
}

.gs-reporter-hour-field select {
    flex: 1;
    font-size: 0.8rem;
    padding: 4px 6px;
    border: 1px solid var(--gs-border, #e2e8f0);
    border-radius: 5px;
    background: var(--gs-bg, #f8fafc);
    color: var(--gs-text, #1e293b);
    outline: none;
    cursor: pointer;
}

.gs-reporter-hour-field select:focus {
    border-color: var(--gs-accent, #3b82f6);
    box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}

/* ── Quick presets ────────────────────────────────────────────────── */

.gs-reporter-presets {
    display: flex;
    gap: 4px;
}

.gs-reporter-presets button {
    flex: 1;
    padding: 5px 0;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid var(--gs-border, #e2e8f0);
    border-radius: 5px;
    background: none;
    color: var(--gs-text-muted, #64748b);
    cursor: pointer;
    transition: all 0.12s;
}

.gs-reporter-presets button:hover {
    background: var(--gs-bg-hover, #f1f5f9);
    color: var(--gs-text, #1e293b);
}

.gs-reporter-presets button.gs-active {
    background: var(--gs-accent, #3b82f6);
    color: #fff;
    border-color: var(--gs-accent, #3b82f6);
}

/* ── Report options ────────────────────────���─────────────────────── */

.gs-reporter-options {
    padding: 8px 0 0;
}

.gs-reporter-options-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gs-text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 5px;
}

.gs-reporter-toggle-group {
    display: flex;
    gap: 4px;
}

.gs-reporter-toggle-group button {
    flex: 1;
    padding: 5px 0;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid var(--gs-border, #e2e8f0);
    border-radius: 5px;
    background: none;
    color: var(--gs-text-muted, #64748b);
    cursor: pointer;
    transition: all 0.12s;
}

.gs-reporter-toggle-group button:hover {
    background: var(--gs-bg-hover, #f1f5f9);
    color: var(--gs-text, #1e293b);
}

.gs-reporter-toggle-group button.gs-active {
    background: var(--gs-accent, #3b82f6);
    color: #fff;
    border-color: var(--gs-accent, #3b82f6);
}

/* Toggle switches */
.gs-reporter-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.78rem;
    color: var(--gs-text, #1e293b);
}

.gs-switch {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.gs-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.gs-switch-slider {
    position: absolute;
    inset: 0;
    background: var(--gs-border, #d1d5db);
    border-radius: 9px;
    transition: background 0.15s;
}

.gs-switch-slider::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.15s;
}

.gs-switch input:checked + .gs-switch-slider {
    background: var(--gs-accent, #3b82f6);
}

.gs-switch input:checked + .gs-switch-slider::before {
    transform: translateX(14px);
}

/* ── Action buttons ──────────────────────────────────────────────── */

.gs-reporter-generate {
    width: 100%;
    padding: 9px 14px;
    font-size: 0.84rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    background: var(--gs-accent, #3b82f6);
    color: #fff;
    cursor: pointer;
    transition: background 0.12s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.gs-reporter-generate:hover:not(:disabled) {
    background: #2563eb;
}

.gs-reporter-generate:disabled {
    opacity: 0.6;
    cursor: wait;
}

.gs-reporter-copy {
    width: 100%;
    padding: 7px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--gs-border, #e2e8f0);
    border-radius: 6px;
    background: none;
    color: var(--gs-text, #1e293b);
    cursor: pointer;
    transition: all 0.12s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.gs-reporter-copy:hover:not(:disabled) {
    background: var(--gs-bg-hover, #f1f5f9);
}

.gs-reporter-copy:disabled {
    opacity: 0.4;
    cursor: default;
}

/* ── Main content area ───────────────────────────────────────────── */

.gs-reporter-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.gs-reporter-output {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0;
}

.gs-reporter-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gs-text-muted, #94a3b8);
    text-align: center;
    padding: 3rem;
}

.gs-reporter-placeholder i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.gs-reporter-placeholder p {
    max-width: 420px;
    font-size: 0.88rem;
    line-height: 1.6;
}

.gs-reporter-content {
    padding: 32px 48px 48px;
    max-width: 860px;
    margin: 0 auto;
}

.gs-reporter-spinner {
    text-align: center;
    padding: 12px 0 24px;
    color: var(--gs-accent, #3b82f6);
    font-size: 0.88rem;
    font-weight: 500;
}

.gs-reporter-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    margin: 24px 48px;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* ── Rendered markdown styling ───────────────────────────────────── */

.gs-reporter-rendered {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--gs-text, #1e293b);
}

.gs-reporter-rendered h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 8px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gs-border, #e2e8f0);
    color: var(--gs-text-bright, #0f172a);
}

.gs-reporter-rendered h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 28px 0 12px;
    color: var(--gs-text-bright, #0f172a);
}

.gs-reporter-rendered h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 20px 0 8px;
    color: var(--gs-text, #1e293b);
}

.gs-reporter-rendered p {
    margin: 0 0 12px;
}

.gs-reporter-rendered ul,
.gs-reporter-rendered ol {
    margin: 0 0 12px;
    padding-left: 24px;
}

.gs-reporter-rendered li {
    margin-bottom: 4px;
}

.gs-reporter-rendered strong {
    font-weight: 600;
    color: var(--gs-text-bright, #0f172a);
}

.gs-reporter-rendered blockquote {
    border-left: 3px solid var(--gs-accent, #3b82f6);
    margin: 12px 0;
    padding: 8px 16px;
    background: rgba(59,130,246,0.04);
    color: var(--gs-text, #334155);
    font-style: italic;
}

.gs-reporter-rendered code {
    font-size: 0.85em;
    background: rgba(0,0,0,0.05);
    padding: 2px 5px;
    border-radius: 3px;
}

.gs-reporter-rendered hr {
    border: none;
    border-top: 1px solid var(--gs-border, #e2e8f0);
    margin: 24px 0;
}

.gs-reporter-output::-webkit-scrollbar { width: 6px; }
.gs-reporter-output::-webkit-scrollbar-track { background: transparent; }
.gs-reporter-output::-webkit-scrollbar-thumb { background: var(--gs-scrollbar-thumb, #cbd5e1); border-radius: 3px; }

.gs-reporter-sidebar::-webkit-scrollbar { width: 4px; }
.gs-reporter-sidebar::-webkit-scrollbar-track { background: transparent; }
.gs-reporter-sidebar::-webkit-scrollbar-thumb { background: var(--gs-scrollbar-thumb, #cbd5e1); border-radius: 2px; }

/* ── PanelLayout Overrides ──────────────────────────────────────────── */

.nui-panel-layout {
    font-family: 'Lato', sans-serif;
    font-size: 2em;
}

.nui-panel {
    border: none !important;
}

.nui-panel-header {
    /* font-family: 'Lato', sans-serif; */
    padding: 5px!important;
    border: 0px!important;
    background-color: transparent!important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    z-index: 1000!important;
}

.nui-panel-title {
    font-size: 1.2em !important;
}


.nui-panel.nui-panel-main {
    background: transparent;
}

.nui-panel-header {
    border-bottom: none;
}

.nui-panel[data-side] .nui-panel-title {
    color: #555!important;
    font-size: 0.8em!important;
    padding-top: 19px;
}
