/* Template parts stay out of the layout, so the sticky header has the whole page to stick to */
.wp-block-template-part {
  display: contents;
}

/**
 * Tokens, reset, type and the small parts every view shares.
 *
 * Colours are light-dark() pairs, so one list covers both themes. The
 * prepaint script sets .theme-light or .theme-dark on <html> from the
 * visitor's choice; without it the operating system decides.
 */

/* Tokens
 * ========================================================================== */
:root {
  color-scheme: light dark;

  --ground: light-dark(#F7F6F9, #141118);
  --surface: light-dark(#FFFFFF, #28232E);
  --tint: light-dark(#F2EDF7, #211B27);
  --soft: light-dark(#EAE3F2, #2B2334);
  --lavender: light-dark(#D3C4E3, #CBB7E1);
  --ink: light-dark(#211B27, #EDE9F1);
  --ink-2: light-dark(#3A3442, #D6D0DC);
  --muted: light-dark(#4F4758, #B2ABBA);
  --rule: light-dark(#E8E3ED, #2B2631);
  --rule-strong: light-dark(#D1CAD8, #443E4C);
  --field-line: light-dark(#857A90, #7A7086);
  --field: light-dark(#FFFFFF, #2A2331);
  --accent: light-dark(#573F74, #D0B9E9);
  --link: light-dark(#5A2D8C, #D9C2FF);
  --deep: light-dark(#503B68, #C5B0DD);
  --on-deep: light-dark(#FFFFFF, #19141F);
  --mark: color-mix(in oklab, var(--lavender) 60%, var(--surface));
  --scrim: rgb(12 10 16 / .82);
  --code-ground: light-dark(#16121E, #050407);

  --pad: clamp(16px, 4.4vw, 64px);
  --wrap: 1312px;
  --read: 760px;
  --display: "Instrument Serif", "Times New Roman", serif;
  --body: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --sans: "Geist", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --float-near: light-dark(rgb(33 27 39 / .05), rgb(0 0 0 / .2));
  --float-far: light-dark(rgb(33 27 39 / .16), rgb(0 0 0 / .4));
  --float-shadow: 0 1px 2px var(--float-near), 0 10px 24px -12px var(--float-far);
  --float-shadow-hover: 0 1px 3px var(--float-near), 0 14px 30px -14px var(--float-far);
}

:root.theme-light {
  color-scheme: light;
}

:root.theme-dark {
  color-scheme: dark;
}

/* Reset
 * ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--ground);
  color: var(--ink);
  scrollbar-color: var(--rule-strong) var(--ground);
  scroll-padding-top: 64px;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ground);
  caret-color: var(--accent);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-variant-numeric: lining-nums;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

img,
video {
  display: block;
  height: auto;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -.005em;
  line-height: 1.08;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-decoration-color: color-mix(in oklab, currentColor 45%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  border-radius: 3px;
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: var(--deep);
  color: var(--on-deep);
}

mark {
  padding: 0 .12em;
  border-radius: 2px;
  background: var(--mark);
  color: inherit;
}

kbd {
  padding: .1em .45em;
  border-radius: 4px;
  border-bottom: 2px solid var(--rule-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--mono);
  font-size: .78em;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Accessibility
 * ========================================================================== */
.screen-reader-text {
  position: absolute !important;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  z-index: 100;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 12px 18px;
  border-radius: 999px;
  clip-path: none;
  background: var(--deep);
  color: var(--on-deep);
  font-weight: 600;
  text-decoration: none;
}

/* Shared parts
 * ========================================================================== */
.wrap {
  width: min(100% - 2 * var(--pad), var(--wrap));
  margin-inline: auto;
}

.read,
.article-head:not(:has(> figure)) {
  position: relative;
  width: min(100% - 2 * var(--pad), var(--read));
  margin-inline: auto;
}

/* Line icons from svg/icons.svg; stroke and fill pass into the <use> */
.ic {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  vertical-align: middle;
}

.ic-sm {
  width: 16px;
  height: 16px;
}

/* Small meta text: Geist with tabular figures */
.meta-text {
  font-family: var(--sans);
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  gap: 4px 18px;
  color: var(--muted);
}

/* The editor's flow layout spaces block wrappers apart; meta stays one row */
.meta-line.meta-line > *,
.byline .meta.meta > * {
  margin: 0;
}

.muted {
  color: var(--muted);
}

.btn,
.bigsearch .wp-block-search__button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  background: var(--deep);
  color: var(--on-deep);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background .2s var(--ease), transform .2s var(--ease);
}

.btn:hover,
.bigsearch .wp-block-search__button:hover {
  background: color-mix(in oklab, var(--deep) 86%, var(--ink));
}

.btn:active {
  transform: translateY(1px);
}

/* Lifted off any ground it sits on, with an edge that holds in dark */
.btn-ghost {
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--rule-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--soft);
  box-shadow: inset 0 0 0 1px var(--field-line);
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: .45;
}

.textlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.textlink:hover {
  text-decoration: underline;
}

/* Section headings used across views */
.sec-title {
  margin-bottom: 32px;
  font-size: clamp(40px, 4vw, 60px);
  line-height: 1;
}

.h-sec {
  margin-bottom: 24px;
  font-size: clamp(36px, 3.4vw, 52px);
}

.sub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 16px;
}

/* Edit link for logged-in users */

/* Page numbers: archives, search, the diary */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 40px 0 0;
  gap: 6px;
}

.pager :is(a, span) {
  display: inline-grid;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  place-items: center;
  text-decoration: none;
}

.pager a:hover {
  background: var(--soft);
}

.pager [aria-current] {
  background: var(--deep);
  color: var(--on-deep);
}

.pager :is(.older, .newer) {
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  gap: 8px;
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--rule-strong);
}

.pager .older {
  margin-left: auto;
}

@media (max-width: 860px) {
  .pager .older {
    margin-left: 0;
  }
}

/**
 * Site head: no bar, it is part of the page. On an article with a photo it
 * lies on the photo in white.
 */
.site-head {
  position: relative;
  z-index: 20;
  color: var(--ink);
}

.site-head .bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  padding: 28px var(--pad) 0;
  gap: 24px;
}

.nav {
  justify-self: start;
}

.nav .wp-block-navigation__container {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  gap: 4px 30px;
  list-style: none;
}

.nav a {
  display: block;
  padding: 6px 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: .3em;
}

/* Colour and a line mark the current section; the weight stays put */
.nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .45em;
}

/* Articles keep the page quiet: the sections appear when the pointer
   comes to the top, and always on keyboard focus */
@media (hover: hover) {
  .single-post:not(:has(.article-head > figure)) .site-head .nav {
    opacity: 0;
    transition: opacity .3s var(--ease);
  }

  .single-post:not(:has(.article-head > figure)) .site-head:hover .nav,
  .single-post:not(:has(.article-head > figure)) .site-head:focus-within .nav {
    opacity: 1;
  }
}

/* On a photo the whole head sleeps until the mouse moves or the reader
   pulls back up (front-end.js) */
@media (scripting: enabled) {
  :root:has(.article-head > figure) .site-head .bar > * {
    opacity: 0;
    pointer-events: none;
    transition: opacity .6s ease-in-out;
  }

  :root:has(.article-head > figure) .head-awake .site-head .bar > *,
  :root:has(.article-head > figure) .site-head:has(:focus-visible) .bar > * {
    opacity: 1;
    pointer-events: auto;
    transition-duration: .9s;
  }
}

/* Away from the top the head floats over the page while awake (front-end.js) */
@media (scripting: enabled) {
  .head-floating:not(:has(.article-head > figure)) .wp-site-blocks {
    padding-top: var(--head-h);
  }

  :root .head-floating .site-head.site-head {
    position: fixed;
    inset: 0 0 auto;
    border-bottom: 1px solid var(--rule);
    background: var(--ground);
    color: var(--ink);
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity .5s ease-in-out, transform .5s ease-in-out, visibility 0s .5s;
    visibility: hidden;
  }

  :root .head-floating.head-awake .site-head,
  :root .head-floating .site-head.site-head:has(:focus-visible, .is-menu-open) {
    opacity: 1;
    transform: none;
    transition-delay: 0s;
    visibility: visible;
  }

  :root .head-floating .site-head.site-head .bar {
    padding-block: 14px;
  }

  :root:has(.article-head > figure) .head-floating .site-head .bar > * {
    opacity: 1;
    pointer-events: auto;
  }

  :root:has(.article-head > figure) .head-floating .site-head .nav a {
    color: var(--muted);
  }

  :root:has(.article-head > figure) .head-floating .site-head .nav a:hover,
  :root:has(.article-head > figure) .head-floating .site-head .nav a[aria-current="page"] {
    color: var(--ink);
  }

  :root:has(.article-head > figure) .head-floating .site-head .search-btn kbd {
    border-color: var(--rule-strong);
    background: var(--field);
    color: var(--ink);
  }

  :root:has(.article-head > figure) .head-floating .site-head :focus-visible {
    outline-color: var(--accent);
  }
}

/* The Rollemaa logo as it has always been: umbrella and ROLLEMAA */
.brand {
  display: inline-flex;
  align-items: center;
  padding: 10px 0;
  color: inherit;
  font-family: Muli, "Inter", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand svg {
  width: 24px;
  height: 24px;
  margin-right: 11px;
  transform-origin: left;
  transition: transform .33s, color .33s;
}

.brand:hover svg,
.brand:focus-visible svg {
  color: var(--accent);
  transform: rotate(-8deg);
}

.search-btn {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  padding: 6px 0;
  gap: 10px;
  border: 0;
  background: none;
  color: inherit;
  font-size: 16px;
  font-weight: 500;
}

.search-btn kbd {
  font-size: 12px;
}

.search-btn:hover .lbl {
  text-decoration: underline;
  text-underline-offset: .3em;
}

/* On the photo */
:root:has(.article-head > figure) .site-head {
  position: absolute;
  inset: 0 0 auto;
  color: #fff;
}

:root:has(.article-head > figure) .site-head .nav a {
  color: rgb(255 255 255 / .9);
}

:root:has(.article-head > figure) .site-head .nav a:hover,
:root:has(.article-head > figure) .site-head .nav a[aria-current="page"] {
  color: #fff;
}

:root:has(.article-head > figure) .site-head .brand:hover svg {
  color: #E9DCF3;
}

:root:has(.article-head > figure) .site-head .search-btn kbd {
  border-color: rgb(255 255 255 / .45);
  background: transparent;
  color: #fff;
}

:root:has(.article-head > figure) .site-head :focus-visible {
  outline-color: #fff;
}

/* Reading progress on articles, in the corner; it also takes you back up */
.read-meter {
  display: grid;
  position: fixed;
  z-index: 60;
  right: 24px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 8px 28px rgb(0 0 0 / .22), inset 0 0 0 1px var(--rule-strong);
  color: var(--ink);
  cursor: pointer;
  place-items: center;
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}

.read-meter[hidden] {
  display: grid;
  visibility: hidden;
  opacity: 0;
  transform: translateY(12px);
}

/* Ring, number, tick and ripples share one centred cell */
.read-meter > * {
  grid-area: 1 / 1;
}

.read-meter .ripples {
  position: absolute;
  inset: 0;
}

.read-meter .ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--soft);
  stroke-width: 3;
  transform: rotate(-90deg);
}

.read-meter .done {
  stroke: var(--accent);
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--progress, 0));
  stroke-linecap: round;
  transition: stroke-dashoffset .2s linear;
}

.read-meter .pct {
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  transition: opacity .2s, transform .3s var(--ease);
}

/* Finished: the number gives way to a tick, ripples spread like rain on water */
.read-meter .check {
  position: absolute;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--accent);
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.6;
}

.read-meter .ripples i {
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
}

.read-meter.is-done {
  animation: meter-pop .55s cubic-bezier(.34, 1.56, .64, 1);
}

.read-meter.is-done .done {
  stroke-dashoffset: 0;
}

.read-meter.is-done .pct {
  opacity: 0;
  transform: scale(.6);
}

.read-meter.is-done .check {
  animation: meter-check .45s .15s var(--ease) forwards;
}

.read-meter.is-done .ripples i {
  animation: meter-ripple 1.5s var(--ease) forwards;
}

.read-meter.is-done .ripples i:nth-child(2) {
  animation-delay: .25s;
}

.read-meter.is-done .ripples i:nth-child(3) {
  animation-delay: .5s;
}

.read-meter.is-gone {
  transition-duration: .8s;
}

@keyframes meter-pop {
  45% {
    transform: scale(1.14);
  }
}

@keyframes meter-check {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes meter-ripple {
  from {
    opacity: .7;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(2.8);
  }
}

.read-meter:hover {
  background: var(--soft);
}

@media (prefers-reduced-motion: reduce) {
  .read-meter,
  .read-meter .done {
    transition: none;
  }

  .read-meter.is-done,
  .read-meter.is-done .ripples i {
    animation: none;
  }

  .read-meter.is-done .check {
    animation: none;
    stroke-dashoffset: 0;
  }
}

@media (max-width: 860px) {
  .read-meter {
    right: 14px;
    bottom: 14px;
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 860px) {
  .site-head .bar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-top: 16px;
    gap: 4px 12px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    font-size: 16px;
  }

  .brand svg {
    width: 22px;
    height: 22px;
  }

  .search-btn {
    grid-column: 2;
    grid-row: 1;
    padding: 8px 0 8px 8px;
  }

  .search-btn .lbl,
  .search-btn kbd {
    display: none;
  }

  .search-btn .ic {
    width: 22px;
    height: 22px;
  }

  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav .wp-block-navigation__container {
    flex-wrap: nowrap;
    gap: 24px;
  }

  .nav .wp-block-navigation__container li {
    flex: none;
  }
}

/**
 * Rain over the page while the pointer rests on the logo. The drops are
 * written by front-end.js; this only shows and animates them.
 */
.rain-wrapper {
  position: absolute;
  z-index: -1;
  top: 0;
  width: 100%;
  height: 500px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .55s, visibility .55s;
  visibility: hidden;
}

.splat-toggle .rain-wrapper {
  z-index: 22;
  opacity: 1;
  visibility: visible;
}

.rain {
  position: absolute;
  z-index: 2;
  left: 0;
  width: 100%;
  height: 100%;
}

.drop {
  position: absolute;
  bottom: 100%;
  width: 15px;
  height: 120px;
  animation: drop .5s linear infinite;
}

.stem {
  width: 2px;
  height: 60%;
  margin-left: 7px;
  animation: stem .5s linear infinite;
  background: linear-gradient(to bottom, transparent, color-mix(in oklab, var(--accent) 35%, transparent));
}

.splat {
  display: none;
  width: 15px;
  height: 10px;
  border-top: 2px dotted var(--accent);
  border-radius: 50%;
  animation: splat .5s linear infinite;
  transform: scale(0);
}

.splat-toggle .splat {
  display: block;
}

@keyframes drop {
  0% { transform: translateY(0); }
  75%, 100% { transform: translateY(90vh); }
}

@keyframes stem {
  0%, 65% { opacity: 1; }
  75%, 100% { opacity: 0; }
}

@keyframes splat {
  0%, 80% { opacity: 1; transform: scale(0); }
  90% { opacity: .5; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.5); }
}

@media (prefers-reduced-motion: reduce) {
  .rain-wrapper {
    display: none;
  }
}

/**
 * Site footer: the umbrella and the ways to follow, a row of every other
 * place Rolle is, then the copyright and the theme switch.
 */
.site-foot {
  margin-top: 96px;
  padding: 72px var(--pad) 36px;
  border-top: 1px solid color-mix(in oklab, var(--rule) 60%, transparent);
  background: var(--tint);
  color: var(--ink);
}

/* The comments band already closes the page */
body:has(.comments) .site-foot {
  margin-top: 0;
}

.site-foot .inner {
  width: min(100%, var(--wrap));
  margin: 0 auto;
}

.foot-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px 56px;
}

.sign {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.foot-mark {
  display: inline-block;
  color: var(--accent);
}

/* Umbrella top on the first line's cap height */
.foot-mark svg {
  display: block;
  width: 44px;
  height: 44px;
  margin-top: -4px;
}

.foot-line {
  max-width: 34em;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
}

.foot-stats {
  margin: 6px 0 0;
  color: var(--muted);
}

.foot-follow {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 16px;
}

/* Every other place: logos only, named for screen readers */
/* Every other place: small muted logos, named for screen readers */
.foot-elsewhere ul {
  display: flex;
  flex-wrap: wrap;
  margin: 12px 0 0 -11px;
  padding: 0;
  list-style: none;
}

.foot-elsewhere a {
  display: grid;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--muted);
  place-items: center;
}

.foot-elsewhere a:hover {
  background: var(--soft);
  color: var(--accent);
}

.foot-elsewhere .ic {
  width: 17px;
  height: 17px;
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-top: 56px;
  padding-top: 28px;
  gap: 16px;
  border-top: 1px solid color-mix(in oklab, var(--rule-strong) 45%, transparent);
  color: var(--muted);
  font-size: 14.5px;
}

.foot-base p {
  margin: 0;
}

.themesw {
  display: inline-flex;
  position: relative;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  background: var(--surface);
}

/* The pressed highlight, moved by front-end.js; it stretches as it goes */
.themesw::before {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: var(--pill-w, 0);
  border-radius: 999px;
  background: var(--soft);
  content: "";
  transform: translateX(var(--pill-x, 0));
}

.themesw.is-ready::before {
  transition: transform .45s cubic-bezier(.65, 0, .35, 1), width .6s cubic-bezier(.34, 1.56, .64, 1);
}

@media (prefers-reduced-motion: reduce) {
  .themesw.is-ready::before {
    transition: none;
  }
}

.themesw button {
  display: inline-flex;
  position: relative;
  align-items: center;
  padding: 7px 12px;
  gap: 7px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font-size: 14.5px;
}

/* Same weight in both states, so choosing a theme never shifts the text */
.themesw button[aria-pressed="true"] {
  color: var(--deep);
}

@media (max-width: 860px) {
  .site-foot {
    margin-top: 72px;
    padding: 56px var(--pad) 32px;
  }

  .sign {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .themesw button {
    padding: 8px 10px;
    gap: 6px;
    font-size: 14px;
  }
}

/* Ten icons don't fit one line on a phone, so two even rows */
@media (max-width: 440px) {
  .foot-elsewhere ul {
    display: grid;
    grid-template-columns: repeat(5, 40px);
  }
}

/**
 * Search dialog: a native <dialog> with results grouped by type.
 */
.search-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 72px 16px 120px;
  overflow-y: auto;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.search-dialog::backdrop {
  background: var(--scrim);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.sbox {
  overflow: hidden;
  width: min(100%, 760px);
  margin: 0 auto;
  border-radius: 14px;
  background: var(--surface);
}

.s-input {
  display: flex;
  align-items: center;
  padding: 18px 22px;
  gap: 14px;
  border-bottom: 1px solid var(--rule);
}

.s-input > .ic {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.s-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: none;
  font-size: 24px;
}

.s-input input::placeholder {
  color: color-mix(in oklab, var(--muted) 62%, var(--surface));
  opacity: 1;
}

/* The field itself has no outline, so the row shows keyboard focus */
.search-dialog[data-keyboard] .s-input:focus-within {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.s-input input::-webkit-search-cancel-button {
  display: none;
}

.x-btn {
  display: grid;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  place-items: center;
}

.x-btn:hover {
  background: color-mix(in oklab, currentColor 10%, transparent);
}

.s-meta {
  margin: 0;
  padding: 12px 22px;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
}

.s-meta:empty {
  display: none;
}

.s-group + .s-group {
  border-top: 1px solid var(--rule);
}

.s-group h2 {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 18px 24px 6px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
}

.s-group h2 span:first-child {
  color: var(--ink);
}

.s-list {
  margin: 0;
  padding: 0 10px 10px;
  list-style: none;
}

/* Text first, so titles line up whether a result has a picture or not */
.s-list a {
  display: grid;
  grid-auto-columns: auto;
  grid-auto-flow: column;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  padding: 12px 14px;
  gap: 18px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}

.s-list a:hover,
.s-list a:focus-visible {
  background: var(--tint);
}

.s-list a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.s-text {
  display: grid;
  gap: 4px;
}

.s-list .t {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  text-wrap: pretty;
}

.s-list .x {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.s-list .d {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13.5px;
}

/* The match stands out by weight, not by a box */
.s-list mark {
  padding: 0;
  background: none;
  color: inherit;
  font-weight: 700;
}

.s-list .t mark {
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab, var(--accent) 55%, transparent);
  text-decoration-thickness: 2px;
  text-underline-offset: .2em;
}

.s-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: var(--soft);
  object-fit: cover;
}

.s-empty {
  padding: 8px 22px 22px;
}

.s-empty h2 {
  margin: 14px 0 10px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
}

.s-empty ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.s-empty li a {
  display: flex;
  align-items: center;
  padding: 8px 0;
  gap: 10px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  font-size: 17px;
  text-decoration: none;
}

.s-empty li a:hover {
  color: var(--accent);
}

.s-none {
  margin: 0;
  padding: 22px;
  color: var(--ink-2);
}

.s-foot {
  display: flex;
  flex-wrap: wrap;
  padding: 14px 22px;
  gap: 20px;
  border-top: 1px solid var(--rule);
  background: color-mix(in oklab, var(--surface) 60%, var(--ground));
  color: var(--muted);
}

.s-foot span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.s-foot .all {
  margin-left: auto;
}

@media (max-width: 860px) {
  .search-dialog {
    padding: 16px 10px 96px;
  }

  .s-input input {
    font-size: 20px;
  }

  .s-thumb {
    width: 52px;
    height: 52px;
  }

  .s-foot span {
    display: none;
  }

  .s-foot .all {
    margin-left: 0;
  }
}

/**
 * The shelf: one spine per year, on the front page and the archive page.
 */
.shelf-wrap {
  padding-bottom: 8px;
}

.shelf-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 18px;
  gap: 16px;
  color: var(--muted);
  font-size: 14.5px;
}

.shelf-meta h2 {
  font-family: var(--sans);
  font-size: inherit;
  letter-spacing: 0;
  line-height: inherit;
}

.shelf-meta a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.shelf-meta a:hover {
  text-decoration: underline;
}

.shelf {
  display: flex;
  align-items: flex-end;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;

  /* Spine colours: lavender, deep, soft */
  --spine-l: var(--lavender);
  --spine-l-ink: light-dark(var(--ink), var(--on-deep));
  --spine-d: light-dark(var(--deep), color-mix(in oklab, var(--deep) 30%, var(--ground)));
  --spine-d-ink: light-dark(var(--on-deep), var(--ink));
}

.shelf::-webkit-scrollbar {
  display: none;
}

.vol {
  flex: var(--w) 1 0;
  min-width: 34px;
}

.vol a {
  display: grid;
  color: var(--muted);
  text-decoration: none;
}

.vol .sp {
  display: block;
  position: relative;
  height: var(--h);
  margin: 0 2px;
  border-radius: 3px 3px 0 0;
  background: var(--c);
  color: var(--t);
  transition: transform .45s var(--ease);
}

.vol .sp.L {
  --c: var(--spine-l);
  --t: var(--spine-l-ink);
}

.vol .sp.D {
  --c: var(--spine-d);
  --t: var(--spine-d-ink);
}

.vol .sp.S {
  --c: var(--soft);
  --t: var(--ink);
}

.vol .n {
  position: absolute;
  right: 0;
  bottom: 10px;
  left: 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
}

.vol .pl {
  display: block;
  height: 5px;
  background: color-mix(in oklab, var(--lavender) 70%, var(--deep));
}

.vol .y {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.vol a:hover .sp,
.vol a:focus-visible .sp {
  transform: translateY(-8px);
}

.vol a:hover .y,
.vol a:focus-visible .y {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 860px) {
  .vol {
    min-width: 38px;
  }
}

/**
 * Front page: the opening, the post cards, the most read with
 * the "Nyt" panel, random finds and the author.
 */

/* Opening: a title page on the plain page ground */
.opening {
  display: grid;
  justify-items: center;
  padding: clamp(176px, 22vh, 260px) 0 clamp(168px, 20vh, 240px);
  text-align: center;
}

.statement {
  max-width: 12.5em;
  margin: 0;
  color: var(--ink);
  font-size: clamp(46px, 5.6vw, 88px);
  letter-spacing: -.015em;
  line-height: 1.02;
}

.statement em {
  color: var(--accent);
}

.imprint {
  margin: 48px 0 0;
  color: var(--muted);
  font-size: 15px;
  letter-spacing: .02em;
}

.follow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  gap: 10px 28px;
  font-size: 16px;
}

.follow-row a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.follow-row a:hover {
  text-decoration: underline;
}

/**
 * Kokopitkät as a magazine: a lead across the page, then a rhythm of six
 * that repeats with each Lataa lisää, a wide feature, a pair, a row of
 * three. No boxes, the type and the pictures carry it.
 */
.posts {
  padding-top: 104px;
}

.posts > .wp-block-query + .wp-block-query {
  margin-top: 88px;
}

.card {
  display: flex;
  position: relative;
  flex-direction: column;
  min-width: 0;
  gap: 24px;
}

.card-img {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 22px;
  background: var(--soft);
}

@supports (corner-shape: squircle) {
  .card-img {
    border-radius: 40px;
    corner-shape: squircle;
  }
}

.card-img a,
.card-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 14px;
}

.card-body > * {
  margin: 0;
}

.card-title {
  font-size: clamp(30px, 2.6vw, 38px);
  line-height: 1.04;
  text-wrap: balance;
}

.card-title a {
  color: var(--ink);
  text-decoration: none;
}

.card-title a:hover {
  color: var(--accent);
}

.card .excerpt {
  max-width: 62ch;
  color: var(--ink-2);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.65;
}

.card .excerpt p {
  margin: 0;
}

/* The lead: the picture across the page, a headline as big as a cover's */
.lead-badge {
  display: inline-flex;
  position: relative;
  z-index: 2;
  grid-row: 1;
  grid-column: 6 / -1;
  align-items: center;
  align-self: start;
  justify-self: end;
  margin: 24px;
  padding: 9px 16px 9px 12px;
  gap: 8px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--ground) 82%, transparent);
  color: var(--ink);
  font: 600 15px / 1.2 var(--sans);
  letter-spacing: normal;
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
}

.lead-badge svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

/* Without a picture the pill sits above the headline */
.card-lead:not(:has(.card-img)) .lead-badge {
  position: static;
  grid-column: 1 / -1;
  justify-self: start;
}

.card-lead {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  gap: 32px;
}

/* Headline on the left, the picture beside it, both within one screen */
.card-lead .card-body {
  display: flex;
  grid-row: 1;
  grid-column: 1 / span 5;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.card-lead .card-img {
  grid-row: 1;
  grid-column: 6 / -1;
  max-height: 72vh;
  aspect-ratio: 4 / 3;
}

.card-lead .card-title {
  font-size: clamp(44px, 4.8vw, 80px);
  line-height: .96;
  letter-spacing: -.01em;
}

.card-lead .excerpt {
  font-size: 19px;
}

/* The feed, six at a time */
.cards {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  gap: 88px 32px;
  list-style: none;
}

.cards > li {
  grid-column: span 4;
  min-width: 0;
}

.cards > li:nth-child(6n + 1) {
  grid-column: 1 / -1;
}

.cards > li:nth-child(6n + 2),
.cards > li:nth-child(6n + 3) {
  grid-column: span 6;
}

/* Feature: picture and headline side by side, the side changing every other time */
.cards > li:nth-child(6n + 1) .card {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: 48px;
}

.cards > li:nth-child(12n + 7) .card-img {
  order: 2;
}

.cards > li:nth-child(6n + 1) .card-img {
  aspect-ratio: 5 / 4;
}

.cards > li:nth-child(6n + 1) .card-title {
  font-size: clamp(44px, 4.6vw, 72px);
  line-height: .98;
}

.cards > li:nth-child(6n + 1) .excerpt {
  font-size: 20px;
}

.cards > li:nth-child(6n + 2) .card-img,
.cards > li:nth-child(6n + 3) .card-img {
  aspect-ratio: 3 / 2;
}

.cards > li:nth-child(6n + 2) .card-title,
.cards > li:nth-child(6n + 3) .card-title {
  font-size: clamp(36px, 3.4vw, 50px);
  line-height: 1;
}

.cards > li:nth-child(6n + 4) .excerpt,
.cards > li:nth-child(6n + 5) .excerpt,
.cards > li:nth-child(6n + 6) .excerpt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

/* Without a picture the headline becomes the picture */
.card:not(:has(.card-img)) {
  justify-content: center;
  padding: clamp(32px, 4vw, 64px);
  border-radius: 22px;
  background: var(--tint);
}

@supports (corner-shape: squircle) {
  .card:not(:has(.card-img)) {
    border-radius: 40px;
    corner-shape: squircle;
  }
}

.cards > li:nth-child(6n + 1) .card:not(:has(.card-img)) {
  display: flex;
  min-height: 420px;
}

.card:not(:has(.card-img)) .card-title {
  font-size: clamp(38px, 3.6vw, 56px);
  font-style: italic;
  line-height: 1;
}

.cards > li:nth-child(6n + 1) .card:not(:has(.card-img)) .card-title {
  max-width: 18ch;
  font-size: clamp(52px, 6vw, 96px);
  line-height: .96;
}

.card-lead:not(:has(.card-img)) .card-title {
  font-style: italic;
}

/* Lataa lisää: the link to older texts, turned into a button by the script */
.loadmore {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-top: 88px;
  gap: 12px 20px;
}

.loadmore .wp-block-query-pagination-next {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 26px;
  gap: 10px;
  border-radius: 999px;
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--rule-strong);
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
}

.loadmore .wp-block-query-pagination-next:hover {
  background: var(--soft);
  box-shadow: inset 0 0 0 1px var(--field-line);
}

.loadmore [aria-busy="true"] {
  cursor: progress;
  opacity: .6;
}

/* Where the reader left off (front-end.js, from localStorage) */
.ribbon {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 28px;
  width: 30px;
  height: 50px;
  background: var(--lavender);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
}

.resume-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.resume-chip::before {
  width: 10px;
  height: 16px;
  background: var(--deep);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%);
  content: "";
}

.resume-chip:hover {
  text-decoration: underline;
}

/* Most read and "Nyt" */
.duo {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: start;
  padding-block: 96px 24px;
  gap: clamp(28px, 4vw, 64px);
}

.chart {
  margin: 0;
  padding: 0;
  list-style: none;
}

.chart li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 88px;
  padding: 16px 0;
  gap: 20px;
  border-bottom: 1px solid var(--rule);
}

.chart .pos {
  color: var(--accent);
  font-family: var(--display);
  font-size: 52px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  transform: translateY(-.04em);
}

.chart a {
  color: inherit;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
}

.chart a:hover {
  text-decoration: underline;
}

.chart .reads {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  white-space: nowrap;
}

.now {
  padding: 28px 30px;
  border-radius: 4px;
  background: var(--tint);
}

.now[hidden] {
  display: none;
}

.now h2 {
  margin-bottom: 4px;
  font-size: 44px;
}

.now ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.now li {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: start;
  padding: 16px 0;
  gap: 14px;
}

.now li > .ic {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--accent);
}

.now .label {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
}

.now .what {
  display: block;
  color: var(--ink);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
}

.now .what:hover {
  text-decoration: underline;
}

.now .src {
  color: var(--muted);
  font-size: 15px;
}

.now .src a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: .2em;
}

.now .src a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

/* Random finds */
.shuffle {
  padding-block: 72px 24px;
}

.shuffle-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 20px;
}

.picks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  transition: opacity .35s var(--ease), filter .35s var(--ease);
}

.picks.is-loading {
  filter: blur(4px);
  opacity: 0;
}

.picks li {
  padding: 20px 24px 20px 0;
}

.picks li + li {
  padding-left: 24px;
}

.picks .meta-text {
  color: var(--muted);
}

.picks a {
  display: block;
  margin-top: 8px;
  color: inherit;
  font-family: var(--display);
  font-size: 30px;
  line-height: 1.1;
  text-decoration: none;
}

.picks a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

/* Who: a few words and a loose pile of photos */
.who {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  align-items: center;
  padding-block: 96px 120px;
  gap: clamp(32px, 6vw, 96px);
}

.who h2 {
  margin-bottom: 20px;
  font-size: clamp(48px, 4.8vw, 76px);
}

.who-text p {
  max-width: 30em;
  margin: 0 0 20px;
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.7;
}

.who-photos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  gap: 18px;
  list-style: none;
}

.who-photos figure:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.who-photos figure:nth-child(1) { --tilt: -1.2deg; }
.who-photos figure:nth-child(2) { --tilt: 1.4deg; }
.who-photos figure:nth-child(3) { --tilt: -.9deg; }
.who-photos figure:nth-child(4) { --tilt: -1.6deg; }
.who-photos figure:nth-child(5) { --tilt: 1.1deg; }

.who-photos a {
  display: block;
  border-radius: 22px;
}

/* Float like the pictures in the articles (content.css) */
.who-photos img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  box-shadow: var(--float-shadow);
  transform: rotate(var(--tilt));
}

@supports (corner-shape: squircle) {
  .who-photos img {
    border-radius: 40px;
    corner-shape: squircle;
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .who-photos img {
    transition: transform .7s var(--ease), box-shadow .7s var(--ease);
  }

  .who-photos a:hover img {
    box-shadow: var(--float-shadow-hover);
    transform: translateY(-4px) rotate(calc(var(--tilt) * .4));
  }
}

@media (max-width: 1100px) {
  .duo {
    grid-template-columns: 1fr;
  }

  .card-lead .card-img,
  .card-lead .lead-badge {
    grid-row: 1;
    grid-column: 1 / -1;
  }

  .card-lead .card-body {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .cards > li:nth-child(6n + 4),
  .cards > li:nth-child(6n + 5),
  .cards > li:nth-child(6n + 6) {
    grid-column: span 6;
  }

  .cards > li:nth-child(6n + 6) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .opening {
    padding: 136px 0 96px;
  }

  .statement {
    font-size: 44px;
  }

  .imprint {
    font-size: 14px;
  }

  .follow-row {
    flex-direction: column;
    gap: 12px;
  }

  .posts {
    padding-top: 72px;
  }

  .cards,
  .card-lead {
    grid-template-columns: minmax(0, 1fr);
  }

  .cards {
    gap: 64px;
  }

  .posts > .wp-block-query + .wp-block-query {
    margin-top: 64px;
  }

  .cards > li,
  .cards > li:nth-child(n) {
    grid-column: 1 / -1;
  }

  .cards > li:nth-child(6n + 1) .card {
    display: flex;
    gap: 24px;
  }

  .cards > li:nth-child(12n + 7) .card-img {
    order: 0;
  }

  .card-lead {
    gap: 24px;
  }

  .card-lead .card-img,
  .card .card-img,
  .cards > li:nth-child(n) .card-img {
    aspect-ratio: 4 / 3;
  }

  .card-lead .card-title {
    font-size: 48px;
  }

  .cards > li:nth-child(n) .card-title {
    font-size: 34px;
  }

  .cards > li:nth-child(6n + 1) .card:not(:has(.card-img)) {
    min-height: 0;
  }

  .cards > li:nth-child(n) .card:not(:has(.card-img)) .card-title {
    font-size: 40px;
  }

  .card .excerpt,
  .card-lead .excerpt,
  .cards > li:nth-child(n) .excerpt {
    font-size: 17.5px;
  }

  .chart li {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .chart .pos {
    font-size: 40px;
  }

  .chart .reads {
    grid-column: 2;
  }

  .picks {
    grid-template-columns: 1fr;
  }

  .picks li,
  .picks li + li {
    padding: 18px 0;
  }

  .picks a {
    font-size: 28px;
  }

  .who {
    grid-template-columns: 1fr;
    padding-block: 64px 88px;
  }

  .who-text p {
    font-size: 18px;
  }

  .who-photos {
    gap: 12px;
  }
}

/**
 * Listings and the archive pages: search and archive results as rows, the
 * year index, keyword bars, ranked lists and the all-posts page.
 */
.results-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 56px 0 32px;
  gap: 20px;
}

.results-head h1 {
  font-size: clamp(52px, 6.4vw, 96px);
  line-height: .95;
}

.results-head h1 em,
.results-head h1 span {
  color: var(--accent);
}

.results-head .intro {
  margin: 0;
  color: var(--muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filters a {
  display: inline-flex;
  align-items: baseline;
  padding: 6px 14px;
  gap: 8px;
  border-radius: 999px;
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--rule-strong);
  color: var(--ink);
  font-size: 15px;
  text-decoration: none;
}

.filters a:hover {
  background: var(--soft);
}

.filters a[aria-current] {
  background: var(--ink);
  color: var(--ground);
}

.filters .meta-text {
  font-size: 12.5px;
}

/* Rows */
.rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Diary days in a listing carry the diary's mark */
.diary-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
}

/* Text first; the image, when there is one, sits on the right */
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  padding: 28px 0;
  gap: 32px;
  border-bottom: 1px solid var(--rule);
}

.row:has(.row-thumb) {
  grid-template-columns: minmax(0, 1fr) 200px;
}

.row-thumb {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  background: var(--soft);
}

.row-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.row-title {
  margin: 6px 0 10px;
  font-size: clamp(28px, 2.2vw, 32px);
  line-height: 1.08;
}

.row-title a {
  color: inherit;
  text-decoration: none;
}

.row-title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.row .excerpt {
  max-width: 62ch;
  margin: 0;
  color: var(--ink-2);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

.nothing {
  padding: 40px 0;
}

.nothing h2 {
  margin-bottom: 12px;
  font-size: 40px;
}

.nothing p {
  color: var(--ink-2);
  font-family: var(--body);
  font-size: 19px;
}

/* Arkisto page */
.years {
  padding-block: 88px 24px;
}

.year-index {
  margin: 0;
  padding: 0;
  columns: 2 420px;
  column-gap: 64px;
  list-style: none;
}

.year-index li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: baseline;
  padding: 12px 0;
  gap: 12px;
  border-bottom: 1px solid var(--rule);
  break-inside: avoid;
}

.year-index a {
  color: var(--ink);
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
  text-decoration: none;
}

.year-index a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.year-index b {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* Keywords across the full width, then the two rankings side by side */
.arch-grid {
  display: grid;
  padding-block: 80px 24px;
  gap: 80px;
}

.ranks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 56px 64px;
}

.ranks > p {
  grid-column: 1 / -1;
}

.tagbars {
  margin: 0;
  padding: 0;
  columns: 3 240px;
  column-gap: 40px;
  list-style: none;
}

/* The bar is the line under each keyword, so no rule of its own */
.tagbars li {
  padding: 9px 0;
  break-inside: avoid;
}

.tagbars a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 4px 12px;
  color: var(--ink);
  text-decoration: none;
}

/* No underline, it would sit on the bar: the name and the bar light up */
.tagbars a:hover .nm,
.tagbars a:focus-visible .nm {
  color: var(--accent);
}

.tagbars a:hover .b i,
.tagbars a:focus-visible .b i {
  background: var(--accent);
}

.tagbars .nm {
  font-size: 17px;
  font-weight: 500;
}

.tagbars .meta-text {
  color: var(--muted);
}

.tagbars .b {
  grid-column: 1 / -1;
  height: 4px;
  border-radius: 9px;
  background: var(--rule);
}

.tagbars .b i {
  display: block;
  height: 100%;
  border-radius: 9px;
  background: color-mix(in oklab, var(--accent) 55%, var(--soft));
  transition: background .2s var(--ease);
}

.ranked {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranked li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: baseline;
  padding: 12px 0;
  gap: 14px;
  border-bottom: 1px solid var(--rule);
}

.ranked .pos {
  color: var(--accent);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.ranked a {
  color: var(--ink);
  font-size: 17.5px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
}

.ranked a:hover {
  text-decoration: underline;
}

.ranked .num {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.ranked .num b {
  color: var(--ink);
  font-weight: 600;
}

.more-ranked summary {
  padding: 14px 0;
  color: var(--accent);
  cursor: pointer;
  font-weight: 500;
}


/* All posts on one page */
/* All posts: a sticky year rail beside one steady column of dates and titles */
.all-posts {
  display: grid;
  grid-template-columns: 150px minmax(0, 860px);
  align-items: start;
  padding-bottom: 40px;
  gap: 64px;
}

.all-years {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding-top: 56px;
  scrollbar-width: thin;
}

.all-years ol {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 2px;
  list-style: none;
}

.all-years a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 5px 12px;
  border-radius: 6px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  text-decoration: none;
}

.all-years a .meta-text {
  color: var(--muted);
}

.all-years a:hover,
.all-years a[aria-current="true"] {
  background: var(--soft);
  color: var(--ink);
}

.all-year {
  padding-top: 56px;
  scroll-margin-top: 16px;
}

.all-year-title {
  margin-bottom: 8px;
  font-size: clamp(44px, 4.4vw, 64px);
}

.all-month {
  margin: 28px 0 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
}

.all-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.all-list li {
  display: grid;
  grid-template-columns: 9.5em minmax(0, 1fr);
  align-items: baseline;
  padding: 7px 0;
  gap: 12px;
}

.all-list time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.all-list a {
  color: var(--ink);
  overflow-wrap: anywhere;
  text-decoration: none;
}

/* On a phone the day sits above its title */
@media (max-width: 600px) {
  .all-list li {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

.all-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 1100px) {
  .ranks {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  /* The year rail becomes a bar across the top */
  .all-posts {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .all-years {
    z-index: 5;
    top: 0;
    max-height: none;
    margin-inline: calc(-1 * var(--pad));
    padding: 10px var(--pad);
    overflow-x: auto;
    border-bottom: 1px solid var(--rule);
    background: var(--ground);
  }

  .all-years ol {
    display: flex;
    width: max-content;
  }

  .all-years a {
    gap: 6px;
  }

  .all-year {
    scroll-margin-top: 64px;
  }

  .row {
    padding: 22px 0;
    gap: 16px;
  }

  .row:has(.row-thumb) {
    grid-template-columns: minmax(0, 1fr) 88px;
  }

  .row-thumb {
    aspect-ratio: 1;
  }

  .row .excerpt {
    display: -webkit-box;
    overflow: hidden;
    font-size: 16.5px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .tagbars {
    columns: 1;
  }

  .year-index li {
    grid-template-columns: 56px minmax(0, 1fr) auto;
  }
}

/**
 * Around a text: the head on its photo or on the page, the byline, the
 * archive note, what follows the text and the comments.
 */

/* Head on the photo, the site header lying on top of it */
.article-head:has(> figure) {
  display: flex;
  position: relative;
  overflow: hidden;
  align-items: flex-end;
  min-height: min(92vh, 880px);
  background: #1A1220;
  color: #fff;
  isolation: isolate;
}

.article-head:has(> figure) .wp-block-post-featured-image {
  position: absolute;
  z-index: -1;
  inset: 0;
  margin: 0;
}

.article-head:has(> figure) .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Three layers, so no shade ever has an edge: a steady tint over the whole
   photo, and two long S-curves. Together they give 7:1 on a white photo
   behind the text and the site head. */
.article-head:has(> figure)::after {
  position: absolute;
  inset: 0;
  background: rgb(18 10 24 / .34);
  content: "";
}

.article-head:has(> figure)::before {
  position: absolute;
  inset: 0 0 auto;
  height: 700px;
  background: linear-gradient(to bottom, rgb(18 10 24 / .6) 90px, rgb(18 10 24 / .593) 128px, rgb(18 10 24 / .574) 166px, rgb(18 10 24 / .545) 204px, rgb(18 10 24 / .506) 242px, rgb(18 10 24 / .461) 281px, rgb(18 10 24 / .41) 319px, rgb(18 10 24 / .356) 357px, rgb(18 10 24 / .3) 395px, rgb(18 10 24 / .244) 433px, rgb(18 10 24 / .19) 471px, rgb(18 10 24 / .139) 509px, rgb(18 10 24 / .094) 548px, rgb(18 10 24 / .055) 586px, rgb(18 10 24 / .026) 624px, rgb(18 10 24 / .007) 662px, rgb(18 10 24 / 0) 700px);
  content: "";
}

@media (scripting: enabled) {
  .article-head:has(> figure)::before {
    opacity: 0;
    transition: opacity .6s ease-in-out;
  }

  .head-awake .article-head:has(> figure)::before,
  body:has(.site-head :focus-visible) .article-head:has(> figure)::before {
    opacity: 1;
    transition-duration: .9s;
  }
}

.ph-text {
  position: relative;
  z-index: 1;
  width: min(100% - 2 * var(--pad), var(--read));
  margin: 0 auto;
  padding: 160px 0 44px;
}

/* Follows the text: 570px down the curve is the top of the text */
.ph-text::before {
  position: absolute;
  z-index: -1;
  top: -410px;
  bottom: 0;
  left: calc(50% - 50vw);
  width: 100vw;
  background: linear-gradient(to bottom, rgb(18 10 24 / 0) 0px, rgb(18 10 24 / .01) 56px, rgb(18 10 24 / .038) 112px, rgb(18 10 24 / .081) 169px, rgb(18 10 24 / .138) 225px, rgb(18 10 24 / .204) 281px, rgb(18 10 24 / .278) 338px, rgb(18 10 24 / .358) 394px, rgb(18 10 24 / .44) 450px, rgb(18 10 24 / .522) 506px, rgb(18 10 24 / .602) 562px, rgb(18 10 24 / .676) 619px, rgb(18 10 24 / .743) 675px, rgb(18 10 24 / .799) 731px, rgb(18 10 24 / .842) 788px, rgb(18 10 24 / .87) 844px, rgb(18 10 24 / .88) 900px);
  content: "";
}

/* Without a photo the text just opens the reading column */
:is(.art-head, .article-head:not(:has(> figure))) .ph-text {
  width: auto;
  padding: 0;
}

:is(.art-head, .article-head:not(:has(> figure))) .ph-text::before {
  display: none;
}

.cover-title {
  font-size: clamp(46px, 5.2vw, 82px);
  letter-spacing: -.015em;
  line-height: 1;
}

.article-head:has(> figure) .cover-title em {
  color: #E9DCF3;
}

.standfirst {
  max-width: 34em;
  margin: 24px 0 0;
  font-family: var(--body);
  font-size: 21px;
  line-height: 1.6;
}

.article-head:has(> figure) .standfirst {
  color: #EFE7F5;
}

.hero-foot {
  margin-top: 32px;
  color: #EFE7F5;
  gap: 6px 22px;
}

.credit {
  position: absolute;
  z-index: 1;
  right: 16px;
  bottom: 14px;
  max-width: calc(100% - 32px);
  padding: 3px 8px;
  border-radius: 3px;
  background: rgb(10 8 14 / .6);
  color: #fff;
  font-size: 12.5px;
}

/* No image: no hero at all, the title opens the reading column */
:is(.art-head, .article-head:not(:has(> figure))) {
  padding-top: 72px;
}

/* The diary's title opens as far down as a page's own heading (.page-body) */
.art-head.art-head {
  padding-top: calc(24px + clamp(64px, 10vh, 120px));
}

:is(.art-head, .article-head:not(:has(> figure))) .cover-title {
  color: var(--ink);
  font-size: clamp(46px, 5vw, 72px);
}

:is(.art-head, .article-head:not(:has(> figure))) .cover-title em {
  color: var(--accent);
}

:is(.art-head, .article-head:not(:has(> figure))) .standfirst {
  color: var(--ink-2);
  font-size: 22px;
}

/* Byline */
.byline {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  align-items: center;
  margin-bottom: 44px;
  padding-block: 40px 28px;
  gap: 18px;
}

.byline img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  /* A squircle in every browser, Safari has no corner-shape */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0C88 0 100 12 100 50S88 100 50 100 0 88 0 50 12 0 50 0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0C88 0 100 12 100 50S88 100 50 100 0 88 0 50 12 0 50 0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.byline p {
  margin: 0;
}

.who-line {
  font-size: 17px;
}

.byline .meta {
  display: flex;
  flex-wrap: wrap;
  margin-top: 4px;
  gap: 4px 18px;
  color: var(--muted);
  font-size: 15px;
}

.byline .meta > * {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Phones: the meta always takes two rows under the name, and the photo spans all three */
@media (max-width: 600px) {
  .byline {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .byline img {
    width: 84px;
    height: 84px;
  }

  .byline .meta {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    justify-content: start;
  }
}

/* Icons from CSS, so the editor shows them too */
.byline .meta > :is(.wp-block-post-date, .wp-block-post-time-to-read, .wp-block-post-comments-link)::before {
  flex: none;
  width: 16px;
  height: 16px;
  background: currentColor;
  content: "";
  -webkit-mask: var(--meta-icon) center / contain no-repeat;
  mask: var(--meta-icon) center / contain no-repeat;
}

.byline .meta > .wp-block-post-date {
  --meta-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='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='2'/%3E%3Cpath d='M3.5 9.5h17M8 3v4M16 3v4'/%3E%3C/svg%3E");
}

.byline .meta > .wp-block-post-time-to-read {
  --meta-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='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E");
}

.byline .meta > .wp-block-post-comments-link {
  --meta-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='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a8 8 0 0 1-11.6 7.1L4 20l1-4.2A8 8 0 1 1 20 12z'/%3E%3C/svg%3E");
}

/* Claps: "Hyvin kirjoitettu" after the last words. Click or hold to keep clapping */
.clap {
  display: flex;
  align-items: center;
  padding-block: 8px 16px;
  gap: 20px;
  font-family: var(--sans);
}

.clap-btn {
  display: grid;
  position: relative;
  flex: none;
  width: 72px;
  height: 72px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--tint);
  box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--accent) 30%, transparent);
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .2s, box-shadow .2s, scale .12s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.clap-btn:hover {
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.clap-btn:active {
  scale: .94;
}

.clap-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.clap-hands {
  width: 46px;
  height: 50px;
  overflow: visible;
  fill: currentColor;
}

/* Hands traced from the classic clap; they tip on hover and squeeze on each clap */
.clap-palms {
  transform-box: fill-box;
  transform-origin: 50% 85%;
  transition: scale .18s cubic-bezier(.3, 1.6, .5, 1), rotate .18s cubic-bezier(.3, 1.6, .5, 1), fill .3s;
}

.clap-spark {
  fill: var(--accent);
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transition: scale .25s;
}

.clap-btn:hover .clap-palms {
  rotate: -5deg;
}

.clap.is-clapping .clap-palms {
  scale: .88;
  rotate: 4deg;
  transition: none;
}

.clap.is-clapping .clap-spark {
  scale: 1.4;
  transition: none;
}

.clap.has-clapped .clap-btn {
  background: color-mix(in oklab, var(--accent) 16%, var(--tint));
}

.clap.has-clapped .clap-palms {
  fill: var(--accent);
}

/* The running count of one burst: +1, +2, +3 */
.clap-plus {
  position: absolute;
  top: -14px;
  left: 50%;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--deep);
  color: var(--on-deep);
  font: 700 13px / 1.2 var(--sans);
  font-variant-numeric: tabular-nums;
  opacity: 0;
  pointer-events: none;
  translate: -50% 6px;
  transition: opacity .25s, translate .25s;
}

.clap.is-streaking .clap-plus {
  opacity: 1;
  translate: -50% -12px;
}

.clap-bit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  pointer-events: none;
}

.clap-bit.is-ray {
  width: 3px;
  height: 10px;
  margin: -5px 0 0 -1.5px;
  border-radius: 2px;
}

.clap-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 30px;
  line-height: 1.1;
}

.clap-count {
  margin: 6px 0 0;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .clap-palms,
  .clap-spark,
  .clap-plus {
    transition: none;
  }
}

/* The passage most readers highlighted */
::highlight(top-highlight) {
  background-color: color-mix(in oklab, var(--accent) 22%, transparent);
}

.prose mark.top-highlight {
  background: color-mix(in oklab, var(--accent) 22%, transparent);
  color: inherit;
}

.prose .hl-label {
  display: flex;
  align-items: center;
  margin: 0 0 6px;
  gap: 6px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13.5px;
}

.prose .hl-label::before {
  width: 14px;
  height: 14px;
  background: var(--accent);
  content: "";
  -webkit-mask: 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='M9 11l-5 5v4h4l5-5M14 6l4 4M12.5 7.5l4-4 4 4-4 4'/%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' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l-5 5v4h4l5-5M14 6l4 4M12.5 7.5l4-4 4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* AI summary (rollemaa-site summary.php): closed by default, the article stays the opening */
.ai-summary {
  margin: -24px 0 44px;
  border-radius: 12px;
  background: var(--tint);
  font-family: var(--sans);
}

.ai-summary > summary {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  gap: 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.ai-summary > summary::-webkit-details-marker {
  display: none;
}

.ai-summary > summary::before,
.ai-summary > summary::after {
  flex: none;
  width: 18px;
  height: 18px;
  background: var(--accent);
  content: "";
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5c.6 4.6 2.4 6.4 7 7-4.6.6-6.4 2.4-7 7-.6-4.6-2.4-6.4-7-7 4.6-.6 6.4-2.4 7-7zM19 15.5c.3 2 1 2.7 3 3-2 .3-2.7 1-3 3-.3-2-1-2.7-3-3 2-.3 2.7-1 3-3z'/%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='M12 2.5c.6 4.6 2.4 6.4 7 7-4.6.6-6.4 2.4-7 7-.6-4.6-2.4-6.4-7-7 4.6-.6 6.4-2.4 7-7zM19 15.5c.3 2 1 2.7 3 3-2 .3-2.7 1-3 3-.3-2-1-2.7-3-3 2-.3 2.7-1 3-3z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ai-summary > summary::after {
  margin-left: auto;
  background: var(--muted);
  transition: rotate .2s;
  -webkit-mask-image: 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='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  mask-image: 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='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.ai-summary[open] > summary::after {
  rotate: 180deg;
}

.ai-summary > p {
  margin: 0;
  padding: 0 18px 10px 46px;
  color: var(--ink);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.5;
}

.ai-summary > ul {
  display: grid;
  margin: 0;
  padding: 0 18px 18px 46px;
  gap: 6px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.45;
  list-style: none;
}

.ai-summary > ul li {
  position: relative;
  padding-left: 16px;
}

.ai-summary > ul li::before {
  position: absolute;
  top: .62em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

/* The editor wraps the hidden resume bar in a block of its own */
.byline > .wp-block-html {
  display: none;
}

.resume {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  padding: 14px 18px;
  gap: 16px;
  border-radius: 8px;
  background: var(--tint);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
}

.resume[hidden] {
  display: none;
}

.resume-flag {
  flex: none;
  width: 14px;
  height: 30px;
  background: var(--deep);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}

.resume-text {
  flex: 1;
  min-width: 0;
}

.resume-bar {
  display: block;
  height: 3px;
  margin-top: 8px;
  border-radius: 2px;
  background: var(--rule);
}

.resume-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: var(--deep);
}

.resume a {
  font-weight: 700;
  white-space: nowrap;
}

/* Phone: the text gets the full width, the link goes under it */
@media (max-width: 600px) {
  .resume {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px 14px;
  }

  .resume-flag {
    margin-top: 2px;
  }

  .resume a {
    grid-column: 2;
    justify-self: start;
  }
}

/* Old article: when it was written and how old the writer was */
.archive-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  width: fit-content;
  max-width: 100%;
  /* As much room above (after the byline's own padding) as below, where the first line's leading adds to it */
  margin: -25px 0 40px;
  padding: 16px 24px 16px 20px;
  gap: 4px 20px;
  border-radius: 4px;
  background: var(--soft);
}

.archive-note .yr {
  color: var(--accent);
  font-family: var(--display);
  font-size: 40px;
  font-variant-numeric: lining-nums;
  line-height: 1;
}

.archive-note p {
  max-width: 46ch;
  margin: 0;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

.archive-note b {
  color: var(--ink);
}

/* After the text */
.endmatter {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 64px;
  gap: 48px;
}

.endmatter h2 {
  margin-bottom: 16px;
  font-size: 30px;
}

.keywords {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.keywords a {
  color: var(--ink);
}

.keywords a:hover {
  color: var(--accent);
}

.fedi-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.share {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 16px;
}

.share .btn {
  min-height: 42px;
  padding: 0 16px;
  font-size: 15px;
}

/* Same shape as the front page's random picks: date and a large title */
.related {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  gap: 28px;
  list-style: none;
}

.related .meta-text {
  color: var(--muted);
}

.related a {
  display: block;
  margin-top: 8px;
  color: inherit;
  font-family: var(--display);
  font-size: 30px;
  line-height: 1.1;
  text-decoration: none;
  text-wrap: pretty;
}

.related a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

/* Comments */
.comments {
  margin-top: 88px;
  padding-block: 72px 88px;
  background: color-mix(in oklab, var(--ground) 70%, var(--soft));
}

.comments-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 12px;
}

.comments-head h2 {
  font-size: clamp(40px, 3.6vw, 56px);
}

.count-line {
  display: inline-flex;
  align-items: center;
  margin: 0;
  gap: 8px;
  color: var(--muted);
  font-size: 16px;
}

.comments-empty {
  margin: 0 0 28px;
  color: var(--ink-2);
}

.comment-list,
.comment-list .comment > ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.comment-list > li {
  margin-bottom: 20px;
}

.cmt {
  padding: 22px 24px 16px;
  border-radius: 12px;
  background: var(--surface);
}

.cmt.is-author {
  background: var(--soft);
}

.cmt.is-author .when {
  color: var(--ink-2);
}

.cmt-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}

.cmt-head p {
  margin: 0;
}

.av {
  display: inline-grid;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 15px;
  background: var(--soft);
  font-weight: 700;
  object-fit: cover;
  place-items: center;
}

.av1 { background: color-mix(in oklab, #9DBF86 30%, var(--surface)); }
.av2 { background: color-mix(in oklab, #D48FB4 30%, var(--surface)); }
.av3 { background: color-mix(in oklab, #86AFC4 30%, var(--surface)); }
.av4 { background: color-mix(in oklab, #D2B57A 30%, var(--surface)); }

.cmt .name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.cmt .handle,
.cmt .when a {
  display: inline-block;
  min-height: 24px;
}

.cmt .handle {
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 400;
  text-decoration: none;
}

.cmt .handle:hover {
  text-decoration: underline;
}

.role {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--deep);
  color: var(--on-deep);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .02em;
}

.cmt .when {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 14px;
}

.cmt .when a {
  color: inherit;
  text-decoration: none;
}

.cmt .when a:hover {
  text-decoration: underline;
}

.via {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
}

.via .ic {
  width: 15px;
  height: 15px;
}

.awaiting {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 15px;
}

.cmt-body {
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.cmt-body p {
  margin-bottom: .7em;
}

.cmt-body.is-clamped {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 10;
}

.expand {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 4px;
  padding: 8px 0 2px;
  border: 0;
  border-top: 1px solid var(--rule);
  background: none;
  color: var(--ink-2);
}

.expand .ic {
  transition: transform .3s var(--ease);
}

.expand[aria-expanded="true"] .ic {
  transform: rotate(180deg);
}

.cmt-actions {
  display: flex;
  align-items: center;
  margin-top: 6px;
  gap: 20px;
  font-size: 15px;
}

.comment-reply-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 0;
  gap: 6px;
  border: 0;
  background: none;
  color: var(--deep);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
}

.comment-reply-link:hover {
  text-decoration: underline;
}

/* Likes and boosts (template-parts/reactions.php) */
.rx {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.rx-faces {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  gap: 4px;
  list-style: none;
}

.rx-faces a {
  display: block;
  position: relative;
  border-radius: 50%;
}

.rx-faces img {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--soft);
  object-fit: cover;
  transition: transform .18s cubic-bezier(.34, 1.56, .64, 1);
}

/* A quick, springy lift on the face you point at */
.rx-faces a:hover,
.rx-faces a:focus-visible {
  z-index: 1;
}

.rx-faces a:hover img,
.rx-faces a:focus-visible img {
  transform: scale(1.4);
}

@media (prefers-reduced-motion: reduce) {
  .rx-faces img {
    transition: none;
  }
}

.rx-count {
  display: inline-flex;
  align-items: center;
  margin: 0;
  gap: 7px;
  color: var(--ink-2);
}

.rx-count .ic {
  color: var(--accent);
}

.day .rx {
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.rx + .fedi-note {
  margin-top: 16px;
}

/* The ActivityPub remote reply dialog, in the theme's colours */
.activitypub-modal__overlay {
  --activitypub-modal-background-color: var(--surface);
  --activitypub-modal-border-color: var(--rule-strong);
  --activitypub-modal-text-color: var(--ink);
}

.activitypub-modal__frame {
  color: var(--ink);
  font-family: var(--sans);
}

.activitypub-modal__frame .activitypub-modal__close {
  color: var(--ink);
}

.activitypub-modal__frame input:not([type="checkbox"]) {
  border: 1px solid var(--field-line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
}

.activitypub-modal__frame .wp-element-button:not(.activitypub-modal__close) {
  border: 0;
  border-radius: 999px;
  background: var(--deep);
  color: var(--on-deep);
  font-weight: 600;
}

/* Replies hang from a thin line */
.comment-list .comment > ol {
  display: grid;
  position: relative;
  margin: 12px 0 0 20px;
  padding-left: 36px;
  gap: 12px;
}


.comment-list .comment > ol > .comment {
  position: relative;
}

/* Each reply draws its own elbow, and the line on to the next reply, so
   the thread line ends at the last reply */
.comment-list .comment > ol > .comment::before {
  position: absolute;
  top: -12px;
  left: -36px;
  width: 28px;
  height: 46px;
  border-bottom: 1px solid var(--rule-strong);
  border-left: 1px solid var(--rule-strong);
  border-bottom-left-radius: 10px;
  content: "";
}

.comment-list .comment > ol > .comment:not(:last-child)::after {
  position: absolute;
  top: 0;
  bottom: -12px;
  left: -36px;
  border-left: 1px solid var(--rule-strong);
  content: "";
}

/* Two ways to answer */
.cf-fedi {
  margin-top: 56px;
  padding: 40px 44px 44px;
  border-radius: 8px;
  background: var(--surface);
}

.cf-fedi h3 {
  margin-bottom: 10px;
  font-size: 32px;
}

.cf-fedi .hint {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.steps {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 26px;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.step-n {
  display: grid;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  place-items: center;
}

.steps b {
  display: block;
  margin: 4px 0 8px;
  font-size: 17px;
  line-height: 1.4;
}

.steps p {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
}

.cf-shares {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}

.cf-shares b {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.4;
}

.cf-shares p {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
}

/* The address and its copy button as one field */
.copyfield {
  display: flex;
  align-items: center;
  padding: 5px 5px 5px 16px;
  gap: 10px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  background: var(--field);
}

.copyfield:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.copybox {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13.5px;
}

.copyfield .btn {
  flex: none;
  min-height: 40px;
  padding: 0 16px;
  font-size: 15px;
}

@media (max-width: 860px) {
  .article-head:has(> figure) {
    min-height: 100svh;
  }

  .ph-text {
    padding: 140px 0 52px;
  }

  .cover-title {
    font-size: 42px;
  }

  .standfirst {
    font-size: 19px;
  }

  :is(.art-head, .article-head:not(:has(> figure))) {
    padding-top: 40px;
  }

  :is(.art-head, .article-head:not(:has(> figure))) .cover-title {
    font-size: 44px;
  }

  :is(.art-head, .article-head:not(:has(> figure))) .standfirst {
    font-size: 19px;
  }

  .archive-note {
    grid-template-columns: 1fr;
    margin-top: -25px;
    padding: 14px 16px;
  }

  .archive-note .yr {
    font-size: 32px;
  }

  .share {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .share .btn {
    justify-content: center;
  }

  .related {
    grid-template-columns: 1fr;
  }

  .comments {
    padding-block: 56px 72px;
  }

  .cmt {
    padding: 18px 18px 12px;
  }

  .cmt-body {
    font-size: 17.5px;
  }

  .comment-list .comment > ol {
    margin-left: 8px;
    padding-left: 22px;
  }

  .comment-list .comment > ol > .comment::before {
    left: -22px;
    width: 16px;
  }

  .comment-list .comment > ol > .comment:not(:last-child)::after {
    left: -22px;
  }

  .cf-fedi {
    padding: 30px 22px 34px;
  }
}

@media (max-width: 520px) {
  .share {
    grid-template-columns: 1fr;
  }
}

/**
 * The text itself: Atkinson Hyperlegible Next in a 760px column. Element-level rules, so they
 * hold for block posts and for the classic-editor HTML of the 2005–2020
 * archive alike. Block-specific details load per block (css/blocks/).
 */
.prose {
  font-size: 21px;
  line-height: 1.7;
  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))::first-letter,
.editor-styles-wrapper.post-type-post .prose > p:nth-child(1 of :not(.mnote, .hl-label))::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))::first-letter,
  .editor-styles-wrapper.post-type-post .prose > p:nth-child(1 of :not(.mnote, .hl-label))::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;
}

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

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

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

/**
 * Classic-editor HTML from the 2005–2020 archive. content.css already sets
 * the elements; this covers what only the old markup has: captioned
 * images, images floated inside paragraphs, smileys and dead embeds.
 */
.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;
  }
}

/**
 * Lokikirja: the days in the same reading column, type and meta as the
 * articles, with the day's data as one quiet block, and the heatmap.
 */
.dmeta {
  margin: 12px 0 24px;
  color: var(--muted);
}

.dmeta a {
  color: var(--muted);
}

:is(.art-head, .article-head:not(:has(> figure))) .dmeta {
  margin-top: 20px;
}

/* A year of writing */
.diary-heat {
  width: min(100% - 2 * var(--pad), 1020px);
  margin: 48px auto 0;
}

.heat-scroll {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  /* Room for today's outline, which the scroll box would clip */
  padding: 4px 4px 6px;
  overflow-x: auto;
  scrollbar-color: var(--rule-strong) transparent;
  border-radius: 6px;

  --h0: color-mix(in oklab, var(--rule) 70%, var(--ground));
  --h1: var(--soft);
  --h2: color-mix(in oklab, var(--accent) 34%, var(--soft));
  --h3: color-mix(in oklab, var(--accent) 67%, var(--soft));
  --h4: var(--accent);
}

.heat {
  display: grid;
  grid-template-columns: 28px auto;
  width: max-content;
  gap: 6px 8px;
  color: var(--muted);
  font-size: 12.5px;
}

.heat-months {
  position: relative;
  grid-column: 2;
  height: 18px;
}

.heat-months span {
  position: absolute;
  top: 0;
}

.heat-days {
  display: grid;
  grid-template-rows: repeat(7, 14px);
  gap: 4px;
  line-height: 14px;
}

.heat-grid {
  display: grid;
  grid-auto-columns: 14px;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 14px);
  gap: 4px;
}

.heat-day {
  display: block;
  border-radius: 3px;
  background: var(--h0);
}

.heat-day[data-l="1"] { background: var(--h1); }
.heat-day[data-l="2"] { background: var(--h2); }
.heat-day[data-l="3"] { background: var(--h3); }
.heat-day[data-l="4"] { background: var(--h4); }

a.heat-day:hover {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.heat-day.is-today {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.heat-legend {
  display: flex;
  grid-column: 2;
  align-items: center;
  justify-content: flex-end;
  margin-top: 8px;
  gap: 6px;
}

.heat-legend i {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

/* Black tooltip over a heatmap day, placed by heatmap.js */
.heat-tip {
  position: fixed;
  z-index: 70;
  padding: 6px 10px;
  border-radius: 6px;
  background: #000;
  color: #fff;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 8px));
  white-space: nowrap;
}

.heat-tip[hidden] {
  display: none;
}

/* The days */
.dentries {
  padding-top: 24px;
}

.dentry {
  padding-block: 64px 24px;
}

.dentry + .dentry {
  margin-top: 32px;
}

.dentry .dmeta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.dentry-day {
  margin: 0 0 10px;
  color: var(--accent);
  font: 600 15px / 1.6 var(--sans);
  letter-spacing: normal;
}

/* The date reads as the heading; the day's title is the h2 above it */
.dentry .diary-date {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(40px, 4vw, 56px);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.005em;
  line-height: 1;
}

.dentry .diary-date a {
  color: var(--ink);
  text-decoration: none;
}

.dentry .diary-date a:hover {
  color: var(--accent);
}

/* The day: gratitude, the measures as bars, the conditions */
.day {
  display: grid;
  margin-top: 32px;
  padding: 26px 28px;
  gap: 24px;
  border-radius: 8px;
  background: var(--surface);

  --tone-high: var(--accent);
  --tone-mid: light-dark(#8A6A1F, #E3BE72);
  --tone-low: light-dark(#A63F4E, #F2919B);
}

.day-label {
  margin: 0 0 6px;
  color: var(--muted);
}

.day-grat-text {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 30px;
  line-height: 1.2;
}

.day-scales {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin: 0;
  padding: 0;
  gap: 18px 28px;
  list-style: none;
}

.day-scales li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px 12px;
}

.day-scales .meta-text {
  color: var(--muted);
}

.day-scales b {
  color: var(--ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.day-bar {
  display: block;
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 9px;
  background: var(--soft);
}

.day-bar i {
  display: block;
  height: 100%;
  border-radius: 9px;
  background: var(--tone-high);
  transform-origin: left;
  animation: day-bar-grow .9s var(--ease) both;
}

.is-mid .day-bar i {
  background: var(--tone-mid);
}

.is-low .day-bar i {
  background: var(--tone-low);
}

@keyframes day-bar-grow {
  from {
    transform: scaleX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .day-bar i {
    animation: none;
  }
}

.day-conds {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding-top: 20px;
  gap: 8px 22px;
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
}

.day-conds span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.day-conds .ic {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.day-conds a {
  color: inherit;
}

/* A day's head: the diary's mark and the date, not an article's title */
.diary-head {
  padding-top: 72px;
  padding-bottom: 32px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--rule);
}

.diary-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 14px;
  gap: 4px 10px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.diary-kicker a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  text-decoration: none;
}

.diary-kicker a:hover {
  text-decoration: underline;
}

.diary-kicker > * {
  margin: 0;
}

.diary-kicker .wp-block-post-title {
  color: inherit;
  font: inherit;
  letter-spacing: normal;
}

.diary-head .diary-date {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(40px, 4.4vw, 62px);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.005em;
  line-height: 1.04;
}

.diary-head .meta-line {
  margin-top: 16px;
}

/* One day */
.explainer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  margin-top: 40px;
  padding: 16px 12px 16px 20px;
  gap: 12px;
  border-radius: 6px;
  background: var(--tint);
}

.explainer[hidden] {
  display: none;
}

.explainer p {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
}

.explainer b {
  color: var(--ink);
}

/* A year ago: the whole day on its own tinted sheet; a long one opens on request */
.yearago {
  margin-top: 72px;
  padding: 28px 30px 26px;
  border-radius: 8px;
  background: var(--tint);
}

.yearago-label {
  display: flex;
  align-items: center;
  margin: 0 0 14px;
  gap: 8px;
  color: var(--accent);
  font-weight: 600;
}

.yearago-date {
  margin: 0;
  font-family: var(--display);
  font-size: 30px;
  letter-spacing: -.005em;
  line-height: 1.08;
}

.yearago-date a {
  color: var(--ink);
  text-decoration: none;
}

.yearago-date a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.yearago .dmeta {
  margin: 8px 0 18px;
  font: 400 14.5px / 1.45 var(--sans);
  letter-spacing: normal;
}

.yearago-text {
  color: var(--ink-2);
  font-size: 17px;
}

.yearago-text.is-clamped {
  max-height: 16em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
}

.yearago-more {
  margin-top: 14px;
}

.yearago-more[aria-expanded="true"] .ic {
  transform: rotate(180deg);
}

.prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 56px;
  gap: 24px;
}

/* Arrow on the outer side, and the whole half is the link */
.prevnext .wp-block-post-navigation-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
}

.prevnext .post-navigation-link-next {
  justify-content: flex-end;
  text-align: right;
}

.prevnext a {
  display: grid;
  padding: 24px 0;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}

.prevnext a::after {
  position: absolute;
  inset: 0;
  content: "";
}

.prevnext .is-arrow-arrow {
  display: grid;
  flex: none;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--rule-strong);
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}

.prevnext .wp-block-post-navigation-link:hover .is-arrow-arrow {
  background: var(--accent);
  color: var(--on-deep);
}

.prevnext .post-navigation-link__label {
  color: var(--muted);
  font-size: 14px;
}

.prevnext .post-navigation-link__title {
  font-family: var(--display);
  font-size: 30px;
  font-style: italic;
  line-height: 1.05;
}

.prevnext a:hover .post-navigation-link__title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

@media (max-width: 860px) {
  .dentry {
    padding-block: 48px 16px;
  }

  .day {
    padding: 22px 20px;
  }

  .day-grat-text {
    font-size: 26px;
  }

  .day-scales {
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
  }

  .prevnext .post-navigation-link__title {
    font-size: 24px;
  }
}

/* One day per row on a phone, the dates are long */
@media (max-width: 600px) {
  .prevnext {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .prevnext .post-navigation-link-next {
    grid-column: 1;
  }

  .prevnext a {
    padding-block: 14px;
  }

  .prevnext .is-arrow-arrow {
    width: 40px;
    height: 40px;
  }

  .prevnext .wp-block-post-navigation-link {
    gap: 12px;
  }
}

/**
 * Pages: a large title over the reading column, and the 404 page.
 */
.page-hero {
  padding: clamp(104px, 14vh, 168px) var(--pad) 56px;
}

.page-hero .inner {
  width: min(100%, var(--wrap));
  margin: 0 auto;
}

.page-hero h1 {
  max-width: 12em;
  font-size: clamp(56px, 8vw, 132px);
  letter-spacing: -.02em;
  line-height: .92;
}

.page-hero h1 :is(em, i) {
  color: var(--accent);
}

.page-hero .intro {
  max-width: 36em;
  margin: 32px 0 0;
  color: var(--ink-2);
  font-family: var(--body);
  font-size: 21px;
  line-height: 1.6;
}

.page-body {
  padding-top: 40px;
}

:is(.page-template-template-no-title, .page-template-template-info) .page-body {
  padding-top: 24px;
}

/* Pages that open with their own heading in the content */
.page-body .prose > h1:first-child,
:is(.page-template-template-no-title, .page-template-template-info) .page-body .prose > :first-child > h2:first-child {
  margin: clamp(64px, 10vh, 120px) 0 .5em;
  font-size: clamp(56px, 8vw, 104px);
  letter-spacing: -.02em;
  line-height: .92;
}

/* Tietoa: the editor in chief, a larger byline */
.masthead {
  margin-top: clamp(64px, 10vh, 120px);
}

.masthead-title {
  margin: 0 0 20px;
  font-size: clamp(40px, 4vw, 56px);
}

.editor-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: start;
  padding: 28px;
  gap: 28px;
  border-radius: 16px;
  background: var(--tint);
}

.editor-card img {
  width: 132px;
  height: 132px;
  object-fit: cover;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0C88 0 100 12 100 50S88 100 50 100 0 88 0 50 12 0 50 0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0C88 0 100 12 100 50S88 100 50 100 0 88 0 50 12 0 50 0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.editor-card :is(p, ul, dl) {
  margin: 0;
}

.editor-role {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
}

.editor-name {
  margin-top: 4px !important;
  font-family: var(--display);
  font-size: clamp(32px, 3.4vw, 42px);
  line-height: 1.05;
}

.editor-titles {
  margin-top: 10px !important;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

.editor-merits {
  display: grid;
  margin-top: 16px !important;
  padding: 0;
  gap: 6px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  list-style: none;
}

.editor-merits li {
  position: relative;
  padding-left: 16px;
}

.editor-merits li::before {
  position: absolute;
  top: .55em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.editor-contact {
  display: flex;
  flex-wrap: wrap;
  margin-top: 20px !important;
  padding-top: 16px;
  gap: 10px 32px;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 15px;
}

.editor-contact dt {
  color: var(--muted);
  font-size: 13px;
}

.editor-contact dd {
  margin: 0;
  font-weight: 600;
}

@media (max-width: 600px) {
  .editor-card {
    grid-template-columns: 84px minmax(0, 1fr);
    padding: 20px;
    gap: 18px;
  }

  .editor-card img {
    width: 84px;
    height: 84px;
  }

  /* Photo beside the name, the rest under both */
  .editor-card {
    gap: 0 18px;
  }

  .editor-card > .wp-block-group {
    display: contents;
  }

  .editor-card > figure {
    grid-row: span 2;
    align-self: center;
  }

  .editor-role {
    align-self: end;
  }

  .editor-titles,
  .editor-merits,
  .editor-contact {
    grid-column: 1 / -1;
  }
}

/* 404 */
.nf {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: start;
  width: min(100% - 2 * var(--pad), var(--wrap));
  margin: 0 auto;
  padding-block: 72px 40px;
  gap: 48px clamp(32px, 6vw, 96px);
}

.nf .big {
  margin: 0 0 24px;
  color: var(--accent);
  font-family: var(--display);
  font-size: clamp(120px, 16vw, 240px);
  letter-spacing: -.03em;
  line-height: .8;
}

.nf h1 {
  margin-bottom: 24px;
  font-size: clamp(52px, 6vw, 92px);
  line-height: .95;
}

.nf p {
  max-width: 30em;
  color: var(--ink-2);
  font-family: var(--body);
  font-size: 20px;
}

.nf .bigsearch {
  margin: 28px 0 16px;
}

.nf p.meta-text {
  font-family: var(--sans);
  font-size: 15px;
}

.nf .right {
  display: grid;
  padding-top: 12px;
  gap: 20px;
}

@media (max-width: 860px) {
  .nf {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 40px 24px;
  }

  .nf .big {
    font-size: 120px;
  }
}

/**
 * Form fields: the comment form, the search page and the 404 search.
 */
.field {
  display: grid;
  margin: 0 0 18px;
  gap: 8px;
}

.field label {
  font-size: 15px;
  font-weight: 500;
}

.field input,
.field textarea,
.bigsearch input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  font-size: 17px;
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.bigsearch input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.bigsearch {
  max-width: 720px;
}

.bigsearch .wp-block-search__inside-wrapper {
  gap: 10px;
}

.bigsearch input {
  flex: 1;
  min-width: 0;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--field);
  font-size: 18px;
}

.day [data-day] {
  display: contents;
}

.wp-block-comments ~ .comments-empty {
  display: none;
}

article:has(.prose h1) > .page-hero {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.article-head:not(:has(> figure)) .hero-foot {
  display: none;
}

[hidden] {
  display: none !important;
}

.who-photos figure {
  margin: 0;
}

.cmt .name a:not(.handle) {
  color: inherit;
  text-decoration: none;
}

.byline figure {
  flex: none;
  margin: 0;
}

/* The opening's RSS link is in the footer too, phones keep only the handle */
@media (max-width: 600px) {
  .follow-row a[href$="/feed/"] {
    display: none;
  }
}

/* Phones: one row, the sections behind a menu button (core navigation's own overlay) */
@media (max-width: 599px) {
  .site-head .bar {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 4px;
  }

  .site-head .nav {
    grid-column: 3;
    grid-row: 1;
    overflow: visible;
  }

  .nav .wp-block-navigation__responsive-container-open {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: inherit;
  }

  .nav .is-menu-open .wp-block-navigation-item__content {
    padding: 6px 0;
    font-family: var(--display);
    font-size: 44px;
    line-height: 1.1;
    text-underline-offset: .12em;
  }
}

/* The phone menu is a frosted sheet: it slides down as tall as its links,
   lets the page show through, and follows a finger back up (front-end.js) */
@media (max-width: 599px) {
  .site-head .nav.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open.is-menu-open {
    inset: 0 0 auto;
    padding: max(24px, env(safe-area-inset-top)) var(--pad) 24px;
    overflow: visible;
    border-bottom: 1px solid color-mix(in oklab, var(--ink) 10%, transparent);
    border-radius: 0 0 28px 28px;
    background: linear-gradient(180deg, color-mix(in oklab, var(--ground) 52%, transparent), color-mix(in oklab, var(--ground) 34%, transparent));
    box-shadow: inset 0 -1px 0 color-mix(in oklab, #fff 14%, transparent), inset 0 1px 18px color-mix(in oklab, #fff 6%, transparent), 0 18px 40px rgb(0 0 0 / .22);
    color: var(--ink);
    -webkit-backdrop-filter: blur(18px) saturate(1.9) brightness(1.05);
    backdrop-filter: blur(18px) saturate(1.9) brightness(1.05);
    touch-action: none;
    transition: transform .25s ease-out;
  }

  .site-head .nav .is-menu-open .wp-block-navigation__responsive-container-content {
    padding-top: 0;
  }

  /* The glass takes the page's colours, so the links do too, also over a photo */
  :root .site-head .nav .is-menu-open a.wp-block-navigation-item__content.wp-block-navigation-item__content {
    color: var(--ink);
  }

  .site-head .nav .is-menu-open .wp-block-navigation__container {
    gap: 4px;
  }

  /* Where the open button was, round and quiet */
  .site-head .nav .wp-block-navigation__responsive-container-close.wp-block-navigation__responsive-container-close {
    top: calc(max(16px, env(safe-area-inset-top)) - max(24px, env(safe-area-inset-top)));
    right: 0;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: color-mix(in oklab, var(--ink) 8%, transparent);
    color: var(--ink);
  }

  .site-head .nav .wp-block-navigation__responsive-container-close svg {
    width: 22px;
    height: 22px;
  }

  .site-head .nav .is-menu-open .wp-block-navigation__responsive-container-close:hover {
    background: color-mix(in oklab, var(--ink) 14%, transparent);
  }

  /* A handle says it can be pulled */
  .site-head .nav .is-menu-open .wp-block-navigation__responsive-close::after {
    display: block;
    width: 40px;
    height: 5px;
    margin: 18px auto 0;
    border-radius: 3px;
    background: color-mix(in oklab, var(--ink) 25%, transparent);
    content: "";
  }
}

@media (max-width: 599px) and (prefers-reduced-motion: no-preference) {
  .site-head .nav.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open.is-menu-open {
    animation: sheet-down .26s cubic-bezier(.2, .9, .25, 1);
  }

}

@keyframes sheet-down {
  from {
    transform: translateY(-100%);
  }
}
