.wb-topic,
.wb-topic-category {
  --wb-green: var(--wb-ui-accent, #177d70);
  --wb-ink: var(--wb-ui-ink, #172925);
  --wb-muted: var(--wb-ui-muted, #65746f);
  --wb-line: var(--wb-ui-border, #dceae7);
  --wb-surface: var(--wb-ui-surface, #f8fcfb);
  color: var(--wb-ink);
}

.wb-topic,
.wb-topic *,
.wb-topic-category,
.wb-topic-category * { box-sizing: border-box; }

.wb-topic { padding-bottom: 32px; }
.wb-preview-flag { background:#fff4cf;border:1px solid #ead58b;border-radius:999px;color:#654f00;display:table;font-size:12px;font-weight:700;letter-spacing:.04em;margin-bottom:18px;padding:6px 12px;text-transform:uppercase; }
.wb-topic__header { margin:0 0 18px; }
.wb-topic__header h1 { color:var(--wb-ink);font-size:clamp(30px,4vw,44px);letter-spacing:-.035em;line-height:1.08;margin:0; }
.wb-topic__intro { color:#405554;font-size:clamp(16px,1.8vw,19px);line-height:1.65;margin-top:14px;max-width:760px; }

/* Listing, topic cards and accordion deliberately have no duplicate visual
   rules here. Their canonical module styles are loaded by Topic HtmlView. */
.wb-topic-toc { background:#f2f8f6;border:1px solid var(--wb-line);border-radius:20px;margin:clamp(24px,3vw,32px) 0 0;padding:22px 26px; }
.wb-topic-toc + .wb-topic__description { margin-top:clamp(24px,3vw,32px); }
.wb-topic-toc ol { columns:2;gap:36px;margin:12px 0 0;padding-left:1.25rem; }
.wb-topic-toc li { break-inside:avoid;margin:.55rem 0; }
.wb-topic-toc a { color:var(--wb-ink);text-underline-offset:3px; }
.wb-topic__description { color:var(--wb-muted);line-height:1.65;margin:0 0 32px; }
.wb-topic-faq { margin-top:32px; }
.wb-topic-faq__title { align-items:center;color:var(--wb-ink);display:flex;font-size:clamp(22px,2.8vw,29px)!important;font-weight:760;gap:11px;letter-spacing:-.032em;line-height:1.18;margin:0 0 18px!important; }
.wb-topic-faq__title::before { background:linear-gradient(145deg,#42c5a5,#718bea);border-radius:50%;box-shadow:0 0 0 5px rgba(66,197,165,.12);content:'';flex:0 0 9px;height:9px;width:9px; }
.wb-topic-faq .wb-accordion { margin:0; }

.wb-topic-category { padding:clamp(24px,3vw,32px) 0 32px; }
.wb-topic-category__header { margin:0 0 clamp(18px,2.5vw,26px); }
.wb-topic-category h1 { color:var(--wb-ink);font-size:clamp(32px,4vw,46px);letter-spacing:-.04em;line-height:1.04;margin:0; }
.wb-topic-category__intro { color:#405554;font-size:clamp(16px,1.8vw,19px);line-height:1.6;margin-top:12px;max-width:760px; }
.wb-topic-category__intro > :first-child { margin-top:0; }
.wb-topic-category__intro > :last-child { margin-bottom:0; }
.wb-category-directory { background:linear-gradient(145deg,#fbfdfc 0%,#f7faf9 100%);border:1px solid var(--wb-line);border-radius:22px;box-shadow:0 14px 38px rgba(36,67,63,.055);padding:clamp(12px,2vw,20px) clamp(20px,3vw,28px); }
.wb-category-directory__list { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:clamp(24px,4vw,40px);list-style:none;margin:0;padding:0; }
.wb-category-directory__list li { border-bottom:1px solid #e3ece9;display:flex;min-width:0; }
.wb-category-directory__list a { align-items:center;color:var(--wb-ink);display:flex;font-size:clamp(16px,1.55vw,18px);font-weight:650;letter-spacing:-.015em;line-height:1.3;min-height:62px;padding:10px 2px;text-decoration:none;text-underline-offset:5px;width:100%; }
.wb-category-directory__list a:hover { color:var(--wb-green);text-decoration:underline;text-decoration-thickness:1px; }
.wb-category-directory__list a:focus-visible { border-radius:6px;outline:3px solid rgba(23,125,112,.2);outline-offset:3px; }
.wb-category-directory__list li:nth-last-child(-n+2) { border-bottom:0; }

/* The category-only latest module lives after #gkPageContent, so it spans the
   complete page body rather than the main column beside the sticky sidebar. */
.com_wbtopics.view-category #gkBottom2 .wb-health-latest-shell { margin:clamp(24px,3vw,32px) 25px 32px!important;width:auto!important; }
.com_wbtopics.view-category #gkBottom2 .wb-health-latest-shell > .box-wrap,
.com_wbtopics.view-category #gkBottom2 .wb-health-latest-shell > .box-wrap > .content { margin:0;padding:0; }
.com_wbtopics.view-category #gkBottom2 .wb-health-latest-shell .wb-content-listing { margin:0; }

@media(max-width:760px) {
  .wb-topic,.wb-topic-category { padding-inline:0; }
  .wb-topic-toc ol { columns:1; }
  .wb-category-directory__list { grid-template-columns:1fr; }
  .wb-category-directory__list li:nth-last-child(2) { border-bottom:1px solid #e3ece9; }
  .com_wbtopics.view-category #gkBottom2 .wb-health-latest-shell { margin:20px 12px 24px!important; }
}

@media(max-width:640px) {
  .wb-topic .wb-topic-section--columns-2 .wb-topic-card,
  .wb-topic .wb-topic-section--columns-2 .wb-topic-card:last-child:nth-child(odd) {
    grid-column:auto;
    grid-template-columns:1fr;
    min-height:0;
  }
  .wb-topic .wb-topic-section--columns-2 .wb-topic-card__media {
    aspect-ratio:3 / 2;
    min-height:0;
  }
}
