/* Shared styles for standalone pages served straight from public/ (legal pages, 404).
   Kept separate from the bundled site CSS so these pages never depend on a build hash. */

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/poppins-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/poppins-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/poppins-700.woff2') format('woff2');
}

:root {
    --color-teal: #2DB3AD;
    --color-primary: #2DB3AD;
    --color-primary-hover: #259A95;
    --color-navy: #1A1D21;
    --color-slate: #616061;
    --color-light: #F8F8F8;
    --color-white: #FFFFFF;
    --color-border: rgba(0, 0, 0, 0.1);
    --radius-md: 8px;
    --radius-lg: 12px;
    --header-height: 72px;
}

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

html {
    font-size: 16px;
    scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--color-navy);
    background: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); text-decoration: underline; }

:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 1100;
    background: var(--color-white);
    color: var(--color-navy);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.skip-link:focus { top: 1rem; }

.wrap {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.legal-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: var(--color-white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.legal-header .wrap {
    max-width: 1200px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.legal-header img { width: auto; height: 32px; }

.legal-header a.back {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-slate);
    white-space: nowrap;
}

.legal-header a.back:hover { color: var(--color-navy); text-decoration: none; }

/* Draft banner — delete the element once the document is approved */
.draft-notice {
    background: #FEF6E0;
    border-bottom: 1px solid #F0D68A;
    color: #6B4E00;
    padding: 1rem 0;
    font-size: 0.875rem;
}

.draft-notice strong { display: block; font-size: 0.9375rem; margin-bottom: 0.25rem; }

.draft-notice ul { margin: 0.5rem 0 0 1.25rem; }

.draft-notice li { margin-bottom: 0.125rem; }

/* Document body */
.legal-body { padding: 3.5rem 0 4rem; }

.legal-body h1 {
    font-size: 2.25rem;
    line-height: 1.2;
    text-wrap: balance;
    margin-bottom: 0.5rem;
}

.legal-meta {
    color: var(--color-slate);
    font-size: 0.875rem;
    padding-bottom: 1.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--color-border);
}

.legal-body h2 {
    font-size: 1.375rem;
    line-height: 1.3;
    margin: 2.75rem 0 0.75rem;
    scroll-margin-top: calc(var(--header-height) + 1rem);
}

.legal-body h3 {
    font-size: 1.0625rem;
    margin: 1.75rem 0 0.5rem;
}

.legal-body p, .legal-body li { margin-bottom: 0.875rem; }

.legal-body ul, .legal-body ol { margin: 0 0 1rem 1.25rem; }

.legal-body li { margin-bottom: 0.5rem; }

.legal-body table {
    width: 100%;
    /* fixed layout + wrapping cells, so long tokens can't push the page wide on phones */
    table-layout: fixed;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.9375rem;
}

.legal-body th, .legal-body td {
    border: 1px solid var(--color-border);
    padding: 0.625rem 0.75rem;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.legal-body td code {
    font-size: 0.875em;
    overflow-wrap: anywhere;
}

.legal-body th { background: var(--color-light); font-weight: 600; }

/* Table of contents */
.toc {
    background: var(--color-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

.toc h2 {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-slate);
}

.toc ol { margin: 0 0 0 1.125rem; }

.toc li { margin-bottom: 0.25rem; font-size: 0.9375rem; }

/* Unresolved placeholder — must be visually impossible to miss */
.todo {
    background: #FFE8A3;
    color: #6B4E00;
    font-weight: 600;
    padding: 0.0625rem 0.375rem;
    border-radius: 4px;
    border: 1px dashed #C9A227;
}

/* Footer */
.legal-footer {
    background: var(--color-navy);
    color: rgba(255, 255, 255, 0.7);
    padding: 2.5rem 0;
    font-size: 0.875rem;
}

.legal-footer .wrap {
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legal-footer nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }

.legal-footer a { color: rgba(255, 255, 255, 0.7); }

.legal-footer a:hover { color: var(--color-white); }

@media (max-width: 600px) {
    .legal-body { padding: 2.5rem 0 3rem; }
    .legal-body h1 { font-size: 1.75rem; }
    .legal-body h2 { font-size: 1.1875rem; }
    .legal-footer .wrap { flex-direction: column; align-items: flex-start; }
    .legal-body table { font-size: 0.875rem; }
    .legal-body th, .legal-body td { padding: 0.5rem; }
}
