/* ================================================================
   Legal Pages — shared styles for terms, privacy, aup, dpa, subprocessors
   ================================================================ */

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --accent-primary: #1a7a4c;
    --border: #e2e8f0;
}

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

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Header ───────────────────────────────────────────────────── */

header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
}

.logo-mark {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, rgb(80 70 229 / 0.12), rgb(99 102 241 / 0.07));
    border-radius: 8px;
    color: var(--accent-primary);
    overflow: hidden;
    border: 1.5px solid rgb(80 70 229 / 0.10);
    flex-shrink: 0;
}

.logo-mark svg { display: block; width: 100%; height: 100%; }

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover { color: var(--accent-primary); }

/* ── Content ──────────────────────────────────────────────────── */

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

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

h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.last-updated {
    color: var(--text-tertiary);
    font-size: 0.9375rem;
    margin-bottom: 3rem;
}

h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

p { margin-bottom: 1.25rem; color: var(--text-secondary); }
ul, ol { margin-left: 1.5rem; margin-bottom: 1.5rem; }
li { margin-bottom: 0.5rem; color: var(--text-secondary); }
strong { color: var(--text-primary); font-weight: 600; }

/* ── Callout boxes ────────────────────────────────────────────── */

.highlight-box {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent-primary);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.highlight-box p:last-child { margin-bottom: 0; }

.warning-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.warning-box p:last-child { margin-bottom: 0; }

/* ── Footer ───────────────────────────────────────────────────── */

footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

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

/* ── Accessibility ────────────────────────────────────────────── */

a:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* ── DPA: measures table ──────────────────────────────────────── */

.measures-table,
.sub-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
}

.measures-table th,
.measures-table td,
.sub-table th,
.sub-table td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.measures-table th,
.sub-table th {
    color: var(--text-primary);
    font-weight: 600;
    background: var(--bg-secondary);
}

.sub-table th {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Subprocessors: cards ─────────────────────────────────────── */

.subprocessor-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.subprocessor-card h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.subprocessor-detail {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.25rem 1rem;
    font-size: 0.9375rem;
}

.subprocessor-detail dt {
    color: var(--text-tertiary);
    font-weight: 500;
}

.subprocessor-detail dd {
    color: var(--text-secondary);
    margin: 0;
    margin-bottom: 0.5rem;
}

/* ── Shared utility classes used across legal/template pages ─── */

.legal-contact-note {
    margin-top: 3rem;
    font-style: italic;
    color: var(--text-tertiary);
}

.footer-links {
    margin-top: 0.5rem;
}

.template-text-box {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent-primary);
    border-radius: 0 6px 6px 0;
    font-style: normal;
    line-height: 1.7;
}

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    .container { padding: 2rem 1.5rem; }
    .measures-table, .sub-table { font-size: 0.8125rem; }
    .measures-table th, .measures-table td,
    .sub-table th, .sub-table td { padding: 0.5rem 0.75rem; }
}
