/* Lunio support + privacy: same night sky, type and bar as the landing page. */

:root {
    --ink: #02051b;
    --text: #f7f8fb;
    --muted: #a3abbb;
    --dim: #7c8499;
    --accent: #4f84fe;
    --moon: #a8baff;
    --green: #52c483;
    --card: rgba(63, 77, 105, 0.22);
    --card-edge: rgba(168, 186, 255, 0.13);

    --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
    --sans: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

    --gutter: clamp(16px, 4vw, 48px);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
    background: var(--ink);
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 100px;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background:
        radial-gradient(1100px 700px at 80% -10%, rgba(102, 158, 255, 0.12), transparent 60%),
        radial-gradient(800px 600px at 5% 0%, rgba(71, 101, 247, 0.08), transparent 60%),
        var(--ink);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* a few fixed stars */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.55;
    background-image:
        radial-gradient(1.2px 1.2px at 8% 14%, #c9d4ff, transparent),
        radial-gradient(1px 1px at 22% 32%, #c9d4ff, transparent),
        radial-gradient(1.4px 1.4px at 37% 9%, #c9d4ff, transparent),
        radial-gradient(1px 1px at 51% 22%, #c9d4ff, transparent),
        radial-gradient(1.3px 1.3px at 66% 12%, #c9d4ff, transparent),
        radial-gradient(1px 1px at 79% 28%, #c9d4ff, transparent),
        radial-gradient(1.5px 1.5px at 91% 8%, #c9d4ff, transparent),
        radial-gradient(1px 1px at 14% 58%, #c9d4ff, transparent),
        radial-gradient(1.2px 1.2px at 88% 52%, #c9d4ff, transparent),
        radial-gradient(1px 1px at 45% 70%, #c9d4ff, transparent),
        radial-gradient(1.2px 1.2px at 72% 82%, #c9d4ff, transparent),
        radial-gradient(1px 1px at 6% 88%, #c9d4ff, transparent);
}

a { color: inherit; }

:focus-visible { outline: 2px solid var(--moon); outline-offset: 3px; border-radius: 8px; }

/* ─── Bar ─── */
.bar {
    position: fixed;
    top: 14px;
    left: 50%;
    z-index: 50;
    transform: translateX(-50%);
    width: min(calc(100% - 2 * var(--gutter)), 760px);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 7px 7px 7px 10px;
    border-radius: 999px;
    background: rgba(8, 12, 30, 0.62);
    border: 1px solid var(--card-edge);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.bar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
}

.bar-brand img { border-radius: 8px; }

.bar-links { display: flex; justify-content: center; gap: 4px; }

.bar-links a {
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
}

.bar-links a:hover { color: var(--text); }
.bar-links a[aria-current="page"] { color: var(--text); background: rgba(168, 186, 255, 0.12); }

.bar-cta {
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--text);
    color: #0a0d1c;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s var(--ease);
}

.bar-cta:hover { transform: scale(1.04); }

/* ─── Head ─── */
.legal {
    flex: 1 0 auto;
    width: min(100%, 1100px);
    margin: 0 auto;
    padding: 150px var(--gutter) 100px;
}

.legal-head { max-width: 760px; margin-bottom: 70px; }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--muted);
}

.tag b {
    padding: 4px 9px;
    border-radius: 7px;
    background: rgba(168, 186, 255, 0.12);
    color: var(--moon);
    font-weight: 600;
}

h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-variation-settings: "SOFT" 100, "opsz" 144;
    font-size: clamp(2.8rem, 6.4vw, 5.2rem);
    line-height: 1.02;
    letter-spacing: -0.025em;
}

h1 em { font-style: italic; font-weight: 300; color: var(--moon); }

.lede { max-width: 34em; margin-top: 24px; font-size: 19px; color: var(--muted); }

.short {
    display: flex;
    gap: 16px;
    max-width: 720px;
    margin-top: 34px;
    padding: 22px 24px;
    border-radius: 22px;
    background: var(--card);
    border: 1px solid var(--card-edge);
    color: var(--muted);
}

.short strong { color: var(--text); }

.moon-ico {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 3px;
    background: var(--accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ─── Body with table of contents ─── */
.legal-body {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 70px;
    align-items: start;
}

.toc { position: sticky; top: 110px; }

.toc summary {
    list-style: none;
    margin-bottom: 14px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dim);
}

.toc summary::-webkit-details-marker { display: none; }

.toc ol { list-style: none; display: grid; gap: 2px; }

.toc a {
    display: flex;
    gap: 12px;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.35;
    color: var(--dim);
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
}

.toc a:hover { color: var(--text); }
.toc a span { font-family: var(--mono); font-size: 12px; color: rgba(168, 186, 255, 0.4); padding-top: 1px; }
.toc a.is-active { color: var(--text); background: rgba(168, 186, 255, 0.09); }
.toc a.is-active span { color: var(--moon); }

.prose { max-width: 700px; }

.prose section {
    padding-bottom: 44px;
    margin-bottom: 44px;
    border-bottom: 1px solid var(--card-edge);
}

.prose section:last-child { border-bottom: 0; margin-bottom: 0; }

.prose h2 {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 18px;
    font-family: var(--serif);
    font-weight: 400;
    font-variation-settings: "SOFT" 100;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    line-height: 1.15;
    letter-spacing: -0.015em;
}

.prose h2 .num { font-family: var(--mono); font-size: 13px; color: var(--moon); letter-spacing: 0; transform: translateY(-4px); }

.prose p, .prose li { color: var(--muted); }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: 14px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose code { font-family: var(--mono); font-size: 0.88em; color: var(--moon); }

.prose ul { list-style: none; display: grid; gap: 10px; }

.prose li { position: relative; padding-left: 22px; }

.prose li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.72em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.8;
}

.prose a, .faq a {
    color: var(--moon);
    text-decoration: underline;
    text-decoration-color: rgba(168, 186, 255, 0.35);
    text-underline-offset: 3px;
}

.prose a:hover, .faq a:hover { text-decoration-color: var(--moon); }

/* ─── Support ─── */
.mail {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 34px;
    padding: 14px 26px 14px 16px;
    border-radius: 20px;
    background: var(--text);
    color: #0a0d1c;
    text-decoration: none;
    font-weight: 700;
    font-size: 19px;
    line-height: 1.15;
    transition: transform 0.2s var(--ease), box-shadow 0.3s;
}

.mail:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -12px rgba(168, 186, 255, 0.55); }

.mail svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mail small { display: block; font-size: 12px; font-weight: 500; opacity: 0.65; }

.reply { margin-top: 16px; font-family: var(--mono); font-size: 13px; color: var(--dim); }

.faq { max-width: 760px; }

.faq h2 {
    margin-bottom: 20px;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dim);
}

.faq details {
    margin-bottom: 10px;
    border-radius: 20px;
    background: var(--card);
    border: 1px solid var(--card-edge);
    transition: border-color 0.3s;
}

.faq details[open] { border-color: rgba(168, 186, 255, 0.28); }

.faq summary {
    position: relative;
    padding: 20px 60px 20px 24px;
    list-style: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
    content: "";
    position: absolute;
    right: 22px;
    top: 50%;
    width: 26px;
    height: 26px;
    margin-top: -13px;
    border-radius: 50%;
    background: rgba(79, 132, 254, 0.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8baff' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat;
    transition: transform 0.35s var(--ease);
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p { padding: 0 24px 22px; color: var(--muted); }
.faq strong { color: var(--text); font-weight: 600; }

/* ─── Footer ─── */
.foot {
    width: min(100%, 1100px);
    margin: 0 auto;
    padding: 26px var(--gutter) 34px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-top: 1px solid var(--card-edge);
    font-size: 15px;
    color: var(--dim);
}

.foot a { text-decoration: none; font-weight: 600; color: var(--muted); }
.foot a:hover { color: var(--text); }
.foot nav { display: flex; gap: 22px; }

/* ─── Small screens ─── */
@media (max-width: 900px) {
    .legal-body { grid-template-columns: 1fr; gap: 30px; }

    .toc {
        position: static;
        padding: 14px 18px;
        border-radius: 18px;
        background: var(--card);
        border: 1px solid var(--card-edge);
    }

    .toc summary { position: relative; margin: 0; cursor: pointer; }

    .toc summary::after {
        content: "";
        position: absolute;
        right: 2px;
        top: 50%;
        width: 8px;
        height: 8px;
        margin-top: -6px;
        border-right: 1.5px solid var(--moon);
        border-bottom: 1.5px solid var(--moon);
        transform: rotate(45deg);
        transition: transform 0.3s var(--ease);
    }

    .toc details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
    .toc details[open] summary { margin-bottom: 12px; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .bar { top: 10px; gap: 8px; padding-left: 8px; }
    .bar-brand span { display: none; }
    .bar-links a { padding: 7px 10px; font-size: 14px; }
    .bar-cta { padding: 8px 12px; font-size: 13px; }
    .legal { padding-top: 120px; }
    .legal-head { margin-bottom: 50px; }
    .lede { font-size: 17px; }
    .short { padding: 18px; gap: 12px; }
    .faq summary { font-size: 16px; padding: 18px 56px 18px 18px; }
    .faq details p { padding: 0 18px 18px; }
    .mail { font-size: 17px; }
    .foot { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; }
}
