@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --blue: #0091ff;
    --blue-hover: #007adb;
    --blue-dim: rgba(0, 145, 255, 0.12);
    --bg: #ffffff;
    --ink: #050505;
    --panel-bg: #f4f4f5;
    --text-main: #0a0a0a;
    --text-muted: #71717a;
    --border: #f4f4f5;
    --border-dark: #e4e4e7;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background:
        radial-gradient(ellipse 80% 50% at 100% 0%, rgba(0, 145, 255, 0.08), transparent 55%),
        linear-gradient(180deg, rgba(0, 145, 255, 0.045) 0%, transparent 32%),
        var(--bg);
    color: var(--text-main);
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.legal-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-dark);
}

.legal-header-inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.legal-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}

.btn:active { transform: scale(0.985); }

.btn-primary {
    background: var(--blue);
    color: #fff;
    font-weight: 700;
}

.btn-primary:hover { background: var(--blue-hover); }

.btn-ghost {
    background: var(--bg);
    color: var(--text-main);
    border: 1.5px solid var(--ink);
}

.btn-ghost:hover { background: #fafafa; }

.legal-hero {
    background:
        radial-gradient(ellipse 70% 55% at 18% 88%, rgba(0, 145, 255, 0.28), transparent 62%),
        linear-gradient(180deg, #0a0a0a 0%, #111 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2.8rem 20px 2.2rem;
    color: #fff;
}

.legal-hero-inner {
    max-width: 980px;
    margin: 0 auto;
}

.legal-kicker {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 8px;
}

.legal-hero h1 {
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: 8px;
    color: #fff;
}

.legal-hero p {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.95rem;
    max-width: 640px;
    line-height: 1.55;
}

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 14px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
}

.legal-wrap {
    max-width: 980px;
    margin: 0 auto;
    padding: 1.75rem 20px 4rem;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.legal-toc {
    position: sticky;
    top: 86px;
    background:
        linear-gradient(180deg, rgba(0, 145, 255, 0.05) 0%, transparent 40%),
        #fff;
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    padding: 1rem 0.9rem;
}

.legal-toc h2 {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding: 0 8px;
}

.legal-toc a {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.35;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
    background: var(--input-fill, #f4f4f5);
    color: var(--text-main);
}

.legal-article {
    min-width: 0;
}

.legal-article section {
    scroll-margin-top: 92px;
    padding-bottom: 1.6rem;
    margin-bottom: 1.6rem;
    border-bottom: 1px solid var(--border);
}

.legal-article section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.legal-article h2 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 10px;
}

.legal-article h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 1.1rem 0 8px;
}

.legal-article p,
.legal-article li {
    font-size: 0.9rem;
    line-height: 1.65;
    color: #3f3f46;
}

.legal-article p + p { margin-top: 10px; }

.legal-article ul,
.legal-article ol {
    margin: 10px 0 0 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.legal-article a {
    color: var(--blue);
    font-weight: 600;
}

.legal-article a:hover { text-decoration: underline; }

.legal-note {
    background: var(--panel-bg);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.site-footer {
    background: #050505;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
}

.footer-links {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-left: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.45);
}

.footer-links a:hover { color: #fff; }

@media (max-width: 800px) {
    .legal-header-inner {
        padding: 12px 1.1rem;
        gap: 8px;
    }

    .legal-header-actions {
        gap: 6px;
    }

    .legal-header-actions .btn {
        padding: 8px 12px;
        font-size: 0.78rem;
    }

    .legal-wrap {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 1.5rem 1.1rem 3.5rem;
    }

    .legal-toc {
        position: static;
    }

    .legal-hero {
        padding: 2rem 1.1rem 1.75rem;
    }

    .legal-hero h1 {
        font-size: 1.55rem;
    }

    .site-footer {
        flex-wrap: wrap;
        padding: 14px 1.1rem calc(14px + env(safe-area-inset-bottom, 0px));
    }
}

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

    .legal-article h2 {
        font-size: 1.05rem;
    }
}

/* ── Help Center (extends legal page chrome) ── */
.help-hero .legal-hero-inner {
    max-width: 980px;
}

.help-search {
    position: relative;
    max-width: 440px;
    margin-top: 1.35rem;
}

.help-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    font-size: 0.88rem;
}

.help-search input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    backdrop-filter: blur(12px);
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.help-search input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.help-search input:focus {
    border-color: rgba(0, 145, 255, 0.7);
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 0 0 3px rgba(0, 145, 255, 0.22);
}

.help-layout {
    max-width: 980px;
    margin: 0 auto;
    padding: 1.75rem 20px 4rem;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.75fr);
    gap: 2.5rem;
    align-items: start;
}

.help-faq h2,
.help-contact h2 {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.4px;
    margin-bottom: 0.4rem;
}

.help-lead {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.35rem;
}

.help-topics {
    display: flex;
    gap: 1.1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.15rem 0 0.15rem;
    border-bottom: 1px solid var(--border-dark);
    scrollbar-width: none;
}

.help-topics::-webkit-scrollbar { display: none; }

.help-topic {
    flex-shrink: 0;
    border: none;
    background: none;
    color: var(--text-muted);
    padding: 0 0 12px;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.help-topic:hover { color: var(--text-main); }

.help-topic.active {
    color: var(--text-main);
    border-bottom-color: var(--text-main);
}

.faq-item {
    border-bottom: 1px solid var(--border-dark);
}

.faq-item[hidden] { display: none !important; }

.faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 1.05rem 0;
    border: none;
    background: none;
    text-align: left;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: -0.2px;
    font-family: inherit;
    cursor: pointer;
    color: var(--text-main);
}

.faq-q i {
    color: var(--text-muted);
    font-size: 0.72rem;
    transition: transform 0.22s ease;
    flex-shrink: 0;
}

.faq-item.open .faq-q i { transform: rotate(180deg); }

.faq-a {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.22s ease;
}

.faq-a > span {
    overflow: hidden;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.65;
    color: #3f3f46;
}

.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-item.open .faq-a > span { padding-bottom: 1.05rem; }

.help-empty {
    display: none;
    padding: 1.75rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.help-contact {
    scroll-margin-top: 92px;
    background:
        linear-gradient(180deg, rgba(0, 145, 255, 0.05) 0%, transparent 40%),
        #fff;
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    padding: 1.25rem 1.15rem 1.35rem;
    position: sticky;
    top: 86px;
}

.help-contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-top: 1.15rem;
}

.help-contact-form label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.help-contact-form input,
.help-contact-form select,
.help-contact-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--text-main);
    background: var(--panel-bg);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.help-contact-form input:focus,
.help-contact-form select:focus,
.help-contact-form textarea:focus {
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 3px var(--blue-dim);
}

.help-contact-form textarea {
    min-height: 110px;
    resize: vertical;
}

.help-contact-form .btn {
    align-self: flex-start;
    padding: 13px 20px;
}

.help-contact-success {
    display: none;
    margin-top: 1.15rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.help-contact-success strong {
    display: block;
    color: var(--text-main);
    font-size: 1rem;
    margin-bottom: 4px;
}

.contact-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 0.75rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.contact-meta a {
    color: var(--blue);
    font-weight: 600;
}

.contact-meta a:hover { text-decoration: underline; }

.refund-note {
    margin-top: 1.35rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--border-dark);
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--text-muted);
    scroll-margin-top: 92px;
}

.site-footer .footer-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.site-footer .footer-right a {
    color: rgba(255, 255, 255, 0.45);
}

.site-footer .footer-right a:hover { color: #fff; }

@media (max-width: 800px) {
    .help-layout {
        grid-template-columns: 1fr;
        gap: 1.75rem;
        padding: 1.5rem 1.1rem 3.5rem;
    }

    .help-contact {
        position: static;
    }

    .help-search {
        max-width: none;
    }

    .help-search input {
        font-size: 1rem;
    }

    .help-topics {
        gap: 1rem;
        margin-left: -0.25rem;
        margin-right: -0.25rem;
        padding: 0 0.25rem;
    }

    .faq-q {
        font-size: 0.94rem;
        min-height: 44px;
    }

    .help-contact-form input,
    .help-contact-form select,
    .help-contact-form textarea {
        font-size: 1rem;
    }
}

@media (max-width: 520px) {
    .help-faq h2,
    .help-contact h2 {
        font-size: 1.1rem;
    }

    .help-topic {
        font-size: 0.82rem;
        padding-bottom: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .faq-a,
    .faq-q i {
        transition: none;
    }
}
