/* Dedicated editorial layout for single blog posts. */

body.single-post .sp-body-section {
  padding: clamp(4.5rem, 7vw, 6.5rem) 0 clamp(3.5rem, 6vw, 5rem);
}

body.single-post .sp-body-inner {
  max-width: 80rem;
  grid-template-columns: minmax(10.5rem, 12rem) minmax(0, 60rem);
  justify-content: center;
  gap: clamp(2.5rem, 4vw, 4.5rem);
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

/* The sidebar stretches with the article so its compact contents can remain sticky. */
body.single-post .sp-sidebar {
  min-width: 0;
  align-self: stretch;
}

body.single-post .sp-sidebar::before,
body.single-post .sp-sidebar::after {
  content: none;
}

body.single-post .sp-sidebar-sticky {
  width: 100%;
  max-height: calc(100svh - 8.5rem);
  padding: 0 0.35rem 0 0;
  overflow-y: auto;
  scrollbar-color: rgba(38, 35, 34, 0.2) transparent;
  scrollbar-width: thin;
}

body.single-post .sp-back-link {
  margin-bottom: 1.25rem;
}

body.single-post .sp-sidebar-meta {
  display: block;
  padding: 1.1rem 0 0;
  border-top: 3px solid var(--narrow-accent);
  border-bottom: 1px solid rgba(38, 35, 34, 0.16);
}

body.single-post .sp-sidebar-kicker {
  display: block;
  margin-bottom: 1.05rem;
  color: var(--narrow-text-primary);
  font-size: 0.6875rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.single-post .sp-sidebar-item {
  gap: 0.18rem;
  padding: 0 0 0.9rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid rgba(38, 35, 34, 0.09);
}

body.single-post .sp-sidebar-item:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

body.single-post .sp-sidebar-label {
  font-size: 0.625rem;
  letter-spacing: 0.11em;
}

body.single-post .sp-sidebar-value {
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* Three compact latest-post links fill the editorial rail without card clutter. */
body.single-post .sp-sidebar-related {
  margin-top: 1.4rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(38, 35, 34, 0.16);
}

body.single-post .sp-sidebar-related-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: sidebar-post;
}

body.single-post .sp-sidebar-related-list li {
  position: relative;
  margin: 0;
  padding: 0.8rem 0 0.8rem 1.75rem;
  border-top: 1px solid rgba(38, 35, 34, 0.08);
  counter-increment: sidebar-post;
}

body.single-post .sp-sidebar-related-list li::before {
  position: absolute;
  top: 0.92rem;
  left: 0;
  content: "0" counter(sidebar-post);
  color: var(--narrow-accent);
  font-size: 0.625rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}

body.single-post .sp-sidebar-related-list a {
  display: block;
  color: var(--narrow-text-primary);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.45;
  text-decoration: none;
  transition: color 0.2s ease;
}

body.single-post .sp-sidebar-related-list a:hover {
  color: var(--narrow-accent);
}

body.single-post .sp-sidebar-share {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 3px solid var(--narrow-bg-secondary);
}

body.single-post .sp-share-actions {
  display: grid;
  grid-template-columns: repeat(4, 2.15rem);
  gap: 0.45rem;
}

body.single-post .sp-share-button {
  display: inline-grid;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(38, 35, 34, 0.24);
  border-radius: 0;
  background: transparent;
  color: var(--narrow-text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

body.single-post .sp-share-button svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: currentColor;
}

body.single-post .sp-share-button:hover,
body.single-post .sp-share-button:focus-visible,
body.single-post .sp-share-button.is-copied {
  border-color: var(--narrow-accent);
  background: var(--narrow-accent);
  color: var(--narrow-bg-secondary);
}

body.single-post .sp-copy-status {
  display: block;
  min-height: 1.2em;
  margin-top: 0.55rem;
  color: var(--narrow-text-secondary);
  font-size: 0.625rem;
  line-height: 1.35;
}

body.single-post .sp-article {
  width: 100%;
  min-width: 0;
}

/* Calm prose measure inside a wider track for visual blocks. */
body.single-post .sp-content {
  max-width: 47rem;
  font-size: clamp(1.0625rem, 1.1vw, 1.125rem);
  line-height: 1.88;
}

/* Keep the opening paragraph in the same type system as the article body. */
body.single-post .sp-content > p:first-child {
  max-width: none;
  margin-bottom: 1.5rem;
  color: inherit;
  font: inherit;
}

/* Top-level article bullets reuse the service-price slash language. */
body.single-post .sp-content > ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

body.single-post .sp-content > ul > li {
  position: relative;
  margin: 0;
  padding-left: 1.25em;
}

body.single-post .sp-content > ul > li::before {
  position: absolute;
  top: 0.05em;
  left: 0;
  content: "/";
  color: var(--narrow-accent);
  font-size: 1.15em;
  font-weight: 700;
  rotate: 356deg;
}

body.single-post .sp-content h2,
body.single-post .sp-content h2.wp-block-heading {
  position: relative;
  max-width: 44rem;
  margin: clamp(3rem, 5vw, 4rem) 0 1.15rem;
  padding-top: 0.95rem;
  font-size: clamp(1.5rem, 2.35vw, 1.95rem);
  line-height: 1.17;
}

body.single-post .sp-content > h2:first-child,
body.single-post .sp-content > h2.wp-block-heading:first-child {
  margin-top: 0;
}

body.single-post .sp-content h2::before,
body.single-post .sp-content h2.wp-block-heading::before {
  position: absolute;
  top: 0;
  left: 0.25rem;
  width: 2.3rem;
  height: 3px;
  content: "";
  background: var(--narrow-accent);
  transform: skewX(-9.6deg);
  transform-origin: left;
}

/* Medium Gutenberg headings are subheads, not full section breaks. */
body.single-post .sp-content .wp-block-heading.has-medium-font-size {
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  padding-top: 0;
}

body.single-post .sp-content .wp-block-heading.has-medium-font-size::before {
  content: none;
}

body.single-post .sp-content > .wp-block-heading.has-medium-font-size:first-child {
  margin-top: 0;
}

body.single-post .sp-content h3,
body.single-post .sp-content h3.wp-block-heading {
  max-width: 44rem;
  margin-top: 2.35rem;
  font-size: 1.175rem;
  line-height: 1.38;
}

body.single-post .sp-content > :is(figure.wp-block-table, figure.wp-block-image, .wp-block-gallery, .wp-block-embed, .wp-block-cover) {
  width: min(calc(100% + 13rem), 60rem);
  max-width: none;
}

body.single-post .sp-content > :is(figure.wp-block-image, .wp-block-gallery, .wp-block-embed, .wp-block-cover) img {
  width: 100%;
}

/* Every article table receives the Narrow treatment, including has-fixed-layout. */
body.single-post .sp-content figure.wp-block-table {
  position: relative;
  overflow-x: auto;
  margin: clamp(2rem, 4vw, 3rem) 0;
  border: 1px solid rgba(38, 35, 34, 0.2);
  border-top: 4px solid var(--narrow-accent);
  border-radius: 0;
  background: #eadfd4;
  box-shadow: none;
  -webkit-overflow-scrolling: touch;
}

body.single-post .sp-content figure.wp-block-table > table {
  width: 100%;
  min-width: 36rem;
  margin: 0;
  border: 0;
  border-collapse: collapse;
}

body.single-post .sp-content figure.wp-block-table > table.has-fixed-layout,
body.single-post .sp-content figure.wp-block-table.has-fixed-layout > table {
  table-layout: fixed;
}

body.single-post .sp-content figure.wp-block-table :is(th, td) {
  padding: 1rem 1.15rem;
  border: 0;
  border-right: 1px solid rgba(38, 35, 34, 0.1);
  border-bottom: 1px solid rgba(38, 35, 34, 0.12);
  line-height: 1.55;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

body.single-post .sp-content figure.wp-block-table :is(th, td):last-child {
  border-right: 0;
}

body.single-post .sp-content figure.wp-block-table th {
  position: relative;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  background: var(--narrow-bg-secondary);
  color: var(--narrow-text-light);
  font-size: 0.6875rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

body.single-post .sp-content figure.wp-block-table th:first-child {
  padding-left: 1.7rem;
}

body.single-post .sp-content figure.wp-block-table th:first-child::before {
  position: absolute;
  top: 0.55rem;
  bottom: 0.55rem;
  left: 0.65rem;
  width: 4px;
  content: "";
  background: var(--narrow-accent);
  transform: rotate(9.6deg);
}

body.single-post .sp-content figure.wp-block-table td {
  background: #f1e5d9;
  color: var(--narrow-text-primary);
  font-size: 0.9rem;
}

body.single-post .sp-content figure.wp-block-table td:first-child {
  background: #e7d4c4;
  font-weight: 650;
}

body.single-post .sp-content figure.wp-block-table tbody tr:nth-child(even) td {
  background: #eadbce;
}

body.single-post .sp-content figure.wp-block-table tbody tr:nth-child(even) td:first-child {
  background: #dfcabb;
}

body.single-post .sp-content figure.wp-block-table tbody tr:hover td {
  background: #e4cdbd;
}

body.single-post .sp-content figure.wp-block-table tr:last-child td {
  border-bottom: 0;
}

body.single-post .sp-content figure.wp-block-table figcaption {
  position: relative;
  margin: 0;
  padding: 0.8rem 1.15rem 0.8rem 1.75rem;
  border-top: 1px solid rgba(38, 35, 34, 0.12);
  background: #eadfd4;
  color: var(--narrow-text-secondary);
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: left;
}

body.single-post .sp-content figure.wp-block-table figcaption::before {
  position: absolute;
  top: 0.82rem;
  left: 1rem;
  content: "/";
  color: var(--narrow-accent);
  font-weight: 800;
  transform: rotate(-4deg);
}

body.single-post .sp-tags {
  max-width: 50rem;
  margin-top: clamp(3rem, 5vw, 4.25rem);
}

/* Minimal editorial signature with two overlapping 9.6-degree brand blocks. */
body.single-post .sp-author-card {
  display: grid;
  grid-template-columns: clamp(6.25rem, 10vw, 8rem) minmax(0, 1fr);
  gap: clamp(1.75rem, 3vw, 2.5rem);
  align-items: center;
  width: min(100%, 50rem);
  margin-top: clamp(3.25rem, 6vw, 5rem);
  padding: clamp(1.5rem, 3vw, 2.25rem) 0;
  overflow: visible;
  border-top: 1px solid rgba(38, 35, 34, 0.22);
  border-bottom: 1px solid rgba(38, 35, 34, 0.22);
  background: transparent;
  color: var(--narrow-text-primary);
}

body.single-post .sp-author-card::before,
body.single-post .sp-author-card::after {
  content: none;
}

body.single-post .sp-author-portrait {
  position: relative;
  isolation: isolate;
  width: clamp(6.25rem, 10vw, 8rem);
  max-width: 8rem;
  aspect-ratio: 1;
  overflow: visible;
}

body.single-post .sp-author-portrait::before,
body.single-post .sp-author-portrait::after {
  position: absolute;
  z-index: 2;
  top: -1px;
  bottom: -1px;
  width: 1.25rem;
  content: "";
  background: var(--narrow-accent);
  transform: skewX(-9.6deg);
  transform-origin: center;
  pointer-events: none;
}

body.single-post .sp-author-portrait::before {
  left: -0.55rem;
}

body.single-post .sp-author-portrait::after {
  right: -0.55rem;
}

body.single-post .sp-author-avatar {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: cover;
}

body.single-post .sp-author-copy {
  min-width: 0;
}

body.single-post .sp-author-kicker {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--narrow-accent);
  font-size: 0.6875rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.single-post .sp-author-name {
  margin: 0;
  color: var(--narrow-text-primary);
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

body.single-post .sp-author-bio {
  max-width: 36rem;
  margin-top: 0.7rem;
  color: var(--narrow-text-secondary);
  font-size: 0.9rem;
  line-height: 1.68;
}

body.single-post .sp-author-bio p {
  margin: 0;
}

@media (max-width: 900px) {
  body.single-post .sp-body-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 3.5rem;
  }

  body.single-post .sp-article {
    order: 1;
  }

  body.single-post .sp-sidebar {
    order: 2;
    align-self: auto;
  }

  body.single-post .sp-sidebar-sticky {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 0.45fr);
    gap: 1.5rem 2rem;
    max-height: none;
    padding: 2rem 0 0;
    overflow: visible;
    border-top: 1px solid rgba(38, 35, 34, 0.18);
  }

  body.single-post .sp-back-link {
    display: none;
  }

  body.single-post .sp-sidebar-meta {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding-bottom: 1rem;
  }

  body.single-post .sp-sidebar-kicker {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  body.single-post .sp-sidebar-item {
    padding: 0;
    margin: 0;
    border: 0;
  }

  body.single-post .sp-sidebar-related,
  body.single-post .sp-sidebar-share {
    margin-top: 0;
  }

  body.single-post .sp-content,
  body.single-post .sp-content > p:first-child {
    max-width: none;
  }

  body.single-post .sp-content > :is(figure.wp-block-table, figure.wp-block-image, .wp-block-gallery, .wp-block-embed, .wp-block-cover) {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  body.single-post .sp-body-section {
    padding: 3.25rem 0 3.75rem;
  }

  body.single-post .sp-sidebar-sticky {
    grid-template-columns: 1fr;
  }

  body.single-post .sp-sidebar-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.single-post .sp-content h2,
  body.single-post .sp-content h2.wp-block-heading {
    margin-top: 2.75rem;
    font-size: clamp(1.3rem, 6vw, 1.55rem);
  }

  body.single-post .sp-content .wp-block-heading.has-medium-font-size {
    margin-top: 1.75rem;
    padding-top: 0;
  }

  body.single-post .sp-content h3,
  body.single-post .sp-content h3.wp-block-heading {
    margin-top: 1.9rem;
    font-size: 1.0625rem;
  }

  body.single-post .sp-author-card {
    grid-template-columns: 6.25rem minmax(0, 1fr);
    gap: 1.5rem;
  }

  body.single-post .sp-author-portrait {
    width: 6.25rem;
  }
}

@media (max-width: 460px) {
  body.single-post .sp-author-card {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
}

/* Single-post final refinements: translucent table, avatar alignment, crisp share icons. */
body.single-post .sp-content figure.wp-block-table {
  background: rgba(255, 120, 79, 0.025);
}

body.single-post .sp-content figure.wp-block-table td {
  background: rgba(255, 120, 79, 0.03);
}

body.single-post .sp-content figure.wp-block-table td:first-child {
  background: rgba(255, 120, 79, 0.055);
}

body.single-post .sp-content figure.wp-block-table tbody tr:nth-child(even) td {
  background: rgba(255, 120, 79, 0.045);
}

body.single-post .sp-content figure.wp-block-table tbody tr:nth-child(even) td:first-child {
  background: rgba(255, 120, 79, 0.07);
}

body.single-post .sp-content figure.wp-block-table tbody tr:hover td {
  background: rgba(255, 120, 79, 0.085);
}

body.single-post .sp-content figure.wp-block-table figcaption {
  background: rgba(255, 120, 79, 0.025);
}

body.single-post .sp-author-card {
  grid-template-columns: calc(clamp(6.25rem, 10vw, 8rem) + 1rem) minmax(0, 1fr);
}

body.single-post .sp-author-portrait {
  margin-left: 1rem;
}

body.single-post .sp-author-portrait::before,
body.single-post .sp-author-portrait::after {
  top: 0;
  bottom: 0;
}

body.single-post .sp-author-portrait::before {
  left: calc(-0.55rem - 2px);
}

body.single-post .sp-author-portrait::after {
  right: calc(-0.55rem - 2px);
}

body.single-post .sp-share-actions {
  grid-template-columns: repeat(4, 36px);
}

body.single-post .sp-share-button {
  width: 36px;
  height: 36px;
}

body.single-post .sp-share-button svg {
  display: block;
  width: 16px;
  height: 16px;
  shape-rendering: geometricPrecision;
}

@media (max-width: 600px) {
  body.single-post .sp-author-card {
    grid-template-columns: calc(6.25rem + 1rem) minmax(0, 1fr);
  }
}

@media (max-width: 460px) {
  body.single-post .sp-author-card {
    grid-template-columns: 1fr;
  }
}

/* Author signature refinement and final table tint. */
body.single-post .sp-content figure.wp-block-table {
  background: rgba(255, 120, 79, 0.008);
}
body.single-post .sp-content figure.wp-block-table td {
  background: rgba(255, 120, 79, 0.012);
}
body.single-post .sp-content figure.wp-block-table td:first-child {
  background: rgba(255, 120, 79, 0.02);
}
body.single-post .sp-content figure.wp-block-table tbody tr:nth-child(even) td {
  background: rgba(255, 120, 79, 0.018);
}
body.single-post .sp-content figure.wp-block-table tbody tr:nth-child(even) td:first-child {
  background: rgba(255, 120, 79, 0.03);
}
body.single-post .sp-content figure.wp-block-table tbody tr:hover td {
  background: rgba(255, 120, 79, 0.045);
}
body.single-post .sp-content figure.wp-block-table figcaption {
  background: rgba(255, 120, 79, 0.008);
}

body.single-post .sp-author-card {
  position: relative;
  isolation: isolate;
  grid-template-columns: calc(clamp(6.25rem, 10vw, 8rem) + 1.25rem) minmax(0, 1fr) !important;
  gap: clamp(1.75rem, 3vw, 2.75rem);
  padding: clamp(1.75rem, 3.5vw, 2.5rem) clamp(1.25rem, 3vw, 2.25rem) clamp(1.75rem, 3.5vw, 2.5rem) 0.5rem;
  border-top-color: rgba(38, 35, 34, 0.2);
  border-bottom-color: rgba(38, 35, 34, 0.2);
  background: linear-gradient(105deg, rgba(255, 120, 79, 0.075) 0%, rgba(255, 120, 79, 0.018) 62%, transparent 100%);
}

body.single-post .sp-author-card::after {
  position: absolute;
  top: -1px;
  left: 0.5rem;
  width: 3.75rem;
  height: 3px;
  content: "";
  background: var(--narrow-accent);
  transform: skewX(-9.6deg);
}

body.single-post .sp-author-copy {
  align-self: center;
  padding-left: 0.25rem;
}

body.single-post .sp-author-kicker {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.7rem;
}

body.single-post .sp-author-kicker::before {
  content: "/";
  color: var(--narrow-accent);
  font-size: 1.15em;
  font-weight: 800;
  rotate: 356deg;
}

body.single-post .sp-author-name {
  font-size: clamp(1.45rem, 2.2vw, 1.8rem);
}

body.single-post .sp-author-bio {
  max-width: 34rem;
  margin-top: 0.8rem;
  font-size: 0.925rem;
  line-height: 1.72;
}

body.single-post .sp-author-portrait::before {
  left: calc(-0.55rem - 0.5px);
}

body.single-post .sp-author-portrait::after {
  right: calc(-0.55rem - 0.5px);
}

@media (max-width: 600px) {
  body.single-post .sp-author-card {
    grid-template-columns: calc(6.25rem + 1.25rem) minmax(0, 1fr) !important;
    gap: 1.35rem;
    padding-right: 1rem;
  }
}

@media (max-width: 460px) {
  body.single-post .sp-author-card {
    grid-template-columns: calc(6.25rem + 1.25rem) minmax(0, 1fr) !important;
  }
}

@media (max-width: 360px) {
  body.single-post .sp-author-card {
    grid-template-columns: 1fr !important;
  }
}

/* Author signature v2: label row above a strict portrait/copy row. */
body.single-post .sp-author-card {
  display: grid !important;
  grid-template-areas:
    "kicker kicker"
    "portrait copy";
  grid-template-columns: calc(clamp(6.25rem, 10vw, 8rem) + 1.25rem) minmax(0, 1fr) !important;
  column-gap: clamp(1.75rem, 3vw, 2.75rem);
  row-gap: 1.25rem;
  padding: 0 0 clamp(1.75rem, 3vw, 2.25rem);
  border-top: 0;
  border-bottom: 1px solid rgba(38, 35, 34, 0.2);
  background: transparent;
}

body.single-post .sp-author-card::after {
  content: none;
}

body.single-post .sp-author-kicker {
  grid-area: kicker;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

body.single-post .sp-author-kicker::after {
  flex: 1 1 auto;
  height: 1px;
  margin-left: 0.35rem;
  content: "";
  background: linear-gradient(90deg, rgba(38, 35, 34, 0.24), transparent);
}

body.single-post .sp-author-portrait {
  grid-area: portrait;
  align-self: start;
}

body.single-post .sp-author-copy {
  grid-area: copy;
  align-self: start;
  padding: 0.08rem 0 0 0.25rem;
}

body.single-post .sp-author-name {
  margin: 0;
  font-size: clamp(1.45rem, 2.2vw, 1.8rem);
  line-height: 1;
}

body.single-post .sp-author-bio {
  max-width: 34rem;
  margin-top: 0.85rem;
  font-size: 0.925rem;
  line-height: 1.72;
}

@media (max-width: 600px) {
  body.single-post .sp-author-card {
    grid-template-areas:
      "kicker kicker"
      "portrait copy";
    grid-template-columns: calc(6.25rem + 1.25rem) minmax(0, 1fr) !important;
    column-gap: 1.35rem;
  }
}

@media (max-width: 460px) {
  body.single-post .sp-author-card {
    grid-template-areas:
      "kicker kicker"
      "portrait copy";
    grid-template-columns: calc(6.25rem + 1.25rem) minmax(0, 1fr) !important;
  }
}

@media (max-width: 360px) {
  body.single-post .sp-author-card {
    grid-template-areas:
      "kicker"
      "portrait"
      "copy";
    grid-template-columns: 1fr !important;
  }
}
