:root {
  color-scheme: light dark;
  --background: #fff;
  --text: #1e1e1e;
  --muted: #686868;
  --link: #086bdb;
  --line: #e5e5e5;
  --surface: #f5f5f5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #111;
    --text: #d7d7d7;
    --muted: #a0a0a0;
    --link: #73adff;
    --line: #303030;
    --surface: #1c1c1c;
  }
}

* { box-sizing: border-box; }
html { background: var(--background); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  font: 1.25rem/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-wrap: break-word;
}
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration: none; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
main:focus { outline: none; }
::selection { background: var(--link); color: var(--background); }
.wrap { width: min(42rem, calc(100% - 2.5rem)); margin-inline: auto; }

.site-header { display: flex; align-items: center; gap: 1rem; padding-block: 2.75rem 1.5rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line); }
.site-avatar { flex: 0 0 5rem; }
.site-heading { flex: 1; min-width: 0; }
.site-title { display: block; color: var(--text); font-size: 2rem; font-weight: 700; letter-spacing: -.035em; line-height: 1.25; text-decoration: none; }
.site-title:hover { color: var(--link); }
.site-image { display: block; width: 5rem; height: 5rem; object-fit: cover; border-radius: 10px; }
nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.25rem; }
.site-nav { align-items: center; margin-top: .5rem; font-size: 1.125rem; }
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.site-social-links { display: inline-flex; align-items: center; gap: .25rem; }
.site-social-link { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; min-height: 2rem; border-radius: .35rem; }
.site-social-link svg { display: block; width: 1.25rem; height: 1.25rem; }
.site-nav .site-social-link:hover { background: var(--surface); text-decoration: none; }
.site-header:has(+ .site-status) { margin-bottom: .75rem; }
.site-status { display: flex; align-items: flex-start; gap: 1rem; height: 3em; margin-block: 0 2rem; color: var(--muted); font-size: .8125rem; line-height: 1.5; overflow-wrap: anywhere; }
.site-status a { color: inherit; text-decoration: none; }
.site-status-content { flex: 1; min-width: 0; }
.site-status-content:not([hidden]) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.site-status-time { flex-shrink: 0; margin-left: auto; white-space: nowrap; text-align: right; }
.site-status a:hover { color: var(--link); }

h1, h2, h3, h4, h5, h6 { color: var(--text); line-height: 1.25; letter-spacing: -.035em; text-wrap: balance; }
h1 { margin: 0 0 1.5rem; font-size: 2rem; font-weight: 750; }
.post > h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
p, ul, ol, blockquote, pre, figure { margin: 0 0 1.5rem; }
ul, ol { padding-inline-start: 1.5rem; }
li + li { margin-top: .3rem; }
hr { border: 0; border-top: 1px solid var(--line); margin-block: 2rem; }

.prose { overflow-wrap: anywhere; line-height: 1.8; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose :is(h2, h3, h4, h5, h6) { margin: 2rem 0 1rem; }
.prose :is(p, ul, ol, blockquote, pre, figure) { margin-block: 0 1.5rem; }
.prose li > :last-child { margin-bottom: .5rem; }
img, video { max-width: 100%; height: auto; }
.prose :is(img, video) { border-radius: 10px; }
.prose figure { margin-inline: 0; }
.prose figure img { display: block; width: var(--post-image-width, auto); margin-inline: auto; }

/* Flex wrapping centers an odd last image without moving intervening prose. */
:is(.prose.lexxy-content, .prose .attachment-gallery):has(> figure img) { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; column-gap: 1rem; }
:is(.prose.lexxy-content, .prose .attachment-gallery):has(> figure img) > * { flex: 0 0 100%; min-width: 0; }
:is(.prose.lexxy-content, .prose .attachment-gallery) > figure:has(img) { --post-image-width: auto; display: block; flex: 0 1 100%; inline-size: auto; min-inline-size: 0; margin-inline: 0; padding: 0; }
:is(.prose.lexxy-content, .prose .attachment-gallery) > figure:has(img):has(~ figure img),
:is(.prose.lexxy-content, .prose .attachment-gallery) > figure:has(img) ~ figure:has(img) { --post-image-width: 100%; flex-basis: calc((100% - 1rem) / 2); }
/* Imported <p><figure> markup leaves empty siblings after HTML parsing. */
:is(.prose.lexxy-content, .prose .attachment-gallery):has(> figure img) > :is(p:empty, a:empty:not([id])) { display: none; }

.prose figcaption { margin-top: .65rem; color: var(--muted); text-align: center; font-size: .8125rem; }
.prose figure .photo-details { margin: .375rem 0 0; color: var(--muted); text-align: center; font-size: .8125rem; font-weight: 400; line-height: 1.4; }
.prose :is(iframe, audio) { max-width: 100%; }
.prose iframe { border: 0; }
.prose blockquote { padding-inline-start: 1.25rem; border-inline-start: 3px solid var(--line); color: var(--muted); }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose .callout { padding: 1rem 1.25rem; border-color: var(--link); background: var(--surface); color: var(--text); border-radius: 0 8px 8px 0; }
.prose .callout__title { font-weight: 700; margin-bottom: .5rem; }
code, pre, kbd { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .875em; }
code, kbd { background: var(--surface); padding: .15em .3em; border-radius: 3px; }
.prose pre { overflow-x: auto; padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; line-height: 1.6; }
pre code { font-size: inherit; padding: 0; background: none; }
.prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; margin-block: 1.5rem; font-size: .9375rem; }
.prose :is(th, td) { border-bottom: 1px solid var(--line); padding: .65rem 1rem; text-align: start; }
.prose th { background: var(--surface); }
sup, sub { line-height: 0; }
.prose .footnotes { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
.prose .footnotes p { margin-bottom: .75rem; }
[id] { scroll-margin-top: 1.5rem; }

.intro { margin-bottom: 2rem; }
.post-meta, .post-taxonomy { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1rem; color: var(--muted); font-size: .8125rem; }
.post-meta { margin-top: 2rem; align-items: center; }
/* Scribbles can still append its legacy kudos when enabled in settings. */
.scribbles-platform-kudos { display: none; }
.post-meta .updoot { margin-inline-start: auto; }
.post-meta .tag-list { max-width: 100%; overflow-wrap: anywhere; }
.post-meta a, .post-taxonomy a { color: inherit; }
.tag-list { display: flex; flex-wrap: wrap; gap: .35rem .75rem; list-style: none; padding: 0; margin: 0; }
.tag-list li { margin: 0; }
.tag-list a, .category-badge { text-decoration: none; }
.tag-list a:hover, .category-badge:hover { color: var(--link); }
.back-link, .archive-link, .feed-link { font-size: .875rem; }
.back-link { margin-top: 1.25rem; }
.archive-link { margin-top: 2rem; }
.category-list { margin-bottom: 1.5rem; font-size: .875rem; }

.post-card { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .65rem 1.5rem; padding-block: 1.75rem; border-bottom: 1px solid var(--line); }
.post-card:first-child { padding-top: 0; }
.post-card-body { flex: 1; min-width: 0; }
.post-card h2 { font-size: 1.5rem; margin: 0 0 .35rem; letter-spacing: -.025em; }
.post-card h2 a { color: inherit; text-decoration: none; }
.post-card h2 a:hover { color: var(--link); }
.post-date { color: var(--muted); font-size: .8125rem; text-decoration: none; }
.post-date:hover { color: var(--link); }
.post-summary { margin: .65rem 0 0; font-size: 1.125rem; }
.post-card-meta { display: flex; flex-basis: 100%; min-width: 0; align-items: center; gap: 1rem; }
.post-card-meta .post-taxonomy { flex: 1; min-width: 0; }
.post-card-body > :first-child { margin-top: 0; }
.post-card-image-link { flex: 0 0 6rem; margin-top: .25rem; }
.post-card-image { display: block; width: 6rem; height: 6rem; object-fit: cover; border-radius: 8px; }
.minimal-post-list { list-style: none; padding: 0; margin-top: 2rem; }
.minimal-post-list li { display: flex; align-items: center; gap: 1rem; margin: 0; border-bottom: 1px solid var(--line); }
.minimal-post-list__row { display: grid; flex: 1; min-width: 0; grid-template-columns: 9rem 1fr; gap: 1rem; padding-block: .8rem; text-decoration: none; }
.minimal-post-list__row time { color: var(--muted); font-size: .8125rem; }
.minimal-post-list__row:hover span { color: var(--text); }

input, button { font: inherit; font-size: 1rem; border: 1px solid var(--line); border-radius: 6px; padding: .6rem .8rem; color: var(--text); background: var(--background); min-height: 44px; }
input { min-width: 0; }
input::placeholder { color: var(--muted); opacity: 1; }
button { background: var(--surface); cursor: pointer; font-weight: 600; }
button:hover { border-color: var(--muted); }
.updoot { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: .25rem .5rem; border-radius: 999px; background: transparent; color: var(--muted); font-size: .875rem; font-weight: 400; line-height: 1; cursor: pointer; touch-action: manipulation; user-select: none; }
.updoot_inner { display: inline-flex; align-items: center; gap: .4rem; }
.updoot--empty .updoot_count, .updoot_bubble { display: none; }
.updoot:hover:not([aria-disabled="true"]) { background: var(--surface); color: var(--link); }
.updoot[aria-disabled="true"] { opacity: .65; cursor: default; }
.search-form { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin-bottom: 2rem; font-size: .875rem; }
.search-form input { flex: 1 1 12rem; }
.passcode-form { display: grid; gap: .75rem; max-width: 22rem; }
.passcode-form button { justify-self: start; }
.pagination { justify-content: center; gap: .35rem; margin-top: 2rem; font-size: .875rem; }
.pagination :is(a, strong) { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: .4rem .75rem; border-radius: 6px; text-decoration: none; }
.pagination strong, .pagination a:hover { background: var(--surface); }
.empty-state { color: var(--muted); padding-block: 1rem; }
.eyebrow { color: var(--muted); font-size: .875rem; margin-bottom: .5rem; }
.site-footer { border-top: 1px solid var(--line); padding-block: 1.5rem 3rem; margin-top: 3.5rem; color: var(--muted); font-size: .8125rem; }
.site-footer nav:has(a) { margin-top: 1rem; }
.site-footer p { margin-bottom: .75rem; }
.site-hitcounter { margin-top: 1rem; text-align: center; }

/* Scribbles' lightbox script supplies utility classes, but not their CSS. */
.lightbox-container { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: clamp(1rem, 5vw, 3rem); background: color-mix(in srgb, var(--background) 85%, transparent); backdrop-filter: blur(8px); }
.lightbox-container.hidden, .lightbox-container [hidden] { display: none; }
body:has(.lightbox-container:not(.hidden)) { overflow: hidden; }
.lightbox__image { cursor: zoom-in; }
.lightbox-container .lightbox--image-tag { position: relative; z-index: 1; display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-out; }
.lightbox-container > div { position: absolute; color: var(--muted); }
.lightbox-container > div svg { width: 3rem; height: 3rem; animation: lightbox-spin 1s linear infinite; }
.lightbox-container button { position: absolute; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; padding: .5rem; background: var(--background); color: var(--text); }
.lightbox-container button[hidden] { display: none; }
.lightbox-container button svg { width: 1.5rem; height: 1.5rem; }
.lightbox-container button:disabled { opacity: .3; cursor: default; }
.lightbox--button { top: 1rem; right: 1rem; }
.lightbox--prev { top: 50%; left: 1rem; transform: translateY(-50%); }
.lightbox--next { top: 50%; right: 1rem; transform: translateY(-50%); }
.lightbox--counter { position: absolute; z-index: 2; bottom: 1rem; left: 50%; transform: translateX(-50%); border-radius: 999px; padding: .25rem .75rem; background: var(--background); color: var(--text); font-size: .875rem; }
@keyframes lightbox-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lightbox-container > div svg { animation: none; } }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: .5rem; left: 1rem; transform: translateY(-200%); padding: .5rem 1rem; background: var(--background); z-index: 10; }
.skip-link:focus { transform: none; }

@media (max-width: 480px) {
  .site-header { padding-top: 1.75rem; }
  .post-card { column-gap: 1rem; }
  .post-card-image-link { flex-basis: 4rem; }
  .post-card-image { width: 4rem; height: 4rem; }
  .minimal-post-list__row { grid-template-columns: 1fr; gap: .15rem; }
}

@media print {
  :root { --background: #fff; --text: #000; --muted: #444; --line: #ccc; --surface: #fff; --link: #000; }
  body { font-size: 12pt; }
  .wrap { width: 100%; }
  .site-header { padding-top: 0; }
  .site-nav, .skip-link, .search-form, .pagination, .back-link, .site-footer { display: none; }
  .prose pre { white-space: pre-wrap; }
}
