/* Essay pages — Karpathy-style: white bg, sans-serif body, narrow reading column */

.essay-nav {
    margin-top: 18px;
    margin-bottom: 18px;
    font-size: 14px;
    color: #666;
}
.essay-nav a {
    color: #333;
    text-decoration: none;
}
.essay-nav a:hover {
    color: #000;
    text-decoration: underline;
}
.essay-nav .sep {
    color: #bbb;
    margin: 0 8px;
}

.essay-body {
    max-width: 720px;
    padding-top: 10px;
    padding-bottom: 40px;
}

.essay-body h1 {
    font-size: 36px;
    line-height: 1.2;
    font-weight: 500;
    margin: 24px 0 8px 0;
    color: #222;
}

.essay-meta {
    color: #6e6e6e;
    font-size: 14px;
    margin-bottom: 18px;
}

.essay-premise {
    font-style: italic;
    color: #555;
    font-size: 17px;
    line-height: 1.5;
    margin: 8px 0 24px 0;
    border-left: 3px solid #cfcfcf;
    padding-left: 14px;
}

.essay-body hr {
    margin: 24px 0;
}

/* prose */
.essay-body h2 {
    font-style: normal;
    color: #222;
    font-size: 22px;
    font-weight: 500;
    margin: 40px 0 12px 0;
    padding: 0;
    max-width: none;
}
.essay-body h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 28px 0 10px 0;
}
.essay-body p {
    font-size: 16px;
    line-height: 1.65;
    color: #333;
    margin: 0 0 1.2em 0;
}
/* note on framing — the very first paragraph of the article */
.essay-body > div > p:first-child,
.essay-body > p:first-of-type {
    color: #555;
    font-style: italic;
}
/* but never italicize the lead-of-section paragraphs */
.essay-body section > p:first-of-type {
    color: #333;
    font-style: normal;
}
.essay-body ul,
.essay-body ol {
    margin: 0 0 1.4em 0;
    padding-left: 1.4em;
    color: #333;
}
.essay-body ul li,
.essay-body ol li {
    margin-bottom: 0.5em;
    line-height: 1.6;
}
.essay-body strong {
    color: #111;
    font-weight: 600;
}
.essay-body em {
    color: #444;
}
.essay-body blockquote {
    margin: 1.5em 0;
    padding: 0.4em 16px;
    border-left: 3px solid #cfcfcf;
    color: #555;
    font-style: italic;
}
.essay-body a {
    color: #246;
    text-decoration: underline;
    text-decoration-color: #ccc;
}
.essay-body a:hover {
    color: #000;
    text-decoration-color: #000;
}
.essay-body code {
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    background: #f5f5f5;
    padding: 1px 5px;
    font-size: 14px;
    border-radius: 2px;
}
.essay-body pre {
    background: #f7f7f7;
    border: 1px solid #eee;
    padding: 12px 16px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.5;
}
.essay-body figure {
    margin: 2em 0;
    text-align: center;
}
.essay-body img,
.essay-body svg {
    max-width: 100%;
    height: auto;
}
.essay-body figcaption {
    color: #6e6e6e;
    font-size: 13px;
    margin-top: 6px;
}

/* footer */
.essay-footer {
    max-width: 720px;
    margin-top: 30px;
    margin-bottom: 40px;
}
.essay-footer .copyright {
    color: #6e6e6e;
    font-size: 13px;
    text-align: center;
    margin-top: 14px;
}
.essay-footer .attribution {
    color: #6e6e6e;
    font-size: 12px;
    text-align: center;
    margin-top: 6px;
}
.essay-footer .attribution a { color: #6e6e6e; }

/* essay index list */
.essay-index-title {
    font-size: 36px;
    font-weight: 500;
    margin: 30px 0 8px 0;
    color: #222;
}
.essay-index-intro {
    color: #555;
    font-size: 16px;
    max-width: 640px;
    line-height: 1.5;
    margin: 0 0 24px 0;
}
.essay-list {
    margin-top: 20px;
}
.essay-card {
    padding: 18px 0;
    border-bottom: 1px solid #eee;
}
.essay-card-title {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 4px;
}
.essay-card-title a {
    color: #222;
    text-decoration: none;
}
.essay-card-title a:hover {
    color: #000;
    text-decoration: underline;
}
.essay-card-meta {
    color: #6e6e6e;
    font-size: 13px;
    margin-bottom: 8px;
}
.essay-card-premise {
    color: #555;
    font-size: 15px;
    line-height: 1.55;
    max-width: 720px;
}

@media (max-width: 991px) {
    .essay-body,
    .essay-footer {
        max-width: 100%;
    }
}

/* aside / systems-insight blocks */
.essay-body aside {
    margin: 2em 0;
    padding: 16px 20px;
    background: #fafafa;
    border-left: 3px solid #cfcfcf;
    border-radius: 0 3px 3px 0;
}
.essay-body aside > span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6e6e6e;
    margin-bottom: 8px;
}
.essay-body aside p {
    color: #444;
    margin-bottom: 0.8em;
}
.essay-body aside ul {
    margin-top: 0.6em;
    padding-left: 1.2em;
}
.essay-body aside ul li {
    margin-bottom: 0.55em;
    color: #444;
}
/* small visual gap between bolded lead-in and the trailing description in list items */
.essay-body li strong + * {
    margin-left: 4px;
}
.essay-body li > strong {
    margin-right: 6px;
}

/* prev / next nav */
.essay-prevnext {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 24px 0 16px 0;
}
.essay-prevnext a {
    display: block;
    padding: 14px 16px;
    border: 1px solid #eee;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    background: #fafafa;
    transition: background 0.15s;
}
.essay-prevnext a:hover {
    background: #f0f0f0;
    color: #000;
}
.essay-prevnext a .dir {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6e6e6e;
    margin-bottom: 4px;
}
.essay-prevnext a .t {
    display: block;
    font-size: 15px;
    color: #222;
    line-height: 1.3;
}
.essay-prevnext .essay-next {
    text-align: right;
}
@media (max-width: 600px) {
    .essay-prevnext {
        grid-template-columns: 1fr;
    }
    .essay-prevnext .essay-next {
        text-align: left;
    }
}

/* ===== Framework page supplements ===== */
.essay-body dl.terms { margin: 18px 0 8px; }
.essay-body dl.terms dt {
    font-weight: 600;
    color: #222;
    margin-top: 14px;
    font-size: 16.5px;
}
.essay-body dl.terms dd {
    margin: 4px 0 8px 0;
    color: #444;
    font-size: 15.5px;
    line-height: 1.6;
}
.essay-body ul.notes {
    list-style: none;
    padding-left: 0;
    margin: 14px 0 6px;
}
.essay-body ul.notes li {
    padding: 6px 0;
    margin-bottom: 0;
    border-bottom: 1px solid #efefef;
    font-size: 15.5px;
    color: #444;
}
.essay-body ul.notes li:last-child { border-bottom: 0; }
.essay-body ul.notes li a { color: #222; }
.blueprint {
    margin: 18px 0;
    padding: 24px 18px 18px;
    border: 1px solid #e5e5e5;
    background: #fcfcfc;
}
.blueprint svg {
    display: block;
    margin: 0 auto;
    width: 100%;
    max-width: 660px;
    height: auto;
}
.blueprint figcaption {
    margin-top: 14px;
    text-align: center;
    color: #6e6e6e;
    font-size: 13px;
    letter-spacing: 0.04em;
}
