/*
    Legal pages (privacy policy, KVKK notice, terms...). Loaded after landing.css, whose colour tokens, fonts, header and
    footer they reuse; this file only adds the reading column and the document's typography.
*/

.legal-page .top-row {
    justify-content: space-between;
}

.legal {
    display: grid;
    gap: 1.5rem;
    padding-block: 1.5rem 4rem;
}

@media (min-width: 960px) {
    .legal {
        grid-template-columns: 15rem minmax(0, 46rem);
        justify-content: center;
        gap: 3rem;
        padding-block: 2.5rem 5rem;
    }
}

/* The other legal pages: a row that scrolls sideways on phones, a sticky list beside the text on wide screens. */
.legal-nav {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.legal-nav a {
    flex: none;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.legal-nav a:hover {
    border-color: var(--ink);
}

.legal-nav a[aria-current="page"] {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
}

@media (min-width: 960px) {
    .legal-nav {
        position: sticky;
        top: 1.5rem;
        align-self: start;
        flex-direction: column;
        overflow: visible;
    }

    .legal-nav a {
        border-color: transparent;
        border-radius: 12px;
        white-space: normal;
    }
}

.legal-doc {
    min-width: 0;
    font-size: 1.02rem;
    line-height: 1.7;
}

/* Paragraphs, lists and tables apart; a heading close to what it introduces. (landing.css resets margins to 0.) */
.lp .legal-doc > * + * {
    margin-top: 1rem;
}

.lp .legal-doc > :is(h1, h2, h3) + * {
    margin-top: 0.6rem;
}

.lp .legal-doc h1 {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
    line-height: 1.15;
    font-weight: 600;
}

.lp .legal-doc h2 {
    margin-top: 2.25rem;
    font-family: var(--font-display);
    font-size: 1.45rem;
    line-height: 1.25;
    font-weight: 600;
    scroll-margin-top: 1rem;
}

.lp .legal-doc h3 {
    margin-top: 1.5rem;
    font-size: 1.08rem;
    font-weight: 700;
    scroll-margin-top: 1rem;
}

.legal-doc ul,
.legal-doc ol {
    padding-left: 1.4rem;
}

.legal-doc li + li {
    margin-top: 0.35rem;
}

.legal-doc a {
    text-decoration-color: var(--red);
    text-underline-offset: 0.15em;
    overflow-wrap: anywhere;
}

.legal-doc blockquote {
    margin-inline: 0;
    padding: 0.9rem 1.1rem;
    border-left: 4px solid var(--ink);
    border-radius: 0 12px 12px 0;
    background: var(--card);
}

.legal-doc blockquote > * + * {
    margin-top: 0.6rem;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card);
}

.legal-doc table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
    line-height: 1.5;
}

.legal-doc th,
.legal-doc td {
    padding: 0.65rem 0.8rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.legal-doc th {
    background: var(--paper-deep);
    font-weight: 700;
}

.legal-doc tr:last-child td {
    border-bottom: 0;
}

.legal-doc code {
    font-size: 0.9em;
    overflow-wrap: anywhere;
}

/* A detail the operator has not filled in yet (see LegalOptions). Meant to be noticed. */
.legal-doc mark.todo {
    padding: 0 0.25em;
    border: 1px dashed var(--red);
    border-radius: 4px;
    background: transparent;
    color: var(--red-ink);
    font-weight: 600;
}
