:root {
    --accent: #d95d39;
    --ink: #171716;
    --muted: #67655f;
    --line: #ddd9d0;
    --paper: #fcfbf8;
    --serif: "Noto Serif", Georgia, serif;
    --sans: "Noto Sans", Arial, sans-serif;
    --gh-font-heading: var(--serif);
    --gh-font-body: var(--sans);
    --article-body-size: 19px;
    --article-title-size: 74px;
    --home-title-size: 82px;
    --list-title-size: 32px;
    --article-line-height: 1.85;
}

* { box-sizing: border-box; }
html { font-size: 62.5%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--gh-font-body); font-size: 1.7rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }

.site-shell { width: min(112rem, calc(100% - 4.8rem)); margin: 0 auto; }
.site-header { min-height: 11rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.site-wordmark { font-family: var(--gh-font-heading); font-weight: 700; font-size: 2.2rem; letter-spacing: -.03em; }
.site-wordmark:hover { color: var(--accent); }
.site-nav .nav { display: flex; align-items: center; gap: 2.6rem; margin: 0; padding: 0; list-style: none; font-size: 1.4rem; }
.site-nav a:hover, .site-nav .nav-current a { color: var(--accent); }

.hero { max-width: 86rem; padding: 11rem 0 12rem; }
.hero-kicker, .eyebrow { margin: 0 0 2.2rem; color: var(--accent); font-size: 1.3rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; }
.hero h1 { max-width: 82rem; margin: 0; font-family: var(--serif); font-size: clamp(4.4rem, 7vw, var(--home-title-size)); font-weight: 600; line-height: 1.08; letter-spacing: -.055em; text-wrap: balance; }
.hero-description { max-width: 61rem; margin: 3rem 0 0; color: var(--muted); font-size: clamp(1.8rem, 2vw, 2.2rem); }
.signup-form { max-width: 58rem; margin-top: 4.4rem; }
.signup-row { display: flex; }
.signup-row input { min-width: 0; flex: 1; height: 5.8rem; padding: 0 1.8rem; border: 1px solid var(--ink); border-right: 0; border-radius: 0; background: transparent; color: var(--ink); outline: 0; }
.signup-row input:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.signup-row button { min-width: 15rem; height: 5.8rem; padding: 0 2rem; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; font-weight: 600; }
.signup-row button:hover { filter: brightness(.91); }
.button-loading, .form-message { display: none; }
.signup-form.loading .button-default { display: none; }
.signup-form.loading .button-loading, .signup-form.success .form-success, .signup-form.error .form-error { display: block; }
.form-message { margin: 1rem 0 0; color: var(--muted); font-size: 1.4rem; }
.form-error { color: #a22c20; }
.signup-note { margin: 1.2rem 0 0; color: var(--muted); font-size: 1.3rem; }
.member-welcome { margin-top: 3.8rem; color: var(--accent); font-weight: 600; }

.post-list-section { padding: 0 0 8rem; }
.post-list-section.compact { max-width: 86rem; margin: 0 auto; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 1.8rem; border-bottom: 2px solid var(--ink); }
.section-heading h2 { margin: 0; font-family: var(--serif); font-size: 2.8rem; letter-spacing: -.03em; }
.section-heading a, .show-all-posts { color: var(--muted); font-size: 1.4rem; }
.section-heading a:hover, .show-all-posts:hover { color: var(--accent); }
.show-all-posts { display: none; padding: 0; border: 0; background: none; cursor: pointer; }
.js .post-list:not(.is-expanded) .post-row:nth-child(n+7) { display: none; }
.js .show-all-posts.is-visible { display: block; }
.post-row { border-bottom: 1px solid var(--line); }
.post-row-link { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; padding: 3.4rem 0; }
.post-row h3 { margin: 0; font-family: var(--serif); font-size: clamp(2.2rem, 3vw, var(--list-title-size)); line-height: 1.25; letter-spacing: -.035em; transition: color .15s ease; }
.post-row p { max-width: 68rem; margin: 1rem 0 0; color: var(--muted); font-size: 1.6rem; line-height: 1.55; }
.post-row time { padding-top: .7rem; color: var(--muted); font-size: 1.3rem; white-space: nowrap; }
.post-row-link:hover h3 { color: var(--accent); }
.empty-state { padding: 4rem 0; color: var(--muted); }

.listing-header { max-width: 86rem; margin: 0 auto; padding: 9rem 0 5rem; border-bottom: 2px solid var(--ink); }
.listing-header h1 { margin: 0; font-family: var(--serif); font-size: clamp(4.4rem, 7vw, 7rem); line-height: 1.1; letter-spacing: -.05em; }
.listing-header > p:last-child:not(.eyebrow) { max-width: 60rem; margin: 2rem 0 0; color: var(--muted); }

.article { padding: 9rem 0 8rem; }
.article-header { max-width: 86rem; margin: 0 auto; }
.article-header h1 { max-width: 82rem; margin: 0; font-family: var(--serif); font-size: clamp(4.2rem, 7vw, var(--article-title-size)); line-height: 1.1; letter-spacing: -.055em; text-wrap: balance; }
.article-deck { max-width: 67rem; margin: 2.6rem 0 0; color: var(--muted); font-family: var(--serif); font-size: 2.1rem; line-height: 1.55; }
.article-image { max-width: 112rem; margin: 6rem auto; }
.article-image img { width: 100%; }
.article-image figcaption { margin-top: 1rem; color: var(--muted); font-size: 1.2rem; text-align: center; }
.gh-content { max-width: 72rem; margin: 5.5rem auto 0; font-family: var(--serif); font-size: var(--article-body-size); line-height: var(--article-line-height); }
.gh-content > * { margin-top: 0; margin-bottom: 2.8rem; }
.gh-content h2, .gh-content h3, .gh-content h4 { margin-top: 5rem; font-family: var(--serif); line-height: 1.3; letter-spacing: -.025em; }
.gh-content h2 { font-size: 3rem; }
.gh-content h3 { font-size: 2.4rem; }
.gh-content a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.gh-content blockquote { margin-left: 0; padding: .4rem 0 .4rem 2.6rem; border-left: 3px solid var(--accent); color: var(--muted); font-size: 2.2rem; font-style: italic; }
.gh-content hr { margin: 5rem 0; border: 0; border-top: 1px solid var(--line); }
.gh-content :is(.kg-image-card, .kg-gallery-card, .kg-width-wide) { width: min(96rem, calc(100vw - 4.8rem)); margin-left: 50%; transform: translateX(-50%); }
.gh-content .kg-width-full { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.gh-content figcaption { margin-top: 1rem; color: var(--muted); font-family: var(--sans); font-size: 1.2rem; text-align: center; }
.article-footer { max-width: 72rem; margin: 6rem auto 0; padding-top: 2.4rem; border-top: 1px solid var(--line); font-size: 1.4rem; }
.article-footer a:hover { color: var(--accent); }
.article-comments { max-width: 72rem; margin: 7rem auto 0; padding-top: 4rem; border-top: 2px solid var(--ink); }
.article-comments > h2 { margin: 0 0 3rem; font-family: var(--gh-font-heading); font-size: 3rem; font-weight: 600; line-height: 1.3; letter-spacing: -.03em; }
.page-article .article-header { padding-bottom: 2rem; border-bottom: 1px solid var(--line); }

.archive-list { border-top: 2px solid var(--ink); }
.archive-row { padding: 2rem 0; border-bottom: 1px solid var(--line); }
.archive-row a { font-family: var(--serif); font-size: 2rem; line-height: 1.4; }
.archive-row a:hover { color: var(--accent); }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; gap: 2rem; padding-top: 3rem; color: var(--muted); font-size: 1.3rem; }
.pagination a:last-child { text-align: right; }
.pagination a:hover { color: var(--accent); }

.error-page { max-width: 72rem; margin: 0 auto; padding: 12rem 0; }
.error-page h1 { margin: 0; font-family: var(--serif); font-size: 5rem; line-height: 1.15; }
.error-page > p:not(.eyebrow) { color: var(--muted); }
.text-link { color: var(--accent); }
.site-footer { display: flex; justify-content: space-between; gap: 3rem; padding: 4rem 0 5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 1.3rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 2.4rem; }
.site-footer a:hover { color: var(--accent); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 700px) {
    .site-shell { width: min(100% - 3.2rem, 112rem); }
    .site-header { min-height: 8.4rem; }
    .site-nav { display: none; }
    .hero { padding: 7.5rem 0 8rem; }
    .hero h1 { font-size: clamp(4rem, 13vw, var(--home-title-size)); }
    .signup-row { display: block; }
    .signup-row input, .signup-row button { width: 100%; }
    .signup-row input { border-right: 1px solid var(--ink); border-bottom: 0; }
    .post-row-link { display: block; padding: 2.8rem 0; }
    .post-row time { display: block; margin-top: 1.5rem; }
    .listing-header, .article { padding-top: 6.5rem; }
    .article-image { width: calc(100% + 3.2rem); margin: 4rem -1.6rem; }
    .gh-content { font-size: min(var(--article-body-size), 22px); }
    .site-footer { display: block; }
    .site-footer small { display: block; margin-top: 2.2rem; }
}

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