:root {
    --terms-panel: rgba(14, 18, 28, 0.94);
    --terms-panel-soft: rgba(255, 255, 255, 0.06);
    --terms-border: rgba(255, 255, 255, 0.14);
    --terms-text: #f5f7fb;
    --terms-muted: rgba(245, 247, 251, 0.68);
    --terms-accent: var(--color-accent, #4678f9);
    --terms-danger: #ff6875;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    color: var(--terms-text);
    font-family:
        "IBM Plex Sans",
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input {
    font: inherit;
}

.terms-page {
    min-height: 100vh;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto 1fr;
}

.terms-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 10px;
}

.terms-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.terms-logo img {
    width: 34px;
    height: 34px;
}

.terms-main {
    display: grid;
    place-items: center;
    padding: 18px 16px 38px;
}

.terms-card {
    width: min(860px, 100%);
    max-height: calc(100vh - 110px);
    display: grid;
    grid-template-rows: auto minmax(220px, 1fr) auto auto auto;
    gap: 18px;
    padding: clamp(20px, 4vw, 34px);
    background: var(--terms-panel);
    border: 1px solid var(--terms-border);
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(12px);
}

.terms-card__heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 16px;
}

.terms-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--terms-accent);
    border-radius: 8px;
}

.terms-kicker {
    margin: 0 0 5px;
    color: #a8c4ff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.terms-card h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.08;
    letter-spacing: 0;
}

.terms-card p {
    margin: 8px 0 0;
    color: var(--terms-muted);
    line-height: 1.55;
}

.terms-body {
    min-height: 260px;
    overflow: auto;
    padding: 18px;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--terms-border);
    border-radius: 8px;
    line-height: 1.62;
    scrollbar-color: var(--terms-accent) rgba(255, 255, 255, 0.08);
}

.terms-body p {
    margin: 0 0 14px;
    color: inherit;
}

.terms-body p:last-child {
    margin-bottom: 0;
}

.terms-check {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    margin: 0;
    color: #fff;
    line-height: 1.45;
}

.terms-check input {
    width: 20px;
    height: 20px;
    margin-top: 1px;
    accent-color: var(--terms-accent);
}

.terms-error {
    min-height: 20px;
    color: var(--terms-danger);
    font-size: 13px;
}

.terms-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.terms-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    color: #fff;
    background: var(--terms-accent);
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
}

.terms-btn--ghost {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--terms-border);
}

.terms-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .terms-card {
        max-height: none;
        min-height: calc(100vh - 104px);
    }

    .terms-card__heading {
        grid-template-columns: 1fr;
    }

    .terms-body {
        min-height: 300px;
    }

    .terms-actions {
        flex-direction: column-reverse;
    }

    .terms-btn {
        width: 100%;
    }
}
