.app-main {
    padding-top: 72px;
    min-height: calc(100vh - 72px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.app-main:has(#report.active) {
    justify-content: flex-start;
}

.app-intro {
    width: 100%;
    max-width: 920px;
    padding: 40px 24px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.app-eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #4759E4;
    margin-bottom: 18px;
}

.app-headline {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -1.2px;
    color: #0C0C0C;
    margin: 0 0 18px 0;
}

.app-lead {
    font-size: 17px;
    line-height: 1.6;
    color: rgba(12, 12, 12, 0.6);
    max-width: 660px;
    margin: 0 0 40px 0;
}

.app-input-panel {
    display: flex;
    width: 100%;
    max-width: 760px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(71, 89, 228, 0.15);
    border-radius: 12px;
    padding: 8px;
    box-sizing: border-box;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    gap: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.app-input-panel:focus-within {
    border-color: #4759E4;
    box-shadow: 0 8px 30px rgba(71, 89, 228, 0.08);
}

.app-input-box {
    flex: 1;
    border: none;
    background: transparent;
    padding: 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #0C0C0C;
    outline: none;
}

.app-input-box::placeholder {
    color: rgba(12, 12, 12, 0.4);
}

.app-analyze-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #F3F3F9;
    background-color: #4759E4;
    border: none;
    border-radius: 8px;
    padding: 0 32px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.app-analyze-btn:hover {
    background-color: #3647c4;
}

.app-analyze-btn:disabled {
    background-color: rgba(71, 89, 228, 0.5);
    cursor: not-allowed;
}

.app-intro-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
}

.app-input-hint {
    font-size: 13px;
    font-weight: 500;
    color: rgba(12, 12, 12, 0.45);
}

.app-tour-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #4759E4;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.app-tour-btn:hover {
    text-decoration: underline;
}

.app-message {
    display: none;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 760px;
    margin: 28px 24px 0 24px;
    box-sizing: border-box;
    padding: 16px 20px;
    border-radius: 10px;
    background: rgba(238, 47, 57, 0.05);
    border: 1px solid rgba(238, 47, 57, 0.18);
}

.app-message.active {
    display: flex;
}

.app-message-mark {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #EE2F39;
}

.app-message-text {
    font-size: 14px;
    font-weight: 500;
    color: #0C0C0C;
    line-height: 1.5;
}

.app-progress {
    display: none;
    width: 100%;
    max-width: 760px;
    margin: 28px 24px 0 24px;
    box-sizing: border-box;
    padding: 20px 22px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(71, 89, 228, 0.12);
}

.app-progress.active {
    display: block;
}

.app-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

.app-progress-stage-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.app-progress-stage {
    font-size: 14px;
    font-weight: 600;
    color: #0C0C0C;
}

.progress-dots {
    display: none;
    align-items: center;
    gap: 4px;
}

.progress-dots.active {
    display: inline-flex;
}

.progress-dots i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #4759E4;
    animation: progressDotBounce 1.1s infinite ease-in-out;
}

.progress-dots i:nth-child(2) {
    animation-delay: 0.16s;
}

.progress-dots i:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes progressDotBounce {
    0%, 70%, 100% {
        transform: translateY(0);
        opacity: 0.45;
    }
    35% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

.app-progress-pct {
    font-size: 13px;
    font-weight: 600;
    color: #4759E4;
    font-variant-numeric: tabular-nums;
}

.app-progress-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(12, 12, 12, 0.07);
    overflow: hidden;
}

.app-progress-bar {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: #4759E4;
    transition: width 0.5s ease;
}

.report {
    display: none;
    width: 100%;
    max-width: 1080px;
    padding: 48px 24px 96px 24px;
    box-sizing: border-box;
    flex-direction: column;
    gap: 24px;
}

.report.active {
    display: flex;
}

.watch-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 28px;
    border-radius: 16px;
    background: rgba(71, 89, 228, 0.05);
    border: 1px solid rgba(71, 89, 228, 0.18);
}

.watch-cta-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.watch-cta-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(71, 89, 228, 0.9);
}

.watch-cta-text {
    font-size: 15px;
    line-height: 1.55;
    color: rgba(12, 12, 12, 0.7);
    margin: 0;
    max-width: 620px;
}

.watch-cta-btn {
    flex: none;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #F3F3F9;
    background: #4759E4;
    border: none;
    border-radius: 8px;
    padding: 13px 26px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.watch-cta-btn:hover {
    background: #3647c4;
}

.watch-cta-btn:disabled {
    background: rgba(71, 89, 228, 0.5);
    cursor: progress;
}

.watch-cta-btn.watching {
    background: rgba(71, 89, 228, 0.12);
    color: #4759E4;
    cursor: default;
}

@media (max-width: 720px) {
    .watch-cta {
        flex-direction: column;
        align-items: flex-start;
    }
    .watch-cta-btn {
        width: 100%;
    }
}

.report-details {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.details-toggle {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #4759E4;
    background: rgba(71, 89, 228, 0.06);
    border: 1px solid rgba(71, 89, 228, 0.16);
    border-radius: 999px;
    padding: 11px 22px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.details-toggle:hover {
    background: rgba(71, 89, 228, 0.1);
    border-color: rgba(71, 89, 228, 0.3);
}

.details-toggle-caret {
    width: 7px;
    height: 7px;
    border-right: 2px solid #4759E4;
    border-bottom: 2px solid #4759E4;
    transform: rotate(45deg);
    margin-top: -3px;
    transition: transform 0.2s ease;
}

.details-toggle.open .details-toggle-caret {
    transform: rotate(-135deg);
    margin-top: 2px;
}

.details-body {
    display: none;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
}

.details-body.open {
    display: flex;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.report-card {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 28px;
    box-sizing: border-box;
}

/* Streaming: a card waiting for its engine to finish */
.report-card.card-pending {
    position: relative;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.report-card.card-pending::after {
    content: "Analyzing\2026";
    position: absolute;
    top: 18px;
    right: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #4759E4;
    background: rgba(71, 89, 228, 0.08);
    border: 1px solid rgba(71, 89, 228, 0.16);
    border-radius: 999px;
    padding: 4px 11px;
    animation: cardPendingPulse 1.4s ease-in-out infinite;
}

@keyframes cardPendingPulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

/* Streaming: a card that just received its data */
.report-card.card-filled {
    animation: cardReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cardReveal {
    from { opacity: 0.35; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.answer-thinking {
    color: rgba(12, 12, 12, 0.55);
}

.section-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 22px;
}

.section-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(71, 89, 228, 0.85);
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    color: #0C0C0C;
    margin: 0;
    letter-spacing: -0.4px;
}

.metric {
    margin-bottom: 16px;
}

.metric:last-child {
    margin-bottom: 0;
}

.metric-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 7px;
}

.metric-label {
    font-size: 14px;
    font-weight: 500;
    color: rgba(12, 12, 12, 0.75);
}

.metric-value {
    font-size: 13px;
    font-weight: 600;
    color: #0C0C0C;
    font-variant-numeric: tabular-nums;
}

.metric-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(12, 12, 12, 0.07);
    overflow: hidden;
}

.metric-fill {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: #4759E4;
    transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.metric-fill.warn {
    background: #EE2F39;
}

.chip {
    display: inline-flex;
    align-items: center;
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(12, 12, 12, 0.75);
    background: rgba(71, 89, 228, 0.07);
    border: 1px solid rgba(71, 89, 228, 0.14);
    border-radius: 999px;
    padding: 5px 12px;
}

.chip.warn {
    color: #c4222b;
    background: rgba(238, 47, 57, 0.06);
    border-color: rgba(238, 47, 57, 0.18);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.empty-state {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(12, 12, 12, 0.5);
}

@media (max-width: 880px) {
    .app-headline {
        font-size: 36px;
    }
    .report-grid {
        grid-template-columns: 1fr;
    }
    .app-input-panel {
        flex-direction: column;
    }
    .app-analyze-btn {
        padding: 16px;
    }
}
