:root {
    color-scheme: light;
    --paper: #f7f5f0;
    --ink: #24231f;
    --muted: #68655e;
    --line: #d8d4ca;
    --accent: #674734;
    --measure: 68ch;
    --sans: var(--gh-font-body, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    --serif: var(--gh-font-heading, ui-serif, Georgia, Cambria, "Times New Roman", serif);
}

* { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-thickness: .07em; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid #805936; outline-offset: 4px; }
.wrap { width: min(100% - 3rem, 76rem); margin-inline: auto; }
.skip-link { position: absolute; z-index: 5; top: .5rem; left: .5rem; padding: .75rem 1rem; background: var(--ink); color: white; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.site-header { min-height: 5.75rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 1.5rem; }
.wordmark, .nav-list, .site-footer { font-size: .78rem; letter-spacing: .08em; }
.wordmark { font-weight: 750; text-decoration: none; }
.nav, .nav-list { list-style: none; display: flex; gap: 2rem; margin: 0; padding: 0; font-size: .78rem; letter-spacing: .08em; }
.nav a, .nav-list a { text-decoration: none; }
.intro { padding-block: clamp(4.5rem, 11vw, 9rem) clamp(4rem, 8vw, 6.5rem); max-width: 76rem; }
.eyebrow, .post-tag { color: var(--muted); font-size: .73rem; font-weight: 650; letter-spacing: .11em; text-transform: uppercase; }
.intro .eyebrow { margin: 0 0 1.4rem; }
.site-wordmark { font-family: var(--serif); font-size: clamp(3.25rem, 10vw, 8rem); font-weight: 400; letter-spacing: -.065em; line-height: .95; margin: 0 0 1.7rem; overflow-wrap: anywhere; }
.intro-copy { font-family: var(--serif); font-size: clamp(1.35rem, 2.6vw, 2rem); line-height: 1.4; max-width: 35ch; margin: 0; }
.writing-section { padding-bottom: 7rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--ink); padding-bottom: .8rem; }
.section-heading h2, .listing-header h1 { font: 400 clamp(2rem, 4vw, 3rem)/1.1 var(--serif); letter-spacing: -.035em; margin: 0; }
.text-link { font-size: .86rem; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-row { border-bottom: 1px solid var(--line); }
.post-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 1.5rem; padding: 1.8rem 0; }
.post-card-main { min-width: 0; }
.post-tag { margin: 0 0 .45rem; font-size: .67rem; }
.post-card h2, .post-card h3 { font: 400 clamp(1.35rem, 2.5vw, 1.9rem)/1.2 var(--serif); letter-spacing: -.02em; margin: 0; overflow-wrap: anywhere; }
.post-card h2 a, .post-card h3 a { text-decoration: none; }
.post-excerpt { max-width: 60ch; color: var(--muted); margin: .5rem 0 0; }
.post-card time, .article-meta { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.empty-state { padding: 2rem 0; color: var(--muted); }
.listing { padding-block: clamp(4rem, 9vw, 7rem); }
.listing-header { max-width: 55ch; margin-bottom: 3rem; }
.listing-header .eyebrow { margin: 0 0 .8rem; }
.listing-header > p:last-child { color: var(--muted); font-family: var(--serif); font-size: 1.2rem; }
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 0; color: var(--muted); font-size: .86rem; }
.article, .page { padding-block: clamp(3.5rem, 8vw, 6rem) 7rem; }
.article-header { max-width: var(--measure); margin: 0 auto 2.5rem; }
.article-header .post-tag { margin: 0 0 1rem; }
.article-header h1, .page-header h1, .error-page h1 { font: 400 clamp(2.5rem, 7vw, 5.6rem)/1.04 var(--serif); letter-spacing: -.05em; margin: 0; overflow-wrap: anywhere; hyphens: auto; }
.article-deck { font: 400 clamp(1.2rem, 2.6vw, 1.6rem)/1.45 var(--serif); color: #4d4a44; margin: 1.4rem 0; }
.article-meta { display: flex; gap: .55rem; align-items: center; margin-top: 1.5rem; }
.feature-image { margin: 0 auto 3rem; max-width: 76rem; }
.feature-image img { display: block; width: 100%; height: auto; max-height: 68vh; object-fit: cover; }
.feature-image figcaption, .article-content figcaption { font-size: .82rem; color: var(--muted); margin: .65rem auto 0; max-width: var(--measure); }
.article-content { font: 400 1.16rem/1.82 var(--serif); max-width: var(--measure); margin-inline: auto; overflow-wrap: anywhere; }
.article-content > * { margin-block: 0 1.55em; }
.article-content h2, .article-content h3, .article-content h4 { font-family: var(--sans); line-height: 1.25; letter-spacing: -.025em; margin-top: 2.4em; margin-bottom: .7em; }
.article-content h2 { font-size: 1.8rem; }
.article-content h3 { font-size: 1.4rem; }
.article-content h4 { font-size: 1.12rem; }
.article-content p { margin-block: 0 1.45em; }
.article-content a { color: #563923; }
.article-content ul, .article-content ol { padding-left: 1.35em; }
.article-content li { padding-left: .2em; margin: .35em 0; }
.article-content blockquote { border-left: 3px solid var(--accent); padding: .15em 0 .15em 1.2em; margin: 2em 0; font-size: 1.3em; line-height: 1.55; }
.article-content blockquote p:last-child { margin-bottom: 0; }
.article-content hr { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }
.article-content code { font: .84em/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; background: #ebe8e0; padding: .12em .3em; border-radius: 3px; }
.article-content pre { overflow: auto; padding: 1.25rem; background: #24231f; color: #f7f5f0; border-radius: 3px; font: .84rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
.article-content pre code { color: inherit; background: none; padding: 0; }
.article-content img, .article-content video { max-width: 100%; height: auto; }
.article-content figure { margin: 2rem 0; }
.kg-width-wide { width: min(88vw, 88rem); max-width: none; margin-inline: 50%; transform: translateX(-50%); }
.kg-width-full { width: 100vw; max-width: 100vw; margin-inline: calc(50% - 50vw); }
.kg-image-card img, .kg-gallery-image img { display: block; width: 100%; height: auto; }
.kg-gallery-container { display: flex; flex-direction: column; gap: .5rem; }
.kg-gallery-row { display: flex; gap: .5rem; justify-content: center; }
.kg-gallery-image { flex: 1; min-width: 0; }
.kg-image-card figcaption, .kg-gallery-card figcaption, .kg-embed-card figcaption { font-size: .82rem; color: var(--muted); text-align: center; margin: .7rem auto; max-width: var(--measure); }
.kg-bookmark-card, .kg-callout-card, .kg-file-card, .kg-audio-card, .kg-product-card, .kg-signup-card, .kg-toggle-card, .kg-button-card { font: 400 1rem/1.55 var(--sans); border: 1px solid var(--line); border-radius: 4px; padding: 1.2rem; background: #f0eee8; }
.kg-bookmark-container { display: grid; grid-template-columns: minmax(0, 1fr) minmax(6rem, 30%); gap: 1rem; text-decoration: none; }
.kg-bookmark-content { min-width: 0; }
.kg-bookmark-title, .kg-bookmark-description { display: block; }
.kg-bookmark-title { font-weight: 650; }
.kg-bookmark-description, .kg-bookmark-metadata { color: var(--muted); font-size: .9rem; }
.kg-bookmark-thumbnail img, .kg-bookmark-icon { max-width: 100%; height: auto; object-fit: cover; }
.kg-callout-card { display: flex; align-items: flex-start; gap: .8rem; }
.kg-callout-emoji { font-size: 1.3rem; }
.kg-embed-card iframe { width: 100%; max-width: 100%; border: 0; }
.kg-audio-card, .kg-file-card, .kg-product-card, .kg-signup-card { margin-block: 2rem; }
.kg-audio-card audio { width: 100%; }
.kg-file-card a, .kg-product-card a { overflow-wrap: anywhere; }
.kg-toggle-card summary { font-weight: 650; cursor: pointer; }
.kg-toggle-content { padding-top: 1rem; }
.kg-button-card { text-align: center; background: none; border: 0; padding: 0; }
.kg-btn { display: inline-block; background: var(--ink); color: var(--paper); padding: .75rem 1.2rem; text-decoration: none; border-radius: 3px; }
.kg-header-card { font-family: var(--serif); line-height: 1.2; overflow-wrap: anywhere; }
.kg-header-card h2, .kg-header-card h3 { font: inherit; }
.kg-header-card.kg-v2 { min-height: 16rem; padding: 2rem; }
.kg-product-card .kg-product-card-image img { max-width: 100%; height: auto; }
.kg-product-card h4 { margin: .5em 0; }
.kg-signup-card form { display: flex; gap: .5rem; flex-wrap: wrap; }
.kg-signup-card input { font: inherit; padding: .6rem; border: 1px solid var(--line); max-width: 100%; }
.article-content table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font: .92rem/1.5 var(--sans); }
.article-content th, .article-content td { border: 1px solid var(--line); padding: .65rem .8rem; text-align: left; }
.article-content th { background: #eeece6; }
.article-content iframe { max-width: 100%; }
.page-header { max-width: var(--measure); margin: 0 auto 2rem; }
.page-header .eyebrow { margin: 0 0 .8rem; }
.error-page { padding-block: clamp(5rem, 14vw, 10rem); max-width: 60rem; }
.error-page h1 { font-size: clamp(2.5rem, 7vw, 5rem); max-width: 14ch; }
.error-page > p:not(.eyebrow) { color: var(--muted); max-width: 50ch; }
.error-page .text-link { display: inline-block; margin-top: 1rem; }
.author-image { width: 6rem; height: 6rem; object-fit: cover; border-radius: 50%; margin-bottom: 1rem; }
.site-footer { border-top: 1px solid var(--line); min-height: 5rem; display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.site-footer p { margin: 0; }
.site-footer a { color: inherit; }

@media (max-width: 600px) {
    .wrap { width: min(100% - 2rem, 76rem); }
    .site-header { min-height: 4.75rem; }
    .nav, .nav-list { gap: 1.1rem; }
    .post-card { grid-template-columns: 1fr; gap: .55rem; padding: 1.35rem 0; }
    .post-card time { order: -1; }
    .article-content { font-size: 1.08rem; }
    .kg-width-wide { width: calc(100vw - 1rem); }
    .kg-bookmark-container { grid-template-columns: 1fr; }
    .kg-bookmark-thumbnail { grid-row: 1; }
    .site-footer { font-size: .7rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
