/* Nocode site stylesheet: blog */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/source-serif-4/source-serif-4-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/source-serif-4/source-serif-4-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/literata/literata-latin-ext-italic.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/literata/literata-latin-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/literata/literata-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/literata/literata-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --primary: #2196f3;
  --primary-ink: #0071bf;
  --primary-soft: #d6eaff;
  --on-primary: #0b1723;
  --accent: #2196f3;
  --accent-ink: #0071bf;
  --bg: #f7fafe;
  --surface: #eef2f7;
  --surface-2: #e3e9ee;
  --border: #d2d8df;
  --text: #131b24;
  --text-muted: #5b646e;
  --link: #0071bf;
  --heading-ink: #131b24;
  --primary-color: #2196f3;
  --accent-color: #2196f3;
  --background-color: #f7fafe;
  --shadow-rgb: 19 27 36;
  --font-display: "Source Serif 4", Georgia, Cambria, "Times New Roman", Times, serif;
  --font-body: "Literata", Georgia, Cambria, "Times New Roman", Times, serif;
  --font-mono: "SF Mono", Monaco, Consolas, "Liberation Mono", monospace;
  --heading-font: "Source Serif 4", Georgia, Cambria, "Times New Roman", Times, serif;
  --body-font: "Literata", Georgia, Cambria, "Times New Roman", Times, serif;
  --sidebar-width: 280px;
  --topbar-height: 80px;
  --measure: 68ch;
  --frame: 62rem;
  --content-width: 62rem;

  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --gutter: clamp(1rem, 4.5vw, 3rem);
  --section: clamp(3rem, 2rem + 5vw, 6rem);

  --step--2: 0.75rem;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.375rem, 1.25rem + 0.6vw, 1.5625rem);
  --step-3: clamp(1.625rem, 1.4rem + 1.1vw, 1.953rem);
  --step-4: clamp(1.953rem, 1.55rem + 2vw, 2.441rem);
  --step-5: clamp(2.441rem, 1.8rem + 3.2vw, 3.052rem);
  --step-6: clamp(2.75rem, 1.6rem + 5.6vw, 4.768rem);

  --body-size: 1.0625rem;
  --leading: 1.65;
  --leading-tight: 1.1;
  --radius: 4px;
  --img-radius: 0;
  --wide-side: max(0px, (var(--frame) - var(--measure)) / 2);
}

/* ---------- Reset and document ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: var(--leading);
  font-kerning: normal;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}
h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, pre, table, hr, dl, dd { margin: 0; }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
::selection { background: var(--primary-soft); color: var(--text); }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--primary-ink); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -10rem;
  z-index: 100;
  padding: var(--space-2xs) var(--space-sm);
  background: var(--text);
  color: var(--bg);
  font-size: var(--step--1);
  text-decoration: none;
}
.skip-link:focus { top: var(--space-sm); }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Header ---------- */
.header { background: var(--bg); border-bottom: 1px solid var(--border); }
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs) var(--space-md);
  min-height: var(--topbar-height);
  max-width: var(--header-max, calc(var(--frame) + 2 * var(--gutter)));
  margin-inline: auto;
  padding: var(--space-xs) var(--gutter);
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-inline-end: auto;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 700;
  line-height: 1.1;
}
.site-brand:hover { color: var(--text); }
.site-brand .logo { display: block; width: auto; height: clamp(2rem, var(--topbar-height) * 0.55, 3.25rem); max-width: 60vw; object-fit: contain; }
.header-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-md); }
.topnav-link {
  display: inline-block;
  padding-block: var(--space-2xs);
  color: var(--text);
  font-size: var(--step--1);
  text-decoration: none;
}
.topnav-link:hover, .topnav-link[aria-current="page"] { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; }

/* The sidebar disclosure: a checkbox and its label, no script */
.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
}
.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  min-height: 2.75rem;
  padding: 0 var(--space-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: var(--step--1);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.nav-toggle:focus-visible ~ .header .menu-toggle { outline: 2px solid var(--primary-ink); outline-offset: 2px; }
.nav-toggle:checked ~ .header .menu-toggle { background: var(--surface-2); }

/* ---------- Page frame: sidebars and main column ---------- */
.main-wrapper { flex: 1 0 auto; display: flex; flex-direction: column; width: 100%; }
.content-wrapper { flex: 1; min-width: 0; }
.content-main { padding-block: var(--space-xl) var(--section); }

.sidebar {
  display: none;
  order: -1;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--space-sm) var(--gutter) var(--space-md);
}
.nav-toggle:checked ~ .main-wrapper .sidebar { display: block; }
.sidebar-nav { display: flex; flex-direction: column; gap: 1px; }
.nav-item a {
  display: block;
  padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius);
  color: var(--text);
  font-size: var(--step--1);
  line-height: 1.35;
  text-decoration: none;
}
.nav-item a:hover { background: var(--surface-2); }
.nav-item.active a { background: var(--primary-soft); font-weight: 600; }
.nav-item.is-folder > a { font-weight: 600; }
.nav-item.depth-1 { padding-left: var(--space-sm); }
.nav-item.depth-2 { padding-left: var(--space-lg); }
.nav-item.depth-3 { padding-left: var(--space-xl); }
.nav-item.depth-4 { padding-left: var(--space-2xl); }

@media (min-width: 900px) {
  .menu-toggle { display: none; }
  .main-wrapper { flex-direction: row; align-items: stretch; }
  .sidebar {
    display: block;
    flex: 0 0 var(--sidebar-width);
    width: var(--sidebar-width);
    padding: var(--space-lg) var(--space-sm);
    border-bottom: 0;
  }
  .sidebar-left { border-right: 1px solid var(--border); }
  .sidebar-right { order: 2; border-left: 1px solid var(--border); }
  .sidebar-nav {
    position: sticky;
    top: var(--space-lg);
    max-height: calc(100vh - 2 * var(--space-lg));
    overflow-y: auto;
  }
}

/* ---------- Article grid and flow ---------- */
.content {
  display: grid;
  grid-template-columns:
    [full-start] minmax(var(--gutter), 1fr)
    [wide-start] minmax(0, var(--wide-side))
    [text-start] minmax(min(var(--measure) / 2, 50% - var(--gutter)), calc(var(--measure) / 2))
    [mid] minmax(min(var(--measure) / 2, 50% - var(--gutter)), calc(var(--measure) / 2))
    [text-end] minmax(0, var(--wide-side))
    [wide-end] minmax(var(--gutter), 1fr)
    [full-end];
  align-content: start;
}
.content > * { grid-column: text; min-width: 0; }
.content > * + * { margin-top: var(--flow, 1.1em); }

.content h1, .content h2, .content h3, .content h4, .content h5, .content h6 {
  font-family: var(--font-display);
  font-weight: var(--heading-weight, 700);
  line-height: var(--leading-tight);
  text-wrap: balance;
}
.content h1 { font-size: var(--step-5); }
.content h2 { font-size: var(--step-3); }
.content h3 { font-size: var(--step-2); }
.content h4 { font-size: var(--step-1); }
.content h5, .content h6 { font-size: var(--step-0); }
.content > h2 { margin-top: var(--space-xl); }
.content > :is(h3, h4, h5, h6) { margin-top: var(--space-lg); }
.content > :is(h1, h2, h3, h4, h5, h6) + * { margin-top: var(--space-xs); }
.content > :is(h1, h2, h3, h4, h5, h6) + :is(h2, h3) { margin-top: var(--space-md); }
.content p { text-wrap: pretty; }
.content strong, .content b { font-weight: 700; }
.align-center { text-align: center; }
.align-right { text-align: right; }

/* ---------- Page header ---------- */
.content > .page-header { display: flex; flex-direction: column; gap: var(--space-xs); margin-bottom: var(--space-lg); }
.page-header h1, .page-header .doc-title, .page-header .page-title, .content .doc-title {
  font-size: var(--step-6);
  line-height: 1.04;
  letter-spacing: -0.015em;
}
.page-header .doc-subtitle, .doc-subtitle {
  max-width: 40em;
  color: var(--text-muted);
  font-size: var(--step-1);
  line-height: 1.4;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-xs);
  margin: 0;
  color: var(--text-muted);
  font-size: var(--step--1);
  font-variant-numeric: lining-nums;
}
.post-author::before { content: "\00B7"; margin-inline-end: var(--space-xs); }

/* ---------- Images and media ---------- */
.hero { grid-column: wide; margin: 0 0 var(--space-xl); }
.content > .hero + * { margin-top: 0; }
.hero img {
  display: block;
  width: 100%;
  max-height: min(78vh, 42rem);
  object-fit: cover;
  border-radius: var(--img-radius);
}
.doc-image img { display: block; border-radius: var(--img-radius); }
.doc-image.align-center img { margin-inline: auto; }
.doc-image.align-right img { margin-left: auto; }
.content > .doc-image { margin-top: var(--space-lg); }
.content > .doc-image + * { margin-top: var(--space-lg); }
figcaption { margin-top: var(--space-2xs); color: var(--text-muted); font-size: var(--step--1); }
.content p img { vertical-align: middle; }
.nocode-video { background: var(--surface-2); }

/* ---------- Lists ---------- */
.content ul, .content ol { padding-left: 1.35em; }
.content li::marker { color: var(--text-muted); }
.content > :is(ul, ol):not(.folder-list, .post-list) li + li { margin-top: 0.35em; }
.content > :is(ul, ol):not(.folder-list, .post-list) + :is(ul, ol) { margin-top: 0.35em; }
.lvl-1 { margin-left: 1.5em; }
.lvl-2 { margin-left: 3em; }
.lvl-3 { margin-left: 4.5em; }
.lvl-4 { margin-left: 6em; }
.lvl-5 { margin-left: 7.5em; }
.lvl-6 { margin-left: 9em; }
.lvl-7 { margin-left: 10.5em; }
.lvl-8 { margin-left: 12em; }
ul.lvl-1 { list-style-type: circle; }
ul.lvl-2 { list-style-type: square; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.content > .table-wrap { margin-top: var(--space-md); }
.content table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
}
/* Typographic, not a spreadsheet: hairline rows, a firmer rule under the header,
   no vertical lines. Docs exports have no <th>, so the first row is the header. */
.content td, .content th {
  padding: var(--space-xs) var(--space-md) var(--space-xs) 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.content td:last-child, .content th:last-child { padding-right: 0; }
.content tr:first-child td, .content th {
  padding-top: 0;
  border-bottom-color: var(--text-muted);
  color: var(--text);
  font-weight: 600;
}
td p { margin: 0; }
td p + p { margin-top: 0.5em; }

/* ---------- Code, quotes, rules ---------- */
code, kbd, samp, pre { font-family: var(--font-mono); font-size: 0.88em; }
:not(pre) > code {
  padding: 0.08em 0.32em;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface);
  overflow-wrap: anywhere;
}
pre {
  padding: var(--space-sm) var(--space-md);
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  line-height: 1.55;
}
blockquote {
  position: relative;
  padding: var(--space-2xs) 0 var(--space-2xs) var(--space-xl);
  font-size: var(--step-1);
  font-style: italic;
  line-height: 1.5;
}
blockquote::before {
  content: "\201C";
  position: absolute;
  left: 0;
  top: -0.05em;
  color: var(--primary-ink);
  font-family: var(--font-display);
  font-size: 3em;
  font-style: normal;
  line-height: 1;
}
hr { height: 0; border: 0; border-top: 1px solid var(--border); }
.content > hr { margin-block: var(--space-xl); }
sup, sub { line-height: 0; }

/* ---------- Listings ---------- */
.post-index { grid-column: wide; margin-top: var(--section); }
.content > .post-list { grid-column: wide; }
.post-list, .content .post-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.post {
  display: grid;
  gap: var(--space-sm);
  padding-block: var(--space-lg);
  border-top: 1px solid var(--border);
}
.post:first-child { padding-top: 0; border-top: 0; }
.post:last-child { padding-bottom: 0; }
.post-thumb { display: block; overflow: hidden; border-radius: var(--img-radius); background: var(--surface-2); }
.post-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.post-body { display: flex; flex-direction: column; gap: var(--space-2xs); min-width: 0; }
.post-title { margin: 0; font-family: var(--font-display); font-size: var(--step-3); font-weight: var(--heading-weight, 700); line-height: 1.15; text-wrap: balance; }
.post-title a { color: var(--text); text-decoration: none; }
.post-title a:hover { text-decoration: underline; text-decoration-color: var(--primary); text-decoration-thickness: 2px; }
.post-excerpt { margin: 0; max-width: 60ch; color: var(--text-muted); }
@media (min-width: 640px) {
  .post { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--space-lg); align-items: start; }
  .post-body:only-child { grid-column: 1 / -1; }
}

.folder-list, .content .folder-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.folder-list li { border-bottom: 1px solid var(--border); }
.folder-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--step-1);
  text-decoration: none;
}
.folder-list a::after { content: "\2192"; color: var(--primary-ink); transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1); }
.folder-list a:hover::after { transform: translateX(0.25em); }

/* ---------- Breadcrumbs and back/next ---------- */
.breadcrumbs, .back-next { width: min(var(--measure), 100% - 2 * var(--gutter)); margin-inline: auto; }
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-3xs) var(--space-2xs);
  margin-bottom: var(--space-md);
  color: var(--text-muted);
}
.breadcrumbs > * { font-size: var(--step--1); }
.breadcrumb-link { color: var(--text-muted); text-decoration: none; }
.breadcrumb-link:hover { color: var(--link); text-decoration: underline; }
.breadcrumb-current { color: var(--text); }

.back-next { display: grid; gap: var(--space-sm); margin-top: var(--space-2xl); }
.back-next > div:empty { display: none; }
.back-next-link {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
}
.back-next-link:hover { border-color: var(--primary-ink); }
.back-next-link.next { text-align: right; }
.back-next-label { color: var(--text-muted); font-size: var(--step--1); }
.back-next-title { color: var(--link); font-family: var(--font-display); font-weight: 600; line-height: 1.3; }
@media (min-width: 600px) {
  .back-next { grid-template-columns: 1fr 1fr; }
  .back-next > div:empty { display: block; }
}

/* ---------- Footer, social links, badge ----------
   Each template restyles the footer. --footer-bg also colours the badge strip
   below it; .footer-brand (the site name, linking home) shows only where a
   template turns it on. */
.footer { margin-top: auto; background: var(--footer-bg, var(--surface)); border-top: 1px solid var(--border); color: var(--footer-ink, var(--text)); font-size: var(--step--1); }
.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  max-width: var(--header-max, calc(var(--frame) + 2 * var(--gutter)));
  margin-inline: auto;
  padding: var(--space-xl) var(--gutter);
}
.footer-brand { display: none; color: inherit; font-family: var(--font-display); text-decoration: none; }
.footer-left { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-xs) var(--space-lg); }
.footer-copyright { margin: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md); }
.footer-link { color: inherit; text-decoration: none; }
.footer-link:hover { color: var(--link); text-decoration: underline; }
.social-links { display: flex; flex-wrap: wrap; gap: var(--space-3xs); margin-inline: calc(-1 * var(--space-xs)); }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius);
  color: inherit;
}
.social-link:hover { background: var(--surface-2); color: var(--link); }

/* Free-tier badge: a pill that ends the page. generateStylesheet() adds the
   rule that floats it in the bottom-right corner once the margin beside the
   content is wide enough to hold it without covering anything. */
.nocode-badge {
  display: flex;
  justify-content: center;
  padding: 0 var(--gutter) var(--space-md);
  background: var(--footer-bg, var(--surface));
}
.nocode-badge a {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  color: var(--text-muted);
  font: 500 0.75rem/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  text-decoration: none;
}
.nocode-badge strong { color: var(--link); font-weight: 700; }
.nocode-badge a:hover { border-color: var(--link); }

/* ---------- Motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .skip-link, .nav-toggle, .menu-toggle, .header-nav, .sidebar, .breadcrumbs, .back-next,
  .footer-nav, .footer-brand, .social-links, .nocode-badge { display: none !important; }
  body { background: none; font-size: 11pt; }
  .header, .footer { background: none; }
  .footer { color: var(--text); }
  .content-main { padding-block: 0; }
  .content a { color: inherit; }
  .content h2, .content h3, .content h4 { break-after: avoid; }
  .content img, .content figure, .content tr, .post { break-inside: avoid; }
  .hero img { max-height: 50vh; }
}



/* ---------- blog: editorial magazine ---------- */
.theme-blog {
  --body-size: 1.125rem;
  --leading: 1.7;
  --heading-weight: 700;
  --step-6: clamp(2.6rem, 1.5rem + 5vw, 5rem);
}
.theme-blog .header { border-bottom: 0; }
.theme-blog .header-inner {
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-sm);
  padding-block: clamp(1.5rem, 1rem + 2vw, 2.75rem) 0;
  text-align: center;
}
.theme-blog .site-brand {
  justify-content: center;
  margin: 0 auto;
  font-size: clamp(2rem, 1.3rem + 3.2vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.theme-blog .site-brand .logo { height: clamp(2.75rem, 2rem + 2.5vw, 4rem); }
.theme-blog .header-nav {
  justify-content: center;
  gap: 0 var(--space-lg);
  padding-block: var(--space-3xs);
  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--border);
}
.theme-blog .topnav-link {
  font-size: var(--step-0);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.1em;
}
.theme-blog .header-inner:not(:has(.header-nav))::after {
  content: "";
  border-top: 1px solid var(--text);
}

.theme-blog .content > .page-header { align-items: center; gap: var(--space-sm); text-align: center; margin-bottom: var(--space-xl); }
.theme-blog .page-header h1 { max-width: 18ch; }
.theme-blog .page-header .doc-subtitle { font-style: italic; }
.theme-blog .post-meta {
  order: -1;
  color: var(--primary-ink);
  font-size: var(--step-0);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.1em;
  font-weight: 500;
}
.theme-blog .page-header .post-meta { justify-content: center; }
.theme-blog .content > h2 { margin-top: var(--space-2xl); font-size: var(--step-4); }
.theme-blog .content > h3 { font-family: var(--font-body); font-size: var(--step-1); font-weight: 700; }

/* A raised initial opens the first paragraph of a post; it suits paragraphs of any length */
/* The drop cap opens the article: only the paragraph straight after the title or hero */
.theme-blog .content:has(> .page-header .post-meta) > :is(.page-header, .hero) + p::first-letter {
  margin-right: 0.04em;
  color: var(--primary-ink);
  font-family: var(--font-display);
  font-size: 3.2em;
  font-weight: 600;
  line-height: 0.9;
}
.theme-blog .content > .hero + h2 { margin-top: 0; }

/* The masthead already carries the site name, so the index does not repeat it */
.theme-blog .content > .page-header.is-site-name { margin: 0; }
.theme-blog .page-header.is-site-name > h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.theme-blog .content > .page-header.is-site-name:not(:has(> :not(h1))) + * { margin-top: 0; }
.theme-blog .content > .page-header.is-site-name ~ p:first-of-type { font-size: var(--step-1); line-height: 1.5; }

.theme-blog blockquote { font-family: var(--font-display); font-size: var(--step-2); }

/* The post list: the newest post leads, the rest follow in ruled rows */
.theme-blog .post-index::before {
  content: "Latest";
  display: block;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-2xs);
  border-bottom: 1px solid var(--text);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.theme-blog .post-title { font-weight: 600; }
.theme-blog .post-excerpt { color: var(--text); font-size: var(--step-0); }
@media (min-width: 640px) {
  .theme-blog .post { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .theme-blog .post .post-thumb { order: 2; }
  .theme-blog .post:first-child { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .theme-blog .post:first-child .post-thumb { order: 0; }
  .theme-blog .post:first-child .post-title { font-size: var(--step-5); line-height: 1.05; }
  .theme-blog .post:first-child .post-body { align-self: center; }
}
/* Footer: a colophon under a double rule, the masthead turned over */
.theme-blog { --footer-bg: var(--bg); }
.theme-blog .footer { border-top: 0; }
.theme-blog .footer-content {
  flex-direction: column;
  justify-content: center;
  gap: var(--space-sm);
  width: min(100% - 2 * var(--gutter), var(--frame));
  padding: var(--space-lg) 0 var(--space-xl);
  border-top: 3px double var(--text);
  text-align: center;
}
.theme-blog .footer-left { display: contents; }
.theme-blog .footer-brand { display: block; order: 1; font-size: var(--step-3); font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.theme-blog .footer-nav { order: 2; justify-content: center; gap: 0 var(--space-lg); }
.theme-blog .social-links { order: 3; justify-content: center; }
.theme-blog .footer-copyright { order: 4; color: var(--text-muted); }
.theme-blog .footer-link, .theme-blog .footer-copyright { font-size: var(--step-0); font-variant-caps: all-small-caps; letter-spacing: 0.1em; }

@media (min-width: 1408px) {
  .nocode-badge { position: fixed; right: var(--space-md); bottom: var(--space-md); z-index: 100; padding: 0; background: none; }
  .nocode-badge a { box-shadow: 0 2px 8px rgb(var(--shadow-rgb) / 0.18); }
}