/*
 * The waitlist's legal pages (privacy.html, terms.html): the development
 * site's legal pages (development/css/legal.css), on this site's shared hero,
 * nav and footer (css/site.css). Under the hero, a "Back to home" link and
 * the document in a white card.
 *
 * Unlike the development site, these pages load no Tailwind, so the reset
 * lives here.
 */

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

html {
    text-size-adjust: 100%;
}

body {
    font-family:
        Inter,
        -apple-system,
        blinkmacsystemfont,
        'Segoe UI',
        sans-serif;
    background: #fff;
    color: #1f2937;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── Document band ── */
.legal-body {
    position: relative;
    z-index: 10;
    background-color: #fff;
    padding: 3.5rem 24px 5rem;
}

@media (width >= 640px) {
    .legal-body {
        padding-top: 4.5rem;
        padding-bottom: 6rem;
    }
}

.legal-card {
    max-width: 760px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid rgb(15 23 42 / 8%);
    border-radius: 16px;
    padding: 48px 44px;
    box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
}

.legal-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    /* Lined up with the card's left edge: the card is a 760px box centred
       in this same content box, so its inset is half the leftover width. */
    margin: 0 0 20px max(0px, calc((100% - 760px) / 2));
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.15s ease;
}

.legal-back:hover {
    color: #111827;
}

/* ── Document typography ── (scoped to the card, so none of it reaches the
   footer) */
.legal-card h2 {
    font-family: 'Space Grotesk', Inter, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.01em;
    margin: 36px 0 12px;
}

.legal-card h2:first-of-type {
    margin-top: 0;
}

.legal-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 24px 0 8px;
}

.legal-card p {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: #4b5563;
    margin-bottom: 14px;
}

.legal-card ul,
.legal-card ol {
    margin: 0 0 14px 20px;
    padding-left: 8px;
}

.legal-card ul {
    list-style-type: disc;
}

.legal-card ol {
    list-style-type: decimal;
}

.legal-card li {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: #4b5563;
    margin-bottom: 8px;
}

.legal-card strong {
    color: #1f2937;
    font-weight: 600;
}

.legal-card a {
    color: #1433d2;
    text-decoration: underline;
}

.legal-card a:hover {
    color: #0e2399;
}

/* The privacy policy's tables, each in a box that scrolls sideways on a
   phone rather than squeezing the columns. */
.table-scroll {
    overflow-x: auto;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

.legal-card table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.legal-card th,
.legal-card td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgb(15 23 42 / 8%);
    line-height: 1.6;
}

.legal-card th {
    font-weight: 600;
    color: #111827;
    background: #f8fafc;
    white-space: nowrap;
}

.legal-card td {
    color: #4b5563;
}

/* The "Cookie settings" button in the privacy policy, which reopens the
   consent card through CookieConsent's [data-cc-open] binding. */
.cookie-settings-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    margin: 4px 0 18px;
    border: 1px solid rgb(15 23 42 / 14%);
    border-radius: 9px;
    background: #fff;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}

.cookie-settings-link:hover {
    border-color: rgb(15 23 42 / 28%);
    background: #f8fafc;
}

/* The footer's Cookie settings, a button among the legal links. */
.kf-legal button {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
}

/* The footer has only the mark and the line about Kabiri above its rule. */
.kf-top {
    display: flex;
}

@media (width <= 640px) {
    .legal-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .legal-card {
        padding: 32px 22px;
        border-radius: 14px;
    }
}
