:root {
    --bg: #fafafa;
    --text: #1a1a1a;
    --text-muted: #a0a0a0;
    --ghost: #efefef;
    --dim: #c8c8c8;
}
[data-theme="dark"] {
    --bg: #222222;
    --text: #e0e0e0;
    --text-muted: #777777;
    --ghost: #2f2f2f;
    --dim: #444444;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
}
a { color: inherit; text-decoration: none; }

.page {
    padding: 350px 24px 100px 60px;
    max-width: 480px;
}

.section {
    margin-bottom: 24px;
}
.section:last-child {
    margin-bottom: 0;
}

.muted {
    color: var(--text-muted);
}

.link {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s, opacity 0.15s;
}
.link:hover {
    color: var(--text);
}

/* pure typographic action links */
.action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font: inherit;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s, opacity 0.15s;
    text-align: left;
}
.action-btn:hover {
    color: var(--text);
}
.arrow {
    font-family: sans-serif;
    font-size: 0.9em;
    margin-left: 4px;
    font-variant-emoji: text;
    display: inline-block;
    text-decoration: none;
}

.links-block {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
}

.context-copy-box {
    width: min(100%, 420px);
    height: 180px;
    margin: 8px 0 4px;
    padding: 8px;
    border: 1px solid var(--dim);
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 11px;
    line-height: 1.45;
    resize: vertical;
}

.context-copy-box[hidden] {
    display: none;
}

.footer-block {
    color: var(--text-muted);
    line-height: 1.8;
}

::selection { background: var(--text); color: var(--bg); }

/* ---- site nav ---- */
.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 max(24px, env(safe-area-inset-left));
    background: var(--bg);
    z-index: 10;
}
.nav-logo {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(18px, 1.5vw, 20px);
    letter-spacing: -0.02em;
    text-decoration: none;
    flex-shrink: 0;
    transition: color 0.3s ease;
    cursor: pointer;
    line-height: 1;
    color: var(--ghost);
}

body.is-revealed .nav-logo {
    color: var(--text);
}

@media (max-width: 900px) {
    .page {
        padding: 280px 20px 100px 20px;
    }
}
