/* Consolidation Evaluation — six human exercises over a sweep run and its repair */

#login-overlay {
  position: fixed; inset: 0; background: #f5f6f8;
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.login-box {
  background: #fff; border: 1px solid #e0e0e0; border-radius: 10px;
  padding: 34px 40px; width: 460px; box-shadow: 0 4px 18px rgba(0,0,0,.06);
}
.login-box h2 { margin: 0 0 10px; }
.login-box p { color: #666; font-size: 14px; line-height: 1.5; }
.login-box input {
  width: 100%; box-sizing: border-box; padding: 9px 12px; font-size: 15px;
  border: 1px solid #ccc; border-radius: 6px; margin: 12px 0 8px;
}
.login-box button {
  padding: 8px 22px; font-size: 15px; border: none; border-radius: 6px;
  background: #1A85FF; color: #fff; cursor: pointer;
}
.login-msg { color: #D41159; font-size: 13px; min-height: 18px; margin-top: 6px; }
#existing-sessions h3 { font-size: 13px; color: #888; margin: 22px 0 6px; text-transform: uppercase; }
.session-row { font-size: 14px; padding: 4px 0; display: flex; gap: 10px; align-items: baseline; }
.session-row a { cursor: pointer; color: #1A85FF; }
.session-row .muted { color: #999; font-size: 12px; }
.hidden { display: none !important; }
.muted { color: #999; }

#toolbar {
  display: flex; align-items: center; gap: 12px; padding: 10px 18px;
  background: #fff; border-bottom: 1px solid #e4e4e4; position: sticky; top: 0; z-index: 10;
  flex-wrap: wrap;
}
.app-title { font-weight: 700; }
.toolbar-info { color: #666; font-size: 13px; }
#sel-country { padding: 4px 8px; font-size: 13px; border: 1px solid #d5d5d5; border-radius: 6px; }
.modes { display: flex; gap: 4px; }
.btn-mode {
  border: 1px solid #d5d5d5; background: #fff; border-radius: 6px;
  font-size: 12.5px; padding: 5px 12px; cursor: pointer; color: #555;
}
.btn-mode.active { background: #4F2C99; border-color: #4F2C99; color: #fff; }
.filters { margin-left: auto; display: flex; gap: 4px; }
.btn-filter {
  border: 1px solid #d5d5d5; background: #fff; border-radius: 14px;
  font-size: 12px; padding: 4px 12px; cursor: pointer; color: #555;
}
.btn-filter.active { background: #1A85FF; border-color: #1A85FF; color: #fff; }
.btn-sm {
  border: 1px solid #d5d5d5; background: #fff; border-radius: 6px;
  font-size: 13px; padding: 5px 12px; cursor: pointer;
}

#legend {
  padding: 8px 18px; font-size: 12.5px; color: #777; background: #fafafa;
  border-bottom: 1px solid #eee;
}
#legend kbd {
  background: #eef1f5; border: 1px solid #d8dce2; border-radius: 4px;
  padding: 0 5px; font-size: 11px; font-family: ui-monospace, monospace;
}

#cards { max-width: 1080px; margin: 0 auto; padding: 16px; }
.card {
  background: #fff; border: 1px solid #e2e2e2; border-radius: 10px;
  margin-bottom: 16px; overflow: hidden;
}
.card.decided { border-left: 4px solid #00BF7F; }
.card.active { outline: 2px solid #1A85FF; outline-offset: -1px; }
.card-head {
  display: flex; align-items: baseline; gap: 10px; padding: 12px 16px 4px;
  flex-wrap: wrap;
}
.card-head .cid { font-family: ui-monospace, monospace; color: #888; font-size: 12.5px; }
.card-head .country {
  font-size: 12.5px; color: #08234C; background: #eef3fb;
  border-radius: 4px; padding: 1px 7px; white-space: nowrap;
}
.card-head .label { font-weight: 700; font-size: 15.5px; }
.card-head .meta { color: #999; font-size: 12.5px; margin-left: auto; }
.badge {
  font-size: 11px; border-radius: 4px; padding: 1px 7px; font-weight: 600;
}
.badge.shared { background: #fff4d6; color: #8a6d00; }
.badge.stratum { background: #efeaff; color: #4F2C99; }
.badge.numbers { background: #fdecf2; color: #7c0015; }
.badge.relation { background: #e3f0ff; color: #08517a; }
.badge.uncertain { background: #fdecf2; color: #D41159; }

.desc { padding: 2px 16px 6px; font-size: 13.5px; color: #333; line-height: 1.45; }
.desc .timing { color: #888; font-size: 12.5px; }
.excerpt {
  margin: 6px 16px 10px; padding: 10px 12px; background: #f7f8fa;
  border: 1px solid #eceef1; border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; line-height: 1.45; white-space: pre-wrap;
  max-height: 240px; overflow-y: auto; color: #333;
}

/* mention rows (entities + expanded pairs) */
.mention-row {
  display: flex; gap: 8px; padding: 6px 16px; border-top: 1px solid #f2f2f2;
  font-size: 13px; align-items: flex-start;
}
.mention-row.flagged { background: #fff8f9; }
.mention-row .m-ctl { display: flex; gap: 4px; padding-top: 1px; flex-shrink: 0; }
.m-ctl button {
  border: 1px solid #d8dce2; background: #fff; border-radius: 4px;
  font-size: 10.5px; padding: 1px 6px; cursor: pointer; color: #888;
}
.m-ctl button.on-intruder { background: #D41159; border-color: #D41159; color: #fff; }
.m-ctl button.on-notpol { background: #7c0015; border-color: #7c0015; color: #fff; }
.mention-row .m-main { flex: 1; min-width: 0; }
.m-main .m-title { font-weight: 600; }
.m-main .m-title .m-stage { font-weight: 400; color: #888; font-size: 11.5px; font-family: ui-monospace, monospace; }
.m-main .m-desc { color: #555; font-size: 12.5px; }
.m-main .m-src { color: #999; font-size: 11.5px; font-family: ui-monospace, monospace; }
.m-main .m-excerpt { display: none; }
.m-main.open .m-excerpt {
  display: block; margin-top: 4px; padding: 8px 10px; background: #f7f8fa;
  border: 1px solid #eceef1; border-radius: 6px;
  font-family: ui-monospace, monospace; font-size: 11.5px; white-space: pre-wrap;
  max-height: 200px; overflow-y: auto;
}
.m-toggle { color: #1A85FF; cursor: pointer; font-size: 11.5px; }

/* pair cards */
.pair-body { display: flex; gap: 0; border-top: 1px solid #f2f2f2; }
.pair-side { flex: 1; min-width: 0; padding: 8px 16px; }
.pair-side + .pair-side { border-left: 1px dashed #e4e4e4; }
.pair-side .p-head { font-weight: 700; font-size: 14px; }
.pair-side .p-eid { font-family: ui-monospace, monospace; color: #888; font-size: 12px; }
.pair-side .p-meta { color: #999; font-size: 12px; }
.pair-side .p-aka { color: #666; font-size: 12px; font-style: italic; }
.pair-side .mention-row { padding: 4px 0; }

.verdict-bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 16px 12px;
  flex-wrap: wrap; border-top: 1px solid #f2f2f2;
}
.verdict-bar .ask { font-size: 13px; color: #555; margin-right: 4px; }
.btn-verdict {
  border: 1px solid #cfd4da; border-radius: 6px; background: #fff;
  font-size: 12.5px; font-weight: 600; padding: 6px 12px; cursor: pointer; color: #444;
}
.btn-verdict:hover { border-color: #1A85FF; color: #1A85FF; }
.btn-verdict.sel { background: #1A85FF; border-color: #1A85FF; color: #fff; }
.btn-verdict .key {
  font-weight: 400; font-size: 10.5px; color: #999; font-family: ui-monospace, monospace;
}
.btn-verdict.sel .key { color: #cfe4ff; }
.verdict-bar input[type="text"] {
  flex: 1; min-width: 160px; padding: 6px 10px; font-size: 13px;
  border: 1px solid #ddd; border-radius: 6px;
}
.verdict-warn { color: #D41159; font-size: 12px; padding: 0 16px 8px; }

.reveal { border-top: 1px dashed #e4e4e4; padding: 10px 16px 12px; background: #fcfcfd; }
.reveal .r-tag { font-size: 11px; text-transform: uppercase; color: #999; font-weight: 700; }
.reveal .r-reason { font-size: 13px; color: #555; }

/* ── mode 4 (discards_v004): follow-up questions under the verdict ── */
.follow { padding: 0 16px 10px; background: #fcfcfd; }
.follow:empty { display: none; }
.follow-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 8px; }
.follow-row .ask { font-size: 13px; color: #555; margin-right: 4px; }
.btn-follow {
  border: 1px solid #d0d0d0; background: #fff; border-radius: 4px;
  padding: 3px 9px; font-size: 12px; cursor: pointer;
}
.btn-follow:hover { border-color: #1A85FF; color: #1A85FF; }
.btn-follow.sel { background: #1A85FF; border-color: #1A85FF; color: #fff; }

/* ── modes 5 and 6 (the Step-2b repair audit) ── */
.badge.assignee { background: #e7f7f0; color: #00754f; }
.pair-side .p-mentions.folded { display: none; }
.p-omitted { color: #999; font-size: 11.5px; padding: 4px 0; }
.pieces { border-top: 1px solid #f2f2f2; }
.piece { padding: 8px 16px; border-top: 1px dashed #e4e4e4; }
.piece:first-child { border-top: none; }
.piece.judged { background: #fbfefc; }
.piece .p-head { font-weight: 700; font-size: 14px; }
.piece .p-meta { color: #999; font-size: 12px; }
.piece .mention-row { padding: 4px 0; }
.piece .follow-row { padding-top: 4px; padding-bottom: 2px; }
.reveal .badge { margin-left: 6px; }
.reveal .r-reason.muted { font-size: 12px; }

/* ── mode 8 (sweep_v006): one card per screen ── */
.v6-top { margin-bottom: 12px; }
.v6-progress { height: 8px; background: #eceef1; border-radius: 4px; overflow: hidden; }
.v6-bar { height: 100%; background: #00BF7F; transition: width .2s; }
.v6-toprow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding-top: 8px; font-size: 12.5px; color: #666;
}
.v6-count { font-weight: 700; color: #333; }
.v6-blocks { display: flex; gap: 4px; flex-wrap: wrap; }
.v6-block {
  border: 1px solid #d5d5d5; background: #fff; border-radius: 14px;
  font-size: 12px; padding: 3px 10px; cursor: pointer; color: #555;
}
.v6-block.on { background: #4F2C99; border-color: #4F2C99; color: #fff; }
.v6-countries { display: flex; gap: 6px; }
.v6-country { background: #eef3fb; color: #08234C; border-radius: 4px; padding: 1px 7px; }
.v6-country.on { background: #08234C; color: #fff; }
.v6-scope { margin-left: auto; cursor: pointer; }
.v6-card { border-width: 1px; }
.v6-pos { font-weight: 700; color: #4F2C99; font-size: 13px; }
.v6-ask { padding: 6px 16px 10px; font-size: 16px; font-weight: 700; color: #08234C; }
.v6-keep .v6-mtitle { padding: 0 16px 4px; font-size: 15.5px; font-weight: 700; }
.v6-src, .v6-note, .v6-marks {
  padding: 0 16px 6px; color: #888; font-size: 12px; font-family: ui-monospace, monospace;
}
.v6-note { font-family: inherit; color: #8a6d00; }
.v6-keep .excerpt { max-height: 340px; }
.v6-entity-head {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; padding: 0 16px 4px;
}
.v6-entity-head .label { font-weight: 700; font-size: 15.5px; }
.v6-entity-head .p-eid { font-family: ui-monospace, monospace; color: #888; font-size: 12px; }
.v6-entity-head .meta { color: #999; font-size: 12.5px; margin-left: auto; }
.v6-mentions { max-height: 62vh; overflow-y: auto; border-top: 1px solid #f2f2f2; }
.mention-row.v6-cursor { outline: 2px solid #1A85FF; outline-offset: -2px; }
.v6-skip { margin-left: auto; color: #888; font-weight: 400; }
.btn-follow .key, .btn-verdict .key { font-family: ui-monospace, monospace; }
.btn-follow .key { font-size: 10.5px; color: #999; }
.btn-follow.sel .key { color: #cfe4ff; }
.v6-comment { padding: 0 16px 10px; }
.v6-comment textarea {
  width: 100%; box-sizing: border-box; padding: 6px 10px; font-size: 13px;
  border: 1px solid #ddd; border-radius: 6px; font-family: inherit; resize: vertical;
}
.v6-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px 12px; border-top: 1px solid #f2f2f2; font-size: 12px;
}
.pair-side .p-mentions { max-height: 52vh; overflow-y: auto; }
