*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

*:focus {
    outline: none;
}

:root {
    --black: #0b0b0b;
    --ink: #111118;
    --muted: #6b7280;
    --muted2: #9ca3af;
    --border: rgba(0, 0, 0, 0.08);
    --border-solid: rgba(0, 0, 0, 0.1);
}

html,
body {
    min-height: 100%;
    background: #ffffff;
    color: #111118;
    font-family: "Inter", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection {
    background: rgba(0, 0, 0, 0.1);
}

/* ─── NEURAL CANVAS BACKGROUND ─── */
#neural-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ─── GRAIN OVERLAY ─── */
#grain {
    position: fixed;
    inset: -50%;
    width: 200%;
    height: 200%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.018;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain-shift 0.1s steps(1) infinite;
    will-change: transform;
}

@keyframes grain-shift {
    0% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(-2%, -3%);
    }

    20% {
        transform: translate(3%, 1%);
    }

    30% {
        transform: translate(-1%, 4%);
    }

    40% {
        transform: translate(4%, -2%);
    }

    50% {
        transform: translate(-3%, 3%);
    }

    60% {
        transform: translate(1%, -4%);
    }

    70% {
        transform: translate(-4%, 2%);
    }

    80% {
        transform: translate(2%, -1%);
    }

    90% {
        transform: translate(-2%, 4%);
    }

    100% {
        transform: translate(3%, -3%);
    }
}

/* ─── VIGNETTE ─── */
#vignette {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, transparent 0%, rgba(255, 255, 255, 0.6) 100%), radial-gradient(ellipse 100% 35% at 50% 100%, rgba(255, 255, 255, 0.7) 0%, transparent 100%);
}

/* ─── WRAPPER ─── */
#page-wrap {
    position: relative;
    z-index: 10;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 28px 100px;
}

/* ─── HEADER / LOGO ─── */
#agr-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 54px 0 42px;
    margin-bottom: 52px;
}

/* ─── BACK BUTTON ─── */
.back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 200;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px 9px 12px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50px;
    text-decoration: none;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    transition:
        background 0.18s,
        box-shadow 0.18s,
        transform 0.18s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateX(-2px);
}

.back-btn svg {
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.18s;
}

.back-btn:hover svg {
    opacity: 1;
}

#agr-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    margin-bottom: 28px;
}

#agr-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: brightness(0);
}

#agr-logo-text {
    font-family: "Syne", system-ui, sans-serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #0b0b0b;
    text-transform: uppercase;
}

#agr-doc-label {
    font-family: "Syne", system-ui, sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.35);
    margin-bottom: 10px;
}

#agr-title {
    font-family: "Syne", system-ui, sans-serif;
    font-size: clamp(26px, 5vw, 38px);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #0b0b0b;
    text-align: center;
    line-height: 1.15;
    margin-bottom: 14px;
}

#agr-subtitle {
    font-family: "Inter", sans-serif;
    font-size: 13.5px;
    color: rgba(0, 0, 0, 0.48);
    text-align: center;
    line-height: 1.7;
    max-width: 540px;
}

/* ─── DOCUMENT BODY ─── */
.agr-section {
    margin-bottom: 44px;
}

.agr-section-title {
    font-family: "Syne", system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.38);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.agr-section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-solid);
}

.agr-section-num {
    font-family: "Syne", system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.22);
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.agr-clause {
    display: flex;
    gap: 18px;
    padding: 18px 22px;
    border: 1px solid rgba(0, 0, 0, 0.065);
    border-radius: 14px;
    margin-bottom: 8px;
    background: rgba(248, 248, 250, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.04),
        0 0 0 0 rgba(0, 0, 0, 0);
    transition:
        background 0.22s,
        box-shadow 0.22s,
        transform 0.18s;
}

.agr-clause:hover {
    background: rgba(243, 243, 246, 0.97);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.07);
    transform: translateY(-1px);
}

.agr-clause-n {
    font-family: "Syne", system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.38);
    min-width: 32px;
    letter-spacing: 0.04em;
    padding-top: 2px;
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.agr-clause-text {
    font-family: "Inter", sans-serif;
    font-size: 14.5px;
    line-height: 1.75;
    color: rgba(0, 0, 0, 0.7);
}

.agr-clause-text strong {
    color: rgba(0, 0, 0, 0.88);
    font-weight: 600;
}

.agr-clause-text a {
    color: rgba(0, 0, 0, 0.55);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ─── DIVIDER ─── */
.agr-divider {
    height: 1px;
    background: var(--border-solid);
    margin: 52px 0;
}

/* ─── PARTIES BLOCK ─── */
.agr-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 44px;
}

.agr-party-card {
    border: 1px solid rgba(0, 0, 0, 0.065);
    border-radius: 16px;
    padding: 22px 24px;
    background: rgba(248, 248, 250, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    transition:
        box-shadow 0.22s,
        transform 0.18s;
}

.agr-party-card:hover {
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.07);
    transform: translateY(-1px);
}

.agr-party-role {
    font-family: "Syne", sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.35);
    margin-bottom: 8px;
}

.agr-party-name {
    font-family: "Syne", sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #0b0b0b;
    margin-bottom: 4px;
}

.agr-party-desc {
    font-family: "Inter", sans-serif;
    font-size: 12.5px;
    color: rgba(0, 0, 0, 0.45);
    line-height: 1.6;
}

/* ─── WARNING BLOCK ─── */
.agr-warning {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 3px solid rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 18px 22px;
    background: rgba(248, 248, 250, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    margin-bottom: 8px;
}

.agr-warning-label {
    font-family: "Syne", sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.45);
    margin-bottom: 6px;
}

.agr-warning-text {
    font-family: "Inter", sans-serif;
    font-size: 13.5px;
    line-height: 1.72;
    color: rgba(0, 0, 0, 0.62);
}

/* ─── DATE + SIGN AREA ─── */
#agr-footer {
    border-top: 1px solid var(--border-solid);
    padding-top: 44px;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#agr-date-line {
    font-family: "Inter", sans-serif;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.35);
    margin-bottom: 36px;
    text-align: center;
    letter-spacing: 0.03em;
}

/* ─── SIGN BUTTON ─── */
#sign-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

#sign-notice {
    font-family: "Inter", sans-serif;
    font-size: 12.5px;
    color: rgba(0, 0, 0, 0.42);
    text-align: center;
    max-width: 460px;
    line-height: 1.65;
}

#sign-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 17px 44px;
    background: #0b0b0b;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-family: "Syne", sans-serif;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition:
        background 0.22s,
        transform 0.18s,
        box-shadow 0.22s;
    user-select: none;
    position: relative;
    overflow: hidden;
}

#sign-btn:hover {
    background: #222222;
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}

#sign-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

#sign-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ─── SIGNED STATE ─── */
#sign-result {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 680px;
}

#sign-result.visible {
    display: flex;
    animation: sign-result-in 0.5s cubic-bezier(0.34, 1.3, 0.64, 1) both;
}

@keyframes sign-result-in {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#sign-result-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.04);
    font-family: "Syne", sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(0, 0, 0, 0.65);
    text-transform: uppercase;
}

#sign-result-badge svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* #sign-hash-label, #sign-hash-wrap, #sign-hash-value — стили переехали в .sdr / .sdr-val */

/* ─── BUTTON LOADING STATE ─── */
.sbtn-busy {
    display: none;
    align-items: center;
    gap: 10px;
}
#sign-btn.signing .sbtn-idle {
    display: none;
}
#sign-btn.signing .sbtn-busy {
    display: inline-flex;
}
#sign-btn:disabled {
    cursor: not-allowed;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.sbtn-spinner {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    animation: spin 0.85s linear infinite;
}

/* ─── DATA ROWS ─── */
#sign-data-rows {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.018);
}

.sdr {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    transition: background 0.15s;
}
.sdr:last-child {
    border-bottom: none;
}
.sdr:hover {
    background: rgba(0, 0, 0, 0.025);
}

.sdr-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: "Inter", sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.4);
    margin-bottom: 8px;
}
.sdr-label svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    opacity: 0.55;
}

.sdr-pill {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.07);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgba(0, 0, 0, 0.45);
}
.sdr-pill--key {
    background: rgba(79, 70, 229, 0.1);
    color: rgba(79, 70, 229, 0.8);
}
.sdr-pill--sum {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.55);
}

.sdr-val-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.sdr-val {
    flex: 1;
    min-width: 0;
    display: block;
    font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
    font-size: 11px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.72);
    letter-spacing: 0.03em;
    word-break: break-all;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.09);
    border-radius: 7px;
    background: #ffffff;
    line-height: 1.6;
}

/* WebAuthn key row — subtle indigo tint */
.sdr--key .sdr-val {
    border-color: rgba(79, 70, 229, 0.18);
    background: rgba(79, 70, 229, 0.025);
    color: rgba(52, 46, 180, 0.8);
}

/* Checksum row — slightly bolder */
.sdr--checksum {
    background: rgba(0, 0, 0, 0.028);
}
.sdr--checksum .sdr-val {
    font-weight: 700;
    color: rgba(0, 0, 0, 0.82);
    border-color: rgba(0, 0, 0, 0.14);
}

/* ─── COPY BUTTONS (data rows) ─── */
.sdr-copy-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.4);
    transition:
        background 0.15s,
        border-color 0.15s,
        color 0.15s;
}
.sdr-copy-btn:hover {
    background: #f4f4f4;
    border-color: rgba(0, 0, 0, 0.22);
    color: rgba(0, 0, 0, 0.75);
}
.sdr-copy-btn.copied {
    background: #f0fdf4;
    border-color: rgba(22, 163, 74, 0.35);
    color: rgba(22, 163, 74, 0.85);
}
.sdr-copy-btn svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    pointer-events: none;
}
/* иконки внутри кнопки копирования */
.sdr-copy-btn .ico-check {
    display: none;
}
.sdr-copy-btn.copied .ico-copy {
    display: none;
}
.sdr-copy-btn.copied .ico-check {
    display: block;
}

/* ─── META ROW (алгоритм + время) ─── */
#sign-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    font-family: "Inter", sans-serif;
    font-size: 11px;
    color: rgba(0, 0, 0, 0.3);
}
.sign-meta-sep {
    opacity: 0.4;
}
#sign-algo-label {
    font-weight: 600;
    letter-spacing: 0.03em;
    color: rgba(0, 0, 0, 0.38);
}

/* ─── FULL VERIFICATION STRING ─── */
#sign-full-wrap {
    width: 100%;
    border: 1px dashed rgba(0, 0, 0, 0.14);
    border-radius: 10px;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.014);
}
#sign-full-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: "Inter", sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.35);
    margin-bottom: 10px;
}
#sign-full-label svg {
    width: 12px;
    height: 12px;
    opacity: 0.5;
}
#sign-full-inner {
    display: flex;
    align-items: center;
    gap: 6px;
}
#sign-full-value {
    flex: 1;
    min-width: 0;
    display: block;
    font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
    font-size: 10px;
    color: rgba(0, 0, 0, 0.55);
    letter-spacing: 0.02em;
    word-break: break-all;
    line-height: 1.65;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 7px;
    background: #ffffff;
}
/* кнопка копирования для полной строки */
#sign-copy-btn {
    flex-shrink: 0;
}

#sign-timestamp {
    font-family: "Inter", sans-serif;
    font-size: 11.5px;
    color: rgba(0, 0, 0, 0.32);
    text-align: center;
}

/* ─── СКРЫТИЕ ЧУВСТВИТЕЛЬНЫХ ДАННЫХ — ТОЧКИ ─── */
.sdr-secret {
    color: rgba(0, 0, 0, 0.28);
    user-select: none;
}
.sdr-secret.sdr-revealed {
    color: rgba(52, 46, 180, 0.8);
    user-select: auto;
}

/* ─── КНОПКА ГЛАЗА ─── */
.sdr-eye-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.28);
    transition:
        color 0.15s,
        background 0.15s;
}
.sdr-eye-btn:hover {
    color: rgba(79, 70, 229, 0.8);
    background: rgba(79, 70, 229, 0.07);
}
.sdr-eye-btn svg {
    width: 14px;
    height: 14px;
    pointer-events: none;
}
/* иконки*/
.sdr-eye-btn .ico-eye-off {
    display: none;
}
.sdr-eye-btn.is-revealed .ico-eye {
    display: none;
}
.sdr-eye-btn.is-revealed .ico-eye-off {
    display: block;
}

/* ─── КНОПКА СКАЧИВАНИЯ ─── */
#sign-download-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    margin-top: 20px;
    padding: 13px 24px;
    border: 1.5px dashed rgba(0, 0, 0, 0.18);
    border-radius: 12px;
    background: transparent;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    transition:
        border-color 0.18s,
        color 0.18s,
        background 0.18s;
}
#sign-result.visible #sign-download-btn {
    display: flex;
}
#sign-download-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}
#sign-download-btn:hover {
    border-color: rgba(124, 110, 245, 0.55);
    color: rgba(124, 110, 245, 0.9);
    background: rgba(124, 110, 245, 0.04);
}
#sign-download-btn:active {
    transform: scale(0.98);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 600px) {
    #page-wrap {
        padding: 0 18px 80px;
    }

    #agr-header {
        padding: 64px 0 32px;
    }

    .back-btn {
        top: 14px;
        left: 14px;
        padding: 7px 13px 7px 10px;
        font-size: 12px;
    }

    .agr-parties {
        grid-template-columns: 1fr;
    }

    #sign-btn {
        padding: 16px 32px;
        font-size: 13px;
    }

    .sdr-val,
    #sign-full-value {
        font-size: 9.5px;
    }
}

/* ─── AGR TABLE ─── */
.agr-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px;
}

.agr-table th,
.agr-table td {
    padding: 8px 14px;
    text-align: left;
    border: 1px solid var(--border-solid);
    vertical-align: middle;
}

.agr-table thead th {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.agr-table tbody tr:last-child td {
    border-bottom: 1px solid var(--border-solid);
}

.agr-table tbody td:last-child {
    font-weight: 600;
    color: var(--ink);
}

/* ─── PRE-SIGN CHECKLIST ─── */
.agr-pre-sign {
    margin: 56px 0 0;
    padding: 28px 32px 30px;
    border-radius: 18px;
    background: rgba(248, 248, 250, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.065);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.agr-pre-sign__header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
}

.agr-pre-sign__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-family: "Syne", sans-serif;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.agr-pre-sign__title {
    font-family: "Syne", sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.agr-pre-sign__sub {
    margin-top: 5px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

.agr-pre-sign__grid {
    display: flex;
    flex-direction: column;
}

.agr-pre-sign__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 28px;
    border-bottom: 1px solid var(--border);
}

.agr-pre-sign__row:last-child {
    border-bottom: none;
}

.agr-pre-sign__item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 11px 0;
}

.agr-pre-sign__num {
    flex-shrink: 0;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, 0.18);
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.agr-pre-sign__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
    margin-bottom: 2px;
}

.agr-pre-sign__desc {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}

@media (max-width: 580px) {
    .agr-pre-sign {
        padding: 22px 20px 24px;
    }

    .agr-pre-sign__row {
        grid-template-columns: 1fr;
        border-bottom: none;
    }
}

/* ─── STUDIO QUOTE ─── */
.agr-studio-quote {
    margin: 20px 0 0;
    padding: 32px 36px 32px 40px;
    border-radius: 14px;
    background: var(--ink);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.agr-studio-quote::before {
    content: "\201C";
    position: absolute;
    top: -10px;
    left: 24px;
    font-family: "Syne", sans-serif;
    font-size: 120px;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.07);
    pointer-events: none;
    user-select: none;
}

.agr-studio-quote__body {
    position: relative;
    z-index: 1;
}

.agr-studio-quote__text {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 22px;
}

.agr-studio-quote__text strong {
    color: #fff;
    font-weight: 600;
}

.agr-studio-quote__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.agr-studio-quote__pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.2px;
}

.agr-studio-quote__pill svg {
    width: 12px;
    height: 12px;
    stroke: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.agr-studio-quote__sig {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.agr-studio-quote__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Syne", sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}

.agr-studio-quote__name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.agr-studio-quote__role {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 2px;
}

@media (max-width: 580px) {
    .agr-studio-quote {
        padding: 26px 22px 26px 26px;
    }
}

/* ─── PAGE REVEAL ───
           keyframes — анимация запускается простым добавлением класса, без гонки с before-state. */

@keyframes rv-rise {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes rv-rise-logo {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.94);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
@keyframes rv-lbl-kf {
    from {
        opacity: 0;
        transform: translateY(8px);
        letter-spacing: 0.4em;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        letter-spacing: 0.22em;
    }
}

/* FOUC-guard: js-rv ставится синхронно в <head> до рендера body —
   все анимируемые элементы скрыты с нуля, пока JS не добавит rv-p + rv-go  */
html.js-rv #agr-logo,
html.js-rv #agr-doc-label,
html.js-rv #agr-title,
html.js-rv #agr-subtitle,
html.js-rv .agr-section-title,
html.js-rv .agr-party-card,
html.js-rv .agr-clause,
html.js-rv .agr-warning,
html.js-rv .agr-pre-sign,
html.js-rv .agr-studio-quote,
html.js-rv #agr-footer {
    opacity: 0;
}

/* До запуска — элемент невидим */
.rv-p {
    opacity: 0;
}
.rv-p-logo {
    opacity: 0;
}
.rv-p-lbl {
    opacity: 0;
}

/* .rv-go — запуск анимации */
.rv-p.rv-go {
    animation: rv-rise 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: var(--rv-d, 0ms);
}
.rv-p-logo.rv-go {
    animation: rv-rise-logo 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: var(--rv-d, 0ms);
}
.rv-p-lbl.rv-go {
    animation: rv-lbl-kf 0.46s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: var(--rv-d, 0ms);
}

/* ─── CUSTOM CURSOR ─── */
#custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 9px;
    height: auto;
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    /* отрисовка только через transform — GPU, нет layout reflow */
    will-change: transform;
    user-select: none;
    -webkit-user-select: none;
    /* нет transition — нулевой лаг за курсором */
}

/* скрываем системный курсор только когда мышь активна */
html.has-custom-cursor,
html.has-custom-cursor * {
    cursor: none !important;
}
