/* Mercury — shared stylesheet */

:root {
    --bg: #f5f5f7;
    --surface: #ffffff;
    --text: #1c1c1e;
    --secondary: #6e6e73;
    --accent: #7c3aed;
    --border: #e5e5ea;
    --radius: 12px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1c1c1e;
        --surface: #2c2c2e;
        --text: #f2f2f7;
        --secondary: #aeaeb2;
        --border: #3a3a3c;
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px 64px;
}

/* ── Header ── */

header {
    text-align: center;
    padding: 48px 0 40px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.app-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

header p {
    color: var(--secondary);
    margin-top: 6px;
    font-size: 15px;
}

/* ── Nav TOC ── */

nav.toc {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 24px;
}

nav.toc strong {
    display: block;
    margin-bottom: 10px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--secondary);
}

nav.toc ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 24px;
}

nav.toc ul li a {
    font-size: 14px;
}

/* ── Sections ── */

section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
}

section h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

section h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-top: 20px;
    margin-bottom: 6px;
}

section h3:first-of-type {
    margin-top: 0;
}

section p {
    font-size: 15px;
    color: var(--secondary);
    margin-bottom: 8px;
}

section p:last-child {
    margin-bottom: 0;
}

section ul,
section ol {
    list-style: none;
    padding: 0;
    margin: 6px 0 8px;
}

section ul li,
section ol li {
    font-size: 15px;
    color: var(--secondary);
    padding: 3px 0 3px 20px;
    position: relative;
}

section ul li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: var(--accent);
}

section ol {
    counter-reset: ol-counter;
}

section ol li::before {
    content: counter(ol-counter) ".";
    counter-increment: ol-counter;
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 600;
    font-size: 13px;
}

section ul li strong,
section ol li strong {
    color: var(--text);
}

/* ── Tables ── */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

th {
    text-align: left;
    background: var(--bg);
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary);
}

td {
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    vertical-align: top;
    font-size: 14px;
    color: var(--secondary);
}

td strong {
    color: var(--text);
}

/* ── Callout ── */

.callout {
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    margin-top: 16px;
    background: var(--bg);
}

.callout p {
    font-size: 14px;
    margin: 0;
}

/* ── Summary Grid (privacy page) ── */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.summary-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.summary-card .icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}

.summary-card p {
    font-size: 14px;
    color: var(--secondary);
    line-height: 1.5;
    margin: 0;
}

/* ── Links ── */

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

code {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 13px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
}

/* ── Footer ── */

footer {
    text-align: center;
    margin-top: 48px;
    font-size: 13px;
    color: var(--secondary);
}

footer a {
    color: var(--secondary);
    text-decoration: underline;
}

/* ── Responsive ── */

@media (max-width: 600px) {
    nav.toc ul {
        grid-template-columns: 1fr;
    }

    header {
        padding: 32px 0 28px;
    }
}
