/* Recursive Reality: dark and darker gray with cyan, clean and simple */
:root {
    color-scheme: dark;
    --bg: #121314;
    --bg-2: #0c0d0e;
    --surface: #1b1d1f;
    --surface-2: #232628;
    --surface-3: #2c3033;
    --line: rgba(200, 210, 215, .12);
    --line-strong: rgba(200, 210, 215, .22);
    --text: #e9ecee;
    --text-2: #c3c8cc;
    --muted: #8b9297;
    --accent: #22d3ee;
    --accent-2: #67e8f9;
    --accent-ink: #0c0d0e;
    --danger: #ff8593;
    --ok: #74dcb0;
    --radius: 10px;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    background: var(--bg); color: var(--text);
    font: 400 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.wrap { width: 100%; max-width: 720px; margin-inline: auto; padding-inline: 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg-2); }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { color: var(--text); font-weight: 600; white-space: nowrap; }
.brand em { font-style: normal; color: var(--accent); }
.brand:hover { color: var(--text); }
    width: 100%; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px;
    background: transparent; color: var(--text); font: inherit; font-size: 14px;
}

/* home */
.page { padding-block: 56px 72px; }
.label { margin: 0 0 10px; color: var(--muted); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.pinned { padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.pinned h1, .article-head h1 { margin: 0 0 14px; font: 500 clamp(32px, 6vw, 46px)/1.12 var(--serif); letter-spacing: -.015em; }
.pinned h1 a { color: var(--text); }
.pinned h1 a:hover { color: var(--accent-2); }
.dek { margin: 0 0 14px; color: var(--text-2); font-size: 19px; line-height: 1.6; }
.pinned .button { margin-top: 6px; }

/* reader feedback */
.feedback { margin-top: 56px; }
.quote { margin: 16px 0 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.quote blockquote { margin: 0 0 20px; color: var(--text); font: italic 400 21px/1.6 var(--serif); }
.quote blockquote::before { content: "“"; }
.quote blockquote::after { content: "”"; }
.quote figcaption { display: flex; align-items: flex-start; gap: 14px; }
.quote figcaption > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.quote-avatar img { display: block; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-strong); }
.quote-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; }
.quote-links a { display: inline-flex; align-items: center; gap: 7px; }
.quote-links a i { font-size: 15px; width: 1.1em; text-align: center; }
.section { margin-top: 40px; }
.section-title { margin: 32px 0 8px; color: var(--muted); font: 600 13px/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.section-title a { text-transform: none; letter-spacing: 0; }
.entries { list-style: none; margin: 0; padding: 0; }
.entry { padding: 24px 0; border-bottom: 1px solid var(--line); }
.entry:first-child { border-top: 1px solid var(--line); }
.entry-title { margin: 0; font: 500 23px/1.3 var(--serif); }
.entry-title a { color: var(--text); }
.entry-title a:hover { color: var(--accent-2); }
.entry-meta { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.entry-text { margin: 10px 0 16px; color: var(--text-2); font-size: 16px; line-height: 1.65; }

/* article */
.back { margin: 0 0 32px; font-size: 14px; }
.back a { color: var(--muted); }
.back a:hover { color: var(--text); }
.article-head { margin-bottom: 40px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.article-head .muted { margin: 0; }
.prose { color: var(--text-2); font-size: 18px; line-height: 1.8; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.2em; }
.prose p.lead { color: var(--text); }
.prose strong { color: var(--text); font-weight: 600; }
.prose h2 { margin: 2.2em 0 .6em; color: var(--text); font: 500 28px/1.25 var(--serif); }
.prose h3 { margin: 1.8em 0 .5em; color: var(--text); font: 600 19px/1.4 var(--sans); }
.prose h4 { margin: 1.5em 0 .3em; color: var(--text); font: 600 16px/1.4 var(--sans); }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(34, 211, 238, .4); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin: .3em 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose code { font-size: .9em; color: var(--text); }
.prose pre { padding: 14px 0; overflow: auto; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .92em; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.prose blockquote { margin: 1.8em 0; padding-left: 20px; border-left: 2px solid var(--accent); color: var(--text); font: italic 400 21px/1.55 var(--serif); }
.prose blockquote p { margin: 0; }
.prose-chapters { counter-reset: ch; }
.prose-chapters h2 { counter-increment: ch; }
.prose-chapters h2::before { content: counter(ch, decimal-leading-zero) "  "; color: var(--muted); white-space: pre; }
.pager { display: flex; justify-content: space-between; gap: 24px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; }
.pager a:last-child { text-align: right; }

/* footer */
html { scroll-behavior: smooth; }
.site-footer {
    position: relative; margin-top: 24px; color: var(--muted); font-size: 14px;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.site-footer::before {
    content: ""; position: absolute; inset: 0 0 auto; height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-strong) 20%, var(--accent) 50%, var(--line-strong) 80%, transparent);
    opacity: .7;
}
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px 48px; padding-block: 44px 32px; }
.footer-about { flex: 1 1 320px; max-width: 420px; }
.footer-about .brand { font-size: 18px; }
.footer-about p { margin: 10px 0 0; color: var(--text-2); font: italic 400 16px/1.6 var(--serif); }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-heading { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.footer-links a { display: inline-flex; align-items: center; gap: 10px; width: fit-content; color: var(--text-2); transition: color .15s; }
.footer-links a i {
    display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid var(--line-strong); color: var(--accent); font-size: 15px;
    transition: background .15s, color .15s, border-color .15s;
}
.footer-links a:hover { color: var(--accent-2); }
.footer-links a:hover i { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 18px 28px; border-top: 1px solid var(--line); font-size: 13px; }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--text); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media (max-width: 560px) {
    .header-inner { flex-wrap: wrap; gap: 10px 16px; padding-block: 12px; }
    .page { padding-block: 36px 56px; }
    .pager { flex-direction: column; }
    .pager a:last-child { text-align: left; }
}

.button {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 8px; border: 0;
    background: var(--accent); color: var(--accent-ink); font: 600 14px/1 var(--sans); cursor: pointer;
}
.button:hover { color: var(--accent-ink); background: var(--accent-2); }
.button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.chip { display: inline-block; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
