/* Event & issue intelligence. Uses the premium tokens (premium.css): ink actions, gold accent only,
   data colours (parties, favour/attack) kept separate from the UI accent. */
.ev { display: flex; flex-direction: column; gap: 18px; padding-bottom: 40px; }
.ev-crumb { font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.ev-crumb a { color: inherit; }
.ev-ta { font-size: .7em; font-weight: 500; color: var(--text-3); margin-left: 6px; }
.ev-head-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ev-status { font-size: 12.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; max-width: 360px; }
.ev-list-intro { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 18px; border:1px solid var(--line); border-radius:var(--r); background:var(--surface); box-shadow:var(--shadow); }
.ev-list-intro > div { display:flex; flex-direction:column; gap:3px; }
.ev-list-intro span { color:var(--text-3); font-size:12px; }
.ev-card-top { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
.ev-kind, .ev-card-state { display:inline-flex; align-items:center; min-height:22px; padding:2px 8px; border-radius:999px; font-size:10.5px; font-weight:650; }
.ev-kind { background:var(--accent-soft); color:var(--accent-ink); }
.ev-card-state { background:var(--ok-soft); color:var(--pos-ink); }
.ev-card-state.paused { background:var(--surface-3); color:var(--text-3); }
.ev-card-state:not(:first-child) { margin-left:auto; }
.ev-card-desc { color:var(--text-2); font-size:12px; line-height:1.45; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; margin:8px 0; }
@media (max-width:760px) { .ev-list-intro { align-items:flex-start; flex-direction:column; } }

.ev-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 18px 16px; box-shadow: var(--shadow); min-width: 0; }
.ev-sec-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.ev-sec-h h2 { font-size: 15px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.ev-sec-h p { margin: 2px 0 0; max-width: 72ch; }
.ev-h3 { font-size: 13px; font-weight: 600; margin: 16px 0 8px; color: var(--text-2); }
.ev-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1080px) { .ev-cols { grid-template-columns: 1fr; } }
.ev-scroll { overflow-x: auto; }

/* coverage strip */
.ev-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.ev-strip > div { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); }
.ev-strip > div:last-child { border-right: 0; }
.ev-strip span { font-size: 12px; color: var(--text-3); font-weight: 500; }
.ev-strip b { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ev-strip small { font-size: 11.5px; color: var(--text-3); }

/* candidates */
.ev-cands { display: flex; gap: 10px; flex-wrap: wrap; }
.ev-cand { flex: 1 1 160px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px 10px 14px; position: relative; display: flex; flex-direction: column; }
.ev-cand::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--c); }
.ev-cand span { font-size: 11.5px; color: var(--text-3); }
.ev-cand b { font-size: 14px; }
.ev-cand small { font-size: 12px; color: var(--text-3); }

/* party scoreboard */
.ev-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ev-bcard { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.ev-bcard.focus { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.ev-bcard-h { display: flex; align-items: center; gap: 8px; }
.ev-bnums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.ev-bnums > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ev-bnums span { font-size: 11.5px; color: var(--text-3); }
.ev-bnums b { font-size: 16px; font-variant-numeric: tabular-nums; }
.ev-bnums small { font-size: 11px; color: var(--text-3); }

.ev-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.ev-pchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; white-space: nowrap; }
.ev-party-mark { width: var(--mark); height: var(--mark); display: inline-flex; align-items: center; justify-content: center; flex: none; position: relative; }
.ev-party-mark img { width: var(--mark); height: var(--mark); object-fit: contain; border-radius: 6px; background: #fff; box-shadow: 0 0 0 1px rgba(15,23,42,.09); }
.ev-party-mark.stack { width: calc(var(--mark) * 1.5); }
.ev-party-mark.stack img { position: absolute; left: 0; width: var(--mark); height: var(--mark); }
.ev-party-mark.stack img + img { left: calc(var(--mark) * .5); }
.ev-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.ev-tag.up { background: var(--accent-soft); color: var(--accent-ink); }
.ev-tag.warn { background: var(--danger-soft); color: var(--danger); }

/* net scores: data colours, not the UI accent */
.ev-net { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 2px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--surface-3); color: var(--text-2); }
.ev-net.big { font-size: 18px; padding: 3px 10px; align-self: flex-start; }
.ev-net.pos, .ev-net.ok { background: var(--ok-soft); color: var(--pos-ink); }
.ev-net.neg { background: var(--danger-soft); color: var(--neg-ink); }
.ev-net.warn { background: var(--warn-soft); color: var(--warn); }
.ev-net.na { color: var(--text-3); font-weight: 500; }

.ev-split { display: flex; height: 6px; border-radius: 6px; overflow: hidden; background: var(--surface-3); }
.ev-split i { display: block; height: 100%; }
.ev-split .f { background: var(--pos); } .ev-split .n { background: var(--neu); } .ev-split .a { background: var(--neg); }

.ev-chart { position: relative; height: 280px; }

/* narratives */
.ev-nlist { display: flex; flex-direction: column; }
.ev-nrow { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line-2); color: inherit; text-decoration: none; }
.ev-nrow:last-child { border-bottom: 0; }
.ev-nrow:hover b { text-decoration: underline; }

/* posts and comments */
.ev-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.ev-post { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); min-width: 0; }
.ev-post-h { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ev-post-h b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-post-t { font-size: 13px; color: var(--text); line-height: 1.45; }
.ev-post-f { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 12px; }
.ev-st { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 1px 7px 1px 5px; border-radius: 999px; border: 1px solid var(--line); }
.ev-st.f { background: var(--ok-soft); border-color: transparent; }
.ev-st.a { background: var(--danger-soft); border-color: transparent; }
.ev-st.a::before { content: '−'; font-weight: 700; color: var(--neg-ink); }
.ev-st.f::before { content: '+'; font-weight: 700; color: var(--pos-ink); }
.ev-cmts { display: flex; flex-direction: column; gap: 8px; }
.ev-cmt { border-left: 2px solid var(--line); padding: 4px 0 4px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.ev-comment-workspace { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.ev-comment-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line-2); }
.ev-comment-head h2 { margin: 0; font-size: 17px; letter-spacing: -.015em; }
.ev-comment-head p { margin: 3px 0 0; color: var(--text-3); font-size: 12.5px; }
.ev-party-switch { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.ev-party-switch a { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 9px; border: 1px solid transparent; border-radius: 8px; color: var(--text-2); text-decoration: none; font-size: 12px; font-weight: 550; }
.ev-party-switch a:hover { background: var(--surface-2); }
.ev-party-switch a.active { border-color: var(--line); background: var(--surface-2); color: var(--text); box-shadow: var(--shadow); }
.ev-comment-workspace > .ev-filters { padding: 12px 20px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.ev-comment-search { display: flex; align-items: center; gap: 6px; min-width: 190px; padding-left: 9px; border: 1px solid var(--line); border-radius: var(--r-xs); color: var(--text-3); background: var(--surface); }
.ev-comment-search .input { min-width: 150px; padding-left: 0; border: 0; box-shadow: none; background: transparent; }
.ev-comment-tabs { display: flex; gap: 2px; padding: 0 20px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.ev-comment-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 12px 10px 10px; border-bottom: 2px solid transparent; color: var(--text-3); text-decoration: none; font-size: 12.5px; white-space: nowrap; }
.ev-comment-tabs a:hover { color: var(--text); }
.ev-comment-tabs a.active { color: var(--text); border-color: var(--primary); font-weight: 600; }
.ev-comment-tabs b { min-width: 22px; padding: 1px 6px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-size: 10.5px; text-align: center; }
.ev-comment-tabs a.active b { background: var(--primary); color: var(--on-primary); }
.ev-comment-note { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 11px 20px; color: var(--text-3); font-size: 11.5px; border-bottom: 1px solid var(--line-2); }
.ev-comment-note b { color: var(--text-2); }
.ev-comment-note span { display: inline-flex; align-items: center; gap: 5px; }
.ev-comment-list { padding: 12px 20px 20px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.ev-comment-list.inline { padding: 0; margin-bottom: 14px; background: none; }
.ev-comment-card { --tone: var(--neu); position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow); }
.ev-comment-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--tone); }
.ev-comment-card.tone-positive { --tone: var(--pos); }
.ev-comment-card.tone-negative { --tone: var(--neg); }
.ev-comment-card.tone-neutral { --tone: var(--neu); }
.ev-comment-card.tone-review { --tone: var(--warn); }
.ev-comment-card.is-abusive { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 26%, transparent), var(--shadow); }
.ev-comment-row { display: flex; gap: 11px; padding: 14px 16px 12px 18px; }
.ev-comment-avatar-link { flex: none; display: inline-flex; border-radius: 50%; text-decoration: none; }
.ev-comment-avatar-link:hover .av { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.ev-comment-by { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-3); font-size: 11.5px; }
.ev-comment-by b { color: var(--text); font-size: 12.5px; }
.ev-comment-by span { display: inline-flex; align-items: center; gap: 4px; }
.ev-comment-by .ev-comment-identity { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.ev-comment-identity a { color: var(--text); font-size: 12.5px; font-weight: 650; text-decoration: none; }
.ev-comment-identity a:hover { color: var(--accent-ink); text-decoration: underline; }
.ev-comment-text { margin: 6px 0 8px; color: var(--text); font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.ev-comment-labels { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.ev-sentiment, .ev-abusive { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 650; }
.ev-sentiment.positive { background: var(--ok-soft); color: var(--pos-ink); }
.ev-sentiment.negative { background: var(--danger-soft); color: var(--neg-ink); }
.ev-sentiment.neutral { background: var(--surface-3); color: var(--text-2); }
.ev-sentiment.review { background: var(--warn-soft); color: var(--warn); }
.ev-abusive { background: var(--danger-soft); color: var(--danger); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 18%, transparent); }
.ev-comment-context { margin-top: 9px; padding: 7px 9px; display: flex; align-items: center; gap: 6px; min-width: 0; border-radius: 7px; background: var(--surface-2); color: var(--text-3); font-size: 11.5px; }
.ev-comment-context b { color: var(--text-2); white-space: nowrap; }
.ev-comment-context > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-comment-actions { display: flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--text-3); }
.ev-comment-actions > span, .ev-comment-actions button, .ev-comment-actions a { display: inline-flex; align-items: center; gap: 5px; min-height: 29px; padding: 4px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text-3); font: inherit; font-size: 11.5px; text-decoration: none; cursor: pointer; }
.ev-comment-actions button:hover:not(:disabled), .ev-comment-actions a:hover { background: var(--surface-2); color: var(--text); }
.ev-comment-actions button:disabled { cursor: not-allowed; opacity: .55; }
.ev-comment-actions button:disabled:not([title^="Like is"]):not([title^="Replies are"]) { opacity: 1; color: var(--pos-ink); }
.ev-comment-reply { border-top: 1px solid var(--line-2); margin-top: 10px; padding-top: 10px; }
.ev-comment-reply p { margin: 0; padding: 8px 10px; border-radius: 7px; background: var(--surface-2); font-size: 12px; }
.ev-reply-compose { display: grid; grid-template-columns: minmax(170px, .35fr) minmax(240px, 1fr); gap: 8px; }
.ev-reply-compose textarea { grid-column: 2; resize: vertical; }
.ev-reply-compose > div { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ev-reply-compose > div span { color: var(--text-3); font-size: 10.5px; }
.ev-react { display: flex; align-items: center; gap: 16px; margin-bottom: 4px; }
.ev-react > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.ev-react small { font-size: 11.5px; color: var(--text-3); }

/* tables */
.ev-table td, .ev-table th { vertical-align: top; }
.ev-table .r { text-align: right; white-space: nowrap; }
.ev-table tr.off td { opacity: .45; }
.ev-table label { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; white-space: nowrap; }
.ev-ex { font-size: 12px; max-width: 240px; }
.ev-seg { flex-wrap: wrap; }
.ev-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.ev-filters .input { width: auto; min-width: 150px; }

/* news stories */
.ev-stories { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.ev-story { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; color: inherit; text-decoration: none; background: var(--surface); }
.ev-story:hover { border-color: var(--text-3); }

/* strategy brief */
.ev-brief { display: flex; flex-direction: column; gap: 6px; }
.ev-brief-head { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.ev-bsec { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 10px; }
.ev-bsec h3 { font-size: 14px; margin: 0 0 8px; }
.ev-bpt { padding: 8px 0 10px; border-bottom: 1px dashed var(--line-2); }
.ev-bpt:last-child { border-bottom: 0; }
.ev-bpt p { margin: 3px 0 6px; color: var(--text-2); font-size: 13px; }
.ev-msg { background: var(--accent-soft); border-radius: var(--r-xs); padding: 8px 10px; font-size: 13px; margin: 6px 0; }
.ev-msg span { font-size: 11.5px; color: var(--accent-ink); font-weight: 600; margin-right: 8px; }
.ev-cites { display: flex; flex-wrap: wrap; gap: 5px; }
.ev-cite { font-size: 11.5px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* setup */
.ev-setup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px 20px; }
.ev-setup-grid > div > span { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.ev-setup-grid .chip { margin: 0 4px 4px 0; }
.ev-source-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:10px; }
.ev-source { border:1px solid var(--border); border-radius:var(--radius-md); padding:12px; background:var(--surface); min-height:92px; }
.ev-source-icon { width:28px; height:28px; display:grid; place-items:center; border-radius:8px; background:var(--surface-2); color:var(--text-2); }
.ev-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.ev-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 14px; }
.ev-form .span2 { grid-column: 1 / -1; }

/* events list */
.ev-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ev-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; box-shadow: var(--shadow); }
.ev-card:hover { box-shadow: var(--shadow-md); }
.ev-card-h { display: flex; flex-direction: column; }
.ev-card-p { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .ev-page-head { align-items: flex-start; }
  .ev-page-head > .grow { flex: 1 0 100%; padding-right: 0; }
  .ev-page-head h1 { max-width: 20ch; line-height: 1.15; }
  .ev-page-head .ev-ta { display: block; margin: 4px 0 0; }
  .ev-head-r { width: 100%; justify-content: flex-start; }
  .ev-status { flex: 1 1 100%; }
  .ev-sec { padding: 14px; }
  .ev-sec-h { flex-direction: column; }
  .ev-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .ev-bnums b { font-size: 15px; }
  .ev-filters .input { min-width: 0; flex: 1 1 140px; }
  .ev-comment-head { flex-direction: column; padding: 15px; }
  .ev-party-switch { justify-content: flex-start; }
  .ev-comment-workspace > .ev-filters, .ev-comment-tabs, .ev-comment-note, .ev-comment-list { padding-left: 12px; padding-right: 12px; }
  .ev-comment-row { padding: 12px 12px 10px 15px; }
  .ev-reply-compose { grid-template-columns: 1fr; }
  .ev-reply-compose textarea, .ev-reply-compose > div { grid-column: 1; }
}

/* key findings, momentum, insights */
.ev-finds { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.ev-find { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13px; line-height: 1.45; }
.ev-find > .ic { flex: none; margin-top: 2px; color: var(--text-3); }
.ev-find.good > .ic { color: var(--pos-ink); } .ev-find.bad > .ic { color: var(--neg-ink); } .ev-find.warn > .ic { color: var(--warn); }
.ev-find.bad { border-left: 3px solid var(--neg); } .ev-find.good { border-left: 3px solid var(--pos); } .ev-find.warn { border-left: 3px solid var(--warn); }
.ev-mom { font-size: 11px; font-weight: 600; color: var(--text-3); white-space: nowrap; }
.ev-mom.up { color: var(--pos-ink); } .ev-mom.down { color: var(--neg-ink); }
.ev-cell b { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.ev-cell .pos { color: var(--pos-ink); } .ev-cell .neg { color: var(--neg-ink); }
.ev-chart.sm { height: 180px; }
.ev-cand-list { display: flex; flex-direction: column; gap: 10px; }
.ev-cand2 { border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: var(--r-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.ev-cand2-n { display: flex; gap: 20px; flex-wrap: wrap; }
.ev-cand2-n > div { display: flex; flex-direction: column; gap: 2px; }
.ev-cand2-n span { font-size: 11.5px; color: var(--text-3); }

/* Leader comment review uses the event cards; these are the few extras it needs. */
.ev-comment-why { margin: 4px 0 0; font-size: 12.5px; color: var(--text-3); }
.ev-comment-by a[data-author] { color: var(--text-3); font-size: 12px; }
.ev-comment-by a[data-author]:hover { color: var(--text); }
.ev-more { display: flex; justify-content: center; padding: 14px 0 4px; }
#cf-res.is-loading { opacity: .55; transition: opacity .15s; }

/* Aggregate commenter concentration (replaces the per-commenter table, I-004) */
.ev-conc { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.ev-conc > div { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.ev-conc span { font-size: 12px; color: var(--text-3); }
.ev-conc b { font-size: 18px; }
