/* Direction Review (Step-3b stage-2 blind grading) */

#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: 14px; padding: 10px 18px;
  background: #fff; border-bottom: 1px solid #e4e4e4; position: sticky; top: 0; z-index: 10;
}
.app-title { font-weight: 700; }
.toolbar-info { color: #666; font-size: 13px; }
.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;
}

#cards { max-width: 1100px; margin: 0 auto; padding: 16px; }
.card {
  background: #fff; border: 1px solid #e2e2e2; border-radius: 10px;
  margin-bottom: 18px; overflow: hidden;
}
.card.graded { border-left: 4px solid #00BF7F; }
.card-head {
  display: flex; align-items: baseline; gap: 10px; padding: 12px 16px 4px;
  flex-wrap: wrap;
}
.card-head .eid { font-family: ui-monospace, monospace; color: #888; font-size: 12.5px; }
.card-head .label { font-weight: 700; font-size: 15.5px; }
.card-head .meta { color: #999; font-size: 12.5px; margin-left: auto; }
.evidence {
  margin: 8px 16px; 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: 260px; overflow-y: auto; color: #333;
}

/* ── per-dimension grading rows ── */
.dims { padding: 4px 16px 10px; }
.dim-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 5px 0;
  border-top: 1px solid #f2f3f5; flex-wrap: wrap;
}
.dim-row:first-child { border-top: none; }
.dim-row details { flex: 1; min-width: 240px; }
.dim-row summary {
  cursor: pointer; font-size: 13px; font-weight: 600; color: #333;
  list-style-position: outside; padding-top: 5px;
}
.dim-row summary .dim-id { font-family: ui-monospace, monospace; font-weight: 400; color: #aaa; font-size: 11px; margin-left: 6px; }
/* A contested scale: the two prompt versions answer it differently. The marker
   says where the measurement is disputed and never which answer either gave. */
.dim-flag {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 8px;
  background: #fff4e5; color: #b25e00; font-size: 10.5px; font-weight: 700;
  letter-spacing: .2px; vertical-align: 1px; cursor: help;
}
.dim-row.contested { background: #fffaf3; }
.dim-detail {
  margin: 6px 0 4px 14px; padding: 8px 12px; background: #f9fafb;
  border: 1px solid #eef0f3; border-radius: 6px; font-size: 12.5px; line-height: 1.45;
}
.dim-detail .poles { color: #555; margin: 4px 0; }
.dim-detail .poles .neg { color: #D41159; font-weight: 600; }
.dim-detail .poles .pos { color: #00875a; font-weight: 600; }
.dim-detail table { border-collapse: collapse; width: 100%; margin-top: 4px; }
.dim-detail td { border-top: 1px solid #f0f0f0; padding: 3px 6px; vertical-align: top; font-size: 12px; }
.dim-detail td.pt { font-family: ui-monospace, monospace; font-weight: 700; width: 26px; text-align: center; }
.dim-detail .na { color: #777; margin-top: 4px; }

.score-btns { display: flex; gap: 3px; flex: none; align-items: center; }
.btn-score {
  min-width: 32px; height: 30px; border: 1px solid #cfd4da; border-radius: 6px;
  background: #fff; font-weight: 700; font-size: 12.5px; cursor: pointer; color: #444;
  font-family: ui-monospace, monospace; padding: 0 4px;
}
.btn-score:hover { border-color: #1A85FF; color: #1A85FF; }
.btn-score.sel { background: #1A85FF; border-color: #1A85FF; color: #fff; }
.btn-score[data-s="NA"], .btn-score[data-s="skip"] {
  font-family: inherit; font-weight: 600; font-size: 11.5px;
}
.btn-score[data-s="NA"].sel { background: #888; border-color: #888; }
.btn-score[data-s="skip"].sel { background: #FAA307; border-color: #FAA307; }

/* ── reveal ── */
.reveal-bar { padding: 6px 16px 14px; }
.btn-reveal {
  padding: 7px 18px; border: none; border-radius: 6px; background: #1A85FF;
  color: #fff; font-weight: 600; font-size: 13px; cursor: pointer;
}
.btn-reveal:disabled { background: #c9d4e2; cursor: default; }
.reveal { border-top: 1px dashed #e4e4e4; padding: 10px 16px 14px; background: #fcfcfd; }
.reveal table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.reveal th {
  text-align: left; font-size: 11px; color: #888; text-transform: uppercase;
  letter-spacing: .3px; padding: 4px 8px; border-bottom: 1px solid #e8e8e8;
}
.reveal td { padding: 5px 8px; border-top: 1px solid #f2f3f5; vertical-align: top; }
.reveal td.dim { font-weight: 600; color: #333; }
.reveal td.dim .dim-id { font-family: ui-monospace, monospace; font-weight: 400; color: #aaa; font-size: 11px; }
.score-chip {
  display: inline-block; font-family: ui-monospace, monospace; font-weight: 700;
  min-width: 26px; text-align: center; border-radius: 4px; padding: 1px 5px;
  background: #eef4ff; color: #1A85FF;
}
.score-chip.neg { background: #fdecf2; color: #D41159; }
.score-chip.zero { background: #f0f0f0; color: #666; }
.score-chip.na { background: #eee; color: #888; font-family: inherit; font-size: 11px; }
.reveal .rat { color: #777; font-size: 12px; margin-left: 6px; }
.agree-chip {
  display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 7px;
  border-radius: 8px; margin-left: 5px; vertical-align: 1px;
}
.agree-chip.exact { background: #e3faf1; color: #00875a; }
.agree-chip.close { background: #fff4e5; color: #b25e00; }
.agree-chip.diff { background: #fdecf2; color: #D41159; }
.reveal .gate { color: #D41159; font-size: 12.5px; padding: 4px 0; }
.reveal .notes { color: #999; font-size: 12px; padding-top: 6px; }
.empty-note { text-align: center; color: #999; padding: 40px 0; }
