/* ai·toolstack light theme 2.4.0
   Light, simple, organised. One reading column for posts.
   ------------------------------------------------------------------ */

/* 1. Tokens */
:root {
    --ink: #1A1D24;
    --ink-2: #22252C;
    --muted: #4A5160;
    --muted-2: #5B6270;
    --muted-3: #6A7180;
    --dim: #8A909C;
    --faint: #9AA0AC;
    --rule: #ECEAE5;
    --rule-soft: #F0EEEA;
    --line: #D9D6CF;
    --chip: #F3F2EF;
    --paper: #F6F5F1;
    --wash: #FAFAF8;
    --card-bg: #FCFBF9;
    --bg: #FFFFFF;
    --accent: #8F5A0E;
    --amber: #E0A946;
    --navy: #1F2940;

    --doc: #E8EFFA; --doc-ink: #2F5FA8; --doc-dot: #7FA2DA;
    --build: #E7F2EA; --build-ink: #2D6B45; --build-dot: #7DB592;
    --prod: #FAEEDD; --prod-ink: #8F5A0E; --prod-dot: #E0A946;
    --found: #EFEBF8; --found-ink: #5B4B9A; --found-dot: #A898D6;

    --font-sans: var(--gh-font-body, "Geist"), ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --font-heading: var(--gh-font-heading, var(--font-sans));
    --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;

    --wrap: 1160px;
    --gutter: 32px;
    --ghost-accent-color: var(--accent);
}

/* 2. Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
button { font: inherit; }
.mono { font-family: var(--font-mono); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 50; padding: 8px 14px; background: var(--ink); color: #fff; border-radius: 8px; }
.skip-link:focus { left: 16px; color: #fff; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* 3. Buttons and small parts */
.btn, .btn-o {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 36px; padding: 0 16px; border-radius: 999px;
    font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer;
}
.btn { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.btn:hover { background: #000; color: #fff; }
.btn-o { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-o:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { min-height: 34px; padding: 0 14px; }
.label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: #7A8190; margin: 0 0 14px; }
.label-gap { margin-top: 32px; }
.text-link { display: inline-block; margin-top: 16px; font-size: 14px; color: var(--accent); }
.tag { display: inline-block; font-size: 12px; line-height: 1.5; padding: 2px 9px; border-radius: 999px; background: var(--chip); color: var(--muted); }
.tag-doc { background: var(--doc); color: var(--doc-ink); }
.tag-build { background: var(--build); color: var(--build-ink); }
.tag-prod { background: var(--prod); color: var(--prod-ink); }
.tag-found { background: var(--found); color: var(--found-ink); }
.tag:hover { filter: brightness(.97); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 10px; vertical-align: 1px; background: var(--faint); }
.dot-doc { background: var(--doc-dot); } .dot-build { background: var(--build-dot); } .dot-prod { background: var(--prod-dot); } .dot-found { background: var(--found-dot); }
.mg { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #F6F5F1; display: grid; place-items: center; font-weight: 600; font-size: 14px; flex: none; }
.mg-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.mg-lg { width: 56px; height: 56px; font-size: 17px; }
.mg-xl { width: 88px; height: 88px; font-size: 24px; }

/* 4. Topic covers (no images needed) */
.cv { aspect-ratio: 16 / 9; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: var(--chip); }
.cv b { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 17px; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; color: var(--ink); max-width: 92%; }
.cv span { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
.cv i { display: block; width: 18px; height: 18px; border-radius: 5px; background: var(--navy); position: relative; }
.cv i::after { content: ""; position: absolute; right: 3px; bottom: 3px; width: 5px; height: 5px; border-radius: 1.5px; background: var(--amber); }
.cv-sm { padding: 9px; border-radius: 7px; }
.cv-sm b { font-size: 11px; -webkit-line-clamp: 2; }
.cv-sm span { font-size: 8.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cv-sm i { width: 12px; height: 12px; border-radius: 3px; }
.cv-sm i::after { display: none; }
.cv-doc { background: var(--doc); } .cv-doc span { color: var(--doc-ink); }
.cv-build { background: var(--build); } .cv-build span { color: var(--build-ink); }
.cv-prod { background: var(--prod); } .cv-prod span { color: var(--prod-ink); }
.cv-found { background: var(--found); } .cv-found span { color: var(--found-ink); }

/* 5. Header and topic bar */
.top { border-bottom: 1px solid var(--rule); background: #fff; position: relative; z-index: 10; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 60px; }
.logo { font-weight: 650; font-size: 17px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.logo i { width: 22px; height: 22px; border-radius: 6px; background: var(--navy); display: inline-block; position: relative; }
.logo i::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 6px; height: 6px; border-radius: 2px; background: var(--amber); }
.nav-links { display: flex; gap: 22px; align-items: center; font-size: 14.5px; margin-left: auto; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.search-pill { display: flex; align-items: center; gap: 8px; height: 36px; width: 200px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--chip); color: var(--dim); font-size: 13.5px; cursor: pointer; text-align: left; }
.search-pill:hover { color: var(--muted); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: none; width: 36px; height: 36px; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--chip); }
.burger .i-close { display: none; }
.is-open .burger .i-close { display: block; }
.is-open .burger .i-menu { display: none; }
.tabs { display: flex; gap: 26px; height: 46px; align-items: stretch; font-size: 14.5px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: flex; align-items: center; color: var(--muted-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs .n { font-size: 12px; color: var(--faint); margin-left: 6px; }
.home-template .tab-all,
.tag-document-ai .tab-doc,
.tag-building-ai-systems .tab-build,
.tag-running-in-production .tab-prod,
.tag-foundations .tab-found { color: var(--ink); border-color: var(--ink); font-weight: 500; }

/* 6. Home */
.intro { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 28px 0 8px; }
.intro p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); max-width: 720px; }
.intro p b { color: var(--ink); font-weight: 600; }
.intro span { font-size: 12.5px; color: var(--dim); white-space: nowrap; }
.intro span a { color: var(--dim); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; padding: 20px 0 56px; }
.pick { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: center; padding: 0 0 28px; border-bottom: 1px solid var(--rule); }
.pick h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.25; letter-spacing: -.015em; font-weight: 600; }
.pick p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.6; color: var(--muted); }
.series { padding: 18px 20px; border: 1px solid var(--rule); border-radius: 12px; margin: 0 0 4px; background: var(--card-bg); }
.series-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.series-h b { font-size: 15px; }
.series-h span { font-size: 12.5px; color: #7A8190; white-space: nowrap; }
.series ol { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.series li { counter-increment: s; display: flex; gap: 12px; padding: 7px 0; font-size: 15px; border-top: 1px solid var(--rule-soft); }
.series li::before { content: counter(s, decimal-leading-zero); font-family: var(--font-mono); font-size: 12px; color: var(--faint); padding-top: 2px; }
.series-ev { margin: 10px 0 0; font-size: 12px; color: var(--muted-2); }
.series-ev a { color: var(--build-ink); }
.series-more { display: inline-block; margin-top: 10px; font-size: 13.5px; color: var(--accent); }
.rows { display: block; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 24px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--rule-soft); }
.row:last-child { border-bottom: 0; }
.row h3 { margin: 0 0 6px; font-size: 18px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.row p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.55; color: var(--muted-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.row .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; color: var(--dim); }
.side > div { margin-bottom: 32px; }
.topic { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--rule-soft); font-size: 14.5px; }
.topic .n { color: var(--faint); font-size: 13px; }
.sys { display: block; padding: 10px 0; border-bottom: 1px solid var(--rule-soft); }
.side .sys:last-child { border-bottom: 0; }
.sys b { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; }
.sys b em { font-style: normal; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; padding: 2px 7px; border-radius: 999px; background: var(--chip); color: var(--muted-2); white-space: nowrap; }
.sys b em.live { background: var(--build); color: var(--build-ink); }
.sys p { margin: 3px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted-3); }
.box { padding: 20px; border-radius: 12px; background: var(--paper); }
.box h4 { margin: 0 0 6px; font-size: 16px; }
.box p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.55; color: var(--muted-2); }
.box .signup { flex-direction: column; }
.box .signup input { width: 100%; }
.box .signup .btn { width: 100%; }
.res { display: block; padding: 16px; border: 1px solid var(--rule); border-radius: 12px; }
.res .mono { font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.res b { display: block; font-size: 14.5px; margin: 4px 0; }
.res p { margin: 0; font-size: 13px; color: var(--muted-3); line-height: 1.5; }
.res:hover { border-color: var(--line); }
.res-wide { max-width: 560px; }

.topics { background: var(--wash); border-top: 1px solid var(--rule); padding: 12px 0 24px; }
.sec { padding: 36px 0 8px; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; gap: 16px; }
.sec-h h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.sec-h p { margin: 4px 0 0; font-size: 14px; color: var(--muted-3); }
.sec-h a { font-size: 14px; color: var(--accent); white-space: nowrap; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.card { display: block; }
.card h3 { margin: 12px 0 5px; font-size: 16px; line-height: 1.35; font-weight: 600; }
.card p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted-3); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card:hover h3 { color: var(--accent); }
.systems { padding: 48px 0 16px; }
.sgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.scard { border: 1px solid var(--rule); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 8px; background: #fff; color: var(--ink); }
a.scard:hover { border-color: var(--line); color: var(--ink); }
.scard h3 { margin: 0; font-size: 16.5px; }
.scard p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted-2); flex: 1; }
.scard small { font-family: var(--font-mono); font-size: 11px; color: var(--dim); }
.badge { align-self: flex-start; font-family: var(--font-mono); font-size: 10.5px; padding: 3px 8px; border-radius: 999px; background: var(--chip); color: var(--muted-2); }
.badge.live { background: var(--build); color: var(--build-ink); }
.badge.prog { background: var(--prod); color: var(--prod-ink); }
.about-line { display: flex; align-items: center; gap: 16px; padding: 32px 0; margin-top: 32px; border-top: 1px solid var(--rule); }
.about-line p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted-2); flex: 1; }
.about-line p b { color: var(--ink); }

/* 7. Footer */
.foot { border-top: 1px solid var(--rule); padding: 24px 0 32px; font-size: 13px; color: var(--dim); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--dim); }
.foot a:hover { color: var(--ink); }

/* 8. Subscribe form */
.signup { display: flex; gap: 8px; position: relative; }
.signup input { height: 40px; width: 220px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-size: 14px; color: var(--ink); }
.signup input::placeholder { color: var(--faint); }
.signup .btn { min-height: 40px; }
.signup .s-loading, .signup .s-success { display: none; }
.signup.loading .s-default { display: none; }
.signup.loading .s-loading { display: inline; }
.signup.success .s-default { display: none; }
.signup.success .s-success { display: inline; }
.s-error { position: absolute; top: 100%; left: 0; margin: 6px 0 0; font-size: 13px; color: #B3261E; }
.s-error:empty { display: none; }
.subbox { margin: 36px 0 0; padding: 28px; border-radius: 14px; background: var(--paper); display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
.subbox h3 { margin: 0 0 6px; font-size: 20px; font-weight: 600; }
.subbox p { margin: 0; font-size: 15px; color: var(--muted-2); }

/* 9. Listing pages */
.phead { padding: 48px 0 28px; border-bottom: 1px solid var(--rule); }
.phead h1 { margin: 0 0 10px; font-size: 36px; line-height: 1.15; letter-spacing: -.02em; font-weight: 650; }
.phead .lede { margin: 0; font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 680px; }
.phead .label { margin-bottom: 10px; }
.phead-doc { background: linear-gradient(180deg, var(--doc), #fff 85%); }
.phead-build { background: linear-gradient(180deg, var(--build), #fff 85%); }
.phead-prod { background: linear-gradient(180deg, var(--prod), #fff 85%); }
.phead-found { background: linear-gradient(180deg, var(--found), #fff 85%); }
.phead-author { display: flex; gap: 24px; align-items: center; }
.phead .actions { margin: 20px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.listing { padding-top: 16px; padding-bottom: 56px; max-width: 920px; margin-left: auto; margin-right: auto; }
.listing-page .listing { max-width: var(--wrap); }
.listing-page .rows { max-width: 820px; }
.listing .sgrid { margin-top: 24px; }
.empty { color: var(--muted-2); padding: 32px 0; }
.pager { padding: 24px 0; font-size: 14px; color: var(--muted-2); }
.pager nav { display: flex; gap: 16px; align-items: center; }
.topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-top: 24px; }
.tcard h3 { margin: 14px 0 6px; font-size: 19px; display: flex; gap: 8px; align-items: baseline; }
.tcard h3 .n { font-size: 13px; color: var(--faint); font-weight: 500; }
.tcard p { margin: 0; color: var(--muted-2); font-size: 15px; }

/* 10. Post reading page */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 30; pointer-events: none; }
.progress span { display: block; height: 100%; width: 0; background: var(--amber); }
.read .wrap { max-width: 1080px; }
.pgrid { display: grid; grid-template-columns: 200px minmax(0, 680px) 1fr; gap: 48px; padding-top: 56px; }
.toc { position: sticky; top: 24px; align-self: start; font-size: 13.5px; line-height: 1.5; max-height: calc(100vh - 48px); overflow: auto; }
.toc[hidden] { display: block; visibility: hidden; }
.toc h6 { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #7A8190; }
.toc a { display: block; padding: 5px 0 5px 12px; border-left: 2px solid var(--rule); color: var(--muted-2); }
.toc a.on { border-color: var(--accent); color: var(--ink); font-weight: 500; }
.crumb { font-size: 13.5px; color: #7A8190; margin: 0 0 10px; }
.crumb a { color: var(--accent); }
.kicker { display: inline-block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); background: var(--chip); padding: 4px 10px; border-radius: 999px; margin: 0 0 18px; }
.kicker-doc { color: var(--doc-ink); background: var(--doc); }
.kicker-build { color: var(--build-ink); background: var(--build); }
.kicker-prod { color: var(--prod-ink); background: var(--prod); }
.kicker-found { color: var(--found-ink); background: var(--found); }
.kicker:hover { filter: brightness(.97); }
h1.title { margin: 0 0 14px; font-size: 42px; line-height: 1.15; letter-spacing: -.025em; font-weight: 650; }
.dek { margin: 0 0 28px; font-size: 20px; line-height: 1.5; color: var(--muted); }
.by { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-bottom: 36px; }
.by b { display: block; font-size: 15px; font-weight: 600; }
.by span { font-size: 13.5px; color: #7A8190; }
.share { margin-left: auto; display: flex; gap: 8px; }
.share a, .share button { font-size: 13px; padding: 6px 12px; border: 1px solid #E2E0DA; border-radius: 999px; color: var(--muted); background: #fff; cursor: pointer; line-height: 1.4; }
.share a:hover, .share button:hover { border-color: var(--ink); color: var(--ink); }
.feature { margin: 0 0 32px; }
.feature img { width: 100%; border-radius: 10px; border: 1px solid var(--rule); display: block; }
.feature figcaption { font-size: 14px; color: #7A8190; margin-top: 10px; text-align: center; }

/* Post body: serif, 20px, one column */
.gh-content { display: grid; grid-template-columns: [full-start wide-start main-start] minmax(0, 1fr) [main-end wide-end full-end]; }
.gh-content > * { grid-column: main; }
.gh-content > .kg-width-wide { grid-column: wide; }
.gh-content > .kg-width-full { grid-column: full; }
.kg-width-full img, .kg-width-wide img { width: 100%; }
.body { font-family: var(--font-serif); font-size: 20px; line-height: 1.7; color: var(--ink-2); }
.body > * { margin-top: 0; }
.body p { margin: 0 0 26px; }
.body h2, .body h3, .body h4 { font-family: var(--font-sans); color: var(--ink); letter-spacing: -.015em; }
.body h2 { font-size: 26px; line-height: 1.25; font-weight: 600; margin: 48px 0 14px; }
.body h3 { font-size: 21px; line-height: 1.3; font-weight: 600; margin: 36px 0 10px; }
.body h4 { font-size: 18px; line-height: 1.35; font-weight: 600; margin: 28px 0 8px; }
.body a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.body a:hover { color: var(--accent); }
.body ul, .body ol { margin: 0 0 26px; padding-left: 1.3em; }
.body li { margin: 0 0 8px; }
.body li::marker { color: var(--dim); }
.body strong { font-weight: 600; color: var(--ink); }
.body code { font-family: var(--font-mono); font-size: .8em; background: var(--chip); padding: 2px 6px; border-radius: 4px; }
.body pre { font-family: var(--font-mono); font-size: 14.5px; line-height: 1.6; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 18px 20px; margin: 0 0 28px; overflow: auto; color: var(--ink); }
.body pre code { background: none; padding: 0; font-size: inherit; }
.body figure { margin: 8px 0 32px; }
.body figure img { border-radius: 10px; display: block; margin: 0 auto; }
.body .kg-image-card img { border: 1px solid var(--rule); }
.body figcaption { font-family: var(--font-sans); font-size: 14px; line-height: 1.5; color: #7A8190; margin-top: 10px; text-align: center; }
.body blockquote:not([class]) { margin: 0 0 28px; padding: 4px 0 4px 20px; border-left: 3px solid var(--amber); font-style: italic; color: var(--muted); }
.body hr { border: 0; border-top: 1px solid var(--rule); margin: 40px 0; }
.body table { width: 100%; border-collapse: collapse; font-family: var(--font-sans); font-size: 15px; line-height: 1.5; margin: 0 0 28px; display: block; overflow-x: auto; }
.body th, .body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.body th { font-weight: 600; color: var(--ink); background: var(--wash); }
.body .kg-callout-card { border-radius: 10px; font-family: var(--font-sans); font-size: 16.5px; line-height: 1.6; margin: 0 0 28px; }
.body .kg-bookmark-card { margin: 0 0 28px; }
.body .kg-bookmark-container { border-radius: 10px; font-family: var(--font-sans); }
.body .kg-toggle-card, .body .kg-file-card, .body .kg-product-card, .body .kg-header-card, .body .kg-button-card, .body .kg-cta-card { font-family: var(--font-sans); margin-bottom: 28px; }
.body .kg-embed-card { margin: 0 0 28px; }
/* Self-styled HTML cards from older posts carry their own fonts and sizes. */
.body > div[class], .body > section[class] { font-size: 16px; line-height: 1.6; margin-bottom: 28px; }

.ptags { display: flex; gap: 8px; flex-wrap: wrap; margin: 40px 0 32px; }
.ptags a { font-size: 13.5px; padding: 6px 12px; border-radius: 999px; background: var(--chip); color: var(--muted); }
.ptags a:hover { color: var(--ink); }
.pauthor { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; padding: 24px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.pauthor b { display: block; font-size: 17px; margin-bottom: 4px; }
.pauthor p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted-2); }
.comments { margin: 36px 0 0; padding: 24px 0 0; border-top: 1px solid var(--rule); }
.more { background: var(--wash); border-top: 1px solid var(--rule); margin-top: 72px; padding: 48px 0 64px; }
.more h3 { margin: 0 0 20px; font-size: 15px; font-weight: 600; }

/* 11. Static pages */
.page-static .wrap { max-width: 1080px; }
.page-body { padding: 40px 0 56px; font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.page-body > p, .page-body > h2, .page-body > h3, .page-body > ul, .page-body > ol, .page-body > blockquote, .page-body > figure:not(.kg-width-wide):not(.kg-width-full) { max-width: 720px; width: 100%; margin-left: auto; margin-right: auto; }
.page-body > p { margin-top: 0; margin-bottom: 22px; }
.page-body h2 { font-size: 26px; line-height: 1.25; letter-spacing: -.015em; margin: 40px auto 12px; }
.page-body a:not([class]) { text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 3px; }

/* About page (its HTML card relies on these) */
body.page-about .ats-about-custom { margin-top: 0; }
body.page-about .ats-about-custom .ats-about-inner { width: 100%; max-width: 1080px; margin-inline: auto; }
body.page-about .ats-about-custom .ats-about-hero { padding: clamp(32px, 5vw, 56px) max(4vmin, 20px); }
body.page-about .ats-about-custom .ats-about-hero-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(360px, .98fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
body.page-about .ats-about-custom .ats-about-kicker { margin-bottom: 14px; color: var(--accent); font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
body.page-about .ats-about-custom .ats-about-hero h1 { max-width: 820px; font-size: clamp(34px, 4.4vw, 48px); line-height: 1.08; letter-spacing: -.03em; }
body.page-about .ats-about-custom .ats-about-hero p { max-width: 680px; font-size: 18px; line-height: 1.55; }

/* System landing pages (#landing): the post's own HTML owns the layout */
.page-landing .gh-content { display: block; }
.page-landing .gh-content > * + * { margin-top: 0; }

/* 12. Responsive */
@media (max-width: 1100px) {
    .pgrid { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 40px; }
    .toc { display: none !important; }
    .pgrid > div:last-child { display: none; }
    .read .article { max-width: 680px; margin: 0 auto; width: 100%; }
}
@media (max-width: 980px) {
    body.page-about .ats-about-custom .ats-about-hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
    .layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .cards, .sgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .search-pill { display: none; }
    .search-icon { display: inline-flex; }
}
@media (max-width: 640px) {
    :root { --gutter: 16px; }
    .nav { height: 56px; gap: 8px; }
    .burger { display: inline-flex; }
    .nav-links { display: none; position: absolute; left: 0; right: 0; top: 56px; background: #fff; border-bottom: 1px solid var(--rule); padding: 8px 16px 14px; flex-direction: column; align-items: stretch; gap: 0; z-index: 20; box-shadow: 0 8px 20px rgba(26, 29, 36, .06); }
    .is-open .nav-links { display: flex; }
    .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--rule-soft); font-size: 16px; }
    .nav-links a:last-child { border-bottom: 0; }
    .tabs { gap: 20px; height: 44px; font-size: 14px; }
    .intro { flex-direction: column; gap: 8px; padding-top: 20px; }
    .pick { grid-template-columns: 1fr; gap: 16px; }
    .pick h2 { font-size: 21px; }
    .row { grid-template-columns: minmax(0, 1fr) 96px; gap: 14px; }
    .row h3 { font-size: 17px; }
    .row p { -webkit-line-clamp: 2; }
    .series { padding: 16px; }
    .series-h { flex-direction: column; gap: 2px; }
    .cards, .cards-3, .sgrid, .topic-grid { grid-template-columns: 1fr; }
    .card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 14px; align-items: start; }
    .card .cv { grid-row: span 2; padding: 9px; border-radius: 7px; }
    .card .cv b { font-size: 11px; -webkit-line-clamp: 2; }
    .card .cv span { font-size: 8.5px; }
    .card .cv i { width: 12px; height: 12px; border-radius: 3px; }
    .card .cv i::after { display: none; }
    .card h3 { margin: 0; font-size: 16px; }
    .sec-h { flex-direction: column; gap: 6px; }
    .about-line { flex-wrap: wrap; }
    .about-line p { flex-basis: calc(100% - 60px); }
    .phead { padding: 32px 0 20px; }
    .phead h1 { font-size: 28px; }
    .phead-author { flex-direction: column; align-items: flex-start; gap: 16px; }
    h1.title { font-size: 32px; }
    .dek { font-size: 18px; }
    .body { font-size: 18px; }
    .body h2 { font-size: 23px; margin-top: 40px; }
    .body pre { font-size: 13px; padding: 14px; }
    .by { flex-wrap: wrap; }
    .share { margin-left: 52px; }
    .pauthor { grid-template-columns: 56px 1fr; }
    .pauthor .btn-o { grid-column: 2; justify-self: start; }
    .subbox { grid-template-columns: 1fr; padding: 22px; }
    .signup { flex-direction: column; }
    .signup input { width: 100%; }
    .more { margin-top: 48px; padding: 36px 0 44px; }
    .page-body { font-size: 16.5px; }
    body.page-about .ats-about-custom .ats-about-hero-grid { grid-template-columns: 1fr; }
    body.page-about .ats-about-custom .ats-about-hero h1 { font-size: 32px; }
}
@media (max-width: 640px) {
    .row { grid-template-columns: minmax(0, 1fr); }
    .row > a[aria-hidden] { display: none; }
}

/* 2.4.1 */
@media (max-width: 640px) {
    .pick > a[aria-hidden] { display: none; }
}
