:root {
  --sp2: #0f6e6a; --sp1: #8cc7c2; --s00: #d9d6cc; --sn1: #d9a7c7; --sn2: #8a3b72;
  --bg: #f6f5f1; --panel: #ffffff; --ink: #1d2125; --muted: #5d6670; --line: #dedbd2; --soft: #efede6;
  --accent: #0f6e6a; --accent-ink: #ffffff; --link: #0b5c8a;
  --s-confirmed: #1d6b3a; --s-strong: #2f8a4f; --s-limited: #9a6a00; --s-tentative: #b5521b; --s-disputed: #b3261e;
  --s-unverified: #7a7f86; --s-pending: #6b4fa0; --s-attr: #2b5aa8;
  --f-documented: #1d6b3a; --f-reported: #2b5aa8; --f-algorithmic: #9a6a00;
  --mono: "IBM Plex Mono", ui-monospace, monospace; --sans: "IBM Plex Sans", system-ui, sans-serif; --serif: "IBM Plex Serif", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15181b; --panel: #1d2125; --ink: #e8e6e1; --muted: #a2a9b1; --line: #343a40; --soft: #23282d;
    --accent: #3fb3ac; --accent-ink: #0d1113; --link: #7cc0f0;
    --s-confirmed: #5cc483; --s-strong: #7fd39b; --s-limited: #e1b64a; --s-tentative: #f08a4b; --s-disputed: #ff7b72;
    --s-unverified: #9aa1a9; --s-pending: #b59cf0; --s-attr: #86a9ec;
    --f-documented: #5cc483; --f-reported: #86a9ec; --f-algorithmic: #e1b64a; color-scheme: dark;
    --sp2: #3fb3ac; --sp1: #23615d; --s00: #3a3f45; --sn1: #6b3d5c; --sn2: #c46aa6;
  }
}
:root[data-theme="dark"] {
  --bg: #15181b; --panel: #1d2125; --ink: #e8e6e1; --muted: #a2a9b1; --line: #343a40; --soft: #23282d;
  --accent: #3fb3ac; --accent-ink: #0d1113; --link: #7cc0f0;
  --s-confirmed: #5cc483; --s-strong: #7fd39b; --s-limited: #e1b64a; --s-tentative: #f08a4b; --s-disputed: #ff7b72;
  --s-unverified: #9aa1a9; --s-pending: #b59cf0; --s-attr: #86a9ec;
  --f-documented: #5cc483; --f-reported: #86a9ec; --f-algorithmic: #e1b64a; color-scheme: dark;
    --sp2: #3fb3ac; --sp1: #23615d; --s00: #3a3f45; --sn1: #6b3d5c; --sn2: #c46aa6;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--sans); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0 0 .4em; }
h1 { font-size: 26px; } h2 { font-size: 18px; } h3 { font-size: 15px; font-family: var(--sans); }
.top { display: flex; gap: 16px; align-items: center; padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--ink); letter-spacing: .04em; }
.brand span { display: block; font: 11px var(--sans); color: var(--muted); letter-spacing: 0; }
.search { flex: 1; min-width: 220px; position: relative; }
.search input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); font: inherit; }
.suggest { position: absolute; left: 0; right: 0; top: 42px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.12); max-height: 60vh; overflow: auto; }
.suggest a { display: block; padding: 8px 12px; color: var(--ink); border-bottom: 1px solid var(--soft); }
.suggest a small { color: var(--muted); display: block; }
nav { display: flex; gap: 14px; flex-wrap: wrap; }
nav a { color: var(--muted); font-weight: 500; }
nav a.active { color: var(--accent); }
nav b { background: var(--s-pending); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; }
.timebar { display: flex; gap: 14px; align-items: center; padding: 6px 20px; background: var(--soft); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.timebar input { font: 12px var(--mono); padding: 2px 4px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: var(--ink); }
main { padding: 20px; max-width: 1280px; margin: 0 auto; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
.card { min-width: 0; overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.card + .card { margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12px; }
.pill { display: inline-block; font-size: 11px; line-height: 1.6; padding: 0 7px; border-radius: 10px; border: 1px solid currentColor; white-space: nowrap; vertical-align: 1px; cursor: pointer; }
.st-confirmed_direct { color: var(--s-confirmed); } .st-strongly_corroborated, .st-established { color: var(--s-strong); }
.st-limited_support { color: var(--s-limited); } .st-tentative { color: var(--s-tentative); } .st-disputed { color: var(--s-disputed); }
.st-unverified, .st-meta, .st-see { color: var(--s-unverified); } .st-pending_review { color: var(--s-pending); border-style: dashed; }
.st-attr { color: var(--s-attr); }
.kind { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 6px; }
.tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 4px; background: var(--soft); color: var(--muted); margin-right: 4px; }
.f-documented { color: var(--f-documented); } .f-reported { color: var(--f-reported); } .f-algorithmic { color: var(--f-algorithmic); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--soft); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
details.sec { border-top: 1px solid var(--line); padding: 8px 0; }
details.sec > summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary::after { content: "+"; color: var(--muted); }
details.sec[open] > summary::after { content: "−"; }
.items { margin: 6px 0 0; padding: 0; list-style: none; }
.items li { padding: 4px 0; display: flex; gap: 8px; align-items: baseline; }
.items li > span.t { flex: 1; }
.exec { font-size: 15px; line-height: 1.6; }
.exec li { padding: 3px 0; }
button, .btn { font: 500 13px var(--sans); padding: 6px 12px; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; }
button.ghost { background: transparent; color: var(--accent); }
button.warn { background: transparent; border-color: var(--s-disputed); color: var(--s-disputed); }
button:disabled { opacity: .5; cursor: not-allowed; }
input[type=text], textarea, select { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); }
textarea { width: 100%; min-height: 90px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(560px, 100vw); background: var(--panel); border-left: 1px solid var(--line); box-shadow: -10px 0 30px rgba(0,0,0,.15); overflow: auto; padding: 18px; z-index: 50; }
.drawer .close { position: absolute; right: 12px; top: 8px; background: transparent; color: var(--muted); border: 0; font-size: 22px; }
#cy { position: relative; overflow: hidden; height: 760px; flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
#cyEgo { position: relative; overflow: hidden; height: 320px; border: 1px solid var(--line); border-radius: 8px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 8px 0; }
.legend i { display: inline-block; width: 22px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: 4px; }
.scale { position: relative; height: 40px; border-top: 2px solid var(--line); margin: 24px 10px 6px; }
.scale .tick { position: absolute; top: 4px; transform: translateX(-50%); font-size: 11px; color: var(--muted); width: 120px; text-align: center; }
.issue-row { display: grid; grid-template-columns: 200px 1fr 110px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--soft); }
.track { position: relative; height: 22px; background: linear-gradient(90deg, var(--soft), var(--soft)); border-radius: 4px; }
.dot { position: absolute; top: 4px; width: 14px; height: 14px; border-radius: 50%; transform: translateX(-50%); border: 2px solid var(--panel); }
.dot.hist { opacity: .35; width: 10px; height: 10px; top: 6px; }
.dot.pending { background: transparent !important; border: 2px dashed var(--s-pending); }
.bars { display: flex; flex-direction: column; gap: 3px; }
.bar { position: relative; height: 18px; background: var(--soft); border-radius: 3px; }
.bar > span { position: absolute; top: 0; bottom: 0; background: var(--accent); opacity: .75; border-radius: 3px; }
.bar > em { position: absolute; left: 6px; top: 0; font-size: 11px; font-style: normal; line-height: 18px; color: var(--ink); white-space: nowrap; }
.career { position: relative; }
.career .lane { position: relative; height: 20px; margin: 2px 0; }
.career .seg { position: absolute; top: 2px; height: 16px; border-radius: 3px; background: var(--accent); opacity: .8; font-size: 10px; color: var(--accent-ink); padding: 0 4px; overflow: hidden; white-space: nowrap; }
.career .seg.open { border-right: 3px dotted var(--accent-ink); }
.career .seg.unknown { background: repeating-linear-gradient(45deg, var(--muted), var(--muted) 3px, transparent 3px, transparent 6px); color: var(--ink); }
.career .axis { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 4px; }
.quote { font-family: var(--serif); font-size: 15px; }
.quote + .tr { font-size: 12px; color: var(--muted); }
.kpi { display: flex; gap: 18px; flex-wrap: wrap; }
.kpi div { min-width: 110px; } .kpi b { display: block; font: 600 22px var(--serif); }
.flash { padding: 8px 12px; border-radius: 6px; background: var(--soft); border-left: 3px solid var(--accent); margin: 8px 0; }
.slider { display: grid; grid-template-columns: 220px 1fr 50px; gap: 8px; align-items: center; font-size: 12px; }
.empty { color: var(--muted); font-style: italic; }

body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--panel); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 600px) { .issue-row { grid-template-columns: 1fr; } .slider { grid-template-columns: 1fr; } main { padding: 12px; } }

.matrix { overflow-x: auto; margin-top: 12px; }
.matrix table { border-collapse: separate; border-spacing: 3px; font-size: 12px; }
.matrix th.ph { vertical-align: bottom; min-width: 110px; max-width: 150px; font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 11px; }
.matrix th.ph a { color: var(--ink); display: block; }
.matrix th.ph span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.matrix td { border: 0; padding: 0; }
.matrix td.rn { padding: 4px 8px 4px 0; white-space: nowrap; font-weight: 500; }
.matrix td.rn.sub { padding-top: 12px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.matrix td.cell.empty { text-align: center; color: var(--line); }
.chip { display: block; padding: 4px 6px; border-radius: 4px; color: var(--ink); font-size: 11px; line-height: 1.25; text-decoration: none; }
.legend .chip { display: inline-block; }
.chip small { display: block; font-family: var(--mono); font-size: 10px; opacity: .75; }
.chip:hover { text-decoration: none; outline: 2px solid var(--accent); }
.chip.sp2 { background: var(--sp2); color: var(--accent-ink); } .chip.sp1 { background: var(--sp1); }
.chip.s0 { background: var(--s00); } .chip.sn1 { background: var(--sn1); } .chip.sn2 { background: var(--sn2); color: #fff; }
.chip.pend { outline: 2px dotted var(--s-pending); outline-offset: -2px; opacity: .85; }
.hist-quotes { margin: 0 0 8px 210px; color: var(--ink); } .hist-quotes div { padding: 1px 0; }
@media (max-width: 600px) { .hist-quotes { margin-left: 0; } }
.bulk { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.proposal td:first-child { color: var(--muted); white-space: nowrap; width: 1%; }
.steps { margin: 8px 0; padding-left: 18px; }

/* ------------------------------------------------------------------ issue spectra */
.tabs { display: flex; gap: 4px; margin: 0 0 12px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 13px; background: var(--panel); }
.tabs a.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btnlink { display: inline-block; padding: 4px 10px; border: 1px solid var(--line); border-radius: 14px; font-size: 13px; color: var(--ink); text-decoration: none; }
.btnlink.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.axis-block { padding: 10px 0 12px; border-bottom: 1px solid var(--soft); }
.axis-block.unknown { opacity: .7; }
.axhead { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.axtrack { margin: 8px 0 2px; }
.axbar { position: relative; height: 18px; border-radius: 9px;
  background: linear-gradient(90deg, var(--sn2) 0%, var(--sn1) 30%, var(--s00) 50%, var(--sp1) 70%, var(--sp2) 100%); opacity: .9; }
.axtrack.small .axbar { height: 12px; }
.axbar .mid { position: absolute; left: 50%; top: -3px; bottom: -3px; border-left: 1px dashed var(--muted); }
.ptick { position: absolute; top: 3px; width: 2px; height: 12px; background: var(--ink); opacity: .35; transform: translateX(-50%); }
.amark { position: absolute; top: -4px; width: 20px; height: 20px; border-radius: 50%; transform: translateX(-50%); background: var(--ink); border: 3px solid var(--panel); box-shadow: 0 0 0 1px var(--ink); }
.axtrack.small .amark { width: 14px; height: 14px; top: -2px; border-width: 2px; }
.amark.thin { background: var(--panel); border: 3px solid var(--ink); box-shadow: none; }
.pmark { position: absolute; top: -3px; width: 14px; height: 14px; transform: translateX(-50%) rotate(45deg); border: 2px solid var(--ink); background: transparent; }
.amark-key, .pmark-key { display: inline-block; width: 10px; height: 10px; vertical-align: middle; border: 2px solid var(--ink); }
.amark-key { border-radius: 50%; background: var(--ink); }
.pmark-key { transform: rotate(45deg); }
.axlabels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 3px; gap: 12px; }
.axlabels span:last-child { text-align: right; }
.tag.sup-solid { background: var(--sp1); } .tag.sup-moderate { background: var(--s00); } .tag.sup-thin { background: transparent; border: 1px dashed var(--muted); }
.prop { margin: 10px 0 4px; }
table.ev { font-size: 13px; margin-top: 4px; }
table.ev td { vertical-align: top; padding: 4px 6px; }
.tag.vote-yes { background: var(--sp1); } .tag.vote-no { background: var(--sn1); } .tag.vote-abstain { background: var(--s00); }
.tag.vote-absent { background: transparent; border: 1px dashed var(--muted); }
.tag.pend { outline: 1px dotted var(--s-pending); }
.dissent { color: var(--sn2); }
.lrow { display: grid; grid-template-columns: 220px 1fr 260px; gap: 12px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--soft); }
.lrow.head { border-bottom: none; padding-bottom: 0; }
.lrow a.org { font-style: italic; }
.chip.vote { outline: 1px solid var(--ink); outline-offset: -1px; }
@media (max-width: 700px) { .lrow { grid-template-columns: 1fr; gap: 4px; } }
#mpProp { display: block; width: 100%; max-width: 100%; margin-top: 4px; }
#mpGroup { display: block; width: 100%; max-width: 100%; margin-top: 4px; } td.exc { padding-left: 18px; border-left: 3px solid var(--line); }
.omark { position: absolute; top: 0; width: 12px; height: 12px; transform: translateX(-50%); border: 2px solid var(--ink); background: var(--panel); }
.mmark { position: absolute; top: 3px; width: 8px; height: 8px; border-radius: 50%; transform: translateX(-50%); background: var(--ink); opacity: .45; }
.mmark.out { opacity: 1; background: var(--sn2); }
.omark-key, .mmark-key { display: inline-block; width: 9px; height: 9px; vertical-align: middle; border: 2px solid var(--ink); }
.mmark-key { border-radius: 50%; background: var(--ink); opacity: .5; border: none; }
.axcomp { margin-top: 2px; }
.tag.rel-outlier { background: var(--sn1); } .tag.rel-mainstream { background: var(--s00); }
.dmark, .lmark { position: absolute; top: -16px; transform: translateX(-50%); font: 600 10px var(--mono); color: var(--ink); background: var(--panel); border: 1px solid var(--ink); border-radius: 3px; padding: 0 3px; line-height: 12px; }
.lmark { top: 20px; }
.mmark.lead { opacity: 1; background: var(--s-pending); }
.tag.rel-leadership_divergence { background: var(--s-pending); color: #fff; }
.axtrack { padding-top: 6px; }
.axbar:has(.lmark) + .axlabels { margin-top: 18px; }
.nwgroups { display: flex; flex-wrap: wrap; gap: 8px; }
.chipbox { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--panel); max-width: 330px; }
.phead { display: flex; gap: 16px; align-items: flex-start; }
.photo { margin: 0; width: 112px; flex: none; }
.photo img { width: 112px; height: 140px; object-fit: cover; border-radius: 6px; display: block; background: var(--soft); }
.photo figcaption { font-size: 10px; color: var(--muted); line-height: 1.2; margin-top: 3px; word-break: break-word; }
.photo.none { width: 72px; height: 72px; border-radius: 50%; background: var(--soft); color: var(--muted); display: flex; align-items: center; justify-content: center;
  font: 600 22px var(--serif, serif); }
.accounts { margin-top: 6px; }
.accrow { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; font-size: 13px; margin: 2px 0; }
.acctype { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); min-width: 120px; }
.acc { white-space: nowrap; } .acc select { font-size: 11px; padding: 0 2px; margin-left: 2px; } .acc .src { font-size: 10px; color: var(--muted); margin-left: 3px; }
.tag.subj { background: var(--soft); }
.sphere button { font-size: 13px; }
@media (max-width: 600px) { .phead { flex-direction: column; } }
.adjust { margin-top: 4px; } .adjust summary { cursor: pointer; color: var(--link); font-size: 12px; }
.adjust select, .adjust input { font-size: 12px; margin: 2px 0; }
.simpleform { display: flex; flex-direction: column; gap: 6px; } .simpleform label { font-size: 13px; }
.assign summary { cursor: pointer; color: var(--link); font-size: 12px; } .assign select { font-size: 12px; }

/* photo album, accounts */
.album { margin: 8px 0 4px; }
.albumgrid { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.albumgrid figure { margin: 0; width: 120px; }
.albumgrid img { width: 120px; height: 150px; object-fit: cover; border-radius: 6px; display: block; background: var(--soft); border: 2px solid transparent; }
.albumgrid figure.primary img { border-color: var(--accent); }
.albumgrid figcaption { font-size: 11px; line-height: 1.3; margin-top: 3px; word-break: break-word; }
.albumgrid button, .acc button { font-size: 11px; padding: 0 5px; }
.filebtn { cursor: pointer; border: 1px solid var(--line, #ccc); border-radius: 6px; padding: 3px 8px; }
.acc { display: inline-flex; gap: 3px; align-items: baseline; border: 1px solid var(--line, #ddd); border-radius: 12px; padding: 1px 8px; }

/* vote sorting */
.vrow { display: grid; grid-template-columns: 90px 1fr 180px 220px; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); align-items: start; }
.trow { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; outline: none; }
.trow.cur { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.trow.done { opacity: .55; }
.trow .thead { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 6px; }
.tstep1, .tstep2 { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.tstep1 button, .tstep2 button { font-size: 12.5px; padding: 3px 8px; }
.tiss.hint { outline: 2px dashed var(--accent); outline-offset: 1px; }
kbd { font: 10px ui-monospace, monospace; border: 1px solid var(--line); border-radius: 3px; padding: 0 3px; margin: 0 4px; opacity: .75; }
@media (max-width: 700px) { .vrow { grid-template-columns: 1fr; } }
.tstep1[hidden], .tstep2[hidden] { display: none; }

/* people */
.catgrid { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.catgrid button { font-size: 12.5px; }
.tag.ok { background: color-mix(in srgb, #2b8a3e 18%, transparent); }
table.people td { vertical-align: top; padding: 6px 6px; border-bottom: 1px solid var(--line); }
.mini { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; background: var(--soft); font-size: 11px; color: var(--muted); }
.incl { margin: 4px 0; }

.err { color: #b3261e !important; font-weight: 600; }
.toast { position: fixed; right: 16px; bottom: 16px; max-width: min(520px, calc(100vw - 32px)); padding: 10px 14px; border-radius: 8px; z-index: 50;
  background: #b3261e; color: #fff !important; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.toast.ok { background: #2b8a3e; }

.nwwrap { display: flex; gap: 10px; align-items: stretch; }
.nwinfo { width: 330px; flex: none; border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow: auto; max-height: 760px; }
.nwtools { margin: 6px 0; }
@media (max-width: 800px) { .nwwrap { flex-direction: column; } .nwinfo { width: auto; } }

.connform { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.connform label { display: inline-flex; gap: 4px; align-items: center; }
.connform label.wide { flex-basis: 100%; } .connform label.wide textarea { flex: 1; }
.suggest-inline { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.tag.rupt { background: color-mix(in srgb, #b3261e 20%, transparent); }
.connform [hidden] { display: none !important; }

.imtable tr.bad td { background: color-mix(in srgb, #b3261e 8%, transparent); }
.imtable td, .imtable th { padding: 3px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.nwinfo .connform label { flex-wrap: wrap; } .nwinfo .connform input, .nwinfo .connform select { max-width: 100%; }

/* photos & faces */
.photogrid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.phcard { width: 180px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: inherit; text-decoration: none; }
.phcard img { width: 180px; height: 120px; object-fit: cover; border-radius: 6px; background: var(--soft); }
.phbox { position: relative; display: inline-block; max-width: 100%; }
.phbox img { max-width: 100%; display: block; border-radius: 6px; }
.fbox { position: absolute; border: 2px solid #f0b400; border-radius: 4px; color: #fff; font: bold 11px sans-serif; text-shadow: 0 0 3px #000; padding: 1px 3px; }
.fbox.confirmed { border-color: #2b8a3e; } .fbox.suggested { border-color: #f0b400; } .fbox.rejected, .fbox.other, .fbox.unknown { border-color: #9aa0a6; border-style: dashed; }
.facethumb { width: 44px; height: 44px; object-fit: cover; border-radius: 50%; vertical-align: middle; margin-right: 4px; }

/* photo finds */
.pfgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 10px; }
.pfcard { border: 1px solid var(--line, #ddd); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.pfcard.approved { opacity: .7; border-color: #3a7; } .pfcard.rejected { opacity: .45; }
.pfimg { position: relative; display: block; cursor: pointer; }
.pfimg img { width: 100%; height: 170px; object-fit: cover; border-radius: 6px; background: var(--soft); }
.pfimg input { position: absolute; top: 6px; left: 6px; transform: scale(1.4); }
.pfbar { position: sticky; top: 0; background: var(--card, #fff); padding: 6px 0; z-index: 2; }

/* POLINT_TRANSLATION_V1 — translation stays visually distinct from original evidence. */
.polint-translate { margin: .45rem 0 .65rem; font-size: .9rem; }
.polint-translate .polint-translate-lang { max-width: 145px; }
.polint-translate-result:not([hidden]) { border-left: 3px solid var(--accent, #64748b); padding: .45rem .7rem; margin-top: .45rem; background: var(--soft, #f1f5f9); border-radius: 3px; }
.polint-translate-text { white-space: pre-wrap; overflow-wrap: anywhere; unicode-bidi: plaintext; margin-top: .3rem; }

/* countries of a person / organisation */
.ctyline { margin: 2px 0 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ctyline .badge { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line, #ccc); font-size: 12px; }
.ctyline button.small { padding: 1px 8px; font-size: 12px; }
.ctywhy { width: 100%; } .ctywhy summary { cursor: pointer; color: var(--muted); }
.ctypick { width: 100%; display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.ctycand { display: block; font-size: 12px; }

/* possible-duplicates review: side-by-side comparison */
.dupcmp { width: 100%; border-collapse: collapse; margin: 4px 0; }
.dupcmp th { text-align: left; font-weight: 600; width: 90px; color: var(--muted); vertical-align: top; padding: 4px 6px; }
.dupcmp td { vertical-align: top; padding: 4px 6px; width: 42%; }
.dupcmp td:last-child { width: 70px; white-space: nowrap; }
.dupcmp tr.same td:last-child { color: #2e7d32; }
.dupcmp tr.differs { background: rgba(179, 38, 30, 0.08); }
.dupcmp tr.differs td:last-child { color: #b3261e; font-weight: 600; }
.dupimg { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; float: left; margin-right: 8px; }

/* profile network card: enlarge in place, ranking, zoom */
.egoHead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.egoHead h2 { margin: 0; }
.egoToggle { padding: 4px 10px; font-size: 13px; }
.egoBody { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 8px; }
.egoStage { position: relative; min-width: 0; }
.egoZoom { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.egoZoom button { width: 28px; height: 28px; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; color: var(--ink); line-height: 1; }
.egoSide { display: none; min-width: 0; }
.egoSide h3 { margin: 0 0 2px; }
.egoRank { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.egoRank button { width: 100%; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 4px 8px; align-items: center; text-align: left;
  background: none; border: 0; border-radius: 6px; padding: 6px 8px; color: var(--ink); font: 13px var(--sans); cursor: pointer; }
.egoRank button:hover, .egoRank button.on { background: var(--soft); }
.egoRank button:focus-visible, .egoZoom button:focus-visible, .egoToggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.egoDot { width: 10px; height: 10px; border-radius: 50%; }
.egoName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.egoN { font-variant-numeric: tabular-nums; }
.egoBar { grid-column: 2 / 4; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.egoBar i { display: block; height: 100%; background: var(--accent); }
.egoFoot { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; margin: 8px 0 0; }
.egoBusy #cyEgo { cursor: progress; opacity: .75; }
.egoCard.egoBig { position: fixed; z-index: 45; top: calc(16px + env(safe-area-inset-top, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; overflow: hidden; margin: 0; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.egoBig .egoBody { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr) 260px; }
.egoBig .egoStage, .egoBig #cyEgo { height: 100%; }
.egoBig .egoSide { display: block; overflow: auto; }
.egoScrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 44; }
body.egoLocked { overflow: hidden; }
@media (max-width: 760px) {
  .egoBig .egoBody { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .egoBig .egoSide { max-height: 32vh; }
}
.egoZoom button { display: inline-flex; align-items: center; justify-content: center; }
.egoZoom button[aria-pressed="true"], #nwPhotos[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* members' distribution on top of a spectrum bar (groups with > 20 placed members) */
.axdist { position: relative; height: 34px; margin-bottom: 2px; border-bottom: 1px solid var(--line); }
.axdist .dbar { position: absolute; bottom: 0; background: var(--muted); opacity: .45; border-radius: 2px 2px 0 0; box-sizing: border-box; border-left: 1px solid var(--panel); }
.axdist .dmean { position: absolute; top: 0; bottom: -2px; border-left: 2px solid var(--ink); transform: translateX(-1px); }
.dmean-key { display: inline-block; width: 0; height: 10px; border-left: 2px solid var(--ink); vertical-align: middle; margin-right: 2px; }
.distcap { margin-top: 4px; }

/* minimisable cards: "–" at the top right shrinks a card to its title */
.card.minCard:not(.egoBig) { position: relative; }
.card.minCard > h2:first-child { padding-right: 36px; }
.cardMin { width: 26px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--panel);
  color: var(--muted); font: 600 16px/1 var(--sans); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cardMin:hover { color: var(--ink); border-color: var(--muted); }
.cardMin:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card.minCard > .cardMin { position: absolute; top: 12px; right: 12px; }
.egoHead .cardMin, .head .cardMin { margin-left: 8px; }
.egoHead { gap: 8px; }
.egoHead > h2 { flex: 1; }
.card.minimised > :not(:first-child):not(.cardMin) { display: none !important; }
.card.minimised > h2:first-child, .card.minimised > .egoHead h2 { margin-bottom: 0; }
.card.minimised .egoToggle { display: none; }

/* custom groups */
.gform td { padding: 4px 8px 4px 0; vertical-align: top; }
.gform td:first-child { width: 280px; }
.chip a { text-decoration: none; margin-left: 2px; }

/* clickable distribution bars and the bloc page */
a.dbar { cursor: pointer; }
a.dbar:hover, a.dbar:focus-visible { background: var(--accent); opacity: .8; outline: none; }
.blocband { position: absolute; top: -4px; bottom: -4px; background: var(--accent); opacity: .35; border-radius: 3px; }
.blocband-key { display: inline-block; width: 14px; height: 10px; background: var(--accent); opacity: .35; vertical-align: middle; border-radius: 2px; }
.axbar .blocmed { position: absolute; top: -6px; bottom: -6px; border-left: 2px solid var(--ink); transform: translateX(-1px); }
.bloctable td { vertical-align: middle; }
.blocev > td { background: var(--soft); }
.blocevbody details > summary { display: none; }

/* party page tabs and the Factions tab */
.ptabs { display: flex; gap: 4px; margin: 0 0 12px; border-bottom: 1px solid var(--line); }
.ptabs a { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.ptabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.ptabs a:hover { text-decoration: none; color: var(--ink); }
.tablewrap { overflow-x: auto; }
.fmatrix th, .fmatrix td { vertical-align: top; padding: 6px 8px; }
.fmatrix th { font-size: 12px; text-align: left; white-space: nowrap; }
.bchip { display: inline-block; padding: 1px 6px; border-radius: 10px; font-size: 12px; background: var(--soft); white-space: nowrap; }
.bchip.b-mainstream { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.bchip.b-outer-neg, .bchip.b-outer-pos { background: color-mix(in srgb, var(--sn2) 22%, transparent); }
.fband { position: absolute; top: 0; bottom: 0; background: var(--ink); opacity: .07; border-left: 1px solid var(--panel); }
.fband.b-mainstream { background: var(--accent); opacity: .3; }
.fband.b-outer-neg, .fband.b-outer-pos { opacity: .14; }
.fissue .axbar { overflow: visible; }
.fissue { margin-bottom: 26px; }
.ofmark { position: absolute; top: 100%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; pointer-events: auto; }
.ofmark i { width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 8px solid var(--sn2); margin-top: 2px; }
.ofmark b { font: 500 10px var(--sans); color: var(--ink); white-space: nowrap; background: var(--panel); padding: 0 2px; }
.ofmark-key { display: inline-block; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 7px solid var(--sn2); vertical-align: middle; }
.ftable th { font-size: 12px; text-align: left; }
.ftable td { vertical-align: top; }

/* comparing up to two more actors on the positions card */
:root { --c1: #2f6db5; --c2: #c2601b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c1: #79a8e6; --c2: #ef9a5c; } }
:root[data-theme="dark"] { --c1: #79a8e6; --c2: #ef9a5c; }
.cmpbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0; padding: 8px 10px; background: var(--soft); border-radius: 8px; }
.cmpchip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 8px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; }
.cmpchip.c1 { border-color: var(--c1); } .cmpchip.c2 { border-color: var(--c2); }
.cmpx { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.cmpx:hover { color: var(--ink); }
.cmpsearch { position: relative; }
.cmpsearch input { width: 240px; max-width: 60vw; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; }
.cmpsug { position: absolute; left: 0; top: 34px; z-index: 30; min-width: 280px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.cmpsug a, .cmpsug span { display: block; padding: 6px 10px; font-size: 13px; color: var(--ink); }
.cmpsug a:hover { background: var(--soft); text-decoration: none; }
.cmark { position: absolute; top: 1px; width: 14px; height: 14px; transform: translateX(-50%); border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--ink); z-index: 2; }
.cmark.c1 { background: var(--c1); border-radius: 2px; }
.cmark.c2 { background: var(--c2); clip-path: polygon(50% 0, 100% 100%, 0 100%); border: 0; box-shadow: none; width: 16px; height: 15px; }
.cmark-key { display: inline-block; width: 10px; height: 10px; vertical-align: middle; }
.cmark-key.c1 { background: var(--c1); border-radius: 2px; }
.cmark-key.c2 { background: var(--c2); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.cmpline { margin-top: 2px; }
.axdist.c1, .axdist.c2 { height: 22px; }
.axdist.c1 .dbar { background: var(--c1); opacity: .55; }
.axdist.c2 .dbar { background: var(--c2); opacity: .55; }
.axdist .distlabel { position: absolute; left: 0; top: 0; font-size: 10px; color: var(--muted); background: var(--panel); padding: 0 3px; z-index: 1; line-height: 1.3; }

/* a compared party's D / L markers in its colour */
.dmark.c1, .lmark.c1 { border-color: var(--c1); color: var(--c1); }
.dmark.c2, .lmark.c2 { border-color: var(--c2); color: var(--c2); }

/* clickable markers on spectrum bars (open a breakdown in a new tab) */
a.dmark, a.lmark, a.amark, a.cmark { text-decoration: none; cursor: pointer; }
a.dmark:hover, a.lmark:hover, a.dmark:focus-visible, a.lmark:focus-visible { background: var(--ink); color: var(--panel); outline: none; }
a.amark:hover, a.cmark:hover, a.amark:focus-visible, a.cmark:focus-visible { box-shadow: 0 0 0 3px var(--accent); outline: none; }

/* automated pipeline page and AI proposals in Review */
.pstage { display: inline-block; min-width: 86px; padding: 1px 6px; border-radius: 4px; font-size: 12px; background: var(--soft); }
.pstage.ok { background: color-mix(in srgb, var(--s-confirmed) 18%, transparent); }
.pstage.bad { background: color-mix(in srgb, var(--s-disputed) 22%, transparent); }
.pstage.skip { color: var(--muted); }
.jstate { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: var(--soft); }
.jstate.s-ok { background: color-mix(in srgb, var(--s-confirmed) 20%, transparent); }
.jstate.s-late { background: color-mix(in srgb, var(--s-limited) 25%, transparent); }
.jstate.s-failing { background: color-mix(in srgb, var(--s-disputed) 25%, transparent); }
.aiprop { margin: 4px 0; }
.tag.conf-high { background: color-mix(in srgb, var(--s-confirmed) 20%, transparent); }
.tag.conf-medium { background: color-mix(in srgb, var(--s-limited) 22%, transparent); }
.tag.conf-low { background: color-mix(in srgb, var(--s-disputed) 18%, transparent); }
