/* ============================================================
   Respeak Trust Center
   Palette lifted verbatim from the product's design tokens
   (document_expert → 01_frontend/src/assets/tokens.css) so this
   site reads as the same system. Keep the two in sync by hand:
   this repo deliberately has no build step and no dependency on
   the app, so a token change there is a manual copy here.

   No webfonts, no external requests, no JavaScript — a trust
   center that phones out to a CDN argues against itself, and a
   zero-JS page lets the CSP below stay maximally strict.
   ============================================================ */

:root {
    color-scheme: light;

    --bg: #eeedf0;
    --surface: #ffffff;
    --surface-2: #f9f9f9;
    --ink: #16161a;
    --ink-2: #3a3a42;
    --ink-soft: #6b6b76;
    --ink-faint: #9a9aa4;
    --line: rgba(40, 40, 50, 0.1);
    --line-strong: rgba(40, 40, 50, 0.18);
    --pill-hover: rgba(40, 40, 50, 0.055);
    --highlight: #4d67d5;
    --success: #577b3b;
    --warning: #9c4c06;

    --radius: 0.6875rem;
    --shadow-sm: 0 1px 2px rgba(20, 20, 30, 0.06), 0 1px 1px rgba(20, 20, 30, 0.04);
    --shadow-md: 0 4px 16px rgba(20, 20, 30, 0.08), 0 1px 3px rgba(20, 20, 30, 0.05);
    --ease: cubic-bezier(0.2, 0.7, 0.25, 1);

    --wrap: 62rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;

        --bg: #15151b;
        --surface: #232330;
        --surface-2: #1b1b23;
        --ink: #f0f0f3;
        --ink-2: #c9c9d2;
        --ink-soft: #9696a2;
        --ink-faint: #6c6c78;
        --line: rgba(255, 255, 255, 0.09);
        --line-strong: rgba(255, 255, 255, 0.16);
        --pill-hover: rgba(255, 255, 255, 0.055);
        --highlight: #7d92e8;
        --success: #8fbb63;
        --warning: #e0a04e;

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 1px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.35);
    }
}

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

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

body {
    margin: 0;
    background: var(--surface-2);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: 1rem;
}

a { color: var(--highlight); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

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

.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
}

/* ---------------------------------------------------- hero */

.hero {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 4.5rem 0 3rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
}
.brand img { display: block; border-radius: 6px; }

.eyebrow {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.25rem, 6vw, 3.25rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 600;
}

.lede {
    margin: 0;
    max-width: 44rem;
    font-size: 1.125rem;
    color: var(--ink-2);
}

.stand {
    margin: 1.75rem 0 0;
    font-size: 0.875rem;
    color: var(--ink-soft);
}

/* ---------------------------------------------------- nav */

.toc {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--surface-2) 88%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.toc .wrap {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.toc .wrap::-webkit-scrollbar { display: none; }

.toc a {
    flex: none;
    padding: 0.875rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink-soft);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.toc a:hover {
    color: var(--ink);
    border-bottom-color: var(--line-strong);
}

/* ---------------------------------------------------- sections */

main { padding-block: 1rem 4rem; }

section {
    padding-block: 3rem;
    border-bottom: 1px solid var(--line);
}
section:last-of-type { border-bottom: 0; }

section > h2 {
    margin: 0 0 1.25rem;
    font-size: 1.625rem;
    letter-spacing: -0.015em;
    font-weight: 600;
    scroll-margin-top: 4rem;
}

section h3 {
    margin: 2rem 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.005em;
}

.section-intro {
    margin: 0 0 1.5rem;
    max-width: 46rem;
    color: var(--ink-2);
}

section[id] { scroll-margin-top: 3.5rem; }

/* ---------------------------------------------------- cards */

.grid-4, .grid-2 {
    display: grid;
    gap: 1rem;
}
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.card h3 {
    margin: 0 0 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
}

.card p {
    margin: 0 0 0.75rem;
    font-size: 0.9375rem;
    color: var(--ink-2);
}
.card p:last-child { margin-bottom: 0; }

.card ul {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.9375rem;
    color: var(--ink-2);
}
.card li { margin-bottom: 0.35rem; }
.card li:last-child { margin-bottom: 0; }

/* ---------------------------------------------------- tables */

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 0.9375rem;
}

thead th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--ink-soft);
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

tbody th, tbody td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    text-align: left;
}

tbody th {
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}

tbody td { color: var(--ink-2); }

tbody tr:last-child th,
tbody tr:last-child td { border-bottom: 0; }

.badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid;
}
.badge.ok {
    color: var(--success);
    border-color: color-mix(in srgb, var(--success) 35%, transparent);
    background: color-mix(in srgb, var(--success) 8%, transparent);
}
.badge.pending {
    color: var(--warning);
    border-color: color-mix(in srgb, var(--warning) 35%, transparent);
    background: color-mix(in srgb, var(--warning) 8%, transparent);
}

.note {
    margin: 0.75rem 0 0;
    font-size: 0.875rem;
    color: var(--ink-soft);
}

/* ---------------------------------------------------- documents */

.docs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.docs li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    align-items: flex-start;
    justify-content: space-between;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.125rem 1.25rem;
    box-shadow: var(--shadow-sm);
}

.doc-main { flex: 1 1 22rem; min-width: 0; }

.doc-title {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
}
a.doc-title { text-decoration: underline; text-decoration-color: var(--line-strong); }
a.doc-title:hover { text-decoration-color: currentColor; }
.doc-title.muted { color: var(--ink-soft); }

.doc-meta {
    margin: 0.2rem 0 0.4rem;
    font-size: 0.8125rem;
    color: var(--ink-faint);
}

.doc-desc {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--ink-2);
}

.doc-link {
    flex: none;
    align-self: center;
    font-size: 0.8125rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--ink-soft);
    text-decoration: none;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    background: var(--bg);
}
.doc-link:hover { color: var(--ink); border-color: var(--line-strong); }

/* ---------------------------------------------------- lists */

.checks {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 0.5rem 1.5rem;
    color: var(--ink-2);
}

.checks li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.9375rem;
}

.checks li::before {
    content: "";
    position: absolute;
    left: 0.25rem;
    top: 0.65em;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: var(--success);
}

/* ---------------------------------------------------- cta */

.cta {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.cta p { margin: 0; max-width: 40rem; color: var(--ink-2); font-size: 0.9375rem; }

.btn {
    flex: none;
    display: inline-block;
    padding: 0.6rem 1.1rem;
    border-radius: 0.5rem;
    background: var(--ink);
    color: var(--surface);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ---------------------------------------------------- footer */

footer {
    border-top: 1px solid var(--line);
    background: var(--bg);
    padding: 2rem 0 3rem;
    font-size: 0.875rem;
}
footer p { margin: 0 0 0.35rem; }
footer .muted { color: var(--ink-soft); }
footer a { color: var(--ink-2); }

/* ---------------------------------------------------- responsive */

@media (max-width: 40rem) {
    .hero { padding: 3rem 0 2rem; }
    section { padding-block: 2.25rem; }

    /* Tables reflow to stacked rows — a 3-column subprocessor table is
       unreadable at phone width, and this page gets opened on phones by
       people forwarding it to their DPO. */
    table, thead, tbody, tr, th, td { display: block; }
    thead { display: none; }
    tbody tr {
        padding: 0.875rem 1rem;
        border-bottom: 1px solid var(--line);
    }
    tbody tr:last-child { border-bottom: 0; }
    tbody th, tbody td {
        padding: 0.15rem 0;
        border: 0;
        white-space: normal;
    }
    tbody th { font-size: 1rem; }
    tbody td { font-size: 0.9375rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
    .btn:hover { transform: none; }
}

@media print {
    .toc, .cta, .btn { display: none; }
    body { background: #fff; color: #000; }
    .card, table, .docs li { break-inside: avoid; box-shadow: none; }
    a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.75em; color: #555; }
}
