.cforum { color:var(--ink); }
.cforum-head, .cforum-tools, .cforum-foot, .cforum-pages, .cforum-buttons { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.cforum-head, .cforum-tools, .cforum-foot { justify-content:space-between; }
.cforum-head { margin-bottom:26px; }
.cforum-head h1 { margin:0; }
.cforum-head p, .cforum-muted { color:var(--muted); margin:6px 0 0; line-height:1.6; }
.cforum-panel { background:#fff; border:1px solid var(--line); border-radius:14px; padding:24px; margin-bottom:20px; }
.cforum-panel h2,.cforum-panel h3 { margin:0; color:var(--ink); }
.cforum button,.cforum-form button { cursor:pointer; font:inherit; }
.cforum-btn { display:inline-flex; justify-content:center; align-items:center; gap:8px; min-height:42px; color:#fff; background:var(--blue); border:1px solid transparent; border-radius:10px; font-weight:650; padding:9px 16px; }
.cforum-btn:hover { background:#2f4fc2; }
.cforum-btn.secondary { background:#fff; border-color:#cdd5e2; color:#263a5e; }
.cforum-btn.secondary:hover { background:#f5f7fb; border-color:#aebbd0; }
.cforum-btn:disabled { opacity:.6; cursor:default; }
.cforum-btn .lineicon { width:17px; height:17px; }

/* Filter tabs: label plus a one-line description of what belongs there. */
.cforum-tabs { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:10px; margin-top:16px; }
.cforum-tab { display:grid; gap:3px; align-content:start; min-height:42px; padding:11px 13px; text-align:start; color:var(--ink); background:#fff; border:1px solid var(--line); border-radius:12px; }
.cforum-tab strong { font-weight:650; font-size:.95rem; }
.cforum-tab span { color:var(--muted); font-size:.82rem; line-height:1.45; }
.cforum-tab:hover { border-color:#aebbd0; }
.cforum-tab[aria-pressed="true"] { background:#f1f5ff; border-color:var(--blue); box-shadow:inset 0 0 0 1px var(--blue); }
.cforum-tab[aria-pressed="true"] strong { color:#2b49b8; }
.cforum-tabnote { display:none; color:var(--muted); font-size:.87rem; line-height:1.5; margin:10px 0 0; }

.cforum-search { display:flex; align-items:center; gap:8px; margin:16px 0; flex-wrap:wrap; }
.cforum-search input,.cforum-form input:not([type=radio]),.cforum-form textarea { box-sizing:border-box; background:#fff; color:var(--ink); font:inherit; font-weight:400; border:1px solid #cbd3df; border-radius:10px; padding:10px 12px; }
.cforum-search input { flex:1 1 150px; min-width:0; min-height:42px; }
.cforum-search input:focus-visible,.cforum-form input:focus-visible,.cforum-form textarea:focus-visible { outline:3px solid #5980ff; outline-offset:1px; }
.cforum-empty { padding:30px 12px; text-align:center; background:var(--bg); border:1px dashed #cbd5e3; border-radius:12px; }
.cforum-empty .lineicon { width:32px; height:32px; color:var(--blue); margin:0 auto 8px; display:block; }
.cforum-empty p { max-width:55ch; margin:6px auto 0; }
.cforum-empty .cforum-btn { margin-top:12px; }

.cforum-row { background:#fff; color:inherit; width:100%; text-align:start; display:flex; justify-content:space-between; align-items:center; border:0; border-top:1px solid var(--line); padding:16px 0; gap:12px; }
.cforum-row:hover .cforum-title { color:var(--blue); }
.cforum-row-main { display:grid; gap:5px; justify-items:start; min-width:0; }
.cforum-row-side { display:flex; flex-wrap:wrap; gap:6px; justify-content:flex-end; flex:0 0 auto; max-width:100%; }
.cforum-title, .cforum-author,.cforum-body { overflow-wrap:anywhere; }
.cforum-meta { color:var(--muted); font-size:.87rem; display:block; margin-top:4px; }
.cforum-row .cforum-meta { margin-top:0; }
.cforum-kind { display:inline-block; border-radius:7px; padding:2px 8px; font-size:.76rem; font-weight:650; line-height:1.6; }
.cforum-kind.question { background:#eaf0ff; color:#2b49b8; }
.cforum-kind.pitch { background:#fff1df; color:#855000; }
.cforum-kind.field { background:#e5f5ed; color:#1f6747; }
.cforum-badge, .cforum-who { display:inline-flex; align-items:center; gap:5px; background:#edf5f5; color:#1f615a; border-radius:7px; padding:4px 9px; font-size:.82rem; white-space:nowrap; }
.cforum-badge .lineicon, .cforum-who .lineicon { width:14px; height:14px; }
.cforum-badge.none { background:var(--bg); color:var(--muted); }
/* Automated replies never share the founder colours. */
.cforum-badge.bot, .cforum-who.bot { background:#efeafc; color:#553aa6; }
.cforum-who { font-weight:600; padding-block:2px; }
.cforum-who.bot { white-space:normal; }

.cforum-post { margin-bottom:22px; }
.cforum-post .cforum-title { margin-top:10px; }
.cforum-body { white-space:pre-wrap; line-height:1.75; margin:12px 0; }
.cforum-bothelp { font-size:.87rem; }
.cforum-onlybot { display:flex; align-items:flex-start; gap:8px; margin:14px 0 0; padding:10px 12px; background:var(--bg); border:1px solid var(--line); border-radius:10px; color:#3f4d66; font-size:.9rem; line-height:1.5; }
.cforum-onlybot .lineicon { width:16px; height:16px; margin-top:3px; }
.cforum-reply { border-top:1px solid var(--line); padding:18px 0; scroll-margin-block:90px; }
.cforum-reply:focus { outline:3px solid #5980ff; outline-offset:4px; border-radius:6px; }
.cforum-reply-head { display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px; }
.cforum-reply-head .cforum-meta { margin-top:0; }
.cforum-reply.bot { margin-block:14px; padding:16px; background:#f7f4fe; border:1px solid #e0d8f5; border-radius:12px; }
.cforum-reply.bot + .cforum-reply:not(.bot) { border-top:0; }
.cforum-botnote { margin:0; padding-top:10px; border-top:1px dashed #d3c8f0; color:#52467a; font-size:.84rem; line-height:1.55; }
.cforum-langtag { border:1px solid #d3c8f0; border-radius:6px; padding:0 6px; color:#553aa6; font-size:.74rem; font-weight:650; }
/* Reporting stays quieter than the post it sits on; the note replaces the control once it is used. */
.cforum-post-top { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.cforum-flag { display:inline-flex; margin-inline-start:auto; }
.cforum .cforum-report, .cforum-reported { display:inline-flex; align-items:center; gap:5px; min-height:32px; padding:4px 8px; border:1px solid transparent; border-radius:7px; color:var(--muted); font-size:.82rem; white-space:nowrap; }
.cforum .cforum-report { background:none; }
.cforum .cforum-report:hover { background:#f5f7fb; border-color:#cdd5e2; color:#263a5e; }
.cforum-report .lineicon, .cforum-reported .lineicon { width:14px; height:14px; }
.cforum-reported:focus { outline:none; }
.cforum-reported:focus-visible { outline:3px solid #5980ff; outline-offset:1px; }
.cforum-back { background:none; color:#2b49b8; border:0; padding:6px 0; margin-bottom:14px; font-weight:600; }
.cforum-back:hover { text-decoration:underline; }
.cforum-spin { width:14px; height:14px; flex:none; border:2px solid currentColor; border-inline-end-color:transparent; border-radius:50%; animation:cforum-spin .8s linear infinite; }
@keyframes cforum-spin { to { transform:rotate(360deg); } }

.cforum-hubs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:18px; }
.cforum-hub { display:flex; align-items:center; gap:12px; padding:15px; text-decoration:none; background:var(--bg); border:1px solid var(--line); border-radius:12px; color:inherit; }
.cforum-hub:hover { border-color:#809cd6; }
.cforum-monogram { display:grid; place-items:center; width:39px; height:39px; flex:0 0 39px; border-radius:10px; font-weight:800; background:#182d48; color:#fff; }
.cforum-monogram.y { background:#b84618; }

.cforum-form, .cforum-fields { display:grid; gap:16px; }
.cforum-form .cforum-muted { margin:0; font-size:.9rem; }
.cforum-field { display:grid; gap:6px; font-weight:600; color:#263953; }
.cforum-field small { font-weight:400; color:var(--muted); }
.cforum-field input,.cforum-field textarea { width:100%; }
.cforum-field textarea { resize:vertical; }
.cforum-field ::placeholder { color:#7c889b; }
.cforum-choice { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; min-width:0; margin:0; padding:0; border:0; }
.cforum-choice.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.cforum-choice legend { grid-column:1/-1; padding:0; margin-bottom:8px; font-weight:600; color:#263953; }
.cforum-option { display:flex; align-items:flex-start; gap:8px; padding:10px 11px; background:#fff; border:1px solid var(--line); border-radius:12px; cursor:pointer; }
.cforum-option input { flex:none; width:16px; height:16px; margin:3px 0 0; accent-color:var(--blue); }
.cforum-option span { display:grid; gap:2px; min-width:0; }
.cforum-option strong { font-weight:650; font-size:.93rem; }
.cforum-option small { color:var(--muted); font-size:.8rem; line-height:1.45; }
.cforum-option:hover { border-color:#aebbd0; }
.cforum-option:has(input:checked) { background:#f1f5ff; border-color:var(--blue); }
.cforum-option:has(input:focus-visible) { outline:3px solid #5980ff; outline-offset:2px; }
.cforum-status { color:#2f527a; min-height:0; margin:0; font-size:.9rem; line-height:1.5; }
.cforum-status:empty { display:none; }
.cforum-panel .cforum-status { margin-top:8px; }
.cforum-foot,.cforum-pages { margin-top:12px; }

@media(max-width:650px){
  .cforum-hubs,.cforum-choice,.cforum-choice.two { grid-template-columns:1fr; }
  .cforum-panel { padding:17px; }
  .cforum-head { align-items:flex-start; }
  .cforum-row { align-items:flex-start; flex-wrap:wrap; }
  .cforum-row-main { flex:1 1 100%; }
  .cforum-row-side { justify-content:flex-start; }
  /* Narrow screens: compact tabs, with the active tab's description underneath. */
  .cforum-tabs { display:flex; flex-wrap:wrap; gap:8px; }
  .cforum-tab { padding:9px 13px; align-content:center; }
  .cforum-tab span { display:none; }
  .cforum-tabnote { display:block; }
  .cforum-buttons .cforum-btn { flex:1 1 auto; }
}
@media(prefers-reduced-motion:reduce){ .cforum-spin { animation:none; border-inline-end-color:currentColor; opacity:.5; } }

/* A reply from the team, written in the owner's room. */
.cforum-who.staff { background:#171e45; color:#fff; }
.cforum-reply.staff { margin-block:14px; padding:16px; background:#f3f6ff; border:1px solid #cfd9fb; border-radius:12px; }
.cforum-reply.staff + .cforum-reply:not(.bot):not(.staff), .cforum-reply.bot + .cforum-reply.staff { border-top:0; }
