@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn-arabic.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #f7f5f0;
  --paper-raised: #fffdf8;
  --ink: #20211e;
  --ink-soft: #575852;
  --muted: #85857d;
  --line: rgba(32, 33, 30, 0.14);
  --line-strong: rgba(32, 33, 30, 0.28);
  --accent: #b8522a;
  --accent-soft: rgba(184, 82, 42, 0.09);
  --font: "Vazirmatn", Tahoma, Arial, sans-serif;
  --shell: min(1120px, calc(100vw - 64px));
  --content: 720px;
  --header-height: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #171815;
  --paper-raised: #1e1f1b;
  --ink: #efede7;
  --ink-soft: #bab8b0;
  --muted: #8e8d86;
  --line: rgba(239, 237, 231, 0.12);
  --line-strong: rgba(239, 237, 231, 0.25);
  --accent-soft: rgba(184, 82, 42, 0.16);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--muted) var(--paper);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.menu-open,
body:has(.search-dialog[open]) {
  overflow: hidden;
}

::selection {
  background: color-mix(in srgb, var(--accent) 78%, transparent);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input[type="submit"] {
  cursor: pointer;
}

button {
  border: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

.site-shell {
  width: var(--shell);
  margin-inline: auto;
}

.site-shell-wide {
  width: min(1240px, calc(100vw - 48px));
  margin-inline: auto;
}

.site-shell-narrow {
  width: min(880px, calc(100vw - 48px));
  margin-inline: auto;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus,
.skip-link:focus {
  z-index: 10001;
  top: 12px;
  right: 12px;
  width: auto;
  height: auto;
  padding: 10px 16px;
  clip: auto !important;
  background: var(--ink);
  color: var(--paper);
}

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

.site-noise {
  position: fixed;
  z-index: 9999;
  inset: 0;
  opacity: 0.018;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.reading-progress {
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  pointer-events: none;
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
}

/* Header */
.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: var(--header-height);
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(18px);
  transition: border-color 0.25s ease;
}

.site-header.is-sticky {
  border-color: var(--line);
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(160px, 1fr);
  align-items: center;
  height: 100%;
}

.site-identity {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  max-width: 240px;
}

.site-identity strong {
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-logo .custom-logo-link {
  display: block;
}

.brand-logo img {
  width: auto;
  max-width: 140px;
  max-height: 38px;
  object-fit: contain;
}

.primary-nav .menu,
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.primary-nav li {
  position: relative;
}

.primary-nav a {
  position: relative;
  display: block;
  padding-block: 8px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 540;
}

.primary-nav a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  width: 0;
  height: 1px;
  background: var(--accent);
  content: "";
  transition: width 0.3s var(--ease);
}

.primary-nav a:hover::after,
.primary-nav .current-menu-item > a::after,
.primary-nav .current_page_item > a::after {
  width: 100%;
}

.primary-nav .sub-menu {
  position: absolute;
  top: 100%;
  right: -16px;
  display: grid;
  min-width: 180px;
  gap: 3px;
  padding: 10px;
  visibility: hidden;
  opacity: 0;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  transform: translateY(8px);
  transition: 0.2s ease;
}

.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu {
  visibility: visible;
  opacity: 1;
  transform: none;
}

.header-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 2px;
}

.icon-button {
  display: inline-grid;
  width: 39px;
  height: 39px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}

.icon-button:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.icon-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.6;
}

.theme-icon-light,
:root[data-theme="dark"] .theme-icon-dark {
  display: none;
}

:root[data-theme="dark"] .theme-icon-light {
  display: block;
}

.menu-toggle {
  display: none;
  width: 39px;
  height: 39px;
  padding: 10px 8px;
  background: transparent;
}

.menu-toggle span:not(.screen-reader-text) {
  display: block;
  width: 100%;
  height: 1px;
  margin-block: 6px;
  background: currentColor;
  transition: transform 0.25s var(--ease);
}

.utility-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Home */
.journal-home {
  padding-bottom: clamp(80px, 11vw, 150px);
}

.home-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(270px, 0.7fr);
  align-items: end;
  gap: clamp(45px, 8vw, 110px);
  padding-block: clamp(52px, 7vw, 78px);
  animation: fade-up 0.7s var(--ease) both;
}

.home-overview__copy {
  max-width: 690px;
}

.home-overview h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(2.15rem, 3.6vw, 3.65rem);
  font-weight: 470;
  line-height: 1.35;
  letter-spacing: -0.045em;
}

.home-overview__copy > p:last-child {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  line-height: 2;
}

.home-overview__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line-strong);
}

.home-overview__stats > div {
  min-height: 92px;
  padding: 19px 0 13px 20px;
  border-bottom: 1px solid var(--line);
}

.home-overview__stats > div:nth-child(even) {
  padding-right: 20px;
  border-right: 1px solid var(--line);
}

.home-overview__stats .home-overview__updated {
  display: flex;
  grid-column: 1 / -1;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.home-overview__stats dt {
  color: var(--muted);
  font-size: 0.62rem;
}

.home-overview__stats dd {
  margin: 4px 0 0;
  font-size: 1.45rem;
  font-weight: 370;
  font-variant-numeric: tabular-nums;
}

.home-overview__stats .home-overview__updated dd {
  margin: 0;
  font-size: 0.72rem;
}

.notes-index {
  border-top: 1px solid var(--ink);
}

.journal-home > .notes-index:first-child {
  margin-top: clamp(55px, 8vw, 100px);
}

.notes-index__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 35px;
  padding-block: 32px 38px;
}

.notes-index__header h2,
.page-header h1 {
  margin: 0;
  font-size: clamp(2rem, 3.5vw, 3.7rem);
  font-weight: 480;
  letter-spacing: -0.045em;
}

.notes-index__header p,
.page-header > p:last-child,
.archive-description {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.category-list a {
  padding: 6px 11px;
  border-radius: 99px;
  color: var(--muted);
  font-size: 0.68rem;
}

.category-list a:hover,
.category-list .is-current {
  background: var(--ink);
  color: var(--paper);
}

.posts-list {
  border-top: 1px solid var(--line);
}

.post-row {
  position: relative;
  display: grid;
  min-height: 235px;
  grid-template-columns: 92px minmax(0, 1fr) 48px;
  align-items: center;
  gap: clamp(24px, 5vw, 68px);
  padding-block: 35px;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, padding 0.3s var(--ease);
}

.post-row::before {
  position: absolute;
  z-index: -1;
  inset: 0 -22px;
  opacity: 0;
  background: var(--paper-raised);
  content: "";
  transition: opacity 0.3s ease;
}

.post-row:hover::before {
  opacity: 1;
}

.post-row--featured {
  min-height: 285px;
  grid-template-columns: 112px minmax(0, 1fr) 52px;
  padding: 42px 30px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper-raised) 72%, var(--accent-soft));
}

.post-row--featured::before {
  display: none;
}

.post-row--featured h3 {
  max-width: 760px;
  font-size: clamp(2rem, 3.4vw, 3.35rem);
}

.post-row__featured-label {
  display: block;
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 0.6rem;
  font-weight: 650;
  white-space: nowrap;
}

.post-row__link {
  position: absolute;
  z-index: 1;
  inset: 0;
}

.post-row__date time {
  display: flex;
  flex-direction: column;
  color: var(--muted);
  line-height: 1.2;
}

.post-row__date span {
  color: var(--ink);
  font-size: 1.8rem;
  font-weight: 250;
  font-variant-numeric: tabular-nums;
}

.post-row__date small {
  margin-top: 7px;
  font-size: 0.62rem;
}

.post-row__body {
  max-width: 760px;
}

.post-row__topics {
  position: relative;
  z-index: 2;
  min-height: 25px;
}

.category-pill {
  display: inline-block;
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 600;
}

.category-pill::before {
  margin-left: 6px;
  content: "—";
}

.post-row h3 {
  margin: 13px 0 10px;
  font-size: clamp(1.55rem, 2.7vw, 2.6rem);
  font-weight: 520;
  line-height: 1.45;
  letter-spacing: -0.035em;
  transition: color 0.25s ease;
}

.post-row:hover h3 {
  color: var(--accent);
}

.post-row__body > p {
  max-width: 650px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.95;
}

.post-row__meta {
  display: flex;
  gap: 18px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.62rem;
}

.post-row__arrow {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: 0.25s var(--ease);
}

.post-row__arrow svg {
  width: 15px;
}

.post-row:hover .post-row__arrow {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  transform: translateX(-4px);
}

/* Pagination and archives */
.navigation.pagination {
  margin-top: 55px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.page-numbers {
  display: inline-grid;
  min-width: 38px;
  height: 38px;
  padding-inline: 7px;
  place-items: center;
  border-radius: 50%;
  font-size: 0.72rem;
}

.page-numbers.current {
  background: var(--ink);
  color: var(--paper);
}

.page-numbers.prev,
.page-numbers.next {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  margin-inline: 10px;
  border-radius: 0;
}

.page-numbers svg {
  width: 14px;
}

.listing-page {
  min-height: 70vh;
  padding-bottom: 120px;
}

.page-header {
  max-width: 820px;
  padding-block: clamp(70px, 10vw, 125px);
}

.section-kicker {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.68rem;
}

.section-kicker span {
  display: none;
}

.empty-state {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  text-align: center;
}

.empty-state__mark {
  color: var(--accent);
  font-size: 3rem;
}

.empty-state h2 {
  margin: 5px 0;
  font-size: 1.7rem;
  font-weight: 500;
}

.empty-state p {
  max-width: 500px;
  margin: 0 0 25px;
  color: var(--muted);
}

.button-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 9px 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.75rem;
}

.button-link svg {
  width: 15px;
}

/* Single post */
.single-header {
  padding-block: clamp(32px, 4vw, 50px) clamp(55px, 7vw, 78px);
  animation: fade-up 0.7s var(--ease) both;
}

.single-breadcrumb {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 7px;
  margin-bottom: clamp(44px, 6vw, 68px);
  color: var(--muted);
  font-size: 0.62rem;
  white-space: nowrap;
}

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

.single-breadcrumb svg {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
}

.single-breadcrumb span {
  overflow: hidden;
  max-width: 290px;
  text-overflow: ellipsis;
}

.single-header__label {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.68rem;
}

.single-header h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.45rem, 4.5vw, 4.15rem);
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -0.052em;
}

.single-lead {
  max-width: 700px;
  margin: 30px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.23rem);
  line-height: 2;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.65rem;
}

.single-byline {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 20px;
  margin-top: 34px;
  border-block: 1px solid var(--line);
}

.single-byline .entry-meta {
  margin: 0;
}

.single-byline__author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.single-byline__author img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  filter: grayscale(1);
}

.single-byline__author span {
  display: grid;
  line-height: 1.45;
}

.single-byline__author small {
  color: var(--muted);
  font-size: 0.55rem;
}

.single-byline__author strong {
  font-size: 0.7rem;
  font-weight: 620;
}

.bookmark-post {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  margin-right: auto;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: transparent;
  color: var(--muted);
  font-size: 0.62rem;
  transition: 0.2s ease;
}

.bookmark-post svg {
  width: 13px;
}

.bookmark-post:hover,
.bookmark-post.is-saved {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.bookmark-post.is-saved svg {
  fill: currentColor;
}

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

.meta-item svg {
  width: 13px;
  height: 13px;
}

.meta-separator {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

.resume-reading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  margin-top: 24px;
  border-bottom: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-size: 0.7rem;
}

.resume-reading svg {
  width: 14px;
}

.reading-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, var(--content)) 190px;
  justify-content: center;
  gap: clamp(30px, 5vw, 75px);
}

.article-toc {
  grid-column: 1;
}

.article-toc__inner {
  position: sticky;
  top: 110px;
  padding-top: 7px;
}

.article-toc__inner > p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 650;
}

.article-toc ol {
  padding: 0;
  margin: 0;
  list-style: none;
}

.article-toc li {
  position: relative;
  padding-right: 15px;
  margin-bottom: 11px;
}

.article-toc li::before {
  position: absolute;
  top: 0.78em;
  right: 0;
  width: 5px;
  height: 1px;
  background: var(--line-strong);
  content: "";
  transition: width 0.2s ease, background 0.2s ease;
}

.article-toc li.is-sub {
  padding-right: 25px;
}

.article-toc a {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.7;
  transition: color 0.2s ease;
}

.article-toc li.is-active::before {
  width: 10px;
  background: var(--accent);
}

.article-toc li.is-active a,
.article-toc a:hover {
  color: var(--ink);
}

.entry-content {
  --article-scale: 1;
  grid-column: 2;
  width: 100%;
  max-width: var(--content);
  font-size: calc(1.08rem * var(--article-scale));
  line-height: 2.18;
  transition: max-width 0.35s var(--ease), font-size 0.2s ease;
}

body.reading-wide .entry-content {
  max-width: 880px;
}

body.reading-wide .reading-layout {
  grid-template-columns: 170px minmax(0, 880px) 0;
}

.entry-content > * {
  margin-block: 0 1.7em;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  scroll-margin-top: 110px;
  margin-top: 2.5em;
  margin-bottom: 0.75em;
  font-weight: 650;
  line-height: 1.55;
  letter-spacing: -0.025em;
}

.entry-content h2 {
  font-size: 1.8em;
}

.entry-content h3 {
  font-size: 1.4em;
}

.entry-content h4 {
  font-size: 1.15em;
}

.heading-permalink {
  display: inline-grid;
  width: 1.55em;
  height: 1.55em;
  margin-right: 0.38em;
  place-items: center;
  opacity: 0;
  border-radius: 50%;
  color: var(--muted) !important;
  font-size: 0.48em;
  font-weight: 500;
  text-decoration: none !important;
  vertical-align: middle;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.entry-content h2:hover .heading-permalink,
.entry-content h3:hover .heading-permalink,
.heading-permalink:focus-visible {
  opacity: 1;
}

.heading-permalink:hover {
  background: var(--accent-soft);
}

.entry-content a:not(.wp-block-button__link) {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

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

.entry-content blockquote,
.wp-block-quote {
  padding: 8px 28px 8px 0;
  margin: 2.8em 0;
  border: 0;
  border-right: 2px solid var(--accent);
  font-size: 1.16em;
  font-weight: 520;
  line-height: 2;
}

.entry-content blockquote cite {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.68em;
  font-style: normal;
  font-weight: 400;
}

.entry-content ul,
.entry-content ol {
  padding-right: 1.4em;
}

.entry-content li {
  padding-right: 0.25em;
  margin-bottom: 0.55em;
}

.entry-content li::marker {
  color: var(--accent);
}

.entry-content figure,
.entry-content .wp-block-image {
  margin-block: 3em;
}

.entry-content figure img,
.entry-content .wp-block-image img {
  width: 100%;
}

.entry-content figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.68em;
  text-align: center;
}

.entry-content .alignwide {
  width: min(1040px, calc(100vw - 48px));
  max-width: none;
  margin-right: 50%;
  transform: translateX(50%);
}

.entry-content .alignfull {
  width: 100vw;
  max-width: none;
  margin-right: calc(50% - 50vw);
}

.entry-content pre,
.entry-content code {
  direction: ltr;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: left;
}

.entry-content pre {
  padding: 22px;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  font-size: 0.8em;
}

.code-frame {
  position: relative;
  margin-block: 2.5em;
}

.code-frame pre {
  padding-top: 56px;
  margin: 0;
}

.code-copy {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 12px;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.64rem;
  transition: 0.2s ease;
}

.code-copy:hover,
.code-copy.is-copied {
  border-color: var(--accent);
  color: var(--accent);
}

.entry-content :not(pre) > code {
  padding: 2px 5px;
  background: var(--paper-raised);
  font-size: 0.84em;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88em;
}

.table-scroll {
  max-width: 100%;
  margin-block: 2.6em;
  overflow-x: auto;
  scrollbar-width: thin;
}

.table-scroll table {
  min-width: 620px;
  margin: 0;
}

.entry-content th,
.entry-content td {
  padding: 11px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

.entry-content hr {
  width: 80px;
  height: 1px;
  margin: 4em auto;
  border: 0;
  background: var(--line-strong);
}

/* Editorial cards and long-form block tools */
.entry-content .is-style-journal-note,
.entry-content .is-style-journal-info,
.entry-content .is-style-journal-tip,
.entry-content .is-style-journal-warning,
.entry-content .is-style-journal-danger,
.entry-content .is-style-journal-summary,
.entry-content .journal-callout {
  --callout-color: var(--ink-soft);
  position: relative;
  padding: 24px 26px 22px;
  margin-block: 2.7em;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--callout-color) 30%, var(--line));
  border-right: 3px solid var(--callout-color);
  background: color-mix(in srgb, var(--callout-color) 7%, var(--paper-raised));
}

.entry-content .is-style-journal-info,
.entry-content .journal-callout--info {
  --callout-color: #3972a7;
}

.entry-content .is-style-journal-tip,
.entry-content .journal-callout--tip {
  --callout-color: #397c60;
}

.entry-content .is-style-journal-warning,
.entry-content .journal-callout--warning {
  --callout-color: #b87918;
}

.entry-content .is-style-journal-danger,
.entry-content .journal-callout--danger {
  --callout-color: #b94343;
}

.entry-content .is-style-journal-summary,
.entry-content .journal-callout--summary {
  --callout-color: #6e5ba0;
}

.entry-content .is-style-journal-note::before,
.entry-content .is-style-journal-info::before,
.entry-content .is-style-journal-tip::before,
.entry-content .is-style-journal-warning::before,
.entry-content .is-style-journal-danger::before,
.entry-content .is-style-journal-summary::before,
.entry-content .journal-callout::before {
  position: absolute;
  top: 15px;
  left: 17px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--callout-color);
  border-radius: 50%;
  content: "";
}

.entry-content .is-style-journal-note > :first-child,
.entry-content .is-style-journal-info > :first-child,
.entry-content .is-style-journal-tip > :first-child,
.entry-content .is-style-journal-warning > :first-child,
.entry-content .is-style-journal-danger > :first-child,
.entry-content .is-style-journal-summary > :first-child,
.entry-content .journal-callout > :first-child {
  margin-top: 0;
}

.entry-content .is-style-journal-note > :last-child,
.entry-content .is-style-journal-info > :last-child,
.entry-content .is-style-journal-tip > :last-child,
.entry-content .is-style-journal-warning > :last-child,
.entry-content .is-style-journal-danger > :last-child,
.entry-content .is-style-journal-summary > :last-child,
.entry-content .journal-callout > :last-child,
.entry-content .journal-callout__body > :last-child {
  margin-bottom: 0;
}

.entry-content .is-style-journal-note h3,
.entry-content .is-style-journal-info h3,
.entry-content .is-style-journal-tip h3,
.entry-content .is-style-journal-warning h3,
.entry-content .is-style-journal-danger h3,
.entry-content .is-style-journal-summary h3,
.entry-content .journal-callout h3 {
  margin: 0 0 8px;
  color: var(--callout-color);
  font-size: 0.88em;
  font-weight: 720;
}

.entry-content .is-style-journal-note p,
.entry-content .is-style-journal-info p,
.entry-content .is-style-journal-tip p,
.entry-content .is-style-journal-warning p,
.entry-content .is-style-journal-danger p,
.entry-content .is-style-journal-summary p,
.entry-content .journal-callout p {
  margin-top: 0;
  color: var(--ink-soft);
  font-size: 0.88em;
  line-height: 2;
}

.entry-content details.is-style-journal-faq {
  padding: 0;
  margin-block: 1em;
  border-block: 1px solid var(--line);
}

.entry-content details.is-style-journal-faq + details.is-style-journal-faq {
  margin-top: calc(-1em - 1px);
  border-top: 0;
}

.entry-content details.is-style-journal-faq summary {
  position: relative;
  padding: 18px 0 18px 38px;
  cursor: pointer;
  font-size: 0.92em;
  font-weight: 650;
  list-style: none;
}

.entry-content details.is-style-journal-faq summary::-webkit-details-marker {
  display: none;
}

.entry-content details.is-style-journal-faq summary::after {
  position: absolute;
  top: 50%;
  left: 3px;
  color: var(--accent);
  content: "+";
  font-size: 1.2rem;
  font-weight: 300;
  transform: translateY(-50%);
}

.entry-content details.is-style-journal-faq[open] summary::after {
  content: "−";
}

.entry-content details.is-style-journal-faq > :not(summary) {
  margin-inline: 0;
  color: var(--ink-soft);
}

.entry-content ol.is-style-journal-steps {
  padding: 0;
  counter-reset: journal-step;
  list-style: none;
}

.entry-content ol.is-style-journal-steps > li {
  position: relative;
  min-height: 42px;
  padding: 4px 52px 22px 0;
  counter-increment: journal-step;
}

.entry-content ol.is-style-journal-steps > li::before {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  content: counter(journal-step);
  font-size: 0.68rem;
  font-weight: 650;
}

.entry-content ul.is-style-journal-checklist {
  padding: 0;
  list-style: none;
}

.entry-content ul.is-style-journal-checklist > li {
  position: relative;
  padding-right: 32px;
}

.entry-content ul.is-style-journal-checklist > li::before {
  position: absolute;
  top: 0.62em;
  right: 0;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  border-radius: 50%;
  color: var(--accent);
  content: "✓";
  font-size: 0.58rem;
  line-height: 1;
}

/* A playful reading break, inserted after the configured paragraph. */
.pistachio-break {
  position: relative;
  display: grid;
  min-height: 250px;
  grid-template-columns: minmax(0, 1fr) 230px;
  align-items: center;
  gap: 28px;
  padding: 28px 32px;
  margin-block: 3.2em !important;
  overflow: hidden;
  opacity: 0;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  transform: translateY(18px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease), border-color 0.25s ease;
}

.pistachio-break::before {
  position: absolute;
  top: -75px;
  left: -55px;
  width: 315px;
  height: 315px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 50%;
  content: "";
}

.pistachio-break::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  content: "";
}

.pistachio-break.is-visible {
  opacity: 1;
  transform: none;
}

.pistachio-break:hover {
  border-color: var(--line-strong);
}

.pistachio-break__content,
.pistachio-break__art {
  position: relative;
  z-index: 1;
}

.pistachio-break__kicker {
  margin: 0 0 7px !important;
  color: var(--accent);
  font-size: 0.64rem !important;
  font-weight: 700;
}

.entry-content .pistachio-break h3 {
  max-width: 390px;
  margin: 0;
  font-size: clamp(1.25rem, 2.3vw, 1.75rem);
  font-weight: 680;
  line-height: 1.65;
}

.pistachio-break__text {
  max-width: 390px;
  margin: 10px 0 18px !important;
  color: var(--ink-soft);
  font-size: 0.78em !important;
  line-height: 1.9;
}

.pistachio-break__action {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: transparent;
  color: var(--ink);
  font-size: 0.66rem;
  font-weight: 650;
  transition: 0.22s ease;
}

.pistachio-break__action:hover,
.pistachio-break__action[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.pistachio-break__art {
  display: grid;
  place-items: center;
}

.pistachio-break__art img {
  width: 225px;
  max-width: none;
  filter: drop-shadow(0 14px 14px rgba(32, 33, 30, 0.08));
  transform: rotate(-2deg);
  transition: transform 0.55s var(--ease);
}

.pistachio-break.is-taken .pistachio-break__art img {
  animation: pistachio-nod 0.55s var(--ease);
  transform: rotate(2deg) scale(0.96);
}

.reading-pause {
  position: relative;
  padding: 38px 0 38px 55px;
  margin-block: 4em !important;
  border-block: 1px solid var(--line);
}

.reading-pause::before {
  position: absolute;
  top: 50%;
  left: 2px;
  color: var(--accent);
  font-size: 2.5rem;
  content: "…";
  transform: translateY(-58%);
}

.reading-pause span {
  display: block;
  max-width: 520px;
  color: var(--ink-soft);
  font-size: 0.87em;
  font-weight: 520;
}

.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 32px;
  margin-top: 65px;
  border-top: 1px solid var(--line);
  font-size: 0.7rem;
}

.entry-tags a {
  text-decoration: none !important;
}

/* Reading controls */
.reading-dock {
  position: fixed;
  z-index: 90;
  right: 50%;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  visibility: hidden;
  opacity: 0;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: color-mix(in srgb, var(--paper-raised) 90%, transparent);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(18px);
  transform: translate(50%, 14px);
  transition: 0.3s var(--ease);
}

.reading-dock.is-visible {
  visibility: visible;
  opacity: 1;
  transform: translate(50%, 0);
}

.reading-dock button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  font-size: 0.85rem;
}

.reading-dock button:hover,
.reading-dock button.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.reading-dock button svg {
  width: 15px;
}

.reading-dock__progress {
  min-width: 42px;
  color: var(--muted);
  font-size: 0.62rem;
  text-align: center;
}

.reading-dock__divider {
  width: 1px;
  height: 20px;
  margin-inline: 3px;
  background: var(--line);
}

.selection-tool {
  position: fixed;
  z-index: 110;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  font-size: 0.65rem;
}

.selection-tool svg {
  width: 13px;
}

body.focus-mode .site-header,
body.focus-mode .site-footer,
body.focus-mode .article-toc,
body.focus-mode .post-reactions,
body.focus-mode .post-author,
body.focus-mode .post-navigation-custom,
body.focus-mode .comments-area {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

body.focus-mode .reading-layout {
  grid-template-columns: minmax(0, var(--content));
}

body.focus-mode .entry-content {
  grid-column: 1;
}

/* Reactions, author and next posts */
.post-reactions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding-block: 75px;
  margin-top: 110px;
  border-block: 1px solid var(--line);
}

.post-reactions h2 {
  max-width: 350px;
  margin: 0;
  font-size: 1.35rem;
  font-weight: 520;
  line-height: 1.7;
}

.reaction-buttons {
  display: flex;
  gap: 8px;
}

.reaction-buttons button {
  display: grid;
  min-width: 108px;
  gap: 3px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.reaction-buttons button:hover,
.reaction-buttons button.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.reaction-buttons button > span {
  color: var(--accent);
  font-size: 1.3rem;
}

.reaction-buttons strong {
  font-size: 0.68rem;
  font-weight: 580;
}

.reaction-buttons small {
  color: var(--muted);
  font-size: 0.58rem;
}

.post-author {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 26px;
  padding-block: 65px;
}

.post-author__avatar img {
  border-radius: 50%;
  filter: grayscale(1);
}

.post-author h2 {
  margin: 0 0 5px;
  font-size: 1.1rem;
}

.post-author p:last-child {
  max-width: 580px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.post-navigation-custom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding-block: 45px 90px;
}

.post-nav-card {
  display: flex;
  min-height: 145px;
  flex-direction: column;
  justify-content: center;
  padding: 24px 30px;
  border: 1px solid var(--line);
  transition: background 0.2s ease;
}

.post-nav-card:hover {
  background: var(--paper-raised);
}

.post-nav-card > span {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.62rem;
}

.post-nav-card strong {
  font-size: 0.95rem;
  font-weight: 570;
  line-height: 1.7;
}

.post-nav-card--next {
  text-align: left;
}

/* Pages */
.standard-page {
  padding-bottom: 110px;
}

.standard-page .page-header,
.standard-page .entry-content {
  margin-inline: auto;
}

.not-found {
  position: relative;
  display: grid;
  min-height: calc(100svh - var(--header-height));
  place-items: center;
  text-align: center;
}

.not-found__number {
  position: absolute;
  color: var(--ink);
  font-size: min(30vw, 25rem);
  font-weight: 900;
  opacity: 0.035;
}

.not-found__content {
  position: relative;
  z-index: 1;
  display: flex;
  max-width: 620px;
  flex-direction: column;
  align-items: center;
}

.not-found h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.7rem);
  font-weight: 470;
}

.not-found__content > p:not(.section-kicker) {
  margin: 22px 0 30px;
  color: var(--ink-soft);
}

/* Comments */
.comments-area {
  width: min(880px, calc(100vw - 48px));
  padding-block: 85px 125px;
  margin-inline: auto;
  border-top: 1px solid var(--line);
}

.comments-invite {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 48px;
  margin-bottom: 34px;
}

.comments-invite h2 {
  max-width: 620px;
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 510;
  line-height: 1.4;
  letter-spacing: -0.04em;
}

.comments-invite__copy > p:last-child {
  max-width: 600px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.comments-count {
  display: grid;
  width: 88px;
  height: 88px;
  place-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  text-align: center;
}

.comments-count strong {
  font-size: 1.45rem;
  font-weight: 420;
  line-height: 1.1;
}

.comments-count span {
  color: var(--muted);
  font-size: 0.56rem;
}

.comment-compose {
  position: relative;
  padding: 28px 30px 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.comment-compose::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}

.comment-compose.is-writing,
.comment-compose.has-content {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 18px 55px rgba(32, 33, 30, 0.055);
}

.comment-compose.is-writing::before,
.comment-compose.has-content::before {
  transform: scaleX(1);
}

.comment-starters {
  padding-bottom: 22px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.comment-starters > p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.65rem;
}

.comment-starters > p svg {
  width: 13px;
  color: var(--accent);
}

.comment-starters > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.comment-starters button {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.64rem;
  transition: 0.2s ease;
}

.comment-starters button:hover,
.comment-starters button.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

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

.comment-list .children {
  padding-right: 34px;
  border-right: 1px solid var(--line);
}

.comments-thread {
  margin-top: 72px;
}

.comments-thread__header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.comments-thread__header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 650;
  white-space: nowrap;
}

.comments-thread__header > span {
  width: 100%;
  height: 1px;
  background: var(--line);
}

.comment-card {
  margin-bottom: 12px;
}

.comment-card__body {
  padding: 24px 25px 20px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper-raised) 70%, transparent);
  transition: border-color 0.2s ease, transform 0.25s var(--ease);
}

.comment-card__body:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.comment-card__header,
.comment-card__identity {
  display: flex;
  align-items: center;
  gap: 11px;
}

.comment-card__header {
  justify-content: space-between;
}

.comment-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  filter: grayscale(1);
}

.comment-card__identity > div {
  display: grid;
}

.comment-card__author {
  font-size: 0.73rem;
  font-weight: 690;
}

.comment-card__date,
.comment-card__number {
  color: var(--muted);
  font-size: 0.56rem;
}

.comment-card__content {
  padding-right: 55px;
  margin-top: 15px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 2;
}

.comment-card__content > :first-child {
  margin-top: 0;
}

.comment-card__content > :last-child {
  margin-bottom: 0;
}

.comment-card__actions {
  display: flex;
  gap: 15px;
  padding-right: 55px;
  margin-top: 16px;
}

.comment-reply-link,
.comment-edit-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.61rem;
}

.comment-reply-link:hover,
.comment-edit-link a:hover {
  color: var(--accent);
}

.comment-reply-link svg {
  width: 13px;
}

.comment-awaiting-moderation {
  padding: 8px 12px;
  margin: 16px 55px 0 0;
  border-right: 2px solid var(--accent);
  background: var(--accent-soft);
  color: var(--ink-soft);
  font-size: 0.66rem;
}

.comment-card--pingback {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
}

.comments-empty {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 0 0;
  color: var(--muted);
}

.comments-empty > span {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.comments-empty svg {
  width: 17px;
}

.comments-empty h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.82rem;
}

.comments-empty p {
  margin: 2px 0 0;
  font-size: 0.68rem;
}

.comment-respond {
  padding: 0;
}

.comment-reply-title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 620;
}

#cancel-comment-reply-link {
  margin-right: 10px;
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 450;
}

.comment-notes,
.logged-in-as {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.63rem;
}

.comment-notes svg {
  width: 13px;
  color: #397c60;
}

.comment-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.comment-form > p {
  margin: 0;
}

.comment-form .comment-notes,
.comment-form .logged-in-as,
.comment-form-comment,
.form-submit,
.comment-form-cookies-consent {
  grid-column: 1 / -1;
}

.comment-form label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.65rem;
}

.comment-form .required {
  margin-right: 3px;
  color: var(--accent);
}

.comment-form input:not([type="checkbox"]),
.comment-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  outline: 0;
  background: var(--paper);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.comment-form textarea {
  min-height: 150px;
  line-height: 2;
  resize: none;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--accent);
  background: var(--paper-raised);
}

.comment-form input::placeholder,
.comment-form textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.comment-field-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.57rem;
}

.comment-field-meta b {
  color: var(--ink-soft);
  font-weight: 560;
}

.comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 0.6rem;
}

.comment-form-cookies-consent label {
  margin: -2px 0 0;
  line-height: 1.8;
}

.comment-form .form-submit input.comment-submit,
.comment-form .form-submit button.comment-submit {
  display: inline-flex;
  width: auto;
  min-width: 170px;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  -webkit-text-fill-color: var(--paper);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.5;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.comment-form .form-submit input.comment-submit {
  appearance: none;
  background-color: var(--ink) !important;
  background-image: none !important;
  border-color: var(--ink) !important;
  color: var(--paper) !important;
  -webkit-text-fill-color: var(--paper) !important;
}

.comment-form .form-submit input.comment-submit:hover,
.comment-form .form-submit button.comment-submit:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  -webkit-text-fill-color: #fff;
  transform: translateY(-1px);
}

.comment-form .form-submit input.comment-submit:hover {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.comment-form .form-submit input.comment-submit:focus-visible,
.comment-form .form-submit button.comment-submit:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 38%, transparent);
  outline-offset: 3px;
}

.no-comments {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.68rem;
}

.no-comments svg {
  width: 14px;
}

/* Search */
.search-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  padding: 0;
  border: 0;
  background: color-mix(in srgb, var(--paper) 98%, transparent);
  color: var(--ink);
}

.search-dialog[open] {
  display: grid;
  animation: dialog-in 0.3s var(--ease);
}

.search-dialog::backdrop {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
}

.search-dialog__inner {
  position: relative;
  width: min(680px, calc(100vw - 40px));
  margin: auto;
}

.search-dialog__close {
  position: fixed;
  top: 20px;
  left: 4vw;
}

.search-dialog h2 {
  margin: 0 0 35px;
  font-size: clamp(2.2rem, 5vw, 4.7rem);
  font-weight: 430;
  letter-spacing: -0.045em;
}

.search-form {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line-strong);
}

.search-field {
  width: 100%;
  height: 64px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 1rem;
}

.search-field::placeholder {
  color: var(--muted);
}

.search-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 10px 15px;
  background: transparent;
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
}

.search-submit svg {
  width: 15px;
}

.search-hint {
  color: var(--muted);
  font-size: 0.62rem;
}

.search-hint kbd {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: inherit;
}

/* Footer */
.site-footer {
  padding-block: 38px 24px;
  border-top: 1px solid var(--line);
}

.footer-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  padding-bottom: 30px;
}

.footer-signoff {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-signoff__mark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.footer-signoff p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.56rem;
}

.footer-signoff strong {
  font-size: 0.88rem;
  font-weight: 610;
}

.footer-navigation .menu {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-navigation a {
  color: var(--ink-soft);
  font-size: 0.64rem;
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.62rem;
}

.footer-bottom p {
  margin: 0;
}

.footer-credit {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 15px;
}

.footer-credit span + span::before {
  margin-left: 15px;
  color: var(--line-strong);
  content: "·";
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.back-to-top svg {
  width: 13px;
}

.toast {
  position: fixed;
  z-index: 10001;
  right: 50%;
  bottom: 78px;
  padding: 9px 15px;
  visibility: hidden;
  opacity: 0;
  border-radius: 3px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.67rem;
  transform: translate(50%, 8px);
  transition: 0.25s ease;
}

.toast.is-visible {
  visibility: visible;
  opacity: 1;
  transform: translate(50%, 0);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes pistachio-nod {
  45% { transform: rotate(-5deg) scale(1.04); }
}

/* WordPress utilities */
.alignleft { float: left; margin: 0 1.5em 1.5em 0; }
.alignright { float: right; margin: 0 0 1.5em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { color: var(--muted); font-size: 0.72rem; }
.gallery-caption { color: var(--muted); }

@media (max-width: 1050px) {
  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .primary-nav {
    position: fixed;
    z-index: 1;
    inset: 0;
    display: grid;
    visibility: hidden;
    opacity: 0;
    place-items: center;
    background: var(--paper);
    transition: opacity 0.25s var(--ease), visibility 0.25s;
  }

  .primary-nav.is-open {
    visibility: visible;
    opacity: 1;
  }

  .primary-nav .menu,
  .primary-nav ul {
    flex-direction: column;
    gap: 12px;
  }

  .primary-nav a {
    font-size: clamp(1.45rem, 5vw, 2.5rem);
  }

  .primary-nav .sub-menu {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .reading-layout,
  body.reading-wide .reading-layout {
    grid-template-columns: 160px minmax(0, var(--content));
  }

  .article-toc {
    grid-column: 1;
  }

  .entry-content {
    grid-column: 2;
  }
}

@media (max-width: 760px) {
  :root {
    --shell: calc(100vw - 32px);
    --header-height: 68px;
  }

  .site-shell-wide,
  .site-shell-narrow,
  .comments-area {
    width: calc(100vw - 32px);
  }

  .home-overview {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-block: 52px 58px;
  }

  .home-overview__stats {
    max-width: 460px;
  }

  .home-overview h1 {
    font-size: clamp(2rem, 8.5vw, 3rem);
  }

  .notes-index__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-list {
    justify-content: flex-start;
  }

  .post-row {
    min-height: 0;
    grid-template-columns: 52px minmax(0, 1fr) 35px;
    gap: 15px;
    padding-block: 28px;
  }

  .post-row--featured {
    min-height: 0;
    grid-template-columns: 52px minmax(0, 1fr) 35px;
    gap: 15px;
    padding: 30px 18px;
  }

  .post-row--featured h3 {
    font-size: 1.7rem;
  }

  .post-row__featured-label {
    margin-bottom: 14px;
    font-size: 0.52rem;
    white-space: normal;
  }

  .post-row__date span {
    font-size: 1.3rem;
  }

  .post-row__date small {
    font-size: 0.55rem;
  }

  .post-row h3 {
    font-size: 1.45rem;
  }

  .post-row__body > p {
    display: none;
  }

  .post-row__arrow {
    width: 34px;
    height: 34px;
  }

  .single-header {
    padding-block: 28px 60px;
  }

  .single-breadcrumb {
    margin-bottom: 46px;
  }

  .single-header h1 {
    font-size: clamp(2.25rem, 10.5vw, 3.55rem);
  }

  .single-byline {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px 20px;
  }

  .single-byline__author {
    padding-left: 20px;
  }

  .single-byline .entry-meta {
    flex: 1;
    min-width: 190px;
    padding-top: 9px;
  }

  .bookmark-post {
    margin-right: 0;
  }

  .reading-layout,
  body.reading-wide .reading-layout,
  body.focus-mode .reading-layout {
    display: block;
  }

  .article-toc {
    display: none !important;
  }

  .entry-content {
    max-width: none;
    font-size: calc(1rem * var(--article-scale));
  }

  .entry-content .alignwide {
    width: calc(100vw - 32px);
  }

  .heading-permalink {
    opacity: 0.7;
  }

  .entry-content .is-style-journal-note,
  .entry-content .is-style-journal-info,
  .entry-content .is-style-journal-tip,
  .entry-content .is-style-journal-warning,
  .entry-content .is-style-journal-danger,
  .entry-content .is-style-journal-summary,
  .entry-content .journal-callout {
    padding: 21px 20px 19px;
  }

  .pistachio-break {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 24px 22px 22px;
  }

  .pistachio-break__art {
    grid-row: 1;
  }

  .pistachio-break__content {
    grid-row: 2;
  }

  .pistachio-break__art img {
    width: min(190px, 68vw);
  }

  .pistachio-break::before {
    top: -95px;
    left: 50%;
    transform: translateX(-50%);
  }

  .reading-pause {
    padding-left: 32px;
  }

  .post-reactions {
    align-items: flex-start;
    flex-direction: column;
    gap: 25px;
    margin-top: 75px;
  }

  .reaction-buttons {
    width: 100%;
  }

  .reaction-buttons button {
    min-width: 0;
    flex: 1;
    padding-inline: 7px;
  }

  .post-navigation-custom {
    grid-template-columns: 1fr;
  }

  .comment-list .children {
    padding-right: 14px;
  }

  .comments-invite {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .comments-count {
    width: auto;
    height: auto;
    grid-auto-flow: column;
    gap: 6px;
    padding: 7px 13px;
    justify-self: start;
    border-radius: 99px;
  }

  .comments-count strong {
    font-size: 0.8rem;
  }

  .comment-compose {
    padding: 22px 18px 24px;
  }

  .comment-card__body {
    padding: 20px 18px 17px;
  }

  .comment-card__content,
  .comment-card__actions {
    padding-right: 0;
  }

  .comment-card__number {
    display: none;
  }

  .comment-form {
    grid-template-columns: 1fr;
  }

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

  .footer-primary {
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-credit {
    display: grid;
  }

  .footer-credit span + span::before {
    display: none;
  }

  .reading-dock {
    bottom: 12px;
  }
}

@media (max-width: 420px) {
  .theme-toggle {
    display: none;
  }

  .reaction-buttons strong {
    font-size: 0.6rem;
  }

  .post-author {
    grid-template-columns: 60px 1fr;
  }

  .post-author__avatar img {
    width: 60px;
  }

  .reading-dock button {
    width: 34px;
    height: 34px;
  }

  .reading-dock__progress {
    min-width: 35px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .reading-progress,
  .reading-dock,
  .article-toc,
  .post-reactions,
  .post-author,
  .post-navigation-custom,
  .comments-area,
  .site-noise {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .reading-layout {
    display: block;
  }

  .entry-content {
    max-width: none;
    font-size: 12pt;
  }
}
