.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));
  }
}

/* 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;
  }
}
