.diagnostic-shell {
    width: min(1120px, calc(100% - 32px));
    min-height: 78vh;
    margin: 0 auto;
    padding: 150px 0 72px;
}

.diagnostic-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.diagnostic-header .eyebrow {
    margin: 0 0 12px;
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 800;
}

.diagnostic-header h1 {
    max-width: 760px;
    margin: 0 0 14px;
    color: var(--text-primary);
    font-size: clamp(2.25rem, 6vw, 4.75rem);
    line-height: 0.98;
}

.diagnostic-header .intro {
    max-width: 680px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.overall-status {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-soft);
    font-weight: 700;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f59e0b;
}

.overall-status.is-ok .status-dot {
    background: #22c55e;
}

.checks-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    padding: 32px 0;
}

.check-card {
    min-height: 190px;
    padding: 20px;
    border: 1px solid var(--border);
    border-top: 3px solid #f59e0b;
    border-radius: 6px;
    background: var(--bg-primary);
    box-shadow: var(--shadow-soft);
}

.check-card.is-ok {
    border-top-color: #22c55e;
}

.check-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
}

.check-icon {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    color: #16a34a;
}

.check-card strong {
    display: block;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 1.15rem;
    overflow-wrap: anywhere;
}

.check-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.clean-url-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 24px;
    border: 1px solid rgba(213, 0, 0, 0.35);
    border-radius: 6px;
    background: var(--brand-soft);
}

.clean-url-panel h2 {
    margin: 0 0 6px;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.clean-url-panel p {
    margin: 0;
    color: var(--text-secondary);
}

.clean-url-panel button {
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid var(--brand);
    border-radius: 5px;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    font-weight: 800;
}

.clean-url-panel button:focus-visible {
    outline: 3px solid var(--text-primary);
    outline-offset: 3px;
}

.clean-url-panel output {
    grid-column: 1 / -1;
    min-height: 24px;
    color: #15803d;
    font-size: 0.9rem;
}

.diagnostic-meta {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 26px;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.diagnostic-meta code {
    color: var(--text-secondary);
}

[data-theme="dark"] .clean-url-panel output {
    color: #86efac;
}

@media (max-width: 900px) {
    .checks-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .diagnostic-shell {
        width: min(100% - 24px, 1120px);
        padding-top: 104px;
    }

    .diagnostic-header,
    .diagnostic-meta {
        flex-direction: column;
    }

    .checks-grid,
    .clean-url-panel {
        grid-template-columns: 1fr;
    }

    .check-card {
        min-height: 0;
    }

    .clean-url-panel output {
        grid-column: auto;
    }
}
