/*
  Column article (single post) reading styles.
  Scope: body.is-column-article
*/

:root {
  --ovl-column-content: 680px;
  --ovl-column-muted: rgba(51, 51, 51, 0.62);
  --ovl-column-box-bg: rgba(7, 18, 30, 0.04);
  --ovl-column-box-bg-accent: rgba(11, 183, 192, 0.08);
}

body.is-column-article .ovl-post-single__nav {
  margin-bottom: clamp(16px, 3vw, 24px);
}

body.is-column-article {
  --ovl-post-featured-height: 260px;
}

body.is-column-article .ovl-back-link a {
  padding: 0.5rem 0.85rem;
  background: rgba(255, 255, 255, 0.75);
  font-weight: 700;
}

body.is-column-article .ovl-post-single__date {
  font-size: 0.85rem;
  color: var(--ovl-column-muted);
}

body.is-column-article .ovl-post-single__title {
  margin-top: 0.25rem;
  margin-bottom: 0;
  letter-spacing: 0.01em;
}

body.is-column-article .ovl-post-single__excerpt {
  margin-top: clamp(12px, 2vw, 16px);
  margin-bottom: clamp(12px, 2vw, 18px);
}

body.is-column-article .ovl-post-single__excerpt,
body.is-column-article .ovl-post-single__excerpt .wp-block-post-excerpt__excerpt {
  font-size: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
  line-height: 1.75;
  color: rgba(51, 51, 51, 0.78);
}

body.is-column-article .ovl-post-single__meta {
  gap: 0.5rem 0.75rem;
  margin-top: 0;
  margin-bottom: 0;
  color: var(--ovl-column-muted);
  font-size: 0.85rem;
}

body.is-column-article .ovl-post-single__meta .wp-block-post-terms {
  margin: 0;
}

body.is-column-article .ovl-post-single__meta a {
  text-decoration: none;
  border-bottom: 1px solid rgba(7, 18, 30, 0.16);
  padding-bottom: 1px;
}

body.is-column-article .ovl-post-single__meta a:hover {
  border-bottom-color: rgba(7, 18, 30, 0.28);
}

body.is-column-article .ovl-post-single__featured img {
  border-radius: 18px;
}

body.is-column-article .ovl-post-single__featured {
  height: var(--ovl-post-featured-height);
}

body.is-column-article .ovl-post-single__featured.has-ovl-featured-blur {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  isolation: isolate;
  height: var(--ovl-post-featured-height);
}

body.is-column-article .ovl-post-single__featured.has-ovl-featured-blur::before {
  content: "";
  position: absolute;
  inset: -26px;
  background-image: var(--ovl-featured-blur-url);
  background-size: cover;
  background-position: center;
  filter: blur(24px);
  transform: scale(1.12);
  opacity: 0.85;
  z-index: 0;
}

body.is-column-article .ovl-post-single__featured.has-ovl-featured-blur::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.2) 0%,
      rgba(255, 255, 255, 0.06) 45%,
      rgba(255, 255, 255, 0.16) 100%
    );
  z-index: 0;
}

body.is-column-article .ovl-post-single__featured.has-ovl-featured-blur img {
  position: relative;
  z-index: 1;
  background: transparent !important;
}

body.is-column-article .ovl-post-single__featured img {
  width: 100%;
  height: 100% !important;
  max-height: none !important;
  object-fit: contain !important;
}

/* Wide screens: keep the featured image from feeling too dominant. */
@media (min-width: 960px) {
  body.is-column-article .ovl-post-single__featured {
    overflow: visible;
  }

  body.is-column-article .ovl-post-single__featured.has-ovl-featured-blur {
    overflow: hidden;
  }

  body.is-column-article .ovl-post-single__featured img {
    background: transparent !important;
  }
}

/* TOC */
body.is-column-article .c-toc {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(7, 18, 30, 0.08);
  border-radius: 16px;
  padding: clamp(10px, 2.2vw, 14px);
  box-shadow: 0 14px 30px rgba(7, 18, 30, 0.05);
  max-width: min(100%, 52ch);
  margin-inline: auto;
}

body.is-column-article .c-toc__title {
  margin: 0 0 6px 0;
  font-size: 1.3rem !important;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(51, 51, 51, 0.72);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

body.is-column-article .c-toc__title::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(11, 183, 192, 0.7);
  box-shadow: 0 0 0 4px rgba(11, 183, 192, 0.14);
}

body.is-column-article .wp-block-table-of-contents {
  margin: 0;
  padding: 0;
  font-size: 0.8em;
}

body.is-column-article .wp-block-table-of-contents__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: block;
}

body.is-column-article .wp-block-table-of-contents__list-item {
  margin: 0;
  line-height: 1.55;
  padding: 0.32em 0;
  border-top: 1px solid rgba(7, 18, 30, 0.06);
}

body.is-column-article .wp-block-table-of-contents__list-item:first-child {
  border-top: 0;
}

body.is-column-article .wp-block-table-of-contents__list-item.is-level-3 {
  padding-left: 12px;
  position: relative;
}

body.is-column-article .wp-block-table-of-contents__list-item.is-level-3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  bottom: 0.3em;
  width: 2px;
  border-radius: 999px;
  background: rgba(7, 18, 30, 0.08);
}

body.is-column-article .wp-block-table-of-contents__list-item > a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.is-column-article .wp-block-table-of-contents__list-item > a::before {
  content: "";
  width: 0.85em;
  height: 0.85em;
  border-radius: 6px;
  background: linear-gradient(135deg, #0f6ba9, #0bb7c0);
  box-shadow: 0 4px 10px rgba(15, 107, 169, 0.2);
  flex-shrink: 0;
}

body.is-column-article .wp-block-table-of-contents__list-item.is-level-3 > a::before {
  width: 0.55em;
  height: 0.55em;
  border-radius: 999px;
  background: rgba(11, 183, 192, 0.7);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9);
}

body.is-column-article .wp-block-table-of-contents a {
  text-decoration: none;
  border-bottom: 1px solid rgba(7, 18, 30, 0.14);
  padding-bottom: 1px;
}

body.is-column-article .wp-block-table-of-contents a:hover {
  border-bottom-color: rgba(11, 183, 192, 0.45);
}

body.is-column-article .wp-block-table-of-contents a:focus-visible {
  outline: 3px solid rgba(11, 183, 192, 0.25);
  outline-offset: 2px;
}

/* Hide TOC wrapper when the list is not rendered. */
body.is-column-article .c-toc:has(.wp-block-table-of-contents:empty),
body.is-column-article .c-toc:has(.wp-block-table-of-contents__list:empty) {
  display: none;
}

/* Content typography */
body.is-column-article .c-article-content {
  font-size: clamp(16px, 0.95rem + 0.2vw, 18px);
  line-height: 1.9;
  overflow-wrap: anywhere;
}

body.is-column-article .c-article-content :where(p) {
  margin-top: 0;
  margin-bottom: 1.05em;
}

body.is-column-article .c-article-content :where(h2) {
  margin-top: clamp(64px, 8vw, 80px);
  margin-bottom: 24px;
  line-height: 1.35;
  position: relative;
  padding-left: 1.4em;
}

/* When the article starts with a heading, avoid an overly large top gap. */
body.is-column-article .c-article-content > :where(h2):first-child {
  margin-top: clamp(24px, 4vw, 36px);
}

body.is-column-article .c-article-content :where(h2)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: var(--ovl-accent, #0bb7c0);
  box-shadow: 0 0 0 6px rgba(11, 183, 192, 0.12);
}

body.is-column-article .c-article-content :where(h2)::after {
  content: "";
  display: block;
  width: min(12em, 100%);
  height: 2px;
  margin-top: 0.4em;
  background: linear-gradient(90deg, rgba(11, 183, 192, 0.7), rgba(11, 183, 192, 0));
}

body.is-column-article .c-article-content :where(h3) {
  margin-top: clamp(24px, 4vw, 36px);
  margin-bottom: 18px;
  line-height: 1.4;
  position: relative;
  padding-left: 1em;
}

body.is-column-article .c-article-content :where(h3)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 0.55em;
  height: 0.18em;
  border-radius: 999px;
  background: var(--ovl-accent, #0bb7c0);
}

body.is-column-article .c-article-content :where(h4, h5, h6) {
  margin-top: clamp(28px, 5vw, 40px);
  margin-bottom: 12px;
  line-height: 1.45;
}

body.is-column-article .c-article-content :where(ul, ol) {
  margin-top: 0;
  margin-bottom: 1.05em;
  padding-left: 1.2em;
}

body.is-column-article .c-article-content :where(ul.has-list-bullet, ol.has-list-bullet) {
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1rem);
  line-height: 1.7;
}

body.is-column-article .c-article-content :where(ul.has-list-bullet li, ol.has-list-bullet li) {
  font-size: inherit;
}

body.is-column-article .c-article-content :where(li) {
  margin: 0.35em 0;
  font-size: 1.2rem;
  line-height: inherit;
}

body.is-column-article .c-article-content :where(ul.has-list-bullet li, ol.has-list-bullet li) {
  font-size: inherit !important;
}

@media (max-width: 640px) {
  body.is-column-article .c-article-content :where(ul.has-list-bullet, ol.has-list-bullet) {
    font-size: 0.85rem;
  }

  body.is-column-article .c-article-content :where(ul.has-list-bullet li, ol.has-list-bullet li) {
    font-size: inherit !important;
  }
}

body.is-column-article .c-article-content :where(a) {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

body.is-column-article .c-article-content :where(strong, b) {
  font-weight: 700;
}

/* Images / embeds */
body.is-column-article .c-article-content :where(img, video) {
  max-width: 100%;
  height: auto;
}

body.is-column-article .c-article-content :where(figure) {
  max-width: 100%;
}

body.is-column-article .c-article-content :where(.wp-element-caption) {
  margin-top: 0.6em;
  font-size: 0.85em;
  line-height: 1.6;
  color: var(--ovl-column-muted);
}

/* Tables should never force horizontal scroll on the page. */
body.is-column-article .c-article-content :where(.wp-block-table) {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.is-column-article .c-article-content :where(.wp-block-table table) {
  width: 100%;
  max-width: 100%;
}

/* Code blocks */
body.is-column-article .c-article-content :where(pre) {
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(7, 18, 30, 0.05);
  overflow: auto;
  line-height: 1.7;
}

/* Supplemental boxes (reusable via class or block style) */
body.is-column-article .c-note,
body.is-column-article .is-style-c-note {
  background: var(--ovl-column-box-bg);
  border-radius: 18px;
  padding: clamp(16px, 3vw, 22px);
  margin: 1.4em 0;
}

body.is-column-article .c-tip,
body.is-column-article .is-style-c-tip {
  background: var(--ovl-column-box-bg-accent);
  border-radius: 18px;
  padding: clamp(16px, 3vw, 22px);
  margin: 1.4em 0;
}

body.is-column-article .c-quote,
body.is-column-article .is-style-c-quote {
  background: rgba(7, 18, 30, 0.03);
  border-radius: 18px;
  padding: clamp(16px, 3vw, 22px);
  margin: 1.4em 0;
}

body.is-column-article .c-quote :where(blockquote),
body.is-column-article .is-style-c-quote :where(blockquote) {
  border-left: 3px solid rgba(11, 183, 192, 0.35);
  margin: 0;
  padding-left: 1em;
}

body.is-column-article .c-note > :last-child,
body.is-column-article .c-tip > :last-child,
body.is-column-article .c-quote > :last-child,
body.is-column-article .is-style-c-note > :last-child,
body.is-column-article .is-style-c-tip > :last-child,
body.is-column-article .is-style-c-quote > :last-child {
  margin-bottom: 0;
}

/* CTA */
body.is-column-article .c-cta {
  background: rgba(7, 18, 30, 0.03);
  border-radius: 22px;
  padding: clamp(18px, 3vw, 28px);
}

body.is-column-article .c-cta :where(h2) {
  margin-top: 0;
  margin-bottom: 12px;
}

body.is-column-article .c-cta :where(p) {
  margin-top: 0;
  margin-bottom: 16px;
  color: rgba(51, 51, 51, 0.85);
}
