/* ============================================================
   Board Portal — the drafting bench.

   The visual job of this stylesheet is to make a machine-drafted,
   unreviewed piece of text look nothing like a board question. A
   pending draft is dashed, tinted and labelled; an approved one
   settles into the ordinary surface treatment used everywhere else.
   That difference is load-bearing, not decoration: the failure it
   prevents is a screenshot of this page being read as the record.
============================================================ */

.bp-scope .brd-ai-head{margin-bottom:18px}
.bp-scope .brd-ai-headtop{
  display:flex;align-items:flex-start;justify-content:space-between;gap:20px;flex-wrap:wrap}
.bp-scope .brd-ai-head h1{font-size:22px;font-weight:700;color:var(--navy);margin:0 0 6px}
.bp-scope .brd-ai-sub{
  font-size:12.5px;line-height:1.6;color:var(--muted);margin:0;max-width:76ch}
.bp-scope .brd-ai-picker{
  font:inherit;font-size:12px;color:var(--ink);background:var(--surface);
  border:1px solid var(--line);border-radius:7px;padding:7px 10px;max-width:280px}
.bp-scope .brd-ai-meta{display:flex;align-items:center;gap:10px;margin-top:12px;flex-wrap:wrap}
.bp-scope .brd-ai-cycle{
  font-size:11px;font-weight:700;color:var(--navy);background:#eef2f7;
  border-radius:999px;padding:3px 10px}
/* The model is named, not hidden. An analyst approving text on a board's
   behalf should be able to see what wrote it without hunting. */
.bp-scope .brd-ai-model{
  font-size:11px;font-weight:600;color:#5a6a80;border:1px solid var(--line);
  border-radius:999px;padding:3px 10px}
.bp-scope .brd-ai-off{
  font-size:11px;font-weight:700;color:#8a6a2f;background:#fdf6e6;
  border-radius:999px;padding:3px 10px}

.bp-scope .brd-ai-notices{
  list-style:none;margin:0 0 18px;padding:12px 16px;
  background:#f7f9fc;border:1px solid var(--line);border-left:3px solid #93b9e2;
  border-radius:var(--r)}
.bp-scope .brd-ai-notices li{
  font-size:12.5px;line-height:1.6;color:var(--muted);margin:0}
.bp-scope .brd-ai-notices li + li{margin-top:7px}

/* ── Counts ───────────────────────────────────────────────────────────── */

.bp-scope .brd-ai-cards{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;
  margin-bottom:18px}
.bp-scope .brd-ai-card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:14px 16px;box-shadow:var(--shadow)}
.bp-scope .brd-ai-card.attn{border-color:#bcd4ee;background:#f7fbff}
.bp-scope .brd-ai-card.bad{border-color:#e8b9b6;background:#fdf5f4}
.bp-scope .brd-ai-cardn{
  display:block;font-size:24px;font-weight:700;color:var(--navy);line-height:1.1}
.bp-scope .brd-ai-card.bad .brd-ai-cardn{color:#a0342f}
.bp-scope .brd-ai-cardl{
  display:block;font-size:11px;font-weight:600;color:var(--muted);margin-top:5px;
  line-height:1.4}

/* ── Generate ─────────────────────────────────────────────────────────── */

.bp-scope .brd-ai-gen{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:16px 18px;margin-bottom:20px;box-shadow:var(--shadow)}
.bp-scope .brd-ai-genrow{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.bp-scope .brd-ai-genrow select{
  font:inherit;font-size:12px;color:var(--ink);background:var(--surface);
  border:1px solid var(--line);border-radius:7px;padding:8px 10px;min-width:190px}
.bp-scope .brd-ai-genhint{
  font-size:11.5px;line-height:1.6;color:var(--faint);margin:11px 0 0;max-width:88ch}
.bp-scope .brd-ai-genhint b{color:var(--muted)}
.bp-scope .brd-ai-runnote,.bp-scope .brd-ai-runerr{
  font-size:12.5px;line-height:1.6;margin:12px 0 0;padding:11px 14px;border-radius:8px}
.bp-scope .brd-ai-runnote{color:var(--muted);background:#f7f9fc;border:1px solid var(--line)}
.bp-scope .brd-ai-runerr{color:#a0342f;background:#fdf5f4;border:1px solid #e8b9b6}

/* ── Filters ──────────────────────────────────────────────────────────── */

.bp-scope .brd-ai-filters{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.bp-scope .brd-ai-filter{
  font:inherit;font-size:11.5px;font-weight:600;color:var(--muted);background:transparent;
  border:1px solid var(--line);border-radius:999px;padding:6px 13px;cursor:pointer;
  display:inline-flex;align-items:center;gap:7px}
.bp-scope .brd-ai-filter:hover{border-color:#c9d3e0;color:var(--ink)}
.bp-scope .brd-ai-filter.on{
  color:#fff;background:var(--navy);border-color:var(--navy)}
.bp-scope .brd-ai-fn{
  font-size:10px;font-weight:700;background:rgba(0,0,0,.07);border-radius:999px;padding:1px 6px}
.bp-scope .brd-ai-filter.on .brd-ai-fn{background:rgba(255,255,255,.22)}

/* ── Drafts ───────────────────────────────────────────────────────────── */

.bp-scope .brd-ai-drafts{list-style:none;margin:0;padding:0}
.bp-scope .brd-ai-draft{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:17px 19px;margin-bottom:13px;box-shadow:var(--shadow)}
/* A pending draft is deliberately provisional-looking. Dashed border, tinted
   ground: this is the only state in the whole portal that renders text nobody
   has agreed to, and it should never be mistaken for the record. */
.bp-scope .brd-ai-draft.st-pending{
  border-style:dashed;border-color:#cfd7e3;background:#fcfdff}
.bp-scope .brd-ai-draft.st-rejected{opacity:.62}

.bp-scope .brd-ai-dtop{
  display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-bottom:9px}
.bp-scope .brd-ai-dstate{
  font-size:10px;font-weight:700;letter-spacing:.02em;border-radius:999px;padding:2px 9px;
  background:#eef2f7;color:#5a6a80}
.bp-scope .brd-ai-dstate.pending{background:#f0f3f8;color:#5a6a80;border:1px dashed #cfd7e3}
.bp-scope .brd-ai-dstate.approved,.bp-scope .brd-ai-dstate.edited{background:#eaf3ea;color:#3d6b45}
.bp-scope .brd-ai-dstate.rejected{background:#f4f0f0;color:#8a5f5c}
.bp-scope .brd-ai-dtick{font-size:11px;font-weight:700;color:var(--navy)}
.bp-scope .brd-ai-dmod,.bp-scope .brd-ai-dkind{font-size:11px;color:var(--faint)}
.bp-scope .brd-ai-dpri{
  font-size:10px;font-weight:700;border-radius:999px;padding:1px 8px;
  background:#eef2f7;color:#5a6a80}
.bp-scope .brd-ai-dpri.high{background:#fdeeee;color:#a0342f}
.bp-scope .brd-ai-dpri.med{background:#fdf6e6;color:#8a6a2f}

.bp-scope .brd-ai-dtitle{
  font-size:14.5px;font-weight:700;color:var(--navy);margin:0 0 7px;line-height:1.45}
.bp-scope .brd-ai-dbody{
  font-size:14px;line-height:1.65;color:var(--ink);margin:0;max-width:84ch;
  white-space:pre-wrap}
/* What the model wrote, kept next to what the analyst approved. The question
   an examiner asks is exactly the difference between the two. */
.bp-scope .brd-ai-orig{margin-top:10px;font-size:12px}
.bp-scope .brd-ai-orig summary{color:var(--faint);cursor:pointer}
.bp-scope .brd-ai-orig p{
  font-size:12.5px;line-height:1.6;color:var(--muted);margin:8px 0 0;
  padding-left:12px;border-left:2px solid var(--line);white-space:pre-wrap}

.bp-scope .brd-ai-warn{
  font-size:12.5px;line-height:1.6;color:#a0342f;background:#fdf5f4;
  border:1px solid #e8b9b6;border-radius:8px;padding:11px 14px;margin:12px 0 0}
.bp-scope .brd-ai-warn b{display:block;margin-bottom:3px}

/* ── Citations ────────────────────────────────────────────────────────── */

/* Above the buttons and open by default. A reviewer who has to click to see
   the evidence will approve without reading it. */
.bp-scope .brd-ai-cites{margin-top:13px}
.bp-scope .brd-ai-citetoggle{
  font:inherit;font-size:11.5px;font-weight:700;color:var(--navy);background:transparent;
  border:0;padding:0;cursor:pointer}
.bp-scope .brd-ai-citelist{list-style:none;margin:10px 0 0;padding:0}
.bp-scope .brd-ai-cite{
  border-left:2px solid #dde4ec;padding:9px 0 9px 13px;margin-bottom:9px}
.bp-scope .brd-ai-cite.unverified{border-left-color:#d98680;background:#fdf7f6}
.bp-scope .brd-ai-citetop{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.bp-scope .brd-ai-citelabel{font-size:12px;font-weight:600;color:var(--ink)}
.bp-scope .brd-ai-citetype{font-size:10.5px;color:var(--faint)}
.bp-scope .brd-ai-citebad{
  font-size:10px;font-weight:700;color:#a0342f;background:#fdeeee;
  border-radius:999px;padding:1px 8px}
.bp-scope .brd-ai-quote{
  font-size:12.5px;line-height:1.6;color:var(--muted);margin:7px 0 0;padding:0;
  font-style:italic;max-width:84ch}
.bp-scope .brd-ai-citedoc{
  font:inherit;font-size:10.5px;font-weight:600;color:var(--muted);background:transparent;
  border:1px solid var(--line);border-radius:6px;padding:3px 9px;margin-top:7px;cursor:pointer}
.bp-scope .brd-ai-citedoc:hover{border-color:#c9d3e0;color:var(--ink)}
.bp-scope .brd-ai-nocite{
  font-size:12.5px;line-height:1.6;color:#a0342f;background:#fdf5f4;
  border:1px solid #e8b9b6;border-radius:8px;padding:11px 14px;margin-top:13px}

/* ── Actions ──────────────────────────────────────────────────────────── */

.bp-scope .brd-ai-act{display:flex;gap:8px;margin-top:14px;align-items:center;flex-wrap:wrap}
.bp-scope .brd-ai-act button,.bp-scope .brd-ai-editact button{
  font:inherit;font-size:11.5px;font-weight:600;color:var(--muted);background:transparent;
  border:1px solid var(--line);border-radius:7px;padding:7px 13px;cursor:pointer}
.bp-scope .brd-ai-act button:hover,.bp-scope .brd-ai-editact button:hover{
  border-color:#c9d3e0;background:#f8fafc;color:var(--ink)}
.bp-scope .brd-ai-primary{
  color:#fff !important;background:var(--navy) !important;border-color:var(--navy) !important}
.bp-scope .brd-ai-primary:hover{background:#123055 !important}
.bp-scope .brd-ai-act button[disabled],.bp-scope .brd-ai-editact button[disabled]{
  opacity:.55;cursor:default}
.bp-scope .brd-ai-reject:hover{border-color:#e0b5b1 !important;color:#a0342f !important}
.bp-scope .brd-ai-done{font-size:11.5px;font-weight:600;color:#3d6b45}
.bp-scope .brd-ai-rejected{font-size:11.5px;color:var(--faint)}
.bp-scope .brd-ai-note{
  font-size:12px;line-height:1.6;color:var(--muted);margin:11px 0 0}

.bp-scope .brd-ai-editbox{margin-top:13px}
.bp-scope .brd-ai-editbox textarea{
  font:inherit;font-size:13.5px;line-height:1.6;color:var(--ink);width:100%;
  border:1px solid var(--line);border-radius:8px;padding:11px 13px;resize:vertical}
.bp-scope .brd-ai-editact{display:flex;gap:8px;margin-top:9px}

.bp-scope .brd-ai-empty{
  font-size:12.5px;line-height:1.6;color:var(--faint);margin:0;padding:22px;
  text-align:center;background:#fafbfd;border:1px dashed var(--line);border-radius:var(--r)}

@media (max-width:720px){
  .bp-scope .brd-ai-genrow select{min-width:0;flex:1 1 100%}
  .bp-scope .brd-ai-cards{grid-template-columns:repeat(2,1fr)}
}
