/* forensics.css — the shared Forensics panel (FORENSICS_PANEL_SPEC.md).
   One in-place detail+edit panel opened from any editor widget, so seeing a
   record and editing it happen in the same place (no jumping to the Atlas).
   Self-scoped variables (with fallbacks) so it reads consistently on any host
   editor page. */
.fx-root{
  --fx-bg:#f5f1e8; --fx-surface:#fffaf0; --fx-text:#1a3a5c; --fx-muted:#666;
  --fx-accent:#b8553a; --fx-border:#d9cdb4; --fx-divider:#e7ddc6;
  --fx-place:#b8553a; --fx-person:#1a3a5c; --fx-source:#666; --fx-ok:#2d5928; --fx-err:#9e3a2e;
  --fx-fd:"Fraunces","Newsreader",Georgia,serif; --fx-fb:"Newsreader",Georgia,serif;
  --fx-fm:"JetBrains Mono",ui-monospace,monospace;
}
.fx-backdrop{position:fixed;inset:0;background:rgba(20,20,16,.34);opacity:0;pointer-events:none;transition:opacity .2s ease;z-index:8000}
.fx-root.open .fx-backdrop{opacity:1;pointer-events:auto}
.fx-panel{position:fixed;top:0;right:0;height:100dvh;width:480px;max-width:94vw;background:var(--fx-bg);color:var(--fx-text);
  box-shadow:-8px 0 40px rgba(20,20,16,.22);transform:translateX(100%);transition:transform .2s ease;z-index:8001;
  display:flex;flex-direction:column;font-family:var(--fx-fb)}
.fx-root.open .fx-panel{transform:translateX(0)}
.fx-strip{display:flex;align-items:center;gap:10px;padding:12px 16px;background:var(--fx-place);color:#fff8ef}
.fx-panel[data-fx-type="person"] .fx-strip{background:var(--fx-person)}
.fx-panel[data-fx-type="source"] .fx-strip{background:var(--fx-source)}
.fx-link{cursor:pointer;transition:background .12s ease}
.fx-link:hover{background:var(--fx-surface)}
.fx-link:focus-visible{outline:2px solid var(--fx-accent);outline-offset:1px}
.fx-strip .fx-type{font-family:var(--fx-fm);font-size:11px;letter-spacing:.16em;text-transform:uppercase}
.fx-strip .fx-x{margin-left:auto;width:30px;height:30px;border-radius:50%;border:1px solid rgba(255,255,255,.5);background:transparent;color:#fff;cursor:pointer;font-size:16px;line-height:1}
.fx-body{flex:1;overflow:auto;padding:20px 22px 24px}
.fx-title{font-family:var(--fx-fd);font-style:italic;font-weight:600;font-size:26px;line-height:1.1;margin:0 0 6px}
.fx-ids{font-family:var(--fx-fm);font-size:11px;color:var(--fx-muted);line-height:1.7;margin-bottom:14px}
.fx-chips{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:18px}
.fx-chip{font-family:var(--fx-fm);font-size:10px;letter-spacing:.04em;text-transform:uppercase;padding:4px 9px;border-radius:99px;border:1px solid var(--fx-border);color:var(--fx-text);background:var(--fx-surface)}
.fx-sec{margin:0 0 22px}
.fx-sec>label,.fx-seclabel{display:block;font-family:var(--fx-fm);font-size:11px;letter-spacing:.05em;text-transform:uppercase;color:var(--fx-muted);margin:0 0 7px}
.fx-conf{display:flex;align-items:center;gap:8px;font-family:var(--fx-fm);font-size:12px}
.fx-conf .d{width:9px;height:9px;border-radius:50%;background:var(--fx-border)}
.fx-conf .d.on{background:var(--fx-accent)}
.fx-prose{font-family:var(--fx-fb);font-size:14px;line-height:1.55}
.fx-input,.fx-sel,.fx-ta{width:100%;background:var(--fx-surface);border:1px solid var(--fx-border);border-radius:8px;
  color:var(--fx-text);font-family:var(--fx-fb);font-size:14px;padding:9px 11px}
.fx-ta{min-height:120px;line-height:1.5;resize:vertical}
.fx-sel{appearance:none;font-size:13px;padding:8px 10px}
.fx-input:focus,.fx-sel:focus,.fx-ta:focus{outline:none;border-color:var(--fx-accent)}
.fx-grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.fx-updates{display:flex;flex-direction:column;gap:8px;margin-bottom:8px}
.fx-update{background:var(--fx-surface);border:1px solid var(--fx-divider);border-left:3px solid var(--fx-accent);border-radius:6px;padding:8px 10px}
.fx-update .when{font-family:var(--fx-fm);font-size:10px;color:var(--fx-muted)}
.fx-update .what{font-family:var(--fx-fb);font-size:13.5px;line-height:1.45;margin-top:2px}
.fx-addrow{display:flex;gap:8px;align-items:flex-start}
.fx-addrow .fx-ta{min-height:54px}
.fx-foot{border-top:1px solid var(--fx-divider);background:var(--fx-bg);padding:12px 16px;display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.fx-btn{appearance:none;border:1px solid var(--fx-accent);background:transparent;color:var(--fx-accent);border-radius:8px;
  padding:9px 14px;font-family:var(--fx-fm);font-size:12px;letter-spacing:.03em;cursor:pointer}
.fx-btn:hover{background:var(--fx-accent);color:#fff8ef}
.fx-btn.primary{background:var(--fx-accent);color:#fff8ef}
.fx-btn:disabled{opacity:.45;cursor:not-allowed}
.fx-btn.ghost{border-color:var(--fx-border);color:var(--fx-muted)}
.fx-btn.ghost:hover{background:var(--fx-surface);color:var(--fx-text)}
.fx-status{font-family:var(--fx-fm);font-size:11px;margin-left:auto}
.fx-status.ok{color:var(--fx-ok)} .fx-status.err{color:var(--fx-err)}
@media(max-width:640px){
  .fx-panel{top:auto;bottom:0;right:0;width:100vw;max-width:100vw;height:90dvh;border-radius:16px 16px 0 0;transform:translateY(100%)}
  .fx-root.open .fx-panel{transform:translateY(0)}
  .fx-strip{border-radius:16px 16px 0 0}
  .fx-handle{width:40px;height:4px;border-radius:2px;background:rgba(255,255,255,.6);margin:6px auto -2px;order:-1}
}
