/* ── Gazette — article page ───────────────────────────────── */

/* Two-column layout */
.gz-article-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}
@media (max-width: 900px) {
  .gz-article-wrap {
    grid-template-columns: 1fr;
    padding: 0 16px 60px;
  }
}

/* ── Article ──────────────────────────────────────────────── */
.gz-article__header {
  padding: 28px 0 0;
}
.gz-article__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.gz-article__title {
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  color: var(--fg);
}
.gz-article__excerpt {
  font-size: 18px;
  line-height: 1.5;
  color: var(--fg-2);
  margin: 0 0 20px;
}
.gz-article__cover {
  margin: 20px 0 0;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f4f6;
}
.gz-article__cover img { width: 100%; height: auto; }
.gz-article__cover figcaption {
  font-size: 12px;
  color: var(--fg-3);
  text-align: center;
  padding: 8px 12px;
}

/* Byline */
.gz-article__byline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 16px 0 28px;
  font-size: 13px;
  color: var(--fg-2);
  flex-wrap: wrap;
}
.gz-article__author {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--fg);
}
.gz-article__author img {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.gz-article__date::before,
.gz-article__read::before {
  content: "·";
  margin-right: 10px;
  color: var(--border);
}

/* Body text */
.gz-article__content {
  font-size: 17px;
  line-height: 1.78;
  color: #1f2937;
}
.gz-article__content h2 {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 2.2em 0 .6em;
  color: var(--fg);
  scroll-margin-top: 20px;
}
.gz-article__content h3 {
  font-size: 19px;
  font-weight: 700;
  margin: 1.8em 0 .5em;
  color: var(--fg);
  scroll-margin-top: 20px;
}
.gz-article__content p  { margin: 0 0 1.4em; }
.gz-article__content a  {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.gz-article__content strong { font-weight: 700; }
.gz-article__content blockquote {
  border-left: 3px solid var(--accent);
  margin: 2em 0;
  padding: 4px 0 4px 20px;
  font-style: italic;
  color: var(--fg-2);
}
.gz-article__content pre {
  background: #f3f4f6;
  border-radius: 8px;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 14px;
  margin: 0 0 1.4em;
}
.gz-article__content code {
  font-size: .875em;
  background: #f3f4f6;
  padding: 2px 5px;
  border-radius: 4px;
}
.gz-article__content pre code { background: none; padding: 0; }
.gz-article__content img {
  border-radius: 8px;
  margin: .5em 0 1.4em;
}
.gz-article__content ul,
.gz-article__content ol {
  padding-left: 1.5em;
  margin: 0 0 1.4em;
}
.gz-article__content li { margin-bottom: .4em; }
.gz-article__content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

/* Tags footer */
.gz-article__tags {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gz-article__tag-pill {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-2);
  transition: border-color .15s, color .15s;
}
.gz-article__tag-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Articles sidebar ─────────────────────────────────────── */
.gz-sidebar {
  position: static;
  padding-top: 56px; /* align with article title */
}
@media (max-width: 900px) {
  .gz-sidebar { display: none; }
}

/* TOC */
.gz-toc {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.gz-toc__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--fg);
}
.gz-toc__nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.gz-toc__nav li > ol {
  padding-left: 14px;
  margin-top: 3px;
}
.gz-toc__nav a {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: var(--fg-2);
  padding: 4px 0;
  border-left: 2px solid transparent;
  padding-left: 8px;
  transition: color .15s, border-color .15s;
}
.gz-toc__nav a:hover { color: var(--fg); }
.gz-toc__nav a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}
/* hide TOC block until JS populates it */
.gz-toc:not(:has(a)) { display: none; }

.gz-sidebar__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--fg);
}

/* Sidebar cards */
.gz-sidebar__card {
  display: block;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  transition: opacity .15s;
}
.gz-sidebar__card:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.gz-sidebar__card:hover { opacity: .8; }

.gz-sidebar__card-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-2);
  margin-bottom: 10px;
}
.gz-sidebar__card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.gz-sidebar__card:hover .gz-sidebar__card-img img {
  transform: scale(1.03);
}

.gz-sidebar__card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gz-sidebar__card-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
}
.gz-sidebar__card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--fg);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gz-sidebar__card-date {
  font-size: 12px;
  color: var(--fg-3);
}

/* ── Related posts ────────────────────────────────────────── */
.gz-related {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 80px;
  border-top: 1px solid var(--border);
}
.gz-related__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 28px 0 20px;
}
.gz-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 600px) { .gz-related__grid { grid-template-columns: 1fr; } }

.gz-related__card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.gz-related__card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.07); }
.gz-related__img { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-2); }
.gz-related__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gz-related__card:hover .gz-related__img img { transform: scale(1.04); }
.gz-related__body { padding: 12px; display: flex; flex-direction: column; gap: 5px; }
.gz-related__tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.gz-related__card-title { font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--fg); margin: 0; }

/* ── Koenig editor — required card classes ────────────────── */
.gh-content .kg-width-wide {
  margin-left: calc(50% - 50vw + 24px);
  margin-right: calc(50% - 50vw + 24px);
  max-width: calc(100vw - 48px);
}
.gh-content .kg-width-full {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: 100vw;
}
.gh-content .kg-image { max-width: 100%; height: auto; border-radius: 6px; }
.gh-content .kg-image-card { margin: 1.5em 0; }
.gh-content .kg-image-card figcaption { font-size: 13px; color: var(--fg-3); text-align: center; margin-top: 8px; }
.gh-content .kg-gallery-container { display: flex; flex-direction: column; gap: 8px; margin: 1.5em 0; }
.gh-content .kg-gallery-row { display: flex; gap: 8px; }
.gh-content .kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.gh-content .kg-bookmark-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin: 1.5em 0; }
.gh-content .kg-bookmark-container { display: flex; color: inherit; text-decoration: none; }
.gh-content .kg-bookmark-content { padding: 14px; flex: 1; }
.gh-content .kg-bookmark-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.gh-content .kg-bookmark-description { font-size: 13px; color: var(--fg-2); }
.gh-content .kg-bookmark-metadata { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--fg-3); }
.gh-content .kg-bookmark-thumbnail { width: 160px; flex-shrink: 0; }
.gh-content .kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.gh-content .kg-callout-card { display: flex; gap: 14px; padding: 16px 20px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--border); margin: 1.5em 0; }
.gh-content .kg-callout-emoji { font-size: 20px; line-height: 1.4; flex-shrink: 0; }
.gh-content .kg-video-card { margin: 1.5em 0; }
.gh-content .kg-video-card video { width: 100%; border-radius: 8px; }
