:root {
  /* The original theme's font sizes (WordPress fluid type). */
  --font-small: clamp(0.825rem, 0.825rem + ((1vw - 0.2rem) * 0.56), 1.0625rem);
  --font-medium: clamp(1rem, 1rem + ((1vw - 0.2rem) * 0.588), 1.25rem);
  --font-large: clamp(1.75rem, 1.75rem + ((1vw - 0.2rem) * 0.588), 2rem);
  --font-x-large: clamp(2.5rem, 2.5rem + ((1vw - 0.2rem) * 1.176), 3rem);
  --wp--preset--spacing--20: .44rem;
  --wp--preset--spacing--30: .5rem;
  --wp--preset--spacing--40: 1rem;
  --wp--preset--spacing--50: clamp(1.5rem, 2.41vw, 2rem);
  --wp--preset--spacing--60: clamp(1.5rem, 3.61vw, 3rem);
  --wp--preset--spacing--70: clamp(2rem, 4.82vw, 4rem);
  --wp--preset--spacing--80: clamp(3rem, 7.23vw, 6rem);
}
* { box-sizing: border-box; }
body { margin: 0; color: #000; font-weight: 300; line-height: 1.6; }
a { color: inherit; text-underline-offset: .17em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.skip { position: absolute; left: 24px; top: 0; padding: .5rem 1rem; background: white; transform: translateY(-110%); z-index: 1; }
.skip:focus { transform: none; }
.header { display: flex; align-items: end; justify-content: space-between; }
.header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.header nav a { text-decoration: none; }
.header nav a:hover { text-decoration: underline; }
img, video { max-width: 100%; height: auto; }
figure { margin: 0; }
.content figure + figure { margin-top: 1.5rem; }
.content img { display: block; }
.content figcaption { font-size: medium; margin-top: .5em; }
.content iframe { max-width: 100%; border: 0; }
.content pre { overflow: auto; }
.content table { max-width: 100%; border-collapse: collapse; }
.content td, .content th { padding: .35rem; border: 1px solid currentColor; }
.content blockquote { margin-inline: 0; padding: 0 0 0 var(--wp--preset--spacing--50); border-inline-start: 1px solid #fed24b; }
.content .wp-block-quote > * { margin-block: 1.5rem 0; }
.content .wp-block-quote > :first-child { margin-top: 0; }
.content :where(ul, ol) { padding-left: var(--wp--preset--spacing--70); }
.content hr { border: 0; border-top: 1px solid; margin-inline: 0; }
.content > :first-child { margin-top: 0; }
.content > :last-child { margin-bottom: 0; }
.heading h1 { font-weight: 300; margin: 0; line-height: 1.4; }
.wp-block-columns, .wp-block-gallery { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.wp-block-column, .wp-block-gallery figure { flex: 1 1 200px; min-width: 0; }
/* Image galleries, as WordPress lays them out: the number of columns the post chose (3 if none), two on phones,
   a short last row filling the width, and cropped pictures when the post asks for it. */
.wp-block-gallery.has-nested-images { --gallery-gap: 24px; gap: var(--gallery-gap); align-items: normal; }
.wp-block-gallery.has-nested-images figure.wp-block-image { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; margin: 0;
  width: calc(33.33% - var(--gallery-gap) * .66667); }
.wp-block-gallery.has-nested-images.columns-1 figure.wp-block-image { width: 100%; }
.wp-block-gallery.has-nested-images.columns-2 figure.wp-block-image { width: calc(50% - var(--gallery-gap) * .5); }
.wp-block-gallery.has-nested-images.columns-4 figure.wp-block-image { width: calc(25% - var(--gallery-gap) * .75); }
.wp-block-gallery.has-nested-images.columns-5 figure.wp-block-image { width: calc(20% - var(--gallery-gap) * .8); }
.wp-block-gallery.has-nested-images.columns-6 figure.wp-block-image { width: calc(16.66% - var(--gallery-gap) * .83333); }
@media (max-width: 599px) { .wp-block-gallery.has-nested-images:not(.columns-1) figure.wp-block-image { width: calc(50% - var(--gallery-gap) * .5); } }
.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image img { flex: 1 0 0%; width: 100%; height: 100%; object-fit: cover; }
.wp-block-gallery.has-nested-images figure.wp-block-image { position: relative; }
.content .wp-block-gallery.has-nested-images figure.wp-block-image figcaption { position: absolute; bottom: 0; left: 0; width: 100%; max-height: 60%; overflow: auto;
  margin: 0; padding: 13px; box-sizing: border-box; color: #fff; font-size: 13px; text-align: center; text-shadow: 0 0 1.5px #000;
  background: linear-gradient(0deg, rgba(0,0,0,.4), rgba(0,0,0,0)); }
.content .wp-block-gallery.has-nested-images figure.wp-block-image figcaption a { color: inherit; }
.content .wp-block-gallery figure + figure { margin-top: 0; }
/* Jetpack tiled galleries: rows of picture groups, each picture with a 2px margin. navigation.js scales a row down to fit a narrow screen, as Jetpack's script did. */
.tiled-gallery { clear: both; overflow: hidden; }
.tiled-gallery .gallery-row { overflow: hidden; }
.tiled-gallery .gallery-group, .tiled-gallery .tiled-gallery-item { float: left; position: relative; }
.content .tiled-gallery .tiled-gallery-item img { display: block; margin: 2px; max-width: none; }
.wp-block-embed__wrapper { overflow-wrap: anywhere; }
/* Video embeds keep their shape (16:9 or 4:3) and fill the width, as on the original. */
.wp-has-aspect-ratio .wp-block-embed__wrapper { position: relative; }
.wp-has-aspect-ratio .wp-block-embed__wrapper::before { content: ""; display: block; padding-top: 50%; }
.wp-embed-aspect-21-9 .wp-block-embed__wrapper::before { padding-top: 42.85%; }
.wp-embed-aspect-16-9 .wp-block-embed__wrapper::before { padding-top: 56.25%; }
.wp-embed-aspect-4-3 .wp-block-embed__wrapper::before { padding-top: 75%; }
.wp-embed-aspect-1-1 .wp-block-embed__wrapper::before { padding-top: 100%; }
.wp-embed-aspect-9-16 .wp-block-embed__wrapper::before { padding-top: 177.77%; }
.wp-embed-aspect-1-2 .wp-block-embed__wrapper::before { padding-top: 200%; }
.wp-has-aspect-ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Wide and full-width pictures stretch to the column, as on the original. */
.wp-block-image.alignwide img, .wp-block-image.alignfull img { width: 100%; }
.alignleft { float: left; margin-right: 1rem; }
.alignright { float: right; margin-left: 1rem; }
.aligncenter { margin-inline: auto; }
.search-controls { display: flex; flex-wrap: nowrap; }
form[role="search"] { max-width: 680px; }
form[role="search"] label { display: block; }
form[role="search"] input { flex: 1 1 auto; min-width: 3rem; margin: 0; padding: 8px; border: 1px solid #949494; border-radius: 0; background: #fff; color: inherit; appearance: none; line-height: inherit; }
form[role="search"] button { flex: none; margin: 0 0 0 10px; padding: calc(.667em + 2px) calc(1.333em + 2px); border: 0; border-radius: 0; background: #fed24b; color: #000; line-height: inherit; cursor: pointer; transition: background-color .12s, color .12s; }
form[role="search"] button:hover, form[role="search"] button:focus-visible { background: #1a1a1a; color: #fed24b; }
input, button { font: inherit; }
.footer ul { list-style: none; padding: 0; }
/* The home site's Inter file. Sharing it means the browser keeps it cached between the home page and the blog. */
@font-face { font-family: Inter; src: url('/assets/inter-variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
body { --edge: var(--wp--preset--spacing--60); border-left: 20px solid #fed24b; background: #fff;
  font-family: Inter, sans-serif; font-size: clamp(1rem, 1rem + ((1vw - .2rem) * .588), 1.25rem); }
/* Short pages: the search box and footer sit at the bottom of the window (issue #116, option B). */
body { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
.header { padding: var(--wp--preset--spacing--50) var(--edge); min-height: 112px; }
.logo { display: block; width: clamp(26px, 3.4vw, 48px); }
.heading { padding: clamp(2rem, 4.6vw, 4.4rem) var(--edge) 2.15rem; }
.heading h1 { max-width: 680px; font-size: var(--font-x-large); }
.heading .meta { margin-top: 2rem; font-size: var(--font-small); }
/* Posts: as on the original, the title, date and panel are spaced by the theme's spacing-50 (32px on a desktop, 24px on a phone). */
.heading.post { padding-top: calc(2 * var(--wp--preset--spacing--50)); padding-bottom: var(--wp--preset--spacing--50); }
.heading.post .meta { margin-top: var(--wp--preset--spacing--50); }
.heading .meta a { text-decoration: none; }
.heading.home { padding-top: clamp(2.75rem, 4vw, 3.55rem); padding-bottom: clamp(3rem, 4vw, 3.6rem); }
.heading.home h1 { font-size: clamp(1.75rem, 1.55rem + .42vw, 2rem); font-weight: 550; }
/* Blog, category, tag and date archive titles: the original's large size, weight 500. */
.heading.blog h1, .heading.archive h1 { font-size: var(--font-large); font-weight: 500; }
.heading.blog, .heading.archive { padding-top: var(--edge); padding-bottom: var(--edge); }
/* Archives: more room above the page links and below them, as on the original. */
.listing:not(.blog-list) { padding-bottom: calc(var(--edge) + var(--wp--preset--spacing--50)); }
.listing:not(.blog-list) .pagination { margin-top: calc(1.5rem + var(--wp--preset--spacing--50)); }
/* With only one page the original keeps the empty space of its page links (1.5rem above, spacing-50 above and below). */
.listing:not(.blog-list):not(:has(.pagination)) { padding-bottom: calc(var(--edge) + 1.5rem + 2 * var(--wp--preset--spacing--50)); }
.content, .listing { background: #fbf8f2; padding: var(--edge); }
/* Like the original theme's layout: every block of a post or page is at most 680 px wide, whatever it is (text, image, embed)
   and whatever wraps it (the Jetpack markdown block, a group, a plain div), so the text inside a wrapper is held too.
   Blocks are 1.5rem apart; text inside a wrapper keeps the browser's own spacing, as on the original. */
.content > * { max-width: 680px; margin-block: 1.5rem 0; }
.content :where(h1, h2, h3, h4, h5, h6) { font-weight: 300; line-height: 1.25; }
.content h2 { font-size: var(--font-large); line-height: 1.4; }
.content h3 { font-size: var(--font-medium); font-weight: 500; line-height: 1.6; }
.content h4 { font-size: clamp(1.25rem, calc(1.25rem + ((1vw - 0.48rem) * 0.4808)), 1.5rem); }
.content h5 { font-size: var(--font-medium); }
.content h6 { font-size: var(--font-small); }
.content .has-tertiary-background-color { background: #fbf8f2; }
/* The end of a post: a rule, then Previous and Next in two columns (one under the other on phones). */
.content > .post-end { margin-top: 0; }
.post-end hr { margin: var(--wp--preset--spacing--80) 0 0; }
.post-nav { display: flex; gap: 0 24px; margin-top: var(--wp--preset--spacing--70); }
.post-nav > div { flex: 1 1 0; min-width: 0; padding-block: var(--wp--preset--spacing--30); }
.post-nav-prev { font-size: clamp(16.834px, 1.052rem + ((1vw - 3.2px) * 1.348), 26px); }
.post-nav-next { font-size: clamp(16.293px, 1.018rem + ((1vw - 3.2px) * 1.28), 25px); }
@media (max-width: 781px) { .post-nav { flex-wrap: wrap; } .post-nav > div { flex-basis: 100%; } .post-nav > div:empty { display: none; } }
main.home .content { padding: 0; }
main.home .content > div { padding-inline: var(--edge); }
main.home .content > div p { max-width: 680px; }
main.home .content > div:has(> figure) { padding-inline: 0; }
main.home .content > div > figure { max-width: none !important; }
main.home .content > div > figure img { width: 100% !important; }
main.home .content > div > p:first-child { margin-top: 0; }
.listing > * { max-width: 680px; }
.post-list { padding: 0; margin: 0; list-style: none; }
.post-list a { text-decoration: none; }
.post-list a:hover { text-decoration: underline; }
/* The blog listing, as on the original: title and date in a row, a full rule under each, extra space above the list and below the page links. */
.blog-list { padding-top: calc(var(--edge) + var(--wp--preset--spacing--70)); padding-bottom: calc(var(--edge) + var(--wp--preset--spacing--70) + var(--wp--preset--spacing--80)); }
.blog-list .post-list li { display: flex; align-items: first baseline; gap: 24px; border-bottom: 1px solid; padding: 20px 0; }
.blog-list .post-list a { flex: 1 1 auto; min-width: 0; padding-block: var(--wp--preset--spacing--30);
  font-size: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 1), 1.3rem); }
.blog-list .post-list time { flex: 0 0 auto; white-space: nowrap; text-align: right; font-size: var(--font-small); }
/* Category, tag and date archives: the short date in a column, then the title; a dotted rule under each. */
.archive-list li { display: flex; gap: 24px; padding-bottom: .6rem; border-bottom: 1px dotted #999; }
.archive-list li + li { margin-top: 1.5rem; }
.archive-list time { flex: 0 0 auto; min-width: 20%; white-space: nowrap; font-size: var(--font-small); }
.archive-list a { flex: 0 1 90%; min-width: 0; font-size: var(--font-medium); font-weight: 400; line-height: 1.4; }
@media (max-width: 781px) { .archive-list li { flex-wrap: wrap; } .archive-list time, .archive-list a { flex-basis: 100%; } }
/* Page links. The blog listing lists them from the left; archives put Next Page on the right. */
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 1.5rem; }
.listing:not(.blog-list) .pagination { justify-content: space-between; }
.listing:not(.blog-list) .pagination [rel="next"]:last-child { margin-inline-start: auto; }
.page-numbers-list { display: flex; gap: .25em; }
/* The search box sits under the panel, then the footer line. Search has more room above it on listing pages. */
.footer { --search-space: var(--wp--preset--spacing--50); padding: var(--search-space) var(--edge) var(--wp--preset--spacing--50); }
main.archive + .footer { --search-space: var(--edge); }
.footer > form { margin-bottom: calc(var(--search-space) + var(--wp--preset--spacing--50)); }
.footer > p { font-size: var(--font-small); margin: 0; }
.footer > p + p { margin-top: 1em; }
/* Search, as on the original: the search box at the top of the page, then the panel with "Search results for: …" and the
   results, each title on the left and its short date on the right, with Previous Page and Next Page below. */
/* Page not found, as on the original: the heading (large, weight 500, "Sorry!" bold) and the options line on white; then the
   panel, at least 55% of the window tall, with the options and the search box (label hidden), 1.5rem apart. */
.not-found-top, .not-found-panel { padding: var(--edge); }
.not-found-top > * { max-width: 680px; margin: 0; }
.not-found-top h1 { font-size: var(--font-large); font-weight: 500; line-height: 1.4; }
.not-found-top h1 strong { font-weight: 700; }
.not-found-top > * + * { margin-top: 1.5rem; }
.not-found-panel { display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem; min-height: 55vh; box-sizing: border-box; background: #fbf8f2; }
.not-found-panel > * { max-width: 680px; margin: 0; }
.not-found-panel label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
main.search .search-top { padding: var(--edge); }
.search-list h2 { margin: 0; font-size: var(--font-large); font-weight: 300; line-height: 1.4; }
.search-list h2 + * { margin-top: var(--edge); }
.search-list [role="status"] { margin-bottom: 0; }
.search-results-list time { flex-shrink: 0; text-align: right; white-space: nowrap; }
@media (min-width: 782px) { .search-results-list a { flex-basis: 80%; } .search-results-list time { flex-basis: 20%; } }
@media (max-width: 600px) {
  body { border-left-width: 19px; }
  .header { min-height: 76px; align-items: center; }
  .heading.home { padding-top: 2.85rem; }
}

/* Shared header on mathewwilson.me. These values copy site/assets/site.css in the home site,
   so the header, menu, logo and yellow edge stay still when a reader moves between the home page and the blog. */
/* The yellow edge is drawn like the home site's (a strip, not a border): browsers round borders to whole pixels, which moved the menu by a fraction of a pixel. */
body:has(> .site-header) { border-left: 0; padding-left: clamp(0.5rem, 0.198rem + 1.29vw, 1.25rem); }
body:has(> .site-header)::before { content: ""; position: fixed; inset: 0 auto 0 0; width: clamp(0.5rem, 0.198rem + 1.29vw, 1.25rem); background: #fed24b; z-index: 2; pointer-events: none; }
/* The menu stays on the left at every width, in line with the blog content (no centred max-width box). */
.header.site-header { width: 100%; min-height: 0; align-items: center; gap: clamp(1.25rem, 1.173rem + 0.327vw, 1.5rem);
  padding: clamp(1.25rem, 1.02rem + 0.98vw, 2rem); font-feature-settings: "cv11"; font-optical-sizing: none; }
.site-header .site-nav { display: flex; padding-left: 10px; flex-wrap: wrap; align-items: center; gap: 8px clamp(1.5rem, 1.347rem + 0.653vw, 2rem);
  font-size: clamp(1.0625rem, 1.005rem + 0.245vw, 1.25rem); line-height: 1.6; }
.site-header .site-nav a { display: inline-grid; justify-items: center; padding: 2px 10px; margin-inline: -10px; text-decoration: none; font-weight: 300;
  transition: font-weight .2s ease, background-color .2s ease; }
.site-header .site-nav a::after { content: attr(data-label); font-weight: 500; height: 0; overflow: hidden; visibility: hidden; user-select: none; pointer-events: none; }
.site-header .site-nav a:hover, .site-header .site-nav a:focus-visible, .site-header .site-nav a[aria-current="page"] { background: #fed24b; font-weight: 500; text-decoration: none; }
.site-header .logo-link { flex: none; margin-left: auto; border-radius: 50%; }
.site-header .logo { width: clamp(2.5rem, 2.309rem + 0.816vw, 3.125rem); height: auto; aspect-ratio: 1; }
@media (prefers-reduced-motion: reduce) { .site-header .site-nav a { transition: none; } }
/* Subscribe page (the RSS menu link). */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.subscribe > * { max-width: 40rem; }
.subscribe h2 { font-size: var(--font-medium); font-weight: 500; margin: 2.5rem 0 .25rem; }
.subscribe h2 + p { margin-top: 0; }
.subscribe .subscribe-lede { font-size: var(--font-medium); }
.subscribe-copy { display: flex; gap: .5rem; margin-top: 1rem; }
.subscribe-copy input { flex: 1 1 auto; min-width: 0; font: inherit; padding: .6rem .75rem; border: 1px solid #949494; border-radius: 0; background: #fff; color: inherit; }
/* Buttons follow the search button: yellow, no border, normal weight. Hover inverts to black (never underlined). */
.subscribe-copy button, .subscribe-button { display: inline-block; font: inherit; padding: calc(.667em + 2px) calc(1.333em + 2px); border: 0; border-radius: 0;
  background: #fed24b; color: #1a1a1a; line-height: inherit; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .12s, color .12s; }
.subscribe-copy button:hover, .subscribe-copy button:focus-visible, .subscribe-button:hover, .subscribe-button:focus-visible { background: #1a1a1a; color: #fed24b; text-decoration: none; }
.subscribe-fallback { font-size: var(--font-small); margin-top: .5rem; }
/* Online readers: smaller white outline buttons, on one line where there is room. */
.subscribe > .subscribe-readers { max-width: none; }
.subscribe-readers { list-style: none; padding: 0 !important; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
@media (min-width: 700px) { .subscribe-readers { flex-wrap: nowrap; } }
.subscribe-readers .subscribe-button { font-size: var(--font-small); padding: .5em 1em; background: #fff; box-shadow: inset 0 0 0 1px #1a1a1a; }
.subscribe-readers .subscribe-button:hover, .subscribe-readers .subscribe-button:focus-visible { background: #1a1a1a; color: #fff; }
.subscribe-note { margin-top: 2.5rem; font-size: var(--font-small); }
.subscribe-note p { margin: 0; }
