/* ═══════════════════════════════════════════════════════════════
   SINGLE POST
   ═══════════════════════════════════════════════════════════════ */
body.single-post {
  --maksut-post-inner: 880px;
}

.post-header-inner,
.post-body,
.post-nav-inner {
  max-width: var(--maksut-post-inner, 880px);
}

.post-header { background: var(--ink); padding-top: var(--nav-h); }
.post-header-inner { margin: 0 auto; padding: 80px 56px 72px; }
.post-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 28px; }
.post-cat { font-family: var(--ff-m); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--orange); }
a.post-cat {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
a.post-cat:hover { color: var(--orange-hot); border-color: rgba(232, 78, 10, .45); }
.post-date,
.post-updated,
.post-author,
.post-read { font-family: var(--ff-m); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: rgba(244,239,230,.25); }
.post-author { border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.post-author:hover { color: rgba(244,239,230,.45); border-color: rgba(232,78,10,.35); }
.post-sep { flex-shrink: 0; width: 1px; height: 12px; background: rgba(244,239,230,.12); }
.post-title { font-family: var(--ff-s); font-size: clamp(28px,4vw,52px); font-weight: 300; line-height: 1.15; color: var(--cream); margin-bottom: 24px; }
.post-excerpt { font-size: 18px; color: rgba(244,239,230,.5); line-height: 1.7; }
.post-body { margin: 0 auto; padding: 72px 56px 120px; }
.post-body .entry-content { font-size: 18px; line-height: 1.8; color: var(--ink-mid); }
.post-body .entry-content h2,
.post-body .entry-content h3,
.post-body .entry-content h4,
.post-body .entry-content h5,
.post-body .entry-content h6 { scroll-margin-top: calc(var(--nav-h) + 16px); }
.post-body .entry-content h2 { font-family: var(--ff-d); font-size: clamp(26px,3vw,38px); letter-spacing: .02em; color: var(--ink); margin: 52px 0 20px; }
.post-body .entry-content h3 { font-family: var(--ff-s); font-size: clamp(20px,2.2vw,26px); font-weight: 300; color: var(--ink); margin: 36px 0 14px; }

/* Auto table of contents (inc/table-of-contents.php) */
.post-body .entry-content .post-toc-wrap {
  margin: 0 0 40px;
}
.post-body .entry-content .post-toc {
  padding: 18px 22px;
  background: var(--cream-2);
  border: 1px solid rgba(26,20,16,.1);
  border-radius: 4px;
  border-left: 3px solid var(--orange);
}
.post-body .entry-content .post-toc__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.post-body .entry-content .post-toc__title {
  font-family: var(--ff-m);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0;
  flex: 1;
  min-width: 0;
}
.post-body .entry-content .post-toc__toggle {
  flex-shrink: 0;
  font-family: var(--ff-m);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mid);
  background: transparent;
  border: 1px solid rgba(26,20,16,.14);
  border-radius: 2px;
  padding: 10px 16px;
  min-height: 44px;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.post-body .entry-content .post-toc__toggle:hover {
  color: var(--orange-on-cream, #9a3808);
  border-color: rgba(232,78,10,.35);
}
.post-body .entry-content .post-toc__toggle:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
.post-body .entry-content .post-toc__panel {
  padding-top: 16px;
  margin-top: 4px;
  border-top: 1px solid rgba(26,20,16,.08);
}
.post-body .entry-content .post-toc__panel[hidden] {
  display: none;
}
.post-body .entry-content .post-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: mks-toc;
}
.post-body .entry-content .post-toc__item {
  margin: 0 0 8px;
  padding: 0;
  counter-increment: mks-toc;
}
.post-body .entry-content .post-toc__item:last-child { margin-bottom: 0; }
.post-body .entry-content .post-toc__item a {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink-mid);
  border-bottom: none;
  text-decoration: none;
  transition: color .2s;
}
.post-body .entry-content .post-toc__item a::before {
  content: counter(mks-toc, decimal-leading-zero);
  font-family: var(--ff-m);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--orange);
  flex-shrink: 0;
  min-width: 1.4em;
}
.post-body .entry-content .post-toc__item a:hover { color: var(--orange); }
.post-body .entry-content .post-toc__item--depth-3 { padding-left: 16px; }
.post-body .entry-content .post-toc__item--depth-4 { padding-left: 28px; }
.post-body .entry-content .post-toc__item--depth-5 { padding-left: 40px; }
.post-body .entry-content .post-toc__item--depth-6 { padding-left: 52px; }

/* Scrolled: dock to viewport edge (slide in) — stronger “floating nav” treatment */
.post-body .entry-content .post-toc.is-docked {
  position: fixed;
  z-index: 95;
  top: calc(var(--nav-h) + 12px);
  width: min(312px, calc(100vw - 28px));
  max-height: min(72vh, 520px);
  margin: 0;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  background: rgba(253, 250, 244, 0.94);
  border: 1px solid rgba(26, 20, 16, 0.1);
  border-radius: 6px;
  border-left: 4px solid var(--orange);
  box-shadow:
    0 0 0 1px rgba(232, 78, 10, 0.12),
    0 20px 56px rgba(24, 18, 14, 0.14),
    0 6px 16px rgba(24, 18, 14, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  transition: transform .32s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)), opacity .28s ease, box-shadow .28s ease, top .2s ease, visibility 0s linear .32s;
}
.post-body .entry-content .post-toc.is-docked.is-docked--in {
  visibility: visible;
  pointer-events: auto;
  transition: transform .32s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)), opacity .28s ease, box-shadow .28s ease, top .2s ease, visibility 0s linear 0s;
}
body:not(.rtl) .post-body .entry-content .post-toc.is-docked {
  right: 14px;
  left: auto;
  transform: translateX(calc(100% + 28px));
  opacity: 0;
}
body:not(.rtl) .post-body .entry-content .post-toc.is-docked.is-docked--in {
  transform: translateX(0);
  opacity: 1;
}
body.rtl .post-body .entry-content .post-toc.is-docked {
  left: 14px;
  right: auto;
  transform: translateX(calc(-100% - 28px));
  opacity: 0;
}
body.rtl .post-body .entry-content .post-toc.is-docked.is-docked--in {
  transform: translateX(0);
  opacity: 1;
}
.post-body .entry-content .post-toc.is-docked .post-toc__bar {
  padding-bottom: 12px;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(26, 20, 16, 0.08);
}
.post-body .entry-content .post-toc.is-docked .post-toc__title {
  color: var(--ink);
  letter-spacing: 0.14em;
}
.post-body .entry-content .post-toc.is-docked .post-toc__toggle {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(232, 78, 10, 0.22);
}
.post-body .entry-content .post-toc.is-docked .post-toc__panel:not([hidden]) {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-top: none;
  margin-top: 0;
  padding-top: 12px;
}
.post-body .entry-content .post-toc.is-docked .post-toc__list {
  padding-bottom: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .post-body .entry-content .post-toc.is-docked {
    transition: none;
  }
  .post-body .entry-content .post-toc.is-docked.is-docked--in {
    transition: none;
  }
}
.post-body .entry-content p { margin-bottom: 22px; }
.post-body .entry-content p:last-child { margin-bottom: 0; }
.post-body .entry-content strong { font-weight: 400; font-style: italic; color: var(--orange); }
.post-body .entry-content em { font-style: italic; }
.post-body .entry-content a { color: var(--orange); border-bottom: 1px solid rgba(232,78,10,.3); transition: border-color .2s; }
.post-body .entry-content a:hover { border-color: var(--orange); }
.post-body .entry-content ul,
.post-body .entry-content ol { padding-left: 24px; margin-bottom: 22px; }
.post-body .entry-content li { margin-bottom: 8px; }
.post-body .entry-content code { font-family: var(--ff-m); font-size: .85em; background: var(--cream-2); padding: 2px 6px; border-radius: 2px; }
.post-body .entry-content pre { background: var(--ink); padding: 28px 32px; border-radius: 4px; overflow-x: auto; margin: 32px 0; }
.post-body .entry-content pre code { background: none; padding: 0; color: rgba(244,239,230,.8); font-size: 14px; line-height: 1.7; }
.post-body .entry-content blockquote { border-left: 3px solid var(--orange); padding: 20px 28px; margin: 32px 0; background: var(--cream-2); }
.post-body .entry-content blockquote p { font-size: 18px; font-style: italic; color: var(--ink); }

/* Share + related (template-parts/post-extras.php) */
.post-share {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid rgba(26,20,16,.1);
}
.post-share__title,
.post-related__title {
  font-family: var(--ff-d);
  font-size: clamp(22px, 2.5vw, 30px);
  letter-spacing: .02em;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 20px;
}
.post-share__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}
.post-share__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-family: var(--ff-m);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--ink-mid);
  border: 1px solid rgba(26,20,16,.12);
  border-radius: 4px;
  padding: 10px 16px;
  text-decoration: none;
  background: var(--cream-2);
  transition: color .2s, border-color .2s, background .2s;
  cursor: pointer;
}
.post-share__link:hover {
  color: var(--orange);
  border-color: rgba(232,78,10,.35);
  background: var(--white);
}
/* <button> UA styles + font:inherit from <li> broke sizing vs <a.post-share__link> */
button.post-share__link {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  text-align: center;
}
.post-share__copy[data-maksut-copied="1"] {
  color: var(--orange);
  border-color: rgba(232,78,10,.45);
}

.post-related {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid rgba(26,20,16,.08);
}
.post-related__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border: 1px solid rgba(26,20,16,.1);
  border-radius: 4px;
  overflow: hidden;
  background: var(--white);
}
.post-related__item {
  margin: 0;
  border-bottom: 1px solid rgba(26,20,16,.07);
}
.post-related__item:last-child { border-bottom: none; }
.post-related__link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 22px;
  text-decoration: none;
  border-bottom: none;
  transition: background .2s;
}
.post-related__link:hover {
  background: var(--cream-2);
}
.post-related__post-title {
  font-family: var(--ff-s);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.35;
  color: var(--ink);
  transition: color .2s;
}
.post-related__link:hover .post-related__post-title { color: var(--orange); }
.post-related__date {
  font-family: var(--ff-m);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.post-nav {
  background: var(--cream-2);
  border-top: 1px solid rgba(26, 20, 16, 0.08);
  padding: clamp(40px, 5vw, 56px) clamp(24px, 5vw, 56px)
    clamp(48px, 7vw, 80px) clamp(24px, 5vw, 56px);
}
.post-nav-inner {
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.post-nav-item--next {
  text-align: right;
}
.pn-dir {
  font-family: var(--ff-m);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.pn-title {
  display: block;
  font-family: var(--ff-s);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.45;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.pn-title:hover {
  color: var(--orange);
}
@media (max-width: 640px) {
  .post-nav-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .post-nav-item--next {
    text-align: left;
  }
}

