/* ==========================================================================
   PixelForge additions — on top of the shared MotionLabs panel system.
   ========================================================================== */

.pf-doc { margin-bottom: 9px; padding: 6px 8px; border-radius: var(--r-sm); background: var(--surface-input);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 9.5px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.pf-doc.is-set { color: var(--text-mid); }

/* a block that opens when its checkbox is ticked */
.pf-sub { display: none; margin: -2px 0 8px 22px; }
.pf-sub.is-open { display: block; animation: pf-open 0.3s var(--expo); }
.pf-sub .mk-num { max-width: 160px; }
.pf-sub .mk-seg { margin-top: 6px; }
@keyframes pf-open { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

.pf-fields-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.pf-fields-2 .mk-in-l { min-width: 0; }

/* case tiles */
.pf-case .mk-tile { padding-top: 8px; padding-bottom: 7px; }
.pf-case-s { display: block; font-size: 14px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; color: var(--text-mid);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.pf-case .mk-tile.is-on .pf-case-s { color: var(--accent-text); }

/* scale toggles */
.pf-scales { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-top: 8px; }
.pf-scale {
  height: 28px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--surface-hi), var(--surface)); color: var(--text-mid);
  font-weight: 600; font-size: 11px; cursor: pointer; box-shadow: inset 0 1px 0 var(--hl);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.3s var(--spring);
}
.pf-scale:hover { color: var(--text); border-color: var(--accent-a45); transform: translateY(-1px); }
.pf-scale.is-on { color: var(--accent-text); border-color: var(--accent-a45);
  background: linear-gradient(180deg, #1c2c3c, #16222f); box-shadow: inset 0 1px 0 var(--hl), 0 6px 14px -10px rgba(49, 168, 255, 0.9); }

/* results area */
.pf-results {
  margin: 10px 0 4px; padding: 6px 8px; min-height: 40px;
  border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--surface-input);
}
.mk-panel > .pf-results { margin-left: 10px; margin-right: 10px; }
.pf-clean { color: var(--ok) !important; }

/* audit findings */
.pf-find { border-top: 1px solid var(--line-soft); opacity: 0; transform: translateY(4px); animation: fs-in 0.32s var(--expo) forwards; }
.pf-find:first-child { border-top: 0; }
.pf-find-head {
  display: flex; align-items: center; gap: 7px; width: 100%; padding: 7px 0; border: 0; background: none;
  color: var(--text); text-align: left; cursor: pointer; font-size: 11px; font-weight: 600;
}
.pf-find-head i { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim); }
.pf-find--b .pf-find-head i { background: var(--err); box-shadow: 0 0 8px rgba(229, 120, 108, 0.6); }
.pf-find--w .pf-find-head i { background: var(--warn); }
.pf-find-t { flex: 1 1 auto; min-width: 0; }
.pf-find-head b { font-size: 10px; font-weight: 600; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.pf-find--b .pf-find-head b { color: var(--err); }
.pf-find--w .pf-find-head b { color: var(--warn); }
.pf-find-head svg { width: 12px; height: 12px; fill: none; stroke: var(--text-dim); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s var(--expo); }
.pf-find.is-open .pf-find-head svg { transform: rotate(90deg); }
.pf-find-head:hover .pf-find-t { color: var(--accent-text); }
.pf-find-body { display: none; padding: 0 0 8px 13px; }
.pf-find.is-open .pf-find-body { display: block; animation: pf-open 0.3s var(--expo); }
.pf-find-body p { margin: 0 0 6px; font-size: 10.5px; line-height: 1.5; color: var(--text-mid); }
.pf-hit { display: flex; align-items: flex-start; gap: 8px; margin: 0 -6px; padding: 4px 6px; border-radius: var(--r-sm); font-size: 10.5px; }
.pf-hit[data-id] { cursor: pointer; }
.pf-hit[data-id]:hover { background: var(--surface-hi); }
.pf-hit.is-sel { background: var(--accent-a10); box-shadow: inset 0 0 0 1px var(--accent-a25); }
.pf-hit-n { flex: 1 1 auto; min-width: 0; color: var(--text); overflow-wrap: anywhere; }
.pf-hit-n small { display: block; font-size: 9.5px; color: var(--text-dim); }
.pf-hit em { flex: 0 0 auto; max-width: 45%; font-style: normal; font-size: 9.5px; color: var(--text-dim); text-align: right; overflow-wrap: anywhere; }

/* rename diff */
.pf-sum { margin: 2px 0 6px; padding: 6px 8px; border-radius: var(--r-sm); background: var(--accent-a10); color: var(--accent-text); font-size: 10.5px; }
.pf-diff { padding: 5px 0; border-top: 1px solid var(--line-soft); font-size: 10.5px; line-height: 1.4; overflow-wrap: anywhere; }
.pf-diff s { display: block; color: var(--text-dim); }
.pf-diff span { display: block; color: var(--accent-text); }
.pf-diff.is-same s { text-decoration: none; }
.pf-diff.is-same span { display: none; }

/* logs (prep, export) */
.pf-log { padding: 4px 0; border-top: 1px solid var(--line-soft); font-size: 10.5px; line-height: 1.45; color: var(--text-mid); overflow-wrap: anywhere; }
.pf-log:first-child { border-top: 0; }
.pf-log--head { color: var(--text); font-weight: 600; }
.pf-log--bad { color: var(--err); }
.pf-log--note { color: var(--warn); }
#pf-ex-results { max-height: 240px; overflow-y: auto; }

/* export progress */
.pf-progress { height: 3px; margin: 8px 10px 0; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.pf-progress[hidden] { display: none; }
.pf-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-deep), var(--accent-hi));
  box-shadow: 0 0 8px rgba(49, 168, 255, 0.8); transition: width 0.25s var(--ease); }

.mk-btn[hidden] { display: none; }
.pf-sub .mk-fields { margin-bottom: 6px; }
