/* ─────────────── the commons — community board ───────────────
   Inherits base.html's brutalist black-on-white system; this file
   only adds what the board and the mention layer need. */

/* entity mention chips (rendered server-side from [[...]]) */
a.ment {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 0.88em;
    text-decoration: none;
    border: 1px solid #000;
    padding: 0 5px;
    background: #fff;
    white-space: nowrap;
    line-height: 1.6;
}
a.ment::before { content: "◆ "; font-size: 0.8em; }
a.ment:hover { background: #fffacd; }

/* witness identity bar */
.witness-bar { margin: 14px 0 8px; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.witness-now { display: inline-block; border: 1px solid #000; padding: 4px 9px; background: #fff; }
.witness-form { display: inline-flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.witness-form input[type=text], .witness-form input[type=password] {
    padding: 6px 8px; border: 1px solid #000; background: #fff;
    font-family: ui-monospace, Menlo, monospace; font-size: 12.5px;
}
.witness-form button {
    background: #000; color: #fff; border: 0; padding: 6px 12px; cursor: pointer;
    font-family: ui-monospace, Menlo, monospace; font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.4px;
}
.witness-form button:hover { background: #fffacd; color: #000; outline: 2px solid #000; }
.witness-link { display: inline; background: none !important; color: #000 !important;
                border: 0; text-decoration: underline; padding: 0 0 0 6px; cursor: pointer;
                text-transform: none; letter-spacing: 0; font-weight: 400; }
.witness-claim summary { cursor: pointer; border: 1px dashed #000; padding: 4px 9px; display: inline-block; }
.witness-claim summary:hover { background: #fffacd; }
.witness-claim[open] summary { margin-bottom: 10px; }
.witness-hint { font-size: 11.5px; color: #555; max-width: 540px; margin-top: 8px; line-height: 1.5; }
.witness-error { font-size: 12px; color: #b00; margin-top: 6px; }

/* compose box + mention autocomplete */
.signal-compose { position: relative; }
.mention-pop {
    position: absolute; z-index: 50; background: #fff; border: 2px solid #000;
    max-height: 260px; overflow-y: auto; width: min(420px, 90vw);
    box-shadow: 4px 4px 0 #000;
}
.mention-opt { display: block; width: 100%; text-align: left; background: #fff; border: 0;
    border-bottom: 1px solid #000; padding: 7px 10px; cursor: pointer; font: inherit; }
.mention-opt:last-child { border-bottom: 0; }
.mention-opt.active, .mention-opt:hover { background: #fffacd; }
.mention-opt .mo-label { font-weight: 700; font-size: 14px; }
.mention-opt .mo-cat { font-family: ui-monospace, Menlo, monospace; font-size: 10px;
    text-transform: uppercase; letter-spacing: 0.4px; color: #555; margin-left: 6px; }
.mention-opt .mo-one { display: block; font-size: 12px; color: #444; line-height: 1.4; margin-top: 2px; }

/* auto-detect suggestion tray */
.detect-tray { margin-top: 10px; }
.detect-tray.show { display: block !important; }
.detect-label { font-family: ui-monospace, Menlo, monospace; font-size: 11px;
    text-transform: uppercase; letter-spacing: 0.5px; color: #555; margin-bottom: 6px; }
.detect-chip {
    display: inline-block; margin: 0 6px 6px 0; padding: 3px 8px; border: 1px solid #000;
    background: #fff; cursor: pointer; font-family: ui-monospace, Menlo, monospace; font-size: 12px;
    /* Override form.submit button's uppercase + heavy weight — these are names. */
    text-transform: none; letter-spacing: 0; font-weight: 400; color: #000;
}
.detect-chip:hover { background: #fffacd; }
.detect-chip::before { content: "+ "; font-weight: 700; }

/* thread list */
.signal-list { list-style: none; padding: 0; }
.signal-row { padding: 12px 0; border-bottom: 1px solid #000; }
.signal-row:first-child { border-top: 2px solid #000; }
.signal-title { display: block; font-family: ui-monospace, Menlo, monospace;
    font-size: 16px; font-weight: 700; color: #000; text-decoration: none; }
.signal-title:hover { background: #fffacd; }
.signal-meta { font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: #555; margin-top: 4px; }

/* thread view */
.signal-op { margin-bottom: 8px; }
.signal-body { font-size: 16px; line-height: 1.6; margin-top: 10px; }
.signal-body p { margin-bottom: 12px; }
.reply-list { margin-bottom: 24px; }
.reply { padding: 14px 0; border-top: 1px solid #000; }
.reply:first-child { border-top: 2px solid #000; }

/* commons backlink panel (shown on entity pages) */
.commons-backlinks { margin-top: 8px; }
.commons-backlinks .cb-row { padding: 8px 0; border-bottom: 1px solid #000; }
.commons-backlinks .cb-row:first-child { border-top: 1px solid #000; }
.commons-backlinks a { font-weight: 700; }
.commons-backlinks .cb-meta { font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: #555; }
