/* Preserved legacy article styles, moved out of authored Markdown. */
.pl-c {
  color:#6a737d;
  font-style: italic;  
}
.pl-c1 {
  color:#005cc5
}
.pl-en {
  color:#6f42c1
}
.pl-smi {
  color:#24292e
}
.pl-k {
  color:#d73a49
}
.pl-pds,
.pl-s {
  color:#032f62
}
.pl-c {
 color:#6a737d
}
.pl-c1 {
 color:#005cc5
}
.pl-en {
 color:#6f42c1
}
.pl-smi {
 color:#24292e
}
.pl-k {
 color:#d73a49
}
.pl-pds,
.pl-s {
 color:#032f62
}
/* Keep long code and embedded media within the reading column. */
.post-content pre { overflow-x:auto; }
.post-content iframe { max-width:100%; }
/* Photos never run past the column, as the editor shows them. */
.post-content img { max-width:100%; height:auto; }

/* The editor's sections, drawn with site.css's tokens, so they follow its light and dark themes, and laid
   out by the .site wrapper's width (container queries), so the editor's canvas shows them as the site does.
   Phone is the base below 700px. */

/* Photo galleries: two to four across, as square tiles or whole photos; four become two on phones. */
.site .gallery { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px; align-items:start; margin:0 0 1.5em; }
.site .gallery.cols-2 { grid-template-columns:repeat(2, minmax(0, 1fr)); }
.site .gallery.cols-4 { grid-template-columns:repeat(4, minmax(0, 1fr)); }
.site .gallery figure { margin:0; min-width:0; }
.site .gallery a { display:block; cursor:zoom-in; }
.site .gallery img { display:block; width:100%; height:auto; border-radius:var(--corner); }
.site .gallery.square img { aspect-ratio:1; object-fit:cover; }
.site .gallery.fit img { object-fit:contain; background:var(--paper-2); }
.site .gallery figcaption { margin-top:6px; font-size:14px; line-height:1.4; color:var(--ink-3); }
@container site (max-width: 699px) { .site .gallery { gap:6px; } .site .gallery.cols-4 { grid-template-columns:repeat(2, minmax(0, 1fr)); } }

/* A photo beside text: the photo takes two fifths of the column; on phones it comes first, full width. */
.site .split { display:grid; grid-template-columns:2fr 3fr; gap:28px; align-items:start; margin:0 0 1.5em; }
.site .split.photo-right { grid-template-columns:3fr 2fr; }
.site .split.photo-right > figure { order:2; }
.site .split > figure { margin:0; min-width:0; }
.site .split > figure img { display:block; width:100%; height:auto; border-radius:var(--corner); }
.site .split-text { min-width:0; }
.site .split-text > :first-child { margin-top:0; }
.site .split-text > :last-child { margin-bottom:0; }
@container site (max-width: 699px) { .site .split, .site .split.photo-right { grid-template-columns:1fr; gap:14px; } .site .split.photo-right > figure { order:0; } }

/* Carousel: one large photo lined up with the text column, its neighbors running out to both edges of
   the window. On wide windows the right side runs behind the post's sidebar, which then sits over it.
   Where there's little room beside the column the photo narrows so its neighbors still show (--peek), and
   it's never taller than most of the window. --site is the window's width (the .site wrapper) and --bleed
   how far the column is from its left edge, both measured where the carousel starts. Without the script
   it's a strip that swipes and scrolls, each photo as wide as the column; carousel.js adds the frame (a
   container, so 100cqw inside it is the column), the arrows, the dots, and wrapping around. */
@property --site { syntax:'<length>'; inherits:true; initial-value:0px; }
@property --bleed { syntax:'<length>'; inherits:true; initial-value:0px; }
.site :not(.carousel-frame) > .gallery.carousel, .site .carousel-frame {
  --site:100cqw; --bleed:calc((100cqw - min(100cqw, var(--max) + var(--gl) + var(--gr))) / 2 + var(--gl));
  --peek:clamp(20px, calc(var(--site) * .05), 64px); --gap:12px;
}
.site .gallery.carousel { position:relative; display:flex; gap:var(--gap); align-items:flex-start; overflow-x:auto; overscroll-behavior-x:contain; scroll-snap-type:x mandatory;
  margin-left:calc(-1 * var(--bleed)); margin-right:calc(var(--bleed) + 100% - var(--site)); padding-left:var(--bleed); padding-right:calc(var(--site) - var(--bleed) - 100%);
  scroll-padding-left:var(--bleed); scrollbar-width:thin; }
.site .gallery.carousel > figure { flex:0 0 100%; scroll-snap-align:start; }
.site .gallery.carousel img { aspect-ratio:3/2; object-fit:cover; }
.site .gallery.carousel.fit img { object-fit:contain; background:var(--paper-2); }
.site .gallery.carousel figcaption { text-align:center; }
.site .carousel-frame { position:relative; margin:0 0 1.5em; container-type:inline-size;
  --slide:min(100cqw - 2 * max(0px, var(--peek) + var(--gap) - min(var(--bleed), var(--site) - var(--bleed) - 100cqw)), 120svh); }
.site .carousel-frame .gallery.carousel { margin-block:0; margin-left:calc(-1 * var(--bleed)); margin-right:calc(var(--bleed) + 100cqw - var(--site));
  padding-left:calc(var(--bleed) + (100cqw - var(--slide)) / 2); padding-right:calc(var(--site) - var(--bleed) - (100cqw + var(--slide)) / 2);
  scroll-padding-left:calc(var(--bleed) + (100cqw - var(--slide)) / 2); scrollbar-width:none; }
.site .carousel-frame .gallery.carousel > figure { flex-basis:var(--slide); }
.site .gallery.carousel:has(> figure:only-child), .site .carousel-frame .gallery.carousel:has(> figure:only-child) { margin-inline:0; padding-inline:0; scroll-padding-left:0; }
.site .carousel-frame .gallery.carousel:has(> figure:only-child) > figure { flex-basis:100%; }
.site .carousel-frame .gallery.carousel::-webkit-scrollbar { display:none; }
.site .carousel-frame .gallery.carousel.dragging { scroll-snap-type:none; cursor:grabbing; }
.site .carousel-frame figure { transition:opacity .3s; }
.site .carousel-frame figure:not(.is-current) { opacity:.45; cursor:pointer; }
.site .carousel-frame figure:not(.is-current) figcaption { visibility:hidden; }
.site .carousel-controls { position:absolute; top:0; left:50%; width:var(--slide); aspect-ratio:3/2; translate:-50% 0; display:flex; align-items:center; justify-content:space-between; padding:0 10px; pointer-events:none; }
.site .carousel-arrow { display:grid; place-items:center; width:40px; height:40px; padding:0; border:0; border-radius:50%; background:#fffffff0; box-shadow:0 2px 10px rgba(0,0,0,.25); color:#15181c; cursor:pointer; pointer-events:auto; }
.site .carousel-arrow:hover { background:#fff; color:#1b587c; }
.site .carousel-dots { display:flex; flex-wrap:wrap; justify-content:center; gap:2px; margin-top:6px; }
.site .carousel-dots button { width:22px; height:22px; padding:0; border:0; background:none; cursor:pointer; }
.site .carousel-dots button::before { content:""; display:block; width:8px; height:8px; margin:auto; border-radius:50%; background:var(--line); }
.site .carousel-dots button[aria-current=true]::before { background:var(--link); }
.site .carousel-status { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.site .carousel-arrow:focus-visible, .site .carousel-dots button:focus-visible { outline:3px solid var(--link); outline-offset:2px; }
/* Where a carousel runs behind the sidebar, the sidebar sits over it, frosted in the page's own color. */
.site .page-main:has(.gallery.carousel) .post-aside { --frost:color-mix(in srgb, var(--paper) 86%, transparent); position:relative; z-index:1; background:var(--frost); box-shadow:0 0 18px 14px var(--frost);
  -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); }
@container site (max-width: 699px) { .site .gallery.carousel, .site .carousel-frame { --gap:8px; } .site .carousel-arrow { width:34px; height:34px; } }
@media (prefers-reduced-motion: reduce) { .site .carousel-frame figure { transition:none; } }

/* Link cards: 1, 2, or 3 across (two to start), each the site's pager card, the older and newer links'
   card: white on the paper with a thin line around it, a small capitals label (a post's date, or the other
   site's name with ↗), a bold condensed title, and the line. With pictures, each starts with a photo, or a
   color or gradient with words on it. On phones they're one across, each picture a small square beside the
   words. Wider, a row that isn't full stretches its cards to fill it, and a card alone in its row lies on its
   side, picture beside words, as every card does at one across. Six tracks let three across leave two cards
   sharing a row equally. Roger chose this over open rows like the blog list and dark cards like the header. */
.site .link-cards { display:grid; grid-template-columns:minmax(0, 1fr); gap:10px; margin:0 0 1.5em; }
.site .link-cards > a { display:flex; flex-direction:column; min-width:0; overflow:hidden; border-radius:var(--corner); background:var(--card); box-shadow:inset 0 0 0 1px var(--line);
  color:var(--ink); font-size:15px; line-height:1.5; text-decoration:none; transition:box-shadow .15s; }
.site .link-cards > a:hover { color:var(--ink); box-shadow:inset 0 0 0 1.5px var(--link); }
.site .link-cards > a > :is(img, .art) { order:-2; }
.site .link-cards > a > small { order:-1; margin:12px 14px 16px; font:600 12px/1.3 var(--sans); letter-spacing:.1em; text-transform:uppercase; color:var(--ink-3); }
.site .link-cards > a:is([href^="http"], [data-away]) > small::after { content:" \2197"; letter-spacing:0; }
.site .link-cards > a > b { margin:0 14px 4px; font:700 20px/1.15 var(--cond); color:var(--link); }
.site .link-cards > a:not(:has(> small:not(:empty))) > b { margin-top:12px; }
.site .link-cards > a > span { margin:0 14px 12px; font-size:15.5px; color:var(--ink-2); }
.site .link-cards > a > img { display:block; }
.site .link-cards > a > :is(img, .art) { width:100%; height:auto; aspect-ratio:16/9; object-fit:cover; }
.site .link-cards.pictures > a { display:grid; grid-template-columns:96px minmax(0, 1fr); align-content:start; }
.site .link-cards.pictures > a > :is(img, .art) { grid-row:1 / span 4; height:100%; min-height:96px; aspect-ratio:auto; font-size:18px; }
.site .link-cards.pictures > a > :not(img, .art) { grid-column:2; }
@container site (min-width: 700px) {
  .site .link-cards { grid-template-columns:repeat(6, minmax(0, 1fr)); gap:14px; }
  .site .link-cards > a { grid-column:span 3; font-size:16px; }
  .site .link-cards > a > small { margin:16px 18px 16px; }
  .site .link-cards > a > b { margin:0 18px 6px; font-size:22px; }
  .site .link-cards > a:not(:has(> small:not(:empty))) > b { margin-top:16px; }
  .site .link-cards > a > span { margin:0 18px 16px; }
  .site .link-cards.pictures > a { display:flex; }
  .site .link-cards.pictures > a > :is(img, .art) { height:auto; min-height:0; aspect-ratio:16/9; font-size:28px; }
  .site .link-cards.cols-3 > a { grid-column:span 2; }
  .site .link-cards.cols-1 > a,
  .site .link-cards.cols-2 > a:nth-of-type(2n+1):last-of-type,
  .site .link-cards.cols-3 > a:nth-of-type(3n+1):last-of-type { grid-column:1 / -1; }
  .site .link-cards.cols-3 > a:nth-of-type(3n+1):nth-last-of-type(2),
  .site .link-cards.cols-3 > a:nth-of-type(3n+2):last-of-type { grid-column:span 3; }
  .site .link-cards.pictures.cols-1 > a,
  .site .link-cards.pictures.cols-2 > a:nth-of-type(2n+1):last-of-type,
  .site .link-cards.pictures.cols-3 > a:nth-of-type(3n+1):last-of-type { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 2fr); align-content:center; }
  .site .link-cards.pictures.cols-1 > a > :is(img, .art),
  .site .link-cards.pictures.cols-2 > a:nth-of-type(2n+1):last-of-type > :is(img, .art),
  .site .link-cards.pictures.cols-3 > a:nth-of-type(3n+1):last-of-type > :is(img, .art) { height:100%; min-height:132px; aspect-ratio:auto; }
}
/* A card's picture when it isn't a photo: a color or gradient from the logo's palette, with words on it. */
.art { display:grid; place-items:center; padding:8px 12px; font:700 28px/1.05 var(--cond); font-style:normal; text-align:center; color:#fff; overflow-wrap:anywhere; }
.art.color-blue { background:var(--blue); } .art.color-red { background:var(--red); } .art.color-yellow { background:var(--yellow); color:#15181c; }
.art.color-ink { background:#15181c; } .art.color-mist { background:#e9eff4; color:#1b587c; }
.art.gradient-dusk { background:linear-gradient(135deg, #15181c, var(--blue)); } .art.gradient-ocean { background:linear-gradient(135deg, var(--blue), #7fb2dd); }
.art.gradient-sunrise { background:linear-gradient(135deg, var(--yellow), var(--red)); } .art.gradient-ember { background:linear-gradient(135deg, var(--red), #15181c); }
.art.gradient-sky { background:linear-gradient(135deg, #e9eff4, #bcd3e6); color:#1b587c; }

/* A row of buttons: the site's outlined button (.btn .btn-ghost in site.css), left or centered. */
.site .buttons { display:flex; flex-wrap:wrap; gap:10px; margin:0 0 1.5em; }
.site .buttons.center { justify-content:center; }
.site .buttons > .button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:0 18px; border-radius:999px; font:600 15px/1.2 var(--sans); color:var(--ink);
  text-decoration:none; box-shadow:inset 0 0 0 1.5px var(--line); transition:transform .15s ease, box-shadow .15s ease; }
.site .buttons > .button:hover { transform:translateY(-1px); color:var(--link-hover); box-shadow:inset 0 0 0 1.5px var(--link-hover); }
@media (prefers-reduced-motion: reduce) { .site .buttons > .button { transition:none; } .site .buttons > .button:hover { transform:none; } }
/* GitHub-style classes for code colored by the editor's highlighter. The legacy samples use none of these. */
.pl-e, .pl-en { color:#6f42c1 }
.pl-ent { color:#22863a }
.pl-sr { color:#032f62 }
.pl-cce { color:#22863a; font-weight:bold }
.pl-mh { color:#005cc5; font-weight:bold }
.pl-mb { color:#24292e; font-weight:bold }
.pl-mi { color:#24292e; font-style:italic }
.pl-mi1 { color:#22863a; background-color:#f0fff4 }
.pl-md { color:#b31d28; background-color:#ffeef0 }
.pl-ii { color:#fafbfc; background-color:#b31d28 }
