/* ── Dark Editorial — article page ───────────────────────── */

/* Outer wrapper — full dark background */
.de-post-wrap {
  background: var(--bg);
  padding: 40px 24px 0;
  min-height: 60vh;
}

/* Two-column grid */
.de-columns {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}
.de-columns--single {
  grid-template-columns: 740px;
  justify-content: center;
}
@media (max-width: 900px) {
  .de-columns { grid-template-columns: 1fr; }
  .de-post-wrap { padding: 24px 16px 0; }
}

/* ── Article — white paper ────────────────────────────────── */
.de-paper {
  background: #ffffff;
  border-radius: 12px 12px 0 0;
  padding: 36px 44px 52px;
  color: #1c1917;
  min-height: 80vh;
}
@media (max-width: 600px) {
  .de-paper { padding: 24px 20px 40px; }
}

.de-paper__header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.de-paper__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.de-paper__title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0;
  color: #111827;
}
.de-paper__excerpt {
  font-size: 18px;
  line-height: 1.55;
  color: #4b5563;
  margin: 0;
}

/* Byline */
.de-paper__byline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 28px;
  font-size: 13px;
  color: #6b7280;
  flex-wrap: wrap;
}
.de-paper__author {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: #111827;
}
.de-paper__author img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.de-paper__date::before,
.de-paper__read::before { content: "·"; margin-right: 10px; color: #d1d5db; }

/* Cover */
.de-paper__cover {
  margin: 0 -44px 32px;
  background: #f3f4f6;
}
@media (max-width: 600px) { .de-paper__cover { margin: 0 -20px 24px; } }
.de-paper__cover img { width: 100%; height: auto; }
.de-paper__cover figcaption { font-size: 12px; color: #9ca3af; text-align: center; padding: 8px 12px; }

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

/* Tags */
.de-paper__tags {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.de-pill {
  padding: 5px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  transition: border-color .15s, color .15s;
}
.de-pill:hover { border-color: var(--accent); color: var(--accent); }

/* ── Sidebar ──────────────────────────────────────────────── */
.de-sidebar {
  padding-top: 0;
  position: sticky;
  top: 24px;
}
@media (max-width: 900px) { .de-sidebar { display: none; } }

/* TOC */
.de-toc {
  margin-bottom: 28px;
  padding: 16px;
  background: var(--bg-2);
  border-radius: var(--radius);
  border: 1px solid var(--bg-3);
}
.de-toc__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 12px;
}
.de-toc__nav ol { list-style: none; margin: 0; padding: 0; }
.de-toc__nav li > ol { padding-left: 12px; margin-top: 2px; }
.de-toc__nav a {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: var(--fg-2);
  padding: 4px 6px;
  border-radius: 5px;
  border-left: 2px solid transparent;
  transition: background .12s, color .12s, border-color .12s;
}
.de-toc__nav a:hover { color: var(--fg); background: var(--bg-3); }
.de-toc__nav a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}
.de-toc:not(:has(a)) { display: none; }

/* Sidebar label */
.de-sidebar__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bg-3);
}

/* Poster cards — image with text overlay */
.de-sidebar__posters {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.de-poster {
  position: relative;
  display: block;
  aspect-ratio: 16/10;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-2);
  transition: transform .2s, box-shadow .2s;
}
.de-poster:hover { transform: scale(1.02); box-shadow: 0 10px 30px rgba(0,0,0,.5); }

.de-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.de-poster:hover img { transform: scale(1.05); }

.de-poster__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.15) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  gap: 3px;
}
.de-poster__tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
}
.de-poster__title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.de-poster__date {
  font-size: 11px;
  color: rgba(255,255,255,.55);
}

/* ── Related posts ────────────────────────────────────────── */
.de-related {
  background: var(--bg-2);
  margin-top: 0;
  padding: 0 24px;
}
.de-related__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 0 60px;
}
.de-related__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 20px;
}

/* ── Koenig card classes ───────────────────────────────────── */
.gh-content .kg-width-wide {
  margin-left: calc(50% - 50vw + 68px);
  margin-right: calc(50% - 50vw + 68px);
  max-width: calc(100vw - 136px);
}
.gh-content .kg-width-full {
  margin-left: -44px;
  margin-right: -44px;
  max-width: calc(100% + 88px);
}
.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: #9ca3af; 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 #e5e7eb; 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; color: #111827; }
.gh-content .kg-bookmark-description { font-size: 13px; color: #6b7280; }
.gh-content .kg-bookmark-metadata { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: #9ca3af; }
.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: #fffbeb; border: 1px solid #fde68a; 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; }
