/* Importance Review, four-level mode (?scale=v4, Step-3a v004 regrade).
   Loaded after importance_review.css, which holds the shared login box, toolbar,
   filters and grade-button rules; this file adds the list/detail layout and
   overrides the few shared rules the four-level layout draws differently. */

body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #f5f6f8; color: #222; }
.pad { padding: 16px; }
.err { color: #D41159; }
kbd { font-size: 11px; border: 1px solid #ccc; border-radius: 3px; padding: 0 4px; background: #fff; color: #555; }

.login-box { width: 480px; }
.login-box input, .login-box select {
  width: 100%; box-sizing: border-box; padding: 9px 12px; font-size: 15px;
  border: 1px solid #ccc; border-radius: 6px; margin: 8px 0;
}

.back-btn { text-decoration: none; color: #555; font-size: 18px; padding: 2px 8px; border-radius: 6px; }
.back-btn:hover { background: #eee; }

#legend { padding: 0; color: #666; }
#legend > summary { padding: 8px 18px; cursor: pointer; line-height: 1.6; }
.legend-body { padding: 0 18px 12px; max-height: 55vh; overflow-y: auto; }
.legend-body details { margin: 6px 0; }
.legend-body summary { cursor: pointer; font-weight: 600; color: #444; }
.verbatim {
  white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; line-height: 1.45; color: #333; background: #fff;
  border: 1px solid #eceef1; border-radius: 6px; padding: 8px 10px; margin-top: 4px;
}

#layout { display: flex; align-items: flex-start; }
#entity-list {
  width: 280px; flex-shrink: 0; position: sticky; top: 52px; max-height: calc(100vh - 100px);
  overflow-y: auto; border-right: 1px solid #e4e4e4; background: #fff;
}
.list-sep { padding: 6px 12px; font-size: 11px; color: #888; text-transform: uppercase; background: #fafafa; border-bottom: 1px solid #eee; }
.ent-item { padding: 7px 12px; border-bottom: 1px solid #f0f0f0; cursor: pointer; font-size: 13px; }
.ent-item:hover { background: #f4f8ff; }
.ent-item.active { background: #e8f1ff; border-left: 3px solid #1A85FF; }
.ent-item.done { border-right: 4px solid #00BF7F; }
.ent-item .eid { font-family: ui-monospace, monospace; font-size: 11.5px; color: #888; margin-right: 6px; }
.ent-item .lvl-mini { float: right; font-weight: 700; font-size: 12px; color: #00875a; }

#detail { flex: 1; min-width: 0; padding: 14px 20px 60px; max-width: 1100px; }
#detail section { background: #fff; border: 1px solid #e2e2e2; border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; }
#detail h4 { margin: 0 0 8px; font-size: 13px; color: #555; text-transform: uppercase; letter-spacing: .02em; }
.head .pos { font-size: 12px; color: #888; }
.head .label { font-weight: 700; font-size: 16px; margin: 4px 0; }
.head .meta { font-size: 12.5px; color: #666; }
.badge { display: inline-block; font-size: 11px; border-radius: 4px; padding: 1px 6px; margin-left: 6px; background: #fff4d6; color: #8a6d00; }
/* the evidence block sits inside a padded section here, not in a card */
.evidence { margin: 0; max-height: 55vh; }

.grades { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
/* named buttons ("A Routine  A / 1"), not the five-level mode's square letters */
.btn-grade { width: auto; height: auto; font-weight: normal; padding: 7px 12px; color: #333; }
.btn-grade b { margin-right: 4px; }
.btn-grade .key { font-size: 10.5px; color: #aaa; margin-left: 6px; }
.btn-grade.sel .key { color: #dbe9ff; }
.note { width: 100%; box-sizing: border-box; padding: 6px 10px; font-size: 13px; border: 1px solid #ddd; border-radius: 6px; }
.save-state { font-size: 12px; color: #888; margin-top: 6px; }

.reveal-row { display: flex; gap: 10px; align-items: baseline; padding: 3px 0; font-size: 13px; }
.reveal-row .who { font-family: ui-monospace, monospace; color: #888; min-width: 170px; font-size: 12px; }
.reveal-row .lvl { font-weight: 700; min-width: 22px; text-align: center; border-radius: 4px; padding: 1px 5px; background: #eef4ff; color: #1A85FF; }
.reveal-row .lvl.match { background: #e3faf1; color: #00875a; }
.reveal-row .lvl.old { background: #f3f0fa; color: #4F2C99; }
.reveal-row .lvl.discard { background: #fdecf2; color: #D41159; font-size: 11px; }
.reveal-row .rat { color: #555; }
.revised { font-size: 12px; color: #8a6d00; margin-top: 4px; }
