.audit-shell {
    padding-top: 3rem;
}

.audit-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
    gap: 1.5rem;
    align-items: stretch;
    margin-bottom: 2rem;
}

.audit-hero-copy,
.audit-form-card,
.audit-info-card,
.summary-card,
.action-card,
.template-card,
.check-row,
.audit-message {
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.95), rgba(15, 15, 15, 0.98));
    border: 1px solid rgba(139, 92, 246, 0.18);
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.audit-hero-copy {
    padding: 2rem;
    background:
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.16), transparent 38%),
        radial-gradient(circle at left center, rgba(14, 165, 233, 0.16), transparent 45%),
        linear-gradient(160deg, rgba(26, 26, 26, 0.98), rgba(12, 12, 12, 0.98));
}

.audit-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.14);
    color: #7dd3fc;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.audit-form-card {
    padding: 1.5rem;
}

.audit-form label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 700;
    color: var(--color-white);
}

.audit-input-row {
    display: flex;
    gap: 0.75rem;
}

.audit-input-row input {
    flex: 1;
    min-width: 0;
    padding: 0.95rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.28);
    color: var(--color-white);
    font-size: 1rem;
}

.audit-input-row input:focus {
    outline: none;
    border-color: rgba(14, 165, 233, 0.8);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.audit-input-row button {
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #0ea5e9, #10b981);
    color: #03131a;
    font-weight: 800;
    padding: 0 1.2rem;
    cursor: pointer;
}

.audit-help {
    margin: 0.75rem 0 0;
    color: var(--color-light-gray);
    font-size: 0.92rem;
}

.audit-intro-grid,
.audit-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.audit-info-card,
.summary-card {
    padding: 1.35rem;
}

.audit-results-spotlight {
    margin-bottom: 1.5rem;
}

.audit-results-first {
    margin-bottom: 2rem;
}

.audit-hero-compact {
    margin-top: 1rem;
}

.results-hero-card {
    padding: 1.45rem;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 38%),
        radial-gradient(circle at left center, rgba(14, 165, 233, 0.16), transparent 42%),
        linear-gradient(160deg, rgba(26, 26, 26, 0.98), rgba(12, 12, 12, 0.98));
    border: 1px solid rgba(14, 165, 233, 0.22);
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.results-hero-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.results-hero-top h1,
.results-hero-top h2 {
    margin-bottom: 0;
    font-size: clamp(1.4rem, 2.6vw, 2.1rem);
    word-break: break-word;
}

.results-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.7rem;
}

.audit-summary-grid-top {
    margin-bottom: 1rem;
}

.results-preview-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.results-preview-card {
    padding: 1rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.results-preview-card h2,
.results-preview-card h3 {
    margin: 0.7rem 0 0.45rem;
    font-size: 1rem;
}

.results-preview-card p {
    margin-bottom: 0;
    color: var(--color-light-gray);
}

.summary-card-primary {
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 42%),
        linear-gradient(165deg, rgba(26, 26, 26, 0.98), rgba(12, 12, 12, 0.98));
}

.summary-label {
    display: block;
    margin-bottom: 0.45rem;
    color: #f0c040;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.summary-value {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 1.85rem;
    color: var(--color-white);
}

.audit-section {
    margin-top: 2rem;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    margin-bottom: 0.9rem;
}

.section-heading p {
    max-width: 52rem;
    margin-bottom: 0;
    color: var(--color-light-gray);
}

.version-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.version-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.version-chip.is-current {
    background: rgba(16, 185, 129, 0.14);
    color: #86efac;
    border-color: rgba(16, 185, 129, 0.28);
}

.version-chip.is-stale {
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.28);
}

.action-list,
.template-list {
    display: grid;
    gap: 1rem;
}

.audit-download-card {
    padding: 1.2rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(16, 185, 129, 0.08));
    border: 1px solid rgba(14, 165, 233, 0.22);
}

.audit-download-btn {
    display: inline-block;
    margin-bottom: 0.75rem;
}

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

.audit-repo-callout {
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    align-items: center;
}

.audit-repo-callout h2 {
    margin-bottom: 0.5rem;
}

.audit-repo-callout p {
    margin-bottom: 0;
}

.action-card,
.template-card {
    padding: 1.2rem;
}

.action-card.priority-high {
    border-color: rgba(239, 68, 68, 0.34);
}

.action-card.priority-medium {
    border-color: rgba(245, 158, 11, 0.3);
}

.action-top,
.template-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.7rem;
}

.priority-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: rgba(239, 68, 68, 0.13);
    color: #fca5a5;
}

.checks-table {
    display: grid;
    gap: 0.85rem;
}

.check-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-left: 4px solid transparent;
}

.check-row.status-pass {
    border-left-color: #10b981;
}

.check-row.status-warn {
    border-left-color: #f59e0b;
}

.check-row.status-fail {
    border-left-color: #ef4444;
}

.check-meta {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.check-group,
.check-status,
.check-link {
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.check-group {
    color: #7dd3fc;
}

.check-status {
    color: #f0c040;
}

.check-link {
    color: #a7f3d0;
    text-decoration: none;
    white-space: nowrap;
}

.audit-code-block {
    margin: 0;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    background: #080808;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
}

.audit-code-block code {
    display: block;
    white-space: pre;
    color: #d1fae5;
    font-family: var(--font-mono);
    font-size: 0.86rem;
    line-height: 1.55;
}

.audit-message {
    padding: 1rem 1.2rem;
    margin: 1.5rem 0;
}

.audit-message-error {
    border-color: rgba(239, 68, 68, 0.38);
}

.audit-message-success {
    border-color: rgba(16, 185, 129, 0.38);
}

@media (max-width: 960px) {
    .audit-hero,
    .audit-intro-grid,
    .audit-summary-grid {
        grid-template-columns: 1fr;
    }

    .results-preview-list {
        grid-template-columns: 1fr;
    }

    .report-handoff-grid {
        grid-template-columns: 1fr;
    }

    .audit-input-row {
        flex-direction: column;
    }

    .audit-input-row button {
        min-height: 3rem;
    }
}

@media (max-width: 700px) {
    .check-row,
    .section-heading,
    .action-top,
    .template-card-top,
    .results-hero-top,
    .audit-repo-callout {
        flex-direction: column;
        align-items: flex-start;
    }

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