:root {
    --bg-primary: #090c16;
    --bg-secondary: #0f1525;
    --bg-tertiary: #131d31;
    --surface-glass: rgba(255, 255, 255, 0.06);
    --surface-glass-strong: rgba(255, 255, 255, 0.1);
    --surface-muted: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.14);
    --border-glass-strong: rgba(255, 255, 255, 0.22);
    --text-primary: #f5f9ff;
    --text-secondary: #aab6cf;
    --text-muted: #7f8ca8;
    --accent-blue: #5a6bff;
    --accent-cyan: #22d3ee;
    --accent-green: #34d399;
    --accent-amber: #fbbf24;
    --danger: #f87171;
    --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.25);
    --radius-xl: 1.25rem;
    --radius-lg: 0.9rem;
    --radius-md: 0.7rem;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(circle at 8% 10%, rgba(90, 107, 255, 0.3) 0%, transparent 45%),
        radial-gradient(circle at 88% 85%, rgba(34, 211, 238, 0.22) 0%, transparent 40%),
        linear-gradient(160deg, #070b14 0%, #0c1221 60%, #0b1220 100%);
    color: var(--text-primary);
}

.signalscope-hero {
    position: relative;
    margin: 1.8rem auto 0;
    width: min(1300px, calc(100% - 2rem));
    border: 1px solid var(--border-glass);
    background: linear-gradient(160deg, rgba(13, 20, 39, 0.86), rgba(8, 12, 23, 0.9));
    border-radius: 1.4rem;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 44px 44px;
    opacity: 0.4;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent);
}

.hero-radial {
    position: absolute;
    width: 440px;
    height: 440px;
    filter: blur(90px);
    pointer-events: none;
}

.hero-radial-a {
    top: -100px;
    left: -120px;
    background: rgba(90, 107, 255, 0.35);
}

.hero-radial-b {
    right: -120px;
    bottom: -150px;
    background: rgba(34, 211, 238, 0.3);
}

.hero-inner {
    position: relative;
    z-index: 2;
    padding: clamp(2.2rem, 4vw, 3.3rem);
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(90, 107, 255, 0.2);
    border: 1px solid rgba(90, 107, 255, 0.45);
    color: #c8d0ff;
    font-weight: 700;
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 1rem;
    font-size: 0.83rem;
    letter-spacing: 0.03em;
}

.hero-inner h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3.3rem);
    line-height: 1.08;
    font-weight: 700;
    margin: 0 0 0.95rem;
}

.gradient-text {
    background: linear-gradient(125deg, #fefefe 5%, #93c5fd 45%, #67e8f9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-inner p {
    margin: 0 auto;
    width: min(860px, 100%);
    color: var(--text-secondary);
    font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.hero-metrics {
    margin: 1.4rem auto 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    width: min(860px, 100%);
}

.hero-metrics div {
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.7rem 0.8rem;
    text-align: left;
}

.hero-metrics strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}

.hero-metrics span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.signalscope-guest {
    width: min(760px, calc(100% - 2rem));
    margin: 2rem auto;
}

.guest-card {
    border: 1px solid var(--border-glass);
    background: linear-gradient(155deg, rgba(17, 26, 44, 0.86), rgba(10, 16, 30, 0.86));
    border-radius: 1.1rem;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.guest-card h2 {
    margin: 0 0 0.55rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
}

.guest-card p {
    margin: 0;
    color: var(--text-secondary);
}

.guest-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

/* ── SEO Content Sections (guest view) ── */

.seo-section {
    width: min(1100px, calc(100% - 2rem));
    margin: 2.5rem auto 0;
}

.seo-section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    text-align: center;
    margin: 0 0 0.5rem;
}

.seo-section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin: 0 auto 1.8rem;
    max-width: 640px;
}

/* Feature grid */
.seo-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.seo-feature-card {
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    background: linear-gradient(155deg, rgba(17, 26, 44, 0.82), rgba(10, 16, 30, 0.82));
    padding: 1.4rem;
    transition: border-color 0.25s ease;
}

.seo-feature-card:hover {
    border-color: var(--border-glass-strong);
}

.seo-feature-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.6rem;
    background: rgba(90, 107, 255, 0.18);
    color: var(--accent-cyan);
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.seo-feature-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    margin: 0 0 0.4rem;
}

.seo-feature-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.55;
}

/* Steps */
.seo-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 700px;
    margin: 0 auto;
}

.seo-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    background: linear-gradient(155deg, rgba(17, 26, 44, 0.82), rgba(10, 16, 30, 0.82));
    padding: 1.2rem;
}

.seo-step-num {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), #3d8dff);
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.seo-step h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    margin: 0 0 0.25rem;
}

.seo-step p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* Use cases */
.seo-usecases {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.seo-usecase {
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    background: linear-gradient(155deg, rgba(17, 26, 44, 0.82), rgba(10, 16, 30, 0.82));
    padding: 1.3rem;
}

.seo-usecase h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    margin: 0 0 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.seo-usecase h3 i {
    color: var(--accent-cyan);
    font-size: 0.9rem;
}

.seo-usecase p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.55;
}

/* Pricing grid */
.seo-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 860px;
    margin: 0 auto;
}

.seo-pricing-card {
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    background: linear-gradient(155deg, rgba(17, 26, 44, 0.82), rgba(10, 16, 30, 0.82));
    padding: 1.4rem;
    text-align: center;
}

.seo-pricing-highlight {
    border-color: var(--accent-blue);
    box-shadow: 0 0 20px rgba(90, 107, 255, 0.15);
}

.seo-pricing-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    margin: 0 0 0.8rem;
}

.seo-pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.seo-pricing-card li {
    padding: 0.35rem 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.seo-pricing-card li i {
    color: var(--accent-green);
    font-size: 0.75rem;
}

/* FAQ accordion */
.seo-faq {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.seo-faq-item {
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    background: linear-gradient(155deg, rgba(17, 26, 44, 0.82), rgba(10, 16, 30, 0.82));
    overflow: hidden;
}

.seo-faq-item summary {
    cursor: pointer;
    padding: 1rem 1.2rem;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.seo-faq-item summary::-webkit-details-marker {
    display: none;
}

.seo-faq-item summary::after {
    content: '+';
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.seo-faq-item[open] summary::after {
    content: '\2212';
}

.seo-faq-item summary h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.97rem;
    margin: 0;
    font-weight: 600;
}

.seo-faq-item > p {
    margin: 0;
    padding: 0 1.2rem 1rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* Responsive: SEO sections */
@media (max-width: 768px) {
    .seo-feature-grid {
        grid-template-columns: 1fr;
    }

    .seo-usecases {
        grid-template-columns: 1fr;
    }

    .seo-pricing-grid {
        grid-template-columns: 1fr;
        max-width: 360px;
    }

    .seo-steps {
        max-width: 100%;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .seo-feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.btn-primary-modern,
.btn-secondary-modern {
    border: none;
    border-radius: 0.72rem;
    padding: 0.62rem 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.btn-primary-modern {
    color: #f7fbff;
    background: linear-gradient(135deg, var(--accent-blue), #3d8dff);
    border: 1px solid rgba(126, 156, 255, 0.6);
}

.btn-secondary-modern {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
}

.btn-secondary-modern.danger {
    border-color: rgba(248, 113, 113, 0.45);
    color: #fecaca;
}

.btn-primary-modern:hover,
.btn-secondary-modern:hover {
    transform: translateY(-1px);
}

.signalscope-app {
    width: min(1450px, calc(100% - 2rem));
    margin: 1.2rem auto 3rem;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr) 290px;
    gap: 1rem;
    align-items: start;
}

.glass-card {
    border: 1px solid var(--border-glass);
    border-radius: 1rem;
    background:
        linear-gradient(160deg, rgba(16, 24, 42, 0.86), rgba(10, 16, 30, 0.86));
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
}

.control-pane,
.results-pane,
.history-pane {
    padding: 1rem;
}

.control-pane {
    position: sticky;
    top: 90px;
}

.pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
}

.pane-header h2 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
}

.tier-pill {
    border-radius: 999px;
    font-size: 0.68rem;
    padding: 0.26rem 0.56rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.tier-free {
    background: rgba(148, 163, 184, 0.25);
    color: #d9e2f5;
}

.tier-basic {
    background: rgba(59, 130, 246, 0.3);
    color: #cde4ff;
}

.tier-pro {
    background: rgba(16, 185, 129, 0.28);
    color: #c7fbe6;
}

.mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.mode-btn {
    border-radius: 0.7rem;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.58rem 0.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.mode-btn.active {
    background: linear-gradient(135deg, rgba(90, 107, 255, 0.42), rgba(61, 141, 255, 0.3));
    border-color: rgba(141, 170, 255, 0.7);
}

.analysis-form {
    display: grid;
    gap: 0.85rem;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

.field-group {
    display: grid;
    gap: 0.4rem;
}

.field-group label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #d8e2f8;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.field-group input,
.field-group textarea,
.field-group select {
    width: 100%;
    border: 1px solid var(--border-glass);
    background: rgba(7, 12, 22, 0.9);
    border-radius: 0.68rem;
    color: var(--text-primary);
    padding: 0.62rem 0.72rem;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-group textarea {
    resize: vertical;
    min-height: 72px;
}

.field-group input:focus,
.field-group textarea:focus,
.field-group select:focus {
    border-color: rgba(111, 183, 255, 0.8);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.field-group small {
    color: var(--text-muted);
    font-size: 0.76rem;
}

.focus-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.chip {
    border-radius: 999px;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.04);
    color: #d8e2f8;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 0.34rem 0.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip.active {
    background: rgba(34, 211, 238, 0.2);
    border-color: rgba(34, 211, 238, 0.42);
    color: #cbf6ff;
}

.btn-run {
    margin-top: 0.3rem;
    border: 1px solid rgba(112, 178, 255, 0.7);
    border-radius: 0.78rem;
    background: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
    color: #f8fbff;
    font-size: 0.92rem;
    font-weight: 800;
    padding: 0.75rem 0.9rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-run:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.35);
}

.btn-run:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.usage-card {
    margin-top: 1rem;
    padding: 0.8rem;
    border-radius: 0.74rem;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.04);
}

.usage-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.usage-row + .usage-row {
    margin-top: 0.4rem;
}

.usage-row strong {
    color: #eaf2ff;
    font-size: 0.82rem;
}

.usage-progress {
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin-top: 0.7rem;
}

.usage-progress span {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    transition: width 0.35s ease;
}

.results-pane {
    min-height: 880px;
}

.results-head {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    align-items: flex-start;
    margin-bottom: 0.9rem;
}

.results-head h2 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.22rem;
}

.results-head p {
    margin: 0.25rem 0 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.results-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.results-actions .btn-secondary-modern {
    padding: 0.52rem 0.72rem;
    font-size: 0.78rem;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border: 1px solid rgba(34, 211, 238, 0.45);
    background: rgba(34, 211, 238, 0.11);
    border-radius: 0.75rem;
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.95rem;
}

.status-bar strong {
    display: block;
    font-size: 0.88rem;
}

.status-bar p {
    margin: 0.1rem 0 0;
    font-size: 0.78rem;
    color: #d3f7ff;
}

.status-spinner {
    width: 19px;
    height: 19px;
    border-radius: 999px;
    border: 2px solid rgba(34, 211, 238, 0.25);
    border-top-color: rgba(34, 211, 238, 0.95);
    animation: spin 0.8s linear infinite;
}

.report-shell {
    min-height: 730px;
}

.empty-state {
    min-height: 700px;
    border: 1px dashed var(--border-glass-strong);
    border-radius: 0.9rem;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 1.4rem;
}

.empty-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 0.7rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(90, 107, 255, 0.2);
    color: #d4ddff;
    font-size: 1.2rem;
}

.empty-state h3 {
    margin: 0 0 0.45rem;
    font-size: 1.12rem;
}

.empty-state p {
    margin: 0;
    max-width: 580px;
    color: var(--text-secondary);
}

.report-grid {
    display: grid;
    gap: 0.8rem;
}

.brief-card {
    border: 1px solid rgba(115, 160, 255, 0.5);
    border-radius: 0.86rem;
    background: linear-gradient(155deg, rgba(32, 50, 93, 0.58), rgba(14, 21, 36, 0.84));
    padding: 0.9rem;
}

.brief-top {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    align-items: center;
    margin-bottom: 0.55rem;
}

.brief-top h3 {
    margin: 0;
    font-size: 1.05rem;
    font-family: 'Space Grotesk', sans-serif;
}

.confidence-pill {
    border-radius: 999px;
    padding: 0.22rem 0.58rem;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.confidence-high {
    background: rgba(16, 185, 129, 0.22);
    border: 1px solid rgba(16, 185, 129, 0.55);
    color: #bbf7d0;
}

.confidence-medium {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #fde68a;
}

.confidence-low {
    background: rgba(248, 113, 113, 0.2);
    border: 1px solid rgba(248, 113, 113, 0.48);
    color: #fecaca;
}

.brief-card p {
    margin: 0;
    color: #e7eefc;
    line-height: 1.6;
    font-size: 0.92rem;
}

.takeaway-grid,
.score-grid,
.cards-grid,
.action-grid,
.watch-grid,
.source-grid,
.keyword-grid,
.competitor-grid,
.gap-grid {
    display: grid;
    gap: 0.7rem;
}

.takeaway-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.info-tile {
    border: 1px solid var(--border-glass);
    border-radius: 0.76rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.72rem;
}

.info-tile h4 {
    margin: 0 0 0.45rem;
    font-size: 0.82rem;
    color: #dbe7ff;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.info-tile ul {
    margin: 0;
    padding-left: 1.05rem;
    color: #ebf1ff;
    display: grid;
    gap: 0.34rem;
    font-size: 0.88rem;
}

.score-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.score-card {
    border: 1px solid var(--border-glass);
    border-radius: 0.78rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.72rem;
}

.score-card h4 {
    margin: 0;
    font-size: 0.78rem;
    color: #d2def8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.score-value {
    margin-top: 0.42rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.score-value strong {
    font-size: 1.25rem;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.02em;
}

.score-bar {
    flex: 1;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.score-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
}

.section-card {
    border: 1px solid var(--border-glass);
    border-radius: 0.86rem;
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.section-head {
    padding: 0.73rem 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}

.section-head h3 {
    margin: 0;
    font-size: 0.98rem;
    font-family: 'Space Grotesk', sans-serif;
}

.section-head p {
    margin: 0.2rem 0 0;
    color: var(--text-secondary);
    font-size: 0.84rem;
}

.section-body {
    padding: 0.75rem 0.8rem;
    display: grid;
    gap: 0.66rem;
}

.section-body ul {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.36rem;
    color: #e8f0ff;
    font-size: 0.88rem;
}

.section-citations {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    margin-top: 0.2rem;
}

.section-citations a {
    border: 1px solid var(--border-glass);
    border-radius: 999px;
    padding: 0.25rem 0.54rem;
    background: rgba(255, 255, 255, 0.04);
    color: #d4e8ff;
    font-size: 0.75rem;
    text-decoration: none;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.priority-tag,
.level-tag {
    border-radius: 999px;
    padding: 0.24rem 0.5rem;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.tag-high {
    color: #bbf7d0;
    border-color: rgba(16, 185, 129, 0.55);
    background: rgba(16, 185, 129, 0.2);
}

.tag-medium {
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(245, 158, 11, 0.18);
}

.tag-low {
    color: #cdd6e8;
    border-color: rgba(148, 163, 184, 0.46);
    background: rgba(148, 163, 184, 0.16);
}

.history-pane {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 105px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.history-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.7rem;
}

.history-head h3 {
    margin: 0;
    font-size: 0.96rem;
    font-family: 'Space Grotesk', sans-serif;
}

.history-head button {
    border: 1px solid var(--border-glass);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #d9e7ff;
    cursor: pointer;
}

.history-list {
    overflow-y: auto;
    display: grid;
    gap: 0.5rem;
    padding-right: 0.15rem;
}

.history-item {
    border: 1px solid var(--border-glass);
    border-radius: 0.72rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.62rem;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.history-item:hover {
    transform: translateY(-1px);
    border-color: rgba(148, 193, 255, 0.58);
}

.history-item.active {
    border-color: rgba(110, 183, 255, 0.82);
    background: rgba(59, 130, 246, 0.14);
}

.history-item h4 {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.35;
}

.history-meta {
    margin-top: 0.35rem;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.72rem;
}

.history-status {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.1rem 0.46rem;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.history-status.status-processing {
    color: #bae6fd;
    border-color: rgba(56, 189, 248, 0.55);
    background: rgba(56, 189, 248, 0.16);
}

.history-status.status-completed {
    color: #bbf7d0;
    border-color: rgba(52, 211, 153, 0.55);
    background: rgba(52, 211, 153, 0.16);
}

.history-status.status-failed {
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.55);
    background: rgba(248, 113, 113, 0.17);
}

.history-empty {
    border: 1px dashed var(--border-glass);
    border-radius: 0.72rem;
    padding: 0.8rem;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    background: rgba(5, 8, 17, 0.72);
}

.modal-overlay.show {
    display: flex;
}

.consent-modal {
    width: min(520px, calc(100% - 2rem));
    border-radius: 1rem;
    border: 1px solid var(--border-glass-strong);
    background: linear-gradient(160deg, rgba(16, 25, 43, 0.94), rgba(9, 14, 28, 0.94));
    box-shadow: var(--shadow-xl);
    padding: 1rem;
}

.consent-head h3 {
    margin: 0 0 0.5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
}

.consent-modal p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

.consent-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
}

.report-processing {
    border: 1px solid rgba(56, 189, 248, 0.46);
    background: rgba(56, 189, 248, 0.09);
    color: #d9f5ff;
    border-radius: 0.78rem;
    padding: 0.95rem 1rem;
}

.report-processing h4 {
    margin: 0;
    font-size: 1rem;
    font-family: 'Space Grotesk', sans-serif;
}

.report-processing p {
    margin: 0.35rem 0 0;
    color: #c7deef;
    font-size: 0.9rem;
}

.processing-pulse {
    margin-top: 0.7rem;
    height: 7px;
    width: 100%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.processing-pulse span {
    display: block;
    width: 40%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.18), rgba(34, 211, 238, 0.95), rgba(34, 211, 238, 0.18));
    animation: pulse-slide 1.4s ease-in-out infinite;
}

.upgrade-modal {
    position: relative;
    width: min(940px, calc(100% - 2rem));
    border-radius: 1rem;
    border: 1px solid rgba(110, 173, 255, 0.42);
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.15), transparent 36%),
        radial-gradient(circle at 0% 0%, rgba(90, 107, 255, 0.22), transparent 44%),
        linear-gradient(160deg, rgba(12, 19, 35, 0.97), rgba(8, 12, 24, 0.98));
    box-shadow: var(--shadow-xl);
    padding: 1.1rem;
}

.modal-close {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #dce7ff;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.upgrade-head {
    padding-right: 2.2rem;
}

.upgrade-kicker {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.24rem 0.58rem;
    border: 1px solid rgba(34, 211, 238, 0.48);
    background: rgba(34, 211, 238, 0.14);
    color: #bdf7ff;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.upgrade-head h3 {
    margin: 0.5rem 0 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
}

.upgrade-head p {
    margin: 0.45rem 0 0;
    color: #c6d6ef;
    max-width: 780px;
}

.plan-compare {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.plan-card {
    border: 1px solid var(--border-glass);
    border-radius: 0.84rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.8rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.plan-card.is-current {
    border-color: rgba(56, 189, 248, 0.66);
    background: rgba(56, 189, 248, 0.1);
}

.plan-card:hover {
    transform: translateY(-1px);
}

.plan-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.plan-top h4 {
    margin: 0;
    font-size: 1rem;
    font-family: 'Space Grotesk', sans-serif;
}

.current-plan-pill {
    border-radius: 999px;
    padding: 0.16rem 0.45rem;
    font-size: 0.63rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #d5f4ff;
    border: 1px solid rgba(56, 189, 248, 0.58);
    background: rgba(56, 189, 248, 0.2);
}

.plan-card ul {
    margin: 0.7rem 0 0;
    padding-left: 1rem;
    display: grid;
    gap: 0.42rem;
    color: #d8e5fb;
    font-size: 0.86rem;
}

.plan-card li strong {
    color: #f3f8ff;
}

.upgrade-actions {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.report-error {
    border: 1px solid rgba(248, 113, 113, 0.48);
    background: rgba(248, 113, 113, 0.12);
    color: #fee2e2;
    border-radius: 0.7rem;
    padding: 0.7rem 0.8rem;
    font-size: 0.88rem;
}

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

@keyframes pulse-slide {
    0% {
        transform: translateX(-110%);
    }
    100% {
        transform: translateX(240%);
    }
}

@media (max-width: 1300px) {
    .signalscope-app {
        grid-template-columns: 320px minmax(0, 1fr);
    }

    .history-pane {
        grid-column: 1 / -1;
        position: static;
        max-height: none;
    }

    .history-list {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        max-height: none;
    }

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

@media (max-width: 980px) {
    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .signalscope-app {
        grid-template-columns: 1fr;
    }

    .control-pane,
    .history-pane {
        position: static;
    }

    .results-pane {
        min-height: 0;
    }

    .empty-state {
        min-height: 420px;
    }

    .results-actions {
        width: 100%;
        justify-content: flex-start;
    }

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

    .plan-compare {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .signalscope-hero,
    .signalscope-app,
    .signalscope-guest {
        width: calc(100% - 1rem);
    }

    .hero-inner {
        padding: 1.35rem 0.95rem;
    }

    .mode-switch {
        grid-template-columns: 1fr;
    }

    .results-head {
        flex-direction: column;
    }

    .results-actions {
        flex-direction: column;
    }

    .results-actions .btn-secondary-modern,
    .results-actions .btn-primary-modern {
        width: 100%;
    }

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