/*
 * assets/css/legal.css — shared styling for privacy.php, terms.php and about.php.
 *
 * These pages must stay readable logged out (App Review fetches the privacy
 * URL without an account) and inside the native WebView, hence the generous
 * measure and the safe-area padding at the foot.
 */

.legal-page {
    max-width: 46rem;
    margin: 0 auto;
    padding: 2rem 1.25rem calc(3rem + env(safe-area-inset-bottom, 0px));
    color: var(--c-text-primary, #282a32);
    font-size: 1rem;
    line-height: 1.65;
}

.legal-page h1 {
    font-family: "Fraunces", Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: .35rem;
}

.legal-page .legal-updated {
    color: var(--c-text-secondary, #686b87);
    font-size: .875rem;
    margin-bottom: 2rem;
}

.legal-page h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 2.25rem 0 .6rem;
    padding-top: .5rem;
    border-top: 1px solid var(--c-border-primary, #eff1f6);
}

.legal-page h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 1.5rem 0 .4rem;
}

.legal-page p,
.legal-page ul {
    margin-bottom: 1rem;
}

.legal-page ul {
    padding-left: 1.25rem;
}

.legal-page li {
    margin-bottom: .4rem;
}

.legal-page a {
    color: var(--color-accent-dark, #21968a);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Cross-links between the three legal pages. */
.legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 2rem;
}

.legal-nav a {
    display: inline-block;
    padding: .3rem .75rem;
    border: 1px solid var(--c-border-primary, #eff1f6);
    border-radius: 999px;
    font-size: .8125rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--c-text-secondary, #686b87);
    background: var(--c-background-secondary, #fdfcff);
}

.legal-nav a.is-current {
    color: #fff;
    background: var(--color-accent-dark, #21968a);
    border-color: var(--color-accent-dark, #21968a);
}

/* Callout used for the things a reader most needs to find fast: how to
   report abuse, how to delete an account. */
.legal-callout {
    background: var(--c-background-tertiary, #ecf3fe);
    border-radius: 10px;
    padding: 1rem 1.15rem;
    margin: 1.5rem 0;
}

.legal-callout p:last-child {
    margin-bottom: 0;
}

.legal-page table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
    font-size: .9375rem;
}

.legal-page th,
.legal-page td {
    text-align: left;
    padding: .5rem .6rem;
    border-bottom: 1px solid var(--c-border-primary, #eff1f6);
    vertical-align: top;
}

.legal-page th {
    font-weight: 700;
    white-space: nowrap;
}

/* Wide tables must scroll inside themselves rather than the page. */
.legal-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
