/* Atelier 1.2.2 — navigation, feed and reading layouts. No build step. */
:root {
    --bg: #fff;
    --ink: #202124;
    --muted: #666970;
    --faint: #8c8f95;
    --line: #e8e9eb;
    --subtle: #f6f6f7;
    --hover: #f1f2f3;
    --accent: #202124;
    --radius: 8px;
    --header-height: 68px;
    --left-width: 232px;
    --right-width: 280px;
    --font: "Plus Jakarta Sans", "Pretendard", sans-serif;
    color-scheme: light;
}
:root[data-theme="dark"] {
    --bg: #171819;
    --ink: #ededee;
    --muted: #a1a3a8;
    --faint: #85878c;
    --line: #303135;
    --subtle: #202123;
    --hover: #2b2c2f;
    --accent: #ededee;
    color-scheme: dark;
}
* { box-sizing: border-box; }
/* No gutter appears when a page becomes scrollable or a modal locks it. */
html, .sidebar, .context-inner { scrollbar-width: none; }
html::-webkit-scrollbar, .sidebar::-webkit-scrollbar, .context-inner::-webkit-scrollbar { display: none; width: 0; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { border: 0; }
img { max-width: 100%; height: auto; }
svg { display: inline-block; flex-shrink: 0; vertical-align: middle; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font); line-height: 1.4; letter-spacing: -.025em; word-break: keep-all; overflow-wrap: anywhere; }
h1, h2, h3, p, figure { margin: 0; }
p { overflow-wrap: anywhere; }
a:hover { color: var(--muted); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .6; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 16px; padding: 10px 16px; background: var(--ink); color: var(--bg); z-index: 100; }
.skip-link:focus { top: 10px; }
/* Keep the requested font pairing. Ghost font settings remain available as an opt-in. */
body[data-use-ghost-fonts="true"] { font-family: var(--gh-font-body, var(--font)); }
body[data-use-ghost-fonts="true"] :is(h1,h2,h3,h4,h5,h6) { font-family: var(--gh-font-heading, var(--font)); }

/* One continuous header across the three columns. */
.site-header { height: var(--header-height); position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: var(--left-width) minmax(0,1fr) var(--right-width); align-items: center; border-bottom: 1px solid var(--line); background: var(--bg); }
.header-brand { display: flex; align-items: center; gap: 8px; padding: 0 24px; min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 750; letter-spacing: -.045em; min-width: 0; }
.brand > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand img { max-height: 32px; max-width: 175px; object-fit: contain; }
.brand img.site-icon { width: 28px; height: 28px; border-radius: 6px; }
.header-search { padding: 0 28px; }
.search-button { width: min(100%, 480px); min-height: 38px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 9px 6px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--subtle); color: var(--muted); text-align: left; }
.search-button > span { display: flex; align-items: center; gap: 9px; }
kbd { font: 13px var(--font); width: 24px; height: 24px; text-align: center; background: var(--bg); border: 1px solid var(--line); border-radius: 5px; }
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 0 24px 0 12px; }
.icon-button { display: inline-flex; justify-content: center; align-items: center; width: 38px; height: 38px; padding: 0; background: transparent; border-radius: 6px; }
.icon-button:hover { background: var(--hover); color: var(--ink); }
.header-signin { font-size: 12px; padding: 8px 4px; white-space: nowrap; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 38px; padding: 8px 16px; background: var(--ink); color: var(--bg); border: 1px solid var(--ink); border-radius: 6px; font-size: 13px; font-weight: 600; text-decoration: none; }
.button:hover { opacity: .85; color: var(--bg); }
.button-soft { border-color: var(--line); color: var(--ink); background: var(--bg); }
.button-soft:hover { background: var(--subtle); color: var(--ink); opacity: 1; }
.header-subscribe { white-space: nowrap; }
.mobile-search, .menu-toggle, .sidebar-mobile-heading { display: none; }
[data-theme="dark"] [data-color-icon="light"], [data-theme="light"] [data-color-icon="dark"] { display: none; }

/* Sidebars contain real navigation and context; no decorative filler. */
.site-shell { display: grid; grid-template-columns: var(--left-width) minmax(0,1fr); min-height: calc(100dvh - var(--header-height)); }
.has-context-sidebar .site-shell { grid-template-columns: var(--left-width) minmax(0,1fr) var(--right-width); }
.sidebar { position: sticky; top: var(--header-height); height: calc(100dvh - var(--header-height)); overflow-y: auto; align-self: start; border-right: 1px solid var(--line); background: var(--bg); }
.sidebar-blocks { display: flex; flex-direction: column; min-height: 100%; padding: 20px 18px 16px; gap: 24px; }
.sidebar-profile { display: flex; align-items: center; gap: 11px; font-size: 11px; min-width: 0; }
.sidebar-profile > div { min-width: 0; }
.sidebar-profile strong { display: block; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; margin-bottom: 3px; }
.sidebar-profile a { color: var(--muted); }
.account-avatar { display: grid; place-items: center; height: 36px; width: 36px; flex-shrink: 0; background: var(--subtle); border: 1px solid var(--line); border-radius: 50%; }
.account-avatar svg { width: 17px; height: 17px; }
.meta-divider { color: var(--line); margin: 0 7px; }
.nav { list-style: none; margin: 0; padding: 0; }
.nav li + li { margin-top: 3px; }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 39px; padding: 8px 10px; border-radius: 5px; font-size: 13px; font-weight: 500; }
.nav a:hover { background: var(--subtle); color: var(--ink); }
.nav-current a { background: var(--hover); color: var(--ink); font-weight: 650; }
.nav-marker { width: 3px; height: 15px; background: var(--line); border-radius: 0 2px 2px 0; flex-shrink: 0; }
.nav-current .nav-marker { background: var(--ink); }
.nav-secondary a { font-weight: 400; color: var(--muted); padding-left: 0; }
.nav-secondary a > svg { margin-left: auto; width: 15px; height: 15px; }
.sidebar-group { padding-top: 19px; border-top: 1px solid var(--line); }
.sidebar-group > h2, .sidebar-group > summary { font-size: 11px; font-weight: 600; line-height: 1.5; color: var(--muted); margin: 0 0 13px; letter-spacing: 0; }
.sidebar-group > summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.sidebar-group > summary::-webkit-details-marker { display: none; }
.sidebar-group > summary svg { width: 15px; height: 15px; }
.sidebar-group[open] > summary svg { transform: rotate(180deg); }
.topic-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.topic-links a { display: flex; align-items: center; gap: 9px; padding: 7px 4px; min-height: 34px; border-radius: 4px; font-size: 12px; }
.topic-links a:hover { background: var(--subtle); color: var(--ink); }
.topic-links a > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic-marker { display: inline-block; width: 4px; height: 13px; background: var(--topic-color, var(--faint)); border-radius: 0 3px 3px 0; flex-shrink: 0; }
.topic-links small { margin-left: auto; color: var(--faint); font-size: 10px; font-variant-numeric: tabular-nums; }
.sidebar-custom .gh-content { display: block; font-size: 12px; line-height: 1.8; color: var(--muted); }
.sidebar-custom .gh-content > * { margin-bottom: 12px; }
.sidebar-custom .gh-content :is(h2,h3,h4) { color: var(--ink); font-size: 13px; margin-top: 16px; }
.sidebar-custom .gh-content :is(ul,ol) { padding-left: 17px; }
.sidebar-custom .gh-content img { border-radius: 5px; }
.sidebar-utilities { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rss-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.rss-link svg { width: 15px; height: 15px; }
.color-switch { display: flex; gap: 1px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; }
.color-switch button { display: grid; place-items: center; padding: 0; width: 27px; height: 27px; background: transparent; color: var(--muted); border-radius: 4px; }
.color-switch svg { width: 14px; height: 14px; }
.color-switch [aria-pressed="true"] { background: var(--hover); color: var(--ink); }
.context-sidebar { border-left: 1px solid var(--line); min-width: 0; }
.context-inner { position: sticky; top: var(--header-height); max-height: calc(100dvh - var(--header-height)); overflow-y: auto; padding: 0 22px; }
.context-section { padding: 26px 0; border-bottom: 1px solid var(--line); }
.context-identity { display: flex; align-items: center; gap: 12px; }
.context-identity img { flex-shrink: 0; border-radius: 10px; object-fit: cover; width: 42px; height: 42px; }
.author-context .context-identity img { border-radius: 50%; }
.context-identity h2 { font-size: 16px; font-weight: 650; letter-spacing: -.025em; }
.context-section > p { color: var(--muted); font-size: 12px; margin-top: 13px; line-height: 1.8; }
.context-sidebar .site-context { border-bottom: 0; }
.context-shortcuts { margin-top: 18px; }
.context-shortcuts .gh-content > :is(p,ul,ol) { margin: 0; }
.context-shortcuts .gh-content :is(ul,ol) { list-style: none; padding: 0; }
.context-shortcuts .gh-content .context-link { display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 6px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; text-decoration: none; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; transition: color .18s; }
.context-shortcuts .gh-content .context-link:hover { color: var(--ink); background: transparent; }
.context-shortcuts .gh-content .context-link:focus-visible { color: var(--ink); outline: 1px solid currentColor; outline-offset: 3px; }
.context-link svg { width: 16px; height: 16px; flex: 0 0 auto; }
.context-label { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.rail-subscribe { margin-top: 18px; width: 100%; }
.rail-posts { list-style: none; counter-reset: rail-post; padding: 0; margin: 17px 0 0; display: flex; flex-direction: column; gap: 19px; }
.rail-posts li { display: flex; gap: 12px; counter-increment: rail-post; }
.rail-posts li:before { content: none; }
.rail-posts a { min-width: 0; }
.rail-post-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; font-weight: 550; line-height: 1.6; }
.rail-posts time { display: block; font-size: 10px; color: var(--faint); margin-top: 5px; }
.context-follow { display: flex; align-items: center; justify-content: space-between; padding-block: 13px; }
.context-credit { font-size: 10px; color: var(--faint); padding: 23px 0; }
.author-context .text-link { margin-top: 15px; }

/* The centre is a publication feed, not a sequence of marketing sections. */
.site-body { display: flex; flex-direction: column; min-width: 0; }
#main { flex: 1; min-width: 0; }
.page-wrap { width: 100%; max-width: 1000px; margin: 0 auto; padding: 32px 28px; }
.home-sections { display: flex; flex-direction: column; gap: 32px; padding-top: 0; }
.hero { display: flex; flex-direction: row-reverse; align-items: center; justify-content: center; gap: 24px; padding: 40px 18px 12px; }
.hero { --intro-align: center; --intro-margin: auto; }
.hero-copy { flex: 1; min-width: 0; text-align: var(--intro-align); }
.hero h1 { max-width: 650px; margin: 0 auto 12px; font-size: clamp(24px,2.3vw,34px); font-weight: 700; line-height: 1.35; letter-spacing: -.04em; text-wrap: balance; }
.hero-description { max-width: 560px; margin: auto; font-size: 15px; line-height: 1.8; color: var(--muted); white-space: pre-line; text-wrap: pretty; }
.hero-image { width: 104px; height: 104px; object-fit: cover; border-radius: 10px; }
[data-home-layout="Portfolio"] .hero { padding-block: 42px 20px; gap: 28px; }
[data-home-layout="Portfolio"] .hero { --intro-align: left; --intro-margin: 0; }
[data-home-layout="Portfolio"] .hero h1 { font-size: clamp(28px,3vw,42px); }
.hero[data-intro-alignment="Left"] { --intro-align: left; --intro-margin: 0; }
.hero[data-intro-alignment="Center"] { --intro-align: center; --intro-margin: auto; }
[data-home-layout="Portfolio"] .hero-image { width: 160px; height: 176px; }
.hero .text-link { margin-top: 20px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.text-link svg { width: 15px; height: 15px; }
.text-link:hover { color: var(--ink); }
.page-heading { margin-bottom: 30px; }
.page-heading h1 { font-size: 30px; margin-bottom: 10px; font-weight: 700; }
.page-heading p { max-width: 640px; color: var(--muted); font-size: 14px; }
.page-kicker { display: block; margin-bottom: 8px; font-size: 11px; color: var(--faint); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.section-heading h2 { font-size: 17px; font-weight: 650; }
.home-block { min-width: 0; }
.feed-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); min-height: 49px; }
.feed-toolbar > h2 { font-size: 14px; font-weight: 650; padding-bottom: 13px; }
.feed-tabs { display: flex; gap: 1px; align-self: stretch; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.feed-tabs button { background: transparent; position: relative; padding: 11px 13px 14px; font-size: 13px; font-weight: 550; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; }
.feed-tabs button:first-child { padding-left: 9px; }
.feed-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 650; }
.feed-tabs button:hover { color: var(--ink); }
.view-control { position: relative; flex-shrink: 0; margin-bottom: 9px; }
.view-control summary { display: flex; align-items: center; gap: 5px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; list-style: none; min-height: 34px; background: var(--bg); }
.view-control summary::-webkit-details-marker { display: none; }
.view-control summary svg { width: 17px; height: 17px; }
.view-control summary > svg { width: 12px; height: 12px; color: var(--muted); }
.view-options { position: absolute; z-index: 10; right: 0; top: calc(100% + 6px); padding: 4px; min-width: 140px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px #0000000d; }
.view-options button { display: flex; align-items: center; gap: 9px; padding: 9px; width: 100%; background: transparent; border-radius: 4px; font-size: 12px; text-align: left; }
.view-options button svg { width: 16px; height: 16px; }
.view-options button:hover, .view-options [aria-pressed="true"] { background: var(--subtle); }
.js [data-panel]:not([data-panel="latest"]):not([data-active]) { display: none; }
.post-card { display: flex; align-items: flex-start; gap: 17px; padding: 21px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.post-card-image { width: 128px; margin-top: 2px; flex-shrink: 0; overflow: hidden; border-radius: 6px; background: var(--subtle); }
.post-card-image img { width: 100%; aspect-ratio: 16/10; display: block; object-fit: cover; }
.post-card-copy { flex: 1; min-width: 0; }
.post-card-title { font-size: 16px; line-height: 1.5; font-weight: 650; letter-spacing: -.02em; }
.post-card-title a:hover { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
.featured-mark { color: var(--ink); display: inline-flex; vertical-align: -2px; margin-right: 5px; }
.featured-mark svg { width: 14px; height: 14px; }
.post-card-excerpt { font-size: 13px; color: var(--muted); line-height: 1.7; margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; font-size: 10px; line-height: 1.5; color: var(--muted); margin-top: 9px; }
.post-meta > * + *:before { content: "/"; color: var(--line); margin-right: 10px; }
.post-meta .tag-pill:before, .post-meta .access-label:before, .post-meta .comment-link:before { content: none; }
.tag-pill { display: inline-flex; align-items: center; font-size: 10px; padding: 2px 6px; border-radius: 3px; background: var(--subtle); color: var(--muted); white-space: nowrap; }
.tag-pill:hover { background: var(--hover); color: var(--ink); }
.comment-link { display: inline-flex; gap: 3px; align-items: center; }
.comment-link svg { width: 13px; height: 13px; }
.access-label { color: var(--muted); font-size: 9px; border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; }
.feed-note { font-size: 11px; padding: 14px 0 0; color: var(--faint); }
.feed-more { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 11px 14px; margin-top: 22px; font-size: 12px; font-weight: 550; }
.feed-more svg { width: 15px; height: 15px; }
.feed-more:hover { background: var(--subtle); color: var(--ink); }
.post-feed[data-layout="Compact"] .post-card { padding-block: 15px; }
.post-feed[data-layout="Compact"] .post-card-image, .post-feed[data-layout="Compact"] .post-card-excerpt { display: none; }
.post-feed[data-layout="Compact"] .post-card-title { font-size: 14px; }
.post-feed[data-layout="Cards"] { display: grid; align-items: start; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; padding-top: 22px; }
.post-feed[data-layout="Cards"] .post-card { flex-direction: column; gap: 13px; padding: 0 0 17px; }
.post-feed[data-layout="Cards"] .post-card-image { width: 100%; margin: 0; }
.post-feed[data-layout="Cards"] .post-card-title { font-size: 16px; }
.post-feed[data-layout="Cards"] .post-card-copy { flex: 1; width: 100%; }
.post-feed[data-layout="Cards"] .post-card:not(:has(.post-card-image)) { padding-top: 15px; border-top: 1px solid var(--line); }
.empty-state { padding: 48px 20px; text-align: center; width: 100%; grid-column: 1/-1; }
.empty-state h3 { font-size: 16px; font-weight: 600; margin-bottom: 7px; }
.empty-state p { color: var(--muted); font-size: 13px; }
.tag-directory { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.tag-directory > a { display: flex; align-items: flex-start; gap: 11px; padding: 24px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.tag-directory .topic-marker { margin-top: 5px; }
.tag-directory > a > div { flex: 1; }
.tag-directory h3 { font-size: 15px; margin-bottom: 6px; }
.tag-directory p { font-size: 12px; color: var(--muted); line-height: 1.6; margin-bottom: 10px; }
.tag-directory small { color: var(--faint); font-size: 10px; }
.tag-directory svg { width: 15px; height: 15px; margin-top: 3px; color: var(--faint); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 25px; font-size: 11px; color: var(--muted); }
.pagination .button { font-size: 11px; }

/* Reading screens use the same borders and type scale as the feed. */
.article { max-width: 960px; margin: auto; padding: 32px 32px 24px; }
.article-header { max-width: 720px; margin: 0 auto 26px; }
.article-topline { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.article-date { color: var(--muted); font-size: 11px; }
.article-header h1 { font-size: clamp(26px,2.7vw,38px); font-weight: 700; line-height: 1.35; margin-bottom: 18px; letter-spacing: -.035em; }
.article-excerpt { color: var(--muted); font-size: 16px; line-height: 1.75; margin-bottom: 22px; }
.article-byline { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.article-byline img { display: block; border-radius: 50%; object-fit: cover; }
.article-byline > button { margin-left: auto; }
.byline-reading { font-size: 11px; }
.feature-image { margin: 0 auto 32px; }
.feature-image > img { display: block; width: 100%; max-height: 640px; object-fit: contain; border-radius: 7px; background: var(--subtle); }
figcaption { font-size: 11px !important; color: var(--muted); line-height: 1.6; margin-top: 9px; text-align: center; }
.toc { max-width: 720px; margin: 0 auto 30px; border-block: 1px solid var(--line); padding: 15px 0; color: var(--muted); }
.toc summary { display: flex; align-items: center; justify-content: space-between; list-style: none; font-size: 12px; font-weight: 600; cursor: pointer; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary svg { width: 16px; height: 16px; }
.toc[open] summary svg { transform: rotate(180deg); }
.toc nav { padding-top: 12px; font-size: 12px; line-height: 1.8; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li + li { margin-top: 5px; }
.toc li > ol { margin: 5px 0 9px 3px; padding-left: 16px; border-left: 1px solid var(--line); font-size: 11px; }
.toc nav > ol > li > a { font-weight: 550; }
.toc a { display: block; padding-block: 2px; }
.toc a:hover, .toc a:focus-visible { color: var(--ink); }
.context-toc nav { margin-top: 14px; max-height: 50dvh; overflow-y: auto; color: var(--muted); font-size: 12px; line-height: 1.8; }
.context-toc ol { margin: 0; padding: 0; list-style: none; }
.context-toc li + li { margin-top: 5px; }
.context-toc li > ol { margin: 5px 0 9px 3px; padding-left: 12px; border-left: 1px solid var(--line); font-size: 11px; }
.context-toc nav > ol > li > a { font-weight: 550; }
.context-toc a { display: block; padding-block: 3px; overflow-wrap: anywhere; }
.context-toc a:hover, .context-toc a:focus-visible { color: var(--ink); }
.article-content :is(h2,h3) { scroll-margin-top: calc(var(--header-height) + 24px); }
.article-content [id], #comments { scroll-margin-top: calc(var(--header-height) + 20px); }
.article-bottom { max-width: 720px; margin: 32px auto 0; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.article-tags a { padding: 3px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 11px; }
.article-comments { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 18px; }
.post-neighbors { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; border-top: 1px solid var(--line); margin-top: 32px; padding-top: 24px; }
.post-neighbors a { display: flex; flex-direction: column; gap: 9px; }
.post-neighbors a:last-child:not(:first-child) { text-align: right; }
.post-neighbors span { font-size: 11px; color: var(--muted); }
.post-neighbors strong { font-size: 13px; font-weight: 550; }
.related { padding-top: 12px; }
.related > h2 { font-size: 17px; border-bottom: 1px solid var(--line); padding-bottom: 15px; }
.author-heading { display: flex; align-items: flex-start; gap: 20px; }
.author-avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-heading .text-link { margin-top: 12px; }
.subscribe-box { max-width: 720px; margin: 24px 28px; padding: 26px; background: var(--subtle); border: 1px solid var(--line); border-radius: 7px; }
.home-sections .subscribe-box { margin: 0; }
.subscribe-box h2 { font-size: 19px; margin-bottom: 8px; }
.subscribe-box > p { color: var(--muted); font-size: 13px; }
.subscribe-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.subscribe-form label { flex: 1; min-width: 140px; }
.subscribe-form input { width: 100%; min-height: 40px; border: 1px solid var(--line); background: var(--bg); border-radius: 5px; padding: 8px 11px; font-size: 13px; color: var(--ink); }
.subscribe-form > p { width: 100%; font-size: 12px; }
.loading-label, .form-success, .form-error { display: none; }
.subscribe-form.loading .loading-label { display: inline; }
.subscribe-form.loading .submit-label { display: none; }
.subscribe-form.loading button { pointer-events: none; opacity: .6; }
.subscribe-form.success .form-success, .subscribe-form.error .form-error { display: block; }
.subscribe-form.success label, .subscribe-form.success button { display: none; }
.form-error { color: #c33e3e; }
.site-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; margin: auto 28px 0; padding: 23px 0; border-top: 1px solid var(--line); color: var(--faint); font-size: 10px; }
.site-footer > span:last-child { margin-left: auto; }
.error-page { padding-block: 90px; }
.error-code { color: var(--faint); font-size: 13px; }
.error-page h1 { font-size: 30px; margin: 15px 0; }
.error-page > p { color: var(--muted); }
.error-actions { display: flex; gap: 10px; margin-top: 26px; }

@media (min-width: 1600px) {
    :root { --left-width: 260px; --right-width: 320px; }
    .header-brand { padding-left: 28px; }
    .sidebar-blocks { padding-inline: 24px; }
    .context-inner { padding-inline: 28px; }
    .page-wrap { padding-inline: 36px; }
    .hero { padding-block: 48px 20px; }
    .post-card-title { font-size: 17px; }
    .post-card-image { width: 148px; }
}
@media (max-width: 1199px) {
    :root { --left-width: 212px; --right-width: 200px; }
    .has-context-sidebar .site-shell { grid-template-columns: var(--left-width) minmax(0,1fr); }
    .context-sidebar { display: none; }
    .page-wrap { max-width: 860px; }
    .header-search { padding-inline: 20px; }
    .header-actions { padding-right: 16px; gap: 4px; }
    .header-brand { padding-left: 20px; }
}
@media (max-width: 800px) {
    :root { --header-height: 60px; }
    .site-header { display: flex; justify-content: space-between; }
    .header-brand { padding-left: 10px; }
    .brand { font-size: 18px; }
    .brand img { max-width: 150px; max-height: 28px; }
    .header-search { display: none; }
    .header-actions { gap: 3px; padding-right: 12px; }
    .menu-toggle, .mobile-search { display: inline-flex; }
    .header-signin { display: none; }
    .header-subscribe { min-height: 34px; padding: 6px 11px; font-size: 11px; }
    .site-shell, .has-context-sidebar .site-shell { display: block; }
    .sidebar { position: fixed; inset: 0 auto 0 0; top: 0; height: 100dvh; width: min(300px,86vw); transform: translateX(-100%); visibility: hidden; z-index: 60; transition: transform .18s, visibility .18s; }
    .sidebar-mobile-heading { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 12px 22px; border-bottom: 1px solid var(--line); font-weight: 650; }
    .sidebar-blocks { min-height: calc(100% - 63px); padding: 22px; gap: 26px; }
    .sidebar .nav a { min-height: 44px; }
    .topic-links a { min-height: 40px; }
    .color-switch button { width: 32px; height: 32px; }
    .menu-open .sidebar { transform: translateX(0); visibility: visible; }
    .sidebar-backdrop { position: fixed; inset: 0; background: #0005; z-index: 50; }
    .menu-open { overflow: hidden; }
    .page-wrap { padding: 26px 24px; }
    .home-sections { padding-top: 0; gap: 24px; }
    .hero { padding: 32px 12px 10px; }
    .hero h1 { font-size: 28px; }
    .hero-description { font-size: 14px; }
    .article { padding: 28px 24px; }
    .article-header h1 { font-size: 32px; }
    .site-footer { margin-inline: 24px; }
}
@media (max-width: 520px) {
    .header-subscribe { display: none; }
    .header-actions .icon-button { width: 34px; height: 38px; }
    .page-wrap { padding-inline: 18px; }
    .hero { padding: 28px 4px 7px; gap: 15px; }
    .hero h1 { font-size: 24px; }
    .hero-description { font-size: 13px; line-height: 1.75; }
    .hero-image { width: 66px; height: 66px; border-radius: 8px; }
    [data-home-layout="Portfolio"] .hero { padding: 30px 0 14px; gap: 17px; }
    [data-home-layout="Portfolio"] .hero h1 { font-size: 28px; }
    [data-home-layout="Portfolio"] .hero-image { width: 82px; height: 100px; }
    .feed-toolbar { gap: 8px; }
    .feed-tabs button { font-size: 12px; padding-inline: 10px; }
    .feed-tabs button:first-child { padding-left: 4px; }
    .view-control summary { gap: 4px; padding: 6px; }
    .view-control summary > svg { width: 10px; }
    .post-card { gap: 12px; padding-block: 18px; }
    .post-card-image { width: 90px; margin-top: 3px; }
    .post-card-image img { aspect-ratio: 4/3; }
    .post-card-title { font-size: 14px; line-height: 1.5; }
    .post-card-excerpt { font-size: 12px; -webkit-line-clamp: 2; }
    .post-meta { gap: 5px 7px; font-size: 9px; margin-top: 8px; }
    .post-meta > * + *:before { margin-right: 7px; }
    .card-author { display: none; }
    .tag-pill { font-size: 9px; }
    .post-feed[data-layout="Cards"] { grid-template-columns: 1fr; gap: 20px; padding-top: 18px; }
    .post-feed[data-layout="Cards"] .post-card-image img { aspect-ratio: 16/10; }
    .post-feed[data-layout="Cards"] .card-author { display: inline; }
    .tag-directory { grid-template-columns: 1fr; }
    .tag-directory > a { padding-block: 20px; }
    .section-heading h2 { font-size: 16px; }
    .page-heading h1 { font-size: 26px; }
    .article { padding: 26px 18px; }
    .article-header h1 { font-size: 28px; }
    .article-excerpt { font-size: 14px; }
    .article-byline { font-size: 11px; gap: 8px; }
    .byline-reading { font-size: 10px; }
    .post-neighbors { gap: 18px; }
    .post-neighbors strong { font-size: 12px; }
    .subscribe-box { margin-inline: 18px; padding: 20px; }
    .subscribe-box h2 { font-size: 17px; }
    .site-footer { margin-inline: 18px; gap: 12px; }
    .site-footer > span:last-child { margin-left: 0; }
    .author-heading { gap: 15px; }
    .author-avatar { width: 48px; height: 48px; }
    .error-page { padding-block: 65px; }
}
@media (max-width: 800px) {
    html:not(.js) .sidebar { position: static; transform: none; visibility: visible; width: 100%; height: auto; border-bottom: 1px solid var(--line); }
    html:not(.js) .menu-toggle, html:not(.js) .sidebar-mobile-heading { display: none; }
}
html:not(.js) .view-control, html:not(.js) .feed-tabs, html:not(.js) .color-switch, html:not(.js) [data-color-toggle] { display: none; }
html:not(.js) [data-panel] { border-top: 1px solid var(--line); margin-top: 20px; }
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print { .site-header, .sidebar, .context-sidebar, .site-footer, .subscribe-box, .post-neighbors, .article-bottom, .toc { display: none; } .site-shell, .has-context-sidebar .site-shell { display: block; } .article { padding: 0; max-width: none; } body { background: white; color: black; } }

.hero h1 { white-space: pre-line; }
.hero h1, .hero-description { margin-inline: var(--intro-margin); }
.hero { padding-inline: 0; }
.site-body { min-height: calc(100dvh - var(--header-height)); }
/* The browser handles navigation, history and scroll restoration. */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
    .site-body { animation: page-arrive 180ms ease-out; }
    ::view-transition-old(root) { animation: page-leave 100ms ease-in both; }
    ::view-transition-new(root) { animation: page-arrive 180ms ease-out both; }
    a, button { transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease; }
}
@keyframes page-arrive { from { opacity: .35; } to { opacity: 1; } }
@keyframes page-leave { to { opacity: 0; } }
/* The embedding frame and its document must share a color-scheme for transparency. */
#sodo-search-root, #sodo-search-root .gh-root-frame { background: transparent; }
#sodo-search-root iframe { color-scheme: inherit; background: transparent; }
@media (forced-colors: active) {
    html, .sidebar, .context-inner { scrollbar-width: auto; }
    html::-webkit-scrollbar, .sidebar::-webkit-scrollbar, .context-inner::-webkit-scrollbar { display: revert; width: revert; }
}
.article-byline { position: relative; }
.copy-status:not(:empty) { position: absolute; top: 100%; right: 0; max-width: 260px; padding: 7px 10px; background: var(--ink); color: var(--bg); border-radius: 5px; font-size: 11px; z-index: 2; }
