/* leetsai.org blog — operator's ledger design system (matches the homepage) */

:root {
    --paper: #f6f4ee;
    --ink: #1d2420;
    --muted: #5c6660;
    --faint: #a8b0a9;
    --line: #dcdcd2;
    --tea: #33684d;
    --tea-soft: rgba(51, 104, 77, 0.13);
    --seal: #a63b2a;
    --card: #fcfbf7;
    --silver-1: #eef0f3;
    --silver-2: #dde2e8;
    --silver-edge: #a3acb6;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper: #14181a;
        --ink: #e8e6dd;
        --muted: #9aa69e;
        --faint: #5c6660;
        --line: #2a322d;
        --tea: #6fae8b;
        --tea-soft: rgba(111, 174, 139, 0.13);
        --seal: #c9573f;
        --card: #191f1c;
        --silver-1: #262b30;
        --silver-2: #353c44;
        --silver-edge: #8c96a1;
    }
}
:root[data-theme="dark"] {
    --paper: #14181a;
    --ink: #e8e6dd;
    --muted: #9aa69e;
    --faint: #5c6660;
    --line: #2a322d;
    --tea: #6fae8b;
    --tea-soft: rgba(111, 174, 139, 0.13);
    --seal: #c9573f;
    --card: #191f1c;
    --silver-1: #262b30;
    --silver-2: #353c44;
    --silver-edge: #8c96a1;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.65;
}

.page {
    max-width: 840px;
    margin: 0 auto;
    padding: 0 28px 96px;
    border-left: 1px solid var(--line);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.page > main { flex: 1; }
@media (max-width: 900px) { .page { border-left: none; } }

/* nav — identical voice to the homepage */
html { scroll-padding-top: 52px; }
.topnav {
    position: sticky; top: 0; z-index: 10;
    background: var(--paper);
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: baseline;
    padding: 12px 0 9px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: .8rem;
}
.topnav a { color: var(--muted); text-decoration: none; }
.topnav a:hover, .topnav a:focus-visible { color: var(--tea); outline: none; }
.topnav a[aria-current="page"] { color: var(--tea); }
.topnav .spacer { flex: 1; }

/* section scaffolding */
.path {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: .78rem; color: var(--tea);
    letter-spacing: .04em;
    margin: 64px 0 10px;
}
.path::before { content: "~/"; color: var(--faint); }

h1 {
    font-family: "Iowan Old Style", "Palatino Nova", Palatino, "Book Antiqua", Georgia, serif;
    font-size: clamp(1.9rem, 5vw, 2.6rem);
    line-height: 1.12;
    letter-spacing: -.015em;
    font-weight: 600;
    margin: 0 0 14px;
    text-wrap: balance;
}
.blog-intro { color: var(--muted); max-width: 58ch; margin: 0 0 30px; }

/* post list — ledger rows */
.post-list { border-top: 1px solid var(--line); margin-top: 8px; }
.post-item {
    display: grid; grid-template-columns: 128px 1fr;
    column-gap: 18px; row-gap: 4px;
    padding: 20px 0; border-bottom: 1px solid var(--line);
    text-decoration: none; color: var(--ink);
}
.post-item-date { grid-column: 1; grid-row: 1; }
.post-item-title { grid-column: 2; grid-row: 1; }
.post-item-desc { grid-column: 2; grid-row: 2; }
.post-item-date {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: .78rem; color: var(--faint); padding-top: 5px;
    font-variant-numeric: tabular-nums;
}
.post-item-title {
    font-family: "Iowan Old Style", "Palatino Nova", Palatino, "Book Antiqua", Georgia, serif;
    font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em;
    margin: 0 0 4px;
    border-bottom: 1px solid transparent;
    display: inline-block;
}
.post-item:hover .post-item-title { color: var(--tea); }
.post-item-desc { margin: 0; font-size: .92rem; color: var(--muted); max-width: 60ch; }
@media (max-width: 560px) {
    .post-item { grid-template-columns: 1fr; }
    .post-item-date, .post-item-title, .post-item-desc { grid-column: 1; grid-row: auto; }
}

.blog-feed-link { margin-top: 28px; font-size: .85rem; }
.blog-feed-link a { color: var(--muted); text-decoration: none; }
.blog-feed-link a:hover { color: var(--tea); }

/* pagefind search — restyled toward the system */
.blog-search { margin: 0 0 18px; --pagefind-ui-scale: 0.8; }
.blog-search .pagefind-ui__search-input {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: .85rem;
    font-weight: 400;
}
.blog-search .pagefind-ui__search-input::placeholder { color: var(--faint); }
.blog-search .pagefind-ui__result-title, .blog-search .pagefind-ui__result-excerpt { color: var(--ink); }
.blog-search .pagefind-ui__result-link { color: var(--tea); }

/* single post */
.post-back {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: .78rem; color: var(--muted); text-decoration: none;
    display: inline-block; margin: 64px 0 22px;
}
.post-back:hover { color: var(--tea); }
.post-meta {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: .78rem; color: var(--faint);
    margin: 0 0 34px;
    font-variant-numeric: tabular-nums;
}

/* prose */
.prose { max-width: 66ch; }
.prose p { margin: 0 0 1.2em; }
.prose h2, .prose h3 {
    font-family: "Iowan Old Style", "Palatino Nova", Palatino, "Book Antiqua", Georgia, serif;
    font-weight: 600; letter-spacing: -.01em;
    margin: 1.8em 0 .5em; text-wrap: balance;
}
.prose h2 { font-size: 1.45rem; }
.prose h3 { font-size: 1.15rem; }
.prose a { color: var(--tea); text-decoration: none; border-bottom: 1px solid var(--tea-soft); }
.prose a:hover { border-bottom-color: var(--tea); }
.prose blockquote {
    margin: 1.4em 0; padding: .2em 0 .2em 1.2em;
    border-left: 2px solid var(--tea);
    color: var(--muted);
}
.prose code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: .85em;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: .1em .35em;
}
.prose pre {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 16px 18px;
    overflow-x: auto;
    font-size: .85rem;
    line-height: 1.55;
}
.prose pre code { background: none; border: none; padding: 0; }
.prose img { max-width: 100%; border-radius: 6px; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2.2em 0; }
/* a line set large where it falls in the argument (globe post, 2026-09-26) */
.prose .lift {
    font-family: "Iowan Old Style", "Palatino Nova", Palatino, "Book Antiqua", Georgia, serif;
    font-size: 1.55rem; line-height: 1.3; color: var(--ink);
    margin: 1.6em 0 1.2em; text-wrap: pretty;
}
.prose .lift code { font-size: .68em; vertical-align: .12em; }
.prose .pause { text-align: center; color: var(--muted); letter-spacing: .5em; margin: 2.2em 0 1.6em; }
/* an aside in Pensieve silver */
.prose .note {
    margin: 1.6em 0; padding: .9em 1.1em;
    border-left: 3px solid var(--silver-edge); border-radius: 0 8px 8px 0;
    background: linear-gradient(135deg, var(--silver-1) 0%, var(--silver-2) 55%, var(--silver-1) 100%);
    font-family: "Iowan Old Style", "Palatino Nova", Palatino, "Book Antiqua", Georgia, serif;
    font-size: 1.12rem; line-height: 1.5;
}
.prose table {
    border-collapse: collapse;
    width: 100%;
    font-size: .9rem;
    margin: 1.4em 0;
    display: block;
    overflow-x: auto;
}
.prose th, .prose td {
    text-align: left;
    padding: 8px 14px 8px 0;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.prose th {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    font-weight: 600;
}
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }

/* footer — identical voice to the homepage */
.sitefoot {
    margin-top: 80px; padding-top: 22px; border-top: 1px solid var(--line);
    display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: baseline;
    font-size: .82rem; color: var(--muted);
}
.sitefoot a { color: var(--muted); text-decoration: none; }
.sitefoot a:hover { color: var(--tea); }
.sitefoot .fine { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .72rem; color: var(--faint); }
.sitefoot .spacer { flex: 1; }
