/*
 * Kouider — Article typography.
 *
 * ONE set of rules for both wrappers:
 *   .k-blog-single-content  (templates/blog-post.html)
 *   .k-single-content       (templates/single.html)
 *
 * Loads after 16-post-content.css so it is the last word on article text.
 */

.k-blog-single-content,
.k-single-content {
  color: var(--wp--preset--color--k-muted, #a6a6ad);
  font-size: 1.02rem;
  line-height: 1.78;
  overflow-wrap: break-word;
  -webkit-text-size-adjust: 100%;
}

/* ============================================================
   1. Headings
   ============================================================ */
.k-blog-single-content h1,
.k-blog-single-content h2,
.k-blog-single-content h3,
.k-blog-single-content h4,
.k-blog-single-content h5,
.k-blog-single-content h6,
.k-single-content h1,
.k-single-content h2,
.k-single-content h3,
.k-single-content h4,
.k-single-content h5,
.k-single-content h6 {
  color: var(--wp--preset--color--k-white, #f7f7f8);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -.022em;
  text-wrap: balance;
  /* Keeps TOC / anchor jumps clear of a sticky header. */
  scroll-margin-top: 110px;
}

.k-blog-single-content h1,
.k-single-content h1 {
  font-size: clamp(1.85rem, 3.6vw, 2.35rem);
  margin: 0 0 .7em;
}

/* Red rule on the left gives each section a visible start. */
.k-blog-single-content h2,
.k-single-content h2 {
  font-size: clamp(1.45rem, 2.9vw, 1.9rem);
  margin: 2.2em 0 .7em;
  padding-left: 15px;
  border-left: 3px solid var(--wp--preset--color--k-red, #ff2638);
}

.k-blog-single-content h3,
.k-single-content h3 {
  font-size: clamp(1.16rem, 2.1vw, 1.4rem);
  margin: 1.9em 0 .55em;
}

.k-blog-single-content h4,
.k-single-content h4 {
  font-size: 1.1rem;
  margin: 1.7em 0 .5em;
}

.k-blog-single-content h5,
.k-single-content h5 {
  font-size: 1rem;
  margin: 1.5em 0 .5em;
}

.k-blog-single-content h6,
.k-single-content h6 {
  font-size: .84rem;
  margin: 1.5em 0 .5em;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--wp--preset--color--k-muted, #a6a6ad);
}

/* Never let the opening heading push the article down. */
.k-blog-single-content > :first-child,
.k-single-content > :first-child { margin-top: 0; }

/* ============================================================
   2. Text
   ============================================================ */
.k-blog-single-content p,
.k-single-content p {
  margin: 0 0 1.15em;
  line-height: 1.78;
}

.k-blog-single-content p:last-child,
.k-single-content p:last-child { margin-bottom: 0; }

/* Opening paragraph, used on the blog articles. */
.k-blog-single-content .k-lede,
.k-single-content .k-lede {
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--wp--preset--color--k-white, #f7f7f8);
  border-left: 2px solid var(--wp--preset--color--k-red, #ff2638);
  padding-left: 18px;
  margin: 0 0 1.6em;
}

.k-blog-single-content strong,
.k-single-content strong { color: var(--wp--preset--color--k-white, #f7f7f8); font-weight: 600; }

.k-blog-single-content em,
.k-single-content em { font-style: italic; color: #c9c9d0; }

.k-blog-single-content a,
.k-single-content a {
  color: var(--wp--preset--color--k-red-bright, #ff5664);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.k-blog-single-content a:hover,
.k-single-content a:hover { color: #fff; }

/* ============================================================
   3. Lists
   ============================================================ */
.k-blog-single-content ul,
.k-blog-single-content ol,
.k-single-content ul,
.k-single-content ol {
  margin: 1.1em 0 1.35em;
  padding-left: 1.45em;
}
.k-blog-single-content li,
.k-single-content li { margin-bottom: .5em; line-height: 1.72; }
.k-blog-single-content li:last-child,
.k-single-content li:last-child { margin-bottom: 0; }
.k-blog-single-content ul li::marker,
.k-single-content ul li::marker { color: var(--wp--preset--color--k-red, #ff2638); }
.k-blog-single-content ol li::marker,
.k-single-content ol li::marker {
  color: var(--wp--preset--color--k-muted, #a6a6ad);
  font-family: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas, monospace;
  font-weight: 700;
}
.k-blog-single-content li > ul,
.k-blog-single-content li > ol,
.k-single-content li > ul,
.k-single-content li > ol { margin: .5em 0 .6em; }

/* ============================================================
   4. Inline code (block code is handled by 21-code-blocks.css)
   ============================================================ */
.k-blog-single-content code,
.k-single-content code {
  font-family: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: .88em;
  color: #ff7a86;
  background: rgba(255, 38, 56, .08);
  border: 1px solid rgba(255, 38, 56, .18);
  border-radius: 6px;
  padding: 1px 6px;
}

/* ============================================================
   5. Media, quotes, rules, tables
   ============================================================ */
.k-blog-single-content figure,
.k-single-content figure { margin: 1.8em 0; }

.k-blog-single-content img,
.k-single-content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}

.k-blog-single-content figcaption,
.k-single-content figcaption {
  margin-top: 10px;
  font-family: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: .78rem;
  letter-spacing: .03em;
  color: rgba(166, 166, 173, .8);
  text-align: center;
}

.k-blog-single-content blockquote,
.k-single-content blockquote {
  margin: 1.6em 0;
  padding: 14px 20px;
  border-left: 2px solid var(--wp--preset--color--k-red, #ff2638);
  background: rgba(255, 255, 255, .03);
  border-radius: 0 12px 12px 0;
  color: var(--wp--preset--color--k-white, #f7f7f8);
  font-style: italic;
}
.k-blog-single-content blockquote p:last-child,
.k-single-content blockquote p:last-child { margin-bottom: 0; }

.k-blog-single-content hr,
.k-single-content hr {
  margin: 2.3em 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.k-blog-single-content table,
.k-single-content table {
  width: 100%;
  margin: 1.6em 0;
  border-collapse: collapse;
  font-size: .93rem;
}
.k-blog-single-content th,
.k-blog-single-content td,
.k-single-content th,
.k-single-content td {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, .1);
  text-align: left;
}
.k-blog-single-content th,
.k-single-content th {
  background: rgba(255, 255, 255, .04);
  color: var(--wp--preset--color--k-white, #f7f7f8);
  font-weight: 600;
}

@media (max-width: 600px) {
  .k-blog-single-content h2,
  .k-single-content h2 { margin-top: 1.8em; padding-left: 12px; border-left-width: 3px; }
  .k-blog-single-content p,
  .k-single-content p { margin-bottom: 1.05em; }
}