/* Draft 4
   Sticky top bar
   Three independent scroll panels
*/

.hwrap { display:flex; flex-direction:column; gap:12px; }

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
}

.subtitle { opacity:0.85; max-width: 980px; margin-top: 6px; }

.controls {
  margin-top: 12px;
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
  align-items: end;
}

.field { display:flex; flex-direction:column; gap:6px; min-width: 220px; }
.field.grow { flex: 1; min-width: 340px; }
.field label { font-size: 12px; opacity: 0.85; }

.field input, .field select, .code {
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  background: white;
}

.hint { font-size: 12px; opacity: 0.72; }

.btn {
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 12px;
  padding: 10px 12px;
  background: white;
  cursor: pointer;
  font-size: 14px;
}

.btn.primary { font-weight: 650; }

.grid {
  display: grid;
  grid-template-columns: 360px 1fr 420px;
  gap: 12px;
  min-height: 70vh;
}

.panel {
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  background: rgba(255,255,255,0.7);
  overflow: hidden;
  display:flex;
  flex-direction: column;
  min-height: 70vh;
}

.panel-head {
  padding: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  display:flex;
  flex-direction: column;
  gap: 6px;
}

.panel-body {
  padding: 12px;
  overflow: auto;
  display:flex;
  flex-direction: column;
  gap: 12px;
}

.title { font-size: 16px; font-weight: 650; }
.meta { font-size: 13px; opacity: 0.8; }

.tree { display:flex; flex-direction: column; gap: 10px; }
.tag {
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  background: rgba(255,255,255,0.9);
  overflow:hidden;
}
.taghead {
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding: 10px 12px;
  cursor: pointer;
}
.tagname { font-weight: 650; }
.tagcount { font-size: 12px; opacity: 0.75; }
.ops { display:none; padding: 0 10px 10px; gap: 8px; flex-direction: column; }
.tag.open .ops { display:flex; }

.op {
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  padding: 10px;
  cursor: pointer;
  display:flex;
  flex-direction: column;
  gap: 6px;
}
.op:hover { border-color: rgba(0,0,0,0.24); }

.row { display:flex; gap: 10px; align-items:center; }
.meth {
  font-size: 12px;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 999px;
  padding: 2px 8px;
  opacity: 0.9;
}
.path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  word-break: break-word;
}
.sum { font-size: 13px; opacity: 0.85; }

.section { display:flex; flex-direction: column; gap: 8px; }
.section-title { font-weight: 650; }

.form { display:flex; flex-direction: column; gap: 10px; }
.frow { display:grid; grid-template-columns: 190px 1fr; gap: 10px; align-items:center; }
.frow label { font-size: 13px; opacity: 0.85; }
.frow input { width: 100%; }

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.code.pre { white-space: pre-wrap; word-break: break-word; min-height: 160px; }

.actions { display:flex; gap: 8px; flex-wrap: wrap; }

.hintbox {
  border: 1px dashed rgba(0,0,0,0.2);
  border-radius: 14px;
  padding: 10px;
  font-size: 12px;
  opacity: 0.85;
}

.empty { opacity: 0.7; font-size: 13px; }

.reference {
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  background: rgba(255,255,255,0.7);
  overflow: hidden;
}

.refbody { background: rgba(255,255,255,0.95); height: 80vh; overflow: auto; }
.redocMount { height: 80vh; }

@media (max-width: 1250px) {
  .grid { grid-template-columns: 1fr; }
  .panel { min-height: 52vh; }
}
