/* SIOGEN Community — forum front-end. Inherits theme tokens where present,
   with safe fallbacks so it still looks right under any theme. */

.siogen-community{
  --c-accent: var(--accent, #217d47);
  --c-ink:    var(--ink, #0e1116);
  --c-ink2:   var(--ink-2, #39424e);
  --c-muted:  var(--muted, #6b7585);
  --c-line:   var(--line, #e6eaf0);
  --c-soft:   var(--bg-soft, #f6f8fb);
  --c-radius: var(--radius, 18px);
  padding: calc(var(--header-h, 72px) + clamp(32px,5vw,64px)) 0 clamp(64px,9vw,120px);
  color: var(--c-ink2);
}
.siogen-community .container{ width:100%; max-width: var(--container, 1180px); margin:0 auto; padding:0 24px; }

.siogen-community h1{ font-size: clamp(2rem,4.4vw,3.1rem); letter-spacing:-.03em; color:var(--c-ink); margin:0 0 .4rem; }
.siogen-community .eyebrow{ color:var(--c-accent); font-weight:600; letter-spacing:.02em; text-transform:uppercase; font-size:.8rem; }
.siogen-community .lead{ color:var(--c-muted); font-size:1.05rem; margin:.2rem 0 0; max-width:60ch; }
.siogen-comm-h2{ font-size:1.15rem; letter-spacing:-.01em; color:var(--c-ink); margin:2.2rem 0 1rem; }

/* Header row with the "Start a topic" action */
.siogen-comm-head{ display:flex; gap:24px; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; margin-bottom:1.4rem; }
.siogen-comm-head__action{ flex:0 0 auto; }

.siogen-comm-crumbs{ font-size:.9rem; color:var(--c-muted); margin-bottom:1rem; }
.siogen-comm-crumbs a{ color:var(--c-accent); text-decoration:none; }
.siogen-comm-crumbs a:hover{ text-decoration:underline; }
.siogen-comm-crumbs span{ opacity:.5; margin:0 .2rem; }

/* Category boards */
.siogen-board-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:16px; }
.siogen-board{
  display:block; text-decoration:none; color:inherit; background:#fff;
  border:1px solid var(--c-line); border-radius:var(--c-radius); padding:20px 22px;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.siogen-board:hover{ box-shadow:0 18px 40px -24px rgba(16,28,52,.3); transform:translateY(-2px); border-color:transparent; }
.siogen-board h3{ margin:0 0 .3rem; font-size:1.1rem; color:var(--c-ink); letter-spacing:-.01em; }
.siogen-board p{ margin:0 0 .8rem; font-size:.92rem; color:var(--c-muted); }
.siogen-board__count{ font-size:.82rem; font-weight:600; color:var(--c-accent); }

/* Topic list */
.siogen-topic-list{ list-style:none; margin:0; padding:0; border:1px solid var(--c-line); border-radius:var(--c-radius); overflow:hidden; background:#fff; }
.siogen-topic-list--pinned{ margin-bottom:14px; }
.siogen-topic-row{ display:flex; align-items:center; gap:16px; padding:16px 20px; border-bottom:1px solid var(--c-line); }
.siogen-topic-row:last-child{ border-bottom:0; }
.siogen-topic-main{ flex:1 1 auto; min-width:0; }
.siogen-topic-title{ margin:0 0 .25rem; font-size:1.04rem; letter-spacing:-.01em; }
.siogen-topic-title a{ color:var(--c-ink); text-decoration:none; }
.siogen-topic-title a:hover{ color:var(--c-accent); }
.siogen-topic-meta{ margin:0; font-size:.85rem; color:var(--c-muted); }
.siogen-topic-cat{ color:var(--c-accent); text-decoration:none; }
.siogen-topic-cat:hover{ text-decoration:underline; }
.siogen-topic-count{ flex:0 0 auto; text-align:center; min-width:64px; color:var(--c-muted); font-size:.78rem; }
.siogen-topic-count span{ display:block; font-size:1.25rem; font-weight:700; color:var(--c-ink); line-height:1; }

.siogen-badge{ font-size:.85em; }
.siogen-comm-empty{ padding:20px; border:1px dashed var(--c-line); border-radius:var(--c-radius); color:var(--c-muted); text-align:center; }

/* Start-a-topic / forms */
.siogen-newtopic > summary{ list-style:none; cursor:pointer; display:inline-flex; }
.siogen-newtopic > summary::-webkit-details-marker{ display:none; }
.siogen-newtopic[open] > summary{ margin-bottom:14px; }
.siogen-comm-form{
  background:#fff; border:1px solid var(--c-line); border-radius:var(--c-radius);
  padding:20px 22px; display:flex; flex-direction:column; gap:14px; max-width:640px;
}
.siogen-comm-label{ display:flex; flex-direction:column; gap:6px; font-size:.85rem; font-weight:600; color:var(--c-ink2); }
.siogen-comm-form input[type=text],
.siogen-comm-form textarea,
.siogen-comm-form select,
.siogen-reply-form textarea{
  width:100%; font:inherit; color:var(--c-ink); background:#fff;
  border:1px solid var(--c-line); border-radius:12px; padding:.7rem .85rem;
}
.siogen-comm-form textarea{ resize:vertical; }
.siogen-comm-form input:focus,
.siogen-comm-form textarea:focus,
.siogen-comm-form select:focus,
.siogen-reply-form textarea:focus{ outline:none; border-color:var(--c-accent); box-shadow:0 0 0 3px rgba(33,125,71,.16); }
.siogen-comm-form .btn{ align-self:flex-start; }
.siogen-comm-error{ color:#c0362c; font-size:.9rem; margin:.2rem 0 .6rem; }

.siogen-comm-prompt{
  background:var(--c-soft); border:1px solid var(--c-line); border-radius:var(--c-radius);
  padding:16px 18px; color:var(--c-ink2); font-size:.95rem;
}
.siogen-comm-prompt a{ color:var(--c-accent); font-weight:600; }
.siogen-comm-locked{ text-align:center; }

/* Single topic */
.siogen-topic__head h1{ margin-bottom:.5rem; }
.siogen-topic__byline{ display:flex; align-items:center; gap:.5rem; color:var(--c-muted); font-size:.9rem; margin:0 0 1.4rem; }
.siogen-topic__byline img{ border-radius:50%; }
.siogen-dot{ opacity:.5; }
.siogen-topic__body{ font-size:1.06rem; line-height:1.7; color:var(--c-ink2); border-bottom:1px solid var(--c-line); padding-bottom:1.6rem; }
/* Use the full content width on forum pages (override the theme's
   narrow reading column so topics match the rest of the layout). */
.siogen-community .siogen-topic__body.entry-prose{ max-width:none; margin-left:0; margin-right:0; }

/* Replies */
.siogen-reply-list{ list-style:none; margin:1rem 0 2rem; padding:0; }
.siogen-reply-list .children{ list-style:none; margin:.8rem 0 0 clamp(16px,4vw,44px); padding:0; border-left:2px solid var(--c-line); }
.siogen-reply{ padding:14px 0; border-bottom:1px solid var(--c-line); }
.siogen-reply:last-child{ border-bottom:0; }
.siogen-reply__inner{ display:flex; gap:14px; padding-left:14px; }
.siogen-reply__avatar img{ border-radius:50%; }
.siogen-reply__body{ flex:1 1 auto; min-width:0; }
.siogen-reply__meta{ margin:0 0 .3rem; font-size:.85rem; color:var(--c-muted); }
.siogen-reply__author{ font-weight:600; color:var(--c-ink); }
.siogen-reply__date{ margin-left:.5rem; }
.siogen-reply__text{ color:var(--c-ink2); line-height:1.6; }
.siogen-reply__text p{ margin:0 0 .6rem; }
.siogen-reply .comment-reply-link{ font-size:.82rem; font-weight:600; color:var(--c-accent); text-decoration:none; }

.siogen-replybox{ margin-top:1.4rem; }
.siogen-reply-form{ max-width:none; }

/* Pagination */
.siogen-comm-pagination{ display:flex; gap:6px; flex-wrap:wrap; margin:20px 0 0; }
.siogen-comm-pagination .page-numbers{
  display:inline-flex; align-items:center; justify-content:center; min-width:38px; height:38px; padding:0 10px;
  border:1px solid var(--c-line); border-radius:10px; text-decoration:none; color:var(--c-ink2); font-size:.9rem; background:#fff;
}
.siogen-comm-pagination .page-numbers.current{ background:var(--c-accent); border-color:var(--c-accent); color:#fff; }
.siogen-comm-pagination .page-numbers:hover:not(.current){ border-color:var(--c-accent); color:var(--c-accent); }

@media (max-width:640px){
  .siogen-comm-head{ flex-direction:column; }
  .siogen-topic-count{ min-width:52px; }
}
