/*
 * Peoples Grocers blog redesign: homepage ("PG Blog Home v2") and entry page
 * ("PG Blog Hero", tabs variant). Loaded after all.css, so every rule is
 * scoped under body.pg to win over the legacy element styles.
 *
 * Breakpoints follow the design's renderVals():
 *   < 640px   mobile layout (compact nav, inline images)
 *   >= 800px  homepage gets the Highlights rail
 *   >= 900px  rail widens from 240px to 280px
 *   >= 1020px entry page shows the hero illustration beside the title
 *   >= 1140px homepage right-hand greebles; >= 1220px the left one too
 */

body.pg {
  --pg-paper: #faf7f2;
  --pg-ink: #1d1a17;
  --pg-link: #0000ee;
  --pg-link-rule: rgba(0, 0, 238, 0.4);
  --pg-rule: rgba(29, 26, 23, 0.15);
  --pg-muted: #6f6862;
  --pg-dark: #282828;
  --pg-dark-2: #3e3e3e;
  --pg-dark-edge: #484848;
  --pg-dark-ink: #f4f3f1;
  --pg-system: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --pg-body: Geist, system-ui, sans-serif;
  --pg-serif: "Instrument Serif", serif;
  background: var(--pg-paper);
  color: var(--pg-ink);
  font-family: var(--pg-body);
  line-height: normal;
  -webkit-font-smoothing: antialiased;
}
body.pg a:link,
body.pg a:visited {
  color: inherit;
  border-bottom: none;
}
body.pg a:hover,
body.pg a:link:hover {
  color: var(--pg-link);
  border-bottom: none;
}
body.pg input::placeholder {
  color: #b3b0ac;
}
.pg-root {
  flex: 1 0 auto;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  background: var(--pg-paper);
}
.pg-icon {
  display: inline-flex;
  flex: none;
  color: inherit;
}
.pg-icon svg {
  display: block;
}

/* Text links styled as in the design: browser blue, underlined */
body.pg a.pg-ul:link,
body.pg a.pg-ul:visited {
  color: var(--pg-link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Brand (logo / name / RSS) ---------- */

.pg-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.pg-brand-logo {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
body.pg a.pg-brand-name {
  font-family: var(--pg-system);
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}
body.pg a.pg-rss {
  display: flex;
  align-items: center;
  gap: 3px;
  align-self: flex-start;
  margin-top: 3px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

/* ---------- Language menu ---------- */

.pg-lang {
  position: relative;
  display: flex;
}
.pg-lang > summary {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  cursor: pointer;
  list-style: none;
}
.pg-lang > summary::-webkit-details-marker {
  display: none;
}
.pg-lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  min-width: 220px;
  padding: 6px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--pg-ink);
}
body.pg .pg-lang-menu a:link,
body.pg .pg-lang-menu a:visited {
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--pg-ink);
  text-decoration: none;
}
body.pg .pg-lang-menu a:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--pg-ink);
}

/* ---------- Compact (mobile) site actions ---------- */

.pg-compact-nav {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
  margin-left: -8px;
  min-width: 0;
  font-size: 15px;
  font-weight: 500;
}
body.pg .pg-compact-nav > a:link,
body.pg .pg-compact-nav > a:visited,
.pg-compact-nav > .pg-lang > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  margin: -10px 0;
  padding: 0 8px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.pg-compact-nav > .pg-lang > summary {
  min-width: 36px;
  padding: 0 6px;
}

/* =========================================================
   Homepage
   ========================================================= */

.pg-home-header {
  position: relative;
  background: var(--pg-dark);
  color: var(--pg-dark-ink);
  border-bottom: 1px solid var(--pg-dark-edge);
  box-shadow: 0 1px 0 #000;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pg-home-header .pg-brand-logo {
  box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--pg-dark-edge);
}
.pg-home-header a.pg-rss {
  color: #a9a39c;
}

/* Perspective grid behind the header */
.pg-grid {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  perspective: 300px;
  perspective-origin: calc(50% - 130px) 2px;
}
.pg-grid-floor {
  position: absolute;
  left: -150%;
  right: -150%;
  top: 40px;
  height: 1100px;
  transform-origin: 50% 0;
  transform: rotateX(76deg);
  background-color: var(--pg-dark);
  background-image: linear-gradient(rgba(244, 243, 241, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 243, 241, 0.18) 1px, transparent 1px),
    linear-gradient(180deg, #1a1919 0%, #2b2a2a 25%, #3b3a39 60%, #4a4847 100%);
  background-size: 30px 20px, 30px 20px, 100% 100%;
  background-position: calc(50% + 15px) 0, calc(50% + 15px) 0, 0 0;
}
.pg-grid-fade {
  position: absolute;
  left: 0;
  right: 0;
  top: 40px;
  height: 60px;
  background: linear-gradient(180deg, var(--pg-dark), rgba(40, 40, 40, 0));
}

.pg-home-row {
  position: relative;
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
}
.pg-home-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
}
.pg-home-nav .pg-compact-nav {
  font-weight: 700;
  margin-left: -5px;
}
body.pg .pg-home-nav .pg-compact-nav > a:link,
body.pg .pg-home-nav .pg-compact-nav > a:visited {
  padding: 0 5px;
}
.pg-home-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
}
body.pg a.pg-home-tab:link,
body.pg a.pg-home-tab:visited {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 20px;
  background: var(--pg-dark-2);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.pg-home-tabs .pg-lang > summary {
  height: 32px;
  padding: 0 0 0 8px;
}

/* Search composer, dark variant */
.pg-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
}
.pg-search {
  flex: 1 1 100%;
  min-width: 0;
}
.pg-search-box {
  background: #000;
  border: 1px solid #444;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #ecebe9;
  transition: border-color 0.15s;
}
.pg-search-box:focus-within {
  border-color: #7a7a7a;
}
.pg-search-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
}
.pg-search-input-row svg {
  flex: none;
}
body.pg .pg-search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: 400 15px var(--pg-body);
  color: #ecebe9;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
}
.pg-search-input::-webkit-search-cancel-button {
  filter: invert(1);
}
.pg-search-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
body.pg a.pg-topic:link,
body.pg a.pg-topic:visited {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 4px;
  border: 1px solid #3d3d3d;
  padding: 3px 9px;
  border-radius: 6px;
  background: #1c1c1c;
  color: #ecebe9;
  font: 400 14px var(--pg-body);
  text-decoration: none;
}
body.pg a.pg-topic:hover {
  filter: brightness(0.96);
  background: #ecebe9;
  color: #000;
}
.pg-topic span {
  font-size: 10.5px;
  opacity: 0.65;
}
body.pg a.pg-topic-more:link,
body.pg a.pg-topic-more:visited {
  flex: none;
  display: flex;
  align-items: center;
  padding: 3px 4px;
  font: 600 14px var(--pg-body);
  letter-spacing: 0.08em;
  color: #ecebe9;
  text-decoration: none;
}
body.pg a.pg-topic-more:hover {
  color: oklch(0.55 0.13 45);
}

/* Entry-type notch and Highlights tab, sitting on the header's bottom edge */
.pg-types-row {
  margin-bottom: -16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 40px;
}
.pg-notch-wrap {
  display: flex;
  min-width: 0;
  margin: 0 0 -2px;
  justify-content: flex-start;
}
.pg-notch {
  position: relative;
  z-index: 2;
  display: inline-flex;
  flex: none;
  width: max-content;
  align-items: center;
  gap: 24px;
  height: 38px;
  padding: 0 28px 2px 20px;
  background: var(--pg-paper);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 100%, 0 100%);
}
body.pg .pg-notch a:link,
body.pg .pg-notch a:visited,
body.pg a.pg-rail-tab:link,
body.pg a.pg-rail-tab:visited {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--pg-ink);
  text-decoration: none;
  text-underline-offset: 3px;
  white-space: nowrap;
}
body.pg .pg-notch a:hover,
body.pg a.pg-rail-tab:hover {
  text-decoration: underline;
  color: var(--pg-ink);
}
.pg-rail-tab-wrap {
  display: none;
  margin: 0 0 -2px;
}
body.pg a.pg-rail-tab:link,
body.pg a.pg-rail-tab:visited {
  display: inline-flex;
  align-items: center;
  flex: none;
  position: relative;
  z-index: 2;
  height: 38px;
  padding: 0 20px 2px;
  background: var(--pg-paper);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 100%, 0 100%);
}

/* Body */
.pg-home-body {
  position: relative;
  padding: 22px 20px 40px;
}
.pg-home-cols {
  max-width: 940px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px 40px;
  align-items: start;
}
.pg-timeline {
  display: flex;
  gap: 20px;
  align-items: stretch;
  min-width: 0;
  max-width: 720px;
}
.pg-timeline-notches {
  flex: none;
  width: 16px;
  align-self: stretch;
  background-image: linear-gradient(rgba(29, 26, 23, 0.22) 1px, transparent 1px);
  background-size: 6px 8px;
}
.pg-timeline-items {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
body.pg h2.pg-day {
  position: relative;
  margin: 12px 0 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.1;
}
body.pg h2.pg-day:first-child {
  margin-top: 2px;
}
.pg-day::before {
  content: "";
  position: absolute;
  left: -36px;
  top: 50%;
  width: 28px;
  height: 2px;
  margin-top: -1px;
  background: var(--pg-ink);
}

.pg-item {
  display: flow-root;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--pg-rule);
  font-size: 16px;
  line-height: 1.55;
}
.pg-item p,
.pg-item ul,
.pg-item ol,
.pg-item pre,
.pg-item blockquote {
  margin: 0 0 12px;
  text-wrap: pretty;
}
.pg-item ul,
.pg-item ol {
  padding-left: 1.4em;
}
.pg-item ul {
  list-style: disc;
}
.pg-item ol {
  list-style: decimal;
}
.pg-item img {
  max-width: 100%;
  height: auto;
}
.pg-item-prose a:link,
.pg-item-prose a:visited {
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.pg a.pg-item-title:link,
body.pg a.pg-item-title:visited {
  display: block;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  text-wrap: pretty;
  text-decoration: none;
  margin-bottom: 10px;
}
.pg-item-crumb {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--pg-muted);
}
body.pg a.pg-item-img:link,
body.pg a.pg-item-img:visited {
  float: right;
  width: 220px;
  aspect-ratio: 4 / 3;
  margin: 2px 0 14px 28px;
  border-radius: 8px;
  overflow: hidden;
}
body.pg a.pg-item-img.pg-left {
  float: left;
  margin: 2px 28px 14px 0;
}
.pg-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pg-item-meta {
  font-size: 15px;
  line-height: 1.5;
}
body.pg .pg-item-meta a:link,
body.pg .pg-item-meta a:visited {
  color: var(--pg-link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pg-quote {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 18px;
}
body.pg .pg-quote blockquote {
  margin: 0;
  padding-left: 14px;
  border-left: 2px solid var(--pg-link);
}
.pg-quote blockquote > :last-child {
  margin-bottom: 0;
}
body.pg .pg-quote p.pg-cite {
  margin: 0;
}

/* Hacker News comment quote: a "risograph clipping". The figure is HN's
   exact cream, clipped to a torn top and bottom edge; RichQuote.tear_polygon
   seeds the tear from the comment URL and the template inlines it. The
   wrapper's drop-shadows follow the clipped shape, so four 1.5px ink shadows
   draw the outline along every jag and a hard 6px orange shadow is the
   offset block. Text and paragraph sizes come from the surrounding page.
   will-change gives the slip its own compositing layer: without it, WebKit
   on iOS paints a tall slip's filter in tiles and leaves a white notch in
   the orange shadow at a tile seam. */
body.pg div.pg-hn-clip {
  margin: 0 6px 6px 0;
  will-change: filter;
  filter: drop-shadow(1.5px 0 0 #1d1a17) drop-shadow(-1.5px 0 0 #1d1a17)
    drop-shadow(0 1.5px 0 #1d1a17) drop-shadow(0 -1.5px 0 #1d1a17)
    drop-shadow(6px 6px 0 #ff6600);
}
body.pg .pg-hn-quote {
  margin: 0;
  padding: 26px 22px 24px;
  background: #f6f6ef;
  color: #1b1b1b;
  line-height: 1.55;
}
body.pg figure.pg-hn-quote blockquote {
  margin: 0;
  padding: 0;
  border: 0;
}
body.pg figure.pg-hn-quote blockquote > * {
  margin: 0 0 0.7em;
}
body.pg figure.pg-hn-quote blockquote > :last-child {
  margin-bottom: 0;
}
body.pg .pg-hn-quote .pg-hn-byline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font: 400 13px Verdana, Geneva, sans-serif;
  color: #828282;
}
body.pg .pg-hn-quote .pg-hn-byline a:link,
body.pg .pg-hn-quote .pg-hn-byline a:visited {
  color: #828282;
  text-decoration: none;
}
body.pg .pg-hn-quote .pg-hn-byline a:hover {
  text-decoration: underline;
}
.pg-hn-y {
  flex: none;
  width: 14px;
  height: 14px;
  background: #ff6600;
  color: #fff;
  font: 700 9px/14px Verdana, sans-serif;
  text-align: center;
}
.pg-richquote {
  padding-bottom: 18px;
}
/* Back-to-back HN quotes: the torn paper edges already separate them. */
.pg-richquote:has(+ .pg-richquote) {
  border-bottom: none;
}
body.pg .pg-richquote div.pg-hn-clip {
  margin-bottom: 20px;
}

/* <rich-omit>: a […] button that swaps with the text the author cut.
   See templates/richquotes/_omit_script.html. */
rich-omit > button {
  all: unset;
  cursor: pointer;
  color: #a8a8a8;
}
rich-omit > [role="button"] {
  cursor: pointer;
  color: #8a8a8a;
  border-bottom: 1px dotted #a8a8a8;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
rich-omit > button,
rich-omit > [role="button"] {
  transition: color 120ms, background-color 120ms;
}
rich-omit > button:hover,
rich-omit > [role="button"]:hover {
  color: #1b1b1b;
}
rich-omit > [role="button"]:hover {
  background: #ebe9df;
}
rich-omit > :focus-visible {
  outline: 2px solid #ff6600;
  outline-offset: 1px;
}
/* all: unset on the button also unsets the UA's [hidden] display: none. */
rich-omit > [hidden] {
  display: none;
}
/* An editor's substitution, [Simon Willison], is grey like […]: the words
   are the editor's, not the author's. */
/* A cut across paragraphs keeps the break in the hidden original; it shows
   as a paragraph gap only once the original is revealed. */
rich-omit .rich-omit-break {
  display: block;
  height: 0.7em;
}
rich-omit b {
  font-weight: inherit;
  color: #a8a8a8;
}

.pg-beat {
  padding-bottom: 14px;
}
.pg-beat .beat-label {
  margin-right: 6px;
}

/* "… 1,420 words →" read-more button */
body.pg a.pg-readmore:link,
body.pg a.pg-readmore:visited {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 34px;
  margin: 4px 0 14px;
  background: var(--pg-ink);
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  text-decoration: none;
  color: var(--pg-ink);
}
body.pg a.pg-readmore:hover {
  color: var(--pg-link);
  background: var(--pg-link);
}
.pg-readmore::before {
  content: "";
  position: absolute;
  inset: 1.5px;
  background: #fff;
  clip-path: polygon(0 0, 100% 0, calc(100% - 9.6px) 100%, 0 100%);
}
.pg-readmore > span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px 0 14px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

/* Highlights rail */
.pg-highlights {
  display: none;
  flex-direction: column;
  gap: 6px;
}
body.pg .pg-highlights p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.4;
  text-wrap: pretty;
}
body.pg .pg-highlights a:link,
body.pg .pg-highlights a:visited {
  color: var(--pg-link);
  text-decoration: underline;
  text-decoration-color: var(--pg-link-rule);
  text-underline-offset: 3px;
}
.pg-highlights p span {
  color: var(--pg-muted);
}
.pg-highlights .sponsor-promo {
  margin-top: 18px;
}

/* Greebles in the side margins */
.pg-greebles {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.pg-greebles div {
  position: absolute;
}
.pg-greeble-left {
  display: none;
}

@media (min-width: 800px) {
  .pg-types-row,
  .pg-home-cols {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
  .pg-search {
    flex: 0 1 calc(100% - 280px);
  }
  .pg-rail-tab-wrap {
    display: flex;
  }
  .pg-highlights {
    display: flex;
  }
}
@media (min-width: 900px) {
  .pg-types-row,
  .pg-home-cols {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .pg-search {
    flex: 0 1 620px;
  }
}
@media (min-width: 1140px) {
  .pg-greebles {
    display: block;
  }
}
@media (min-width: 1220px) {
  .pg-greeble-left {
    display: block;
  }
}

/* =========================================================
   Entry page
   ========================================================= */

.pg-post-header {
  position: relative;
  overflow: hidden;
  background: oklch(0.91 0.04 75);
  color: var(--pg-ink);
  padding: 24px 40px 0 36px;
}
.pg-post-nav {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  /* Skip the share-icon column and gap of .pg-post-cols (40px + 40px), so the
     logo, and the tabs when they wrap, start where the title and body text
     start. */
  padding-left: 80px;
}
.pg-post-nav .pg-brand {
  gap: 14px;
}
.pg-post-nav .pg-brand-logo {
  width: 38px;
  height: 38px;
}
.pg-post-nav .pg-brand-text {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
body.pg .pg-post-nav a.pg-brand-name {
  font-size: 32px;
}
.pg-post-nav a.pg-rss {
  color: #6f7471;
}
.pg-post-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
}
.pg-post-tabs .pg-lang > summary {
  height: 40px;
  padding: 0 6px;
}
body.pg a.pg-post-tab:link,
body.pg a.pg-post-tab:visited {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 24px;
  background: rgba(29, 26, 23, 0.08);
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.pg-post-cols {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 40px;
}
.pg-post-hero {
  position: relative;
  z-index: 2;
  padding: 44px 0 64px;
}
.pg-post-main {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.pg-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 13px;
}
body.pg .pg-post-meta p {
  margin: 0;
}
body.pg .pg-post-meta p a:link,
body.pg .pg-post-meta p a:visited {
  text-decoration: underline;
}
.pg-post-readtime {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pg-post-readtime svg {
  display: block;
  flex: none;
}
.pg-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
body.pg a.pg-post-tag:link,
body.pg a.pg-post-tag:visited {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 20px;
  border: 1px solid rgba(29, 26, 23, 0.4);
  text-decoration: none;
}
body.pg h1.pg-post-title {
  margin: 0;
  font-family: var(--pg-serif);
  font-weight: 400;
  font-size: 64px;
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 680px;
}
.pg-post-side {
  display: none;
  grid-column: 3;
  position: relative;
  z-index: 2;
}
.pg-post-side > div {
  position: absolute;
  top: 0;
  left: 0;
  height: calc(100% + 120px);
  aspect-ratio: 1.4;
  border-radius: 20px;
  overflow: hidden;
}
.pg-post-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pg-post-body {
  gap: 20px 40px;
  padding: 32px 40px 36px 36px;
  align-items: start;
}
.pg-share {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
body.pg a.pg-share-link:link,
body.pg a.pg-share-link:visited {
  display: flex;
  width: 32px;
  height: 32px;
  padding: 4px;
  box-sizing: border-box;
  color: var(--pg-ink);
}
body.pg a.pg-share-link:hover {
  color: var(--pg-link);
}

/* Entry body prose. all.css resets margins, list styles and heading sizes,
   so restore them here. */
.pg-prose {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  max-width: 640px;
  font-size: 18px;
  line-height: 1.7;
}
.pg-prose > div {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
body.pg .pg-prose * {
  margin-top: 0;
  margin-bottom: 0;
}
body.pg .pg-prose a:link,
body.pg .pg-prose a:visited {
  color: var(--pg-link);
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.pg .pg-prose h2,
body.pg .pg-prose h3,
body.pg .pg-prose h4 {
  font-weight: 700;
  line-height: 1.25;
  margin-top: 12px;
}
body.pg .pg-prose h2 {
  font-size: 26px;
}
body.pg .pg-prose h3 {
  font-size: 21px;
}
body.pg .pg-prose h4 {
  font-size: 18px;
}
.pg-prose ul,
.pg-prose ol {
  padding-left: 1.4em;
}
.pg-prose ul {
  list-style: disc;
}
.pg-prose ol {
  list-style: decimal;
}
body.pg .pg-prose li + li {
  margin-top: 6px;
}
body.pg .pg-prose blockquote {
  padding-left: 16px;
  border-left: 2px solid var(--pg-link);
}
.pg-prose img,
.pg-prose video {
  max-width: 100%;
  height: auto;
}
.pg-prose code {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.88em;
}
body.pg .pg-prose pre {
  width: auto;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(29, 26, 23, 0.06);
  font-size: 15px;
  line-height: 1.55;
  overflow: auto;
}
.pg-prose pre code {
  font-size: inherit;
}
.pg-prose table {
  font-size: 16px;
}
.pg-prose th,
.pg-prose td {
  padding: 4px 10px 4px 0;
  border-bottom: 1px solid var(--pg-rule);
}

/* Everything after the article: footer line, series, tags, next/previous */
.pg-post-after {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--pg-rule);
  font-size: 15px;
  line-height: 1.55;
}
body.pg .pg-post-after a:link,
body.pg .pg-post-after a:visited {
  color: var(--pg-link);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pg-post-after ol {
  list-style: decimal;
  padding-left: 1.4em;
}
body.pg .pg-post-after h2 {
  font-size: 17px;
  font-weight: 700;
}
.pg-post-after .edit-page-link {
  font-size: 13px;
}

/* /newsletter/: one email field and a button, in the entry page's column. */
.pg-subscribe {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}
.pg-subscribe label {
  flex: 1 0 100%;
  font-size: 14px;
  font-weight: 500;
}
body.pg .pg-subscribe input[type="email"] {
  flex: 1 1 240px;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid rgba(29, 26, 23, 0.4);
  border-radius: 6px;
  background: #fff;
  color: var(--pg-ink);
  font: 400 17px var(--pg-body);
}
body.pg .pg-subscribe input[type="email"]:focus {
  outline: 2px solid var(--pg-link);
  outline-offset: 1px;
}
body.pg .pg-subscribe button {
  padding: 10px 18px;
  border: 0;
  border-radius: 6px;
  background: var(--pg-dark);
  color: var(--pg-dark-ink);
  font: 500 16px var(--pg-body);
  cursor: pointer;
}
body.pg .pg-subscribe button:hover {
  background: var(--pg-dark-2);
}
/* The field that only a bot fills in. display: none would tell the bot. */
.pg-subscribe-website {
  position: absolute;
  left: -9999px;
}
.pg-subscribe-error {
  color: #a4201c;
  font-size: 15px;
}

@media (min-width: 1020px) {
  .pg-post-hero.pg-has-side {
    grid-template-columns: 40px minmax(0, 10fr) minmax(280px, 340px);
  }
  .pg-post-header.pg-has-side {
    overflow: visible;
  }
  .pg-has-side .pg-post-side {
    display: block;
  }
  .pg-post-body.pg-has-side {
    grid-template-columns: 40px minmax(0, 10fr) minmax(280px, 340px);
  }
}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 639px) {
  .pg-brand-logo {
    width: 28px;
    height: 28px;
  }
  body.pg a.pg-brand-name {
    font-size: 22px;
  }
  .pg-home-tabs,
  .pg-post-tabs {
    display: none;
  }
  .pg-compact-nav {
    display: flex;
  }

  /* Homepage */
  .pg-home-header {
    padding: 14px;
    gap: 12px;
  }
  .pg-grid {
    perspective-origin: 50% 30px;
  }
  .pg-grid-floor {
    top: 60px;
    background-size: 28px 40px, 28px 40px, 100% 100%;
    background-position: calc(50% + 14px) 0, calc(50% + 14px) 0, 0 0;
  }
  .pg-grid-fade {
    top: 60px;
  }
  .pg-search {
    margin: 0 -2px;
  }
  .pg-types-row {
    margin-bottom: -14px;
  }
  .pg-notch-wrap {
    justify-content: flex-end;
  }
  .pg-notch {
    gap: 18px;
    padding: 0 14px 2px 24px;
    margin-right: -14px;
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%);
  }
  .pg-home-body {
    padding: 18px 14px 32px;
  }
  .pg-timeline {
    gap: 14px;
    margin-left: -14px;
  }
  .pg-day::before {
    left: -30px;
    width: 24px;
  }
  body.pg a.pg-item-title:link,
  body.pg a.pg-item-title:visited {
    font-size: 20px;
  }
  body.pg a.pg-item-img:link,
  body.pg a.pg-item-img:visited,
  body.pg a.pg-item-img.pg-left {
    float: none;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0 0 14px;
  }

  /* Entry page */
  .pg-post-header {
    padding: 20px 20px 0;
  }
  .pg-post-nav {
    gap: 12px 24px;
    padding-left: 0;
  }
  .pg-post-nav .pg-brand-logo {
    width: 30px;
    height: 30px;
  }
  body.pg .pg-post-nav a.pg-brand-name {
    font-size: 24px;
  }
  .pg-post-cols {
    grid-template-columns: minmax(0, 1fr);
  }
  .pg-post-hero {
    padding: 28px 0 40px;
  }
  .pg-post-main {
    grid-column: 1;
  }
  body.pg h1.pg-post-title {
    font-size: 44px;
  }
  .pg-post-body {
    padding: 20px 20px 28px;
  }
  .pg-share {
    flex-direction: row;
  }
  .pg-prose {
    font-size: 17px;
  }
}
