:root {
    --audit-surface: rgba(255, 255, 255, .055);
    --audit-surface-strong: rgba(5, 15, 27, .74);
    --audit-border: rgba(255, 255, 255, .11);
    --audit-text: #f7f9fc;
    --audit-muted: #8fa1b8;
    --audit-blue: #58a6ff;
}

.page-audit-main {
    width: 100%;
    padding: 44px 18px 0;
}

.page-audit-app {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}

.page-audit-hero {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 178px;
    grid-template-areas: "icon content action";
    column-gap: 18px;
    align-items: start;
    margin-bottom: 28px;
}

.page-audit-icon {
    grid-area: icon;
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(88, 166, 255, .28);
    border-radius: 20px;
    background: rgba(88, 166, 255, .08);
    color: var(--audit-blue);
}

.page-audit-icon svg {
    width: 42px;
    height: 42px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.page-audit-hero__content {
    grid-area: content;
    min-width: 0;
}

.page-audit-hero h1 {
    margin: 1px 0 0;
    color: var(--audit-text);
    font-size: 31px;
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: .025em;
}

.page-audit-subtitle {
    margin-top: 4px;
    color: #b3c0d1;
    font-size: 16px;
    line-height: 1.4;
}

.page-audit-hero__content > p {
    max-width: 800px;
    margin: 9px 0 0;
    color: var(--audit-muted);
    font-size: 16px;
    line-height: 1.5;
}

.page-audit-form {
    padding: 24px 28px;
    border: 1px solid var(--audit-border);
    border-radius: 20px;
    background: var(--audit-surface);
    box-shadow: 0 22px 65px rgba(0, 0, 0, .20);
}

.page-audit-form label {
    display: block;
    margin-bottom: 10px;
    color: #b7c2d2;
    font-size: 14px;
    font-weight: 700;
}

.page-audit-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 13px;
}

.page-audit-input-row input {
    width: 100%;
    height: 58px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 15px;
    outline: none;
    background: var(--audit-surface-strong);
    color: var(--audit-text);
    font-size: 17px;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.page-audit-input-row input::placeholder { color: #647892; }

.page-audit-input-row input:focus {
    border-color: rgba(88, 166, 255, .60);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, .09);
}

.page-audit-input-row input.is-error {
    border-color: rgba(255, 105, 105, .62);
    box-shadow: 0 0 0 3px rgba(255, 105, 105, .07);
}

.page-audit-input-row button {
    min-width: 158px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 24px;
    border: 1px solid rgba(88, 166, 255, .52);
    border-radius: 15px;
    background: linear-gradient(135deg, #1e79d8, #2e95f2);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .16s ease;
}

.page-audit-input-row button:hover {
    box-shadow: 0 10px 28px rgba(46, 149, 242, .22);
    transform: translateY(-1px);
}

.page-audit-input-row button:disabled {
    opacity: .58;
    cursor: wait;
    transform: none;
}

.page-audit-help,
.page-audit-error {
    margin: 11px 0 0;
    color: #788ba4;
    font-size: 13px;
    line-height: 1.5;
}

.page-audit-error {
    display: none;
    color: #ff9292;
}

.page-audit-error.is-visible { display: block; }

.page-audit-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 30px 0 10px;
    color: var(--audit-muted);
    font-size: 14px;
}

.page-audit-loading.is-visible { display: flex; }

.page-audit-loading span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--audit-blue);
    box-shadow: 0 0 0 0 rgba(88, 166, 255, .42);
    animation: page-audit-pulse 1.35s infinite;
}

@keyframes page-audit-pulse {
    70% { box-shadow: 0 0 0 9px rgba(88, 166, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(88, 166, 255, 0); }
}

.page-audit-results { display: none; margin-top: 22px; }
.page-audit-results.is-visible { display: block; }

.page-audit-response {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 20px;
    border: 1px solid var(--audit-border);
    border-radius: 16px 16px 0 0;
    background: var(--audit-surface);
}

.page-audit-response div { min-width: 0; }

.page-audit-response__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    flex: 0 0 auto;
}

.page-audit-response span,
.page-audit-response small {
    display: block;
    color: var(--audit-muted);
    font-size: 11px;
    line-height: 1.45;
}

.page-audit-response span {
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.page-audit-response strong {
    display: block;
    margin: 4px 0;
    overflow: hidden;
    color: var(--audit-text);
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-audit-response b {
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: #42d799;
    font-size: 12px;
}

.page-audit-response b.is-warning { color: #f2bd57; }
.page-audit-response b.is-error { color: #ff7373; }

.page-audit-report {
    width: 100%;
    height: min(980px, 82vh);
    display: block;
    border: 1px solid var(--audit-border);
    border-top: 0;
    border-radius: 0 0 18px 18px;
    background: #091321;
}

@media (max-width: 760px) {
    .page-audit-main { padding: 34px 14px 0; }
    .page-audit-hero {
        grid-template-columns: 68px minmax(0, 1fr);
        grid-template-areas: "icon content";
    }
    .page-audit-icon { width: 68px; height: 68px; border-radius: 17px; }
    .page-audit-icon svg { width: 32px; height: 32px; }
    .page-audit-hero h1 { font-size: 25px; }
    .page-audit-hero__content > p { margin-top: 11px; }
    .page-audit-form { padding: 20px; }
    .page-audit-input-row { grid-template-columns: 1fr; }
    .page-audit-input-row button { width: 100%; }
    .page-audit-response { align-items: flex-start; }
    .page-audit-report { height: 84vh; }
}

@media (max-width: 430px) {
    .page-audit-hero { grid-template-columns: 56px minmax(0, 1fr); }
    .page-audit-icon { width: 56px; height: 56px; }
    .page-audit-icon svg { width: 27px; height: 27px; }
    .page-audit-hero h1 { font-size: 22px; }
    .page-audit-subtitle { font-size: 14px; }
    .page-audit-form { padding: 17px; }
    .page-audit-response { display: grid; }
    .page-audit-response__actions { justify-content: flex-start; }
}
