/* Posts page: "Matched with keywords" tab (alert-style cards) */
.bkw-tabs { display: flex; gap: 8px; margin: 0 0 12px; flex-wrap: wrap; }
.bkw-tab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px;
  border-radius: 10px; border: 1px solid #E2E8F0; background: #FFFFFF; color: #475569;
  font-size: 14px; font-weight: 500; cursor: pointer;
}
.bkw-tab:hover { border-color: #CBD5E1; }
.bkw-tab.active { border-color: #2563EB; color: #0F172A; box-shadow: 0 0 0 1px #2563EB inset; }
.bkw-tab:focus-visible { outline: 2px solid #2563EB; outline-offset: 2px; }
.bkw-count { min-width: 22px; padding: 1px 8px; border-radius: 999px; background: #F1F5F9; color: #64748B; font-size: 12px; font-weight: 600; text-align: center; }
.bkw-count.has { background: #FEE2E2; color: #B91C1C; }

.bkw-view { margin-bottom: 24px; }
.bkw-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 12px; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 12px; margin-bottom: 10px; }
.bkw-input { flex: 1 1 220px; min-width: 0; height: 36px; padding: 0 12px; border: 1px solid #CBD5E1; border-radius: 8px; font-size: 14px; background: #fff; color: #0F172A; }
.bkw-input:focus { outline: 2px solid #2563EB; outline-offset: 1px; }
.bkw-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bkw-lbl { font-size: 12px; color: #64748B; margin-right: 2px; }
.bkw-pill { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid #E2E8F0; background: #F8FAFC; color: #475569; font-size: 12px; cursor: pointer; }
.bkw-pill.on { background: #0F172A; border-color: #0F172A; color: #fff; }
.bkw-pill:focus-visible, .bkw-btn:focus-visible { outline: 2px solid #2563EB; outline-offset: 2px; }
.bkw-summary { font-size: 12px; color: #64748B; margin: 0 2px 8px; min-height: 16px; }

.bkw-card { background: #FFFFFF; border: 1px solid #E2E8F0; border-left: 4px solid #F59E0B; border-radius: 0 12px 12px 0; padding: 12px 14px; margin-bottom: 10px; }
.bkw-card.bkw-sev-critical { border-left-color: #DC2626; }
.bkw-card.bkw-sev-routine { border-left-color: #94A3B8; }
.bkw-row { display: flex; align-items: center; gap: 10px; }
.bkw-av { width: 32px; height: 32px; border-radius: 50%; background: #DBEAFE; color: #1D4ED8; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.bkw-who { min-width: 0; flex: 1 1 auto; font-size: 14px; color: #0F172A; overflow-wrap: anywhere; }
.bkw-badge { font-size: 10px; padding: 1px 6px; border-radius: 4px; background: #F1F5F9; color: #475569; text-transform: uppercase; letter-spacing: .03em; }
.bkw-muted { font-size: 12px; color: #64748B; }
.bkw-sev { font-size: 11px; padding: 2px 10px; border-radius: 999px; background: #FEF3C7; color: #92400E; text-transform: capitalize; flex: none; }
.bkw-sev-critical .bkw-sev { background: #FEE2E2; color: #991B1B; }
.bkw-sev-routine .bkw-sev { background: #F1F5F9; color: #475569; }
.bkw-text { margin: 8px 0; font-size: 14px; line-height: 1.55; color: #1E293B; overflow-wrap: anywhere; white-space: pre-wrap; }
.bkw-text mark { background: #FEF08A; color: #713F12; padding: 0 3px; border-radius: 3px; }
.bkw-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-bottom: 8px; }
.bkw-status { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #F1F5F9; color: #475569; text-transform: capitalize; }
.bkw-status.s-unreviewed { background: #FEE2E2; color: #991B1B; }
.bkw-status.s-acknowledged { background: #DBEAFE; color: #1E40AF; }
.bkw-status.s-escalated { background: #FEF3C7; color: #92400E; }
.bkw-status.s-resolved { background: #DCFCE7; color: #166534; }
.bkw-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.bkw-btn { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid #CBD5E1; background: #fff; color: #0F172A; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; }
.bkw-btn:hover:not(:disabled) { background: #F8FAFC; }
.bkw-btn:disabled { opacity: .55; cursor: default; }
.bkw-link { color: #1D4ED8; }
.bkw-more { text-align: center; padding: 8px 0 4px; }
.bkw-state { padding: 28px 16px; text-align: center; color: #64748B; background: #fff; border: 1px dashed #CBD5E1; border-radius: 12px; font-size: 13px; line-height: 1.6; }
.bkw-state.bkw-err { color: #B91C1C; border-color: #FECACA; }
.bkw-note { margin: 12px 2px 0; font-size: 12px; color: #64748B; line-height: 1.5; }

@media (max-width: 600px) {
  .bkw-tabs { gap: 6px; }
  .bkw-tab { flex: 1 1 100%; justify-content: space-between; min-height: 44px; }
  .bkw-tools { padding: 10px; }
  .bkw-btn { height: 40px; flex: 1 1 calc(50% - 6px); justify-content: center; }
  .bkw-pill { height: 36px; }
}

body:not(.light-theme) .bkw-tab, body:not(.light-theme) .bkw-tools, body:not(.light-theme) .bkw-card, body:not(.light-theme) .bkw-state { background: #1E293B; border-color: #334155; }
body:not(.light-theme) .bkw-tab, body:not(.light-theme) .bkw-text, body:not(.light-theme) .bkw-who { color: #E2E8F0; }
body:not(.light-theme) .bkw-tab.active { color: #fff; }
body:not(.light-theme) .bkw-input, body:not(.light-theme) .bkw-btn { background: #0F172A; border-color: #334155; color: #E2E8F0; }
body:not(.light-theme) .bkw-pill { background: #0F172A; border-color: #334155; color: #CBD5E1; }
body:not(.light-theme) .bkw-pill.on { background: #E2E8F0; color: #0F172A; border-color: #E2E8F0; }

/* "Monitored only" on/off switch (Posts header) */
.bsw { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid #E2E8F0; border-radius: 10px; background: #fff; cursor: pointer; font-size: 13px; font-weight: 500; color: #475569; user-select: none; }
.bsw.on { border-color: #2563EB; color: #0F172A; }
.bsw-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bsw-track { width: 34px; height: 20px; border-radius: 999px; background: #CBD5E1; position: relative; transition: background .15s; flex: none; }
.bsw-knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.bsw-input:checked + .bsw-track { background: #2563EB; }
.bsw-input:checked + .bsw-track .bsw-knob { transform: translateX(14px); }
.bsw-input:focus-visible + .bsw-track { outline: 2px solid #2563EB; outline-offset: 2px; }
body:not(.light-theme) .bsw { background: #1E293B; border-color: #334155; color: #CBD5E1; }
body:not(.light-theme) .bsw.on { color: #fff; }
@media (max-width: 600px) {
  .board-top-header { flex-direction: column; align-items: stretch; gap: 10px; }
  .board-top-actions { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
  .bsw { min-height: 44px; flex: 1 1 100%; }
  .board-top-actions .board-btn-filter-toggle, .board-top-actions .board-btn-add-person { flex: 1 1 calc(50% - 4px); justify-content: center; min-height: 44px; }
}

/* Where a post's author stands: on our system / extra name / external */
.board-src-tag { font-size: 10px; padding: 1px 7px; border-radius: 999px; margin-left: 6px; font-weight: 600; white-space: nowrap; vertical-align: 1px; }
.board-src-tag.monitored { background: #DCFCE7; color: #166534; }
.board-src-tag.extra { background: #FEF3C7; color: #92400E; }
.board-src-tag.external { background: #F1F5F9; color: #475569; border: 1px solid #CBD5E1; }
body:not(.light-theme) .board-src-tag.monitored { background: #14532D; color: #BBF7D0; }
body:not(.light-theme) .board-src-tag.extra { background: #78350F; color: #FDE68A; }
body:not(.light-theme) .board-src-tag.external { background: #1E293B; color: #CBD5E1; border-color: #475569; }

.board-post-handle-link { text-decoration: none; color: inherit; }
.board-post-handle-link:hover, .board-post-handle-link:focus-visible { text-decoration: underline; color: #2563EB; outline: none; }
