/* Honeypot: invisible to people, present in the DOM for bots. */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link {
    position: absolute;
    left: -9999px;
}

.skip-link:focus {
    position: static;
}

:root {
    --ink: #16181d;
    --paper: #fbfbf9;
    --muted: #5c6068;
    --line: #dcdcd6;
    --accent: #1f6f5c;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #e9e9e4;
        --paper: #16181d;
        --muted: #9aa0a8;
        --line: #2c2f36;
        --accent: #52b699;
    }
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
}

main {
    max-width: 46rem;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

.site-header,
.site-footer {
    max-width: 46rem;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.site-footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.875rem;
}

.brand {
    font-weight: 700;
    text-decoration: none;
    color: var(--ink);
}

nav a {
    color: var(--accent);
    margin-right: 0.75rem;
}

h1 {
    font-size: clamp(1.75rem, 5vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.lead {
    font-size: 1.15rem;
    color: var(--muted);
}

.form-row {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

input[type="text"],
input[type="email"] {
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
    color: var(--ink);
    font-size: 1rem;
}

button[type="submit"] {
    padding: 0.75rem 1.4rem;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.fineprint,
.form-help {
    color: var(--muted);
    font-size: 0.85rem;
}

.language-switcher ul {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.8rem;
}

.wall {
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    padding: 1.25rem;
    border-radius: 6px;
}

.risk-safe { color: var(--accent); }
.risk-critical { color: #b3261e; font-weight: 600; }

table {
    width: 100%;
    border-collapse: collapse;
}

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

code {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.9em;
    background: color-mix(in srgb, var(--line) 45%, transparent);
    padding: 0.1em 0.35em;
    border-radius: 4px;
}

/* --- Live presence -------------------------------------------------------- */
.presence {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0;
}

.presence-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent);
    animation: presence-pulse 2.4s ease-out infinite;
}

@keyframes presence-pulse {
    70% { box-shadow: 0 0 0 8px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

@media (prefers-reduced-motion: reduce) {
    .presence-dot { animation: none; }
}

/* --- The post it started from --------------------------------------------- */
.origin-tweet {
    margin: 0;
    padding: 1.25rem 1.4rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--line) 18%, transparent);
}

.origin-tweet blockquote {
    margin: 0;
    font-size: 1.02rem;
}

.origin-tweet blockquote p:first-child { margin-top: 0; }
.origin-tweet blockquote p:last-child { margin-bottom: 0; }

.origin-tweet figcaption {
    margin-top: 0.9rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: baseline;
    font-size: 0.85rem;
    color: var(--muted);
}

.origin-author { font-weight: 600; color: var(--ink); }
.origin-metrics { font-variant-numeric: tabular-nums; }

/* --- Articles ------------------------------------------------------------- */
.article-list { list-style: none; padding: 0; }

.article-list > li {
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--line);
}

.article-list h2 { font-size: 1.2rem; margin: 0 0 0.35rem; }
.article-list h2 a { color: var(--ink); text-decoration: none; }
.article-list h2 a:hover { color: var(--accent); }

.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.category-nav a {
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.85rem;
    text-decoration: none;
}

.prose { max-width: 38rem; }
.prose h2 { margin-top: 2.2rem; font-size: 1.35rem; }
.prose h3 { margin-top: 1.6rem; font-size: 1.1rem; }
.prose pre {
    overflow-x: auto;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    background: color-mix(in srgb, var(--line) 45%, transparent);
}
.prose blockquote {
    margin: 1.4rem 0;
    padding-left: 1rem;
    border-left: 3px solid var(--accent);
    color: var(--muted);
}
.article-footer {
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}
