/*
 * 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;
}

/* ── delete-account.php: numbered steps, the request form, confirm buttons ── */
.legal-page ol { margin: 0 0 1rem; padding-left: 1.3rem; }
.legal-page ol li { margin-bottom: .35rem; }

.legal-form { margin: 1rem 0 1.5rem; max-width: 26rem; }
.legal-label { display: block; font-weight: 600; margin-bottom: .35rem; }
.legal-input {
    display: block; width: 100%;
    padding: .7rem .85rem; margin-bottom: .75rem;
    font: inherit; color: inherit;
    border: 1px solid #d1d5db; border-radius: 10px; background: #fff;
}
.legal-input:focus { outline: 2px solid var(--color-accent-dark, #21968a); outline-offset: 1px; border-color: transparent; }
.legal-error { color: #b91c1c; font-size: .9rem; margin: -.25rem 0 .75rem; }
.legal-btn {
    display: inline-block; appearance: none; cursor: pointer;
    padding: .75rem 1.2rem; margin: 0 .5rem .5rem 0;
    font: inherit; font-weight: 700; text-decoration: none; text-align: center;
    color: #fff; background: var(--color-accent-dark, #21968a);
    border: 0; border-radius: 10px;
}
.legal-page a.legal-btn { color: #fff; text-decoration: none; }
.legal-btn--danger { background: #dc2626; }
.legal-btn--danger:hover { background: #b91c1c; }
.legal-page a.legal-btn--quiet,
.legal-btn--quiet { background: transparent; color: inherit; border: 1px solid #d1d5db; }
.legal-callout--danger { background: #fef2f2; }
/* Honeypot: off-screen rather than display:none, which some bots skip. */
.legal-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
