/* ----- problem page ----- */
.pp { display: grid; grid-template-columns: 1fr 6px 1.1fr; height: 100%; min-height: 0; }
.pp-left { overflow-y: auto; padding: 16px 22px 40px; min-width: 0; }
.pp-split { background: var(--line); cursor: col-resize; }
.pp-split:hover { background: var(--accent); }
.pp-right { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pp-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 14px; position: sticky; top: -16px; background: var(--bg); padding-top: 4px; z-index: 2; }
.pp-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; cursor: pointer; color: var(--fg2); font-weight: 600; font-size: 13.5px; }
.pp-tabs button.on { color: var(--fg); border-bottom-color: var(--accent); }
.pp-bar { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--bg2); flex-wrap: wrap; }
.pp-bar .spacer { flex: 1; }
.pp-editor { flex: 1 1 55%; min-height: 200px; overflow: hidden; position: relative; }
.pp-editor .CodeMirror { height: 100%; font-family: var(--mono); font-size: 14px; line-height: 1.55; }
.fallback-editor { width: 100%; height: 100%; border: 0; border-radius: 0; resize: none; font-family: var(--mono); font-size: 14px; background: #0b0d12; color: #e6e9ef; padding: 12px; }
.pp-out { flex: 1 1 45%; overflow-y: auto; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--bg2); min-height: 120px; }
.pp-out pre, .example pre, .solcode { background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; font-size: 12.5px; white-space: pre-wrap; word-break: break-word; margin: 6px 0; }
.pp-out pre.err { color: var(--bad); }
.pp-out pre.stdout { color: var(--fg2); }
.solcode { white-space: pre; overflow-x: auto; font-size: 13px; }
.example { margin: 10px 0; }
.verdict { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.verdict.ok { color: var(--ok); }
.verdict.bad { color: var(--bad); }
.tcase { border: 1px solid var(--line); border-radius: 10px; margin: 6px 0; overflow: hidden; }
.tcase-h { display: flex; justify-content: space-between; padding: 7px 12px; cursor: pointer; font-weight: 600; font-size: 13.5px; background: var(--bg3); }
.tcase.bad { border-color: var(--bad); }
.tcase-b { padding: 4px 10px 8px; }
@media (max-width: 860px) {
  .pp { grid-template-columns: 1fr; height: auto; }
  .pp-split { display: none; }
  .pp-editor { height: 360px; flex: none; }
}
/* ----- bank ----- */
.bank { display: flex; flex-direction: column; gap: 6px; }
.bank-row { display: grid; grid-template-columns: 28px 1fr 180px 190px 70px; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 11px; background: var(--bg2); border: 1px solid var(--line); color: var(--fg); }
.bank-row:hover { border-color: var(--accent); text-decoration: none; }
.bank-row .bt { font-weight: 600; }
.bank-row .bp, .bank-row .bm { color: var(--fg2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bank-row .tag { justify-self: end; }
@media (max-width: 860px) { .bank-row { grid-template-columns: 28px 1fr 70px; } }
.pp-left, .pp-right, .pp-editor, .pp-out { min-width: 0; }
.pp-pair { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; background: var(--warn-bg); border-bottom: 1px solid var(--line); font-size: 13px; }
@media (max-width: 600px) {
  .pp-left { padding: 12px 12px 24px; }
  .pp-bar { padding: 8px; gap: 6px; }
  .pp-bar .btn { padding: 7px 11px; }
  .pp-editor { height: 340px; }
  .pp-editor .CodeMirror { font-size: 13px; }
  .pp-tabs button { padding: 8px 8px; font-size: 13px; }
}
/* ----- performance report ----- */
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 6px; }
@media (max-width: 600px) { .metrics { grid-template-columns: 1fr; } }
.metric { background: var(--bg3); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.metric-l { font-size: 12px; color: var(--fg2); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.metric-v { font-size: 21px; font-weight: 800; margin: 2px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-b { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--ok); }
.metric-bar { flex: 1; height: 6px; background: var(--line); border-radius: 9px; overflow: hidden; }
.metric-bar i { display: block; height: 100%; background: var(--ok); border-radius: 9px; }
.metric-r, .metric-x { font-size: 12px; color: var(--fg3); margin-top: 3px; }
.metric-note { font-size: 12px; margin: 2px 0 8px; }
