:root {
  color-scheme: light;
  --bg: #f3eee1;
  --surface: #fffaf0;
  --surface-2: #e7e1d2;
  --ink: #10242b;
  --muted: #465f60;
  --line: #b9c5bb;
  --accent: #176b57;
  --accent-text: var(--accent);
  --focus: #176b57;
  --masthead: #10242b;
  --masthead-ink: #f3eee1;
  --code-bg: #dce8df;
  --notice: #e2f1e7;
  --font-size: 17px;
  --measure: 76rem;
}
:root:where([data-theme="dark"]) {
  color-scheme: dark;
  --bg: #10242b;
  --surface: #1b373d;
  --surface-2: #29474b;
  --ink: #f3eee1;
  --muted: #bdd0c8;
  --line: #4b6a67;
  --accent: #65d9b3;
  --accent-text: var(--accent);
  --focus: #bba7d7;
  --masthead: #091a20;
  --masthead-ink: #f3eee1;
  --code-bg: #23434a;
  --notice: #204438;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #10242b;
    --surface: #1b373d;
    --surface-2: #29474b;
    --ink: #f3eee1;
    --muted: #bdd0c8;
    --line: #4b6a67;
    --accent: #65d9b3;
    --accent-text: var(--accent);
    --focus: #bba7d7;
    --masthead: #091a20;
    --masthead-ink: #f3eee1;
    --code-bg: #23434a;
    --notice: #204438;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 8rem; }
body { margin: 0; min-width: 0; background: var(--bg); color: var(--ink); font: var(--font-size)/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
::selection { background: var(--accent); color: var(--bg); }
a { color: var(--accent-text); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .13em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
img, svg { max-width: 100%; }
.shell { width: min(calc(100% - 3rem), var(--measure)); margin-inline: auto; }
.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, .honeypot { position: absolute; inset-inline-start: -10000px; }
.skip-link:focus { z-index: 50; inset-inline-start: 1rem; top: 1rem; padding: .5rem 1rem; background: var(--surface); color: var(--ink); }
h1, h2, h3 { font-family: "Arial Narrow", "Roboto Condensed", "Franklin Gothic Medium", Arial, sans-serif; font-stretch: condensed; letter-spacing: -.035em; line-height: 1.13; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.6rem, 5.6vw, 5.5rem); margin: 0; }
h2 { font-size: clamp(1.4rem, 2.3vw, 2rem); }
p { overflow-wrap: break-word; }
.overline, .eyebrow, .page-count, .entry-meta, .revision, .terms-label {
  font-size: .76rem; font-weight: 700; letter-spacing: .085em; text-transform: uppercase;
}
.overline { margin: 0 0 1.1rem; color: var(--accent-text); }
.lede { max-width: 42rem; color: var(--muted); font-size: clamp(1.08rem, 1.5vw, 1.32rem); line-height: 1.5; }
.meta, .page-count, .revision { color: var(--muted); font-variant-numeric: tabular-nums; }
.meta { font-size: .87rem; }
.muted, .field-help { color: var(--muted); }

.site-header { position: sticky; top: 0; z-index: 20; background: var(--masthead); color: var(--masthead-ink); border-block-end: 2px solid var(--accent); }
.header-inner { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem 1.5rem; min-height: 5.3rem; padding-block: .65rem; }
.brand { display: inline-flex; align-items: center; gap: .8rem; max-width: 100%; color: var(--masthead-ink); text-decoration: none; }
.brand-name { font-family: "Arial Narrow", "Franklin Gothic Medium", Arial, sans-serif; font-size: clamp(1.25rem, 1.9vw, 1.7rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.08; }
.brand:not(.brand-with-logo)::before { content: ""; width: .55rem; height: 1.65rem; flex: none; background: var(--accent); transform: skew(-18deg); }
.brand-logo img { display: block; width: auto; height: 2rem; max-width: 7rem; object-fit: contain; }
#site-menu { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem 1rem; margin-inline-start: auto; }
#site-menu a, .language-switch a { color: var(--masthead-ink); text-decoration: none; font-size: .82rem; font-weight: 600; }
#site-menu a { padding: .35rem 0; border-block-end: 2px solid transparent; }
#site-menu a:hover, #site-menu a[aria-current="page"] { border-color: var(--accent); }
.language-switch { display: flex; flex-wrap: wrap; gap: .4rem; }
.language-switch a { border: 1px solid currentColor; padding: .1rem .45rem; }
.language-switch a[aria-current="true"] { background: var(--accent); color: var(--masthead); border-color: var(--accent); }
.theme-switch:not([hidden]) { display: inline-flex; flex-wrap: wrap; gap: .15rem; border: 1px solid #8ca9a2; padding: .14rem; }
.theme-switch button { border: 0; padding: .25rem .4rem; background: transparent; color: var(--masthead-ink); font: inherit; font-size: .72rem; cursor: pointer; }
.theme-switch button[aria-pressed="true"] { background: var(--accent); color: var(--masthead); font-weight: 700; }
.menu-toggle { display: none; align-items: center; gap: .5rem; border: 1px solid var(--masthead-ink); background: transparent; color: var(--masthead-ink); padding: .5rem .7rem; font: inherit; cursor: pointer; }
.menu-icon { width: 1.2rem; height: .85rem; fill: none; stroke: currentColor; stroke-width: 2; }

main.shell { padding-block: clamp(2rem, 4vw, 4rem) 5rem; min-height: 55vh; }
body[data-header="centered"] .header-inner { justify-content: center; text-align: center; }
body[data-header="centered"] #site-menu { margin-inline: 0; justify-content: center; }

.home-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.24fr); border-block: 1px solid var(--line); }
.home-identity { padding: clamp(1.5rem, 3vw, 3.5rem) clamp(1.5rem, 4vw, 4rem) 2rem 0; }
.home-identity h1 { max-width: 11ch; }
.home-identity .lede { margin-block: 2rem; }
.home-identity .page-count { margin-top: 2.5rem; }
.lead { display: grid; grid-template-rows: 1fr auto; min-width: 0; background: var(--masthead); color: var(--masthead-ink); }
.lead-copy { padding: clamp(1.5rem, 3vw, 3rem); }
.lead .overline { color: var(--accent); }
.lead .eyebrow { margin-top: 1.5rem; }
.lead .eyebrow a, .lead h2 a { color: var(--masthead-ink); }
.lead h2 { font-size: clamp(1.8rem, 3vw, 3.1rem); margin: .5rem 0 1rem; }
.lead-summary { color: #d1dfd5; }
.lead .meta { color: #d1dfd5; }
.lead .text-action { color: var(--accent); }
.lead-media { display: block; min-width: 0; }
.lead-media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.text-action { display: inline-block; margin-block-start: 1rem; font-weight: 700; text-decoration: none; border-block-end: 2px solid currentColor; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem 1.5rem; margin-block: 3rem .5rem; border-block-end: 2px solid var(--ink); }
.section-heading h2 { margin: 0 0 .6rem; font-size: 1.4rem; }
.section-heading a { font-size: .85rem; font-weight: 700; }
.term-row { display: flex; flex-wrap: wrap; gap: .4rem .8rem; padding-block: 1rem; border-block-end: 1px solid var(--line); }
.term-row a { color: var(--ink); font-size: .86rem; text-decoration: none; border-block-end: 2px solid transparent; }
.term-row a:hover, .term-row a[aria-current="page"] { color: var(--accent-text); border-color: var(--accent); }
.chip-count { color: var(--muted); font-size: .8em; }

.entries { list-style: none; padding: 0; margin: 0; }
.entry { display: grid; grid-template-columns: minmax(8rem, .85fr) minmax(0, 2.5fr) minmax(0, 1fr); gap: 1.5rem; padding-block: 2rem; border-block-end: 1px solid var(--line); min-width: 0; }
.entry-meta { color: var(--muted); line-height: 1.5; }
.entry-meta time { display: block; margin-bottom: .8rem; }
.eyebrow { margin: 0; color: var(--accent-text); }
.eyebrow a { color: inherit; text-decoration: none; }
.entry h2 { margin: 0; font-size: clamp(1.55rem, 2.4vw, 2.45rem); max-width: 25ch; }
.entry h2 a, .tool-link { color: var(--ink); text-decoration: none; }
.entry h2 a:hover, .tool-link:hover h2 { color: var(--accent-text); text-decoration: underline; }
.entry-summary { max-width: 55ch; margin: .8rem 0 0; color: var(--muted); }
.revision { margin: .8rem 0 0; }
.entry-media { align-self: start; }
.entry-media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.terms { display: flex; align-items: baseline; flex-wrap: wrap; gap: .3rem 1rem; margin: 1rem 0 0; font-size: .83rem; }
.terms a { text-decoration: none; border-block-end: 1px solid currentColor; }
.empty-state { margin-block: 2rem; padding: 2rem; background: var(--surface); border-inline-start: 4px solid var(--accent); }

.page-intro { padding-block: 1rem 2.5rem; border-block-end: 2px solid var(--ink); }
.page-intro h1 { margin-top: .5rem; }
.page-intro .lede { margin-bottom: 0; }
.page-intro-line { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 1rem; }
.breadcrumb { font-size: .82rem; color: var(--muted); }
.breadcrumb a { color: inherit; }
.pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 2px solid var(--ink); font-size: .86rem; }
.pager a { font-weight: 700; }
.pager-off { color: var(--muted); }
.pager-pages { display: flex; flex-wrap: wrap; gap: .7rem; list-style: none; padding: 0; margin: 0; }
.pager-pages a[aria-current="page"] { color: var(--ink); text-decoration: none; border-block-end: 3px solid var(--accent); }

.post-head { max-width: 65rem; padding-block: 1rem 2.5rem; }
.post-back { margin: 0 0 3rem; font-size: .85rem; }
.post-head h1 { max-width: 18ch; margin: .8rem 0 1.5rem; }
.post-head .lede { max-width: 48rem; }
.post-head .meta { display: flex; flex-wrap: wrap; gap: .2rem .5rem; margin-top: 2rem; }
.post-cover { margin: 0 0 3rem; max-width: 65rem; }
.post-cover img { display: block; width: 100%; height: auto; }
.reading-layout { display: grid; grid-template-columns: minmax(10rem, 15rem) minmax(0, 43rem); gap: clamp(2rem, 5vw, 6rem); align-items: start; }
.reading-side { min-width: 0; }
.toc { position: sticky; top: 8rem; border-block-start: 2px solid var(--accent); color: var(--muted); font-size: .82rem; }
.toc p { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.toc ol { padding-inline-start: 1.2rem; }
.toc li { margin-block: .55rem; }
.toc a { color: inherit; }
.prose { min-width: 0; max-width: 43rem; overflow-wrap: anywhere; }
.prose p, .prose ul, .prose ol { margin-block: 0 1.35rem; }
.prose li { margin-block: .35rem; }
.prose h2 { font-size: clamp(1.65rem, 2.7vw, 2.2rem); margin: 2.6rem 0 1rem; }
.prose h3 { font-size: 1.4rem; margin: 2rem 0 .8rem; }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: 8rem; }
.prose img { max-width: 100%; height: auto; }
.prose figure { max-width: 100%; margin: 2rem 0; }
.prose figcaption { color: var(--muted); font-size: .85rem; }
.prose blockquote { margin: 2rem 0; padding: .2rem 1.3rem; border-inline-start: 4px solid var(--accent); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.5rem; }
.prose code, .comment-body { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.prose :not(pre) > code { background: var(--code-bg); padding: .12em .35em; font-size: .87em; }
.prose pre { max-width: 100%; overflow-x: auto; padding: 1.2rem; background: var(--code-bg); border-inline-start: 3px solid var(--accent); font-size: .85rem; }
.prose pre code { white-space: pre; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin-block: 1.5rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .5rem .7rem; text-align: start; }
.prose th { background: var(--surface-2); }
.post-foot { margin: 3rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); }
.related { margin-top: 4rem; }
.subscribe-panel { max-width: 65rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 2rem; margin-top: 4rem; padding: 2rem; background: var(--surface-2); border-inline-start: 5px solid var(--accent); }
.subscribe-panel h2 { margin: 0; }
.back { margin-top: 2rem; font-size: .86rem; }

.support-layout { display: grid; grid-template-columns: minmax(0, 43rem) minmax(12rem, 1fr); gap: clamp(2rem, 6vw, 7rem); padding-block: 3rem; }
.support-aside { align-self: start; border-block-start: 3px solid var(--accent); padding-top: 1rem; color: var(--muted); }
.support-aside h2 { margin: 0; font-size: 1.25rem; color: var(--ink); }
.message-page { max-width: 55rem; margin: clamp(2rem, 7vw, 7rem) 0; padding-block: 2rem; border-block: 2px solid var(--ink); }
.secondary-action { display: inline-block; margin-inline-start: 2rem; }
.contact-form, .subscribe-form, .search-page-form { min-width: 0; }
.contact-form { display: grid; gap: .5rem; }
.contact-form label, .subscribe-form label, .search-page-form label { font-size: .85rem; font-weight: 700; }
.contact-form input, .contact-form textarea, .subscribe-form input, .search-page-form input, .search-form input, .comment-form input, .comment-form textarea {
  width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 0; padding: .7rem .8rem;
  background: var(--surface); color: var(--ink); font: inherit;
}
.contact-form textarea { resize: vertical; }
.contact-form label:not(:first-child) { margin-top: .7rem; }
button { font: inherit; }
.contact-form button, .subscribe-form button, .search-page-form button, .comment-form button, .tool-actions button {
  width: max-content; max-width: 100%; border: 1px solid var(--accent); padding: .7rem 1.3rem;
  background: var(--accent); color: var(--bg); font-weight: 700; cursor: pointer;
}
button:hover { filter: brightness(1.12); }
.form-line { display: flex; gap: .5rem; }
.form-line input { flex: 1; }
.search-page-form { max-width: 52rem; margin-top: 2rem; }
.search-page-form label { display: block; margin-bottom: .5rem; }
.field-help { font-size: .86rem; }
[data-form-status]:empty { display: none; }

.search-dialog { width: min(48rem, calc(100vw - 2rem)); max-height: 78vh; margin: 8vh auto auto; padding: 0; background: var(--surface); color: var(--ink); border: 2px solid var(--accent); box-shadow: 0 2rem 4rem #0007; }
.search-dialog::backdrop { background: #07181acc; }
.search-dialog[open] { display: flex; flex-direction: column; }
.search-form { display: flex; gap: .5rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.search-form input { border: 0; background: var(--bg); }
.search-close { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); cursor: pointer; padding: .4rem .7rem; }
.search-status, .search-foot { margin: 0; padding: .75rem 1rem; color: var(--muted); font-size: .84rem; }
.search-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; border-top: 1px solid var(--line); }
.search-results { list-style: none; padding: 0; margin: 1rem 0; }
.search-dialog .search-results { overflow: auto; margin: 0; padding: .5rem 1rem; }
.search-hit { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.search-results.has-media .search-hit { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 1rem; }
.search-hit-media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.search-hit h2 { margin: 0; font-size: 1.3rem; }
.search-hit h2 a { color: var(--ink); text-decoration: none; }
.search-hit-summary, .search-hit .meta { margin: .3rem 0 0; color: var(--muted); font-size: .85rem; }
.search-hit-body { min-width: 0; }
html:has(.search-dialog[open]) { overflow: hidden; }

[data-blog-comments], .comments { max-width: 65rem; margin-top: 3rem; }
.comments { border-top: 2px solid var(--ink); padding-top: 1rem; }
.comment-list { list-style: none; padding: 0; }
.comment { padding-block: 1.2rem; border-bottom: 1px solid var(--line); }
.comment-meta { display: flex; flex-wrap: wrap; gap: 1rem; }
.comment-meta time { color: var(--muted); font-size: .85rem; }
.comment-body { white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; }
.comment-pages { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.comment-form { display: grid; max-width: 43rem; gap: .5rem; margin-block: 2rem; }
.comment-form label { font-weight: 700; }
.comment-form textarea { resize: vertical; }
.comment-notice, .comment-error, .form-error { padding: 1rem; background: var(--notice); border-inline-start: 4px solid var(--accent); }
.comment-error, .form-error { border-color: #b45a61; }

.blog-tools .page-intro, .blog-tool .page-intro { margin-bottom: 2rem; }
.tool-cards { list-style: none; padding: 0; margin: 0; }
.tool-cards li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 3rem; border-bottom: 1px solid var(--line); padding-block: 2rem; }
.tool-link img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 1rem; }
.tool-link h2 { margin: 0; }
.tool-cards li > p { color: var(--muted); margin: 0; }
.blog-tool { max-width: 65rem; }
.tool-instructions { max-width: 43rem; }
.tool-runtime { min-width: 0; margin-block: 2rem; }
.tool-runtime > * { max-width: 100%; }
.tool-frame { display: block; width: 100%; min-height: 28rem; border: 1px solid var(--line); background: var(--surface); }
.tool-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-block: 1rem; }
.tool-limitations { padding: 1rem 1.5rem; background: var(--notice); border-inline-start: 4px solid var(--accent); }
.tool-limitations p { margin: 0; }

.site-footer { background: var(--masthead); color: var(--masthead-ink); border-block-start: 3px solid var(--accent); }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; padding-block: 3rem; }
.footer-brand { font-family: "Arial Narrow", Arial, sans-serif; font-size: 1.6rem; font-weight: 800; letter-spacing: -.04em; }
.site-footer a { color: var(--masthead-ink); }
.site-footer p { margin: .5rem 0; font-size: .85rem; color: #d1dfd5; }
.footer-nav { display: flex; flex-wrap: wrap; align-content: start; gap: .5rem 1.4rem; }
.footer-nav a { font-size: .85rem; }
.footer-small { grid-column: 1 / -1; padding-top: 1rem; border-top: 1px solid #64827c; overflow-wrap: anywhere; }

@media (max-width: 980px) {
  .header-inner { justify-content: space-between; }
  #site-menu { width: 100%; margin-inline-start: 0; }
  .language-switch { margin-inline-start: auto; }
  .entry { grid-template-columns: 8rem minmax(0, 1fr) 10rem; }
  .reading-layout { grid-template-columns: minmax(0, 1fr); }
  .reading-side { order: 0; }
  .toc { position: static; max-width: 43rem; }
}
@media (max-width: 720px) {
  .shell { width: min(calc(100% - 2rem), var(--measure)); }
  .site-header[data-menu] .menu-toggle { display: inline-flex; margin-inline-start: auto; }
  .site-header[data-menu] #site-menu { display: none; }
  .site-header[data-menu="open"] { position: relative; }
  .site-header[data-menu="open"] #site-menu { display: flex; flex-direction: column; align-items: stretch; gap: .2rem; padding-block: 1rem; }
  .site-header[data-menu="open"] #site-menu a { padding: .65rem 0; }
  .site-header[data-menu="open"] .theme-switch:not([hidden]) { align-self: start; }
  .language-switch { order: 3; width: 100%; margin-inline-start: 0; }
  .home-intro { grid-template-columns: 1fr; }
  .home-identity { padding: 1.5rem 0; }
  .home-identity h1 { max-width: none; }
  .entry { grid-template-columns: minmax(0, 1fr) 7rem; gap: .7rem 1rem; }
  .entry-meta { grid-column: 1 / -1; }
  .entry-meta time { display: inline; margin-inline-end: 1rem; }
  .entry-copy { grid-column: 1; }
  .entry-media { grid-column: 2; grid-row: 2; }
  .support-layout, .subscribe-panel { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .entry { grid-template-columns: 1fr; }
  .entry-media { grid-column: 1; grid-row: auto; max-width: 15rem; }
  .form-line { flex-wrap: wrap; }
  .form-line input { flex-basis: 100%; }
  .search-dialog { width: 100vw; max-height: calc(100dvh - var(--header-height, 0px)); margin: var(--header-height, 0px) 0 auto; }
  .pager-pages { order: -1; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}