/* WIJDR REV25 — INDIVIDUAL DISCUSSION TOPICS ONLY
   Styling only. Scoped to the historic WIJDR topic header followed by comments.
   Does not change hidden states, form submission, reaction events, pagination,
   media embeds, links, OCR, transcript views, or source/reference controls.
*/
:root {
  --wijdr-topic-paper: #fffdf8;
  --wijdr-topic-cream: #f9f4e9;
  --wijdr-topic-black: #211c18;
  --wijdr-topic-gold: #c19a55;
  --wijdr-topic-red: #b8242c;
  --wijdr-topic-muted: #60574d;
  --wijdr-topic-line: #e3d7c4;
}
/* Unique structure of a topic page: kicker, h1, prose, then discussion. */
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose):has(+ .comments-shell) {
  box-sizing:border-box;
  max-width:1100px;
  min-width:0;
  margin:clamp(22px,3vw,48px) auto 0;
  padding:clamp(24px,3.6vw,48px);
  background:linear-gradient(145deg,#fffefa 0%,#f8f1e4 100%);
  border:1px solid #e3d6c1;
  border-top:7px solid var(--wijdr-topic-black);
  border-radius:20px;
  box-shadow:0 17px 44px rgba(35,22,9,.075);
  position:relative;
  overflow-wrap:anywhere;
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose):has(+ .comments-shell)::after {
  content:"";height:5px;position:absolute;left:0;right:0;bottom:0;
  background:linear-gradient(90deg,var(--wijdr-topic-red) 0 42%,var(--wijdr-topic-gold) 42% 100%);
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose):has(+ .comments-shell) > .section-kicker {
  display:inline-flex;align-items:center;max-width:100%;
  color:#ffefda;background:#241e19;border-radius:5px;
  padding:8px 12px;margin-bottom:19px;letter-spacing:.16em;
  font-size:.72rem;font-weight:900;line-height:1.2;
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose):has(+ .comments-shell) > h1.high-intensity {
  font-size:clamp(2rem,4.4vw,3.9rem);
  line-height:1.07;letter-spacing:-.052em;color:#211b15;
  font-weight:900;margin:5px 0 26px;
  max-width:24ch;overflow-wrap:anywhere;text-wrap:pretty;
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose):has(+ .comments-shell) > .prose {
  box-sizing:border-box;min-width:0;
  background:var(--wijdr-topic-paper);color:#2d251e;
  border:1px solid var(--wijdr-topic-line);
  border-left:5px solid var(--wijdr-topic-red);
  border-radius:12px;padding:clamp(17px,2.6vw,28px);
  font-size:clamp(1rem,1.5vw,1.13rem);line-height:1.8;
  overflow-wrap:anywhere;overflow-x:auto;
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose):has(+ .comments-shell) > .prose > :first-child {margin-top:0}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose):has(+ .comments-shell) > .prose > :last-child {margin-bottom:0}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose):has(+ .comments-shell) > .prose :is(h2,h3,h4) {color:#231e18;margin-top:1.45em;line-height:1.2}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose):has(+ .comments-shell) > .prose a {color:#a12229;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose):has(+ .comments-shell) > .prose :is(img,video,iframe,embed,object,svg) {max-width:100%;height:auto}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose):has(+ .comments-shell) > .prose :is(pre,table) {max-width:100%;overflow-x:auto}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose):has(+ .comments-shell) > .prose blockquote {background:#f8f1e7;border-left:4px solid var(--wijdr-topic-gold);padding:12px 18px;margin:20px 0}

/* Only the comments immediately below a topic receive these adjustments. */
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell {
  box-sizing:border-box;min-width:0;
  max-width:1100px;
  margin:24px auto clamp(35px,5vw,74px);
  padding:clamp(18px,3.1vw,36px);
  border:1px solid #dccdb5;
  border-top:6px solid var(--wijdr-topic-red);
  border-radius:19px;
  background:linear-gradient(180deg,#fbf7ee 0%,#f8f4ec 100%);
  box-shadow:0 14px 35px rgba(28,17,7,.06);
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell > .section-kicker {
  display:inline-block;font-size:.71rem;letter-spacing:.17em;font-weight:900;
  color:#ac222b;margin:0 0 8px;
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell > h2 {
  color:#211c16;line-height:1.1;letter-spacing:-.045em;
  font-size:clamp(1.65rem,2.7vw,2.45rem);margin:0 0 14px;
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell > .muted {
  color:var(--wijdr-topic-muted);font-size:.91rem;line-height:1.6;
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell :is(.comment-search,.comments-search,.comment-search-form,[data-wijdr-comment-search]) {
  max-width:100%;box-sizing:border-box;
  border-radius:11px;
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell .comment-form {
  border-top:5px solid var(--wijdr-topic-black);
  background:#fffefa;border-radius:14px;border-color:#decfb6;
  box-shadow:0 5px 20px rgba(45,28,8,.045);
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell .comment-mode-banner {
  color:#6a5137;background:#f9f0df;
  border-radius:8px;padding:9px 12px;
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell .comment-list {
  display:grid;gap:13px;min-width:0;
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell article.comment {
  margin:0;min-width:0;
  border-radius:13px;
  background:#fffefa;
  border-color:#e4d8c5;
  box-shadow:0 3px 12px rgba(38,22,8,.05);
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell article.comment.reply {
  background:#fffaf0;border-left-color:var(--wijdr-topic-gold);
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell .comment-head {
  gap:10px;
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell .comment-body {
  line-height:1.75;font-size:.98rem;overflow-wrap:anywhere;
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell :is(.reaction-row,.comment-reactions,.wijdr-comment-reactions) {
  max-width:100%;display:flex;flex-wrap:wrap;gap:7px;
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell :is(.reaction-row,.comment-reactions,.wijdr-comment-reactions) button {
  border-radius:99px;
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell :is(.comment-attachments,.inline-comment-media) :is(img,video,iframe) {
  max-width:100%;height:auto;
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell :is(.comment-attachments,.inline-comment-media) {
  max-width:100%;min-width:0;
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell :is(.wijdr-pages,.pagination,[data-wijdr-public-pagination]) {
  max-width:100%;display:flex;gap:10px;align-items:center;justify-content:center;flex-wrap:wrap;
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell :is(.wijdr-pages,.pagination,[data-wijdr-public-pagination]) a {
  border:1px solid #d9c5a5;background:#fffaf0;border-radius:9px;
  padding:10px 13px;color:#842027;text-decoration:none;
}
main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell :is(.wijdr-pages,.pagination,[data-wijdr-public-pagination]) a:hover {
  border-color:var(--wijdr-topic-red);
}
@media(max-width:680px) {
  main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose):has(+ .comments-shell) {
    margin:12px 10px 0;padding:20px 15px 22px;border-radius:13px;
  }
  main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose):has(+ .comments-shell) > h1.high-intensity {
    font-size:clamp(1.88rem,8vw,2.65rem);margin-bottom:20px;line-height:1.12;
  }
  main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose):has(+ .comments-shell) > .prose {
    padding:16px 13px;font-size:.99rem;line-height:1.72;
  }
  main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell {
    margin:14px 10px 34px;padding:18px 12px;border-radius:13px;
  }
  main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell .comment-form {padding:13px}
  main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell article.comment {padding:13px 12px}
  main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell .comment-head time {margin-left:0}
}
@media(prefers-reduced-motion:reduce) {
  main > .container.narrow:has(> .section-kicker + h1.high-intensity + .prose) + .comments-shell * {
    scroll-behavior:auto!important;
  }
}
