.prose {
  font-size: 21px;
  line-height: 1.7;
  position: relative;
  overflow-wrap: break-word;
}
.prose::after {
  display: table;
  clear: both;
  content: "";
}
.prose :where(p, li, dd, dt, blockquote, figcaption, td, th) { color: var(--ink); }
.prose :where(p, li, dd, blockquote) { font-family: var(--body); }
.prose p { margin: 0 0 1.1em; }
.prose > :first-child { margin-top: 0; }

/* Drop cap: an article's opening paragraph, three lines deep. Diary days
 start plain, like a page in a notebook */
.single-post .prose > p:nth-child(1 of :not(.mnote, .hl-label, [class*="is-style-callout-"]))::first-letter,
.editor-styles-wrapper.post-type-post .prose > p:nth-child(1 of :not(.mnote, .hl-label, [class*="is-style-callout-"]))::first-letter,
.prose .has-drop-cap::first-letter {
  float: left;
  margin: .07em .08em 0 -.02em;
  color: var(--accent);
  font-family: var(--display);
  font-size: 5.9em;
  font-style: normal;
  font-weight: 400;
  line-height: .7;
}
@supports (initial-letter: 3) or (-webkit-initial-letter: 3) {
  .single-post .prose > p:nth-child(1 of :not(.mnote, .hl-label, [class*="is-style-callout-"]))::first-letter,
  .editor-styles-wrapper.post-type-post .prose > p:nth-child(1 of :not(.mnote, .hl-label, [class*="is-style-callout-"]))::first-letter,
  .prose .has-drop-cap::first-letter {
    float: none;
    margin: 0 .12em 0 0;
    font-size: inherit;
    line-height: inherit;
    -webkit-initial-letter: 3;
    initial-letter: 3;
  }
}
.prose h2 {
  margin: 1.8em 0 .6em;
  font-size: clamp(32px, 3vw, 42px);
  line-height: 1.1;
}
.prose h3 {
  margin: 1.6em 0 .5em;
  font-size: 30px;
}
.prose :where(h4, h5, h6) {
  margin: 1.4em 0 .4em;
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0;
}
.prose h4 { font-size: 22px; }
.prose h5 { font-size: 19px; }
.prose h6 {
  color: var(--muted);
  font-size: 16px;
}
.prose :where(ul, ol) {
  margin: 0 0 1.2em;
  padding-left: 1.3em;
}
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--accent); }
.prose :where(ul, ol) :where(ul, ol) { margin: .45em 0 0; }

/* Quotes read like a passage someone selected: large semibold lines, each
 carrying the selection's purple behind it */
.prose blockquote {
  margin: 1.8em 0;
  padding: 0;
  color: var(--ink);
  font-size: 28px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.5;
}
.prose blockquote p {
  display: inline;
  margin: 0;
  padding: .06em .22em;
  border-radius: 4px;
  background: light-dark(#E3D5F2, #4A3266);
  color: inherit;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.prose blockquote p:empty { display: none; }

/* Paragraphs inside one quote still break apart */
.prose blockquote p:not(:last-of-type)::after {
  content: "\A\A";
  white-space: pre;
}
.prose blockquote cite, .prose blockquote footer {
  display: block;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 15px;
  font-style: normal;
}
.prose hr {
  width: 120px;
  margin: 2.4em auto;
  border: 0;
  border-top: 1px solid var(--rule-strong);
}
.prose :where(img, video, iframe, object, embed) { max-width: 100%; }
.prose img {
  display: inline-block;
  height: auto;
  border-radius: 2px;
  vertical-align: middle;
}

/* Inline images stay in the line; pictures of their own stand alone */
.prose :is(figure, .wp-caption, .aligncenter, .alignleft, .alignright) img,
.prose p > img:only-child {
  display: block;
}

/* Pictures of their own float on the page, each at its own slight angle.
 The angle cycles over every block, so where pictures land decides it. */
.prose > :nth-child(7n + 1) { --tilt: -.8deg; }
.prose > :nth-child(7n + 2) { --tilt: .55deg; }
.prose > :nth-child(7n + 3) { --tilt: -.35deg; }
.prose > :nth-child(7n + 4) { --tilt: .85deg; }
.prose > :nth-child(7n + 5) { --tilt: -.6deg; }
.prose > :nth-child(7n + 6) { --tilt: .3deg; }
.prose > :nth-child(7n + 7) { --tilt: -.5deg; }
.prose > :is(.alignwide, .alignfull) { --tilt-scale: .35; }
.prose :is(figure, .wp-caption, .aligncenter, .alignleft, .alignright) img,
.prose p > img:only-child,
.prose p > a:only-child > img {
  border-radius: 22px;
  box-shadow: var(--float-shadow);
  transform: rotate(calc(var(--tilt, 0deg) * var(--tilt-scale, 1)));
}
@supports (corner-shape: squircle) {
  .prose :is(figure, .wp-caption, .aligncenter, .alignleft, .alignright) img,
  .prose p > img:only-child,
  .prose p > a:only-child > img {
    border-radius: 40px;
    corner-shape: squircle;
  }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .prose :is(figure, .wp-caption, .aligncenter, .alignleft, .alignright) img,
  .prose p > img:only-child,
  .prose p > a:only-child > img {
    transition: transform .7s var(--ease), box-shadow .7s var(--ease);
  }
  .prose :is(figure, .wp-caption, .aligncenter, .alignleft, .alignright) img:hover,
  .prose p > img:only-child:hover,
  .prose p > a:only-child:hover > img {
    box-shadow: var(--float-shadow-hover);
    transform: translateY(-4px) rotate(calc(var(--tilt, 0deg) * var(--tilt-scale, 1) * .4));
  }
}

/* Videos and embedded frames take the same floating, tilted shape as pictures */
.prose .vid,
.prose .wp-block-video > video,
.prose :is(.wp-block-embed.is-type-rich, .spotify-embed) iframe,
.prose iframe:is([src*="spotify.com"], [src*="soundcloud.com"], [src*="mementomori.social"], [src*="instagram.com"], [src*="facebook.com"]) {
  border-radius: 20px;
  box-shadow: var(--float-shadow);
  transform: rotate(calc(var(--tilt, 0deg) * var(--tilt-scale, 1)));
}

/* Spotify draws its own card with these corners */
.prose iframe[src*="spotify.com"] { border-radius: 12px; }

/* A light page inside a dark one would get a white backdrop where it is transparent */
.prose iframe {
  border: 0;
  color-scheme: normal;
}
.prose .vid {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: var(--soft);
  transition: transform .7s var(--ease), box-shadow .7s var(--ease);
}
@supports (corner-shape: squircle) {
  .prose .vid {
    border-radius: 40px;
    corner-shape: squircle;
  }
}
.prose .vid.is-playing { transform: none; }
.prose .vid :is(iframe, video) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.prose .vid.is-native video { object-fit: cover; }
.prose .vid.is-native.is-playing video { object-fit: contain; }

/* The still waits on top until the muted preview behind it is playing */
.prose .vid .vid-poster,
.prose .vid .vid-poster:hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
  object-fit: cover;
  transform: none;
  transition: opacity .8s var(--ease);
}
.prose .vid.is-live .vid-poster { opacity: 0; }

/* Scaled up so YouTube's own title bar and logo fall outside the frame */
.prose .vid .vid-preview {
  pointer-events: none;
  transform: scale(1.12);
}

/* The embed block's aspect-ratio spacer would sit as an empty box above the poster */
.prose .wp-block-embed__wrapper:has(> .vid)::before { display: none; }
.prose .vid:has(.vid-title)::after {
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(to top, rgb(12 10 16 / .72), transparent);
  content: "";
  pointer-events: none;
}
.prose .vid-title {
  position: absolute;
  z-index: 1;
  right: 96px;
  bottom: 20px;
  left: 24px;
  display: -webkit-box;
  overflow: hidden;
  color: #FFFFFF;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-shadow: 0 1px 2px rgb(0 0 0 / .4);
}

/* The whole poster is the button; the round mark shows where */
.prose .vid-play {
  position: absolute;
  z-index: 2;
  display: grid;
  padding: 0;
  inset: 0;
  border: 0;
  background: none;
  cursor: pointer;
  place-items: center;
}
.prose .vid-play svg {
  width: 72px;
  height: 72px;
  padding: 22px 20px 22px 24px;
  border-radius: 50%;
  background: var(--deep);
  box-shadow: 0 2px 6px rgb(0 0 0 / .18), 0 16px 32px -12px rgb(0 0 0 / .45);
  fill: var(--on-deep);
  transition: transform .5s var(--ease);
}
.prose .vid-play:focus-visible { outline: 0; }
.prose .vid-play:focus-visible svg {
  outline: 2px solid var(--on-deep);
  outline-offset: 3px;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .prose .vid:not(.is-playing):hover {
    box-shadow: var(--float-shadow-hover);
    transform: translateY(-4px) rotate(calc(var(--tilt, 0deg) * var(--tilt-scale, 1) * .4));
  }
  .prose .vid-play:hover svg { transform: scale(1.08); }
}
@media (max-width: 600px) {
  .prose .vid-title {
    right: 72px;
    bottom: 14px;
    left: 16px;
    font-size: 14px;
  }
  .prose .vid-play svg {
    width: 60px;
    height: 60px;
    padding: 18px 16px 18px 20px;
  }
}

/* Gallery pictures sit in a grid, so they stay straight */
.prose .wp-block-gallery img { transform: none; }
.prose figure { margin: 2em 0; }
.prose figcaption, .prose .wp-caption-text {
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.5;
}

/* Where an old post's element or picture used to be */
.prose .old-notice {
  display: block;
  padding: 14px 18px;
  border-radius: 8px;
  background: var(--tint);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
}

/* Callouts: a group or paragraph styled Info, Varoitus or Kriittinen in the editor */
.prose [class*="is-style-callout-"] {
  --callout-ground: light-dark(#E7EFFA, #16202D);
  --callout-ink: light-dark(#1D4A85, #A3C7F5);
  --callout-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5.5M12 7.5v.01'/%3E%3C/svg%3E");
  position: relative;
  margin-block: 2em;
  padding: 20px 24px 20px 58px;
  border-radius: 10px;
  background: var(--callout-ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}
.prose [class*="is-style-callout-"]::before {
  position: absolute;
  top: 22px;
  left: 22px;
  width: 22px;
  height: 22px;
  background: var(--callout-ink);
  content: "";
  mask: var(--callout-icon) center / contain no-repeat;
}
.prose .is-style-callout-warning {
  --callout-ground: light-dark(#FAF1DA, #2A2314);
  --callout-ink: light-dark(#755611, #E6C277);
  --callout-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 2.4 17.5A2 2 0 0 0 4.1 20.5h15.8a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9.5V14M12 17v.01'/%3E%3C/svg%3E");
}
.prose .is-style-callout-critical {
  --callout-ground: light-dark(#FBE7E9, #301A1E);
  --callout-ink: light-dark(#9B2F40, #F4A0AA);
  --callout-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8.2 2.5h7.6l5.7 5.7v7.6l-5.7 5.7H8.2l-5.7-5.7V8.2z'/%3E%3Cpath d='M12 7.5V13M12 16.5v.01'/%3E%3C/svg%3E");
}
.prose [class*="is-style-callout-"] > :first-child { margin-top: 0; }
.prose [class*="is-style-callout-"] > :last-child { margin-bottom: 0; }
.prose [class*="is-style-callout-"] :is(h2, h3, h4, strong:first-child) {
  color: var(--callout-ink);
}
.prose [class*="is-style-callout-"] :is(h2, h3, h4) {
  margin: 0 0 .4em;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}
.prose [class*="is-style-callout-"] p { font: inherit; }
@media (max-width: 600px) {
  .prose [class*="is-style-callout-"] {
    padding: 18px 18px 18px 50px;
    font-size: 16px;
  }
  .prose [class*="is-style-callout-"]::before {
    top: 20px;
    left: 18px;
  }
}

/* Videos keep their shape at any width; other frames keep their height */
.prose :where(iframe[src*="youtube"], iframe[src*="youtu.be"], iframe[src*="vimeo"]) {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}
.prose :where(a) { overflow-wrap: anywhere; }
.prose code {
  padding: .1em .35em;
  border-radius: 4px;
  background: var(--soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: .84em;
}
.prose pre {
  margin: 1.8em 0;
  padding: 18px 20px;
  overflow-x: auto;
  border-radius: 8px;
  background: var(--code-ground);
  color: #A9B1D6;
  font-family: var(--mono);
  font-size: 14.5px;
  line-height: 1.65;
  white-space: pre;
}
.prose pre code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}
.prose table {
  width: 100%;
  margin: 1.8em 0;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 16px;
}
.prose :where(th, td) {
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
.prose thead th {
  font-size: 15px;
  font-weight: 700;
}
.prose dl { margin: 0 0 1.2em; }
.prose dt { font-weight: 700; }
.prose dd { margin: 0 0 .6em 1.2em; }
.prose :where(sup, sub) {
  font-size: .65em;
  line-height: 0;
}

/* Word explanations: the word in the text and the card it opens */
.gloss {
  font-style: normal;
  text-decoration: underline dotted var(--accent) 1.5px;
  text-underline-offset: .2em;
  cursor: help;
}
.gloss:hover, .gloss[aria-expanded="true"] { background: var(--mark); }
.gloss-card {
  position: absolute;
  inset: auto;
  width: min(340px, 100vw - 2 * 16px);
  margin: 0;
  padding: 16px 44px 16px 18px;
  overflow: visible;
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--float-shadow);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}
.gloss-card p { margin: 0; }
.gloss-card strong:empty { display: none; }
.gloss-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--link);
  font-size: 15px;
}
.gloss-close {
  display: grid;
  position: absolute;
  top: 6px;
  right: 6px;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.gloss-close:hover {
  background: var(--tint);
  color: var(--ink);
}

/* Alignments, shared by blocks and the classic editor */
.prose .alignleft {
  float: left;
  max-width: 46%;
  margin: .3em 1.6em 1em 0;
}
.prose .alignright {
  float: right;
  max-width: 46%;
  margin: .3em 0 1em 1.6em;
}
.prose .aligncenter {
  display: block;
  margin-inline: auto;
}
.prose .alignwide { margin-inline: -120px; }

/* Almost full: the page edge stays visible around the picture */
.prose .alignfull {
  width: calc(100vw - 2 * var(--pad));
  max-width: none;
  margin-left: calc(50% - 50vw + var(--pad));
}
.prose .alignfull img { width: 100%; }
.page-links {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

/* Own ad between paragraphs */
.prose .ownad-unblockable { clear: both; }

/* Tweets as saved quotes, always on black like X's dark theme */
.prose blockquote.twitter-tweet {
  position: relative;
  max-width: 550px;
  padding: 20px 56px 18px 22px;
  border: 1px solid #2F3336;
  border-radius: 14px;
  background: #000;
  color: #A9B4BE;
  font-family: var(--sans);
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.5;
}
.prose blockquote.twitter-tweet::before {
  position: absolute;
  top: 20px;
  right: 20px;
  left: auto;
  width: 20px;
  height: 20px;
  background: #E7E9EA;
  content: "";
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* The tweet; the "— Name (@handle) date" line after it stays smaller */
.prose blockquote.twitter-tweet p {
  display: block;
  margin: 0 0 14px;
  padding: 0;
  background: none;
  color: #E7E9EA;
  font-size: 17px;
}
.prose blockquote.twitter-tweet p::after { content: none; }
.prose blockquote.twitter-tweet a {
  color: #8ECDF8;
  font-weight: 500;
}

/* Links in running text: stronger colour, semibold, a firm underline */
.prose a:not([class]), .cmt-body a:not([class]) {
  color: var(--link);
  font-weight: 600;
  text-decoration-color: color-mix(in oklab, currentColor 70%, transparent);
  text-decoration-thickness: 1.5px;
}
.prose a:not([class]):hover, .cmt-body a:not([class]):hover {
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
}

/* A link whose page is gone: kept for the record, faded, behind a broken chain */
.prose a.broken-link {
  color: var(--muted);
  font-weight: 500;
  text-decoration: underline dotted;
  text-decoration-color: color-mix(in oklab, currentColor 60%, transparent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: .2em;
}
.prose a.broken-link:hover { color: var(--ink); }
.prose a.broken-link::before {
  content: "" / "Rikkinäinen linkki:";
  display: inline-block;
  width: .9em;
  height: .9em;
  margin-inline-end: .25em;
  background: currentColor;
  vertical-align: -.1em;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 17H7a5 5 0 0 1-1-9.9M15 7h2a5 5 0 0 1 3.9 8.1M8 12h1M15 12h1M3 3l18 18'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Side notes (inc/hooks/side-notes.php): in the margin when it has room */
.mnote {
  float: right;
  clear: right;
  width: 220px;
  margin: .3em -280px 1em 0;
  padding-top: 10px;
  border-top: 1px solid var(--rule-strong);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.45;
}
.mnote .n {
  margin-right: 6px;
  color: var(--accent);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.mnote b {
  color: var(--ink);
  font-weight: 600;
}
.mnote a {
  display: block;
  margin-top: 2px;
  font-weight: 600;
}
.mnote .about, .mnote .snippet { display: block; }
.mnote .snippet {
  margin-top: 4px;
  color: var(--muted);
}
.prose sup.ref {
  margin-left: 1px;
  color: var(--accent);
  font-family: var(--sans);
  font-size: .6em;
  font-weight: 600;
}
@media (max-width: 1360px) {
  .mnote {
    float: none;
    width: auto;
    margin: 0 0 1em;
    padding: 12px 16px;
    border: 0;
    border-radius: 6px;
    background: var(--tint);
    font-size: 15px;
  }
  .mnote a, .mnote .about { display: inline; }

  /* The label is a line of its own, the title starts the next one */
  .mnote b {
    color: var(--muted);
    font-size: 13.5px;
  }
  .mnote b::after {
    display: block;
    content: "";
  }
  .mnote .snippet { margin-top: 2px; }
  .mnote .about::before { content: ", "; }
}
@media (max-width: 1240px) {
  .prose .alignwide { margin-inline: 0; }
}
@media (max-width: 860px) {
  .prose { font-size: 19px; }
  .prose :where(.alignleft, .alignright) { max-width: 50%; }
}
@media (max-width: 520px) {
  .prose :where(.alignleft, .alignright) {
    float: none;
    max-width: 100%;
    margin: 1.4em 0;
  }
}
.prose:not(:has([class*="wp-block-"])) .wp-caption {
  max-width: 100%;
  margin: 2em 0;
}
.prose:not(:has([class*="wp-block-"])) .wp-caption.alignleft,
.prose:not(:has([class*="wp-block-"])) .wp-caption.alignright {
  margin-top: .3em;
}
.prose:not(:has([class*="wp-block-"])) .wp-caption.aligncenter { margin-inline: auto; }
.prose:not(:has([class*="wp-block-"])) .wp-caption img { display: block; }

/* Floats inside a paragraph sit against the paragraph's first line */
.prose:not(:has([class*="wp-block-"])) p > img.alignleft,
.prose:not(:has([class*="wp-block-"])) p > a > img.alignleft {
  float: left;
  max-width: 46%;
  margin: .3em 1.4em .8em 0;
}
.prose:not(:has([class*="wp-block-"])) p > img.alignright,
.prose:not(:has([class*="wp-block-"])) p > a > img.alignright {
  float: right;
  max-width: 46%;
  margin: .3em 0 .8em 1.4em;
}
.prose:not(:has([class*="wp-block-"])) img.aligncenter,
.prose:not(:has([class*="wp-block-"])) img.size-large,
.prose:not(:has([class*="wp-block-"])) img.size-full {
  display: block;
  margin: 1.6em auto;
}

/* Emoji and old smiley images stay at text size */
.prose:not(:has([class*="wp-block-"])) img.wp-smiley,
.prose:not(:has([class*="wp-block-"])) img.emoji {
  display: inline;
  width: 1em;
  height: 1em;
  margin: 0 .05em;
  vertical-align: -.1em;
}

/* Flash and other long-gone embeds: a plain note instead of a hole */
.prose:not(:has([class*="wp-block-"])) :is(object, embed) {
  display: block;
  max-width: 100%;
}
.prose:not(:has([class*="wp-block-"])) .dead-embed {
  display: grid;
  clear: both;
  grid-template-columns: 52px 1fr;
  align-items: center;
  margin: 1.6em 0;
  padding: 18px 20px;
  gap: 16px;
  border-radius: 8px;
  background: var(--tint);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16px;
}
@media (max-width: 520px) {
  .prose:not(:has([class*="wp-block-"])) p > img.alignleft,
  .prose:not(:has([class*="wp-block-"])) p > a > img.alignleft,
  .prose:not(:has([class*="wp-block-"])) p > img.alignright,
  .prose:not(:has([class*="wp-block-"])) p > a > img.alignright {
    float: none;
    max-width: 100%;
    margin: 1.2em 0;
  }
}

/* Link cards (rollemaa-site/link-cards.php): the card from NeAI and the Beeper theme, scaled to the 21px text */
.prose .link-card {
  display: flex;
  overflow: hidden;
  max-width: 600px;
  min-height: 132px;
  margin: 0 0 1.4em;
  border: 1px solid color-mix(in oklab, var(--ink) 12%, transparent);
  border-radius: 16px;
  background: color-mix(in oklab, var(--tint) 70%, transparent);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .2s ease;
}
.prose .link-card:hover {
  border-color: color-mix(in oklab, var(--accent) 60%, transparent);
  box-shadow: 0 0 18px color-mix(in oklab, var(--accent) 25%, transparent);
}
.link-card-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  padding: 16px 20px;
  gap: 5px;
  font-family: var(--sans);
}
.link-card-site {
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.link-card-title,
.link-card-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.link-card-title {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
}
.link-card-desc {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}
.link-card-image {
  position: relative;
  flex: none;
  width: min(200px, 34%);
  background: var(--soft);
}
.prose .link-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: cover;
  transform: none;
}
/* Phones: a narrower picture leaves the title room for its words */
@media (max-width: 600px) {
  .link-card-text {
    padding: 14px 16px;
    gap: 4px;
  }
  .link-card-site { font-size: 13px; }
  .link-card-title {
    font-size: 17px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  .link-card-desc { font-size: 15px; }
  .link-card-image { width: min(110px, 30%); }
}
@media (prefers-reduced-motion: reduce) {
  .prose .link-card { transition: none; }
}

/* Fediverse posts embedded by the ActivityPub plugin: a near-black Mastodon purple in both modes, so they never pass for our cards */
.prose .activitypub-embed {
  --mastodon-surface: #07060e;
  --mastodon-rule: #221d2e;
  --mastodon-ink: #f1eff6;
  --mastodon-muted: #a7a1b8;
  --mastodon-link: #a3a6f7;
  margin: 0 0 1.4em;
  border: 0;
  border-radius: 16px;
  background: var(--mastodon-surface);
  color: var(--mastodon-ink);
  font-family: var(--sans);
  /* The article's 21px type would stretch every line box in the card */
  font-size: 15px;
  line-height: 1.4;
}
.prose .activitypub-embed .activitypub-embed-header { position: relative; padding-right: 52px; }
/* Mastodon's logo, from Simple Icons (CC0) */
.prose .activitypub-embed .activitypub-embed-header::after {
  content: "";
  position: absolute;
  top: 15px;
  right: 15px;
  width: 22px;
  height: 22px;
  background: var(--mastodon-ink);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38.265-.061.527-.132.786-.213.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041.053.053 0 0 0-.046-.01 20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 0 1-.319-1.433.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546.376 0 .75 0 1.125-.01 1.57-.044 3.224-.124 4.768-.422.038-.008.077-.015.11-.024 2.435-.464 4.753-1.92 4.989-5.604.008-.145.03-1.52.03-1.67.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12.696-.77 1.608-1.164 2.74-1.164 1.311 0 2.302.5 2.962 1.498l.638 1.06.638-1.06c.66-.999 1.65-1.498 2.96-1.498 1.13 0 2.043.395 2.74 1.164.675.77 1.012 1.81 1.012 3.12z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.prose .activitypub-embed .p-name {
  margin: 0;
  color: var(--mastodon-ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: normal;
}
.prose .activitypub-embed :is(.ap-account, .activitypub-embed-meta, .ap-stat-label) { color: var(--mastodon-muted); }
.prose .activitypub-embed .ap-account { display: block; }
.prose .activitypub-embed .ap-subtitle { color: var(--mastodon-ink); }
.prose .activitypub-embed :is(.ap-subtitle p, li) {
  margin: 0 0 .8em;
  color: inherit;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.55;
}
/* One 15px step between every part, as around the card's edges */
.prose .activitypub-embed .ap-subtitle > :last-child { margin-bottom: 0; }
.prose .activitypub-embed .ap-preview { margin-top: 0; }
.prose .activitypub-embed .ap-subtitle a { color: var(--mastodon-link); }
.prose .activitypub-embed :is(.activitypub-embed-meta, .ap-preview) { border-color: var(--mastodon-rule); }
.prose .activitypub-embed .activitypub-embed-meta strong { color: var(--mastodon-ink); }
.prose .activitypub-embed img {
  border-radius: 0;
  box-shadow: none;
  transform: none;
}
.prose .activitypub-embed .activitypub-embed-header img { border-radius: 50%; }
