:root {
    --bg: #f2fbff;
    --surface: #ffffff;
    --surface-blue: #e9f8ff;
    --ink: #08213f;
    --ink-soft: #45637f;
    --muted: #6f879b;
    --blue: #117ee8;
    --blue-dark: #0759b5;
    --cyan: #23b6d5;
    --mint: #40c991;
    --line: rgba(17, 126, 232, 0.14);
    --focus: rgba(35, 182, 213, 0.35);
    --shadow-card: 0 20px 52px rgba(8, 33, 63, 0.1);
    --radius-card: 8px;
    --radius-ui: 8px;
    --font: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    background: linear-gradient(180deg, #effaff 0%, #ffffff 48%, #eef9ff 100%);
    color: var(--ink);
    font-family: var(--font);
    line-height: 1.55;
    letter-spacing: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(17, 126, 232, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 126, 232, 0.06) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 76%);
}

body::after {
    content: "";
    position: fixed;
    inset: auto 0 0;
    z-index: -1;
    height: 42vh;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(35, 182, 213, 0.08), rgba(64, 201, 145, 0.08));
    clip-path: polygon(0 32%, 100% 0, 100% 100%, 0 100%);
}

a {
    color: inherit;
}

.buy-header {
    position: sticky;
    top: 12px;
    z-index: 30;
    border-bottom: 1px solid rgba(17, 126, 232, 0.12);
    background: rgba(242, 251, 255, 0.88);
    backdrop-filter: blur(18px);
}

.buy-header::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -12px;
    height: 12px;
    background: rgba(242, 251, 255, 0.88);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(100% - 48px, 1180px);
    min-height: 82px;
    margin-inline: auto;
    gap: 1.2rem;
}

.brand {
    display: grid;
    gap: 0.42rem;
    min-width: 0;
    color: var(--ink);
    text-decoration: none;
}

.brand-name {
    display: inline-flex;
    align-items: baseline;
    gap: 0.02em;
    width: fit-content;
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1;
}

.brand-name-main {
    color: var(--ink);
}

.brand-name-accent {
    color: var(--blue);
    text-shadow: 0 0 18px rgba(17, 126, 232, 0.22);
}

.brand-powered {
    display: inline-flex;
    align-items: center;
    gap: 0.48rem;
    width: fit-content;
    min-height: 32px;
    padding: 0.34rem 0.72rem;
    border: 1px solid rgba(17, 126, 232, 0.16);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(225, 246, 255, 0.96));
    box-shadow: 0 10px 22px rgba(17, 126, 232, 0.12);
    color: var(--blue-dark);
    font-size: 0.8rem;
    font-weight: 900;
    line-height: 1;
}

.brand-powered::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 0 5px rgba(35, 182, 213, 0.12);
    flex: 0 0 auto;
}

.brand-powered-label {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-powered strong {
    color: var(--blue-dark);
    font-weight: 900;
}

.buy-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.52rem;
    min-height: 44px;
    padding: 0.72rem 1rem;
    border: 1px solid rgba(17, 126, 232, 0.14);
    border-radius: var(--radius-ui);
    background: #ffffff;
    color: var(--blue-dark);
    box-shadow: 0 10px 28px rgba(8, 33, 63, 0.08);
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    white-space: nowrap;
}

.back-button:hover {
    transform: translateY(-2px);
    border-color: rgba(17, 126, 232, 0.24);
    box-shadow: 0 14px 32px rgba(8, 33, 63, 0.12);
}

.back-button:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.back-icon {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.legal-page {
    min-height: calc(100vh - 94px);
    padding: 76px 24px 88px;
}

.legal-shell {
    width: min(100%, 1180px);
    margin: 0 auto;
}

.legal-stack {
    display: grid;
    gap: 2rem;
}

.legal-hero {
    display: grid;
    align-content: start;
}

.legal-hero h1 {
    max-width: 620px;
    margin: 0;
    color: var(--ink);
    font-size: 3.8rem;
    font-weight: 900;
    line-height: 1.04;
}

.legal-hero p {
    max-width: 590px;
    margin: 1.2rem 0 0;
    color: var(--ink-soft);
    font-size: 1.15rem;
}

.legal-meta-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem;
    margin: 1.65rem 0 0;
}

.legal-meta-list div {
    display: grid;
    gap: 0.18rem;
    min-height: 82px;
    padding: 0.82rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-ui);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 26px rgba(8, 33, 63, 0.06);
}

.legal-meta-list dt {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
}

.legal-meta-list dd {
    margin: 0;
    color: var(--ink);
    font-size: 1.04rem;
    font-weight: 900;
}

.legal-document {
    position: relative;
    display: grid;
    padding: 32px;
    border: 1px solid rgba(17, 126, 232, 0.13);
    border-radius: var(--radius-card);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.legal-document-topline {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, rgba(35, 182, 213, 0.9), rgba(17, 126, 232, 0.96), rgba(64, 201, 145, 0.82));
}

.legal-document-body {
    display: grid;
    align-content: start;
    gap: 1rem;
}

.legal-document-body p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 1rem;
    font-weight: 850;
}

@media (max-width: 940px) {
    .legal-hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 720px) {
    .header-inner {
        width: min(100% - 32px, 1180px);
        min-height: 74px;
        gap: 0.8rem;
    }

    .brand-name {
        font-size: 1.34rem;
    }

    .brand-powered {
        max-width: 220px;
        min-height: 0;
        padding: 0.3rem 0.58rem;
        gap: 0.4rem;
        font-size: 0.72rem;
        line-height: 1.15;
    }

    .brand-powered-label {
        font-size: 0.62rem;
    }

    .back-button {
        min-height: 42px;
        padding-inline: 0.82rem;
        font-size: 0.9rem;
    }

    .legal-page {
        padding: 46px 16px 68px;
    }

    .legal-hero h1 {
        font-size: 2.35rem;
        line-height: 1.1;
    }

    .legal-hero p {
        font-size: 1.02rem;
    }

    .legal-meta-list {
        grid-template-columns: 1fr;
    }

    .legal-document {
        padding: 24px 18px 20px;
    }
}

@media (max-width: 460px) {
    .header-inner {
        align-items: flex-start;
        padding: 0.8rem 0;
    }

    .brand-powered {
        max-width: 190px;
    }

    .back-button span {
        display: none;
    }

    .back-button {
        width: 44px;
        padding: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
