/* ClaviSay blog article, extends secondary-page.css */

.blog-page .blog-article,
.blog-page .blog-toc,
.blog-page .blog-hero__meta,
.blog-page .blog-book-entry,
.blog-page .blog-callout,
.blog-page .blog-inline-figure {
  text-align: left;
}

/* Hero inside blog-layout, aligned with article column */
.blog-hero {
  grid-column: 2;
  padding: clamp(48px, 8vw, 88px) 0 clamp(32px, 5vw, 48px);
}
.blog-hero__category {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in oklch, var(--accent) 10%, transparent);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
/* Title and cover share one block with matching width. */
.blog-hero__title-media {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
}
.blog-hero__title-media .seo-h1 {
  text-align: left;
  margin-bottom: clamp(16px, 2.5vw, 24px);
  max-width: none;
  width: 100%;
  text-wrap: pretty;
}
.blog-hero__title-media .blog-hero__meta {
  margin-top: 0;
  margin-bottom: clamp(20px, 3vw, 28px);
}
.blog-hero__title-media .blog-hero__featured {
  width: 100%;
  max-width: 100%;
  margin-top: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.blog-hero__title-media .blog-hero__featured img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}
.blog-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}
.blog-hero__meta strong {
  color: var(--fg);
  font-weight: 600;
}
.blog-hero__meta-divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border);
}

/* Layout: TOC and article */
.articles-vocabulary-blog .blog-layout.container,
.context-vocabulary-blog .blog-layout.container {
  width: 100%;
  max-width: none;
  padding-inline: 0;
}

.blog-layout {
  display: grid;
  grid-template-columns: minmax(var(--gutter), 1fr) minmax(0, var(--container)) minmax(
      var(--gutter),
      1fr
    );
  row-gap: 0;
  align-items: start;
  padding-bottom: clamp(64px, 10vw, 96px);
}

@media (max-width: 1180px) {
  .blog-toc {
    display: none;
  }
}

.blog-toc {
  grid-column: 1;
  grid-row: 2;
  justify-self: end;
  position: sticky;
  top: calc(var(--home-header-height, 61px) + 24px);
  width: 170px;
  margin-right: clamp(18px, 2vw, 28px);
  padding: 20px 0;
}
.blog-toc__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.blog-toc nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.blog-toc a {
  display: block;
  padding: 6px 0 6px 12px;
  border-left: 2px solid transparent;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  text-decoration: none;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.blog-toc a:hover {
  color: var(--fg);
}
.blog-toc a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}

/* Article prose */
.blog-article {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  max-width: none;
}
.blog-article .blog-section {
  padding: clamp(40px, 6vw, 56px) 0 0;
  scroll-margin-top: 88px;
}
.blog-article .blog-section:first-child {
  padding-top: 0;
}
.blog-article .seo-h2 {
  text-align: left;
  font-size: clamp(24px, 3.5vw, 30px);
  margin-bottom: 16px;
  max-width: none;
}
.blog-article .seo-body {
  text-align: left;
  max-width: none;
  color: var(--fg);
  font-size: 16px;
  line-height: 1.7;
}
.blog-article .seo-body p + p {
  margin-top: 16px;
}
.blog-article .seo-body ul {
  margin: 16px 0;
  padding-left: 20px;
  color: var(--muted);
}
.blog-article .seo-body li + li {
  margin-top: 8px;
}
.blog-article .seo-body li::marker {
  color: var(--accent);
}
.blog-article .seo-body h3 {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  color: var(--fg);
  margin-top: 28px;
  margin-bottom: 8px;
}
.blog-article .seo-body h3:first-child {
  margin-top: 0;
}

.blog-inline-figure {
  margin: 28px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.blog-inline-figure img {
  width: 100%;
  height: auto;
  display: block;
}
.blog-inline-figure figcaption {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  border-top: 1px solid var(--border);
}

/* Book entries: title, text, and image below */
.blog-book-grid {
  display: grid;
  gap: 36px;
  margin-top: 24px;
}
.blog-book-entry h3 {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
}
.blog-book-entry > p {
  font-size: 16px;
  color: var(--fg);
  line-height: 1.7;
}
.blog-book-meta {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}
.blog-book-meta span + span::before {
  content: '/';
  margin: 0 8px;
  color: var(--border);
}
.blog-book-figure {
  margin: 16px 0 0;
  border-radius: var(--radius);
  overflow: hidden;
}
.blog-book-figure img {
  width: 100%;
  max-width: 480px;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

/* Callout */
.blog-callout {
  margin: 24px 0;
  padding: 20px 24px;
  background: color-mix(in oklch, var(--accent) 6%, var(--surface));
  border: 1px solid color-mix(in oklch, var(--accent) 18%, var(--border));
  border-radius: var(--radius);
}
.blog-callout__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.blog-callout p {
  font-size: 15px;
  color: var(--fg);
  line-height: 1.6;
}

/* Nested inside app layout (React route) */
.layout__main .articles-vocabulary-blog.seo-page,
.layout__main .context-vocabulary-blog.seo-page {
  width: calc(100% + 2 * clamp(20px, 4vw, 48px));
  max-width: none;
  margin-inline: calc(-1 * clamp(20px, 4vw, 48px));
  margin-block-start: calc(-1 * clamp(32px, 5vw, 56px));
  margin-block-end: -64px;
  padding-inline: clamp(20px, 4vw, 48px);
  min-height: auto;
  background: var(--bg);
}

.layout__main .articles-vocabulary-blog .container,
.layout__main .context-vocabulary-blog .container {
  width: min(1080px, 100%);
}

.layout__main .articles-vocabulary-blog .blog-layout.container,
.layout__main .context-vocabulary-blog .blog-layout.container {
  width: 100%;
  max-width: none;
  padding-inline: 0;
}
